home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 2 BBS / 02-BBS.zip / magdemo9.zip / MAGNUM.H < prev    next >
C/C++ Source or Header  |  1996-04-01  |  18KB  |  278 lines

  1. //------------------------------------------------------------------------
  2. //
  3. //  These are the current record layouts for Magnum BBS version 9.00Cxx
  4. //
  5. //  This file was created for Sysop Information on 01 April 1996
  6. //
  7. //  There are 6 general structure types in this file:
  8. //
  9. //       _keyrec  -- describes   USER.KEY  --    58 bytes / record
  10. //       _user    -- describes   USER.DAT  --  1487 bytes / record
  11. //       _msg     -- describes    MSG.DAT  --   290 bytes / record
  12. //       _fls     -- describes   FILE.DAT  --   183 bytes / record
  13. //       _rje     -- describes    RJE.DAT  --   299 bytes / record
  14. //       _utiliz  -- describes UTILIZ.DAT  --    50 bytes / record
  15. //
  16. //  The structure type for MBBSINIT.x is proprietary and is for
  17. //  Gilmore Systems "internal use only" (not included in this file).
  18. //
  19. //------------------------------------------------------------------------
  20.  
  21.        // NOTES: - All strings (such as user_lastname, user_city, etc are
  22.        //          used (and stored) as ASCII Zstrings (null terminated). This
  23.        //          also applies to date fields.
  24.        //        - All char fields holding a (1=yes,0=no) are used as boolean
  25.        //          fields. They do not store the character '1' or '0', they
  26.        //          hold a binary 1 (0x01) or binary 0 (0x00).
  27.        //        - All date fields are stored in U.S. date format (MM/DD/YYYY)
  28.        //          and are null terminated. Magnum converts these to European
  29.        //          date format at runtime for I/O purposes but they are
  30.        //          always stored in U.S. format.
  31.        //        - ALWAYS, ALWAYS, ALWAYS COMPILE with the -Zp option (at
  32.        //          least with Microsoft's C compiler). This option tells
  33.        //          the compiler to pack structures. To make a long story
  34.        //          short -- if the structure isn't packed, the compiler will
  35.        //          align every new field on a word boundary (causing the sizeof
  36.        //          the structure to be wrong, and the alignment way off)!
  37.  
  38. //---------------------------------------------------------------------------
  39. //
  40. // The following structure type defines USER.KEY
  41. //
  42. //---------------------------------------------------------------------------
  43.  
  44. struct _keyrec {
  45.                char          key_deleted;         // bool (1=deleted,0=active)
  46.                unsigned long key_idnum;
  47.                unsigned char key_lastname[21],
  48.                              key_firstname[21],
  49.                              key_middlename[11];
  50.                };
  51.  
  52. //---------------------------------------------------------------------------
  53. //
  54. // The following structure type defines USER.DAT
  55. //
  56. //---------------------------------------------------------------------------
  57.  
  58.  
  59. struct _user {
  60.              unsigned char  user_deleted;           /* user deleted? 0=no, 1=yes */
  61.              unsigned long  user_idnum;             /* user's id number */
  62.              unsigned char  user_lastname[21],      /* user's last name */
  63.                             user_firstname[21],     /* user's first name */
  64.                             user_middlename[11],    /* user's middle name or initial */
  65.                             user_street1[41],       /* user's street address1 */
  66.                             user_street2[41],       /* user's street address2 */
  67.                             user_city[21],          /* user's city */
  68.                             user_state[21],         /* user's state or province */
  69.                             user_zip[21],           /* user's zipcode or other postal stuff */
  70.                             user_country[21],       /* user's country */
  71.                             user_password[21],      /* user's password */
  72.                             user_frstcall[11],      /* date first called mm/dd/yyyy */
  73.                             user_lastcall[11],      /* date last called */
  74.                             user_timelast[6],       /* time last called (hh:mm) */
  75.                             user_dob[11],           /* user's date of birth */
  76.                             user_phone1[21],        /* user's phone number 1 (ie: home) */
  77.                             user_phone2[21],        /* user's phone number 2 (ie: work) */
  78.                             user_lastnew[26][11],   /* user's last new filesearch */
  79.                             user_cputype[21],       /* user's computer type */
  80.                             user_conferences[26],   /* conferences joined */
  81.                             user_memodate1[11],     /* user's memodate #1 */
  82.                             user_memodate2[11],     /* user's memodate #2 */
  83.                             user_comment[61],       /* sysop comment about user */
  84.                             user_xfertype,          /* user's file xfer default n=none, x=xmodem (all types) */
  85.                             user_periodtype,        /* user's period type (daily, weekly, monthly, yearly) */
  86.                             user_expert,            /* user's expert level (0=full menus, 1=expert level) */
  87.                             user_locked_out,        /* user locked out? 0=no, 1=yes */
  88.                             user_color,             /* ANSI color? 0=no, 1=yes */
  89.                             user_display_more,      /* display more prompt? 0=no, 1=yes */
  90.                             user_erase_more,        /* erase more prompt? 0=no, 1=yes */
  91.                             user_hotkeys,           /* use hotkeys? 0=no, 1=yes */
  92.                             user_lines_page;        /* lines per page */
  93.              short          user_level,             /* user's security level */
  94.                             user_uploads,           /* number of uploads user performed */
  95.                             user_downloads,         /* number of downloads user performed */
  96.                             user_cps,               /* last cps transfer rate */
  97.                             user_uldl_ratio;        /* upload/download ratio */
  98.              unsigned long  user_ttl_calls,         /* user's total number of calls */
  99.                             user_remaining,         /* time remaining this call */
  100.                             user_remaining_period,  /* time remaining for period */
  101.                             user_k_uploads,         /* number of Kbytes user uploaded */
  102.                             user_k_downloads,       /* number of Kbytes user downloaded */
  103.                             user_period_downloads,  /* number of downloads allowed per period */
  104.                             user_period_k_downloads, /* number of Kbytes allowed per period for download */
  105.                             user_downloads_this_period,   /* downloads user performed this period */
  106.                             user_k_downloads_this_period, /* k downloads user performed this period */
  107.                             user_daily_time,        /* daily time limit (mins) allowed for user */
  108.                             user_daily_downloads,   /* daily downloads allowed for user */
  109.                             user_daily_k_downloads; /* daily k downloads allowed for user */
  110.              short          user_baudrate;          /* baudrate of user's last call */
  111.              char           user_ec,                /* error correction: 1=yes, 0=no */
  112.                             user_delmsg,            /* user can delete messages (1=yes, 0=no) */
  113.                             user_privmsg,           /* user can enter private messages (1=yes, 0=no) */
  114.                             user_privacy,           /* 1=privacy on, 0=privacy off (chat btwn nodes) */
  115.                             user_file_u_areas[26],  /* user file upload areas */
  116.                             user_file_d_areas[26],  /* user file download areas */
  117.                             user_file_l_areas[26],  /* user file list areas */
  118.                             user_msg_r_areas[26],   /* user message read areas */
  119.                             user_msg_w_areas[26],   /* user message write areas */
  120.                             user_msg_l_areas[26],   /* user message list areas */
  121.                             user_disp_cmds[26],     /* user display commands */
  122.                             user_last_read[26][13]; /* last message ref# read */
  123.              unsigned char  user_interests[81];     /* List of User's Interests */
  124.              unsigned char  user_compresstype;      /* default compression type (A,Z) Arc/Zip */
  125.              unsigned char  user_lastnewfiles[13];  /* user's last '+' (all areas) new files search date */
  126.              unsigned char  user_endmsg_blank;      /* 1=can end msg entry with nul line, 0=must use /EX */
  127.              unsigned short user_publ_msgs_entered; /* #of public messages entered */
  128.              unsigned short user_priv_msgs_entered; /* #of private messages entered */
  129.              unsigned char  user_dateformat;        /* User Date Format - U=USA (MM/DD/YYYY), E=Europe (DD.MM.YYYY) */
  130.              unsigned char  user_extra;
  131.              unsigned char  user_sub_filedel;       /* Subtract upload credit if user deletes file? 1=yes, 0=no (bool) */
  132.              unsigned char  user_free_dl_areas[26]; /* Free file dl areas (A-Z) not affecting ul/dl ratio (doesn't increment download counter) */
  133.              short          user_free_downloads;    /* number of free downloads user performed */
  134.              short          user_rjejobs;           /* number of RJE jobs user submitted */
  135.              unsigned char  user_sendnulls;         /* # nulls to send after CR */
  136.              unsigned char  user_filelist_pref;     /* FileList Preference (C=Chronological, R=Reverse Chronological, other values ignored */
  137.              unsigned char  user_reuse_id;          /* Reuse ID's? BOOL (1/0) */
  138.              unsigned char  user_msg_group;         /* 0-255 for MSG_xxx.GRP */
  139.              unsigned char  user_file_group;        /* 0-255 for FILE_xxx.GRP */
  140.              unsigned char  user_type;              /* U=USER, M=MAIL */
  141.              unsigned char  user_filebase;          /* Last Filebase */
  142.              unsigned char  user_msgbase;           /* Last MsgBase */
  143.              unsigned char  user_rmail;             /* Use remote mail? (0/1) */
  144.              unsigned char  user_editor_pref;       /* Editor Preference (A=Ansi, L=Line) */
  145.              unsigned char  user_show_extdesc;      /* Show Ext'd File Descriptions (bool) */
  146.              unsigned char  user_use_handle;        /* Use Handle (bool) */
  147.              unsigned char  user_outside_mail;      /* Access to outside mail (bool) */
  148.              unsigned char  user_reserved[6];
  149.              };
  150.  
  151. //---------------------------------------------------------------------------
  152. //
  153. // The following structure type defines MSG.DAT
  154. //
  155. //---------------------------------------------------------------------------
  156.  
  157. struct _msg {
  158.             long msg_recnum;     /* database record number (not necessarily msg number) */
  159.             char msg_deleted,    /* 0=msg available, 1=msg deleted */
  160.                  msg_conf,       /* conference of msg (A-Z) */
  161.                  msg_private,    /* 0=msg is public, 1=msg is private */
  162.                  msg_received;   /* 0=msg not received, 1=msg received */
  163.             long msg_from,       /* ID# of who the msg is from (-1L if from MBBS) */
  164.                  msg_to,         /* ID# of who the msg is to (-1L for "ALL") */
  165.                  msg_num,        /* ID Number of original adressee */
  166.                  msg_timesread;  /* number of times msg was read */
  167.             char msg_subject[61], /* subject (needed for thread determination) */
  168.                  msg_date[11],   /* date of msg (mm/dd/yyyy) */
  169.                  msg_time[6],    /* time of msg (hh:mm)      */
  170.                  msg_expdate[11], /* message expiration date (nul or blank if none) */
  171.                  msg_cc,         /* 0=original, 1=this is a carbon copy */
  172.                  msg_fwd,        /* this msg has been forwarded */
  173.                  msg_receipt,    /* 0=no receipt wanted, 1=receipt wanted */
  174.                  msg_replies,    /* 0=no replies, 1=replies have been made */
  175.                  msg_isreply,    /* 0=this is not a reply, 1=this is a reply */
  176.                  msg_recv_date[11], /* date received by msg_to */
  177.                  msg_recv_time[6],  /* time received by msg_to */
  178.                  msg_filename[13]; /* format: CMDDYYMM.MSS all hex no's */
  179.                                    /*  C=Conf  (A-Z)        */
  180.                                    /*  M=Month (1-C)        */
  181.                                    /*  DD=Day  (01-1F)      */
  182.                                    /*  YY=Year (00-FF)   (+1980)   */
  183.                                    /*  MM.M    (000-5A0) ((hrs*60)+mins) */
  184.                                    /*  SS      (00-3B)      */
  185.             unsigned char msg_msgbase;      // MsgBase (0-255)
  186.             unsigned long msg_from_psernum, // Parent Ser# of sender
  187.                           msg_to_psernum;  // Parent Ser# addressee
  188.                      char msg_sent;        // 1=yes,
  189.                                            // 0=no (applies to remote mail
  190.                                            // -1 = sent as store/forward
  191.             unsigned char msg_from_username[53]; // Originating UserName
  192.             unsigned char msg_from_filename[13]; // originating filename
  193.             unsigned char msg_from_msgbase;      // originating msgbase
  194.             unsigned char msg_echo;        // 0=no, 1=echoable to other systems
  195.             unsigned char msg_milc;        // MILC command char (when from_psernum!=cominfo->parent_sernum)
  196.             unsigned char msg_to_username[53];   // Adressee UserName
  197.             unsigned char msg_reserved[10]; // reserved for future expansion
  198.             };
  199.  
  200. //---------------------------------------------------------------------------
  201. //
  202. // The following structure type defines FILE.DAT
  203. //
  204. //---------------------------------------------------------------------------
  205.  
  206. struct _fls {
  207.             long fls_recnum;       /* database record number */
  208.             char fls_deleted,      /* 0=file available, 1=file deleted */
  209.                  fls_area,         /* file area (A-Z) */
  210.                  fls_private,      /* file requires password */
  211.                  fls_ul_method,    /* protocol used for upload */
  212.                  fls_name[15],     /* file name */
  213.                  fls_password[11], /* password (if required) */
  214.                  fls_date[11],     /* date uploaded (mm/dd/yyyy) */
  215.                  fls_time[6],      /* time of upload (hh:mm) */
  216.                  fls_expdate[11],  /* file expiration date (nul or blank if none) */
  217.                  fls_brief[81],    /* brief (80-char) description of file */
  218.                  fls_datelast[11]; /* date of last access (mm/dd/yyyy) */
  219.            long  fls_who,          /* ID# of who uploaded the file */
  220.                  fls_desfile,      /* A long, used as bool (1=detailed description exists, 0=no) */
  221.                  fls_size,         /* size of file */
  222.                  fls_dl;           /* number of times file was downloaded */
  223.            unsigned char  fls_filebase;    /* filebase (0-255) */
  224.            unsigned char  fls_cdrom;       /* CD-ROM drive letter (optional) */
  225.            unsigned short fls_pathnum;     /* Pathnum in "CDROMnnn.bc" */
  226.            unsigned char  fls_reserved[9]; /* reserved for future use */
  227.            };
  228.  
  229. //---------------------------------------------------------------------------
  230. //
  231. // The following structure type defines RJE.DAT
  232. //
  233. //---------------------------------------------------------------------------
  234.  
  235. struct _rje {
  236.           long   rje_recnum;         // record number (not really used)
  237.           char   rje_deleted,        // boolean 1=deleted, 0=active
  238.                  rje_status,         // status (0=running, 1=complete)
  239.                  rje_name[12],       // Format: MDDYYSSSSS
  240.                  rje_startdate[11],  // date started
  241.                  rje_stopdate[11],   // date stopped
  242.                  rje_expdate[11],    // expiration date (matches expdate in file section)
  243.                  rje_pgmname[112],   // name of program or command being executed
  244.                  rje_parms[112];     // command-line arguments being passed
  245.           long   rje_userid,         // user id of who this entry belongs to
  246.                  rje_starttime,      // time started
  247.                  rje_stoptime,       // time stopped
  248.                  rje_seconds;        // time used (derived from start/stop date/time)
  249.           short  rje_prtyclass,      // priority class of job
  250.                  rje_prtylevel,      // priority level of job
  251.                  rje_completioncode; // miscellaneous (future use for ending result code)
  252.  unsigned short  rje_pid;            // PID of child rje process
  253.           };
  254.  
  255. //---------------------------------------------------------------------------
  256. //
  257. // The following structure type defines UTILIZ.DAT
  258. //
  259. //---------------------------------------------------------------------------
  260.  
  261. struct _utiliz {
  262.                char utiliz_comport,       // node used for this record (1,2,...)
  263.                     utiliz_startdate[11], // date this call started (MM/DD/YYYY)
  264.                     utiliz_stopdate[11];  // date this call ended (MM/DD/YYYY)
  265.                long utiliz_starttime,     // time this call started (seconds from midnight)
  266.                     utiliz_stoptime,      // time this call ended (seconds from midnight)
  267.                     utiliz_idnum;         // IDnum of caller
  268.               short utiliz_baudrate,      // baudrate of caller
  269.                     utiliz_level,         // caller's security level
  270.                     utiliz_msgs_read,     // number of msgs read this call by caller
  271.                     utiliz_msgs_written;  // number of msgs entered this call by caller
  272.       unsigned char utiliz_files_ul,      // number of uploads this call by caller
  273.                     utiliz_files_dl,      // number of downloads this call by caller
  274.                     utiliz_rjejobs;       // number of RJE jobs started this call by caller
  275.                long utiliz_serialnum;     // serial number of mbbs or localbbs for this session
  276.                };
  277.  
  278.