home *** CD-ROM | disk | FTP | other *** search
/ PC Online 1999 February / PCO_0299.ISO / filesbbs / dos / indigo01.exe / CONFIG.H < prev    next >
Encoding:
C/C++ Source or Header  |  1997-08-21  |  2.0 KB  |  49 lines

  1. // This program is free software; you can redistribute it and/or modify it
  2. // under the terms of the GNU General Public License as published by the Free
  3. // Software Foundation; either version 2 of the License, or (at your option)
  4. // any later version.
  5.  
  6. // You should have received a copy of the GNU General Public License along
  7. // with this program; if not, write to the Free Software Foundation, Inc., 675
  8. // Mass Ave, Cambridge, MA 02139, USA.
  9.  
  10. // config.h
  11. // Header file for the configuration extraction routine.
  12.  
  13. #ifndef __CONFIG_H
  14. #define __CONFIG_H
  15.  
  16. #include "fido.h"
  17. #include "areas.h"
  18. #include "uplink.h"
  19.  
  20. enum direction_t { in, out };
  21.  
  22. // Class: Configuration
  23. // Handles the program's configuration file.
  24. class Configuration {
  25. public:
  26.     Configuration(char *fileName, direction_t); // constructor (reads config)
  27.     ~Configuration();                                     // destructor
  28.     int uplinkNumber(FidoAddress &);                      // get uplink no.
  29.     inline char *deCompressCommand(char *src, char *dest) // get decompress
  30.         { return command(decompresscmd_p, src, dest); };  //  cmd string.
  31.     inline char *compressionCommand(char *dest, char *src)// get compress
  32.         { return command(compresscmd_p, dest, src); };    //  cmd string.
  33.     char *tempName(char *);  // get file name in temporary directory.
  34.     char *bwName(char *);    // get Blue Wave file name based on extension.
  35.     char *bwName(int);       // get Blue Wave file name based on numeric ext.
  36.  
  37.     FidoAddress     **myAddress_pp, **uplink_pp;          // address lists.
  38.     int             numuplinks, numareas, badareano;      // various
  39.     BlueWaveArea    **arealist_pp;                        // only with IN
  40.     Uplink          **uplinklist_pp;                      // only with OUT
  41.     char            *base_p, *myName_p, *bwpath_p;        // paths
  42. protected:
  43.     char *command(char *, char *, char *);                // get command.
  44.  
  45.     char            *decompresscmd_p, *compresscmd_p, *temppath_p; // paths
  46. };
  47.  
  48. #endif
  49.