aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Boberg <[email protected]>2021-09-09 14:03:07 +0200
committerStefan Boberg <[email protected]>2021-09-09 14:03:07 +0200
commitbf35035fc235d4a404b0829bd5b3045a0bde450f (patch)
treef8c07ce1fd1ed577b3f71f8dcb9ecbaf8090f9db
parentMade HttpServer an abstract interface, and moved remaining implementation spe... (diff)
downloadzen-bf35035fc235d4a404b0829bd5b3045a0bde450f.tar.xz
zen-bf35035fc235d4a404b0829bd5b3045a0bde450f.zip
HttpServer::AddEndpoint -> HttpServer::RegisterService
-rw-r--r--zencore/httpsys.cpp6
-rw-r--r--zencore/httpsys.h4
-rw-r--r--zencore/include/zencore/httpserver.h8
-rw-r--r--zenserver/zenserver.cpp18
4 files changed, 18 insertions, 18 deletions
diff --git a/zencore/httpsys.cpp b/zencore/httpsys.cpp
index 0fc0c0ef6..da07a13dd 100644
--- a/zencore/httpsys.cpp
+++ b/zencore/httpsys.cpp
@@ -784,7 +784,7 @@ HttpSysServer::IssueNewRequestMaybe()
}
void
-HttpSysServer::AddEndpoint(const char* UrlPath, HttpService& Service)
+HttpSysServer::RegisterService(const char* UrlPath, HttpService& Service)
{
if (UrlPath[0] == '/')
{
@@ -1240,9 +1240,9 @@ HttpSysServer::RequestExit()
m_ShutdownEvent.Set();
}
void
-HttpSysServer::AddEndpoint(HttpService& Service)
+HttpSysServer::RegisterService(HttpService& Service)
{
- AddEndpoint(Service.BaseUri(), Service);
+ RegisterService(Service.BaseUri(), Service);
}
#endif // ZEN_PLATFORM_WINDOWS
diff --git a/zencore/httpsys.h b/zencore/httpsys.h
index 7c0543e45..fbe293a47 100644
--- a/zencore/httpsys.h
+++ b/zencore/httpsys.h
@@ -29,7 +29,7 @@ public:
virtual void Initialize(int BasePort) override;
virtual void Run(bool TestMode) override;
virtual void RequestExit() override;
- virtual void AddEndpoint(HttpService& Service) override;
+ virtual void RegisterService(HttpService& Service) override;
private:
void Initialize(const wchar_t* UrlPath);
@@ -40,7 +40,7 @@ private:
inline bool IsOk() const { return m_IsOk; }
- void AddEndpoint(const char* Endpoint, HttpService& Service);
+ void RegisterService(const char* Endpoint, HttpService& Service);
void RemoveEndpoint(const char* Endpoint, HttpService& Service);
private:
diff --git a/zencore/include/zencore/httpserver.h b/zencore/include/zencore/httpserver.h
index 4a8cef262..593ff7344 100644
--- a/zencore/include/zencore/httpserver.h
+++ b/zencore/include/zencore/httpserver.h
@@ -303,10 +303,10 @@ private:
class HttpServer : public RefCounted
{
public:
- virtual void AddEndpoint(HttpService& Service) = 0;
- virtual void Initialize(int BasePort) = 0;
- virtual void Run(bool TestMode) = 0;
- virtual void RequestExit() = 0;
+ virtual void RegisterService(HttpService& Service) = 0;
+ virtual void Initialize(int BasePort) = 0;
+ virtual void Run(bool TestMode) = 0;
+ virtual void RequestExit() = 0;
};
Ref<HttpServer> CreateHttpServer();
diff --git a/zenserver/zenserver.cpp b/zenserver/zenserver.cpp
index db14e2c05..1c9f1fab9 100644
--- a/zenserver/zenserver.cpp
+++ b/zenserver/zenserver.cpp
@@ -229,36 +229,36 @@ public:
m_Http = zen::CreateHttpServer();
m_Http->Initialize(BasePort);
- m_Http->AddEndpoint(m_HealthService);
+ m_Http->RegisterService(m_HealthService);
if (m_TestMode)
{
- m_Http->AddEndpoint(m_TestService);
- m_Http->AddEndpoint(m_TestingService);
+ m_Http->RegisterService(m_TestService);
+ m_Http->RegisterService(m_TestingService);
}
- m_Http->AddEndpoint(m_AdminService);
+ m_Http->RegisterService(m_AdminService);
if (m_HttpProjectService)
{
- m_Http->AddEndpoint(*m_HttpProjectService);
+ m_Http->RegisterService(*m_HttpProjectService);
}
- m_Http->AddEndpoint(m_CasService);
+ m_Http->RegisterService(m_CasService);
if (m_StructuredCacheService)
{
- m_Http->AddEndpoint(*m_StructuredCacheService);
+ m_Http->RegisterService(*m_StructuredCacheService);
}
if (m_HttpLaunchService)
{
- m_Http->AddEndpoint(*m_HttpLaunchService);
+ m_Http->RegisterService(*m_HttpLaunchService);
}
if (m_HttpFunctionService)
{
- m_Http->AddEndpoint(*m_HttpFunctionService);
+ m_Http->RegisterService(*m_HttpFunctionService);
}
}