This class reads a configuration file named "mcs.conf" that must be in the working directory of execution, which contains all environment variables for the execution of a MCS-based application. You can see an example of a configuration file in the MCS distribution tree "share/test/mcs.conf". The file will be read using the Conf class. If one of the environment variable, or the entire file, aren't found then a default value will be assumed.
|
Public Member Functions |
| Env (const Env &) |
| Declared to avoid using of default copy constructor.
|
| Env (string app="mcs", string inipath="mcs.conf") |
| Env constructor.
|
Env & | operator= (const Env &) |
| Declared to avoid using of default assignment operator.
|
| ~Env () |
| Destructor.
|
Public Attributes |
string | appname |
| Application name.
|
string | appvers |
| Application version.
|
bool | cl_autoexec |
| Auto execute batch file "auto".
|
int | cl_chunksize |
| Default size of a chunk of a Serializable object, that is chunks that goes through the network.
|
bool | cl_clean_logout |
| Clean work dir on user logout.
|
bool | cl_createlocal |
| Create local thread.
|
bool | cl_custom_auth |
| Activate custom authentication.
|
bool | cl_have_db |
| Activate DB facilities.
|
bool | cl_local_kills_mcs |
| When the local thread dies the server will be stopped.
|
bool | cl_logfile |
| Use log file.
|
bool | cl_logstdout |
| Copy log on stdout.
|
bool | cl_read_grants |
| Read grants from the DB table (deprecated).
|
bool | cl_restartlocal |
| Resart local thread when it dies.
|
bool | cl_use_ssl |
| Use secure connections.
|
bool | cl_work |
| Use private (per user) working dir, otherwise use path.
|
bool | cl_work_cid |
| Work path is created using cid if true, otherwise with the user name.
|
Conf * | cnf |
| Pointer to the Conf object used to read the configuration file.
|
string | db_host |
| Host running database server.
|
string | db_name |
| Database name.
|
string | db_pass |
| Password.
|
string | db_user |
| User name for the local thread access to DB.
|
ofstream * | flog |
| Stream to write the log file.
|
string | inipath |
| Application ini file.
|
string | interface |
| Server interface name.
|
LocalThread * | local |
string | localhost |
| Host name.
|
int | max_users |
| How many clients can be connected at the same time.
|
string | path |
| Main server path (APPD).
|
int | port |
| Server port number.
|
Server * | server |
| Reference to actual server.
|
void * | ssl_ctx |
| Pointer to the global SSL context object, used if cl_use_ssl is true.
|
string | sslcert |
| Path to the SSL certificate file, used if cl_use_ssl = 1.
|
string | sslpriv |
| Path to the SSL private key file, used if cl_use_ssl = 1.
|
unsigned int | timeout |
| Timeout for client operations, in millisecond.
|
Private Member Functions |
void | chkTree () |
| Check the entire MCS tree.
|
void | DumpConf () |
| Dump environment to configuration file.
|
void | LoadConf () |
| Load configuration entries.
|
Private Attributes |
DBConn | db |