Resource Encapsulation consists of several components as follows for resource server/client operations.
* Resource Server Server side APIs provide the functions of Resource Container and Server Builder.
Class | API | Parameter | Return |
---|---|---|---|
ResourceObject::Builder | Builder | const std::string& uri, const std::string& type, const std::string& interface | Builder& |
setDiscoverable | bool | Builder& | |
setObservable | bool | Builder& | |
setAttribtues | ResourceAttributes&, ResourceAttributes&& | Builder& | |
create | void | std::shared_ptr | |
ResourceObject | setAttribute | std:string& key, const T &value | void |
getAttribute | std::string& key | template <typename T> | |
notify | void | void | |
setSetAttributeRequestListener | const std::string& key, SetAttributeRequestListener (Function ptr) | void | |
removeSetSetAttributeRequestListener | const std::string& key |
* Resource Client Resource Client API covers the functions of Resource Broker and Resource Cache sub-modules.
Class | API | Parameter | Return |
---|---|---|---|
DiscoveryManager | discoverResource | const std::string& host, const std::string& resourceURI | void |
RemoteResourceObject | startWatching | ResourceStateChangedCallback | void |
stopWatching | void | void | |
startCaching | void | void | |
stopCaching | void | void | |
getChchedAttributeValue | const std::string& key | template T | |
getAttributeValue | const std::string& key, (Function ptr) | void | |
setAttributeValue | const std::string& key, (Function ptr) | void | |
getUri | void | string | |
getAddress | void | string | |
getTypes | void | vector <string> | |
getInterfaces | void | vector <string> |