#ifndef _MEDIA_UTIL_ERR_H_
#define _MEDIA_UTIL_ERR_H_
-#define MS_MEDIA_ERR_NONE 0
-
-/* Internal operation error*/
-#define MS_MEDIA_ERR_INTERNAL -1
-#define MS_MEDIA_ERR_INVALID_PARAMETER -2 /* Invalid parameter(s) */
-#define MS_MEDIA_ERR_OUT_OF_MEMORY -3 /* Out of memory */
-#define MS_MEDIA_ERR_NOT_ENOUGH_SPACE -4 /* not enough space in storage */
-#define MS_MEDIA_ERR_UNSUPPORTED_CONTENT -5 /* Not Supported Media Type */
-#define MS_MEDIA_ERR_NOT_SUPPORTED_FEATURE -6 /* Feature not supported */
-#define MS_MEDIA_ERR_PERMISSION_DENIED -7 /* Do have permission of request */
-
-/* DB operation error*/
-#define MS_MEDIA_ERR_DB_BUSY_FAIL -100 /* DB Busy */
-#define MS_MEDIA_ERR_DB_CONSTRAINT_FAIL -101 /* DB CONSTRAINT fails - In case of insert, the record already exists */
-#define MS_MEDIA_ERR_DB_NO_RECORD -102 /* Item not found in DB */
-#define MS_MEDIA_ERR_DB_CORRUPT -103 /* DB corrut error */
-#define MS_MEDIA_ERR_DB_FULL_FAIL -104 /* DB storage full error */
-#define MS_MEDIA_ERR_DB_RESET -105 /* media DB is reset */
-#define MS_MEDIA_ERR_DB_INTERNAL -110 /* DB internal error */
-
-/* IPC operation error*/
-#define MS_MEDIA_ERR_IPC -200
-
-/* FILE error*/
-#define MS_MEDIA_ERR_FILE_NOT_EXIST -600 /* file does not exist */
-
-/* MEDIA SERVER error*/
-#define MS_MEDIA_ERR_SCANNER_FORCE_STOP -700 /* scanning is stopped forcely */
-
-/* Thumbnail error*/
-#define MS_MEDIA_ERR_THUMB_UNSUPPORTED -803 /* Unsupported content */
-
-/*ETC*/
-#define MS_MEDIA_ERR_USB_UNMOUNTED -908 /* USB unmounted */
-#define MS_MEDIA_ERR_DB_LIMIT_1 -909
+typedef enum {
+ MS_MEDIA_ERR_NONE = 0,
+ /* Internal operation error*/
+ MS_MEDIA_ERR_INTERNAL = -1,
+ MS_MEDIA_ERR_INVALID_PARAMETER = -2, /* Invalid parameter(s) */
+ MS_MEDIA_ERR_OUT_OF_MEMORY = -3, /* Out of memory */
+ MS_MEDIA_ERR_NOT_ENOUGH_SPACE = -4, /* not enough space in storage */
+ MS_MEDIA_ERR_UNSUPPORTED_CONTENT = -5, /* Not Supported Media Type */
+ MS_MEDIA_ERR_NOT_SUPPORTED_FEATURE = -6, /* Feature not supported */
+ MS_MEDIA_ERR_PERMISSION_DENIED = -7, /* Do have permission of request */
+ /* DB operation error*/
+ MS_MEDIA_ERR_DB_BUSY_FAIL = -100, /* DB Busy */
+ MS_MEDIA_ERR_DB_CONSTRAINT_FAIL = -101, /* DB CONSTRAINT fails - In case of insert, the record already exists */
+ MS_MEDIA_ERR_DB_NO_RECORD = -102, /* Item not found in DB */
+ MS_MEDIA_ERR_DB_CORRUPT = -103, /* DB corrut error */
+ MS_MEDIA_ERR_DB_FULL_FAIL = -104, /* DB storage full error */
+ MS_MEDIA_ERR_DB_RESET = -105, /* media DB is reset */
+ MS_MEDIA_ERR_DB_INTERNAL = -110, /* DB internal error */
+ /* IPC operation error*/
+ MS_MEDIA_ERR_IPC = -200,
+ /* FILE error*/
+ MS_MEDIA_ERR_FILE_NOT_EXIST = -600, /* file does not exist */
+ /* MEDIA SERVER error*/
+ MS_MEDIA_ERR_SCANNER_FORCE_STOP = -700, /* scanning is stopped forcely */
+ /* Thumbnail error*/
+ MS_MEDIA_ERR_THUMB_UNSUPPORTED = -803, /* Unsupported content */
+ /*ETC*/
+ MS_MEDIA_ERR_USB_UNMOUNTED = -908, /* USB unmounted */
+ MS_MEDIA_ERR_DB_LIMIT_1 = -909
+} ms_error;
#endif /*_MEDIA_UTIL_ERR_H_*/