Hi All,


>From the primitive service project, we are currently develop the easy
wrapping API on top of the base layer API, which is targeting the smart
device such as Android and so on.

Concept is described on the wiki
<https://wiki.iotivity.org/resource_manipulation>
https://wiki.iotivity.org/resource_manipulation already and Here is the
list of the API.

Smart device Application developer may use the this Resource manipulation
API and base Layer API together.



Any question and feedback are welcome.



[Easy Wrapper Class for Resource Operation from Server and Client Side]


Class

API

Parameter

Return


ResourceObject::Builder 

Builder

const std::string& uri, const std::string& type, const std::string&
interface

0


setDiscoverable

bool

Builder&


setObservable

bool

Builder&


setAttributes

ResourceAttributes& 

 Builder&


build

void

std::shared_ptr<ResourceObject>


ResourceObject

startPresence

const unsigned int ttl

void 


setAttribute

std::string& key, const T &value

void


getAttribute

std::string& key,

template< typename T >


getAttributes

std::string& key,

ResourceAttributes& 


hasAttribute

std::string& key,

bool


setGetAttributesRequestHandler

GetAttributesRequestHandler (Function ptr)

void


setSetAttributesRequestHandler

SetAttributesRequestHandler  (Function ptr)

void


notify

void

void


addAttributeUpdatedHandler

const std::string& key,AttributeUpdatedHandler(Function ptr)

void


removeAddAttributeUpdatedHandler

const std::string& key

void



RemoteResourceObject

startWatching

ResourceStateChangedCallback

void


stopWatching

void

void


getState

void

ResourceState


?


startCaching

1.void
2.CacheCB cb

void


stopCaching

void

void


refreshCache

void

void


getCachedAttributes

void

ResourceAttributes


getResourceCacheState

void   

CACHE_STATE


getCachedAttribute

const std::string& key

templete T


getCachedAttributeValue

const std::string& key,  (Function ptr)

templete T


?


getRemoteAttributes

void

ResourceAttributes


getRemoteAttribute

const std::string& key

templete T


setRemoteAttribute

std::string& key, const T &value

void


setRemoteAttributes

ResourceAttributes &attribute

void



DiscoveryManager   

discoverResource

const std::string& host, const std::string& resourceURI,
                OCConnectivityType connectivityType, DiscoverCallback
callback

void


getInstance

void

DiscoveryManager   *



Common in

ResourceObject and RemoteResourceObject

getUri

void

string


getAddress

void

string


getTypes

void

vector< string >


getInterfaces

void

vector< string >










[Resource Server Plug-in Manager]


ResourceContainer

startContainer

string configFile

void


stopContainer

void

void


listBundles

void

list<BundleInfo*>


startBundle

string bundleId

void


stopBundle

string bundleId

void


addBundle

string bundleId, string bundleUri, string bundlePath, std::map<string,
string> params

void


removeBundle

string bundleId

void


addResourceConfig

string bundleId, string resourceUri, std::map<string, string> params

void


removeResourceConfig

string bundleId, string resourceUri

void


listBundleResources

string bundleId

list<string> 


getInstance

void

ResourceContainer *


BundleInfo

setID

string name

void


getID

void

string


setPath

string path

void


getPath

void

string


setVersion

string version

void


getVersion

void

string


build

void

BundleInfo*



BR, Uze Choi

-------------- next part --------------
HTML ?????? ??????????????...
URL: 
<http://lists.iotivity.org/pipermail/iotivity-dev/attachments/20150708/ae39e184/attachment.html>

Reply via email to