Mercurial > hg > orthanc
comparison OrthancFramework/Sources/HttpServer/HttpServer.h @ 4298:db3932f9660d
abi continued
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Thu, 05 Nov 2020 18:21:03 +0100 |
parents | c8c0bbaaace3 |
children | df313e410f0c |
comparison
equal
deleted
inserted
replaced
4297:785a2713323e | 4298:db3932f9660d |
---|---|
118 | 118 |
119 ~HttpServer(); | 119 ~HttpServer(); |
120 | 120 |
121 void SetPortNumber(uint16_t port); | 121 void SetPortNumber(uint16_t port); |
122 | 122 |
123 uint16_t GetPortNumber() const | 123 uint16_t GetPortNumber() const; |
124 { | |
125 return port_; | |
126 } | |
127 | 124 |
128 void Start(); | 125 void Start(); |
129 | 126 |
130 void Stop(); | 127 void Stop(); |
131 | 128 |
132 void ClearUsers(); | 129 void ClearUsers(); |
133 | 130 |
134 void RegisterUser(const char* username, | 131 void RegisterUser(const char* username, |
135 const char* password); | 132 const char* password); |
136 | 133 |
137 bool IsAuthenticationEnabled() const | 134 bool IsAuthenticationEnabled() const; |
138 { | |
139 return authentication_; | |
140 } | |
141 | 135 |
142 void SetAuthenticationEnabled(bool enabled); | 136 void SetAuthenticationEnabled(bool enabled); |
143 | 137 |
144 bool IsSslEnabled() const | 138 bool IsSslEnabled() const; |
145 { | |
146 return ssl_; | |
147 } | |
148 | 139 |
149 void SetSslEnabled(bool enabled); | 140 void SetSslEnabled(bool enabled); |
150 | 141 |
151 void SetSslVerifyPeers(bool enabled); | 142 void SetSslVerifyPeers(bool enabled); |
152 | 143 |
153 void SetSslTrustedClientCertificates(const char* path); | 144 void SetSslTrustedClientCertificates(const char* path); |
154 | 145 |
155 bool IsKeepAliveEnabled() const | 146 bool IsKeepAliveEnabled() const; |
156 { | |
157 return keepAlive_; | |
158 } | |
159 | 147 |
160 void SetKeepAliveEnabled(bool enabled); | 148 void SetKeepAliveEnabled(bool enabled); |
161 | 149 |
162 const std::string& GetSslCertificate() const | 150 const std::string& GetSslCertificate() const; |
163 { | |
164 return certificate_; | |
165 } | |
166 | 151 |
167 void SetSslCertificate(const char* path); | 152 void SetSslCertificate(const char* path); |
168 | 153 |
169 bool IsRemoteAccessAllowed() const | 154 bool IsRemoteAccessAllowed() const; |
170 { | |
171 return remoteAllowed_; | |
172 } | |
173 | 155 |
174 void SetRemoteAccessAllowed(bool allowed); | 156 void SetRemoteAccessAllowed(bool allowed); |
175 | 157 |
176 bool IsHttpCompressionEnabled() const | 158 bool IsHttpCompressionEnabled() const; |
177 { | |
178 return httpCompression_;; | |
179 } | |
180 | 159 |
181 void SetHttpCompressionEnabled(bool enabled); | 160 void SetHttpCompressionEnabled(bool enabled); |
182 | 161 |
183 IIncomingHttpRequestFilter* GetIncomingHttpRequestFilter() const | 162 IIncomingHttpRequestFilter* GetIncomingHttpRequestFilter() const; |
184 { | |
185 return filter_; | |
186 } | |
187 | 163 |
188 void SetIncomingHttpRequestFilter(IIncomingHttpRequestFilter& filter); | 164 void SetIncomingHttpRequestFilter(IIncomingHttpRequestFilter& filter); |
189 | 165 |
190 ChunkStore& GetChunkStore(); | 166 ChunkStore& GetChunkStore(); |
191 | 167 |
192 bool IsValidBasicHttpAuthentication(const std::string& basic) const; | 168 bool IsValidBasicHttpAuthentication(const std::string& basic) const; |
193 | 169 |
194 void Register(IHttpHandler& handler); | 170 void Register(IHttpHandler& handler); |
195 | 171 |
196 bool HasHandler() const | 172 bool HasHandler() const; |
197 { | |
198 return handler_ != NULL; | |
199 } | |
200 | 173 |
201 IHttpHandler& GetHandler() const; | 174 IHttpHandler& GetHandler() const; |
202 | 175 |
203 void SetHttpExceptionFormatter(IHttpExceptionFormatter& formatter); | 176 void SetHttpExceptionFormatter(IHttpExceptionFormatter& formatter); |
204 | 177 |
205 IHttpExceptionFormatter* GetExceptionFormatter() | 178 IHttpExceptionFormatter* GetExceptionFormatter(); |
206 { | 179 |
207 return exceptionFormatter_; | 180 const std::string& GetRealm() const; |
208 } | 181 |
209 | 182 void SetRealm(const std::string& realm); |
210 const std::string& GetRealm() const | |
211 { | |
212 return realm_; | |
213 } | |
214 | |
215 void SetRealm(const std::string& realm) | |
216 { | |
217 realm_ = realm; | |
218 } | |
219 | 183 |
220 void SetThreadsCount(unsigned int threads); | 184 void SetThreadsCount(unsigned int threads); |
221 | 185 |
222 unsigned int GetThreadsCount() const | 186 unsigned int GetThreadsCount() const; |
223 { | |
224 return threadsCount_; | |
225 } | |
226 | 187 |
227 // New in Orthanc 1.5.2, not available for Mongoose | 188 // New in Orthanc 1.5.2, not available for Mongoose |
228 void SetTcpNoDelay(bool tcpNoDelay); | 189 void SetTcpNoDelay(bool tcpNoDelay); |
229 | 190 |
230 bool IsTcpNoDelay() const | 191 bool IsTcpNoDelay() const; |
231 { | |
232 return tcpNoDelay_; | |
233 } | |
234 | 192 |
235 void SetRequestTimeout(unsigned int seconds); | 193 void SetRequestTimeout(unsigned int seconds); |
236 | 194 |
237 unsigned int GetRequestTimeout() const | 195 unsigned int GetRequestTimeout() const; |
238 { | 196 |
239 return requestTimeout_; | 197 #if ORTHANC_ENABLE_PUGIXML == 1 |
240 } | 198 WebDavBuckets& GetWebDavBuckets(); |
241 | |
242 #if ORTHANC_ENABLE_PUGIXML == 1 | |
243 WebDavBuckets& GetWebDavBuckets() | |
244 { | |
245 return webDavBuckets_; | |
246 } | |
247 #endif | 199 #endif |
248 | 200 |
249 #if ORTHANC_ENABLE_PUGIXML == 1 | 201 #if ORTHANC_ENABLE_PUGIXML == 1 |
250 void Register(const std::vector<std::string>& root, | 202 void Register(const std::vector<std::string>& root, |
251 IWebDavBucket* bucket); // Takes ownership | 203 IWebDavBucket* bucket); // Takes ownership |