replace : iotivity -> iotivity-sec
[platform/upstream/iotivity.git] / resource / csdk / stack / include / internal / oickeepaliveinternal.h
@@ -1,6 +1,6 @@
 /* ****************************************************************
  *
- * Copyright 2015 Samsung Electronics All Rights Reserved.
+ * Copyright 2016 Samsung Electronics All Rights Reserved.
  *
  *
  *
 
 /**
  * @file
- * This file contains the APIs for KeepAlive Mechanism.
+ * This file contains the Internal APIs for KeepAlive Mechanism.
  * In order to ensure that the connection between an OIC Devices,
  * when using CoAP over TCP, OIC Device should send application layer
  * KeepAlive messages.
  */
-#ifndef KEEP_ALIVE_H_
-#define KEEP_ALIVE_H_
+#ifndef KEEP_ALIVE__INTERNAL_H_
+#define KEEP_ALIVE__INTERNAL_H_
 
 #include "octypes.h"
 #include "ocserverrequest.h"
@@ -57,19 +57,27 @@ extern "C"
  * @param[in]   mode        Host mode of operation.
  * @return  ::OC_STACK_OK or Appropriate error code.
  */
-OCStackResult InitializeKeepAlive(OCMode mode);
+OCStackResult OCInitializeKeepAlive(OCMode mode);
 
 /**
  * Terminates the KeepAlive.
  * @param[in]   mode        Host mode of operation.
  * @return  ::OC_STACK_OK or Appropriate error code.
  */
-OCStackResult TerminateKeepAlive(OCMode mode);
+OCStackResult OCTerminateKeepAlive(OCMode mode);
+
+/**
+ * API to handle the Response payload.
+ * @param[in]   endpoint        RemoteEndpoint which sent the packet.
+ * @param[in]   payload         Encoded response payload.
+ * @return  ::OC_STACK_OK or Appropriate error code.
+ */
+OCStackResult OCHandleKeepAliveResponse(const CAEndpoint_t *endPoint, const OCPayload *payload);
 
 /**
  * Process the KeepAlive timer to send ping message to OIC Server.
  */
-void ProcessKeepAlive();
+void OCProcessKeepAlive();
 
 /**
  * This API will be called from RI layer whenever there is a request for KeepAlive.
@@ -78,17 +86,19 @@ void ProcessKeepAlive();
  * @param[in]   resource    Resource handle used for sending the response.
  * @return  ::OC_STACK_OK or Appropriate error code.
  */
-OCStackResult HandleKeepAliveRequest(OCServerRequest *request,
-                                     const OCResource *resource);
+OCStackResult OCHandleKeepAliveRequest(OCServerRequest *request,
+                                       const OCResource *resource);
 
 /**
  * API to handle the connected device for KeepAlive.
- * @return  Current Time.
+ * @param[in]   endpoint        Remote endpoint information.
+ * @param[in]   isConnected     Whether keepalive message needs to be sent.
+ * @param[in]   isClient        Host Mode of Operation.
  */
-void HandleKeepAliveConnCB(const CAEndpoint_t *endpoint, bool isConnected);
+void OCHandleKeepAliveConnCB(const CAEndpoint_t *endpoint, bool isConnected, bool isClient);
 
 #ifdef __cplusplus
 } // extern "C"
 #endif
 
-#endif // KEEP_ALIVE_H_
+#endif // KEEP_ALIVE__INTERNAL_H_