DPM: Enable DPM APIs for all profiles. 39/70739/1
authorh.sandeep <h.sandeep@samsung.com>
Fri, 20 May 2016 08:56:31 +0000 (14:26 +0530)
committerh.sandeep <h.sandeep@samsung.com>
Fri, 20 May 2016 08:56:31 +0000 (14:26 +0530)
Change-Id: I90be0824566a11b78dd9809f59ef9bb15567d1e2
Signed-off-by: h.sandeep <h.sandeep@samsung.com>
CMakeLists.txt
include/tv/bluetooth_internal.h
include/tv/bluetooth_type_internal.h
include/wearable/bluetooth_internal.h
include/wearable/bluetooth_type_internal.h
test/bt_unit_test.c
test/bt_unit_test.h

index 53390df..2f792ad 100644 (file)
@@ -59,6 +59,7 @@ src/bluetooth-audio.c
 src/bluetooth-avrcp.c
 src/bluetooth-gatt.c
 src/bluetooth-ipsp.c
+src/bluetooth-dpm.c
 )
 ELSE ()
 SET(SOURCES
@@ -75,13 +76,11 @@ src/bluetooth-audio.c
 src/bluetooth-avrcp.c
 src/bluetooth-gatt.c
 src/bluetooth-ipsp.c
+src/bluetooth-dpm.c
 )
 IF (TIZEN_WEARABLE)
 LIST(APPEND SOURCES src/bluetooth-pbap.c)
 ENDIF (TIZEN_WEARABLE)
-IF (TIZEN_MOBILE)
-LIST(APPEND SOURCES src/bluetooth-dpm.c)
-ENDIF (TIZEN_MOBILE)
 ENDIF (TIZEN_TV)
 
 ADD_LIBRARY(${fw_name} SHARED ${SOURCES})
index 3666d28..0a2fe18 100644 (file)
@@ -3229,6 +3229,757 @@ int bt_hid_device_reply_to_report(const char *remote_address,
                const char *data, unsigned int data_len);
 
 /**
+ * @ingroup CAPI_NETWORK_BLUETOOTH_DPM_MODULE
+ * @brief Sets Restriction for BT mode(BT allowed or not).
+ * @since_tizen 3.0
+ * @privlevel platform
+ * @privilege %http://tizen.org/privilege/bluetooth.admin
+ *
+ * @param[in]  value - BT Allow value.
+ *             BT_DPM_ERROR     = -1,   < bluetooth allowance error
+ *             BT_DPM_BT_ALLOWED,               < bluetooth allowance allowed
+ *             BT_DPM_HANDSFREE_ONLY,  < bluetooth allowance handsfree only
+ *             BT_DPM_BT_RESTRICTED,  < bluetooth allowance restricted
+ * @retval #BT_ERROR_NONE  Successful
+ * @retval #BT_ERROR_INVALID_PARAMETER  invalid paramter
+ * @retval #BT_ERROR_NOT_SUPPORTED  Not suported
+ * @retval #BT_ERROR_NOT_ENABLED  Not enabled
+ * @retval #BT_ERROR_OPERATION_FAILED operation failed
+ *
+ * @pre none.
+ * @see bt_dpm_get_allow_bluetooth_mode()
+ */
+int bt_dpm_set_allow_bluetooth_mode(bt_dpm_allow_e value);
+
+/**
+ * @ingroup CAPI_NETWORK_BLUETOOTH_DPM_MODULE
+ * @brief Reads Restriction for BT mode(BT allowed or not).
+ * @since_tizen 3.0
+ * @privlevel platform
+ * @privilege %http://tizen.org/privilege/bluetooth.admin
+ *
+ * @param[in] none
+ * @param[out] value - BT Allow value.
+ *             BT_DPM_ERROR     = -1,   < bluetooth allowance error
+ *             BT_DPM_BT_ALLOWED,               < bluetooth allowance allowed
+ *             BT_DPM_HANDSFREE_ONLY,  < bluetooth allowance handsfree only
+ *             BT_DPM_BT_RESTRICTED,  < bluetooth allowance restricted
+ * @retval #BT_ERROR_NONE  Successful
+ * @retval #BT_ERROR_INVALID_PARAMETER invalid paramter
+ * @retval #BT_ERROR_NOT_SUPPORTED     Not suported
+ * @retval #BT_ERROR_NOT_ENABLED  Not enabled
+ * @retval #BT_ERROR_OPERATION_FAILED operation failed
+ *
+ * @pre none.
+ * @see bt_dpm_set_allow_bluetooth_mode()
+ */
+int bt_dpm_get_allow_bluetooth_mode(bt_dpm_allow_e *value);
+
+/**
+ * @ingroup CAPI_NETWORK_BLUETOOTH_DPM_MODULE
+ * @brief Sets the Restriction for device.
+ * @since_tizen 3.0
+ * @privlevel platform
+ * @privilege %http://tizen.org/privilege/bluetooth.admin
+ *
+ * @param[in]  value - State value.
+ *             BT_DPM_ALLOWED          = 0,    < DPM Policy status allowed.
+ *             BT_DPM_RESTRICTED               = 1,    < DPM Policy status restricted.
+ * @retval #BT_ERROR_NONE  Successful
+ * @retval #BT_ERROR_INVALID_PARAMETER invalid paramter
+ * @retval #BT_ERROR_NOT_SUPPORTED     Not suported
+ * @retval #BT_ERROR_NOT_ENABLED  Not enabled
+ * @retval #BT_ERROR_OPERATION_FAILED operation failed
+ *
+ * @pre bt_dpm_set_allow_bluetooth_mode must be allowed.
+ * @see bt_dpm_get_allow_bluetooth_mode()
+ */
+int bt_dpm_activate_device_restriction(bt_dpm_status_e value);
+
+/**
+ * @ingroup CAPI_NETWORK_BLUETOOTH_DPM_MODULE
+ * @brief Reads the Restriction for device.
+ * @since_tizen 3.0
+ * @privlevel platform
+ * @privilege %http://tizen.org/privilege/bluetooth.admin
+ *
+ * @param[out] value - State value.
+ *             BT_DPM_ALLOWED          = 0,    < DPM Policy status allowed.
+ *             BT_DPM_RESTRICTED               = 1,    < DPM Policy status restricted.
+ * @retval #BT_ERROR_NONE  Successful
+ * @retval #BT_ERROR_INVALID_PARAMETER invalid paramter
+ * @retval #BT_ERROR_NOT_SUPPORTED     Not suported
+ * @retval #BT_ERROR_NOT_ENABLED  Not enabled
+ * @retval #BT_ERROR_OPERATION_FAILED operation failed
+ *
+ * @pre bt_dpm_set_allow_bluetooth_mode must be allowed.
+ * @see bt_dpm_get_allow_bluetooth_mode()
+ */
+int bt_dpm_is_device_restriction_active(bt_dpm_status_e *value);
+
+/**
+ * @ingroup CAPI_NETWORK_BLUETOOTH_DPM_MODULE
+ * @brief Sets the Restriction for uuid.
+ * @since_tizen 3.0
+ * @privlevel platform
+ * @privilege %http://tizen.org/privilege/bluetooth.admin
+ *
+ * @param[in]  value - State value.
+ *             BT_DPM_ALLOWED          = 0,    < DPM Policy status allowed.
+ *             BT_DPM_RESTRICTED               = 1,    < DPM Policy status restricted.
+ * @retval #BT_ERROR_NONE  Successful
+ * @retval #BT_ERROR_INVALID_PARAMETER invalid paramter
+ * @retval #BT_ERROR_NOT_SUPPORTED     Not suported
+ * @retval #BT_ERROR_NOT_ENABLED  Not enabled
+ * @retval #BT_ERROR_OPERATION_FAILED operation failed
+ *
+ * @pre bt_dpm_set_allow_bluetooth_mode must be allowed.
+ * @see bt_dpm_get_allow_bluetooth_mode()
+ */
+int bt_dpm_activate_uuid_restriction(bt_dpm_status_e value);
+
+/**
+ * @ingroup CAPI_NETWORK_BLUETOOTH_DPM_MODULE
+ * @brief Reads the Restriction for uuid.
+ * @since_tizen 3.0
+ * @privlevel platform
+ * @privilege %http://tizen.org/privilege/bluetooth.admin
+ *
+ * @param[out] value - State value.
+ *             BT_DPM_ALLOWED          = 0,    < DPM Policy status allowed.
+ *             BT_DPM_RESTRICTED               = 1,    < DPM Policy status restricted.
+ * @retval #BT_ERROR_NONE  Successful
+ * @retval #BT_ERROR_INVALID_PARAMETER invalid paramter
+ * @retval #BT_ERROR_NOT_SUPPORTED     Not suported
+ * @retval #BT_ERROR_NOT_ENABLED  Not enabled
+ * @retval #BT_ERROR_OPERATION_FAILED operation failed
+ *
+ * @pre bt_dpm_set_allow_bluetooth_mode must be allowed.
+ * @see bt_dpm_get_allow_bluetooth_mode()
+ */
+int bt_dpm_is_uuid_restriction_active(bt_dpm_status_e *value);
+
+/**
+ * @ingroup CAPI_NETWORK_BLUETOOTH_DPM_MODULE
+ * @brief Adds the device to blacklist.
+ * @since_tizen 3.0
+ * @privlevel platform
+ * @privilege %http://tizen.org/privilege/bluetooth.admin
+ *
+ * @param[in]  device_address - Device address
+ * @retval #BT_ERROR_NONE  Successful
+ * @retval #BT_ERROR_INVALID_PARAMETER invalid paramter
+ * @retval #BT_ERROR_NOT_SUPPORTED     Not suported
+ * @retval #BT_ERROR_NOT_ENABLED  Not enabled
+ * @retval #BT_ERROR_OPERATION_FAILED operation failed
+ *
+ * @pre bt_dpm_set_allow_bluetooth_mode must be allowed.
+ * @see bt_dpm_get_allow_bluetooth_mode()
+ */
+int bt_dpm_add_devices_to_blacklist(const char *device_address);
+
+/**
+ * @ingroup CAPI_NETWORK_BLUETOOTH_DPM_MODULE
+ * @brief Adds the device to whitelist.
+ * @since_tizen 3.0
+ * @privlevel platform
+ * @privilege %http://tizen.org/privilege/bluetooth.admin
+ *
+ * @param[in]  device_address - Device address
+ * @retval #BT_ERROR_NONE  Successful
+ * @retval #BT_ERROR_INVALID_PARAMETER invalid paramter
+ * @retval #BT_ERROR_NOT_SUPPORTED     Not suported
+ * @retval #BT_ERROR_NOT_ENABLED  Not enabled
+ * @retval #BT_ERROR_OPERATION_FAILED operation failed
+ *
+ * @pre bt_dpm_set_allow_bluetooth_mode must be allowed.
+ * @see bt_dpm_get_allow_bluetooth_mode()
+ */
+int bt_dpm_add_devices_to_whitelist(const char *device_address);
+
+/**
+ * @ingroup CAPI_NETWORK_BLUETOOTH_DPM_MODULE
+ * @brief Adds the uuids to blacklist.
+ * @since_tizen 3.0
+ * @privlevel platform
+ * @privilege %http://tizen.org/privilege/bluetooth.admin
+ *
+ * @param[in]  service_uuids - profile or custom service uuids
+ * @retval #BT_ERROR_NONE  Successful
+ * @retval #BT_ERROR_INVALID_PARAMETER invalid paramter
+ * @retval #BT_ERROR_NOT_SUPPORTED     Not suported
+ * @retval #BT_ERROR_NOT_ENABLED  Not enabled
+ * @retval #BT_ERROR_OPERATION_FAILED operation failed
+ *
+ * @pre bt_dpm_set_allow_bluetooth_mode must be allowed.
+ * @see bt_dpm_get_allow_bluetooth_mode()
+ */
+int bt_dpm_add_uuids_to_blacklist(const char *service_uuid);
+
+/**
+ * @ingroup CAPI_NETWORK_BLUETOOTH_DPM_MODULE
+ * @brief Adds the uuid to whitelist.
+ * @since_tizen 3.0
+ * @privlevel platform
+ * @privilege %http://tizen.org/privilege/bluetooth.admin
+ *
+ * @param[in]  service_uuids - profile or custom service uuids
+ * @retval #BT_ERROR_NONE  Successful
+ * @retval #BT_ERROR_INVALID_PARAMETER invalid paramter
+ * @retval #BT_ERROR_NOT_SUPPORTED     Not suported
+ * @retval #BT_ERROR_NOT_ENABLED  Not enabled
+ * @retval #BT_ERROR_OPERATION_FAILED operation failed
+ *
+ * @pre bt_dpm_set_allow_bluetooth_mode must be allowed.
+ * @see bt_dpm_get_allow_bluetooth_mode()
+ */
+int bt_dpm_add_uuids_to_whitelist(const char *service_uuid);
+
+/**
+ * @ingroup CAPI_NETWORK_BLUETOOTH_DPM_MODULE
+ * @brief Clears the device from blacklist.
+ * @since_tizen 3.0
+ * @privlevel platform
+ * @privilege %http://tizen.org/privilege/bluetooth.admin
+ *
+ * @param[in]  none
+ * @retval #BT_ERROR_NONE  Successful
+ * @retval #BT_ERROR_INVALID_PARAMETER invalid paramter
+ * @retval #BT_ERROR_NOT_SUPPORTED     Not suported
+ * @retval #BT_ERROR_NOT_ENABLED  Not enabled
+ * @retval #BT_ERROR_OPERATION_FAILED operation failed
+ *
+ * @pre bt_dpm_set_allow_bluetooth_mode must be allowed.
+ * @see bt_dpm_get_allow_bluetooth_mode()
+ */
+int bt_dpm_clear_devices_from_blacklist(void);
+
+/**
+ * @ingroup CAPI_NETWORK_BLUETOOTH_DPM_MODULE
+ * @brief Clears the device from whitelist.
+ * @since_tizen 3.0
+ * @privlevel platform
+ * @privilege %http://tizen.org/privilege/bluetooth.admin
+ *
+ * @param[in]  none
+ * @retval #BT_ERROR_NONE  Successful
+ * @retval #BT_ERROR_INVALID_PARAMETER invalid paramter
+ * @retval #BT_ERROR_NOT_SUPPORTED     Not suported
+ * @retval #BT_ERROR_NOT_ENABLED  Not enabled
+ * @retval #BT_ERROR_OPERATION_FAILED operation failed
+ *
+ * @pre bt_dpm_set_allow_bluetooth_mode must be allowed.
+ * @see bt_dpm_get_allow_bluetooth_mode()
+ */
+int bt_dpm_clear_devices_from_whitelist(void);
+
+/**
+ * @ingroup CAPI_NETWORK_BLUETOOTH_DPM_MODULE
+ * @brief Clears the uuids from blacklist.
+ * @since_tizen 3.0
+ * @privlevel platform
+ * @privilege %http://tizen.org/privilege/bluetooth.admin
+ *
+ * @param[in]  none
+ * @retval #BT_ERROR_NONE  Successful
+ * @retval #BT_ERROR_INVALID_PARAMETER invalid paramter
+ * @retval #BT_ERROR_NOT_SUPPORTED     Not suported
+ * @retval #BT_ERROR_NOT_ENABLED  Not enabled
+ * @retval #BT_ERROR_OPERATION_FAILED operation failed
+ *
+ * @pre bt_dpm_set_allow_bluetooth_mode must be allowed.
+ * @see bt_dpm_get_allow_bluetooth_mode()
+ */
+int bt_dpm_clear_uuids_from_blacklist(void);
+
+/**
+ * @ingroup CAPI_NETWORK_BLUETOOTH_DPM_MODULE
+ * @brief Clears the uuids from whitelist.
+ * @since_tizen 3.0
+ * @privlevel platform
+ * @privilege %http://tizen.org/privilege/bluetooth.admin
+ *
+ * @param[in]  none
+ * @retval #BT_ERROR_NONE  Successful
+ * @retval #BT_ERROR_INVALID_PARAMETER invalid paramter
+ * @retval #BT_ERROR_NOT_SUPPORTED     Not suported
+ * @retval #BT_ERROR_NOT_ENABLED  Not enabled
+ * @retval #BT_ERROR_OPERATION_FAILED operation failed
+ *
+ * @pre bt_dpm_set_allow_bluetooth_mode must be allowed.
+ * @see bt_dpm_get_allow_bluetooth_mode()
+ */
+int bt_dpm_clear_uuids_from_whitelist(void);
+
+/**
+ * @ingroup CAPI_NETWORK_BLUETOOTH_DPM_MODULE
+ * @brief Reads the devices from blacklist.
+ * @since_tizen 3.0
+ * @privlevel platform
+ * @privilege %http://tizen.org/privilege/bluetooth.admin
+ *
+ * @param[out] device_list - list of devices
+ * @retval #BT_ERROR_NONE  Successful
+ * @retval #BT_ERROR_INVALID_PARAMETER invalid paramter
+ * @retval #BT_ERROR_NOT_SUPPORTED     Not suported
+ * @retval #BT_ERROR_NOT_ENABLED  Not enabled
+ * @retval #BT_ERROR_OPERATION_FAILED operation failed
+ *
+ * @pre bt_dpm_set_allow_bluetooth_mode must be allowed.
+ * @see bt_dpm_get_allow_bluetooth_mode()
+ */
+int bt_dpm_get_devices_from_blacklist(bt_dpm_device_list_s **device_list);
+
+/**
+ * @ingroup CAPI_NETWORK_BLUETOOTH_DPM_MODULE
+ * @brief Reads the devices from whitelist.
+ * @since_tizen 3.0
+ * @privlevel platform
+ * @privilege %http://tizen.org/privilege/bluetooth.admin
+ *
+ * @param[out] device_list - list of devices
+ * @retval #BT_ERROR_NONE  Successful
+ * @retval #BT_ERROR_INVALID_PARAMETER invalid paramter
+ * @retval #BT_ERROR_NOT_SUPPORTED     Not suported
+ * @retval #BT_ERROR_NOT_ENABLED  Not enabled
+ * @retval #BT_ERROR_OPERATION_FAILED operation failed
+ *
+ * @pre bt_dpm_set_allow_bluetooth_mode must be allowed.
+ * @see bt_dpm_get_allow_bluetooth_mode()
+ */
+int bt_dpm_get_devices_from_whitelist(bt_dpm_device_list_s **device_list);
+
+/**
+ * @ingroup CAPI_NETWORK_BLUETOOTH_DPM_MODULE
+ * @brief Reads the uuids from blacklist.
+ * @since_tizen 3.0
+ * @privlevel platform
+ * @privilege %http://tizen.org/privilege/bluetooth.admin
+ *
+ * @param[out] uuid_list - list of uuids
+ * @retval #BT_ERROR_NONE  Successful
+ * @retval #BT_ERROR_INVALID_PARAMETER invalid paramter
+ * @retval #BT_ERROR_NOT_SUPPORTED     Not suported
+ * @retval #BT_ERROR_NOT_ENABLED  Not enabled
+ * @retval #BT_ERROR_OPERATION_FAILED operation failed
+ *
+ * @pre bt_dpm_set_allow_bluetooth_mode must be allowed.
+ * @see bt_dpm_get_allow_bluetooth_mode()
+ */
+int bt_dpm_get_uuids_from_blacklist(bt_dpm_uuids_list_s **uuid_list);
+
+/**
+ * @ingroup CAPI_NETWORK_BLUETOOTH_DPM_MODULE
+ * @brief Reads the uuids from whitelist.
+ * @since_tizen 3.0
+ * @privlevel platform
+ * @privilege %http://tizen.org/privilege/bluetooth.admin
+ *
+ * @param[out] uuid_list - list of uuids
+ * @retval #BT_ERROR_NONE  Successful
+ * @retval #BT_ERROR_INVALID_PARAMETER invalid paramter
+ * @retval #BT_ERROR_NOT_SUPPORTED     Not suported
+ * @retval #BT_ERROR_NOT_ENABLED  Not enabled
+ * @retval #BT_ERROR_OPERATION_FAILED operation failed
+ *
+ * @pre bt_dpm_set_allow_bluetooth_mode must be allowed.
+ * @see bt_dpm_get_allow_bluetooth_mode()
+ */
+int bt_dpm_get_uuids_from_whitelist(bt_dpm_uuids_list_s **uuid_list);
+
+/**
+ * @ingroup CAPI_NETWORK_BLUETOOTH_DPM_MODULE
+ * @brief Removes the devices from whitelist.
+ * @since_tizen 3.0
+ * @privlevel platform
+ * @privilege %http://tizen.org/privilege/bluetooth.admin
+ *
+ * @param[in]  device_address - Device address
+ * @retval #BT_ERROR_NONE  Successful
+ * @retval #BT_ERROR_INVALID_PARAMETER invalid paramter
+ * @retval #BT_ERROR_NOT_SUPPORTED     Not suported
+ * @retval #BT_ERROR_NOT_ENABLED  Not enabled
+ * @retval #BT_ERROR_OPERATION_FAILED operation failed
+ *
+ * @pre bt_dpm_set_allow_bluetooth_mode must be allowed.
+ * @see bt_dpm_get_allow_bluetooth_mode()
+ */
+int bt_dpm_remove_device_from_whitelist(const char *device_address);
+
+/**
+ * @ingroup CAPI_NETWORK_BLUETOOTH_DPM_MODULE
+ * @brief Removes the devices from blacklist.
+ * @since_tizen 3.0
+ * @privlevel platform
+ * @privilege %http://tizen.org/privilege/bluetooth.admin
+ *
+ * @param[in]  device_address - Device address
+ * @retval #BT_ERROR_NONE  Successful
+ * @retval #BT_ERROR_INVALID_PARAMETER invalid paramter
+ * @retval #BT_ERROR_NOT_SUPPORTED     Not suported
+ * @retval #BT_ERROR_NOT_ENABLED  Not enabled
+ * @retval #BT_ERROR_OPERATION_FAILED operation failed
+ *
+ * @pre bt_dpm_set_allow_bluetooth_mode must be allowed.
+ * @see bt_dpm_get_allow_bluetooth_mode()
+ */
+int bt_dpm_remove_device_from_blacklist(const char *device_address);
+
+/**
+ * @ingroup CAPI_NETWORK_BLUETOOTH_DPM_MODULE
+ * @brief Removes the uuids from whitelist.
+ * @since_tizen 3.0
+ * @privlevel platform
+ * @privilege %http://tizen.org/privilege/bluetooth.admin
+ *
+ * @param[in]  service_uuids - profile or custom service uuids
+ * @retval #BT_ERROR_NONE  Successful
+ * @retval #BT_ERROR_INVALID_PARAMETER invalid paramter
+ * @retval #BT_ERROR_NOT_SUPPORTED     Not suported
+ * @retval #BT_ERROR_NOT_ENABLED  Not enabled
+ * @retval #BT_ERROR_OPERATION_FAILED operation failed
+ *
+ * @pre bt_dpm_set_allow_bluetooth_mode must be allowed.
+ * @see bt_dpm_get_allow_bluetooth_mode()
+ */
+int bt_dpm_remove_uuid_from_whitelist(const char *service_uuid);
+
+/**
+ * @ingroup CAPI_NETWORK_BLUETOOTH_DPM_MODULE
+ * @brief Removes the uuids from blacklist.
+ * @since_tizen 3.0
+ * @privlevel platform
+ * @privilege %http://tizen.org/privilege/bluetooth.admin
+ *
+ * @param[in]  service_uuids - profile or custom service uuids
+ * @retval #BT_ERROR_NONE  Successful
+ * @retval #BT_ERROR_INVALID_PARAMETER invalid paramter
+ * @retval #BT_ERROR_NOT_SUPPORTED     Not suported
+ * @retval #BT_ERROR_NOT_ENABLED  Not enabled
+ * @retval #BT_ERROR_OPERATION_FAILED operation failed
+ *
+ * @pre bt_dpm_set_allow_bluetooth_mode must be allowed.
+ * @see bt_dpm_get_allow_bluetooth_mode()
+ */
+int bt_dpm_remove_uuid_from_blacklist(const char *service_uuid);
+
+/**
+ * @ingroup CAPI_NETWORK_BLUETOOTH_DPM_MODULE
+ * @brief Sets the Restriction for  outgoing call.
+ * @since_tizen 3.0
+ * @privlevel platform
+ * @privilege %http://tizen.org/privilege/bluetooth.admin
+ *
+ * @param[in]  value - State value.
+ *             BT_DPM_ALLOWED          = 0,    < DPM Policy status allowed.
+ *             BT_DPM_RESTRICTED               = 1,    < DPM Policy status restricted.
+ * @retval #BT_ERROR_NONE  Successful
+ * @retval #BT_ERROR_INVALID_PARAMETER invalid paramter
+ * @retval #BT_ERROR_NOT_SUPPORTED     Not suported
+ * @retval #BT_ERROR_NOT_ENABLED  Not enabled
+ * @retval #BT_ERROR_OPERATION_FAILED operation failed
+ *
+ * @pre bt_dpm_set_allow_bluetooth_mode must be allowed.
+ * @see bt_dpm_get_allow_bluetooth_mode()
+ */
+int bt_dpm_set_allow_outgoing_call(bt_dpm_status_e value);
+
+/**
+ * @ingroup CAPI_NETWORK_BLUETOOTH_DPM_MODULE
+ * @brief Reads the Restriction for  outgoing call.
+ * @since_tizen 3.0
+ * @privlevel platform
+ * @privilege %http://tizen.org/privilege/bluetooth.admin
+ *
+ * @param[out] value - State value.
+ *             BT_DPM_ALLOWED          = 0,    < DPM Policy status allowed.
+ *             BT_DPM_RESTRICTED               = 1,    < DPM Policy status restricted.
+ * @retval #BT_ERROR_NONE  Successful
+ * @retval #BT_ERROR_INVALID_PARAMETER invalid paramter
+ * @retval #BT_ERROR_NOT_SUPPORTED     Not suported
+ * @retval #BT_ERROR_NOT_ENABLED  Not enabled
+ * @retval #BT_ERROR_OPERATION_FAILED operation failed
+ *
+ * @pre bt_dpm_set_allow_bluetooth_mode must be allowed.
+ * @see bt_dpm_get_allow_bluetooth_mode()
+ */
+int bt_dpm_get_allow_outgoing_call(bt_dpm_status_e *value);
+
+/**
+ * @ingroup CAPI_NETWORK_BLUETOOTH_DPM_MODULE
+ * @brief Sets the Restriction for pairing.
+ * @since_tizen 3.0
+ * @privlevel platform
+ * @privilege %http://tizen.org/privilege/bluetooth.admin
+ *
+ * @param[in]  value - State value.
+ *             BT_DPM_ALLOWED          = 0,    < DPM Policy status allowed.
+ *             BT_DPM_RESTRICTED               = 1,    < DPM Policy status restricted.
+ * @retval #BT_ERROR_NONE  Successful
+ * @retval #BT_ERROR_INVALID_PARAMETER invalid paramter
+ * @retval #BT_ERROR_NOT_SUPPORTED     Not suported
+ * @retval #BT_ERROR_NOT_ENABLED  Not enabled
+ * @retval #BT_ERROR_OPERATION_FAILED operation failed
+ *
+ * @pre bt_dpm_set_allow_bluetooth_mode must be allowed.
+ * @see bt_dpm_get_allow_bluetooth_mode()
+ */
+int bt_dpm_set_pairing_state(bt_dpm_status_e value);
+
+/**
+ * @ingroup CAPI_NETWORK_BLUETOOTH_DPM_MODULE
+ * @brief Reads the Restriction for pairing.
+ * @since_tizen 3.0
+ * @privlevel platform
+ * @privilege %http://tizen.org/privilege/bluetooth.admin
+ *
+ * @param[out] value - State value.
+ *             BT_DPM_ALLOWED          = 0,    < DPM Policy status allowed.
+ *             BT_DPM_RESTRICTED               = 1,    < DPM Policy status restricted.
+ * @retval #BT_ERROR_NONE  Successful
+ * @retval #BT_ERROR_INVALID_PARAMETER invalid paramter
+ * @retval #BT_ERROR_NOT_SUPPORTED     Not suported
+ * @retval #BT_ERROR_NOT_ENABLED  Not enabled
+ * @retval #BT_ERROR_OPERATION_FAILED operation failed
+ *
+ * @pre bt_dpm_set_allow_bluetooth_mode must be allowed.
+ * @see bt_dpm_get_allow_bluetooth_mode()
+ */
+int bt_dpm_get_pairing_state(bt_dpm_status_e *value);
+
+/**
+ * @ingroup CAPI_NETWORK_BLUETOOTH_DPM_MODULE
+ * @brief Sets the Restriction for profiles.
+ * @since_tizen 3.0
+ * @privlevel platform
+ * @privilege %http://tizen.org/privilege/bluetooth.admin
+ *
+ * @param[in]profile - Profile.
+ *             BT_DPM_POLICY_A2DP_PROFILE_STATE,
+ *             BT_DPM_POLICY_AVRCP_PROFILE_STATE,
+ *             BT_DPM_POLICY_BPP_PROFILE_STATE,
+ *             BT_DPM_POLICY_DUN_PROFILE_STATE,
+ *             BT_DPM_POLICY_FTP_PROFILE_STATE,
+ *             BT_DPM_POLICY_HFP_PROFILE_STATE,
+ *             BT_DPM_POLICY_HSP_PROFILE_STATE,
+ *             BT_DPM_POLICY_PBAP_PROFILE_STATE,
+ *             BT_DPM_POLICY_SAP_PROFILE_STATE,
+ *             BT_DPM_POLICY_SPP_PROFILE_STATE,
+ *             BT_DPM_PROFILE_NONE
+ * @retval #BT_ERROR_NONE  Successful
+ * @retval #BT_ERROR_INVALID_PARAMETER invalid paramter
+ * @retval #BT_ERROR_NOT_SUPPORTED     Not suported
+ * @retval #BT_ERROR_NOT_ENABLED  Not enabled
+ * @retval #BT_ERROR_OPERATION_FAILED operation failed
+ *
+ * @pre bt_dpm_set_allow_bluetooth_mode must be allowed.
+ * @see bt_dpm_get_allow_bluetooth_mode()
+ */
+int bt_dpm_set_profile_state(bt_dpm_profile_e profile, bt_dpm_status_e value);
+
+/**
+ * @ingroup CAPI_NETWORK_BLUETOOTH_DPM_MODULE
+ * @brief Reads the Restriction for profiles.
+ * @since_tizen 3.0
+ * @privlevel platform
+ * @privilege %http://tizen.org/privilege/bluetooth.admin
+ *
+ * @param[in]profile - Profile.
+ *             BT_DPM_POLICY_A2DP_PROFILE_STATE,
+ *             BT_DPM_POLICY_AVRCP_PROFILE_STATE,
+ *             BT_DPM_POLICY_BPP_PROFILE_STATE,
+ *             BT_DPM_POLICY_DUN_PROFILE_STATE,
+ *             BT_DPM_POLICY_FTP_PROFILE_STATE,
+ *             BT_DPM_POLICY_HFP_PROFILE_STATE,
+ *             BT_DPM_POLICY_HSP_PROFILE_STATE,
+ *             BT_DPM_POLICY_PBAP_PROFILE_STATE,
+ *             BT_DPM_POLICY_SAP_PROFILE_STATE,
+ *             BT_DPM_POLICY_SPP_PROFILE_STATE,
+ *             BT_DPM_PROFILE_NONE
+ * @param[out] value - State value.
+ *             BT_DPM_ALLOWED          = 0,    < DPM Policy status allowed.
+ *             BT_DPM_RESTRICTED               = 1,    < DPM Policy status restricted.
+ * @retval #BT_ERROR_NONE  Successful
+ * @retval #BT_ERROR_INVALID_PARAMETER invalid paramter
+ * @retval #BT_ERROR_NOT_SUPPORTED     Not suported
+ * @retval #BT_ERROR_NOT_ENABLED  Not enabled
+ * @retval #BT_ERROR_OPERATION_FAILED operation failed
+ *
+ * @pre bt_dpm_set_allow_bluetooth_mode must be allowed.
+ * @see bt_dpm_get_allow_bluetooth_mode()
+ */
+int bt_dpm_get_profile_state(bt_dpm_profile_e profile, bt_dpm_status_e *value);
+
+/**
+ * @ingroup CAPI_NETWORK_BLUETOOTH_DPM_MODULE
+ * @brief Sets the Restriction for desktop connectivity.
+ * @since_tizen 3.0
+ * @privlevel platform
+ * @privilege %http://tizen.org/privilege/bluetooth.admin
+ *
+ * @param[in]  value - State value.
+ *             BT_DPM_ALLOWED          = 0,    < DPM Policy status allowed.
+ *             BT_DPM_RESTRICTED               = 1,    < DPM Policy status restricted.
+ * @retval #BT_ERROR_NONE  Successful
+ * @retval #BT_ERROR_INVALID_PARAMETER invalid paramter
+ * @retval #BT_ERROR_NOT_SUPPORTED     Not suported
+ * @retval #BT_ERROR_NOT_ENABLED  Not enabled
+ * @retval #BT_ERROR_OPERATION_FAILED operation failed
+ *
+ * @pre bt_dpm_set_allow_bluetooth_mode must be allowed.
+ * @see bt_dpm_get_allow_bluetooth_mode()
+ */
+int bt_dpm_set_desktop_connectivity_state(bt_dpm_status_e value);
+
+/**
+ * @ingroup CAPI_NETWORK_BLUETOOTH_DPM_MODULE
+ * @brief Reads the Restriction for desktop connectivity.
+ * @since_tizen 3.0
+ * @privlevel platform
+ * @privilege %http://tizen.org/privilege/bluetooth.admin
+ *
+ * @param[out] value - State value.
+ *             BT_DPM_ALLOWED          = 0,    < DPM Policy status allowed.
+ *             BT_DPM_RESTRICTED               = 1,    < DPM Policy status restricted.
+ * @retval #BT_ERROR_NONE  Successful
+ * @retval #BT_ERROR_INVALID_PARAMETER invalid paramter
+ * @retval #BT_ERROR_NOT_SUPPORTED     Not suported
+ * @retval #BT_ERROR_NOT_ENABLED  Not enabled
+ * @retval #BT_ERROR_OPERATION_FAILED operation failed
+ *
+ * @pre bt_dpm_set_allow_bluetooth_mode must be allowed.
+ * @see bt_dpm_get_allow_bluetooth_mode()
+ */
+int bt_dpm_get_desktop_connectivity_state(bt_dpm_status_e *value);
+
+/**
+ * @ingroup CAPI_NETWORK_BLUETOOTH_DPM_MODULE
+ * @brief Sets the Restriction for discoverable mode.
+ * @since_tizen 3.0
+ * @privlevel platform
+ * @privilege %http://tizen.org/privilege/bluetooth.admin
+ *
+ * @param[in]  value - State value.
+ *             BT_DPM_ALLOWED          = 0,    < DPM Policy status allowed.
+ *             BT_DPM_RESTRICTED               = 1,    < DPM Policy status restricted.
+ * @retval #BT_ERROR_NONE  Successful
+ * @retval #BT_ERROR_INVALID_PARAMETER invalid paramter
+ * @retval #BT_ERROR_NOT_SUPPORTED     Not suported
+ * @retval #BT_ERROR_NOT_ENABLED  Not enabled
+ * @retval #BT_ERROR_OPERATION_FAILED operation failed
+ *
+ * @pre bt_dpm_set_allow_bluetooth_mode must be allowed.
+ * @see bt_dpm_get_allow_bluetooth_mode()
+ */
+int bt_dpm_set_discoverable_state(bt_dpm_status_e value);
+
+/**
+ * @ingroup CAPI_NETWORK_BLUETOOTH_DPM_MODULE
+ * @brief Reads the Restriction for discoverable mode.
+ * @since_tizen 3.0
+ * @privlevel platform
+ * @privilege %http://tizen.org/privilege/bluetooth.admin
+ *
+ * @param[out] value - State value.
+ *             BT_DPM_ALLOWED          = 0,    < DPM Policy status allowed.
+ *             BT_DPM_RESTRICTED               = 1,    < DPM Policy status restricted.
+ * @retval #BT_ERROR_NONE  Successful
+ * @retval #BT_ERROR_INVALID_PARAMETER invalid paramter
+ * @retval #BT_ERROR_NOT_SUPPORTED     Not suported
+ * @retval #BT_ERROR_NOT_ENABLED  Not enabled
+ * @retval #BT_ERROR_OPERATION_FAILED operation failed
+ *
+ * @pre bt_dpm_set_allow_bluetooth_mode must be allowed.
+ * @see bt_dpm_get_allow_bluetooth_mode()
+ */
+int bt_dpm_get_discoverable_state(bt_dpm_status_e *value);
+
+/**
+ * @ingroup CAPI_NETWORK_BLUETOOTH_DPM_MODULE
+ * @brief Sets the Restriction for limited discoverable mode.
+ * @since_tizen 3.0
+ * @privlevel platform
+ * @privilege %http://tizen.org/privilege/bluetooth.admin
+ *
+ * @param[in]  value - State value.
+ *             BT_DPM_ALLOWED          = 0,    < DPM Policy status allowed.
+ *             BT_DPM_RESTRICTED               = 1,    < DPM Policy status restricted.
+ * @retval #BT_ERROR_NONE  Successful
+ * @retval #BT_ERROR_INVALID_PARAMETER invalid paramter
+ * @retval #BT_ERROR_NOT_SUPPORTED     Not suported
+ * @retval #BT_ERROR_NOT_ENABLED  Not enabled
+ * @retval #BT_ERROR_OPERATION_FAILED operation failed
+ *
+ * @pre bt_dpm_set_allow_bluetooth_mode must be allowed.
+ * @see bt_dpm_get_allow_bluetooth_mode()
+ */
+
+int bt_dpm_set_limited_discoverable_state(bt_dpm_status_e value);
+
+/**
+ * @ingroup CAPI_NETWORK_BLUETOOTH_DPM_MODULE
+ * @brief Reads the Restriction for limited discoverable mode.
+ * @since_tizen 3.0
+ * @privlevel platform
+ * @privilege %http://tizen.org/privilege/bluetooth.admin
+ *
+ * @param[out] value - State value.
+ *             BT_DPM_ALLOWED          = 0,    < DPM Policy status allowed.
+ *             BT_DPM_RESTRICTED               = 1,    < DPM Policy status restricted.
+ * @retval #BT_ERROR_NONE  Successful
+ * @retval #BT_ERROR_INVALID_PARAMETER invalid paramter
+ * @retval #BT_ERROR_NOT_SUPPORTED     Not suported
+ * @retval #BT_ERROR_NOT_ENABLED  Not enabled
+ * @retval #BT_ERROR_OPERATION_FAILED operation failed
+ *
+ * @pre bt_dpm_set_allow_bluetooth_mode must be allowed.
+ * @see bt_dpm_get_allow_bluetooth_mode()
+ */
+int bt_dpm_get_limited_discoverable_state(bt_dpm_status_e *value);
+
+/**
+ * @ingroup CAPI_NETWORK_BLUETOOTH_DPM_MODULE
+ * @brief Sets the Restriction for Data transfer.
+ * @since_tizen 3.0
+ * @privlevel platform
+ * @privilege %http://tizen.org/privilege/bluetooth.admin
+ *
+ * @param[in]  value - State value.
+ *             BT_DPM_ALLOWED          = 0,    < DPM Policy status allowed.
+ *             BT_DPM_RESTRICTED               = 1,    < DPM Policy status restricted.
+ * @retval #BT_ERROR_NONE  Successful
+ * @retval #BT_ERROR_INVALID_PARAMETER invalid paramter
+ * @retval #BT_ERROR_NOT_SUPPORTED     Not suported
+ * @retval #BT_ERROR_NOT_ENABLED  Not enabled
+ * @retval #BT_ERROR_OPERATION_FAILED operation failed
+ *
+ * @pre bt_dpm_set_allow_bluetooth_mode must be allowed.
+ * @see bt_dpm_get_allow_bluetooth_mode()
+ */
+int bt_dpm_set_data_transfer_state(bt_dpm_status_e value);
+
+/**
+ * @ingroup CAPI_NETWORK_BLUETOOTH_DPM_MODULE
+ * @brief Reads the Restriction for Data transfer.
+ * @since_tizen 3.0
+ * @privlevel platform
+ * @privilege %http://tizen.org/privilege/bluetooth.admin
+ *
+ * @param[out] value - State value.
+ *             BT_DPM_ALLOWED          = 0,    < DPM Policy status allowed.
+ *             BT_DPM_RESTRICTED               = 1,    < DPM Policy status restricted.
+ * @retval #BT_ERROR_NONE  Successful
+ * @retval #BT_ERROR_INVALID_PARAMETER invalid paramter
+ * @retval #BT_ERROR_NOT_SUPPORTED     Not suported
+ * @retval #BT_ERROR_NOT_ENABLED  Not enabled
+ * @retval #BT_ERROR_OPERATION_FAILED operation failed
+ *
+ * @pre bt_dpm_set_allow_bluetooth_mode must be allowed.
+ * @see bt_dpm_get_allow_bluetooth_mode()
+ */
+int bt_dpm_get_data_transfer_state(bt_dpm_status_e *value);
+
+/**
  * @}
  */
 
index 5613f08..1a99bea 100644 (file)
@@ -169,6 +169,55 @@ typedef enum {
 } bt_gatt_permission_e;
 
 /**
+* @ingroup CAPI_NETWORK_BLUETOOTH_DPM_MODULE
+* @brief DPM BT allowance state
+* @since_tizen 3.0
+*/
+typedef enum {
+       BT_DPM_ERROR      = -1,   /**< bluetooth allowance error */
+       BT_DPM_BT_ALLOWED,        /**< bluetooth allowance allowed */
+       BT_DPM_HANDSFREE_ONLY, /**< bluetooth allowance handsfree only */
+       BT_DPM_BT_RESTRICTED,  /**< bluetooth allowance restricted */
+} bt_dpm_allow_e;
+
+/**
+* @ingroup CAPI_NETWORK_BLUETOOTH_DPM_MODULE
+* @brief DPM Policy status
+* @since_tizen 3.0
+*/
+typedef enum {
+       BT_DPM_STATUS_ERROR = -1,
+
+       BT_DPM_ALLOWED   = 0,    /**< DPM Policy status allowed. */
+       BT_DPM_RESTRICTED                = 1,    /**< DPM Policy status restricted. */
+
+       BT_DPM_ENABLE                    = 1,    /**< DPM Policy status enabled. */
+       BT_DPM_DISABLE  = 0,     /**< DPM Policy status disabled. */
+
+       BT_DPM_FALSE             = 0,    /**< DPM Policy status false. */
+       BT_DPM_TRUE      = 1,    /**< DPM Policy status true. */
+} bt_dpm_status_e;
+
+/**
+* @ingroup CAPI_NETWORK_BLUETOOTH_DPM_MODULE
+* @brief DPM Profile states
+* @since_tizen 3.0
+*/
+typedef enum {
+       BT_DPM_POLICY_A2DP_PROFILE_STATE,
+       BT_DPM_POLICY_AVRCP_PROFILE_STATE,
+       BT_DPM_POLICY_BPP_PROFILE_STATE,
+       BT_DPM_POLICY_DUN_PROFILE_STATE,
+       BT_DPM_POLICY_FTP_PROFILE_STATE,
+       BT_DPM_POLICY_HFP_PROFILE_STATE,
+       BT_DPM_POLICY_HSP_PROFILE_STATE,
+       BT_DPM_POLICY_PBAP_PROFILE_STATE,
+       BT_DPM_POLICY_SAP_PROFILE_STATE,
+       BT_DPM_POLICY_SPP_PROFILE_STATE,
+       BT_DPM_PROFILE_NONE,
+} bt_dpm_profile_e;
+
+/**
  * @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_LE_MODULE
  * @brief The handle to control Bluetooth LE scan filter
  * @since_tizen 2.4
@@ -352,6 +401,23 @@ typedef struct {
        unsigned int time_out;   /**< Supervision timeout (msec) */
 } bt_le_conn_update_s;
 
+
+/**
+ * Structure to DPM device list
+ */
+typedef struct {
+       int count;
+       char **devices;
+} bt_dpm_device_list_s;
+
+/**
+ * Structure to DPM uuid list
+ */
+typedef struct {
+       int count;
+       char **uuids;
+} bt_dpm_uuids_list_s;
+
 /**
  * @}
  */
index 32018d9..1b2e8f4 100644 (file)
@@ -3874,6 +3874,757 @@ int bt_hid_device_reply_to_report(const char *remote_address,
                const char *data, unsigned int data_len);
 
 /**
+ * @ingroup CAPI_NETWORK_BLUETOOTH_DPM_MODULE
+ * @brief Sets Restriction for BT mode(BT allowed or not).
+ * @since_tizen 3.0
+ * @privlevel platform
+ * @privilege %http://tizen.org/privilege/bluetooth.admin
+ *
+ * @param[in]  value - BT Allow value.
+ *             BT_DPM_ERROR     = -1,   < bluetooth allowance error
+ *             BT_DPM_BT_ALLOWED,               < bluetooth allowance allowed
+ *             BT_DPM_HANDSFREE_ONLY,  < bluetooth allowance handsfree only
+ *             BT_DPM_BT_RESTRICTED,  < bluetooth allowance restricted
+ * @retval #BT_ERROR_NONE  Successful
+ * @retval #BT_ERROR_INVALID_PARAMETER  invalid paramter
+ * @retval #BT_ERROR_NOT_SUPPORTED  Not suported
+ * @retval #BT_ERROR_NOT_ENABLED  Not enabled
+ * @retval #BT_ERROR_OPERATION_FAILED operation failed
+ *
+ * @pre none.
+ * @see bt_dpm_get_allow_bluetooth_mode()
+ */
+int bt_dpm_set_allow_bluetooth_mode(bt_dpm_allow_e value);
+
+/**
+ * @ingroup CAPI_NETWORK_BLUETOOTH_DPM_MODULE
+ * @brief Reads Restriction for BT mode(BT allowed or not).
+ * @since_tizen 3.0
+ * @privlevel platform
+ * @privilege %http://tizen.org/privilege/bluetooth.admin
+ *
+ * @param[in] none
+ * @param[out] value - BT Allow value.
+ *             BT_DPM_ERROR     = -1,   < bluetooth allowance error
+ *             BT_DPM_BT_ALLOWED,               < bluetooth allowance allowed
+ *             BT_DPM_HANDSFREE_ONLY,  < bluetooth allowance handsfree only
+ *             BT_DPM_BT_RESTRICTED,  < bluetooth allowance restricted
+ * @retval #BT_ERROR_NONE  Successful
+ * @retval #BT_ERROR_INVALID_PARAMETER invalid paramter
+ * @retval #BT_ERROR_NOT_SUPPORTED     Not suported
+ * @retval #BT_ERROR_NOT_ENABLED  Not enabled
+ * @retval #BT_ERROR_OPERATION_FAILED operation failed
+ *
+ * @pre none.
+ * @see bt_dpm_set_allow_bluetooth_mode()
+ */
+int bt_dpm_get_allow_bluetooth_mode(bt_dpm_allow_e *value);
+
+/**
+ * @ingroup CAPI_NETWORK_BLUETOOTH_DPM_MODULE
+ * @brief Sets the Restriction for device.
+ * @since_tizen 3.0
+ * @privlevel platform
+ * @privilege %http://tizen.org/privilege/bluetooth.admin
+ *
+ * @param[in]  value - State value.
+ *             BT_DPM_ALLOWED          = 0,    < DPM Policy status allowed.
+ *             BT_DPM_RESTRICTED               = 1,    < DPM Policy status restricted.
+ * @retval #BT_ERROR_NONE  Successful
+ * @retval #BT_ERROR_INVALID_PARAMETER invalid paramter
+ * @retval #BT_ERROR_NOT_SUPPORTED     Not suported
+ * @retval #BT_ERROR_NOT_ENABLED  Not enabled
+ * @retval #BT_ERROR_OPERATION_FAILED operation failed
+ *
+ * @pre bt_dpm_set_allow_bluetooth_mode must be allowed.
+ * @see bt_dpm_get_allow_bluetooth_mode()
+ */
+int bt_dpm_activate_device_restriction(bt_dpm_status_e value);
+
+/**
+ * @ingroup CAPI_NETWORK_BLUETOOTH_DPM_MODULE
+ * @brief Reads the Restriction for device.
+ * @since_tizen 3.0
+ * @privlevel platform
+ * @privilege %http://tizen.org/privilege/bluetooth.admin
+ *
+ * @param[out] value - State value.
+ *             BT_DPM_ALLOWED          = 0,    < DPM Policy status allowed.
+ *             BT_DPM_RESTRICTED               = 1,    < DPM Policy status restricted.
+ * @retval #BT_ERROR_NONE  Successful
+ * @retval #BT_ERROR_INVALID_PARAMETER invalid paramter
+ * @retval #BT_ERROR_NOT_SUPPORTED     Not suported
+ * @retval #BT_ERROR_NOT_ENABLED  Not enabled
+ * @retval #BT_ERROR_OPERATION_FAILED operation failed
+ *
+ * @pre bt_dpm_set_allow_bluetooth_mode must be allowed.
+ * @see bt_dpm_get_allow_bluetooth_mode()
+ */
+int bt_dpm_is_device_restriction_active(bt_dpm_status_e *value);
+
+/**
+ * @ingroup CAPI_NETWORK_BLUETOOTH_DPM_MODULE
+ * @brief Sets the Restriction for uuid.
+ * @since_tizen 3.0
+ * @privlevel platform
+ * @privilege %http://tizen.org/privilege/bluetooth.admin
+ *
+ * @param[in]  value - State value.
+ *             BT_DPM_ALLOWED          = 0,    < DPM Policy status allowed.
+ *             BT_DPM_RESTRICTED               = 1,    < DPM Policy status restricted.
+ * @retval #BT_ERROR_NONE  Successful
+ * @retval #BT_ERROR_INVALID_PARAMETER invalid paramter
+ * @retval #BT_ERROR_NOT_SUPPORTED     Not suported
+ * @retval #BT_ERROR_NOT_ENABLED  Not enabled
+ * @retval #BT_ERROR_OPERATION_FAILED operation failed
+ *
+ * @pre bt_dpm_set_allow_bluetooth_mode must be allowed.
+ * @see bt_dpm_get_allow_bluetooth_mode()
+ */
+int bt_dpm_activate_uuid_restriction(bt_dpm_status_e value);
+
+/**
+ * @ingroup CAPI_NETWORK_BLUETOOTH_DPM_MODULE
+ * @brief Reads the Restriction for uuid.
+ * @since_tizen 3.0
+ * @privlevel platform
+ * @privilege %http://tizen.org/privilege/bluetooth.admin
+ *
+ * @param[out] value - State value.
+ *             BT_DPM_ALLOWED          = 0,    < DPM Policy status allowed.
+ *             BT_DPM_RESTRICTED               = 1,    < DPM Policy status restricted.
+ * @retval #BT_ERROR_NONE  Successful
+ * @retval #BT_ERROR_INVALID_PARAMETER invalid paramter
+ * @retval #BT_ERROR_NOT_SUPPORTED     Not suported
+ * @retval #BT_ERROR_NOT_ENABLED  Not enabled
+ * @retval #BT_ERROR_OPERATION_FAILED operation failed
+ *
+ * @pre bt_dpm_set_allow_bluetooth_mode must be allowed.
+ * @see bt_dpm_get_allow_bluetooth_mode()
+ */
+int bt_dpm_is_uuid_restriction_active(bt_dpm_status_e *value);
+
+/**
+ * @ingroup CAPI_NETWORK_BLUETOOTH_DPM_MODULE
+ * @brief Adds the device to blacklist.
+ * @since_tizen 3.0
+ * @privlevel platform
+ * @privilege %http://tizen.org/privilege/bluetooth.admin
+ *
+ * @param[in]  device_address - Device address
+ * @retval #BT_ERROR_NONE  Successful
+ * @retval #BT_ERROR_INVALID_PARAMETER invalid paramter
+ * @retval #BT_ERROR_NOT_SUPPORTED     Not suported
+ * @retval #BT_ERROR_NOT_ENABLED  Not enabled
+ * @retval #BT_ERROR_OPERATION_FAILED operation failed
+ *
+ * @pre bt_dpm_set_allow_bluetooth_mode must be allowed.
+ * @see bt_dpm_get_allow_bluetooth_mode()
+ */
+int bt_dpm_add_devices_to_blacklist(const char *device_address);
+
+/**
+ * @ingroup CAPI_NETWORK_BLUETOOTH_DPM_MODULE
+ * @brief Adds the device to whitelist.
+ * @since_tizen 3.0
+ * @privlevel platform
+ * @privilege %http://tizen.org/privilege/bluetooth.admin
+ *
+ * @param[in]  device_address - Device address
+ * @retval #BT_ERROR_NONE  Successful
+ * @retval #BT_ERROR_INVALID_PARAMETER invalid paramter
+ * @retval #BT_ERROR_NOT_SUPPORTED     Not suported
+ * @retval #BT_ERROR_NOT_ENABLED  Not enabled
+ * @retval #BT_ERROR_OPERATION_FAILED operation failed
+ *
+ * @pre bt_dpm_set_allow_bluetooth_mode must be allowed.
+ * @see bt_dpm_get_allow_bluetooth_mode()
+ */
+int bt_dpm_add_devices_to_whitelist(const char *device_address);
+
+/**
+ * @ingroup CAPI_NETWORK_BLUETOOTH_DPM_MODULE
+ * @brief Adds the uuids to blacklist.
+ * @since_tizen 3.0
+ * @privlevel platform
+ * @privilege %http://tizen.org/privilege/bluetooth.admin
+ *
+ * @param[in]  service_uuids - profile or custom service uuids
+ * @retval #BT_ERROR_NONE  Successful
+ * @retval #BT_ERROR_INVALID_PARAMETER invalid paramter
+ * @retval #BT_ERROR_NOT_SUPPORTED     Not suported
+ * @retval #BT_ERROR_NOT_ENABLED  Not enabled
+ * @retval #BT_ERROR_OPERATION_FAILED operation failed
+ *
+ * @pre bt_dpm_set_allow_bluetooth_mode must be allowed.
+ * @see bt_dpm_get_allow_bluetooth_mode()
+ */
+int bt_dpm_add_uuids_to_blacklist(const char *service_uuid);
+
+/**
+ * @ingroup CAPI_NETWORK_BLUETOOTH_DPM_MODULE
+ * @brief Adds the uuid to whitelist.
+ * @since_tizen 3.0
+ * @privlevel platform
+ * @privilege %http://tizen.org/privilege/bluetooth.admin
+ *
+ * @param[in]  service_uuids - profile or custom service uuids
+ * @retval #BT_ERROR_NONE  Successful
+ * @retval #BT_ERROR_INVALID_PARAMETER invalid paramter
+ * @retval #BT_ERROR_NOT_SUPPORTED     Not suported
+ * @retval #BT_ERROR_NOT_ENABLED  Not enabled
+ * @retval #BT_ERROR_OPERATION_FAILED operation failed
+ *
+ * @pre bt_dpm_set_allow_bluetooth_mode must be allowed.
+ * @see bt_dpm_get_allow_bluetooth_mode()
+ */
+int bt_dpm_add_uuids_to_whitelist(const char *service_uuid);
+
+/**
+ * @ingroup CAPI_NETWORK_BLUETOOTH_DPM_MODULE
+ * @brief Clears the device from blacklist.
+ * @since_tizen 3.0
+ * @privlevel platform
+ * @privilege %http://tizen.org/privilege/bluetooth.admin
+ *
+ * @param[in]  none
+ * @retval #BT_ERROR_NONE  Successful
+ * @retval #BT_ERROR_INVALID_PARAMETER invalid paramter
+ * @retval #BT_ERROR_NOT_SUPPORTED     Not suported
+ * @retval #BT_ERROR_NOT_ENABLED  Not enabled
+ * @retval #BT_ERROR_OPERATION_FAILED operation failed
+ *
+ * @pre bt_dpm_set_allow_bluetooth_mode must be allowed.
+ * @see bt_dpm_get_allow_bluetooth_mode()
+ */
+int bt_dpm_clear_devices_from_blacklist(void);
+
+/**
+ * @ingroup CAPI_NETWORK_BLUETOOTH_DPM_MODULE
+ * @brief Clears the device from whitelist.
+ * @since_tizen 3.0
+ * @privlevel platform
+ * @privilege %http://tizen.org/privilege/bluetooth.admin
+ *
+ * @param[in]  none
+ * @retval #BT_ERROR_NONE  Successful
+ * @retval #BT_ERROR_INVALID_PARAMETER invalid paramter
+ * @retval #BT_ERROR_NOT_SUPPORTED     Not suported
+ * @retval #BT_ERROR_NOT_ENABLED  Not enabled
+ * @retval #BT_ERROR_OPERATION_FAILED operation failed
+ *
+ * @pre bt_dpm_set_allow_bluetooth_mode must be allowed.
+ * @see bt_dpm_get_allow_bluetooth_mode()
+ */
+int bt_dpm_clear_devices_from_whitelist(void);
+
+/**
+ * @ingroup CAPI_NETWORK_BLUETOOTH_DPM_MODULE
+ * @brief Clears the uuids from blacklist.
+ * @since_tizen 3.0
+ * @privlevel platform
+ * @privilege %http://tizen.org/privilege/bluetooth.admin
+ *
+ * @param[in]  none
+ * @retval #BT_ERROR_NONE  Successful
+ * @retval #BT_ERROR_INVALID_PARAMETER invalid paramter
+ * @retval #BT_ERROR_NOT_SUPPORTED     Not suported
+ * @retval #BT_ERROR_NOT_ENABLED  Not enabled
+ * @retval #BT_ERROR_OPERATION_FAILED operation failed
+ *
+ * @pre bt_dpm_set_allow_bluetooth_mode must be allowed.
+ * @see bt_dpm_get_allow_bluetooth_mode()
+ */
+int bt_dpm_clear_uuids_from_blacklist(void);
+
+/**
+ * @ingroup CAPI_NETWORK_BLUETOOTH_DPM_MODULE
+ * @brief Clears the uuids from whitelist.
+ * @since_tizen 3.0
+ * @privlevel platform
+ * @privilege %http://tizen.org/privilege/bluetooth.admin
+ *
+ * @param[in]  none
+ * @retval #BT_ERROR_NONE  Successful
+ * @retval #BT_ERROR_INVALID_PARAMETER invalid paramter
+ * @retval #BT_ERROR_NOT_SUPPORTED     Not suported
+ * @retval #BT_ERROR_NOT_ENABLED  Not enabled
+ * @retval #BT_ERROR_OPERATION_FAILED operation failed
+ *
+ * @pre bt_dpm_set_allow_bluetooth_mode must be allowed.
+ * @see bt_dpm_get_allow_bluetooth_mode()
+ */
+int bt_dpm_clear_uuids_from_whitelist(void);
+
+/**
+ * @ingroup CAPI_NETWORK_BLUETOOTH_DPM_MODULE
+ * @brief Reads the devices from blacklist.
+ * @since_tizen 3.0
+ * @privlevel platform
+ * @privilege %http://tizen.org/privilege/bluetooth.admin
+ *
+ * @param[out] device_list - list of devices
+ * @retval #BT_ERROR_NONE  Successful
+ * @retval #BT_ERROR_INVALID_PARAMETER invalid paramter
+ * @retval #BT_ERROR_NOT_SUPPORTED     Not suported
+ * @retval #BT_ERROR_NOT_ENABLED  Not enabled
+ * @retval #BT_ERROR_OPERATION_FAILED operation failed
+ *
+ * @pre bt_dpm_set_allow_bluetooth_mode must be allowed.
+ * @see bt_dpm_get_allow_bluetooth_mode()
+ */
+int bt_dpm_get_devices_from_blacklist(bt_dpm_device_list_s **device_list);
+
+/**
+ * @ingroup CAPI_NETWORK_BLUETOOTH_DPM_MODULE
+ * @brief Reads the devices from whitelist.
+ * @since_tizen 3.0
+ * @privlevel platform
+ * @privilege %http://tizen.org/privilege/bluetooth.admin
+ *
+ * @param[out] device_list - list of devices
+ * @retval #BT_ERROR_NONE  Successful
+ * @retval #BT_ERROR_INVALID_PARAMETER invalid paramter
+ * @retval #BT_ERROR_NOT_SUPPORTED     Not suported
+ * @retval #BT_ERROR_NOT_ENABLED  Not enabled
+ * @retval #BT_ERROR_OPERATION_FAILED operation failed
+ *
+ * @pre bt_dpm_set_allow_bluetooth_mode must be allowed.
+ * @see bt_dpm_get_allow_bluetooth_mode()
+ */
+int bt_dpm_get_devices_from_whitelist(bt_dpm_device_list_s **device_list);
+
+/**
+ * @ingroup CAPI_NETWORK_BLUETOOTH_DPM_MODULE
+ * @brief Reads the uuids from blacklist.
+ * @since_tizen 3.0
+ * @privlevel platform
+ * @privilege %http://tizen.org/privilege/bluetooth.admin
+ *
+ * @param[out] uuid_list - list of uuids
+ * @retval #BT_ERROR_NONE  Successful
+ * @retval #BT_ERROR_INVALID_PARAMETER invalid paramter
+ * @retval #BT_ERROR_NOT_SUPPORTED     Not suported
+ * @retval #BT_ERROR_NOT_ENABLED  Not enabled
+ * @retval #BT_ERROR_OPERATION_FAILED operation failed
+ *
+ * @pre bt_dpm_set_allow_bluetooth_mode must be allowed.
+ * @see bt_dpm_get_allow_bluetooth_mode()
+ */
+int bt_dpm_get_uuids_from_blacklist(bt_dpm_uuids_list_s **uuid_list);
+
+/**
+ * @ingroup CAPI_NETWORK_BLUETOOTH_DPM_MODULE
+ * @brief Reads the uuids from whitelist.
+ * @since_tizen 3.0
+ * @privlevel platform
+ * @privilege %http://tizen.org/privilege/bluetooth.admin
+ *
+ * @param[out] uuid_list - list of uuids
+ * @retval #BT_ERROR_NONE  Successful
+ * @retval #BT_ERROR_INVALID_PARAMETER invalid paramter
+ * @retval #BT_ERROR_NOT_SUPPORTED     Not suported
+ * @retval #BT_ERROR_NOT_ENABLED  Not enabled
+ * @retval #BT_ERROR_OPERATION_FAILED operation failed
+ *
+ * @pre bt_dpm_set_allow_bluetooth_mode must be allowed.
+ * @see bt_dpm_get_allow_bluetooth_mode()
+ */
+int bt_dpm_get_uuids_from_whitelist(bt_dpm_uuids_list_s **uuid_list);
+
+/**
+ * @ingroup CAPI_NETWORK_BLUETOOTH_DPM_MODULE
+ * @brief Removes the devices from whitelist.
+ * @since_tizen 3.0
+ * @privlevel platform
+ * @privilege %http://tizen.org/privilege/bluetooth.admin
+ *
+ * @param[in]  device_address - Device address
+ * @retval #BT_ERROR_NONE  Successful
+ * @retval #BT_ERROR_INVALID_PARAMETER invalid paramter
+ * @retval #BT_ERROR_NOT_SUPPORTED     Not suported
+ * @retval #BT_ERROR_NOT_ENABLED  Not enabled
+ * @retval #BT_ERROR_OPERATION_FAILED operation failed
+ *
+ * @pre bt_dpm_set_allow_bluetooth_mode must be allowed.
+ * @see bt_dpm_get_allow_bluetooth_mode()
+ */
+int bt_dpm_remove_device_from_whitelist(const char *device_address);
+
+/**
+ * @ingroup CAPI_NETWORK_BLUETOOTH_DPM_MODULE
+ * @brief Removes the devices from blacklist.
+ * @since_tizen 3.0
+ * @privlevel platform
+ * @privilege %http://tizen.org/privilege/bluetooth.admin
+ *
+ * @param[in]  device_address - Device address
+ * @retval #BT_ERROR_NONE  Successful
+ * @retval #BT_ERROR_INVALID_PARAMETER invalid paramter
+ * @retval #BT_ERROR_NOT_SUPPORTED     Not suported
+ * @retval #BT_ERROR_NOT_ENABLED  Not enabled
+ * @retval #BT_ERROR_OPERATION_FAILED operation failed
+ *
+ * @pre bt_dpm_set_allow_bluetooth_mode must be allowed.
+ * @see bt_dpm_get_allow_bluetooth_mode()
+ */
+int bt_dpm_remove_device_from_blacklist(const char *device_address);
+
+/**
+ * @ingroup CAPI_NETWORK_BLUETOOTH_DPM_MODULE
+ * @brief Removes the uuids from whitelist.
+ * @since_tizen 3.0
+ * @privlevel platform
+ * @privilege %http://tizen.org/privilege/bluetooth.admin
+ *
+ * @param[in]  service_uuids - profile or custom service uuids
+ * @retval #BT_ERROR_NONE  Successful
+ * @retval #BT_ERROR_INVALID_PARAMETER invalid paramter
+ * @retval #BT_ERROR_NOT_SUPPORTED     Not suported
+ * @retval #BT_ERROR_NOT_ENABLED  Not enabled
+ * @retval #BT_ERROR_OPERATION_FAILED operation failed
+ *
+ * @pre bt_dpm_set_allow_bluetooth_mode must be allowed.
+ * @see bt_dpm_get_allow_bluetooth_mode()
+ */
+int bt_dpm_remove_uuid_from_whitelist(const char *service_uuid);
+
+/**
+ * @ingroup CAPI_NETWORK_BLUETOOTH_DPM_MODULE
+ * @brief Removes the uuids from blacklist.
+ * @since_tizen 3.0
+ * @privlevel platform
+ * @privilege %http://tizen.org/privilege/bluetooth.admin
+ *
+ * @param[in]  service_uuids - profile or custom service uuids
+ * @retval #BT_ERROR_NONE  Successful
+ * @retval #BT_ERROR_INVALID_PARAMETER invalid paramter
+ * @retval #BT_ERROR_NOT_SUPPORTED     Not suported
+ * @retval #BT_ERROR_NOT_ENABLED  Not enabled
+ * @retval #BT_ERROR_OPERATION_FAILED operation failed
+ *
+ * @pre bt_dpm_set_allow_bluetooth_mode must be allowed.
+ * @see bt_dpm_get_allow_bluetooth_mode()
+ */
+int bt_dpm_remove_uuid_from_blacklist(const char *service_uuid);
+
+/**
+ * @ingroup CAPI_NETWORK_BLUETOOTH_DPM_MODULE
+ * @brief Sets the Restriction for  outgoing call.
+ * @since_tizen 3.0
+ * @privlevel platform
+ * @privilege %http://tizen.org/privilege/bluetooth.admin
+ *
+ * @param[in]  value - State value.
+ *             BT_DPM_ALLOWED          = 0,    < DPM Policy status allowed.
+ *             BT_DPM_RESTRICTED               = 1,    < DPM Policy status restricted.
+ * @retval #BT_ERROR_NONE  Successful
+ * @retval #BT_ERROR_INVALID_PARAMETER invalid paramter
+ * @retval #BT_ERROR_NOT_SUPPORTED     Not suported
+ * @retval #BT_ERROR_NOT_ENABLED  Not enabled
+ * @retval #BT_ERROR_OPERATION_FAILED operation failed
+ *
+ * @pre bt_dpm_set_allow_bluetooth_mode must be allowed.
+ * @see bt_dpm_get_allow_bluetooth_mode()
+ */
+int bt_dpm_set_allow_outgoing_call(bt_dpm_status_e value);
+
+/**
+ * @ingroup CAPI_NETWORK_BLUETOOTH_DPM_MODULE
+ * @brief Reads the Restriction for  outgoing call.
+ * @since_tizen 3.0
+ * @privlevel platform
+ * @privilege %http://tizen.org/privilege/bluetooth.admin
+ *
+ * @param[out] value - State value.
+ *             BT_DPM_ALLOWED          = 0,    < DPM Policy status allowed.
+ *             BT_DPM_RESTRICTED               = 1,    < DPM Policy status restricted.
+ * @retval #BT_ERROR_NONE  Successful
+ * @retval #BT_ERROR_INVALID_PARAMETER invalid paramter
+ * @retval #BT_ERROR_NOT_SUPPORTED     Not suported
+ * @retval #BT_ERROR_NOT_ENABLED  Not enabled
+ * @retval #BT_ERROR_OPERATION_FAILED operation failed
+ *
+ * @pre bt_dpm_set_allow_bluetooth_mode must be allowed.
+ * @see bt_dpm_get_allow_bluetooth_mode()
+ */
+int bt_dpm_get_allow_outgoing_call(bt_dpm_status_e *value);
+
+/**
+ * @ingroup CAPI_NETWORK_BLUETOOTH_DPM_MODULE
+ * @brief Sets the Restriction for pairing.
+ * @since_tizen 3.0
+ * @privlevel platform
+ * @privilege %http://tizen.org/privilege/bluetooth.admin
+ *
+ * @param[in]  value - State value.
+ *             BT_DPM_ALLOWED          = 0,    < DPM Policy status allowed.
+ *             BT_DPM_RESTRICTED               = 1,    < DPM Policy status restricted.
+ * @retval #BT_ERROR_NONE  Successful
+ * @retval #BT_ERROR_INVALID_PARAMETER invalid paramter
+ * @retval #BT_ERROR_NOT_SUPPORTED     Not suported
+ * @retval #BT_ERROR_NOT_ENABLED  Not enabled
+ * @retval #BT_ERROR_OPERATION_FAILED operation failed
+ *
+ * @pre bt_dpm_set_allow_bluetooth_mode must be allowed.
+ * @see bt_dpm_get_allow_bluetooth_mode()
+ */
+int bt_dpm_set_pairing_state(bt_dpm_status_e value);
+
+/**
+ * @ingroup CAPI_NETWORK_BLUETOOTH_DPM_MODULE
+ * @brief Reads the Restriction for pairing.
+ * @since_tizen 3.0
+ * @privlevel platform
+ * @privilege %http://tizen.org/privilege/bluetooth.admin
+ *
+ * @param[out] value - State value.
+ *             BT_DPM_ALLOWED          = 0,    < DPM Policy status allowed.
+ *             BT_DPM_RESTRICTED               = 1,    < DPM Policy status restricted.
+ * @retval #BT_ERROR_NONE  Successful
+ * @retval #BT_ERROR_INVALID_PARAMETER invalid paramter
+ * @retval #BT_ERROR_NOT_SUPPORTED     Not suported
+ * @retval #BT_ERROR_NOT_ENABLED  Not enabled
+ * @retval #BT_ERROR_OPERATION_FAILED operation failed
+ *
+ * @pre bt_dpm_set_allow_bluetooth_mode must be allowed.
+ * @see bt_dpm_get_allow_bluetooth_mode()
+ */
+int bt_dpm_get_pairing_state(bt_dpm_status_e *value);
+
+/**
+ * @ingroup CAPI_NETWORK_BLUETOOTH_DPM_MODULE
+ * @brief Sets the Restriction for profiles.
+ * @since_tizen 3.0
+ * @privlevel platform
+ * @privilege %http://tizen.org/privilege/bluetooth.admin
+ *
+ * @param[in]profile - Profile.
+ *             BT_DPM_POLICY_A2DP_PROFILE_STATE,
+ *             BT_DPM_POLICY_AVRCP_PROFILE_STATE,
+ *             BT_DPM_POLICY_BPP_PROFILE_STATE,
+ *             BT_DPM_POLICY_DUN_PROFILE_STATE,
+ *             BT_DPM_POLICY_FTP_PROFILE_STATE,
+ *             BT_DPM_POLICY_HFP_PROFILE_STATE,
+ *             BT_DPM_POLICY_HSP_PROFILE_STATE,
+ *             BT_DPM_POLICY_PBAP_PROFILE_STATE,
+ *             BT_DPM_POLICY_SAP_PROFILE_STATE,
+ *             BT_DPM_POLICY_SPP_PROFILE_STATE,
+ *             BT_DPM_PROFILE_NONE
+ * @retval #BT_ERROR_NONE  Successful
+ * @retval #BT_ERROR_INVALID_PARAMETER invalid paramter
+ * @retval #BT_ERROR_NOT_SUPPORTED     Not suported
+ * @retval #BT_ERROR_NOT_ENABLED  Not enabled
+ * @retval #BT_ERROR_OPERATION_FAILED operation failed
+ *
+ * @pre bt_dpm_set_allow_bluetooth_mode must be allowed.
+ * @see bt_dpm_get_allow_bluetooth_mode()
+ */
+int bt_dpm_set_profile_state(bt_dpm_profile_e profile, bt_dpm_status_e value);
+
+/**
+ * @ingroup CAPI_NETWORK_BLUETOOTH_DPM_MODULE
+ * @brief Reads the Restriction for profiles.
+ * @since_tizen 3.0
+ * @privlevel platform
+ * @privilege %http://tizen.org/privilege/bluetooth.admin
+ *
+ * @param[in]profile - Profile.
+ *             BT_DPM_POLICY_A2DP_PROFILE_STATE,
+ *             BT_DPM_POLICY_AVRCP_PROFILE_STATE,
+ *             BT_DPM_POLICY_BPP_PROFILE_STATE,
+ *             BT_DPM_POLICY_DUN_PROFILE_STATE,
+ *             BT_DPM_POLICY_FTP_PROFILE_STATE,
+ *             BT_DPM_POLICY_HFP_PROFILE_STATE,
+ *             BT_DPM_POLICY_HSP_PROFILE_STATE,
+ *             BT_DPM_POLICY_PBAP_PROFILE_STATE,
+ *             BT_DPM_POLICY_SAP_PROFILE_STATE,
+ *             BT_DPM_POLICY_SPP_PROFILE_STATE,
+ *             BT_DPM_PROFILE_NONE
+ * @param[out] value - State value.
+ *             BT_DPM_ALLOWED          = 0,    < DPM Policy status allowed.
+ *             BT_DPM_RESTRICTED               = 1,    < DPM Policy status restricted.
+ * @retval #BT_ERROR_NONE  Successful
+ * @retval #BT_ERROR_INVALID_PARAMETER invalid paramter
+ * @retval #BT_ERROR_NOT_SUPPORTED     Not suported
+ * @retval #BT_ERROR_NOT_ENABLED  Not enabled
+ * @retval #BT_ERROR_OPERATION_FAILED operation failed
+ *
+ * @pre bt_dpm_set_allow_bluetooth_mode must be allowed.
+ * @see bt_dpm_get_allow_bluetooth_mode()
+ */
+int bt_dpm_get_profile_state(bt_dpm_profile_e profile, bt_dpm_status_e *value);
+
+/**
+ * @ingroup CAPI_NETWORK_BLUETOOTH_DPM_MODULE
+ * @brief Sets the Restriction for desktop connectivity.
+ * @since_tizen 3.0
+ * @privlevel platform
+ * @privilege %http://tizen.org/privilege/bluetooth.admin
+ *
+ * @param[in]  value - State value.
+ *             BT_DPM_ALLOWED          = 0,    < DPM Policy status allowed.
+ *             BT_DPM_RESTRICTED               = 1,    < DPM Policy status restricted.
+ * @retval #BT_ERROR_NONE  Successful
+ * @retval #BT_ERROR_INVALID_PARAMETER invalid paramter
+ * @retval #BT_ERROR_NOT_SUPPORTED     Not suported
+ * @retval #BT_ERROR_NOT_ENABLED  Not enabled
+ * @retval #BT_ERROR_OPERATION_FAILED operation failed
+ *
+ * @pre bt_dpm_set_allow_bluetooth_mode must be allowed.
+ * @see bt_dpm_get_allow_bluetooth_mode()
+ */
+int bt_dpm_set_desktop_connectivity_state(bt_dpm_status_e value);
+
+/**
+ * @ingroup CAPI_NETWORK_BLUETOOTH_DPM_MODULE
+ * @brief Reads the Restriction for desktop connectivity.
+ * @since_tizen 3.0
+ * @privlevel platform
+ * @privilege %http://tizen.org/privilege/bluetooth.admin
+ *
+ * @param[out] value - State value.
+ *             BT_DPM_ALLOWED          = 0,    < DPM Policy status allowed.
+ *             BT_DPM_RESTRICTED               = 1,    < DPM Policy status restricted.
+ * @retval #BT_ERROR_NONE  Successful
+ * @retval #BT_ERROR_INVALID_PARAMETER invalid paramter
+ * @retval #BT_ERROR_NOT_SUPPORTED     Not suported
+ * @retval #BT_ERROR_NOT_ENABLED  Not enabled
+ * @retval #BT_ERROR_OPERATION_FAILED operation failed
+ *
+ * @pre bt_dpm_set_allow_bluetooth_mode must be allowed.
+ * @see bt_dpm_get_allow_bluetooth_mode()
+ */
+int bt_dpm_get_desktop_connectivity_state(bt_dpm_status_e *value);
+
+/**
+ * @ingroup CAPI_NETWORK_BLUETOOTH_DPM_MODULE
+ * @brief Sets the Restriction for discoverable mode.
+ * @since_tizen 3.0
+ * @privlevel platform
+ * @privilege %http://tizen.org/privilege/bluetooth.admin
+ *
+ * @param[in]  value - State value.
+ *             BT_DPM_ALLOWED          = 0,    < DPM Policy status allowed.
+ *             BT_DPM_RESTRICTED               = 1,    < DPM Policy status restricted.
+ * @retval #BT_ERROR_NONE  Successful
+ * @retval #BT_ERROR_INVALID_PARAMETER invalid paramter
+ * @retval #BT_ERROR_NOT_SUPPORTED     Not suported
+ * @retval #BT_ERROR_NOT_ENABLED  Not enabled
+ * @retval #BT_ERROR_OPERATION_FAILED operation failed
+ *
+ * @pre bt_dpm_set_allow_bluetooth_mode must be allowed.
+ * @see bt_dpm_get_allow_bluetooth_mode()
+ */
+int bt_dpm_set_discoverable_state(bt_dpm_status_e value);
+
+/**
+ * @ingroup CAPI_NETWORK_BLUETOOTH_DPM_MODULE
+ * @brief Reads the Restriction for discoverable mode.
+ * @since_tizen 3.0
+ * @privlevel platform
+ * @privilege %http://tizen.org/privilege/bluetooth.admin
+ *
+ * @param[out] value - State value.
+ *             BT_DPM_ALLOWED          = 0,    < DPM Policy status allowed.
+ *             BT_DPM_RESTRICTED               = 1,    < DPM Policy status restricted.
+ * @retval #BT_ERROR_NONE  Successful
+ * @retval #BT_ERROR_INVALID_PARAMETER invalid paramter
+ * @retval #BT_ERROR_NOT_SUPPORTED     Not suported
+ * @retval #BT_ERROR_NOT_ENABLED  Not enabled
+ * @retval #BT_ERROR_OPERATION_FAILED operation failed
+ *
+ * @pre bt_dpm_set_allow_bluetooth_mode must be allowed.
+ * @see bt_dpm_get_allow_bluetooth_mode()
+ */
+int bt_dpm_get_discoverable_state(bt_dpm_status_e *value);
+
+/**
+ * @ingroup CAPI_NETWORK_BLUETOOTH_DPM_MODULE
+ * @brief Sets the Restriction for limited discoverable mode.
+ * @since_tizen 3.0
+ * @privlevel platform
+ * @privilege %http://tizen.org/privilege/bluetooth.admin
+ *
+ * @param[in]  value - State value.
+ *             BT_DPM_ALLOWED          = 0,    < DPM Policy status allowed.
+ *             BT_DPM_RESTRICTED               = 1,    < DPM Policy status restricted.
+ * @retval #BT_ERROR_NONE  Successful
+ * @retval #BT_ERROR_INVALID_PARAMETER invalid paramter
+ * @retval #BT_ERROR_NOT_SUPPORTED     Not suported
+ * @retval #BT_ERROR_NOT_ENABLED  Not enabled
+ * @retval #BT_ERROR_OPERATION_FAILED operation failed
+ *
+ * @pre bt_dpm_set_allow_bluetooth_mode must be allowed.
+ * @see bt_dpm_get_allow_bluetooth_mode()
+ */
+
+int bt_dpm_set_limited_discoverable_state(bt_dpm_status_e value);
+
+/**
+ * @ingroup CAPI_NETWORK_BLUETOOTH_DPM_MODULE
+ * @brief Reads the Restriction for limited discoverable mode.
+ * @since_tizen 3.0
+ * @privlevel platform
+ * @privilege %http://tizen.org/privilege/bluetooth.admin
+ *
+ * @param[out] value - State value.
+ *             BT_DPM_ALLOWED          = 0,    < DPM Policy status allowed.
+ *             BT_DPM_RESTRICTED               = 1,    < DPM Policy status restricted.
+ * @retval #BT_ERROR_NONE  Successful
+ * @retval #BT_ERROR_INVALID_PARAMETER invalid paramter
+ * @retval #BT_ERROR_NOT_SUPPORTED     Not suported
+ * @retval #BT_ERROR_NOT_ENABLED  Not enabled
+ * @retval #BT_ERROR_OPERATION_FAILED operation failed
+ *
+ * @pre bt_dpm_set_allow_bluetooth_mode must be allowed.
+ * @see bt_dpm_get_allow_bluetooth_mode()
+ */
+int bt_dpm_get_limited_discoverable_state(bt_dpm_status_e *value);
+
+/**
+ * @ingroup CAPI_NETWORK_BLUETOOTH_DPM_MODULE
+ * @brief Sets the Restriction for Data transfer.
+ * @since_tizen 3.0
+ * @privlevel platform
+ * @privilege %http://tizen.org/privilege/bluetooth.admin
+ *
+ * @param[in]  value - State value.
+ *             BT_DPM_ALLOWED          = 0,    < DPM Policy status allowed.
+ *             BT_DPM_RESTRICTED               = 1,    < DPM Policy status restricted.
+ * @retval #BT_ERROR_NONE  Successful
+ * @retval #BT_ERROR_INVALID_PARAMETER invalid paramter
+ * @retval #BT_ERROR_NOT_SUPPORTED     Not suported
+ * @retval #BT_ERROR_NOT_ENABLED  Not enabled
+ * @retval #BT_ERROR_OPERATION_FAILED operation failed
+ *
+ * @pre bt_dpm_set_allow_bluetooth_mode must be allowed.
+ * @see bt_dpm_get_allow_bluetooth_mode()
+ */
+int bt_dpm_set_data_transfer_state(bt_dpm_status_e value);
+
+/**
+ * @ingroup CAPI_NETWORK_BLUETOOTH_DPM_MODULE
+ * @brief Reads the Restriction for Data transfer.
+ * @since_tizen 3.0
+ * @privlevel platform
+ * @privilege %http://tizen.org/privilege/bluetooth.admin
+ *
+ * @param[out] value - State value.
+ *             BT_DPM_ALLOWED          = 0,    < DPM Policy status allowed.
+ *             BT_DPM_RESTRICTED               = 1,    < DPM Policy status restricted.
+ * @retval #BT_ERROR_NONE  Successful
+ * @retval #BT_ERROR_INVALID_PARAMETER invalid paramter
+ * @retval #BT_ERROR_NOT_SUPPORTED     Not suported
+ * @retval #BT_ERROR_NOT_ENABLED  Not enabled
+ * @retval #BT_ERROR_OPERATION_FAILED operation failed
+ *
+ * @pre bt_dpm_set_allow_bluetooth_mode must be allowed.
+ * @see bt_dpm_get_allow_bluetooth_mode()
+ */
+int bt_dpm_get_data_transfer_state(bt_dpm_status_e *value);
+
+/**
  * @}
  */
 
index b389f20..f40f0ed 100644 (file)
@@ -576,6 +576,55 @@ typedef enum {
 } bt_gatt_permission_e;
 
 /**
+* @ingroup CAPI_NETWORK_BLUETOOTH_DPM_MODULE
+* @brief DPM BT allowance state
+* @since_tizen 3.0
+*/
+typedef enum {
+       BT_DPM_ERROR      = -1,   /**< bluetooth allowance error */
+       BT_DPM_BT_ALLOWED,        /**< bluetooth allowance allowed */
+       BT_DPM_HANDSFREE_ONLY, /**< bluetooth allowance handsfree only */
+       BT_DPM_BT_RESTRICTED,  /**< bluetooth allowance restricted */
+} bt_dpm_allow_e;
+
+/**
+* @ingroup CAPI_NETWORK_BLUETOOTH_DPM_MODULE
+* @brief DPM Policy status
+* @since_tizen 3.0
+*/
+typedef enum {
+       BT_DPM_STATUS_ERROR = -1,
+
+       BT_DPM_ALLOWED   = 0,    /**< DPM Policy status allowed. */
+       BT_DPM_RESTRICTED                = 1,    /**< DPM Policy status restricted. */
+
+       BT_DPM_ENABLE                    = 1,    /**< DPM Policy status enabled. */
+       BT_DPM_DISABLE  = 0,     /**< DPM Policy status disabled. */
+
+       BT_DPM_FALSE             = 0,    /**< DPM Policy status false. */
+       BT_DPM_TRUE      = 1,    /**< DPM Policy status true. */
+} bt_dpm_status_e;
+
+/**
+* @ingroup CAPI_NETWORK_BLUETOOTH_DPM_MODULE
+* @brief DPM Profile states
+* @since_tizen 3.0
+*/
+typedef enum {
+       BT_DPM_POLICY_A2DP_PROFILE_STATE,
+       BT_DPM_POLICY_AVRCP_PROFILE_STATE,
+       BT_DPM_POLICY_BPP_PROFILE_STATE,
+       BT_DPM_POLICY_DUN_PROFILE_STATE,
+       BT_DPM_POLICY_FTP_PROFILE_STATE,
+       BT_DPM_POLICY_HFP_PROFILE_STATE,
+       BT_DPM_POLICY_HSP_PROFILE_STATE,
+       BT_DPM_POLICY_PBAP_PROFILE_STATE,
+       BT_DPM_POLICY_SAP_PROFILE_STATE,
+       BT_DPM_POLICY_SPP_PROFILE_STATE,
+       BT_DPM_PROFILE_NONE,
+} bt_dpm_profile_e;
+
+/**
  * @ingroup CAPI_NETWORK_BLUETOOTH_ADAPTER_LE_MODULE
  * @brief The handle to control Bluetooth LE scan filter
  * @since_tizen 2.4
@@ -679,6 +728,23 @@ typedef struct {
        unsigned int time_out;   /**< Supervision timeout (msec) */
 } bt_le_conn_update_s;
 
+
+/**
+ * Structure to DPM device list
+ */
+typedef struct {
+       int count;
+       char **devices;
+} bt_dpm_device_list_s;
+
+/**
+ * Structure to DPM uuid list
+ */
+typedef struct {
+       int count;
+       char **uuids;
+} bt_dpm_uuids_list_s;
+
 /**
  * @}
  */
index 063adbe..dbc747f 100644 (file)
@@ -157,10 +157,8 @@ tc_table_t tc_main[] = {
                , BT_UNIT_TEST_TABLE_IPSP},
        {"HDP"
                , BT_UNIT_TEST_TABLE_HDP},
-#ifdef TIZEN_MOBILE
        {"DPM"
                , BT_UNIT_TEST_TABLE_DPM},
-#endif
 #ifdef TIZEN_WEARABLE
        {"HF Role"
                , BT_UNIT_TEST_TABLE_HF},
@@ -828,7 +826,6 @@ tc_table_t tc_HDP[] = {
        {NULL                                   , 0x0000},
 };
 
-#ifdef TIZEN_MOBILE
 tc_table_t tc_DPM[] = {
        /* DPM functions */
        {"BACK"
@@ -911,7 +908,6 @@ tc_table_t tc_DPM[] = {
                , BT_UNIT_TEST_FUNCTION_ACTIVATE_FLAG_TO_SET_PARAMETERS},
        {NULL                                   , 0x0000},
 };
-#endif
 
 #ifdef TIZEN_WEARABLE
 tc_table_t tc_hf[] = {
@@ -1059,11 +1055,9 @@ void tc_usage_print(void)
        case BT_UNIT_TEST_TABLE_HDP:
                tc_table = tc_HDP;
                break;
-#ifdef TIZEN_MOBILE
        case BT_UNIT_TEST_TABLE_DPM:
                tc_table = tc_DPM;
                break;
-#endif
 #ifdef TIZEN_WEARABLE
        case BT_UNIT_TEST_TABLE_HF:
                tc_table = tc_hf;
@@ -3648,7 +3642,6 @@ int test_set_params(int test_id, char *param)
                break;
        }
 
-#ifdef TIZEN_MOBILE
        case BT_UNIT_TEST_TABLE_DPM: {
                switch (test_id) {
                        case BT_UNIT_TEST_FUNCTION_DPM_SET_ALLOW_BLUETOOTH_MODE: {
@@ -3895,7 +3888,6 @@ int test_set_params(int test_id, char *param)
                }
                break;
        }
-#endif
 
        case BT_UNIT_TEST_TABLE_AVRCP: {
                switch (test_id) {
@@ -7528,7 +7520,6 @@ int test_input_callback(void *data)
                }
                        break;
        }
-#ifdef TIZEN_MOBILE
        case BT_UNIT_TEST_TABLE_DPM: {
                switch (test_id) {
                case BT_UNIT_TEST_FUNCTION_DPM_SET_DEFAULT_POLICIES: {
@@ -8039,7 +8030,6 @@ int test_input_callback(void *data)
                }
                break;
        }
-#endif
 #ifdef TIZEN_WEARABLE
        case BT_UNIT_TEST_TABLE_HF: {
                switch (test_id) {
index 75a5efe..123eb3d 100644 (file)
@@ -45,9 +45,7 @@ typedef enum {
        BT_UNIT_TEST_TABLE_HID,
        BT_UNIT_TEST_TABLE_IPSP,
        BT_UNIT_TEST_TABLE_HDP,
-#ifdef TIZEN_MOBILE
        BT_UNIT_TEST_TABLE_DPM,
-#endif
 #ifdef TIZEN_WEARABLE
        BT_UNIT_TEST_TABLE_HF,
        BT_UNIT_TEST_TABLE_PBAP_CLIENT,
@@ -343,7 +341,6 @@ typedef enum {
        BT_UNIT_TEST_FUNCTION_HDP_UNSET_CONNECTION_CB,
        BT_UNIT_TEST_FUNCTION_HDP_SET_DATA_RECEIVED_CB,
        BT_UNIT_TEST_FUNCTION_HDP_UNSET_DATA_RECEIVED_CB,
-#ifdef TIZEN_MOBILE
        BT_UNIT_TEST_FUNCTION_DPM_SET_DEFAULT_POLICIES = 1,
        BT_UNIT_TEST_FUNCTION_DPM_SET_ALLOW_BLUETOOTH_MODE,
        BT_UNIT_TEST_FUNCTION_DPM_GET_ALLOW_BLUETOOTH_MODE,
@@ -381,7 +378,6 @@ typedef enum {
        BT_UNIT_TEST_FUNCTION_DPM_GET_LIMITED_DISCOVERABLE_STATE,
        BT_UNIT_TEST_FUNCTION_DPM_SET_DATA_TRANSFER_STATE,
        BT_UNIT_TEST_FUNCTION_DPM_GET_DATA_TRANSFER_STATE,
-#endif
 #ifdef TIZEN_WEARABLE
        BT_UNIT_TEST_FUNCTION_HF_INITIALIZE = 1,
        BT_UNIT_TEST_FUNCTION_HF_DEINITIALIZE,