* @file cainterfacecontroller_singlethread.h
* @brief This file contains the APIs for the interface controller
*/
+
#ifndef __CA_INTERFACE_CONTROLLER_SINGLETHREAD_H_
#define __CA_INTERFACE_CONTROLLER_SINGLETHREAD_H_
{
#endif
+/**
+ * @brief Initializes different adapters based on the compilation flags.
+ * @param handle [IN] thread pool handle created by message handler for different adapters.
+ * @return none
+ */
void CAInitializeAdapters();
+/**
+ * @brief Set the received packets callback for message handler
+ * @param callback [IN] message handler callback to receive packets from different adapters.
+ * @return none
+ */
void CASetPacketReceivedCallback(CANetworkPacketReceivedCallback callback);
+/**
+ * @brief Set the network status changed callback for message handler
+ * @param callback [IN] message handler network status callback to receive network changes.
+ * @return none
+ */
void CASetNetworkChangeCallback(CANetworkChangeCallback callback);
+/**
+ * @brief Starting different connectivity adapters based on the network selection.
+ * @param connectivity [IN] interested network for starting
+ * @return none
+ */
void CAStartAdapter(CAConnectivityType_t connectivity);
+/**
+ * @brief Stopping different connectivity adapters based on the network un-selection.
+ * @param callback [IN] un selected network for stopping the packets transfer
+ * @return none
+ */
void CAStopAdapter(CAConnectivityType_t connectivity);
+/**
+ * @brief Get network information such as ipaddress and mac information
+ * @param info [OUT] connectivity information such as ipaddress and mac information
+ * @param size [OUT] number of connectivity information structures
+ * @return CA_STATUS_OK or ERROR CODES ( CAResult_t error codes in cacommon.h)
+ */
CAResult_t CAGetNetworkInfo(CALocalConnectivity_t **info, uint32_t *size);
+/**
+ * @brief Sends unicast data to the remote endpoint
+ * @param endpoint [IN] endpoint information where the data has to be sent
+ * @param data [IN] data that needs to be sent
+ * @param length [IN] length of the data that needs to be sent
+ * @return CA_STATUS_OK or ERROR CODES ( CAResult_t error codes in cacommon.h)
+ */
CAResult_t CASendUnicastData(const CARemoteEndpoint_t *endpoint, void *data, uint32_t length);
+/**
+ * @brief Sends multicast data to all endpoints in the network.
+ * @param data [IN] data that needs to be sent
+ * @param length [IN] length of the data that needs to be sent
+ * @return CA_STATUS_OK or ERROR CODES ( CAResult_t error codes in cacommon.h)
+ */
CAResult_t CASendMulticastData(void *data, uint32_t length);
+/**
+ * @brief Start listening servers to receive search requests from clients
+ * @return CA_STATUS_OK or ERROR CODES ( CAResult_t error codes in cacommon.h)
+ */
CAResult_t CAStartListeningServerAdapters();
+/**
+ * @brief Start discovery servers to receive advertisements from server
+ * @return CA_STATUS_OK or ERROR CODES ( CAResult_t error codes in cacommon.h)
+ */
CAResult_t CAStartDiscoveryServerAdapters();
+/**
+ * @brief Terminates the adapters which are initialized during the initialization
+ * @return none
+ */
void CATerminateAdapters();
+/**
+ * @brief Checks for available data and reads it
+ * @return CA_STATUS_OK or ERROR CODES ( CAResult_t error codes in cacommon.h)
+ */
CAResult_t CAReadData();
#ifdef __cplusplus