#include <bluetooth.h>
#include <bluetooth_type.h>
-#include <bluetooth_type_internal.h>
-#include <bluetooth_internal.h>
-
#include "cacommon.h"
#include "caadapterutils.h"
#include "caleutil.h"
void CALEGattCharacteristicWriteCb(int result, bt_gatt_h reqHandle, void *userData);
/**
- * This is the callback which will be called whenever there is change in gatt connection
- * with server(Connected/Disconnected)
- *
- * @param[in] result The result of connection state change.
- * @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 CALEGattConnectionStateChangedCb(int result, bool connected,
- const char *remoteAddress,void *userData);
-
-/**
* This is the callback which will be called when LE advertisement is found.
*
* @param[in] result The result of Scanning
void *userData);
/**
- * This thread will be used to initialize the Gatt Client and start device discovery.
- * 1. Setting neccessary callbacks for connection, characteristics changed and discovery.
- * 2. Start device discovery
- *
- * @param[in] data Currently it will be NULL(no parameter)
- */
-void CAStartLEGattClientThread(void *data);
-
-/**
* This thread will be used to Start the timer for scanning.
*
* @param[in] data Currently it will be NULL(no parameter)
* @retval ::CA_STATUS_FAILED Operation failed.
*/
CAResult_t CALEGattDiscoverServices(const char *remoteAddress);
+
+/**
+ * check connection status.
+ * @param[in] address the address of the remote device.
+ * @return true or false.
+ */
+bool CALEClientIsConnected(const char* address);
+
+/**
+ * get MTU size.
+ * @param[in] address the address of the remote device.
+ * @return mtu size negotiated from remote device.
+ */
+uint16_t CALEClientGetMtuSize(const char* address);
+
+/**
+ * This function is used to set MTU size
+ * which negotiated between client and server device.
+ * @param[in] address remote address.
+ * @param[in] mtuSize MTU size.
+ * @return ::CA_STATUS_OK or ERROR CODES (::CAResult_t error codes in cacommon.h).
+ */
+CAResult_t CALEClientSetMtuSize(const char* address, uint16_t mtuSize);
+
+/**
+ * Send negotiation message after gatt connection is done.
+ * @param[in] address remote address.
+ * @return ::CA_STATUS_OK or ERROR CODES (::CAResult_t error codes in cacommon.h).
+ */
+CAResult_t CALEClientSendNegotiationMessage(const char* address);
#endif /* TZ_BLE_CLIENT_H_ */