Add additional error code CYNARA_API_CACHE_MISS
[platform/core/security/cynara.git] / src / include / cynara-client-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 /*
17  * @file        cynara-error.h
18  * @author      Lukasz Wojciechowski <l.wojciechow@partner.samsung.com>
19  * @author      Zofia Abramowska <z.abramowska@samsung.com>
20  * @version     1.0
21  * @brief       This file contains error codes returned by client APIs of Cynara.
22  */
23
24 #ifndef CYNARA_CLIENT_ERROR_H
25 #define CYNARA_CLIENT_ERROR_H
26
27 /**
28  * \name Return Codes
29  * exported by the foundation API.
30  * result codes begin with the start error code and extend into negative direction.
31  * @{
32 */
33
34 /*! \brief   indicating the result of the one specific API is successful or access is allowed */
35 #define CYNARA_API_SUCCESS 0
36
37 /*! \brief   indicating that access that was checked is denied */
38 #define CYNARA_API_ACCESS_DENIED -1
39
40 /*! \brief   indicating system is running out of memory state */
41 #define CYNARA_API_OUT_OF_MEMORY -2
42
43 /*! \brief   indicating the API's parameter is malformed */
44 #define CYNARA_API_INVALID_PARAM -3
45
46 /*! \brief   service not available */
47 #define CYNARA_API_SERVICE_NOT_AVAILABLE -4
48
49 /*! \brief   indicating that value is not present in cache */
50 #define CYNARA_API_CACHE_MISS -5
51 /** @}*/
52
53 #endif // CYNARA_CLIENT_ERROR_H