21#if !defined(ms_connection_settings_INCLUDED_)
22#define ms_connection_settings_INCLUDED_
29namespace matrix_science {
30 class ms_mascotoptions;
63 PROXY_TYPE_NO_PROXY = 0x0000,
64 PROXY_TYPE_FROM_REGISTRY = 0x0001,
65 PROXY_TYPE_SPECIFY = 0x0002,
66 PROXY_TYPE_WPAD = 0x0003,
67 PROXY_TYPE_ENVIRONMENT = 0x0004,
68 PROXY_TYPE_AUTO = 0x0005
79 HTTP_SYSTEM_DEFAULT = 0x0002
88 REDIRECT_POLICY_ALWAYS = 0x0000,
89 REDIRECT_POLICY_DISALLOW_HTTPS_TO_HTTP = 0x0001,
90 REDIRECT_POLICY_NEVER = 0x0002
98 const std::string proxyServer,
99 const std::string proxyUserName,
100 const std::string proxyUserPassword);
106 void defaultValues();
116 void setSessionID(
const std::string sessionID);
131 void setProxyServer(
const std::string proxyServer);
134 void setProxyUsername(
const std::string proxyUserName);
137 void setProxyPassword(
const std::string proxyUserPassword);
140 void setUserAgent(
const std::string userAgent);
143 void setUseHTTPProxyForFTP(
bool value);
146 void setUseHTTPProxyForHTTPS(
bool value);
149 std::string getSessionID()
const;
152 std::string getProxyServer()
const;
155 std::string getProxyUsername()
const;
158 std::string getProxyPassword()
const;
161 std::string getProxyUserAndPassword()
const;
164 std::string getUserAgent()
const;
167 bool isUseHTTPProxyForFTP()
const;
170 bool isUseHTTPProxyForHTTPS()
const;
173 void setConnectionTimeout(
int timeout);
176 int getConnectionTimeout()
const;
179 void setHttpUsername(
const std::string httpUsername);
182 std::string getHttpUsername()
const;
185 void setHttpPassword(
const std::string httpPassword);
188 std::string getHttpPassword()
const;
200 static int proxyTypeStringToEnum(std::string str);
203 static std::string proxyTypeToString(
int type);
206 std::string sessionID_;
207 std::string proxyServer_;
208 std::string proxyUserName_;
209 std::string proxyUserPassword_;
210 bool useHTTPProxyForFTP_;
211 bool useHTTPProxyForHTTPS_;
212 std::string userAgent_;
213 PROXY_TYPE proxyType_;
214 HTTP_PROTOCOL httpProtocol_;
215 int connectionTimeout_;
216 std::string httpUsername_;
217 std::string httpPassword_;
218 REDIRECT_POLICY redirectPolicy_;
220 struct proxy_type_strings_t {
222 const char *pretty_str;
226 static const struct proxy_type_strings_t proxy_type_strings[];
Settings required to make an HTTP connection to a Mascot server.
Definition: ms_connection_settings.hpp:54
REDIRECT_POLICY
Definition: ms_connection_settings.hpp:87
HTTP_PROTOCOL
Definition: ms_connection_settings.hpp:76
PROXY_TYPE
Definitions for types of setting.
Definition: ms_connection_settings.hpp:62
An instance of this class represents all the parameters specified in the Options section of mascot....
Definition: ms_mascotoptions.hpp:91