home *** CD-ROM | disk | FTP | other *** search
/ Amiga Developer CD 2.1 / Amiga Developer CD v2.1.iso / Reference / Includes_and_Autodocs_3.5 / include / libraries / aml.h < prev    next >
Encoding:
C/C++ Source or Header  |  1999-10-20  |  9.4 KB  |  331 lines

  1. #ifndef LIBRARIES_AML_H
  2. #define LIBRARIES_AML_H
  3. /*
  4. **    $VER: aml.h 44.1 (19.10.1999)
  5. **    Includes Release 44.1
  6. **
  7. **    AML library structures and constants
  8. **
  9. **    (C) Copyright 1999 Amiga, Inc.
  10. **        All Rights Reserved
  11. */
  12.  
  13. /*****************************************************************************/
  14.  
  15.  
  16. #ifndef    EXEC_TYPES_H
  17. #include <exec/types.h>
  18. #endif
  19.  
  20. #ifndef    EXEC_NODES_H
  21. #include <exec/nodes.h>
  22. #endif
  23.  
  24. #ifndef UTILITY_TAGITEM_H
  25. #include <utility/tagitem.h>
  26. #endif
  27.  
  28. /*****************************************************************************/
  29.  
  30. #define    AmlName "aml.library"
  31. #define AML_TB    (TAG_USER+0x80000)
  32.  
  33. /*****************************************************************************/
  34.  
  35. /* Server Attribute Tags
  36.  */
  37. #define SERVERA_Dummy         (TAG_USER+0x100)
  38. #define SERVERA_HostName    (SERVERA_Dummy+0)
  39. #define SERVERA_HostPort    (SERVERA_Dummy+1)
  40. #define SERVERA_Directory    (SERVERA_Dummy+2)
  41. #define SERVERA_UserName    (SERVERA_Dummy+3)
  42. #define SERVERA_PassWord    (SERVERA_Dummy+4)
  43. #define SERVERA_Type        (SERVERA_Dummy+5)
  44. #define SERVERA_Flags        (SERVERA_Dummy+6)
  45. #define SERVERA_Socket        (SERVERA_Dummy+7)
  46. #define SERVERA_UserData    (SERVERA_Dummy+8)
  47. #define SERVERA_ProgressHook    (SERVERA_Dummy+9)
  48. #define SERVERA_SpoolFile    (SERVERA_Dummy+10)
  49. #define SERVERA_NewsGroup    (SERVERA_Dummy+11)
  50. #define SERVERA_LogFile        (SERVERA_Dummy+12)
  51. #define SERVERA_MaxSize        (SERVERA_Dummy+13)
  52. #define SERVERA_MaxLines    (SERVERA_Dummy+14)
  53. #define SERVERA_MaxWarning    (SERVERA_Dummy+15)
  54.  
  55. /* Values for SERVERA_Type
  56.  */
  57. #define SVRTYPE_SMTP    (0)    /* sending data via smtp */
  58. #define SVRTYPE_POP3    (1)    /* pop retrieval and local folders */
  59. #define SVRTYPE_IMAP    (2)    /* unsupported */
  60. #define SVRTYPE_NNTP    (3)    /* unsupported */
  61. #define SVRTYPE_LDAP    (4)    /* unsupported */
  62. #define SVRTYPE_FILE    (5)    /* For address/file "servers" */
  63.  
  64. /* Structure used for progress callbacks.
  65.  */
  66. struct ServerProgressData
  67. {
  68.     ULONG spd_Type;
  69.     ULONG spd_Action;
  70.     ULONG spd_Flags;
  71.  
  72.     /* X of Y progress */
  73.     ULONG spd_Current;
  74.     ULONG spd_Total;
  75.  
  76.     /* (sub) progress on each of X thru Y */
  77.     ULONG spd_CSize;
  78.     ULONG spd_TSize;
  79. };
  80.  
  81. /* Values for spd_Type
  82.  */
  83. #define SPDT_SERVER    (0)
  84. #define SPDT_FOLDER    (1)
  85. #define SPDT_ARTICLE    (2)
  86. #define SPDT_PART    (3)
  87. #define SPDT_ADDRESS    (4)
  88. #define SPDT_DECODER    (5)
  89.  
  90. /* Values for spd_Action
  91.  */
  92. #define SPDA_ERROR    (~0)
  93. #define SPDA_NONE    (0)
  94. #define SPDA_SCANINDEX    (1)
  95. #define SPDA_EDITINDEX    (2)
  96. #define SPDA_DELETE    (3)
  97. #define SPDA_PARSING    (4)
  98. #define SPDA_POPGET    (5)
  99. #define SPDA_SMTPSEND    (6)
  100. #define SPDA_DECODING    (7)
  101. #define SPDA_CONNECT    (8)
  102. #define SPDA_DISCONNECT    (9)
  103. #define SPDA_SENDPASS    (10)
  104. #define SPDA_SENDUSER    (11)
  105.  
  106. /* Flags for spd_Flags
  107.  */
  108. #define SPDF_INITIAL    (1 << 0)
  109. #define SPDF_UPDATE    (1 << 1)
  110. #define SPDF_END    (1 << 2)
  111. #define SPDF_STATUS    (1 << 3)
  112.  
  113.  
  114. /* Structure for article retrieval folder routing callback.
  115.  */
  116. struct ArticleDisposition
  117. {
  118.     APTR  ad_Article;
  119.     APTR  ad_Folder;
  120.     ULONG ad_MsgSize;
  121.     ULONG ad_MsgNumber;
  122.     ULONG ad_MsgTotal;
  123. };
  124.  
  125.  
  126. /* Flags for GetServerArticles()
  127.  */
  128. #define GSAF_DELETE    (1)
  129. #define GSAF_SPOOL    (2)
  130. #define GSAF_STATUS    (4)
  131.  
  132. /*****************************************************************************/
  133.  
  134. /* Folder Attribute Tags
  135.  */
  136. #define FOLDERA_Dummy         (TAG_USER+0x200)
  137. #define FOLDERA_Path        (FOLDERA_Dummy+0)
  138. #define FOLDERA_Name        (FOLDERA_Dummy+1)
  139. #define FOLDERA_DefaultName    (FOLDERA_Dummy+2)
  140. #define FOLDERA_SpoolFile    (FOLDERA_Dummy+3)
  141. #define FOLDERA_MsgCount    (FOLDERA_Dummy+4)
  142. #define FOLDERA_Flags        (FOLDERA_Dummy+5)
  143. #define FOLDERA_Accessed    (FOLDERA_Dummy+6)
  144. #define FOLDERA_Created        (FOLDERA_Dummy+7)
  145. #define FOLDERA_UserData    (FOLDERA_Dummy+8)
  146. #define FOLDERA_FirstMsgID    (FOLDERA_Dummy+9)
  147. #define FOLDERA_LastMsgID    (FOLDERA_Dummy+10)
  148. #define FOLDERA_LastRead    (FOLDERA_Dummy+11)
  149. #define FOLDERA_NumRead        (FOLDERA_Dummy+12)
  150.  
  151. /* Values for FOLDERA_DefaultName
  152.  */
  153. #define FOLDER_DEF_INBOX    (0)
  154. #define FOLDER_DEF_OUTBOX    (1)
  155. #define FOLDER_DEF_TRASH    (2)
  156. #define FOLDER_DEF_DRAFTS    (3)
  157. #define FOLDER_DEF_SAVED    (4)
  158. #define FOLDER_DEF_SPOOL    (5)
  159.  
  160. /* Folder indexing public data structure.
  161.  */
  162. struct FolderIndex
  163. {
  164.     ULONG fi_Number;
  165.     ULONG fi_Status;
  166.     ULONG fi_Size;
  167.     ULONG fi_Date;
  168.     UBYTE fi_From[64];
  169.     UBYTE fi_To[64];
  170.     UBYTE fi_Subject[128];
  171. };
  172.  
  173. /* Flags for FolderIndex.fi_Status and ARTICLEA_Status
  174.  */
  175. #define STATUS_UNREAD    (1L << 1)
  176. #define STATUS_REPLIED    (1L << 2)
  177. #define STATUS_EDITED    (1L << 3)
  178. #define STATUS_FORWARD    (1L << 4)
  179. #define STATUS_DELETED    (1L << 5)
  180. #define STATUS_SAVED    (1L << 6)
  181. #define STATUS_NEW    (1L << 7)
  182. #define STATUS_MARKED    (1L << 8)
  183. #define STATUS_MUNREAD    (1L << 9)
  184. #define STATUS_UUCODE    (1L << 10)
  185. #define STATUS_SECURE    (1L << 11)
  186. #define STATUS_AUTH    (1L << 12)
  187. #define STATUS_BOUNCED    (1L << 13)
  188.  
  189. /* Field Identifiers for SortFolderIndex()
  190.  */
  191. #define FIELD_NUMBER    0
  192. #define FIELD_TO        1
  193. #define FIELD_SUBJECT   2
  194. #define FIELD_FROM      3
  195. #define FIELD_SIZE      4
  196. #define FIELD_DATE      5
  197. #define FIELD_THREAD    6
  198.  
  199. /*****************************************************************************/
  200.  
  201. /* Article Attribute Tags
  202.  */
  203. #define ARTICLEA_Dummy             (TAG_USER+0x300)
  204. #define ARTICLEA_To            (ARTICLEA_Dummy+0)
  205. #define ARTICLEA_Cc            (ARTICLEA_Dummy+1)
  206. #define ARTICLEA_Bcc            (ARTICLEA_Dummy+2)
  207. #define ARTICLEA_From            (ARTICLEA_Dummy+3)
  208. #define ARTICLEA_ReplyTo        (ARTICLEA_Dummy+4)
  209. #define ARTICLEA_Date            (ARTICLEA_Dummy+5)
  210. #define ARTICLEA_DateVal        (ARTICLEA_Dummy+6)
  211. #define ARTICLEA_Subject        (ARTICLEA_Dummy+7)
  212. #define ARTICLEA_ContentEncoding    (ARTICLEA_Dummy+8)
  213. #define ARTICLEA_ContentType        (ARTICLEA_Dummy+9)
  214. #define ARTICLEA_ContentSubType        (ARTICLEA_Dummy+10)
  215. #define ARTICLEA_ContentTypeParams    (ARTICLEA_Dummy+11)
  216. #define ARTICLEA_Flags            (ARTICLEA_Dummy+12)
  217. #define ARTICLEA_Status            ARTICLEA_Flags
  218. #define ARTICLEA_XFace            (ARTICLEA_Dummy+13)
  219. #define ARTICLEA_MessageID        (ARTICLEA_Dummy+14)
  220. #define ARTICLEA_Reference        (ARTICLEA_Dummy+15)
  221. #define ARTICLEA_Groups            (ARTICLEA_Dummy+16) /* NNTP NEWS ONLY */
  222. #define ARTICLEA_UserData        (ARTICLEA_Dummy+17)
  223. #define ARTICLEA_ReturnReceipt        (ARTICLEA_Dummy+18)
  224. #define ARTICLEA_SigFile        (ARTICLEA_Dummy+19)
  225. #define ARTICLEA_CustomHeaders        (ARTICLEA_Dummy+20)
  226. #define ARTICLEA_NumParts        (ARTICLEA_Dummy+21)
  227. #define ARTICLEA_Organization        (ARTICLEA_Dummy+22)
  228. #define ARTICLEA_Number            (ARTICLEA_Dummy+23)
  229.  
  230. #define PARTA_Name            (ARTICLEA_Dummy+50)
  231. #define PARTA_ContentType        (ARTICLEA_Dummy+51)
  232. #define PARTA_ContentSubType        (ARTICLEA_Dummy+52)
  233. #define PARTA_ContentTypeParams        (ARTICLEA_Dummy+53)
  234. #define PARTA_Flags            (ARTICLEA_Dummy+54)
  235. #define PARTA_ContentEncoding        (ARTICLEA_Dummy+55)
  236. #define PARTA_DataFilename        (ARTICLEA_Dummy+56)
  237. #define PARTA_DataFile            (ARTICLEA_Dummy+57)
  238. #define PARTA_DataString        (ARTICLEA_Dummy+58)
  239. #define PARTA_DataBuffer        (ARTICLEA_Dummy+59)
  240. #define PARTA_DataLength        (ARTICLEA_Dummy+60)
  241. #define PARTA_ContentDesc        (ARTICLEA_Dummy+61)
  242.  
  243. /* Values for AddFolderArticle(..., type, ...);
  244.  */
  245. #define ARTICLE_TYPE_FILE    (0)
  246. #define ARTICLE_TYPE_ARTICLE    (1)
  247. #define ARTICLE_TYPE_BUFFER    (2)
  248.  
  249. /*****************************************************************************/
  250.  
  251. /* Address Attribute Tags
  252.  */
  253. #define ADDRESSA_Dummy             (TAG_USER+0x400)
  254. #define ADDRESSA_Name            (ADDRESSA_Dummy+0)
  255. #define ADDRESSA_Address        (ADDRESSA_Dummy+1)
  256. #define ADDRESSA_City            (ADDRESSA_Dummy+2)
  257. #define ADDRESSA_State            (ADDRESSA_Dummy+3)
  258. #define ADDRESSA_Zip            (ADDRESSA_Dummy+4)
  259. #define ADDRESSA_Country        (ADDRESSA_Dummy+5)
  260. #define ADDRESSA_Phone            (ADDRESSA_Dummy+6)
  261. #define ADDRESSA_Fax            (ADDRESSA_Dummy+7)
  262. #define ADDRESSA_Comments        (ADDRESSA_Dummy+8)
  263. #define ADDRESSA_Group            (ADDRESSA_Dummy+9)
  264. #define ADDRESSA_Flags            (ADDRESSA_Dummy+10)
  265. #define ADDRESSA_URL            (ADDRESSA_Dummy+11)
  266. #define ADDRESSA_EMail            (ADDRESSA_Dummy+12)
  267. #define ADDRESSA_UserData        (ADDRESSA_Dummy+13)
  268. #define ADDRESSA_PartialMatch        (ADDRESSA_Dummy+14)
  269. #define ADDRESSA_ICQ            (ADDRESSA_Dummy+15)
  270. #define ADDRESSA_FTP            (ADDRESSA_Dummy+16)
  271. #define ADDRESSA_Company        (ADDRESSA_Dummy+17)
  272. #define ADDRESSA_JobTitle        (ADDRESSA_Dummy+18)
  273. #define ADDRESSA_MobilePhone        (ADDRESSA_Dummy+19)
  274. #define ADDRESSA_ImageFile        (ADDRESSA_Dummy+20)
  275. #define ADDRESSA_EntryType        (ADDRESSA_Dummy+21)
  276. #define ADDRESSA_EntryID        (ADDRESSA_Dummy+22)
  277. #define ADDRESSA_EntryGeneration    (ADDRESSA_Dummy+23)
  278.  
  279. /* ADDRESSA_EntryType (defaults to ENTRY_USER)
  280.  */
  281. #define ENTRY_USER    (1)
  282. #define ENTRY_WWW    (2)
  283. #define ENTRY_FTP    (3)
  284. #define ENTRY_CHAT    (4)
  285. #define ENTRY_GROUP    (5)
  286.  
  287. /*****************************************************************************/
  288.  
  289. /* Decoder tags
  290.  */
  291. #define DECODERA_Dummy        (TAG_USER+0x500)
  292. #define DECODERA_SourceFile    (DECODERA_Dummy+1)
  293. #define DECODERA_SourceHandle    (DECODERA_Dummy+3)
  294. #define DECODERA_SourceBuffer    (DECODERA_Dummy+5)
  295. #define DECODERA_SourceLen    (DECODERA_Dummy+7)
  296. #define DECODERA_DestFile    (DECODERA_Dummy+2)
  297. #define DECODERA_DestHandle    (DECODERA_Dummy+4)
  298. #define DECODERA_DestBuffer    (DECODERA_Dummy+6)
  299. #define DECODERA_DestLen    (DECODERA_Dummy+8)
  300. #define DECODERA_Lines        (DECODERA_Dummy+9)
  301. #define DECODERA_Flags        (DECODERA_Dummy+10)
  302. #define DECODERA_Boundary    (DECODERA_Dummy+11)
  303.  
  304. /* Values for DECODERA_Flags
  305.  */
  306. #define DECF_USEBOUNDARY    (1L << 0)
  307.  
  308. /* En/decoding type values.
  309.  */
  310. #define DECODE_ERROR    (-1)
  311. #define DECODE_COPY    (0)
  312. #define DECODE_QP    (1)
  313. #define DECODE_B64    (2)
  314. #define DECODE_UU    (3)
  315. #define DECODE_HEX    (6)
  316. #define DECODE_ROT    (7)
  317.  
  318. #define ENCODE_ERROR    (-1)
  319. #define ENCODE_COPY    (0)
  320. #define ENCODE_QP    (1)
  321. #define ENCODE_B64    (2)
  322. #define ENCODE_UU    (3)
  323. #define ENCODE_8BIT    (4)
  324. #define ENCODE_7BIT    (5)
  325. #define ENCODE_HEX    (6)
  326. #define ENCODE_ROT    (7)
  327.  
  328. /*****************************************************************************/
  329.  
  330. #endif /* LIBRARIES_AML_H */
  331.