Rename dpm error type enum 19/63619/1
authorSungjun, Lee <sjun221.lee@samsung.com>
Fri, 25 Mar 2016 02:28:57 +0000 (11:28 +0900)
committerSungjun, Lee <sjun221.lee@samsung.com>
Fri, 25 Mar 2016 02:34:38 +0000 (11:34 +0900)
Change-Id: Iae5e00081b452b5e74399de1ad256e4294de62f7
Signed-off-by: Sungjun, Lee <sjun221.lee@samsung.com>
libs/dpm/device-policy-client.h
libs/dpm/password.h
libs/dpm/security.h
libs/dpm/zone.cpp
libs/dpm/zone.h
tests/api/zone.c

index 306ada1..e2e658c 100644 (file)
@@ -66,15 +66,15 @@ typedef void* dpm_client_h;
  * @since_tizen 3.0
  */
 typedef enum {
-    DPM_ERROR_NONE          = TIZEN_ERROR_NONE,                 /**< The operation was successful */
-    DPM_ERROR_INVALID       = TIZEN_ERROR_INVALID_PARAMETER,    /**< Invalid parameter */
-    DPM_ERROR_REFUSED       = TIZEN_ERROR_CONNECTION_REFUSED,   /**< Connection refused */
-    DPM_ERROR_TIMEOUT       = TIZEN_ERROR_TIMED_OUT,            /**< Timeout */
-    DPM_ERROR_ACCESS_DENIED = TIZEN_ERROR_PERMISSION_DENIED,    /**< Access privilege is not sufficient */
-    DPM_ERROR_NOT_SUPPORTED = TIZEN_ERROR_NOT_SUPPORTED,        /**< Operation is not supported */
-    DPM_ERROR_NO_SUCH_FILE  = TIZEN_ERROR_NO_SUCH_FILE,         /**< No such file or directory */
-    DPM_ERROR_FILE_EXISTS   = TIZEN_ERROR_FILE_EXISTS,          /**< File exists */
-    DPM_ERROR_OUT_OF_MEMORY = TIZEN_ERROR_OUT_OF_MEMORY         /**< Out of memory */
+    DPM_ERROR_NONE                 = TIZEN_ERROR_NONE,                 /**< The operation was successful */
+    DPM_ERROR_INVALID_PARAMETER    = TIZEN_ERROR_INVALID_PARAMETER,    /**< Invalid parameter */
+    DPM_ERROR_CONNECTION_REFUSED   = TIZEN_ERROR_CONNECTION_REFUSED,   /**< Connection refused */
+    DPM_ERROR_TIMED_OUT            = TIZEN_ERROR_TIMED_OUT,            /**< Timeout */
+    DPM_ERROR_PERMISSION_DENIED    = TIZEN_ERROR_PERMISSION_DENIED,    /**< Access privilege is not sufficient */
+    DPM_ERROR_NOT_SUPPORTED        = TIZEN_ERROR_NOT_SUPPORTED,        /**< Operation is not supported */
+    DPM_ERROR_NO_SUCH_FILE         = TIZEN_ERROR_NO_SUCH_FILE,         /**< No such file or directory */
+    DPM_ERROR_FILE_EXISTS          = TIZEN_ERROR_FILE_EXISTS,          /**< File exists */
+    DPM_ERROR_OUT_OF_MEMORY        = TIZEN_ERROR_OUT_OF_MEMORY         /**< Out of memory */
 } dpm_error_type_e;
 
 /**
@@ -89,8 +89,8 @@ typedef enum {
  *              get_last_result() method. Error codes are described in
  *              exception section.
  * @exception   #DPM_ERROR_NONE No error
- * @exception   #DPM_ERROR_REFUSED Connection refused
- * @exception   #DPM_ERROR_ACCESS_DENIED The application does not have
+ * @exception   #DPM_ERROR_CONNECTION_REFUSED Connection refused
+ * @exception   #DPM_ERROR_PERMISSION_DENIED The application does not have
  *              the privilege to call this API
  * @pre         N/A
  * @post        N/A
index c5efb82..a14ab4c 100644 (file)
@@ -60,7 +60,7 @@ typedef enum {
  * @return      #DPM_ERROR_NONE on success, otherwise a negative value
  * @retval      #DPM_ERROR_NONE Successful
  * @retval      #DPM_ERROR_NOT_SUPPORTED Not supported
- * @retval      #DPM_ERROR_ACCESS_DENIED The application does not have
+ * @retval      #DPM_ERROR_PERMISSION_DENIED The application does not have
  *              the privilege to call this API
  * @pre         handle must be created by dpm_create_client()
  * @post
@@ -83,7 +83,7 @@ DPM_API int dpm_set_password_quality(dpm_client_h handle, const char *username,
  * @return      #DPM_ERROR_NONE on success, otherwise a negative value
  * @retval      #DPM_ERROR_NONE Successful
  * @retval      #DPM_ERROR_NOT_SUPPORTED Not supported
- * @retval      #DPM_ERROR_ACCESS_DENIED The application does not have
+ * @retval      #DPM_ERROR_PERMISSION_DENIED The application does not have
  *              the privilege to call this API
  * @pre         handle must be created by dpm_create_client()
  * @post
@@ -106,7 +106,7 @@ DPM_API int dpm_set_password_minimum_length(dpm_client_h handle, const char *use
  * @return      #DPM_ERROR_NONE on success, otherwise a negative value
  * @retval      #DPM_ERROR_NONE Successful
  * @retval      #DPM_ERROR_NOT_SUPPORTED Not supported
- * @retval      #DPM_ERROR_ACCESS_DENIED The application does not have
+ * @retval      #DPM_ERROR_PERMISSION_DENIED The application does not have
  *              the privilege to call this API
  * @pre         handle must be created by dpm_create_client()
  * @post
@@ -128,7 +128,7 @@ DPM_API int dpm_set_min_password_complex_chars(dpm_client_h handle, const char *
  * @return      #DPM_ERROR_NONE on success, otherwise a negative value
  * @retval      #DPM_ERROR_NONE Successful
  * @retval      #DPM_ERROR_NOT_SUPPORTED Not supported
- * @retval      #DPM_ERROR_ACCESS_DENIED The application does not have
+ * @retval      #DPM_ERROR_PERMISSION_DENIED The application does not have
  *              the privilege to call this API
  * @pre         handle must be created by dpm_create_client()
  * @post
@@ -150,7 +150,7 @@ DPM_API int dpm_set_maximum_failed_password_for_wipe(dpm_client_h handle, const
  * @return      #DPM_ERROR_NONE on success, otherwise a negative value
  * @retval      #DPM_ERROR_NONE Successful
  * @retval      #DPM_ERROR_NOT_SUPPORTED Not supported
- * @retval      #DPM_ERROR_ACCESS_DENIED The application does not have
+ * @retval      #DPM_ERROR_PERMISSION_DENIED The application does not have
  *              the privilege to call this API
  * @pre         handle must be created by dpm_create_client()
  * @post
@@ -174,7 +174,7 @@ DPM_API int dpm_set_password_expires(dpm_client_h handle, const char *username,
  * @return      #DPM_ERROR_NONE on success, otherwise a negative value
  * @retval      #DPM_ERROR_NONE Successful
  * @retval      #DPM_ERROR_NOT_SUPPORTED Not supported
- * @retval      #DPM_ERROR_ACCESS_DENIED The application does not have
+ * @retval      #DPM_ERROR_PERMISSION_DENIED The application does not have
  *              the privilege to call this API
  * @pre         handle must be created by dpm_create_client()
  * @post
@@ -200,7 +200,7 @@ DPM_API int dpm_set_password_history(dpm_client_h handle, const char *username,
  * @return      #DPM_ERROR_NONE on success, otherwise a negative value
  * @retval      #DPM_ERROR_NONE Successful
  * @retval      #DPM_ERROR_NOT_SUPPORTED Not supported
- * @retval      #DPM_ERROR_ACCESS_DENIED The application does not have
+ * @retval      #DPM_ERROR_PERMISSION_DENIED The application does not have
  *              the privilege to call this API
  * @pre         handle must be created by dpm_create_client()
  * @post
@@ -221,7 +221,7 @@ DPM_API int dpm_set_password_pattern(dpm_client_h handle, const char *username,
  * @return      #DPM_ERROR_NONE on success, otherwise a negative value
  * @retval      #DPM_ERROR_NONE Successful
  * @retval      #DPM_ERROR_NOT_SUPPORTED Not supported
- * @retval      #DPM_ERROR_ACCESS_DENIED The application does not have
+ * @retval      #DPM_ERROR_PERMISSION_DENIED The application does not have
  *              the privilege to call this API
  * @pre         handle must be created by dpm_create_client()
  * @post
@@ -242,7 +242,7 @@ DPM_API int dpm_reset_password(dpm_client_h handle, const char *username, const
  * @return      #DPM_ERROR_NONE on success, otherwise a negative value
  * @retval      #DPM_ERROR_NONE Successful
  * @retval      #DPM_ERROR_NOT_SUPPORTED Not supported
- * @retval      #DPM_ERROR_ACCESS_DENIED The application does not have
+ * @retval      #DPM_ERROR_PERMISSION_DENIED The application does not have
  *              the privilege to call this API
  * @pre         handle must be created by dpm_create_client()
  * @post
@@ -268,7 +268,7 @@ DPM_API int dpm_enforce_password_change(dpm_client_h handle, const char *usernam
  * @return      #DPM_ERROR_NONE on success, otherwise a negative value
  * @retval      #DPM_ERROR_NONE Successful
  * @retval      #DPM_ERROR_NOT_SUPPORTED Not supported
- * @retval      #DPM_ERROR_ACCESS_DENIED The application does not have
+ * @retval      #DPM_ERROR_PERMISSION_DENIED The application does not have
  *              the privilege to call this API
  * @pre         handle must be created by dpm_create_client()
  * @post
@@ -289,7 +289,7 @@ DPM_API int dpm_set_max_inactivity_time_device_lock(dpm_client_h handle, const c
  * @return      #DPM_ERROR_NONE on success, otherwise a negative value
  * @retval      #DPM_ERROR_NONE Successful
  * @retval      #DPM_ERROR_NOT_SUPPORTED Not supported
- * @retval      #DPM_ERROR_ACCESS_DENIED The application does not have
+ * @retval      #DPM_ERROR_PERMISSION_DENIED The application does not have
  *              the privilege to call this API
  * @pre         handle must be created by dpm_create_client()
  * @post
@@ -310,7 +310,7 @@ DPM_API int dpm_get_max_inactivity_time_device_lock(dpm_client_h handle, const c
  * @return      #DPM_ERROR_NONE on success, otherwise a negative value
  * @retval      #DPM_ERROR_NONE Successful
  * @retval      #DPM_ERROR_NOT_SUPPORTED Not supported
- * @retval      #DPM_ERROR_ACCESS_DENIED The application does not have
+ * @retval      #DPM_ERROR_PERMISSION_DENIED The application does not have
  *              the privilege to call this API
  * @pre         handle must be created by dpm_create_client()
  * @post
@@ -330,7 +330,7 @@ DPM_API int dpm_set_password_status(dpm_client_h handle, const char *username, c
  * @return      #DPM_ERROR_NONE on success, otherwise a negative value
  * @retval      #DPM_ERROR_NONE Successful
  * @retval      #DPM_ERROR_NOT_SUPPORTED Not supported
- * @retval      #DPM_ERROR_ACCESS_DENIED The application does not have
+ * @retval      #DPM_ERROR_PERMISSION_DENIED The application does not have
  *              the privilege to call this API
  * @pre         handle must be created by dpm_create_client()
  * @post
@@ -375,7 +375,7 @@ DPM_API char *dpm_get_password_pattern(dpm_client_h handle, const char *username
  * @return      #DPM_ERROR_NONE on success, otherwise a negative value
  * @retval      #DPM_ERROR_NONE Successful
  * @retval      #DPM_ERROR_NOT_SUPPORTED Not supported
- * @retval      #DPM_ERROR_ACCESS_DENIED The application does not have
+ * @retval      #DPM_ERROR_PERMISSION_DENIED The application does not have
  *              the privilege to call this API
  * @pre         handle must be created by dpm_create_client()
  * @post
@@ -398,7 +398,7 @@ DPM_API int dpm_set_maximum_character_occurrences(dpm_client_h handle, const cha
  * @return      #DPM_ERROR_NONE on success, otherwise a negative value
  * @retval      #DPM_ERROR_NONE Successful
  * @retval      #DPM_ERROR_NOT_SUPPORTED Not supported
- * @retval      #DPM_ERROR_ACCESS_DENIED The application does not have
+ * @retval      #DPM_ERROR_PERMISSION_DENIED The application does not have
  *              the privilege to call this API
  * @pre         handle must be created by dpm_create_client()
  * @post
@@ -431,7 +431,7 @@ DPM_API int dpm_get_maximum_character_occurrences(dpm_client_h handle, const cha
  * @return      #DPM_ERROR_NONE on success, otherwise a negative value
  * @retval      #DPM_ERROR_NONE Successful
  * @retval      #DPM_ERROR_NOT_SUPPORTED Not supported
- * @retval      #DPM_ERROR_ACCESS_DENIED The application does not have
+ * @retval      #DPM_ERROR_PERMISSION_DENIED The application does not have
  *              the privilege to call this API
  * @pre         handle must be created by dpm_create_client()
  * @post
@@ -457,7 +457,7 @@ DPM_API int dpm_set_maximum_numeric_sequence_length(dpm_client_h handle, const c
  * @return      #DPM_ERROR_NONE on success, otherwise a negative value
  * @retval      #DPM_ERROR_NONE Successful
  * @retval      #DPM_ERROR_NOT_SUPPORTED Not supported
- * @retval      #DPM_ERROR_ACCESS_DENIED The application does not have
+ * @retval      #DPM_ERROR_PERMISSION_DENIED The application does not have
  *              the privilege to call this API
  * @pre         handle must be created by dpm_create_client()
  * @post
index 0782b04..c2ac6d2 100644 (file)
@@ -54,7 +54,7 @@ typedef enum {
  * @return      #DPM_ERROR_NONE on success, otherwise a negative value
  * @retval      #DPM_ERROR_NONE Successful
  * @retval      #DPM_ERROR_NOT_SUPPORTED Not supported
- * @retval      #DPM_ERROR_ACCESS_DENIED The application does not have
+ * @retval      #DPM_ERROR_PERMISSION_DENIED The application does not have
  *              the privilege to call this API
  * @pre         handle must be created by dpm_create_client()
  * @post
@@ -77,7 +77,7 @@ DPM_API int dpm_lockout_screen(dpm_client_h handle);
  * @return      #DPM_ERROR_NONE on success, otherwise a negative value
  * @retval      #DPM_ERROR_NONE Successful
  * @retval      #DPM_ERROR_NOT_SUPPORTED Not supported
- * @retval      #DPM_ERROR_ACCESS_DENIED The application does not have
+ * @retval      #DPM_ERROR_PERMISSION_DENIED The application does not have
  *              the privilege to call this API
  * @pre         handle must be created by dpm_create_client()
  * @post
@@ -96,7 +96,7 @@ DPM_API int dpm_wipe_data(dpm_client_h handle, const dpm_wipe_type_e type);
  * @param[in]   handle Device Policy Client handle
  * @return      #DPM_ERROR_NONE on success, otherwise a negative value
  * @retval      #DPM_ERROR_NONE Successful
- * @retval      #DPM_ERROR_ACCESS_DENIED The application does not have
+ * @retval      #DPM_ERROR_PERMISSION_DENIED The application does not have
  *              the privilege to call this API
  * @pre         handle must be created by dpm_create_client()
  * @post
@@ -115,7 +115,7 @@ DPM_API int dpm_reboot(dpm_client_h handle);
  * @param[in]   handle Device Policy Client handle
  * @return      #DPM_ERROR_NONE on success, otherwise a negative value
  * @retval      #DPM_ERROR_NONE Successful
- * @retval      #DPM_ERROR_ACCESS_DENIED The application does not have
+ * @retval      #DPM_ERROR_PERMISSION_DENIED The application does not have
  *              the privilege to call this API
  * @pre         handle must be created by dpm_create_client()
  * @post
@@ -141,7 +141,7 @@ DPM_API int dpm_poweroff_device(dpm_client_h handle);
  * @return      #DPM_ERROR_NONE on success, otherwise a negative value
  * @retval      #DPM_ERROR_NONE Successful
  * @retval      #DPM_ERROR_NOT_SUPPORTED Not supported
- * @retval      #DPM_ERROR_ACCESS_DENIED The application does not have
+ * @retval      #DPM_ERROR_PERMISSION_DENIED The application does not have
  *              the privilege to call this API
  * @pre         handle must be created by dpm_create_client()
  * @post
@@ -182,7 +182,7 @@ DPM_API int dpm_is_internal_storage_encrypted(dpm_client_h handle);
  * @return      #DPM_ERROR_NONE on success, otherwise a negative value
  * @retval      #DPM_ERROR_NONE Successful
  * @retval      #DPM_ERROR_NOT_SUPPORTED Not supported
- * @retval      #DPM_ERROR_ACCESS_DENIED The application does not have
+ * @retval      #DPM_ERROR_PERMISSION_DENIED The application does not have
  *              the privilege to call this API
  * @pre         handle must be created by dpm_create_client()
  * @post
index 91364a4..011d299 100644 (file)
@@ -85,7 +85,7 @@ int dpm_get_zone_state(dpm_client_h handle, const char* name)
 
     /* TODO : should implement */
 
-    return DPM_ERROR_INVALID;
+    return DPM_ERROR_INVALID_PARAMETER;
 }
 
 int dpm_subscribe_zone_signal(dpm_client_h handle, dpm_zone_signal_cb callback, void* user_data)
index 71aaafa..8b8b173 100644 (file)
@@ -49,7 +49,7 @@ extern "C" {
  * @return      #DPM_ERROR_NONE on success, otherwise a negative value
  * @retval      #DPM_ERROR_NONE Successful
  * @retval      #DPM_ERROR_INVALID Invalid parameter
- * @retval      #DPM_ERROR_ACCESS_DENIED The application does not have
+ * @retval      #DPM_ERROR_PERMISSION_DENIED The application does not have
  *              the privilege to call this API
  * @pre         handle must be created by dpm_create_client()
  * @post
@@ -72,7 +72,7 @@ DPM_API int dpm_create_zone(dpm_client_h handle, const char* name, const char* p
  * @return      #DPM_ERROR_NONE on success, otherwise a negative value
  * @retval      #DPM_ERROR_NONE Successful
  * @retval      #DPM_ERROR_INVALID Invalid parameter
- * @retval      #DPM_ERROR_ACCESS_DENIED The application does not have
+ * @retval      #DPM_ERROR_PERMISSION_DENIED The application does not have
  *              the privilege to call this API
  * @pre         handle must be created by dpm_create_client()
  * @pre         The zone corresponding to the given name must be
@@ -156,7 +156,7 @@ typedef enum {
  * @since_tizen 3.0
  * @param[in]   handle The device policy client handle
  * @param[in]   name The zone name
- * @return      #DPM_ERROR_INVALID if the given zone name is not valid,
+ * @return      #DPM_ERROR_INVALID_PARAMETER if the given zone name is not valid,
  *              otherwise a zone state
  * @retval      #DPM_ZONE_DEFINED Zone has been defined.
  * @retval      #DPM_ZONE_RUNNING Zone is running
@@ -187,8 +187,8 @@ typedef void(*dpm_zone_signal_cb)(zone_state_e event, const char* name, void *in
  * @param[in]   user_data The user data passed to the listener function
  * @return      #DPM_ERROR_NONE on success, otherwise a negative value
  * @retval      #DPM_ERROR_NONE Successful
- * @retval      #DPM_ERROR_INVALID Invalid parameter
- * @retval      #DPM_ERROR_ACCESS_DENIED The application does not have
+ * @retval      #DPM_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval      #DPM_ERROR_PERMISSION_DENIED The application does not have
  *              the privilege to call this API
  * @pre         handle must be created by dpm_create_client()
  * @post
@@ -207,8 +207,8 @@ DPM_API int dpm_subscribe_zone_signal(dpm_client_h handle, dpm_zone_signal_cb ca
  * @param[in]   callback The listener function to be removed
  * @return      #DPM_ERROR_NONE on success, otherwise a negative value
  * @retval      #DPM_ERROR_NONE Successful
- * @retval      #DPM_ERROR_INVALID Invalid parameter
- * @retval      #DPM_ERROR_ACCESS_DENIED The application does not have
+ * @retval      #DPM_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval      #DPM_ERROR_PERMISSION_DENIED The application does not have
  *              the privilege to call this API
  * @pre         handle must be created by dpm_create_client()
  * @post
index b616f5f..e104637 100644 (file)
@@ -71,7 +71,7 @@ static int zone_get_state(struct testcase* tc)
         return TEST_FAILED;
     }
 
-    if (dpm_get_zone_state(handle, TEST_ZONE_ID) != DPM_ERROR_INVALID) {
+    if (dpm_get_zone_state(handle, TEST_ZONE_ID) != DPM_ERROR_INVALID_PARAMETER) {
         dpm_destroy_client(handle);
         return TEST_SUCCESSED;
     }