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,
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);
pinNumber, resultCallback);
}
#ifdef WITH_CLOUD
- OCStackResult signUp(const std::string& host,
- const std::string& authProvider,
- const std::string& authCode,
- OCConnectivityType connectivityType,
- PostCallback cloudConnectHandler)
+ OCAccountManager::Ptr constructAccountManagerObject(const std::string& host,
+ OCConnectivityType connectivityType)
{
- return OCPlatform_impl::Instance().signUp(host, authProvider, authCode,
- connectivityType, cloudConnectHandler);
+ 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 signIn(const std::string& host,
- const std::string& accessToken,
- OCConnectivityType connectivityType,
- PostCallback cloudConnectHandler)
+ OCStackResult publishResourceToRD(const std::string& host,
+ OCConnectivityType connectivityType,
+ PublishResourceCallback callback,
+ QualityOfService QoS)
{
- return OCPlatform_impl::Instance().signIn(host, accessToken,
- connectivityType, cloudConnectHandler);
+ ResourceHandles resourceHandles;
+ return OCPlatform_impl::Instance().publishResourceToRD(host, connectivityType,
+ resourceHandles,
+ callback, QoS);
}
- OCStackResult signOut(const std::string& host,
- const std::string& accessToken,
- OCConnectivityType connectivityType,
- PostCallback cloudConnectHandler)
+ OCStackResult publishResourceToRD(const std::string& host,
+ OCConnectivityType connectivityType,
+ ResourceHandles& resourceHandles,
+ PublishResourceCallback callback)
{
- return OCPlatform_impl::Instance().signOut(host, accessToken,
- connectivityType, cloudConnectHandler);
+ return OCPlatform_impl::Instance().publishResourceToRD(host, connectivityType,
+ resourceHandles,
+ callback);
}
- OCStackResult refreshAccessToken(const std::string& host,
- const std::string& refreshToken,
- OCConnectivityType connectivityType,
- PostCallback cloudConnectHandler)
+ OCStackResult publishResourceToRD(const std::string& host,
+ OCConnectivityType connectivityType,
+ ResourceHandles& resourceHandles,
+ PublishResourceCallback callback, QualityOfService QoS)
{
- return OCPlatform_impl::Instance().refreshAccessToken(host, refreshToken,
- connectivityType, cloudConnectHandler);
+ 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);
}
-#endif // WITH_CLOUD
} // namespace OCPlatform
} //namespace OC