1 /* |
1 /* |
2 * Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). |
2 * Copyright (c) 2005-2010 Nokia Corporation and/or its subsidiary(-ies). |
3 * All rights reserved. |
3 * All rights reserved. |
4 * This component and the accompanying materials are made available |
4 * This component and the accompanying materials are made available |
5 * under the terms of "Eclipse Public License v1.0" |
5 * under the terms of "Eclipse Public License v1.0" |
6 * which accompanies this distribution, and is available |
6 * which accompanies this distribution, and is available |
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
16 */ |
16 */ |
17 |
17 |
18 |
18 |
19 |
19 |
20 #include <e32base.h> |
20 #include <e32base.h> |
|
21 #include <certificateapps.h> |
21 |
22 |
22 #include <centralrepository.h> // link against centralrepository.lib |
23 LOCAL_C void setSettingsL(); |
23 #include <settingsinternalcrkeys.h> |
|
24 |
|
25 #include <certificateapps.h> |
|
26 |
|
27 |
|
28 _LIT(KVpnManagementUiDllName, "vpnmanagementui.dll"); |
|
29 |
|
30 LOCAL_C void setKeysAndOtherSettingsL(); |
|
31 |
24 |
32 // The starting point |
25 // The starting point |
33 GLDEF_C TInt E32Main() |
26 GLDEF_C TInt E32Main() |
34 { |
27 { |
35 __UHEAP_MARK; |
28 __UHEAP_MARK; |
36 CTrapCleanup* cleanup = CTrapCleanup::New(); |
29 CTrapCleanup* cleanup = CTrapCleanup::New(); |
37 TRAPD(error, setKeysAndOtherSettingsL()); |
30 TRAPD(error, setSettingsL()); |
38 if (error != KErrNone) |
31 if (error != KErrNone) |
39 { |
32 { |
40 ; |
33 ; |
41 } |
34 } |
42 delete cleanup; |
35 delete cleanup; |
43 __UHEAP_MARKEND; |
36 __UHEAP_MARKEND; |
44 return 0; |
37 return 0; |
45 } |
38 } |
46 |
39 |
47 |
40 |
48 LOCAL_C void setKeysAndOtherSettingsL() |
41 LOCAL_C void setSettingsL() |
49 { |
42 { |
50 // Connecting and initialization: |
|
51 CRepository* repository = CRepository::NewL( KCRUidCommunicationSettings ); |
|
52 repository->Set( KSettingsVPNSupported, 1 ); |
|
53 repository->Set( KSettingsVPNImplementation, KVpnManagementUiDllName ); |
|
54 delete repository; |
|
55 |
|
56 CCertificateAppInfoManager* manager = CCertificateAppInfoManager::NewLC(); |
43 CCertificateAppInfoManager* manager = CCertificateAppInfoManager::NewLC(); |
57 |
44 |
58 const TUid KUidVpn = {0x101F7993}; |
45 const TUid KUidVpn = {0x101F7993}; |
59 _LIT(KVpnApplicationName, "VPN"); |
46 _LIT(KVpnApplicationName, "VPN"); |
60 TName vpnApplicationName(KVpnApplicationName); |
47 TName vpnApplicationName(KVpnApplicationName); |