[Bluetooth][OTP] Add base code for OTP server role
[platform/core/connectivity/bluetooth-frwk.git] / include / bluetooth-api.h
index 1dac034..8adf067 100644 (file)
@@ -81,6 +81,11 @@ extern "C" {
 #define BLUETOOTH_TDS_DATA_LENGTH_MAX  239 /**< This specifies maximum AD data length: 0xEF */
 #define BLUETOOTH_TDS_CONTROL_POINT_PARAM_LENGTH_MAX   500 /**< TDS Control Point parameter Max length */
 
+/*
+ * < This defines the maximum size of OTP server directory name
+ */
+#define BLUETOOTH_MAX_OTP_SERVER_DIR_NAME 100
+
 /**
  * This is Bluetooth error code
  */
@@ -197,7 +202,7 @@ extern "C" {
 #define BLUETOOTH_ERROR_CONNECTION_TERMINATED_DUE_TO_MIC_FAILURE 0x3d
 #define BLUETOOTH_ERROR_CONNECTION_FAILED_TO_BE_ESTABLISHED    0x3e
 
-
+#define BLUETOOTH_ERROR_INVALID_DIRECTORY 0x01
 
 /**
 * Device disconnect reason
@@ -798,6 +803,8 @@ typedef enum {
        BLUETOOTH_EVENT_TDS_ACTIVATION_RESULT,        /** TDS Activation Result */
        BLUETOOTH_EVENT_TDS_CONTROL_POINT_ENABLED,    /** TDS CCCD enabled event */
        BLUETOOTH_EVENT_TDS_ACTIVATION_INDICATION,    /** TDS Activation Indication from Provider */
+
+       BLUETOOTH_EVENT_OTP_SERVER_STATE_CHANGED,       /* OTP Server Status **/
 } bluetooth_event_type_t;
 
  /**
@@ -7509,6 +7516,40 @@ int bluetooth_tds_activate_control_point(const bluetooth_device_address_t *devic
                                                unsigned char *buf, int length);
 
 /**
+ * @fn int bluetooth_otp_server_init(const char *directory);
+ *
+ * @brief Starts OTP server.
+ *
+ * This function is a synchronous call.
+ *
+ * @return
+ *
+ * @exception  None
+ * @param[in] None
+ * @param[out] None
+ *
+ * @remark     None
+ */
+int bluetooth_otp_server_init(const char *directory);
+
+/**
+ * @fn int bluetooth_otp_server_deinit();
+ *
+ * @brief Stops OTP server.
+ *
+ * This function is a synchronous call.
+ *
+ * @return
+ *
+ * @exception  None
+ * @param[in] None
+ * @param[out] None
+ *
+ * @remark     None
+ */
+int bluetooth_otp_server_deinit();
+
+/**
  * @}
  */