X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=resource%2Fcsdk%2Fconnectivity%2Finc%2Fcaleinterface.h;h=c354ee3ed65f23e5c70693d04d8105eceeda6f7e;hb=8229635f6d207516ccbbdf23b13be164e0fc1787;hp=0ac0028e80001245f0c9cf63d24fa07ca6a151d6;hpb=8945accc6fbae437bc06c8ebf207d4b029f8566d;p=platform%2Fupstream%2Fiotivity.git diff --git a/resource/csdk/connectivity/inc/caleinterface.h b/resource/csdk/connectivity/inc/caleinterface.h index 0ac0028..c354ee3 100644 --- a/resource/csdk/connectivity/inc/caleinterface.h +++ b/resource/csdk/connectivity/inc/caleinterface.h @@ -72,6 +72,24 @@ typedef struct } CALEData_t; /** + * The MTU supported for BLE adapter + */ +#ifdef __APPLE__ +#define CA_DEFAULT_BLE_MTU_SIZE 152 +#else +#define CA_DEFAULT_BLE_MTU_SIZE 20 +#endif +/** + * The MTU supported for BLE spec + */ +#define CA_SUPPORTED_BLE_MTU_SIZE 517 + +/** + * The Header of the MTU supported for BLE spec + */ +#define CA_BLE_MTU_HEADER_SIZE 5 + +/** * This will be used to notify device status changes to the LE adapter layer. * @param[in] adapter_state State of the adapter. */ @@ -115,7 +133,7 @@ typedef CAResult_t (*CABLEDataReceivedCallback)(const char *remoteAddress, * @retval ::CA_STATUS_INVALID_PARAM Invalid input arguments * @retval ::CA_STATUS_FAILED Operation failed */ -CAResult_t CAInitializeLEAdapter(const ca_thread_pool_t threadPool); +CAResult_t CAInitializeLEAdapter(); /** * Start the LE adapter layer. @@ -443,6 +461,25 @@ void CASetBLEClientErrorHandleCallback(CABLEErrorHandleCallback callback); * adapter. */ void CASetBLEServerErrorHandleCallback(CABLEErrorHandleCallback callback); + +/** + * This is the callback which will be called whenever there is change in gatt connection + * with Client(Connected/Disconnected). + * + * @param[in] connected State of connection. + * @param[in] remoteAddress Mac address of the remote device in which we made connection. + */ +void CALEGattServerConnectionStateChanged(bool connected, const char *remoteAddress); + +/** + * This is the callback which will be called whenever there is change in gatt connection + * with server(Connected/Disconnected) + * + * @param[in] connected State of connection + * @param[in] remoteAddress Mac address of the remote device in which we made connection. + */ +void CALEGattConnectionStateChanged(bool connected, const char *remoteAddress); + #ifdef __cplusplus } #endif