Knox Tizen Wearable SDK
|
Kiosk policy group provides policies for Kiosk mode. More...
Functions | |
mdm_result_t | knox_mdm_set_allow_hardware_key (const char *key_name, mdm_status_t allow) |
API to disable a specified hardware key. More... | |
mdm_status_t | knox_mdm_get_allow_hardware_key (const char *key_name) |
API to check if a specific hardware key is disabled. More... | |
Kiosk policy group provides policies for Kiosk mode.
Kiosk policy group.
#include <mdm.h>
This group provides APIs to set Kiosk mode.
mdm_status_t knox_mdm_get_allow_hardware_key | ( | const char * | key_name | ) |
API to check if a specific hardware key is disabled.
[in] | key_name | Specifies the name of the hardware key to be checked in the form of strings. Check the Tizen documentation page, under the section " Grabbing Hardware Key Events", to find name definitions. For example, under the description for "eext_win_keygrab_set," the name for home key is “XF86Home”. |
MDM_ALLOWED | Specific hardware key is enabled. |
MDM_RESTRICTED | Specific hardware key is disabled. |
MDM_STATUS_ERROR | Error |
mdm_result_t knox_mdm_set_allow_hardware_key | ( | const char * | key_name, |
mdm_status_t | allow | ||
) |
API to disable a specified hardware key.
[in] | key_name | Identifies the name of the key in the form of a string. Check the Tizen documentation page, under the section "Grabbing Hardware Key Events", to find name definitions. For example, under the description for "eext_win_keygrab_set," the name for home key is “XF86Home”. NOTE — Key_name can be set to “*” string to indicate “all keys”. |
[in] | allow | MDM_ALLOWED — The specified key is allowed to send an event to an application. This is similar to adding the key to a key white list. MDM_RESTRICTED — The specified key is restricted from sending an event to an application. This is similar to adding the key to a key black list. |
Imagine that there are two lists: black and white. If key name is in black list it is restricted but if it is on white list it is allowed to send events. By default key is allowed (it is not on any list). So below table describes behavior of this policy under different conditions:
| key_name value | allow value | description |
|-----------------------------—|-------------—|-----------------------------------------------------------------------------------------------------—| | "*" | MDM_ALLOWED | Clear black and white list. | | "*" | MDM_RESTRICTED | Clear black and white list. Add "*" to black list. | | < key name>
e.g. "XF86Home" | MDM_ALLOWED | If black list is equal to "*" add key to white list.
If black list is not equal to "*" remove key from black list if it exist there. | |< key name>
e.g. "XF86Home" | MDM_RESTRICTED | If black list is equal to "*" do nothing.
If black list is not equal to "*" add key to black list. |
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. |