Knox Tizen Wearable SDK
|
Application policy group provides policies for application control. More...
Data Structures | |
struct | app_usage_t |
Application usage. More... | |
struct | app_data_usage_t |
Application data usage. More... | |
struct | app_network_stats_t |
Application network statistics. More... | |
struct | app_control_info_t |
Application control info. More... | |
Enumerations |
Functions | |
mdm_result_t | mdm_install_application (const char *pkg_path) |
API to install an application package on the device. More... | |
mdm_result_t | mdm_update_application (const char *pkg_path) |
API to update an application package on the device. More... | |
mdm_result_t | mdm_disable_application (const char *pkg_name) |
API to disable an application package without uninstalling it. More... | |
mdm_result_t | mdm_enable_application (const char *pkg_name) |
API to enable an application package that was previously disabled. More... | |
mdm_result_t | mdm_uninstall_application (const char *pkg_name) |
API to uninstall an application package. More... | |
mdm_status_t | mdm_get_application_state (const char *pkg_name) |
API to check whether a given application package is enabled or disabled. More... | |
mdm_data_t * | mdm_uninstall_applications (GList *pkg_list) |
API for bulk uninstallation of application packages. More... | |
mdm_result_t | mdm_set_application_installation_disabled (const char *pkg_name) |
API to disable the installation of application package. More... | |
mdm_result_t | mdm_set_application_installation_enabled (const char *pkg_name) |
API to enable the installation of application package, that was previously disabled. More... | |
mdm_status_t | mdm_get_application_installation_disabled (const char *pkg_name) |
API to check whether a particular application package can be installed. More... | |
mdm_result_t | mdm_set_application_uninstallation_disabled (const char *pkg_name) |
API to disable the uninstallation of an application package. More... | |
mdm_result_t | mdm_set_application_uninstallation_enabled (const char *pkg_name) |
API to enable the uninstallation of an application package. More... | |
mdm_status_t | mdm_get_application_uninstallation_disabled (const char *pkg_name) |
API to check if an application can be uninstalled. More... | |
mdm_result_t | mdm_set_application_state (const char *pkg_name, mdm_app_status_t state) |
API to set the state of an application. More... | |
mdm_status_t | mdm_is_application_installed (const char *pkg_name) |
API to check if an application package is installed. More... | |
mdm_status_t | mdm_is_application_running (const char *app_id) |
API to check if an application is currently running. More... | |
mdm_data_t * | mdm_get_application_name (const char *pkg_name) |
API to get the name of an application. More... | |
mdm_data_t * | mdm_get_application_version (const char *pkg_name) |
API to get the application version. More... | |
mdm_data_t * | mdm_get_installed_applications_list (void) |
API to get a list of all installed application packages. More... | |
mdm_result_t | mdm_start_application (const char *app_id) |
API to launch an application. More... | |
mdm_result_t | mdm_stop_application (const char *app_id) |
API to stop an application. More... | |
mdm_data_t * | mdm_set_application_state_list (GList *pkg_list, mdm_app_status_t state) |
API to set the state of a list of applications. More... | |
mdm_data_t * | mdm_get_application_state_list (mdm_app_status_t state) |
API to get the list of applications on the device that have the specified state. More... | |
mdm_result_t | mdm_set_application_installation_mode (mdm_status_t state) |
API to set the default application installation mode. More... | |
mdm_status_t | mdm_get_application_installation_mode (void) |
API to get the current installation mode for all applications. More... | |
mdm_data_t * | mdm_get_application_code_size (const char *pkg_name) |
API to get the code size of an application. More... | |
mdm_data_t * | mdm_get_application_data_size (const char *pkg_name) |
API to get the data size of an application. More... | |
mdm_data_t * | mdm_get_application_total_size (const char *pkg_name) |
API to get the total size of an application, which includes both code and data. More... | |
mdm_result_t | mdm_get_application_memory_usage (const char *app_id, unsigned int *usage) |
API to get the RAM memory usage of an application. More... | |
mdm_result_t | mdm_get_application_cpu_usage (const char *app_id, unsigned long *usage) |
API to get the CPU usage of an application. More... | |
mdm_data_t * | mdm_get_most_cpu_usage_apps (int appCount, mdm_status_t showAllProcess) |
API to get a list of running applications or processes that have the highest CPU usage. More... | |
mdm_data_t * | mdm_get_most_memory_usage_apps (int appCount, mdm_status_t showAllProcess) |
API to get a list of running applications or processes that have the highest memory usage. More... | |
mdm_data_t * | mdm_get_most_data_usage_apps (int appCount) |
API to get a list of application packages that have the highest data usage. More... | |
mdm_data_t * | mdm_get_application_network_status_list (void) |
API to get a list of applications and their corresponding network traffic usage. More... | |
mdm_result_t | mdm_add_app_package_name_to_whitelist (const char *pkg_name) |
API to add an application package name to the application package name whitelist. More... | |
mdm_data_t * | mdm_get_app_package_names_all_whitelist (void) |
API to get whitelist of application package names for all admins. More... | |
mdm_result_t | mdm_remove_app_package_name_from_whitelist (const char *pkg_name) |
API to remove an application package name from the application package name whitelist. More... | |
mdm_result_t | mdm_clear_all_app_package_names_from_installation_whitelist (void) |
API to remove all application package names from the installation whitelist. More... | |
mdm_result_t | mdm_clear_all_app_package_names_from_uninstallation_whitelist (void) |
API to remove all application package names from the uninstallation whitelist. More... | |
mdm_result_t | mdm_add_app_package_name_to_blacklist (const char *pkg_name) |
Add an application package name to the application package name blacklist. More... | |
mdm_data_t * | mdm_get_app_package_names_all_blacklist (void) |
API to get the list of blacklisted application package names for all admins. More... | |
mdm_result_t | mdm_remove_app_package_name_from_blacklist (const char *pkg_name) |
API to remove an application package name from the application package name blacklist. More... | |
mdm_result_t | mdm_clear_all_app_package_names_from_installation_blacklist (void) |
API to remove all application package names from the installation blacklist. More... | |
mdm_result_t | mdm_clear_all_app_package_names_from_uninstallation_blacklist (void) |
API to remove all application package names from the uninstallation blacklist. More... | |
mdm_result_t | mdm_set_application_uninstallation_mode (mdm_status_t value) |
API to set the default mode for application uninstallation. More... | |
mdm_status_t | mdm_get_application_uninstallation_mode (void) |
API to get the current uninstallation mode for all applications. More... | |
mdm_result_t | knox_mdm_add_privacy_permission_state_for_package (const char *package_name, const char *privilege, mdm_privacy_permission_state_t state) |
API to set runtime permission state for specified application package. More... | |
mdm_result_t | knox_mdm_remove_privacy_permissions_from_packages (const char *package_name_pattern, const char *privilege_pattern) |
API to remove the state of a particular permission for specific application packages. More... | |
mdm_result_t | knox_mdm_get_privacy_permission_state_for_package (const char *package_name, const char *privilege, bool all_admins, mdm_privacy_permission_state_t *state) |
API to get current state of a particular runtime permission for selected package name. More... | |
mdm_data_t * | knox_mdm_get_privacy_permission_data (const char *package_name_pattern, const char *privilege_pattern, bool all_admins, mdm_privacy_permission_state_t state_pattern) |
API to get current state of a particular runtime privacy permission for selected packages and privileges. More... | |
mdm_status_t | knox_mdm_widget_board_get_edit_permission (bool all_admins) |
API to get information about whether any widget board edition is allowed. For more about widgets, see Widgets. More... | |
mdm_result_t | knox_mdm_widget_board_set_edit_permission (mdm_status_t status) |
API to set whether the widget board can be edited. More... | |
Application policy group provides policies for application control.
Application policy group.
#include <mdm.h>
This group provides APIs to control application related functionality and restrictions. This API provides the following functions:
Note: All the APIs parameters in this class are case sensitive.
enum mdm_app_status_t |
Possible MDM application statuses.
Enumerator | |
---|---|
MDM_APP_ENABLE |
application enable |
MDM_APP_DISABLE |
application disable |
Definition at line 35 of file application.h.
mdm_result_t knox_mdm_add_privacy_permission_state_for_package | ( | const char * | package_name, |
const char * | privilege, | ||
mdm_privacy_permission_state_t | state | ||
) |
API to set runtime permission state for specified application package.
[in] | package_name | application installation package name |
[in] | privilege | name of selected privilege for example to camera or gps location |
[in] | state | Use MDM_PRIVACY_PERMISSION_STATE_ALLOW to give permission MDM_PRIVACY_PERMISSION_STATE_DENY to restrict permission. |
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* knox_mdm_get_privacy_permission_data | ( | const char * | package_name_pattern, |
const char * | privilege_pattern, | ||
bool | all_admins, | ||
mdm_privacy_permission_state_t | state_pattern | ||
) |
API to get current state of a particular runtime privacy permission for selected packages and privileges.
[in] | package_name_pattern | Application installation package name pattern with perl like regular expressions |
[in] | privilege_pattern | Name pattern of selected privilege for example to camera or calendar with perl regular expressions |
[in] | all_admins | Specifies whether final policy value for all admins is returned (for true) or the value set by current calling admin (for false). |
[in] | state_pattern | Use MDM_PRIVACY_PERMISSION_STATE_ALLOW or MDM_PRIVACY_PERMISSION_STATE_DENY or MDM_PRIVACY_PERMISSION_STATE_ANY to query both options at once. |
mdm_result_t knox_mdm_get_privacy_permission_state_for_package | ( | const char * | package_name, |
const char * | privilege, | ||
bool | all_admins, | ||
mdm_privacy_permission_state_t * | state | ||
) |
API to get current state of a particular runtime permission for selected package name.
[in] | package_name | Application installation package name |
[in] | privilege | Name of selected privilege for example to camera or calendar |
[in] | all_admins | Specifies whether final policy value for all admins is returned (for true) or the value set by current calling admin (for false). |
[out] | state | current permission state: MDM_PRIVACY_PERMISSION_STATE_ALLOW given runtime privilege will be always granted MDM_PRIVACY_PERMISSION_STATE_DENY given runtime privilege will be always rejected without asking user. MDM_PRIVACY_PERMISSION_STATE_ANY as unknown. |
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_remove_privacy_permissions_from_packages | ( | const char * | package_name_pattern, |
const char * | privilege_pattern | ||
) |
API to remove the state of a particular permission for specific application packages.
[in] | package_name_pattern | application installation package name pattern |
[in] | privilege_pattern | pattern for selected privileges for example to camera or gps 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 knox_mdm_widget_board_get_edit_permission | ( | bool | all_admins | ) |
API to get information about whether any widget board edition is allowed. For more about widgets, see Widgets.
[in] | all_admins | Specifies whether final policy value for all admins is returned or the value set by current calling admin. Use #true to get final policy value computed based on input from all administrators, or #false to get policy value specified by current calling admin. |
MDM_ALLOWED | Allowed |
MDM_RESTRICTED | Restricted |
mdm_result_t knox_mdm_widget_board_set_edit_permission | ( | mdm_status_t | status | ) |
API to set whether the widget board can be edited.
[in] | status | The edit mode to set to widget board. Use MDM_ALLOWED to allow to be edited, or MDM_RESTRICTED to prevent being edited. |
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 | Application does not have privilege to call this function. |
mdm_result_t mdm_add_app_package_name_to_blacklist | ( | const char * | pkg_name | ) |
Add an application package name to the application package name blacklist.
[in] | pkg_name | The application package name to add to the blacklist. |
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_add_app_package_name_to_whitelist | ( | const char * | pkg_name | ) |
API to add an application package name to the application package name whitelist.
[in] | pkg_name | The application package name to add to the whitelist. |
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_clear_all_app_package_names_from_installation_blacklist | ( | void | ) |
API to remove all application package names from the installation blacklist.
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_clear_all_app_package_names_from_installation_whitelist | ( | void | ) |
API to remove all application package names from the installation whitelist.
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_clear_all_app_package_names_from_uninstallation_blacklist | ( | void | ) |
API to remove all application package names from the uninstallation blacklist.
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_clear_all_app_package_names_from_uninstallation_whitelist | ( | void | ) |
API to remove all application package names from the uninstallation whitelist.
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_disable_application | ( | const char * | pkg_name | ) |
API to disable an application package without uninstalling it.
[in] | pkg_name | The name of the application package to disable. |
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_enable_application | ( | const char * | pkg_name | ) |
API to enable an application package that was previously disabled.
[in] | pkg_name | The name of the application package to enable. |
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_app_package_names_all_blacklist | ( | void | ) |
API to get the list of blacklisted application package names for all admins.
mdm_data_t* mdm_get_app_package_names_all_whitelist | ( | void | ) |
API to get whitelist of application package names for all admins.
mdm_data_t* mdm_get_application_code_size | ( | const char * | pkg_name | ) |
API to get the code size of an application.
[in] | pkg_name | The package name of the application. |
mdm_result_t mdm_get_application_cpu_usage | ( | const char * | app_id, |
unsigned long * | usage | ||
) |
API to get the CPU usage of an application.
[in] | app_id | The application ID. |
[out] | usage | The amount of CPU being used by the application. |
MDM_RESULT_SUCCESS
on success, MDM_RESULT_FAIL
on failure.MDM_RESULT_SUCCESS | 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_data_t* mdm_get_application_data_size | ( | const char * | pkg_name | ) |
API to get the data size of an application.
[in] | pkg_name | The package name of the application. |
mdm_status_t mdm_get_application_installation_disabled | ( | const char * | pkg_name | ) |
API to check whether a particular application package can be installed.
[in] | pkg_name | The name of the application package to check. |
MDM_DISABLED | Installation of the package is disabled. |
MDM_ENABLED | Installation of the package is enabled. |
MDM_STATUS_ERROR | Fail to check whether the application can be installed. |
mdm_status_t mdm_get_application_installation_mode | ( | void | ) |
API to get the current installation mode for all applications.
mdm_set_application_installation_mode()
.MDM_ALLOWED | Allowed |
MDM_RESTRICTED | Restricted |
mdm_result_t mdm_get_application_memory_usage | ( | const char * | app_id, |
unsigned int * | usage | ||
) |
API to get the RAM memory usage of an application.
[in] | app_id | The application ID. |
[out] | usage | The application's memory usage (in KB). |
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_application_name | ( | const char * | pkg_name | ) |
API to get the name of an application.
[in] | pkg_name | The package name of the application. |
mdm_data_t* mdm_get_application_network_status_list | ( | void | ) |
API to get a list of applications and their corresponding network traffic usage.
mdm_status_t mdm_get_application_state | ( | const char * | pkg_name | ) |
API to check whether a given application package is enabled or disabled.
[in] | pkg_name | The name of the application package to verify. |
MDM_ALLOWED | Application package is enabled |
MDM_RESTRICTED | Applicaiton package is disabled. |
mdm_data_t* mdm_get_application_state_list | ( | mdm_app_status_t | state | ) |
API to get the list of applications on the device that have the specified state.
[in] | state | value that will mention whether to get the list of disabled or enabled apps. If the state value is MDM_APP_DISABLE , it will return list of all disabled applications while if the state value is MDM_APP_ENABLE , it will return the list of all enabled apps. |
mdm_data_t
that includes a list of applications with enabled or disabled state, or NULL if there are not applications with such state.mdm_data_t* mdm_get_application_total_size | ( | const char * | pkg_name | ) |
API to get the total size of an application, which includes both code and data.
[in] | pkg_name | The package name of the application. |
mdm_status_t mdm_get_application_uninstallation_disabled | ( | const char * | pkg_name | ) |
API to check if an application can be uninstalled.
This function returns MDM_DISABLED
if the user cannot uninstall the application.
[in] | pkg_name | The package name of application to check. |
MDM_DISABLED | Uninstallation of the package is disabled. |
MDM_ENABLED | Uninstallation of the package is enabled. |
MDM_STATUS_ERROR | Fail to check whether the application can be uninstalled. |
mdm_status_t mdm_get_application_uninstallation_mode | ( | void | ) |
API to get the current uninstallation mode for all applications.
mdm_set_application_uninstallation_mode()
.MDM_ALLOWED | Allowed |
MDM_RESTRICTED | Restricted |
mdm_data_t* mdm_get_application_version | ( | const char * | pkg_name | ) |
API to get the application version.
[in] | pkg_name | The package name of the application. |
mdm_data_t* mdm_get_installed_applications_list | ( | void | ) |
API to get a list of all installed application packages.
mdm_data_t* mdm_get_most_cpu_usage_apps | ( | int | appCount, |
mdm_status_t | showAllProcess | ||
) |
API to get a list of running applications or processes that have the highest CPU usage.
[in] | appCount | The number of applications to include in the list. If this is set to less than 0 or greater than the number of running applications, then the list size will be equal to the total number of running applications. |
[in] | showAllProcess | Set this to MDM_TRUE to include system processes when building the list. Otherwise, only installed application processes will be used when building the list. |
usage
field contains the percentage of CPU used by the application. NULL is returned on error.mdm_data_t* mdm_get_most_data_usage_apps | ( | int | appCount | ) |
API to get a list of application packages that have the highest data usage.
[in] | appCount | The number of applications to include in the list. If this is set to less than 0 or greater than the number of available applications, then the list size will be equal to the total number of available applications. |
usage
field contains the amount of data (in bytes) used by the application. NULL is returned on error.mdm_data_t* mdm_get_most_memory_usage_apps | ( | int | appCount, |
mdm_status_t | showAllProcess | ||
) |
API to get a list of running applications or processes that have the highest memory usage.
[in] | appCount | The number of running applications to include in the list. If this is set to less than 0 or greater than the number of running applications, then the list size will be equal to the total number of running applications. |
[in] | showAllProcess | Set this to MDM_TRUE to include system processes when building the list. Otherwise, only installed application processes will be used when building the list. |
usage
field contains the amount of memory (in bytes) used by the application. NULL is returned on error.mdm_result_t mdm_install_application | ( | const char * | pkg_path | ) |
API to install an application package on the device.
[in] | pkg_path | The path to the application package to install. |
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_application_installed | ( | const char * | pkg_name | ) |
API to check if an application package is installed.
[in] | pkg_name | The application package name to check. |
mdm_status_t mdm_is_application_running | ( | const char * | app_id | ) |
API to check if an application is currently running.
[in] | app_id | The application id inside application package to be verified. |
mdm_result_t mdm_remove_app_package_name_from_blacklist | ( | const char * | pkg_name | ) |
API to remove an application package name from the application package name blacklist.
[in] | pkg_name | The application package name to remove from the blacklist. |
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_remove_app_package_name_from_whitelist | ( | const char * | pkg_name | ) |
API to remove an application package name from the application package name whitelist.
[in] | pkg_name | The application package name to remove from the whitelist. |
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_application_installation_disabled | ( | const char * | pkg_name | ) |
API to disable the installation of application package.
[in] | pkg_name | The name of the application package to disable the installation of. |
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_application_installation_enabled | ( | const char * | pkg_name | ) |
API to enable the installation of application package, that was previously disabled.
[in] | pkg_name | The name of the application package to enable the installation of. |
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_application_installation_mode | ( | mdm_status_t | state | ) |
API to set the default application installation mode.
MDM_RESTRICTED
, then no applications can be installed on the device, except for those that the admin allows to be installed by calling mdm_set_application_installation_enabled()
.If you set the default mode to MDM_ALLOWED
, then all applications can be installed on the device, except for those that the admin blocks from being installed by calling mdm_set_application_installation_disabled()
.
The default mode is MDM_ALLOWED
, which allows any application package to be installed.
[in] | state | The default installation mode to set. Use MDM_ALLOWED to allow all apps to be installed, or MDM_RESTRICTED to prevent any apps from being installed. |
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_application_state | ( | const char * | pkg_name, |
mdm_app_status_t | state | ||
) |
API to set the state of an application.
mdm_enable_application
or mdm_disable_application
.[in] | pkg_name | The application package name to be enabled/disabled. |
[in] | state | Set to MDM_APP_ENABLE to enable the application; set to MDM_APP_DISABLE to disable the application. |
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_set_application_state_list | ( | GList * | pkg_list, |
mdm_app_status_t | state | ||
) |
API to set the state of a list of applications.
It can also be used to enable previously disabled applications when a user leaves the enterprise.
The state of an application determines whether the user can use the app (MDM_APP_ENABLE
), or cannot use the app (MDM_APP_DISABLE
).
[in] | pkg_list | The list of applications whose state is to be set. |
[in] | state | Set to MDM_APP_ENABLE to enable the apps, and set to MDM_APP_DISABLE to disable the apps. |
mdm_data_t
that includes a list of applications whose states were set successfully.mdm_result_t mdm_set_application_uninstallation_disabled | ( | const char * | pkg_name | ) |
API to disable the uninstallation of an application package.
[in] | pkg_name | The name of the application package to remove the ability of the user to uninstall. |
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_application_uninstallation_enabled | ( | const char * | pkg_name | ) |
API to enable the uninstallation of an application package.
[in] | pkg_name | The package name of the app to allow the user to uninstall. |
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_application_uninstallation_mode | ( | mdm_status_t | value | ) |
API to set the default mode for application uninstallation.
MDM_RESTRICTED
, then no applications can be uninstalled from the device, except for those that the admin allows to be uninstalled by calling mdm_set_application_uninstallation_enabled()
.If you set the default mode to MDM_ALLOWED
, then all applications can be uninstalled from the device, except for those that the admin blocks from being uninstalled by calling mdm_set_application_uninstallation_disabled()
.
The default mode is MDM_ALLOWED
, which allows any application package to be uninstalled.
[in] | value | The default installation mode to set. Use MDM_ALLOWED to allow all apps to be uninstalled, or MDM_RESTRICTED to prevent any apps from being uninstalled. |
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_start_application | ( | const char * | app_id | ) |
API to launch an application.
[in] | app_id | The ID of the application to start. |
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_stop_application | ( | const char * | app_id | ) |
API to stop an application.
[in] | app_id | The ID of the application to stop. |
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_uninstall_application | ( | const char * | pkg_name | ) |
API to uninstall an application package.
[in] | pkg_name | The name of the application package to uninstall. |
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_uninstall_applications | ( | GList * | pkg_list | ) |
API for bulk uninstallation of application packages.
[in] | pkg_list | The list of application packages to uninstall. |
mdm_result_t mdm_update_application | ( | const char * | pkg_path | ) |
API to update an application package on the device.
[in] | pkg_path | The path to the application package to update. |
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. |