Add cynara mockup.
[platform/core/security/key-manager.git] / src / manager / main / cynara-mockup.cpp
1 /*
2  *  Copyright (c) 2015 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-mockup.cpp
18  * @author      Bartlomiej Grzelewski (b.grzelewski@samsung.com)
19  * @version     1.0
20  * @brief       Mockup for cynara used in ckm-tests.
21  */
22 #include <string>
23
24 #include <cynara.h>
25
26 namespace CKM {
27
28 Cynara::Cynara(GenericSocketManager *socketManager)
29   : m_socketManager(socketManager)
30   , m_cynara(nullptr)
31 {}
32
33 void Cynara::Request(
34     const std::string &,
35     const std::string &,
36     const std::string &,
37     const std::string &,
38     StatusCallback callback)
39 {
40     callback(true);
41 }
42
43 void Cynara::ProcessSocket() {}
44
45 Cynara::~Cynara(){}
46
47 void Cynara::ChangeStatus(
48     int,
49     int,
50     cynara_async_status)
51 {}
52
53 void Cynara::ProcessResponse(
54     cynara_check_id,
55     cynara_async_call_cause,
56     int)
57 {}
58
59 void Cynara::SendRequest(
60     const std::string &,
61     const std::string &,
62     const std::string &,
63     const std::string &,
64     StatusCallback)
65 {}
66
67 void Cynara::ChangeStatusCallback(
68     int,
69     int,
70     cynara_async_status,
71     void *)
72 {}
73
74 void Cynara::ProcessResponseCallback(
75     cynara_check_id,
76     cynara_async_call_cause,
77     int,
78     void *)
79 {}
80
81 bool Cynara::GetUserFromSocket(
82     int,
83     std::string &)
84 {
85     return true;
86 }
87
88 bool Cynara::GetClientFromSocket(
89     int,
90     std::string &)
91 {
92     return true;
93 }
94
95 } // namespace CKM