Caffa
1.1.0
C++ Application Framework for Embedded Systems with introspection
|
Public Member Functions | |
RestClient (caffa::Session::Type sessionType, const std::string &hostname, int port=50000, const std::string &username="", const std::string &password="") | |
caffa::AppInfo | appInfo () const override |
Retrieve Application information. | |
std::shared_ptr< caffa::ObjectHandle > | document (const std::string &documentId) const override |
Retrieve a top level document (project) | |
std::vector< std::shared_ptr< caffa::ObjectHandle > > | documents () const |
Retrieve all top level documents. | |
std::string | execute (caffa::not_null< const caffa::ObjectHandle * > selfObject, const std::string &methodName, const std::string &jsonArguments) const override |
Execute a general non-streaming method. | |
bool | stopServer () override |
Tell the server to stop operation. Returns a simple boolean status where true is ok. | |
void | sendKeepAlive () override |
caffa::Session::Type | checkSession () const override |
Check the session. Will return a session type (including possibly INVALID) if the session exists. And throw an exception if it does not. More... | |
void | changeSession (caffa::Session::Type newType) override |
void | destroySession () override |
const std::string & | sessionUuid () const override |
void | startKeepAliveThread () override |
std::shared_ptr< caffa::ObjectHandle > | getShallowCopyOfChildObject (const caffa::ObjectHandle *objectHandle, const std::string &fieldName) const override |
std::shared_ptr< caffa::ObjectHandle > | getDeepCopyOfChildObject (const caffa::ObjectHandle *objectHandle, const std::string &fieldName) const override |
void | deepCopyChildObjectFrom (const caffa::ObjectHandle *objectHandle, const std::string &fieldName, const caffa::ObjectHandle *childObject) override |
std::vector< std::shared_ptr< caffa::ObjectHandle > > | getChildObjects (const caffa::ObjectHandle *objectHandle, const std::string &fieldName) const override |
void | setChildObject (const caffa::ObjectHandle *objectHandle, const std::string &fieldName, const caffa::ObjectHandle *childObject) override |
TODO: add support for index and replace. | |
void | removeChildObject (const caffa::ObjectHandle *objectHandle, const std::string &fieldName, size_t index) override |
void | clearChildObjects (const caffa::ObjectHandle *objectHandle, const std::string &fieldName) override |
void | insertChildObject (const caffa::ObjectHandle *objectHandle, const std::string &fieldName, size_t index, const caffa::ObjectHandle *childObject) override |
![]() | |
Client (const std::string &hostname, int port) | |
template<typename DataType > | |
void | set (const caffa::ObjectHandle *objectHandle, const std::string &fieldName, const DataType &value) |
Set a value through RPC. | |
template<typename DataType > | |
DataType | get (const caffa::ObjectHandle *objectHandle, const std::string &fieldName) const |
Get a value through RPC. | |
const std::string & | hostname () const |
int | port () const |
|
overridevirtual |
Check the session. Will return a session type (including possibly INVALID) if the session exists. And throw an exception if it does not.
Implements caffa::rpc::Client.