OpenCPN Partial API docs
Loading...
Searching...
No Matches
rest_server.h File Reference

REST API server. More...

#include <atomic>
#include <condition_variable>
#include <fstream>
#include <functional>
#include <string>
#include <thread>
#include <unordered_map>
#include <wx/event.h>
#include <wx/string.h>
#include <wx/thread.h>
#include "observable_evtvar.h"
#include "std_filesystem.h"
#include "pugixml.hpp"
#include "pincode.h"
#include "route.h"
#include "track.h"

Go to the source code of this file.

Classes

struct  AcceptObjectDlgResult
 Returned status from RunAcceptObjectDlg. More...
 
class  RestServerDlgCtx
 Callbacks for handling dialogs and RouteManager updates. More...
 
class  RouteCtx
 Callbacks for handling routes and tracks. More...
 
class  AbstractRestServer
 Opencpn REST API. More...
 
class  RestServer
 AbstractRestServer implementation and interface to underlying IO thread. More...
 

Enumerations

enum class  RestServerResult {
  NoError = 0 , GenericError = 1 , ObjectRejected = 2 , DuplicateRejected = 3 ,
  RouteInsertError = 4 , NewPinRequested = 5 , ObjectParseError = 6 , Void = 100
}
 Return codes from HandleServerMessage and eventually in the http response. More...
 
enum  { ID_STG_CANCEL = 10000 , ID_STG_OK , ID_STG_CHECK1 , ID_STG_CHOICE_COMM }
 Dialog return codes. More...
 

Functions

std::string RestResultText (RestServerResult result)
 RestServerResult string representation.
 

Detailed Description

REST API server.

Definition in file rest_server.h.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum

Dialog return codes.

Definition at line 66 of file rest_server.h.

◆ RestServerResult

enum class RestServerResult
strong

Return codes from HandleServerMessage and eventually in the http response.

Since they are transported as integers on the wire they cannot really be changed without breaking compatibility with older servers. Adding new types should be fine.

Definition at line 54 of file rest_server.h.

Function Documentation

◆ RestResultText()

std::string RestResultText ( RestServerResult  result)

RestServerResult string representation.

Definition at line 363 of file rest_server.cpp.