home *** CD-ROM | disk | FTP | other *** search
/ Amiga MA Magazine 1998 #3 / amigamamagazinepolishissue1998.iso / bazy / abook_10upd / developer / abook_api.h next >
C/C++ Source or Header  |  1996-03-11  |  2KB  |  59 lines

  1. /* Message Types */
  2.  
  3. #define AB_Get_Addresses ((TAG_USER | ( 581 << 16 )) | 0x000)      /* Obtain a copy        */
  4. #define AB_Dispose       ((TAG_USER | ( 581 << 16 )) | 0x001)      /* Dispose the copy     */
  5.  
  6. /* Error Returncodes */
  7.  
  8. #define ERROR_NOMEM      ((TAG_USER | ( 581 << 16 )) | 0x100)
  9. #define ERROR_CLONELIST  ((TAG_USER | ( 581 << 16 )) | 0x101)
  10. #define ERROR_NOCLIENTS  ((TAG_USER | ( 581 << 16 )) | 0x102)
  11. #define ERROR_VERSION    ((TAG_USER | ( 581 << 16 )) | 0x103)
  12.  
  13.  
  14. struct ApiMessage                   /* The API message */
  15. {
  16.     struct Message Message;         /* Standard message header            */
  17.     LONG   type;                    /* e.g AB_Dispose or AB_Get_Addresses */
  18.     LONG   rc;                      /* The returncode e.g ERROR_NOMEM.... */
  19.     struct List *AddressList;       /* Pointer to the database copy       */
  20. };
  21.  
  22. /* Main node */
  23. struct data
  24. {
  25.     struct  Node node;
  26.     char    *last;
  27.     char    *first;
  28.     struct  List address;           /* Pointer to the linked addresslist  */
  29.     char    *comment;
  30.     char    *commentline;           /* Number of comment lines...         */
  31.     char    *title;
  32.     char    *birth;
  33.     struct  List Email;             /* Pointer to the linked email list (struct MList) */
  34.     char    *bank;
  35.     char    *account;
  36.     char    *bankcode;
  37.     char    *userfield;
  38. };
  39.  
  40. struct Address
  41. {
  42.     struct  Node addrnode;
  43.     char    *description;
  44.     char    *street;
  45.     char    *postcode;
  46.     char    *town;
  47.     struct  List Phone;             /* Pointer to the linked phone list (struct MList) */
  48.     char    *country;
  49.     char    *state;
  50.     char    *fax;
  51. };
  52.  
  53. struct MList
  54. {
  55.     struct  Node listnode;
  56.     char    *number;
  57.     char    *description;
  58. };
  59.