Merge branch 'master' into windows-port
[platform/upstream/iotivity.git] / resource / csdk / connectivity / inc / cainterfacecontroller.h
index f6fdb63..edf060f 100644 (file)
@@ -28,6 +28,7 @@
 #define CA_INTERFACE_CONTROLLER_H_
 
 #include "caadapterinterface.h"
+#include "cainterface.h"
 
 #ifndef SINGLE_THREAD
 #include "cathreadpool.h" /* for thread pool */
@@ -66,16 +67,17 @@ void CASetPacketReceivedCallback(CANetworkPacketReceivedCallback callback);
 void CASetErrorHandleCallback(CAErrorHandleCallback errorCallback);
 
 /**
- * Set the network status changed callback for message handler.
- * @param[in]   callback         message handler network status callback
- *                               to receive network changes.
+ * Set the network status changed callback for CAUtil.
+ * @param[in]   adapterCB       CAUtil callback to receive adapter status changes.
+ * @param[in]   connCB          CAUtil callback to receive connection status changes.
  */
-void CASetNetworkChangeCallback(CANetworkChangeCallback callback);
+void CASetNetworkMonitorCallbacks(CAAdapterChangeCallback adapterCB,
+                                  CAConnectionChangeCallback connCB);
 
 /**
  * Starting different connectivity adapters based on the network selection.
  * @param[in]   transportType    interested network for starting.
- * @return  CA_STATUS_OK or ERROR CODES (CAResult_t error codes in cacommon.h).
+ * @return  ::CA_STATUS_OK or ERROR CODES (::CAResult_t error codes in cacommon.h).
  */
 CAResult_t CAStartAdapter(CATransportAdapter_t transportType);
 
@@ -100,7 +102,7 @@ CAResult_t CASetAdapterRAInfo(const CARAInfo_t *caraInfo);
  * @param[out]   info           connectivity information
  *                                  such as ipaddress and mac information.
  * @param[out]   size           number of connectivity information structures.
- * @return  CA_STATUS_OK or ERROR CODES (CAResult_t error codes in cacommon.h).
+ * @return  ::CA_STATUS_OK or ERROR CODES (::CAResult_t error codes in cacommon.h).
  */
 CAResult_t CAGetNetworkInfo(CAEndpoint_t **info, uint32_t *size);
 
@@ -109,7 +111,7 @@ CAResult_t CAGetNetworkInfo(CAEndpoint_t **info, uint32_t *size);
  * @param[in]   endpoint       endpoint information where the data has to be sent.
  * @param[in]   data           data that needs to be sent.
  * @param[in]   length         length of the data that needs to be sent.
- * @return  CA_STATUS_OK or ERROR CODES (CAResult_t error codes in cacommon.h).
+ * @return  ::CA_STATUS_OK or ERROR CODES (::CAResult_t error codes in cacommon.h).
  */
 CAResult_t CASendUnicastData(const CAEndpoint_t *endpoint, const void *data, uint32_t length);
 
@@ -118,20 +120,26 @@ CAResult_t CASendUnicastData(const CAEndpoint_t *endpoint, const void *data, uin
  * @param[in]   endpoint       endpoint information where the data has to be sent.
  * @param[in]   data           data that needs to be sent.
  * @param[in]   length         length of the data that needs to be sent.
- * @return  CA_STATUS_OK or ERROR CODES (CAResult_t error codes in cacommon.h).
+ * @return  ::CA_STATUS_OK or ERROR CODES (::CAResult_t error codes in cacommon.h).
  */
 
 CAResult_t CASendMulticastData(const CAEndpoint_t *endpoint, const void *data, uint32_t length);
 
 /**
  * Start listening servers to receive search requests from clients.
- * @return  CA_STATUS_OK or ERROR CODES (CAResult_t error codes in cacommon.h).
+ * @return  ::CA_STATUS_OK or ERROR CODES (::CAResult_t error codes in cacommon.h).
  */
 CAResult_t CAStartListeningServerAdapters();
 
 /**
+ * Stop listening servers to receive search requests from clients.
+ * @return  ::CA_STATUS_OK or ERROR CODES (::CAResult_t error codes in cacommon.h).
+ */
+CAResult_t CAStopListeningServerAdapters();
+
+/**
  * Start discovery servers to receive advertisements from server.
- * @return  CA_STATUS_OK or ERROR CODES (CAResult_t error codes in cacommon.h).
+ * @return  ::CA_STATUS_OK or ERROR CODES (::CAResult_t error codes in cacommon.h).
  */
 CAResult_t CAStartDiscoveryServerAdapters();
 
@@ -143,7 +151,7 @@ void CATerminateAdapters();
 #ifdef SINGLE_THREAD
 /**
  * Checks for available data and reads it.
- * @return   CA_STATUS_OK or ERROR CODES (CAResult_t error codes in cacommon.h).
+ * @return   ::CA_STATUS_OK or ERROR CODES (::CAResult_t error codes in cacommon.h).
  */
 CAResult_t CAReadData();
 #endif