From c4dc6f50644c0457416fbb8702574f44fb9f6fbe Mon Sep 17 00:00:00 2001 From: jihwanseo Date: Tue, 4 Aug 2015 14:41:32 +0900 Subject: [PATCH] modified CA comment for doxygen. Fixed All files with out of date or incorrect doxygen comments in CA Change-Id: I99345cb693bb292e787e717f49cf4cc914caf534 Signed-off-by: jihwan.seo Signed-off-by: hyuna0213.jo Signed-off-by: jihwan.seo Reviewed-on: https://gerrit.iotivity.org/gerrit/2057 Tested-by: jenkins-iotivity Reviewed-by: Jon A. Cruz --- .../csdk/connectivity/common/inc/caremotehandler.h | 54 ++- resource/csdk/connectivity/common/inc/uarraylist.h | 73 ++-- .../csdk/connectivity/inc/caadapterinterface.h | 118 +++--- resource/csdk/connectivity/inc/caadapternetdtls.h | 146 +++---- .../csdk/connectivity/inc/cablockwisetransfer.h | 450 ++++++++++---------- resource/csdk/connectivity/inc/caedradapter.h | 16 +- resource/csdk/connectivity/inc/caedrinterface.h | 6 +- resource/csdk/connectivity/inc/cafragmentation.h | 106 ++--- .../csdk/connectivity/inc/cainterfacecontroller.h | 14 +- resource/csdk/connectivity/inc/caipadapter.h | 2 +- resource/csdk/connectivity/inc/camessagehandler.h | 68 +-- .../csdk/connectivity/inc/canetworkconfigurator.h | 10 +- resource/csdk/connectivity/inc/caprotocolmessage.h | 10 +- resource/csdk/connectivity/inc/caretransmission.h | 16 +- .../src/bt_edr_adapter/android/caedrclient.h | 118 +++--- .../src/bt_edr_adapter/android/caedrnwmonitor.h | 10 +- .../src/bt_edr_adapter/android/caedrserver.h | 2 - .../src/bt_edr_adapter/android/caedrutils.h | 157 +++---- .../src/bt_edr_adapter/tizen/caedrdevicelist.h | 126 +++--- .../src/bt_edr_adapter/tizen/caedrendpoint.h | 16 +- .../src/bt_edr_adapter/tizen/caedrutils.h | 11 +- .../src/bt_le_adapter/android/caleclient.h | 471 ++++++++++----------- .../src/bt_le_adapter/android/calenwmonitor.h | 54 ++- .../src/bt_le_adapter/android/caleserver.h | 274 ++++++------ .../src/bt_le_adapter/android/caleutils.h | 76 ++-- .../src/bt_le_adapter/arduino/cableserver.h | 58 +-- .../src/bt_le_adapter/tizen/cableclient.h | 28 +- .../src/bt_le_adapter/tizen/cableserver.h | 221 +++++----- .../src/bt_le_adapter/tizen/cableutil.h | 233 +++++----- .../src/ip_adapter/arduino/caipadapterutils_eth.h | 62 +-- 30 files changed, 1435 insertions(+), 1571 deletions(-) diff --git a/resource/csdk/connectivity/common/inc/caremotehandler.h b/resource/csdk/connectivity/common/inc/caremotehandler.h index ebe8d0e..e71d3f6 100644 --- a/resource/csdk/connectivity/common/inc/caremotehandler.h +++ b/resource/csdk/connectivity/common/inc/caremotehandler.h @@ -35,69 +35,65 @@ extern "C" #endif /** - * @brief Creates a new remote endpoint from the input endpoint - * @param endpoint [IN] endpoint information where the data has to be sent - * @return remote endpoint created + * Creates a new remote endpoint from the input endpoint. + * @param[in] endpoint endpoint information where the data has to be sent. + * @return remote endpoint created. */ CAEndpoint_t *CACloneEndpoint(const CAEndpoint_t *endpoint); /** - * @brief Allocate CAEndpoint_t instance. - * @param flags [IN] Transport flag - * @param adapter [IN] Adapter type - * @param address [IN] Address - * @param port [IN] Port - * @return #CA_STATUS_OK or Appropriate error code + * Allocate CAEndpoint_t instance. + * @param[in] flags Transport flag. + * @param[in] adapter Adapter type. + * @param[in] address Address. + * @param[in] port Port. + * @return ::CA_STATUS_OK or Appropriate error code. */ CAEndpoint_t *CACreateEndpointObject(CATransportFlags_t flags, CATransportAdapter_t adapter, const char *address, uint16_t port); /** - * @brief Destroy remote endpoint - * @param endpoint [IN] endpoint information where the data has to be sent - * @return none + * Destroy remote endpoint. + * @param[in] endpoint endpoint information where the data has to be sent. */ void CAFreeEndpoint(CAEndpoint_t *rep); /** - * @brief duplicates the given info. + * duplicates the given info. * @param[in] info info object to be duplicated. * @param[out] clone info object to be modified. - * @return #CA_STATUS_OK or Appropriate error code if fail to clone. + * @return ::CA_STATUS_OK or Appropriate error code if fail to clone. */ CAResult_t CACloneInfo(const CAInfo_t *info, CAInfo_t *clone); /** - * @brief Creates a new request information - * @param request [IN] request information that needs to be duplicated - * @return duplicated request info object + * Creates a new request information. + * @param[in] request request information that needs to be duplicated. + * @return duplicated request info object. */ CARequestInfo_t *CACloneRequestInfo(const CARequestInfo_t *request); /** - * @brief Destroy the request information - * @param request [IN] request information that needs to be destroyed - * @return none + * Destroy the request information. + * @param[in] request request information that needs to be destroyed. */ void CADestroyRequestInfoInternal(CARequestInfo_t *request); /** - * @brief Creates a new response information - * @param response [IN] response information that needs to be duplicated - * @return duplicated response info object + * Creates a new response information. + * @param[in] response response information that needs to be duplicated. + * @return duplicated response info object. */ CAResponseInfo_t *CACloneResponseInfo(const CAResponseInfo_t *response); /** - * @brief Destroy the response information - * @param response [IN] response information that needs to be destroyed - * @return + * Destroy the response information. + * @param[in] response response information that needs to be destroyed. */ void CADestroyResponseInfoInternal(CAResponseInfo_t *response); /** - * @brief Free the error information - * @param errorInfo [IN] error information to be freed - * @return + * Free the error information. + * @param[in] errorInfo error information to be freed. */ void CADestroyErrorInfoInternal(CAErrorInfo_t *errorInfo); diff --git a/resource/csdk/connectivity/common/inc/uarraylist.h b/resource/csdk/connectivity/common/inc/uarraylist.h index 7fa6200..a055a1b 100644 --- a/resource/csdk/connectivity/common/inc/uarraylist.h +++ b/resource/csdk/connectivity/common/inc/uarraylist.h @@ -1,4 +1,4 @@ -/****************************************************************** +/* **************************************************************** * * Copyright 2014 Samsung Electronics All Rights Reserved. * @@ -30,8 +30,7 @@ extern "C" #endif /** - * @struct u_arraylist_t - * @brief array list structure + * array list structure. */ typedef struct u_arraylist_t { @@ -41,74 +40,64 @@ typedef struct u_arraylist_t } u_arraylist_t; /** - * @brief API to creates array list and initializes the elements. - * @return u_arraylist_t if Success, NULL otherwise + * API to creates array list and initializes the elements. + * @return u_arraylist_t if Success, NULL otherwise. */ u_arraylist_t *u_arraylist_create(); /** - * @brief Resets and deletes the array list + * Resets and deletes the array list. * Arraylist elements are deleted. Calling function must take care of free - * dynamic memory allocated before freeing the arraylist - * @param list- u_arraylist pointer - * @return CAResult_t - * CA_STATUS_OK if Success, CA_STATUS_INVALID_PARAM if pointer to list is NULL + * dynamic memory allocated before freeing the arraylist. + * @param[in] list u_arraylist pointer + * @return ::CAResult_t. + * ::CA_STATUS_OK if Success, ::CA_STATUS_INVALID_PARAM if pointer to list is NULL. */ CAResult_t u_arraylist_free(u_arraylist_t **list); /** - * @brief Returns the data of the index from the array list - * @param list - * [IN] pointer of array list - * @param index - * [IN] index of array list - * @return void pointer of data if success or NULL pointer otherwise + * Returns the data of the index from the array list. + * @param[in] list pointer of array list. + * @param[in] index index of array list. + * @return void pointer of data if success or NULL pointer otherwise. */ void *u_arraylist_get(const u_arraylist_t *list, uint32_t index); /** - * @brief Add data in the array list - * @param list - * [IN] pointer of array list - * @param data - * [IN] pointer of data - * @return CAResult_t - * CA_STATUS_OK if Success, CA_MEMORY_ALLOC_FAILED if memory allocation fails + * Add data in the array list. + * @param[in] list pointer of array list. + * @param[in] data pointer of data. + * @return CAResult_t. + * ::CA_STATUS_OK if Success, ::CA_MEMORY_ALLOC_FAILED if memory allocation fails. */ CAResult_t u_arraylist_add(u_arraylist_t *list, void *data); /** - * @brief Remove the data of the index from the array list - * @param list - * [IN] pointer of array list - * @param index - * [IN] index of array list - * @return void pointer of the data if success or NULL pointer otherwise + * Remove the data of the index from the array list. + * @param[in] list pointer of array list. + * @param[in] index index of array list. + * @return void pointer of the data if success or NULL pointer otherwise. */ void *u_arraylist_remove(u_arraylist_t *list, uint32_t index); /** - * @brief Returns the length of the array list - * @param list - * [IN] pointer of array list - * @return length of the array list + * Returns the length of the array list. + * @param[in] list pointer of array list. + * @return length of the array list. */ uint32_t u_arraylist_length(const u_arraylist_t *list); /** - * @brief Returns whether the data exists or not - * @param list - * [IN] pointer of array list - * @param data - * [IN] pointer of data - * @return true if exists, false otherwise + * Returns whether the data exists or not. + * @param[in] list pointer of array list. + * @param[in] data pointer of data. + * @return true if exists, false otherwise. */ bool u_arraylist_contains(const u_arraylist_t *list,const void *data); /** - * @brief Destroys array list and elements (assuming elements are shallow) - * @param list - * [IN] pointer of array list + * Destroys array list and elements (assuming elements are shallow). + * @param[in] list pointer of array list. */ void u_arraylist_destroy(u_arraylist_t *list); diff --git a/resource/csdk/connectivity/inc/caadapterinterface.h b/resource/csdk/connectivity/inc/caadapterinterface.h index 0d21345..f220870 100644 --- a/resource/csdk/connectivity/inc/caadapterinterface.h +++ b/resource/csdk/connectivity/inc/caadapterinterface.h @@ -1,22 +1,22 @@ -//* **************************************************************** -// -// Copyright 2014 Samsung Electronics All Rights Reserved. -// -// -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -//******************************************************************/ +/* ***************************************************************** + * + * Copyright 2015 Samsung Electronics All Rights Reserved. + * + * + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + ******************************************************************/ /** * @file @@ -35,80 +35,80 @@ extern "C" #endif /** - * @brief Starting connectivity adapters and each adapter have transport specific behavior. + * Starting connectivity adapters and each adapter have transport specific behavior. * Transport Specific Behavior: * WIFI/ETH connectivity Starts unicast server on all available IPs and defined * port number as per specification. * EDR will not start any specific servers. * LE will not start any specific servers. - * @return CA_STATUS_OK or CA_STATUS_FAILED - * ERROR CODES (CAResult_t error codes in cacommon.h) + * @return ::CA_STATUS_OK or ::CA_STATUS_FAILED + * ERROR CODES (::CAResult_t error codes in cacommon.h). */ typedef CAResult_t (*CAAdapterStart)(); /** - * @brief Starting listening server for receiving multicast search requests + * Starting listening server for receiving multicast search requests * Transport Specific Behavior: * WIFI/ETH Starts multicast server on all available IPs and defined * port number and as per specification. * EDR Starts RFCOMM Server with prefixed UUID as per specification. * LE Start GATT Server with prefixed UUID and Characteristics as per OIC Specification. - * @return CA_STATUS_OK or CA_STATUS_FAILED - * ERROR CODES (CAResult_t error codes in cacommon.h) + * @return ::CA_STATUS_OK or ::CA_STATUS_FAILED + * ERROR CODES (::CAResult_t error codes in cacommon.h). */ typedef CAResult_t (*CAAdapterStartListeningServer)(); /** - * @brief for starting discovery servers for receiving multicast advertisements + * for starting discovery servers for receiving multicast advertisements * Transport Specific Behavior: * WIFI/ETH Starts multicast server on all available IPs and defined port * number as per OIC Specification. * EDR Starts RFCOMM Server with prefixed UUID as per OIC Specification. * LE Starts GATT Server with prefixed UUID and Characteristics as per OIC Specification. - * @return CA_STATUS_OK or CA_STATUS_FAILED - * ERROR CODES (CAResult_t error codes in cacommon.h) + * @return ::CA_STATUS_OK or ::CA_STATUS_FAILED + * ERROR CODES (::CAResult_t error codes in cacommon.h). */ typedef CAResult_t (*CAAdapterStartDiscoveryServer)(); /** - * @brief Sends data to the endpoint using the adapter connectivity. + * Sends data to the endpoint using the adapter connectivity. * Note: length must be > 0. - * @param endpoint [IN] Remote Endpoint information (like ipaddress , port, + * @param[in] endpoint Remote Endpoint information (like ipaddress , port, * reference uri and connectivity type) to which the unicast data has to be sent. - * @param data [IN] Data which required to be sent. - * @param dataLen [IN] Size of data to be sent. + * @param[in] data Data which required to be sent. + * @param[in] dataLen Size of data to be sent. * @return The number of bytes sent on the network. Return value equal to -1 indicates error. */ typedef int32_t (*CAAdapterSendUnicastData)(const CAEndpoint_t *endpoint, const void *data, uint32_t dataLen); /** - * @brief Sends Multicast data to the endpoint using the adapter connectivity. + * Sends Multicast data to the endpoint using the adapter connectivity. * Note: length must be > 0. - * @param endpoint [IN] Remote Endpoint information (like ipaddress , port, - * @param data [IN] Data which required to be sent. - * @param dataLen [IN] Size of data to be sent. + * @param[in] endpoint Remote Endpoint information (like ipaddress , port, + * @param[in] data Data which required to be sent. + * @param[in] dataLen Size of data to be sent. * @return The number of bytes sent on the network. Return value equal to -1 indicates error. */ typedef int32_t (*CAAdapterSendMulticastData)(const CAEndpoint_t *endpoint, const void *data, uint32_t dataLen); /** - * @brief Get Network Information - * @param info [OUT] Local connectivity information structures - * @param size [OUT] Number of local connectivity structures. - * @return CA_STATUS_OK or ERROR CODES ( CAResult_t error codes in cacommon.h) + * Get Network Information. + * @param[out] info Local connectivity information structures + * @param[out] size Number of local connectivity structures. + * @return ::CA_STATUS_OK or ERROR CODES (::CAResult_t error codes in cacommon.h) */ typedef CAResult_t (*CAAdapterGetNetworkInfo)(CAEndpoint_t **info, uint32_t *size); /** - * @brief Read Synchronous API callback. - * @return CA_STATUS_OK or ERROR CODES ( CAResult_t error codes in cacommon.h) + * Read Synchronous API callback. + * @return ::CA_STATUS_OK or ERROR CODES (::CAResult_t error codes in cacommon.h) */ typedef CAResult_t (*CAAdapterReadData)(); /** - * @brief Stopping the adapters and close socket connections + * Stopping the adapters and close socket connections. * Transport Specific Behavior: * WIFI/ETH Stops all listening servers and close sockets. * EDR Stops all RFCOMM servers and close sockets. @@ -118,67 +118,67 @@ typedef CAResult_t (*CAAdapterReadData)(); typedef CAResult_t (*CAAdapterStop)(); /** - * @brief Terminate the connectivity adapter.Configuration information will be deleted from + * Terminate the connectivity adapter.Configuration information will be deleted from * further use. Freeing Memory of threadpool and mutexs and cleanup will be done. */ typedef void (*CAAdapterTerminate)(); /** - * @brief Connectivity handler information for adapter + * Connectivity handler information for adapter. */ typedef struct { - /** Start Transport specific functions*/ + /** Start Transport specific functions. */ CAAdapterStart startAdapter; - /** Listening Server function address*/ + /** Listening Server function address. */ CAAdapterStartListeningServer startListenServer; - /** Discovery Server function address **/ + /** Discovery Server function address. **/ CAAdapterStartDiscoveryServer startDiscoveryServer; - /** Unicast data function address**/ + /** Unicast data function address. **/ CAAdapterSendUnicastData sendData; - /** Multicast data function address**/ + /** Multicast data function address. **/ CAAdapterSendMulticastData sendDataToAll; - /** Get Networking information **/ + /** Get Networking information. **/ CAAdapterGetNetworkInfo GetnetInfo; - /** Read Data function address**/ + /** Read Data function address. **/ CAAdapterReadData readData; - /** Stop Transport specific functions*/ + /** Stop Transport specific functions. */ CAAdapterStop stopAdapter; - /** Terminate function address stored in this pointer**/ + /** Terminate function address stored in this pointer. **/ CAAdapterTerminate terminate; } CAConnectivityHandler_t; /** - * @brief This will be used during the registration of adapters call backs to the common logic - * @see CAConnectivityHandler_t , CATransportAdapter_t + * This will be used during the registration of adapters call backs to the common logic. + * @see ::CAConnectivityHandler_t , ::CATransportAdapter_t */ typedef void (*CARegisterConnectivityCallback)(CAConnectivityHandler_t handler, CATransportAdapter_t cType); /** - * @brief This will be used during the recive of network requests and response. + * This will be used during the receive of network requests and response. * @see SendUnicastData(), SendMulticastData() */ typedef void (*CANetworkPacketReceivedCallback)(const CAEndpoint_t *endPoint, const void *data, uint32_t dataLen); /** - * @brief This will be used to notify network changes to the connectivity common logic layer + * This will be used to notify network changes to the connectivity common logic layer. * @see SendUnicastData(), SendMulticastData() */ typedef void (*CANetworkChangeCallback)(const CAEndpoint_t *info, CANetworkStatus_t status); /** - * @brief This will be used to notify error result to the connectivity common logic layer + * This will be used to notify error result to the connectivity common logic layer. */ typedef void (*CAErrorHandleCallback)(const CAEndpoint_t *endpoint, const void *data, uint32_t dataLen, diff --git a/resource/csdk/connectivity/inc/caadapternetdtls.h b/resource/csdk/connectivity/inc/caadapternetdtls.h index c1d5349..dc19b9f 100644 --- a/resource/csdk/connectivity/inc/caadapternetdtls.h +++ b/resource/csdk/connectivity/inc/caadapternetdtls.h @@ -1,22 +1,22 @@ -/****************************************************************** -* -* Copyright 2014 Samsung Electronics All Rights Reserved. -* -* -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -* -******************************************************************/ +/* ***************************************************************** + * + * Copyright 2015 Samsung Electronics All Rights Reserved. + * + * + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + ******************************************************************/ #ifndef CA_ADAPTER_NET_DTLS_H_ #define CA_ADAPTER_NET_DTLS_H_ @@ -29,12 +29,12 @@ #include "cacommon.h" /** - * Currently DTLS supported adapters(2) WIFI and ETHENET for linux platform. + * Currently DTLS supported adapters(2) WIFI and ETHENET for linux platform. */ #define MAX_SUPPORTED_ADAPTERS 2 /** - * @brief The implementation will be provided by OIC RI layer. + * The implementation will be provided by OIC RI layer. */ extern void OCGetDtlsPskCredentials(CADtlsPskCredsBlob_t **credInfo); @@ -45,8 +45,7 @@ typedef void (*CAPacketSendCallback)(CAEndpoint_t *endpoint, const void *data, uint32_t dataLength); /** - * @struct stCAAdapterCallbacks_t - * @brief Data structure for holding the send and recv callbacks. + * Data structure for holding the send and recv callbacks. */ typedef struct CAAdapterCallbacks { @@ -55,26 +54,23 @@ typedef struct CAAdapterCallbacks } stCAAdapterCallbacks_t; /** - * @struct stCADtlsContext_t - * @brief Data structure for holding the tinyDTLS interface - * related info. + * Data structure for holding the tinyDTLS interface related info. */ typedef struct stCADtlsContext { - u_arraylist_t *peerInfoList; /**< peerInfo list which holds the mapping between - peer id to it's n/w address */ + u_arraylist_t *peerInfoList; /**< peerInfo list which holds the mapping between + peer id to it's n/w address. */ u_arraylist_t *cacheList; /**< PDU's are cached until DTLS session is formed. */ struct dtls_context_t *dtlsContext; /**< Pointer to tinyDTLS context. */ struct stPacketInfo *packetInfo; /**< used by callback during - decryption to hold address/length. */ + decryption to hold address/length. */ dtls_handler_t callbacks; /**< Pointer to callbacks needed by tinyDTLS. */ stCAAdapterCallbacks_t adapterCallbacks[MAX_SUPPORTED_ADAPTERS]; } stCADtlsContext_t; /** - * @struct stPacketInfo_t - * @brief Data structure for holding the decrypted data address - * and length provided by tinyDTLS callback interface. + * Data structure for holding the decrypted data address + * and length provided by tinyDTLS callback interface. */ typedef struct stPacketInfo { @@ -83,8 +79,7 @@ typedef struct stPacketInfo } stPacketInfo_t; /** - * @enum eDtlsRet_t - * @brief tinyDTLS library error codes. + * tinyDTLS library error codes. * */ typedef enum @@ -96,7 +91,7 @@ typedef enum } eDtlsRet_t; -/** Structure to have address information which will match with DTLS session_t struct.*/ +/** Structure to have address information which will match with DTLS session_t structure.*/ typedef struct { socklen_t size; /**< Size of address. */ @@ -107,13 +102,11 @@ typedef struct struct sockaddr_in sin; struct sockaddr_in6 sin6; } addr; /**< Address information. */ - uint8_t ifIndex; /**< Holds adpater index to get callback info. */ + uint8_t ifIndex; /**< Holds adapter index to get callback info. */ } stCADtlsAddrInfo_t; /** - * @struct stCACacheMessage_t - * @brief structure to holds the information of cachemessage and address info. - * + * structure to holds the information of cache message and address info. */ typedef struct CACacheMessage { @@ -124,14 +117,11 @@ typedef struct CACacheMessage /** - * @fn CADTLSSetAdapterCallbacks - * @brief Used set send and recv callbacks for different adapters(WIFI,EtherNet) - * - * @param[in] recvCallback packet received callback - * @param[in] sendCallback packet sent callback - * @param[in] type type of adapter + * Used set send and recv callbacks for different adapters(WIFI,EtherNet). * - * @retval void + * @param[in] recvCallback packet received callback. + * @param[in] sendCallback packet sent callback. + * @param[in] type type of adapter. * */ void CADTLSSetAdapterCallbacks(CAPacketReceivedCallback recvCallback, @@ -139,9 +129,8 @@ void CADTLSSetAdapterCallbacks(CAPacketReceivedCallback recvCallback, CATransportAdapter_t type); /** - * @brief Register callback to get DTLS PSK credentials. - * @param credCallback [IN] callback to get DTLS credentials - * @retval void + * Register callback to get DTLS PSK credentials. + * @param[in] credCallback callback to get DTLS credentials. */ void CADTLSSetCredentialsCallback(CAGetDTLSCredentialsHandler credCallback); @@ -153,7 +142,7 @@ void CADTLSSetCredentialsCallback(CAGetDTLSCredentialsHandler credCallback); * 0xC0A8 : TLS_PSK_WITH_AES_128_CCM_8 * 0xC0AE : TLS_ECDHE_ECDSA_WITH_AES_128_CCM_8 * - * @retval CA_STATUS_OK for success, otherwise some error value + * @retval ::CA_STATUS_OK for success, otherwise some error value */ CAResult_t CADtlsSelectCipherSuite(const dtls_cipher_t cipher); @@ -162,7 +151,7 @@ CAResult_t CADtlsSelectCipherSuite(const dtls_cipher_t cipher); * * @param[in] enable TRUE/FALSE enables/disables anonymous cipher suite * - * @retval CA_STATUS_OK for success, otherwise some error value + * @retval ::CA_STATUS_OK for success, otherwise some error value */ CAResult_t CADtlsEnableAnonECDHCipherSuite(const bool enable); @@ -171,7 +160,7 @@ CAResult_t CADtlsEnableAnonECDHCipherSuite(const bool enable); * * @param[in] endpoint information of network address * - * @retval CA_STATUS_OK for success, otherwise some error value + * @retval ::CA_STATUS_OK for success, otherwise some error value */ CAResult_t CADtlsInitiateHandshake(const CAEndpoint_t *endpoint); @@ -180,7 +169,7 @@ CAResult_t CADtlsInitiateHandshake(const CAEndpoint_t *endpoint); * * @param[in] endpoint information of network address * - * @retval CA_STATUS_OK for success, otherwise some error value + * @retval ::CA_STATUS_OK for success, otherwise some error value */ CAResult_t CADtlsClose(const CAEndpoint_t *endpoint); @@ -200,7 +189,7 @@ CAResult_t CADtlsClose(const CAEndpoint_t *endpoint); * @param[in,out] ownerPSK Output buffer for owner PSK * @param[in] ownerPSKSize Byte length of the ownerPSK to be generated * - * @retval CA_STATUS_OK for success, otherwise some error value + * @retval ::CA_STATUS_OK for success, otherwise some error value */ CAResult_t CADtlsGenerateOwnerPSK(const CAEndpoint_t *endpoint, const uint8_t* label, const size_t labelLen, @@ -210,33 +199,25 @@ CAResult_t CADtlsGenerateOwnerPSK(const CAEndpoint_t *endpoint, ; /** - * @fn CAAdapterNetDtlsInit - * @brief initialize tinyDTLS library and other necessary intialization. + * initialize tinyDTLS library and other necessary initialization. * * @return 0 on success otherwise a positive error value. - * @retval CA_STATUS_OK Successful - * @retval CA_STATUS_INVALID_PARAM Invalid input argumets - * @retval CA_STATUS_FAILED Operation failed + * @retval ::CA_STATUS_OK Successful. + * @retval ::CA_STATUS_INVALID_PARAM Invalid input arguments. + * @retval ::CA_STATUS_FAILED Operation failed. * */ CAResult_t CAAdapterNetDtlsInit(); /** - * @fn CAAdapterNetDtlsDeInit - * @brief de-inits tinyDTLS library and free the allocated memory. - * - * @return void - * + * de-inits tinyDTLS library and free the allocated memory. */ void CAAdapterNetDtlsDeInit(); /** - * @fn CAAdapterNetDtlsEncrypt - * @brief Performs DTLS encryption of the CoAP PDU. If a - * DTLS session does not exist yet with the @dst, - * a DTLS handshake will be started. In case where - * a new DTLS handshake is started, pdu info is - * cached to be send when session setup is finished. + * Performs DTLS encryption of the CoAP PDU. If a DTLS session does not exist yet + * with the @dst, a DTLS handshake will be started. In case where a new DTLS handshake + * is started, pdu info is cached to be send when session setup is finished. * * @param[in] endpoint address to which data will be sent. * @param[in] port port to which data will be sent. @@ -244,9 +225,9 @@ void CAAdapterNetDtlsDeInit(); * @param[in] dataLen length of given data * * @return 0 on success otherwise a positive error value. - * @retval CA_STATUS_OK Successful - * @retval CA_STATUS_INVALID_PARAM Invalid input argumets - * @retval CA_STATUS_FAILED Operation failed + * @retval ::CA_STATUS_OK Successful. + * @retval ::CA_STATUS_INVALID_PARAM Invalid input arguments. + * @retval ::CA_STATUS_FAILED Operation failed. * */ @@ -255,18 +236,17 @@ CAResult_t CAAdapterNetDtlsEncrypt(const CAEndpoint_t *endpoint, uint32_t dataLen); /** - * @fn CAAdapterNetDtlsDecrypt - * @brief Performs DTLS decryption of the data received on - * secure port. This method performs in-place decryption - * of the cipher-text buffer. If a DTLS handshake message - * is received or decryption failure happens, this method - * returns -1. If a valid application PDU is decrypted, it - * returns the length of the decrypted pdu. + * Performs DTLS decryption of the data received on + * secure port. This method performs in-place decryption + * of the cipher-text buffer. If a DTLS handshake message + * is received or decryption failure happens, this method + * returns -1. If a valid application PDU is decrypted, it + * returns the length of the decrypted pdu. * * @return 0 on success otherwise a positive error value. - * @retval CA_STATUS_OK Successful - * @retval CA_STATUS_INVALID_PARAM Invalid input argumets - * @retval CA_STATUS_FAILED Operation failed + * @retval ::CA_STATUS_OK Successful. + * @retval ::CA_STATUS_INVALID_PARAM Invalid input arguments. + * @retval ::CA_STATUS_FAILED Operation failed. * */ CAResult_t CAAdapterNetDtlsDecrypt(const CAEndpoint_t *endpoint, diff --git a/resource/csdk/connectivity/inc/cablockwisetransfer.h b/resource/csdk/connectivity/inc/cablockwisetransfer.h index a8ba4ce..d3f883c 100644 --- a/resource/csdk/connectivity/inc/cablockwisetransfer.h +++ b/resource/csdk/connectivity/inc/cablockwisetransfer.h @@ -36,56 +36,64 @@ #include "caprotocolmessage.h" /** - * Callback to send block data - * @param[in] data send data + * Callback to send block data. + * @param[in] data send data. */ typedef void (*CASendThreadFunc)(CAData_t *data); /** - * Callback to notify received data from the remote endpoint - * @param[in] data received data + * Callback to notify received data from the remote endpoint. + * @param[in] data received data. */ typedef void (*CAReceiveThreadFunc)(CAData_t *data); +/** + * context of blockwise transfer. + */ typedef struct { - /** send method for block data **/ + /** send method for block data. **/ CASendThreadFunc sendThreadFunc; - /** callback function for received message **/ + /** callback function for received message. **/ CAReceiveThreadFunc receivedThreadFunc; /** array list on which the thread is operating. **/ u_arraylist_t *dataList; - /** data list mutex for synchronization **/ + /** data list mutex for synchronization. **/ ca_mutex blockDataListMutex; - /** sender mutex for synchronization **/ + /** sender mutex for synchronization. **/ ca_mutex blockDataSenderMutex; } CABlockWiseContext_t; +/** + * ID set of Blockwise transfer data set(::CABlockData_t). + */ typedef struct { - uint8_t* id; /**< blockData ID for CA */ - size_t idLength; /**< length of blockData ID */ + uint8_t* id; /**< blockData ID for CA. */ + size_t idLength; /**< length of blockData ID. */ } CABlockDataID_t; +/** + * Block Data Set. + */ typedef struct { - coap_block_t block1; /**< block1 option */ - coap_block_t block2; /**< block2 option */ - uint16_t type; /**< block option type */ - CABlockDataID_t* blockDataId; /**< ID set of CABlockData */ - CAData_t *sentData; /**< sent request or response data information */ - CAPayload_t payload; /**< payload buffer */ - size_t payloadLength; /**< the total payload length to be received */ - size_t receivedPayloadLen; /**< currently received payload length */ + coap_block_t block1; /**< block1 option. */ + coap_block_t block2; /**< block2 option. */ + uint16_t type; /**< block option type. */ + CABlockDataID_t* blockDataId; /**< ID set of CABlockData. */ + CAData_t *sentData; /**< sent request or response data information. */ + CAPayload_t payload; /**< payload buffer. */ + size_t payloadLength; /**< the total payload length to be received. */ + size_t receivedPayloadLen; /**< currently received payload length. */ } CABlockData_t; /** - * CABlockState_t - * state of received block message from remote endpoint + * state of received block message from remote endpoint. */ typedef enum { @@ -110,434 +118,434 @@ extern "C" #endif /** - * Initializes the block-wise transfer context - * @param[in] CASendThreadFunc function point to add data in send queue thread - * @param[in] CAReceiveThreadFunc function point to add data in receive queue thread - * @return CA_STATUS_OK or ERROR CODES (CAResult_t error codes in cacommon.h) + * Initializes the block-wise transfer context. + * @param[in] CASendThreadFunc function point to add data in send queue thread. + * @param[in] CAReceiveThreadFunc function point to add data in receive queue thread. + * @return ::CASTATUS_OK or ERROR CODES (::CAResult_t error codes in cacommon.h). */ CAResult_t CAInitializeBlockWiseTransfer(CASendThreadFunc blockSendMethod, CAReceiveThreadFunc receivedDataCallback); /** - * Terminate the block-wise transfer context - * @return CA_STATUS_OK or ERROR CODES (CAResult_t error codes in cacommon.h) + * Terminate the block-wise transfer context. + * @return ::CASTATUS_OK or ERROR CODES (::CAResult_t error codes in cacommon.h). */ CAResult_t CATerminateBlockWiseTransfer(); /** - * initialize mutex - * @return CA_STATUS_OK or ERROR CODES (CAResult_t error codes in cacommon.h) + * initialize mutex. + * @return ::CASTATUS_OK or ERROR CODES (::CAResult_t error codes in cacommon.h). */ CAResult_t CAInitBlockWiseMutexVariables(); /** - * terminate mutex + * terminate mutex. */ void CATerminateBlockWiseMutexVariables(); /** * Pass the bulk data. if block-wise transfer process need, * bulk data will be sent to block messages. - * @param[in] data data for sending - * @return CA_STATUS_OK or ERROR CODES (CAResult_t error codes in cacommon.h) + * @param[in] data data for sending. + * @return ::CASTATUS_OK or ERROR CODES (::CAResult_t error codes in cacommon.h). */ CAResult_t CASendBlockWiseData(const CAData_t *data); /** - * Add the data to send thread queue - * @param[in] sendData data for sending - * @param[in] blockID ID set of CABlockData - * @return CA_STATUS_OK or ERROR CODES (CAResult_t error codes in cacommon.h) + * Add the data to send thread queue. + * @param[in] sendData data for sending. + * @param[in] blockID ID set of CABlockData. + * @return ::CASTATUS_OK or ERROR CODES (::CAResult_t error codes in cacommon.h). */ CAResult_t CAAddSendThreadQueue(const CAData_t *sendData, const CABlockDataID_t *blockID); /** * Check the block option type. If it has to be sent to a block, * block option will be set. - * @param[in] currData block data - * @return CA_STATUS_OK or ERROR CODES (CAResult_t error codes in cacommon.h) + * @param[in] currData block data. + * @return ::CASTATUS_OK or ERROR CODES (::CAResult_t error codes in cacommon.h). */ CAResult_t CACheckBlockOptionType(CABlockData_t *currData); /** * Pass the received pdu data. and check if block option is set. - * @param[in] pdu received pdu binary data - * @param[in] endpoint information of remote device - * @param[in] receivedData received CAData - * @param[in] dataLen received data length - * @return CA_STATUS_OK or ERROR CODES (CAResult_t error codes in cacommon.h) + * @param[in] pdu received pdu binary data. + * @param[in] endpoint information of remote device. + * @param[in] receivedData received CAData. + * @param[in] dataLen received data length. + * @return ::CASTATUS_OK or ERROR CODES (::CAResult_t error codes in cacommon.h). */ CAResult_t CAReceiveBlockWiseData(coap_pdu_t *pdu, const CAEndpoint_t *endpoint, const CAData_t *receivedData, size_t dataLen); /** - * process next step by block-wise state - * @param[in] pdu received pdu binary data - * @param[in] receivedData received CAData - * @param[in] blockWiseStatus block-wise state to move next step - * @param[in] blockID ID set of CABlockData - * @return CA_STATUS_OK or ERROR CODES (CAResult_t error codes in cacommon.h) + * process next step by block-wise state. + * @param[in] pdu received pdu binary data. + * @param[in] receivedData received CAData. + * @param[in] blockWiseStatus block-wise state to move next step. + * @param[in] blockID ID set of CABlockData. + * @return ::CASTATUS_OK or ERROR CODES (::CAResult_t error codes in cacommon.h). */ CAResult_t CAProcessNextStep(const coap_pdu_t *pdu, const CAData_t *receivedData, uint8_t blockWiseStatus, const CABlockDataID_t *blockID); /** - * send block message to remote device - * @param[in] pdu received pdu binary data - * @param[in] msgType the message type of the block - * @param[in] status block-wise state to move next step - * @param[in] blockID ID set of CABlockData - * @return CA_STATUS_OK or ERROR CODES (CAResult_t error codes in cacommon.h) + * send block message to remote device. + * @param[in] pdu received pdu binary data. + * @param[in] msgType the message type of the block. + * @param[in] status block-wise state to move next step. + * @param[in] blockID ID set of CABlockData. + * @return ::CASTATUS_OK or ERROR CODES (::CAResult_t error codes in cacommon.h). */ CAResult_t CASendBlockMessage(const coap_pdu_t *pdu, CAMessageType_t msgType, uint8_t status, const CABlockDataID_t *blockID); /** - * send error message to remote device - * @param[in] pdu received pdu binary data - * @param[in] status block-wise state to move next step - * @param[in] responseResult response result code - * @param[in] blockID ID set of CABlockData - * @return CA_STATUS_OK or ERROR CODES (CAResult_t error codes in cacommon.h) + * send error message to remote device. + * @param[in] pdu received pdu binary data. + * @param[in] status block-wise state to move next step. + * @param[in] responseResult response result code. + * @param[in] blockID ID set of CABlockData. + * @return ::CASTATUS_OK or ERROR CODES (::CAResult_t error codes in cacommon.h). */ CAResult_t CASendErrorMessage(const coap_pdu_t *pdu, uint8_t status, CAResponseResult_t responseResult, const CABlockDataID_t *blockID); /** - * receive last block data - * @param[in] blockID ID set of CABlockData - * @param[in] receivedData received CAData - * @return CA_STATUS_OK or ERROR CODES (CAResult_t error codes in cacommon.h) + * receive last block data. + * @param[in] blockID ID set of CABlockData. + * @param[in] receivedData received CAData. + * @return ::CASTATUS_OK or ERROR CODES (::CAResult_t error codes in cacommon.h). */ CAResult_t CAReceiveLastBlock(const CABlockDataID_t *blockID, const CAData_t *receivedData); /** - * set next block option 1 - * @param[in] pdu received pdu binary data - * @param[in] endpoint information of remote device - * @param[in] receivedData received CAData - * @param[in] block block option data - * @param[in] dataLen received data length - * @return CA_STATUS_OK or ERROR CODES (CAResult_t error codes in cacommon.h) + * set next block option 1. + * @param[in] pdu received pdu binary data. + * @param[in] endpoint information of remote device. + * @param[in] receivedData received CAData. + * @param[in] block block option data. + * @param[in] dataLen received data length. + * @return ::CASTATUS_OK or ERROR CODES (::CAResult_t error codes in cacommon.h). */ CAResult_t CASetNextBlockOption1(coap_pdu_t *pdu, const CAEndpoint_t *endpoint, const CAData_t *receivedData, coap_block_t block, size_t dataLen); /** - * set next block option 2 - * @param[in] pdu received pdu binary data - * @param[in] endpoint information of remote device - * @param[in] receivedData received CAData - * @param[in] block block option data - * @param[in] dataLen received data length - * @return CA_STATUS_OK or ERROR CODES (CAResult_t error codes in cacommon.h) + * set next block option 2. + * @param[in] pdu received pdu binary data. + * @param[in] endpoint information of remote device. + * @param[in] receivedData received CAData. + * @param[in] block block option data. + * @param[in] dataLen received data length. + * @return ::CASTATUS_OK or ERROR CODES (::CAResult_t error codes in cacommon.h). */ CAResult_t CASetNextBlockOption2(coap_pdu_t *pdu, const CAEndpoint_t *endpoint, const CAData_t *receivedData, coap_block_t block, size_t dataLen); /** - * Update the block option in block-wise transfer list - * @param[in] currData stored block data information - * @param[in] block block option to update - * @param[in] msgType message type of pdu - * @param[in] blockType block option type - * @return CA_STATUS_OK or ERROR CODES (CAResult_t error codes in cacommon.h) + * Update the block option in block-wise transfer list. + * @param[in] currData stored block data information. + * @param[in] block block option to update. + * @param[in] msgType message type of pdu. + * @param[in] blockType block option type. + * @return ::CASTATUS_OK or ERROR CODES (::CAResult_t error codes in cacommon.h). */ CAResult_t CANegotiateBlockSize(CABlockData_t *currData, coap_block_t *block, CAMessageType_t msgType, uint16_t blockType); /** - * Update the block option in block-wise transfer list - * @param[in] currData stored block data information - * @param[in] block block option of current message - * @param[in] blockType block option type - * @return CA_STATUS_OK or ERROR CODES (CAResult_t error codes in cacommon.h) + * Update the block option in block-wise transfer list. + * @param[in] currData stored block data information. + * @param[in] block block option of current message. + * @param[in] blockType block option type. + * @return ::CASTATUS_OK or ERROR CODES (::CAResult_t error codes in cacommon.h). */ CAResult_t CAUpdateBlockData(CABlockData_t *currData, coap_block_t block, uint16_t blockType); /** - * Update the messageId in block-wise transfer list - * @param[in] pdu received pdu binary data - * @param[in] blockID ID set of CABlockData - * @return CA_STATUS_OK or ERROR CODES (CAResult_t error codes in cacommon.h) + * Update the messageId in block-wise transfer list. + * @param[in] pdu received pdu binary data. + * @param[in] blockID ID set of CABlockData. + * @return ::CASTATUS_OK or ERROR CODES (::CAResult_t error codes in cacommon.h). */ CAResult_t CAUpdateMessageId(coap_pdu_t *pdu, const CABlockDataID_t *blockID); /** - * Update the block option items - * @param[in] currData stored block data information - * @param[in] pdu received pdu binary data - * @param[in/out] block block option of current message - * @param[in] blockType block option type - * @param[in] status current flow status for block-wise transfer - * @return CA_STATUS_OK or ERROR CODES (CAResult_t error codes in cacommon.h) + * Update the block option items. + * @param[in] currData stored block data information. + * @param[in] pdu received pdu binary data. + * @param[in/out] block block option of current message. + * @param[in] blockType block option type. + * @param[in] status current flow status for block-wise transfer. + * @return ::CASTATUS_OK or ERROR CODES (::CAResult_t error codes in cacommon.h). */ CAResult_t CAUpdateBlockOptionItems(CABlockData_t *currData, const coap_pdu_t *pdu, coap_block_t *block, uint16_t blockType, uint32_t status); /** - * Set the M-bit of block option - * @param[in] payloadLen payload length of current bulk data - * @param[out] block block option - * @return CA_STATUS_OK or ERROR CODES (CAResult_t error codes in cacommon.h) + * Set the M-bit of block option. + * @param[in] payloadLen payload length of current bulk data. + * @param[out] block block option. + * @return ::CASTATUS_OK or ERROR CODES (::CAResult_t error codes in cacommon.h). */ CAResult_t CAGetMoreBitFromBlock(size_t payloadLen, coap_block_t *block); /** * check the block option what kind of option have to set. - * @param[out] pdu pdu object - * @param[in] info information of the request/response - * @param[in] endpoint port of transport - * @return CA_STATUS_OK or ERROR CODES (CAResult_t error codes in cacommon.h) + * @param[out] pdu pdu object. + * @param[in] info information of the request/response. + * @param[in] endpoint port of transport. + * @return ::CASTATUS_OK or ERROR CODES (::CAResult_t error codes in cacommon.h). */ CAResult_t CAAddBlockOption(coap_pdu_t **pdu, const CAInfo_t info, const CAEndpoint_t *endpoint); /** * Write the block option2 in pdu binary data. - * @param[out] pdu pdu object - * @param[in] info information of the request/response - * @param[in] dataLength length of payload - * @param[in] blockID ID set of CABlockData - * @return CA_STATUS_OK or ERROR CODES (CAResult_t error codes in cacommon.h) + * @param[out] pdu pdu object. + * @param[in] info information of the request/response. + * @param[in] dataLength length of payload. + * @param[in] blockID ID set of CABlockData. + * @return ::CASTATUS_OK or ERROR CODES (::CAResult_t error codes in cacommon.h). */ CAResult_t CAAddBlockOption2(coap_pdu_t **pdu, const CAInfo_t info, size_t dataLength, const CABlockDataID_t *blockID); /** * Write the block option1 in pdu binary data. - * @param[out] pdu pdu object - * @param[in] info information of the request/response - * @param[in] dataLength length of payload - * @param[in] blockID ID set of CABlockData - * @return CA_STATUS_OK or ERROR CODES (CAResult_t error codes in cacommon.h) + * @param[out] pdu pdu object. + * @param[in] info information of the request/response. + * @param[in] dataLength length of payload. + * @param[in] blockID ID set of CABlockData. + * @return ::CASTATUS_OK or ERROR CODES (::CAResult_t error codes in cacommon.h). */ CAResult_t CAAddBlockOption1(coap_pdu_t **pdu, const CAInfo_t info, size_t dataLength, const CABlockDataID_t *blockID); /** - * Add the block option in pdu data - * @param[in] pdu pdu object - * @param[out] block block data - * @param[in] blockType block option type - * @return CA_STATUS_OK or ERROR CODES (CAResult_t error codes in cacommon.h) + * Add the block option in pdu data. + * @param[in] pdu pdu object. + * @param[out] block block data. + * @param[in] blockType block option type. + * @return ::CASTATUS_OK or ERROR CODES (::CAResult_t error codes in cacommon.h). */ CAResult_t CAAddBlockOptionImpl(coap_pdu_t *pdu, coap_block_t *block, uint8_t blockType); /** - * Add the size option in pdu data - * @param[in/out] pdu pdu object - * @param[in] sizeType size option type - * @param[in] dataLength the total payload length to be sent - * @return CA_STATUS_OK or ERROR CODES (CAResult_t error codes in cacommon.h) + * Add the size option in pdu data. + * @param[in/out] pdu pdu object. + * @param[in] sizeType size option type. + * @param[in] dataLength the total payload length to be sent. + * @return ::CASTATUS_OK or ERROR CODES (::CAResult_t error codes in cacommon.h). */ CAResult_t CAAddBlockSizeOption(coap_pdu_t *pdu, uint16_t sizeType, size_t dataLength); /** - * Get the size option from pdu data - * @param[in] pdu pdu object - * @param[in] sizeType size option type - * @param[out] totalPayloadLen the total payload length to be received - * @return true or false + * Get the size option from pdu data. + * @param[in] pdu pdu object. + * @param[in] sizeType size option type. + * @param[out] totalPayloadLen the total payload length to be received. + * @return true or false. */ bool CAIsPayloadLengthInPduWithBlockSizeOption(coap_pdu_t *pdu, uint16_t sizeType, size_t *totalPayloadLen); /** - * update the total payload with the received payload - * @param[in] currData stored block data information - * @param[in] receivedData received CAData - * @param[in] status block-wise state - * @param[in] isSizeOption size option - * @param[in] blockType block option type - * @return CA_STATUS_OK or ERROR CODES (CAResult_t error codes in cacommon.h) + * update the total payload with the received payload. + * @param[in] currData stored block data information. + * @param[in] receivedData received CAData. + * @param[in] status block-wise state. + * @param[in] isSizeOption size option. + * @param[in] blockType block option type. + * @return ::CASTATUS_OK or ERROR CODES (::CAResult_t error codes in cacommon.h). */ CAResult_t CAUpdatePayloadData(CABlockData_t *currData, const CAData_t *receivedData, uint8_t status, bool isSizeOption, uint16_t blockType); /** * Generate CAData structure from the given information. - * @param[in] pdu pdu object - * @param[in] endpoint information of remote device - * @return generated CAData + * @param[in] pdu pdu object. + * @param[in] endpoint information of remote device. + * @return generated CAData. */ CAData_t* CACreateNewDataSet(const coap_pdu_t *pdu, const CAEndpoint_t *endpoint); /** - * Update the block option items - * @param[in/out] blockblock option of current message - * @param[in] blockType block option type - * @param[in] responseResult result code of pdu - * @return CA_STATUS_OK or ERROR CODES (CAResult_t error codes in cacommon.h) + * Update the block option items. + * @param[in/out] blockblock option of current message. + * @param[in] blockType block option type. + * @param[in] responseResult result code of pdu. + * @return ::CASTATUS_OK or ERROR CODES (::CAResult_t error codes in cacommon.h). */ CAResult_t CAHandleBlockErrorResponse(coap_block_t *block, uint16_t blockType, uint32_t responseResult); /** - * Check the received payload and if an error happens, return error type - * @param[in/out] currData stored block data information - * @param[in] receivedBlock received block option - * @param[in] receivedData message type of pdu - * @param[in] blockType block option type - * @param[in] dataLen received data length - * @return block state + * Check the received payload and if an error happens, return error type. + * @param[in/out] currData stored block data information. + * @param[in] receivedBlock received block option. + * @param[in] receivedData message type of pdu. + * @param[in] blockType block option type. + * @param[in] dataLen received data length. + * @return block state. */ uint8_t CACheckBlockErrorType(CABlockData_t *currData, coap_block_t *receivedBlock, const CAData_t *receivedData, uint16_t blockType, size_t dataLen); /** - * Destroys the given CAData - * @param[in] data CAData to destroy - * @return generated CAData + * Destroys the given CAData. + * @param[in] data CAData to destroy. + * @return generated CAData. */ void CADestroyDataSet(CAData_t* data); /** - * Create the blockId for CABlockData - * @param[in] token token of current message - * @param[in] tokenLength token length of current message - * @param[in] portNumber port - * @return ID set of CABlockData + * Create the blockId for CABlockData. + * @param[in] token token of current message. + * @param[in] tokenLength token length of current message. + * @param[in] portNumber port. + * @return ID set of CABlockData. */ CABlockDataID_t* CACreateBlockDatablockId(const CAToken_t token, uint8_t tokenLength, uint16_t portNumber); /** - * Destroy the blockId set - * @param[in] blockID ID set of CABlockData + * Destroy the blockId set. + * @param[in] blockID ID set of CABlockData. */ void CADestroyBlockID(CABlockDataID_t *blockID); /** - * check whether Block ID is matched or not - * @param[in] currData block data - * @param[in] blockID ID set of CABlockData - * @return true or false + * check whether Block ID is matched or not. + * @param[in] currData block data. + * @param[in] blockID ID set of CABlockData. + * @return true or false. */ bool CABlockidMatches(const CABlockData_t *currData, const CABlockDataID_t *blockID); /** - * Print the given block option information - * @param[in] block block option information + * Print the given block option information. + * @param[in] block block option information. */ void CALogBlockInfo(coap_block_t *block); /** - * Create new CAData structure from the input information - * @param[in] data CAData information that needs to be duplicated - * @return created CAData structure + * Create new CAData structure from the input information. + * @param[in] data CAData information that needs to be duplicated. + * @return created CAData structure. */ CAData_t *CACloneCAData(const CAData_t *data); /** - * Update payload from the input information - * @param[in] data CAData information that needs to be updated - * @param[in] payload received new payload from the remote endpoint - * @param[in] payloadLen received full payload length - * @return CA_STATUS_OK or ERROR CODES (CAResult_t error codes in cacommon.h) + * Update payload from the input information. + * @param[in] data CAData information that needs to be updated. + * @param[in] payload received new payload from the remote endpoint. + * @param[in] payloadLen received full payload length. + * @return ::CASTATUS_OK or ERROR CODES (::CAResult_t error codes in cacommon.h). */ CAResult_t CAUpdatePayloadToCAData(CAData_t *data, const CAPayload_t payload, size_t payloadLen); /** - * Get payload and payload length from the input information - * @param[in] data CAData information + * Get payload and payload length from the input information. + * @param[in] data CAData information. * @param[out] payloadLen The payload length is stored. - * @return payload + * @return payload. */ CAPayload_t CAGetPayloadInfo(const CAData_t *data, size_t *payloadLen); /** - * Set the block option type - * @param[in] blockID ID set of CABlockData - * @param[in] blockType block option type - * @return CA_STATUS_OK or ERROR CODES (CAResult_t error codes in cacommon.h) + * Set the block option type. + * @param[in] blockID ID set of CABlockData. + * @param[in] blockType block option type. + * @return ::CASTATUS_OK or ERROR CODES (::CAResult_t error codes in cacommon.h). */ CAResult_t CAUpdateBlockOptionType(const CABlockDataID_t *blockID, uint8_t blockType); /** - * Get the block option type from block-wise transfer list - * @param[in] blockID ID set of CABlockData - * @return block option type + * Get the block option type from block-wise transfer list. + * @param[in] blockID ID set of CABlockData. + * @return block option type. */ uint8_t CAGetBlockOptionType(const CABlockDataID_t *blockID); /** - * Get the block data from block-wise transfer list - * @param[in] blockID ID set of CABlockData - * @return CAData structure + * Get the block data from block-wise transfer list. + * @param[in] blockID ID set of CABlockData. + * @return CAData structure. */ CAData_t *CAGetDataSetFromBlockDataList(const CABlockDataID_t *blockID); /** - * Get token from block-wise transfer list - * @param[in] pdu received pdu binary data - * @param[in] endpoint remote endpoint information - * @param[in] responseInfo received response information - * @return CA_STATUS_OK or ERROR CODES (CAResult_t error codes in cacommon.h) + * Get token from block-wise transfer list. + * @param[in] pdu received pdu binary data. + * @param[in] endpoint remote endpoint information. + * @param[in] responseInfo received response information. + * @return ::CASTATUS_OK or ERROR CODES (::CAResult_t error codes in cacommon.h). */ CAResult_t CAGetTokenFromBlockDataList(const coap_pdu_t *pdu, const CAEndpoint_t *endpoint, CAResponseInfo_t *responseInfo); /** - * check whether the block data is valid or not - * @param[in] sendData CAData information - * @param[out] blockData block data when it is valid - * @return CA_STATUS_OK or ERROR CODES (CAResult_t error codes in cacommon.h) + * check whether the block data is valid or not. + * @param[in] sendData CAData information. + * @param[out] blockData block data when it is valid. + * @return ::CASTATUS_OK or ERROR CODES (::CAResult_t error codes in cacommon.h). */ CAResult_t CACheckBlockDataValidation(const CAData_t *sendData, CABlockData_t **blockData); /** - * Get the block data from block-wise transfer list - * @param[in] blockID ID set of CABlockData - * @return CABlockData_t structure + * Get the block data from block-wise transfer list. + * @param[in] blockID ID set of CABlockData. + * @return CABlockData_t structure. */ CABlockData_t *CAGetBlockDataFromBlockDataList(const CABlockDataID_t *blockID); /** - * Get the block option from block-wise transfer list - * @param[in] blockID ID set of CABlockData - * @param[in] blockType block option type - * @return coap_block_t structure + * Get the block option from block-wise transfer list. + * @param[in] blockID ID set of CABlockData. + * @param[in] blockType block option type. + * @return coap_block_t structure. */ coap_block_t *CAGetBlockOption(const CABlockDataID_t *blockID, uint16_t blockType); /** - * Get the full payload from block-wise list - * @param[in] blockID ID set of CABlockData - * @param[out] fullPayloadLen received full payload length - * @return payload + * Get the full payload from block-wise list. + * @param[in] blockID ID set of CABlockData. + * @param[out] fullPayloadLen received full payload length. + * @return payload. */ CAPayload_t CAGetPayloadFromBlockDataList(const CABlockDataID_t *blockID, size_t *fullPayloadLen); /** - * Create the block data from given data and add the data in block-wise transfer list - * @param[in] sendData data to be added to a list - * @return created CABlockData_t structure - * and NULL point will be returned if there is error case. + * Create the block data from given data and add the data in block-wise transfer list. + * @param[in] sendData data to be added to a list. + * @return created CABlockData_t structure. + * and NULL point will be returned if there is error case.. */ CABlockData_t *CACreateNewBlockData(const CAData_t *sendData); /** - * Remove the block data in block-wise transfer list - * @param[in] blockID ID set of CABlockData - * @return CA_STATUS_OK or ERROR CODES (CAResult_t error codes in cacommon.h) + * Remove the block data in block-wise transfer list. + * @param[in] blockID ID set of CABlockData. + * @return ::CASTATUS_OK or ERROR CODES (::CAResult_t error codes in cacommon.h). */ CAResult_t CARemoveBlockDataFromList(const CABlockDataID_t *blockID); /** * Check if data exist in block-wise transfer list. - * @param[in] blockID ID set of CABlockData - * @return true or false + * @param[in] blockID ID set of CABlockData. + * @return true or false. */ bool CAIsBlockDataInList(const CABlockDataID_t *blockID); diff --git a/resource/csdk/connectivity/inc/caedradapter.h b/resource/csdk/connectivity/inc/caedradapter.h index ff613dd..7c4a868 100644 --- a/resource/csdk/connectivity/inc/caedradapter.h +++ b/resource/csdk/connectivity/inc/caedradapter.h @@ -49,7 +49,7 @@ extern "C" * @param[in] errorCallback errorCallback to notify error to connectivity common logic * layer from adapter. * @param[in] handle Threadpool Handle. - * @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 CAInitializeEDR(CARegisterConnectivityCallback registerCallback, CANetworkPacketReceivedCallback reqRespCallback, @@ -59,7 +59,7 @@ CAResult_t CAInitializeEDR(CARegisterConnectivityCallback registerCallback, /** * Starts EDR connectivity adapters. * As its peer to peer it does not require to start any servers. - * @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 CAStartEDR(); @@ -67,7 +67,7 @@ CAResult_t CAStartEDR(); * Starts listening server for receiving multicast search requests. * Starts RFCOMM Server with prefixed UUID as per OIC specification. * - * @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 CAStartEDRListeningServer(); @@ -75,7 +75,7 @@ CAResult_t CAStartEDRListeningServer(); * Starting discovery server for receiving multicast advertisements. * Starts RFCOMM Server with prefixed UUID as per OIC specification. * - * @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 CAStartEDRDiscoveryServer(); @@ -107,19 +107,19 @@ int32_t CASendEDRMulticastData(const CAEndpoint_t *endpoint, const void *data, * @param[out] info Array of local connectivity information structures. * @param[out] size Size of the array @info. * - * @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 CAGetEDRInterfaceInformation(CAEndpoint_t **info, uint32_t *size); /** * Read Synchronous API callback. - * @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 CAReadEDRData(); /** * EDR Stops all RFCOMM servers and close sockets. - * @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 CAStopEDR(); @@ -132,7 +132,7 @@ void CATerminateEDR(); /** * Initializes the adapter queues. * This will initiates both server and receiver adapter queues. - * @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 CAAdapterStartQueue(); diff --git a/resource/csdk/connectivity/inc/caedrinterface.h b/resource/csdk/connectivity/inc/caedrinterface.h index 989faa4..eacdf79 100644 --- a/resource/csdk/connectivity/inc/caedrinterface.h +++ b/resource/csdk/connectivity/inc/caedrinterface.h @@ -42,7 +42,7 @@ extern "C" typedef enum { STATE_DISCONNECTED, /**< State is Disconnected. */ - STATE_CONNECTED /**< State is Connected. */ + STATE_CONNECTED /**< State is Connected. */ } CAConnectedState_t; typedef struct connected_state @@ -205,7 +205,7 @@ void CAEDRSetErrorHandler(CAEDRErrorHandleCallback errorHandleCallback); * * @return ::CA_STATUS_OK or Appropriate error code. * @retval ::CA_STATUS_OK Successful. - * @retval ::CA_STATUS_INVALID_PARAM Invalid input argumets. + * @retval ::CA_STATUS_INVALID_PARAM Invalid input arguments. * @retval ::CA_STATUS_FAILED Operation failed. * * @see CALocalConnectivity_t @@ -223,7 +223,7 @@ CAResult_t CAEDRGetInterfaceInformation(CAEndpoint_t **info); * * @return ::CA_STATUS_OK or Appropriate error code. * @retval ::CA_STATUS_OK Successful. - * @retval ::CA_STATUS_INVALID_PARAM Invalid input argumets. + * @retval ::CA_STATUS_INVALID_PARAM Invalid input arguments. * @retval ::CA_STATUS_FAILED Operation failed. * */ diff --git a/resource/csdk/connectivity/inc/cafragmentation.h b/resource/csdk/connectivity/inc/cafragmentation.h index a092d0b..a10f9f2 100644 --- a/resource/csdk/connectivity/inc/cafragmentation.h +++ b/resource/csdk/connectivity/inc/cafragmentation.h @@ -32,93 +32,79 @@ #include "logger.h" /** - * @var MAX_DATA_LENGTH_SUPPORTED - * @brief From the adapter level, this is the maximum data length is supported - * for the data transmission. + * From the adapter level, this is the maximum data length is supported + * for the data transmission. */ #define MAX_DATA_LENGTH_SUPPORTED 4095 /** - * @var NUMBER_OF_BITS_TO_IDENTIFY_DATA - * @brief The number of bits allocated to represent data length in header. + * The number of bits allocated to represent data length in header. */ #define NUMBER_OF_BITS_TO_IDENTIFY_DATA 12 /** - * @var NUMBER_OF_BITS_IN_CA_HEADER - * @brief The length of the header in bits. + * The length of the header in bits. */ #define NUMBER_OF_BITS_IN_CA_HEADER 15 /** - * @var CA_HEADER_LENGTH - * @brief The length of the header in bytes. + * The length of the header in bytes. */ #define CA_HEADER_LENGTH 2 /** - * @var CA_SUPPORTED_BLE_MTU_SIZE - * @brief The MTU supported for BLE adapter + * The MTU supported for BLE adapter */ #define CA_SUPPORTED_BLE_MTU_SIZE 20 #ifdef __TIZEN__ /** - * @var PLATFORM_IDENTIFIER_BIT - * @brief Reserved bit to differentiating the platform. Currently not in use. + * Reserved bit to differentiating the platform. Currently not in use. */ #define PLATFORM_IDENTIFIER_BIT 1 /** - * @var CA_SUPPORTED_EDR_MTU_SIZE - * @brief The MTU supported from Tizen platform for EDR adapter. + * The MTU supported from Tizen platform for EDR adapter. */ #define CA_SUPPORTED_EDR_MTU_SIZE 512 #elif __ANDROID__ /** - * @var PLATFORM_IDENTIFIER_BIT - * @brief Reserved bit to differentiating the platform. Currently not in use. + * Reserved bit to differentiating the platform. Currently not in use. */ #define PLATFORM_IDENTIFIER_BIT 0 /** - * @var CA_SUPPORTED_EDR_MTU_SIZE - * @brief The MTU supported from Android platform for EDR adapter. + * The MTU supported from Android platform for EDR adapter. */ #define CA_SUPPORTED_EDR_MTU_SIZE 200 #elif __ARDUINO__ /** - * @var PLATFORM_IDENTIFIER_BIT - * @brief Reserved bit to differentiating the platform. Currently not in use. + * Reserved bit to differentiating the platform. Currently not in use. */ #define PLATFORM_IDENTIFIER_BIT 0 /** - * @var CA_SUPPORTED_EDR_MTU_SIZE - * @brief The MTU supported from Arduino platform for EDR adapter. + * The MTU supported from Arduino platform for EDR adapter. */ #define CA_SUPPORTED_EDR_MTU_SIZE 200 #else //Other Platforms /** - * @var PLATFORM_IDENTIFIER_BIT - * @brief Reserved bit to differentiating the platform. Currently not in use. + * Reserved bit to differentiating the platform. Currently not in use. */ #define PLATFORM_IDENTIFIER_BIT 0 /** - * @var CA_SUPPORTED_EDR_MTU_SIZE - * @brief The MTU supported for EDR adapter + * The MTU supported for EDR adapter */ #define CA_SUPPORTED_EDR_MTU_SIZE 200 #endif /** - * @var HEADER_VERSION - * @brief Current Header version. + * Current Header version. */ #define HEADER_VERSION 1 @@ -129,48 +115,46 @@ extern "C" /***************************************************************** * @file The CA Header format - * @brief CA Header will be defined by 2 bytes of Header. + * CA Header will be defined by 2 bytes of Header. * First two bits : Header version(Currently Its not being used) * Third bit and fourth bit: Reserved bits for future use. * 5th to 16th bit : 12 bits to provide the length of the data. *****************************************************************/ /** -* @fn CAGenerateHeader -* @brief This function is used to generate the CA specific header to -* maintain the fragmentation logic. The header structure -* explained above will be formed and returned to the caller. -* -* @param[in,out] header Pointer to the octet array that will contain -* the generated header. -* @param[in] length The total length of the data. The length will -* be embedded in bits 5-16 of the header, -* meaning the maximum overall length of the -* data to be fragmented can be no more than 4096 -* (2^12). -* -* @return @c CA_STATUS_OK on success. One of the @c CA_STATUS_FAILED or -* other error values on error. -* @retval @c CA_STATUS_OK Successful -* @retval @c CA_STATUS_INVALID_PARAM Invalid input arguments -* @retval @c CA_STATUS_FAILED Operation failed + * This function is used to generate the CA specific header to + * maintain the fragmentation logic. The header structure + * explained above will be formed and returned to the caller. + * + * @param[in,out] header Pointer to the octet array that will contain + * the generated header. + * @param[in] length The total length of the data. The length will + * be embedded in bits 5-16 of the header, + * meaning the maximum overall length of the + * data to be fragmented can be no more than 4096 + * (2^12). + * + * @return ::CA_STATUS_OK on success. One of the ::CA_STATUS_FAILED or + * other error values on error. + * @retval ::CA_STATUS_OK Successful + * @retval ::CA_STATUS_INVALID_PARAM Invalid input arguments + * @retval ::CA_STATUS_FAILED Operation failed */ CAResult_t CAGenerateHeader(char *header, uint32_t length); /** -* @fn CAParseHeader -* @brief This function is used to parse the header in the receiver -* end. This function will provide the information of the total -* length of the data which has been fragmented. -* -* @param[in] header Pointer to the octet array data which contains the -* header information. Note that pointer should -* point to two bytes of data header which needs to -* be parsed. -* -* @return Overall length of the data to be reassembled, or 0 on -* failure. -*/ + * This function is used to parse the header in the receiver + * end. This function will provide the information of the total + * length of the data which has been fragmented. + * + * @param[in] header Pointer to the octet array data which contains the + * header information. Note that pointer should + * point to two bytes of data header which needs to + * be parsed. + * + * @return Overall length of the data to be reassembled, or 0 on + * failure. + */ uint32_t CAParseHeader(const char *header); #ifdef __cplusplus diff --git a/resource/csdk/connectivity/inc/cainterfacecontroller.h b/resource/csdk/connectivity/inc/cainterfacecontroller.h index f6fdb63..94216d8 100644 --- a/resource/csdk/connectivity/inc/cainterfacecontroller.h +++ b/resource/csdk/connectivity/inc/cainterfacecontroller.h @@ -75,7 +75,7 @@ void CASetNetworkChangeCallback(CANetworkChangeCallback callback); /** * 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 +100,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 +109,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 +118,20 @@ 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(); /** * 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 +143,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 diff --git a/resource/csdk/connectivity/inc/caipadapter.h b/resource/csdk/connectivity/inc/caipadapter.h index 643cffc..fe280f8 100644 --- a/resource/csdk/connectivity/inc/caipadapter.h +++ b/resource/csdk/connectivity/inc/caipadapter.h @@ -132,4 +132,4 @@ void CATerminateIP(); } /* extern "C" */ #endif -#endif // #ifndef CA_IP_ADAPTER_H_ +#endif // CA_IP_ADAPTER_H_ diff --git a/resource/csdk/connectivity/inc/camessagehandler.h b/resource/csdk/connectivity/inc/camessagehandler.h index 7dd323d..4ec1cad 100644 --- a/resource/csdk/connectivity/inc/camessagehandler.h +++ b/resource/csdk/connectivity/inc/camessagehandler.h @@ -19,7 +19,7 @@ ******************************************************************/ /** - * @file camessagehandler.h + * @file * This file contains message functionality. */ @@ -63,87 +63,87 @@ extern "C" #endif /** - * Detaches control from the caller for sending unicast request - * @param[IN] endpoint endpoint information where the data has to be sent - * @param[IN] request request that needs to be sent - * @return CA_STATUS_OK or ERROR CODES (CAResult_t error codes in cacommon.h) + * Detaches control from the caller for sending unicast request. + * @param[in] endpoint endpoint information where the data has to be sent. + * @param[in] request request that needs to be sent. + * @return ::CA_STATUS_OK or ERROR CODES (::CAResult_t error codes in cacommon.h). */ CAResult_t CADetachRequestMessage(const CAEndpoint_t *endpoint, const CARequestInfo_t *request); /** - * Detaches control from the caller for sending multicast request - * @param[IN] object Group endpoint information where the data has to be sent - * @param[IN] request request that needs to be sent - * @return CA_STATUS_OK or ERROR CODES (CAResult_t error codes in cacommon.h) + * Detaches control from the caller for sending multicast request. + * @param[in] object Group endpoint information where the data has to be sent. + * @param[in] request request that needs to be sent. + * @return ::CA_STATUS_OK or ERROR CODES (::CAResult_t error codes in cacommon.h). */ CAResult_t CADetachRequestToAllMessage(const CAEndpoint_t *object, const CARequestInfo_t *request); /** - * Detaches control from the caller for sending response - * @param[IN] endpoint endpoint information where the data has to be sent - * @param[IN] response response that needs to be sent - * @return CA_STATUS_OK or ERROR CODES (CAResult_t error codes in cacommon.h) + * Detaches control from the caller for sending response. + * @param[in] endpoint endpoint information where the data has to be sent. + * @param[in] response response that needs to be sent. + * @return ::CA_STATUS_OK or ERROR CODES (::CAResult_t error codes in cacommon.h). */ CAResult_t CADetachResponseMessage(const CAEndpoint_t *endpoint, const CAResponseInfo_t *response); /** - * Detaches control from the caller for sending request - * @param[IN] resourceUri resource uri that needs to be sent in the request - * @param[IN] token token information of the request - * @param[IN] tokenLength length of the token - * @param[IN] options header options that need to be append in the request - * @param[IN] numOptions number of options be appended - * @return CA_STATUS_OK or ERROR CODES (CAResult_t error codes in cacommon.h) + * Detaches control from the caller for sending request. + * @param[in] resourceUri resource uri that needs to be sent in the request. + * @param[in] token token information of the request. + * @param[in] tokenLength length of the token. + * @param[in] options header options that need to be append in the request. + * @param[in] numOptions number of options be appended. + * @return ::CA_STATUS_OK or ERROR CODES (::CAResult_t error codes in cacommon.h). */ CAResult_t CADetachMessageResourceUri(const CAURI_t resourceUri, const CAToken_t token, uint8_t tokenLength, const CAHeaderOption_t *options, uint8_t numOptions); /** - * Setting the request and response callbacks for network packets - * @param[IN] ReqHandler callback for receiving the requests - * @param[IN] RespHandler callback for receiving the response - * @param[IN] ErrorHandler callback for receiving error response + * Setting the request and response callbacks for network packets. + * @param[in] ReqHandler callback for receiving the requests. + * @param[in] RespHandler callback for receiving the response. + * @param[in] ErrorHandler callback for receiving error response. */ void CASetInterfaceCallbacks(CARequestCallback ReqHandler, CAResponseCallback RespHandler, CAErrorCallback ErrorHandler); /** * Initialize the message handler by starting thread pool and initializing the - * send and receive queue - * @return CA_STATUS_OK or ERROR CODES (CAResult_t error codes in cacommon.h) + * send and receive queue. + * @return ::CA_STATUS_OK or ERROR CODES (::CAResult_t error codes in cacommon.h). */ CAResult_t CAInitializeMessageHandler(); /** - * Terminate the message handler by stopping the thread pool and destroying the queues + * Terminate the message handler by stopping the thread pool and destroying the queues. */ void CATerminateMessageHandler(); /** - * Handler for receiving request and response callback in single thread model + * Handler for receiving request and response callback in single thread model. */ void CAHandleRequestResponseCallbacks(); /** - * To log the PDU data - * @param[IN] pdu pdu data + * To log the PDU data. + * @param[in] pdu pdu data. */ void CALogPDUInfo(coap_pdu_t *pdu); #ifdef WITH_BWT /** - * Add the data to the send queue thread - * @param[IN] data send data + * Add the data to the send queue thread. + * @param[in] data send data. */ void CAAddDataToSendThread(CAData_t *data); /** - * Add the data to the receive queue thread to notify received data - * @param[IN] data received data + * Add the data to the receive queue thread to notify received data. + * @param[in] data received data. */ void CAAddDataToReceiveThread(CAData_t *data); #endif diff --git a/resource/csdk/connectivity/inc/canetworkconfigurator.h b/resource/csdk/connectivity/inc/canetworkconfigurator.h index 2162df3..775c516 100644 --- a/resource/csdk/connectivity/inc/canetworkconfigurator.h +++ b/resource/csdk/connectivity/inc/canetworkconfigurator.h @@ -38,14 +38,14 @@ extern "C" /** * Add network type to the selected networks for network packets reception. * @param[in] transportAdapter Adapter that needs to be added. - * @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 CAAddNetworkType(CATransportAdapter_t transportAdapter); /** * Remove network type from the selected configuration. * @param[in] transportAdapter Adapter that needs to be removed. - * @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 CARemoveNetworkType(CATransportAdapter_t transportAdapter); @@ -56,16 +56,16 @@ CAResult_t CARemoveNetworkType(CATransportAdapter_t transportAdapter); u_arraylist_t *CAGetSelectedNetworkList(); /** - * Getnetwork informations of the selected networks. + * Get network informations of the selected networks. * @param[out] info LocalConnectivity objects. * @param[out] size No Of Array objects. - * @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 CAGetNetworkInformationInternal(CAEndpoint_t **info, uint32_t *size); /** * Terminate network type from selected configuration. - * @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 CATerminateNetworkType(); diff --git a/resource/csdk/connectivity/inc/caprotocolmessage.h b/resource/csdk/connectivity/inc/caprotocolmessage.h index d6c4e91..4110506 100644 --- a/resource/csdk/connectivity/inc/caprotocolmessage.h +++ b/resource/csdk/connectivity/inc/caprotocolmessage.h @@ -18,8 +18,8 @@ * ******************************************************************/ /** - * @file caprotocolmessage.h - * @brief This file contains common function for handling protocol messages. + * @file + * This file contains common function for handling protocol messages. */ #ifndef CA_PROTOCOL_MESSAGE_H_ @@ -58,10 +58,6 @@ typedef uint32_t code_t; coap_pdu_t *CAGeneratePDU(uint32_t code, const CAInfo_t *info); /** - * function for generating - */ - -/** * extracts request information from received pdu. * @param[in] pdu received pdu. * @param[out] outReqInfo request info structure made from received pdu. @@ -181,7 +177,7 @@ CAResult_t CAGetInfoFromPDU(const coap_pdu_t *pdu, uint32_t *outCode, CAInfo_t * coap_pdu_t *CAParsePDU(const char *data, uint32_t length, uint32_t *outCode); /** - * get Token fromn received data(pdu). + * get Token from received data(pdu). * @param[in] pdu_hdr header of received pdu. * @param[out] outInfo information with token received. * @return CA_STATUS_OK or ERROR CODES (CAResult_t error codes in cacommon.h). diff --git a/resource/csdk/connectivity/inc/caretransmission.h b/resource/csdk/connectivity/inc/caretransmission.h index 845e2fe..b1a9971 100644 --- a/resource/csdk/connectivity/inc/caretransmission.h +++ b/resource/csdk/connectivity/inc/caretransmission.h @@ -19,8 +19,8 @@ ******************************************************************/ /** - * @file caretransmission.h - * @brief This file contains common function for retransmission messages. + * @file + * This file contains common function for retransmission messages. */ #ifndef CA_RETRANSMISSION_H_ @@ -108,7 +108,7 @@ extern "C" * @param[in] timeoutCallback callback for retransmit timeout. * @param[in] config configuration for retransmission. * if NULL is coming, it will set default values. - * @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 CARetransmissionInitialize(CARetransmission_t *context, ca_thread_pool_t handle, @@ -119,7 +119,7 @@ CAResult_t CARetransmissionInitialize(CARetransmission_t *context, /** * Starting the retransmission context. * @param[in] context context for retransmission. - * @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 CARetransmissionStart(CARetransmission_t *context); @@ -130,7 +130,7 @@ CAResult_t CARetransmissionStart(CARetransmission_t *context); * @param[in] endpoint endpoint information. * @param[in] pdu sent pdu binary data. * @param[in] size sent pdu binary data size. - * @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 CARetransmissionSentData(CARetransmission_t* context, const CAEndpoint_t* endpoint, @@ -144,7 +144,7 @@ CAResult_t CARetransmissionSentData(CARetransmission_t* context, * @param[in] pdu received pdu binary data. * @param[in] size received pdu binary data size. * @param[out] retransmissionPdu pdu data of the request for reset and ack. - * @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 CARetransmissionReceivedData(CARetransmission_t *context, const CAEndpoint_t *endpoint, const void *pdu, @@ -153,14 +153,14 @@ CAResult_t CARetransmissionReceivedData(CARetransmission_t *context, /** * Stopping the retransmission context. * @param[in] context context for retransmission. - * @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 CARetransmissionStop(CARetransmission_t *context); /** * Terminating the retransmission context. * @param[in] context context for retransmission. - * @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 CARetransmissionDestroy(CARetransmission_t *context); diff --git a/resource/csdk/connectivity/src/bt_edr_adapter/android/caedrclient.h b/resource/csdk/connectivity/src/bt_edr_adapter/android/caedrclient.h index 08456a4..afe2a34 100644 --- a/resource/csdk/connectivity/src/bt_edr_adapter/android/caedrclient.h +++ b/resource/csdk/connectivity/src/bt_edr_adapter/android/caedrclient.h @@ -1,4 +1,4 @@ -/****************************************************************** +/* **************************************************************** * * Copyright 2014 Samsung Electronics All Rights Reserved. * @@ -37,93 +37,88 @@ extern "C" #endif /** - * @brief Initialize context of application - * @return None + * Initialize context of application. */ void CAEDRJniInitContext(); /** - * @brief Create JNI Object - * @param context [IN] context of application - * @return #CA_STATUS_OK or Appropriate error code + * Create JNI Object. + * @param[in] context context of application. + * @return ::CA_STATUS_OK or Appropriate error code. */ CAResult_t CAEDRCreateJNIInterfaceObject(jobject context); /** - * @brief Initialize client for EDR - * @param handle [IN] thread pool handle object - * @return None + * Initialize client for EDR. + * @param[in] handle thread pool handle object. */ void CAEDRInitialize(ca_thread_pool_t handle); /** - * @brief Terminate server for EDR - * @return None + * Terminate server for EDR. */ void CAEDRTerminate(); /** - * @brief Initialize JNI object - * @return None + * Initialize JNI object. */ void CAEDRCoreJniInit(); /** - * @brief Send data for unicast - * @param address [IN] remote address - * @param data [IN] data for transmission - * @param dataLen [IN] data length - * @return #CA_STATUS_OK or Appropriate error code - * @retval #CA_STATUS_OK Successful - * @retval #CA_STATUS_FAILED Operation failed + * Send data for unicast. + * @param[in] address remote address. + * @param[in] data data for transmission. + * @param[in] dataLen data length. + * @return ::CA_STATUS_OK or Appropriate error code. + * @retval ::CA_STATUS_OK Successful. + * @retval ::CA_STATUS_FAILED Operation failed. */ CAResult_t CAEDRSendUnicastMessage(const char *address, const char *data, uint32_t dataLen); /** - * @brief Send data for multicast - * @param data [IN] data for transmission - * @param dataLen [IN] data length - * @return #CA_STATUS_OK or Appropriate error code - * @retval #CA_STATUS_OK Successful - * @retval #CA_STATUS_FAILED Operation failed + * Send data for multicast. + * @param[in] data data for transmission. + * @param[in] dataLen data length. + * @return ::CA_STATUS_OK or Appropriate error code. + * @retval ::CA_STATUS_OK Successful. + * @retval ::CA_STATUS_FAILED Operation failed. */ CAResult_t CAEDRSendMulticastMessage(const char *data, uint32_t dataLen); /** - * @brief Get Local EDR Address - * @param address [OUT] local address - * @return #CA_STATUS_OK or Appropriate error code - * @retval #CA_STATUS_OK Successful - * @retval #CA_STATUS_FAILED Operation failed + * Get Local EDR Address. + * @param[out] address local address. + * @return ::CA_STATUS_OK or Appropriate error code. + * @retval ::CA_STATUS_OK Successful. + * @retval ::CA_STATUS_FAILED Operation failed. */ CAResult_t CAEDRGetInterfaceInfo(char **address); /** - * @brief Get address from a local device - * @param address [OUT] local address - * @return None + * Get address from a local device. + * @param[out] address local address. */ void CAEDRGetLocalAddress(char **address); /** - * @brief Send data for unicast (implement) - * @param address [IN] remote address - * @param data [IN] data for transmission - * @param dataLen [IN] data length - * @return #CA_STATUS_OK or Appropriate error code - * @retval #CA_STATUS_OK Successful - * @retval #CA_STATUS_FAILED Operation failed + * Send data for unicast (implement). + * @param[in] address remote address. + * @param[in] data data for transmission. + * @param[in] dataLen data length. + * @return ::CA_STATUS_OK or Appropriate error code. + * @retval ::CA_STATUS_OK Successful. + * @retval ::CA_STATUS_FAILED Operation failed. */ CAResult_t CAEDRSendUnicastMessageImpl(const char *address, const char *data, uint32_t dataLen); /** - * @brief Send data for multicast (implement) - * @param env [IN] JNI interface pointer - * @param data [IN] data for transmission - * @param dataLen [IN] data length - * @return #CA_STATUS_OK or Appropriate error code - * @retval #CA_STATUS_OK Successful - * @retval #CA_STATUS_FAILED Operation failed + * Send data for multicast (implement). + * @param[in] env JNI interface pointer. + * @param[in] data data for transmission. + * @param[in] dataLen data length. + * @return ::CA_STATUS_OK or Appropriate error code. + * @retval ::CA_STATUS_OK Successful. + * @retval ::CA_STATUS_FAILED Operation failed. */ CAResult_t CAEDRSendMulticastMessageImpl(JNIEnv *env, const char *data, uint32_t dataLen); @@ -132,29 +127,28 @@ CAResult_t CAEDRSendMulticastMessageImpl(JNIEnv *env, const char *data, uint32_t */ /** - * @brief This function will send the data to remote device. - * @param env [IN] JNI interface pointer - * @param address [IN] Remote Address - * @param data [IN] Data to be transmitted from EDR - * @param dataLength [IN] Length of data - * @return #CA_STATUS_OK or Appropriate error code + * This function will send the data to remote device. + * @param[in] env JNI interface pointer. + * @param[in] address Remote Address. + * @param[in] data Data to be transmitted from EDR. + * @param[in] dataLength Length of data. + * @return ::CA_STATUS_OK or Appropriate error code. */ CAResult_t CAEDRNativeSendData(JNIEnv *env, const char* address, const char* data, uint32_t dataLength); /** - * @brief This function will connect to remote device. - * @param env [IN] JNI interface pointer - * @param address [IN] Remote Address - * @return #CA_STATUS_OK or Appropriate error code + * This function will connect to remote device. + * @param[in] env JNI interface pointer. + * @param[in] address Remote Address. + * @return ::CA_STATUS_OK or Appropriate error code. */ CAResult_t CAEDRNativeConnect(JNIEnv *env, const char *address); /** - * @brief This function will close socket. - * @param env [IN] JNI interface pointer - * @param address [IN] Remote Address - * @return None + * This function will close socket. + * @param[in] env JNI interface pointer. + * @param[in] address Remote Address. */ void CAEDRNativeSocketClose(JNIEnv *env, const char *address); diff --git a/resource/csdk/connectivity/src/bt_edr_adapter/android/caedrnwmonitor.h b/resource/csdk/connectivity/src/bt_edr_adapter/android/caedrnwmonitor.h index 947d501..fc185cf 100644 --- a/resource/csdk/connectivity/src/bt_edr_adapter/android/caedrnwmonitor.h +++ b/resource/csdk/connectivity/src/bt_edr_adapter/android/caedrnwmonitor.h @@ -1,4 +1,4 @@ -/****************************************************************** +/* **************************************************************** * * Copyright 2014 Samsung Electronics All Rights Reserved. * @@ -20,7 +20,7 @@ /** * @file - * @brief This file contains the APIs for BT LE communications. + * This file contains the APIs for BT LE communications. */ #ifndef CA_EDR_NW_MONITOR_H_ #define CA_EDR_NW_MONITOR_H_ @@ -33,14 +33,12 @@ extern "C" #endif /** - * @brief Set context of application - * @return None + * Set context of application. */ void CAEDRNetworkMonitorJNISetContext(); /** - * @brief Initialize JNI object - * @return None + * Initialize JNI object. */ void CAEDRNetworkMonitorJniInit(); diff --git a/resource/csdk/connectivity/src/bt_edr_adapter/android/caedrserver.h b/resource/csdk/connectivity/src/bt_edr_adapter/android/caedrserver.h index 676b4bd..5324d80 100644 --- a/resource/csdk/connectivity/src/bt_edr_adapter/android/caedrserver.h +++ b/resource/csdk/connectivity/src/bt_edr_adapter/android/caedrserver.h @@ -79,8 +79,6 @@ CAResult_t CAEDRStopUnicastServer(); */ CAResult_t CAEDRStopMulticastServer(); -// EDR Method - /** * This function will read the data from remote device. * @param[in] env JNI interface pointer. diff --git a/resource/csdk/connectivity/src/bt_edr_adapter/android/caedrutils.h b/resource/csdk/connectivity/src/bt_edr_adapter/android/caedrutils.h index 1348546..00ddffc 100644 --- a/resource/csdk/connectivity/src/bt_edr_adapter/android/caedrutils.h +++ b/resource/csdk/connectivity/src/bt_edr_adapter/android/caedrutils.h @@ -1,4 +1,4 @@ -/****************************************************************** +/* **************************************************************** * * Copyright 2014 Samsung Electronics All Rights Reserved. * @@ -20,7 +20,7 @@ /** * @file - * @brief This file contains the APIs for BT communications. + * This file contains the APIs for BT communications. */ #ifndef CA_EDR_UTILS_H_ #define CA_EDR_UTILS_H_ @@ -37,189 +37,168 @@ extern "C" #endif /** - * @brief Get address from device socket - * @param env [IN] JNI interface pointer - * @param bluetoothSocketObj [IN] bluetooth socket object - * @return Bluetooth device address + * Get address from device socket. + * @param[in] env JNI interface pointer. + * @param[in] bluetoothSocketObj bluetooth socket object. + * @return Bluetooth device address. */ jstring CAEDRNativeGetAddressFromDeviceSocket(JNIEnv *env, jobject bluetoothSocketObj); /** - * @brief Get local device address - * @param env [IN] JNI interface pointer - * @return Bluetooth device address + * Get local device address. + * @param[in] env JNI interface pointer. + * @return Bluetooth device address. */ jstring CAEDRNativeGetLocalDeviceAddress(JNIEnv *env); /** - * @brief Get bonded devices list - * @param env [IN] JNI interface pointer - * @return Bonded devices list + * Get bonded devices list. + * @param[in] env JNI interface pointer. + * @return Bonded devices list. */ jobjectArray CAEDRNativeGetBondedDevices(JNIEnv *env); /** - * @brief Get Bluetooth device state - * @param env [IN] JNI interface pointer - * @return Bluetooth device state + * Get Bluetooth device state. + * @param[in] env JNI interface pointer. + * @return Bluetooth device state. */ jint CAEDRNativeGetBTStateOnInfo(JNIEnv *env); /** - * @brief Check the BT Adapter enable - * @param env [IN] JNI interface pointer - * @return JNI_TRUE or JNI_FALSE + * Check the BT Adapter enable. + * @param[in] env JNI interface pointer. + * @return JNI_TRUE or JNI_FALSE. */ jboolean CAEDRNativeIsEnableBTAdapter(JNIEnv *env); /** - * @brief Get address from BT device - * @param env [IN] JNI interface pointer - * @param bluetoothSocketObj [IN] bluetooth socket object - * @return Bluetooth device address + * Get address from BT device. + * @param[in] env JNI interface pointer. + * @param[in] bluetoothDevice bluetooth socket object. + * @return Bluetooth device address. */ jstring CAEDRNativeGetAddressFromBTDevice(JNIEnv *env, jobject bluetoothDevice); /** - * BT State Info List - */ - -/** - * @brief This function will create the device state list. - * @return None + * This function will create the device state list. */ void CAEDRNativeCreateDeviceStateList(); /** - * @brief Update connection state of device - * @param state [IN] connection state - * @param address [IN] remote address - * @return None + * Update connection state of device. + * @param[in] state connection state. + * @param[in] address remote address. */ void CAEDRUpdateDeviceState(CAConnectedState_t state, const char *address); /** - * @brief Add device object to the list - * @param state [IN] connection state object - * @return None + * Add device object to the list. + * @param[in] state connection state object. */ void CAEDRNativeAddDeviceStateToList(state_t *state); /** - * @brief Check whether the device exist in the list or not - * @param remoteAddress [IN] remote address - * @return true or false + * Check whether the device exist in the list or not. + * @param[in] remoteAddress remote address. + * @return true or false. */ bool CAEDRNativeIsDeviceInList(const char *remoteAddress); /** - * @brief Close all socket - * @param env [IN] JNI interface pointer - * @return NONE + * Close all socket. + * @param[in] env JNI interface pointer. */ void CAEDRNativeSocketCloseToAll(JNIEnv *env); /** - * @brief Remove all device objects in the list - * @return None + * Remove all device objects in the list. */ void CAEDRNativeRemoveAllDeviceState(); /** - * @brief Remove target device in the list - * @param remoteAddress [IN] remote address - * @return None + * Remove target device in the list. + * @param[in] remoteAddress remote address. */ void CAEDRNativeRemoveDevice(const char *remoteAddress); /** - * @brief Get current device connection state - * @param remoteAddress [IN] remote address - * @return STATE_DISCONNECTED or STATE_CONNECTED + * Get current device connection state. + * @param[in] remoteAddress remote address. + * @return STATE_DISCONNECTED or STATE_CONNECTED. */ CAConnectedState_t CAEDRIsConnectedDevice(const char *remoteAddress); /** - * @brief Reordering for the list - * @param index [IN] index of device list that want to reordering - * @return None + * Reordering for the list. + * @param[in] index index of device list that want to reordering. */ void CAEDRReorderingDeviceList(uint32_t index); /** - * Bluetooth Socket Object List - */ - -/** - * @brief This function will create the device socket list. - * @return None + * This function will create the device socket list. */ void CAEDRNativeCreateDeviceSocketList(); /** - * @brief Add device object to the list - * @param env [IN] JNI interface pointer - * @param deviceSocket [IN] device socket object - * @return None + * Add device object to the list. + * @param[in] env JNI interface pointer. + * @param[in] deviceSocket device socket object. */ void CAEDRNativeAddDeviceSocketToList(JNIEnv *env, jobject deviceSocket); /** - * @brief Add device object to the list - * @param env [IN] JNI interface pointer - * @param remoteAddress [IN] remote address - * @return true or false + * Add device object to the list. + * @param[in] env JNI interface pointer. + * @param[in] remoteAddress remote address. + * @return true or false. */ bool CAEDRNativeIsDeviceSocketInList(JNIEnv *env, const char *remoteAddress); /** - * @brief Add device object to the list - * @param env [IN] JNI interface pointer - * @return None + * Add device object to the list. + * @param[in] env JNI interface pointer. */ void CAEDRNativeRemoveAllDeviceSocket(JNIEnv *env); /** - * @brief Add device object to the list - * @param env [IN] JNI interface pointer - * @param deviceSocket [IN] device socket object - * @return None + * Add device object to the list. + * @param[in] env JNI interface pointer. + * @param[in] deviceSocket device socket object. */ void CAEDRNativeRemoveDeviceSocket(JNIEnv *env, jobject deviceSocket); /** - * @brief Remove device socket - * @param env [IN] JNI interface pointer - * @param address [IN] remote address - * @return NONE + * Remove device socket. + * @param[in] env JNI interface pointer. + * @param[in] address remote address. */ void CAEDRNativeRemoveDeviceSocketBaseAddr(JNIEnv *env, jstring address); /** - * @brief Get device socket object from the list - * @param idx [IN] index of device list - * @return Device socket object or NULL + * Get device socket object from the list. + * @param[in] idx index of device list. + * @return Device socket object or NULL. */ jobject CAEDRNativeGetDeviceSocket(uint32_t idx); /** - * @brief Get device socket address - * @param env [IN] JNI interface pointer - * @param remoteAddress [IN] remote address - * @return Device socket object or NULL + * Get device socket address. + * @param[in] env JNI interface pointer. + * @param[in] remoteAddress remote address. + * @return Device socket object or NULL. */ jobject CAEDRNativeGetDeviceSocketBaseAddr(JNIEnv *env, const char* remoteAddress); /** - * @brief Get length of device socket list - * @return length of list + * Get length of device socket list. + * @return length of list. */ uint32_t CAEDRGetSocketListLength(); /** - * @brief Reordering for the list - * @param index [IN] index of device list that want to reordering - * @return None + * Reordering for the list. + * @param[in] index index of device list that want to reordering. */ void CAEDRReorderingDeviceSocketList(uint32_t index); #ifdef __cplusplus diff --git a/resource/csdk/connectivity/src/bt_edr_adapter/tizen/caedrdevicelist.h b/resource/csdk/connectivity/src/bt_edr_adapter/tizen/caedrdevicelist.h index eec78cd..84314a4 100644 --- a/resource/csdk/connectivity/src/bt_edr_adapter/tizen/caedrdevicelist.h +++ b/resource/csdk/connectivity/src/bt_edr_adapter/tizen/caedrdevicelist.h @@ -35,8 +35,7 @@ extern "C" #endif /** - * @struct EDRData - * @brief Structure to maintain the data needs to send to peer Bluetooth device. + * Structure to maintain the data needs to send to peer Bluetooth device. */ typedef struct { @@ -45,8 +44,7 @@ typedef struct } EDRData; /** - * @struct EDRDataList - * @brief Structure to maintain list of data needs to send to peer Bluetooth device. + * Structure to maintain list of data needs to send to peer Bluetooth device. */ typedef struct _EDRDataList { @@ -55,8 +53,7 @@ typedef struct _EDRDataList } EDRDataList; /** - * @struct EDRDevice - * @brief Structure to maintain information of peer Bluetooth device. + * Structure to maintain information of peer Bluetooth device. */ typedef struct { @@ -68,8 +65,7 @@ typedef struct } EDRDevice; /** - * @struct EDRDeviceList - * @brief Structure to maintain list of peer Bluetooth device information. + * Structure to maintain list of peer Bluetooth device information. */ typedef struct _EDRDeviceList { @@ -78,113 +74,111 @@ typedef struct _EDRDeviceList } EDRDeviceList; /** - * @brief Creates #EDRDevice for specified remote address and uuid and to device list. + * Creates ::EDRDevice for specified remote address and uuid and to device list. * - * @param deviceList [IN,OUT] Device list which created device add to. - * @param deviceAddress [IN] Bluetooth device address. - * @param uuid [IN] Service uuid. - * @param device [IN] Created #EDRDevice. + * @param[in/out] deviceList Device list which created device add to. + * @param[in] deviceAddress Bluetooth device address. + * @param[in] uuid Service uuid. + * @param[in] device Created ::EDRDevice. * - * @return #CA_STATUS_OK or Appropriate error code - * @retval #CA_STATUS_OK Successful - * @retval #CA_STATUS_INVALID_PARAM Invalid input parameters - * @retval #CA_STATUS_FAILED Failed to create device and add to list + * @return ::CA_STATUS_OK or Appropriate error code. + * @retval ::CA_STATUS_OK Successful. + * @retval ::CA_STATUS_INVALID_PARAM Invalid input parameters. + * @retval ::CA_STATUS_FAILED Failed to create device and add to list. */ CAResult_t CACreateAndAddToDeviceList(EDRDeviceList **deviceList, const char *deviceAddress, const char *uuid, EDRDevice **device); /** - * @brief Insert device to specified list. + * Insert device to specified list. * - * @param deviceList [IN,OUT] Device list to which specifed @device to be added. - * @param device [IN] Device to be added to list. + * @param[in/out] deviceList Device list to which specifed @device to be added. + * @param[in] device Device to be added to list. * - * @return #CA_STATUS_OK or Appropriate error code - * @retval #CA_STATUS_OK Successful - * @retval #CA_STATUS_INVALID_PARAM Invalid input parameters - * @retval #CA_MEMORY_ALLOC_FAILED Memory allocation failed + * @return ::CA_STATUS_OK or Appropriate error code. + * @retval ::CA_STATUS_OK Successful. + * @retval ::CA_STATUS_INVALID_PARAM Invalid input parameters. + * @retval ::CA_MEMORY_ALLOC_FAILED Memory allocation failed. */ CAResult_t CAAddEDRDeviceToList(EDRDeviceList **deviceList, EDRDevice *device); /** - * @brief Get the device from list which matches specified device address. + * Get the device from list which matches specified device address. * - * @param deviceList [IN] Device list to search for the device. - * @param deviceAddress [IN] Device address used for matching. - * @param device [OUT] #EDRDevice which has matching device address. + * @param[in] deviceList Device list to search for the device. + * @param[in] deviceAddress Device address used for matching. + * @param[out] device ::EDRDevice which has matching device address. * - * @return #CA_STATUS_OK or Appropriate error code - * @retval #CA_STATUS_OK Successful - * @retval #CA_STATUS_INVALID_PARAM Invalid input parameters - * @retval #CA_STATUS_FAILED Device is not found in the list + * @return ::CA_STATUS_OK or Appropriate error code. + * @retval ::CA_STATUS_OK Successful. + * @retval ::CA_STATUS_INVALID_PARAM Invalid input parameters. + * @retval ::CA_STATUS_FAILED Device is not found in the list. */ CAResult_t CAGetEDRDevice(EDRDeviceList *deviceList, const char *deviceAddress, EDRDevice **device); /** - * @brief Get the device from list which matches specified RFCOMM socket id. + * Get the device from list which matches specified RFCOMM socket id. * - * @param deviceList [IN] Device list to search for the device. - * @param socketID [IN] RFCOMM socket id. - * @param device [OUT] #EDRDevice which has matching RFCOMM socket id . + * @param[in] deviceList Device list to search for the device. + * @param[in] socketID RFCOMM socket id. + * @param[out] device ::EDRDevice which has matching RFCOMM socket id . * - * @return #CA_STATUS_OK or Appropriate error code - * @retval #CA_STATUS_OK Successful - * @retval #CA_STATUS_INVALID_PARAM Invalid input parameters - * @retval #CA_STATUS_FAILED Device is not found in the list + * @return ::CA_STATUS_OK or Appropriate error code. + * @retval ::CA_STATUS_OK Successful. + * @retval ::CA_STATUS_INVALID_PARAM Invalid input parameters. + * @retval ::CA_STATUS_FAILED Device is not found in the list. */ CAResult_t CAGetEDRDeviceBySocketId(EDRDeviceList *deviceList, int32_t socketID, EDRDevice **device); /** - * @brief Remove and delete the device matching specified device address from list. + * Remove and delete the device matching specified device address from list. * - * @param deviceList [IN,OUT] Device list to search for the device. - * @param deviceAddress [IN] Bluetooth device address. + * @param[in/out] deviceList Device list to search for the device. + * @param[in] deviceAddress Bluetooth device address. * - * @return #CA_STATUS_OK or Appropriate error code - * @retval #CA_STATUS_OK Successful - * @retval #CA_STATUS_INVALID_PARAM Invalid input parameters - * @retval #CA_STATUS_FAILED Device is not found in the list + * @return ::CA_STATUS_OK or Appropriate error code. + * @retval ::CA_STATUS_OK Successful. + * @retval ::CA_STATUS_INVALID_PARAM Invalid input parameters. + * @retval ::CA_STATUS_FAILED Device is not found in the list. */ CAResult_t CARemoveEDRDeviceFromList(EDRDeviceList **deviceList, const char *deviceAddress); /** - * @brief Destroy the specified device list. Removes and delete all the devices in the list. - * @param deviceList [IN,OUT] Device list to be destroyed. - * @return NONE + * Destroy the specified device list. Removes and delete all the devices in the list. + * @param[in/out] deviceList Device list to be destroyed. */ void CADestroyEDRDeviceList(EDRDeviceList **deviceList); /** - * @brief Insert data to specified list. + * Insert data to specified list. * - * @param dataList [IN,OUT] Data list to which data will be add. - * @param data [IN] Data to be stored. - * @param dataLength [IN] Length of the data. + * @param[in] dataList Data list to which data will be add. + * @param[in] data Data to be stored. + * @param[in] dataLength Length of the data. * - * @return #CA_STATUS_OK or Appropriate error code - * @retval #CA_STATUS_OK Successful - * @retval #CA_STATUS_INVALID_PARAM Invalid input parameters - * @retval #CA_MEMORY_ALLOC_FAILED Memory allocation failed + * @return ::CA_STATUS_OK or Appropriate error code. + * @retval ::CA_STATUS_OK Successful. + * @retval ::CA_STATUS_INVALID_PARAM Invalid input parameters. + * @retval ::CA_MEMORY_ALLOC_FAILED Memory allocation failed. */ CAResult_t CAAddEDRDataToList(EDRDataList **dataList, const void *data, uint32_t dataLength); /** - * @brief Remove and delete data from front end of list. - * @param dataList [IN,OUT] Data list from which data will be removed. + * Remove and delete data from front end of list. + * @param[in/out] dataList Data list from which data will be removed. * - * @return #CA_STATUS_OK or Appropriate error code - * @retval #CA_STATUS_OK Successful - * @retval #CA_STATUS_INVALID_PARAM Invalid input parameters + * @return ::CA_STATUS_OK or Appropriate error code. + * @retval ::CA_STATUS_OK Successful. + * @retval ::CA_STATUS_INVALID_PARAM Invalid input parameters. */ CAResult_t CARemoveEDRDataFromList(EDRDataList **dataList); /** - * @brief Destroy the specified data list. Removes and deletes all the data in the list. - * @param dataList [IN] Data list to be destroyed. - * @return NONE + * Destroy the specified data list. Removes and deletes all the data in the list. + * @param[in] dataList Data list to be destroyed. */ void CADestroyEDRDataList(EDRDataList **dataList); diff --git a/resource/csdk/connectivity/src/bt_edr_adapter/tizen/caedrendpoint.h b/resource/csdk/connectivity/src/bt_edr_adapter/tizen/caedrendpoint.h index 0f882ad..63ee31c 100644 --- a/resource/csdk/connectivity/src/bt_edr_adapter/tizen/caedrendpoint.h +++ b/resource/csdk/connectivity/src/bt_edr_adapter/tizen/caedrendpoint.h @@ -37,16 +37,16 @@ extern "C" #endif /** - * @brief Send data over RFCOMM connection. + * Send data over RFCOMM connection. * - * @param serverFD [IN] The RFCOMM connection socket file descriptor. - * @param data [IN] The data needs to be sent. - * @param dataLength [IN] The length of data. + * @param[in] serverFD The RFCOMM connection socket file descriptor. + * @param[in] data The data needs to be sent. + * @param[in] dataLength The length of data. * - * @return #CA_STATUS_OK or Appropriate error code - * @retval #CA_STATUS_OK Successful - * @retval #CA_STATUS_INVALID_PARAM Invalid input argumets - * @retval #CA_STATUS_FAILED Operation failed + * @return ::CA_STATUS_OK or Appropriate error code. + * @retval ::CA_STATUS_OK Successful. + * @retval ::CA_STATUS_INVALID_PARAM Invalid input arguments. + * @retval ::CA_STATUS_FAILED Operation failed. */ CAResult_t CAEDRSendData(int serverFD, const void *data, uint32_t dataLength); diff --git a/resource/csdk/connectivity/src/bt_edr_adapter/tizen/caedrutils.h b/resource/csdk/connectivity/src/bt_edr_adapter/tizen/caedrutils.h index 466ad63..6a7d706 100644 --- a/resource/csdk/connectivity/src/bt_edr_adapter/tizen/caedrutils.h +++ b/resource/csdk/connectivity/src/bt_edr_adapter/tizen/caedrutils.h @@ -34,8 +34,7 @@ #include "oic_malloc.h" /** - * @var EDR_ADAPTER_TAG - * @brief Logging tag for module name. + * Logging tag for module name. */ #ifndef EDR_ADAPTER_TAG #define EDR_ADAPTER_TAG "CA_EDR_ADAPTER" @@ -47,11 +46,11 @@ extern "C" #endif /** - * @brief Checks if the specified list of service UUIDs contains OIC service UUID. + * Checks if the specified list of service UUIDs contains OIC service UUID. * - * @param serviceUUID [IN] Array of service UUIDs - * @param serviceCount [IN] Size of the service UUIDs array. - * @param matchService [IN] Service UUID to be checked in the given array of service UUIDs + * @param[in] serviceUUID Array of service UUIDs. + * @param[in] serviceCount Size of the service UUIDs array. + * @param[in] matchService Service UUID to be checked in the given array of service UUIDs. * * @return true if match service UUID found otherwise false. * diff --git a/resource/csdk/connectivity/src/bt_le_adapter/android/caleclient.h b/resource/csdk/connectivity/src/bt_le_adapter/android/caleclient.h index 870a0a6..3a4a2d9 100644 --- a/resource/csdk/connectivity/src/bt_le_adapter/android/caleclient.h +++ b/resource/csdk/connectivity/src/bt_le_adapter/android/caleclient.h @@ -1,4 +1,4 @@ -/****************************************************************** +/* **************************************************************** * * Copyright 2014 Samsung Electronics All Rights Reserved. * @@ -19,8 +19,8 @@ ******************************************************************/ /** - * @file caleclient.h - * @brief This file contains the APIs for BT LE communications. + * @file + * This file contains the APIs for BT LE communications. */ #ifndef CA_LECLIENT_H_ #define CA_LECLIENT_H_ @@ -55,517 +55,494 @@ typedef struct le_state_info } CALEState_t; /** - * @brief Callback to be notified on reception of any data from remote devices. - * @param address [IN] MAC address of remote device. - * @param data [IN] Data received from remote device. - * @return None + * Callback to be notified on reception of any data from remote devices. + * @param[in] address MAC address of remote device. + * @param[in] data Data received from remote device. * @pre Callback must be registered using CALESetCallback(CAPacketReceiveCallback callback) */ typedef void (*CAPacketReceiveCallback)(const char *address, const char *data); /** - * @brief initialize JNI object - * @return None + * initialize JNI object. */ void CALEClientJniInit(); /** - * @brief set context of application - * @return None + * set context of application. */ void CALEClientJNISetContext(); /** - * @brief create interface object and initialize the object - * @return CA_STATUS_OK or ERROR CODES (CAResult_t error codes in cacommon.h) + * create interface object and initialize the object. + * @return ::CA_STATUS_OK or ERROR CODES (::CAResult_t error codes in cacommon.h). */ CAResult_t CALEClientCreateJniInterfaceObject(); /** - * @brief initialize client for BLE - * @param handle [IN] thread pool handle object - * @return CA_STATUS_OK or ERROR CODES (CAResult_t error codes in cacommon.h) + * initialize client for BLE. + * @param[in] handle thread pool handle object. + * @return ::CA_STATUS_OK or ERROR CODES (::CAResult_t error codes in cacommon.h). */ CAResult_t CALEClientInitialize(ca_thread_pool_t handle); /** - * @brief terminate client for BLE - * @return None + * terminate client for BLE. */ void CALEClientTerminate(); /** - * @brief for destroy sending routine - * @param env [IN] JNI interface pointer - * @param gatt [IN] Gatt profile object - * @return None + * for destroy sending routine. + * @param[in] env JNI interface pointer. + * @param[in] gatt Gatt profile object. */ void CALEClientSendFinish(JNIEnv *env, jobject gatt); /** - * @brief send data for unicast (interface) - * @param address [IN] remote address - * @param data [IN] data for transmission - * @param dataLen [IN] data length - * @return CA_STATUS_OK or ERROR CODES (CAResult_t error codes in cacommon.h) + * send data for unicast (interface). + * @param[in] address remote address. + * @param[in] data data for transmission. + * @param[in] dataLen data length. + * @return ::CA_STATUS_OK or ERROR CODES (::CAResult_t error codes in cacommon.h). */ CAResult_t CALEClientSendUnicastMessage(const char *address, const char *data, const uint32_t dataLen); /** - * @brief send data for multicast (interface) - * @param data [IN] data for transmission - * @param dataLen [IN] data length - * @return CA_STATUS_OK or ERROR CODES (CAResult_t error codes in cacommon.h) + * send data for multicast (interface). + * @param[in] data data for transmission. + * @param[in] dataLen data length. + * @return ::CA_STATUS_OK or ERROR CODES (::CAResult_t error codes in cacommon.h). */ CAResult_t CALEClientSendMulticastMessage(const char *data, const uint32_t dataLen); /** - * @brief start unicast server - * @param address [IN] remote address - * @return CA_STATUS_OK or ERROR CODES (CAResult_t error codes in cacommon.h) + * start unicast server. + * @param[in] address remote address. + * @return ::CA_STATUS_OK or ERROR CODES (::CAResult_t error codes in cacommon.h). */ CAResult_t CALEClientStartUnicastServer(const char *address); /** - * @brief start multicast server (start discovery) - * @return CA_STATUS_OK or ERROR CODES (CAResult_t error codes in cacommon.h) + * start multicast server (start discovery). + * @return ::CA_STATUS_OK or ERROR CODES (::CAResult_t error codes in cacommon.h). */ CAResult_t CALEClientStartMulticastServer(); /** - * @brief stop unicast server - * @return None + * stop unicast server. */ void CALEClientStopUnicastServer(); /** - * @brief stop multicast server (stop discovery) - * @return None + * stop multicast server (stop discovery). */ void CALEClientStopMulticastServer(); /** - * @brief set this callback for receiving data packets from peer devices. - * @param callback [IN] callback to be notified on reception of - * unicast/multicast data packets. - * @return None + * set this callback for receiving data packets from peer devices. + * @param[in] callback callback to be notified on reception of + * unicast/multicast data packets. */ void CALEClientSetCallback(CAPacketReceiveCallback callback); /** - * @brief get local address (implement) - * @param address [OUT] local address - * @return CA_STATUS_OK or ERROR CODES (CAResult_t error codes in cacommon.h) + * get local address (implement). + * @param[out] address local address. + * @return ::CA_STATUS_OK or ERROR CODES (::CAResult_t error codes in cacommon.h). */ CAResult_t CALEClientGetLocalAddress(char** address); /** - * @brief send data for unicast (implement) - * @param address [IN] remote address - * @param data [IN] data for transmission - * @param dataLen [IN] data length - * @return CA_STATUS_OK or ERROR CODES (CAResult_t error codes in cacommon.h) + * send data for unicast (implement). + * @param[in] address remote address. + * @param[in] data data for transmission. + * @param[in] dataLen data length. + * @return ::CA_STATUS_OK or ERROR CODES (::CAResult_t error codes in cacommon.h). */ CAResult_t CALEClientSendUnicastMessageImpl(const char *address, const char *data, const uint32_t dataLen); /** - * @brief send data for multicast (implement) - * @param env [IN] JNI interface pointer - * @param data [IN] data for transmission - * @param dataLen [IN] data length - * @return CA_STATUS_OK or ERROR CODES (CAResult_t error codes in cacommon.h) + * send data for multicast (implement). + * @param[in] env JNI interface pointer. + * @param[in] data data for transmission. + * @param[in] dataLen data length. + * @return ::CA_STATUS_OK or ERROR CODES (::CAResult_t error codes in cacommon.h). */ CAResult_t CALEClientSendMulticastMessageImpl(JNIEnv *env, const char *data, const uint32_t dataLen); /** - * @brief check whether it is connected or not with remote address. - * @param address [IN] remote address - * @return CA_STATUS_OK or ERROR CODES (CAResult_t error codes in cacommon.h) + * check whether it is connected or not with remote address. + * @param[in] address remote address. + * @return ::CA_STATUS_OK or ERROR CODES (::CAResult_t error codes in cacommon.h). */ CAResult_t CALECheckSendState(const char* address); /** - * @brief send data to remote device. - * if it isn't connected yet. connect LE before try to send data - * @param env [IN] JNI interface pointer - * @param device [IN] bluetooth device object - * @return CA_STATUS_OK or ERROR CODES (CAResult_t error codes in cacommon.h) + * send data to remote device. + * if it isn't connected yet. connect LE before try to send data. + * @param[in] env JNI interface pointer. + * @param[in] device bluetooth device object. + * @return ::CA_STATUS_OK or ERROR CODES (::CAResult_t error codes in cacommon.h). */ CAResult_t CALEClientSendData(JNIEnv *env, jobject device); /** - * @brief get address from bluetooth gatt object - * @param env [IN] JNI interface pointer - * @param gatt [IN] Gatt profile object - * @return bluetooth address + * get address from bluetooth gatt object. + * @param[in] env JNI interface pointer. + * @param[in] gatt Gatt profile object. + * @return bluetooth address. */ jstring CALEClientGetAddressFromGattObj(JNIEnv *env, jobject gatt); /** - * @brief get remote address from bluetooth socket object - * @param env [IN] JNI interface pointer - * @param bluetoothSocketObj [IN] bluetooth socket - * @return bluetooth address + * get remote address from bluetooth socket object. + * @param[in] env JNI interface pointer. + * @param[in] bluetoothSocketObj bluetooth socket. + * @return bluetooth address. */ jstring CALEClientGetRemoteAddress(JNIEnv *env, jobject bluetoothSocketObj); /** - * @brief close gatt - * @param env [IN] JNI interface pointer - * @param bluetoothGatt [IN] gatt profile object - * @return CA_STATUS_OK or ERROR CODES (CAResult_t error codes in cacommon.h) + * close gatt. + * @param[in] env JNI interface pointer. + * @param[in] bluetoothGatt gatt profile object. + * @return ::CA_STATUS_OK or ERROR CODES (::CAResult_t error codes in cacommon.h). */ CAResult_t CALEClientGattClose(JNIEnv *env, jobject bluetoothGatt); /** - * @brief start to scan whole bluetooth devices (interface) - * @return CA_STATUS_OK or ERROR CODES (CAResult_t error codes in cacommon.h) + * start to scan whole bluetooth devices (interface). + * @return ::CA_STATUS_OK or ERROR CODES (::CAResult_t error codes in cacommon.h). */ CAResult_t CALEClientStartScan(); /** - * @brief start to scan whole bluetooth devices (implement) - * @param env [IN] JNI interface pointer - * @param callback [IN] callback to receive device object by scanning - * @return CA_STATUS_OK or ERROR CODES (CAResult_t error codes in cacommon.h) + * start to scan whole bluetooth devices (implement). + * @param[in] env JNI interface pointer. + * @param[in] callback callback to receive device object by scanning. + * @return ::CA_STATUS_OK or ERROR CODES (::CAResult_t error codes in cacommon.h). */ CAResult_t CALEClientStartScanImpl(JNIEnv *env, jobject callback); /** - * @brief start to scan target bluetooth devices for service uuid (implement) - * @param env [IN] JNI interface pointer - * @param uuids [IN] target UUID - * @param callback [IN] callback to receive device object by scanning - * @return CA_STATUS_OK or ERROR CODES (CAResult_t error codes in cacommon.h) + * start to scan target bluetooth devices for service uuid (implement). + * @param[in] env JNI interface pointer. + * @param[in] uuids target UUID. + * @param[in] callback callback to receive device object by scanning. + * @return ::CA_STATUS_OK or ERROR CODES (::CAResult_t error codes in cacommon.h). */ CAResult_t CALEClientStartScanWithUUIDImpl(JNIEnv *env, jobjectArray uuids, jobject callback); /** - * @brief get uuid object - * @param env [IN] JNI interface pointer - * @param uuid [IN] uuid - * @return uuid object + * get uuid object. + * @param[in] env JNI interface pointer. + * @param[in] uuid uuid. + * @return uuid object. */ jobject CALEClientGetUUIDObject(JNIEnv *env, const char *uuid); /** - * @brief stop scan (interface) - * @return CA_STATUS_OK or ERROR CODES (CAResult_t error codes in cacommon.h) + * stop scan (interface). + * @return ::CA_STATUS_OK or ERROR CODES (::CAResult_t error codes in cacommon.h). */ CAResult_t CALEClientStopScan(); /** - * @brief stop scan (implement) - * @param env [IN] JNI interface pointer - * @param callback [IN] callback to receive device object by scanning - * @return CA_STATUS_OK or ERROR CODES (CAResult_t error codes in cacommon.h) + * stop scan (implement). + * @param[in] env JNI interface pointer. + * @param[in] callback callback to receive device object by scanning. + * @return ::CA_STATUS_OK or ERROR CODES (::CAResult_t error codes in cacommon.h). */ CAResult_t CALEClientStopScanImpl(JNIEnv *env, jobject callback); /** - * @brief connect to gatt server hosted - * @param env [IN] JNI interface pointer - * @param bluetoothDevice [IN] bluetooth Device object - * @param autoconnect [IN] whether to directly connect to the remote device(false) or + * connect to gatt server hosted. + * @param[in] env JNI interface pointer. + * @param[in] bluetoothDevice bluetooth Device object. + * @param[in] autoconnect whether to directly connect to the remote device(false) or * to automatically connect as soon as the remote device - * becomes available - * @param callback [IN] callback for connection state change - * @return CA_STATUS_OK or ERROR CODES (CAResult_t error codes in cacommon.h) + * becomes available. + * @param[in] callback callback for connection state change. + * @return ::CA_STATUS_OK or ERROR CODES (::CAResult_t error codes in cacommon.h). */ CAResult_t CALEClientConnect(JNIEnv *env, jobject bluetoothDevice, jboolean autoconnect, jobject callback); /** - * @brief disconnect to gatt server by a target device - * @param env [IN] JNI interface pointer - * @param bluetoothGatt [IN] Gatt profile object - * @return CA_STATUS_OK or ERROR CODES (CAResult_t error codes in cacommon.h) + * disconnect to gatt server by a target device. + * @param[in] env JNI interface pointer. + * @param[in] bluetoothGatt Gatt profile object. + * @return ::CA_STATUS_OK or ERROR CODES (::CAResult_t error codes in cacommon.h). */ CAResult_t CALEClientDisconnect(JNIEnv *env, jobject bluetoothGatt); /** - * @brief disconnect to gatt server by whole devices - * @param env [IN] JNI interface pointer - * @return CA_STATUS_OK or ERROR CODES (CAResult_t error codes in cacommon.h) + * disconnect to gatt server by whole devices. + * @param[in] env JNI interface pointer. + * @return ::CA_STATUS_OK or ERROR CODES (::CAResult_t error codes in cacommon.h). */ CAResult_t CALEClientDisconnectAll(JNIEnv *env); /** - * @brief start discovery server - * @param env [IN] JNI interface pointer - * @param bluetoothGatt [IN] Gatt profile object - * @return CA_STATUS_OK or ERROR CODES (CAResult_t error codes in cacommon.h) + * start discovery server. + * @param[in] env JNI interface pointer. + * @param[in] bluetoothGatt Gatt profile object. + * @return ::CA_STATUS_OK or ERROR CODES (::CAResult_t error codes in cacommon.h). */ CAResult_t CALEClientDiscoverServices(JNIEnv *env, jobject bluetoothGatt); /** - * @brief create GattCharacteristic and call CALEClientWriteCharacteristicImpl - * for request to write gatt characteristic - * @param env [IN] JNI interface pointer - * @param gatt [IN] Gatt profile object - * @return CA_STATUS_OK or ERROR CODES (CAResult_t error codes in cacommon.h) + * create GattCharacteristic and call CALEClientWriteCharacteristicImpl + * for request to write gatt characteristic. + * @param[in] env JNI interface pointer. + * @param[in] gatt Gatt profile object. + * @return ::CA_STATUS_OK or ERROR CODES (::CAResult_t error codes in cacommon.h). */ CAResult_t CALEClientWriteCharacteristic(JNIEnv *env, jobject gatt); /** - * @brief request to write gatt characteristic - * @param env [IN] JNI interface pointer - * @param bluetoothGatt [IN] Gatt profile object - * @param gattCharacteristic [IN] characteristic object that contain data to send - * @return CA_STATUS_OK or ERROR CODES (CAResult_t error codes in cacommon.h) + * request to write gatt characteristic. + * @param[in] env JNI interface pointer. + * @param[in] bluetoothGatt Gatt profile object. + * @param[in] gattCharacteristic characteristic object that contain data to send. + * @return ::CA_STATUS_OK or ERROR CODES (::CAResult_t error codes in cacommon.h). */ CAResult_t CALEClientWriteCharacteristicImpl(JNIEnv *env, jobject bluetoothGatt, jobject gattCharacteristic); /** - * @brief request to read gatt characteristic - * @param env [IN] JNI interface pointer - * @param bluetoothGatt [IN] Gatt profile object - * @return CA_STATUS_OK or ERROR CODES (CAResult_t error codes in cacommon.h) + * request to read gatt characteristic. + * @param[in] env JNI interface pointer. + * @param[in] bluetoothGatt Gatt profile object. + * @return ::CA_STATUS_OK or ERROR CODES (::CAResult_t error codes in cacommon.h). */ CAResult_t CALEClientReadCharacteristic(JNIEnv *env, jobject bluetoothGatt); /** - * @brief enable notification for a target device - * @param env [IN] JNI interface pointer - * @param bluetoothGatt [IN] Gatt profile object - * @param characteristic [IN] Characteristic object - * @return CA_STATUS_OK or ERROR CODES (CAResult_t error codes in cacommon.h) + * enable notification for a target device. + * @param[in] env JNI interface pointer. + * @param[in] bluetoothGatt Gatt profile object. + * @param[in] characteristic Characteristic object. + * @return ::CA_STATUS_OK or ERROR CODES (::CAResult_t error codes in cacommon.h). */ CAResult_t CALEClientSetCharacteristicNotification(JNIEnv *env, jobject bluetoothGatt, jobject characteristic); /** - * @brief create gatt characteristic object - * @param env [IN] JNI interface pointer - * @param bluetoothGatt [IN] Gatt profile object - * @param data [IN] for make Characteristic with data - * @return Gatt Characteristic object + * create gatt characteristic object. + * @param[in] env JNI interface pointer. + * @param[in] bluetoothGatt Gatt profile object. + * @param[in] data for make Characteristic with data. + * @return Gatt Characteristic object. */ jobject CALEClientCreateGattCharacteristic(JNIEnv *env, jobject bluetoothGatt, jbyteArray data); /** - * @brief get gatt service - * @param env [IN] JNI interface pointer - * @param bluetoothGatt [IN] Gatt profile object - * @param characterUUID [IN] for make BluetoothGattCharacteristic object - * @return Gatt Service + * get gatt service. + * @param[in] env JNI interface pointer. + * @param[in] bluetoothGatt Gatt profile object. + * @param[in] characterUUID for make BluetoothGattCharacteristic object. + * @return Gatt Service. */ jobject CALEClientGetGattService(JNIEnv *env, jobject bluetoothGatt, jstring characterUUID); /** - * @brief get value from characteristic - * @param env [IN] JNI interface pointer - * @param characteristic [IN] Characteristic object - * @return value in characteristic + * get value from characteristic. + * @param[in] env JNI interface pointer. + * @param[in] characteristic Characteristic object. + * @return value in characteristic. */ jbyteArray CALEClientGetValueFromCharacteristic(JNIEnv *env, jobject characteristic); /** - * @brief create UUID List - * @return CA_STATUS_OK or ERROR CODES (CAResult_t error codes in cacommon.h) + * create UUID List. + * @return ::CA_STATUS_OK or ERROR CODES (::CAResult_t error codes in cacommon.h). */ CAResult_t CALEClientCreateUUIDList(); /** - * @brief set UUID to descriptor - * @param env [IN] JNI interface pointer - * @param bluetoothGatt [IN] Gatt profile object - * @param characteristic [IN] Characteristic object - * @return CA_STATUS_OK or ERROR CODES (CAResult_t error codes in cacommon.h) + * set UUID to descriptor. + * @param[in] env JNI interface pointer. + * @param[in] bluetoothGatt Gatt profile object. + * @param[in] characteristic Characteristic object. + * @return ::CA_STATUS_OK or ERROR CODES (::CAResult_t error codes in cacommon.h). */ CAResult_t CALEClientSetUUIDToDescriptor(JNIEnv *env, jobject bluetoothGatt, jobject characteristic); /** - * BluetoothDevice List - */ -/** - * @brief add device object to scan device list - * @param env [IN] JNI interface pointer - * @param device [IN] bluetooth device object - * @return CA_STATUS_OK or ERROR CODES (CAResult_t error codes in cacommon.h) + * add device object to scan device list. + * @param[in] env JNI interface pointer. + * @param[in] device bluetooth device object. + * @return ::CA_STATUS_OK or ERROR CODES (::CAResult_t error codes in cacommon.h). */ CAResult_t CALEClientAddScanDeviceToList(JNIEnv *env, jobject device); /** - * @brief check whether the device exist in list or not - * @param env [IN] JNI interface pointer - * @param remoteAddress [IN] remote address - * @return true or false + * check whether the device exist in list or not. + * @param[in] env JNI interface pointer. + * @param[in] remoteAddress remote address. + * @return true or false. */ bool CALEClientIsDeviceInScanDeviceList(JNIEnv *env, const char *remoteAddress); /** - * @brief remove all devices in scan device list - * @param env [IN] JNI interface pointer - * @return CA_STATUS_OK or ERROR CODES (CAResult_t error codes in cacommon.h) + * remove all devices in scan device list. + * @param[in] env JNI interface pointer. + * @return ::CA_STATUS_OK or ERROR CODES (::CAResult_t error codes in cacommon.h). */ CAResult_t CALEClientRemoveAllScanDevices(JNIEnv *env); /** - * @brief remove target device in scan device list - * @param env [IN] JNI interface pointer - * @param remoteAddress [IN] remote address - * @return CA_STATUS_OK or ERROR CODES (CAResult_t error codes in cacommon.h) + * remove target device in scan device list. + * @param[in] env JNI interface pointer. + * @param[in] remoteAddress remote address. + * @return ::CA_STATUS_OK or ERROR CODES (::CAResult_t error codes in cacommon.h). */ CAResult_t CALEClientRemoveDeviceInScanDeviceList(JNIEnv *env, jstring remoteAddress); /** - * BluetoothGatt List - */ - -/** - * @brief add gatt object to gatt object list - * @param env [IN] JNI interface pointer - * @param gatt [IN] Gatt profile object - * @return CA_STATUS_OK or ERROR CODES (CAResult_t error codes in cacommon.h) + * add gatt object to gatt object list. + * @param[in] env JNI interface pointer. + * @param[in] gatt Gatt profile object. + * @return ::CA_STATUS_OK or ERROR CODES (::CAResult_t error codes in cacommon.h). */ CAResult_t CALEClientAddGattobjToList(JNIEnv *env, jobject gatt); /** - * @brief check whether the gatt object exist in list or not - * @param env [IN] JNI interface pointer - * @param remoteAddress [IN] remote address - * @return true or false + * check whether the gatt object exist in list or not. + * @param[in] env JNI interface pointer. + * @param[in] remoteAddress remote address. + * @return true or false. */ bool CALEClientIsGattObjInList(JNIEnv *env, const char *remoteAddress); /** - * @brief get the gatt object - * @param env [IN] JNI interface pointer - * @param remoteAddress [IN] remote address - * @return gatt object + * get the gatt object. + * @param[in] env JNI interface pointer. + * @param[in] remoteAddress remote address. + * @return gatt object. */ jobject CALEClientGetGattObjInList(JNIEnv *env, const char* remoteAddress); /** - * @brief remove all gatt objects in gatt object list - * @param env [IN] JNI interface pointer - * @return CA_STATUS_OK or ERROR CODES (CAResult_t error codes in cacommon.h) + * remove all gatt objects in gatt object list. + * @param[in] env JNI interface pointer. + * @return ::CA_STATUS_OK or ERROR CODES (::CAResult_t error codes in cacommon.h). */ CAResult_t CALEClientRemoveAllGattObjs(JNIEnv *env); /** - * @brief remove target device in gatt object list - * @param env [IN] JNI interface pointer - * @param gatt [IN] Gatt profile object - * @return CA_STATUS_OK or ERROR CODES (CAResult_t error codes in cacommon.h) + * remove target device in gatt object list. + * @param[in] env JNI interface pointer. + * @param[in] gatt Gatt profile object. + * @return ::CA_STATUS_OK or ERROR CODES (::CAResult_t error codes in cacommon.h). */ CAResult_t CALEClientRemoveGattObj(JNIEnv *env, jobject gatt); /** - * @brief remove gatt object of target device for address in gatt object list - * @param env [IN] JNI interface pointer - * @param gatt [IN] Gatt profile object - * @return CA_STATUS_OK or ERROR CODES (CAResult_t error codes in cacommon.h) + * remove gatt object of target device for address in gatt object list. + * @param[in] env JNI interface pointer. + * @param[in] gatt Gatt profile object. + * @return ::CA_STATUS_OK or ERROR CODES (::CAResult_t error codes in cacommon.h). */ CAResult_t CALEClientRemoveGattObjForAddr(JNIEnv *env, jstring addr); /** - * BT State Info List - */ - -/** - * @brief update new state information - * @param address [IN] remote address - * @param connectedState [IN] connection state - * @param notificationState [IN] whether characteristic notification already set or not - * @param sendState [IN] whether sending was success or not - * @return CA_STATUS_OK or ERROR CODES (CAResult_t error codes in cacommon.h) + * update new state information. + * @param[in] address remote address. + * @param[in] connectedState connection state. + * @param[in] notificationState whether characteristic notification already set or not. + * @param[in] sendState whether sending was success or not. + * @return ::CA_STATUS_OK or ERROR CODES (::CAResult_t error codes in cacommon.h). */ CAResult_t CALEClientUpdateDeviceState(const char* address, uint32_t connectedState, uint16_t notificationState, uint16_t sendState); /** - * @brief add new state to state list - * @param state [IN] new state - * @return CA_STATUS_OK or ERROR CODES (CAResult_t error codes in cacommon.h) + * add new state to state list. + * @param[in] state new state. + * @return ::CA_STATUS_OK or ERROR CODES (::CAResult_t error codes in cacommon.h). */ CAResult_t CALEClientAddDeviceStateToList(CALEState_t* state); /** - * @brief check whether the remote address is existed or not. - * @param address [IN] remote address - * @return true or false + * check whether the remote address is existed or not. + * @param[in] address remote address. + * @return true or false. */ bool CALEClientIsDeviceInList(const char *remoteAddress); /** - * @brief remove all device states - * @return CA_STATUS_OK or ERROR CODES (CAResult_t error codes in cacommon.h) + * remove all device states. + * @return ::CA_STATUS_OK or ERROR CODES (::CAResult_t error codes in cacommon.h). */ CAResult_t CALEClientRemoveAllDeviceState(); /** - * @brief remove the device state for a remote device - * @param remoteAddress [IN] remote address - * @return CA_STATUS_OK or ERROR CODES (CAResult_t error codes in cacommon.h) + * remove the device state for a remote device. + * @param[in] remoteAddress remote address. + * @return ::CA_STATUS_OK or ERROR CODES (::CAResult_t error codes in cacommon.h). */ CAResult_t CALEClientRemoveDeviceState(const char* remoteAddress); /** - * @brief get state information for a remote device - * @param remoteAddress [IN] remote address - * @return CALEState_t + * get state information for a remote device. + * @param[in] remoteAddress remote address. + * @return CALEState_t. */ CALEState_t* CALEClientGetStateInfo(const char* remoteAddress); /** - * @brief check whether the remote address is connected or not. - * @param remoteAddress [IN] remote address - * @return true or false + * check whether the remote address is connected or not. + * @param[in] remoteAddress remote address. + * @return true or false. */ bool CALEClientIsConnectedDevice(const char* remoteAddress); /** - * @brief check whether the remote address set CharacteristicNotification or not - * @param remoteAddress [IN] remote address - * @return true or false + * check whether the remote address set CharacteristicNotification or not. + * @param[in] remoteAddress remote address. + * @return true or false. */ bool CALEClientIsSetCharacteristic(const char* remoteAddress); /** - * @brief create scan device list - * @return None + * create scan device list. */ void CALEClientCreateDeviceList(); /** - * @brief Reordering for device state list - * @param index [IN] index of device list that want to reordering - * @param list [IN] the list to reorder - * @return CA_STATUS_OK or ERROR CODES (CAResult_t error codes in cacommon.h) + * Reordering for device state list. + * @param[in] index index of device list that want to reordering. + * @param[in] list the list to reorder. + * @return ::CA_STATUS_OK or ERROR CODES (::CAResult_t error codes in cacommon.h). */ CAResult_t CALEClientReorderingList(uint32_t index, u_arraylist_t *list); /** - * @brief update the counter which data is sent to remote device - * @param env [IN] JNI interface pointer - * @return None + * update the counter which data is sent to remote device. + * @param[in] env JNI interface pointer. */ void CALEClientUpdateSendCnt(JNIEnv *env); /** - * @brief initialize mutex - * @return CA_STATUS_OK or ERROR CODES (CAResult_t error codes in cacommon.h) + * initialize mutex. + * @return ::CA_STATUS_OK or ERROR CODES (::CAResult_t error codes in cacommon.h). */ CAResult_t CALEClientInitGattMutexVaraibles(); /** - * @brief terminate mutex - * @return None + * terminate mutex. */ void CALEClientTerminateGattMutexVariables(); /** - * @brief set send finish flag - * @param flag [IN] flag - * @return None + * set send finish flag. + * @param[in] flag finish flag. */ void CALEClientSetSendFinishFlag(bool flag); diff --git a/resource/csdk/connectivity/src/bt_le_adapter/android/calenwmonitor.h b/resource/csdk/connectivity/src/bt_le_adapter/android/calenwmonitor.h index c04a0d6..25f20d9 100644 --- a/resource/csdk/connectivity/src/bt_le_adapter/android/calenwmonitor.h +++ b/resource/csdk/connectivity/src/bt_le_adapter/android/calenwmonitor.h @@ -1,26 +1,26 @@ -/****************************************************************** -* -* Copyright 2014 Samsung Electronics All Rights Reserved. -* -* -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -* -******************************************************************/ +/* **************************************************************** + * + * Copyright 2014 Samsung Electronics All Rights Reserved. + * + * + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + ******************************************************************/ /** -* @file calenwmonitor.h -* @brief This file contains the APIs for BT LE communications. +* @file +* This file contains the APIs for BT LE communications. */ #ifndef CA_LENWMONITOR_H_ #define CA_LENWMONITOR_H_ @@ -37,21 +37,19 @@ extern "C" #endif /** - * @brief set context of application - * @return None + * set context of application. */ void CALENetworkMonitorJNISetContext(); /** - * @brief initialize JNI object - * @return None + * initialize JNI object. */ void CALENetworkMonitorJniInit(); /** - * @brief Set this callback for receiving network information from BT stack. - * @param callback [IN] Callback to be notified on reception of BT state information - * @return NONE + * Set this callback for receiving network information from BT stack. + * @param[in] callback Callback to be notified on reception of BT state information. + */ void CALESetNetStateCallback(CALEDeviceStateChangedCallback callback); diff --git a/resource/csdk/connectivity/src/bt_le_adapter/android/caleserver.h b/resource/csdk/connectivity/src/bt_le_adapter/android/caleserver.h index 2966e5e..6d1dc74 100644 --- a/resource/csdk/connectivity/src/bt_le_adapter/android/caleserver.h +++ b/resource/csdk/connectivity/src/bt_le_adapter/android/caleserver.h @@ -1,4 +1,4 @@ -/****************************************************************** +/* **************************************************************** * * Copyright 2014 Samsung Electronics All Rights Reserved. * @@ -19,8 +19,8 @@ ******************************************************************/ /** - * @file caleserver.h - * @brief This file contains the APIs for BT LE communications. + * @file + * This file contains the APIs for BT LE communications. */ #ifndef CA_LESERVER_H_ #define CA_LESERVER_H_ @@ -36,297 +36,287 @@ extern "C" #endif /** - * @brief Callback to be notified on reception of any data from remote devices. - * @param address [IN] MAC address of remote device. - * @param data [IN] Data received from remote device. - * @return None - * @pre Callback must be registered using CALEServerSetCallback(CAPacketReceiveCallback callback) + * Callback to be notified on reception of any data from remote devices. + * @param[in] address MAC address of remote device. + * @param[in] data Data received from remote device. + * @pre Callback must be registered using CALEServerSetCallback(CAPacketReceiveCallback callback). */ typedef void (*CAPacketReceiveCallback)(const char *address, const char *data); /** - * @brief initialize server for BLE - * @param handle [IN] thread pool handle object - * @return CA_STATUS_OK or ERROR CODES (CAResult_t error codes in cacommon.h) + * initialize server for BLE. + * @param[in] handle thread pool handle object. + * @return ::CA_STATUS_OK or ERROR CODES (::CAResult_t error codes in cacommon.h). */ CAResult_t CALEServerInitialize(ca_thread_pool_t handle); /** - * @brief terminate client for BLE - * @return None + * terminate client for BLE. */ void CALEServerTerminate(); /** - * @brief send data for unicast (interface) - * @param address [IN] remote address - * @param data [IN] data for transmission - * @param dataLen [IN] data length - * @return CA_STATUS_OK or ERROR CODES (CAResult_t error codes in cacommon.h) + * send data for unicast (interface). + * @param[in] address remote address. + * @param[in] data data for transmission. + * @param[in] dataLen data length. + * @return ::CA_STATUS_OK or ERROR CODES (::CAResult_t error codes in cacommon.h). */ CAResult_t CALEServerSendUnicastMessage(const char *address, const char *data, uint32_t dataLen); /** - * @brief send data for multicast (interface) - * @param data [IN] data for transmission - * @param dataLen [IN] data length - * @return CA_STATUS_OK or ERROR CODES (CAResult_t error codes in cacommon.h) + * send data for multicast (interface). + * @param[in] data data for transmission. + * @param[in] dataLen data length. + * @return ::CA_STATUS_OK or ERROR CODES (::CAResult_t error codes in cacommon.h). */ CAResult_t CALEServerSendMulticastMessage(const char *data, uint32_t dataLen); /** - * @brief start multicast server (start advertise) - * @return CA_STATUS_OK or ERROR CODES (CAResult_t error codes in cacommon.h) + * start multicast server (start advertise). + * @return ::CA_STATUS_OK or ERROR CODES (::CAResult_t error codes in cacommon.h). */ CAResult_t CALEServerStartMulticastServer(); /** - * @brief stop multicast server (stop discovery) + * stop multicast server (stop discovery). * @return None */ CAResult_t CALEServerStopMulticastServer(); /** - * @brief set this callback for receiving data packets from peer devices. - * @param callback [IN] callback to be notified on reception of - * unicast/multicast data packets. - * @return None + * set this callback for receiving data packets from peer devices. + * @param[in] callback callback to be notified on reception of + * unicast/multicast data packets. */ void CALEServerSetCallback(CAPacketReceiveCallback callback); /** - * @brief send data for unicast (implement) - * @param env [IN] JNI interface pointer - * @param address [IN] remote address - * @param data [IN] data for transmission - * @param dataLen [IN] data length - * @return CA_STATUS_OK or ERROR CODES (CAResult_t error codes in cacommon.h) + * send data for unicast (implement). + * @param[in] env JNI interface pointer. + * @param[in] address remote address. + * @param[in] data data for transmission. + * @param[in] dataLen data length. + * @return ::CA_STATUS_OK or ERROR CODES (::CAResult_t error codes in cacommon.h). */ CAResult_t CALEServerSendUnicastMessageImpl(JNIEnv *env, const char *address, const char *data, uint32_t dataLen); /** - * @brief send data for multicast (implement) - * @param env [IN] JNI interface pointer - * @param data [IN] data for transmission - * @param dataLen [IN] data length - * @return CA_STATUS_OK or ERROR CODES (CAResult_t error codes in cacommon.h) + * send data for multicast (implement) + * @param[in] env JNI interface pointer + * @param[in] data data for transmission + * @param[in] dataLen data length + * @return ::CA_STATUS_OK or ERROR CODES (::CAResult_t error codes in cacommon.h). */ CAResult_t CALEServerSendMulticastMessageImpl(JNIEnv *env, const char *data, uint32_t dataLen); -/* Android BLE Server Functions */ /** - * @brief set context of application - * @return None + * set context of application. */ void CALEServerJNISetContext(); /** - * @brief initialize JNI object - * @return None + * initialize JNI object. */ void CALeServerJniInit(); /** - * @brief create interface object and initialize the object - * @return CA_STATUS_OK or ERROR CODES (CAResult_t error codes in cacommon.h) + * create interface object and initialize the object. + * @return ::CA_STATUS_OK or ERROR CODES (::CAResult_t error codes in cacommon.h). */ CAResult_t CALEServerCreateJniInterfaceObject(); /** - * @brief start advertise in gatt server - * @param env [IN] JNI interface pointer - * @param advertiseCallback [IN] callback to be notified on reception of - * advertisement result - * @return CA_STATUS_OK or ERROR CODES (CAResult_t error codes in cacommon.h) + * start advertise in gatt server. + * @param[in] env JNI interface pointer. + * @param[in] advertiseCallback callback to be notified on reception of + * advertisement result. + * @return ::CA_STATUS_OK or ERROR CODES (::CAResult_t error codes in cacommon.h). */ CAResult_t CALEServerStartAdvertise(JNIEnv *env, jobject advertiseCallback); /** - * @brief stop advertise in gatt server - * @param env [IN] JNI interface pointer - * @param advertiseCallback [IN] callback to be notified on reception of - * advertisement result - * @return CA_STATUS_OK or ERROR CODES (CAResult_t error codes in cacommon.h) + * stop advertise in gatt server. + * @param[in] env JNI interface pointer. + * @param[in] advertiseCallback callback to be notified on reception of + * advertisement result. + * @return ::CA_STATUS_OK or ERROR CODES (::CAResult_t error codes in cacommon.h). */ CAResult_t CALEServerStopAdvertise(JNIEnv *env, jobject advertiseCallback); /** - * @brief open a gatt server - * @param env [IN] JNI interface pointer - * @return gatt server object + * open a gatt server. + * @param[in] env JNI interface pointer. + * @return gatt server object. */ jobject CALEServerOpenGattServer(JNIEnv *env); /** - * @brief create gatt service - * @param env [IN] JNI interface pointer + * create gatt service + * @param[in] env JNI interface pointer * @return gatt service object */ jobject CALEServerCreateGattService(JNIEnv *env); /** - * @brief add a descriptor to the characteristic - * @param env [IN] JNI interface pointer - * @param characteristic [IN] Characteristic object - * @return CA_STATUS_OK or ERROR CODES (CAResult_t error codes in cacommon.h) + * add a descriptor to the characteristic. + * @param[in] env JNI interface pointer. + * @param[in] characteristic Characteristic object. + * @return ::CA_STATUS_OK or ERROR CODES (::CAResult_t error codes in cacommon.h). */ CAResult_t CALEServerAddDescriptor(JNIEnv *env, jobject characteristic); /** - * @brief create gatt service - * @param env [IN] JNI interface pointer - * @param bluetoothGattServer [IN] Bluetooth Gatt Server object - * @param bluetoothGattService [IN] Bluetooth Gatt Service object - * @return CA_STATUS_OK or ERROR CODES (CAResult_t error codes in cacommon.h) + * create gatt service. + * @param[in] env JNI interface pointer. + * @param[in] bluetoothGattServer Bluetooth Gatt Server object. + * @param[in] bluetoothGattService Bluetooth Gatt Service object. + * @return ::CA_STATUS_OK or ERROR CODES (::CAResult_t error codes in cacommon.h). */ CAResult_t CALEServerAddGattService(JNIEnv *env, jobject bluetoothGattServer, jobject bluetoothGattService); /** - * @brief start gatt server - * @param env [IN] JNI interface pointer - * @param gattServerCallback [IN] callback to be notified on reception of - * state change of gatt server - * @return CA_STATUS_OK or ERROR CODES (CAResult_t error codes in cacommon.h) + * start gatt server. + * @param[in] env JNI interface pointer. + * @param[in] gattServerCallback callback to be notified on reception of + * state change of gatt server. + * @return ::CA_STATUS_OK or ERROR CODES (::CAResult_t error codes in cacommon.h). */ CAResult_t CALEServerStartGattServer(JNIEnv *env, jobject gattServerCallback); /** - * @brief close gatt server - * @param env [IN] JNI interface pointer - * @param bluetoothGattServer [IN] Gatt Server object - * @return CA_STATUS_OK or ERROR CODES (CAResult_t error codes in cacommon.h) + * close gatt server. + * @param[in] env JNI interface pointer. + * @param[in] bluetoothGattServer Gatt Server object. + * @return ::CA_STATUS_OK or ERROR CODES (::CAResult_t error codes in cacommon.h). */ CAResult_t CALEServerGattClose(JNIEnv *env, jobject bluetoothGattServer); /** - * @brief send data - * @param env [IN] JNI interface pointer - * @param bluetoothDevice [IN] bluetooth device object - * @param data [IN] data which send - * @return CA_STATUS_OK or ERROR CODES (CAResult_t error codes in cacommon.h) + * send data. + * @param[in] env JNI interface pointer. + * @param[in] bluetoothDevice bluetooth device object. + * @param[in] data data which send. + * @return ::CA_STATUS_OK or ERROR CODES (::CAResult_t error codes in cacommon.h). */ CAResult_t CALEServerSend(JNIEnv *env, jobject bluetoothDevice, jstring data); /** - * @brief set data in BluetoothGattCharacteristic - * @param env [IN] JNI interface pointer - * @param responseData [IN] data to set in characteristic object - * @return BluetoothGattCharacteristic object + * set data in BluetoothGattCharacteristic. + * @param[in] env JNI interface pointer. + * @param[in] responseData data to set in characteristic object. + * @return BluetoothGattCharacteristic object. */ jobject CALEServerSetResponseData(JNIEnv *env, jbyteArray responseData); /** - * @brief send data through notifyCharacteristicChanged api of android - * @param env [IN] JNI interface pointer - * @param device [IN] bluetooth device object - * @param responseData [IN] data which send - * @return CA_STATUS_OK or ERROR CODES (CAResult_t error codes in cacommon.h) + * send data through notifyCharacteristicChanged api of android. + * @param[in] env JNI interface pointer. + * @param[in] device bluetooth device object. + * @param[in] responseData data which send. + * @return ::CA_STATUS_OK or ERROR CODES (::CAResult_t error codes in cacommon.h). */ CAResult_t CALEServerSendResponseData(JNIEnv *env, jobject device, jobject responseData); /** - * @brief send a response to a write request to a remote device - * @param env [IN] JNI interface pointer - * @param device [IN] bluetooth device object - * @param requestId [IN] the id of request - * @param status [IN] the status of the request to be sent to the remote devices - * @param offset [IN] value offset for partial write response - * @param value [IN] the value of the attribute that written (optional) - * @return CA_STATUS_OK or ERROR CODES (CAResult_t error codes in cacommon.h) + * send a response to a write request to a remote device. + * @param[in] env JNI interface pointer. + * @param[in] device bluetooth device object. + * @param[in] requestId the id of request. + * @param[in] status the status of the request to be sent to the remote devices. + * @param[in] offset value offset for partial write response. + * @param[in] value the value of the attribute that written (optional). + * @return ::CA_STATUS_OK or ERROR CODES (::CAResult_t error codes in cacommon.h). */ CAResult_t CALEServerSendResponse(JNIEnv *env, jobject device, jint requestId, jint status, jint offset, jbyteArray value); /** - * @brief connect BLE to remote device form gatt server - * @param env [IN] JNI interface pointer - * @param bluetoothDevice [IN] bluetooth device object - * @return CA_STATUS_OK or ERROR CODES (CAResult_t error codes in cacommon.h) + * connect BLE to remote device form gatt server. + * @param[in] env JNI interface pointer. + * @param[in] bluetoothDevice bluetooth device object. + * @return ::CA_STATUS_OK or ERROR CODES (::CAResult_t error codes in cacommon.h). */ CAResult_t CALEServerConnect(JNIEnv *env, jobject bluetoothDevice); /** - * @brief disconnect LE for all devices - * @param env [IN] JNI interface pointer - * @return CA_STATUS_OK or ERROR CODES (CAResult_t error codes in cacommon.h) + * disconnect LE for all devices. + * @param[in] env JNI interface pointer. + * @return ::CA_STATUS_OK or ERROR CODES (::CAResult_t error codes in cacommon.h). */ CAResult_t CALEServerDisconnectAllDevices(JNIEnv *env); /** - * @brief disconnect LE to remote device form gatt server - * @param env [IN] JNI interface pointer - * @param bluetoothDevice [IN] bluetooth device object - * @return CA_STATUS_OK or ERROR CODES (CAResult_t error codes in cacommon.h) + * disconnect LE to remote device form gatt server. + * @param[in] env JNI interface pointer. + * @param[in] bluetoothDevice bluetooth device object. + * @return ::CA_STATUS_OK or ERROR CODES (::CAResult_t error codes in cacommon.h). */ CAResult_t CALEServerDisconnect(JNIEnv *env, jobject bluetoothDevice); -/* BLE Server Utils */ /** - * @brief create connected device list - * @return None + * create connected device list. */ void CALEServerCreateCachedDeviceList(); /** - * @brief check whether the device exist in the list or not - * @param env [IN] JNI interface pointer - * @param remoteAddress [IN] remote address - * @return true or false + * check whether the device exist in the list or not. + * @param[in] env JNI interface pointer. + * @param[in] remoteAddress remote address. + * @return true or false. */ bool CALEServerIsDeviceInList(JNIEnv *env, const char* remoteAddress); /** - * @brief add device object to the list (connected device list) - * @param env [IN] JNI interface pointer - * @param device [IN] bluetooth device object - * @return CA_STATUS_OK or ERROR CODES (CAResult_t error codes in cacommon.h) + * add device object to the list (connected device list). + * @param[in] env JNI interface pointer. + * @param[in] device bluetooth device object. + * @return ::CA_STATUS_OK or ERROR CODES (::CAResult_t error codes in cacommon.h). */ CAResult_t CALEServerAddDeviceToList(JNIEnv *env, jobject device); /** - * @brief remove all devices objects in the list (connected device list) - * @param env [IN] JNI interface pointer - * @return CA_STATUS_OK or ERROR CODES (CAResult_t error codes in cacommon.h) + * remove all devices objects in the list (connected device list). + * @param[in] env JNI interface pointer. + * @return ::CA_STATUS_OK or ERROR CODES (::CAResult_t error codes in cacommon.h). */ CAResult_t CALEServerRemoveAllDevices(JNIEnv *env); /** - * @brief remove target device in the list (connected device list) - * @param env [IN] JNI interface pointer - * @param address [IN] target address to remove - * @return CA_STATUS_OK or ERROR CODES (CAResult_t error codes in cacommon.h) + * remove target device in the list (connected device list). + * @param[in] env JNI interface pointer. + * @param[in] address target address to remove. + * @return ::CA_STATUS_OK or ERROR CODES (::CAResult_t error codes in cacommon.h). */ CAResult_t CALEServerRemoveDevice(JNIEnv *env, jstring address); /** - * @brief Reordering for the list (connected device list) - * @param index [IN] index of device list that want to reordering - * @return CA_STATUS_OK or ERROR CODES (CAResult_t error codes in cacommon.h) + * Reordering for the list (connected device list). + * @param[in] index index of device list that want to reordering. + * @return ::CA_STATUS_OK or ERROR CODES (::CAResult_t error codes in cacommon.h). */ CAResult_t CALEServerReorderinglist(uint32_t index); /** - * @brief initialize mutex - * @return CA_STATUS_OK or ERROR CODES (CAResult_t error codes in cacommon.h) + * initialize mutex. + * @return ::CA_STATUS_OK or ERROR CODES (::CAResult_t error codes in cacommon.h). */ CAResult_t CALEServerInitMutexVaraibles(); /** - * @brief terminate mutex - * @return None + * terminate mutex. */ void CALEServerTerminateMutexVaraibles(); /** - * @brief initialize condition - * @return CA_STATUS_OK or ERROR CODES (CAResult_t error codes in cacommon.h) + * initialize condition. + * @return ::CA_STATUS_OK or ERROR CODES (::CAResult_t error codes in cacommon.h). */ CAResult_t CALEServerInitConditionVaraibles(); /** - * @brief terminate condition - * @return None + * terminate condition. */ void CALEServerTerminateConditionVaraibles(); diff --git a/resource/csdk/connectivity/src/bt_le_adapter/android/caleutils.h b/resource/csdk/connectivity/src/bt_le_adapter/android/caleutils.h index aa552d7..520c80a 100644 --- a/resource/csdk/connectivity/src/bt_le_adapter/android/caleutils.h +++ b/resource/csdk/connectivity/src/bt_le_adapter/android/caleutils.h @@ -1,4 +1,4 @@ -/****************************************************************** +/* **************************************************************** * * Copyright 2014 Samsung Electronics All Rights Reserved. * @@ -19,8 +19,8 @@ ******************************************************************/ /** - * @file caleutils.h - * @brief This file contains the APIs for BT LE communications. + * @file + * This file contains the APIs for BT LE communications. */ #ifndef CA_LE_UTILS_H_ #define CA_LE_UTILS_H_ @@ -49,77 +49,77 @@ static const jint BOND_BONDING = 11; static const jint BOND_NONE = 10; /** - * @brief get uuid(jni object) from uuid(character) - * @param env [IN] JNI interface pointer - * @param uuid [IN] uuid(character) - * @return uuid(jni object) + * get uuid(jni object) from uuid(character). + * @param[in] env JNI interface pointer. + * @param[in] uuid uuid(character). + * @return uuid(jni object). */ jobject CALEGetUuidFromString(JNIEnv *env, const char* uuid); /** - * @brief get parcel uuid object - * @param env [IN] JNI interface pointer - * @param uuid [IN] uuid (jni object) - * @return parcel uuid object + * get parcel uuid object. + * @param[in] env JNI interface pointer. + * @param[in] uuid uuid (jni object). + * @return parcel uuid object. */ jobject CALEGetParcelUuid(JNIEnv *env, jobject uuid); /** - * @brief get address from a local device - * @param env [IN] JNI interface pointer - * @return local address + * get address from a local device. + * @param[in] env JNI interface pointer. + * @return local address. */ jstring CALEGetLocalDeviceAddress(JNIEnv *env); /** - * @brief get bonded list - * @param env [IN] JNI interface pointer - * @return bonded list + * get bonded list. + * @param[in] env JNI interface pointer. + * @return bonded list. */ jobjectArray CALEGetBondedDevices(JNIEnv *env); /** - * @brief get constants information of bluetooth state-on - * @param env [IN] JNI interface pointer - * @return constants information of bluetooth state-on + * get constants information of bluetooth state-on. + * @param[in] env JNI interface pointer. + * @return constants information of bluetooth state-on. */ jint CALEGetBTStateOnInfo(JNIEnv *env); /** - * @brief check this device can be supported as BLE client or server - * @param env [IN] JNI interface pointer - * @param level [IN] Android API Level to support - * @return CA_STATUS_OK or ERROR CODES (CAResult_t error codes in cacommon.h) + * check this device can be supported as BLE client or server. + * @param[in] env JNI interface pointer. + * @param[in] level Android API Level to support. + * @return ::CA_STATUS_OK or ERROR CODES (::CAResult_t error codes in cacommon.h). */ CAResult_t CALECheckPlatformVersion(JNIEnv *env, uint16_t level); /** - * @brief get constants information of android.os.Build.VERSION.SDK_INT - * @param env [IN] JNI interface pointer - * @return constants information of android.os.Build.VERSION.SDK_INT + * get constants information of android.os.Build.VERSION.SDK_INT. + * @param[in] env JNI interface pointer. + * @return constants information of android.os.Build.VERSION.SDK_INT. */ jint CALEGetBuildVersion(JNIEnv *env); /** - * @brief get constants information of android.os.Build.VERSION_CODES.[VersionName] - * @param env [IN] JNI interface pointer - * @param versionName [IN] version name (.., KITKAT, LOLLIPOP, ..) - * @return constants information of android.os.Build.VERSION_CODES.[VersionName] + * get constants information of android.os.Build.VERSION_CODES.[VersionName]. + * @param[in] env JNI interface pointer. + * @param[in] versionName version name (.., KITKAT, LOLLIPOP, ..). + * @return constants information of android.os.Build.VERSION_CODES.[VersionName]. */ jint CALEGetBuildVersionCodeForName(JNIEnv *env, const char* versionName); /** - * @brief get bluetooth adapter state information - * @param env [IN] JNI interface pointer - * @return JNI_TRUE if the local adapter is turned on + * get bluetooth adapter state information. + * @param[in] env JNI interface pointer. + * @return JNI_TRUE if the local adapter is turned on. */ jboolean CALEIsEnableBTAdapter(JNIEnv *env); /** - * @brief get address from remote device - * @param env [IN] JNI interface pointer - * @param bluetoothDevice [IN] bluetooth device object - * @return remote address + * get address from remote device. + * @param[in] env JNI interface pointer. + * @param[in] bluetoothDevice bluetooth device object. + * @return remote address. */ jstring CALEGetAddressFromBTDevice(JNIEnv *env, jobject bluetoothDevice); diff --git a/resource/csdk/connectivity/src/bt_le_adapter/arduino/cableserver.h b/resource/csdk/connectivity/src/bt_le_adapter/arduino/cableserver.h index df0750a..490513f 100644 --- a/resource/csdk/connectivity/src/bt_le_adapter/arduino/cableserver.h +++ b/resource/csdk/connectivity/src/bt_le_adapter/arduino/cableserver.h @@ -1,22 +1,22 @@ /* **************************************************************** -* -* Copyright 2014 Samsung Electronics All Rights Reserved. -* -* -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -* -******************************************************************/ + * + * Copyright 2014 Samsung Electronics All Rights Reserved. + * + * + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + ******************************************************************/ /** * @file @@ -24,7 +24,7 @@ * This file contains the APIs related to the GATT Server functionalities. * Creation of the GATT Server with the characteristics. Enabling the * advertisement and updating the characteristics for the response and - * notifying the change of characteristcs for the request will be done here. + * notifying the change of characteristics for the request will be done here. */ #ifndef BLE_ADAPTER_ARDUINO_H_ @@ -39,32 +39,32 @@ extern "C" #endif /** - * @brief API to initialize Arduino BLE module and advertise the service - * @return #CA_STATUS_OK or Appropriate error code + * API to initialize Arduino BLE module and advertise the service. + * @return ::CA_STATUS_OK or Appropriate error code. */ CAResult_t CALEInitialize(); /** - * @brief API to check whether data is available in BLE shield - * @return - Received buffer length + * API to check whether data is available in BLE shield. + * @return - Received buffer length. */ unsigned char CAIsLEDataAvailable(); /** - * @brief API to check whether client is connected with BLE Shield - * @return - Connection state + * API to check whether client is connected with BLE Shield. + * @return - Connection state. */ unsigned char CAIsLEConnected(); /** - * @brief API to read data from BLE shield - * @return - Data read + * API to read data from BLE shield. + * @return - Data read. */ char CALEReadData(); /** - * @brief API to perform BLE events - * @return #CA_STATUS_OK or Appropriate error code + * API to perform BLE events. + * @return ::CA_STATUS_OK or Appropriate error code. */ CAResult_t CALEDoEvents(); diff --git a/resource/csdk/connectivity/src/bt_le_adapter/tizen/cableclient.h b/resource/csdk/connectivity/src/bt_le_adapter/tizen/cableclient.h index ed1adba..b583296 100644 --- a/resource/csdk/connectivity/src/bt_le_adapter/tizen/cableclient.h +++ b/resource/csdk/connectivity/src/bt_le_adapter/tizen/cableclient.h @@ -162,7 +162,7 @@ void CAStartBleGattClientThread(void *data); * * @return ::CA_STATUS_OK or Appropriate error code. * @retval ::CA_STATUS_OK Successful. - * @retval ::CA_STATUS_INVALID_PARAM Invalid input argumets. + * @retval ::CA_STATUS_INVALID_PARAM Invalid input arguments. * @retval ::CA_STATUS_FAILED Operation failed. */ CAResult_t CAInitGattClientMutexVariables(); @@ -182,7 +182,7 @@ void CAClearNonOICDeviceList(); * * @return ::CA_STATUS_OK or Appropriate error code. * @retval ::CA_STATUS_OK Successful. - * @retval ::CA_STATUS_INVALID_PARAM Invalid input argumets. + * @retval ::CA_STATUS_INVALID_PARAM Invalid input arguments. * @retval ::CA_STATUS_FAILED Operation failed. */ CAResult_t CABleGattSetScanParameter(); @@ -193,7 +193,7 @@ CAResult_t CABleGattSetScanParameter(); * * @return ::CA_STATUS_OK or Appropriate error code. * @retval ::CA_STATUS_OK Successful. - * @retval ::CA_STATUS_INVALID_PARAM Invalid input argumets. + * @retval ::CA_STATUS_INVALID_PARAM Invalid input arguments. * @retval ::CA_STATUS_FAILED Operation failed. */ CAResult_t CABleGattSetCallbacks(); @@ -210,7 +210,7 @@ void CABleGattUnSetCallbacks(); * * @return ::CA_STATUS_OK or Appropriate error code. * @retval ::CA_STATUS_OK Successful. - * @retval ::CA_STATUS_INVALID_PARAM Invalid input argumets. + * @retval ::CA_STATUS_INVALID_PARAM Invalid input arguments. * @retval ::CA_STATUS_FAILED Operation failed. */ CAResult_t CABleGattWatchCharacteristicChanges(bt_gatt_attribute_h service); @@ -226,7 +226,7 @@ void CABleGattUnWatchCharacteristicChanges(); * * @return ::CA_STATUS_OK or Appropriate error code. * @retval ::CA_STATUS_OK Successful. - * @retval ::CA_STATUS_INVALID_PARAM Invalid input argumets. + * @retval ::CA_STATUS_INVALID_PARAM Invalid input arguments. * @retval ::CA_STATUS_FAILED Operation failed. */ CAResult_t CABleGattStartDeviceDiscovery(); @@ -250,7 +250,7 @@ void CAGattConnectThread (void *remoteAddress); * * @return ::CA_STATUS_OK or Appropriate error code. * @retval ::CA_STATUS_OK Successful. - * @retval ::CA_STATUS_INVALID_PARAM Invalid input argumets. + * @retval ::CA_STATUS_INVALID_PARAM Invalid input arguments. * @retval ::CA_STATUS_FAILED Operation failed. */ CAResult_t CABleGattConnect(const char *remoteAddress); @@ -261,7 +261,7 @@ CAResult_t CABleGattConnect(const char *remoteAddress); * * @return ::CA_STATUS_OK or Appropriate error code. * @retval ::CA_STATUS_OK Successful. - * @retval ::CA_STATUS_INVALID_PARAM Invalid input argumets. + * @retval ::CA_STATUS_INVALID_PARAM Invalid input arguments. * @retval ::CA_STATUS_FAILED Operation failed. */ CAResult_t CABleGattDisConnect(const char *remoteAddress); @@ -276,14 +276,14 @@ void CADiscoverBLEServicesThread (void *remoteAddress); /** * Used to discover the services that is advertised by Gatt Server - * asynchrounously. + * asynchronously. * * @param[in] remoteAddress MAC address of remote device in which we want * to discover the services. * * @return ::CA_STATUS_OK or Appropriate error code. * @retval ::CA_STATUS_OK Successful. - * @retval ::CA_STATUS_INVALID_PARAM Invalid input argumets. + * @retval ::CA_STATUS_INVALID_PARAM Invalid input arguments. * @retval ::CA_STATUS_FAILED Operation failed. */ CAResult_t CABleGattDiscoverServices(const char *remoteAddress); @@ -306,7 +306,7 @@ void CADiscoverCharThread(void *stServiceInfo); * characteristics of given service handle. * @return ::CA_STATUS_OK or Appropriate error code. * @retval ::CA_STATUS_OK Successful. - * @retval ::CA_STATUS_INVALID_PARAM Invalid input argumets. + * @retval ::CA_STATUS_INVALID_PARAM Invalid input arguments. * @retval ::CA_STATUS_FAILED Operation failed. */ CAResult_t CABleGattDiscoverCharacteristics(bt_gatt_attribute_h service, @@ -330,7 +330,7 @@ void CADiscoverDescriptorThread(void *stServiceInfo); * descriptor of given char handle. * @return ::CA_STATUS_OK or Appropriate error code. * @retval ::CA_STATUS_OK Successful. - * @retval ::CA_STATUS_INVALID_PARAM Invalid input argumets. + * @retval ::CA_STATUS_INVALID_PARAM Invalid input arguments. * @retval ::CA_STATUS_FAILED Operation failed. */ CAResult_t CABleGattDiscoverDescriptor(bt_gatt_attribute_h service, @@ -353,7 +353,7 @@ void CASetCharacteristicDescriptorValueThread(void *stServiceInfo); * * @return ::CA_STATUS_OK or Appropriate error code. * @retval ::CA_STATUS_OK Successful. - * @retval ::CA_STATUS_INVALID_PARAM Invalid input argumets. + * @retval ::CA_STATUS_INVALID_PARAM Invalid input arguments. * @retval ::CA_STATUS_FAILED Operation failed. */ CAResult_t CASetCharacteristicDescriptorValue @@ -369,7 +369,7 @@ CAResult_t CASetCharacteristicDescriptorValue * * @return ::CA_STATUS_OK or Appropriate error code. * @retval ::CA_STATUS_OK Successful. - * @retval ::CA_STATUS_INVALID_PARAM Invalid input argumets. + * @retval ::CA_STATUS_INVALID_PARAM Invalid input arguments. * @retval ::CA_STATUS_FAILED Operation failed. */ CAResult_t CABleClientSenderQueueEnqueueMessage @@ -386,7 +386,7 @@ void CABleClientSenderQueueProcessor(); * * @return ::CA_STATUS_OK or Appropriate error code. * @retval ::CA_STATUS_OK Successful. - * @retval ::CA_STATUS_INVALID_PARAM Invalid input argumets. + * @retval ::CA_STATUS_INVALID_PARAM Invalid input arguments. * @retval ::CA_STATUS_FAILED Operation failed. */ CAResult_t CALEReadDataFromLEClient(); diff --git a/resource/csdk/connectivity/src/bt_le_adapter/tizen/cableserver.h b/resource/csdk/connectivity/src/bt_le_adapter/tizen/cableserver.h index 9d83d93..dcf6a0a 100644 --- a/resource/csdk/connectivity/src/bt_le_adapter/tizen/cableserver.h +++ b/resource/csdk/connectivity/src/bt_le_adapter/tizen/cableserver.h @@ -1,22 +1,22 @@ /* **************************************************************** -* -* Copyright 2014 Samsung Electronics All Rights Reserved. -* -* -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -* -******************************************************************/ + * + * Copyright 2014 Samsung Electronics All Rights Reserved. + * + * + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + ******************************************************************/ /** * @file @@ -37,186 +37,181 @@ #include "caleinterface.h" /** - * @brief This is thread which will be used for creating ble service and advertise ble service. - * 1. Create New OIC Service 2. Add two read & write characteristics to service. - * 3. Register Service 4. Advertise service. + * This is thread which will be used for creating ble service and advertise ble service. + * 1. Create New OIC Service 2. Add two read & write characteristics to service. + * 3. Register Service 4. Advertise service. * - * @param data [IN] Currently it will be NULL. - * @return NONE + * @param[in] data Currently it will be NULL. */ void CAStartBleGattServerThread(void *data); /** - * @brief Used to initialize gatt service using _bt_gatt_init_service api. + * Used to initialize gatt service using _bt_gatt_init_service api. * - * @return #CA_STATUS_OK or Appropriate error code - * @retval #CA_STATUS_OK Successful - * @retval #CA_STATUS_INVALID_PARAM Invalid input argumets - * @retval #CA_STATUS_FAILED Operation failed + * @return ::CA_STATUS_OK or Appropriate error code. + * @retval ::CA_STATUS_OK Successful. + * @retval ::CA_STATUS_INVALID_PARAM Invalid input arguments. + * @retval ::CA_STATUS_FAILED Operation failed. */ CAResult_t CAInitBleGattService(); /** - * @brief Used to de-initialize gatt service using _bt_gatt_deinit_service api. + * Used to de-initialize gatt service using _bt_gatt_deinit_service api. * - * @return #CA_STATUS_OK or Appropriate error code - * @retval #CA_STATUS_OK Successful - * @retval #CA_STATUS_INVALID_PARAM Invalid input argumets - * @retval #CA_STATUS_FAILED Operation failed + * @return ::CA_STATUS_OK or Appropriate error code. + * @retval ::CA_STATUS_OK Successful. + * @retval ::CA_STATUS_INVALID_PARAM Invalid input arguments. + * @retval ::CA_STATUS_FAILED Operation failed. */ CAResult_t CADeInitBleGattService(); /** - * @brief Used to initialize all required mutex variables for GATT server implementation. + * Used to initialize all required mutex variables for GATT server implementation. * - * @return #CA_STATUS_OK or Appropriate error code - * @retval #CA_STATUS_OK Successful - * @retval #CA_STATUS_INVALID_PARAM Invalid input argumets - * @retval #CA_STATUS_FAILED Operation failed + * @return ::CA_STATUS_OK or Appropriate error code. + * @retval ::CA_STATUS_OK Successful. + * @retval ::CA_STATUS_INVALID_PARAM Invalid input arguments. + * @retval ::CA_STATUS_FAILED Operation failed. */ CAResult_t CAInitGattServerMutexVariables(); /** - * @brief Used to terminate all required mutex variables for GATT server implementation. - * @return NONE + * Used to terminate all required mutex variables for GATT server implementation. */ void CATerminateGattServerMutexVariables(); /** - * @brief Used to add new OIC service in GATT server using bt_gatt_add_service api and - * internally store service path(outparam) in global variable. + * Used to add new OIC service in GATT server using bt_gatt_add_service api and + * internally store service path(outparam) in global variable. * - * @param serviceUUID [IN] unique identifier for BLE OIC service. + * @param[in] serviceUUID unique identifier for BLE OIC service. * - * @return #CA_STATUS_OK or Appropriate error code - * @retval #CA_STATUS_OK Successful - * @retval #CA_STATUS_INVALID_PARAM Invalid input argumets - * @retval #CA_STATUS_FAILED Operation failed + * @return ::CA_STATUS_OK or Appropriate error code. + * @retval ::CA_STATUS_OK Successful. + * @retval ::CA_STATUS_INVALID_PARAM Invalid input arguments. + * @retval ::CA_STATUS_FAILED Operation failed. */ CAResult_t CAAddNewBleServiceInGattServer(const char *serviceUUID); /** - * @brief Used to remove already registered service from Gatt Server using - * bt_gatt_remove_service api. - * @param svcPath [IN] unique identifier for BLE OIC service which is outparam of + * Used to remove already registered service from Gatt Server using + * bt_gatt_remove_service api. + * @param[in] svcPath unique identifier for BLE OIC service which is outparam of * bt_gatt_add_service api. - * @return #CA_STATUS_OK or Appropriate error code - * @retval #CA_STATUS_OK Successful - * @retval #CA_STATUS_INVALID_PARAM Invalid input argumets - * @retval #CA_STATUS_FAILED Operation failed + * @return ::CA_STATUS_OK or Appropriate error code. + * @retval ::CA_STATUS_OK Successful. + * @retval ::CA_STATUS_INVALID_PARAM Invalid input arguments. + * @retval ::CA_STATUS_FAILED Operation failed. */ CAResult_t CARemoveBleServiceFromGattServer(const char *svcPath); /** - * @brief Used to remove all the registered service from Gatt Server using - * bt_gatt_delete_services api. - * @return #CA_STATUS_OK or Appropriate error code - * @retval #CA_STATUS_OK Successful - * @retval #CA_STATUS_INVALID_PARAM Invalid input argumets - * @retval #CA_STATUS_FAILED Operation failed + * Used to remove all the registered service from Gatt Server using + * bt_gatt_delete_services api. + * @return ::CA_STATUS_OK or Appropriate error code. + * @retval ::CA_STATUS_OK Successful. + * @retval ::CA_STATUS_INVALID_PARAM Invalid input arguments. + * @retval ::CA_STATUS_FAILED Operation failed. */ CAResult_t CARemoveAllBleServicesFromGattServer(); /** - * @brief Used to register the service in Gatt Server using bt_gatt_register_service api. + * Used to register the service in Gatt Server using bt_gatt_register_service api. * - * @param svcPath [IN] unique identifier for BLE OIC service which is outparam of + * @param[in] svcPath unique identifier for BLE OIC service which is outparam of * bt_gatt_add_service api. - * @return #CA_STATUS_OK or Appropriate error code - * @retval #CA_STATUS_OK Successful - * @retval #CA_STATUS_INVALID_PARAM Invalid input argumets - * @retval #CA_STATUS_FAILED Operation failed + * @return ::CA_STATUS_OK or Appropriate error code. + * @retval ::CA_STATUS_OK Successful. + * @retval ::CA_STATUS_INVALID_PARAM Invalid input arguments. + * @retval ::CA_STATUS_FAILED Operation failed. */ CAResult_t CARegisterBleServicewithGattServer(const char *svcPath); /** - * @brief Used to add new characteristics(Read/Write) to the service in Gatt Server using - * bt_gatt_add_characteristic api. - * @param svcPath [IN] Service path to which this characteristic belongs to. - * @param charUUID [IN] Gatt characteristic uuid. - * @param charValue [IN] Gatt characteristic value. - * @param charValueLen [IN] Characteristic value length. - * @param read [IN] Boolean variable for checking whether read characteristics or + * Used to add new characteristics(Read/Write) to the service in Gatt Server using + * bt_gatt_add_characteristic api. + * @param[in] svcPath Service path to which this characteristic belongs to. + * @param[in] charUUID Gatt characteristic uuid. + * @param[in] charValue Gatt characteristic value. + * @param[in] charValueLen Characteristic value length. + * @param[in] read Boolean variable for checking whether read characteristics or * write characteristics. - * @return #CA_STATUS_OK or Appropriate error code + * @return ::CA_STATUS_OK or Appropriate error code. */ CAResult_t CAAddNewCharacteristicsToGattServer(const char *svcPath, const char *charUUID, const char *charValue, int charValueLen, bool read); /** - * @brief Used to remove characteristics(Read/Write) from the service in Gatt Server. + * Used to remove characteristics(Read/Write) from the service in Gatt Server. * - * @param charPath [IN] Characteristic path registered on the interface and unique identifier + * @param[in] charPath Characteristic path registered on the interface and unique identifier * for added characteristics. * - * @return #CA_STATUS_OK or Appropriate error code - * @retval #CA_STATUS_OK Successful - * @retval #CA_STATUS_INVALID_PARAM Invalid input argumets - * @retval #CA_STATUS_FAILED Operation failed + * @return ::CA_STATUS_OK or Appropriate error code. + * @retval ::CA_STATUS_OK Successful. + * @retval ::CA_STATUS_INVALID_PARAM Invalid input arguments. + * @retval ::CA_STATUS_FAILED Operation failed. */ CAResult_t CARemoveCharacteristicsFromGattServer(const char *charPath); /** - * @brief This is the callback which will be called when client update one of the characteristics - * with data. - * @param charPath [IN] characteristic path registered on the interface and unique + * This is the callback which will be called when client update one of the characteristics + * with data. + * @param[in] charPath characteristic path registered on the interface and unique * identifier for added characteristics. - * @param charValue [IN] data which is send by client. - * @param charValueLen [IN] length of the data. - * @param remoteAddress [IN] remote device bluetooth address in which data is received. - * @param userData [IN] user data - * - * @return NONE + * @param[in] charValue data which is send by client. + * @param[in] charValueLen length of the data. + * @param[in] remoteAddress remote device bluetooth address in which data is received. + * @param[in] userData user data. + */ void CABleGattRemoteCharacteristicWriteCb(char *charPath, unsigned char *charValue, int charValueLen, const char *remoteAddress, void *userData); /** - * @brief This is the callback which will be called whenever there is change in gatt connection - * with Client(Connected/Disconnected). + * This is the callback which will be called whenever there is change in gatt connection + * with Client(Connected/Disconnected). * - * @param result [IN] The result of discovering. - * @param connected [IN] State of connection. - * @param remoteAddress [IN] Mac address of the remote device in which we made connection. - * @param userData [IN] The user data passed from the request function. - * - * @return NONE + * @param[in] result The result of discovering. + * @param[in] connected State of connection. + * @param[in] remoteAddress Mac address of the remote device in which we made connection. + * @param[in] userData The user data passed from the request function. + */ void CABleGattServerConnectionStateChangedCb(int result, bool connected, const char *remoteAddress, void *userData); /** - * @brief Synchronous function for reading characteristic value. + * Synchronous function for reading characteristic value. * - * @return #CA_STATUS_OK or Appropriate error code - * @retval #CA_STATUS_OK Successful - * @retval #CA_STATUS_INVALID_PARAM Invalid input argumets - * @retval #CA_STATUS_FAILED Operation failed + * @return ::CA_STATUS_OK or Appropriate error code. + * @retval ::CA_STATUS_OK Successful. + * @retval ::CA_STATUS_INVALID_PARAM Invalid input arguments. + * @retval ::CA_STATUS_FAILED Operation failed. */ CAResult_t CALEReadDataFromLEServer(); /** - * @brief Used to enqueue the message into sender queue using CAAdapterEnqueueMessage and make - * signal to the thread to process. + * Used to enqueue the message into sender queue using CAAdapterEnqueueMessage and make + * signal to the thread to process. * - * @param remoteEndpoint [IN] Remote device information. - * @param data [IN] Data to be sent to remote device. - * @param dataLen [IN] Length of data. + * @param[in] remoteEndpoint Remote device information. + * @param[in] data Data to be sent to remote device. + * @param[in] dataLen Length of data. * - * @return #CA_STATUS_OK or Appropriate error code - * @retval #CA_STATUS_OK Successful - * @retval #CA_STATUS_INVALID_PARAM Invalid input argumets - * @retval #CA_STATUS_FAILED Operation failed + * @return ::CA_STATUS_OK or Appropriate error code. + * @retval ::CA_STATUS_OK Successful. + * @retval ::CA_STATUS_INVALID_PARAM Invalid input arguments. + * @retval ::CA_STATUS_FAILED Operation failed. */ CAResult_t CABleServerSenderQueueEnqueueMessage (const CAEndpoint_t *remoteEndpoint, const void *data, uint32_t dataLen); /** - * @brief This is the thread which will be used for processing receiver queue. - * @return NONE + * This is the thread which will be used for processing receiver queue. */ void *CABleServerSenderQueueProcessor(); diff --git a/resource/csdk/connectivity/src/bt_le_adapter/tizen/cableutil.h b/resource/csdk/connectivity/src/bt_le_adapter/tizen/cableutil.h index a4847c7..e7fd434 100644 --- a/resource/csdk/connectivity/src/bt_le_adapter/tizen/cableutil.h +++ b/resource/csdk/connectivity/src/bt_le_adapter/tizen/cableutil.h @@ -1,22 +1,22 @@ /* **************************************************************** -* -* Copyright 2014 Samsung Electronics All Rights Reserved. -* -* -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -* -******************************************************************/ + * + * Copyright 2014 Samsung Electronics All Rights Reserved. + * + * + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + ******************************************************************/ /** * @file @@ -37,11 +37,10 @@ #include "cacommon.h" /** - * @struct BLEServiceInfo - * @brief Information regarding the GATTServer + * Information regarding the GATTServer. * * This structure holds the infomation about the GATTServer - * in the service and the characteristic level + * in the service and the characteristic level. */ typedef struct { @@ -54,205 +53,195 @@ typedef struct } BLEServiceInfo; /** - * @struct BLEServiceList - * @brief List of the BLEServiceInfo structures. + * List of the BLEServiceInfo structures. * * A list of BLEServiceInfo and gives the info about all the * the registered services from the client side. */ typedef struct _BLEServiceList { - BLEServiceInfo *serviceInfo; /**< BLEServiceInfo structure from an OIC Server */ - struct _BLEServiceList *next; /**< Next reference to the List*/ + BLEServiceInfo *serviceInfo; /**< BLEServiceInfo structure from an OIC Server. */ + struct _BLEServiceList *next; /**< Next reference to the List. */ } BLEServiceList; /** - * @enum CHAR_TYPE - * @brief Different characteristics types. + * Different characteristics types. * - * This provides information of different characteristics - * which will be added to OIC service. + * This provides information of different characteristics + * which will be added to OIC service. */ typedef enum { - BLE_GATT_WRITE_CHAR = 0, /**< write_char This will be used to get the unicast response */ - BLE_GATT_READ_CHAR, /**< read_char This will be used update value to OIC server */ + BLE_GATT_WRITE_CHAR = 0, /**< write_char This will be used to get the unicast response. */ + BLE_GATT_READ_CHAR, /**< read_char This will be used update value to OIC server. */ BLE_GATT_NOTIFY_CHAR /**< Reserved char for the time being. */ } CHAR_TYPE; /** - * @struct stGattCharDescriptor_t - * @brief Stores the information required to set the descriptor value of the Service. + * Stores the information required to set the descriptor value of the Service. */ typedef struct gattCharDescriptor { - bt_gatt_attribute_h characteristic; /**< The attribute handle of descriptor */ - uint8_t *desc; /**< Descriptor handle of characteristic, in byte array*/ - int total; /**< The total number of descriptor in a characteristic */ + bt_gatt_attribute_h characteristic; /**< The attribute handle of descriptor. */ + uint8_t *desc; /**< Descriptor handle of characteristic, in byte array. */ + int total; /**< The total number of descriptor in a characteristic. */ } stGattCharDescriptor_t; /** - * @brief Used to increment the registered service count. - * @return NONE + * Used to increment the registered service count. */ void CAIncrementRegisteredServiceCount(); /** - * @brief Used to decrement the registered service count. - * - * @return NONE. + * Used to decrement the registered service count. */ void CADecrementRegisteredServiceCount(); /** - * @brief Used to reset the registered service count. - * @return NONE + * Used to reset the registered service count. */ void CAResetRegisteredServiceCount(); /** - * @brief Used to get the total registered service count. + * Used to get the total registered service count. * @return Total registered service count. */ int32_t CAGetRegisteredServiceCount(); /** - * @brief Used to create BLEServiceInfo structure with server handler and BD address will be - * created. - * @param bdAddress [IN] BD address of the device where GATTServer is running. - * @param service [IN] service attribute handler. - * @param bleServiceInfo [IN] Pointer where serviceInfo structure needs to be stored. - * Memory will be allocated here and needs to be cleared by caller. - * @return #CA_STATUS_OK or Appropriate error code - * @retval #CA_STATUS_OK Successful - * @retval #CA_STATUS_INVALID_PARAM Invalid input argumets - * @retval #CA_STATUS_FAILED Operation failed + * Used to create BLEServiceInfo structure with server handler and BD address will be + * created. + * @param[in] bdAddress BD address of the device where GATTServer is running. + * @param[in] service service attribute handler. + * @param[in] bleServiceInfo Pointer where serviceInfo structure needs to be stored. + * Memory will be allocated here and needs to be cleared by caller. + * @return ::CA_STATUS_OK or Appropriate error code. + * @retval ::CA_STATUS_OK Successful. + * @retval ::CA_STATUS_INVALID_PARAM Invalid input arguments. + * @retval ::CA_STATUS_FAILED Operation failed. */ CAResult_t CACreateBLEServiceInfo(const char *bdAddress, bt_gatt_attribute_h service, BLEServiceInfo **bleServiceInfo); /** - * @brief Used to append the characteristic info to the already created serviceInfo structure. + * Used to append the characteristic info to the already created serviceInfo structure. * - * @param characteristic [IN] Charecteristic attribute handler. - * @param type [IN] Specifies whether its BLE_GATT_READ_CHAR or BLE_GATT_WRITE_CHAR - * @param bleServiceInfo [IN] Pointer where serviceInfo structure needs to be appended with - * char info. - * @return #CA_STATUS_OK or Appropriate error code - * @retval #CA_STATUS_OK Successful - * @retval #CA_STATUS_INVALID_PARAM Invalid input argumets - * @retval #CA_STATUS_FAILED Operation failed + * @param[in] characteristic Charecteristic attribute handler. + * @param[in] type Specifies whether its BLE_GATT_READ_CHAR or BLE_GATT_WRITE_CHAR + * @param[in] bleServiceInfo Pointer where serviceInfo structure needs to be appended with + * char info. + * @return ::CA_STATUS_OK or Appropriate error code. + * @retval ::CA_STATUS_OK Successful. + * @retval ::CA_STATUS_INVALID_PARAM Invalid input arguments. + * @retval ::CA_STATUS_FAILED Operation failed. */ CAResult_t CAAppendBLECharInfo(bt_gatt_attribute_h characteristic, CHAR_TYPE type, BLEServiceInfo *bleServiceInfo); /** - * @brief Used to add the ServiceInfo structure to the Service List. + * Used to add the ServiceInfo structure to the Service List. * - * @param serviceList [IN] Pointer to the ble service list which holds the info of list of - * service registered from client. - * @param bleServiceInfo [IN] Pointer where serviceInfo structure needs to be appended with - * char info. - * @return #CA_STATUS_OK or Appropriate error code - * @retval #CA_STATUS_OK Successful - * @retval #CA_STATUS_INVALID_PARAM Invalid input argumets - * @retval #CA_STATUS_FAILED Operation failed + * @param[in] serviceList Pointer to the ble service list which holds the info of list of + * service registered from client. + * @param[in] bleServiceInfo Pointer where serviceInfo structure needs to be appended with + * char info. + * @return ::CA_STATUS_OK or Appropriate error code. + * @retval ::CA_STATUS_OK Successful. + * @retval ::CA_STATUS_INVALID_PARAM Invalid input arguments. + * @retval ::CA_STATUS_FAILED Operation failed. */ CAResult_t CAAddBLEServiceInfoToList(BLEServiceList **serviceList, BLEServiceInfo *bleServiceInfo); /** - * @brief Used to remove the ServiceInfo structure from the Service List. + * Used to remove the ServiceInfo structure from the Service List. * - * @param serviceList [IN] Pointer to the ble service list which holds the info of list of - * service registered from client. - * @param bleServiceInfo [IN] Pointer where serviceInfo structure needs to be appended with - * char info. - * @param bdAddress [IN] BD address of the device where GATTServer is disconnected. + * @param[in] serviceList Pointer to the ble service list which holds the info of list of + * service registered from client. + * @param[in] bleServiceInfo Pointer where serviceInfo structure needs to be appended with + * char info. + * @param[in] bdAddress BD address of the device where GATTServer is disconnected. * - * @return #CA_STATUS_OK or Appropriate error code - * @retval #CA_STATUS_OK Successful - * @retval #CA_STATUS_INVALID_PARAM Invalid input argumets - * @retval #CA_STATUS_FAILED Operation failed + * @return ::CA_STATUS_OK or Appropriate error code. + * @retval ::CA_STATUS_OK Successful. + * @retval ::CA_STATUS_INVALID_PARAM Invalid input arguments. + * @retval ::CA_STATUS_FAILED Operation failed. */ CAResult_t CARemoveBLEServiceInfoToList(BLEServiceList **serviceList, BLEServiceInfo *bleServiceInfo, const char *bdAddress); /** - * @brief Used to get the serviceInfo from the list. + * Used to get the serviceInfo from the list. * - * @param serviceList [IN] Pointer to the ble service list which holds the info of list - * of service registered from client. - * @param bdAddress [IN] BD address of the device where GATTServer information is required. - * @param bleServiceInfo [OUT] Pointer where serviceInfo structure needs to provide the service - * and char info. - * @return #CA_STATUS_OK or Appropriate error code - * @retval #CA_STATUS_OK Successful - * @retval #CA_STATUS_INVALID_PARAM Invalid input argumets - * @retval #CA_STATUS_FAILED Operation failed + * @param[in] serviceList Pointer to the ble service list which holds the info of list + * of service registered from client. + * @param[in] bdAddress BD address of the device where GATTServer information is required. + * @param[out] bleServiceInfo Pointer where serviceInfo structure needs to provide the service + * and char info. + * @return ::CA_STATUS_OK or Appropriate error code. + * @retval ::CA_STATUS_OK Successful. + * @retval ::CA_STATUS_INVALID_PARAM Invalid input arguments. + * @retval ::CA_STATUS_FAILED Operation failed. */ CAResult_t CAGetBLEServiceInfo(BLEServiceList *serviceList, const char *bdAddress, BLEServiceInfo **bleServiceInfo); /** - * @brief Used to get the serviceInfo from the list by position. + * Used to get the serviceInfo from the list by position. * - * @param serviceList [IN] Pointer to the ble service list which holds the info of list + * @param[in] serviceList Pointer to the ble service list which holds the info of list * of service registered from client. - * @param position [IN] The service information of particular position in the list. - * @param bleServiceInfo [OUT] Pointer where serviceInfo structure needs to provide the service + * @param[in] position The service information of particular position in the list. + * @param[out] bleServiceInfo Pointer where serviceInfo structure needs to provide the service * and char info. - * @return #CA_STATUS_OK or Appropriate error code - * @retval #CA_STATUS_OK Successful - * @retval #CA_STATUS_INVALID_PARAM Invalid input argumets - * @retval #CA_STATUS_FAILED Operation failed + * @return ::CA_STATUS_OK or Appropriate error code. + * @retval ::CA_STATUS_OK Successful. + * @retval ::CA_STATUS_INVALID_PARAM Invalid input arguments. + * @retval ::CA_STATUS_FAILED Operation failed. */ CAResult_t CAGetBLEServiceInfoByPosition(BLEServiceList *serviceList, int32_t position, BLEServiceInfo **bleServiceInfo); /** - * @brief Used to clear BLE service list + * Used to clear BLE service list. * - * @param serviceList [IN] Pointer to the ble service list which holds the info of list of - * service registered from client. - * @return NONE + * @param[in] serviceList Pointer to the ble service list which holds the info of list of + * service registered from client. */ void CAFreeBLEServiceList(BLEServiceList *serviceList); /** - * @brief Used to get remove particular BLE service info from list - * @param serviceinfo [IN] Pointer to the structure which needs to be cleared. - * - * @return NONE + * Used to get remove particular BLE service info from list. + * @param[in] serviceinfo Pointer to the structure which needs to be cleared. */ void CAFreeBLEServiceInfo(BLEServiceInfo *bleServiceInfo); /** - * @brief Used to check whether found handle is OIC service handle or not. + * Used to check whether found handle is OIC service handle or not. * - * @param serviceHandle [IN] Discovered service handle(unique identifier for service) - * @return #CA_STATUS_OK or Appropriate error code - * @retval #CA_STATUS_OK Successful - * @retval #CA_STATUS_INVALID_PARAM Invalid input argumets - * @retval #CA_STATUS_FAILED Operation failed + * @param[in] serviceHandle Discovered service handle(unique identifier for service). + * @return STATUS_OK or Appropriate error code. + * @retval ::CA_STATUS_OK Successful. + * @retval ::CA_STATUS_INVALID_PARAM Invalid input arguments. + * @retval ::CA_STATUS_FAILED Operation failed. */ CAResult_t CAVerifyOICServiceByServiceHandle(bt_gatt_attribute_h serviceHandle); /** - * @brief Used to check whether UUID of the discovered device is OIC service or not. + * Used to check whether UUID of the discovered device is OIC service or not. * - * @param serviceUUID [IN] Service UUID - * @return #CA_STATUS_OK or Appropriate error code - * @retval #CA_STATUS_OK Successful - * @retval #CA_STATUS_INVALID_PARAM Invalid input argumets - * @retval #CA_STATUS_FAILED Operation failed + * @param[in] serviceUUID Service UUID. + * @return ::CA_STATUS_OK or Appropriate error code. + * @retval ::CA_STATUS_OK Successful. + * @retval ::CA_STATUS_INVALID_PARAM Invalid input arguments. + * @retval ::CA_STATUS_FAILED Operation failed. */ CAResult_t CAVerifyOICServiceByUUID(const char* serviceUUID); /** - * @brief Used to get the Error message. - * @param err [IN] Error code(#bt_error_e) + * Used to get the Error message. + * @param[in] err Error code(::bt_error_e). * @return Error string corresponding to the BT error code. */ const char *CABTGetErrorMsg(bt_error_e err); diff --git a/resource/csdk/connectivity/src/ip_adapter/arduino/caipadapterutils_eth.h b/resource/csdk/connectivity/src/ip_adapter/arduino/caipadapterutils_eth.h index 6a3fff6..471193f 100644 --- a/resource/csdk/connectivity/src/ip_adapter/arduino/caipadapterutils_eth.h +++ b/resource/csdk/connectivity/src/ip_adapter/arduino/caipadapterutils_eth.h @@ -1,22 +1,22 @@ /* **************************************************************** -* -* Copyright 2014 Samsung Electronics All Rights Reserved. -* -* -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -* -******************************************************************/ + * + * Copyright 2014 Samsung Electronics All Rights Reserved. + * + * + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + ******************************************************************/ /** * @file @@ -45,27 +45,27 @@ extern "C" #endif /** - * @brief Get available UDP socket - * @param sockID [OUT] Available UDP socket ID - * @return #CA_STATUS_OK or Appropriate error code + * Get available UDP socket. + * @param[out] sockID Available UDP socket ID. + * @return ::CA_STATUS_OK or Appropriate error code. */ CAResult_t CAArduinoGetAvailableSocket(int *sockID); /** - * @brief Initialize Unicast UDP socket - * @param port [INOUT] Port to start the unicast server - * @param socketID [OUT Unicast socket ID - * @return #CA_STATUS_OK or Appropriate error code + * Initialize Unicast UDP socket. + * @param[in/out] port Port to start the unicast server. + * @param[out] socketID Unicast socket ID. + * @return ::CA_STATUS_OK or Appropriate error code. */ CAResult_t CAArduinoInitUdpSocket(uint16_t *port, int *socketID); /** - * @brief Initialize Multicast UDP socket - * @param mcastAddress [IN] Port to start the unicast server - * @param mport [IN] Multicast port - * @param lport [IN] Local port on which the server is started - * @param socketID [OUT] Multicast socket ID - * @return #CA_STATUS_OK or Appropriate error code + * Initialize Multicast UDP socket. + * @param[in] mcastAddress Port to start the unicast server. + * @param[in] mport Multicast port. + * @param[in] lport Local port on which the server is started. + * @param[out] socketID Multicast socket ID. + * @return ::CA_STATUS_OK or Appropriate error code. */ CAResult_t CAArduinoInitMulticastUdpSocket(const char *mcastAddress, uint16_t mport, uint16_t lport, -- 2.7.4