replace : iotivity -> iotivity-sec
[platform/upstream/iotivity.git] / resource / include / OCPlatform.h
index 9903611..84e7163 100644 (file)
@@ -44,12 +44,27 @@ namespace OC
         * @note Any calls made to this AFTER the first call to OCPlatform::Instance
         * will have no affect
         */
-        void Configure(const PlatformConfig& config);
+        OCStackResult Configure(const PlatformConfig& config);
 
         // typedef for handle to cancel presence info with
         typedef OCDoHandle OCPresenceHandle;
 
         /**
+         * API for stop Base layer including resource and connectivity abstraction.
+         *
+         * @return Returns ::OC_STACK_OK if success.
+         */
+        OCStackResult stop();
+
+        /**
+         * API for start Base layer including resource and connectivity abstraction.
+         * OCInit will be invoked.
+         *
+         * @return Returns ::OC_STACK_OK if success.
+         */
+        OCStackResult start();
+
+        /**
          * API for notifying base that resource's attributes have changed.
          *
          * @param resourceHandle resource handle of the resource
@@ -177,6 +192,10 @@ namespace OC
                     OCConnectivityType connectivityType, FindResListCallback resourceHandler,
                     QualityOfService QoS = QualityOfService::LowQos);
 
+        OCStackResult findResourceList(const std::string& host, const std::string& resourceURI,
+                    OCConnectivityType connectivityType, FindResListCallback resourceHandler,
+                    FindErrorCallback errorHandler, QualityOfService QoS = QualityOfService::LowQos);
+
         OCStackResult setPropertyValue(OCPayloadType type, const std::string& tag, const std::string& value);
         OCStackResult setPropertyValue(OCPayloadType type, const std::string& tag, const std::vector<std::string>& value);
         OCStackResult getPropertyValue(OCPayloadType type, const std::string& tag, std::string& value);
@@ -686,6 +705,28 @@ namespace OC
                                                             OCConnectivityType connectivityType);
 #endif // WITH_CLOUD
 
+#ifdef TCP_ADAPTER
+        /**
+         * gets OCRepresentation of KeepAlive resource from given host.
+         *
+         * @param host         Host IP Address of KeepAlive resource
+         * @param resultCallback Function to callback with result code and OCRepresentation.
+         * @return Returns ::OC_STACK_OK if success.
+         */
+        OCStackResult findKeepAliveResource(std::string host, KeepAliveCallback resultCallback);
+
+        /**
+        * send KeepAlive request to given host.
+        *
+        * @param rep            include interval time of expected pong response
+        * @param resultCallback handles callback
+        *
+        * @return Returns  ::OC_STACK_OK on success, some other value upon failure.
+        *
+        */
+        OCStackResult sendKeepAliveRequest(std::string host, const OCRepresentation& rep,
+                                                             KeepAliveCallback resultCallback);
+#endif
         /**
          * gets the deviceId of the client
          *