15 #ifndef PKG_RPC_OBJECTSERVER_REGISTRY_H_INCLUDED
16 #define PKG_RPC_OBJECTSERVER_REGISTRY_H_INCLUDED
49 typedef std::pair<a_util::concurrency::shared_mutex*, IRPCObject*> tRPCRawItem;
87 operator bool()
const;
99 typedef std::map<std::string, tRPCItem> tRPCObjects;
100 tRPCObjects m_oRPCObjects;
A shared_mutex class as a workaround for std::shared_timed_mutex.
A common result class usable as return value throughout.
Interface of an object that support remote calls.
Interface for an RPC server that handles multiple RPC objects.
Implements thread safe access to the rpc::IRPCObject object.
cLockedRPCObject(const tRPCItem &oItem)
Construct with an tRPCItem and lock the shared mutex.
~cLockedRPCObject()
DTOR, unlocking any shared lock if previously locked.
cLockedRPCObject(cLockedRPCObject &&)=default
Default move construction.
cLockedRPCObject & operator=(cLockedRPCObject &&)=default
Default move assignment.
IRPCObject * operator->()
Pointer like access to rpc object protected by *this via a shared lock.
cLockedRPCObject()=default
Default CTOR.
cLockedRPCObject & operator=(const cLockedRPCObject &other)
Copy assignment from other.
cLockedRPCObject(const cLockedRPCObject &other)
Create a copy from other and add lock to the shared mutex.
An RPC Server that receives calls via HTTP.
std::pair< std::unique_ptr< a_util::concurrency::shared_mutex >, IRPCObject * > tRPCItem
Type granting thread safe access to an object of type rpc::IRPCObject.
virtual a_util::result::Result UnregisterRPCObject(const char *strName)
Unregisters an RPC object.
virtual a_util::result::Result RegisterRPCObject(const char *strName, IRPCObject *pObject)
Register an RPC object.
virtual cLockedRPCObject GetRPCObject(const char *strName) const
Get thread safe rpc object access by the rpc objects name.
Common include for Result functionality.
RPC Protocol declaration.
Public API for shared_mutex type.