home *** CD-ROM | disk | FTP | other *** search
/ IRIX 6.3 Development Libraries / SGI IRIX 6.3 Development Libraries.iso / dist6.3 / ViewKit_dev.idb / usr / include / Vk / VkMsgUtils.h.z / VkMsgUtils.h
Encoding:
C/C++ Source or Header  |  1996-09-20  |  1.2 KB  |  45 lines

  1. #ifndef VK_MSG_UTILS
  2. #define VK_MSG_UTILS
  3.  
  4. #ifdef __cplusplus            /* do not leave open across includes */
  5. extern "C" {                    /* for C++ V2.0 */
  6. #endif
  7.  
  8. typedef struct vkMsgBValue {
  9.   unsigned char *val;
  10.   int len;
  11. } VkMsgBValue;
  12.  
  13. typedef union vkMsgValue {
  14.   int ival;
  15.   char *val;
  16.   VkMsgBValue bval;
  17. } VkMsgValue;
  18.  
  19. typedef struct vkMsgArg {
  20.   char *type;
  21.   VkMsgValue value;
  22.   VkMsgMode mode;
  23. } VkMsgArg;
  24.  
  25. #define VkMsgTypeIsInt(type)     ((type) && !strcmp((type), VK_MSG_INT_MSG_ARG_TYPE))
  26. #define VkMsgTypeIsString(type)     ((type) && !strcmp((type), VK_MSG_STRING_MSG_ARG_TYPE))
  27. #define VkMsgTypeIsBString(type) ((type) && !strcmp((type), VK_MSG_BSTRING_MSG_ARG_TYPE))
  28.  
  29. extern VkMsgPattern VkMsgCreatePattern(char *op, VkMsgCategory category,
  30.                        VkMsgScope scope);
  31. extern void VkMsgParseArguments(VkMsgMessage msg_in, int *argc_return,
  32.                 VkMsgArg **argv_return);
  33. extern void VkMsgFreeArguments(int argc, VkMsgArg *argv);
  34. extern VkMsgMessage VkMsgCreateANotice(char *op, int argc, VkMsgArg *argv,
  35.                        VkMsgScope scope);
  36. extern VkMsgMessage VkMsgCreateARequest(char *op, int argc, VkMsgArg *argv,
  37.                     VkMsgScope scope);
  38. extern void VkMsgAddArgs(VkMsgMessage msg_out, int argc, VkMsgArg *argv);
  39.  
  40. #ifdef __cplusplus
  41. }
  42. #endif
  43.  
  44. #endif
  45.