Initialize Tizen 2.3
[framework/osp/security-service.git] / inc / CertificateService.h
1 //
2 // Copyright (c) 2012-2013 Samsung Electronics Co., Ltd.
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 /**
18  * @file                OspCerMgrServiceD.h
19  * @brief               This is the header file of the Certificate Manger daemon.
20  */
21
22 #ifndef _CERTMGR_SERVICE_H_
23 #define _CERTMGR_SERVICE_H_
24
25 #include <FApp.h>
26 #include <FIo.h>
27 #include <FIoIFileEventListener.h>
28 #include <FIoFileEventManager.h>
29
30 namespace Tizen { namespace Security { namespace Cert
31 {
32
33 class _CertServiceStub;
34
35 } } }
36
37 //opt/share/cert-svc/certs/
38 class FileEventListenerCerts
39         : public Tizen::Io::IFileEventListener
40 {
41 public:
42         virtual void OnFileEventOccured(const unsigned long events, const Tizen::Base::String& path, const unsigned int eventId);
43 };
44
45 //opt/share/cert-svc/certs/sim/
46 class FileEventListenerCertsSim
47         : public Tizen::Io::IFileEventListener
48 {
49 public:
50         virtual void OnFileEventOccured(const unsigned long events, const Tizen::Base::String& path, const unsigned int eventId);
51 };
52
53 //opt/share/cert-svc/certs/sim/operator/
54 class FileEventListenerCertsSimOperator
55         : public Tizen::Io::IFileEventListener
56 {
57 public:
58         virtual void OnFileEventOccured(const unsigned long events, const Tizen::Base::String& path, const unsigned int eventId);
59 };
60
61 //opt/share/cert-svc/certs/sim/thirdparty/
62 class FileEventListenerCertsSimThirdparty
63         : public Tizen::Io::IFileEventListener
64 {
65 public:
66         virtual void OnFileEventOccured(const unsigned long events, const Tizen::Base::String& path, const unsigned int eventId);
67 };
68
69 //opt/share/cert-svc/certs/ssl/
70 class FileEventListenerCertsSsl
71         : public Tizen::Io::IFileEventListener
72 {
73 public:
74         virtual void OnFileEventOccured(const unsigned long events, const Tizen::Base::String& path, const unsigned int eventId);
75 };
76
77 //usr/share/cert-svc/ca-certs/
78 class FileEventListenerUsrCaCerts
79         : public Tizen::Io::IFileEventListener
80 {
81 public:
82         virtual void OnFileEventOccured(const unsigned long events, const Tizen::Base::String& path, const unsigned int eventId);
83 };
84
85 /**
86  * [CertificateService] Manages Certificate privilege API calls
87  */
88 class CertificateService
89 {
90 public:
91         CertificateService();
92         ~CertificateService();
93         result Construct(void);
94
95 private:
96         Tizen::Security::Cert::_CertServiceStub* __pCertMgrServer;
97         Tizen::Io::FileEventManager __fileEventManagerCerts;
98         Tizen::Io::FileEventManager __fileEventManagerCertsSim;
99         Tizen::Io::FileEventManager __fileEventManagerCertsSimOperator;
100         Tizen::Io::FileEventManager __fileEventManagerCertsSimThirdparty;
101         Tizen::Io::FileEventManager __fileEventManagerCertsSsl;
102         Tizen::Io::FileEventManager __fileEventManagerUsrCaCerts;
103         Tizen::Io::FileEventManager __fileEventManagerUsrCaCertsSsl;
104
105         FileEventListenerCerts* __pFileEventListenerCerts;
106         FileEventListenerCertsSim* __pFileEventListenerCertsSim;
107         FileEventListenerCertsSimOperator* __pFileEventListenerCertsSimOperator;
108         FileEventListenerCertsSimThirdparty* __pFileEventListenerCertsSimThirdparty;
109         FileEventListenerCertsSsl* __pFileEventListenerCertsSsl;
110         FileEventListenerUsrCaCerts* __pFileEventListenerUsrCaCerts;
111 };
112
113 #endif // _CERTMGR_SERVICE_H_