change tbm_error_e values. 26/174226/1
authorSooChan Lim <sc1.lim@samsung.com>
Thu, 29 Mar 2018 03:45:12 +0000 (12:45 +0900)
committerSooChan Lim <sc1.lim@samsung.com>
Thu, 29 Mar 2018 07:16:31 +0000 (16:16 +0900)
Change-Id: I550beda21a97123cb4ceb106356633975f63f3f6

src/tbm_type_common.h

index b632e51..aec83c4 100644 (file)
@@ -83,36 +83,58 @@ typedef void tbm_native_display;
  * @since_tizen 2.4
  */
 typedef enum {
-       TBM_ERROR_NONE = 0,                                       /**< Successful */
-       TBM_ERROR_OUT_OF_MEMORY = TBM_ERROR_BASE | 0x0001,        /**< failed to allocate the memory */
-       TBM_ERROR_INVALID_PARAMETER = TBM_ERROR_BASE | 0x0002,    /**< failed to get the valid parameter */
-       TBM_ERROR_OPERATION_FAILED = TBM_ERROR_BASE | 0x0003,     /**< failed to operation */
-
-       TBM_BO_ERROR_GET_FD_FAILED = TBM_ERROR_BASE | 0x0101,     /**< failed to get fd in bo */
-       TBM_BO_ERROR_HEAP_ALLOC_FAILED = TBM_ERROR_BASE | 0x0102, /**< failed to allocate the heap memory in bo */
-       TBM_BO_ERROR_LOAD_MODULE_FAILED = TBM_ERROR_BASE | 0x0103,/**< failed to load module*/
-       TBM_BO_ERROR_THREAD_INIT_FAILED = TBM_ERROR_BASE | 0x0104,/**< failed to initialize the pthread */
-       TBM_BO_ERROR_BO_ALLOC_FAILED = TBM_ERROR_BASE | 0x0105,   /**< failed to allocate tbm_bo */
-       TBM_BO_ERROR_INIT_STATE_FAILED = TBM_ERROR_BASE | 0x0106, /**< failed to initialize the state of tbm_bo */
-       TBM_BO_ERROR_IMPORT_FAILED = TBM_ERROR_BASE | 0x0107,     /**< failed to import the handle of tbm_bo */
-       TBM_BO_ERROR_IMPORT_FD_FAILED = TBM_ERROR_BASE | 0x0108,  /**< failed to import fd of tbm_bo */
-       TBM_BO_ERROR_EXPORT_FAILED = TBM_ERROR_BASE | 0x0109,     /**< failed to export the handle of the tbm_bo */
-       TBM_BO_ERROR_EXPORT_FD_FAILED = TBM_ERROR_BASE | 0x01010, /**< failed to export fd of tbm_bo */
-       TBM_BO_ERROR_GET_HANDLE_FAILED = TBM_ERROR_BASE | 0x0111, /**< failed to get the tbm_bo_handle */
-       TBM_BO_ERROR_LOCK_FAILED = TBM_ERROR_BASE | 0x0112,               /**< failed to lock the tbm_bo */
-       TBM_BO_ERROR_MAP_FAILED = TBM_ERROR_BASE | 0x0113,                /**< failed to map the tbm_bo to get the tbm_bo_handle */
-       TBM_BO_ERROR_UNMAP_FAILED = TBM_ERROR_BASE | 0x0114,      /**< failed to unmap the tbm_bo */
-       TBM_BO_ERROR_SWAP_FAILED = TBM_ERROR_BASE | 0x0115,               /**< failed to swap the tbm_bos */
-       TBM_BO_ERROR_DUP_FD_FAILED = TBM_ERROR_BASE | 0x0116,     /**< failed to duplicate fd */
-
-       TBM_SURFACE_QUEUE_ERROR_NONE = 0,                                             /**< Successful */
-       TBM_SURFACE_QUEUE_ERROR_INVALID_SURFACE = -1,
-       TBM_SURFACE_QUEUE_ERROR_INVALID_QUEUE = -2,
-       TBM_SURFACE_QUEUE_ERROR_EMPTY = -3,
-       TBM_SURFACE_QUEUE_ERROR_INVALID_PARAMETER = -4,
-       TBM_SURFACE_QUEUE_ERROR_SURFACE_ALLOC_FAILED = -5,
-       TBM_SURFACE_QUEUE_ERROR_ALREADY_EXIST = -6,
-       TBM_SURFACE_QUEUE_ERROR_UNKNOWN_SURFACE = -7,
+       /* TBM_ERROR_XXX. start from (TBM_ERROR_BASE | 0x0001) to (TBM_ERROR_BASE | 0x0099) */
+       TBM_ERROR_NONE = TIZEN_ERROR_NONE,                               /**< Successful */
+       TBM_ERROR_OUT_OF_MEMORY = TIZEN_ERROR_OUT_OF_MEMORY,             /**< Out of memory */
+       TBM_ERROR_INVALID_PARAMETER = TIZEN_ERROR_INVALID_PARAMETER,     /**< Invalid function parameter */
+       TBM_ERROR_INVALID_OPERATION = TIZEN_ERROR_INVALID_OPERATION,     /**< Function not implemented */
+       TBM_ERROR_NOT_SUPPORTED = TIZEN_ERROR_NOT_SUPPORTED,             /**< Not supported */
+       TBM_ERROR_OPERATION_FAILED = TIZEN_ERROR_INVALID_OPERATION,      /**< Function not implemented (DEPRECATED) */
+
+       /* TBM_BO_ERROR_XXX. start from (TBM_ERROR_BASE | 0x0101) to (TBM_ERROR_BASE | 0x0199) */
+       TBM_BO_ERROR_NONE = TBM_ERROR_NONE,                              /**< Successful */
+       TBM_BO_ERROR_OUT_OF_MEMORY = TBM_ERROR_OUT_OF_MEMORY,            /**< Out of memory */
+       TBM_BO_ERROR_INVALID_PARAMETER = TBM_ERROR_INVALID_PARAMETER,    /**< Invalid function parameter */
+       TBM_BO_ERROR_INVALID_OPERATION = TBM_ERROR_INVALID_OPERATION,    /**< Function not implemented */
+       TBM_BO_ERROR_NOT_SUPPORTED = TBM_ERROR_NOT_SUPPORTED,            /**< Not supported */
+       TBM_BO_ERROR_GET_FD_FAILED = TBM_ERROR_BASE | 0x0101,            /**< failed to get fd in bo  (DEPRECATED) */
+       TBM_BO_ERROR_HEAP_ALLOC_FAILED = TBM_ERROR_OUT_OF_MEMORY,        /**< failed to allocate the heap memory in bo  (DEPRECATED) */
+       TBM_BO_ERROR_LOAD_MODULE_FAILED = TBM_ERROR_BASE | 0x0103,       /**< failed to load module  (DEPRECATED) */
+       TBM_BO_ERROR_THREAD_INIT_FAILED = TBM_ERROR_BASE | 0x0104,       /**< failed to initialize the pthread  (DEPRECATED) */
+       TBM_BO_ERROR_BO_ALLOC_FAILED = TBM_ERROR_OUT_OF_MEMORY,          /**< failed to allocate tbm_bo  (DEPRECATED) */
+       TBM_BO_ERROR_INIT_STATE_FAILED = TBM_ERROR_BASE | 0x0106,        /**< failed to initialize the state of tbm_bo  (DEPRECATED) */
+       TBM_BO_ERROR_IMPORT_FAILED = TBM_ERROR_BASE | 0x0107,            /**< failed to import the handle of tbm_bo  (DEPRECATED) */
+       TBM_BO_ERROR_IMPORT_FD_FAILED = TBM_ERROR_BASE | 0x0108,         /**< failed to import fd of tbm_bo  (DEPRECATED) */
+       TBM_BO_ERROR_EXPORT_FAILED = TBM_ERROR_BASE | 0x0109,            /**< failed to export the handle of the tbm_bo  (DEPRECATED) */
+       TBM_BO_ERROR_EXPORT_FD_FAILED = TBM_ERROR_BASE | 0x0110,         /**< failed to export fd of tbm_bo  (DEPRECATED) */
+       TBM_BO_ERROR_GET_HANDLE_FAILED = TBM_ERROR_BASE | 0x0111,        /**< failed to get the tbm_bo_handle  (DEPRECATED) */
+       TBM_BO_ERROR_LOCK_FAILED = TBM_ERROR_BASE | 0x0112,              /**< failed to lock the tbm_bo  (DEPRECATED) */
+       TBM_BO_ERROR_MAP_FAILED = TBM_ERROR_BASE | 0x0113,               /**< failed to map the tbm_bo to get the tbm_bo_handle  (DEPRECATED) */
+       TBM_BO_ERROR_UNMAP_FAILED = TBM_ERROR_BASE | 0x0114,             /**< failed to unmap the tbm_bo  (DEPRECATED) */
+       TBM_BO_ERROR_SWAP_FAILED = TBM_ERROR_BASE | 0x0115,              /**< failed to swap the tbm_bos  (DEPRECATED) */
+       TBM_BO_ERROR_DUP_FD_FAILED = TBM_ERROR_BASE | 0x0116,            /**< failed to duplicate fd  (DEPRECATED) */
+
+       /* TBM_SURFACE_ERROR_XXX. start from (TBM_ERROR_BASE | 0x0201) to (TBM_ERROR_BASE | 0x0299)
+        * TBM_SURFACE_ERROR_XXX is defined in tbm_surface.h file because it is CAPI.
+        *
+        * TBM_SURFACE_ERROR_NONE = TIZEN_ERROR_NONE,                             // Successful
+        * TBM_SURFACE_ERROR_INVALID_PARAMETER = TIZEN_ERROR_INVALID_PARAMETER,   // Invalid parameter
+        * TBM_SURFACE_ERROR_INVALID_OPERATION = TIZEN_ERROR_INVALID_OPERATION,   // Invalid Operation
+        *
+        */
+
+       /* TBM_SURFACE_QUEUE_ERROR_XXX. start from (TBM_ERROR_BASE | 0x0301) to (TBM_ERROR_BASE | 0x0399) */
+       TBM_SURFACE_QUEUE_ERROR_NONE = TBM_ERROR_NONE,                            /**< Successful */
+       TBM_SURFACE_QUEUE_ERROR_OUT_OF_MEMORY = TBM_ERROR_OUT_OF_MEMORY,          /**< Out of memory */
+       TBM_SURFACE_QUEUE_ERROR_INVALID_PARAMETER = TBM_ERROR_INVALID_PARAMETER,  /**< Invalid function parameter */
+       TBM_SURFACE_QUEUE_ERROR_INVALID_OPERATION = TBM_ERROR_INVALID_OPERATION,  /**< Function not implemented */
+       TBM_SURFACE_QUEUE_ERROR_NOT_SUPPORTED = TBM_ERROR_NOT_SUPPORTED,          /**< Not supported */
+       TBM_SURFACE_QUEUE_ERROR_EMPTY = TBM_ERROR_BASE | 0x0301,                  /**< Empty queue */
+       TBM_SURFACE_QUEUE_ERROR_INVALID_QUEUE = TBM_ERROR_BASE | 0x0302,          /**< Invalid queue */
+       TBM_SURFACE_QUEUE_ERROR_INVALID_SURFACE = TBM_ERROR_BASE | 0x0303,        /**< Invalid surface */
+       TBM_SURFACE_QUEUE_ERROR_SURFACE_ALLOC_FAILED = TBM_ERROR_BASE | 0x0304,   /**< Allocation of surface failed */
+       TBM_SURFACE_QUEUE_ERROR_ALREADY_EXIST = TBM_ERROR_BASE | 0x0305,              /**< Already existed surface */
+       TBM_SURFACE_QUEUE_ERROR_UNKNOWN_SURFACE = TBM_ERROR_BASE | 0x0306,            /**< Unknown surface */
 } tbm_error_e;
 
 typedef tbm_error_e tbm_surface_queue_error_e;