X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=resource%2Fcsdk%2Fconnectivity%2Finc%2Fcainterfacecontroller_singlethread.h;h=dcde405b7206c26c7a3e0d594c6db5d762024a01;hb=c24a356f0f1cd4fbb8bcf88b458e1799a5685fcf;hp=0b0d859530735fc9ceaa4d838f9670981c0ec8cb;hpb=ab480a7ba8e32f55107ed209642d555d7f6744a3;p=platform%2Fupstream%2Fiotivity.git diff --git a/resource/csdk/connectivity/inc/cainterfacecontroller_singlethread.h b/resource/csdk/connectivity/inc/cainterfacecontroller_singlethread.h index 0b0d859..dcde405 100644 --- a/resource/csdk/connectivity/inc/cainterfacecontroller_singlethread.h +++ b/resource/csdk/connectivity/inc/cainterfacecontroller_singlethread.h @@ -21,6 +21,7 @@ * @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_ @@ -32,28 +33,88 @@ extern "C" { #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