Class NavigatorInterface
Defined in File navigator_interface.hpp
Class Documentation
-
class NavigatorInterface
Public Functions
-
NavigatorInterface(const std::string &host, uint16_t port)
Constructs a new NavigatorInterface object.
- Parameters:
host – The hostname or IP address of the Navigator
port – The port number for the Navigator’s RPC service
-
virtual ~NavigatorInterface()
Destroys the NavigatorInterface object.
-
void login(const std::string &user, const std::string &password)
Logs into the Navigator API.
- Parameters:
user – The username for login
password – The password for login
-
void refresh()
Refreshes the current session with the Navigator API.
-
void logout()
Logs out from the Navigator API.
-
std::string getAboutBuildList()
Retrieves a string describing the Navigator’s build version.
- Returns:
A string containing build information
-
std::unordered_map<std::string, std::pair<int32_t, int32_t>> getAboutModules()
Retrieves version information for all Navigator modules.
- Returns:
A map where keys are module names and values are pairs of major/minor version numbers
-
Poco::DynamicStruct getConfigList()
Retrieves the current configuration of the Navigator.
- Returns:
A Poco::DynamicStruct containing the configuration entries
-
bool setConfigList(const Poco::DynamicStruct &config)
Sets the Navigator’s configuration.
- Parameters:
config – A Poco::DynamicStruct containing the configuration entries to set
- Returns:
True if the configuration was set successfully, false otherwise
-
Poco::JSON::Object getSessionQuery() const
Retrieves a JSON object representing the current session query.
- Returns:
A Poco::JSON::Object with session query details
-
Poco::JSON::Object call(const std::string &method, const Poco::JSON::Object &query_obj)
Calls a generic RPC method on the Navigator.
- Parameters:
method – The name of the RPC method to call
query_obj – A Poco::JSON::Object containing the parameters for the method call
- Returns:
A Poco::JSON::Object containing the response from the RPC call
Protected Functions
-
Poco::JSON::Object json_rpc_call(Poco::Net::HTTPClientSession &session, const std::string &method, const Poco::JSON::Object &query_obj)
Performs a generic JSON-RPC call using an HTTP client session.
- Parameters:
session – The HTTPClientSession to use for the call
method – The name of the RPC method to call
query_obj – A Poco::JSON::Object containing the parameters for the method call
- Returns:
A Poco::JSON::Object containing the response from the RPC call
-
NavigatorInterface(const std::string &host, uint16_t port)