Rename cynara-client-error.h to cynara-error.h
[platform/core/security/cynara.git] / src / helpers / creds-commons / creds-commons.cpp
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        src/helpers/creds-commons/creds-commons.cpp
18  * @author      Lukasz Wojciechowski <l.wojciechow@partner.samsung.com>
19  * @author      Radoslaw Bartosiak <r.bartosiak@samsung.com>
20  * @author      Aleksander Zdyb <a.zdyb@samsung.com>
21  * @version     1.0
22  * @brief       Implementation of external libcynara-creds-commons API
23  */
24
25 #include <attributes/attributes.h>
26
27 #include <cynara-creds-commons.h>
28 #include <cynara-error.h>
29
30 CYNARA_API
31 int cynara_creds_get_default_client_method(enum cynara_client_creds *method) {
32     //todo read from proper file and parse
33
34     *method = CLIENT_METHOD_SMACK;
35     return CYNARA_API_SUCCESS;
36 }
37
38 CYNARA_API
39 int cynara_creds_get_default_user_method(enum cynara_user_creds *method) {
40     //todo read from proper file and parse
41
42     *method = USER_METHOD_UID;
43     return CYNARA_API_SUCCESS;
44 }