Fix serious bug that causes crash on CKM exit.
[platform/core/security/key-manager.git] / src / manager / service / ocsp-service.h
1 /*
2  *  Copyright (c) 2014 Samsung Electronics Co.
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        ocsp-service.h
18  * @author      Bartlomiej Grzelewski (b.grzelewski@samsung.com)
19  * @version     1.0
20  * @brief       OCSP service implementation.
21  */
22 #pragma once
23
24 #include <thread-service.h>
25 #include <message-buffer.h>
26
27 namespace CKM {
28
29 class OCSPLogic;
30
31 class OCSPService : public CKM::ThreadService
32 {
33 public:
34     OCSPService();
35     OCSPService(const OCSPService &) = delete;
36     OCSPService(OCSPService &&) = delete;
37     OCSPService& operator=(const OCSPService &) = delete;
38     OCSPService& operator=(OCSPService &&) = delete;
39
40     virtual void Start();
41     virtual void Stop();
42
43     virtual ~OCSPService();
44
45     ServiceDescriptionVector GetServiceDescription();
46
47 private:
48     bool ProcessOne(
49         const ConnectionID &conn,
50         ConnectionInfo &info);
51
52     OCSPLogic *m_logic;
53 };
54
55 } // namespace CKM
56