split doxygen module into 3 sub modules
[platform/core/security/key-manager.git] / src / include / ckmc / ckmc-error.h
1 /*
2  *  Copyright (c) 2014 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  * @file    ckmc-error.h
17  * @version 1.0
18  * @brief   This file contains error codes of the Key Manager
19 */
20 #ifndef __TIZEN_CORE_CKMC_ERROR_H_
21 #define __TIZEN_CORE_CKMC_ERROR_H_
22
23 #ifdef __cplusplus
24 extern "C" {
25 #endif
26
27 /**
28  * @addtogroup CAPI_KEY_MANAGER_TYPES_MODULE
29  * @{
30  */
31
32 /**
33  * @brief indicating the result of the one specific API is successful
34  */
35 #define CKMC_API_SUCCESS 0
36
37 /**
38  * @brief indicating the socket between client and Central Key Manager failed
39  */
40 #define CKMC_API_ERROR_SOCKET -1
41
42 /**
43  * @brief indicating the request from client is malformed
44  */
45 #define CKMC_API_ERROR_BAD_REQUEST -2
46
47 /**
48  * @brief indicating the response from Central Key Manager is malformed
49  */
50 #define CKMC_API_ERROR_BAD_RESPONSE -3
51
52 /**
53  * @brief indicating the transmitting request failed.
54  */
55 #define CKMC_API_ERROR_SEND_FAILED -4
56
57 /**
58  * @brief indicating the receiving response failed.
59  */
60 #define CKMC_API_ERROR_RECV_FAILED -5
61
62 /**
63  * @brief indicating the authentication between client and manager failed.
64  */
65 #define CKMC_API_ERROR_AUTHENTICATION_FAILED -6
66
67 /**
68  * @brief indicating the API's input parameter is malformed
69  */
70 #define CKMC_API_ERROR_INPUT_PARAM -7
71
72 /**
73  * @brief indicating the output buffer size which is passed as parameter is too small
74  */
75 #define CKMC_API_ERROR_BUFFER_TOO_SMALL -8
76
77 /**
78  * @brief indicating system  is running out of memory state
79  */
80 #define CKMC_API_ERROR_OUT_OF_MEMORY -9
81
82 /**
83  * @brief indicating the access has been denied by Central Key Manager
84  */
85 #define CKMC_API_ERROR_ACCESS_DENIED -10
86
87 /**
88  * @brief indicating Central Key Manager has been failed for some reason
89  */
90 #define CKMC_API_ERROR_SERVER_ERROR -11
91
92 /**
93  * @brief indicating the database was not unlocked - user did not login
94  */
95 #define CKMC_API_ERROR_DB_LOCKED -12
96
97 /**
98  * @brief indicating an internal error inside the database
99  */
100 #define CKMC_API_ERROR_DB_ERROR -13
101
102 /**
103  * @brief indicating that provided alias already exists in the database
104  */
105 #define CKMC_API_ERROR_DB_ALIAS_EXISTS -14
106
107
108 /**
109  * @brief indicating that request given to database returned no result
110  */
111 #define CKMC_API_ERROR_DB_ALIAS_UNKNOWN -15
112
113 /**
114  * @brief indicating that CA certificate(s) were unknown and chain could not be created
115  */
116 #define CKMC_API_ERROR_VERIFICATION_FAILED -16
117
118 /**
119  * @brief indicating that a provided file or binary has not a valid format
120  */
121 #define CKMC_API_ERROR_INVALID_FORMAT -17
122
123 /**
124  * @brief indicating that provided file doesn't exists or cannot be accessed in the file system
125  */
126 #define CKMC_API_ERROR_FILE_ACCESS_DENIED -18
127
128 /**
129  * @brief indicating the error with unknown reason
130  */
131 #define CKMC_API_ERROR_UNKNOWN -255
132
133
134 /**
135  * @}
136  */
137
138 #ifdef __cplusplus
139 }
140 #endif
141
142 #endif /* __TIZEN_CORE_CKMC_ERROR_H_ */