Knox Tizen Wearable SDK
Bluetooth policy group

Bluetooth policy group provides policies for bluetooth control. More...

Enumerations

Functions

mdm_data_tmdm_get_bluetooth_bonded_device_list (void)
 API to get a list of the bonded (paired) devices to the local adapter. More...
 
mdm_result_t mdm_set_allow_bluetooth_mode (mdm_bt_allow_t state)
 API to set the Bluetooth capability mode on the device. More...
 
mdm_bt_allow_t mdm_get_allow_bluetooth_mode (void)
 API to check whether the mode of the Bluetooth capability is allowed, restricted, or set as "hands-free only". More...
 
mdm_result_t mdm_set_allow_bluetooth_outgoing_call (mdm_status_t value)
 API to set whether to allow the transfer of outgoing calls to Bluetooth headsets. More...
 
mdm_status_t mdm_get_allow_bluetooth_outgoing_call (void)
 API to check whether outgoing calls are allowed via a Bluetooth headset. More...
 
mdm_result_t mdm_set_bluetooth_profile_state (mdm_status_t state, mdm_bt_profile_t profile)
 API to set the state of a Bluetooth profile. More...
 
mdm_status_t mdm_get_bluetooth_profile_state (mdm_bt_profile_t profile)
 API to check whether a specific Bluetooth profile is allowed. More...
 
mdm_result_t mdm_set_bluetooth_discoverable_state (mdm_status_t value)
 API to set whether to allow Bluetooth discovery. More...
 
mdm_status_t mdm_get_bluetooth_discoverable_state (void)
 API to check whether discoverable mode is allowed. More...
 
mdm_result_t mdm_set_bluetooth_pairing_state (mdm_status_t value)
 API to set whether to allow Bluetooth pairing with other Bluetooth devices. More...
 
mdm_status_t mdm_get_bluetooth_pairing_state (void)
 API to check whether Bluetooth pairing is allowed. More...
 
mdm_result_t mdm_set_bluetooth_data_transfer_state (mdm_status_t value)
 API to set whether to allow data transfer via Bluetooth. More...
 
mdm_status_t mdm_get_bluetooth_data_transfer_state (void)
 API to get whether data transfer via Bluetooth is allowed. More...
 
mdm_result_t mdm_add_bluetooth_uuids_to_whitelist (GList *uuids)
 API to add UUIDs to the Bluetooth UUID whitelist. More...
 
mdm_result_t mdm_remove_bluetooth_uuids_from_whitelist (GList *uuids)
 API to remove UUIDs from the Bluetooth UUID whitelist. More...
 
mdm_result_t mdm_clear_bluetooth_uuids_from_whitelist (void)
 API to clear all UUIDs from Bluetooth UUID whitelist. More...
 
mdm_data_tmdm_get_bluetooth_uuids_from_whitelist (void)
 API to retrieve the list of whitelisted Bluetooth UUIDs for all admins. More...
 
mdm_result_t mdm_add_bluetooth_uuids_to_blacklist (GList *uuids)
 API to add UUIDs to the Bluetooth UUID blacklist. More...
 
mdm_result_t mdm_remove_bluetooth_uuids_from_blacklist (GList *uuids)
 API to remove UUIDs from the Bluetooth UUID blacklist. More...
 
mdm_result_t mdm_clear_bluetooth_uuids_from_blacklist (void)
 API to clear all UUIDs from Bluetooth UUID blacklist. More...
 
mdm_data_tmdm_get_bluetooth_uuids_from_blacklist (void)
 API to retrieve the list of blacklisted Bluetooth UUIDs for all admins. More...
 
mdm_result_t mdm_activate_bluetooth_uuid_restriction (mdm_status_t value)
 API to activate or deactivate Bluetooth UUID restrictions. More...
 
mdm_status_t mdm_is_bluetooth_uuid_restriction_active (void)
 API to check if Bluetooth UUID restrictions are active. More...
 
mdm_result_t mdm_add_bluetooth_devices_to_whitelist (GList *devices)
 API to add devices to the Bluetooth device whitelist. More...
 
mdm_result_t mdm_remove_bluetooth_devices_from_whitelist (GList *devices)
 API to remove devices from the Bluetooth device whitelist. More...
 
mdm_result_t mdm_clear_bluetooth_devices_from_whitelist (void)
 API to clear all devices from the Bluetooth device whitelist. More...
 
mdm_data_tmdm_get_bluetooth_devices_from_whitelist (void)
 API to retrieve the list of whitelisted Bluetooth devices for all admins. More...
 
mdm_result_t mdm_add_bluetooth_devices_to_blacklist (GList *devices)
 API to add devices to the Bluetooth device blacklist. More...
 
mdm_result_t mdm_remove_bluetooth_devices_from_blacklist (GList *devices)
 API to remove devices from the Bluetooth device blacklist. More...
 
mdm_result_t mdm_clear_bluetooth_devices_from_blacklist (void)
 API to remove all devices from Bluetooth device blacklist. More...
 
mdm_data_tmdm_get_bluetooth_devices_from_blacklist (void)
 API to retrieve the list of blacklisted Bluetooth devices for all admins. More...
 
mdm_result_t mdm_activate_bluetooth_device_restriction (mdm_status_t value)
 API to activate or deactivate Bluetooth device restrictions. More...
 
mdm_status_t mdm_is_bluetooth_device_restriction_active (void)
 API to check if Bluetooth device restrictions are active. More...
 
mdm_result_t knox_mdm_get_mobile_wearable_connection_status (knox_mdm_mobile_wearable_status_t *status)
 API to get the connection status between a wearable device and a mobile device. More...
 

Detailed Description

Bluetooth policy group provides policies for bluetooth control.

Bluetooth policy group.

Required Header

#include <mdm.h>

Overview

This group provides APIs to control the various settings related to Bluetooth. The user cannot overwrite any disabled settings provided by this policy.

Enumeration Type Documentation

Enum type for the wearable connection status.

Since (Knox_wearable):
2.2.0
Since (Tizen):
3.0.0.1
Enumerator
KNOX_MDM_MOBILE_WEARABLE_STATUS_WPC 

No connection with phone since setup (Without Phone Connection mode)

KNOX_MDM_MOBILE_WEARABLE_STATUS_STANDALONE 

Standalone state

KNOX_MDM_MOBILE_WEARABLE_STATUS_CONNECTED 

Connected state (Companion mode)

Definition at line 106 of file bluetooth.h.

Enum type for Bluetooth allowance types.

Since (Knox_wearable):
1.0.0
Since (Tizen):
2.3.2.3
See also
mdm_set_allow_bluetooth_mode()
Enumerator
MDM_BT_ERROR 

Bluetooth allowance error

MDM_BT_ALLOWED 

Bluetooth allowance allowed

MDM_BT_HANDSFREE_ONLY 

Bluetooth allowance handsfree only

MDM_BT_RESTRICTED 

Bluetooth allowance restricted

Definition at line 34 of file bluetooth.h.

Enum type for Bluetooth profile changes.

Since (Knox_wearable):
1.0.0
Since (Tizen):
2.3.2.3
Enumerator
MDM_BT_MODE_CHANGED 

Bt policy no changed

MDM_BT_OUTGOING_CALL_CHANGED 

Bt outgoing call policy changed

MDM_BT_A2DP_PROFILE_CHANGED 

Bt Advanced Audio Distribution Profile (A2DP) policy changed

MDM_BT_AVRCP_PROFILE_CHANGED 

Bt Audio/Video Remote Control Profile (AVRCP) policy changed

MDM_BT_BPP_PROFILE_CHANGED 

Bt Basic Printing Profile (BPP) policy changed

MDM_BT_DUN_PROFILE_CHANGED 

Bt Dial-up Networking Profile (DUN) policy changed

MDM_BT_FTP_PROFILE_CHANGED 

Bt File Transfer Profile (FTP) policy changed

MDM_BT_HFP_PROFILE_CHANGED 

Bt HandsFree Profile (HFP) policy changed

MDM_BT_HSP_PROFILE_CHANGED 

Bt Headset Profile (HSP) policy changed

MDM_BT_PBAP_PROFILE_CHANGED 

Bt Phone Book Access Profile (PBAP) policy changed

MDM_BT_SAP_PROFILE_CHANGED 

Bt SIM Access Profile (SAP) policy changed

MDM_BT_SPP_PROFILE_CHANGED 

Bt Serial Port Profile (SPP) policy changed

MDM_BT_DESKTOP_CONNECTIVITY_STATE_CHANGED 

Bt desktop connectivity state policy changed

MDM_BT_DISCOVERABLE_STATE_CHANGED 

Bt discoverable state policy changed

MDM_BT_PARINIG_STATE_CHANGED 

Bt paring state policy changed

MDM_BT_LIMITED_DISCOVERABLE_STATE_CHANGED 

Bt limited discoverable state policy changed

MDM_BT_DATA_TRANSFER_CHANGED 

Bt data transfer policy changed

MDM_BT_DEVICE_RESTRICTION_CHANGED 

Bt device blacklist/whitelist policy changed

MDM_BT_UUID_RESTRICTION_CHANGED 

Bt uuid blacklist/whitelist policy changed

Definition at line 46 of file bluetooth.h.

Enum type for Bluetooth profiles.

Since (Knox_wearable):
1.0.0
Since (Tizen):
2.3.2.3
Enumerator
MDM_BT_PROFILE_NONE 

Profile none

BLUETOOTH_A2DP_PROFILE 

Flag to check whether Bluetooth Advanced Audio Distribution Profile (A2DP) is allowed or not, also used to allow or restrict the profile.

BLUETOOTH_AVRCP_PROFILE 

Flag to check whether Bluetooth Audio/Video Remote Control Profile (AVRCP) is allowed or not, also used to allow or restrict the profile.

BLUETOOTH_BPP_PROFILE 

Flag to check whether Bluetooth Basic Printing Profile (BPP) is allowed or not, also used to allow or restrict the profile.

BLUETOOTH_DUN_PROFILE 

Flag to check whether Bluetooth Dial-up Networking Profile (DUN) is allowed or not, also used to allow or restrict the profile.

BLUETOOTH_FTP_PROFILE 

Flag to check whether Bluetooth File Transfer Profile (FTP) is allowed or not, also used to allow or restrict the profile.

BLUETOOTH_HFP_PROFILE 

Flag to check whether Bluetooth HandsFree Profile (HFP) is allowed or not, also used to allow or restrict the profile.

BLUETOOTH_HSP_PROFILE 

Flag to check whether Bluetooth Headset Profile (HSP) is allowed or not, also used to allow or restrict the profile.

BLUETOOTH_PBAP_PROFILE 

Flag to check whether Bluetooth Phone Book Access Profile (PBAP) is allowed or not, also used to allow or restrict the profile.

BLUETOOTH_SAP_PROFILE 

Flag to check whether Bluetooth SIM Access Profile (SAP) is allowed or not, also used to allow or restrict the profile.

BLUETOOTH_SPP_PROFILE 

Flag to check whether Bluetooth Serial Port Profile (SPP) is allowed or not, also used to allow or restrict the profile.

Definition at line 76 of file bluetooth.h.

Function Documentation

mdm_result_t knox_mdm_get_mobile_wearable_connection_status ( knox_mdm_mobile_wearable_status_t status)

API to get the connection status between a wearable device and a mobile device.

Since (Knox_wearable):
2.2.0
Since (Tizen):
3.0.0.1
Feature:
http://developer.samsung.com/tizen/feature/mdm
Usage:
Use this API to check if a wearable device is connected to a mobile device. The API will return one of the following states:
  • WPC (Without Phone Connection)
  • Standalone
  • Connected (Companion mode)
mdm_bt_wearable_status_t status = KNOX_MDM_MOBILE_WEARABLE_STATUS_WPC;
mdm_result_t ret = knox_mdm_get_wearable_connection_status(&status);
if (ret == MDM_RESULT_SUCCESS){
// Use the value of out_status
} else {
// fail
}
Parameters
[out]statusThe API will return one of the following wearable connection states:
Returns
mdm_result_t : MDM_RESULT_SUCCESS on success, an error code on error
Return values
MDM_RESULT_SUCCESSSuccessful
MDM_RESULT_FAILGeneral failure
MDM_RESULT_NOT_SUPPORTEDNot supported
MDM_RESULT_INVALID_PARAMInvalid parameter
MDM_RESULT_ACCESS_DENIEDThe application does not have the privilege to call this function.
mdm_result_t mdm_activate_bluetooth_device_restriction ( mdm_status_t  value)

API to activate or deactivate Bluetooth device restrictions.

Since (Knox_wearable):
1.0.0
Since (Tizen):
2.3.2.3
Feature:
http://developer.samsung.com/tizen/feature/mdm
Usage:
An admin can call this API to activate or deactivate Bluetooth blacklist and whitelist device restrictions.
Remarks
Bluetooth status mdm_bt_policy_changed_t is written to MDM_POLICY_ON_BT notification file. You can register a callback for this event using mdm_register_policy_receiver.
Privilege Level:
public
Privilege:
http://developer.samsung.com/tizen/privilege/mdm.bluetooth
Parameters
[in]valueWhether to activate or deactivate the restrictions. Set to MDM_TRUE to activate the restrictions, or set to MDM_FALSE to deactivate the restrictions.
Returns
mdm_result_t : MDM_RESULT_SUCCESS on success, an error code on error
Return values
MDM_RESULT_SUCCESSSuccessful
MDM_RESULT_FAILGeneral failure
MDM_RESULT_NOT_SUPPORTEDNot supported
MDM_RESULT_INVALID_PARAMInvalid parameter
MDM_RESULT_ACCESS_DENIEDThe application does not have the privilege to call this function.
Permission:
This API is restricted to registered clients only.
See also
mdm_is_bluetooth_device_restriction_active()
mdm_result_t mdm_activate_bluetooth_uuid_restriction ( mdm_status_t  value)

API to activate or deactivate Bluetooth UUID restrictions.

Since (Knox_wearable):
1.0.0
Since (Tizen):
2.3.2.3
Feature:
http://developer.samsung.com/tizen/feature/mdm
Usage:
Bluetooth UUIDs represent features offered by devices and are used for interoperability between devices during communication. An admin can use this API to activate or deactivate Bluetooth blacklist and whitelist UUID restrictions.
Remarks
Bluetooth status mdm_bt_policy_changed_t is written to MDM_POLICY_ON_BT notification file. You can register a callback for this event using mdm_register_policy_receiver.
Privilege Level:
public
Privilege:
http://developer.samsung.com/tizen/privilege/mdm.bluetooth
Parameters
[in]valueWhether to activate or deactivate the restrictions. Set to MDM_TRUE to activate the restrictions, or set to MDM_FALSE to deactivate the restrictions.
Returns
mdm_result_t : MDM_RESULT_SUCCESS on success, an error code on error
Return values
MDM_RESULT_SUCCESSSuccessful
MDM_RESULT_FAILGeneral failure
MDM_RESULT_NOT_SUPPORTEDNot supported
MDM_RESULT_INVALID_PARAMInvalid parameter
MDM_RESULT_ACCESS_DENIEDThe application does not have the privilege to call this function.
Permission:
This API is restricted to registered clients only.
See also
mdm_is_bluetooth_uuid_restriction_active()
mdm_result_t mdm_add_bluetooth_devices_to_blacklist ( GList *  devices)

API to add devices to the Bluetooth device blacklist.

Since (Knox_wearable):
1.0.0
Since (Tizen):
2.3.2.3
Feature:
http://developer.samsung.com/tizen/feature/mdm
Usage:
An admin can use this API to blacklist connections based on the Bluetooth device. Connections with matching device are prevented. The device is identified by the MAC address. You can use the "*" wildcard as the value of devices to blacklist all devices, other than those in the whitelist. The blacklist takes effect only after being activated using mdm_activate_bluetooth_device_restriction().
Remarks
Bluetooth status mdm_bt_policy_changed_t is written to MDM_POLICY_ON_BT notification file. You can register a callback for this event using mdm_register_policy_receiver.
GList *devices = NULL;
devices = g_list_append(devices, "device1");
devices = g_list_append(devices, "device2");
if (ret == MDM_RESULT_SUCCESS){
// success
} else {
// fail
}
g_list_free(devices);
Privilege Level:
public
Privilege:
http://developer.samsung.com/tizen/privilege/mdm.bluetooth
Parameters
[in]devicesThe Bluetooth devices to add to the blacklist.
Returns
mdm_result_t : MDM_RESULT_SUCCESS on success, an error code on error
Return values
MDM_RESULT_SUCCESSSuccessful
MDM_RESULT_FAILGeneral failure
MDM_RESULT_NOT_SUPPORTEDNot supported
MDM_RESULT_INVALID_PARAMInvalid parameter
MDM_RESULT_ACCESS_DENIEDThe application does not have the privilege to call this function.
Permission:
This API is restricted to registered clients only.
See also
mdm_remove_bluetooth_devices_from_blacklist(), mdm_clear_bluetooth_devices_from_blacklist(), mdm_get_bluetooth_devices_from_blacklist()
mdm_result_t mdm_add_bluetooth_devices_to_whitelist ( GList *  devices)

API to add devices to the Bluetooth device whitelist.

Since (Knox_wearable):
1.0.0
Since (Tizen):
2.3.2.3
Feature:
http://developer.samsung.com/tizen/feature/mdm
Usage:
An admin can use this API to add connections to a whitelist based on the Bluetooth device name. A connection with a matching device is an exception from the blacklist. You can use the "*" wildcard as the value of devices to add all devices to the whitelist. If a device is present in both the whitelist and blacklist, and was added by the same admin, then the whitelist takes precedence. The whitelist takes effect only after being activated using mdm_activate_bluetooth_device_restriction().
Remarks
Bluetooth status mdm_bt_policy_changed_t is written to MDM_POLICY_ON_BT notification file. You can register a callback for this event using mdm_register_policy_receiver.
GList *devices = NULL;
devices = g_list_append(devices, "device1");
devices = g_list_append(devices, "device2");
if (ret == MDM_RESULT_SUCCESS){
// success
} else {
// fail
}
g_list_free(devices);
Privilege Level:
public
Privilege:
http://developer.samsung.com/tizen/privilege/mdm.bluetooth
Parameters
[in]devicesThe Bluetooth devices to add to the whitelist.
Returns
mdm_result_t : MDM_RESULT_SUCCESS on success, an error code on error
Return values
MDM_RESULT_SUCCESSSuccessful
MDM_RESULT_FAILGeneral failure
MDM_RESULT_NOT_SUPPORTEDNot supported
MDM_RESULT_INVALID_PARAMInvalid parameter
MDM_RESULT_ACCESS_DENIEDThe application does not have the privilege to call this function.
Permission:
This API is restricted to registered clients only.
See also
mdm_remove_bluetooth_devices_from_whitelist(), mdm_clear_bluetooth_devices_from_whitelist(), mdm_get_bluetooth_devices_from_whitelist()
mdm_result_t mdm_add_bluetooth_uuids_to_blacklist ( GList *  uuids)

API to add UUIDs to the Bluetooth UUID blacklist.

Since (Knox_wearable):
1.0.0
Since (Tizen):
2.3.2.3
Feature:
http://developer.samsung.com/tizen/feature/mdm
Usage:
Bluetooth UUIDs represent features offered by devices. For interoperability, two communicating devices must implement a common profile. An admin can use this API to blacklist connections based on Bluetooth UUIDs. Connections with a UUID in the blacklist are blocked. You can use the "*" wildcard as the value of uuids to blacklist all UUIDs, other than those in the whitelist. The blacklist is in effect only after being activated using mdm_activate_bluetooth_uuid_restriction().
Remarks
Bluetooth status mdm_bt_policy_changed_t is written to MDM_POLICY_ON_BT notification file. You can register a callback for this event using mdm_register_policy_receiver.
GList *UUIDs = NULL;
UUIDs = g_list_append(UUIDs, "UUID1");
UUIDs = g_list_append(UUIDs, "UUID2");
if (ret == MDM_RESULT_SUCCESS){
// success
} else {
// fail
}
g_list_free(UUIDs);
Privilege Level:
public
Privilege:
http://developer.samsung.com/tizen/privilege/mdm.bluetooth
Parameters
[in]uuidsBluetooth UUIDs to be added to blacklist
Returns
mdm_result_t : MDM_RESULT_SUCCESS on success, an error code on error
Return values
MDM_RESULT_SUCCESSSuccessful
MDM_RESULT_FAILGeneral failure
MDM_RESULT_NOT_SUPPORTEDNot supported
MDM_RESULT_INVALID_PARAMInvalid parameter
MDM_RESULT_ACCESS_DENIEDThe application does not have the privilege to call this function.
Permission:
This API is restricted to registered clients only.
See also
mdm_remove_bluetooth_uuids_from_blacklist(), mdm_clear_bluetooth_uuids_from_blacklist(), mdm_get_bluetooth_uuids_from_blacklist()
mdm_result_t mdm_add_bluetooth_uuids_to_whitelist ( GList *  uuids)

API to add UUIDs to the Bluetooth UUID whitelist.

Since (Knox_wearable):
1.0.0
Since (Tizen):
2.3.2.3
Feature:
http://developer.samsung.com/tizen/feature/mdm
Usage:
Bluetooth UUIDs represent features offered by devices and are used for interoperability between devices during communication. Use this API to add UUIDs to the Bluetooth UUID whitelist. Connections whose UUID is in the whitelist are exceptions from the blacklist. You can use the "*" wildcard as the value of uuids to add all UUIDs to the whitelist. If one admin adds a UUID to both the whitelist and blacklist, the whitelist takes precedence. The whitelist takes effect only after being activated using mdm_activate_bluetooth_uuid_restriction().
Remarks
Bluetooth status mdm_bt_policy_changed_t is written to MDM_POLICY_ON_BT notification file. You can register a callback for this event using mdm_register_policy_receiver.
GList *UUIDs = NULL;
UUIDs = g_list_append(UUIDs, "UUID1");
UUIDs = g_list_append(UUIDs, "UUID2");
if (ret == MDM_RESULT_SUCCESS){
// success
} else {
// fail
}
g_list_free(UUIDs);
Privilege Level:
public
Privilege:
http://developer.samsung.com/tizen/privilege/mdm.bluetooth
Parameters
[in]uuidsThe Bluetooth UUIDs to add to the whitelist.
Returns
mdm_result_t : MDM_RESULT_SUCCESS on success, an error code on error
Return values
MDM_RESULT_SUCCESSSuccessful
MDM_RESULT_FAILGeneral failure
MDM_RESULT_NOT_SUPPORTEDNot supported
MDM_RESULT_INVALID_PARAMInvalid parameter
MDM_RESULT_ACCESS_DENIEDThe application does not have the privilege to call this function.
Permission:
This API is restricted to registered clients only.
See also
mdm_remove_bluetooth_uuids_from_whitelist(), mdm_clear_bluetooth_uuids_from_whitelist(), mdm_get_bluetooth_uuids_from_whitelist()
mdm_result_t mdm_clear_bluetooth_devices_from_blacklist ( void  )

API to remove all devices from Bluetooth device blacklist.

Since (Knox_wearable):
1.0.0
Since (Tizen):
2.3.2.3
Feature:
http://developer.samsung.com/tizen/feature/mdm
Usage:
An admin can use this API to remove all Bluetooth devices from the blacklist. The blacklist takes effect only after being activated using mdm_activate_bluetooth_device_restriction().
Remarks
Bluetooth status mdm_bt_policy_changed_t is written to MDM_POLICY_ON_BT notification file. You can register a callback for this event using mdm_register_policy_receiver.
if (ret == MDM_RESULT_SUCCESS){
// success
} else {
// fail
}
Privilege Level:
public
Privilege:
http://developer.samsung.com/tizen/privilege/mdm.bluetooth
Returns
mdm_result_t : MDM_RESULT_SUCCESS on success, an error code on error
Return values
MDM_RESULT_SUCCESSSuccessful
MDM_RESULT_FAILGeneral failure
MDM_RESULT_NOT_SUPPORTEDNot supported
MDM_RESULT_INVALID_PARAMInvalid parameter
MDM_RESULT_ACCESS_DENIEDThe application does not have the privilege to call this function.
Permission:
This API is restricted to registered clients only.
See also
mdm_add_bluetooth_devices_to_blacklist(), mdm_remove_bluetooth_devices_from_blacklist(), mdm_get_bluetooth_devices_from_blacklist()
mdm_result_t mdm_clear_bluetooth_devices_from_whitelist ( void  )

API to clear all devices from the Bluetooth device whitelist.

Since (Knox_wearable):
1.0.0
Since (Tizen):
2.3.2.3
Feature:
http://developer.samsung.com/tizen/feature/mdm
Usage:
An admin can use this API to remove all Bluetooth devices from the whitelist. The whitelist takes effect only after being activated using mdm_activate_bluetooth_device_restriction().
Remarks
Bluetooth status mdm_bt_policy_changed_t is written to MDM_POLICY_ON_BT notification file. You can register a callback for this event using mdm_register_policy_receiver.
if (ret == MDM_RESULT_SUCCESS){
// success
} else {
// fail
}
Privilege Level:
public
Privilege:
http://developer.samsung.com/tizen/privilege/mdm.bluetooth
Returns
mdm_result_t : MDM_RESULT_SUCCESS on success, an error code on error
Return values
MDM_RESULT_SUCCESSSuccessful
MDM_RESULT_FAILGeneral failure
MDM_RESULT_NOT_SUPPORTEDNot supported
MDM_RESULT_INVALID_PARAMInvalid parameter
MDM_RESULT_ACCESS_DENIEDThe application does not have the privilege to call this function.
Permission:
This API is restricted to registered clients only.
See also
mdm_add_bluetooth_devices_to_whitelist(), mdm_remove_bluetooth_devices_from_whitelist(), mdm_get_bluetooth_devices_from_whitelist()
mdm_result_t mdm_clear_bluetooth_uuids_from_blacklist ( void  )

API to clear all UUIDs from Bluetooth UUID blacklist.

Since (Knox_wearable):
1.0.0
Since (Tizen):
2.3.2.3
Feature:
http://developer.samsung.com/tizen/feature/mdm
Usage:
Bluetooth UUIDs represent features offered by devices and are used for interoperability between devices during communication. This API removes all Bluetooth UUIDs from the blacklist for calling admins. The blacklist is in effect only after being activated using mdm_activate_bluetooth_uuid_restriction().
Remarks
Bluetooth status mdm_bt_policy_changed_t is written to MDM_POLICY_ON_BT notification file. You can register a callback for this event using mdm_register_policy_receiver.
if (ret == MDM_RESULT_SUCCESS){
// success
} else {
// fail
}
Privilege Level:
public
Privilege:
http://developer.samsung.com/tizen/privilege/mdm.bluetooth
Returns
mdm_result_t : MDM_RESULT_SUCCESS on success, an error code on error
Return values
MDM_RESULT_SUCCESSSuccessful
MDM_RESULT_FAILGeneral failure
MDM_RESULT_NOT_SUPPORTEDNot supported
MDM_RESULT_INVALID_PARAMInvalid parameter
MDM_RESULT_ACCESS_DENIEDThe application does not have the privilege to call this function.
Permission:
This API is restricted to registered clients only.
See also
mdm_add_bluetooth_uuids_to_blacklist(), mdm_remove_bluetooth_uuids_from_blacklist(), mdm_get_bluetooth_uuids_from_blacklist()
mdm_result_t mdm_clear_bluetooth_uuids_from_whitelist ( void  )

API to clear all UUIDs from Bluetooth UUID whitelist.

Since (Knox_wearable):
1.0.0
Since (Tizen):
2.3.2.3
Feature:
http://developer.samsung.com/tizen/feature/mdm
Usage:
Bluetooth UUIDs represent features offered by devices and are used for interoperability between devices during communication. An admin can use this API to remove all Bluetooth UUIDs from the whitelist. All exceptions due to the whitelist are removed for the same admin. The whitelist takes effect only after being activated using mdm_activate_bluetooth_uuid_restriction().
Remarks
Bluetooth status mdm_bt_policy_changed_t is written to MDM_POLICY_ON_BT notification file. You can register a callback for this event using mdm_register_policy_receiver.
if (ret == MDM_RESULT_SUCCESS){
// success
} else {
// fail
}
Privilege Level:
public
Privilege:
http://developer.samsung.com/tizen/privilege/mdm.bluetooth
Returns
mdm_result_t : MDM_RESULT_SUCCESS on success, an error code on error
Return values
MDM_RESULT_SUCCESSSuccessful
MDM_RESULT_FAILGeneral failure
MDM_RESULT_NOT_SUPPORTEDNot supported
MDM_RESULT_INVALID_PARAMInvalid parameter
MDM_RESULT_ACCESS_DENIEDThe application does not have the privilege to call this function.
Permission:
This API is restricted to registered clients only.
See also
mdm_add_bluetooth_uuids_to_whitelist(), mdm_remove_bluetooth_uuids_from_whitelist(), mdm_get_bluetooth_uuids_from_whitelist()
mdm_bt_allow_t mdm_get_allow_bluetooth_mode ( void  )

API to check whether the mode of the Bluetooth capability is allowed, restricted, or set as "hands-free only".

Since (Knox_wearable):
1.0.0
Since (Tizen):
2.3.2.3
Feature:
http://developer.samsung.com/tizen/feature/mdm
Usage:
Use this API to check if Bluetooth capability is allowed, restricted, or set as "hands-free only".
if (ret == MDM_BT_ALLOWED) {
// Allowed
} else if (ret == MDM_BT_HANDSFREE_ONLY) {
// handsfree only
} else if (ret == MDM_BT_RESTRICTED) {
// Restricted
} else (ret == MDM_BT_ERROR){
// Error
}
Returns
mdm_bt_allow_t : The current Bluetooth capability mode, or MDM_BT_ERROR on error.
Return values
MDM_BT_ALLOWEDBluetooth capability is allowed.
MDM_BT_RESTRICTEDBluetooth capability is restricted.
MDM_BT_HANDSFREE_ONLYBluetooth capability is hands-free only.
MDM_BT_ERROREncountered a Bluetooth allowance error.
See also
mdm_set_allow_bluetooth_mode()
mdm_status_t mdm_get_allow_bluetooth_outgoing_call ( void  )

API to check whether outgoing calls are allowed via a Bluetooth headset.

Since (Knox_wearable):
1.0.0
Since (Tizen):
2.3.2.3
Feature:
http://developer.samsung.com/tizen/feature/mdm
Usage:
An admin can use this API to check whether outgoing calls are enabled via a Bluetooth headset. By default, this API returns allowed.
if (ret == MDM_ALLOWED) {
// allowed
} else if (ret == MDM_RESTRICTED) {
// restricted
} else (ret == MDM_STATUS_ERROR){
// error
}
Returns
mdm_status_t : Whether outgoing calls are allowed on Bluetooth.
Return values
MDM_ALLOWEDAllowed
MDM_RESTRICTEDEestricted
See also
mdm_set_allow_bluetooth_outgoing_call()
mdm_data_t* mdm_get_bluetooth_bonded_device_list ( void  )

API to get a list of the bonded (paired) devices to the local adapter.

Since (Knox_wearable):
1.0.0
Since (Tizen):
2.3.2.3
Feature:
http://developer.samsung.com/tizen/feature/mdm
Usage:
An admin can get a list of the bonded Bluetooth devices.
if(lp_data) {
GList *lp_list = (GList *)lp_data->data;
if(lp_list != NULL) {
while(lp_list){
if(lp_list->data) {
char *device_name = (char *)lp_list->data;
printf("bt device name [%s]", bt_info->device_name);
}
lp_list = g_list_next(lp_list);
}
mdm_free_data(lp_data);
}
} else {
//mdm_get_bluetooth_bonded_device_list fail
}
Returns
A list with the names of the bonded devices, if successful. NULL, if the operation failed.
See also
mdm_set_bluetooth_pairing_state()
mdm_get_bluetooth_pairing_state()
mdm_status_t mdm_get_bluetooth_data_transfer_state ( void  )

API to get whether data transfer via Bluetooth is allowed.

Since (Knox_wearable):
1.0.0
Since (Tizen):
2.3.2.3
Feature:
http://developer.samsung.com/tizen/feature/mdm
Usage:
An admin can check whether Bluetooth data transfer via Bluetooth is allowed.
if (ret == MDM_ALLOWED) {
// allowed
} else if (ret == MDM_RESTRICTED) {
// restricted
} else (ret == MDM_STATUS_ERROR){
// error
}
Returns
mdm_status_t : Whether Bluetooth limited discoverable mode is allowed.
Return values
MDM_ALLOWEDAllowed
MDM_RESTRICTEDRestricted
See also
mdm_set_bluetooth_data_transfer_state()
mdm_data_t* mdm_get_bluetooth_devices_from_blacklist ( void  )

API to retrieve the list of blacklisted Bluetooth devices for all admins.

Since (Knox_wearable):
1.0.0
Since (Tizen):
2.3.2.3
Feature:
http://developer.samsung.com/tizen/feature/mdm
Usage:
An admin can use this API to get the list of blacklisted devices. Connections with matching devices are prevented.
if (lp_data){
// success
GList *blacklist = (GList *)lp_data->data;
// Using blacklist for preventing connection.
// Free after use
mdm_free_data(lp_data);
} else {
// fail
}
Returns
The blacklisted devices for all admins. Returns NULL on failure.
See also
mdm_add_bluetooth_devices_to_blacklist(), mdm_remove_bluetooth_devices_from_blacklist(), mdm_clear_bluetooth_devices_from_blacklist()
mdm_data_t* mdm_get_bluetooth_devices_from_whitelist ( void  )

API to retrieve the list of whitelisted Bluetooth devices for all admins.

Since (Knox_wearable):
1.0.0
Since (Tizen):
2.3.2.3
Feature:
http://developer.samsung.com/tizen/feature/mdm
Usage:
An admin can use this API to get the list of whitelisted devices for all admins.
if (lp_data){
// success
GList *whitelist = (GList *)lp_data->data;
// Using whitelist for preventing connection.
// Free after use
mdm_free_data(lp_data);
} else {
// fail
}
Returns
The whitelisted devices for all admins, if successful. Otherwise, returns NULL.
See also
mdm_add_bluetooth_devices_to_whitelist(), mdm_remove_bluetooth_devices_from_whitelist(), mdm_clear_bluetooth_devices_from_whitelist()
mdm_status_t mdm_get_bluetooth_discoverable_state ( void  )

API to check whether discoverable mode is allowed.

Since (Knox_wearable):
1.0.0
Since (Tizen):
2.3.2.3
Feature:
http://developer.samsung.com/tizen/feature/mdm
Usage:
An admin can use this API to check whether discoverable mode is allowed. By default, this API returns allowed.
if (ret == MDM_ALLOWED) {
// allowed
} else if (ret == MDM_RESTRICTED) {
// restricted
} else (ret == MDM_STATUS_ERROR){
// error
}
Returns
mdm_status_t : Whether Bluetooth discoverable mode is allowed.
Return values
MDM_ALLOWEDThe mode is allowed
MDM_RESTRICTEDOtherwise
See also
mdm_set_bluetooth_discoverable_state()
mdm_status_t mdm_get_bluetooth_pairing_state ( void  )

API to check whether Bluetooth pairing is allowed.

Since (Knox_wearable):
1.0.0
Since (Tizen):
2.3.2.3
Feature:
http://developer.samsung.com/tizen/feature/mdm
Usage:
An admin can use this API to check whether Bluetooth pairing is allowed. By default, this API returns allowed.
if (ret == MDM_ALLOWED) {
// allowed
} else if (ret == MDM_RESTRICTED) {
// restricted
} else (ret == MDM_STATUS_ERROR){
// error
}
Returns
mdm_status_t : Whether Bluetooth pairing is allowed.
Return values
MDM_ALLOWEDAllowed
MDM_RESTRICTEDRestricted
See also
mdm_set_bluetooth_pairing_state()
mdm_status_t mdm_get_bluetooth_profile_state ( mdm_bt_profile_t  profile)

API to check whether a specific Bluetooth profile is allowed.

Since (Knox_wearable):
1.0.0
Since (Tizen):
2.3.2.3
Feature:
http://developer.samsung.com/tizen/feature/mdm
Usage:
An admin can use this API to check whether a specific Bluetooth profile is enabled. By default, this API returns allowed.
if (ret == MDM_ALLOWED) {
// allowed
} else if (ret == MDM_RESTRICTED) {
// restricted
} else (ret == MDM_STATUS_ERROR){
// error
}
Parameters
[in]profileThe Bluetooth profile to check the state of.
Returns
mdm_status_t : Whether the Bluetooth profile is enabled.
Return values
MDM_ALLOWEDThe profile is enabled.
MDM_RESTRICTEDThe profile is restricted.
See also
mdm_set_bluetooth_profile_state()
mdm_data_t* mdm_get_bluetooth_uuids_from_blacklist ( void  )

API to retrieve the list of blacklisted Bluetooth UUIDs for all admins.

Since (Knox_wearable):
1.0.0
Since (Tizen):
2.3.2.3
Feature:
http://developer.samsung.com/tizen/feature/mdm
Usage:
Bluetooth UUIDs represent features offered by devices and are used for interoperability between devices during communication. An admin can use this API to get the list of UUIDs that are blacklisted by all admins.
if (lp_data){
// success
GList *blacklist = (GList *)lp_data->data;
// Using whitelist for preventing connection.
// Free after use
mdm_free_data(lp_data);
} else {
// fail
}
Returns
The blacklisted UUIDs for all admins, if successful. Otherwise, returns NULL.
See also
mdm_add_bluetooth_uuids_to_blacklist(), mdm_remove_bluetooth_uuids_from_blacklist(), mdm_clear_bluetooth_uuids_from_blacklist()
mdm_data_t* mdm_get_bluetooth_uuids_from_whitelist ( void  )

API to retrieve the list of whitelisted Bluetooth UUIDs for all admins.

Since (Knox_wearable):
1.0.0
Since (Tizen):
2.3.2.3
Feature:
http://developer.samsung.com/tizen/feature/mdm
Usage:
Bluetooth UUIDs represent features offered by devices and are used for interoperability between devices during communication. An admin can use this API to get the list of whitelisted UUIDs. Connections with devices whose UUID is in the whitelist are allowed.
if (lp_data){
// success
GList *whitelist = (GList *)lp_data->data;
// Using whitelist for preventing connection.
// Free after use
mdm_free_data(lp_data);
} else {
// fail
}
Returns
The whitelisted UUIDs for all admins, if successful. Otherwise, returns NULL.
See also
mdm_add_bluetooth_uuids_to_whitelist(), mdm_remove_bluetooth_uuids_from_whitelist(), mdm_clear_bluetooth_uuids_from_whitelist()
mdm_status_t mdm_is_bluetooth_device_restriction_active ( void  )

API to check if Bluetooth device restrictions are active.

Since (Knox_wearable):
1.0.0
Since (Tizen):
2.3.2.3
Feature:
http://developer.samsung.com/tizen/feature/mdm
Usage:
An admin can use this API to check whether Bluetooth device restriction is active.
if (ret == MDM_TRUE){
// active
} else {
// deactive
}
Returns
mdm_status_t : Whether Bluetooth device restricions are active.
Return values
MDM_TRUEDevice restriction is activate
MDM_FALSEOtherwise
See also
mdm_activate_bluetooth_device_restriction()
mdm_status_t mdm_is_bluetooth_uuid_restriction_active ( void  )

API to check if Bluetooth UUID restrictions are active.

Since (Knox_wearable):
1.0.0
Since (Tizen):
2.3.2.3
Feature:
http://developer.samsung.com/tizen/feature/mdm
Usage:
Bluetooth UUIDs represent features offered by devices and are used for interoperability between devices during communication. An admin can check whether Bluetooth UUID restrictions are active.
if (ret == MDM_TRUE){
// active
} else {
// deactive
}
Returns
mdm_status_t : Whether the restrictions are active.
Return values
MDM_TRUEThe restrictions are active.
MDM_FALSEThe restrictions are inactive.
See also
mdm_activate_bluetooth_uuid_restriction()
mdm_result_t mdm_remove_bluetooth_devices_from_blacklist ( GList *  devices)

API to remove devices from the Bluetooth device blacklist.

Since (Knox_wearable):
1.0.0
Since (Tizen):
2.3.2.3
Feature:
http://developer.samsung.com/tizen/feature/mdm
Usage:
An admin can use this API to remove Bluetooth devices from the blacklist. The blacklist takes effect only after being activated using mdm_activate_bluetooth_device_restriction().
Remarks
Bluetooth status mdm_bt_policy_changed_t is written to MDM_POLICY_ON_BT notification file. You can register a callback for this event using mdm_register_policy_receiver.
GList *devices = NULL;
devices = g_list_append(devices, "device1");
devices = g_list_append(devices, "device2");
if (ret == MDM_RESULT_SUCCESS){
// success
} else {
// fail
}
g_list_free(devices);
Privilege Level:
public
Privilege:
http://developer.samsung.com/tizen/privilege/mdm.bluetooth
Parameters
[in]devicesThe Bluetooth devices to remove from the blacklist.
Returns
mdm_result_t : MDM_RESULT_SUCCESS on success, an error code on error
Return values
MDM_RESULT_SUCCESSSuccessful
MDM_RESULT_FAILGeneral failure
MDM_RESULT_NOT_SUPPORTEDNot supported
MDM_RESULT_INVALID_PARAMInvalid parameter
MDM_RESULT_ACCESS_DENIEDThe application does not have the privilege to call this function.
Permission:
This API is restricted to registered clients only.
See also
mdm_add_bluetooth_devices_to_blacklist(), mdm_clear_bluetooth_devices_from_blacklist(), mdm_get_bluetooth_devices_from_blacklist()
mdm_result_t mdm_remove_bluetooth_devices_from_whitelist ( GList *  devices)

API to remove devices from the Bluetooth device whitelist.

Since (Knox_wearable):
1.0.0
Since (Tizen):
2.3.2.3
Feature:
http://developer.samsung.com/tizen/feature/mdm
Usage:
An admin can use this API to remove a Bluetooth device from the whitelist. The whitelist takes effect only after being activated using mdm_activate_bluetooth_device_restriction().
Remarks
Bluetooth status mdm_bt_policy_changed_t is written to MDM_POLICY_ON_BT notification file. You can register a callback for this event using mdm_register_policy_receiver.
GList *devices = NULL;
devices = g_list_append(devices, "device1");
devices = g_list_append(devices, "device2");
if (ret == MDM_RESULT_SUCCESS){
// success
} else {
// fail
}
g_list_free(devices);
Privilege Level:
public
Privilege:
http://developer.samsung.com/tizen/privilege/mdm.bluetooth
Parameters
[in]devicesThe Bluetooth devices to remove from the whitelist.
Returns
mdm_result_t : MDM_RESULT_SUCCESS on success, an error code on error
Return values
MDM_RESULT_SUCCESSSuccessful
MDM_RESULT_FAILGeneral failure
MDM_RESULT_NOT_SUPPORTEDNot supported
MDM_RESULT_INVALID_PARAMInvalid parameter
MDM_RESULT_ACCESS_DENIEDThe application does not have the privilege to call this function.
Permission:
This API is restricted to registered clients only.
See also
mdm_add_bluetooth_devices_to_whitelist(), mdm_clear_bluetooth_devices_from_whitelist(), mdm_get_bluetooth_devices_from_whitelist()
mdm_result_t mdm_remove_bluetooth_uuids_from_blacklist ( GList *  uuids)

API to remove UUIDs from the Bluetooth UUID blacklist.

Since (Knox_wearable):
1.0.0
Since (Tizen):
2.3.2.3
Feature:
http://developer.samsung.com/tizen/feature/mdm
Usage:
Bluetooth UUIDs represent features offered by devices and are used for interoperability between devices during communication. An admin can use this API to remove Bluetooth UUIDs from the blacklist after they were added by mdm_add_bluetooth_uuids_to_blacklist(). Connections with matching UUID are allowed after this API call. The blacklist is in effect only after being activated using mdm_activate_bluetooth_uuid_restriction().
Remarks
Bluetooth status mdm_bt_policy_changed_t is written to MDM_POLICY_ON_BT notification file. You can register a callback for this event using mdm_register_policy_receiver.
GList *UUIDs = NULL;
UUIDs = g_list_append(UUIDs, "UUID1");
UUIDs = g_list_append(UUIDs, "UUID2");
if (ret == MDM_RESULT_SUCCESS){
// success
} else {
// fail
}
g_list_free(UUIDs);
Privilege Level:
public
Privilege:
http://developer.samsung.com/tizen/privilege/mdm.bluetooth
Parameters
[in]uuidsBluetooth UUIDs to remove from the blacklist.
Returns
mdm_result_t : MDM_RESULT_SUCCESS on success, an error code on error
Return values
MDM_RESULT_SUCCESSSuccessful
MDM_RESULT_FAILGeneral failure
MDM_RESULT_NOT_SUPPORTEDNot supported
MDM_RESULT_INVALID_PARAMInvalid parameter
MDM_RESULT_ACCESS_DENIEDThe application does not have the privilege to call this function.
Permission:
This API is restricted to registered clients only.
See also
mdm_add_bluetooth_uuids_to_blacklist(), mdm_clear_bluetooth_uuids_from_blacklist(), mdm_get_bluetooth_uuids_from_blacklist()
mdm_result_t mdm_remove_bluetooth_uuids_from_whitelist ( GList *  uuids)

API to remove UUIDs from the Bluetooth UUID whitelist.

Since (Knox_wearable):
1.0.0
Since (Tizen):
2.3.2.3
Feature:
http://developer.samsung.com/tizen/feature/mdm
Usage:
Bluetooth UUIDs represent features offered by devices and are used for interoperability between devices during communication. An admin can use this API to remove Bluetooth UUIDs from the whitelist. Connections with UUIDs that belong to the whitelist are allowed. If one admin adds a UUID to both the whitelist and blacklist, the whitelist takes precedence. The whitelist takes effect only after being activated using mdm_activate_bluetooth_uuid_restriction().
Remarks
Bluetooth status mdm_bt_policy_changed_t is written to MDM_POLICY_ON_BT notification file. You can register a callback for this event using mdm_register_policy_receiver.
GList *UUIDs = NULL;
UUIDs = g_list_append(UUIDs, "UUID1");
UUIDs = g_list_append(UUIDs, "UUID2");
if (ret == MDM_RESULT_SUCCESS){
// success
} else {
// fail
}
g_list_free(UUIDs);
Privilege Level:
public
Privilege:
http://developer.samsung.com/tizen/privilege/mdm.bluetooth
Parameters
[in]uuidsThe Bluetooth UUIDs to remove from the whitelist.
Returns
mdm_result_t : MDM_RESULT_SUCCESS on success, an error code on error
Return values
MDM_RESULT_SUCCESSSuccessful
MDM_RESULT_FAILGeneral failure
MDM_RESULT_NOT_SUPPORTEDNot supported
MDM_RESULT_INVALID_PARAMInvalid parameter
MDM_RESULT_ACCESS_DENIEDThe application does not have the privilege to call this function.
Permission:
This API is restricted to registered clients only.
See also
mdm_add_bluetooth_uuids_to_whitelist(), mdm_clear_bluetooth_uuids_from_whitelist(), mdm_get_bluetooth_uuids_from_whitelist()
mdm_result_t mdm_set_allow_bluetooth_mode ( mdm_bt_allow_t  state)

API to set the Bluetooth capability mode on the device.

Since (Knox_wearable):
1.0.0
Since (Tizen):
2.3.2.3
Feature:
http://developer.samsung.com/tizen/feature/mdm
Usage:
Use this API to restrict the use of the Bluetooth capability on a device on behalf of an end user without any user interaction.
• MDM_BT_RESTRICTED — Bluetooth capability mode is restricted. This blocks end users and/or third party applications from performing Bluetooth operations.
• MDM_BT_HANDSFREE_ONLY — Bluetooth capability mode is set to hands-free mode only. The device can only act as an audio input or output for the remote device.
• MDM_BT_ALLOWED — Bluetooth capability mode is allowed. Note that Bluetooth will be turned off by default if changing Bluetooth capability mode from restricted to allowed. When Bluetooth is off, it must be activated from the device settings or quick panel menu.
Remarks
Bluetooth status mdm_bt_policy_changed_t is written to MDM_POLICY_ON_BT notification file. You can register a callback for this event using mdm_register_policy_receiver.
if (ret == MDM_RESULT_SUCCESS){
// success
} else {
// fail
}
Privilege Level:
public
Privilege:
http://developer.samsung.com/tizen/privilege/mdm.bluetooth
Parameters
[in]stateThe Bluetooth capability to set. Set to MDM_BT_ALLOWED to allow the usage of the Bluetooth capability on the device. Set to MDM_BT_HANDSFREE_ONLY to set the mode to "hands-free only". Set to MDM_BT_RESTRICTED to restrict the usage of the Bluetooth capability at all.
Returns
mdm_result_t : MDM_RESULT_SUCCESS on success, an error code on error
Return values
MDM_RESULT_SUCCESSSuccessful
MDM_RESULT_FAILGeneral failure
MDM_RESULT_NOT_SUPPORTEDNot supported
MDM_RESULT_INVALID_PARAMInvalid parameter
MDM_RESULT_ACCESS_DENIEDThe application does not have the privilege to call this function.
Permission:
This API is restricted to registered clients only.
See also
mdm_get_allow_bluetooth_mode()
mdm_result_t mdm_set_allow_bluetooth_outgoing_call ( mdm_status_t  value)

API to set whether to allow the transfer of outgoing calls to Bluetooth headsets.

The default setting allows outgoing calls.

Since (Knox_wearable):
1.0.0
Since (Tizen):
2.3.2.3
Feature:
http://developer.samsung.com/tizen/feature/mdm
Usage:
An admin can use this API to block call transfers to Bluetooth headsets. When this policy is applied, the device can still be discovered and paired, and the Bluetooth headset can still control call origination and termination. The policy does not affect incoming and outgoing calls on a Bluetooth headset.
Remarks
Bluetooth status mdm_bt_policy_changed_t is written to MDM_POLICY_ON_BT notification file. You can register a callback for this event using mdm_register_policy_receiver.
Privilege Level:
public
Privilege:
http://developer.samsung.com/tizen/privilege/mdm.bluetooth
Parameters
[in]valueWhether to allow the transfer of outgoing calls to Bluetooth headsets. Set to MDM_ALLOWED on allow transfer, or set to MDM_RESTRICTED to not allow transfers.
Returns
mdm_result_t : MDM_RESULT_SUCCESS on success, an error code on error
Return values
MDM_RESULT_SUCCESSSuccessful
MDM_RESULT_FAILGeneral failure
MDM_RESULT_NOT_SUPPORTEDNot supported
MDM_RESULT_INVALID_PARAMInvalid parameter
MDM_RESULT_ACCESS_DENIEDThe application does not have the privilege to call this function.
Permission:
This API is restricted to registered clients only.
See also
mdm_get_allow_bluetooth_outgoing_call()
mdm_result_t mdm_set_bluetooth_data_transfer_state ( mdm_status_t  value)

API to set whether to allow data transfer via Bluetooth.

Since (Knox_wearable):
1.0.0
Since (Tizen):
2.3.2.3
Feature:
http://developer.samsung.com/tizen/feature/mdm
Usage:
An admin can use this API to block any kind of data transfer, such as audio, vCard, and so on, from an administered device to any other Bluetooth device.
Remarks
Bluetooth status mdm_bt_policy_changed_t is written to MDM_POLICY_ON_BT notification file. You can register a callback for this event using mdm_register_policy_receiver.
Privilege Level:
public
Privilege:
http://developer.samsung.com/tizen/privilege/mdm.bluetooth
Parameters
[in]valueWhether to allow Bluetooth data transfer. Set to MDM_ALLOWED to allow data transfer, or MDM_RESTRICTED to restrict it.
Returns
mdm_result_t : MDM_RESULT_SUCCESS on success, an error code on error
Return values
MDM_RESULT_SUCCESSSuccessful
MDM_RESULT_FAILGeneral failure
MDM_RESULT_NOT_SUPPORTEDNot supported
MDM_RESULT_INVALID_PARAMInvalid parameter
MDM_RESULT_ACCESS_DENIEDThe application does not have the privilege to call this function.
Permission:
This API is restricted to registered clients only.
See also
mdm_get_bluetooth_data_transfer_state()
mdm_result_t mdm_set_bluetooth_discoverable_state ( mdm_status_t  value)

API to set whether to allow Bluetooth discovery.

Bluetooth discoverable mode is allowed by default.

Since (Knox_wearable):
1.0.0
Since (Tizen):
2.3.2.3
Feature:
http://developer.samsung.com/tizen/feature/mdm
Usage:
An admin can use this API to silently allow or restrict Bluetooth discoverable mode. When restricted, the Bluetooth device can never be set in discoverable mode.
Remarks
Bluetooth status mdm_bt_policy_changed_t is written to MDM_POLICY_ON_BT notification file. You can register a callback for this event using mdm_register_policy_receiver.
Privilege Level:
public
Privilege:
http://developer.samsung.com/tizen/privilege/mdm.bluetooth
Parameters
[in]valueWhether to allow Bluetooth discovery. Set to MDM_ALLOWED to allow discoverable mode, or MDM_RESTRICTED to block it.
Returns
mdm_result_t : MDM_RESULT_SUCCESS on success, an error code on error
Return values
MDM_RESULT_SUCCESSSuccessful
MDM_RESULT_FAILGeneral failure
MDM_RESULT_NOT_SUPPORTEDNot supported
MDM_RESULT_INVALID_PARAMInvalid parameter
MDM_RESULT_ACCESS_DENIEDThe application does not have the privilege to call this function.
Permission:
This API is restricted to registered clients only.
See also
mdm_get_bluetooth_discoverable_state()
mdm_result_t mdm_set_bluetooth_pairing_state ( mdm_status_t  value)

API to set whether to allow Bluetooth pairing with other Bluetooth devices.

Since (Knox_wearable):
1.0.0
Since (Tizen):
2.3.2.3
Feature:
http://developer.samsung.com/tizen/feature/mdm
Usage:
An admin can use this API to block pairing with any Bluetooth devices, although devices can still be discovered. Any devices that are currently paired will continue with the same pairing state. If a device is unpaired by the user, then the user cannot pair with the device again.
Remarks
Bluetooth status mdm_bt_policy_changed_t is written to MDM_POLICY_ON_BT notification file. You can register a callback for this event using mdm_register_policy_receiver.
if (ret == MDM_RESULT_SUCCESS){
// success
} else {
// fail
}
Privilege Level:
public
Privilege:
http://developer.samsung.com/tizen/privilege/mdm.bluetooth
Parameters
[in]valueWhether to allow Bluetooth pairing. Set to MDM_ALLOWED to allow pairing, or MDM_RESTRICTED to block it.
Returns
mdm_result_t : MDM_RESULT_SUCCESS on success, an error code on error
Return values
MDM_RESULT_SUCCESSSuccessful
MDM_RESULT_FAILGeneral failure
MDM_RESULT_NOT_SUPPORTEDNot supported
MDM_RESULT_INVALID_PARAMInvalid parameter
MDM_RESULT_ACCESS_DENIEDThe application does not have the privilege to call this function.
Permission:
This API is restricted to registered clients only.
See also
mdm_get_bluetooth_pairing_state()
mdm_result_t mdm_set_bluetooth_profile_state ( mdm_status_t  state,
mdm_bt_profile_t  profile 
)

API to set the state of a Bluetooth profile.

The enum mdm_bt_profile_t lists the available profiles.

Since (Knox_wearable):
1.0.0
Since (Tizen):
2.3.2.3
Feature:
http://developer.samsung.com/tizen/feature/mdm
Usage:
An admin can use this API to silently enable or disable a specific Bluetooth profile. For example, you could enable the Bluetooth A2DP profile (BLUETOOTH_A2DP_PROFILE):
Remarks
Bluetooth status mdm_bt_policy_changed_t is written to MDM_POLICY_ON_BT notification file. You can register a callback for this event using mdm_register_policy_receiver.
Privilege Level:
public
Privilege:
http://developer.samsung.com/tizen/privilege/mdm.bluetooth
Parameters
[in]stateWhether to enable or disable the Bluetooth profile. Set to MDM_ALLOWED to enable the profile, or MDM_RESTRICTED to disable the profile.
[in]profileThe Bluetooth profile to set the state of.
Returns
mdm_result_t : MDM_RESULT_SUCCESS on success, an error code on error
Return values
MDM_RESULT_SUCCESSSuccessful
MDM_RESULT_FAILGeneral failure
MDM_RESULT_NOT_SUPPORTEDNot supported
MDM_RESULT_INVALID_PARAMInvalid parameter
MDM_RESULT_ACCESS_DENIEDThe application does not have the privilege to call this function.
Permission:
This API is restricted to registered clients only.
See also
mdm_get_bluetooth_profile_state()