home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 2 BBS / 02-BBS.zip / lora299s.zip / LORA_API.H < prev    next >
C/C++ Source or Header  |  1998-05-12  |  36KB  |  1,372 lines

  1.  
  2. // LoraBBS Version 2.99 Free Edition
  3. // Copyright (C) 1987-98 Marco Maccaferri
  4. //
  5. // This program is free software; you can redistribute it and/or modify
  6. // it under the terms of the GNU General Public License as published by
  7. // the Free Software Foundation; either version 2 of the License, or
  8. // (at your option) any later version.
  9. //
  10. // This program is distributed in the hope that it will be useful,
  11. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  13. // GNU General Public License for more details.
  14. //
  15. // You should have received a copy of the GNU General Public License
  16. // along with this program; if not, write to the Free Software
  17. // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  18.  
  19. #ifndef _LORA_API_H
  20. #define _LORA_API_H
  21.  
  22. #include "collect.h"
  23. #include "struc299.h"
  24.  
  25. #define KEY_UNREGISTERED      0
  26. #define KEY_BASIC             1
  27. #define KEY_ADVANCED          2
  28. #define KEY_PROFESSIONAL      3
  29. #define KEY_POINT             4
  30.  
  31. USHORT DLL_EXPORT ValidateKey (PSZ product, PSZ name, PSZ number);
  32. USHORT DLL_EXPORT CheckExpiration (VOID);
  33.  
  34. #if defined(__POINT__)
  35. #define NAME               "LoraPOINT"
  36. #else
  37. #define NAME               "LoraBBS"
  38. #endif
  39.  
  40. #if defined(__POINT__)
  41. #if defined(__OS2__)
  42. #define NAME_OS            "LoraPOINT/OS2"
  43. #elif defined(__NT__)
  44. #define NAME_OS            "LoraPOINT/NT"
  45. #elif defined(__LINUX__)
  46. #define NAME_OS            "LoraPOINT/LINUX"
  47. #elif defined(__DOS__)
  48. #define NAME_OS            "LoraPOINT/DOS"
  49. #else
  50. #define NAME_OS            "LoraPOINT/???"
  51. #endif
  52. #else
  53. #if defined(__OS2__)
  54. #define NAME_OS            "LoraBBS/OS2"
  55. #elif defined(__NT__)
  56. #define NAME_OS            "LoraBBS/NT"
  57. #elif defined(__LINUX__)
  58. #define NAME_OS            "LoraBBS/LINUX"
  59. #elif defined(__DOS__)
  60. #define NAME_OS            "LoraBBS/DOS"
  61. #else
  62. #define NAME_OS            "LoraBBS/???"
  63. #endif
  64. #endif
  65.  
  66. class DLL_EXPORT TAddress
  67. {
  68. public:
  69.    TAddress (void);
  70.    ~TAddress (void);
  71.  
  72.    USHORT Zone, Net, Node, Point;
  73.    USHORT FakeNet;
  74.    CHAR   Domain[32];
  75.    CHAR   String[64];
  76.  
  77.    SHORT  Add (VOID);
  78.    SHORT  Add (PSZ pszAddress);
  79.    SHORT  Add (USHORT usZone, USHORT usNet, USHORT usNode, USHORT usPoint = 0, PSZ pszDomain = "");
  80.    VOID   Clear (VOID);
  81.    VOID   Delete (VOID);
  82.    SHORT  First (VOID);
  83.    USHORT Load (PSZ pszFile);
  84.    USHORT Merge (PSZ pszFile);
  85.    SHORT  Next (VOID);
  86.    VOID   Parse (PSZ pszAddress);
  87.    VOID   Update (VOID);
  88.    USHORT Save (PSZ pszFile);
  89.  
  90. private:
  91.    class  TCollection List;
  92. };
  93.  
  94. class DLL_EXPORT TConfig
  95. {
  96. public:
  97.    TConfig (void);
  98.    ~TConfig (void);
  99.  
  100.    CHAR   Device[32];
  101.    ULONG  Speed;
  102.    CHAR   Initialize[3][48];
  103.    CHAR   Answer[48], Dial[48], Hangup[48], OffHook[48];
  104.    USHORT DialTimeout, LockSpeed, CarrierDropTimeout;
  105.    USHORT StripDashes;
  106.    CHAR   Ring[32];
  107.    UCHAR  ManualAnswer, LimitedHours;
  108.    USHORT StartTime, EndTime;
  109.    CHAR   FaxMessage[48], FaxCommand[64];
  110.    CHAR   CallIf[64], DontCallIf[64];
  111.  
  112.    CHAR   SystemName[64], SysopName[48], Location[48];
  113.    CHAR   Phone[32], NodelistFlags[64];
  114.    UCHAR  LoginType;
  115.    UCHAR  UseAnsi;
  116.    UCHAR  AskAlias;
  117.    UCHAR  AskCompanyName;
  118.    UCHAR  AskAddress;
  119.    UCHAR  AskCity;
  120.    UCHAR  AskPhoneNumber;
  121.    UCHAR  AskGender;
  122.    USHORT TaskNumber;
  123.    USHORT NewUserLevel;
  124.    ULONG  NewUserFlags, NewUserDenyFlags;
  125.    CHAR   NewUserLimits[16], SystemPath[64], LogFile[64];
  126.    CHAR   UserFile[64], Outbound[64], SchedulerFile[64];
  127.    CHAR   NormalInbound[64], KnownInbound[64], ProtectedInbound[64];
  128.    CHAR   NodelistPath[64], UsersHomePath[64], MenuPath[64];
  129.    CHAR   LanguageFile[64], TextFiles[64], TempPath[64];
  130.    CHAR   MainMenu[32], HostName[48];
  131.    CHAR   NewsServer[48], MailServer[48], PopServer[48];
  132.    USHORT FakeNet;
  133.    USHORT NetMailStorage, MailStorage, BadStorage, DupeStorage;
  134.    CHAR   NetMailPath[64], MailPath[64], BadPath[64], DupePath[64];
  135.    USHORT TelnetServer, TelnetPort;
  136.    USHORT FtpServer, FtpPort;
  137.    USHORT WebServer, WebPort;
  138.    USHORT SMTPServer, SMTPPort;
  139.    USHORT POP3Server, POP3Port;
  140.    USHORT NNTPServer, NNTPPort;
  141.    USHORT WaZoo, EMSI, Janus;
  142.    USHORT NewAreasStorage;
  143.    CHAR   NewAreasPath[64];
  144.    USHORT NewAreasLevel, NewAreasWriteLevel;
  145.    ULONG  NewAreasFlags, NewAreasDenyFlags, NewAreasWriteFlags, NewAreasDenyWriteFlags;
  146.    UCHAR  Ansi, IEMSI, ImportEmpty, ReplaceTear, ForceIntl;
  147.    CHAR   TearLine[32];
  148.    UCHAR  Secure, KeepNetMail, TrackNetMail;
  149.    CHAR   MailOnly[64], EnterBBS[64];
  150.    CHAR   ImportCmd[64], ExportCmd[64], SinglePassCmd[64];
  151.    CHAR   PackCmd[64], NewsgroupCmd[64], AfterCallerCmd[64], AfterMailCmd[64];
  152.    UCHAR  UseSinglePass, SeparateNetMail, UseAreasBBS, UpdateAreasBBS;
  153.    CHAR   AreasBBS[64], PPPCmd[64];
  154.    UCHAR  ZModemTelnet, EnablePPP;
  155.    USHORT PPPTimeLimit;
  156.    CHAR   OLRPacketName[16];
  157.    USHORT OLRMaxMessages;
  158.    UCHAR  ExternalFax, FaxFormat;
  159.    CHAR   FaxPath[64], AfterFaxCmd[64], FaxAlertNodes[64], FaxAlertUser[64];
  160.    UCHAR  ReloadLog, MakeProcessLog;
  161.    USHORT RetriveMaxMessages;
  162.    UCHAR  UseAvatar;
  163.    UCHAR  UseColor;
  164.    UCHAR  UseFullScreenEditor;
  165.    UCHAR  UseHotKey;
  166.    UCHAR  UseIBMChars;
  167.    UCHAR  AskLines;
  168.    UCHAR  UsePause;
  169.    UCHAR  UseScreenClear;
  170.    UCHAR  AskBirthDate;
  171.    UCHAR  AskMailCheck;
  172.    UCHAR  AskFileCheck;
  173.    UCHAR  ExternalEditor;
  174.    CHAR   EditorCmd[64];
  175.    CHAR   HudsonPath[64], GoldPath[64];
  176.    USHORT BadBoard, DupeBoard, MailBoard, NetMailBoard;
  177.    UCHAR  UseFullScreenReader;
  178.    UCHAR  UseFullScreenLists;
  179.    UCHAR  UseFullScreenAreaLists;
  180.    UCHAR  AreafixActive;
  181.    UCHAR  AllowRescan;
  182.    UCHAR  CheckZones;
  183.    UCHAR  RaidActive;
  184.    CHAR   AreafixNames[64];
  185.    CHAR   AreafixHelp[64];
  186.    CHAR   RaidNames[64];
  187.    CHAR   RaidHelp[64];
  188.    CHAR   NewTicPath[64];
  189.    UCHAR  TextPasswords;
  190.    class  TAddress MailAddress;
  191.  
  192.    PSZ    AdjustPath (PSZ path);
  193.    VOID   Default (VOID);
  194.    PSZ    FixPath (PSZ path);
  195.    USHORT Load (PSZ pszConfig = NULL, PSZ pszChannel = NULL);
  196.    VOID   New (VOID);
  197.    VOID   NewChannel (VOID);
  198.    USHORT Reload (VOID);
  199.    USHORT Save (PSZ pszConfig = NULL, PSZ pszChannel = NULL);
  200.  
  201. private:
  202.    VOID   Struct2Class (CONFIG *Cfg);
  203.  
  204.    CHAR   ConfigFile[128];
  205.    CHAR   ChannelFile[128];
  206. };
  207.  
  208. class DLL_EXPORT TLog
  209. {
  210. public:
  211.    TLog (void);
  212.    virtual ~TLog (void);
  213.  
  214.    USHORT Display;
  215.  
  216.    virtual USHORT Open (PSZ pszName);
  217.    virtual VOID   Resume (VOID);
  218.    virtual VOID   Suspend (VOID);
  219.    virtual VOID   Write (PSZ pszFormat, ...);
  220.    virtual VOID   WriteBlank (VOID);
  221.  
  222. protected:
  223.    FILE   *fp;
  224.    PSZ    Months[12];
  225.    CHAR   FileName[128];
  226.    CHAR   Buffer[512], Temp[512];
  227. };
  228.  
  229. // ---------------------------------------------------------------------------
  230.  
  231. typedef struct {
  232.    CHAR   LastCaller[48];
  233.    ULONG  TodayCalls;
  234.    ULONG  Calls;
  235.    ULONG  MailCalls;
  236. } SYSSTAT;
  237.  
  238. #define STAT_OFFLINE       0
  239. #define STAT_WAITING       1
  240. #define STAT_USER          2
  241. #define STAT_MAILER        3
  242. #define STAT_FAXRECEIVE    4
  243.  
  244. typedef struct {
  245.    USHORT Number;
  246.    USHORT Status;
  247.    CHAR   User[48];
  248.    CHAR   From[48];
  249.    CHAR   Action[48];
  250.    CHAR   LastCaller[48];
  251.    ULONG  TodayCalls;
  252.    ULONG  Calls;
  253.    ULONG  MailCalls;
  254. } LINESTAT;
  255.  
  256. class DLL_EXPORT TStatistics
  257. {
  258. public:
  259.    TStatistics (void);
  260.    TStatistics (PSZ pszDataPath);
  261.    ~TStatistics (void);
  262.  
  263.    USHORT LineNumber;
  264.    USHORT Status;
  265.    CHAR   User[48], From[48], Action[48];
  266.    CHAR   LastCaller[48], LineLastCaller[48];
  267.    ULONG  TotalCalls, Calls;
  268.    ULONG  TotalMailCalls, MailCalls;
  269.    ULONG  TotalTodayCalls, TodayCalls;
  270.  
  271.    USHORT First (VOID);
  272.    USHORT Next (VOID);
  273.    VOID   Read (USHORT usLine);
  274.    VOID   Update (VOID);
  275.  
  276. private:
  277.    USHORT LastTask;
  278.    CHAR   DataFile[128];
  279.    SYSSTAT Sys;
  280.    LINESTAT Line;
  281. };
  282.  
  283. // ---------------------------------------------------------------------------
  284.  
  285. class DLL_EXPORT TMsgData
  286. {
  287. public:
  288.    TMsgData (void);
  289.    TMsgData (PSZ pszDataPath);
  290.    ~TMsgData (void);
  291.  
  292.    CHAR   Key[16];
  293.    CHAR   Display[128];
  294.    USHORT Level, WriteLevel;
  295.    ULONG  AccessFlags, DenyFlags, WriteFlags, DenyWriteFlags;
  296.    UCHAR  Age;
  297.    USHORT Storage;
  298.    CHAR   Path[128];
  299.    USHORT Board;
  300.    USHORT Flags, Group;
  301.    CHAR   EchoMail, ShowGlobal, UpdateNews, Offline;
  302.    CHAR   MenuName[32], Moderator[64];
  303.    ULONG  Cost;
  304.    USHORT DaysOld, RecvDaysOld, MaxMessages;
  305.    ULONG  ActiveMsgs, HighWaterMark;
  306.    CHAR   NewsGroup[128], EchoTag[64], Origin[80];
  307.    CHAR   Address[48];
  308.    ULONG  Highest, FirstMessage, LastMessage;
  309.    SHORT  OriginIndex;
  310.    ULONG  LastReaded, NewsHWM;
  311.  
  312.    USHORT Add (VOID);
  313.    VOID   Delete (VOID);
  314.    USHORT First (VOID);
  315.    USHORT Insert (VOID);
  316.    USHORT Insert (class TMsgData *Data);
  317.    USHORT Last (VOID);
  318.    VOID   New (VOID);
  319.    USHORT Next (VOID);
  320.    VOID   Pack (VOID);
  321.    USHORT Previous (VOID);
  322.    USHORT Read (PSZ pszName, USHORT fCloseFile = TRUE);
  323.    USHORT ReadEcho (PSZ pszEchoTag);
  324.    USHORT ReRead (VOID);
  325.    USHORT Update (PSZ pszNewKey = NULL);
  326.  
  327. private:
  328.    int    fdDat, fdIdx;
  329.    CHAR   DataFile[128], IdxFile[128];
  330.    CHAR   LastKey[16];
  331.  
  332.    VOID   Class2Struct (MESSAGE *Msg);
  333.    VOID   Struct2Class (MESSAGE *Msg);
  334. };
  335.  
  336. class DLL_EXPORT TEchoLink
  337. {
  338. public:
  339.    TEchoLink (void);
  340.    TEchoLink (PSZ pszDataPath);
  341.    ~TEchoLink (void);
  342.  
  343.    USHORT Skip4D;
  344.    ULONG  EchoTag;
  345.    USHORT Zone, Net, Node, Point;
  346.    CHAR   Domain[32];
  347.    CHAR   Address[64], ShortAddress[64];
  348.    UCHAR  SendOnly, ReceiveOnly;
  349.    UCHAR  PersonalOnly;
  350.    UCHAR  Passive, Skip;
  351.  
  352.    USHORT Add (VOID);
  353.    USHORT AddString (PSZ pszString);
  354.    VOID   Change (PSZ pszFrom, PSZ pszTo);
  355.    USHORT Check (PSZ pszName);
  356.    VOID   Clear (VOID);
  357.    VOID   Delete (VOID);
  358.    USHORT First (VOID);
  359.    VOID   Load (PSZ pszEchoTag);
  360.    VOID   New (VOID);
  361.    USHORT Next (VOID);
  362.    USHORT Previous (VOID);
  363.    VOID   Save (VOID);
  364.    VOID   Update (VOID);
  365.  
  366. private:
  367.    CHAR   DataFile[64];
  368.    class  TCollection Data;
  369. };
  370.  
  371. // ---------------------------------------------------------------------------
  372.  
  373. class DLL_EXPORT TFileData
  374. {
  375. public:
  376.    TFileData (void);
  377.    TFileData (PSZ pszDataPath);
  378.    ~TFileData (void);
  379.  
  380.    CHAR   Display[128], Key[16];
  381.    USHORT Level;
  382.    ULONG  AccessFlags, DenyFlags;
  383.    USHORT UploadLevel;
  384.    ULONG  UploadFlags, UploadDenyFlags;
  385.    USHORT DownloadLevel;
  386.    ULONG  DownloadFlags, DownloadDenyFlags;
  387.    UCHAR  Age;
  388.    CHAR   Download[128];
  389.    CHAR   Upload[128];
  390.    CHAR   CdRom, FreeDownload, ShowGlobal;
  391.    CHAR   MenuName[32];
  392.    CHAR   Moderator[64];
  393.    ULONG  Cost;
  394.    ULONG  ActiveFiles, UnapprovedFiles;
  395.    CHAR   EchoTag[64];
  396.    UCHAR  UseFilesBBS;
  397.    UCHAR  DlCost;
  398.    CHAR   FileList[128];
  399.  
  400.    USHORT Add (VOID);
  401.    VOID   Delete (VOID);
  402.    USHORT First (VOID);
  403.    USHORT Insert (VOID);
  404.    USHORT Insert (class TFileData *Data);
  405.    USHORT Last (VOID);
  406.    VOID   New (VOID);
  407.    USHORT Next (VOID);
  408.    VOID   Pack (VOID);
  409.    USHORT Previous (VOID);
  410.    USHORT Read (PSZ pszName, USHORT fCloseFile = TRUE);
  411.    USHORT ReadEcho (PSZ pszEchoTag);
  412.    USHORT ReRead (VOID);
  413.    USHORT Update (PSZ pszNewKey = NULL);
  414.  
  415. private:
  416.    int    fdDat, fdIdx;
  417.    CHAR   DataFile[128], IdxFile[128];
  418.    CHAR   LastKey[16];
  419.  
  420.    VOID   Class2Struct (FILES *File);
  421.    VOID   Struct2Class (FILES *File);
  422. };
  423.  
  424. class DLL_EXPORT TFilechoLink
  425. {
  426. public:
  427.    TFilechoLink (void);
  428.    TFilechoLink (PSZ pszDataPath);
  429.    ~TFilechoLink (void);
  430.  
  431.    USHORT Skip4D;
  432.    ULONG  EchoTag;
  433.    USHORT Zone, Net, Node, Point;
  434.    CHAR   Domain[32];
  435.    CHAR   Address[64], ShortAddress[64];
  436.    UCHAR  SendOnly, ReceiveOnly;
  437.    UCHAR  PersonalOnly;
  438.    UCHAR  Passive, Skip;
  439.  
  440.    USHORT Add (VOID);
  441.    USHORT AddString (PSZ pszString);
  442.    VOID   Change (PSZ pszFrom, PSZ pszTo);
  443.    USHORT Check (PSZ pszName);
  444.    VOID   Clear (VOID);
  445.    VOID   Delete (VOID);
  446.    USHORT First (VOID);
  447.    VOID   Load (PSZ pszEchoTag);
  448.    VOID   New (VOID);
  449.    USHORT Next (VOID);
  450.    USHORT Previous (VOID);
  451.    VOID   Save (VOID);
  452.    VOID   Update (VOID);
  453.  
  454. private:
  455.    CHAR   DataFile[64];
  456.    class  TCollection Data;
  457. };
  458.  
  459. // ---------------------------------------------------------------------------
  460.  
  461. #define MSGTAGS_INDEX      32
  462.  
  463. class DLL_EXPORT TMsgTag
  464. {
  465. public:
  466.    TMsgTag (void);
  467.    TMsgTag (PSZ pszUserFile);
  468.    ~TMsgTag (void);
  469.  
  470.    UCHAR  Tagged;
  471.    ULONG  UserId;          // CRC32 of user's name
  472.    CHAR   Area[16];        // Area name
  473.    ULONG  LastRead;        // Number of last message read
  474.    ULONG  OlderMsg;        // Timestamp of the older message to pack
  475.  
  476.    VOID   Add (VOID);
  477.    VOID   Change (PSZ pszOldName, PSZ pszNewName);
  478.    VOID   Change (ULONG OldId, ULONG NewId);
  479.    VOID   Clear (VOID);
  480.    USHORT First (VOID);
  481.    VOID   Load (VOID);
  482.    USHORT Next (VOID);
  483.    VOID   New (VOID);
  484.    USHORT Previous (VOID);
  485.    USHORT Read (PSZ pszArea);
  486.    VOID   Save (VOID);
  487.    VOID   Update (VOID);
  488.  
  489. private:
  490.    CHAR   DatFile[64];
  491.    class  TCollection Data;
  492. };
  493.  
  494. #define FILETAGS_INDEX     32
  495.  
  496. class DLL_EXPORT TFileTag
  497. {
  498. public:
  499.    TFileTag (void);
  500.    TFileTag (PSZ pszUserFile);
  501.    ~TFileTag (void);
  502.  
  503.    ULONG  UserId;
  504.    USHORT Index;
  505.    CHAR   Area[16], Name[32], Complete[128];
  506.    ULONG  Size;
  507.    USHORT DeleteAfter;
  508.    USHORT CdRom;
  509.    USHORT TotalFiles;
  510.    ULONG  TotalBytes;
  511.  
  512.    USHORT Add (VOID);
  513.    VOID   Change (PSZ pszOldName, PSZ pszNewName);
  514.    VOID   Change (ULONG OldId, ULONG NewId);
  515.    USHORT Check (PSZ pszName);
  516.    VOID   Clear (VOID);
  517.    USHORT First (VOID);
  518.    VOID   Load (VOID);
  519.    VOID   New (VOID);
  520.    USHORT Next (VOID);
  521.    USHORT Previous (VOID);
  522.    VOID   Reindex (VOID);
  523.    VOID   Remove (PSZ pszName = NULL);
  524.    USHORT Select (USHORT usIndex);
  525.    VOID   Save (VOID);
  526.    VOID   Update (VOID);
  527.  
  528. private:
  529.    CHAR   DatFile[64];
  530.    class  TCollection Data;
  531. };
  532.  
  533. class DLL_EXPORT TLimits
  534. {
  535. public:
  536.    TLimits (void);
  537.    TLimits (PSZ pszUserFile);
  538.    ~TLimits (void);
  539.  
  540.    CHAR   Key[16];
  541.    CHAR   Description[32];
  542.    USHORT Level;
  543.    ULONG  Flags;
  544.    ULONG  DenyFlags;
  545.    USHORT CallTimeLimit;
  546.    USHORT DayTimeLimit;
  547.    USHORT DownloadLimit;
  548.    USHORT DownloadAt2400;
  549.    USHORT DownloadAt9600;
  550.    USHORT DownloadAt14400;
  551.    USHORT DownloadAt28800;
  552.    USHORT DownloadAt33600;
  553.    USHORT DownloadRatio;
  554.    USHORT RatioStart;
  555.    ULONG  DownloadSpeed;
  556.  
  557.    USHORT Add (VOID);
  558.    VOID   New (VOID);
  559.    VOID   Delete (VOID);
  560.    USHORT First (VOID);
  561.    USHORT Next (VOID);
  562.    USHORT Previous (VOID);
  563.    USHORT Read (PSZ pszName, USHORT fCloseFile = TRUE);
  564.    USHORT Update (VOID);
  565.  
  566. private:
  567.    int    fdDat;
  568.    CHAR   DatFile[64];
  569.    CHAR   LastKey[16];
  570. };
  571.  
  572. class DLL_EXPORT TUser
  573. {
  574. public:
  575.    TUser (void);
  576.    TUser (PSZ pszUserFile);
  577.    ~TUser (void);
  578.  
  579.    CHAR   Name[48];            // Name or nickname
  580.    ULONG  Password;            // Password as a 32bit CRC
  581.    CHAR   RealName[48];        // Real name
  582.    CHAR   Company[36];         // Company name (if allowed)
  583.    CHAR   Address[48];         // First line of the address
  584.    CHAR   City[48];            // Second line of the address
  585.    CHAR   DayPhone[26];        // Daytime phone number
  586.    CHAR   Ansi;                // TRUE=User can display ANSI
  587.    CHAR   Avatar;              // TRUE=User can display AVATAR
  588.    CHAR   Color;               // TRUE=User can display color informations
  589.    CHAR   HotKey;              // TRUE=User can use hot keyed menus
  590.    CHAR   Sex;                 // M=Male, F=Female (no other sex allowed at this writing)
  591.    UCHAR  FullEd;              // TRUE=Use fullscreen editor
  592.    UCHAR  FullReader;          // TRUE=Use fullscreen reader
  593.    UCHAR  NoDisturb;           // TRUE=Do not disturb
  594.    UCHAR  AccessFailed;        // TRUE=Last access attempt failed
  595.    USHORT ScreenHeight;        // User's screen width
  596.    USHORT ScreenWidth;         // User's screen height
  597.    USHORT Level;               // Level
  598.    ULONG  AccessFlags;         // Access flags
  599.    ULONG  DenyFlags;           // Deny access flags
  600.    ULONG  CreationDate;        // Record's creation date as a Unix-style timestamp
  601.    ULONG  LastCall;            // User's last call date/time as a Unix-style timestamp
  602.    CHAR   MailBox[32];         // User's mailbox name
  603.    CHAR   LimitClass[16];      // Class of limits
  604.    ULONG  TotalCalls;          // Number of calls to the system
  605.    ULONG  TodayTime;           // Number of minutes on-line today
  606.    ULONG  WeekTime;            // Number of minutes on-line this week
  607.    ULONG  MonthTime;           // Number of minutes on-line this month
  608.    ULONG  YearTime;            // Number of minutes on-line this year
  609.    CHAR   Language[16];        // Currently selected language (if any)
  610.    CHAR   FtpHost[48];         // Host name for FTP transfers
  611.    CHAR   FtpName[32];         // User name for FTP transfers
  612.    CHAR   FtpPwd[32];          // Password for FTP transfers
  613.    CHAR   LastMsgArea[16];     // Last message area visited
  614.    CHAR   LastFileArea[16];    // Last file area visited
  615.    USHORT UploadFiles;
  616.    ULONG  UploadBytes;
  617.    USHORT DownloadFiles;
  618.    ULONG  DownloadBytes;
  619.    USHORT FilesToday;
  620.    ULONG  BytesToday;
  621.    UCHAR  ImportPOP3Mail;           // TRUE=Import e-mail from POP3 server
  622.    UCHAR  UseInetAddress;           // TRUE=Use the personal Inet address
  623.    CHAR   InetAddress[64];          // Personal E-Mail address
  624.    CHAR   Pop3Pwd[32];              // Password for POP3 mail server
  625.    CHAR   Archiver[16];             // Default archiver
  626.    CHAR   Protocol[16];             // Default protocol
  627.    CHAR   Signature[64];            // Personal signature
  628.    CHAR   FullScreen;               // TRUE=Full screen enhancements
  629.    CHAR   IBMChars;                 // TRUE=Can display IBM characters
  630.    CHAR   MorePrompt;               // TRUE=Display More? prompt at each page
  631.    CHAR   ScreenClear;              // TRUE=Send screen clear codes
  632.    CHAR   InUserList;               // TRUE=Display in user list
  633.    CHAR   Kludges;                  // TRUE=Display message's kludge lines
  634.    CHAR   MailCheck;                // TRUE=Mail check at logon
  635.    CHAR   NewFileCheck;             // TRUE=Check for new files at logon
  636.    UCHAR  BirthDay;
  637.    UCHAR  BirthMonth;
  638.    USHORT BirthYear;
  639.    ULONG  LastPwdChange;            // Time of last password change
  640.    USHORT PwdLength;                // Length of text password
  641.    CHAR   PwdText[32];              // Text password, encrypted
  642.    class  TMsgTag  *MsgTag;
  643.    class  TFileTag *FileTag;
  644.  
  645.    USHORT Add (VOID);
  646.    USHORT Age (VOID);
  647.    VOID   ChangeLimitClass (PSZ pszOld, PSZ pszNew);
  648.    USHORT CheckPassword (PSZ pszPassword);
  649.    VOID   Clear (VOID);
  650.    USHORT Delete (VOID);
  651.    USHORT First (VOID);
  652.    USHORT GetData (PSZ pszName, USHORT fCheckRealName = TRUE);
  653.    USHORT Next (VOID);
  654.    VOID   Pack (VOID);
  655.    VOID   SetPassword (PSZ pszPassword);
  656.    USHORT Previous (VOID);
  657.    VOID   Reindex (VOID);
  658.    USHORT Update (VOID);
  659.  
  660. private:
  661.    int    fdDat, fdIdx;
  662.    CHAR   TempMailBox[32], DatFile[64], IdxFile[64];
  663.    ULONG  CurrentCRC;
  664.    UINDEX Idx;
  665.    USER   Usr;
  666.  
  667.    VOID   Struct2Class (VOID);
  668.    VOID   Class2Struct (VOID);
  669. };
  670.  
  671. // ---------------------------------------------------------------------------
  672.  
  673. typedef struct {
  674.    CHAR   Name[14];
  675.    ULONG  Entry;
  676. } IDXHEADER;
  677.  
  678. typedef struct {
  679.    USHORT Zone;
  680.    USHORT Net;
  681.    USHORT Node;
  682.    ULONG  Position;
  683. } NODEIDX;
  684.  
  685. typedef struct {
  686.    USHORT Size;
  687.    USHORT Zone;
  688.    CHAR   Name[64];
  689.    CHAR   Diff[64];
  690. } NODELIST;
  691.  
  692. class DLL_EXPORT TNodes
  693. {
  694. public:
  695.    TNodes (void);
  696.    TNodes (PSZ pszDataPath);
  697.    ~TNodes (void);
  698.  
  699.    CHAR   DataFile[64];
  700.    CHAR   Address[64];
  701.    USHORT Zone, Net, Node, Point;
  702.    CHAR   SystemName[64], SysopName[48], Location[48];
  703.    ULONG  Speed, MinSpeed;
  704.    CHAR   Phone[48], Flags[48], DialCmd[32];
  705.    UCHAR  RemapMail;
  706.    CHAR   SessionPwd[32], AreaMgrPwd[32];
  707.    CHAR   OutPktPwd[9], InPktPwd[9], TicPwd[32];
  708.    UCHAR  UsePkt22, CreateNewAreas;
  709.    CHAR   NewAreasFilter[128];
  710.    CHAR   Packer[16];
  711.    UCHAR  ImportPOP3Mail;        // TRUE=Import e-mail from POP3 server
  712.    UCHAR  UseInetAddress;        // TRUE=Use the personal Inet address
  713.    CHAR   InetAddress[64];       // Personal E-Mail address
  714.    CHAR   Pop3Pwd[32];           // Password for POP3 mail server
  715.    USHORT DefaultZone;
  716.    CHAR   Nodelist[64], Nodediff[64];
  717.    USHORT Level;
  718.    ULONG  AccessFlags;
  719.    ULONG  DenyFlags;
  720.    USHORT TicLevel;
  721.    ULONG  TicAccessFlags;
  722.    ULONG  TicDenyFlags;
  723.    UCHAR  LinkNewEcho;
  724.    UCHAR  EchoMaint;
  725.    UCHAR  ChangeEchoTag;
  726.    UCHAR  NotifyAreafix;
  727.    UCHAR  CreateNewTic;
  728.    UCHAR  LinkNewTic;
  729.    UCHAR  TicMaint;
  730.    UCHAR  ChangeTicTag;
  731.    UCHAR  NotifyRaid;
  732.    CHAR   MailerAka[48];
  733.    CHAR   EchoAka[48];
  734.    CHAR   TicAka[48];
  735.    CHAR   NewTicFilter[128];
  736.  
  737.    VOID   Add (VOID);
  738.    VOID   AddNodelist (PSZ name, PSZ diff, USHORT zone = 0);
  739.    VOID   Delete (VOID);
  740.    VOID   DeleteNodelist (VOID);
  741.    USHORT First (VOID);
  742.    USHORT FirstNodelist (VOID);
  743.    VOID   LoadNodelist (VOID);
  744.    USHORT Next (VOID);
  745.    USHORT NextNodelist (VOID);
  746.    VOID   New (VOID);
  747.    USHORT Previous (VOID);
  748.    USHORT Read (USHORT usZone, USHORT usNet, USHORT usNode, USHORT usPoint, PSZ pszDomain = NULL);
  749.    USHORT Read (class TAddress *Address, USHORT flAddNodelist = TRUE);
  750.    USHORT Read (class TAddress &Address, USHORT flAddNodelist = TRUE);
  751.    USHORT Read (PSZ pszAddress, USHORT flAddNodelist = TRUE);
  752.    USHORT ReadNodelist (class TAddress *Address);
  753.    USHORT ReadNodelist (class TAddress &Address);
  754.    VOID   SaveNodelist (VOID);
  755.    VOID   Update (VOID);
  756.  
  757. private:
  758.    int    fd;
  759.    class  TAddress Addr1, Addr2;
  760.    class  TCollection ListData;
  761.  
  762.    VOID   Class2Struct (NODES &Nodes);
  763.    VOID   Struct2Class (NODES &Nodes);
  764. };
  765.  
  766. // ---------------------------------------------------------------------------
  767.  
  768. typedef struct {
  769.    UCHAR  Day;
  770.    UCHAR  Month;
  771.    USHORT Year;
  772.    UCHAR  Hour;
  773.    UCHAR  Minute;
  774. } FBDATE;
  775.  
  776. class DLL_EXPORT TFileBase
  777. {
  778. public:
  779.    TFileBase (void);
  780.    TFileBase (PSZ pszPath, PSZ pszArea);
  781.    ~TFileBase (void);
  782.  
  783.    CHAR   Area[32], Name[32], Complete[128];
  784.    FBDATE UplDate, Date;
  785.    USHORT Level;
  786.    PSZ    Uploader;
  787.    CHAR   Keyword[32], Unapproved;
  788.    ULONG  Size, DlTimes;
  789.    ULONG  Cost, Password, AccessFlags, DenyFlags;
  790.    ULONG  UploadDate, FileDate;
  791.    USHORT CdRom;
  792.    class  TCollection *Description;
  793.  
  794.    USHORT Add (VOID);
  795.    ULONG  ChangeLibrary (PSZ pszFrom, PSZ pszTo);
  796.    VOID   Clear (VOID);
  797.    VOID   Close (VOID);
  798.    VOID   Delete (VOID);
  799.    USHORT First (PSZ pszSearch = NULL);
  800.    USHORT Next (PSZ pszSearch = NULL);
  801.    USHORT Open (PSZ pszPath, PSZ pszArea);
  802.    VOID   Pack (VOID);
  803.    USHORT Previous (VOID);
  804.    USHORT Read (PSZ pszFile);
  805.    VOID   ReadFileList (PSZ list, PSZ dl_path);
  806.    USHORT Replace (VOID);
  807.    USHORT ReplaceHeader (VOID);
  808.    VOID   SearchFile (PSZ pszFile);
  809.    VOID   SearchKeyword (PSZ pszKeyword);
  810.    VOID   SearchText (PSZ pszText);
  811.    VOID   SortByDate (ULONG ulDate = 0L);
  812.    VOID   SortByDownload (VOID);
  813.    VOID   SortByName (VOID);
  814.  
  815. private:
  816.    int    fdIdx;
  817.    int    fdDat;
  818.    CHAR   szArea[32], DataPath[128];
  819.    CHAR   fUploader;
  820.    PSZ    pszMemUploader;
  821.    ULONG  LastPos;
  822.    ULONG  LastDate;
  823.    class  TCollection *List;
  824.  
  825.    USHORT MatchName (PSZ pszName, PSZ pszSearch);
  826. };
  827.  
  828. // ---------------------------------------------------------------------------
  829.  
  830. class DLL_EXPORT TPacker
  831. {
  832. public:
  833.    TPacker (void);
  834.    TPacker (PSZ pszDataPath);
  835.    ~TPacker (void);
  836.  
  837.    CHAR   Key[16], Display[32];
  838.    CHAR   PackCmd[128], UnpackCmd[128];
  839.    CHAR   Error[32];
  840.    CHAR   Id[32];
  841.    LONG   Position;
  842.    UCHAR  Dos, OS2, Windows, Linux;
  843.  
  844.    USHORT Add (VOID);
  845.    USHORT CheckArc (PSZ pszArcName);
  846.    USHORT Delete (VOID);
  847.    USHORT DoPack (PSZ pszArcName, PSZ pszFiles);
  848.    USHORT DoUnpack (PSZ pszArcName, PSZ pszPath, PSZ pszFiles = NULL);
  849.    USHORT First (USHORT checkOS = TRUE);
  850.    VOID   New (VOID);
  851.    USHORT Next (USHORT checkOS = TRUE);
  852.    USHORT Previous (USHORT checkOS = TRUE);
  853.    USHORT Read (PSZ pszKey, USHORT checkOS = TRUE);
  854.    USHORT Update (VOID);
  855.  
  856. private:
  857.    int  fd;
  858.    CHAR Command[256];
  859.    CHAR DataPath[48];
  860. };
  861.  
  862. // ---------------------------------------------------------------------------
  863.  
  864. class DLL_EXPORT TEvents
  865. {
  866. public:
  867.    TEvents (void);
  868.    TEvents (PSZ pszDataFile);
  869.    ~TEvents (void);
  870.  
  871.    USHORT Number, NextNumber;
  872.    CHAR   NextLabel[32];
  873.    USHORT Started, TimeRemain;
  874.  
  875.    CHAR   Label[32];
  876.    UCHAR  Hour, Minute;
  877.    UCHAR  Sunday, Monday, Tuesday, Wednesday, Thursday, Friday, Saturday;
  878.    USHORT Length, LastDay;
  879.    UCHAR  Dynamic, Force, MailOnly, ForceCall;
  880.    CHAR   Address[32];
  881.    UCHAR  SendNormal, SendCrash, SendDirect, SendImmediate;
  882.    USHORT CallDelay;
  883.    UCHAR  StartImport, StartExport, ExportMail;
  884.    UCHAR  ImportNormal, ImportKnown, ImportProtected;
  885.    CHAR   RouteCmd[64], Command[128];
  886.    USHORT MaxCalls, MaxConnects;
  887.    UCHAR  AllowRequests, MakeRequests, ProcessTIC, ClockAdjustment;
  888.    UCHAR  Completed;
  889.  
  890.    VOID   Add (VOID);
  891.    VOID   Delete (VOID);
  892.    USHORT First (VOID);
  893.    USHORT SetCurrent (VOID);
  894.    USHORT Load (VOID);
  895.    VOID   New (VOID);
  896.    USHORT Next (VOID);
  897.    USHORT Previous (VOID);
  898.    USHORT Read (USHORT evtNum);
  899.    VOID   Save (VOID);
  900.    VOID   TimeToNext (VOID);
  901.    VOID   Update (VOID);
  902.  
  903. private:
  904.    CHAR   DataFile[128];
  905.    EVENT  Event;
  906.    class  TCollection Data;
  907.  
  908.    VOID   Class2Struct (EVENT *Event);
  909.    VOID   Struct2Class (EVENT *Event);
  910. };
  911.  
  912. // ----------------------------------------------------------------------
  913.  
  914. typedef struct {
  915.    USHORT Zone;
  916.    USHORT Net;
  917.    USHORT Node;
  918.    USHORT Point;
  919.    CHAR   Domain[32];
  920.    CHAR   Name[32];           // File name
  921.    CHAR   Complete[128];
  922.    ULONG  Size;               // File size in bytes
  923.    UCHAR  ArcMail;            // TRUE=File is a compressed mail packet
  924.    UCHAR  MailPKT;            // TRUE=File is an uncompressed mail packet
  925.    UCHAR  Request;            // TRUE=File is a files request
  926.    UCHAR  Poll;               // TRUE=Only the poll flag is present
  927.    UCHAR  DeleteAfter;        // TRUE=Should be deleted after sent
  928.    UCHAR  TruncateAfter;      // TRUE=Should be truncated to 0 bytes after sent
  929.    CHAR   Status;             // 'H'=Hold, 'C'=Crash, 'D'=Direct, 'F'=Normal
  930. } OUTFILE;
  931.  
  932. typedef struct {
  933.    USHORT Zone;
  934.    USHORT Net;
  935.    USHORT Node;
  936.    USHORT Point;
  937.    CHAR   Domain[32];
  938.    ULONG  Size;               // Total files size in bytes
  939.    USHORT Files;              // Total number of files
  940.    UCHAR  ArcMail;            // TRUE=Node has compressed mail files
  941.    UCHAR  MailPKT;            // TRUE=Node has uncompressed mail files
  942.    UCHAR  Request;            // TRUE=Node has file requests pending
  943.    UCHAR  Crash;              // TRUE=Node has priority flags CRASH
  944.    UCHAR  Direct;             // TRUE=Node has priority flags DIRECT
  945.    UCHAR  Hold;               // TRUE=Node has priority flags HOLD
  946.    UCHAR  Immediate;          // TRUE=Node has priority flags IMMEDIATE
  947.    UCHAR  Normal;             // TRUE=Node has priority flags NORMAL
  948.    USHORT Attempts;           // Number of dialing attempts
  949.    USHORT Failed;             // Number of calls failed (connection but no handshake)
  950.    CHAR   LastCall[32];
  951. } QUEUE;
  952.  
  953. class DLL_EXPORT TOutbound
  954. {
  955. public:
  956.    TOutbound (PSZ pszPath);
  957.    TOutbound (PSZ pszPath, USHORT usZone, USHORT usNet, USHORT usNode, USHORT usPoint = 0, PSZ pszDomain = "");
  958.    ~TOutbound (void);
  959.  
  960.    USHORT Zone, Net, Node, Point;
  961.    CHAR   Domain[32];
  962.    CHAR   Name[32], Complete[128];
  963.    ULONG  Size;
  964.    UCHAR  ArcMail, MailPKT, Request, Poll;
  965.    UCHAR  DeleteAfter, TruncateAfter;
  966.    CHAR   Status;
  967.  
  968.    USHORT Number;
  969.    CHAR   Address[64];
  970.    UCHAR  Crash, Direct, Hold, Immediate, Normal;
  971.    USHORT Attempts, Failed;
  972.    CHAR   LastCall[32];
  973.  
  974.    USHORT DefaultZone;
  975.    USHORT TotalFiles, TotalNodes;
  976.    ULONG  TotalSize;
  977.  
  978.    USHORT Add (VOID);
  979.    USHORT Add (USHORT usZone, USHORT usNet, USHORT usNode, USHORT usPoint = 0, PSZ pszDomain = "");
  980.    USHORT AddQueue (OUTFILE &Out);
  981.    VOID   BuildQueue (PSZ pszPath);
  982.    VOID   Clear (VOID);
  983.    USHORT First (VOID);
  984.    USHORT FirstNode (VOID);
  985.    VOID   New (VOID);
  986.    USHORT Next (VOID);
  987.    USHORT NextNode (VOID);
  988.    VOID   PollNode (PSZ address, CHAR flag);
  989.    VOID   Remove (VOID);
  990.    VOID   Update (VOID);
  991.  
  992.    VOID   AddAttempt (PSZ address, USHORT failed, PSZ status = "");
  993.    VOID   ClearAttempt (PSZ address);
  994.  
  995. private:
  996.    CHAR   Path[48], Outbound[48];
  997.    class  TCollection Files;
  998.    class  TCollection Nodes;
  999. };
  1000.  
  1001. // ---------------------------------------------------------------------------
  1002.  
  1003. #define MAX_LINE        4096
  1004.  
  1005. enum {
  1006.    LNG_LANGUAGE_NAME = 1,
  1007.    LNG_YES,
  1008.    LNG_NO,
  1009.    LNG_NONE,
  1010.    LNG_MALE,
  1011.    LNG_FEMALE,
  1012.    LNG_YESKEY,
  1013.    LNG_NOKEY,
  1014.    LNG_HELPKEY,
  1015.    LNG_MALEKEY,
  1016.    LNG_FEMALEKEY,
  1017.    LNG_JANUARY,
  1018.    LNG_FEBRUARY,
  1019.    LNG_MARCH,
  1020.    LNG_APRIL,
  1021.    LNG_MAY,
  1022.    LNG_JUNI,
  1023.    LNG_JULY,
  1024.    LNG_AUGUST,
  1025.    LNG_SEPTEMBER,
  1026.    LNG_OCTOBER,
  1027.    LNG_NOVEMBER,
  1028.    LNG_DECEMBER,
  1029.    LNG_PRESSENTER,
  1030.    LNG_DEFYESNO,
  1031.    LNG_YESDEFNO,
  1032.    LNG_DEFYESNOHELP,
  1033.    LNG_YESDEFNOHELP,
  1034.    LNG_ASKADDRESS,
  1035.    LNG_ASKANSI,
  1036.    LNG_ASKCITY,
  1037.    LNG_ASKCOMPANYNAME,
  1038.    LNG_ASKDAYPHONE,
  1039.    LNG_ASKPASSWORD,
  1040.    LNG_ASKALIAS,
  1041.    LNG_ASKSEX,
  1042.    LNG_ENTERNAME,
  1043.    LNG_ENTERNAMEORNEW,
  1044.    LNG_ENTERPASSWORD,
  1045.    LNG_INVALIDPASSWORD,
  1046.    LNG_HAVETAGGED,
  1047.    LNG_DISCONNECT,
  1048.    LNG_YOUSURE,
  1049.    LNG_USERFROMCITY,
  1050.    LNG_MENUERROR,
  1051.    LNG_MESSAGEHDR,
  1052.    LNG_MESSAGENUMBER,
  1053.    LNG_MESSAGENUMBER1,
  1054.    LNG_MESSAGENUMBER2,
  1055.    LNG_MESSAGENUMBER3,
  1056.    LNG_MESSAGEDATE,
  1057.    LNG_MESSAGEISREPLY,
  1058.    LNG_MESSAGESEEALSO,
  1059.    LNG_MESSAGEISBOTH,
  1060.    LNG_MESSAGEFLAGS,
  1061.    LNG_MESSAGEFROM,
  1062.    LNG_MESSAGETO,
  1063.    LNG_MESSAGESUBJECT,
  1064.    LNG_MESSAGEFILE,
  1065.    LNG_MESSAGETEXT,
  1066.    LNG_MESSAGEQUOTE,
  1067.    LNG_MESSAGEKLUDGE,
  1068.    LNG_MESSAGEORIGIN,
  1069.    LNG_MESSAGEAREAHEADER,
  1070.    LNG_MESSAGEAREASEPARATOR,
  1071.    LNG_MESSAGEAREADESCRIPTION1,
  1072.    LNG_MESSAGEAREADESCRIPTION2,
  1073.    LNG_MESSAGEAREACURSOR,
  1074.    LNG_MESSAGEAREAKEY,
  1075.    LNG_MESSAGEAREALIST,
  1076.    LNG_MESSAGEAREAREQUEST,
  1077.    LNG_MSGFLAG_RCV,
  1078.    LNG_MSGFLAG_SNT,
  1079.    LNG_MSGFLAG_PVT,
  1080.    LNG_MSGFLAG_CRA,
  1081.    LNG_MSGFLAG_KS,
  1082.    LNG_MSGFLAG_LOC,
  1083.    LNG_MSGFLAG_HLD,
  1084.    LNG_MSGFLAG_ATT,
  1085.    LNG_MSGFLAG_FRQ,
  1086.    LNG_MSGFLAG_TRS,
  1087.    LNG_ENDOFMESSAGES,
  1088.    LNG_READMENU,
  1089.    LNG_ENDREADMENU,
  1090.    LNG_NEXTMESSAGE,
  1091.    LNG_EXITREADMESSAGE,
  1092.    LNG_REREADMESSAGE,
  1093.    LNG_PREVIOUSMESSAGE,
  1094.    LNG_REPLYMESSAGE,
  1095.    LNG_EMAILREPLYMESSAGE,
  1096.    LNG_MENUNAME,
  1097.    LNG_CONFERENCENOTAVAILABLE,
  1098.    LNG_STARTWITHMESSAGE,
  1099.    LNG_NEWMESSAGES,
  1100.    LNG_TEXTFILES,
  1101.    LNG_FORUMNAME,
  1102.    LNG_FORUMOPERATOR,
  1103.    LNG_FORUMTOPIC,
  1104.    LNG_MENUPATH,
  1105.    LNG_MOREQUESTION,
  1106.    LNG_DELETEMOREQUESTION,
  1107.    LNG_NONSTOP,
  1108.    LNG_QUIT,
  1109.    LNG_CONTINUE,
  1110.    LNG_NAMENOTFOUND,
  1111.    LNG_FILEAREAREQUEST,
  1112.    LNG_FILEAREAHEADER,
  1113.    LNG_FILEAREALIST,
  1114.    LNG_FILEAREANOTAVAILABLE,
  1115.    LNG_FILEAREACURSOR,
  1116.    LNG_FILEAREASEPARATOR,
  1117.    LNG_FILEAREADESCRIPTION1,
  1118.    LNG_FILEAREADESCRIPTION2,
  1119.    LNG_FILEAREAKEY,
  1120.    LNG_FILENOTFOUNDINAREA,
  1121.    LNG_FILEDESCRIPTION,
  1122.    LNG_FILEDOWNLOADNAME,
  1123.    LNG_DOWNLOADFILENAME,
  1124.    LNG_NOFILEHERE,
  1125.    LNG_DISPLAYWHICHFILE,
  1126.    LNG_FILELISTHEADER,
  1127.    LNG_FILELISTSEPARATOR,
  1128.    LNG_FILELISTDESCRIPTION1,
  1129.    LNG_FILELISTDESCRIPTION2,
  1130.    LNG_FILELISTTAGGED,
  1131.    LNG_FILELISTNORMAL,
  1132.    LNG_READERFROM,
  1133.    LNG_READERTO,
  1134.    LNG_READERSUBJECT,
  1135.    LNG_READERFILE,
  1136.    LNG_CONTINUEASNEW,
  1137.    LNG_REENTERPASSWORD,
  1138.    LNG_PASSWORDNOMATCH,
  1139.    LNG_ASKAVATAR,
  1140.    LNG_ASKCOLOR,
  1141.    LNG_ASKFULLSCREEN,
  1142.    LNG_ASKHOTKEY,
  1143.    LNG_ASKIBMCHARS,
  1144.    LNG_ASKLINES,
  1145.    LNG_ASKPAUSE,
  1146.    LNG_ASKSCREENCLEAR,
  1147.    LNG_ASKBIRTHDATE,
  1148.    LNG_ASKMAILCHECK,
  1149.    LNG_ASKFILECHECK,
  1150.    LNG_CURRENTPASSWORD,
  1151.    LNG_WHYPASSWORD,
  1152.    LNG_WRONGPASSWORD,
  1153.    LNG_FILEPROTOCOLLIST,
  1154.    LNG_FILETAGGEDWARNING,
  1155.    LNG_FILENOBYTESWARNING,
  1156.    LNG_FILENOTIMEWARNING,
  1157.    LNG_FILEBEGINDOWNLOAD,
  1158.    LNG_FILEBEGINDOWNLOAD2,
  1159.    LNG_FILETAGGEDHEADER,
  1160.    LNG_FILETAGGEDLIST,
  1161.    LNG_FILETAGGEDTOTAL,
  1162.    LNG_FILEDOWNLOADERROR,
  1163.    LNG_FILEDOWNLOADCOMPLETE,
  1164.    LNG_FILEBUILDLIST,
  1165.    LNG_FILENOTAGGED,
  1166.    LNG_FILETAGLISTED,
  1167.    LNG_FILELISTTAGCONFIRM,
  1168.    LNG_FILELISTMOREQUESTION,
  1169.    LNG_FILELISTDELETEMOREQUESTION,
  1170.    LNG_FILELISTTAGKEY,
  1171.    LNG_FILELISTNOFILESFOUND,
  1172.    LNG_FILELISTCOMMENT,
  1173.    LNG_FILELISTNOTFOUND,
  1174.    LNG_FILENAMETODELETE,
  1175.    LNG_FILEDELETED,
  1176.    LNG_FILETODETAG,
  1177.    LNG_FILEDETAGGED,
  1178.    LNG_FILETAGEMPTY,
  1179.    LNG_FILETOTAG,
  1180.    LNG_FILETAGCONFIRM,
  1181.    LNG_FILENOTFOUND,
  1182.    LNG_ONLINETITLE,
  1183.    LNG_ONLINEHEADER,
  1184.    LNG_ONLINEENTRY,
  1185.    LNG_MAX_ENTRIES
  1186. };
  1187.  
  1188. class DLL_EXPORT TLanguage
  1189. {
  1190. public:
  1191.    TLanguage (void);
  1192.    ~TLanguage (void);
  1193.  
  1194.    CHAR   File[32], Comment[64], MenuName[32];
  1195.    CHAR   TextFiles[64], MenuPath[64];
  1196.  
  1197.    PSZ    Months[12];
  1198.    CHAR   Yes, No, Help;
  1199.    CHAR   Male, Female;
  1200.  
  1201.    VOID   Default (VOID);
  1202.    USHORT Load (PSZ pszFile);
  1203.    PSZ    Text (USHORT Id);
  1204.  
  1205. private:
  1206.    PSZ    TextMemory;
  1207.    PSZ    Pointer[LNG_MAX_ENTRIES];
  1208.  
  1209.    USHORT CheckKeyword (PSZ pszKey);
  1210.    PSZ    CopyString (USHORT Key, PSZ Arg, PSZ Pointer);
  1211. };
  1212.  
  1213. // ---------------------------------------------------------------------------
  1214.  
  1215. class DLL_EXPORT TEchotoss
  1216. {
  1217. public:
  1218.    TEchotoss (PSZ path);
  1219.    ~TEchotoss (void);
  1220.  
  1221.    CHAR   Tag[64];
  1222.  
  1223.    VOID   Add (PSZ tag);
  1224.    VOID   Clear (VOID);
  1225.    VOID   Delete (VOID);
  1226.    USHORT First (VOID);
  1227.    USHORT Load (VOID);
  1228.    USHORT Next (VOID);
  1229.    VOID   Save (VOID);
  1230.  
  1231. private:
  1232.    CHAR   DataFile[128];
  1233.    class  TCollection Data;
  1234. };
  1235.  
  1236. // ---------------------------------------------------------------------------
  1237.  
  1238. class DLL_EXPORT TProtocol
  1239. {
  1240. public:
  1241.    TProtocol (void);
  1242.    TProtocol (PSZ path);
  1243.    ~TProtocol (void);
  1244.  
  1245.    CHAR   Key[16];
  1246.    CHAR   Description[64];
  1247.    UCHAR  Active, Batch, DisablePort, ChangeToUploadPath;
  1248.    CHAR   DownloadCmd[64], UploadCmd[64];
  1249.    CHAR   LogFileName[64], CtlFileName[64];
  1250.    CHAR   DownloadCtlString[32], UploadCtlString[32];
  1251.    CHAR   DownloadKeyword[32], UploadKeyword[32];
  1252.    USHORT FileNamePos, SizePos, CpsPos;
  1253.  
  1254.    VOID   Add (VOID);
  1255.    VOID   Delete (VOID);
  1256.    USHORT First (VOID);
  1257.    VOID   New (VOID);
  1258.    USHORT Next (VOID);
  1259.    USHORT Previous (VOID);
  1260.    USHORT Read (PSZ key);
  1261.    VOID   Update (VOID);
  1262.  
  1263. private:
  1264.    int    fdDat;
  1265.    CHAR   DataFile[128];
  1266.    PROTOCOL prot;
  1267.  
  1268.    VOID   Class2Struct (PROTOCOL *proto);
  1269.    VOID   Struct2Class (PROTOCOL *proto);
  1270. };
  1271.  
  1272. // ---------------------------------------------------------------------------
  1273.  
  1274. class DLL_EXPORT TOkFile
  1275. {
  1276. public:
  1277.    TOkFile (void);
  1278.    TOkFile (PSZ pszDataPath);
  1279.    ~TOkFile (void);
  1280.  
  1281.    CHAR Name[32];
  1282.    CHAR Path[128];
  1283.    CHAR Pwd[32];
  1284.    CHAR Normal;
  1285.    CHAR Known;
  1286.    CHAR Protected;
  1287.  
  1288.    VOID   Add (VOID);
  1289.    VOID   DeleteAll (VOID);
  1290.    USHORT First (VOID);
  1291.    USHORT Next (VOID);
  1292.    USHORT Read (PSZ pszName);
  1293.    VOID   Update (VOID);
  1294.  
  1295. private:
  1296.    int fdDat;
  1297.    CHAR DataFile[128];
  1298. };
  1299.  
  1300. // ---------------------------------------------------------------------------
  1301.  
  1302. class DLL_EXPORT TNodeFlags
  1303. {
  1304. public:
  1305.    TNodeFlags (void);
  1306.    TNodeFlags (PSZ pszDataPath);
  1307.    ~TNodeFlags (void);
  1308.  
  1309.    CHAR   Flags[64];
  1310.    CHAR   Cmd[64];
  1311.  
  1312.    VOID   Add (VOID);
  1313.    USHORT First (VOID);
  1314.    VOID   Delete (VOID);
  1315.    VOID   DeleteAll (VOID);
  1316.    USHORT Next (VOID);
  1317.    USHORT Read (PSZ pszName);
  1318.    USHORT Read (USHORT index);
  1319.    VOID   Save (VOID);
  1320.    VOID   Update (VOID);
  1321.  
  1322. private:
  1323.    int fdDat;
  1324.    CHAR DataFile[128];
  1325.    NODEFLAGS nf;
  1326.    class TCollection List;
  1327. };
  1328.  
  1329. // ---------------------------------------------------------------------------
  1330.  
  1331. class DLL_EXPORT TTranslation
  1332. {
  1333. public:
  1334.    TTranslation (void);
  1335.    TTranslation (PSZ pszDataPath);
  1336.    ~TTranslation (void);
  1337.  
  1338.    CHAR   Location[48];             // Name of the location this data is referring to
  1339.    CHAR   Search[32];               // Phone number prefix to translate
  1340.    CHAR   Traslate[64];             // Translated prefix
  1341.    struct {
  1342.       USHORT Days;                  // Week days
  1343.       USHORT Start;                 // Starting time
  1344.       USHORT Stop;                  // Ending time
  1345.       USHORT CostFirst;             // Cost for TimeFirst seconds of conversation
  1346.       USHORT TimeFirst;             // Seconds for CostFirst
  1347.       USHORT Cost;                  // Cost for Time seconds of conversation or fraction
  1348.       USHORT Time;                  // Time for Cost
  1349.    } Cost[MAXCOST];
  1350.  
  1351.    VOID   Add (VOID);
  1352.    VOID   DeleteAll (VOID);
  1353.    VOID   Export (PSZ pszFile);
  1354.    USHORT First (VOID);
  1355.    USHORT Import (PSZ pszFile);
  1356.    USHORT Next (VOID);
  1357.    VOID   New (VOID);
  1358.    USHORT Read (PSZ pszName);
  1359.    VOID   Update (VOID);
  1360.  
  1361. private:
  1362.    int fdDat;
  1363.    CHAR DataFile[128];
  1364.    TRANSLATION table;
  1365.  
  1366.    VOID   Class2Struct (VOID);
  1367.    VOID   Struct2Class (VOID);
  1368. };
  1369.  
  1370. #endif
  1371.  
  1372.