home *** CD-ROM | disk | FTP | other *** search
/ Amiga Tools 4 / Amiga Tools 4.iso / tools / internet-tools / connect-line / cl / devkit / c / include / cl_msg.h < prev    next >
Encoding:
C/C++ Source or Header  |  1995-11-12  |  5.3 KB  |  122 lines

  1. #ifndef _CL_CL_MSG_H
  2. #define _CL_CL_MSG_H
  3.  
  4. #define CLMFT_TAGBASE (TAG_USER+0x8775)
  5.  
  6. /*
  7. **  Tags for CLMSG_GetIndex()
  8. */
  9.  
  10. #define CLMFT_WRITE    (CLMFT_TAGBASE+1)        /* LONGBOOL: Get Index for Write */
  11. #define CLMFT_ATTEMPTONLY (CLMFT_TAGBASE+2)    /* LONGBOOL: Attempt to alloc index, fail if in use */
  12. #define CLMFT_USER (CLMFT_TAGBASE+26)        /* LONGBOOL: Obj really is Pointer to User */
  13.  
  14. /*
  15. **  Tags for CLMSG_Crunch()
  16. */
  17.  
  18. #define CLMFT_GAUGE        (CLMFT_TAGBASE+27)        /* APTR: MUI gauge object to update */
  19. #define CLMFT_APP        (CLMFT_TAGBASE+30)        /* APTR: MUI app object to do Input_Buffered on */
  20. #define CLMFT_HOLD_DAYS (CLMFT_TAGBASE+28)        /* ULONG: Hold days */
  21. #define CLMFT_HOLD_KB    (CLMFT_TAGBASE+29)        /* ULONG: Hold KB */
  22.  
  23. /*
  24. **  Attributes for CLMSG_Set() / CLMSG_Get()
  25. */
  26.  
  27. #define CLMSGA_NUMBER         (CLMFT_TAGBASE+3)    /* [..G] ULONG Current msg number */
  28. #define CLMSGA_NUMBEROFMSGS     (CLMFT_TAGBASE+30)    /* [..G] ULONG number of messages */
  29. #define CLMSGA_SUBJECT         (CLMFT_TAGBASE+4)    /* [.SG] STRPTR Subject of msg */
  30. #define CLMSGA_FILENAME     (CLMFT_TAGBASE+5)    /* [.SG] STRPTR Filename of msg */
  31. #define CLMSGA_SHORTCOMMENT (CLMFT_TAGBASE+6)    /* [.SG] STRPTR Comment */
  32. #define CLMSGA_FROM            (CLMFT_TAGBASE+7)    /* [.SG] STRPTR From */
  33. #define CLMSGA_MSGID        (CLMFT_TAGBASE+8)    /* [.SG] STRPTR MessageID */
  34. #define CLMSGA_INCOMDATE     (CLMFT_TAGBASE+9)    /* [.SG] time_t Income date */
  35. #define CLMSGA_SENDDATE     (CLMFT_TAGBASE+10)    /* [.SG] time_t Send date */
  36. #define CLMSGA_READCOUNT     (CLMFT_TAGBASE+11)    /* [.SG] ULONG read count */
  37. #define CLMSGA_FLG_BIN        (CLMFT_TAGBASE+12)    /* [.SG] LONGBOOL msg is binary */
  38. #define CLMSGA_FLG_NET        (CLMFT_TAGBASE+13)    /* [.SG] LONGBOOL msg arrived via net */
  39. #define CLMSGA_FLG_HOLD        (CLMFT_TAGBASE+14)    /* [.SG] LONGBOOL do not delete msg */
  40. #define CLMSGA_FLG_DEL        (CLMFT_TAGBASE+15)    /* [.SG] LONGBOOL msg was deleted */
  41. #define CLMSGA_FLG_ERROR    (CLMFT_TAGBASE+16)    /* [ISG] LONGBOOL error report */
  42. #define CLMSGA_FLG_CENSORED    (CLMFT_TAGBASE+17)    /* [ISG] LONGBOOL msg has been censored */
  43. #define CLMSGA_FLG_NO_RATIO    (CLMFT_TAGBASE+18)    /* [.SG] LONGBOOL don't account for U/L ratio */
  44.  
  45. #define CLMSGA_BODY_LEN        (CLMFT_TAGBASE+19)    /* [ISG] ULONG length of msg body */
  46. #define CLMSGA_BODY_FILE    (CLMFT_TAGBASE+20)    /* [ISG] STRPTR body from/to file    */
  47. #define CLMSGA_BODY_MEM        (CLMFT_TAGBASE+21)    /* [ISG] STRPTR body from/to memory. MUST SPECIFY CLMSGA_BODY_LEN! */
  48.  
  49. #define CLMSGA_COMMENT_LEN    (CLMFT_TAGBASE+22)    /* [ISG] ULONG length of msg comment */
  50. #define CLMSGA_COMMENT_FILE    (CLMFT_TAGBASE+23)    /* [ISG] STRPTR comment from/to file    */
  51. #define CLMSGA_COMMENT_MEM    (CLMFT_TAGBASE+24)    /* [ISG] STRPTR comment from/to memory. MUST SPECIFY CLMSGA_COMMENT_LEN! */
  52.  
  53. #define CLMSGA_HEADER        (CLMFT_TAGBASE+25)    /* [ISG] HH Header to/from headerlist */
  54.  
  55. #define CLMSGA_STORAGE_FILENAME (CLMFT_TAGBASE+31)    /* [..G] External Filename. NULL if not available */
  56.  
  57. /*
  58. **  Positions for CLMSG_Move()
  59. */
  60.  
  61. #define CLMSG_MOVE_NEXT 1        /* Move to next mail */
  62. #define CLMSG_MOVE_PREV 2        /* Move to previous mail */
  63. #define CLMSG_MOVE_GOTO 3        /* Move to specified index number */
  64. #define CLMSG_MOVE_MSGID 4        /* Move to specific msgid */
  65. #define CLMSG_MOVE_NEWER 5        /* Move to newer mail */
  66.  
  67. /*
  68. **    Flags for CLMSG_Store
  69. */
  70.  
  71. #define CLMSG_STORE_FILE 1        /* source is file instead of buffer */
  72. #define CLMSG_STORE_BIN 2        /* Store as binary file */
  73. #define CLMSG_STORE_ISISO 4        /* Msg contents are ISO-8859-1 */
  74.  
  75. /*
  76. **    Error codes
  77. */
  78.  
  79. #define CLMSG_ERR_NOMSG 1                    /* Get(): Index not set to a valid msg */
  80. #define CLMSG_ERR_IX_ACCESS 2                /* error occured during (valid) index access */
  81. #define CLMSG_ERR_MESSAGE_ACCESS 3            /* error occured during (valid) MESSAGE access */
  82. #define CLMSG_ERR_EXTERNAL_FILE_ACCESS    4     /* Error while accessing external file */
  83. #define CLMSG_ERR_OUTBOUND_ACCESS    5         /* Error while accessing outbound file */
  84. #define CLMSG_ERR_BAD_ARGS             6         /* bad args submitted to some function */
  85. #define CLMSG_ERR_PATH_ACCESS         7         /* Couldn't access board or user path */
  86. #define CLMSG_ERR_EXTERNAL            8         /* Requested operation not possible on external Index */
  87. #define CLMSG_ERR_TEMP_ACCESS        9         /* Error regarding handling temporary files (Crunch) */
  88. #define CLMSG_ERR_EXTERNAL_ACCESS    10         /* Error accessing external file */
  89.  
  90. #ifndef _NO_PRAG
  91. extern struct Library *CLMBase;
  92. #pragma libcall CLMBase CLMSG_GetIndex 1e 9802
  93. #pragma tagcall CLMBase CLMSG_GetIndexTags 1e 9802
  94. #pragma libcall CLMBase CLMSG_FreeIndex 24 801
  95. #pragma libcall CLMBase CLMSG_GetA 2a 9802
  96. #pragma tagcall CLMBase CLMSG_Get 2a 9802
  97. #pragma libcall CLMBase CLMSG_SetA 30 9802
  98. #pragma tagcall CLMBase CLMSG_Set 30 9802
  99. #pragma libcall CLMBase CLMSG_Move 36 10803
  100. #pragma libcall CLMBase CLMSG_Store 3c 21A90806
  101. #pragma libcall CLMBase CLMSG_Crunch 42 9802
  102. #pragma tagcall CLMBase CLMSG_CrunchTags 42 9802
  103. #endif
  104.  
  105. typedef APTR CLMSGIX;
  106.  
  107. #ifndef _NO_PROTO
  108. CLMSGIX CLMSG_GetIndex( APTR userboard, struct TagItem *tags );
  109. CLMSGIX CLMSG_GetIndexTags( APTR userboard, ... );
  110. void CLMSG_FreeIndex( CLMSGIX index );
  111. LONG CLMSG_GetA( CLMSGIX index, struct TagItem *values );
  112. LONG CLMSG_Get( CLMSGIX index, ... );
  113. LONG CLMSG_SetA( CLMSGIX index, struct TagItem *values );
  114. LONG CLMSG_Set( CLMSGIX index, ... );
  115. LONG CLMSG_Move( CLMSGIX index, LONG where, LONG position );
  116. LONG CLMSG_Store( CLMSGIX index, ULONG flags, HH headerlist, APTR source, ULONG sourcelen, ULONG commentlen );
  117. LONG CLMSG_Crunch( CLMSGIX index, struct TagItem *tags );
  118. LONG CLMSG_CrunchTags( CLMSGIX index, ... );
  119. #endif
  120.  
  121. #endif
  122.