#include <bluetooth.h>
#include <bluetooth_type.h>
#include <bluetooth_internal.h>
-
+#ifdef BLE_MCD
+#include <bluetooth_product.h>
+#endif
#include "caadapterinterface.h"
#include "logger.h"
#include "cathreadpool.h"
#include "caleinterface.h"
+#if defined(__TIZEN__) && defined(LE_ADAPTER) && defined(BLE_CUSTOM_ADVERTISE)
+/**
+ * Used to Start Server advertise send data
+ */
+CAResult_t CAsetServerAdvertisementData(const char *data, int length);
+
+
+/**
+ * Used to Start Server send response data
+ */
+CAResult_t CAsetServerSanResponseData(const char *data, int length);
+#endif
+
/**
* Used to initialize gatt server.
*
* @retval ::CA_STATUS_INVALID_PARAM Invalid input arguments.
* @retval ::CA_STATUS_FAILED Operation failed.
*/
-CAResult_t CALEStartAdvertise(const char *serviceUUID);
+CAResult_t CALEStartAdvertise();
+
+/**
+ * Used to start advertising with 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 CALEStartAdvertiseImpl(const char *serviceUUID);
/**
* Used to stop advertising.
* @param[in] len The length of @a value
* @param[in] user_data The user data passed from the registration function
*/
+#ifdef BLE_TIZEN_30
+void CALEGattRemoteCharacteristicWriteCb(const char *remoteAddress, int request_id,
+ bt_gatt_server_h server, bt_gatt_h gatt_handle,
+ bool response_needed, int offset, const char *charValue,
+ int charLen, void *userData);
+#else
void CALEGattRemoteCharacteristicWriteCb(char *remoteAddress, bt_gatt_server_h server,
- bt_gatt_h charPath, int offset, char *charValue,
- int charValueLen, void *userData);
+ bt_gatt_h gatt_handle, int offset, char *charValue,
+ int charLen, void *userData);
+#endif
/**
* Setting the connection state changed callback.
*/
void CASetLEConnectionStateChangedCallback(CALEConnectionStateChangedCallback connStateCb);
+/**
+ * check connection status.
+ * @param[in] address the address of the remote device.
+ * @return true or false.
+ */
+bool CALEServerIsConnected(const char* address);
+
+/**
+ * get MTU size.
+ * @param[in] address the address of the remote device.
+ * @return mtu size negotiated from remote device.
+ */
+uint16_t CALEServerGetMtuSize(const char* address);
+
#endif /* TZ_BLE_SERVER_H_ */