X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=resource%2Fsrc%2FOCPlatform.cpp;h=8093aa2937cb15e8e3340dcd4c915587f4ac7cd3;hb=935fdb9b67b6c10d007e652e9e2e028fd6ccfe09;hp=9a17833ab48614774eb02c51efb61380610dab20;hpb=00b3660e45c56cb3db35dc2596a054f801b5591a;p=platform%2Fupstream%2Fiotivity.git diff --git a/resource/src/OCPlatform.cpp b/resource/src/OCPlatform.cpp index 9a17833..8093aa2 100644 --- a/resource/src/OCPlatform.cpp +++ b/resource/src/OCPlatform.cpp @@ -72,45 +72,71 @@ namespace OC OCResource::Ptr constructResourceObject(const std::string& host, const std::string& uri, + OCConnectivityType connectivityType, bool isObservable, const std::vector& resourceTypes, const std::vector& interfaces) { - return OCPlatform_impl::Instance().constructResourceObject(host, uri, isObservable, + return OCPlatform_impl::Instance().constructResourceObject(host, uri, connectivityType, + isObservable, resourceTypes, interfaces); } OCStackResult findResource(const std::string& host, 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, + return OCPlatform_impl::Instance().findResource(host, resourceName, connectivityType, resourceHandler, QoS); } OCStackResult getDeviceInfo(const std::string& host, const std::string& deviceURI, + OCConnectivityType connectivityType, FindDeviceCallback deviceInfoHandler) { - return OCPlatform_impl::Instance().getDeviceInfo(host, deviceURI, 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, + 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, @@ -135,6 +161,11 @@ namespace OC 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); @@ -191,19 +222,21 @@ namespace OC OCStackResult subscribePresence(OCPresenceHandle& presenceHandle, 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, + OCConnectivityType connectivityType, SubscribeCallback presenceHandler) { return OCPlatform_impl::Instance().subscribePresence(presenceHandle, host, - resourceType, presenceHandler); + resourceType, connectivityType, presenceHandler); } OCStackResult unsubscribePresence(OCPresenceHandle presenceHandle) @@ -217,3 +250,4 @@ namespace OC } } // namespace OCPlatform } //namespace OC +