1 |
|
#include <iostream> |
2 |
|
#include <string> |
3 |
|
#include <unistd.h> // linux header for the sleep function |
4 |
< |
#include "SmallNet.h" |
4 |
> |
#ifndef SMALLNET_H /* Has the file been INCLUDE'd already? */ |
5 |
> |
#define SMALLNET_H yes |
6 |
> |
#include "SmallNet.h" |
7 |
> |
#endif |
8 |
|
|
9 |
|
using std::string; |
10 |
|
|
12 |
|
|
13 |
|
public: |
14 |
|
// public methods |
15 |
< |
Config( string serverName, int serverPort ); |
15 |
> |
Config( string serverName, int serverPort, int printDebug); |
16 |
|
int getUDPFilterPort(){ return UDPFilterPort; }; // inline function |
17 |
|
string getUDPFilterName(){ return UDPFilterName; }; // inline |
18 |
< |
int getProperty( string propertyName ); |
18 |
> |
int getIntProperty( string propertyName ); |
19 |
> |
string getStrProperty( string propertyName ); |
20 |
> |
SmallNet * getSmallNet(){ return net; }; // returns a pointer to the smallnet class |
21 |
> |
string getFilterName(){ return UDPFilterName; }; |
22 |
> |
int getFilterPort(){ return TCPFilterPort; }; |
23 |
> |
int chatHeartBeat(); |
24 |
|
|
25 |
|
// public variables |
26 |
|
|
36 |
|
|
37 |
|
|
38 |
|
// private (global) variables |
39 |
+ |
int MAX_CONNECTION_ATTEMPTS; // how many times should it try? |
40 |
|
int configConnectionRetryTime; // how long to wait before retrying a connection to the |
41 |
|
// config manager if a connection cannot be established |
42 |
|
string configName; // the name of the server which will return our config |
47 |
|
bool configChanged; // has the config changed since we last loaded it? |
48 |
|
string lastModified; // saves the last modifed long integer |
49 |
|
string fileList; // saves the last modifed file list |
50 |
+ |
string fQDN; |
51 |
|
int numProperties; // the number of properties which this host wants |
52 |
|
string propertyNames[20]; // an array of strings which corrisponds to... |
53 |
|
string propertyValues[20]; // these values |
54 |
< |
SmallNet net; // interface onto SmallNet |
54 |
> |
SmallNet * net; // interface onto SmallNet |
55 |
> |
int debug; // print debug info? |
56 |
|
|
57 |
|
|
58 |
|
|