Change error defines to enum 58/304658/1 accepted/tizen/unified/20240123.165910 accepted/tizen/unified/x/20240205.063937
authorminje.ahn <minje.ahn@samsung.com>
Tue, 23 Jan 2024 01:57:35 +0000 (10:57 +0900)
committerminje.ahn <minje.ahn@samsung.com>
Tue, 23 Jan 2024 01:57:35 +0000 (10:57 +0900)
Change-Id: I0881d82c0dec1e4cf923d0d08b94fac486615414
Signed-off-by: minje.ahn <minje.ahn@samsung.com>
lib/include/media-util-err.h
packaging/media-server.spec

index 0954dfa..5b84d5d 100644 (file)
 #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_*/
index 03410b0..9dbc8ae 100644 (file)
@@ -1,6 +1,6 @@
 Name:       media-server
 Summary:    A server for media content management
-Version:    0.5.0
+Version:    0.5.1
 Release:    0
 Group:      Multimedia/Service
 License:    Apache-2.0