home *** CD-ROM | disk | FTP | other *** search
/ PC Online 1997 August / PCO0897.ISO / filesbbs / os2 / plnk065.arj / PLNK065.ZIP / pilot-link.0.6.5 / include / pi-mail.h < prev    next >
Encoding:
C/C++ Source or Header  |  1997-05-23  |  1.9 KB  |  72 lines

  1. #ifndef _PILOT_MAIL_H_
  2. #define _PILOT_MAIL_H_
  3.  
  4. #include "pi-args.h"
  5.  
  6. #ifdef __cplusplus
  7. extern "C" {
  8. #endif
  9.  
  10. struct Mail {
  11.   int read;
  12.   int signature;
  13.   int confirmRead;
  14.   int confirmDelivery;
  15.   int priority;
  16.   int addressing;
  17.   
  18.   int dated;
  19.   struct tm date;
  20.   
  21.   char * subject;
  22.   char * from;
  23.   char * to;
  24.   char * cc;
  25.   char * bcc;
  26.   char * replyTo;
  27.   char * sentTo;
  28.   char * body;
  29. };
  30.  
  31. struct MailAppInfo {
  32.   unsigned int renamedcategories; /* Bitfield of categories with changed names */
  33.   char CategoryName[16][16]; /* 16 categories of 15 characters+nul each */
  34.   unsigned char CategoryID[16]; 
  35.   unsigned char lastUniqueID; /* Each category gets a unique ID, for sync tracking
  36.                                  purposes. Those from the Pilot are between 0 & 127.
  37.                                  Those from the PC are between 128 & 255. I'm not
  38.                                  sure what role lastUniqueID plays. */
  39.   unsigned long dirtyfieldlabels; /* bitfield of same */
  40.   int sortOrder;
  41.   unsigned long unsentMessage; /* UniqueID of unsent message */
  42.   
  43.   char * signature;
  44. };
  45.  
  46. struct MailPrefs {
  47.   int synctype;
  48.   int gethigh;
  49.   int getcontaining;
  50.   int truncate;
  51.   char * filterto;
  52.   char * filterfrom;
  53.   char * filtersubject;
  54. };
  55.  
  56. enum { mailSyncAll, mailSyncSend, mailSyncFilter } MailSyncType;
  57.  
  58. extern void free_Mail PI_ARGS((struct Mail *));
  59. extern void free_MailAppInfo PI_ARGS((struct MailAppInfo *));
  60. extern void free_MailPrefs PI_ARGS((struct MailPrefs *));
  61. extern void unpack_Mail PI_ARGS((struct Mail *, unsigned char * record, int len));
  62. extern void pack_Mail PI_ARGS((struct Mail *, unsigned char * record, int * len));
  63. extern void unpack_MailAppInfo PI_ARGS((struct MailAppInfo *, unsigned char * AppInfo, int len));
  64. extern void pack_MailAppInfo PI_ARGS((struct MailAppInfo *, unsigned char * AppInfo, int * len));
  65. extern void unpack_MailPrefs PI_ARGS((struct MailPrefs *, unsigned char * record, int len));
  66.  
  67. #ifdef __cplusplus
  68. }
  69. #endif
  70.  
  71. #endif /* _PILOT_MAIL_H_ */
  72.