57 bool Load(
const char *file_name);
61 out <<
"Configuration:" << endl;
62 out <<
"\tListen at: " << cfg.
address_ <<
":" << cfg.
port_ << endl;
63 out <<
"\tFolders:" << endl;
67 out <<
"\tConnections: " << endl;
69 out <<
"\t\tMax. time-out: " << cfg.
com_time_out() << endl;
70 out <<
"\tGeneral:" << endl;
71 out <<
"\t\tLogging: " << (cfg.
logging_ == 1 ?
"yes" :
"no") << endl;
72 out <<
"\t\tLog. requests: " << (cfg.
log_requests_ == 1 ?
"yes" :
"no") << endl;
98 return images_folder_;
106 return caching_folder_;
114 return logging_folder_;
122 return max_chunk_size_;
130 return max_connections_;
138 return (logging_ == 1);
146 return (log_requests_ == 1);
154 return com_time_out_;
163 return cache_max_time_;
string images_folder() const
Returns the folder of the images.
Definition: app_config.h:96
int max_chunk_size_
Maximum chunk size.
Definition: app_config.h:28
int com_time_out() const
Returns the connection time-out.
Definition: app_config.h:152
string caching_folder() const
Returns the folder used for caching.
Definition: app_config.h:104
virtual ~AppConfig()
Definition: app_config.h:166
AppConfig()
Initializes the object with zero and empty values.
Definition: app_config.h:37
int logging_
true if logs messages are allowed
Definition: app_config.h:22
int cache_max_time() const
Returns the maximum time for the cache files in seconds.
Definition: app_config.h:161
Contains the configuration parameters of the application.
Definition: app_config.h:18
int max_chunk_size() const
Returns the maximum chunk size.
Definition: app_config.h:120
int cache_max_time_
Maximum time for the cache files.
Definition: app_config.h:31
string address() const
Returns the listening address.
Definition: app_config.h:88
AppConfig cfg
Definition: esa_jpip_server.cc:38
string caching_folder_
Directory for the caching files.
Definition: app_config.h:26
string logging_folder_
Directory for the logging files.
Definition: app_config.h:27
bool log_requests() const
Returns true if the client requests are logged.
Definition: app_config.h:144
bool logging() const
Returns true if the logging messages are allowed.
Definition: app_config.h:136
int port() const
Returns the listening port.
Definition: app_config.h:80
string address_
Listening address.
Definition: app_config.h:24
int max_connections() const
Returns the maximum number of connections.
Definition: app_config.h:128
int com_time_out_
Connection time-out.
Definition: app_config.h:30
string images_folder_
Directory for the images.
Definition: app_config.h:25
int log_requests_
true if the client requests are logged
Definition: app_config.h:23
int port_
Listening port.
Definition: app_config.h:21
int max_connections_
Maximum number of connections.
Definition: app_config.h:29
ostream & operator<<(ostream &out, const Request &request)
Definition: request.cc:65
string logging_folder() const
Returns the folder used for the logging files.
Definition: app_config.h:112