OpenCPN Partial API docs
Loading...
Searching...
No Matches
LocalServerApi Class Reference

Base interface for local server command handling. More...

#include <local_api.h>

Inheritance diagram for LocalServerApi:
DbusServer DummyIpcServer IpcServer

Public Member Functions

virtual void SetGetRestApiEndpointCb (std::function< std::string()> cb)
 Set callback returning the rest server root endpoint.
 

Static Public Member Functions

static LocalServerApiGetInstance ()
 
static void ReleaseInstance ()
 Release Instance.
 

Public Attributes

EventVar on_raise
 Notified on the Raise command.
 
EventVar on_quit
 Notified on the Quit command.
 
std::function< bool(const std::string &)> open_file_cb
 Callback invoked on open command with a file path argument.
 
std::function< std::string()> get_rest_api_endpoint_cb
 

Detailed Description

Base interface for local server command handling.

Definition at line 61 of file local_api.h.

Constructor & Destructor Documentation

◆ LocalServerApi()

LocalServerApi::LocalServerApi ( )
inlineprotected

Definition at line 86 of file local_api.h.

Member Function Documentation

◆ GetInstance()

LocalServerApi & LocalServerApi::GetInstance ( )
static
Returns
Reference to a LocalServerApi implementation.

Definition at line 90 of file ipc_factories.cpp.

◆ ReleaseInstance()

void LocalServerApi::ReleaseInstance ( )
static

Release Instance.

Definition at line 94 of file ipc_factories.cpp.

◆ SetGetRestApiEndpointCb()

virtual void LocalServerApi::SetGetRestApiEndpointCb ( std::function< std::string()>  cb)
inlinevirtual

Set callback returning the rest server root endpoint.

Definition at line 79 of file local_api.h.

Member Data Documentation

◆ get_rest_api_endpoint_cb

std::function<std::string()> LocalServerApi::get_rest_api_endpoint_cb

Definition at line 83 of file local_api.h.

◆ on_quit

EventVar LocalServerApi::on_quit

Notified on the Quit command.

Definition at line 73 of file local_api.h.

◆ on_raise

EventVar LocalServerApi::on_raise

Notified on the Raise command.

Definition at line 70 of file local_api.h.

◆ open_file_cb

std::function<bool(const std::string&)> LocalServerApi::open_file_cb

Callback invoked on open command with a file path argument.

Definition at line 76 of file local_api.h.


The documentation for this class was generated from the following files: