Knox Tizen Wearable SDK
Restriction policy group

Restriction policy group provides policies for device restriction control. More...

Data Structures

struct  knox_mdm_notification_item
 Application notification details. More...
 

Enumerations

Functions

mdm_data_tmdm_get_all_location_providers (void)
 API to get all available location services on the device. More...
 
mdm_result_t mdm_get_location_provider_state (char *p_provider, mdm_status_t *p_status)
 API to get the enabled or disabled state of a given location provider. More...
 
mdm_result_t mdm_set_location_provider_state (const char *p_provider, mdm_status_t enable)
 API to enable or disable a given location provider. More...
 
mdm_status_t mdm_get_allow_bluetooth_tethering (void)
 API to check whether Bluetooth tethering is enabled or not. More...
 
mdm_status_t mdm_get_allow_cellular_data (void)
 API to check if cellular data is enabled or disabled. More...
 
mdm_status_t mdm_get_allow_factory_reset (void)
 API to check if an end user is allowed to perform a factory reset on a device. More...
 
mdm_status_t mdm_get_allow_home_key (void)
 API to check whether the home key is enabled or not. More...
 
mdm_status_t mdm_get_allow_nfc (void)
 API to check whether NFC is enabled or not. More...
 
mdm_status_t mdm_get_allow_screen_capture (void)
 API to check whether screen capture setting is enabled or not. More...
 
mdm_status_t mdm_get_allow_settings_changes (void)
 API to check whether user is allowed to make changes in device settings through settings application or not. More...
 
mdm_status_t mdm_get_allow_usb_debugging (void)
 API to check if USB debugging is allowed on a device. More...
 
mdm_result_t mdm_set_allow_bluetooth_tethering (mdm_status_t value)
 API to enable or disable Bluetooth Tethering. More...
 
mdm_result_t mdm_set_allow_cellular_data (mdm_status_t value)
 API to enable or disable cellular data. More...
 
mdm_result_t mdm_set_allow_clipboard (mdm_status_t value)
 API to enable or disable Clipboard. More...
 
mdm_result_t mdm_set_allow_factory_reset (mdm_status_t value)
 API to configure end user permission to perform a factory reset on a device. More...
 
mdm_result_t mdm_set_allow_home_key (mdm_status_t value)
 API to allow or disallow the user ability of home key on the device. More...
 
mdm_result_t mdm_set_allow_nfc (mdm_status_t value)
 API to enable or disable NFC. More...
 
mdm_result_t mdm_set_allow_screen_capture (mdm_status_t value)
 API to enable or disable screen capture. More...
 
mdm_result_t mdm_set_allow_settings_changes (mdm_status_t value)
 API to allow or deny changes to Settings applications. More...
 
mdm_result_t mdm_set_allow_usb_debugging (mdm_status_t value)
 API to enable or disable USB debugging. More...
 
mdm_status_t mdm_is_firmware_recovery_allowed (void)
 API to check if the end user is allowed to perform a firmware recovery. More...
 
mdm_result_t mdm_allow_firmware_recovery (bool enabled)
 API to set an end user's permission to perform a firmware recovery. More...
 
mdm_status_t mdm_is_power_off_allowed (void)
 API to check whether the user is allowed to power off the device. More...
 
mdm_result_t mdm_allow_power_off (bool enabled)
 API to allow or disallow the user to power off the device. More...
 
mdm_status_t mdm_is_stop_system_app_allowed (void)
 API to check whether the user is allowed to stop a system application. More...
 
mdm_result_t mdm_allow_stop_system_app (bool enabled)
 API to allow or disallow the user to stop a system application. More...
 
mdm_status_t mdm_get_allow_license_activation (void)
 API to block other MDM clients ability to activate license. More...
 
mdm_result_t mdm_set_allow_license_activation (mdm_status_t is_blocked)
 API to block other clients ability to activate license. More...
 
mdm_result_t knox_mdm_set_allow_firmware_update (mdm_status_t value)
 API to block end users from performing a firmware update. More...
 
mdm_status_t knox_mdm_get_allow_firmware_update (void)
 API to check if end users are allowed to perform a firmware update. More...
 
mdm_result_t knox_mdm_add_notification_white_list (const char *package_name, const knox_mdm_notification_type_e noti_type, const knox_mdm_notification_level_e noti_level)
 API to add an application to the notification white list. More...
 
mdm_result_t knox_mdm_delete_notification_white_list (const char *package_name, const knox_mdm_notification_type_e type)
 API to delete an application from the notification white list. More...
 
mdm_result_t knox_mdm_clear_notification_white_list (void)
 API to clear the application notification white list of its contents. More...
 
mdm_data_tknox_mdm_get_notification_white_list (bool all_admin)
 API to get the contents of the application notification white list. More...
 
mdm_result_t knox_mdm_add_notification_black_list (const char *package_name, const knox_mdm_notification_type_e type, const knox_mdm_notification_level_e level)
 API to add an application to the notification black list. More...
 
mdm_result_t knox_mdm_delete_notification_black_list (const char *package_name, const knox_mdm_notification_type_e type)
 API to delete an application from the notification black list. More...
 
mdm_result_t knox_mdm_clear_notification_black_list (void)
 API to clear the application notification black list of its contents. More...
 
mdm_data_tknox_mdm_get_notification_black_list (bool all_admin)
 API to get the contents of the application notification black list. More...
 
mdm_result_t knox_mdm_set_allow_power_saving_mode (knox_mdm_power_saving_mode_t mode, mdm_status_t allow)
 API that allows or disallows end users from entering a specified power saving mode. More...
 
mdm_status_t knox_mdm_get_allow_power_saving_mode (knox_mdm_power_saving_mode_t mode)
 API to check whether a specific power saving mode is allowed or not. More...
 
mdm_result_t knox_mdm_set_allow_airplane_mode (const mdm_status_t status)
 Function turn airplane mode on/off. More...
 
mdm_status_t knox_mdm_get_allow_airplane_mode (void)
 Function returns the current status of airplane mode. More...
 

Detailed Description

Restriction policy group provides policies for device restriction control.

Restriction policy group.

Required Header

#include <mdm.h>

Overview

This group provides APIs to control the restriction of certain device functionalities.

Enumeration Type Documentation

MDM notification level displayed on Lock Screen.

Since (Knox_wearable):
2.2.0
Since (Tizen):
3.0.0.1
See also
knox_mdm_add_notification_white_list, knox_mdm_delete_notification_white_list, knox_mdm_clear_notification_white_list, knox_mdm_get_notification_white_list, knox_mdm_add_notification_black_list, knox_mdm_delete_notification_black_list, knox_mdm_clear_notification_black_list, knox_mdm_get_notification_black_list
Enumerator
KNOX_MDM_NOTIFICATION_LEVEL_ALL_CONTENT 

All notification content will be displayed

KNOX_MDM_NOTIFICATION_LEVEL_NO_SENSITIVE_DATA 

No sensitive data will be displayed

KNOX_MDM_NOTIFICATION_LEVEL_ALL_HIDE 

No notification on lock screen

Definition at line 84 of file restriction.h.

MDM notification type.

Since (Knox_wearable):
2.2.0
Since (Tizen):
3.0.0.1
See also
knox_mdm_add_notification_white_list, knox_mdm_delete_notification_white_list, knox_mdm_clear_notification_white_list, knox_mdm_get_notification_white_list, knox_mdm_add_notification_black_list, knox_mdm_delete_notification_black_list, knox_mdm_clear_notification_black_list, knox_mdm_get_notification_black_list
Enumerator
KNOX_MDM_NOTIFICATION_ANY 

Any notification

KNOX_MDM_NOTIFICATION_POPUP 

Pop-up notification

KNOX_MDM_NOTIFICATION_BADGES 

Badge notification

KNOX_MDM_NOTIFICATION_LOCK_SCREEN 

Lock screen notification

Definition at line 66 of file restriction.h.

Power saving modes.

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

Power Saving Mode.

KNOX_MDM_POWER_SAVING_MODE_ULTRA 

Not supported

KNOX_MDM_POWER_SAVING_MODE_LAST 

Last value in this enum.

Definition at line 106 of file restriction.h.

enum noti_t

MDM restriction location notify.

Since (Knox_wearable):
1.0.0
Since (Tizen):
2.2.1.1
See also
mdm_get_location_provider_state
Enumerator
MDM_POLICY_LOC_NOTI_ALLOW 

location notify allowed.

MDM_POLICY_LOC_NOTI_RESTRICTED 

location notify restricted.

Definition at line 51 of file restriction.h.

enum status_t

MDM restriction location setting.

Since (Knox_wearable):
1.0.0
Since (Tizen):
2.2.1.1
See also
mdm_get_location_provider_state
Enumerator
MDM_POLICY_LOC_SETTING_NETWORK 

location setting network.

MDM_POLICY_LOC_SETTING_GPS 

location setting GPS.

Definition at line 40 of file restriction.h.

Function Documentation

mdm_result_t knox_mdm_add_notification_black_list ( const char *  package_name,
const knox_mdm_notification_type_e  type,
const knox_mdm_notification_level_e  level 
)

API to add an application to the notification black list.

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 add an application to the notification black list.
NOTE — Applications on the notification black list will be blocked.
Remarks
This action is signalized by writing to MDM_POLICY_ON_APP_NOTI_CHANGED notification file. You can register a callback for this event using mdm_register_policy_receiver.
char *package_name = "com.samsung.email";
if (ret != MDM_RESULT_SUCCESS) {
// failed
} else {
// success
printf ("state: %d", state);
}
Privilege Level:
public
Privilege:
http://developer.samsung.com/tizen/privilege/mdm.restriction
Parameters
[in]package_nameApplication package name
[in]typeapplication Notification type
[in]levelapplication Notification details level
Returns
mdm_result_t : MDM_RESULT_SUCCESS when an application is successfully added to the notification black list, or an error code from the values listed below upon failure.
Return values
MDM_RESULT_SUCCESSOn success
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:
Usage of this API is restricted to registered clients only.
See also
knox_mdm_noti_white_list_add, knox_mdm_noti_white_list_delete, knox_mdm_noti_white_list_clear, knox_mdm_noti_white_list_get, knox_mdm_noti_black_list_delete, knox_mdm_noti_black_list_clear, knox_mdm_noti_black_list_get
mdm_result_t knox_mdm_add_notification_white_list ( const char *  package_name,
const knox_mdm_notification_type_e  noti_type,
const knox_mdm_notification_level_e  noti_level 
)

API to add an application to the notification white list.

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 add an application to the notification white list.
NOTE — Notification preferences defined by the administrator will overwrite the end user settings.
Remarks
This action is signalized by writing to MDM_POLICY_ON_APP_NOTI_CHANGED notification file. You can register a callback for this event using mdm_register_policy_receiver.
char *package_name = "com.samsung.email";
KNOX_MDM_NOTIFICATION_LEVEL_OTHER);
if (ret != MDM_RESULT_SUCCESS) {
// failed
} else {
// success
printf ("state: %d", state);
}
Privilege Level:
public
Privilege:
http://developer.samsung.com/tizen/privilege/mdm.restriction
Parameters
[in]package_nameApplication package name
[in]noti_typeApplication notification type
[in]noti_levelApplication notification details level
Returns
mdm_result_t : MDM_RESULT_SUCCESS when an application is successfully added to the notification white list, or an error code from the values listed below upon failure.
Return values
MDM_RESULT_SUCCESSOn success
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:
Usage of this API is restricted to registered clients only.
See also
knox_mdm_delete_notification_white_list, knox_mdm_clear_notification_white_list, knox_mdm_get_notification_white_list, knox_mdm_add_notification_black_list, knox_mdm_delete_notification_black_list, knox_mdm_clear_notification_black_list, knox_mdm_get_notification_black_list
mdm_result_t knox_mdm_clear_notification_black_list ( void  )

API to clear the application notification black list of its contents.

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 clear the black list of all its contents.
Remarks
This action is signalized by writing to MDM_POLICY_ON_APP_NOTI_CHANGED notification file. You can register a callback for this event using mdm_register_policy_receiver.
if (ret != MDM_RESULT_SUCCESS) {
// failed
} else {
// success
printf ("state: %d", state);
}
Privilege Level:
public
Privilege:
http://developer.samsung.com/tizen/privilege/mdm.restriction
Returns
mdm_result_t : MDM_RESULT_SUCCESS when the black list is successfully cleared of its contents, or an error code from the values listed below upon failure.
Return values
MDM_RESULT_SUCCESSOn success
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:
Usage of this API is restricted to registered clients only.
See also
knox_mdm_add_notification_white_list, knox_mdm_delete_notification_white_list, knox_mdm_clear_notification_white_list, knox_mdm_get_notification_white_list, knox_mdm_add_notification_black_list, knox_mdm_delete_notification_black_list, knox_mdm_get_notification_black_list
mdm_result_t knox_mdm_clear_notification_white_list ( void  )

API to clear the application notification white list of its contents.

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 clear the white list of all its contents.
Remarks
This action is signalized by writing to MDM_POLICY_ON_APP_NOTI_CHANGED notification file. You can register a callback for this event using mdm_register_policy_receiver.
if (ret != MDM_RESULT_SUCCESS) {
// failed
} else {
// success
printf ("state: %d", state);
}
Privilege Level:
public
Privilege:
http://developer.samsung.com/tizen/privilege/mdm.restriction
Returns
mdm_result_t : MDM_RESULT_SUCCESS when the white list is successfully cleared of its contents, or an error code from the values listed below upon failure.
Return values
MDM_RESULT_SUCCESSOn success
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:
Usage of this API is restricted to registered clients only.
See also
knox_mdm_add_notification_white_list, knox_mdm_delete_notification_white_list, knox_mdm_get_notification_white_list, knox_mdm_add_notification_black_list, knox_mdm_delete_notification_black_list, knox_mdm_clear_notification_black_list, knox_mdm_get_notification_black_list
mdm_result_t knox_mdm_delete_notification_black_list ( const char *  package_name,
const knox_mdm_notification_type_e  type 
)

API to delete an application from the notification black list.

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 remove an application from the notification black list.
Remarks
This action is signalized by writing to MDM_POLICY_ON_APP_NOTI_CHANGED notification file. You can register a callback for this event using mdm_register_policy_receiver.
char *package_name = "com.samsung.email";
if (ret != MDM_RESULT_SUCCESS) {
// failed
} else {
// success
printf ("state: %d", state);
}
Privilege Level:
public
Privilege:
http://developer.samsung.com/tizen/privilege/mdm.restriction
Parameters
[in]package_nameApplication package name
[in]typeapplication Notification type
Returns
mdm_result_t : MDM_RESULT_SUCCESS when an application is successfully removed from the notification black list, or an error code from the values listed below upon failure.
Return values
MDM_RESULT_SUCCESSOn success
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:
Usage of this API is restricted to registered clients only.
See also
knox_mdm_add_notification_white_list, knox_mdm_delete_notification_white_list, knox_mdm_clear_notification_white_list, knox_mdm_get_notification_white_list, knox_mdm_add_notification_black_list, knox_mdm_clear_notification_black_list, knox_mdm_get_notification_black_list
mdm_result_t knox_mdm_delete_notification_white_list ( const char *  package_name,
const knox_mdm_notification_type_e  type 
)

API to delete an application from the notification white list.

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 remove an application from the notification white list.
Remarks
This action is signalized by writing to MDM_POLICY_ON_APP_NOTI_CHANGED notification file. You can register a callback for this event using mdm_register_policy_receiver.
char *package_name = "com.samsung.email";
if (ret != MDM_RESULT_SUCCESS) {
// failed
} else {
// success
printf ("state: %d", state);
}
Privilege Level:
public
Privilege:
http://developer.samsung.com/tizen/privilege/mdm.restriction
Parameters
[in]package_nameApplication package name
[in]typeApplication notification type
Returns
mdm_result_t : MDM_RESULT_SUCCESS when an application is successfully removed from the notification white list, or an error code from the values listed below upon failure.
Return values
MDM_RESULT_SUCCESSOn success
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:
Usage of this API is restricted to registered clients only.
See also
knox_mdm_add_notification_white_list, knox_mdm_clear_notification_white_list, knox_mdm_get_notification_white_list, knox_mdm_add_notification_black_list, knox_mdm_delete_notification_black_list, knox_mdm_clear_notification_black_list, knox_mdm_get_notification_black_list
mdm_status_t knox_mdm_get_allow_airplane_mode ( void  )

Function returns the current status of airplane mode.

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 the current state of airplane mode.
if(result == MDM_RESTRICTED) {
// Changes are blocked
...
} else if(result == MDM_ALLOWED) {
// Changes are allowed
...
}
else
{
// ERROR
...
}
Returns
mdm_status_t : The current prevention status.
Return values
MDM_RESTRICTEDThe end user is restricted from accessing airplane mode.
MDM_ALLOWEDThe end user is allowed to turn airplane mode on/off.
MDM_STATUS_ERRORAny error.
See also
knox_mdm_set_allow_airplane_mode
mdm_status_t knox_mdm_get_allow_firmware_update ( void  )

API to check if end users are allowed to perform a firmware update.

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 end users are allowed to perform a firmware update on a device.
NOTE— The default value of this API is true.
if (status == MDM_STATUS_ERROR) {
// function error
} else {
// function success
printf ("status: %d", status);
}
Returns
mdm_status_t : Current mode of operation: one of MDM_ALLOWED or MDM_RESTRICTED
See also
knox_mdm_set_allow_firmware_update
mdm_status_t knox_mdm_get_allow_power_saving_mode ( knox_mdm_power_saving_mode_t  mode)

API to check whether a specific power saving mode is allowed or not.

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 specific power saving mode is allowed or not. The default value is allowed
NOTE — knox_mdm_set_allow_power_saving_mode_change is prioritized over this API. For example, if knox_mdm_get_allow_power_saving_mode returns that power saving mode is allowed, it can still be disabled by knox_mdm_set_allow_power_saving_mode_change.
if ( ret == MDM_RESULT_SUCCESS) {
if (status == MDM_STATUS_ERROR) {
// function error
} else {
// function success
if ( status == MDM_ALLOWED ) {
// specified power saving mode is allowed
} else {
// specified power saving mode is restricted
}
}
}
Parameters
[in]modePower saving mode you want to quary. Currently, only KNOX_MDM_POWER_SAVING_MODE_NORMAL is supported.
Returns
mdm_status_t : Current mode of operation: one of MDM_ALLOWED or MDM_RESTRICTED
See also
knox_mdm_set_allow_power_saving_mode, knox_mdm_set_allow_power_saving_mode_change, knox_mdm_get_allow_power_saving_mode_change
mdm_data_t* knox_mdm_get_notification_black_list ( bool  all_admin)

API to get the contents of the application notification black list.

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 get the contents of the black list.

mdm_data_t *data = knox_mdm_get_notification_black_List(true);
if(data != NULL) {
if(data -> ret != MDM_RESULT_SUCCESS) {
// Error
} else {
// Success
GList *list = (GList *)data -> data;
while(list != NULL) {
if(ssid_name != NULL) {
// Do something
}
list = g_list_next(list);
}
}
} else {
// Error
}
Returns
mdm_result_t : MDM_RESULT_SUCCESS upon getting the contents of the black list, or an error code from the values listed below upon failure.
Return values
MDM_RESULT_SUCCESSSuccess
MDM_RESULT_FAILGeneral failure.
MDM_RESULT_SERVICE_NOT_ENABLEDService not enabled.
MDM_RESULT_ACCESS_DENIEDCaller is not authorized to access Knox MDM client information.
See also
knox_mdm_add_notification_white_list, knox_mdm_delete_notification_white_list, knox_mdm_clear_notification_white_list, knox_mdm_get_notification_white_list, knox_mdm_add_notification_black_list, knox_mdm_delete_notification_black_list, knox_mdm_clear_notification_black_list
mdm_data_t* knox_mdm_get_notification_white_list ( bool  all_admin)

API to get the contents of the application notification white list.

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 get the contents of the white list.

if(data != NULL) {
if(data -> ret != MDM_RESULT_SUCCESS) {
// Error
} else {
// Success
GList *list = (GList *)data -> data;
while(list != NULL) {
if(ssid_name != NULL) {
// Do something
}
list = g_list_next(list);
}
}
} else {
// Error
}
Parameters
[in]all_adminTrue - content off all lists of all admins.
False - content of current admin only.
Returns
mdm_result_t : MDM_RESULT_SUCCESS upon getting the contents of the white list, or an error code from the values listed below upon failure.
Return values
MDM_RESULT_SUCCESSSuccess
MDM_RESULT_FAILGeneral failure.
MDM_RESULT_SERVICE_NOT_ENABLEDService not enabled.
MDM_RESULT_ACCESS_DENIEDCaller is not authorized to access Knox MDM client information.
See also
knox_mdm_add_notification_white_list, knox_mdm_delete_notification_white_list, knox_mdm_clear_notification_white_list, knox_mdm_add_notification_black_list, knox_mdm_delete_notification_black_list, knox_mdm_clear_notification_black_list, knox_mdm_get_notification_black_list
mdm_result_t knox_mdm_set_allow_airplane_mode ( const mdm_status_t  status)

Function turn airplane mode on/off.

Since (Knox_wearable):
2.2.0
Since (Tizen):
3.0.0.1
Feature:
http://developer.samsung.com/tizen/feature/mdm
Usage:
The admin can use this API to turn airplane mode on/off. The API blocks the end user from changing the airplane mode settings.
Remarks
Airplane mode on/off state is written to MDM_POLICY_ON_AIRPLANE notification file. You can register a callback for this event using mdm_register_policy_receiver.
if(result == MDM_RESULT_SUCCESS) {
// Success
...
} else {
// Error
...
}
Privilege Level:
public
Privilege:
http://developer.samsung.com/tizen/privilege/mdm.restriction
Parameters
[in]statusMDM_RESTRICTED – Turns airplane mode off, and blocks end users from modifying airplane mode on the system UI.
MDM_ALLOWED – Airplane mode state will stay on its current state, and allows end users to modify airplane mode.
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.
See also
knox_mdm_get_allow_airplane_mode
mdm_result_t knox_mdm_set_allow_firmware_update ( mdm_status_t  value)

API to block end users from performing a firmware update.

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 block end users from performing a firmware update.
NOTE — If values are set to false, the end user won't be allowed to perform a firmware update through the settings application.
if (ret != MDM_RESULT_SUCCESS) {
// function error
} else {
// function success
}
Privilege Level:
public
Privilege:
http://developer.samsung.com/tizen/privilege/mdm.restriction
Parameters
[in]valueMDM_ALLOWED = 0, MDM_RESTRICTED = 1,
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:
Usage of this API is restricted to registered clients only.
See also
knox_mdm_get_allow_firmware_update
mdm_result_t knox_mdm_set_allow_power_saving_mode ( knox_mdm_power_saving_mode_t  mode,
mdm_status_t  allow 
)

API that allows or disallows end users from entering a specified power saving mode.

Since (Knox_wearable):
2.2.0
Since (Tizen):
3.0.0.1
Feature:
http://developer.samsung.com/tizen/feature/mdm
Usage:
The admin could set this policy to adjust end user permission to enter power saving mode:
• If set to MDM_RESTRICTED, the end user isn’t allowed to enter the specified power saving mode.
• If it set to MDM_ALLOWED, the end user is allowed to enter the specified power saving mode. By default all power saving modes are allowed.

Note — knox_mdm_set_allow_power_saving_mode_change, an API that disables power saving mode, takes priority over knox_mdm_set_allow_power_saving_mode.
Remarks
Power saving mode restriction mdm_status_t is written to MDM_POLICY_ON_POWER_SAVING_MODE 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.restriction
Parameters
[in]modePower saving mode you want to enable/disable. Currently, only KNOX_MDM_POWER_SAVING_MODE_NORMAL is supported.
[in]allowWhen set to MDM_ALLOWED, specified power saving mode is allowed. When set to MDM_RESTRICTED specified power saving mode is disabled.
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 or KNOX_MDM_POWER_SAVING_MODE_ULTRA is used as mode parameter.
MDM_RESULT_ACCESS_DENIEDThe application does not have the privilege to call this function.
Permission:
Usage of this API is restricted to registered clients only.
See also
knox_mdm_get_allow_power_saving_mode, knox_mdm_set_allow_power_saving_mode_change, knox_mdm_get_allow_power_saving_mode_change
mdm_result_t mdm_allow_firmware_recovery ( bool  enabled)

API to set an end user's permission to perform a firmware recovery.

Since (Knox_wearable):
1.0.0
Since (Tizen):
2.2.1.1
Feature:
http://developer.samsung.com/tizen/feature/mdm
Usage:
Use this API to allow or block an end user from performing a firmware recovery on a device.
if (ret != MDM_RESULT_SUCCESS) {
// function error
} else {
// function success
}
Privilege Level:
public
Privilege:
http://developer.samsung.com/tizen/privilege/mdm.restriction
Parameters
[in]enabledThe status of the policy: true for enabled or false otherwise
Returns
mdm_result_t : MDM_RESULT_SUCCESS upon successful configuration of end user's permission to perform a firmware recovery, or an error code from the values listed below upon failure.
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:
Usage of this API is restricted to registered clients only.
See also
mdm_is_firmware_recovery_allowed
mdm_result_t mdm_allow_power_off ( bool  enabled)

API to allow or disallow the user to power off the device.

Since (Knox_wearable):
2.2.0
Since (Tizen):
3.0.0.1
Feature:
http://developer.samsung.com/tizen/feature/mdm
Usage: Admin can allow or block power off.
if (ret != MDM_RESULT_SUCCESS) {
// function error
} else {
// function success
}
Privilege Level:
public
Privilege:
http://developer.samsung.com/tizen/privilege/mdm.restriction
Parameters
[in]enabledThe status of the policy, true for enabled or false otherwise
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:
Usage of this API is restricted to registered clients only.
See also
mdm_is_power_off_allowed
mdm_result_t mdm_allow_stop_system_app ( bool  enabled)

API to allow or disallow the user to stop a system application.

Since (Knox_wearable):
1.0.0
Since (Tizen):
2.2.1.1
Feature:
http://developer.samsung.com/tizen/feature/mdm
Usage: Admin can allow or block stopping system application.
if (ret != MDM_RESULT_SUCCESS) {
// function error
} else {
// function success
}
Privilege Level:
public
Privilege:
http://developer.samsung.com/tizen/privilege/mdm.restriction
Parameters
[in]enabledThe status of the policy, true for enabled or false otherwise
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:
Usage of this API is restricted to registered clients only.
See also
mdm_is_stop_system_app_allowed
mdm_data_t* mdm_get_all_location_providers ( void  )

API to get all available location services on the device.

Since (Knox_wearable):
1.0.0
Since (Tizen):
2.2.1.1
Feature:
http://developer.samsung.com/tizen/feature/mdm
Usage:
Admin can use this API to get the different location services available (for example, gps, network, passive, and so on) on the device
if (lp_data) {
GList *lp_list = (GList *)lp_data->data;
if (lp_list) {
lp_list = g_list_first(lp_list);
while (lp_list) {
printf ("location service: %s", (char *) lp_list->data);
// Sample Output
// gps
// network
// passive
lp_list = g_list_next(lp_list);
}
}
mdm_free_data(lp_data);
}
Returns
mdm_data_t * on success, NULL on error
See also
mdm_set_location_provider_state
mdm_status_t mdm_get_allow_bluetooth_tethering ( void  )

API to check whether Bluetooth tethering is enabled or not.

Since (Knox_wearable):
1.0.0
Since (Tizen):
2.2.1.1
Feature:
http://developer.samsung.com/tizen/feature/mdm
Usage:
Admin can check whether device can share its network data via Bluetooth or not.The default value is true.. In a multi admin device, this method returns the more restricted value, not the value set by the calling admin
if (status == MDM_STATUS_ERROR) {
// function error
} else {
// function success
printf ("status: %d", status);
}
Returns
mdm_status_t : Current mode of operation: one of MDM_ALLOWED or MDM_RESTRICTED
See also
mdm_set_allow_bluetooth_tethering
mdm_status_t mdm_get_allow_cellular_data ( void  )

API to check if cellular data is enabled or disabled.

Since (Knox_wearable):
1.0.0
Since (Tizen):
2.2.1.1
Feature:
http://developer.samsung.com/tizen/feature/mdm
Usage:
Use this API to check if a device can share its network data through Bluetooth or not. Default value is true.
if (status == MDM_STATUS_ERROR) {
// function error
} else {
// function success
printf ("status: %d", status);
}
Returns
mdm_status_t : Current mode of operation: one of MDM_ALLOWED or MDM_RESTRICTED
See also
mdm_set_allow_cellular_data
mdm_status_t mdm_get_allow_factory_reset ( void  )

API to check if an end user is allowed to perform a factory reset on a device.

Since (Knox_wearable):
1.0.0
Since (Tizen):
2.2.1.1
Feature:
http://developer.samsung.com/tizen/feature/mdm
Usage:
Use this API to check whether an end user can perform a factory reset on a device or not.
NOTE — The default value is set to true.
if (status == MDM_STATUS_ERROR) {
// function error
} else {
// function success
printf ("status: %d", status);
}
Returns
mdm_status_t : Current mode of operation: one of MDM_ALLOWED or MDM_RESTRICTED
See also
mdm_set_allow_factory_reset
mdm_status_t mdm_get_allow_home_key ( void  )

API to check whether the home key is enabled or not.

Since (Knox_wearable):
1.0.0
Since (Tizen):
2.2.1.1
Feature:
http://developer.samsung.com/tizen/feature/mdm
Usage:
Admin can check whether home key functionality is enabled on the device or not. The default value is true.
if (status == MDM_STATUS_ERROR) {
// function error
} else {
// function success
printf ("status: %d", status);
}
Returns
mdm_status_t : Current mode of operation: one of MDM_ALLOWED or MDM_RESTRICTED
See also
mdm_set_allow_home_key
mdm_status_t mdm_get_allow_license_activation ( void  )

API to block other MDM clients ability to activate license.

Since (Knox_wearable):
1.0.0
Since (Tizen):
2.2.1.1
Feature:
http://developer.samsung.com/tizen/feature/mdm
Usage:
Admin can check if its possible to activate license or not.
if ( status != MDM_STATUS_ERROR ) {
if ( status == MDM_ALLOWED ) {
// license activation is allowed
} else {
// license activation is blocked
}
}

.

Returns
mdm_status_t : MDM_RESTRICTED when license activation is blocked, MDM_ALLOWED when license activation is allowed or MDM_STATUS_ERROR when error occurred.
Return values
MDM_RESTRICTEDblocked
MDM_ALLOWEDallowed
MDM_STATUS_ERRORFail
See also
mdm_set_allow_license_activation
mdm_status_t mdm_get_allow_nfc ( void  )

API to check whether NFC is enabled or not.

Since (Knox_wearable):
1.0.0
Since (Tizen):
2.2.1.1
Feature:
http://developer.samsung.com/tizen/feature/mdm
Usage:
Admin can check whether NFC on device is enabled or not.The default value is true.
if (status == MDM_STATUS_ERROR) {
// function error
} else {
// function success
printf ("status: %d", status);
}
Returns
mdm_status_t : Current mode of operation: one of MDM_ALLOWED or MDM_RESTRICTED
See also
mdm_set_allow_nfc
mdm_status_t mdm_get_allow_screen_capture ( void  )

API to check whether screen capture setting is enabled or not.

Since (Knox_wearable):
1.0.0
Since (Tizen):
2.2.1.1
Feature:
http://developer.samsung.com/tizen/feature/mdm
Usage:
Admin can use this API to check whether user can take screenshot of the device screen or not. The default value is true.
if (status == MDM_STATUS_ERROR) {
// function error
} else {
// function success
printf ("status: %d", status);
}
Returns
mdm_status_t : Current mode of operation: one of MDM_ALLOWED or MDM_RESTRICTED
See also
mdm_set_allow_screen_capture
mdm_status_t mdm_get_allow_settings_changes ( void  )

API to check whether user is allowed to make changes in device settings through settings application or not.

Since (Knox_wearable):
1.0.0
Since (Tizen):
2.2.1.1
Feature:
http://developer.samsung.com/tizen/feature/mdm
Usage:
Admin can check whether setting changes are allowed or not through setting application. The default value is true.
if (status == MDM_STATUS_ERROR) {
// function error
} else {
// function success
printf ("status: %d", status);
}
Returns
mdm_status_t : Current mode of operation: one of MDM_ALLOWED or MDM_RESTRICTED
See also
mdm_set_allow_settings_changes
mdm_status_t mdm_get_allow_usb_debugging ( void  )

API to check if USB debugging is allowed on a device.

Since (Knox_wearable):
1.0.0
Since (Tizen):
2.2.1.1
Feature:
http://developer.samsung.com/tizen/feature/mdm
Usage:
Use this API to check if USB debugging on a device is allowed or restricted.
if (status == MDM_STATUS_ERROR) {
// function error
} else {
// function success
printf ("status: %d", status);
}
Returns
mdm_status_t : Current mode of operation
Return values
MDM_ALLOWEDUSB debugging is allowed on the device.
MDM_RESTRICTEDUSB debugging is restricted on the device.
See also
mdm_set_allow_usb_debugging
mdm_result_t mdm_get_location_provider_state ( char *  p_provider,
mdm_status_t p_status 
)

API to get the enabled or disabled state of a given location provider.

Since (Knox_wearable):
1.0.0
Since (Tizen):
2.2.1.1
Feature:
http://developer.samsung.com/tizen/feature/mdm
Usage:
Admin can use this API to get the enabled or disabled state of a location provider. All available location providers on the device can be obtained by using mdm_get_all_location_providers()
mdm_status_t state = 0;
if (ret != MDM_RESULT_SUCCESS) {
// failed getting provider state
} else {
// success getting provider state
printf ("state: %d", state);
}
Parameters
[in]p_providerThe case sensitive location provider name. Sample values are gps, network, passive.
[in]p_statusGet information of location.
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.
See also
mdm_set_location_provider_state
mdm_status_t mdm_is_firmware_recovery_allowed ( void  )

API to check if the end user is allowed to perform a firmware recovery.

Since (Knox_wearable):
1.0.0
Since (Tizen):
2.2.1.1
Feature:
http://developer.samsung.com/tizen/feature/mdm
Usage:
Use this API to check if the end user is able to perform a firmware recovery.
if (ret == MDM_ALLOWED) {
// setting allowed
} else if (ret == MDM_RESTRICTED) {
// setting restricted
} else {
// error occured
}
Returns
mdm_status_t : Current mode of operation: one of MDM_ALLOWED, MDM_RESTRICTED or MDM_STATUS_ERROR
See also
mdm_allow_firmware_recovery
mdm_status_t mdm_is_power_off_allowed ( void  )

API to check whether the user is allowed to power off the device.

Since (Knox_wearable):
2.2.0
Since (Tizen):
3.0.0.1
Feature:
http://developer.samsung.com/tizen/feature/mdm
Usage: Admin can check if power off is blocked or not.
if (ret == MDM_ALLOWED) {
// setting allowed
} else if (ret == MDM_RESTRICTED) {
// setting restricted
} else {
// error occured
}
Returns
mdm_status_t : Current mode of operation: one of MDM_ALLOWED, MDM_RESTRICTED or MDM_STATUS_ERROR
See also
mdm_allow_power_off
mdm_status_t mdm_is_stop_system_app_allowed ( void  )

API to check whether the user is allowed to stop a system application.

Since (Knox_wearable):
1.0.0
Since (Tizen):
2.2.1.1
Feature:
http://developer.samsung.com/tizen/feature/mdm
Usage: Admin can check if stopping system application is allowed or not.
mdm_result_t ret = mdm_is_stop_system_allowed();
if (ret == MDM_ALLOWED) {
// setting allowed
} else if (ret == MDM_RESTRICTED) {
// setting restricted
} else {
// error occured
}
Returns
mdm_result_t : Current mode of operation: one of MDM_ALLOWED, MDM_RESTRICTED or MDM_STATUS_ERROR
See also
mdm_allow_stop_system_app
mdm_result_t mdm_set_allow_bluetooth_tethering ( mdm_status_t  value)

API to enable or disable Bluetooth Tethering.

Since (Knox_wearable):
1.0.0
Since (Tizen):
2.2.1.1
Feature:
http://developer.samsung.com/tizen/feature/mdm
Usage:
Admin can use this policy to prevent the device from being able to share its carrier data connection with other devices via Bluetooth. If it set to false, Bluetooth tethering functionality will be disabled and user will not be able to turn it ON until the admin enables it again. If set to true, Bluetooth tethering UI control will be enabled. Enable won't really enable the functionality and it just enables corresponding UI setting for user change.
Remarks
Restriction value is written to MDM_POLICY_ON_BT_TETHERING notification file. You can register a callback for this event using mdm_register_policy_receiver.
if (ret != MDM_RESULT_SUCCESS) {
// function error
} else {
// function success
}
Privilege Level:
public
Privilege:
http://developer.samsung.com/tizen/privilege/mdm.restriction
Parameters
[in]valueMDM_ALLOWED = 0, MDM_RESTRICTED = 1,
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:
Usage of this API is restricted to registered clients only.
See also
mdm_get_allow_bluetooth_tethering
mdm_result_t mdm_set_allow_cellular_data ( mdm_status_t  value)

API to enable or disable cellular data.

Since (Knox_wearable):
1.0.0
Since (Tizen):
2.2.1.1
Feature:
http://developer.samsung.com/tizen/feature/mdm
Usage:
Use this policy to enable or disable mobile data connection.
Note — If disabled, end users will be blocked from connecting to their mobile data through their SIM.
Remarks
Cellular data restriction mdm_status_t is written to MDM_POLICY_ON_NETWORK notification file. You can register a callback for this event using mdm_register_policy_receiver.
if (ret != MDM_RESULT_SUCCESS) {
// function error
} else {
// function success
}
Privilege Level:
public
Privilege:
http://developer.samsung.com/tizen/privilege/mdm.restriction
Parameters
[in]valueMDM_ALLOWED = 0, MDM_RESTRICTED = 1,
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:
Usage of this API is restricted to registered clients only.
See also
mdm_get_allow_cellular_data
mdm_result_t mdm_set_allow_clipboard ( mdm_status_t  value)

API to enable or disable Clipboard.

Since (Knox_wearable):
1.0.0
Since (Tizen):
2.2.1.1
Feature:
http://developer.samsung.com/tizen/feature/mdm
Usage:
Admin can use this policy to disallow any editing function like cut, copy, paste operations
Remarks
Clipboard restriction mdm_status_t is written to MDM_POLICY_ON_CLIPBOARD notification file. You can register a callback for this event using mdm_register_policy_receiver.
if (ret != MDM_RESULT_SUCCESS) {
// function error
} else {
// function success
}
Privilege Level:
public
Privilege:
http://developer.samsung.com/tizen/privilege/mdm.restriction
Parameters
[in]valueMDM_ALLOWED = 0, MDM_RESTRICTED = 1,
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:
Usage of this API is restricted to registered clients only.
See also
mdm_get_allow_clipboard
mdm_result_t mdm_set_allow_factory_reset ( mdm_status_t  value)

API to configure end user permission to perform a factory reset on a device.

Since (Knox_wearable):
1.0.0
Since (Tizen):
2.2.1.1
Feature:
http://developer.samsung.com/tizen/feature/mdm
Usage:
Use this policy to block an end user from factory resetting a device. If set to false, the end user won't be able to access the factory reset option on the settings application.
Remarks
Factory reset restriction mdm_status_t is written to MDM_POLICY_ON_FACTORY_RESET notification file. You can register a callback for this event using mdm_register_policy_receiver.
if (ret != MDM_RESULT_SUCCESS) {
// function error
} else {
// function success
}
Privilege Level:
public
Privilege:
http://developer.samsung.com/tizen/privilege/mdm.restriction
Parameters
[in]valueMDM_ALLOWED = 0, MDM_RESTRICTED = 1,
Returns
mdm_result_t : MDM_RESULT_SUCCESS upon successful configuration of end user permission to access the factory reset option on a device, or an error code from the values listed below upon failure.
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:
Usage of this API is restricted to registered clients only.
See also
mdm_get_allow_factory_reset
mdm_result_t mdm_set_allow_home_key ( mdm_status_t  value)

API to allow or disallow the user ability of home key on the device.

Since (Knox_wearable):
1.0.0
Since (Tizen):
2.2.1.1
Feature:
http://developer.samsung.com/tizen/feature/mdm
Usage:
Admin can use this policy to disallow home key. If set to false, the user cannot use home key on the device.
if (ret != MDM_RESULT_SUCCESS) {
// function error
} else {
// function success
}
Privilege Level:
public
Privilege:
http://developer.samsung.com/tizen/privilege/mdm.restriction
Parameters
[in]valueMDM_ALLOWED = 0, MDM_RESTRICTED = 1,
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:
Usage of this API is restricted to registered clients only.
See also
mdm_get_allow_home_key
mdm_result_t mdm_set_allow_license_activation ( mdm_status_t  is_blocked)

API to block other clients ability to activate license.

Since (Knox_wearable):
1.0.0
Since (Tizen):
2.2.1.1
Feature:
http://developer.samsung.com/tizen/feature/mdm
Usage:
Admin can use this API to block the possibility to activate license for other clients. After setting block to MDM_RESTRICTED all requests to activate license from other admins will fail. Only Admin which enabled this restriction can disable it.

.

Privilege Level:
public
Privilege:
http://developer.samsung.com/tizen/privilege/mdm.restriction
Parameters
[in]is_blockedMDM_RESTRICTED to block license activation, MDM_ALLOWED to unblock
Returns
mdm_result_t : MDM_RESULT_SUCCESS will show on success, while an error code will show if there is an error
Return values
MDM_RESULT_SUCCESSSuccessful
MDM_RESULT_FAILGeneral failure
MDM_RESULT_NOT_SUPPORTEDNot supported
MDM_RESULT_INVALID_PARAMInvalid parameter
See also
mdm_get_allow_license_activation
mdm_result_t mdm_set_allow_nfc ( mdm_status_t  value)

API to enable or disable NFC.

Since (Knox_wearable):
1.0.0
Since (Tizen):
2.2.1.1
Feature:
http://developer.samsung.com/tizen/feature/mdm
Usage:
Admin can use this policy to disallow NFC usage on device. If set to false, the user cannot change it through Settings application.
Remarks
NFC restriction mdm_status_t is written to MDM_POLICY_ON_NFC notification file. You can register a callback for this event using mdm_register_policy_receiver.
if (ret != MDM_RESULT_SUCCESS) {
// function error
} else {
// function success
}
Privilege Level:
public
Privilege:
http://developer.samsung.com/tizen/privilege/mdm.restriction
Parameters
[in]valueMDM_ALLOWED = 0, MDM_RESTRICTED = 1,
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:
Usage of this API is restricted to registered clients only.
See also
mdm_get_allow_nfc
mdm_result_t mdm_set_allow_screen_capture ( mdm_status_t  value)

API to enable or disable screen capture.

Since (Knox_wearable):
1.0.0
Since (Tizen):
2.2.1.1
Feature:
http://developer.samsung.com/tizen/feature/mdm
Usage:
Admin can use this policy to prevent user from taking a screenshot of the device screen. It will block user from taking screenshots in other ways, for example: through ddms.
if (ret != MDM_RESULT_SUCCESS) {
// function error
} else {
// function success
}
Privilege Level:
public
Privilege:
http://developer.samsung.com/tizen/privilege/mdm.restriction
Parameters
[in]valueMDM_ALLOWED = 0, MDM_RESTRICTED = 1,
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:
Usage of this API is restricted to registered clients only.
See also
mdm_get_allow_screen_capture
mdm_result_t mdm_set_allow_settings_changes ( mdm_status_t  value)

API to allow or deny changes to Settings applications.

Since (Knox_wearable):
1.0.0
Since (Tizen):
2.2.1.1
Feature:
http://developer.samsung.com/tizen/feature/mdm
Usage:
Admin can use this API to disable device's settings or allow to use it when the settings change is disabled.
Remarks
Settings restriction mdm_status_t is written to MDM_POLICY_ON_SETTINGS notification file. You can register a callback for this event using mdm_register_policy_receiver.
if (ret != MDM_RESULT_SUCCESS) {
// function error
} else {
// function success
}
Privilege Level:
public
Privilege:
http://developer.samsung.com/tizen/privilege/mdm.restriction
Parameters
[in]valueMDM_ALLOWED = 0, MDM_RESTRICTED = 1,
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:
Usage of this API is restricted to registered clients only.
See also
mdm_get_allow_settings_changes
mdm_result_t mdm_set_allow_usb_debugging ( mdm_status_t  value)

API to enable or disable USB debugging.

Since (Knox_wearable):
1.0.0
Since (Tizen):
2.2.1.1
Feature:
http://developer.samsung.com/tizen/feature/mdm
Usage:
Use this API to enable or disable USB access. If set to restricted, USB device debugging will be blocked.
Remarks
USB debugging restriction mdm_status_t is written to MDM_POLICY_ON_USB_DEBUG notification file. You can register a callback for this event using mdm_register_policy_receiver.
if (ret != MDM_RESULT_SUCCESS) {
// function error
} else {
// function success
}
Privilege Level:
public
Privilege:
http://developer.samsung.com/tizen/privilege/mdm.restriction
Parameters
[in]valueMDM_ALLOWED = 0, MDM_RESTRICTED = 1,
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:
Usage of this API is restricted to registered clients only.
See also
mdm_get_allow_usb_debugging
mdm_result_t mdm_set_location_provider_state ( const char *  p_provider,
mdm_status_t  enable 
)

API to enable or disable a given location provider.

Since (Knox_wearable):
1.0.0
Since (Tizen):
2.2.1.1
Feature:
http://developer.samsung.com/tizen/feature/mdm
Usage:
Admin can use this API to enable or disable a location provider. If it set to false, given location provider functionality will be disabled and user will not be able to turn it on until the admin enables it again. if it set to true, given location provider control will be enabled. Enable won't really enable the functionality and it just enables corresponding UI setting for user change. All available location providers on the device can be obtained by using mdm_get_all_location_providers()
Remarks
Location provider restriction is a bit sum of location provider (identified by status_t) and policy value (identified by noti_t). It is written to MDM_POLICY_ON_LOC_SETTING notification file. You can register a callback for this event using mdm_register_policy_receiver.
if (ret != MDM_RESULT_SUCCESS) {
// failed getting provider state
} else {
// success getting provider state
printf ("state: %d", state);
}
Privilege Level:
public
Privilege:
http://developer.samsung.com/tizen/privilege/mdm.restriction
Parameters
[in]p_providerThe case sensitive location provider name. Sample values are gps, network, passive.
[in]enableTrue to enable the location provider, false to disable the provider.
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:
Usage of this API is restricted to registered clients only.
See also
mdm_get_location_provider_state