--- projects/cms/source/host/c++/Config.h 2001/01/24 19:32:43 1.1 +++ projects/cms/source/host/c++/Config.h 2001/03/05 12:41:06 1.5 @@ -1,7 +1,10 @@ #include #include #include // linux header for the sleep function -#include "SmallNet.h" +#ifndef SMALLNET_H /* Has the file been INCLUDE'd already? */ + #define SMALLNET_H yes + #include "SmallNet.h" +#endif using std::string; @@ -9,10 +12,15 @@ class Config { public: // public methods - Config( string serverName, int serverPort ); + Config( string serverName, int serverPort, int printDebug); int getUDPFilterPort(){ return UDPFilterPort; }; // inline function string getUDPFilterName(){ return UDPFilterName; }; // inline - int getProperty( string propertyName ); + int getIntProperty( string propertyName ); + string getStrProperty( string propertyName ); + SmallNet * getSmallNet(){ return net; }; // returns a pointer to the smallnet class + string getFilterName(){ return UDPFilterName; }; + int getFilterPort(){ return TCPFilterPort; }; + int chatHeartBeat(); // public variables @@ -28,6 +36,7 @@ class Config { // private (global) variables + int MAX_CONNECTION_ATTEMPTS; // how many times should it try? int configConnectionRetryTime; // how long to wait before retrying a connection to the // config manager if a connection cannot be established string configName; // the name of the server which will return our config @@ -38,10 +47,12 @@ class Config { bool configChanged; // has the config changed since we last loaded it? string lastModified; // saves the last modifed long integer string fileList; // saves the last modifed file list + string fQDN; int numProperties; // the number of properties which this host wants string propertyNames[20]; // an array of strings which corrisponds to... string propertyValues[20]; // these values - SmallNet net; // interface onto SmallNet + SmallNet * net; // interface onto SmallNet + int debug; // print debug info?