Zone policy group provides APIs to control containers.
Required Header
#include <dpm/zone.h>
Overview
This module provides APIs to manage application containers. Any API which requires privileges is only available for the registered device policy client which is enrolled to the device by enrollment process.
Typedef Documentation
Called to get all the name of created zones.
- Since :
- 3.0
- Parameters:
-
- Returns:
- true to continue with the next iteration of the loop, otherwise false to break out out the loop
- See also:
- dpm_zone_foreach_name()
Enumeration Type Documentation
Enumeration for zone state.
- Since :
- 3.0
- Enumerator:
DPM_ZONE_STATE_LOCKED |
Zone has been defined, but it can not start.
|
DPM_ZONE_STATE_RUNNING |
Zone has been started.
|
DPM_ZONE_STATE_ALL |
This presents all of the state
|
Function Documentation
Creates a new zone.
- Warning:
- This is not for use by third-party applications.
An administrator can use this API to create a container. Once the container is created, the admin package given to the parameter will be installed inside the container. Then ownership of the container gets transferred to the admin package from the client which triggered the container creation process.
- Since :
- 3.0
- Privilege Level:
- partner
- Privilege:
- http://tizen.org/privilege/dpm.zone
- Parameters:
-
[in] | handle | Device policy manager handle |
[in] | name | The zone name to be created |
[in] | pkgname | Admin package container ownership will be transferred |
- Returns:
- DPM_ERROR_NONE on success, otherwise a negative value
- Return values:
-
- Precondition:
- The handle must be created by dpm_manager_create().
- See also:
- dpm_manager_create()
-
dpm_zone_destroy()
-
dpm_zone_create_iterator()
Removes existing zone.
- Warning:
- This is not for use by third-party applications.
Administrator can use this API to remove zone. All file system objects created for the zone will be also erased.
- Since :
- 3.0
- Privilege Level:
- partner
- Privilege:
- http://tizen.org/privilege/dpm.zone
- Parameters:
-
[in] | handle | Device policy manager handle |
[in] | name | The zone name to be removed |
- Returns:
- DPM_ERROR_NONE on success, otherwise a negative value
- Return values:
-
- Precondition:
- The handle must be created by dpm_manager_create().
-
The zone corresponding to the given name must be created before use of this API.
- See also:
- dpm_manager_create()
-
dpm_zone_create()
-
dpm_zone_create_iterator()
Retrieves all the name of created zones.
This API calls dpm_zone_foreach_cb() once for each zone name with traversing the created zones list.
- Since :
- 3.0
- Parameters:
-
[in] | handle | Device policy manager handle |
[in] | state | a combination of the zone state to look |
[in] | callback | The iteration callback function |
[in] | user_data | The user data passed to the callback function |
- Returns:
- DPM_ERROR_NONE on success, otherwise a negative value
- Return values:
-
- Precondition:
- The handle must be created by dpm_manager_create().
- See also:
- dpm_manager_create()
-
dpm_zone_create()
-
dpm_zone_destroy()
Gets the zone state.
This API can be used to get the state of the zone. The zone can have one of the three states(running, locked).
- Since :
- 3.0
- Parameters:
-
[in] | handle | Device policy manager handle |
[in] | name | The zone name |
[out] | state | The zone state |
- Returns:
- DPM_ERROR_NONE on success, otherwise a negative value
- Return values:
-
- Precondition:
- The handle must be created by dpm_manager_create().
- See also:
- dpm_manager_create()
-
dpm_zone_create()
-
dpm_zone_destroy()