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

  1. #ifndef _CL_CLB_H
  2. #define _CL_CLB_H
  3.  
  4. /*
  5. **
  6. ** clboard.library v16.2 definitions
  7. **
  8. */
  9.  
  10. /*
  11. ** SAS/C pragmas 
  12. */
  13.  
  14. #ifndef _NO_PRAG
  15. extern struct Library *CLBBase;
  16. #pragma libcall CLBBase CLB_LoadList 1E 0
  17. #pragma libcall CLBBase CLB_SaveList 24 0
  18. #pragma libcall CLBBase CLB_GetEntry 2A 801
  19. #pragma libcall CLBBase CLB_FindEntry 30 801
  20. #pragma libcall CLBBase CLB_DeleteEntry 36 801
  21. #pragma libcall CLBBase CLB_AddEntry 3C 801
  22. #pragma libcall CLBBase CLB_LockList 42 001
  23. #pragma libcall CLBBase CLB_UnlockList 48 0
  24. #pragma libcall CLBBase CLB_LastEntry 4E 801
  25. #pragma libcall CLBBase CLB_ValidateUser 54 9802
  26. #pragma libcall CLBBase CLB_ValidateBox 5A 9802
  27. #pragma libcall CLBBase CLB_TestBox 60 9802
  28. #pragma libcall CLBBase CLB_AddBox 66 9802
  29. #pragma libcall CLBBase CLB_DelBox 6C 9802
  30. #pragma libcall CLBBase CLB_GetBox 72 09803
  31. #pragma libcall CLBBase CLB_FindBrett 78 801
  32. #pragma libcall CLBBase CLB_FindNewsgroup 7E 801
  33. #pragma libcall CLBBase CLB_ClearBrettNetdist 84 801
  34. #pragma libcall CLBBase CLB_GetNumEntries 8A 0
  35. #pragma libcall CLBBase CLB_MakeAutoEntry 90 A9803
  36. #pragma libcall CLBBase CLB_NG2BrettName 96 9802
  37. #pragma libcall CLBBase CLB_Reserved1 9C 0
  38. #pragma libcall CLBBase CLB_GetAutoEntry a2 001
  39. #pragma libcall CLBBase CLB_DelAutoEntry a8 801
  40. #pragma libcall CLBBase CLB_AddAutoEntry ae 801
  41. #pragma libcall CLBBase CLB_FindAutoEntry b4 801
  42. #pragma libcall CLBBase CLB_DelBoxEverywhere ba 801
  43. #pragma libcall CLBBase CLB_GetA c0 9802
  44. #pragma tagcall CLBBase CLB_Get c0 9802
  45. #pragma libcall CLBBase CLB_SetA c6 9802
  46. #pragma tagcall CLBBase CLB_Set c6 9802
  47. #pragma libcall CLBBase CLB_NewObjectA cc 90803
  48. #pragma tagcall CLBBase CLB_NewObject cc 90803
  49. #pragma libcall CLBBase CLB_IsModified d2 0
  50. #pragma libcall CLBBase CLB_NumAutoEntryBoards d8 0
  51. #pragma libcall CLBBase CLB_FindFTSArea de 801
  52. #pragma libcall CLBBase CLB_NewTestBox e4 9802
  53. #pragma libcall CLBBase CLB_NewAddBox ea 9802
  54. #pragma libcall CLBBase CLB_NewDelBox f0 9802
  55. #pragma libcall CLBBase CLB_NewGetBox f6 0802
  56. #pragma libcall CLBBase CLB_GetBoard_Relative fc 0BA9805
  57. #pragma libcall CLBBase CLB_FindBoard_Prefix 102 0A9804
  58. #pragma libcall CLBBase CLB_FindBoard_Next 108 0A9804
  59. #pragma libcall CLBBase CLB_FindBoard_Prev 10e 0A9804
  60. #pragma libcall CLBBase CLB_Debug 114 0
  61. #pragma libcall CLBBase CLB_ValidateNets 11a 0
  62. #endif
  63.  
  64. #define CLB_NAME "clboard.library"
  65. #define CLB_VERSION 16
  66.  
  67. /*
  68. ** Board is a private handle. Use CLB_Get()/CLB_Set()
  69. ** to access data items.
  70. */
  71. typedef APTR Board;
  72.  
  73. /*
  74. ** ANSI prototypes 
  75. */
  76. #ifndef _NO_PROTO
  77. int CLB_LoadList( void );
  78. int CLB_SaveList( void );
  79. Board CLB_GetEntry( Board );
  80. void CLB_DeleteEntry( Board );
  81. void CLB_LockList( int readwrite );
  82. void CLB_UnlockList( void );
  83. Board CLB_LastEntry( Board );
  84. long CLB_ValidateUser( Board, struct User* );
  85. long CLB_ValidateBox( Board, struct Box* );
  86. long CLB_TestBox( Board, STRPTR boxname );
  87. long CLB_AddBox( Board, STRPTR boxname );
  88. long CLB_DelBox( Board, STRPTR boxname );
  89. long CLB_GetBox( Board, STRPTR boxnamebuffer, ULONG index );
  90. Board CLB_FindBrett( STRPTR boardname );
  91. Board CLB_FindNewsgroup( STRPTR newsgroupname );
  92. void CLB_ClearBrettNetdist( Board );
  93. long CLB_GetNumEntries( void );
  94. /* Internal */
  95. Board CLB_MakeAutoEntry( char*, char*, char* );
  96. ULONG CLB_NG2BrettName( STRPTR newsgroupname, STRPTR brettname );
  97. void CLB_Reserved1( void );
  98. Board CLB_GetAutoEntry( ULONG index );
  99. Board CLB_FindAutoEntry( STRPTR name );
  100. Board CLB_AddAutoEntry( APTR newautoentry );
  101. Board CLB_DelAutoEntry( APTR autoentry );
  102. void CLB_DelBoxEverywhere( STRPTR boxname );
  103. long CLB_IsModified( void );
  104. long CLB_NumAutoEntryBoards( void );
  105. Board CLB_FindFTSArea( STRPTR areaname );
  106. long CLB_NewTestBox( Board, struct Box *box );
  107. long CLB_NewAddBox( Board, struct Box *box );
  108. long CLB_NewDelBox( Board, struct Box *box );
  109. struct Box *CLB_NewGetBox( Board, ULONG index );
  110. void CLB_Debug( void );
  111. int CLB_ValidateNets( void );
  112.  
  113. /*
  114. **  ONLY USE THESE FUNCTIONS TO ACCESS BOARD DATA!
  115. */
  116.  
  117. Board CLB_NewObjectA( STRPTR boardname, ULONG autoentry, struct TagItem *vals );
  118. Board CLB_NewObject( STRPTR boardname, ULONG autoentry, ... );
  119. void CLB_GetA( Board brett, struct TagItem *vals );
  120. void CLB_Get( Board brett, ... );
  121. void CLB_SetA( Board brett, struct TagItem *vals );
  122. void CLB_Set( Board brett, ... );
  123.  
  124. /*
  125. **    Misc Support Stuff
  126. */
  127.  
  128. ULONG CLB_FindBoard_Prefix(
  129.     struct User *user,            /* optional */
  130.     STRPTR prefix,
  131.     STRPTR dstname,                /* optional */
  132.     size_t dstlen );
  133.  
  134. ULONG CLB_FindBoard_Next(
  135.     struct User *user,            /* optional */
  136.     STRPTR current,
  137.     STRPTR dstname,                /* optional */
  138.     size_t dstlen );
  139.  
  140. ULONG CLB_FindBoard_Prev(
  141.     struct User *user,            /* optional */
  142.     STRPTR current,
  143.     STRPTR dstname,                /* optional */
  144.     size_t dstlen );
  145.  
  146. ULONG CLB_GetBoard_Relative(
  147.     struct User *user,            /* optional */
  148.     char *currboard,
  149.     char *path,
  150.     char *dst,
  151.     size_t dstlen );
  152.  
  153. #endif
  154.  
  155. /*
  156. **  Board Attributes
  157. */
  158.  
  159. #define CLBA_Dummy            (TAG_USER+0x711)
  160. #define CLBA_NAME             (CLBA_Dummy+1)    /* STRPTR boardname */
  161. #define CLBA_NGNAME         (CLBA_Dummy+2)    /* STRPTR newsgroupname */
  162. #define CLBA_PATH             (CLBA_Dummy+3)    /* STRPTR dos path */
  163. #define CLBA_ADMIN            (CLBA_Dummy+4)    /* STRPTR administrative user */
  164. #define CLBA_GROUP            (CLBA_Dummy+5)    /* UBYTE[16] group flags */
  165. #define CLBA_LASTUPDATE        (CLBA_Dummy+6)    /* time_t last write */
  166. #define CLBA_HOLD_KB        (CLBA_Dummy+7)    /* ULONG maxkb */
  167. #define CLBA_HOLD_DAYS        (CLBA_Dummy+8)    /* ULONG maxdays */
  168. #define CLBA_PRI            (CLBA_Dummy+9)    /* ULONG access priority */
  169. #define CLBA_ABOUT            (CLBA_Dummy+14)    /* STRPTR infoline */
  170. #define CLBA_FTSNAME        (CLBA_Dummy+15)    /* STRPTR fidoname */
  171. #define CLBA_CENSOR            (CLBA_Dummy+16)    /* STRPTR censor */
  172. #define CLBA_WRITEPRI        (CLBA_Dummy+17)    /* ULONG write prority */
  173. #define CLBA_MAXNET            (CLBA_Dummy+18)    /* ULONG maximum msg size. 0 = no limit */
  174.  
  175. #define CLBA_NEWFILEDATE    (CLBA_Dummy+24)    /* time_t internal for NewFiles! */
  176. #define CLBA_NETCNT            (CLBA_Dummy+25) // V16: number of entries in net list
  177.  
  178.  
  179. /*
  180. **  The following attributes are boolean, but are stored as
  181. **  a long integer containing either TRUE or FALSE.
  182. */
  183.  
  184. #define CLBA_NO_BIN            (CLBA_Dummy+10)    /* LONGBOOL no binaries allowed */
  185. #define CLBA_NO_TEXT        (CLBA_Dummy+11)    /* LONGBOOL no text allowed */
  186. #define CLBA_MAPS_ALLOWED    (CLBA_Dummy+12)    /* LONGBOOL maps access allowed */
  187. #define CLBA_AUTOENTRY        (CLBA_Dummy+13)    /* LONGBOOL board was created automatically */
  188. #define CLBA_REALNAME        (CLBA_Dummy+19)    /* LONGBOOL realname required */
  189. #define CLBA_DLRATIO        (CLBA_Dummy+20)    /* LONGBOOL download ratio active */
  190. #define CLBA_AUTOREMOVE        (CLBA_Dummy+21)    /* LONGBOOL auto remove */
  191.  
  192. #define CLBA_EXTERNAL        (CLBA_Dummy+22)    /* LONGBOOL board contents are stored externally */
  193. #define CLBA_ROUTEONLY        (CLBA_Dummy+23)    /* LONGBOOL this board is route-only */
  194.  
  195. #define CLBA_NOSCAN            (CLBA_Dummy+26) // LONGBOOL don't rescan date on every access (only EXTERNAL)
  196.  
  197. //
  198. //    Return-Values from CLB_ValidateUser()
  199. //
  200.  
  201. #define CLBVU_NONE    0
  202. #define CLBVU_ACCESS 1
  203. #define CLBVU_CENSORED 2
  204. #define CLBVU_IS_ADMIN 4
  205. #define CLBVU_IS_CENSOR 8
  206.  
  207. #endif
  208.