Tizen Native API
5.5
|
Restriction policy group provides APIs to control restriction functionality.
Required Header
#include <dpm/restriction.h>
Overview
Restriction policy group provides APIs to restrict functions of the device such as Camera, Microphone, Wi-Fi, bluetooth, USB and so on. Any API which requires privileges is only available for the registered device admin client which is enrolled to the device by enrollment process.
Functions | |
int | dpm_restriction_set_camera_state (device_policy_manager_h handle, int allow) |
Allows or disallows the use of camera. | |
int | dpm_restriction_get_camera_state (device_policy_manager_h handle, int *is_allowed) |
Check whether the use of camera is allowed or not. | |
int | dpm_restriction_set_microphone_state (device_policy_manager_h handle, int allow) |
Allows or disallows the use of microphone. | |
int | dpm_restriction_get_microphone_state (device_policy_manager_h handle, int *is_allowed) |
Checks whether the use of microphone is allowed or not. | |
int | dpm_restriction_set_location_state (device_policy_manager_h handle, int allow) |
Allows or disallows user to change the location state. | |
int | dpm_restriction_get_location_state (device_policy_manager_h handle, int *is_allowed) |
Check whether user is allowed to change location state or not. | |
int | dpm_restriction_set_external_storage_state (device_policy_manager_h handle, int allow) |
Allows or disallows user to use usb mass storage. | |
int | dpm_restriction_get_external_storage_state (device_policy_manager_h handle, int *is_allowed) |
Checks whether the use of external storage is allowed or not. | |
int | dpm_restriction_set_clipboard_state (device_policy_manager_h handle, int allow) |
Allows or disallows user to access the clipboard. | |
int | dpm_restriction_get_clipboard_state (device_policy_manager_h handle, int *is_allowed) |
Checks whether the clipboard access is allowed or not. | |
int | dpm_restriction_set_usb_debugging_state (device_policy_manager_h handle, int allow) |
Allows or disallows the usb debugging. | |
int | dpm_restriction_get_usb_debugging_state (device_policy_manager_h handle, int *is_allowed) |
Checks whether the usb debugging is allowed or not. | |
int | dpm_restriction_set_wifi_state (device_policy_manager_h handle, int allow) |
Allows or disallows user to change the Wi-Fi state. | |
int | dpm_restriction_get_wifi_state (device_policy_manager_h handle, int *is_allowed) |
Checks whether the Wi-Fi state change is allowed or not. | |
int | dpm_restriction_set_wifi_hotspot_state (device_policy_manager_h handle, int allow) |
Allows or disallows user to change Wi-Fi hotspot state change. | |
int | dpm_restriction_get_wifi_hotspot_state (device_policy_manager_h handle, int *is_allowed) |
Checks whether the the Wi-Fi hotspot state change is allowed or not. | |
int | dpm_restriction_set_bluetooth_tethering_state (device_policy_manager_h handle, int allow) |
Allows or disallows user to change the bluetooth tethering state. | |
int | dpm_restriction_get_bluetooth_tethering_state (device_policy_manager_h handle, int *is_allowed) |
Checks whether the bluetooth tethering state change is allowed. | |
int | dpm_restriction_set_usb_tethering_state (device_policy_manager_h handle, int allow) |
Allows or disallows user to change USB tethering settings. | |
int | dpm_restriction_get_usb_tethering_state (device_policy_manager_h handle, int *is_allowed) |
Checks whether the USB tethering state change is allowed. | |
int | dpm_restriction_set_bluetooth_mode_change_state (device_policy_manager_h handle, int allow) |
Allows or disallows user to change the bluetooth state. | |
int | dpm_restriction_get_bluetooth_mode_change_state (device_policy_manager_h handle, int *is_allowed) |
Checks whether the the bluetooth state change is allowed of not. | |
int | dpm_restriction_set_bluetooth_desktop_connectivity_state (device_policy_manager_h handle, int allow) |
Allows or disallows the bluetooth desktop connectivity. | |
int | dpm_restriction_get_bluetooth_desktop_connectivity_state (device_policy_manager_h handle, int *is_allowed) |
Checks whether the the Bluetooth desktop connectivity is allowed or not. | |
int | dpm_restriction_set_bluetooth_pairing_state (device_policy_manager_h handle, int allow) |
Allows or disallows user to change the bluetooth pairing. | |
int | dpm_restriction_get_bluetooth_pairing_state (device_policy_manager_h handle, int *is_allowed) |
Checks whether the the bluetooth pairing is allowed or not. | |
int | dpm_restriction_set_messaging_state (device_policy_manager_h handle, const char *sim_id, int allow) |
Allows or disallows user to use of SMS or text messaging. | |
int | dpm_restriction_get_messaging_state (device_policy_manager_h handle, const char *sim_id, int *is_allowed) |
Checks whether the text messaging is allowed or not. | |
int | dpm_restriction_set_popimap_email_state (device_policy_manager_h handle, int allow) |
Allows or disallows the access to POP or IMAP email. | |
int | dpm_restriction_get_popimap_email_state (device_policy_manager_h handle, int *is_allowed) |
Checks whether the access to POP or IMAP email is allowed or not. | |
int | dpm_restriction_set_browser_state (device_policy_manager_h handle, int allow) |
Allows or disallows the use of web browser. | |
int | dpm_restriction_get_browser_state (device_policy_manager_h handle, int *is_allowed) |
Checks whether the use of web browser is allowed or not. |
Function Documentation
int dpm_restriction_get_bluetooth_desktop_connectivity_state | ( | device_policy_manager_h | handle, |
int * | is_allowed | ||
) |
Checks whether the the Bluetooth desktop connectivity is allowed or not.
An administrator can use this API to check whether the Bluetooth desktop connectivity is allowed or not. If the Bluetooth desktop connectivity is disallowed, the UI is grayed out so user can not change its state.
- Since :
- 3.0
- Parameters:
-
[in] handle Device policy manager handle [out] is_allowed true if the connectivity is allowed, false otherwise.
- Returns:
- DPM_ERROR_NONE on success, otherwise a negative value
- Return values:
-
DPM_ERROR_NONE Successful DPM_ERROR_TIMED_OUT Time out DPM_ERROR_INVALID_PARAMETER Invalid parameter
- Precondition:
- The handle must be created by dpm_manager_create().
int dpm_restriction_get_bluetooth_mode_change_state | ( | device_policy_manager_h | handle, |
int * | is_allowed | ||
) |
Checks whether the the bluetooth state change is allowed of not.
An administrator can use this API to check whether the bluetooth state change is allowed or not. If the bluetooth state change is disallowed, the UI is grayed out so user can not change its state.
- Since :
- 3.0
- Parameters:
-
[in] handle Device policy manager handle [out] is_allowed true if the change is allowed, false otherwise.
- Returns:
- DPM_ERROR_NONE on success, otherwise a negative value
- Return values:
-
DPM_ERROR_NONE Successful DPM_ERROR_TIMED_OUT Time out DPM_ERROR_INVALID_PARAMETER Invalid parameter
- Precondition:
- The handle must be created by dpm_manager_create().
int dpm_restriction_get_bluetooth_pairing_state | ( | device_policy_manager_h | handle, |
int * | is_allowed | ||
) |
Checks whether the the bluetooth pairing is allowed or not.
An administrator can use this API to check whether the bluetooth pairing is allowed or not. If the bluetooth pairing is disallowed, the UI is grayed out so user can not change its state.
- Since :
- 3.0
- Parameters:
-
[in] handle Device policy manager handle [out] is_allowed true if the pairing is allowed, false otherwise.
- Returns:
- DPM_ERROR_NONE on success, otherwise a negative value
- Return values:
-
DPM_ERROR_NONE Successful DPM_ERROR_TIMED_OUT Time out DPM_ERROR_INVALID_PARAMETER Invalid parameter
- Precondition:
- The handle must be created by dpm_manager_create().
int dpm_restriction_get_bluetooth_tethering_state | ( | device_policy_manager_h | handle, |
int * | is_allowed | ||
) |
Checks whether the bluetooth tethering state change is allowed.
An administrator can use this API to check whether user is allowed to change bluetooth tethering state. is allowed or not. If the bluetooth tethering state change is disallowed, the UI is grayed out so user can not change its state.
- Since :
- 3.0
- Parameters:
-
[in] handle Device policy manager handle [out] is_allowed true if the change is allowed, false otherwise.
- Returns:
- DPM_ERROR_NONE on success, otherwise a negative value
- Return values:
-
DPM_ERROR_NONE Successful DPM_ERROR_TIMED_OUT Time out DPM_ERROR_INVALID_PARAMETER Invalid parameter
- Precondition:
- The handle must be created by dpm_manager_create().
int dpm_restriction_get_browser_state | ( | device_policy_manager_h | handle, |
int * | is_allowed | ||
) |
Checks whether the use of web browser is allowed or not.
An administrator can use this API to check whether the use of web browser is allowed or not.
- Since :
- 3.0
- Parameters:
-
[in] handle Device policy manager handle [out] is_allowed true if the use of web browser is allowed, false otherwise.
- Returns:
- DPM_ERROR_NONE on success, otherwise a negative value
- Return values:
-
DPM_ERROR_NONE Successful DPM_ERROR_TIMED_OUT Time out DPM_ERROR_INVALID_PARAMETER Invalid parameter
- Precondition:
- The handle must be created by dpm_manager_create().
- See also:
- dpm_restriction_set_browser_state()
int dpm_restriction_get_camera_state | ( | device_policy_manager_h | handle, |
int * | is_allowed | ||
) |
Check whether the use of camera is allowed or not.
An administrator can use this API to check whether the use of camera is allowed or not.
- Since :
- 3.0
- Parameters:
-
[in] handle Device policy manager handle [out] is_allowed true if the use of camera is allowed, false otherwise.
- Returns:
- DPM_ERROR_NONE on success, otherwise a negative value
- Return values:
-
DPM_ERROR_NONE Successful DPM_ERROR_INVALID_PARAMETER Invalid parameter DPM_ERROR_TIMED_OUT Time out
- Precondition:
- The handle must be created by dpm_manager_create().
int dpm_restriction_get_clipboard_state | ( | device_policy_manager_h | handle, |
int * | is_allowed | ||
) |
Checks whether the clipboard access is allowed or not.
An administrator can use this API to check whether the clipboard access is allowed or not.
- Since :
- 3.0
- Parameters:
-
[in] handle Device policy manager handle [out] is_allowed true if the access is allowed, false otherwise.
- Returns:
- DPM_ERROR_NONE on success, otherwise a negative value
- Return values:
-
DPM_ERROR_NONE Successful DPM_ERROR_TIMED_OUT Time out DPM_ERROR_INVALID_PARAMETER Invalid parameter
- Precondition:
- The handle must be created by dpm_manager_create().
int dpm_restriction_get_external_storage_state | ( | device_policy_manager_h | handle, |
int * | is_allowed | ||
) |
Checks whether the use of external storage is allowed or not.
An administrator can use this API to check whether the use of external storage is allowed or not.
- Since :
- 3.0
- Parameters:
-
[in] handle Device policy manager handle [out] is_allowed true if the use of external storage is allowed, false otherwise.
- Returns:
- DPM_ERROR_NONE on success, otherwise a negative value
- Return values:
-
DPM_ERROR_NONE Successful DPM_ERROR_TIMED_OUT Time out DPM_ERROR_INVALID_PARAMETER Invalid parameter
- Precondition:
- The handle must be created by dpm_manager_create().
- See also:
- dpm_manager_create()
- dpm_storage_set_external_storage_state()
int dpm_restriction_get_location_state | ( | device_policy_manager_h | handle, |
int * | is_allowed | ||
) |
Check whether user is allowed to change location state or not.
An administrator can use this API to check whether user is allowed to change the location state or not.
- Since :
- 3.0
- Parameters:
-
[in] handle Device policy manager handle [out] is_allowed true if the location state change is allowed, false otherwise.
- Returns:
- DPM_ERROR_NONE on success, otherwise a negative value
- Return values:
-
DPM_ERROR_NONE Successful DPM_ERROR_INVALID_PARAMETER Invalid parameter DPM_ERROR_TIMED_OUT Time out
- Precondition:
- The handle must be created by dpm_manager_create().
int dpm_restriction_get_messaging_state | ( | device_policy_manager_h | handle, |
const char * | sim_id, | ||
int * | is_allowed | ||
) |
Checks whether the text messaging is allowed or not.
An administrator can use this API to check whether text messaging capability is enabled or not.
- Since :
- 3.0
- Parameters:
-
[in] handle Device policy manager handle [in] sim_id SIM identifier [out] is_allowed true if the messaging is allowed, false otherwise.
- Returns:
- DPM_ERROR_NONE on success, otherwise a negative value
- Return values:
-
DPM_ERROR_NONE Successful DPM_ERROR_TIMED_OUT Time out DPM_ERROR_INVALID_PARAMETER Invalid parameter
- Precondition:
- The handle must be created by dpm_manager_create().
int dpm_restriction_get_microphone_state | ( | device_policy_manager_h | handle, |
int * | is_allowed | ||
) |
Checks whether the use of microphone is allowed or not.
An administrator can use this API to check whether the use of microphone is allowed of not.
- Since :
- 3.0
- Parameters:
-
[in] handle Device policy manager handle [out] is_allowed true if the use of microphone is allowed, false otherwise.
- Returns:
- DPM_ERROR_NONE on success, otherwise a negative value
- Return values:
-
DPM_ERROR_NONE Successful DPM_ERROR_INVALID_PARAMETER Invalid parameter DPM_ERROR_TIMED_OUT Time out
- Precondition:
- The handle must be created by dpm_manager_create().
int dpm_restriction_get_popimap_email_state | ( | device_policy_manager_h | handle, |
int * | is_allowed | ||
) |
Checks whether the access to POP or IMAP email is allowed or not.
An administrator can use this API to check the access to POP or IMAP email is allowed or not.
- Since :
- 3.0
- Parameters:
-
[in] handle Device policy manager handle [out] is_allowed true if the POP or IMAP email is allowed, false otherwise.
- Returns:
- DPM_ERROR_NONE on success, otherwise a negative value
- Return values:
-
DPM_ERROR_NONE Successful DPM_ERROR_TIMED_OUT Time out DPM_ERROR_INVALID_PARAMETER Invalid parameter
- Precondition:
- The handle must be created by dpm_manager_create().
int dpm_restriction_get_usb_debugging_state | ( | device_policy_manager_h | handle, |
int * | is_allowed | ||
) |
Checks whether the usb debugging is allowed or not.
An administrator can use this API to check whether the usb debugging is allowed or not.
- Since :
- 3.0
- Parameters:
-
[in] handle Device policy manager handle [out] is_allowed true if the usb debugging is allowed, false otherwise.
- Returns:
- DPM_ERROR_NONE on success, otherwise a negative value
- Return values:
-
DPM_ERROR_NONE Successful DPM_ERROR_TIMED_OUT Time out DPM_ERROR_INVALID_PARAMETER Invalid parameter
- Precondition:
- The handle must be created by dpm_manager_create().
int dpm_restriction_get_usb_tethering_state | ( | device_policy_manager_h | handle, |
int * | is_allowed | ||
) |
Checks whether the USB tethering state change is allowed.
An administrator can use this API to check whether the USB tethering state change is allowed or not. If the USB tethering state change is disallowed, the UI is grayed out so user can not change its state.
- Since :
- 3.0
- Parameters:
-
[in] handle Device policy manager handle [out] is_allowed true if the change is allowed, false otherwise.
- Returns:
- DPM_ERROR_NONE on success, otherwise a negative value
- Return values:
-
DPM_ERROR_NONE Successful DPM_ERROR_TIMED_OUT Time out DPM_ERROR_INVALID_PARAMETER Invalid parameter
- Precondition:
- The handle must be created by dpm_manager_create().
int dpm_restriction_get_wifi_hotspot_state | ( | device_policy_manager_h | handle, |
int * | is_allowed | ||
) |
Checks whether the the Wi-Fi hotspot state change is allowed or not.
An administrator can use this API to check whether user is allowed to change Wi-Fi hotspot state or not. If the Wi-Fi hotspot state change is disallowed, the UI is grayed out so user can not change its state.
- Since :
- 3.0
- Parameters:
-
[in] handle Device policy manager handle [out] is_allowed true if the state change is allowed, false otherwise.
- Returns:
- DPM_ERROR_NONE on success, otherwise a negative value
- Return values:
-
DPM_ERROR_NONE Successful DPM_ERROR_TIMED_OUT Time out DPM_ERROR_INVALID_PARAMETER Invalid parameter
- Precondition:
- The handle must be created by dpm_manager_create().
int dpm_restriction_get_wifi_state | ( | device_policy_manager_h | handle, |
int * | is_allowed | ||
) |
Checks whether the Wi-Fi state change is allowed or not.
An administrator can use this API to check whether user is allowed to change Wi-Fi state or not.
- Since :
- 3.0
- Parameters:
-
[in] handle Device policy manager handle [out] is_allowed true if the change is allowed, false otherwise.
- Returns:
- DPM_ERROR_NONE on success, otherwise a negative value
- Return values:
-
DPM_ERROR_NONE Successful DPM_ERROR_TIMED_OUT Time out DPM_ERROR_INVALID_PARAMETER Invalid parameter
- Precondition:
- The handle must be created by dpm_manager_create().
int dpm_restriction_set_bluetooth_desktop_connectivity_state | ( | device_policy_manager_h | handle, |
int | allow | ||
) |
Allows or disallows the bluetooth desktop connectivity.
- Warning:
- This is not for use by third-party applications.
An administrator can use this API to allow or disallow the bluetooth desktop connectivity. If the bluetooth desktop connectivity is disallowed, the UI is grayed out so user can not change its state.
- Since :
- 3.0
- Privilege Level:
- partner
- Privilege:
- http://tizen.org/privilege/dpm.bluetooth
- Parameters:
-
[in] handle Device policy manager handle [out] allow If true, allow the bluetooth desktop connectivity, if false, disallow the bluetooth desktop connectivity
- Returns:
- DPM_ERROR_NONE on success, otherwise a negative value
- Return values:
-
DPM_ERROR_NONE Successful DPM_ERROR_TIMED_OUT Time out DPM_ERROR_INVALID_PARAMETER Invalid parameter DPM_ERROR_PERMISSION_DENIED The application does not have the privilege to call this API
- Precondition:
- The handle must be created by dpm_manager_create().
int dpm_restriction_set_bluetooth_mode_change_state | ( | device_policy_manager_h | handle, |
int | allow | ||
) |
Allows or disallows user to change the bluetooth state.
- Warning:
- This is not for use by third-party applications.
An administrator can use this API to allow or disallow user to change the bluetooth state. When disallowed, the UI is grayed out so user cannot change the state.
- Since :
- 3.0
- Privilege Level:
- partner
- Privilege:
- http://tizen.org/privilege/dpm.bluetooth
- Parameters:
-
[in] handle Device policy manager handle [in] allow If true, allow user to change bluetooth state, if false, disallow user to change bluetooth state.
- Returns:
- DPM_ERROR_NONE on success, otherwise a negative value
- Return values:
-
DPM_ERROR_NONE Successful DPM_ERROR_TIMED_OUT Time out DPM_ERROR_INVALID_PARAMETER Invalid parameter DPM_ERROR_PERMISSION_DENIED The application does not have the privilege to call this API
- Precondition:
- The handle must be created by dpm_manager_create().
int dpm_restriction_set_bluetooth_pairing_state | ( | device_policy_manager_h | handle, |
int | allow | ||
) |
Allows or disallows user to change the bluetooth pairing.
- Warning:
- This is not for use by third-party applications.
An administrator can use this API to allow or disallow the bluetooth pairing. If the bluetooth pairing is disallowed, the UI is grayed out so user can not change its state.
- Since :
- 3.0
- Privilege Level:
- partner
- Privilege:
- http://tizen.org/privilege/dpm.bluetooth
- Parameters:
-
[in] handle Device policy manager handle [out] allow If true, allow the bluetooth pairing, if false, disallow the bluetooth pairing.
- Returns:
- DPM_ERROR_NONE on success, otherwise a negative value
- Return values:
-
DPM_ERROR_NONE Successful DPM_ERROR_TIMED_OUT Time out DPM_ERROR_INVALID_PARAMETER Invalid parameter DPM_ERROR_PERMISSION_DENIED The application does not have the privilege to call this API
- Precondition:
- The handle must be created by dpm_manager_create().
int dpm_restriction_set_bluetooth_tethering_state | ( | device_policy_manager_h | handle, |
int | allow | ||
) |
Allows or disallows user to change the bluetooth tethering state.
- Warning:
- This is not for use by third-party applications.
An administrator can use this API to allow of disallow user to change the bluetooth tethering state. When disallowed, the UI is grayed out so user cannot change the state.
- Since :
- 3.0
- Privilege Level:
- partner
- Privilege:
- http://tizen.org/privilege/dpm.bluetooth
- Parameters:
-
[in] handle Device policy manager handle [in] allow If true, allow user to change the bluetooth tethering state, if false, disallow user to change the bluetooth tethering state.
- Returns:
- DPM_ERROR_NONE on success, otherwise a negative value
- Return values:
-
DPM_ERROR_NONE Successful DPM_ERROR_TIMED_OUT Time out DPM_ERROR_INVALID_PARAMETER Invalid parameter DPM_ERROR_PERMISSION_DENIED The application does not have the privilege to call this API
- Precondition:
- The handle must be created by dpm_manager_create().
int dpm_restriction_set_browser_state | ( | device_policy_manager_h | handle, |
int | allow | ||
) |
Allows or disallows the use of web browser.
- Warning:
- This is not for use by third-party applications.
An administrator can allows or disallow the use of web browser without any user interaction
- Since :
- 3.0
- Privilege Level:
- partner
- Privilege:
- http://tizen.org/privilege/dpm.browser
- Parameters:
-
[in] handle Device policy manager handle [in] allow If true, allow the use of web browser, if false, disallow the use of web browser.
- Returns:
- DPM_ERROR_NONE on success, otherwise a negative value
- Return values:
-
DPM_ERROR_NONE Successful DPM_ERROR_TIMED_OUT Time out DPM_ERROR_INVALID_PARAMETER Invalid parameter DPM_ERROR_PERMISSION_DENIED The application does not have the privilege to call this API
- Precondition:
- The handle must be created by dpm_manager_create().
- See also:
- dpm_restriction_get_browser_state()
int dpm_restriction_set_camera_state | ( | device_policy_manager_h | handle, |
int | allow | ||
) |
Allows or disallows the use of camera.
- Warning:
- This is not for use by third-party applications.
An administrator can use this API to set whether the use of camera is allowed or not.
- Since :
- 3.0
- Privilege Level:
- partner
- Privilege:
- http://tizen.org/privilege/dpm.camera
- Parameters:
-
[in] handle Device policy manager handle [in] allow If true, allow the use of camera, if false, disallow the use of camera
- Returns:
- DPM_ERROR_NONE on success, otherwise a negative value
- Return values:
-
DPM_ERROR_NONE Successful DPM_ERROR_TIMED_OUT Time out DPM_ERROR_INVALID_PARAMETER Invalid parameter DPM_ERROR_PERMISSION_DENIED The application does not have the privilege to call this API
- Precondition:
- The handle must be created by dpm_manager_create().
int dpm_restriction_set_clipboard_state | ( | device_policy_manager_h | handle, |
int | allow | ||
) |
Allows or disallows user to access the clipboard.
- Warning:
- This is not for use by third-party applications.
An administrator can use this API to set whether the clipboard access. is allowed or not
- Since :
- 3.0
- Privilege Level:
- partner
- Privilege:
- http://tizen.org/privilege/dpm.clipboard
- Parameters:
-
[in] handle Device policy manager handle [in] allow If true, allow the clipboard access, if false, disallow the clipboard access.
- Returns:
- DPM_ERROR_NONE on success, otherwise a negative value
- Return values:
-
DPM_ERROR_NONE Successful DPM_ERROR_TIMED_OUT Time out DPM_ERROR_INVALID_PARAMETER Invalid parameter DPM_ERROR_PERMISSION_DENIED The application does not have the privilege to call this API
- Precondition:
- The handle must be created by dpm_manager_create().
int dpm_restriction_set_external_storage_state | ( | device_policy_manager_h | handle, |
int | allow | ||
) |
Allows or disallows user to use usb mass storage.
- Warning:
- This is not for use by third-party applications.
An administrator can use this API to set whether the usb mass storage is allowed or not.
- Since :
- 3.0
- Privilege Level:
- partner
- Privilege:
- http://tizen.org/privilege/dpm.storage
- Parameters:
-
[in] handle Device policy manager handle [in] allow If true, allow user to use the external storages, if false, disallow the external storage
- Returns:
- DPM_ERROR_NONE on success, otherwise a negative value
- Return values:
-
DPM_ERROR_NONE Successful DPM_ERROR_TIMED_OUT Time out DPM_ERROR_INVALID_PARAMETER Invalid parameter DPM_ERROR_PERMISSION_DENIED The application does not have the privilege to call this API
- Precondition:
- The handle must be created by dpm_manager_create().
- See also:
- dpm_manager_create()
- dpm_storage_get_external_storage_state()
int dpm_restriction_set_location_state | ( | device_policy_manager_h | handle, |
int | allow | ||
) |
Allows or disallows user to change the location state.
- Warning:
- This is not for use by third-party applications.
An administrator can use this API to allow or disallow user to change the location state.
- Since :
- 3.0
- Privilege Level:
- partner
- Privilege:
- http://tizen.org/privilege/dpm.location
- Parameters:
-
[in] handle Device policy manager handle [in] allow If true, allow user to change the location state, if false, disallow
- Returns:
- DPM_ERROR_NONE on success, otherwise a negative value
- Return values:
-
DPM_ERROR_NONE Successful DPM_ERROR_TIMED_OUT Time out DPM_ERROR_INVALID_PARAMETER Invalid parameter DPM_ERROR_PERMISSION_DENIED The application does not have the privilege to call this API
- Precondition:
- The handle must be created by dpm_manager_create().
int dpm_restriction_set_messaging_state | ( | device_policy_manager_h | handle, |
const char * | sim_id, | ||
int | allow | ||
) |
Allows or disallows user to use of SMS or text messaging.
- Warning:
- This is not for use by third-party applications.
An administrator can disable the text messaging capability without any user interaction
- Since :
- 3.0
- Privilege Level:
- partner
- Privilege:
- http://tizen.org/privilege/dpm.message
- Parameters:
-
[in] handle Device policy manager handle [in] sim_id SIM identifier [in] allow If true, allow the use of SMS or text messaging, if false, disallow the use of SMS or text messaging.
- Returns:
- DPM_ERROR_NONE on success, otherwise a negative value
- Return values:
-
DPM_ERROR_NONE Successful DPM_ERROR_TIMED_OUT Time out DPM_ERROR_INVALID_PARAMETER Invalid parameter DPM_ERROR_PERMISSION_DENIED The application does not have the privilege to call this API
- Precondition:
- The handle must be created by dpm_manager_create().
int dpm_restriction_set_microphone_state | ( | device_policy_manager_h | handle, |
int | allow | ||
) |
Allows or disallows the use of microphone.
- Warning:
- This is not for use by third-party applications.
An administrator can use this API to set whether the use of microphone is allowed or not.
- Since :
- 3.0
- Privilege Level:
- partner
- Privilege:
- http://tizen.org/privilege/dpm.microphone
- Parameters:
-
[in] handle Device policy manager handle [in] allow If true, allow the use of microphone, if false, disallow the use of microphone
- Returns:
- DPM_ERROR_NONE on success, otherwise a negative value
- Return values:
-
DPM_ERROR_NONE Successful DPM_ERROR_TIMED_OUT Time out DPM_ERROR_INVALID_PARAMETER Invalid parameter DPM_ERROR_PERMISSION_DENIED The application does not have the privilege to call this API
- Precondition:
- The handle must be created by dpm_manager_create().
int dpm_restriction_set_popimap_email_state | ( | device_policy_manager_h | handle, |
int | allow | ||
) |
Allows or disallows the access to POP or IMAP email.
- Warning:
- This is not for use by third-party applications.
An administrator can disable the email capability without any user interaction
- Since :
- 3.0
- Privilege Level:
- partner
- Privilege:
- http://tizen.org/privilege/dpm.email
- Parameters:
-
[in] handle Device policy manager handle [in] allow If true, allow POP or IMAP email, if false, disallow POP or IMAP email.
- Returns:
- DPM_ERROR_NONE on success, otherwise a negative value
- Return values:
-
DPM_ERROR_NONE Successful DPM_ERROR_TIMED_OUT Time out DPM_ERROR_INVALID_PARAMETER Invalid parameter DPM_ERROR_PERMISSION_DENIED The application does not have the privilege to call this API
- Precondition:
- The handle must be created by dpm_manager_create().
int dpm_restriction_set_usb_debugging_state | ( | device_policy_manager_h | handle, |
int | allow | ||
) |
Allows or disallows the usb debugging.
- Warning:
- This is not for use by third-party applications.
An administrator can use this API to set whether the usb debugging is allowed or not.
- Since :
- 3.0
- Privilege Level:
- partner
- Privilege:
- http://tizen.org/privilege/dpm.debugging
- Parameters:
-
[in] handle Device policy manager handle [in] allow If true, allow the usb debugging, if false, disallow the usb debugging
- Returns:
- DPM_ERROR_NONE on success, otherwise a negative value
- Return values:
-
DPM_ERROR_NONE Successful DPM_ERROR_TIMED_OUT Time out DPM_ERROR_INVALID_PARAMETER Invalid parameter DPM_ERROR_PERMISSION_DENIED The application does not have the privilege to call this API
- Precondition:
- The handle must be created by dpm_manager_create().
int dpm_restriction_set_usb_tethering_state | ( | device_policy_manager_h | handle, |
int | allow | ||
) |
Allows or disallows user to change USB tethering settings.
- Warning:
- This is not for use by third-party applications.
An administrator can use this API to allow or disallow user to change USB tethering settings. When disallowed, the UI is grayed out so user cannot change the state.
- Since :
- 3.0
- Privilege Level:
- partner
- Privilege:
- http://tizen.org/privilege/dpm.usb
- Parameters:
-
[in] handle Device policy manager handle [in] allow If true, allow USB tethering state change, if false, disallow USB tethering state change.
- Returns:
- DPM_ERROR_NONE on success, otherwise a negative value
- Return values:
-
DPM_ERROR_NONE Successful DPM_ERROR_TIMED_OUT Time out DPM_ERROR_INVALID_PARAMETER Invalid parameter DPM_ERROR_PERMISSION_DENIED The application does not have the privilege to call this API
- Precondition:
- The handle must be created by dpm_manager_create().
int dpm_restriction_set_wifi_hotspot_state | ( | device_policy_manager_h | handle, |
int | allow | ||
) |
Allows or disallows user to change Wi-Fi hotspot state change.
- Warning:
- This is not for use by third-party applications.
An administrator can use this API to allow or disallow user to change Wi-Fi hotspot state. When it is disallowed, the UI is grayed out so user cannot change Wi-Fi hotspot state.
- Since :
- 3.0
- Privilege Level:
- partner
- Privilege:
- http://tizen.org/privilege/dpm.wifi
- Parameters:
-
[in] handle Device policy manager handle [in] allow If true, allow user to change Wi-Fi hotspot state, if false, disallow user to change Wi-Fi hotspot state.
- Returns:
- DPM_ERROR_NONE on success, otherwise a negative value
- Return values:
-
DPM_ERROR_NONE Successful DPM_ERROR_TIMED_OUT Time out DPM_ERROR_INVALID_PARAMETER Invalid parameter DPM_ERROR_PERMISSION_DENIED The application does not have the privilege to call this API
- Precondition:
- The handle must be created by dpm_manager_create().
int dpm_restriction_set_wifi_state | ( | device_policy_manager_h | handle, |
int | allow | ||
) |
Allows or disallows user to change the Wi-Fi state.
- Warning:
- This is not for use by third-party applications.
An administrator can use this API to allow or disallow user to change the Wi-Fi state. If it is disallowed, user does not have UI access to change the state.
- Since :
- 3.0
- Privilege Level:
- partner
- Privilege:
- http://tizen.org/privilege/dpm.wifi
- Parameters:
-
[in] handle Device policy manager handle [in] allow If true, allow user to change Wi-Fi state, if false, disallow user to change Wi-Fi state.
- Returns:
- DPM_ERROR_NONE on success, otherwise a negative value
- Return values:
-
DPM_ERROR_NONE Successful DPM_ERROR_TIMED_OUT Time out DPM_ERROR_INVALID_PARAMETER Invalid parameter DPM_ERROR_PERMISSION_DENIED The application does not have the privilege to call this API
- Precondition:
- The handle must be created by dpm_manager_create().