}
OCStackResult notifyAllObservers(OCResourceHandle resourceHandle,
- QualityOfService QoS)
+ QualityOfService QoS)
{
return OCPlatform_impl::Instance().notifyAllObservers(resourceHandle, QoS);
}
}
OCStackResult notifyListOfObservers(OCResourceHandle resourceHandle,
- ObservationIds& observationIds,
- const std::shared_ptr<OCResourceResponse> pResponse)
+ ObservationIds& observationIds,
+ const std::shared_ptr<OCResourceResponse> pResponse)
{
return OCPlatform_impl::Instance().notifyListOfObservers(resourceHandle,
- observationIds, pResponse);
+ observationIds, pResponse);
}
OCStackResult notifyListOfObservers(OCResourceHandle resourceHandle,
- ObservationIds& observationIds,
- const std::shared_ptr<OCResourceResponse> pResponse,
- QualityOfService QoS)
+ ObservationIds& observationIds,
+ const std::shared_ptr<OCResourceResponse> pResponse,
+ QualityOfService QoS)
{
return OCPlatform_impl::Instance().notifyListOfObservers(resourceHandle,
- observationIds, pResponse, QoS);
+ observationIds, pResponse, QoS);
}
OCResource::Ptr constructResourceObject(const std::string& host,
- const std::string& uri,
- bool isObservable,
- const std::vector<std::string>& resourceTypes,
- const std::vector<std::string>& interfaces)
+ const std::string& uri,
+ OCConnectivityType connectivityType,
+ bool isObservable,
+ const std::vector<std::string>& resourceTypes,
+ const std::vector<std::string>& interfaces)
{
- return OCPlatform_impl::Instance().constructResourceObject(host, uri, isObservable,
- resourceTypes, interfaces);
+ return OCPlatform_impl::Instance().constructResourceObject(host,
+ uri, connectivityType,
+ isObservable,
+ resourceTypes, interfaces);
}
OCStackResult findResource(const std::string& host,
- const std::string& resourceName,
- FindCallback resourceHandler)
+ const std::string& resourceName,
+ OCConnectivityType connectivityType,
+ FindCallback resourceHandler)
{
- return OCPlatform_impl::Instance().findResource(host, resourceName, resourceHandler);
+ return OCPlatform_impl::Instance().findResource(host, resourceName,
+ connectivityType, resourceHandler);
+ }
+
+ OCStackResult findResource(const std::string& host,
+ const std::string& resourceName,
+ OCConnectivityType connectivityType,
+ FindCallback resourceHandler,
+ QualityOfService QoS)
+ {
+ return OCPlatform_impl::Instance().findResource(host, resourceName,
+ connectivityType, resourceHandler, QoS);
+ }
+
+ OCStackResult findResource(const std::string& host,
+ const std::string& resourceName,
+ OCConnectivityType connectivityType,
+ FindCallback resourceHandler,
+ FindErrorCallback errorHandler)
+ {
+ return OCPlatform_impl::Instance().findResource(host, resourceName,
+ connectivityType, resourceHandler, errorHandler);
}
OCStackResult findResource(const std::string& host,
- const std::string& resourceName,
- FindCallback resourceHandler, QualityOfService QoS)
+ const std::string& resourceName,
+ OCConnectivityType connectivityType,
+ FindCallback resourceHandler,
+ FindErrorCallback errorHandler,
+ QualityOfService QoS)
{
return OCPlatform_impl::Instance().findResource(host, resourceName,
- resourceHandler, QoS);
+ connectivityType, resourceHandler, errorHandler, QoS);
+ }
+
+ OCStackResult findResourceList(const std::string& host, const std::string& resourceURI,
+ OCConnectivityType connectivityType, FindResListCallback resourceHandler,
+ QualityOfService QoS)
+ {
+ return OCPlatform_impl::Instance().findResourceList(host, resourceURI,
+ connectivityType, resourceHandler, QoS);
+ }
+
+ OCStackResult getDeviceInfo(const std::string& host,
+ const std::string& deviceURI,
+ OCConnectivityType connectivityType,
+ FindDeviceCallback deviceInfoHandler)
+ {
+ return OCPlatform_impl::Instance().getDeviceInfo(host, deviceURI,
+ connectivityType, deviceInfoHandler);
}
+ OCStackResult getDeviceInfo(const std::string& host,
+ const std::string& deviceURI,
+ OCConnectivityType connectivityType,
+ FindDeviceCallback deviceInfoHandler,
+ QualityOfService QoS)
+ {
+ return OCPlatform_impl::Instance().getDeviceInfo(host, deviceURI, connectivityType,
+ deviceInfoHandler, QoS);
+ }
+
+ OCStackResult getPlatformInfo(const std::string& host,
+ const std::string& platformURI,
+ OCConnectivityType connectivityType,
+ FindPlatformCallback platformInfoHandler)
+ {
+ return OCPlatform_impl::Instance().getPlatformInfo(host, platformURI,
+ connectivityType, platformInfoHandler);
+ }
+
+ OCStackResult getPlatformInfo(const std::string& host,
+ const std::string& platformURI,
+ OCConnectivityType connectivityType,
+ FindPlatformCallback platformInfoHandler,
+ QualityOfService QoS)
+ {
+ return OCPlatform_impl::Instance().getPlatformInfo(host, platformURI, connectivityType,
+ platformInfoHandler, QoS);
+ }
OCStackResult registerResource(OCResourceHandle& resourceHandle,
- std::string& resourceURI,
- const std::string& resourceTypeName,
- const std::string& resourceInterface,
- EntityHandler entityHandler,
- uint8_t resourceProperty)
+ std::string& resourceURI,
+ const std::string& resourceTypeName,
+ const std::string& resourceInterface,
+ EntityHandler entityHandler,
+ uint8_t resourceProperty)
{
return OCPlatform_impl::Instance().registerResource(resourceHandle, resourceURI,
- resourceTypeName, resourceInterface,
- entityHandler, resourceProperty);
+ resourceTypeName, resourceInterface,
+ entityHandler, resourceProperty);
}
OCStackResult registerResource(OCResourceHandle& resourceHandle,
- const std::shared_ptr< OCResource > resource)
+ const std::shared_ptr< OCResource > resource)
{
return OCPlatform_impl::Instance().registerResource(resourceHandle, resource);
}
+ OCStackResult registerDeviceInfo(const OCDeviceInfo deviceInfo)
+ {
+ return OCPlatform_impl::Instance().registerDeviceInfo(deviceInfo);
+ }
+
+ OCStackResult registerPlatformInfo(const OCPlatformInfo platformInfo)
+ {
+ return OCPlatform_impl::Instance().registerPlatformInfo(platformInfo);
+ }
+
OCStackResult unregisterResource(const OCResourceHandle& resourceHandle)
{
return OCPlatform_impl::Instance().unregisterResource(resourceHandle);
}
OCStackResult unbindResource(OCResourceHandle collectionHandle,
- OCResourceHandle resourceHandle)
+ OCResourceHandle resourceHandle)
{
return OCPlatform_impl::Instance().unbindResource(collectionHandle, resourceHandle);
}
OCStackResult unbindResources(const OCResourceHandle collectionHandle,
- const std::vector<OCResourceHandle>& resourceHandles
- )
+ const std::vector<OCResourceHandle>& resourceHandles)
{
return OCPlatform_impl::Instance().unbindResources(collectionHandle, resourceHandles);
}
OCStackResult bindResource(const OCResourceHandle collectionHandle,
- const OCResourceHandle resourceHandle)
+ const OCResourceHandle resourceHandle)
{
return OCPlatform_impl::Instance().bindResource(collectionHandle, resourceHandle);
}
OCStackResult bindResources(const OCResourceHandle collectionHandle,
- const std::vector<OCResourceHandle>& resourceHandles
- )
+ const std::vector<OCResourceHandle>& resourceHandles
+ )
{
return OCPlatform_impl::Instance().bindResources(collectionHandle, resourceHandles);
}
OCStackResult bindTypeToResource(const OCResourceHandle& resourceHandle,
- const std::string& resourceTypeName)
+ const std::string& resourceTypeName)
{
return OCPlatform_impl::Instance().bindTypeToResource(resourceHandle,resourceTypeName);
}
OCStackResult bindInterfaceToResource(const OCResourceHandle& resourceHandle,
- const std::string& resourceInterfaceName)
+ const std::string& resourceInterfaceName)
{
return OCPlatform_impl::Instance().bindInterfaceToResource(resourceHandle,
- resourceInterfaceName);
+ resourceInterfaceName);
}
OCStackResult startPresence(const unsigned int announceDurationSeconds)
}
OCStackResult subscribePresence(OCPresenceHandle& presenceHandle,
- const std::string& host,
- SubscribeCallback presenceHandler)
+ const std::string& host,
+ OCConnectivityType connectivityType,
+ SubscribeCallback presenceHandler)
{
return OCPlatform_impl::Instance().subscribePresence(presenceHandle, host,
- presenceHandler);
+ connectivityType, presenceHandler);
}
OCStackResult subscribePresence(OCPresenceHandle& presenceHandle,
- const std::string& host,
- const std::string& resourceType,
- SubscribeCallback presenceHandler)
+ const std::string& host,
+ const std::string& resourceType,
+ OCConnectivityType connectivityType,
+ SubscribeCallback presenceHandler)
{
return OCPlatform_impl::Instance().subscribePresence(presenceHandle, host,
- resourceType, presenceHandler);
+ resourceType, connectivityType, presenceHandler);
}
OCStackResult unsubscribePresence(OCPresenceHandle presenceHandle)
{
return OCPlatform_impl::Instance().unsubscribePresence(presenceHandle);
}
+
+#ifdef WITH_CLOUD
+ OCStackResult subscribeDevicePresence(OCPresenceHandle& presenceHandle,
+ const std::string& host,
+ const std::vector<std::string>& di,
+ OCConnectivityType connectivityType,
+ ObserveCallback callback)
+ {
+ return OCPlatform_impl::Instance().subscribeDevicePresence(presenceHandle,
+ host,
+ di,
+ connectivityType,
+ callback);
+ }
+#endif
+
+ OCStackResult sendResponse(const std::shared_ptr<OCResourceResponse> pResponse)
+ {
+ return OCPlatform_impl::Instance().sendResponse(pResponse);
+ }
+
+ OCStackResult findDirectPairingDevices(unsigned short waittime,
+ GetDirectPairedCallback directPairingHandler)
+ {
+ return OCPlatform_impl::Instance().findDirectPairingDevices(waittime,
+ directPairingHandler);
+ }
+
+ OCStackResult getDirectPairedDevices(GetDirectPairedCallback directPairingHandler)
+ {
+ return OCPlatform_impl::Instance().getDirectPairedDevices(directPairingHandler);
+ }
+
+ OCStackResult doDirectPairing(std::shared_ptr<OCDirectPairing> peer, OCPrm_t pmSel,
+ const std::string& pinNumber,
+ DirectPairingCallback resultCallback)
+ {
+ return OCPlatform_impl::Instance().doDirectPairing(peer, pmSel,
+ pinNumber, resultCallback);
+ }
+#ifdef WITH_CLOUD
+ OCAccountManager::Ptr constructAccountManagerObject(const std::string& host,
+ OCConnectivityType connectivityType)
+ {
+ return OCPlatform_impl::Instance().constructAccountManagerObject(host,
+ connectivityType);
+ }
+#endif // WITH_CLOUD
+#ifdef RD_CLIENT
+ OCStackResult publishResourceToRD(const std::string& host,
+ OCConnectivityType connectivityType,
+ PublishResourceCallback callback)
+ {
+ ResourceHandles resourceHandles;
+ return OCPlatform_impl::Instance().publishResourceToRD(host, connectivityType,
+ resourceHandles,
+ callback);
+ }
+
+ OCStackResult publishResourceToRD(const std::string& host,
+ OCConnectivityType connectivityType,
+ PublishResourceCallback callback,
+ QualityOfService QoS)
+ {
+ ResourceHandles resourceHandles;
+ return OCPlatform_impl::Instance().publishResourceToRD(host, connectivityType,
+ resourceHandles,
+ callback, QoS);
+ }
+
+ OCStackResult publishResourceToRD(const std::string& host,
+ OCConnectivityType connectivityType,
+ ResourceHandles& resourceHandles,
+ PublishResourceCallback callback)
+ {
+ return OCPlatform_impl::Instance().publishResourceToRD(host, connectivityType,
+ resourceHandles,
+ callback);
+ }
+
+ OCStackResult publishResourceToRD(const std::string& host,
+ OCConnectivityType connectivityType,
+ ResourceHandles& resourceHandles,
+ PublishResourceCallback callback, QualityOfService QoS)
+ {
+ return OCPlatform_impl::Instance().publishResourceToRD(host, connectivityType,
+ resourceHandles,
+ callback, QoS);
+ }
+
+ OCStackResult deleteResourceFromRD(const std::string& host,
+ OCConnectivityType connectivityType,
+ DeleteResourceCallback callback)
+ {
+ ResourceHandles resourceHandles;
+ return OCPlatform_impl::Instance().deleteResourceFromRD(host, connectivityType,
+ resourceHandles, callback);
+ }
+
+ OCStackResult deleteResourceFromRD(const std::string& host,
+ OCConnectivityType connectivityType,
+ DeleteResourceCallback callback,
+ QualityOfService QoS)
+ {
+ ResourceHandles resourceHandles;
+ return OCPlatform_impl::Instance().deleteResourceFromRD(host, connectivityType,
+ resourceHandles, callback, QoS);
+ }
+
+ OCStackResult deleteResourceFromRD(const std::string& host,
+ OCConnectivityType connectivityType,
+ ResourceHandles& resourceHandles,
+ DeleteResourceCallback callback)
+ {
+ return OCPlatform_impl::Instance().deleteResourceFromRD(host, connectivityType,
+ resourceHandles, callback);
+ }
+
+ OCStackResult deleteResourceFromRD(const std::string& host,
+ OCConnectivityType connectivityType,
+ ResourceHandles& resourceHandles,
+ DeleteResourceCallback callback, QualityOfService QoS)
+ {
+ return OCPlatform_impl::Instance().deleteResourceFromRD(host, connectivityType,
+ resourceHandles, callback,
+ QoS);
+ }
+#endif
+ OCStackResult getDeviceId(OCUUIdentity *deviceId)
+ {
+ return OCPlatform_impl::Instance().getDeviceId(deviceId);
+ }
+
+ OCStackResult setDeviceId(const OCUUIdentity *deviceId)
+ {
+ return OCPlatform_impl::Instance().setDeviceId(deviceId);
+ }
} // namespace OCPlatform
} //namespace OC
+