Modify error code for badge API
[platform/core/appfw/badge.git] / include / badge_error.h
1 /*
2  * Copyright (c) 2000 - 2017 Samsung Electronics Co., Ltd. All rights reserved.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  *
16  */
17
18
19 #ifndef __BADGE_ERROR_DEF_H__
20 #define __BADGE_ERROR_DEF_H__
21
22 #include <tizen.h>
23
24 #ifdef __cplusplus
25 extern "C" {
26 #endif
27
28 /**
29  * @file badge_error.h
30  * @brief This file contains the badge APIs
31  */
32
33 /**
34  * @addtogroup BADGE_MODULE
35  * @{
36  */
37
38 /**
39  * @brief Enumeration for Badge Error
40  */
41 typedef enum _badge_error_e {
42         BADGE_ERROR_NONE = TIZEN_ERROR_NONE,                    /**< Success */
43         BADGE_ERROR_INVALID_PARAMETER = TIZEN_ERROR_INVALID_PARAMETER,          /**< Invalid parameter */
44         BADGE_ERROR_OUT_OF_MEMORY = TIZEN_ERROR_OUT_OF_MEMORY,          /**< Out of memory */
45         BADGE_ERROR_PERMISSION_DENIED = TIZEN_ERROR_PERMISSION_DENIED,  /**< Permission denied */
46         BADGE_ERROR_IO_ERROR = TIZEN_ERROR_IO_ERROR,    /**< Error from I/O */
47         BADGE_ERROR_NOT_SUPPORTED = TIZEN_ERROR_NOT_SUPPORTED,  /**< Not supported (Since 4.0) */
48         BADGE_ERROR_FROM_DB = TIZEN_ERROR_BADGE | 0x01,         /**< Error from DB */
49         BADGE_ERROR_ALREADY_EXIST = TIZEN_ERROR_BADGE | 0x02,           /**< Already exist */
50         BADGE_ERROR_FROM_DBUS = TIZEN_ERROR_BADGE | 0x03,               /**< Error from DBus */
51         BADGE_ERROR_NOT_EXIST = TIZEN_ERROR_BADGE | 0x04,               /**< Not exist */
52         BADGE_ERROR_SERVICE_NOT_READY = TIZEN_ERROR_BADGE | 0x05,       /**< Error service not ready */
53         BADGE_ERROR_INVALID_PACKAGE = TIZEN_ERROR_BADGE | 0x06, /**< The caller application is not signed with the certificate of the badge owner*/
54 } badge_error_e;
55
56 /**
57  * @}
58  */
59
60 #ifdef __cplusplus
61         }
62 #endif
63
64 #endif /* __BADGE_ERROR_DEF_H__ */
65