Knox Tizen Wearable SDK
|
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_t * | mdm_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_t * | knox_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_t * | knox_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... | |
Restriction policy group provides policies for device restriction control.
Restriction policy group.
#include <mdm.h>
This group provides APIs to control the restriction of certain device functionalities.
MDM notification level displayed on Lock Screen.
Definition at line 84 of file restriction.h.
MDM notification type.
Definition at line 66 of file restriction.h.
Power saving modes.
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.
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.
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.
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.
[in] | package_name | Application package name |
[in] | type | application Notification type |
[in] | level | application Notification details level |
MDM_RESULT_SUCCESS | On success |
MDM_RESULT_FAIL | General failure |
MDM_RESULT_NOT_SUPPORTED | Not supported |
MDM_RESULT_INVALID_PARAM | Invalid parameter |
MDM_RESULT_ACCESS_DENIED | The application does not have the privilege to call this function. |
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.
[in] | package_name | Application package name |
[in] | noti_type | Application notification type |
[in] | noti_level | Application notification details level |
MDM_RESULT_SUCCESS | On success |
MDM_RESULT_FAIL | General failure |
MDM_RESULT_NOT_SUPPORTED | Not supported |
MDM_RESULT_INVALID_PARAM | Invalid parameter |
MDM_RESULT_ACCESS_DENIED | The application does not have the privilege to call this function. |
mdm_result_t knox_mdm_clear_notification_black_list | ( | void | ) |
API to clear the application notification black list of its contents.
MDM_RESULT_SUCCESS | On success |
MDM_RESULT_FAIL | General failure |
MDM_RESULT_NOT_SUPPORTED | Not supported |
MDM_RESULT_INVALID_PARAM | Invalid parameter |
MDM_RESULT_ACCESS_DENIED | The application does not have the privilege to call this function. |
mdm_result_t knox_mdm_clear_notification_white_list | ( | void | ) |
API to clear the application notification white list of its contents.
MDM_RESULT_SUCCESS | On success |
MDM_RESULT_FAIL | General failure |
MDM_RESULT_NOT_SUPPORTED | Not supported |
MDM_RESULT_INVALID_PARAM | Invalid parameter |
MDM_RESULT_ACCESS_DENIED | The application does not have the privilege to call this function. |
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.
[in] | package_name | Application package name |
[in] | type | application Notification type |
MDM_RESULT_SUCCESS | On success |
MDM_RESULT_FAIL | General failure |
MDM_RESULT_NOT_SUPPORTED | Not supported |
MDM_RESULT_INVALID_PARAM | Invalid parameter |
MDM_RESULT_ACCESS_DENIED | The application does not have the privilege to call this function. |
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.
[in] | package_name | Application package name |
[in] | type | Application notification type |
MDM_RESULT_SUCCESS | On success |
MDM_RESULT_FAIL | General failure |
MDM_RESULT_NOT_SUPPORTED | Not supported |
MDM_RESULT_INVALID_PARAM | Invalid parameter |
MDM_RESULT_ACCESS_DENIED | The application does not have the privilege to call this function. |
mdm_status_t knox_mdm_get_allow_airplane_mode | ( | void | ) |
Function returns the current status of airplane mode.
MDM_RESTRICTED | The end user is restricted from accessing airplane mode. |
MDM_ALLOWED | The end user is allowed to turn airplane mode on/off. |
MDM_STATUS_ERROR | Any error. |
mdm_status_t knox_mdm_get_allow_firmware_update | ( | void | ) |
API to check if end users are allowed to perform a 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.
[in] | mode | Power saving mode you want to quary. Currently, only KNOX_MDM_POWER_SAVING_MODE_NORMAL is supported. |
mdm_data_t* knox_mdm_get_notification_black_list | ( | bool | all_admin | ) |
API to get the contents of the application notification black list.
Use this API to get the contents of the black list.
MDM_RESULT_SUCCESS | Success |
MDM_RESULT_FAIL | General failure. |
MDM_RESULT_SERVICE_NOT_ENABLED | Service not enabled. |
MDM_RESULT_ACCESS_DENIED | Caller is not authorized to access Knox MDM client information. |
mdm_data_t* knox_mdm_get_notification_white_list | ( | bool | all_admin | ) |
API to get the contents of the application notification white list.
Use this API to get the contents of the white list.
[in] | all_admin | True - content off all lists of all admins. False - content of current admin only. |
MDM_RESULT_SUCCESS | Success |
MDM_RESULT_FAIL | General failure. |
MDM_RESULT_SERVICE_NOT_ENABLED | Service not enabled. |
MDM_RESULT_ACCESS_DENIED | Caller is not authorized to access Knox MDM client information. |
mdm_result_t knox_mdm_set_allow_airplane_mode | ( | const mdm_status_t | status | ) |
Function turn airplane mode on/off.
[in] | status | MDM_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. |
MDM_RESULT_SUCCESS | Successful |
MDM_RESULT_FAIL | General failure |
MDM_RESULT_NOT_SUPPORTED | Not supported |
MDM_RESULT_INVALID_PARAM | Invalid parameter |
MDM_RESULT_ACCESS_DENIED | The application does not have the privilege to call this function. |
mdm_result_t knox_mdm_set_allow_firmware_update | ( | mdm_status_t | value | ) |
API to block end users from performing a firmware update.
[in] | value | MDM_ALLOWED = 0, MDM_RESTRICTED = 1, |
MDM_RESULT_SUCCESS | Successful |
MDM_RESULT_FAIL | General failure |
MDM_RESULT_NOT_SUPPORTED | Not supported |
MDM_RESULT_INVALID_PARAM | Invalid parameter |
MDM_RESULT_ACCESS_DENIED | The application does not have the privilege to call this function. |
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.
[in] | mode | Power saving mode you want to enable/disable. Currently, only KNOX_MDM_POWER_SAVING_MODE_NORMAL is supported. |
[in] | allow | When set to MDM_ALLOWED, specified power saving mode is allowed. When set to MDM_RESTRICTED specified power saving mode is disabled. |
MDM_RESULT_SUCCESS | Successful |
MDM_RESULT_FAIL | General failure |
MDM_RESULT_NOT_SUPPORTED | Not supported. |
MDM_RESULT_INVALID_PARAM | Invalid parameter or KNOX_MDM_POWER_SAVING_MODE_ULTRA is used as mode parameter. |
MDM_RESULT_ACCESS_DENIED | The application does not have the privilege to call this function. |
mdm_result_t mdm_allow_firmware_recovery | ( | bool | enabled | ) |
API to set an end user's permission to perform a firmware recovery.
[in] | enabled | The status of the policy: true for enabled or false otherwise |
MDM_RESULT_SUCCESS | Successful |
MDM_RESULT_FAIL | General failure |
MDM_RESULT_NOT_SUPPORTED | Not supported |
MDM_RESULT_INVALID_PARAM | Invalid parameter |
MDM_RESULT_ACCESS_DENIED | The application does not have the privilege to call this function. |
mdm_result_t mdm_allow_power_off | ( | bool | enabled | ) |
API to allow or disallow the user to power off the device.
[in] | enabled | The status of the policy, true for enabled or false otherwise |
MDM_RESULT_SUCCESS | Successful |
MDM_RESULT_FAIL | General failure |
MDM_RESULT_NOT_SUPPORTED | Not supported |
MDM_RESULT_INVALID_PARAM | Invalid parameter |
MDM_RESULT_ACCESS_DENIED | The application does not have the privilege to call this function. |
mdm_result_t mdm_allow_stop_system_app | ( | bool | enabled | ) |
API to allow or disallow the user to stop a system application.
[in] | enabled | The status of the policy, true for enabled or false otherwise |
MDM_RESULT_SUCCESS | Successful |
MDM_RESULT_FAIL | General failure |
MDM_RESULT_NOT_SUPPORTED | Not supported |
MDM_RESULT_INVALID_PARAM | Invalid parameter |
MDM_RESULT_ACCESS_DENIED | The application does not have the privilege to call this function. |
mdm_data_t* mdm_get_all_location_providers | ( | void | ) |
API to get all available location services on the device.
mdm_status_t mdm_get_allow_bluetooth_tethering | ( | void | ) |
API to check whether Bluetooth tethering is enabled or not.
mdm_status_t mdm_get_allow_cellular_data | ( | void | ) |
API to check if cellular data is enabled or disabled.
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.
mdm_status_t mdm_get_allow_home_key | ( | void | ) |
API to check whether the home key is enabled or not.
mdm_status_t mdm_get_allow_license_activation | ( | void | ) |
API to block other MDM clients ability to activate license.
.
MDM_RESTRICTED | blocked |
MDM_ALLOWED | allowed |
MDM_STATUS_ERROR | Fail |
mdm_status_t mdm_get_allow_nfc | ( | void | ) |
API to check whether NFC is enabled or not.
mdm_status_t mdm_get_allow_screen_capture | ( | void | ) |
API to check whether screen capture setting is enabled or not.
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.
mdm_status_t mdm_get_allow_usb_debugging | ( | void | ) |
API to check if USB debugging is allowed on a device.
MDM_ALLOWED | USB debugging is allowed on the device. |
MDM_RESTRICTED | USB debugging is restricted on the device. |
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.
[in] | p_provider | The case sensitive location provider name. Sample values are gps, network, passive. |
[in] | p_status | Get information of location. |
MDM_RESULT_SUCCESS | Successful |
MDM_RESULT_FAIL | General failure |
MDM_RESULT_NOT_SUPPORTED | Not supported |
MDM_RESULT_INVALID_PARAM | Invalid parameter |
MDM_RESULT_ACCESS_DENIED | The application does not have the privilege to call this function. |
mdm_status_t mdm_is_firmware_recovery_allowed | ( | void | ) |
API to check if the end user is allowed to perform a firmware recovery.
mdm_status_t mdm_is_power_off_allowed | ( | void | ) |
API to check whether the user is allowed to power off the device.
mdm_status_t mdm_is_stop_system_app_allowed | ( | void | ) |
API to check whether the user is allowed to stop a system application.
mdm_result_t mdm_set_allow_bluetooth_tethering | ( | mdm_status_t | value | ) |
API to enable or disable Bluetooth Tethering.
[in] | value | MDM_ALLOWED = 0, MDM_RESTRICTED = 1, |
MDM_RESULT_SUCCESS | Successful |
MDM_RESULT_FAIL | General failure |
MDM_RESULT_NOT_SUPPORTED | Not supported |
MDM_RESULT_INVALID_PARAM | Invalid parameter |
MDM_RESULT_ACCESS_DENIED | The application does not have the privilege to call this function. |
mdm_result_t mdm_set_allow_cellular_data | ( | mdm_status_t | value | ) |
API to enable or disable cellular data.
[in] | value | MDM_ALLOWED = 0, MDM_RESTRICTED = 1, |
MDM_RESULT_SUCCESS | Successful |
MDM_RESULT_FAIL | General failure |
MDM_RESULT_NOT_SUPPORTED | Not supported |
MDM_RESULT_INVALID_PARAM | Invalid parameter |
MDM_RESULT_ACCESS_DENIED | The application does not have the privilege to call this function. |
mdm_result_t mdm_set_allow_clipboard | ( | mdm_status_t | value | ) |
API to enable or disable Clipboard.
[in] | value | MDM_ALLOWED = 0, MDM_RESTRICTED = 1, |
MDM_RESULT_SUCCESS | Successful |
MDM_RESULT_FAIL | General failure |
MDM_RESULT_NOT_SUPPORTED | Not supported |
MDM_RESULT_INVALID_PARAM | Invalid parameter |
MDM_RESULT_ACCESS_DENIED | The application does not have the privilege to call this function. |
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.
[in] | value | MDM_ALLOWED = 0, MDM_RESTRICTED = 1, |
MDM_RESULT_SUCCESS | Successful |
MDM_RESULT_FAIL | General failure |
MDM_RESULT_NOT_SUPPORTED | Not supported |
MDM_RESULT_INVALID_PARAM | Invalid parameter |
MDM_RESULT_ACCESS_DENIED | The application does not have the privilege to call this function. |
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.
[in] | value | MDM_ALLOWED = 0, MDM_RESTRICTED = 1, |
MDM_RESULT_SUCCESS | Successful |
MDM_RESULT_FAIL | General failure |
MDM_RESULT_NOT_SUPPORTED | Not supported |
MDM_RESULT_INVALID_PARAM | Invalid parameter |
MDM_RESULT_ACCESS_DENIED | The application does not have the privilege to call this function. |
mdm_result_t mdm_set_allow_license_activation | ( | mdm_status_t | is_blocked | ) |
API to block other clients ability to activate license.
.
[in] | is_blocked | MDM_RESTRICTED to block license activation, MDM_ALLOWED to unblock |
MDM_RESULT_SUCCESS | Successful |
MDM_RESULT_FAIL | General failure |
MDM_RESULT_NOT_SUPPORTED | Not supported |
MDM_RESULT_INVALID_PARAM | Invalid parameter |
mdm_result_t mdm_set_allow_nfc | ( | mdm_status_t | value | ) |
API to enable or disable NFC.
[in] | value | MDM_ALLOWED = 0, MDM_RESTRICTED = 1, |
MDM_RESULT_SUCCESS | Successful |
MDM_RESULT_FAIL | General failure |
MDM_RESULT_NOT_SUPPORTED | Not supported |
MDM_RESULT_INVALID_PARAM | Invalid parameter |
MDM_RESULT_ACCESS_DENIED | The application does not have the privilege to call this function. |
mdm_result_t mdm_set_allow_screen_capture | ( | mdm_status_t | value | ) |
API to enable or disable screen capture.
[in] | value | MDM_ALLOWED = 0, MDM_RESTRICTED = 1, |
MDM_RESULT_SUCCESS | Successful |
MDM_RESULT_FAIL | General failure |
MDM_RESULT_NOT_SUPPORTED | Not supported |
MDM_RESULT_INVALID_PARAM | Invalid parameter |
MDM_RESULT_ACCESS_DENIED | The application does not have the privilege to call this function. |
mdm_result_t mdm_set_allow_settings_changes | ( | mdm_status_t | value | ) |
API to allow or deny changes to Settings applications.
[in] | value | MDM_ALLOWED = 0, MDM_RESTRICTED = 1, |
MDM_RESULT_SUCCESS | Successful |
MDM_RESULT_FAIL | General failure |
MDM_RESULT_NOT_SUPPORTED | Not supported |
MDM_RESULT_INVALID_PARAM | Invalid parameter |
MDM_RESULT_ACCESS_DENIED | The application does not have the privilege to call this function. |
mdm_result_t mdm_set_allow_usb_debugging | ( | mdm_status_t | value | ) |
API to enable or disable USB debugging.
[in] | value | MDM_ALLOWED = 0, MDM_RESTRICTED = 1, |
MDM_RESULT_SUCCESS | Successful |
MDM_RESULT_FAIL | General failure |
MDM_RESULT_NOT_SUPPORTED | Not supported |
MDM_RESULT_INVALID_PARAM | Invalid parameter |
MDM_RESULT_ACCESS_DENIED | The application does not have the privilege to call this function. |
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.
[in] | p_provider | The case sensitive location provider name. Sample values are gps, network, passive. |
[in] | enable | True to enable the location provider, false to disable the provider. |
MDM_RESULT_SUCCESS | Successful |
MDM_RESULT_FAIL | General failure |
MDM_RESULT_NOT_SUPPORTED | Not supported |
MDM_RESULT_INVALID_PARAM | Invalid parameter |
MDM_RESULT_ACCESS_DENIED | The application does not have the privilege to call this function. |