Tizen 2.1 base
[framework/multimedia/media-server.git] / lib / include / media-util-err.h
1 /*
2  *  Media Utility
3  *
4  * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
5  *
6  * Contact: Yong Yeon Kim <yy9875.kim@samsung.com>
7  *
8  * Licensed under the Apache License, Version 2.0 (the "License");
9  * you may not use this file except in compliance with the License.
10  * You may obtain a copy of the License at
11  *
12  * http://www.apache.org/licenses/LICENSE-2.0
13  *
14  * Unless required by applicable law or agreed to in writing, software
15  * distributed under the License is distributed on an "AS IS" BASIS,
16  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17  * See the License for the specific language governing permissions and
18  * limitations under the License.
19  *
20  */
21
22 /**
23  * This file defines api utilities of contents manager engines.
24  *
25  * @file                media-util-err.h
26  * @author      Yong Yeon Kim(yy9875.kim@samsung.com)
27  * @version     1.0
28  * @brief
29  */
30 #ifndef _MEDIA_UTIL_ERR_H_
31 #define _MEDIA_UTIL_ERR_H_
32
33 #define MS_MEDIA_ERR_NONE 0
34
35 /*internal operation error*/
36 #define MS_MEDIA_ERR_INTERNAL                           -1
37 #define MS_MEDIA_ERR_INVALID_CONTENT            -2   /**< Invalid content */
38 #define MS_MEDIA_ERR_INVALID_PARAMETER          -3   /**< invalid parameter(s) */
39 #define MS_MEDIA_ERR_INVALID_PATH                       -4   /**< Invalid path */
40 #define MS_MEDIA_ERR_ALLOCATE_MEMORY_FAIL       -5   /**< exception of memory allocation */
41 #define MS_MEDIA_ERR_DIR_OPEN_FAIL                      -6   /**< exception of dir open*/
42 #define MS_MEDIA_ERR_FILE_OPEN_FAIL                     -7   /**< exception of file doesn't exist*/
43
44 /*DB operation error*/
45 #define MS_MEDIA_ERR_DB_CONNECT_FAIL            -11  /**< connecting database fails */
46 #define MS_MEDIA_ERR_DB_DISCONNECT_FAIL                 -12  /**< disconnecting database fails */
47 #define MS_MEDIA_ERR_DB_INSERT_FAIL                     -13  /**< inserting record fails */
48 #define MS_MEDIA_ERR_DB_DELETE_FAIL                     -14  /**< deleting record fails */
49 #define MS_MEDIA_ERR_DB_UPDATE_FAIL                     -15  /**< updating record fails */
50 #define MS_MEDIA_ERR_DB_EXIST_ITEM_FAIL                 -16  /**< item does not exist */
51 #define MS_MEDIA_ERR_DB_BUSY_FAIL                       -17  /**< DB Busy */
52
53 /*DRM operation error*/
54 #define MS_MEDIA_ERR_DRM_REGISTER_FAIL          -21  /**< interting into drm db fails */
55 #define MS_MEDIA_ERR_DRM_GET_INFO_FAIL          -22  /**< getting inforamtion fails from DRM content */
56
57 /*IPC operation error*/
58 #define MS_MEDIA_ERR_SOCKET_INTERNAL                    -31  /**< receive error from socket API */
59 #define MS_MEDIA_ERR_SOCKET_CONN                                -32  /**< socket connect error */
60 #define MS_MEDIA_ERR_SOCKET_BIND                                -33  /**< socket binding fails */
61 #define MS_MEDIA_ERR_SOCKET_SEND                                -34  /**< socket sending fails */
62 #define MS_MEDIA_ERR_SOCKET_RECEIVE                     -35  /**< socket receiving fails */
63 #define MS_MEDIA_ERR_SOCKET_RECEIVE_TIMEOUT     -36  /**< socket receive timeout error */
64 #define MS_MEDIA_ERR_DBUS_ADD_FILTER                    -37  /**< DBUS add filter fails*/
65 #define MS_MEDIA_ERR_DBUS_GET                                   -38  /**< DBUS get fails */
66 #define MS_MEDIA_ERR_DATA_TAINTED                               -39  /**< received data is tainted */
67
68 /* SERVER error*/
69 #define MS_MEDIA_ERR_NOW_REGISTER_FILE          -41  /**< already inserting into DB */
70 #define MS_MEDIA_ERR_SCANNING_BUSY                      -42  /**< already directory scanning is running */
71 #define MS_MEDIA_ERR_DB_SERVER_BUSY_FAIL        -43  /**< DB server busy */
72 #define MS_MEDIA_ERR_SCANNER_FORCE_STOP         -44  /**< scanning is stopped forcely */
73
74 /*ETC*/
75 #define MS_MEDIA_ERR_VCONF_SET_FAIL                     -51  /**< vconf set fail*/
76 #define MS_MEDIA_ERR_VCONF_GET_FAIL                     -52  /**< vconf get fail*/
77 #define MS_MEDIA_ERR_MIME_GET_FAIL                      -53  /**< not media file*/
78 #define MS_MEDIA_ERR_SCANNER_NOT_READY          -54  /**< not media file*/
79 #define MS_MEDIA_ERR_DYNAMIC_LINK                       -55
80
81 #define MS_MEDIA_ERR_MAX                                                -999 /**< not media file*/
82
83 #endif /*_MEDIA_UTIL_ERR_H_*/