OpenCPN Partial API docs
local_api.h File Reference

The local API has a server side handling commands and a client part issuing commands. More...

#include <wx/cmdline.h>
#include "observable_evtvar.h"

Go to the source code of this file.

Classes

class  LocalApiException
 
class  LocalServerApi
 Base interface for local server command handling. More...
 
class  LocalClientApi
 Base interface for local clients. More...
 

Typedefs

using LocalApiResult = std::pair< bool, std::string >
 

Enumerations

enum class  CmdlineAction {
  Raise , Quit , Open , GetRestEndpoint ,
  Fail , Skip
}
 

Detailed Description

The local API has a server side handling commands and a client part issuing commands.

The commands supported are:

  • Raise: Bring OpenCPN to top of the GUI stack.
  • Open <filename>: Open a GPX waypoint or route file.
  • Quit: Exit server application.
  • GetRestEndpoint: Returns an address/port tuple string like 128.0.0.1/1503 giving the adress/port used by the REST server.

Besides GetRestAddress all commands returns a std::pair with a boolean and a string. The boolean indicates successful completion, the string is either an error message or, for GetRestEndpoint, the address/port endpoint.

Definition in file local_api.h.