ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/i-scream/projects/cms/source/host/c++/Config.h
(Generate patch)

Comparing projects/cms/source/host/c++/Config.h (file contents):
Revision 1.5 by ab11, Mon Mar 5 12:41:06 2001 UTC vs.
Revision 1.7 by tdb, Sat May 18 18:15:56 2002 UTC

# Line 1 | Line 1
1 + /*
2 + * i-scream central monitoring system
3 + * Copyright (C) 2000-2002 i-scream
4 + *
5 + * This program is free software; you can redistribute it and/or
6 + * modify it under the terms of the GNU General Public License
7 + * as published by the Free Software Foundation; either version 2
8 + * of the License, or (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., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
18 + */
19 +
20   #include <iostream>
21   #include <string>
22   #include <unistd.h> // linux header for the sleep function
# Line 20 | Line 39 | class Config {
39          SmallNet * getSmallNet(){ return net; };   // returns a pointer to the smallnet class
40          string getFilterName(){ return UDPFilterName; };
41          int getFilterPort(){ return TCPFilterPort; };
42 +        string getFQDN(){ return fQDN; }; // inline. Returns this host name.
43          int chatHeartBeat();
44          
45          // public variables
46          
47          private:
48          // private methods
49 <        int loadConfig();         // do the chat dialog
50 <        int establishHeartbeat(); // tell smallnet to make a connection
51 <        int chatHeartbeat();      // send the relevant commands to the heartbeat
52 <        int destroyHeartbeat();   // tell smallnet to close a connection
53 <        int establishConfig();    // tell smallnet to make a connection to the config manager
54 <        int chatConfig();         // send the relevant commands to get the config
55 <        int destroyConfig();      // tell smallnet to close the connection to the config manager
49 >        int loadConfig();           // do the chat dialog
50 >        int establishHeartbeat();   // tell smallnet to make a connection
51 >        int chatHeartbeat();        // send the relevant commands to the heartbeat
52 >        int destroyHeartbeat();     // tell smallnet to close a connection
53 >        int establishConfig();      // tell smallnet to make a connection to the config manager
54 >        int chatConfig();               // send the relevant commands to get the config
55 >        int destroyConfig();        // tell smallnet to close the connection to the config manager
56          
57          
58          // private (global) variables
59          int MAX_CONNECTION_ATTEMPTS;            // how many times should it try?
60          int configConnectionRetryTime;          // how long to wait before retrying a connection to the
61 <                                                // config manager if a connection cannot be established
61 >                                                                // config manager if a connection cannot be established
62          string configName;                      // the name of the server which will return our config
63          int configPort;                         // the port on the server which will return our config
64          int UDPFilterPort;                      // the port number of our assigned filter
65 <        string UDPFilterName;                   // the name of our assigned filter
65 >        string UDPFilterName;           // the name of our assigned filter
66          int TCPFilterPort;                      // the tcp port for heartbeats
67          bool configChanged;                     // has the config changed since we last loaded it?
68 <        string lastModified;                    // saves the last modifed long integer
68 >        string lastModified;            // saves the last modifed long integer
69          string fileList;                        // saves the last modifed file list
70          string fQDN;
71          int numProperties;                      // the number of properties which this host wants
72 <        string propertyNames[20];               // an array of strings which corrisponds to...
73 <        string propertyValues[20];              // these values
72 >        string propertyNames[20];       // an array of strings which corrisponds to...
73 >        string propertyValues[20];      // these values
74          SmallNet * net;                         // interface onto SmallNet
75 <        int debug;                              // print debug info?
75 >        int debug;                                  // print debug info?
76          
77          
78          

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines