55 string d_rc_file_path;
59 unsigned int _dods_cache_max;
60 unsigned int _dods_cached_obj;
61 int _dods_ign_expires;
77 int _dods_default_expires;
78 int _dods_always_validate;
81 string d_dods_proxy_server_protocol;
82 string d_dods_proxy_server_host;
83 int d_dods_proxy_server_port;
84 string d_dods_proxy_server_userpw;
89 string _dods_proxy_server_host_url;
94 string _dods_proxy_for_regexp;
95 string _dods_proxy_for_proxy_host_url;
96 int _dods_proxy_for_regexp_flags;
99 bool d_dods_no_proxy_for;
100 string d_dods_no_proxy_for_protocol;
101 string d_dods_no_proxy_for_host;
102 int _dods_no_proxy_for_port;
106 string d_ais_database;
110 static RCReader *_instance;
116 bool write_rc_file(
const string &pathname);
117 bool read_rc_file(
const string &pathname);
120 string check_env_var(
const string &variable_name);
121 string check_string(
string env_var);
123 static void initialize_instance();
124 static void delete_instance();
126 friend class RCReaderTest;
127 friend class HTTPConnectTest;
130 static RCReader *instance();
132 static RCReader* instance(
const string &rc_file_path);
135 string get_dods_cache_root()
const throw() {
return d_cache_root; }
136 bool get_use_cache()
const throw() {
return _dods_use_cache; }
137 int get_max_cache_size()
const throw() {
return _dods_cache_max; }
138 unsigned int get_max_cached_obj()
const throw() {
return _dods_cached_obj; }
139 int get_ignore_expires()
const throw() {
return _dods_ign_expires; }
140 int get_default_expires()
const throw() {
return _dods_default_expires; }
141 int get_always_validate()
const throw() {
return _dods_always_validate; }
142 int get_validate_ssl()
const throw() {
return d_validate_ssl; }
144 bool get_deflate()
const throw() {
return _dods_deflate; }
156 return (d_dods_proxy_server_userpw.empty() ?
"" : d_dods_proxy_server_userpw +
"@") + d_dods_proxy_server_host +
157 ":" + long_to_string(d_dods_proxy_server_port);
181 bool is_no_proxy_for_used() throw() {
return d_dods_no_proxy_for; }
182 string get_no_proxy_for_protocol()
const throw() {
return d_dods_no_proxy_for_protocol; }
183 string get_no_proxy_for_host()
const throw() {
return d_dods_no_proxy_for_host; }
188 string get_ais_database()
const throw() {
return d_ais_database; }
190 string get_cookie_jar()
const throw() {
return d_cookie_jar; }
193 void set_use_cache(
bool b)
throw() { _dods_use_cache = b; }
194 void set_max_cache_size(
int i)
throw() { _dods_cache_max = i; }
195 void set_max_cached_obj(
int i)
throw() { _dods_cached_obj = i; }
196 void set_ignore_expires(
int i)
throw() { _dods_ign_expires = i; }
197 void set_default_expires(
int i)
throw() { _dods_default_expires = i; }
198 void set_always_validate(
int i)
throw() { _dods_always_validate = i; }
199 void set_validate_ssl(
int i)
throw() { d_validate_ssl = i; }
201 void set_deflate(
bool b)
throw() { _dods_deflate = b; }
203 void set_proxy_server_protocol(
const string &s)
throw() { d_dods_proxy_server_protocol = s; }
204 void set_proxy_server_host(
const string &s)
throw() { d_dods_proxy_server_host = s; }
205 void set_proxy_server_port(
int l)
throw() { d_dods_proxy_server_port = l; }
206 void set_proxy_server_userpw(
const string &s)
throw() { d_dods_proxy_server_userpw = s; }
218 void set_no_proxy_for_protocol(
const string &s)
throw() { d_dods_no_proxy_for_protocol = s; }
219 void set_no_proxy_for_host(
const string &s)
throw() { d_dods_no_proxy_for_host = s; }
224 void set_ais_database(
const string &db)
throw() { d_ais_database = db; }