*/
typedef struct
{
- CARemoteEndpoint_t
+ CAEndpoint_t
*remoteEndpoint; /**< Remote endpoint contains the inforamtion of remote device */
void *data; /**< Data to be transmitted over LE tranport */
uint32_t dataLen; /**< Length of the data being transmitted */
* started at Connectivity Abstraction Layer.
* @param netCallback [IN] Callback to notify the network additions to Connectivity
* Abstraction Layer.
+ * @param errorCallback [IN] errorCallback to notify error to connectivity common logic
+ * layer from adapter
* @param handle [IN] Threadpool Handle
* @return #CA_STATUS_OK or Appropriate error code
*/
CAResult_t CAInitializeLE(CARegisterConnectivityCallback registerCallback,
CANetworkPacketReceivedCallback reqRespCallback,
CANetworkChangeCallback netCallback,
- ca_thread_pool_t handle);
+ CAErrorHandleCallback errorCallback, ca_thread_pool_t handle);
/**
* @brief Starting LE connectivity adapters.
* @return The number of bytes sent on the network. Returns -1 on error.
* @remarks dataLen must be > 0.
*/
-int32_t CASendLEUnicastData(const CARemoteEndpoint_t *endpoint, const void *data,
+int32_t CASendLEUnicastData(const CAEndpoint_t *endpoint, const void *data,
uint32_t dataLen);
/**
* @brief Sends Multicast data to the endpoint using the LE connectivity.
- * @param data [IN] Data which required to be sent.
- * @param dataLen [IN] Size of data to be sent.
+ * @param endpoint [IN] Remote Endpoint information 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.
* @return The number of bytes sent on the network. Returns -1 on error.
* @remarks dataLen must be > 0.
*/
-int32_t CASendLEMulticastData(const void *data, uint32_t dataLen);
+int32_t CASendLEMulticastData(const CAEndpoint_t *endpoint, const void *data, uint32_t dataLen);
/**
* @brief Starts notification server on EDR adapters.
* @return The number of bytes sent on the network. Returns 0 on error.
* @remarks dataLen must be > 0.
*/
-uint32_t CASendLENotification(const CARemoteEndpoint_t *endpoint, const void *data,
+uint32_t CASendLENotification(const CAEndpoint_t *endpoint, const void *data,
uint32_t dataLen);
/**
* @param size [OUT] Number of local connectivity structures.
* @return #CA_STATUS_OK or Appropriate error code
*/
-CAResult_t CAGetLEInterfaceInformation(CALocalConnectivity_t **info, uint32_t *size);
+CAResult_t CAGetLEInterfaceInformation(CAEndpoint_t **info, uint32_t *size);
/**
* @brief Read Synchronous API callback.
* @retval #CA_STATUS_FAILED Operation failed
*
*/
-CAResult_t CABLEServerReceivedData(const char *remoteAddress, const char *serviceUUID,
- const void *data, uint32_t dataLength, uint32_t *sentLength);
+CAResult_t CALEAdapterServerReceivedData(const char *remoteAddress, const char *serviceUUID,
+ const void *data, uint32_t dataLength,
+ uint32_t *sentLength);
/**
* @brief This function will receive the data from the GattClient and add the data into the
* @retval #CA_STATUS_INVALID_PARAM Invalid input argumets
* @retval #CA_STATUS_FAILED Operation failed
*/
-CAResult_t CABLEClientReceivedData(const char *remoteAddress, const char *serviceUUID,
- const void *data, uint32_t dataLength, uint32_t *sentLength);
+CAResult_t CALEAdapterClientReceivedData(const char *remoteAddress, const char *serviceUUID,
+ const void *data, uint32_t dataLength,
+ uint32_t *sentLength);
/**
* @brief This function is used to set the NetworkPacket received callback to CA layer from
* @param callback [IN] callback handle sent from the upper layer.
* @return NONE
*/
-void CASetBLEReqRespAdapterCallback(CANetworkPacketReceivedCallback callback);
+void CASetLEReqRespAdapterCallback(CANetworkPacketReceivedCallback callback);
/**
* @brief This function will push the data from CA layer to the Sender processor queue.
* @retval #CA_STATUS_INVALID_PARAM Invalid input argumets
* @retval #CA_STATUS_FAILED Operation failed
*/
-CAResult_t CABLEServerSendData(const CARemoteEndpoint_t *remoteEndpoint,
- const void *data, uint32_t dataLen);
+CAResult_t CALEAdapterServerSendData(const CAEndpoint_t *remoteEndpoint,
+ const void *data, uint32_t dataLen);
/**
* @brief This function will push the data from CA layer to the Sender processor queue.
* @retval #CA_STATUS_INVALID_PARAM Invalid input argumets
* @retval #CA_STATUS_FAILED Operation failed
*/
-CAResult_t CABLEClientSendData(const CARemoteEndpoint_t *remoteEndpoint,
- const void *data, uint32_t dataLen);
+CAResult_t CALEAdapterClientSendData(const CAEndpoint_t *remoteEndpoint,
+ const void *data, uint32_t dataLen);
/**
* @brief This function will be associated with the sender queue for GattServer.This function will
*
* @return NONE
*/
-void CABLEServerSendDataThread(void *threadData);
+void CALEServerSendDataThread(void *threadData);
/**
* @brief This function will be associated with the sender queue for GattClient.This function will
*
* @return NONE
*/
-void CABLEClientSendDataThread(void *threadData);
+void CALEClientSendDataThread(void *threadData);
/**
* @brief This function will be associated with the receiver queue of GattServer. This function
*
* @return NONE
*/
-void CABLEServerDataReceiverHandler(void *threadData);
+void CALEServerDataReceiverHandler(void *threadData);
/**
* @brief This function will be associated with the receiver queue of GattClient. This function
* and Data.
* @return NONE
*/
-void CABLEClientDataReceiverHandler(void *threadData);
+void CALEClientDataReceiverHandler(void *threadData);
/**
* @brief This function is used to Initalize both GattServer and GattClient queues. All four
* queues will be initialized with this function invocations.
* @return NONE
*/
-void CAInitBleQueues();
+void CAInitLEQueues();
/**
* @brief This function will stop all queues created for GattServer and GattClient. All
* four queues will be be stopped with this function invocations.
* @return NONE
*/
-void CAStopBleQueues();
+void CAStopLEQueues();
/**
* @brief This function will terminate all queues created for GattServer and GattClient. All
* four queues will be be terminated with this function invocations.
* @return NONE
*/
-void CATerminateBleQueues();
+void CATerminateLEQueues();
/**
* @brief This function will initalize the Receiver and Sender queues for GattServer. This
* @retval #CA_STATUS_INVALID_PARAM Invalid input argumets
* @retval #CA_STATUS_FAILED Operation failed
*/
-CAResult_t CAInitBleServerQueues();
+CAResult_t CAInitLEServerQueues();
/**
* @brief This function will initalize the Receiver and Sender queues for GattClient. This
* @retval #CA_STATUS_FAILED Operation failed
*
*/
-CAResult_t CAInitBleClientQueues();
+CAResult_t CAInitLEClientQueues();
/**
* @brief This function will initalize the Receiver queue for GattServer. This will initialize
* @retval #CA_STATUS_INVALID_PARAM Invalid input argumets
* @retval #CA_STATUS_FAILED Operation failed
*/
-CAResult_t CAInitBleServerSenderQueue();
+CAResult_t CAInitLEServerSenderQueue();
/**
* @brief This function will initalize the Receiver queue for GattClient. This will initialize
* @retval #CA_STATUS_INVALID_PARAM Invalid input argumets
* @retval #CA_STATUS_FAILED Operation failed
*/
-CAResult_t CAInitBleClientSenderQueue();
+CAResult_t CAInitLEClientSenderQueue();
/**
* @brief This function will initalize the Receiver queue for GattServer. This will initialize
* @retval #CA_STATUS_FAILED Operation failed
*
*/
-CAResult_t CAInitBleServerReceiverQueue();
+CAResult_t CAInitLEServerReceiverQueue();
/**
* @brief This function will initalize the Receiver queue for GattClient. This will initialize
* @retval #CA_STATUS_INVALID_PARAM Invalid input argumets
* @retval #CA_STATUS_FAILED Operation failed
*/
-CAResult_t CAInitBleClientReceiverQueue();
+CAResult_t CAInitLEClientReceiverQueue();
/**
* @brief This function will create the Data required to send it in the queue.
* @retval #CA_STATUS_INVALID_PARAM Invalid input argumets
* @retval #CA_STATUS_FAILED Operation failed
*/
-CALEData_t *CACreateBLEData(const CARemoteEndpoint_t *remoteEndpoint, const void *data,
+CALEData_t *CACreateLEData(const CAEndpoint_t *remoteEndpoint, const void *data,
uint32_t dataLength);
/**
* @param bleData [IN] Structure contains the information of a particular data segment.
* @return NONE
*/
-void CAFreeBLEData(CALEData_t *bleData);
+void CAFreeLEData(CALEData_t *bleData);
/**
* @brief This will be used to notify device status changes to the LE adapter layer