|
1 /* |
|
2 * Copyright (c) 2006-2008 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: PKI server main module |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #ifndef __PKISERVICE_H__ |
|
21 #define __PKISERVICE_H__ |
|
22 |
|
23 #include <e32base.h> |
|
24 |
|
25 class CPKIMapper; |
|
26 class CSuspendedShutdown; |
|
27 class CCertificateRequestStore; |
|
28 class CKeyOperationQueue; |
|
29 |
|
30 class CPKIService:public CPolicyServer |
|
31 { |
|
32 public: |
|
33 static CPKIService* NewL(void); |
|
34 virtual ~CPKIService(void); |
|
35 |
|
36 CSession2* NewSessionL(const TVersion& aVersion, const RMessage2& aMessage) const; |
|
37 void SessionDeleted(); |
|
38 |
|
39 CCertificateRequestStore& CertificateRequestStore(); |
|
40 |
|
41 private: |
|
42 CPKIService(); |
|
43 void ConstructL(); |
|
44 |
|
45 static const TUint iRangeCount; |
|
46 static const TInt iRanges[]; |
|
47 static const TUint8 iElementIndex[]; |
|
48 |
|
49 static const CPolicyServer::TPolicyElement iElements[]; |
|
50 static const CPolicyServer::TPolicy iPolicy; |
|
51 |
|
52 mutable TInt iSessionCount; |
|
53 |
|
54 CCertificateRequestStore *iCertificateRequestStore; |
|
55 CSuspendedShutdown *iShutdown; |
|
56 TBool iStopImmediately; |
|
57 CPKIMapper *iMapper; |
|
58 CKeyOperationQueue *iKeyOperationQueue; |
|
59 }; |
|
60 |
|
61 class CSuspendedShutdown : public CActive |
|
62 { |
|
63 public: |
|
64 CSuspendedShutdown(); |
|
65 void Construct(); |
|
66 ~CSuspendedShutdown(); |
|
67 void ArmShutdown(); |
|
68 private: |
|
69 void DoCancel(); |
|
70 void RunL(); |
|
71 private: |
|
72 RTimer iTimer; |
|
73 }; |
|
74 |
|
75 |
|
76 #endif |