Mercurial > hg > orthanc
diff OrthancFramework/Sources/HttpServer/HttpServer.cpp @ 4298:db3932f9660d
abi continued
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Thu, 05 Nov 2020 18:21:03 +0100 |
parents | 90f91b78d708 |
children | 6919242d2265 |
line wrap: on
line diff
--- a/OrthancFramework/Sources/HttpServer/HttpServer.cpp Thu Nov 05 17:20:49 2020 +0100 +++ b/OrthancFramework/Sources/HttpServer/HttpServer.cpp Thu Nov 05 18:21:03 2020 +0100 @@ -1523,6 +1523,11 @@ port_ = port; } + uint16_t HttpServer::GetPortNumber() const + { + return port_; + } + void HttpServer::Start() { #if ORTHANC_ENABLE_MONGOOSE == 1 @@ -1699,6 +1704,11 @@ registeredUsers_.insert(encoded); } + bool HttpServer::IsAuthenticationEnabled() const + { + return authentication_; + } + void HttpServer::SetSslEnabled(bool enabled) { Stop(); @@ -1749,6 +1759,11 @@ #endif } + const std::string &HttpServer::GetSslCertificate() const + { + return certificate_; + } + void HttpServer::SetAuthenticationEnabled(bool enabled) { @@ -1756,30 +1771,55 @@ authentication_ = enabled; } + bool HttpServer::IsSslEnabled() const + { + return ssl_; + } + void HttpServer::SetSslCertificate(const char* path) { Stop(); certificate_ = path; } + bool HttpServer::IsRemoteAccessAllowed() const + { + return remoteAllowed_; + } + void HttpServer::SetSslTrustedClientCertificates(const char* path) { Stop(); trustedClientCertificates_ = path; } + bool HttpServer::IsKeepAliveEnabled() const + { + return keepAlive_; + } + void HttpServer::SetRemoteAccessAllowed(bool allowed) { Stop(); remoteAllowed_ = allowed; } + bool HttpServer::IsHttpCompressionEnabled() const + { + return httpCompression_;; + } + void HttpServer::SetHttpCompressionEnabled(bool enabled) { Stop(); httpCompression_ = enabled; CLOG(WARNING, HTTP) << "HTTP compression is " << (enabled ? "enabled" : "disabled"); } + + IIncomingHttpRequestFilter *HttpServer::GetIncomingHttpRequestFilter() const + { + return filter_; + } void HttpServer::SetIncomingHttpRequestFilter(IIncomingHttpRequestFilter& filter) { @@ -1794,6 +1834,21 @@ exceptionFormatter_ = &formatter; } + IHttpExceptionFormatter *HttpServer::GetExceptionFormatter() + { + return exceptionFormatter_; + } + + const std::string &HttpServer::GetRealm() const + { + return realm_; + } + + void HttpServer::SetRealm(const std::string &realm) + { + realm_ = realm; + } + bool HttpServer::IsValidBasicHttpAuthentication(const std::string& basic) const { @@ -1807,6 +1862,11 @@ handler_ = &handler; } + bool HttpServer::HasHandler() const + { + return handler_ != NULL; + } + IHttpHandler& HttpServer::GetHandler() const { @@ -1832,6 +1892,11 @@ CLOG(INFO, HTTP) << "The embedded HTTP server will use " << threads << " threads"; } + unsigned int HttpServer::GetThreadsCount() const + { + return threadsCount_; + } + void HttpServer::SetTcpNoDelay(bool tcpNoDelay) { @@ -1841,6 +1906,11 @@ << (tcpNoDelay ? "true" : "false"); } + bool HttpServer::IsTcpNoDelay() const + { + return tcpNoDelay_; + } + void HttpServer::SetRequestTimeout(unsigned int seconds) { @@ -1855,6 +1925,19 @@ CLOG(INFO, HTTP) << "Request timeout in the HTTP server is set to " << seconds << " seconds"; } + unsigned int HttpServer::GetRequestTimeout() const + { + return requestTimeout_; + } + + +#if ORTHANC_ENABLE_PUGIXML == 1 + HttpServer::WebDavBuckets& HttpServer::GetWebDavBuckets() + { + return webDavBuckets_; + } +#endif + #if ORTHANC_ENABLE_PUGIXML == 1 void HttpServer::Register(const std::vector<std::string>& root,