X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=resource%2Finclude%2FOCPlatform_impl.h;h=1c3a27666f73bee307609513c51e751bbb73a052;hb=refs%2Ftags%2Ftizen_4.0.m2_release;hp=51217f0fbbb5500c4325c8efa770a167fcfd493f;hpb=945944cb3ff5efaccd03e8efa23199e58bd59ded;p=platform%2Fupstream%2Fiotivity.git diff --git a/resource/include/OCPlatform_impl.h b/resource/include/OCPlatform_impl.h index 51217f0..1c3a276 100644 --- a/resource/include/OCPlatform_impl.h +++ b/resource/include/OCPlatform_impl.h @@ -39,6 +39,10 @@ #include "OCRepresentation.h" #include "OCDirectPairing.h" +#ifdef WITH_CLOUD +#include "OCAccountManager.h" +#endif + #include "oc_logger.hpp" namespace OC @@ -48,7 +52,7 @@ namespace OC private: static PlatformConfig& globalConfig(); public: - static void Configure(const PlatformConfig& config); + static OCStackResult Configure(const PlatformConfig& config); static OCPlatform_impl& Instance(); @@ -88,6 +92,14 @@ namespace OC OCConnectivityType connectivityType, FindCallback resourceHandler, FindErrorCallback errorHandler, QualityOfService QoS); + OCStackResult findResourceList(const std::string& host, const std::string& resourceURI, + OCConnectivityType connectivityType, FindResListCallback resourceHandler, + QualityOfService QoS); + + OCStackResult findResourceList(const std::string& host, const std::string& resourceURI, + OCConnectivityType connectivityType, FindResListCallback resourceHandler, + FindErrorCallback errorHandler, QualityOfService Qos); + OCStackResult getDeviceInfo(const std::string& host, const std::string& deviceURI, OCConnectivityType connectivityType, FindDeviceCallback deviceInfoHandler); @@ -134,6 +146,10 @@ namespace OC OCStackResult getPlatformInfo(const std::string& host, const std::string& platformURI, FindPlatformCallback platformInfoHandler, QualityOfService QoS); + OCStackResult setPropertyValue(OCPayloadType type, const std::string& tag, const std::string& value); + OCStackResult setPropertyValue(OCPayloadType type, const std::string& tag, const std::vector& value); + OCStackResult getPropertyValue(OCPayloadType type, const std::string& tag, std::string& value); + /** * This API registers a resource with the server * @note This API applies to server side only. @@ -225,12 +241,19 @@ namespace OC SubscribeCallback presenceHandler); OCStackResult unsubscribePresence(OCPresenceHandle presenceHandle); +#ifdef WITH_CLOUD + OCStackResult subscribeDevicePresence(OCPresenceHandle& presenceHandle, + const std::string& host, + const std::vector& di, + OCConnectivityType connectivityType, + ObserveCallback callback); +#endif + OCResource::Ptr constructResourceObject(const std::string& host, const std::string& uri, OCConnectivityType connectivityType, bool isObservable, const std::vector& resourceTypes, const std::vector& interfaces); OCStackResult sendResponse(const std::shared_ptr pResponse); - std::weak_ptr csdkLock(); OCStackResult findDirectPairingDevices(unsigned short waittime, @@ -241,9 +264,25 @@ namespace OC OCStackResult doDirectPairing(std::shared_ptr peer, OCPrm_t pmSel, const std::string& pinNumber, DirectPairingCallback resultCallback); - +#ifdef WITH_CLOUD + OCAccountManager::Ptr constructAccountManagerObject(const std::string& host, + OCConnectivityType connectivityType); +#endif // WITH_CLOUD + +#ifdef TCP_ADAPTER + OCStackResult findKeepAliveResource(std::string host, KeepAliveCallback resultCallback); + OCStackResult sendKeepAliveRequest(std::string host, const OCRepresentation& rep, + KeepAliveCallback resultCallback); +#endif + OCStackResult getDeviceId(OCUUIdentity *myUuid); + + OCStackResult setDeviceId(const OCUUIdentity *myUuid); + + OCStackResult stop(); + OCStackResult start(); private: PlatformConfig m_cfg; + OCMode m_modeType; private: std::unique_ptr m_WrapperInstance; @@ -276,6 +315,3 @@ namespace OC } #endif //__OCPLATFORM_IMPL_H - - -