Mercurial > hg > orthanc
comparison Core/HttpClient.h @ 1987:ce90d109bb64
new plugin functions: OrthancPluginHttpClient and OrthancPluginGenerateUuid
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Tue, 26 Apr 2016 17:40:55 +0200 |
parents | 99b249867052 |
children | 9c9332e486ca |
comparison
equal
deleted
inserted
replaced
1986:99b249867052 | 1987:ce90d109bb64 |
---|---|
41 namespace Orthanc | 41 namespace Orthanc |
42 { | 42 { |
43 class HttpClient | 43 class HttpClient |
44 { | 44 { |
45 private: | 45 private: |
46 class GlobalParameters; | |
47 | |
46 struct PImpl; | 48 struct PImpl; |
47 boost::shared_ptr<PImpl> pimpl_; | 49 boost::shared_ptr<PImpl> pimpl_; |
48 | 50 |
49 std::string url_; | 51 std::string url_; |
50 std::string credentials_; | 52 std::string credentials_; |
57 bool verifyPeers_; | 59 bool verifyPeers_; |
58 std::string caCertificates_; | 60 std::string caCertificates_; |
59 | 61 |
60 void Setup(); | 62 void Setup(); |
61 | 63 |
62 void operator= (const HttpClient&); // Forbidden | 64 void operator= (const HttpClient&); // Assignment forbidden |
65 HttpClient(const HttpClient& base); // Copy forbidden | |
63 | 66 |
64 public: | 67 public: |
65 HttpClient(const HttpClient& base); | |
66 | |
67 HttpClient(); | 68 HttpClient(); |
68 | 69 |
69 ~HttpClient(); | 70 ~HttpClient(); |
70 | 71 |
71 void SetUrl(const char* url) | 72 void SetUrl(const char* url) |
160 void SetHttpsCACertificates(const std::string& certificates) | 161 void SetHttpsCACertificates(const std::string& certificates) |
161 { | 162 { |
162 caCertificates_ = certificates; | 163 caCertificates_ = certificates; |
163 } | 164 } |
164 | 165 |
165 const std::string& GetHttpsCACertificates() const; | 166 const std::string& GetHttpsCACertificates() const |
167 { | |
168 return caCertificates_; | |
169 } | |
166 | 170 |
167 static void GlobalInitialize(bool httpsVerifyPeers, | 171 static void GlobalInitialize(); |
168 const std::string& httpsCACertificates); | |
169 | 172 |
170 static void GlobalFinalize(); | 173 static void GlobalFinalize(); |
174 | |
175 static void ConfigureSsl(bool httpsVerifyPeers, | |
176 const std::string& httpsCACertificates); | |
177 | |
178 static void SetDefaultProxy(const std::string& proxy); | |
171 | 179 |
172 static void SetDefaultTimeout(long timeout); | 180 static void SetDefaultTimeout(long timeout); |
173 | 181 |
174 void ApplyAndThrowException(std::string& answer); | 182 void ApplyAndThrowException(std::string& answer); |
175 | 183 |