home *** CD-ROM | disk | FTP | other *** search
/ PC Online 1997 August / PCO0897.ISO / filesbbs / os2 / bos2_xr5.arj / BOS2_XR5.ZIP / developr / gethist / include / history.h
Encoding:
C/C++ Source or Header  |  1997-06-09  |  3.4 KB  |  91 lines

  1. /* Calltypes */
  2.  
  3. #define CT_MAILER   0
  4. #define CT_BBS      1
  5. #define CT_FAX      2
  6. #define CT_EXTMAIL  9   /* MR 970508 external mailers */
  7.  
  8. /* Subclasses defined for mailer calls */
  9. #define SC_FTS1     0   /*  TS 970403 defined name SC_FTS-1 was illegal */
  10. #define SC_WAZOO    1
  11. #define SC_EMSI     2
  12. #define SC_FAILURE  9   /* MR 970504 */
  13.  
  14. /* Subclasses defined for BBS */
  15. /* Note that each BBS type may have its own structure in the union - I haven't
  16.    tried to define a fixed structure common for all BBS since some (such as
  17.    RemoteAccess) provides too few information about the last caller */
  18. #define SC_LASTCALL 0
  19. #define SC_CALLINFO 2  /* AW 970531 */
  20.  
  21. typedef struct
  22. {
  23.     /* These fields are common to all calls */
  24.     word task;
  25.     byte outgoing; /* 1=outgoing call, 0=incoming call */
  26.     byte calltype; /* Mailer, BBS, fax */
  27.     byte subclass; /* Session protocol for mail connections, for example */
  28.     time_t starttime; /* Date/time in UNIX format */
  29.     time_t length; /* Length of call, in seconds */
  30.     union
  31.     {
  32.         char raw[300];
  33.         struct  /* Mailer call */
  34.         {
  35.             char name[40]; /* Sysop name for mailer connections, user name for BBS */
  36.             char system[40]; /* System name for mailer connections */
  37.             char location[40]; /* Location of remote */
  38.             char phone[25]; /* Phone # */
  39.             char mailer[40]; /* Remote's mailer */
  40.             int filesin,filesout;
  41.             long bytesin,bytesout;
  42.             long cpsin,cpsout,cpsall;
  43.             long cost;
  44.             long speed;
  45.             ADDR address; /* Remote's main address */
  46.             byte passworded; /* Session was password protected */
  47.             /* These fields are yet unused */
  48.             byte success; /* Call was completed or user-aborted at our side */
  49.         } m;
  50.         struct /* Fax call */
  51.         {
  52.             char remoteid[40];
  53.             long pages;
  54.             long bytes;
  55.             long speed;
  56.             char filename[20];
  57.             char status[20];
  58.         } f;
  59.         struct /* BBS call - generic type */
  60.         {
  61.             /* Note - all char fields expect a C-style string, it is the
  62.                responsability of the importing program to convert them from
  63.                Pascal-style */
  64.             byte line; /* This one is actually ignored */
  65.             char name[36];
  66.             char handle[36];
  67.             char city[26];
  68.             word baud;
  69.             long times;
  70.             char logon[6];
  71.             char logoff[6];
  72.             byte attribute;
  73.         } b1;
  74.         struct /* BBS call - Maximus 3.01  AW 970531 */
  75.         {
  76.             byte line; /* This one is actually ignored */
  77.             char name[36];     /* User's name/alias               */
  78.             char handle[36];   /* User's alias                    */
  79.             char city[26];     /* User's city                     */
  80.             word baud;
  81.             word calls;        /* Number of previous calls + 1    */
  82.             word filesup;      /* Number of files uploaded        */
  83.             word filesdn;      /* Number of files dnloaded        */
  84.             word kbup;         /* kb uploaded                     */
  85.             word kbdn;         /* kb dnloaded                     */
  86.             word read;         /* Number of messages read         */
  87.             word posted;       /* Number of messages posted       */
  88.         } b2;
  89.     } h;
  90. } CALLHIST;
  91.