{
namespace OCPlatform
{
- void Configure(const PlatformConfig& config)
+ OCStackResult Configure(const PlatformConfig& config)
{
- OCPlatform_impl::Configure(config);
+ return OCPlatform_impl::Configure(config);
+ }
+
+ OCStackResult start()
+ {
+ return OCPlatform_impl::Instance().start();
+ }
+
+ OCStackResult stop()
+ {
+ return OCPlatform_impl::Instance().stop();
}
OCStackResult setDefaultDeviceEntityHandler(EntityHandler entityHandler)
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 findResourceList(const std::string& host, const std::string& resourceURI,
+ OCConnectivityType connectivityType, FindResListCallback resourceHandler,
+ FindErrorCallback errorHandler, QualityOfService QoS)
+ {
+ return OCPlatform_impl::Instance().findResourceList(host, resourceURI,
+ connectivityType, resourceHandler, errorHandler, QoS);
+ }
+
OCStackResult getDeviceInfo(const std::string& host,
const std::string& deviceURI,
OCConnectivityType connectivityType,
return OCPlatform_impl::Instance().registerPlatformInfo(platformInfo);
}
+ OCStackResult setPropertyValue(OCPayloadType type, const std::string& tag, const std::string& value)
+ {
+ return OCPlatform_impl::Instance().setPropertyValue(type, tag, value);
+ }
+
+ OCStackResult setPropertyValue(OCPayloadType type, const std::string& tag, const std::vector<std::string>& value)
+ {
+ return OCPlatform_impl::Instance().setPropertyValue(type, tag, value);
+ }
+
+ OCStackResult getPropertyValue(OCPayloadType type, const std::string& tag, std::string& value)
+ {
+ return OCPlatform_impl::Instance().getPropertyValue(type, tag, value);
+ }
+
OCStackResult unregisterResource(const OCResourceHandle& resourceHandle)
{
return OCPlatform_impl::Instance().unregisterResource(resourceHandle);
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);
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 TCP_ADAPTER
+ OCStackResult findKeepAliveResource(std::string host, KeepAliveCallback resultCallback)
+ {
+ return OCPlatform_impl::Instance().findKeepAliveResource(host, resultCallback);
+ }
+ OCStackResult sendKeepAliveRequest(std::string host, const OCRepresentation& rep,
+ KeepAliveCallback pingHandler)
+ {
+ return OCPlatform_impl::Instance().sendKeepAliveRequest(host, rep, pingHandler);
+ }
+#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
-