|
1 /* |
|
2 * Copyright (c) 2003 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: Handles API requests for VPN Manager. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #ifndef __VPNAPISERVANT_H__ |
|
21 #define __VPNAPISERVANT_H__ |
|
22 |
|
23 #include <e32base.h> |
|
24 #include "vpnapi.h" |
|
25 #include "eventlogger.h" |
|
26 |
|
27 class RFs; |
|
28 class CPolicyStore; |
|
29 class CPwdChanger; |
|
30 class CPolicyImporter; |
|
31 |
|
32 /** |
|
33 * Services the requests received from clients that use the VPN API. |
|
34 */ |
|
35 class CVpnApiServant : public CBase |
|
36 { |
|
37 public: |
|
38 static CVpnApiServant* NewL(RFs& aFs); |
|
39 ~CVpnApiServant(); |
|
40 |
|
41 TBool ServiceL(const RMessage2& aMessage); |
|
42 |
|
43 void PasswordChangeComplete(); |
|
44 void PolicyImportComplete(); |
|
45 |
|
46 CPolicyStore* PolicyStore(); |
|
47 void ImportSinglePolicyL(const TDesC& aDir, TVpnPolicyId& aNewPolicyId, |
|
48 TRequestStatus& aStatus); |
|
49 void CancelImportSinglePolicy(); |
|
50 |
|
51 DEFINE_EVENT_LOGGER |
|
52 |
|
53 private: |
|
54 CVpnApiServant(RFs& aFs); |
|
55 void ConstructL(); |
|
56 |
|
57 void ImportPolicyL(const RMessage2& aMessage); |
|
58 void CancelImportPolicy(const RMessage2& aMessage); |
|
59 void EnumeratePoliciesL(const RMessage2& aMessage); |
|
60 void GetPolicyInfoL(const RMessage2& aMessage); |
|
61 void GetPolicyDetailsL(const RMessage2& aMessage); |
|
62 void DeletePolicyL(const RMessage2& aMessage); |
|
63 void ChangePasswordL(const RMessage2& aMessage); |
|
64 void CancelChangePassword(const RMessage2& aMessage); |
|
65 void GetPolicySizeL(const RMessage2& aMessage); |
|
66 void GetPolicyDataL(const RMessage2& aMessage); |
|
67 TInt PolicySizeL(const TVpnPolicyId& aPolicyId); |
|
68 void AddPolicyL(const RMessage2& aMessage); |
|
69 void UpdatePolicyDetailsL(const RMessage2& aMessage); |
|
70 void UpdatePolicyDataL(const RMessage2& aMessage); |
|
71 |
|
72 private: |
|
73 CPolicyStore* iPolicyStore; |
|
74 CPwdChanger* iPwdChanger; |
|
75 CPolicyImporter* iPolicyImporter; |
|
76 RFs& iFs; |
|
77 }; |
|
78 |
|
79 #endif // __VPNAPISERVANT_H__ |