|
OpenCPN Partial API docs
|
AbstractRestServer implementation and interface to underlying IO thread. More...
#include <rest_server.h>
Public Member Functions | |
| RestServer (RestServerDlgCtx ctx, RouteCtx route_ctx, bool &portable) | |
| bool | StartServer (const fs::path &certificate_location) override |
| Start the server thread. | |
| void | StopServer () override |
| Stop server thread, blocks until completed. | |
| std::string | GetEndpoint () override |
| Return HTTPS url to local rest server. | |
| void | UpdateReturnStatus (RestServerResult r) |
| IoThread interface. | |
| RestServerResult | GetReturnStatus () |
| IoThread interface. | |
| void | UpdateRouteMgr () const |
| IoThread interface. | |
Public Attributes | |
| std::string | m_cert_file |
| Semi-static storage used by IoThread C code. | |
| std::string | m_key_file |
| Semi-static storage used by IoThread C code. | |
| std::string | m_reply_body |
| IoThread interface: body of return message, if any. | |
| std::mutex | ret_mutex |
| IoThread interface: Guards return_status. | |
| std::condition_variable | return_status_cv |
| IoThread interface: Guards return_status. | |
| wxSemaphore | m_exit_sem |
| IoThread interface: Binary exit synchronization, released when io thread exits. | |
| const std::string | m_endpoint |
Public Attributes inherited from AbstractRestServer | |
| EventVar | activate_route |
| Notified with a string GUID when user wants to activate a route. | |
| EventVar | reverse_route |
| Notified with a string GUID when user wants to reverse a route. | |
Friends | |
| class | RestServerObjectApp |
| Unit test hook. | |
| class | RestCheckWriteApp |
| Unit test hook. | |
| class | RestServerPingApp |
| Unit test hook. | |
| class | RestPluginMsgApp |
| Unit test hook. | |
AbstractRestServer implementation and interface to underlying IO thread.
Definition at line 240 of file rest_server.h.
| RestServer::RestServer | ( | RestServerDlgCtx | ctx, |
| RouteCtx | route_ctx, | ||
| bool & | portable ) |
Definition at line 445 of file rest_server.cpp.
|
override |
Definition at line 459 of file rest_server.cpp.
|
inlineoverridevirtual |
Return HTTPS url to local rest server.
Implements AbstractRestServer.
Definition at line 255 of file rest_server.h.
|
inline |
IoThread interface.
Definition at line 261 of file rest_server.h.
|
overridevirtual |
Start the server thread.
Implements AbstractRestServer.
Definition at line 461 of file rest_server.cpp.
|
overridevirtual |
Stop server thread, blocks until completed.
Implements AbstractRestServer.
Definition at line 474 of file rest_server.cpp.
| void RestServer::UpdateReturnStatus | ( | RestServerResult | r | ) |
IoThread interface.
Definition at line 437 of file rest_server.cpp.
|
inline |
IoThread interface.
Definition at line 264 of file rest_server.h.
|
friend |
Unit test hook.
Definition at line 242 of file rest_server.h.
|
friend |
Unit test hook.
Definition at line 244 of file rest_server.h.
|
friend |
Unit test hook.
Definition at line 241 of file rest_server.h.
|
friend |
Unit test hook.
Definition at line 243 of file rest_server.h.
| std::string RestServer::m_cert_file |
Semi-static storage used by IoThread C code.
Definition at line 267 of file rest_server.h.
| const std::string RestServer::m_endpoint |
Definition at line 287 of file rest_server.h.
| wxSemaphore RestServer::m_exit_sem |
IoThread interface: Binary exit synchronization, released when io thread exits.
std::semaphore is C++20, hence wxSemaphore.
Definition at line 285 of file rest_server.h.
| std::string RestServer::m_key_file |
Semi-static storage used by IoThread C code.
Definition at line 270 of file rest_server.h.
| std::string RestServer::m_reply_body |
IoThread interface: body of return message, if any.
Definition at line 273 of file rest_server.h.
| std::mutex RestServer::ret_mutex |
IoThread interface: Guards return_status.
Definition at line 276 of file rest_server.h.
| std::condition_variable RestServer::return_status_cv |
IoThread interface: Guards return_status.
Definition at line 279 of file rest_server.h.