# HG changeset patch # User Dremov Kirill (Nokia-D-MSW/Tampere) # Date 1283260456 -10800 # Node ID 473321461bba0cb5d807e6ba08e2ef39bf59c926 # Parent 9f4e37332ce5e7dd602dced25ae157d98eb9d799 Revision: 201033 Kit: 201035 diff -r 9f4e37332ce5 -r 473321461bba group/bld.inf --- a/group/bld.inf Thu Aug 19 10:54:34 2010 +0300 +++ b/group/bld.inf Tue Aug 31 16:14:16 2010 +0300 @@ -46,23 +46,17 @@ ../vpnengine/vpnmanager/rom/vpnmanager.iby CORE_MW_LAYER_IBY_EXPORT_PATH(vpnmanager.iby) ../vpnengine/vpnins/rom/vpnins.iby CORE_MW_LAYER_IBY_EXPORT_PATH(vpnins.iby) ../vpnengine/vpnipsecpolparser/rom/vpnipsecpolparser.iby CORE_MW_LAYER_IBY_EXPORT_PATH(vpnipsecpolparser.iby) -../vpnengine/agileprovisionws/rom/agileprovisionws.iby CORE_MW_LAYER_IBY_EXPORT_PATH(agileprovisionws.iby) ../vpnengine/vpntcwrapper/rom/vpntcwrapper.iby CORE_MW_LAYER_IBY_EXPORT_PATH(vpntcwrapper.iby) -../vpnengine/vpnextapi/rom/vpnextapi.iby CORE_MW_LAYER_IBY_EXPORT_PATH(vpnextapi.iby) + ../vpnui/vpnecomnotifier/rom/vpnecomnotifier.iby CORE_MW_LAYER_IBY_EXPORT_PATH(vpnecomnotifier.iby) ../vpnui/vpndialogmanager/rom/vpndialogmanager.iby CORE_MW_LAYER_IBY_EXPORT_PATH(vpndialogmanager.iby) -../vpnui/vpnmanagementui/rom/vpnmanagementui.iby CORE_MW_LAYER_IBY_EXPORT_PATH(vpnmanagementui.iby) ../vpnui/vpnpolins/rom/vpnpolins.iby CORE_MW_LAYER_IBY_EXPORT_PATH(vpnpolins.iby) ../vpnui/vpnecomnotifier/rom/vpnecomnotifierResources.iby LANGUAGE_MW_LAYER_IBY_EXPORT_PATH(vpnecomnotifierResources.iby) -../vpnui/vpnmanagementui/rom/vpnmanagementuiResources.iby LANGUAGE_MW_LAYER_IBY_EXPORT_PATH(vpnmanagementuiResources.iby) ../vpnui/vpnpolicyrecognizer/rom/vpnpolicyrecognizer.iby CORE_MW_LAYER_IBY_EXPORT_PATH(vpnpolicyrecognizer.iby) ../rom/ipsecvpn.iby CORE_MW_LAYER_IBY_EXPORT_PATH(ipsecvpn.iby) -// vpnapi.dll should be in rom always -../vpnapiimpl/rom/vpnapi.iby CORE_MW_LAYER_IBY_EXPORT_PATH(vpnapi.iby) - // export localised loc file ../vpnui/vpnecomnotifier/loc/vpnnotifier.loc MW_LAYER_LOC_EXPORT_PATH(vpnnotifier.loc) @@ -79,8 +73,7 @@ #include "../vpnc_plat/vpnapi/group/bld.inf" #include "../vpnapiimpl/group/bld.inf" -#include "../vpnengine/vpnextapi/group/bld.inf" -#include "../vpnengine/agileprovisionws/group/bld.inf" + #include "../vpnengine/eventmediatorapi/group/bld.inf" #include "../vpnengine/eventviewer/group/bld.inf" #include "../vpnengine/vpnins/group/bld.inf" @@ -107,7 +100,6 @@ #include "../vpnengine/pkiservice/group/bld.inf" #include "../vpnengine/vpnconnagt/group/bld.inf" #include "../vpnengine/vpnmanager/group/bld.inf" -#include "../vpnui/vpnmanagementui/group/bld.inf" #include "../vpnui/vpnpolins/group/bld.inf" #include "../vpnui/vpnpolicyrecognizer/group/bld.inf" #include "../vpnengine/vpncleaner/group/bld.inf" diff -r 9f4e37332ce5 -r 473321461bba group/update_version_h.pl --- a/group/update_version_h.pl Thu Aug 19 10:54:34 2010 +0300 +++ b/group/update_version_h.pl Tue Aug 31 16:14:16 2010 +0300 @@ -1,5 +1,5 @@ # -# Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies). +# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). # All rights reserved. # This component and the accompanying materials are made available # under the terms of "Eclipse Public License v1.0" @@ -19,8 +19,8 @@ use Cwd; use POSIX qw(strftime); -my $PLATFORM_LONG = "4_2"; -my $PLATFORM_SHORT = "42"; +my $PLATFORM_LONG = "5_0"; +my $PLATFORM_SHORT = "50"; sub update_version_h { @@ -72,9 +72,14 @@ } +my $oldpwd = getcwd(); +chdir ".."; + ### VERSION.H ########### # version.h update_version_h( - '../vpnengine/vpncommon/inc/version.h', + 'vpnengine/vpncommon/inc/version.h', $PLATFORM_LONG); + +chdir $oldpwd; diff -r 9f4e37332ce5 -r 473321461bba help/group/bld.inf --- a/help/group/bld.inf Thu Aug 19 10:54:34 2010 +0300 +++ b/help/group/bld.inf Tue Aug 31 16:14:16 2010 +0300 @@ -24,4 +24,6 @@ ../inc/vpn.hlp.hrh MW_LAYER_PLATFORM_EXPORT_PATH(csxhelp/vpn.hlp.hrh) +#ifndef FF_GENERIC_ACCESS_NETWORK // UMA not supported ../rom/vpnclienthelps_variant.iby CUSTOMER_APP_LAYER_IBY_EXPORT_PATH(vpnclienthelps_variant.iby) +#endif \ No newline at end of file diff -r 9f4e37332ce5 -r 473321461bba layers.sysdef.xml --- a/layers.sysdef.xml Thu Aug 19 10:54:34 2010 +0300 +++ b/layers.sysdef.xml Tue Aug 31 16:14:16 2010 +0300 @@ -7,8 +7,8 @@ - + + diff -r 9f4e37332ce5 -r 473321461bba package_definition.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/package_definition.xml Tue Aug 31 16:14:16 2010 +0300 @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + diff -r 9f4e37332ce5 -r 473321461bba package_map.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/package_map.xml Tue Aug 31 16:14:16 2010 +0300 @@ -0,0 +1,1 @@ + diff -r 9f4e37332ce5 -r 473321461bba rom/ipsecvpn.iby --- a/rom/ipsecvpn.iby Thu Aug 19 10:54:34 2010 +0300 +++ b/rom/ipsecvpn.iby Tue Aug 31 16:14:16 2010 +0300 @@ -22,9 +22,13 @@ #ifdef FF_VPN_CLIENT +#ifndef FF_GENERIC_ACCESS_NETWORK // UMA not supported + data=ZSYSTEM\install\ipsecvpn.sis system\install\ipsecvpn.sis data=ZSYSTEM\install\ipsecvpn_vpnpolins.sis system\install\ipsecvpn_vpnpolins.sis #endif +#endif // FF_VPN_CLIENT + #endif // __IPSECVPN_IBY__ diff -r 9f4e37332ce5 -r 473321461bba vpnapiimpl/group/bld.inf --- a/vpnapiimpl/group/bld.inf Thu Aug 19 10:54:34 2010 +0300 +++ b/vpnapiimpl/group/bld.inf Tue Aug 31 16:14:16 2010 +0300 @@ -1,5 +1,5 @@ /* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). +* Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies). * All rights reserved. * This component and the accompanying materials are made available * under the terms of "Eclipse Public License v1.0" @@ -18,5 +18,9 @@ #include +PRJ_EXPORTS +// vpnapi.dll should be in rom always +../rom/vpnapi.iby CORE_MW_LAYER_IBY_EXPORT_PATH(vpnapi.iby) + PRJ_MMPFILES vpnapi.mmp diff -r 9f4e37332ce5 -r 473321461bba vpnclient_sis/group/create_vpnclient_sis.pl --- a/vpnclient_sis/group/create_vpnclient_sis.pl Thu Aug 19 10:54:34 2010 +0300 +++ b/vpnclient_sis/group/create_vpnclient_sis.pl Tue Aug 31 16:14:16 2010 +0300 @@ -22,7 +22,7 @@ #Subroutines to update version information -my $PLATFORM = "42"; +my $PLATFORM = "50"; # # Creates a temp file and replaces line diff -r 9f4e37332ce5 -r 473321461bba vpnclient_sis/group/mVPN_vpnpolins_armv5.sis Binary file vpnclient_sis/group/mVPN_vpnpolins_armv5.sis has changed diff -r 9f4e37332ce5 -r 473321461bba vpnclient_sis/group/nokia_vpn_client_localised_armv5_udeb.pkg --- a/vpnclient_sis/group/nokia_vpn_client_localised_armv5_udeb.pkg Thu Aug 19 10:54:34 2010 +0300 +++ b/vpnclient_sis/group/nokia_vpn_client_localised_armv5_udeb.pkg Tue Aug 31 16:14:16 2010 +0300 @@ -17,7 +17,7 @@ ; LANGUAGES ; - None (English only by default) -&EN,FR,GE,SP,IT,SW,DA,NO,FI,AM,PO,TU,IC,RU,HU,DU,CS,SK,PL,SL,TC,HK,ZH,JA,TH,AR,TL,BG,HR,ET,FA,CF,EL,HE,IN,LV,LT,MS,BP,RO,SR,LS,UK,UR,VI,44,102,103,65 +&EN,FR,GE,SP,IT,SW,DA,NO,FI,AM,PO,TU,IC,RU,HU,DU,CS,SK,PL,SL,TC,HK,ZH,JA,TH,AR,TL,BG,HR,ET,FA,CF,EL,HE,IN,LV,LT,MS,BP,RO,SR,LS,UK,UR,VI,44,102,103 ; INSTALLATION HEADER ; UID of acuagentcrypto @@ -68,7 +68,6 @@ "Nokia VPN client", "Nokia VPN", "Nokia VPN", - "Nokia VPN", "Nokia VPN"}, (0x101F5147),32,08,0124, TYPE=SA, RU @@ -121,7 +120,6 @@ "Series60ProductID", "Series60ProductID", "Series60ProductID", -"Series60ProductID", "Series60ProductID"} ; Product / platform version compatibility - S60 5.2 @@ -173,7 +171,6 @@ "Series60ProductID", "Series60ProductID", "Series60ProductID", -"Series60ProductID", "Series60ProductID"} ; List of localised vendor names - one per language. @@ -224,7 +221,6 @@ "Nokia", "Nokia", "Nokia", -"Nokia", "Nokia"} ; The non-localised, globally unique vendor name (mandatory) @@ -271,11 +267,6 @@ "\epoc32\release\armv5\udeb\dmadpki.dll"-"!:\sys\bin\dmadpki.dll" "\epoc32\data\z\resource\plugins\dmadpki.rsc"-"!:\resource\plugins\dmadpki.rsc" -; Agile Provision -"\epoc32\release\armv5\udeb\agileprovisionws.dll"-"!:\sys\bin\agileprovisionws.dll" - -; VPN EXT API -"\epoc32\release\armv5\udeb\vpnextapi.dll"-"!:\sys\bin\vpnextapi.dll" ; VPN API ( include by platform ) ;"\epoc32\release\armv5\udeb\vpnapi.dll"-"!:\sys\bin\vpnapi.dll" @@ -283,65 +274,58 @@ ;"\epoc32\data\z\resource\errors\vpnerr.r01"-"!:\resource\Errors\vpnerr.r01" ;"\epoc32\data\z\resource\errors\vpnerr.rsc"-"!:\resource\Errors\vpnerr.rsc" -; VPN Management UI -"\epoc32\release\armv5\udeb\vpnmanagementui.dll"-"!:\sys\bin\vpnmanagementui.dll" - -{ -"\epoc32\data\z\resource\vpnmanagementuirsc.r01" -"\epoc32\data\z\resource\vpnmanagementuirsc.r02" -"\epoc32\data\z\resource\vpnmanagementuirsc.r03" -"\epoc32\data\z\resource\vpnmanagementuirsc.r04" -"\epoc32\data\z\resource\vpnmanagementuirsc.r05" -"\epoc32\data\z\resource\vpnmanagementuirsc.r06" -"\epoc32\data\z\resource\vpnmanagementuirsc.r07" -"\epoc32\data\z\resource\vpnmanagementuirsc.r08" -"\epoc32\data\z\resource\vpnmanagementuirsc.r09" -"\epoc32\data\z\resource\vpnmanagementuirsc.r10" -"\epoc32\data\z\resource\vpnmanagementuirsc.r13" -"\epoc32\data\z\resource\vpnmanagementuirsc.r14" -"\epoc32\data\z\resource\vpnmanagementuirsc.r15" -"\epoc32\data\z\resource\vpnmanagementuirsc.r16" -"\epoc32\data\z\resource\vpnmanagementuirsc.r17" -"\epoc32\data\z\resource\vpnmanagementuirsc.r18" -"\epoc32\data\z\resource\vpnmanagementuirsc.r25" -"\epoc32\data\z\resource\vpnmanagementuirsc.r26" -"\epoc32\data\z\resource\vpnmanagementuirsc.r27" -"\epoc32\data\z\resource\vpnmanagementuirsc.r28" -"\epoc32\data\z\resource\vpnmanagementuirsc.r29" -"\epoc32\data\z\resource\vpnmanagementuirsc.r30" -"\epoc32\data\z\resource\vpnmanagementuirsc.r31" -"\epoc32\data\z\resource\vpnmanagementuirsc.r32" -"\epoc32\data\z\resource\vpnmanagementuirsc.r33" -"\epoc32\data\z\resource\vpnmanagementuirsc.r37" -"\epoc32\data\z\resource\vpnmanagementuirsc.r39" -"\epoc32\data\z\resource\vpnmanagementuirsc.r42" -"\epoc32\data\z\resource\vpnmanagementuirsc.r45" -"\epoc32\data\z\resource\vpnmanagementuirsc.r49" -"\epoc32\data\z\resource\vpnmanagementuirsc.r50" -"\epoc32\data\z\resource\vpnmanagementuirsc.r51" -"\epoc32\data\z\resource\vpnmanagementuirsc.r54" -"\epoc32\data\z\resource\vpnmanagementuirsc.r57" -"\epoc32\data\z\resource\vpnmanagementuirsc.r59" -"\epoc32\data\z\resource\vpnmanagementuirsc.r67" -"\epoc32\data\z\resource\vpnmanagementuirsc.r68" -"\epoc32\data\z\resource\vpnmanagementuirsc.r70" -"\epoc32\data\z\resource\vpnmanagementuirsc.r76" -"\epoc32\data\z\resource\vpnmanagementuirsc.r78" -"\epoc32\data\z\resource\vpnmanagementuirsc.r79" -"\epoc32\data\z\resource\vpnmanagementuirsc.r83" -"\epoc32\data\z\resource\vpnmanagementuirsc.r93" -"\epoc32\data\z\resource\vpnmanagementuirsc.r94" -"\epoc32\data\z\resource\vpnmanagementuirsc.r96" -"\epoc32\data\z\resource\vpnmanagementuirsc.r44" -"\epoc32\data\z\resource\vpnmanagementuirsc.r102" -"\epoc32\data\z\resource\vpnmanagementuirsc.r103" -"\epoc32\data\z\resource\vpnmanagementuirsc.r65" -}-"!:\resource\vpnmanagementuirsc.rsc" - -; icon and GS plugin registration file -"\epoc32\data\z\resource\apps\vpnmanagementui.mif"-"!:\resource\apps\vpnmanagementui.mif" -"\epoc32\data\Z\resource\plugins\vpnmanagementui.rsc"-"!:\resource\plugins\vpnmanagementui.rsc" - +; VPN help resources +; Localized help files are missing, thus use only EE +; Help resources should be already in ROM but content can be updated from SIS package +;"\epoc32\data\Z\resource\xhtml\01\0x10200EC4\index.xml"-"!:\resource\xhtml\01\0x10200EC4\index.xml" +;{ +;"\epoc32\data\z\resource\help\vpn.h01" +;"\epoc32\data\z\resource\help\vpn.h02" +;"\epoc32\data\z\resource\help\vpn.h03" +;"\epoc32\data\z\resource\help\vpn.h04" +;"\epoc32\data\z\resource\help\vpn.h05" +;"\epoc32\data\z\resource\help\vpn.h06" +;"\epoc32\data\z\resource\help\vpn.h07" +;"\epoc32\data\z\resource\help\vpn.h08" +;"\epoc32\data\z\resource\help\vpn.h09" +;"\epoc32\data\z\resource\help\vpn.h10" +;"\epoc32\data\z\resource\help\vpn.h13" +;"\epoc32\data\z\resource\help\vpn.h14" +;"\epoc32\data\z\resource\help\vpn.h15" +;"\epoc32\data\z\resource\help\vpn.h16" +;"\epoc32\data\z\resource\help\vpn.h17" +;"\epoc32\data\z\resource\help\vpn.h18" +;"\epoc32\data\z\resource\help\vpn.h25" +;"\epoc32\data\z\resource\help\vpn.h26" +;"\epoc32\data\z\resource\help\vpn.h27" +;"\epoc32\data\z\resource\help\vpn.h28" +;"\epoc32\data\z\resource\help\vpn.h29" +;"\epoc32\data\z\resource\help\vpn.h30" +;"\epoc32\data\z\resource\help\vpn.h31" +;"\epoc32\data\z\resource\help\vpn.h32" +;"\epoc32\data\z\resource\help\vpn.h33" +;"\epoc32\data\z\resource\help\vpn.h37" +;"\epoc32\data\z\resource\help\vpn.h39" +;"\epoc32\data\z\resource\help\vpn.h42" +;"\epoc32\data\z\resource\help\vpn.h45" +;"\epoc32\data\z\resource\help\vpn.h49" +;"\epoc32\data\z\resource\help\vpn.h01" +;"\epoc32\data\z\resource\help\vpn.h51" +;"\epoc32\data\z\resource\help\vpn.h54" +;"\epoc32\data\z\resource\help\vpn.h57" +;"\epoc32\data\z\resource\help\vpn.h01" +;"\epoc32\data\z\resource\help\vpn.h59" +;"\epoc32\data\z\resource\help\vpn.h67" +;"\epoc32\data\z\resource\help\vpn.h68" +;"\epoc32\data\z\resource\help\vpn.h70" +;"\epoc32\data\z\resource\help\vpn.h76" +;"\epoc32\data\z\resource\help\vpn.h78" +;"\epoc32\data\z\resource\help\vpn.h79" +;"\epoc32\data\z\resource\help\vpn.h83" +;"\epoc32\data\z\resource\help\vpn.h93" +;"\epoc32\data\z\resource\help\vpn.h01" +;"\epoc32\data\z\resource\help\vpn.h01" +;}-"!:\resource\help\vpn.hlp" ; PKI Services Server "\epoc32\release\armv5\udeb\pkiservice.exe"-"!:\sys\bin\pkiservice.exe" @@ -426,17 +410,16 @@ "\epoc32\data\z\resource\vpnecomnotifier.r44" "\epoc32\data\z\resource\vpnecomnotifier.r102" "\epoc32\data\z\resource\vpnecomnotifier.r103" -"\epoc32\data\z\resource\vpnecomnotifier.r65" }-"!:\resource\vpnecomnotifier.rsc" ; XML Parser "\epoc32\release\armv5\udeb\utlxml.dll"-"!:\sys\bin\utlxml.dll" -; Install only languages that device supports +; During installation check languages that HW supports +; and install resources only for them. ; EN - 01 - English IF EXISTS ("z:\resource\avkon.r01") "\epoc32\data\z\resource\vpnecomnotifier.r01"-"!:\resource\vpnecomnotifier.r01" -"\epoc32\data\z\resource\vpnmanagementuirsc.r01"-"!:\resource\vpnmanagementui.r01" IF NOT EXISTS ("z:\resource\xhtml\01\0x10200EC4\index.xml") "\epoc32\data\Z\resource\xhtml\01\0x10200EC4\index.xml"-"!:\resource\xhtml\01\0x10200EC4\index.xml" "\epoc32\data\Z\resource\xhtml\01\0x10200EC4\keywords.xml"-"!:\resource\xhtml\01\0x10200EC4\keywords.xml" @@ -447,267 +430,228 @@ ; FR - 02 - French IF EXISTS ("z:\resource\avkon.r02") "\epoc32\data\z\resource\vpnecomnotifier.r02"-"!:\resource\vpnecomnotifier.r02" -"\epoc32\data\z\resource\vpnmanagementuirsc.r02"-"!:\resource\vpnmanagementui.r02" ENDIF ; GE - 03 - German IF EXISTS ("z:\resource\avkon.r03") "\epoc32\data\z\resource\vpnecomnotifier.r03"-"!:\resource\vpnecomnotifier.r03" -"\epoc32\data\z\resource\vpnmanagementuirsc.r03"-"!:\resource\vpnmanagementui.r03" ENDIF ; SP - 04 - Spanish IF EXISTS ("z:\resource\avkon.r04") "\epoc32\data\z\resource\vpnecomnotifier.r04"-"!:\resource\vpnecomnotifier.r04" -"\epoc32\data\z\resource\vpnmanagementuirsc.r04"-"!:\resource\vpnmanagementui.r04" ENDIF ; IT - 05 - Italian IF EXISTS ("z:\resource\avkon.r05") "\epoc32\data\z\resource\vpnecomnotifier.r05"-"!:\resource\vpnecomnotifier.r05" -"\epoc32\data\z\resource\vpnmanagementuirsc.r05"-"!:\resource\vpnmanagementui.r05" ENDIF ; SW - 06 - Swedish IF EXISTS ("z:\resource\avkon.r06") "\epoc32\data\z\resource\vpnecomnotifier.r06"-"!:\resource\vpnecomnotifier.r06" -"\epoc32\data\z\resource\vpnmanagementuirsc.r06"-"!:\resource\vpnmanagementui.r06" ENDIF ; DA - 07 - Danish IF EXISTS ("z:\resource\avkon.r07") "\epoc32\data\z\resource\vpnecomnotifier.r07"-"!:\resource\vpnecomnotifier.r07" -"\epoc32\data\z\resource\vpnmanagementuirsc.r07"-"!:\resource\vpnmanagementui.r07" ENDIF ; NO - 08 - Norwegian IF EXISTS ("z:\resource\avkon.r08") "\epoc32\data\z\resource\vpnecomnotifier.r08"-"!:\resource\vpnecomnotifier.r08" -"\epoc32\data\z\resource\vpnmanagementuirsc.r08"-"!:\resource\vpnmanagementui.r08" ENDIF ; FI - 09 - Finnish IF EXISTS ("z:\resource\avkon.r09") "\epoc32\data\z\resource\vpnecomnotifier.r09"-"!:\resource\vpnecomnotifier.r09" -"\epoc32\data\z\resource\vpnmanagementuirsc.r09"-"!:\resource\vpnmanagementui.r09" ENDIF ; AM - 10 - American IF EXISTS ("z:\resource\avkon.r10") "\epoc32\data\z\resource\vpnecomnotifier.r10"-"!:\resource\vpnecomnotifier.r10" -"\epoc32\data\z\resource\vpnmanagementuirsc.r10"-"!:\resource\vpnmanagementui.r10" ENDIF ; PO - 13 - Portuguese IF EXISTS ("z:\resource\avkon.r13") "\epoc32\data\z\resource\vpnecomnotifier.r13"-"!:\resource\vpnecomnotifier.r13" -"\epoc32\data\z\resource\vpnmanagementuirsc.r13"-"!:\resource\vpnmanagementui.r13" ENDIF ; TU - 14 - Turkish IF EXISTS ("z:\resource\avkon.r14") "\epoc32\data\z\resource\vpnecomnotifier.r14"-"!:\resource\vpnecomnotifier.r14" -"\epoc32\data\z\resource\vpnmanagementuirsc.r14"-"!:\resource\vpnmanagementui.r14" ENDIF ; IC - 15 - Icelandic IF EXISTS ("z:\resource\avkon.r15") "\epoc32\data\z\resource\vpnecomnotifier.r15"-"!:\resource\vpnecomnotifier.r15" -"\epoc32\data\z\resource\vpnmanagementuirsc.r15"-"!:\resource\vpnmanagementui.r15" ENDIF ; RU - 16 - Russian IF EXISTS ("z:\resource\avkon.r16") "\epoc32\data\z\resource\vpnecomnotifier.r16"-"!:\resource\vpnecomnotifier.r16" -"\epoc32\data\z\resource\vpnmanagementuirsc.r16"-"!:\resource\vpnmanagementui.r16" ENDIF ; HU - 17 - Hungarian IF EXISTS ("z:\resource\avkon.r17") "\epoc32\data\z\resource\vpnecomnotifier.r17"-"!:\resource\vpnecomnotifier.r17" -"\epoc32\data\z\resource\vpnmanagementuirsc.r17"-"!:\resource\vpnmanagementui.r17" ENDIF ; DU - 18 - Dutch IF EXISTS ("z:\resource\avkon.r18") "\epoc32\data\z\resource\vpnecomnotifier.r18"-"!:\resource\vpnecomnotifier.r18" -"\epoc32\data\z\resource\vpnmanagementuirsc.r18"-"!:\resource\vpnmanagementui.r18" ENDIF ; CS - 25 - Czech IF EXISTS ("z:\resource\avkon.r25") "\epoc32\data\z\resource\vpnecomnotifier.r25"-"!:\resource\vpnecomnotifier.r25" -"\epoc32\data\z\resource\vpnmanagementuirsc.r25"-"!:\resource\vpnmanagementui.r25" ENDIF ; SK - 26 - Slovak IF EXISTS ("z:\resource\avkon.r26") "\epoc32\data\z\resource\vpnecomnotifier.r26"-"!:\resource\vpnecomnotifier.r26" -"\epoc32\data\z\resource\vpnmanagementuirsc.r26"-"!:\resource\vpnmanagementui.r26" ENDIF ; PL - 27 - Polish IF EXISTS ("z:\resource\avkon.r27") "\epoc32\data\z\resource\vpnecomnotifier.r27"-"!:\resource\vpnecomnotifier.r27" -"\epoc32\data\z\resource\vpnmanagementuirsc.r27"-"!:\resource\vpnmanagementui.r27" ENDIF ; SL - 28 - Slovenian IF EXISTS ("z:\resource\avkon.r28") "\epoc32\data\z\resource\vpnecomnotifier.r28"-"!:\resource\vpnecomnotifier.r28" -"\epoc32\data\z\resource\vpnmanagementuirsc.r28"-"!:\resource\vpnmanagementui.r28" ENDIF ; TC - 29 - TaiwanChinese IF EXISTS ("z:\resource\avkon.r29") "\epoc32\data\z\resource\vpnecomnotifier.r29"-"!:\resource\vpnecomnotifier.r29" -"\epoc32\data\z\resource\vpnmanagementuirsc.r29"-"!:\resource\vpnmanagementui.r29" ENDIF ; HK - 30 - HongKongChinese IF EXISTS ("z:\resource\avkon.r30") "\epoc32\data\z\resource\vpnecomnotifier.r30"-"!:\resource\vpnecomnotifier.r30" -"\epoc32\data\z\resource\vpnmanagementuirsc.r30"-"!:\resource\vpnmanagementui.r30" ENDIF ; ZH - 31 - PrcChinese IF EXISTS ("z:\resource\avkon.r31") "\epoc32\data\z\resource\vpnecomnotifier.r31"-"!:\resource\vpnecomnotifier.r31" -"\epoc32\data\z\resource\vpnmanagementuirsc.r31"-"!:\resource\vpnmanagementui.r31" ENDIF ; JA - 32 - Japanese IF EXISTS ("z:\resource\avkon.r32") "\epoc32\data\z\resource\vpnecomnotifier.r32"-"!:\resource\vpnecomnotifier.r32" -"\epoc32\data\z\resource\vpnmanagementuirsc.r32"-"!:\resource\vpnmanagementui.r32" ENDIF ; TH - 33 - Thai IF EXISTS ("z:\resource\avkon.r33") "\epoc32\data\z\resource\vpnecomnotifier.r33"-"!:\resource\vpnecomnotifier.r33" -"\epoc32\data\z\resource\vpnmanagementuirsc.r33"-"!:\resource\vpnmanagementui.r33" ENDIF ; AR - 37 - Arabic IF EXISTS ("z:\resource\avkon.r37") "\epoc32\data\z\resource\vpnecomnotifier.r37"-"!:\resource\vpnecomnotifier.r37" -"\epoc32\data\z\resource\vpnmanagementuirsc.r37"-"!:\resource\vpnmanagementui.r37" ENDIF ; TL - 39 - Tagalog IF EXISTS ("z:\resource\avkon.r39") "\epoc32\data\z\resource\vpnecomnotifier.r39"-"!:\resource\vpnecomnotifier.r39" -"\epoc32\data\z\resource\vpnmanagementuirsc.r39"-"!:\resource\vpnmanagementui.r39" ENDIF ; BG - 42 - Bulgarian IF EXISTS ("z:\resource\avkon.r42") "\epoc32\data\z\resource\vpnecomnotifier.r42"-"!:\resource\vpnecomnotifier.r42" -"\epoc32\data\z\resource\vpnmanagementuirsc.r42"-"!:\resource\vpnmanagementui.r42" ENDIF ; HR - 45 - Croatian IF EXISTS ("z:\resource\avkon.r45") "\epoc32\data\z\resource\vpnecomnotifier.r45"-"!:\resource\vpnecomnotifier.r45" -"\epoc32\data\z\resource\vpnmanagementuirsc.r45"-"!:\resource\vpnmanagementui.r45" ENDIF ; ET - 49 - Estonian IF EXISTS ("z:\resource\avkon.r49") "\epoc32\data\z\resource\vpnecomnotifier.r49"-"!:\resource\vpnecomnotifier.r49" -"\epoc32\data\z\resource\vpnmanagementuirsc.r49"-"!:\resource\vpnmanagementui.r49" ENDIF ; FA - 50 - Farsi IF EXISTS ("z:\resource\avkon.r50") "\epoc32\data\z\resource\vpnecomnotifier.r50"-"!:\resource\vpnecomnotifier.r50" -"\epoc32\data\z\resource\vpnmanagementuirsc.r50"-"!:\resource\vpnmanagementui.r50" ENDIF ; CF - 51 - CanadianFrench IF EXISTS ("z:\resource\avkon.r51") "\epoc32\data\z\resource\vpnecomnotifier.r51"-"!:\resource\vpnecomnotifier.r51" -"\epoc32\data\z\resource\vpnmanagementuirsc.r51"-"!:\resource\vpnmanagementui.r51" ENDIF ; EL - 54 - Greek IF EXISTS ("z:\resource\avkon.r54") "\epoc32\data\z\resource\vpnecomnotifier.r54"-"!:\resource\vpnecomnotifier.r54" -"\epoc32\data\z\resource\vpnmanagementuirsc.r54"-"!:\resource\vpnmanagementui.r54" ENDIF ; HE - 57 - Hebrew IF EXISTS ("z:\resource\avkon.r57") "\epoc32\data\z\resource\vpnecomnotifier.r57"-"!:\resource\vpnecomnotifier.r57" -"\epoc32\data\z\resource\vpnmanagementuirsc.r57"-"!:\resource\vpnmanagementui.r57" ENDIF ; IN - 59 - Indonesian IF EXISTS ("z:\resource\avkon.r59") "\epoc32\data\z\resource\vpnecomnotifier.r59"-"!:\resource\vpnecomnotifier.r59" -"\epoc32\data\z\resource\vpnmanagementuirsc.r59"-"!:\resource\vpnmanagementui.r59" ENDIF ; LV - 67 - Latvian IF EXISTS ("z:\resource\avkon.r67") "\epoc32\data\z\resource\vpnecomnotifier.r67"-"!:\resource\vpnecomnotifier.r67" -"\epoc32\data\z\resource\vpnmanagementuirsc.r67"-"!:\resource\vpnmanagementui.r67" ENDIF ; LT - 68 - Lithuanian IF EXISTS ("z:\resource\avkon.r68") "\epoc32\data\z\resource\vpnecomnotifier.r68"-"!:\resource\vpnecomnotifier.r68" -"\epoc32\data\z\resource\vpnmanagementuirsc.r68"-"!:\resource\vpnmanagementui.r68" ENDIF ; MS - 70 - Malay IF EXISTS ("z:\resource\avkon.r70") "\epoc32\data\z\resource\vpnecomnotifier.r70"-"!:\resource\vpnecomnotifier.r70" -"\epoc32\data\z\resource\vpnmanagementuirsc.r70"-"!:\resource\vpnmanagementui.r70" ENDIF ; BP - 76 - BrazilianPortuguese IF EXISTS ("z:\resource\avkon.r76") "\epoc32\data\z\resource\vpnecomnotifier.r76"-"!:\resource\vpnecomnotifier.r76" -"\epoc32\data\z\resource\vpnmanagementuirsc.r76"-"!:\resource\vpnmanagementui.r76" ENDIF ; RO - 78 - Romanian IF EXISTS ("z:\resource\avkon.r78") "\epoc32\data\z\resource\vpnecomnotifier.r78"-"!:\resource\vpnecomnotifier.r78" -"\epoc32\data\z\resource\vpnmanagementuirsc.r78"-"!:\resource\vpnmanagementui.r78" ENDIF ; SR - 79 - Serbian IF EXISTS ("z:\resource\avkon.r79") "\epoc32\data\z\resource\vpnecomnotifier.r79"-"!:\resource\vpnecomnotifier.r79" -"\epoc32\data\z\resource\vpnmanagementuirsc.r79"-"!:\resource\vpnmanagementui.r79" ENDIF ; LS - 83 - LatinAmericanSpanish IF EXISTS ("z:\resource\avkon.r83") "\epoc32\data\z\resource\vpnecomnotifier.r83"-"!:\resource\vpnecomnotifier.r83" -"\epoc32\data\z\resource\vpnmanagementuirsc.r83"-"!:\resource\vpnmanagementui.r83" ENDIF ; UK - 93 - Ukrainian IF EXISTS ("z:\resource\avkon.r93") "\epoc32\data\z\resource\vpnecomnotifier.r93"-"!:\resource\vpnecomnotifier.r93" -"\epoc32\data\z\resource\vpnmanagementuirsc.r93"-"!:\resource\vpnmanagementui.r93" ENDIF ; UR - 94 - Urdu IF EXISTS ("z:\resource\avkon.r94") "\epoc32\data\z\resource\vpnecomnotifier.r94"-"!:\resource\vpnecomnotifier.r94" -"\epoc32\data\z\resource\vpnmanagementuirsc.r94"-"!:\resource\vpnmanagementui.r94" ENDIF ; VI - 96 - Vietnamese IF EXISTS ("z:\resource\avkon.r96") "\epoc32\data\z\resource\vpnecomnotifier.r96"-"!:\resource\vpnecomnotifier.r96" -"\epoc32\data\z\resource\vpnmanagementuirsc.r96"-"!:\resource\vpnmanagementui.r96" ENDIF ; - 44 - Catalan IF EXISTS ("z:\resource\avkon.r44") "\epoc32\data\z\resource\vpnecomnotifier.r44"-"!:\resource\vpnecomnotifier.r44" -"\epoc32\data\z\resource\vpnmanagementuirsc.r44"-"!:\resource\vpnmanagementui.r44" ENDIF ; - 102 - Basque IF EXISTS ("z:\resource\avkon.r102") "\epoc32\data\z\resource\vpnecomnotifier.r102"-"!:\resource\vpnecomnotifier.r102" -"\epoc32\data\z\resource\vpnmanagementuirsc.r102"-"!:\resource\vpnmanagementui.r102" +; Helps do not support language id 102 yet +;IF NOT EXISTS ("z:\resource\xhtml\102\0x10200EC4\index.xml") +;"\epoc32\data\Z\resource\xhtml\102\0x10200EC4\index.xml"-"!:\resource\xhtml\102\0x10200EC4\index.xml" +;"\epoc32\data\Z\resource\xhtml\102\0x10200EC4\keywords.xml"-"!:\resource\xhtml\102\0x10200EC4\keywords.xml" +;"\epoc32\data\Z\resource\xhtml\102\0x10200EC4\meta.xml"-"!:\resource\xhtml\102\0x10200EC4\meta.xml" +;"\epoc32\data\Z\resource\xhtml\102\0x10200EC4\contents.zip"-"!:\resource\xhtml\102\0x10200EC4\contents.zip" +;ENDIF ENDIF ; - 103 - Galicia IF EXISTS ("z:\resource\avkon.r103") "\epoc32\data\z\resource\vpnecomnotifier.r103"-"!:\resource\vpnecomnotifier.r103" -"\epoc32\data\z\resource\vpnmanagementuirsc.r103"-"!:\resource\vpnmanagementui.r103" +; Helps do not support language 103 yet +;IF NOT EXISTS ("z:\resource\xhtml\103\0x10200EC4\index.xml") +;"\epoc32\data\Z\resource\xhtml\103\0x10200EC4\index.xml"-"!:\resource\xhtml\103\0x10200EC4\index.xml" +;"\epoc32\data\Z\resource\xhtml\103\0x10200EC4\keywords.xml"-"!:\resource\xhtml\103\0x10200EC4\keywords.xml" +;"\epoc32\data\Z\resource\xhtml\103\0x10200EC4\meta.xml"-"!:\resource\xhtml\103\0x10200EC4\meta.xml" +;"\epoc32\data\Z\resource\xhtml\103\0x10200EC4\contents.zip"-"!:\resource\xhtml\103\0x10200EC4\contents.zip" +;ENDIF ENDIF -; - 65 - Korean -IF EXISTS ("z:\resource\avkon.r65") -"\epoc32\data\z\resource\vpnecomnotifier.r65"-"!:\resource\vpnecomnotifier.r65" -"\epoc32\data\z\resource\vpnmanagementuirsc.r65"-"!:\resource\vpnmanagementui.r65" -ENDIF - "\epoc32\release\armv5\udeb\vpnpolicyrecognizer.dll"-"!:\sys\bin\vpnpolicyrecognizer.dll" "\epoc32\data\z\resource\plugins\vpnpolicyrecognizer.rsc"-"!:\resource\plugins\vpnpolicyrecognizer.rsc" "\epoc32\release\armv5\udeb\vpnpolins.exe"-"!:\sys\bin\vpnpolins.exe" "\epoc32\data\z\private\10003a3f\apps\vpnpolins_reg.rsc"-"!:\Private\10003a3f\import\apps\vpnpolins_reg.rsc" - ; Embedded VPN Policy Installer sis file @"mVPN_vpnpolins_armv5.sis",(0xA0000131) +; ; VPN Cleaner +; "\epoc32\release\armv5\udeb\vpncleaner.exe"-"!:\sys\bin\vpncleaner.exe",FR,RR,RW - +; ; The following modules must not be deleted before VPN Cleaner has been run: - ; VPN Manager "\epoc32\release\armv5\udeb\vpnmanager.exe"-"!:\sys\bin\vpnmanager.exe" - ; Event Mediator "\epoc32\release\armv5\udeb\eventmed.exe"-"!:\sys\bin\eventmed.exe" - +; "\epoc32\winscw\c\private\101FD288\backup_registration.xml"-"!:\Private\101FD288\backup_registration.xml" ; Event Mediator API "\epoc32\release\armv5\udeb\eventmedapi.dll"-"!:\sys\bin\eventmedapi.dll" ; VPN Installer +; "101f877b.txt"-"c:\Private\10202be9\persists\101f877b.txt" "\epoc32\release\armv5\udeb\vpnins.exe"-"!:\sys\bin\vpnins.exe",FR,RI,RW diff -r 9f4e37332ce5 -r 473321461bba vpnclient_sis/group/nokia_vpn_client_localised_armv5_urel.pkg --- a/vpnclient_sis/group/nokia_vpn_client_localised_armv5_urel.pkg Thu Aug 19 10:54:34 2010 +0300 +++ b/vpnclient_sis/group/nokia_vpn_client_localised_armv5_urel.pkg Tue Aug 31 16:14:16 2010 +0300 @@ -17,7 +17,7 @@ ; LANGUAGES ; - None (English only by default) -&EN,FR,GE,SP,IT,SW,DA,NO,FI,AM,PO,TU,IC,RU,HU,DU,CS,SK,PL,SL,TC,HK,ZH,JA,TH,AR,TL,BG,HR,ET,FA,CF,EL,HE,IN,LV,LT,MS,BP,RO,SR,LS,UK,UR,VI,44,102,103,65 +&EN,FR,GE,SP,IT,SW,DA,NO,FI,AM,PO,TU,IC,RU,HU,DU,CS,SK,PL,SL,TC,HK,ZH,JA,TH,AR,TL,BG,HR,ET,FA,CF,EL,HE,IN,LV,LT,MS,BP,RO,SR,LS,UK,UR,VI,44,102,103 ; INSTALLATION HEADER ; UID of acuagentcrypto @@ -68,7 +68,6 @@ "Nokia VPN client", "Nokia VPN", "Nokia VPN", - "Nokia VPN", "Nokia VPN"}, (0x101F5147),32,08,0124, TYPE=SA, RU @@ -121,7 +120,6 @@ "Series60ProductID", "Series60ProductID", "Series60ProductID", -"Series60ProductID", "Series60ProductID"} ; Product / platform version compatibility - S60 5.2 @@ -173,7 +171,6 @@ "Series60ProductID", "Series60ProductID", "Series60ProductID", -"Series60ProductID", "Series60ProductID"} ; List of localised vendor names - one per language. @@ -224,7 +221,6 @@ "Nokia", "Nokia", "Nokia", -"Nokia", "Nokia"} ; The non-localised, globally unique vendor name (mandatory) @@ -271,11 +267,6 @@ "\epoc32\release\armv5\urel\dmadpki.dll"-"!:\sys\bin\dmadpki.dll" "\epoc32\data\z\resource\plugins\dmadpki.rsc"-"!:\resource\plugins\dmadpki.rsc" -; Agile Provision -"\epoc32\release\armv5\urel\agileprovisionws.dll"-"!:\sys\bin\agileprovisionws.dll" - -; VPN EXT API -"\epoc32\release\armv5\urel\vpnextapi.dll"-"!:\sys\bin\vpnextapi.dll" ; VPN API (comes with platform) ;"\epoc32\release\armv5\urel\vpnapi.dll"-"!:\sys\bin\vpnapi.dll" @@ -283,87 +274,78 @@ ;"\epoc32\data\z\resource\errors\vpnerr.r01"-"!:\resource\Errors\vpnerr.r01" ;"\epoc32\data\z\resource\errors\vpnerr.rsc"-"!:\resource\Errors\vpnerr.rsc" -; VPN Management UI -"\epoc32\release\armv5\urel\vpnmanagementui.dll"-"!:\sys\bin\vpnmanagementui.dll" - -{ -"\epoc32\data\z\resource\vpnmanagementuirsc.r01" -"\epoc32\data\z\resource\vpnmanagementuirsc.r02" -"\epoc32\data\z\resource\vpnmanagementuirsc.r03" -"\epoc32\data\z\resource\vpnmanagementuirsc.r04" -"\epoc32\data\z\resource\vpnmanagementuirsc.r05" -"\epoc32\data\z\resource\vpnmanagementuirsc.r06" -"\epoc32\data\z\resource\vpnmanagementuirsc.r07" -"\epoc32\data\z\resource\vpnmanagementuirsc.r08" -"\epoc32\data\z\resource\vpnmanagementuirsc.r09" -"\epoc32\data\z\resource\vpnmanagementuirsc.r10" -"\epoc32\data\z\resource\vpnmanagementuirsc.r13" -"\epoc32\data\z\resource\vpnmanagementuirsc.r14" -"\epoc32\data\z\resource\vpnmanagementuirsc.r15" -"\epoc32\data\z\resource\vpnmanagementuirsc.r16" -"\epoc32\data\z\resource\vpnmanagementuirsc.r17" -"\epoc32\data\z\resource\vpnmanagementuirsc.r18" -"\epoc32\data\z\resource\vpnmanagementuirsc.r25" -"\epoc32\data\z\resource\vpnmanagementuirsc.r26" -"\epoc32\data\z\resource\vpnmanagementuirsc.r27" -"\epoc32\data\z\resource\vpnmanagementuirsc.r28" -"\epoc32\data\z\resource\vpnmanagementuirsc.r29" -"\epoc32\data\z\resource\vpnmanagementuirsc.r30" -"\epoc32\data\z\resource\vpnmanagementuirsc.r31" -"\epoc32\data\z\resource\vpnmanagementuirsc.r32" -"\epoc32\data\z\resource\vpnmanagementuirsc.r33" -"\epoc32\data\z\resource\vpnmanagementuirsc.r37" -"\epoc32\data\z\resource\vpnmanagementuirsc.r39" -"\epoc32\data\z\resource\vpnmanagementuirsc.r42" -"\epoc32\data\z\resource\vpnmanagementuirsc.r45" -"\epoc32\data\z\resource\vpnmanagementuirsc.r49" -"\epoc32\data\z\resource\vpnmanagementuirsc.r50" -"\epoc32\data\z\resource\vpnmanagementuirsc.r51" -"\epoc32\data\z\resource\vpnmanagementuirsc.r54" -"\epoc32\data\z\resource\vpnmanagementuirsc.r57" -"\epoc32\data\z\resource\vpnmanagementuirsc.r59" -"\epoc32\data\z\resource\vpnmanagementuirsc.r67" -"\epoc32\data\z\resource\vpnmanagementuirsc.r68" -"\epoc32\data\z\resource\vpnmanagementuirsc.r70" -"\epoc32\data\z\resource\vpnmanagementuirsc.r76" -"\epoc32\data\z\resource\vpnmanagementuirsc.r78" -"\epoc32\data\z\resource\vpnmanagementuirsc.r79" -"\epoc32\data\z\resource\vpnmanagementuirsc.r83" -"\epoc32\data\z\resource\vpnmanagementuirsc.r93" -"\epoc32\data\z\resource\vpnmanagementuirsc.r94" -"\epoc32\data\z\resource\vpnmanagementuirsc.r96" -"\epoc32\data\z\resource\vpnmanagementuirsc.r44" -"\epoc32\data\z\resource\vpnmanagementuirsc.r102" -"\epoc32\data\z\resource\vpnmanagementuirsc.r103" -"\epoc32\data\z\resource\vpnmanagementuirsc.r65" -}-"!:\resource\vpnmanagementuirsc.rsc" - -; icon and GS plugin registration file -"\epoc32\data\z\resource\apps\vpnmanagementui.mif"-"!:\resource\apps\vpnmanagementui.mif" -"\epoc32\data\Z\resource\plugins\vpnmanagementui.rsc"-"!:\resource\plugins\vpnmanagementui.rsc" - +; VPN help resources (not localized yet) +; Help resources should be already in ROM but content can be updated from SIS package +;"\epoc32\data\Z\resource\xhtml\01\0x10200EC4\contents.zip"-"!:\resource\xhtml\01\0x10200EC4\contents.zip" +;"\epoc32\data\Z\resource\xhtml\01\0x10200EC4\index.xml"-"!:\resource\xhtml\01\0x10200EC4\index.xml" +;"\epoc32\data\Z\resource\xhtml\01\0x10200EC4\keywords.xml"-"!:\resource\xhtml\01\0x10200EC4\keywords.xml" +;"\epoc32\data\Z\resource\xhtml\01\0x10200EC4\meta.xml"-"!:\resource\xhtml\01\0x10200EC4\meta.xml" +;{ +;"\epoc32\data\z\resource\help\vpn.h01" +;"\epoc32\data\z\resource\help\vpn.h02" +;"\epoc32\data\z\resource\help\vpn.h03" +;"\epoc32\data\z\resource\help\vpn.h04" +;"\epoc32\data\z\resource\help\vpn.h05" +;"\epoc32\data\z\resource\help\vpn.h06" +;"\epoc32\data\z\resource\help\vpn.h07" +;"\epoc32\data\z\resource\help\vpn.h08" +;"\epoc32\data\z\resource\help\vpn.h09" +;"\epoc32\data\z\resource\help\vpn.h10" +;"\epoc32\data\z\resource\help\vpn.h13" +;"\epoc32\data\z\resource\help\vpn.h14" +;"\epoc32\data\z\resource\help\vpn.h15" +;"\epoc32\data\z\resource\help\vpn.h16" +;"\epoc32\data\z\resource\help\vpn.h17" +;"\epoc32\data\z\resource\help\vpn.h18" +;"\epoc32\data\z\resource\help\vpn.h25" +;"\epoc32\data\z\resource\help\vpn.h26" +;"\epoc32\data\z\resource\help\vpn.h27" +;"\epoc32\data\z\resource\help\vpn.h28" +;"\epoc32\data\z\resource\help\vpn.h29" +;"\epoc32\data\z\resource\help\vpn.h30" +;"\epoc32\data\z\resource\help\vpn.h31" +;"\epoc32\data\z\resource\help\vpn.h32" +;"\epoc32\data\z\resource\help\vpn.h33" +;"\epoc32\data\z\resource\help\vpn.h37" +;"\epoc32\data\z\resource\help\vpn.h39" +;"\epoc32\data\z\resource\help\vpn.h42" +;"\epoc32\data\z\resource\help\vpn.h45" +;"\epoc32\data\z\resource\help\vpn.h49" +;"\epoc32\data\z\resource\help\vpn.h01" +;"\epoc32\data\z\resource\help\vpn.h51" +;"\epoc32\data\z\resource\help\vpn.h54" +;"\epoc32\data\z\resource\help\vpn.h57" +;"\epoc32\data\z\resource\help\vpn.h01" +;"\epoc32\data\z\resource\help\vpn.h59" +;"\epoc32\data\z\resource\help\vpn.h67" +;"\epoc32\data\z\resource\help\vpn.h68" +;"\epoc32\data\z\resource\help\vpn.h70" +;"\epoc32\data\z\resource\help\vpn.h76" +;"\epoc32\data\z\resource\help\vpn.h78" +;"\epoc32\data\z\resource\help\vpn.h79" +;"\epoc32\data\z\resource\help\vpn.h83" +;"\epoc32\data\z\resource\help\vpn.h93" +;"\epoc32\data\z\resource\help\vpn.h01" +;"\epoc32\data\z\resource\help\vpn.h01" +;}-"!:\resource\help\vpn.hlp" ; PKI Services Server "\epoc32\release\armv5\urel\pkiservice.exe"-"!:\sys\bin\pkiservice.exe" - ; PKI Services API "\epoc32\release\armv5\urel\pkiserviceapi.dll"-"!:\sys\bin\pkiserviceapi.dll" + ; PKCS#10 Module "\epoc32\release\armv5\urel\utlpkcs10.dll"-"!:\sys\bin\utlpkcs10.dll" - ; PKCS#12 Module "\epoc32\release\armv5\urel\utlpkcs12.dll"-"!:\sys\bin\utlpkcs12.dll" - ; Base64 Module "\epoc32\release\armv5\urel\utlbase64.dll"-"!:\sys\bin\utlbase64.dll" - ; Socket Interaction Thread "\epoc32\release\armv5\urel\eventmedsit.dll"-"!:\sys\bin\eventmedsit.dll" - ; Event Viewer "\epoc32\release\armv5\urel\eventviewer.dll"-"!:\sys\bin\eventviewer.dll" - +; "\epoc32\data\z\resource\vpnlogmessages.rsc"-"!:\resource\vpnlogmessages.rsc" ; Terminal control stubs (for downwards compatibility) @@ -426,17 +408,15 @@ "\epoc32\data\z\resource\vpnecomnotifier.r44" "\epoc32\data\z\resource\vpnecomnotifier.r102" "\epoc32\data\z\resource\vpnecomnotifier.r103" -"\epoc32\data\z\resource\vpnecomnotifier.r65" }-"!:\resource\vpnecomnotifier.rsc" ; XML Parser "\epoc32\release\armv5\urel\utlxml.dll"-"!:\sys\bin\utlxml.dll" -; Install only languages that device supports +; Install only languages that HW supports ; EN - 01 - English IF EXISTS ("z:\resource\avkon.r01") "\epoc32\data\z\resource\vpnecomnotifier.r01"-"!:\resource\vpnecomnotifier.r01" -"\epoc32\data\z\resource\vpnmanagementuirsc.r01"-"!:\resource\vpnmanagementui.r01" IF NOT EXISTS ("z:\resource\xhtml\01\0x10200EC4\index.xml") "\epoc32\data\Z\resource\xhtml\01\0x10200EC4\index.xml"-"!:\resource\xhtml\01\0x10200EC4\index.xml" "\epoc32\data\Z\resource\xhtml\01\0x10200EC4\keywords.xml"-"!:\resource\xhtml\01\0x10200EC4\keywords.xml" @@ -447,267 +427,230 @@ ; FR - 02 - French IF EXISTS ("z:\resource\avkon.r02") "\epoc32\data\z\resource\vpnecomnotifier.r02"-"!:\resource\vpnecomnotifier.r02" -"\epoc32\data\z\resource\vpnmanagementuirsc.r02"-"!:\resource\vpnmanagementui.r02" ENDIF ; GE - 03 - German IF EXISTS ("z:\resource\avkon.r03") "\epoc32\data\z\resource\vpnecomnotifier.r03"-"!:\resource\vpnecomnotifier.r03" -"\epoc32\data\z\resource\vpnmanagementuirsc.r03"-"!:\resource\vpnmanagementui.r03" ENDIF ; SP - 04 - Spanish IF EXISTS ("z:\resource\avkon.r04") "\epoc32\data\z\resource\vpnecomnotifier.r04"-"!:\resource\vpnecomnotifier.r04" -"\epoc32\data\z\resource\vpnmanagementuirsc.r04"-"!:\resource\vpnmanagementui.r04" ENDIF ; IT - 05 - Italian IF EXISTS ("z:\resource\avkon.r05") "\epoc32\data\z\resource\vpnecomnotifier.r05"-"!:\resource\vpnecomnotifier.r05" -"\epoc32\data\z\resource\vpnmanagementuirsc.r05"-"!:\resource\vpnmanagementui.r05" ENDIF ; SW - 06 - Swedish IF EXISTS ("z:\resource\avkon.r06") "\epoc32\data\z\resource\vpnecomnotifier.r06"-"!:\resource\vpnecomnotifier.r06" -"\epoc32\data\z\resource\vpnmanagementuirsc.r06"-"!:\resource\vpnmanagementui.r06" ENDIF ; DA - 07 - Danish IF EXISTS ("z:\resource\avkon.r07") "\epoc32\data\z\resource\vpnecomnotifier.r07"-"!:\resource\vpnecomnotifier.r07" -"\epoc32\data\z\resource\vpnmanagementuirsc.r07"-"!:\resource\vpnmanagementui.r07" ENDIF ; NO - 08 - Norwegian IF EXISTS ("z:\resource\avkon.r08") "\epoc32\data\z\resource\vpnecomnotifier.r08"-"!:\resource\vpnecomnotifier.r08" -"\epoc32\data\z\resource\vpnmanagementuirsc.r08"-"!:\resource\vpnmanagementui.r08" ENDIF ; FI - 09 - Finnish IF EXISTS ("z:\resource\avkon.r09") "\epoc32\data\z\resource\vpnecomnotifier.r09"-"!:\resource\vpnecomnotifier.r09" -"\epoc32\data\z\resource\vpnmanagementuirsc.r09"-"!:\resource\vpnmanagementui.r09" ENDIF ; AM - 10 - American IF EXISTS ("z:\resource\avkon.r10") "\epoc32\data\z\resource\vpnecomnotifier.r10"-"!:\resource\vpnecomnotifier.r10" -"\epoc32\data\z\resource\vpnmanagementuirsc.r10"-"!:\resource\vpnmanagementui.r10" ENDIF ; PO - 13 - Portuguese IF EXISTS ("z:\resource\avkon.r13") "\epoc32\data\z\resource\vpnecomnotifier.r13"-"!:\resource\vpnecomnotifier.r13" -"\epoc32\data\z\resource\vpnmanagementuirsc.r13"-"!:\resource\vpnmanagementui.r13" ENDIF ; TU - 14 - Turkish IF EXISTS ("z:\resource\avkon.r14") "\epoc32\data\z\resource\vpnecomnotifier.r14"-"!:\resource\vpnecomnotifier.r14" -"\epoc32\data\z\resource\vpnmanagementuirsc.r14"-"!:\resource\vpnmanagementui.r14" ENDIF ; IC - 15 - Icelandic IF EXISTS ("z:\resource\avkon.r15") "\epoc32\data\z\resource\vpnecomnotifier.r15"-"!:\resource\vpnecomnotifier.r15" -"\epoc32\data\z\resource\vpnmanagementuirsc.r15"-"!:\resource\vpnmanagementui.r15" ENDIF ; RU - 16 - Russian IF EXISTS ("z:\resource\avkon.r16") "\epoc32\data\z\resource\vpnecomnotifier.r16"-"!:\resource\vpnecomnotifier.r16" -"\epoc32\data\z\resource\vpnmanagementuirsc.r16"-"!:\resource\vpnmanagementui.r16" ENDIF ; HU - 17 - Hungarian IF EXISTS ("z:\resource\avkon.r17") "\epoc32\data\z\resource\vpnecomnotifier.r17"-"!:\resource\vpnecomnotifier.r17" -"\epoc32\data\z\resource\vpnmanagementuirsc.r17"-"!:\resource\vpnmanagementui.r17" ENDIF ; DU - 18 - Dutch IF EXISTS ("z:\resource\avkon.r18") "\epoc32\data\z\resource\vpnecomnotifier.r18"-"!:\resource\vpnecomnotifier.r18" -"\epoc32\data\z\resource\vpnmanagementuirsc.r18"-"!:\resource\vpnmanagementui.r18" ENDIF ; CS - 25 - Czech IF EXISTS ("z:\resource\avkon.r25") "\epoc32\data\z\resource\vpnecomnotifier.r25"-"!:\resource\vpnecomnotifier.r25" -"\epoc32\data\z\resource\vpnmanagementuirsc.r25"-"!:\resource\vpnmanagementui.r25" ENDIF ; SK - 26 - Slovak IF EXISTS ("z:\resource\avkon.r26") "\epoc32\data\z\resource\vpnecomnotifier.r26"-"!:\resource\vpnecomnotifier.r26" -"\epoc32\data\z\resource\vpnmanagementuirsc.r26"-"!:\resource\vpnmanagementui.r26" ENDIF ; PL - 27 - Polish IF EXISTS ("z:\resource\avkon.r27") "\epoc32\data\z\resource\vpnecomnotifier.r27"-"!:\resource\vpnecomnotifier.r27" -"\epoc32\data\z\resource\vpnmanagementuirsc.r27"-"!:\resource\vpnmanagementui.r27" ENDIF ; SL - 28 - Slovenian IF EXISTS ("z:\resource\avkon.r28") "\epoc32\data\z\resource\vpnecomnotifier.r28"-"!:\resource\vpnecomnotifier.r28" -"\epoc32\data\z\resource\vpnmanagementuirsc.r28"-"!:\resource\vpnmanagementui.r28" ENDIF ; TC - 29 - TaiwanChinese IF EXISTS ("z:\resource\avkon.r29") "\epoc32\data\z\resource\vpnecomnotifier.r29"-"!:\resource\vpnecomnotifier.r29" -"\epoc32\data\z\resource\vpnmanagementuirsc.r29"-"!:\resource\vpnmanagementui.r29" ENDIF ; HK - 30 - HongKongChinese IF EXISTS ("z:\resource\avkon.r30") "\epoc32\data\z\resource\vpnecomnotifier.r30"-"!:\resource\vpnecomnotifier.r30" -"\epoc32\data\z\resource\vpnmanagementuirsc.r30"-"!:\resource\vpnmanagementui.r30" ENDIF ; ZH - 31 - PrcChinese IF EXISTS ("z:\resource\avkon.r31") "\epoc32\data\z\resource\vpnecomnotifier.r31"-"!:\resource\vpnecomnotifier.r31" -"\epoc32\data\z\resource\vpnmanagementuirsc.r31"-"!:\resource\vpnmanagementui.r31" ENDIF ; JA - 32 - Japanese IF EXISTS ("z:\resource\avkon.r32") "\epoc32\data\z\resource\vpnecomnotifier.r32"-"!:\resource\vpnecomnotifier.r32" -"\epoc32\data\z\resource\vpnmanagementuirsc.r32"-"!:\resource\vpnmanagementui.r32" ENDIF ; TH - 33 - Thai IF EXISTS ("z:\resource\avkon.r33") "\epoc32\data\z\resource\vpnecomnotifier.r33"-"!:\resource\vpnecomnotifier.r33" -"\epoc32\data\z\resource\vpnmanagementuirsc.r33"-"!:\resource\vpnmanagementui.r33" ENDIF ; AR - 37 - Arabic IF EXISTS ("z:\resource\avkon.r37") "\epoc32\data\z\resource\vpnecomnotifier.r37"-"!:\resource\vpnecomnotifier.r37" -"\epoc32\data\z\resource\vpnmanagementuirsc.r37"-"!:\resource\vpnmanagementui.r37" ENDIF ; TL - 39 - Tagalog IF EXISTS ("z:\resource\avkon.r39") "\epoc32\data\z\resource\vpnecomnotifier.r39"-"!:\resource\vpnecomnotifier.r39" -"\epoc32\data\z\resource\vpnmanagementuirsc.r39"-"!:\resource\vpnmanagementui.r39" ENDIF ; BG - 42 - Bulgarian IF EXISTS ("z:\resource\avkon.r42") "\epoc32\data\z\resource\vpnecomnotifier.r42"-"!:\resource\vpnecomnotifier.r42" -"\epoc32\data\z\resource\vpnmanagementuirsc.r42"-"!:\resource\vpnmanagementui.r42" ENDIF ; HR - 45 - Croatian IF EXISTS ("z:\resource\avkon.r45") "\epoc32\data\z\resource\vpnecomnotifier.r45"-"!:\resource\vpnecomnotifier.r45" -"\epoc32\data\z\resource\vpnmanagementuirsc.r45"-"!:\resource\vpnmanagementui.r45" ENDIF ; ET - 49 - Estonian IF EXISTS ("z:\resource\avkon.r49") "\epoc32\data\z\resource\vpnecomnotifier.r49"-"!:\resource\vpnecomnotifier.r49" -"\epoc32\data\z\resource\vpnmanagementuirsc.r49"-"!:\resource\vpnmanagementui.r49" ENDIF ; FA - 50 - Farsi IF EXISTS ("z:\resource\avkon.r50") "\epoc32\data\z\resource\vpnecomnotifier.r50"-"!:\resource\vpnecomnotifier.r50" -"\epoc32\data\z\resource\vpnmanagementuirsc.r50"-"!:\resource\vpnmanagementui.r50" ENDIF ; CF - 51 - CanadianFrench IF EXISTS ("z:\resource\avkon.r51") "\epoc32\data\z\resource\vpnecomnotifier.r51"-"!:\resource\vpnecomnotifier.r51" -"\epoc32\data\z\resource\vpnmanagementuirsc.r51"-"!:\resource\vpnmanagementui.r51" ENDIF ; EL - 54 - Greek IF EXISTS ("z:\resource\avkon.r54") "\epoc32\data\z\resource\vpnecomnotifier.r54"-"!:\resource\vpnecomnotifier.r54" -"\epoc32\data\z\resource\vpnmanagementuirsc.r54"-"!:\resource\vpnmanagementui.r54" ENDIF ; HE - 57 - Hebrew IF EXISTS ("z:\resource\avkon.r57") "\epoc32\data\z\resource\vpnecomnotifier.r57"-"!:\resource\vpnecomnotifier.r57" -"\epoc32\data\z\resource\vpnmanagementuirsc.r57"-"!:\resource\vpnmanagementui.r57" ENDIF ; IN - 59 - Indonesian IF EXISTS ("z:\resource\avkon.r59") "\epoc32\data\z\resource\vpnecomnotifier.r59"-"!:\resource\vpnecomnotifier.r59" -"\epoc32\data\z\resource\vpnmanagementuirsc.r59"-"!:\resource\vpnmanagementui.r59" ENDIF ; LV - 67 - Latvian IF EXISTS ("z:\resource\avkon.r67") "\epoc32\data\z\resource\vpnecomnotifier.r67"-"!:\resource\vpnecomnotifier.r67" -"\epoc32\data\z\resource\vpnmanagementuirsc.r67"-"!:\resource\vpnmanagementui.r67" ENDIF ; LT - 68 - Lithuanian IF EXISTS ("z:\resource\avkon.r68") "\epoc32\data\z\resource\vpnecomnotifier.r68"-"!:\resource\vpnecomnotifier.r68" -"\epoc32\data\z\resource\vpnmanagementuirsc.r68"-"!:\resource\vpnmanagementui.r68" ENDIF ; MS - 70 - Malay IF EXISTS ("z:\resource\avkon.r70") "\epoc32\data\z\resource\vpnecomnotifier.r70"-"!:\resource\vpnecomnotifier.r70" -"\epoc32\data\z\resource\vpnmanagementuirsc.r70"-"!:\resource\vpnmanagementui.r70" ENDIF ; BP - 76 - BrazilianPortuguese IF EXISTS ("z:\resource\avkon.r76") "\epoc32\data\z\resource\vpnecomnotifier.r76"-"!:\resource\vpnecomnotifier.r76" -"\epoc32\data\z\resource\vpnmanagementuirsc.r76"-"!:\resource\vpnmanagementui.r76" ENDIF ; RO - 78 - Romanian IF EXISTS ("z:\resource\avkon.r78") "\epoc32\data\z\resource\vpnecomnotifier.r78"-"!:\resource\vpnecomnotifier.r78" -"\epoc32\data\z\resource\vpnmanagementuirsc.r78"-"!:\resource\vpnmanagementui.r78" ENDIF ; SR - 79 - Serbian IF EXISTS ("z:\resource\avkon.r79") "\epoc32\data\z\resource\vpnecomnotifier.r79"-"!:\resource\vpnecomnotifier.r79" -"\epoc32\data\z\resource\vpnmanagementuirsc.r79"-"!:\resource\vpnmanagementui.r79" ENDIF ; LS - 83 - LatinAmericanSpanish IF EXISTS ("z:\resource\avkon.r83") "\epoc32\data\z\resource\vpnecomnotifier.r83"-"!:\resource\vpnecomnotifier.r83" -"\epoc32\data\z\resource\vpnmanagementuirsc.r83"-"!:\resource\vpnmanagementui.r83" ENDIF ; UK - 93 - Ukrainian IF EXISTS ("z:\resource\avkon.r93") "\epoc32\data\z\resource\vpnecomnotifier.r93"-"!:\resource\vpnecomnotifier.r93" -"\epoc32\data\z\resource\vpnmanagementuirsc.r93"-"!:\resource\vpnmanagementui.r93" ENDIF ; UR - 94 - Urdu IF EXISTS ("z:\resource\avkon.r94") "\epoc32\data\z\resource\vpnecomnotifier.r94"-"!:\resource\vpnecomnotifier.r94" -"\epoc32\data\z\resource\vpnmanagementuirsc.r94"-"!:\resource\vpnmanagementui.r94" ENDIF ; VI - 96 - Vietnamese IF EXISTS ("z:\resource\avkon.r96") "\epoc32\data\z\resource\vpnecomnotifier.r96"-"!:\resource\vpnecomnotifier.r96" -"\epoc32\data\z\resource\vpnmanagementuirsc.r96"-"!:\resource\vpnmanagementui.r96" ENDIF ; - 44 - Catalan IF EXISTS ("z:\resource\avkon.r44") "\epoc32\data\z\resource\vpnecomnotifier.r44"-"!:\resource\vpnecomnotifier.r44" -"\epoc32\data\z\resource\vpnmanagementuirsc.r44"-"!:\resource\vpnmanagementui.r44" ENDIF ; - 102 - Basque IF EXISTS ("z:\resource\avkon.r102") "\epoc32\data\z\resource\vpnecomnotifier.r102"-"!:\resource\vpnecomnotifier.r102" -"\epoc32\data\z\resource\vpnmanagementuirsc.r102"-"!:\resource\vpnmanagementui.r102" +; Helps do not support language id 102 yet +;IF NOT EXISTS ("z:\resource\xhtml\102\0x10200EC4\index.xml") +;"\epoc32\data\Z\resource\xhtml\102\0x10200EC4\index.xml"-"!:\resource\xhtml\102\0x10200EC4\index.xml" +;"\epoc32\data\Z\resource\xhtml\102\0x10200EC4\keywords.xml"-"!:\resource\xhtml\102\0x10200EC4\keywords.xml" +;"\epoc32\data\Z\resource\xhtml\102\0x10200EC4\meta.xml"-"!:\resource\xhtml\102\0x10200EC4\meta.xml" +;"\epoc32\data\Z\resource\xhtml\102\0x10200EC4\contents.zip"-"!:\resource\xhtml\102\0x10200EC4\contents.zip" +;ENDIF ENDIF ; - 103 - Galicia IF EXISTS ("z:\resource\avkon.r103") "\epoc32\data\z\resource\vpnecomnotifier.r103"-"!:\resource\vpnecomnotifier.r103" -"\epoc32\data\z\resource\vpnmanagementuirsc.r103"-"!:\resource\vpnmanagementui.r103" +; Helps do not support language 103 yet +;IF NOT EXISTS ("z:\resource\xhtml\103\0x10200EC4\index.xml") +;"\epoc32\data\Z\resource\xhtml\103\0x10200EC4\index.xml"-"!:\resource\xhtml\103\0x10200EC4\index.xml" +;"\epoc32\data\Z\resource\xhtml\103\0x10200EC4\keywords.xml"-"!:\resource\xhtml\103\0x10200EC4\keywords.xml" +;"\epoc32\data\Z\resource\xhtml\103\0x10200EC4\meta.xml"-"!:\resource\xhtml\103\0x10200EC4\meta.xml" +;"\epoc32\data\Z\resource\xhtml\103\0x10200EC4\contents.zip"-"!:\resource\xhtml\103\0x10200EC4\contents.zip" +;ENDIF ENDIF -; - 65 - Korean -IF EXISTS ("z:\resource\avkon.r65") -"\epoc32\data\z\resource\vpnecomnotifier.r65"-"!:\resource\vpnecomnotifier.r65" -"\epoc32\data\z\resource\vpnmanagementuirsc.r65"-"!:\resource\vpnmanagementui.r65" -ENDIF - "\epoc32\release\armv5\urel\vpnpolicyrecognizer.dll"-"!:\sys\bin\vpnpolicyrecognizer.dll" "\epoc32\data\z\resource\plugins\vpnpolicyrecognizer.rsc"-"!:\resource\plugins\vpnpolicyrecognizer.rsc" + "\epoc32\release\armv5\urel\vpnpolins.exe"-"!:\sys\bin\vpnpolins.exe" "\epoc32\data\z\private\10003a3f\apps\vpnpolins_reg.rsc"-"!:\Private\10003a3f\import\apps\vpnpolins_reg.rsc" - ; Embedded VPN Policy Installer sis file @"mVPN_vpnpolins_armv5.sis",(0xA0000131) +; ; VPN Cleaner +; "\epoc32\release\armv5\urel\vpncleaner.exe"-"!:\sys\bin\vpncleaner.exe",FR,RR,RW - +; ; The following modules must not be deleted before VPN Cleaner has been run: - ; VPN Manager "\epoc32\release\armv5\urel\vpnmanager.exe"-"!:\sys\bin\vpnmanager.exe" ; Event Mediator "\epoc32\release\armv5\urel\eventmed.exe"-"!:\sys\bin\eventmed.exe" - +; "\epoc32\winscw\c\private\101FD288\backup_registration.xml"-"!:\Private\101FD288\backup_registration.xml" ; Event Mediator API "\epoc32\release\armv5\urel\eventmedapi.dll"-"!:\sys\bin\eventmedapi.dll" ; VPN Installer +; "101f877b.txt"-"c:\Private\10202be9\persists\101f877b.txt" "\epoc32\release\armv5\urel\vpnins.exe"-"!:\sys\bin\vpnins.exe",FR,RI,RW diff -r 9f4e37332ce5 -r 473321461bba vpnclient_sis/stub_sis/group/stub_nokia_vpn_client_armv5.pkg --- a/vpnclient_sis/stub_sis/group/stub_nokia_vpn_client_armv5.pkg Thu Aug 19 10:54:34 2010 +0300 +++ b/vpnclient_sis/stub_sis/group/stub_nokia_vpn_client_armv5.pkg Tue Aug 31 16:14:16 2010 +0300 @@ -1,5 +1,5 @@ ; -; Copyright (c) 2006-2010 Nokia Corporation and/or its subsidiary(-ies). +; Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies). ; All rights reserved. ; This component and the accompanying materials are made available ; under the terms of "Eclipse Public License v1.0" @@ -16,7 +16,7 @@ ; LANGUAGES ; - None (English only by default) -&EN,FR,GE,SP,IT,SW,DA,NO,FI,AM,PO,TU,IC,RU,HU,DU,CS,SK,PL,SL,TC,HK,ZH,JA,TH,AR,TL,BG,HR,ET,FA,CF,EL,HE,IN,LV,LT,MS,BP,RO,SR,LS,UK,UR,VI,44,102,103,65 +&EN,FR,GE,SP,IT,SW,DA,NO,FI,AM,PO,TU,IC,RU,HU,DU,CS,SK,PL,SL,TC,HK,ZH,JA,TH,AR,TL,BG,HR,ET,FA,CF,EL,HE,IN,LV,LT,MS,BP,RO,SR,LS,UK,UR,VI,44,102,103 ; INSTALLATION HEADER ; UID of acuagentcrypto @@ -67,7 +67,6 @@ "Nokia VPN client", "Nokia VPN", "Nokia VPN", - "Nokia VPN", "Nokia VPN"}, (0x101F5147),32,08,0124, TYPE=SA, RU @@ -120,7 +119,6 @@ "Series60ProductID", "Series60ProductID", "Series60ProductID", -"Series60ProductID", "Series60ProductID"} ; Product / platform version compatibility - S60 5.2 @@ -172,7 +170,6 @@ "Series60ProductID", "Series60ProductID", "Series60ProductID", -"Series60ProductID", "Series60ProductID"} ; List of localised vendor names - one per language. @@ -223,7 +220,6 @@ "Nokia", "Nokia", "Nokia", -"Nokia", "Nokia"} ; The non-localised, globally unique vendor name (mandatory) @@ -272,15 +268,6 @@ ; VPN API (comes with platform) ""-"z:\sys\bin\vpnapi.dll" -; VPN Management UI -""-"z:\sys\bin\vpnmanagementui.dll" - -""-"z:\resource\vpnmanagementuirsc.r*" - -; icon and GS plugin registration file -""-"z:\resource\apps\vpnmanagementui.mif" -""-"z:\resource\plugins\vpnmanagementui.rsc" - ; VPN help resources (not localized yet) ; Help resources should be already in ROM but content can be updated from SIS package ""-"z:\resource\help\vpn.h*" diff -r 9f4e37332ce5 -r 473321461bba vpnengine/agileprovisionws/.cproject --- a/vpnengine/agileprovisionws/.cproject Thu Aug 19 10:54:34 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,33 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -r 9f4e37332ce5 -r 473321461bba vpnengine/agileprovisionws/.project --- a/vpnengine/agileprovisionws/.project Thu Aug 19 10:54:34 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,20 +0,0 @@ - - - agileprovisionws - - - - - - com.nokia.carbide.cdt.builder.carbideCPPBuilder - - - - - - org.eclipse.cdt.core.cnature - org.eclipse.cdt.core.ccnature - com.nokia.carbide.cdt.builder.carbideCPPBuilderNature - com.nokia.carbide.cdt.builder.carbideSBSv2BuilderNature - - diff -r 9f4e37332ce5 -r 473321461bba vpnengine/agileprovisionws/BWINS/agileprovisionwsu.def --- a/vpnengine/agileprovisionws/BWINS/agileprovisionwsu.def Thu Aug 19 10:54:34 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,21 +0,0 @@ -EXPORTS - ?GenerateCertReqL@CAgileProvisionWs@@QAEXXZ @ 1 NONAME ; void CAgileProvisionWs::GenerateCertReqL(void) - ?SetServiceAddr@CAgileProvisionWs@@QAEXPBVHBufC8@@@Z @ 2 NONAME ; void CAgileProvisionWs::SetServiceAddr(class HBufC8 const *) - ??1CAgileCryptoPrivKey@@UAE@XZ @ 3 NONAME ; CAgileCryptoPrivKey::~CAgileCryptoPrivKey(void) - ??1CAgileCryptoCert@@UAE@XZ @ 4 NONAME ; CAgileCryptoCert::~CAgileCryptoCert(void) - ?NewL@CAgileProvisionWs@@SAPAV1@XZ @ 5 NONAME ; class CAgileProvisionWs * CAgileProvisionWs::NewL(void) - ?NewL@CAgileCryptoCert@@SAPAV1@ABVTDesC8@@H@Z @ 6 NONAME ; class CAgileCryptoCert * CAgileCryptoCert::NewL(class TDesC8 const &, int) - ?CancelGetPolicy@CAgileProvisionWs@@QAEXXZ @ 7 NONAME ; void CAgileProvisionWs::CancelGetPolicy(void) - ?GenerateKeypairCancel@CAgileCryptoGenerateKeypair@@QAEXXZ @ 8 NONAME ; void CAgileCryptoGenerateKeypair::GenerateKeypairCancel(void) - ?SaveClientCertL@CAgileCryptoCert@@QAEXABV?$TBuf8@$0BE@@@I@Z @ 9 NONAME ; void CAgileCryptoCert::SaveClientCertL(class TBuf8<20> const &, unsigned int) - ?ReadCertReqL@CAgileCryptoPrivKey@@QAEPAVHBufC8@@ABVTDesC16@@H@Z @ 10 NONAME ; class HBufC8 * CAgileCryptoPrivKey::ReadCertReqL(class TDesC16 const &, int) - ?NewL@CAgileCryptoPrivKey@@SAPAV1@XZ @ 11 NONAME ; class CAgileCryptoPrivKey * CAgileCryptoPrivKey::NewL(void) - ?GenerateCertReqL@CAgileCryptoPrivKey@@QAEXABVTDesC8@@000ABV?$TBuf8@$0BE@@@AAVTDes16@@AAH@Z @ 12 NONAME ; void CAgileCryptoPrivKey::GenerateCertReqL(class TDesC8 const &, class TDesC8 const &, class TDesC8 const &, class TDesC8 const &, class TBuf8<20> const &, class TDes16 &, int &) - ?SaveCACertL@CAgileCryptoCert@@QAEXXZ @ 13 NONAME ; void CAgileCryptoCert::SaveCACertL(void) - ?HandleGetConfSoapInL@CAgileProvisionWs@@QAEXABVTDesC8@@@Z @ 14 NONAME ; void CAgileProvisionWs::HandleGetConfSoapInL(class TDesC8 const &) - ?NewLC@CAgileProvisionWs@@SAPAV1@XZ @ 15 NONAME ; class CAgileProvisionWs * CAgileProvisionWs::NewLC(void) - ?GetPolicy@CAgileProvisionWs@@QAEXABVTDesC8@@IAAVTRequestStatus@@@Z @ 16 NONAME ; void CAgileProvisionWs::GetPolicy(class TDesC8 const &, unsigned int, class TRequestStatus &) - ?HandleGetCertificateSoapInL@CAgileProvisionWs@@QAEXABVTDesC8@@@Z @ 17 NONAME ; void CAgileProvisionWs::HandleGetCertificateSoapInL(class TDesC8 const &) - ?GenerateKeypairL@CAgileCryptoGenerateKeypair@@QAEHABHAAV?$TBuf8@$0BE@@@AAVTRequestStatus@@@Z @ 18 NONAME ; int CAgileCryptoGenerateKeypair::GenerateKeypairL(int const &, class TBuf8<20> &, class TRequestStatus &) - ?NewL@CAgileCryptoGenerateKeypair@@SAPAV1@PAVCAgileCryptoPrivKey@@@Z @ 19 NONAME ; class CAgileCryptoGenerateKeypair * CAgileCryptoGenerateKeypair::NewL(class CAgileCryptoPrivKey *) - diff -r 9f4e37332ce5 -r 473321461bba vpnengine/agileprovisionws/EABI/agileprovisionwsu.def --- a/vpnengine/agileprovisionws/EABI/agileprovisionwsu.def Thu Aug 19 10:54:34 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,29 +0,0 @@ -EXPORTS - _ZN16CAgileCryptoCert11SaveCACertLEv @ 1 NONAME - _ZN16CAgileCryptoCert15SaveClientCertLERK5TBuf8ILi20EEj @ 2 NONAME - _ZN16CAgileCryptoCert4NewLERK6TDesC8i @ 3 NONAME - _ZN16CAgileCryptoCertD0Ev @ 4 NONAME - _ZN16CAgileCryptoCertD1Ev @ 5 NONAME - _ZN16CAgileCryptoCertD2Ev @ 6 NONAME - _ZN17CAgileProvisionWs14SetServiceAddrEPK6HBufC8 @ 7 NONAME - _ZN17CAgileProvisionWs15CancelGetPolicyEv @ 8 NONAME - _ZN17CAgileProvisionWs16GenerateCertReqLEv @ 9 NONAME - _ZN17CAgileProvisionWs20HandleGetConfSoapInLERK6TDesC8 @ 10 NONAME - _ZN17CAgileProvisionWs27HandleGetCertificateSoapInLERK6TDesC8 @ 11 NONAME - _ZN17CAgileProvisionWs4NewLEv @ 12 NONAME - _ZN17CAgileProvisionWs5NewLCEv @ 13 NONAME - _ZN17CAgileProvisionWs9GetPolicyERK6TDesC8jR14TRequestStatus @ 14 NONAME - _ZN19CAgileCryptoPrivKey12ReadCertReqLERK7TDesC16i @ 15 NONAME - _ZN19CAgileCryptoPrivKey16GenerateCertReqLERK6TDesC8S2_S2_S2_RK5TBuf8ILi20EER6TDes16Ri @ 16 NONAME - _ZN19CAgileCryptoPrivKey4NewLEv @ 17 NONAME - _ZN19CAgileCryptoPrivKeyD0Ev @ 18 NONAME - _ZN19CAgileCryptoPrivKeyD1Ev @ 19 NONAME - _ZN19CAgileCryptoPrivKeyD2Ev @ 20 NONAME - _ZN27CAgileCryptoGenerateKeypair16GenerateKeypairLERKiR5TBuf8ILi20EER14TRequestStatus @ 21 NONAME - _ZN27CAgileCryptoGenerateKeypair21GenerateKeypairCancelEv @ 22 NONAME - _ZN27CAgileCryptoGenerateKeypair4NewLEP19CAgileCryptoPrivKey @ 23 NONAME - _ZTI16CAgileCryptoCert @ 24 NONAME - _ZTI19CAgileCryptoPrivKey @ 25 NONAME - _ZTV16CAgileCryptoCert @ 26 NONAME - _ZTV19CAgileCryptoPrivKey @ 27 NONAME - diff -r 9f4e37332ce5 -r 473321461bba vpnengine/agileprovisionws/group/ABLD.BAT --- a/vpnengine/agileprovisionws/group/ABLD.BAT Thu Aug 19 10:54:34 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,15 +0,0 @@ -@ECHO OFF - -REM Bldmake-generated batch file - ABLD.BAT -REM ** DO NOT EDIT ** - -perl -S ABLD.PL "\vpnclient\vpnengine\agileprovisionws\group\\" %1 %2 %3 %4 %5 %6 %7 %8 %9 -if errorlevel==1 goto CheckPerl -goto End - -:CheckPerl -perl -v >NUL -if errorlevel==1 echo Is Perl, version 5.003_07 or later, installed? -goto End - -:End diff -r 9f4e37332ce5 -r 473321461bba vpnengine/agileprovisionws/group/agileprovisionws.mmp --- a/vpnengine/agileprovisionws/group/agileprovisionws.mmp Thu Aug 19 10:54:34 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,54 +0,0 @@ -/* -* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Project definition file for project agileprovisionws -* -*/ - -TARGET agileprovisionws.dll -TARGETTYPE dll -UID 0x1000008d 0x20016A90 -CAPABILITY NetworkControl NetworkServices ReadDeviceData ReadUserData DiskAdmin ProtServ WriteDeviceData - -USERINCLUDE ../inc -USERINCLUDE ../../utlbase64/inc -USERINCLUDE ../../utlcrypto/inc -USERINCLUDE ../../vpnmanager/inc -USERINCLUDE ../../pkiserviceapi/inc -USERINCLUDE ../../vpncommon/inc -USERINCLUDE ../../../vpnui/vpnpolins/inc - -MW_LAYER_SYSTEMINCLUDE - -SOURCEPATH ../src - -SOURCE agileprovisionservice.cpp -SOURCE agileprovisionws.cpp -SOURCE agilecrypto.cpp - -LIBRARY efsrv.lib -LIBRARY euser.lib -LIBRARY SenUtils.lib -LIBRARY SenServDesc.lib -LIBRARY inetprotutil.lib -LIBRARY SenServConn.lib -LIBRARY SenXml.lib -LIBRARY SenServMgr.lib -LIBRARY utlbase64.lib -LIBRARY utlcrypto.lib -LIBRARY pkiserviceapi.lib -LIBRARY x509.lib -LIBRARY cmmanager.lib - - - diff -r 9f4e37332ce5 -r 473321461bba vpnengine/agileprovisionws/group/bld.inf --- a/vpnengine/agileprovisionws/group/bld.inf Thu Aug 19 10:54:34 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,24 +0,0 @@ -/* -* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* This file provides the information required for building the module. -* -*/ - -PRJ_PLATFORMS -DEFAULT - - -PRJ_MMPFILES -agileprovisionws.mmp diff -r 9f4e37332ce5 -r 473321461bba vpnengine/agileprovisionws/inc/agilecrypto.h --- a/vpnengine/agileprovisionws/inc/agilecrypto.h Thu Aug 19 10:54:34 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,120 +0,0 @@ -/* -* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: VPN Agile provision Crypto library -* -*/ - -#ifndef __AGILE_CRYPTO_H -#define __AGILE_CRYPTO_H - -#include "pkiserviceapi.h" - - -const TInt KAgileCryptoMaxSignatureLth = 512; //publicKey->Size() / 8; - -typedef TPKIKeyIdentifier TPrivKeyRef; -typedef HBufC8* TRetBufCertReq; -typedef HBufC8* TRetBufCertRef; -typedef TInt TErrCode; - -// --- agile crypto error codes -const TInt KAgileErrCryptoCertFileNotFound = -102101; -const TInt KAgileErrCryptoReadCertRequestFailed = -102103; - - -class CAgileCryptoCert : public CBase -/** -* Certificate operations -* @internalComponent -*/ -{ -public: - - - IMPORT_C static CAgileCryptoCert* NewL(const TDesC8& aCert, TBool aBase64Encoded); - IMPORT_C ~CAgileCryptoCert(); //agile_crypto_cert_free - - IMPORT_C void SaveCACertL(void); - IMPORT_C void SaveClientCertL(const TPrivKeyRef& aKeyId, TUint aKeySize); - -private: - CAgileCryptoCert(); - - void ConstructL(const TDesC8& aCert, TBool aBase64Encoded); - - -private: - HBufC8 *iCertDER; - -}; - -class CAgileCryptoGenerateKeypair; -class CAgileCryptoPrivKey : public CBase -/** -* Private key operations -* @internalComponent -*/ -{ -public: - //friend class CAgileCryptoGenerateKeypair; - - IMPORT_C static CAgileCryptoPrivKey* NewL(void); - IMPORT_C ~CAgileCryptoPrivKey(); - - - IMPORT_C void GenerateCertReqL(const TDesC8& aDistinguishedName, - const TDesC8& aSubjectAltNameRfc822, - const TDesC8& aChallengePassword, - const TDesC8& aDnsName, - const TPrivKeyRef& aKeyId, - TDes& aCertReqRef, - TInt& aCertReqSize); //agile_crypto_generate_cert_req_pem - IMPORT_C TRetBufCertReq ReadCertReqL(const TDesC& aCertReqRef, TInt aCertReqSize); - - RPKIServiceAPI GetPkiService(); - -private: - CAgileCryptoPrivKey(); - void ConstructL(void); - - -private: - RPKIServiceAPI iPkiServiceApi; -}; - - -class CAgileCryptoGenerateKeypair : public CBase -/** -* Generate key pair -* @internalComponent -*/ -{ -public: - IMPORT_C static CAgileCryptoGenerateKeypair* NewL(CAgileCryptoPrivKey* aAgileCryptoPrivKey); - IMPORT_C TErrCode GenerateKeypairL(const TInt& aPublicKeyLen, - TPrivKeyRef& aKeyId, - TRequestStatus& aStatus); - IMPORT_C void GenerateKeypairCancel(void); - - -private: - CAgileCryptoGenerateKeypair(CAgileCryptoPrivKey* aAgileCryptoPrivKey); - void ConstructL(void); - -private: - CAgileCryptoPrivKey* iAgileCryptoPrivKey; - -}; - -#endif diff -r 9f4e37332ce5 -r 473321461bba vpnengine/agileprovisionws/inc/agileprovisiondefs.h --- a/vpnengine/agileprovisionws/inc/agileprovisiondefs.h Thu Aug 19 10:54:34 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,48 +0,0 @@ -/* -* Copyright (c) 2000 - 2010 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Provides file handling functions. -* -*/ -#ifndef __VPNAGILEPROVISIONDEFS_H__ -#define __VPNAGILEPROVISIONDEFS_H__ - -#include - - -_LIT(KAgileProvisionPolicyFileName, "agileVPN.pol"); -_LIT(KAgileProvisionPinFileName, "agileVPN.pin"); -_LIT(KAgileProvisionCertificateFileName, "agileVPN-User.cer"); -_LIT(KAgileProvisionServiceNameSpace, "agileVPNProvisionService"); -_LIT8(KCRLF, "\r\n"); -_LIT8(KHTTPprefix, "https://"); -_LIT8(KServiceSuffix, "/AWS/AgileVPNProvisionService.asmx"); -_LIT8(KPolicyRequestPrefix, ""); - -_LIT8(KSoapActionCert, "http://vpn.agileprovision/GetCertificate"); - -_LIT8(KRequest1, ""); -_LIT8(KRequest2, ""); - - -#endif // __VPNAGILEPROVISIONDEFS_H__ - - - diff -r 9f4e37332ce5 -r 473321461bba vpnengine/agileprovisionws/inc/agileprovisionservice.h --- a/vpnengine/agileprovisionws/inc/agileprovisionservice.h Thu Aug 19 10:54:34 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,93 +0,0 @@ -/* -* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: VPN Agile provision service -* -*/ - -#ifndef AGILEPROVISIONWS_H -#define AGILEPROVISIONWS_H - -#include -#include -#include -#include -#include - - -NONSHARABLE_CLASS(MAgileProvisionServiceConsumer) : public MSenServiceConsumer -{ - -public: - - // ----- To be implemented by consumer (from MSenServiceConsumer): ----- - virtual void HandleErrorL(const TInt aErrorCode, const TDesC8& aMessage) = 0; - virtual void SetStatus(const TInt aStatus) = 0; - - /* Implementation of this callback is optional. - * If you are not interested in SOAP Fault details, - * the default implementation will fall back to HandleErrorL - * with the error code KErrSenSoapFault. - */ - virtual void HandleSoapFaultL(const CSenSoapFault& /*aFault*/) - { HandleErrorL(KErrSenSoapFault, _L8("Soap fault received") ); } - - -}; - - -NONSHARABLE_CLASS(CAgileProvisionServiceService) : public CBase -{ - CSenServiceConnection *iConnection; - TBool iOwnsConnection; - - CAgileProvisionServiceService(CSenServiceConnection* aConnection, TBool aOwnsConnection); - -public: - - ~CAgileProvisionServiceService(); - - - static CAgileProvisionServiceService* NewL(MSenServiceConsumer& aObserver, MSenServiceDescription& aDescription); - - - - -public: // remote methods - - - - /************************************************************************** - * Asynchronous operations that handle result in callback methods. * - * Methods can leave. * - **************************************************************************/ - - void GetConfAsyncL(); - void GetCertificateAsyncL(HBufC8* aCertReq); - - void CancelTransaction(); - void ResetTransactionId(); - - HBufC8* iCertreq; - TUint iIapId; -private: // data - /** - * Transaction id. - * Own. - */ - TInt iTransactionId; - - -}; - -#endif diff -r 9f4e37332ce5 -r 473321461bba vpnengine/agileprovisionws/inc/agileprovisionws.h --- a/vpnengine/agileprovisionws/inc/agileprovisionws.h Thu Aug 19 10:54:34 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,119 +0,0 @@ -/* -* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: VPN Agile provision Web Service Client -* -*/ - - -#ifndef C_AGILEPROVISIONWS_H -#define C_AGILEPROVISIONWS_H - - -#include -#include -#include "agileprovisionservice.h" -#include "agilecrypto.h" -#include "base64.h" - -const TInt KPublicKeyLen = 1024; - -NONSHARABLE_CLASS(CAgileProvisionWs) : public CBase, public MAgileProvisionServiceConsumer -{ -public: - IMPORT_C static CAgileProvisionWs* NewL(); - IMPORT_C static CAgileProvisionWs* NewLC(); - ~CAgileProvisionWs(); - -public: - /** - * Gets policy. - * @param aEndpointUri Service endpoint - * @param aStatus Completion status (returned) - */ - IMPORT_C void GetPolicy( const TDesC8& aEndPointUri, TUint aIapId, - TRequestStatus& aStatus ); - - /** - * Cancels Get policy request. - */ - IMPORT_C void CancelGetPolicy(); - - - //gets ownership of aServiceAddr - IMPORT_C void SetServiceAddr(const HBufC8* aServiceAddr); - -// from base class MAgileProvisionServiceConsumer -public: - void HandleMessageL(const TDesC8& aMessage); - void HandleErrorL(const TInt aErrorCode, const TDesC8& aError); - void SetStatus(const TInt aStatus); - - - /* - * Callback methods, for each asynchronous remote operation - */ - - IMPORT_C void HandleGetConfSoapInL(const TDesC8& aMessage); - - IMPORT_C void HandleGetCertificateSoapInL(const TDesC8& aMessage); - - IMPORT_C void GenerateCertReqL( ); - - -private: - enum - { - KStateInitial, - KStateGettingConf, - KStateGettingCertificate - }; - - CAgileProvisionWs(); - - void ConstructL(); - - void DoGetPolicyL( const TDesC8& aEndPointUri, const TUint aIapId ); - void ParseFileFromSoapEnvelopeL( RPointerArray& aArray, - TInt aContentType, TInt aLevel, - TDesC& aFileName ); - - - void DoComplete( const TInt aStatus ); - -private: // data - - /** - * State. - * Own. - */ - TInt iState; - - - CAgileProvisionServiceService* iPService; - - /** - * Client's request's status. - * Not own. - */ - TRequestStatus* iClientStatus; - - TPrivKeyRef iKeyRef; - - const HBufC8* iServiceAddr; - - const TDesC8* iEndPointUri; - - }; - -#endif // C_AGILEPROVISIONWS_H diff -r 9f4e37332ce5 -r 473321461bba vpnengine/agileprovisionws/rom/agileprovisionws.iby --- a/vpnengine/agileprovisionws/rom/agileprovisionws.iby Thu Aug 19 10:54:34 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,29 +0,0 @@ -/* -* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Image description file for project agileprovisionws -* -*/ - - - -#ifndef __AGILEPROVISIONWS_IBY__ -#define __AGILEPROVISIONWS_IBY__ - -#ifdef FF_VPN_CLIENT - -file=ABI_DIR\BUILD_DIR\agileprovisionws.dll SHARED_LIB_DIR\agileprovisionws.dll - -#endif // FF_VPN_CLIENT - -#endif // __AGILEPROVISIONWS_IBY__ diff -r 9f4e37332ce5 -r 473321461bba vpnengine/agileprovisionws/src/agilecrypto.cpp --- a/vpnengine/agileprovisionws/src/agilecrypto.cpp Thu Aug 19 10:54:34 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,317 +0,0 @@ -/* -* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: VPN Agile provision Crypto library -* -*/ - -#include - -#include -#include -#include - -#include "agilecrypto.h" -#include "utlcrypto.h" -#include "base64.h" -#include "pkcs10.h" -#include "vpnclientuids.h" - - - - -EXPORT_C CAgileCryptoCert::~CAgileCryptoCert() -/** -* Destructor. -*/ - { - - delete iCertDER; - - } - -CAgileCryptoCert::CAgileCryptoCert() - { - } - - - -EXPORT_C CAgileCryptoCert* CAgileCryptoCert::NewL(const TDesC8& aCert, TBool aBase64Encoded) -/** -* Makes crypto certififate object. -* @param aCert Certificate data. -* @param aCert aBase64Encoded If ETrue, certificate data is base64 encoded. -* @return CAgileCryptoCert* Pointer to crypto certififate object. -*/ - { - CAgileCryptoCert* self = new (ELeave) CAgileCryptoCert(); - CleanupStack::PushL(self); - self->ConstructL(aCert, aBase64Encoded); - CleanupStack::Pop(); // self - return self; - } - - -void CAgileCryptoCert::ConstructL(const TDesC8& aCert, TBool aBase64Encoded) - { - - HBufC8* certDerCodedHBuf; - TPtrC8 certDerCoded; - - if (aBase64Encoded) - { - TBase64Codec base64Codec; - if ((certDerCodedHBuf = base64Codec.Base64DecodeLC(aCert)) == NULL) - { - User::Leave(KErrNoMemory); - } - } - else - { - certDerCodedHBuf = aCert.AllocLC(); - } - certDerCoded.Set(certDerCodedHBuf->Des()); - - iCertDER = certDerCodedHBuf; - - CleanupStack::Pop(1); //certDerCodedHBuf - } - -EXPORT_C void CAgileCryptoCert::SaveCACertL(void) -/** -* Saves server certififate to certificate store. -* @return TRetBufCertRef The identifier of the certificate. -*/ - { - RPKIServiceAPI pkiServiceApi; - CleanupClosePushL(pkiServiceApi); - User::LeaveIfError(pkiServiceApi.Connect()); - - TPtr8 certDERDesc(iCertDER->Des()); - TRequestStatus requestStatus; - TAny* resArray; - TUint keySize = 0; - pkiServiceApi.StoreCertificateL(EPKICACertificate, - keySize, - EPKIRSA, - certDERDesc, - &resArray, - requestStatus); - User::WaitForRequest(requestStatus); - pkiServiceApi.Finalize(resArray); - TInt status = requestStatus.Int(); - if (status != KErrNone) - { - User::Leave(status); - } - - - // Set VPN trusted - CX509Certificate* tempCert = CX509Certificate::NewLC(certDERDesc); - RArray appArray; - CleanupClosePushL(appArray); - appArray.AppendL(TUid::Uid(KUidVpnManager)); - - const TPtrC8* serialNumber = tempCert->DataElementEncoding( - CX509Certificate::ESerialNumber); - const TPtrC8* issuername = tempCert->DataElementEncoding( - CX509Certificate::EIssuerName); - - pkiServiceApi.SetApplicabilityL( - *issuername, - *serialNumber, - appArray); - - CleanupStack::PopAndDestroy(3); // appArray, tempCert, pkiServiceApi - - } - -EXPORT_C void CAgileCryptoCert::SaveClientCertL(const TPrivKeyRef& aKeyId, TUint aKeySize) -/** -* Saves client certififate to certificate store. -* @param aKeyId Private key identifier. -* @param aKeySize Private key size. -* @return TRetBufCertRef The identifier of the certificate -*/ - { - RPKIServiceAPI pkiServiceApi; - CleanupClosePushL(pkiServiceApi); - User::LeaveIfError(pkiServiceApi.Connect()); - - TPtr8 certDERDesc(iCertDER->Des()); - TRequestStatus requestStatus; - TAny* resArray; - pkiServiceApi.AttachCertificateL(aKeyId, - aKeySize, - EPKIRSA, - certDERDesc, - &resArray, - requestStatus); - User::WaitForRequest(requestStatus); - pkiServiceApi.Finalize(resArray); - TInt status = requestStatus.Int(); - if (status != KErrNone) - User::LeaveIfError(status); - - CleanupStack::PopAndDestroy(); //pkiServiceApi - - - } - -EXPORT_C CAgileCryptoPrivKey* CAgileCryptoPrivKey::NewL(void) -/** -* Makes crypto private key object. -* @return CAgileCryptoPrivKey* Pointer to crypto private key object. -*/ - { - CAgileCryptoPrivKey* self = new (ELeave) CAgileCryptoPrivKey(); - CleanupStack::PushL(self); - self->ConstructL(); - CleanupStack::Pop(); // self - return self; - } - -void CAgileCryptoPrivKey::ConstructL(void) - { - User::LeaveIfError(iPkiServiceApi.Connect()); - } - - -CAgileCryptoPrivKey::CAgileCryptoPrivKey() - { - ; - } - -EXPORT_C CAgileCryptoPrivKey::~CAgileCryptoPrivKey() -/** -* Destructor. -*/ - { - iPkiServiceApi.Close(); - } - - -EXPORT_C void CAgileCryptoPrivKey::GenerateCertReqL(const TDesC8& aDistinguishedName, - const TDesC8& aSubjectAltNameRfc822, - const TDesC8& aChallengePassword, - const TDesC8& aDnsName, - const TPrivKeyRef& aKeyId, - TDes& aCertReqRef, - TInt& aCertReqSize) -/** -* Creates certificate request. -* @param aDistinguishedName Subject name of the certificate owner. -* @param aSubjectAltNameRfc822 SubjectAlt name of the certificate owner. -* @param aChallengePassword ChallengePw of the certificate owner. -* @param aDnsName DNS name of the certificate owner. -* @param aKeyId KeyId of the key for which the certificate will be generated. -* @param aCertReqRef The identifier of created certificate request (output parameter). -* @param aCertReqSize The size of created certificate request (output parameter). -* @return TErrCode KErrNone, if OK. -*/ - { - - iPkiServiceApi.CreateAndSaveCertificateRequestL(aKeyId, - aDistinguishedName, - aSubjectAltNameRfc822, - aChallengePassword, - aDnsName, - aCertReqRef, - aCertReqSize); - - } - -EXPORT_C TRetBufCertReq CAgileCryptoPrivKey::ReadCertReqL(const TDesC& aCertReqRef, TInt aCertReqSize) -/** -* Reads certififate certificate. -* @param aCertReqRef Certificate request identifier. -* @param aCertReqSize The size of the certificate request. -* @return TRetBufCertReq Certificate request. -*/ - { - HBufC8* certRequest = HBufC8::NewLC(aCertReqSize); - TPtr8 certRequestDesc(certRequest->Des()); - - - TInt status = iPkiServiceApi.ReadCertificateRequest(aCertReqRef, - certRequestDesc); - if (status != KErrNone) - { - User::Leave(KAgileErrCryptoReadCertRequestFailed); - } - CleanupStack::Pop(); //certRequest - - return certRequest; - } - -RPKIServiceAPI CAgileCryptoPrivKey::GetPkiService() - { - return iPkiServiceApi; - } - - -EXPORT_C CAgileCryptoGenerateKeypair* CAgileCryptoGenerateKeypair::NewL(CAgileCryptoPrivKey* aAgileCryptoPrivKey) -/** -* Makes crypto generate key pair object. -* @param aAgileCryptoPrivKey Crypto private key object (contains session to PKI service). -* @return CAgileCryptoGenerateKeypair crypto generate key pair object. -*/ - { - CAgileCryptoGenerateKeypair* self = new (ELeave) CAgileCryptoGenerateKeypair(aAgileCryptoPrivKey); - CleanupStack::PushL(self); - self->ConstructL(); - CleanupStack::Pop(); // self - return self; - } - -void CAgileCryptoGenerateKeypair::ConstructL(void) - { - ; - } - - -CAgileCryptoGenerateKeypair::CAgileCryptoGenerateKeypair(CAgileCryptoPrivKey* aAgileCryptoPrivKey) - : iAgileCryptoPrivKey(aAgileCryptoPrivKey) - { - ; - } - -EXPORT_C TErrCode CAgileCryptoGenerateKeypair::GenerateKeypairL(const TInt& aPublicKeyLen, - TPrivKeyRef& aKeyId, - TRequestStatus& aStatus) -/** -* Generates key pair. -* @param aPublicKeyLen The length of public key. -* @param aKeyId Key pair (private key) identifier (output parameter). -* @param aStatus Asynchronous request status. -* @return TErrCode KErrNone, if OK. -*/ - { - // aStatus = KRequestPending; - - iAgileCryptoPrivKey->GetPkiService().GenerateKeypair(aKeyId, - (TUint)aPublicKeyLen, - EPKIRSA, - //&iResArray, - aStatus); - return 0; - } - -EXPORT_C void CAgileCryptoGenerateKeypair::GenerateKeypairCancel(void) -/** -* Cancels operation. -*/ - { - iAgileCryptoPrivKey->GetPkiService().CancelPendingOperation(); - } - diff -r 9f4e37332ce5 -r 473321461bba vpnengine/agileprovisionws/src/agileprovisionservice.cpp --- a/vpnengine/agileprovisionws/src/agileprovisionservice.cpp Thu Aug 19 10:54:34 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,162 +0,0 @@ -/* -* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: VPN Agile provision service -* -*/ - -#include -#include -#include -#include -#include -#include -#include "agileprovisionservice.h" -#include "agileprovisiondefs.h" - - -CAgileProvisionServiceService* CAgileProvisionServiceService::NewL(MSenServiceConsumer& aObserver, MSenServiceDescription& aServiceDescription) -{ - CSenServiceConnection* pConn = CSenServiceConnection::NewLC(aObserver, aServiceDescription); - - CAgileProvisionServiceService* pNew = new (ELeave) CAgileProvisionServiceService(pConn, ETrue); // owns connection - - CleanupStack::Pop(pConn); - return pNew; -} - - -CAgileProvisionServiceService::CAgileProvisionServiceService(CSenServiceConnection* aConnection, TBool aOwnsConnection) : - iConnection(aConnection), iOwnsConnection(aOwnsConnection) -{ -} - -CAgileProvisionServiceService::~CAgileProvisionServiceService() -{ - delete iCertreq; - iCertreq=NULL; - if (iOwnsConnection) - { - delete iConnection; - } - -} - - -void CAgileProvisionServiceService::GetConfAsyncL() -{ - TPtrC8 reqStr; - - CSenSoapMessage *soapRequest = CSenSoapMessage::NewL(); - CleanupStack::PushL(soapRequest); - - TPtrC8 soapActionPtr(KSoapAction); - soapRequest->SetSoapActionL( soapActionPtr ); - - - TPtrC8 reqBodyStr(KRequest); - soapRequest->SetBodyL(reqBodyStr); - - CSenHttpTransportProperties* pHttpProperties = CSenHttpTransportProperties::NewLC(); - - using namespace CMManager; - - RCmManagerExt cmManagerExt; - cmManagerExt.OpenL(); - CleanupClosePushL( cmManagerExt ); - - RArray destinationArray; - cmManagerExt.AllDestinationsL( destinationArray ); - CleanupClosePushL(destinationArray); - TBool destinationExist=EFalse; - for (TInt i = 0; i < destinationArray.Count(); ++i) - { - RCmDestinationExt destination = cmManagerExt.DestinationL( destinationArray[i] ); - CleanupClosePushL(destination); - - if ( destination.Id() == iIapId ) - { - destinationExist=ETrue; - CleanupStack::PopAndDestroy(); //destination - break; - } - CleanupStack::PopAndDestroy(); //destination - } - destinationArray.Reset(); - destinationArray.Close(); - CleanupStack::PopAndDestroy(2); //destinationArray, cmManagerExt - - if ( destinationExist == 1 ) //ETrue - { - pHttpProperties->SetSnapIdL(iIapId); - } - else - { - pHttpProperties->SetIapIdL(iIapId); - } - - HBufC8* pSerializedProperties = pHttpProperties->AsUtf8L(); - CleanupStack::PushL(pSerializedProperties); - iConnection->SetTransportPropertiesL(*pSerializedProperties); - - TInt ret = iConnection->SendL(*soapRequest); - User::LeaveIfError( ret ); - - iTransactionId = ret ; - CleanupStack::PopAndDestroy(pSerializedProperties); - CleanupStack::PopAndDestroy(pHttpProperties); - CleanupStack::PopAndDestroy(soapRequest); -} - - -void CAgileProvisionServiceService::GetCertificateAsyncL( HBufC8* aCertReq ) -{ - TPtrC8 reqStr; - - CSenSoapMessage *soapRequest = CSenSoapMessage::NewL(); - CleanupStack::PushL(soapRequest); - soapRequest->SetSoapActionL( KSoapActionCert ); - - TBase64Codec base64Codec; - HBufC8* certreqBase64 = base64Codec.Base64EncodeLC(*aCertReq); - HBufC8* certReqBodyHeap=HBufC8::NewLC(KRequest1().Length() + KRequest2().Length() + certreqBase64->Length()); - TPtr8 certReqBodyAppend(certReqBodyHeap->Des()); - certReqBodyAppend=KRequest1; - certReqBodyAppend.Append(certreqBase64->Des()); - certReqBodyAppend.Append(KRequest2); - - TPtrC8 reqBodyStr(certReqBodyAppend); - soapRequest->SetBodyL(reqBodyStr); - - TInt ret = iConnection->SendL(*soapRequest); - User::LeaveIfError( ret ); - iTransactionId = ret; - CleanupStack::PopAndDestroy(); //certReqBodyHeap - CleanupStack::PopAndDestroy(); //certreqBase64 - CleanupStack::PopAndDestroy(); // soapRequest -} - - -void CAgileProvisionServiceService::CancelTransaction() -{ - if ( iTransactionId > 0 ) - { - iConnection->CancelTransaction( iTransactionId ); - iTransactionId = 0; - } -} - -void CAgileProvisionServiceService::ResetTransactionId() -{ - iTransactionId = 0; -} diff -r 9f4e37332ce5 -r 473321461bba vpnengine/agileprovisionws/src/agileprovisionws.cpp --- a/vpnengine/agileprovisionws/src/agileprovisionws.cpp Thu Aug 19 10:54:34 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,378 +0,0 @@ -/* -* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: VPN Agile provision Web Service Client -* -*/ - -#include -#include -#include -#include -#include "agileprovisionws.h" -#include "agileprovisiondefs.h" -#include "policyinstaller_constants.h" -#include "base64.h" - - -EXPORT_C CAgileProvisionWs* CAgileProvisionWs::NewL() - { - CAgileProvisionWs* self = NewLC(); - CleanupStack::Pop(); // self - return self; - } - - -EXPORT_C CAgileProvisionWs* CAgileProvisionWs::NewLC() - { - CAgileProvisionWs* self = new (ELeave) CAgileProvisionWs(); - CleanupStack::PushL(self); - self->ConstructL(); - return self; - } - -CAgileProvisionWs::CAgileProvisionWs() - { - } - - -void CAgileProvisionWs::ConstructL() - { - } - - -CAgileProvisionWs::~CAgileProvisionWs() - { - delete iPService; - delete iServiceAddr; - } - -EXPORT_C void CAgileProvisionWs::GetPolicy(const TDesC8& aEndPointUri, const TUint aIapId, - TRequestStatus& aStatus) - { - __ASSERT_DEBUG( iClientStatus == NULL, - User::Invariant() ); - - // Store client's request status. - - iClientStatus = &aStatus; - *iClientStatus = KRequestPending; - - TRAPD( err, DoGetPolicyL( aEndPointUri, aIapId) ); - if ( err != KErrNone ) - { - DoComplete( err ); - } - } - -EXPORT_C void CAgileProvisionWs::CancelGetPolicy() - { - if ( iPService != NULL ) - { - iPService->CancelTransaction(); - delete iPService; - iPService = NULL; - } - DoComplete( KErrCancel ); - } - -EXPORT_C void CAgileProvisionWs::SetServiceAddr(const HBufC8* aServiceAddr) - { - iServiceAddr=aServiceAddr; - } - -void CAgileProvisionWs::DoGetPolicyL(const TDesC8& aEndPointUri, const TUint aIapId) - { - - CSenXmlServiceDescription* pServiceDesc = CSenXmlServiceDescription::NewLC( aEndPointUri, - KNullDesC8() ); - iEndPointUri=&aEndPointUri; - pServiceDesc->SetFrameworkIdL( KDefaultBasicWebServicesFrameworkID ); - delete iPService; - iPService = NULL; - - iPService = CAgileProvisionServiceService::NewL( *this, *pServiceDesc ); - - CleanupStack::PopAndDestroy( pServiceDesc ); - - iPService->iIapId= aIapId; - - iState = KStateGettingConf; - - } - -void CAgileProvisionWs::HandleMessageL(const TDesC8& aMessage) -{ - - iPService->ResetTransactionId(); - - if ( iState == KStateGettingConf ) - { - HandleGetConfSoapInL( aMessage ); - GenerateCertReqL(); - iPService->GetCertificateAsyncL(iPService->iCertreq); - iState = KStateGettingCertificate; - } - else if ( iState == KStateGettingCertificate ) - { - HandleGetCertificateSoapInL( aMessage ); - DoComplete( KErrNone ); - iState = KStateInitial; - } - else - { - User::Leave( KErrArgument ); - } -} - -void CAgileProvisionWs::HandleErrorL(const TInt aErrorCode, const TDesC8& /*aError*/) - { - DoComplete( aErrorCode ); - } - - -void CAgileProvisionWs::SetStatus(const TInt aStatus) - { - TInt err = KErrNone; - if ( aStatus == KSenConnectionStatusReady ) - { - TRAP( err, iPService->GetConfAsyncL() ); - } - else if ( aStatus == KSenConnectionStatusCreateFailed ) - { - err = aStatus; - } - else - { - // Do nothing. - } - - if ( err != KErrNone ) - { - DoComplete( err ); - } - } - -EXPORT_C void CAgileProvisionWs::HandleGetConfSoapInL(const TDesC8& aMessage) - { - CSenXmlReader *pXmlReader = CSenXmlReader::NewL(); - CleanupStack::PushL(pXmlReader); - - //CSenDomFragment - CSenDomFragment* pBase = CSenDomFragment::NewL(); - CleanupStack::PushL(pBase); - - //must set the content handler - pXmlReader->SetContentHandler(*pBase); - // and the reader - pBase->SetReader(*pXmlReader); - - pXmlReader->ParseL(aMessage); - - RPointerArray& array = pBase->AsElement().ElementsL(); - - //start the listing of the elements, first level is 1 - TInt contentType(1); - - TInt vpnFilePathLth = KAgileProvisionPolicyFileName().Length() + KTempDirectory().Length(); - HBufC* vpnFilePathBuf = HBufC::NewLC(vpnFilePathLth); - TPtr vpnFilePath(vpnFilePathBuf->Des()); - vpnFilePath.Copy(KTempDirectory); - vpnFilePath.Append(KAgileProvisionPolicyFileName); - - ParseFileFromSoapEnvelopeL(array, contentType, 1, vpnFilePath); - - CleanupStack::PopAndDestroy(vpnFilePathBuf); // file - CleanupStack::PopAndDestroy(pBase); // delete pXmlReader, procMsg, responseStr - CleanupStack::PopAndDestroy(pXmlReader); // delete pXmlReader, procMsg, responseStr - } - - -EXPORT_C void CAgileProvisionWs::HandleGetCertificateSoapInL(const TDesC8& aMessage) - { - CSenXmlReader *pXmlReader = CSenXmlReader::NewL(); - CleanupStack::PushL(pXmlReader); - - //CSenDomFragment - CSenDomFragment* pBase = CSenDomFragment::NewL(); - CleanupStack::PushL(pBase); - - //must set the content handler - pXmlReader->SetContentHandler(*pBase); - // and the reader - pBase->SetReader(*pXmlReader); - - pXmlReader->ParseL(aMessage); - - RPointerArray& array = pBase->AsElement().ElementsL(); - - //start the listing of the elements, first level is 1 - - TInt vpnFilePathLth = KAgileProvisionCertificateFileName().Length() + KTempDirectory().Length(); - HBufC* vpnFilePathBuf = HBufC::NewLC(vpnFilePathLth); - TPtr vpnFilePath(vpnFilePathBuf->Des()); - vpnFilePath.Copy(KTempDirectory); - vpnFilePath.Append(KAgileProvisionCertificateFileName); - TInt contentType(2); - ParseFileFromSoapEnvelopeL(array, contentType, 1, vpnFilePath); - - CleanupStack::PopAndDestroy(vpnFilePathBuf); // file - CleanupStack::PopAndDestroy(pBase); // delete pXmlReader, procMsg, responseStr - CleanupStack::PopAndDestroy(pXmlReader); // delete pXmlReader, procMsg, responseStr - - } - -// The listing of the elements is done in ListNodesL function: -void CAgileProvisionWs::ParseFileFromSoapEnvelopeL(RPointerArray& aArray, - TInt aContentType,TInt aLevel, TDesC& aFileName ) - { - - TInt size = aArray.Count(); - for(TInt i=0; iHasContent() ) - { - //get the content of the element - TPtrC8 content = pElement->Content(); - TBase64Codec* base64Inst = new (ELeave) TBase64Codec(); - CleanupStack::PushL(base64Inst); - HBufC8* dataBuf = base64Inst->Base64DecodeLC(content); - HBufC8* fileBuf = base64Inst->Base64DecodeLC(*dataBuf); - - //CA from getConf envelope - if ( aContentType == 1 && i==1 ) - { - CAgileCryptoCert* agileClientCert = CAgileCryptoCert::NewL(fileBuf->Des(), EFalse); - CleanupStack::PushL(agileClientCert); - agileClientCert->SaveCACertL(); - CleanupStack::PopAndDestroy(agileClientCert); - } - else if ( aContentType == 2) - { - CAgileCryptoCert* agileClientCert = CAgileCryptoCert::NewL(fileBuf->Des(), ETrue); - CleanupStack::PushL(agileClientCert); - agileClientCert->SaveClientCertL(iKeyRef,KPublicKeyLen); - CleanupStack::PopAndDestroy(agileClientCert); - } - else - { - RFile file; - RFs iFs; - TInt err= iFs.Connect(); - CleanupClosePushL(file); - User::LeaveIfError(file.Replace(iFs, aFileName, EFileWrite)); - User::LeaveIfError(file.Write(*fileBuf)); - - //write pin file - TInt vpnPinFilePathLth = KAgileProvisionPinFileName().Length() + KTempDirectory().Length(); - HBufC* vpnPinFilePathBuf = HBufC::NewLC(vpnPinFilePathLth); - TPtr vpnPinFilePath(vpnPinFilePathBuf->Des()); - vpnPinFilePath.Copy(KTempDirectory); - vpnPinFilePath.Append(KAgileProvisionPinFileName); - User::LeaveIfError(file.Replace(iFs, vpnPinFilePath, EFileWrite)); - CleanupStack::PopAndDestroy(vpnPinFilePathBuf); // file - file.Flush(); - file.Close(); - CleanupStack::PopAndDestroy(&file); - iFs.Close(); - } - - - CleanupStack::PopAndDestroy(fileBuf); - CleanupStack::PopAndDestroy(dataBuf); - CleanupStack::PopAndDestroy(base64Inst); - - - } - - //get the first child - CSenElement* child = pElement->Child(0); - - //check if element has childs - if( child ) - { - //get the child elements - RPointerArray& tree = pElement->ElementsL(); - - //list child elements by a recursive call - ParseFileFromSoapEnvelopeL(tree, aContentType, ++aLevel, aFileName); - } - aLevel--; - } //for loop ends - } - -EXPORT_C void CAgileProvisionWs::GenerateCertReqL() - { - TRequestStatus status; - CAgileCryptoPrivKey* agileCryptoPrivKey = CAgileCryptoPrivKey::NewL(); - CleanupStack::PushL(agileCryptoPrivKey); - CAgileCryptoGenerateKeypair* agileCryptoGenerateKeypair = CAgileCryptoGenerateKeypair::NewL(agileCryptoPrivKey); - CleanupStack::PushL(agileCryptoGenerateKeypair); - - // generate key - agileCryptoGenerateKeypair->GenerateKeypairL(KPublicKeyLen, iKeyRef, status); - User::WaitForRequest(status); - - // generate subjectname - _LIT8(KCnHeader, "CN="); - _LIT8(KCnUsername, "vpnuser"); - TInt distinguishedNameLth = KCnHeader().Length() + KCnUsername().Length(); - HBufC8* distinguishedNameHBuf = HBufC8::NewLC(distinguishedNameLth); - TPtr8 distinguishedName(distinguishedNameHBuf->Des()); - distinguishedName.Copy(KCnHeader); - distinguishedName.Append(KCnUsername); - - // generate certreq - const TInt KDmAdMaxCertReqRefLth = KMaxFileName; - HBufC* certReqRef = HBufC::NewLC(KDmAdMaxCertReqRefLth); - TPtr certReqRefPtr(certReqRef->Des()); - TInt certReqSize; - - agileCryptoPrivKey->GenerateCertReqL(*distinguishedNameHBuf, //subjectname - KNullDesC8, // subjectaltname - KNullDesC8, //aChallengePassword, - KNullDesC8, //DnsName, - iKeyRef, - certReqRefPtr, - certReqSize); - - - // read certreq - TRetBufCertReq certReq; - certReq = agileCryptoPrivKey->ReadCertReqL(certReqRefPtr, certReqSize); - if ( iPService ) - { - iPService->iCertreq = certReq; - } - else - { - delete certReq; - certReq=NULL; - } - - CleanupStack::PopAndDestroy(certReqRef); - CleanupStack::PopAndDestroy(distinguishedNameHBuf); - CleanupStack::PopAndDestroy(agileCryptoGenerateKeypair); - CleanupStack::PopAndDestroy(agileCryptoPrivKey); - } - -void CAgileProvisionWs::DoComplete( const TInt aStatus ) - { - if ( iClientStatus != NULL ) - { - User::RequestComplete( iClientStatus, - aStatus ); - } - } diff -r 9f4e37332ce5 -r 473321461bba vpnengine/dmadpki/src/DmAdRtNodeData.cpp --- a/vpnengine/dmadpki/src/DmAdRtNodeData.cpp Thu Aug 19 10:54:34 2010 +0300 +++ b/vpnengine/dmadpki/src/DmAdRtNodeData.cpp Tue Aug 31 16:14:16 2010 +0300 @@ -1,5 +1,5 @@ /* -* Copyright (c) 2000-2010 Nokia Corporation and/or its subsidiary(-ies). +* Copyright (c) 2000-2008 Nokia Corporation and/or its subsidiary(-ies). * All rights reserved. * This component and the accompanying materials are made available * under the terms of "Eclipse Public License v1.0" @@ -644,7 +644,7 @@ TUid uid = { TDmAdUtil::DesToInt(attribute) }; DEBUG_LOG1(_L("Uid: 0x%x"), uid.iUid); - aApplicabilityList.AppendL(uid); + aApplicabilityList.Append(uid); parser->NextL(); while (parser->State() == CXmlPullParser::EStateText) diff -r 9f4e37332ce5 -r 473321461bba vpnengine/dmadpki/src/DmAdStore.cpp --- a/vpnengine/dmadpki/src/DmAdStore.cpp Thu Aug 19 10:54:34 2010 +0300 +++ b/vpnengine/dmadpki/src/DmAdStore.cpp Tue Aug 31 16:14:16 2010 +0300 @@ -40,7 +40,6 @@ TRACE("CDmAdStore::ConstructL"); TInt status = iPkiServiceApi.Connect(); - iPkiServiceApi.SetInformational(ETrue); DEBUG_LOG1(_L("Connect status: %d"), status); User::LeaveIfError(status); iCert = CDmAdCert::NewL(iPkiServiceApi); diff -r 9f4e37332ce5 -r 473321461bba vpnengine/ikepolparser/inc/ikepolparser.h --- a/vpnengine/ikepolparser/inc/ikepolparser.h Thu Aug 19 10:54:34 2010 +0300 +++ b/vpnengine/ikepolparser/inc/ikepolparser.h Tue Aug 31 16:14:16 2010 +0300 @@ -1,5 +1,5 @@ /* -* Copyright (c) 1999-2010 Nokia Corporation and/or its subsidiary(-ies). +* Copyright (c) 1999-2009 Nokia Corporation and/or its subsidiary(-ies). * All rights reserved. * This component and the accompanying materials are made available * under the terms of "Eclipse Public License v1.0" @@ -15,6 +15,8 @@ * */ + + #ifndef __IKEPOLPARSER_H #define __IKEPOLPARSER_H @@ -289,7 +291,7 @@ TOwnCertInfo iOwnCert; TCertInfo iPrivKey; TCertInfo iPeerCert; - TBool iUseCache; // Use credential cache + }; diff -r 9f4e37332ce5 -r 473321461bba vpnengine/ikepolparser/src/ikepolparser.cpp --- a/vpnengine/ikepolparser/src/ikepolparser.cpp Thu Aug 19 10:54:34 2010 +0300 +++ b/vpnengine/ikepolparser/src/ikepolparser.cpp Tue Aug 31 16:14:16 2010 +0300 @@ -169,8 +169,6 @@ CleanupStack::Pop(ca_copy); } } - - iUseCache = aData->iUseCache; } void CIkeData::Empty() @@ -453,8 +451,11 @@ else if (token.CompareF(_L("IKE_VERSION:"))==0) //CompareF ignores case { sub_num = NextToken(); - sub_num.Val(aConf->iIkeVersion, EDecimal); - if ( aConf->iIkeVersion != 2 ) + if ( sub_num.Val(aConf->iIkeVersion, EDecimal) != KErrNone ) + { + err = KSecParserErrUnknown; + } + else if ( aConf->iIkeVersion != 2 ) aConf->iIkeVersion = 1; // IKE version 1 is currently the default } else if (token.CompareF(_L("SEND_NOTIFICATION:"))==0) //CompareF ignores case @@ -727,13 +728,6 @@ //PeerCerts List else if (token.CompareF(_L("PEER_CERTS:"))==0) //CompareF ignores case err = ParsePeerCerts(aConf); - else if (token.CompareF(_L("USE_CACHE:"))==0) //CompareF ignores case - { - aConf->iUseCache = EFalse; - token.Set(NextToken()); - if (token.CompareF(_L("True"))==0) - aConf->iUseCache = ETrue; - } } if ( err == KErrNone ) errCA=CheckPolicy(aConf); @@ -1114,16 +1108,6 @@ err = BufferAppend(aPolBfr, line); if (err != KErrNone) return err; - - line.Copy(_L8("USE_CACHE: ")); - if (aConf->iUseCache) - line.Append(_L("TRUE\n")); - else - line.Append(_L("FALSE\n")); - err = BufferAppend(aPolBfr, line); - if (err != KErrNone) - return err; - if ( aConf->iCRACKLAMUserName ) { line.Copy(_L8("CRACK_LAM_USERNAME: ")); diff -r 9f4e37332ce5 -r 473321461bba vpnengine/ikeutils/bwins/ikeutilsu.def --- a/vpnengine/ikeutils/bwins/ikeutilsu.def Thu Aug 19 10:54:34 2010 +0300 +++ b/vpnengine/ikeutils/bwins/ikeutilsu.def Tue Aug 31 16:14:16 2010 +0300 @@ -28,5 +28,4 @@ ?NewL@CIpsecSaSpiRetriever@@SAPAV1@AAVMIpsecSaSpiRetrieverCallback@@AAVCPFKeySocketIf@@@Z @ 27 NONAME ; class CIpsecSaSpiRetriever * CIpsecSaSpiRetriever::NewL(class MIpsecSaSpiRetrieverCallback &, class CPFKeySocketIf &) ?GetIpseSaSpecListLC@CIpsecPolicyUtil@@QAEPAVCIpsecSaSpecList@@VTInetAddr@@000HK@Z @ 28 NONAME ; class CIpsecSaSpecList * CIpsecPolicyUtil::GetIpseSaSpecListLC(class TInetAddr, class TInetAddr, class TInetAddr, class TInetAddr, int, unsigned long) ?DestAddr@TIkeSendQueueItem@@QAEABVTInetAddr@@XZ @ 29 NONAME ; class TInetAddr const & TIkeSendQueueItem::DestAddr(void) - ?GetPolicyIdL@CmUtils@@SAXKAAV?$TBuf@$0DC@@@@Z @ 30 NONAME ; void CmUtils::GetPolicyIdL(unsigned long, class TBuf<50> &) diff -r 9f4e37332ce5 -r 473321461bba vpnengine/ikeutils/eabi/ikeutilsu.def --- a/vpnengine/ikeutils/eabi/ikeutilsu.def Thu Aug 19 10:54:34 2010 +0300 +++ b/vpnengine/ikeutils/eabi/ikeutilsu.def Tue Aug 31 16:14:16 2010 +0300 @@ -46,5 +46,4 @@ _ZTV19TPfkeySupportedAuth @ 45 NONAME _ZTV20CIpsecSaSpiRetriever @ 46 NONAME _ZTV22TPfkeySupportedEncrypt @ 47 NONAME - _ZN7CmUtils12GetPolicyIdLEmR4TBufILi50EE @ 48 NONAME diff -r 9f4e37332ce5 -r 473321461bba vpnengine/ikeutils/group/ikeutils.mmp --- a/vpnengine/ikeutils/group/ikeutils.mmp Thu Aug 19 10:54:34 2010 +0300 +++ b/vpnengine/ikeutils/group/ikeutils.mmp Tue Aug 31 16:14:16 2010 +0300 @@ -35,7 +35,6 @@ SOURCE pfkeymsg.cpp SOURCE pfkeysocketif.cpp SOURCE vpnaddrinfo.cpp -SOURCE cmutils.cpp USERINCLUDE . USERINCLUDE ../inc @@ -50,6 +49,5 @@ LIBRARY ipsecpolapi.lib LIBRARY lib_pfkey.lib LIBRARY random.lib -LIBRARY cmmanager.lib CAPABILITY ALL -Tcb diff -r 9f4e37332ce5 -r 473321461bba vpnengine/ikeutils/inc/cmutils.h --- a/vpnengine/ikeutils/inc/cmutils.h Thu Aug 19 10:54:34 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,42 +0,0 @@ -/* -* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: CmManager related utility functionality -* -*/ - -#ifndef CMUTILS_H -#define CMUTILS_H - -#include -#include - - -/** - * CmManager related utilities. - */ -class CmUtils{ - public: - /** - * Gets VPN policy id based on VPN access point id. - * - * @param aVpnApId VPN access point id. - * @param aPolId On return, VPN policy id. - */ - IMPORT_C static void GetPolicyIdL( - const TUint32 aVpnApId, TVpnPolicyId& aPolId ); - -}; - - -#endif // CMUTILS_H diff -r 9f4e37332ce5 -r 473321461bba vpnengine/ikeutils/src/cmutils.cpp --- a/vpnengine/ikeutils/src/cmutils.cpp Thu Aug 19 10:54:34 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,50 +0,0 @@ -/* -* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: CmManager related utility functionality -* -*/ - -#include -#include -#include - -#include "cmutils.h" - - -EXPORT_C void CmUtils::GetPolicyIdL( const TUint32 aVpnApId, TVpnPolicyId& aPolId ) -{ - using namespace CMManager; - - RCmManager cmManager; - - cmManager.OpenL(); - CleanupClosePushL( cmManager ); - - RCmConnectionMethod cm = cmManager.ConnectionMethodL( aVpnApId ); - CleanupClosePushL( cm ); - - HBufC* policy = cm.GetStringAttributeL( EVpnServicePolicy ); - - if( policy && policy->Length() <= aPolId.MaxLength() ) - { - aPolId.Copy( *policy ); - } - - delete policy; - - CleanupStack::PopAndDestroy( 2 ); // cm and cmManager -} - - -/***/ diff -r 9f4e37332ce5 -r 473321461bba vpnengine/ikev1lib/group/ikev1lib.mmp --- a/vpnengine/ikev1lib/group/ikev1lib.mmp Thu Aug 19 10:54:34 2010 +0300 +++ b/vpnengine/ikev1lib/group/ikev1lib.mmp Tue Aug 31 16:14:16 2010 +0300 @@ -1,5 +1,5 @@ /* -* Copyright (c) 2003-2010 Nokia Corporation and/or its subsidiary(-ies). +* Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies). * All rights reserved. * This component and the accompanying materials are made available * under the terms of "Eclipse Public License v1.0" @@ -11,10 +11,12 @@ * * Contributors: * -* Description: Project definition file for project ikev1lib +* Description: Project definition file for project ikev1lib * */ + + #include TARGET ikev1lib.dll @@ -44,7 +46,6 @@ SOURCE ikev1trans.cpp SOURCE ikev1isakmpstream.cpp SOURCE ikev1nokianattkeepalive.cpp -SOURCE credentialcache.cpp USERINCLUDE ../inc USERINCLUDE ../../ikesocket/inc @@ -72,3 +73,5 @@ LIBRARY ikesocket.lib LIBRARY random.lib LIBRARY ikeutils.lib + + diff -r 9f4e37332ce5 -r 473321461bba vpnengine/ikev1lib/inc/credentialcache.h --- a/vpnengine/ikev1lib/inc/credentialcache.h Thu Aug 19 10:54:34 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,152 +0,0 @@ -/* -* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Cache for authentication credentials -* -*/ - -#ifndef CREDENTIALCACHE_H -#define CREDENTIALCACHE_H - -#include -#include - - -class MIkeDebug; - - -const TInt KCredentialMaxLen = 64; - - -/** - * Cache buffer stored to file. - */ -struct TCacheBuffer{ - TVpnPolicyId iId; - TBuf8 iUser; - TBuf8 iSecret; -}; - - -/** - * Cache for authentication credentials. - * The public interface of the class has been - * designed for CTransNegotiation use. - * - * Error handling: - * The methods return error code or leave only if - * it is useful for the method caller to handle the error. - * The user of CCredentialCache must work even if the - * cache fails. (The credentials are asked from user in that case.) - * - * Example usage sequence: - * NewL - * SetUserName - * SetSecret - * Store - * GetCredentials - */ -NONSHARABLE_CLASS( CCredentialCache ) : public CBase{ - public: - /** - * Two-phased constructor. - * @param aDebug Debug log interface. - */ - static CCredentialCache* NewL( MIkeDebug& aDebug ); - - ~CCredentialCache(); - - /** - * Sets user-name. Does not store to file. - * @param aUser User name. - */ - void SetUserName( const TDesC8& aUser ); - - /** - * Sets secret, e.g. password. Does not store to file. - * @param aSecret Secret, e.g. password. - */ - void SetSecret( const TDesC8& aSecret ); - - /** - * Gets credentials from cache file. - * Caller is responsible for deallocating aUser and aSecret. - * - * @param aVpnApId VPN access point id - * @param aUser On return, user name. - * @param aSecret On return, secret. - * - * @return KErrNone if credentials are fetched from cache. - * @return System-wide error code if cached credentials are not available. - */ - TInt GetCredentials( - const TUint32 aVpnApId, HBufC8*& aUser, HBufC8*& aSecret - ); - - /** - * Stores user-name and secret to private file. - * @param aVpnApId VPN access point id. - */ - void Store( const TUint32 aVpnApId ); - - /** - * Clears cache. - */ - void Clear(); - - private: - CCredentialCache( MIkeDebug& aDebug ); - - void ConstructL(); - - /** - * Gets credentials from cache file. - */ - TInt GetCredentialsL( - const TUint32 aVpnApId, HBufC8*& aUser, HBufC8*& aSecret - ); - - /** - * Stores user-name and secret to private file. - */ - void StoreL( const TUint32 aVpnApId ); - - TInt CheckCredential( const TDesC8& cr ); - - /** - * Stores cache to private file. - */ - void StoreToFileL(); - - /** - * Reads cache data to iBuf. - */ - TInt ReadFile(); - - /** - * Stores file name with path to iFileName. - * Creates private path if needed. - */ - TInt CreateFileNameAndPath(); - - RFs iFs; - - TCacheBuffer iBuf; - - TFileName iFileName; - - MIkeDebug& iDebug; -}; - - -#endif // CREDENTIALCACHE_H diff -r 9f4e37332ce5 -r 473321461bba vpnengine/ikev1lib/inc/ikev1crack.h --- a/vpnengine/ikev1lib/inc/ikev1crack.h Thu Aug 19 10:54:34 2010 +0300 +++ b/vpnengine/ikev1lib/inc/ikev1crack.h Tue Aug 31 16:14:16 2010 +0300 @@ -58,39 +58,28 @@ class CIkev1PluginSession; class MIkeDebug; - -NONSHARABLE_CLASS(CAuthDialogInfo) : public CBase +class CAuthDialogInfo : public CBase { public: CAuthDialogInfo(CIkev1PluginSession* aPluginSession, TUint32 aObjId, TUint32 aSAId, TUint32 aMsgId) { iPluginSession = aPluginSession; iSAId = aSAId; iObjId = aObjId; iMsgId = aMsgId; } - ~CAuthDialogInfo(); + ~CAuthDialogInfo() {iObjId = 0;} inline CIkev1PluginSession* PluginSession() { return iPluginSession;} inline TUint32 SAId() { return iSAId;} inline TUint32 GetObjId() { return iObjId;} inline TUint32 GetMsgId() { return iMsgId;} - void SetUserName( HBufC8* aUserName ); - void SetSecret( HBufC8* aSecret ); - private: - TUint32 iObjId; // Object identifier + TUint32 iObjId; // Object identifier CIkev1PluginSession* iPluginSession; // Plugin session pointer - TUint32 iSAId; // SA id of CIkev1Negotiation - TUint32 iMsgId; // Transaction exchange message ID + TUint32 iSAId; // SA id of CIkev1Negotiation + TUint32 iMsgId; // Transaction exchange message ID public: - /** - * Username from UI dialog or cache. - * Own. - */ - HBufC8* iUsername; - - /** - * Secret from UI dialog or cache. - * Own. - */ - HBufC8* iSecret; +// Credentials data get from user with asynchronous dialog + HBufC8 *iUsername; + HBufC8 *iSecret; + HBufC8 *iDomain; }; @@ -103,8 +92,9 @@ TInt ExecuteCRACKMsgL(const ThdrISAKMP &aHdr); TInt ProcessUserResponseL(CAuthDialogInfo *aUserInfo); TInt CrackAuthenticationFailedL(const TNotificationISAKMP *aNotifPayload); - - TInt DialogCompleteL(TAny* aUserInfo, HBufC8* aUsername, HBufC8* aSecret); + + TInt DialogCompleteL(CIkev1Dialog* /*aDialog*/, TAny* aUserInfo, HBufC8* aUsername, HBufC8* aSecret, HBufC8* aDomain); + private: TInt GetDataL(HBufC8* aChallenge); @@ -127,7 +117,7 @@ HBufC8 *iUserName; // Saved for User name caching HBufC8 *iDomain; // Fixed domain value for this CRACK negotiation - + MIkeDebug& iDebug; }; diff -r 9f4e37332ce5 -r 473321461bba vpnengine/ikev1lib/inc/ikev1dialog.h --- a/vpnengine/ikev1lib/inc/ikev1dialog.h Thu Aug 19 10:54:34 2010 +0300 +++ b/vpnengine/ikev1lib/inc/ikev1dialog.h Tue Aug 31 16:14:16 2010 +0300 @@ -28,7 +28,6 @@ class RFs; class MIkeDebug; - /** * IKE dialog complete * @internalComponent @@ -39,12 +38,13 @@ /** * IKE dialog completed * @internalComponent + * */ - virtual TInt DialogCompleteL( - TAny* aUserInfo, HBufC8* aUsername, HBufC8* aSecret) = 0; + virtual TInt DialogCompleteL(CIkev1Dialog* aDialog, TAny* aUserInfo, HBufC8* aUsername, HBufC8* aSecret, HBufC8* aDomain)=0; }; + NONSHARABLE_CLASS(CDialogTimeout) : public CTimer { public: diff -r 9f4e37332ce5 -r 473321461bba vpnengine/ikev1lib/inc/ikev1negotiation.h --- a/vpnengine/ikev1lib/inc/ikev1negotiation.h Thu Aug 19 10:54:34 2010 +0300 +++ b/vpnengine/ikev1lib/inc/ikev1negotiation.h Tue Aug 31 16:14:16 2010 +0300 @@ -177,9 +177,10 @@ TInt aStatus, TUint32 aSpi); - TInt ProcessUserResponseL(CAuthDialogInfo *aUserInfo); - TInt DialogCompleteL(TAny* aUserInfo, HBufC8* aUsername, HBufC8* aSecret); + TInt ProcessUserResponseL(CAuthDialogInfo *aUserInfo); + TInt DialogCompleteL(CIkev1Dialog* /*aDialog*/, TAny* aUserInfo, HBufC8* aUsername, HBufC8* aSecret, HBufC8* aDomain); + private: CIkev1Negotiation( CIkev1PluginSession* aPluginSession, diff -r 9f4e37332ce5 -r 473321461bba vpnengine/ikev1lib/inc/ikev1trans.h --- a/vpnengine/ikev1lib/inc/ikev1trans.h Thu Aug 19 10:54:34 2010 +0300 +++ b/vpnengine/ikev1lib/inc/ikev1trans.h Tue Aug 31 16:14:16 2010 +0300 @@ -1,5 +1,5 @@ /* -* Copyright (c) 2005-2010 Nokia Corporation and/or its subsidiary(-ies). +* Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). * All rights reserved. * This component and the accompanying materials are made available * under the terms of "Eclipse Public License v1.0" @@ -63,8 +63,6 @@ class TIkev1IsakmpStream; class MIkeDebug; class TInetAddr; -class CCredentialCache; - /**-------------------------------------------------------------------------- * @@ -102,7 +100,8 @@ static TUint16 GetAuthMethod(TUint16 aAuthMethod, TBool aXauthUsed, TInt aRole); static void BuildXauthVendorId(TIkev1IsakmpStream &aMsg); - TInt DialogCompleteL(TAny* aUserInfo, HBufC8* aUsername, HBufC8* aSecret); + TInt DialogCompleteL(CIkev1Dialog* aDialog, TAny* aUserInfo, HBufC8* aUsername, + HBufC8* aSecret, HBufC8* aDomain); TInt BuildConfigRequestL(); private: @@ -129,8 +128,7 @@ CIkev1PluginSession* aPluginSession, CIkev1Negotiation* aNegotiation, MIkeDebug& aDebug ); - void ConstructL(); - void GetCredentialsL(); + void ConstructL(); private: CIkev1PluginSession* iPluginSession; @@ -147,13 +145,9 @@ TUint32 iRequestFlags; TBool iXauthCompleted; TBool iCfgModeCompleted; - TBool iUseOlderPIXXauth; // use draft-ietf-ipsec-isakmp-xauth-04.txt - TInt iCredentialType; - - TLastIKEMsg iLastTransMsgInfo; - - CCredentialCache* iCache; - + TBool iUseOlderPIXXauth; // use draft-ietf-ipsec-isakmp-xauth-04.txt + + TLastIKEMsg iLastTransMsgInfo; MIkeDebug& iDebug; }; diff -r 9f4e37332ce5 -r 473321461bba vpnengine/ikev1lib/src/credentialcache.cpp --- a/vpnengine/ikev1lib/src/credentialcache.cpp Thu Aug 19 10:54:34 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,260 +0,0 @@ - /* -* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Cache for authentication credentials -* -*/ - -#include - -#include "credentialcache.h" -#include "ikedebug.h" -#include "cmutils.h" - - -_LIT( KFileName, "cache" ); - - -CCredentialCache* CCredentialCache::NewL( MIkeDebug& aDebug ) -{ - CCredentialCache* cache = new (ELeave) CCredentialCache( aDebug ); - - CleanupStack::PushL( cache ); - - cache->ConstructL(); - - CleanupStack::Pop(); - - return cache; -} - - -CCredentialCache::CCredentialCache( MIkeDebug& aDebug ) - : iDebug( aDebug ) -{ -} - - -void CCredentialCache::ConstructL() -{ - User::LeaveIfError( iFs.Connect() ); - - DEBUG_LOG( _L( "CCredentialCache::ConstructL" ) ); -} - - -CCredentialCache::~CCredentialCache() -{ - iFs.Close(); -} - - -void CCredentialCache::SetUserName( const TDesC8& aUser ) -{ - if( KErrNone != CheckCredential( aUser ) ) - { - return; - } - - iBuf.iUser.Copy( aUser ); -} - - -void CCredentialCache::SetSecret( const TDesC8& aSecret ) -{ - if( KErrNone != CheckCredential( aSecret ) ) - { - return; - } - - iBuf.iSecret.Copy( aSecret ); -} - - -TInt CCredentialCache::GetCredentials( - const TUint32 aVpnApId, HBufC8*& aUser, HBufC8*& aSecret ) -{ - TInt ret = KErrNone; - - TRAPD( err, ret = GetCredentialsL( aVpnApId, aUser, aSecret ) ); - - if( KErrNone != err ) - { - DEBUG_LOG1( _L("CCredentialCache::GetCredentials, err=%d"), err ); - return err; - } - - return ret; -} - - -TInt CCredentialCache::GetCredentialsL( - const TUint32 aVpnApId, HBufC8*& aUser, HBufC8*& aSecret ) -{ - TInt ret = ReadFile(); - - if( KErrNone != ret ) - { - return ret; - } - - TVpnPolicyId id; - - CmUtils::GetPolicyIdL( aVpnApId, id ); - - if( id != iBuf.iId ) - { - DEBUG_LOG1( - _L("CCredentialCache::GetCredentialsL, pol=%S"), &iBuf.iId - ); - - return KErrNotFound; - } - - aUser = iBuf.iUser.AllocL(); - aSecret = iBuf.iSecret.AllocL(); - - return KErrNone; -} - - -void CCredentialCache::Store( const TUint32 aVpnApId ) -{ - TRAPD( err, StoreL( aVpnApId ) ); - - if( KErrNone != err ) - { - DEBUG_LOG1( _L("CCredentialCache::Store, err=%d"), err ); - } -} - - -void CCredentialCache::StoreL( const TUint32 aVpnApId ) -{ - CmUtils::GetPolicyIdL( aVpnApId, iBuf.iId ); - - StoreToFileL(); -} - - -void CCredentialCache::Clear() -{ - TInt ret = CreateFileNameAndPath(); - - if( KErrNone != ret ) - { - return; - } - - ret = iFs.Delete( iFileName ); - - if( KErrNone != ret ) - { - DEBUG_LOG1( _L("CCredentialCache::Clear, ret=%d"), ret ); - } -} - - -TInt CCredentialCache::CheckCredential( const TDesC8& cr ) -{ - TInt len = cr.Length(); - - if( 0 == len || KCredentialMaxLen < len ) - { - DEBUG_LOG1( _L("CCredentialCache::CheckCredential, len=%d"), len ); - return KErrArgument; - } - - return KErrNone; -} - - -void CCredentialCache::StoreToFileL() -{ - RFile cache; - - User::LeaveIfError( CreateFileNameAndPath() ); - - User::LeaveIfError( cache.Replace( - iFs, iFileName, EFileShareExclusive | EFileWrite - ) ); - - CleanupClosePushL( cache ); - - TPckg< TCacheBuffer > data( iBuf ); - - User::LeaveIfError( cache.Write( data ) ); - - CleanupStack::PopAndDestroy( &cache ); -} - - -TInt CCredentialCache::ReadFile() -{ - RFile cache; - - TInt ret = cache.Open( iFs, KFileName, EFileRead ); - - if( KErrNone != ret ) - { - return ret; - } - - TInt size = 0; - - ret = cache.Size( size ); - - TPckg< TCacheBuffer > data( iBuf ); - - if( size != data.Size() ) - { - DEBUG_LOG1( _L("CCredentialCache::ReadFile, size=%d"), size ); - cache.Close(); - Clear(); - return KErrCorrupt; - } - - ret = cache.Read( data ); - - cache.Close(); - - return ret; -} - - -TInt CCredentialCache::CreateFileNameAndPath() -{ - TInt ret = iFs.CreatePrivatePath( RFs::GetSystemDrive() ); - - if( KErrNone != ret && - KErrAlreadyExists != ret ) - { - DEBUG_LOG1( _L("CCredentialCache, CreatePrivatePath ret=%d"), ret ); - return ret; - } - - ret = iFs.PrivatePath( iFileName ); - - if( KErrNone != ret ) - { - DEBUG_LOG1( _L("CCredentialCache, PrivatePath ret=%d"), ret ); - return ret; - } - - iFileName.Append( KFileName ); - - return KErrNone; -} - - -/***/ diff -r 9f4e37332ce5 -r 473321461bba vpnengine/ikev1lib/src/ikev1crack.cpp --- a/vpnengine/ikev1lib/src/ikev1crack.cpp Thu Aug 19 10:54:34 2010 +0300 +++ b/vpnengine/ikev1lib/src/ikev1crack.cpp Tue Aug 31 16:14:16 2010 +0300 @@ -26,27 +26,6 @@ #include "ikepolparser.h" -CAuthDialogInfo::~CAuthDialogInfo() -{ - delete iUsername; - delete iSecret; -} - - -void CAuthDialogInfo::SetUserName( HBufC8* aUserName ) -{ - delete iUsername; - iUsername = aUserName; -} - - -void CAuthDialogInfo::SetSecret( HBufC8* aSecret ) -{ - delete iSecret; - iSecret = aSecret; -} - - // // Class that implements IKE CRACK authentication method // @@ -539,8 +518,8 @@ // // The implementation for class MIkeDialogComplete virtual function // -TInt CIKECRACKNegotiation::DialogCompleteL( - TAny* aUserInfo, HBufC8* aUsername, HBufC8* aSecret) +TInt CIKECRACKNegotiation::DialogCompleteL(CIkev1Dialog* /*aDialog*/, TAny* aUserInfo, + HBufC8* aUsername, HBufC8* aSecret, HBufC8* aDomain) { /*--------------------------------------------------------------------------- * @@ -562,11 +541,14 @@ DEBUG_LOG1(_L("Preparing to call AuthDialogCompletedL(), ObjId = %x"), obj_id); if ( obj_id == DIALOG_INFO_ID ) { - info->SetUserName( aUsername ); - info->SetSecret( aSecret ); + info->iUsername = aUsername; + info->iSecret = aSecret; + info->iDomain = aDomain; obj_id = info->PluginSession()->AuthDialogCompletedL(info); - } + } } return obj_id; } + + diff -r 9f4e37332ce5 -r 473321461bba vpnengine/ikev1lib/src/ikev1dialog.cpp --- a/vpnengine/ikev1lib/src/ikev1dialog.cpp Thu Aug 19 10:54:34 2010 +0300 +++ b/vpnengine/ikev1lib/src/ikev1dialog.cpp Tue Aug 31 16:14:16 2010 +0300 @@ -189,9 +189,12 @@ if ( iCallback ) { TInt err; - TRAP(err, delete_obj = iCallback->DialogCompleteL( - iUserInfo, un_bfr, pw_bfr)); - + TRAP(err, delete_obj = iCallback->DialogCompleteL(this, iUserInfo, + un_bfr, //User name + pw_bfr, //Password + NULL)); //domain + delete un_bfr; + delete pw_bfr; if ( err != KErrNone ) delete_obj = 1; } @@ -604,9 +607,11 @@ { TInt err; DEBUG_LOG2(_L("Calling DialogCompleteL(), UserInfo = %x, Callback = %x"), (TUint32)iDialog->UserInfo(), (TUint32)Callback); - TRAP(err, delete_dialog = Callback->DialogCompleteL( - iDialog->UserInfo(), NULL, NULL)); - + TRAP(err, delete_dialog = Callback->DialogCompleteL(iDialog, + iDialog->UserInfo(), + NULL, //User name + NULL, //Password + NULL)); //domain DEBUG_LOG2(_L("DialogCompleteL() completed, err = %d, delete_dialog = %d"), err, delete_dialog); if ( err != KErrNone ) delete_dialog = 1; diff -r 9f4e37332ce5 -r 473321461bba vpnengine/ikev1lib/src/ikev1negotiation.cpp --- a/vpnengine/ikev1lib/src/ikev1negotiation.cpp Thu Aug 19 10:54:34 2010 +0300 +++ b/vpnengine/ikev1lib/src/ikev1negotiation.cpp Tue Aug 31 16:14:16 2010 +0300 @@ -187,8 +187,8 @@ delete iPkiService; // Trusted CA certificate list - delete iSAPayload; - delete iPeerIdentPayload; + delete[] iSAPayload; + delete[] iPeerIdentPayload; delete iOwnIdentPayload; //Keys @@ -8409,12 +8409,11 @@ return KErrNone; } - // // The implementation for class MIkeDialogComplete virtual function // -TInt CIkev1Negotiation::DialogCompleteL( - TAny* aUserInfo, HBufC8* aUsername, HBufC8* aSecret) +TInt CIkev1Negotiation::DialogCompleteL(CIkev1Dialog* /*aDialog*/, TAny* aUserInfo, + HBufC8* aUsername, HBufC8* aSecret, HBufC8* aDomain) { /*--------------------------------------------------------------------------- * @@ -8425,20 +8424,24 @@ * *-------------------------------------------------------------------------*/ TUint32 obj_id = 1; - CAuthDialogInfo* info = (CAuthDialogInfo*)aUserInfo; - DEBUG_LOG1(_L("CIkev1Negotiation::DialogCompleteL(), aUserInfo = %x"), aUserInfo); + CAuthDialogInfo* info = (CAuthDialogInfo*)aUserInfo; + DEBUG_LOG1(_L("CIkev1Negotiation::DialogCompleteL(), aUserInfo = %x"), aUserInfo); - if ( info ) - { + if ( info ) + { obj_id = info->GetObjId(); DEBUG_LOG1(_L("Preparing to call AuthDialogCompletedL(), ObjId = %x"), obj_id); if ( obj_id == DIALOG_INFO_ID ) { - info->SetUserName(aUsername); - info->SetSecret(aSecret); - obj_id = info->PluginSession()->AuthDialogCompletedL(info); + info->iUsername = aUsername; + info->iSecret = aSecret; + info->iDomain = aDomain; + obj_id = info->PluginSession()->AuthDialogCompletedL(info); } - } - - return obj_id; -} + } + + return obj_id; + +} + + diff -r 9f4e37332ce5 -r 473321461bba vpnengine/ikev1lib/src/ikev1pluginsession.cpp --- a/vpnengine/ikev1lib/src/ikev1pluginsession.cpp Thu Aug 19 10:54:34 2010 +0300 +++ b/vpnengine/ikev1lib/src/ikev1pluginsession.cpp Tue Aug 31 16:14:16 2010 +0300 @@ -1536,7 +1536,7 @@ aDestAddr, aLocalPort, aDscp ); - iSendQueue.AppendL( item ); + iSendQueue.Append( item ); } } diff -r 9f4e37332ce5 -r 473321461bba vpnengine/ikev1lib/src/ikev1trans.cpp --- a/vpnengine/ikev1lib/src/ikev1trans.cpp Thu Aug 19 10:54:34 2010 +0300 +++ b/vpnengine/ikev1lib/src/ikev1trans.cpp Tue Aug 31 16:14:16 2010 +0300 @@ -36,17 +36,11 @@ #include "ikev1crack.h" #include "ikev1isakmpstream.h" #include "ikev1crypto.h" -#include "credentialcache.h" - const TUint8 XAUTH_VID_DATA[8] = {0x09, 0x00, 0x26, 0x89, 0xdf, 0xd6, 0xb7, 0x12}; const TUint8 CISCO_UNITY_VID_DATA[16] = {0x12, 0xf5, 0xf2, 0x8c, 0x45, 0x71, 0x68, 0xa9, 0x70, 0x2d, 0x9f, 0xe2, 0x74, 0xcc, 0x01, 0x00}; -const TInt KCredentialTypeUnknown = 0; -const TInt KCredentialTypeNew = 1; -const TInt KCredentialTypeCached = 2; - CTransNegotiation::CTransNegotiation( TInt aGranularity, TBool aUseXauth, @@ -99,9 +93,8 @@ delete iInternalAddr; delete iDialog; delete iDialogInfo; - delete iUserName; - delete iCache; - + delete iUserName; + for ( TInt i = 0; i < Count(); i++ ) { delete At(i); @@ -121,7 +114,8 @@ { User::Leave(KErrArgument); } - + + DEBUG_LOG(_L("Transaction exchange object constructed")); if ( !iUseXauth ) { iXauthCompleted = ETrue; @@ -132,14 +126,7 @@ if ( !iUseCfgMode ) iCfgModeCompleted = ETrue; DEBUG_LOG(_L("Starting to Wait XAUTH request")); - } - - if( EFalse != iPluginSession->IkeData().iUseCache ) - { - iCache = CCredentialCache::NewL( iDebug ); - } - - DEBUG_LOG(_L("Transaction exchange object constructed")); + } } /**------------------------------------------------------------------- @@ -296,12 +283,7 @@ iUserName = HBufC8::New(aDialogInfo->iUsername->Length() + 16); // 16 bytes space for padding if ( iUserName ) { iUserName->Des().Copy(aDialogInfo->iUsername->Des()); - } - - if( iCache && KCredentialTypeNew == iCredentialType ) - { - iCache->SetUserName( *aDialogInfo->iUsername ); - } + } } if ( aDialogInfo->iSecret ) { @@ -326,12 +308,9 @@ break; default: - if( iCache && KCredentialTypeNew == iCredentialType ) - { - iCache->SetSecret( *aDialogInfo->iSecret ); - } break; - } + + } AddAttributeData(attr_ptr, AttrType, aDialogInfo->iSecret->Length(), (TUint8*)aDialogInfo->iSecret->Ptr()); } @@ -696,7 +675,6 @@ TInt CTransNegotiation::ProcessXauthRequestL(TDataISAKMP* aAttr, TInt aLth) { TInt status = TRANSACTION_CONTINUE; - TUint16 xauth_type = ATTR_XAUTH_GENERIC; TUint32 request_flags = 0; TPtr8 challenge(NULL, 0); TUint16 attr_type; @@ -821,7 +799,9 @@ // // User name/Password authentication required // - GetCredentialsL(); + iDialog = CIkev1Dialog::NewL(iPluginSession, iPluginSession->DialogAnchor(), iDebug); + iDialogInfo = new(ELeave) CAuthDialogInfo(iPluginSession, XAUTH_DIALOG_ID, iNegotiation->SAId(), iCurrExchange->iMessageId); + iDialog->GetAsyncUNPWDialogL(iDialogInfo, (MIkeDialogComplete*)this); break; case ( (1 << (ATTR_USER_NAME - ATTR_XAUTH_TYPE)) | (1 << (ATTR_PASSCODE - ATTR_XAUTH_TYPE))): @@ -842,24 +822,13 @@ iDialog->GetAsyncSecureNextPinDialogL(iDialogInfo, (MIkeDialogComplete*)this); break; - case ( (1 << (ATTR_CHALLENGE - ATTR_XAUTH_TYPE)) ): - // - // User Challenge response dialog - // - if ( xauth_type == ATTR_XAUTH_RADIUS_CHAP ) - { - iDialog = CIkev1Dialog::NewL(iPluginSession, iPluginSession->DialogAnchor(), iDebug); - iDialogInfo = new(ELeave) CAuthDialogInfo(iPluginSession, XAUTH_DIALOG_ID, iNegotiation->SAId(), iCurrExchange->iMessageId); - iDialog->GetAsyncRespDialog(challenge, iDialogInfo, (MIkeDialogComplete*)this); - } - break; - default: break; } return status; + } /**------------------------------------------------------------------- @@ -874,13 +843,12 @@ TBuf8<16> attributes; TInt status = TRANSACTION_CONTINUE; TInt16 attr_status; - + while ( aLth > 0 ) { aLth = aLth - aAttr->Size(); if ( aLth < 0 ) { DEBUG_LOG(_L("XAUTH SET ERROR (Length mismatch in the attibutes)")); - iCredentialType = KCredentialTypeUnknown; return TRANSACTION_FAILED; } @@ -920,19 +888,14 @@ if ( status == TRANSACTION_SUCCESS ) { DEBUG_LOG(_L("XAUTH authentication succeeded!")); iXauthCompleted = ETrue; - - if( iCache && KCredentialTypeNew == iCredentialType ) - { - iCache->Store( iPluginSession->VpnIapId() ); - } - if ( iUserName ) { + // // Cache user name into user name file + // CIkev1Dialog* Dialog = CIkev1Dialog::NewL(iPluginSession, iPluginSession->DialogAnchor(), iDebug); CleanupStack::PushL(Dialog); TInt err(KErrNone); TRAP(err, Dialog->StoreUserNameL(iUserName->Des())); - #ifdef _DEBUG if (err == KErrNone) DEBUG_LOG(_L("User Name caching succeeded")); @@ -942,16 +905,13 @@ } } else { - if( iCache ) - { - iCache->Clear(); - } DEBUG_LOG(_L("XAUTH authentication failed!")); + // Dialog object shall be delete in Dialog->RunL when dialog completed + CIkev1Dialog* Dialog = CIkev1Dialog::NewL(iPluginSession, iPluginSession->DialogAnchor(), iDebug); + Dialog->ShowErrorDialogL(TVpnNoteDialog::EKmdAuthenticationFailed, NULL, NULL); } } - - iCredentialType = KCredentialTypeUnknown; - + return status; } @@ -1007,6 +967,7 @@ *--------------------------------------------------------------------*/ TInt CTransNegotiation::BuildConfigRequestL() { + TBuf8<16> attributes; TUint32 message_id = iNegotiation->RandomMessageId(); @@ -1024,6 +985,8 @@ DEBUG_LOG(_L("CONFIG-MODE started, request xmitted!")); return TRANSACTION_CONTINUE; + + } /**------------------------------------------------------------------- @@ -1138,8 +1101,8 @@ // // The implementation for class MIkeDialogComplete virtual function // -TInt CTransNegotiation::DialogCompleteL( - TAny* aUserInfo, HBufC8* aUsername, HBufC8* aSecret) +TInt CTransNegotiation::DialogCompleteL(CIkev1Dialog* /*aDialog*/, TAny* aUserInfo, + HBufC8* aUsername, HBufC8* aSecret, HBufC8* aDomain) { /*--------------------------------------------------------------------------- * @@ -1153,7 +1116,7 @@ *-------------------------------------------------------------------------*/ TUint32 obj_id = 1; CAuthDialogInfo* info = (CAuthDialogInfo*)aUserInfo; - DEBUG_LOG1(_L("CTransNegotiation::DialogCompleteL(), aUserInfo=%x"), aUserInfo); + DEBUG_LOG1(_L("CIKECRACKNegotiation::DialogCompleteL(), aUserInfo = %x"), aUserInfo); if ( info ) { @@ -1161,56 +1124,12 @@ DEBUG_LOG1(_L("Preparing to call AuthDialogCompletedL(), ObjId = %x"), obj_id); if ( obj_id == XAUTH_DIALOG_ID ) { - info->SetUserName( aUsername ); - info->SetSecret( aSecret ); + info->iUsername = aUsername; + info->iSecret = aSecret; + info->iDomain = aDomain; obj_id = info->PluginSession()->AuthDialogCompletedL(info); - } + } } return obj_id; } - - -void CTransNegotiation::GetCredentialsL() -{ - DEBUG_LOG( _L( "CTransNegotiation::GetCredentialsL" ) ); - - TInt ret = KErrNotFound; - - delete iDialogInfo; iDialogInfo = NULL; - - iDialogInfo = new (ELeave) CAuthDialogInfo( - iPluginSession, - XAUTH_DIALOG_ID, - iNegotiation->SAId(), - iCurrExchange->iMessageId ); - - if( iCache && KCredentialTypeUnknown == iCredentialType ) - { - ret = iCache->GetCredentials( - iPluginSession->VpnIapId(), - iDialogInfo->iUsername, - iDialogInfo->iSecret - ); - } - - if( KErrNone == ret ) - { - iCredentialType = KCredentialTypeCached; - TUint32 id = iPluginSession->AuthDialogCompletedL( iDialogInfo ); - } - else - { - iCredentialType = KCredentialTypeNew; - - delete iDialog; iDialog = NULL; - - iDialog = CIkev1Dialog::NewL( - iPluginSession, iPluginSession->DialogAnchor(), iDebug ); - - iDialog->GetAsyncUNPWDialogL( iDialogInfo, (MIkeDialogComplete*)this ); - } -} - - -/***/ diff -r 9f4e37332ce5 -r 473321461bba vpnengine/ikev2lib/src/ikev2negotiation.cpp --- a/vpnengine/ikev2lib/src/ikev2negotiation.cpp Thu Aug 19 10:54:34 2010 +0300 +++ b/vpnengine/ikev2lib/src/ikev2negotiation.cpp Tue Aug 31 16:14:16 2010 +0300 @@ -1,5 +1,5 @@ /* -* Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +* Copyright (c) 2005-2010 Nokia Corporation and/or its subsidiary(-ies). * All rights reserved. * This component and the accompanying materials are made available * under the terms of "Eclipse Public License v1.0" @@ -1532,7 +1532,7 @@ void CIkev2Negotiation::IkeV2PkiInitCompleteL(TInt aStatus) { - DEBUG_LOG(_L("-> CIkev2Negotiation::IkeV2PkiInitCompleteL")); + DEBUG_LOG(_L("CIkev2Negotiation::IkeV2PkiInitCompleteL")); // // The implementation for class MPkiServiceComplete virtual function // This method is called when a PKI service operation is @@ -1578,7 +1578,6 @@ break; } - DEBUG_LOG(_L("<- CIkev2Negotiation::IkeV2PkiInitCompleteL")); } diff -r 9f4e37332ce5 -r 473321461bba vpnengine/pkiservice/inc/mapdescriptor.h --- a/vpnengine/pkiservice/inc/mapdescriptor.h Thu Aug 19 10:54:34 2010 +0300 +++ b/vpnengine/pkiservice/inc/mapdescriptor.h Tue Aug 31 16:14:16 2010 +0300 @@ -1,5 +1,5 @@ /* -* Copyright (c) 2006-2010 Nokia Corporation and/or its subsidiary(-ies). +* Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies). * All rights reserved. * This component and the accompanying materials are made available * under the terms of "Eclipse Public License v1.0" @@ -59,7 +59,7 @@ TBool IsEqual(CMapDescriptor &aDesc); void SetMapDeletable(TBool aDeletable); void SetMapTrusted(const TBool &aTrusted); - void SetMapApplicationsL(const RArray &aApplications); + void SetMapApplications(const RArray &aApplications); TPtrC Label() const; const TPKIKeyIdentifier& CertificateKeyId() const; diff -r 9f4e37332ce5 -r 473321461bba vpnengine/pkiservice/inc/pkisupport.h --- a/vpnengine/pkiservice/inc/pkisupport.h Thu Aug 19 10:54:34 2010 +0300 +++ b/vpnengine/pkiservice/inc/pkisupport.h Tue Aug 31 16:14:16 2010 +0300 @@ -157,8 +157,8 @@ void DoRunOperationL(); void DoRunLoggedInOperationL(); - // Function to remove all "Java Trust Root" certificates from the - // local listing ("Java Trust Root" certs shouldn't be supported by VPN) + // Function to remove all MIDP2 certificates from the + // local listing (MIDP2 certs shouldn't be supported by VPN) void CleanupCertListL(); // CActive methods diff -r 9f4e37332ce5 -r 473321461bba vpnengine/pkiservice/inc/pkiwrapper.h --- a/vpnengine/pkiservice/inc/pkiwrapper.h Thu Aug 19 10:54:34 2010 +0300 +++ b/vpnengine/pkiservice/inc/pkiwrapper.h Tue Aug 31 16:14:16 2010 +0300 @@ -1,5 +1,5 @@ /* -* Copyright (c) 2003-2010 Nokia Corporation and/or its subsidiary(-ies). +* Copyright (c) 2003-2008 Nokia Corporation and/or its subsidiary(-ies). * All rights reserved. * This component and the accompanying materials are made available * under the terms of "Eclipse Public License v1.0" @@ -47,7 +47,7 @@ void InitializeL(const RMessage2& aMessage); void SetTrusted(TBool aValue); - void SetApplicationsL(const RArray& aApplUids); + void SetApplications(const RArray& aApplUids); void SetCertStoreType(TPkiServiceStoreType aStoreType); diff -r 9f4e37332ce5 -r 473321461bba vpnengine/pkiservice/src/mapdescriptor.cpp --- a/vpnengine/pkiservice/src/mapdescriptor.cpp Thu Aug 19 10:54:34 2010 +0300 +++ b/vpnengine/pkiservice/src/mapdescriptor.cpp Tue Aug 31 16:14:16 2010 +0300 @@ -1,5 +1,5 @@ /* -* Copyright (c) 2006-2010 Nokia Corporation and/or its subsidiary(-ies). +* Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies). * All rights reserved. * This component and the accompanying materials are made available * under the terms of "Eclipse Public License v1.0" @@ -410,12 +410,12 @@ iIsDeletable = aDeletable; } -void CMapDescriptor::SetMapApplicationsL(const RArray &aApplications) +void CMapDescriptor::SetMapApplications(const RArray &aApplications) { iApplUids.Close(); for(TInt i=0; iIsMatchingL(aDescriptor, aInfoOnly, aStoreType)) { // If we found a match, process it further - _LIT(KJavaTrustRootLabel, "Java Trust Root"); - // Discard all "Java Trust Root" certificates to avoid label-mapping problem - if (mapping->Label().Compare(KJavaTrustRootLabel) != 0) + _LIT(KMidp2Label, "MIDP2"); + TBuf<12> buf; + buf.Append(KMidp2Label); + // Discard all MIDP2 certificates to avoid label-mapping problem + if (buf.Compare(mapping->Label()) != 0) { if(mapping->EndTime() > furthestEndTime) { @@ -459,7 +461,7 @@ } else { - LOG(Log::Printf(_L("Found a cert, but it was a \"Java Trust Root\" one - continuing search"))); + LOG(Log::Printf(_L("Found a cert, but it was a MIDP2 one - continuing search"))); } } } diff -r 9f4e37332ce5 -r 473321461bba vpnengine/pkiservice/src/pkisession.cpp --- a/vpnengine/pkiservice/src/pkisession.cpp Thu Aug 19 10:54:34 2010 +0300 +++ b/vpnengine/pkiservice/src/pkisession.cpp Tue Aug 31 16:14:16 2010 +0300 @@ -1,5 +1,5 @@ /* -* Copyright (c) 2006-2010 Nokia Corporation and/or its subsidiary(-ies). +* Copyright (c) 2006-2008 Nokia Corporation and/or its subsidiary(-ies). * All rights reserved. * This component and the accompanying materials are made available * under the terms of "Eclipse Public License v1.0" @@ -135,7 +135,7 @@ for (TInt i = 0; i < aC; i++) { list->Read(i * sizeof(TUid), (TAny*)&tempUid, sizeof(TUid)); - iUidArray.AppendL(tempUid); + iUidArray.Append(tempUid); } } CleanupStack::PopAndDestroy(1); // list diff -r 9f4e37332ce5 -r 473321461bba vpnengine/pkiservice/src/pkisupport.cpp --- a/vpnengine/pkiservice/src/pkisupport.cpp Thu Aug 19 10:54:34 2010 +0300 +++ b/vpnengine/pkiservice/src/pkisupport.cpp Tue Aug 31 16:14:16 2010 +0300 @@ -1,5 +1,5 @@ /* -* Copyright (c) 2003-2010 Nokia Corporation and/or its subsidiary(-ies). +* Copyright (c) 2003-2008 Nokia Corporation and/or its subsidiary(-ies). * All rights reserved. * This component and the accompanying materials are made available * under the terms of "Eclipse Public License v1.0" @@ -263,7 +263,7 @@ CleanupStack::PushL(newMapping); newMapping->SetMapDeletable(currentCertInfo->IsDeletable()); - newMapping->SetMapApplicationsL(iApplUids); + newMapping->SetMapApplications(iApplUids); iApplUids.Reset(); User::LeaveIfError(iMapper.AddMapping(newMapping)); @@ -433,7 +433,7 @@ if((iSupportStatus == KErrNotSupported) && iToggleSwitch && (iInitState == EInitCompleteImportCerts)) { - // Some implementations of "Java Trust Root" certstore return KErrNotSupported + // Some implementations of MIDP2 certstore return KErrNotSupported // when calling iCertStore->Applications() LOG_1("CPKISupport::RunL ignore error :%d", iSupportStatus); iSupportStatus = KErrNone; @@ -767,25 +767,25 @@ /** Removes all unnecessary certificates from the certificate list before generating the local mapping data. - More specifically, all "Java Trust Root" and non X509 certificates are removed. - ("Java Trust Root" certificates can never have a "VPN" trust setting.) + More specifically, all MIDP2 and non X509 certificates are removed. + (MIDP2 certificates can never have a "VPN" trust setting.) iListCleaned instance variable is used to limit the frequency of this cleanup - it's only necessary once, during PKI startup. */ void CPKISupport::CleanupCertListL() { - LOG_("Removing invalid certs (\"Java Trust Root\" certs)"); + LOG_("Removing invalid certs (MIDP2 certs)"); TInt certcount = iCerts.Count(); - _LIT(KJavaTrustRootLabel, "Java Trust Root"); + _LIT(KMidp2Label, "MIDP2"); LOG_1("Total cert count, before cleanup: %d", iCerts.Count()); RMPointerArray removedInfos; CleanupClosePushL(removedInfos); for (TInt i = certcount - 1; i >= 0; i--) { CCTCertInfo* info = iCerts[i]; - if (info->Label().Compare(KJavaTrustRootLabel) == 0 || + if (info->Label().Compare(KMidp2Label) == 0 || info->CertificateFormat() != EX509Certificate) { // CCTCertInfo has private destructor @@ -833,7 +833,7 @@ break; case EInitRetrieveCertList: LOG_("CPKISupport::DoRunOperationL() EInitRetrieveCertList"); - // Cert list might be new. Remove all "Java Trust Root" certificates first, + // Cert list might be new. Remove all MIDP2 certificates first, // if it hasn't been already done CleanupCertListL(); iInitState = EInitCompleteImportCerts; @@ -1019,7 +1019,7 @@ case ESSComplete: if(iCurrentFunction == PkiService::EApplications) { - iWrapper.SetApplicationsL(iApplUids); + iWrapper.SetApplications(iApplUids); } iSubState = ESSCompleteRequest; @@ -1162,7 +1162,7 @@ iApplUids.Close(); for(TInt i = 0;i& aApplUids) +void CPKIWrapper::SetApplications(const RArray& aApplUids) { iUidArray.Close(); for(TInt i=0;iRead(i * sizeof(TUid), (TAny*)&tempUid, sizeof(TUid)); - iUidArray.AppendL(tempUid); + iUidArray.Append(tempUid); } } CleanupStack::PopAndDestroy(1); // list @@ -592,7 +592,7 @@ case PkiService::ESetApplicability: if (iCurrentStatus == KErrNone) { - iMapper.GetMapDescriptorAtIndex(iIndex).SetMapApplicationsL(iUidArray); + iMapper.GetMapDescriptorAtIndex(iIndex).SetMapApplications(iUidArray); } break; diff -r 9f4e37332ce5 -r 473321461bba vpnengine/pkiserviceapi/src/pkiserviceapi.cpp --- a/vpnengine/pkiserviceapi/src/pkiserviceapi.cpp Thu Aug 19 10:54:34 2010 +0300 +++ b/vpnengine/pkiserviceapi/src/pkiserviceapi.cpp Tue Aug 31 16:14:16 2010 +0300 @@ -1,5 +1,5 @@ /* -* Copyright (c) 2003-2010 Nokia Corporation and/or its subsidiary(-ies). +* Copyright (c) 2003-2006 Nokia Corporation and/or its subsidiary(-ies). * All rights reserved. * This component and the accompanying materials are made available * under the terms of "Eclipse Public License v1.0" @@ -1041,7 +1041,7 @@ for (TInt i = 0; i < count; i++) { applList->Read(i * sizeof(TUid), (TAny*)&temp, sizeof(TUid)); - aApplications.AppendL(temp); + aApplications.Append(temp); } CleanupStack::PopAndDestroy(1); // applList CleanupStack::PopAndDestroy(); //certDesc diff -r 9f4e37332ce5 -r 473321461bba vpnengine/sit/EABI/eventmedsitU.DEF --- a/vpnengine/sit/EABI/eventmedsitU.DEF Thu Aug 19 10:54:34 2010 +0300 +++ b/vpnengine/sit/EABI/eventmedsitU.DEF Tue Aug 31 16:14:16 2010 +0300 @@ -12,6 +12,4 @@ _ZN4CSitD2Ev @ 11 NONAME _ZTI4CSit @ 12 NONAME ; ## _ZTV4CSit @ 13 NONAME ; ## - _ZTI9CExtender @ 14 NONAME - _ZTV9CExtender @ 15 NONAME diff -r 9f4e37332ce5 -r 473321461bba vpnengine/sit/bwins/EVENTMEDSITU.DEF --- a/vpnengine/sit/bwins/EVENTMEDSITU.DEF Thu Aug 19 10:54:34 2010 +0300 +++ b/vpnengine/sit/bwins/EVENTMEDSITU.DEF Tue Aug 31 16:14:16 2010 +0300 @@ -1,10 +1,10 @@ EXPORTS - ??0CSit@@QAE@PAVMSitDeathListener@@@Z @ 1 NONAME ; CSit::CSit(class MSitDeathListener *) - ??1CSit@@UAE@XZ @ 2 NONAME ; CSit::~CSit(void) - ?EventRequiresSit@CSit@@SAHW4TEventType@@@Z @ 3 NONAME ; int CSit::EventRequiresSit(enum TEventType) - ?FindCancelEventType@CSit@@SA?AW4TEventType@@W42@@Z @ 4 NONAME ; enum TEventType CSit::FindCancelEventType(enum TEventType) - ?FindTaskRequestEventType@CSit@@SA?AW4TEventType@@W42@@Z @ 5 NONAME ; enum TEventType CSit::FindTaskRequestEventType(enum TEventType) - ?IsTaskCancellationObservationRequest@CSit@@SAHW4TEventType@@@Z @ 6 NONAME ; int CSit::IsTaskCancellationObservationRequest(enum TEventType) - ?StartL@CSit@@QAEXXZ @ 7 NONAME ; void CSit::StartL(void) - ?ThreadId@CSit@@QAE?AVTThreadId@@XZ @ 8 NONAME ; class TThreadId CSit::ThreadId(void) + ??0CSit@@QAE@PAVMSitDeathListener@@@Z @ 1 NONAME ; public: __thiscall CSit::CSit(class MSitDeathListener *) + ??1CSit@@UAE@XZ @ 2 NONAME ; public: virtual __thiscall CSit::~CSit(void) + ?EventRequiresSit@CSit@@SAHW4TEventType@@@Z @ 3 NONAME ; public: static int __cdecl CSit::EventRequiresSit(enum TEventType) + ?FindCancelEventType@CSit@@SA?AW4TEventType@@W42@@Z @ 4 NONAME ; public: static enum TEventType __cdecl CSit::FindCancelEventType(enum TEventType) + ?FindTaskRequestEventType@CSit@@SA?AW4TEventType@@W42@@Z @ 5 NONAME ; public: static enum TEventType __cdecl CSit::FindTaskRequestEventType(enum TEventType) + ?IsTaskCancellationObservationRequest@CSit@@SAHW4TEventType@@@Z @ 6 NONAME ; public: static int __cdecl CSit::IsTaskCancellationObservationRequest(enum TEventType) + ?StartL@CSit@@QAEXXZ @ 7 NONAME ; public: void __thiscall CSit::StartL(void) + ?ThreadId@CSit@@QAE?AVTThreadId@@XZ @ 8 NONAME ; public: class TThreadId __thiscall CSit::ThreadId(void) diff -r 9f4e37332ce5 -r 473321461bba vpnengine/sit/group/sit.mmp --- a/vpnengine/sit/group/sit.mmp Thu Aug 19 10:54:34 2010 +0300 +++ b/vpnengine/sit/group/sit.mmp Tue Aug 31 16:14:16 2010 +0300 @@ -35,8 +35,6 @@ SOURCE realiapconnobserver.cpp SOURCE vpnconncloser.cpp SOURCE eventlogger.cpp -SOURCE extender.cpp -SOURCE extenderhelper.cpp USERINCLUDE ../inc USERINCLUDE ../../../vpnapiimpl/inc @@ -47,7 +45,6 @@ USERINCLUDE ../../vpnmanager/inc USERINCLUDE ../../vpncommon/inc USERINCLUDE ../../eventviewer/inc -USERINCLUDE ../../vpnextapi/inc USERINCLUDE ../../pkiserviceapi/inc USERINCLUDE ../../../vpnui/vpnecomnotifier/inc @@ -66,6 +63,5 @@ LIBRARY eventviewer.lib LIBRARY featmgr.lib LIBRARY cmmanager.lib -LIBRARY vpnextapi.lib DEBUGLIBRARY flogger.lib diff -r 9f4e37332ce5 -r 473321461bba vpnengine/sit/inc/eventlogger.h --- a/vpnengine/sit/inc/eventlogger.h Thu Aug 19 10:54:34 2010 +0300 +++ b/vpnengine/sit/inc/eventlogger.h Tue Aug 31 16:14:16 2010 +0300 @@ -38,7 +38,6 @@ const TInt R_VPN_MSG_VPN_IAP_ACT_END = KMaxTInt - 1; const TInt R_VPN_MSG_VPN_IAP_ACT_CANCEL = KMaxTInt - 2; -class CExtender; NONSHARABLE_CLASS(CEventLogger) : CBase { @@ -59,7 +58,6 @@ REventMediator& iEventMediator; TUint32 iVpnIapId; TUint32 iRealIapId; - CExtender* iExtender; }; #define DEFINE_EVENT_LOGGER CEventLogger* iEventLogger; diff -r 9f4e37332ce5 -r 473321461bba vpnengine/sit/inc/extender.h --- a/vpnengine/sit/inc/extender.h Thu Aug 19 10:54:34 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,121 +0,0 @@ -/* -* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Extended functinality for policy provision process. -* -*/ - -#ifndef EXTENDER_H_ -#define EXTENDER_H_ - -#include -#include "vpnextapi.h" -#include "vpnnotifierdefs.h" - - -const TInt KStateCheckPolicyUpdateAvailability = 1; -const TInt KStateAfterCheckPolicyUpdateAvailability = 2; -const TInt KStateAskUpdateConfirmation = 3; -const TInt KStateAfterAskUpdateConfirmation = 4; -const TInt KStateUpdatePolicy = 5; -const TInt KStateAfterUpdatePolicy = 6; -const TInt KStateShowUpdateCompleteNote = 8; -const TInt KStateAfterShowUpdateCompleteNote = 9; -const TInt KStateShowApActFailureNote = 10; -const TInt KStateAfterShowApActFailureNote = 11; -const TInt KStateBeforeEnrollCertificates = 12; - - -static const TUid KDmMsrNotificationUid = {0x1020699E}; - -class CVpnConnStarter; -class CExtenderHelper; - -class CExtender : public CActive - { -public: - static CExtender* NewL(); - ~CExtender(); - -public: - void OnVpnApActStart(CVpnConnStarter* aVpnConnStarter); - void OnVpnApActCancel(); - - void OnVpnApActEnd(const TVpnPolicyId* aPolicyId, TInt aStatus, TUint32 aRealIapId); - -private: - CExtender(); - void ConstructL(); - -private: - void GotoState(TInt aState); - void SetCurrState(TInt aState); - void SetNextState(TInt aState); - TInt CurrState(); - TInt NextState(); - - void ChangeStateL(); - void CancelOngoingOperation(); - - void StateShowApActFailureNote(); - void StateAfterShowApActFailureNote(); - void StateCheckPolicyUpdateAvailabilityL(); - void StateAfterCheckPolicyUpdateAvailability(); - void StateAskUpdateConfirmation(); - void StateAfterAskUpdateConfirmationL(); - void StateUpdatePolicyL(); - - void StateAfterUpdatePolicyL(); - - void StateShowUpdateCompleteNote(); - void StateAfterShowUpdateCompleteNote(); - - - void ProcessComplete(TInt aStatus); - void EndTask(); - - TCmSettingSelection GetPolicyServerSelectionL(); - void ReportFailure(TUint32 aVpnIapId); - -private: // From CActive - void DoCancel(); - void RunL(); - TInt RunError(TInt aError); - -private: - CVpnConnStarter* iVpnConnStarter; - TVpnPolicyId iPolicyId; - TUint32 iRealIapId; - - TBool iPolicyUpdateAvailable; - TInt iStateAfterUpdateConfirmation; - - RVpnExtApi iVpnExtServ; - RNotifier iNotifier; - - TInt iCurrState; - TInt iNextState; - - TInt iVpnActStatus; - TInt iFinalStatus; - - CExtenderHelper* iExtenderHelper; - - TBool iShowCompletionNote; - - TPckgBuf iDialogInfoDes; - TPckgBuf iDialogResponseDes; - }; - - -#endif // __EXTENDER__ diff -r 9f4e37332ce5 -r 473321461bba vpnengine/sit/inc/extenderhelper.h --- a/vpnengine/sit/inc/extenderhelper.h Thu Aug 19 10:54:34 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,55 +0,0 @@ -/* -* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Helper class for extended functionality for policy provision process. -* -*/ - -#ifndef EXTENDERHELPER_H_ -#define EXTENDERHELPER_H_ - - -#include - -#include "vpnnotifierdefs.h" - -class CExtender; - -NONSHARABLE_CLASS(CExtenderHelper) : public CActive - { -public: - static CExtenderHelper* NewL(); - ~CExtenderHelper(); - -private: - CExtenderHelper(); - void ConstructL(); - -private: // From CActive - void DoCancel(); - void RunL(); - - -public: - void StartNotifierL(CExtender* aExtender); - -private: - RNotifier iNotifier; - - CExtender* iExtender; - - TPckgBuf iDialogInfoDes; - TPckgBuf iDialogResponseDes; - - }; -#endif // __EXTENDERHELPER__ diff -r 9f4e37332ce5 -r 473321461bba vpnengine/sit/src/eventlogger.cpp --- a/vpnengine/sit/src/eventlogger.cpp Thu Aug 19 10:54:34 2010 +0300 +++ b/vpnengine/sit/src/eventlogger.cpp Tue Aug 31 16:14:16 2010 +0300 @@ -22,7 +22,6 @@ #include "log.h" #include "eventmediatorapi.h" #include "vpnconnstarter.h" -#include "extender.h" /** @@ -48,8 +47,6 @@ { // Set default access point names just // in case the real name fetching fails - iExtender=CExtender::NewL(); - iVpnApName.Copy(KUnknownVpnAp); iRealApName.Copy(KUnknownIap); @@ -59,7 +56,6 @@ CEventLogger::~CEventLogger() { LOG(Log::Printf(_L("CEventLogger::~CEventLogger\n"))); - delete iExtender; } void CEventLogger::LogEvent(TUint aMsgId, TAny* aAnyPtr, TInt aStatusCode, TInt aReasonCode) @@ -145,15 +141,13 @@ break; case R_VPN_MSG_VPN_IAP_ACT_START: - iExtender->OnVpnApActStart(static_cast(aAnyPtr)); + // NSSM removal break; case R_VPN_MSG_VPN_IAP_ACT_CANCEL: - iExtender->OnVpnApActCancel(); break; case R_VPN_MSG_VPN_IAP_ACT_END: - iExtender->OnVpnApActEnd(static_cast(aAnyPtr), aStatusCode, iRealIapId); break; default: diff -r 9f4e37332ce5 -r 473321461bba vpnengine/sit/src/extender.cpp --- a/vpnengine/sit/src/extender.cpp Thu Aug 19 10:54:34 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,413 +0,0 @@ -/* -* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Extended functinality for policy provision process. -* -*/ -#include -#include -#include -#include -#include - -#include "sit.h" -#include "extender.h" -#include "log.h" -#include "vpnconnstarter.h" -#include "extenderhelper.h" - - -CExtender* CExtender::NewL() - { - LOG(Log::Printf(_L("CExtender::NewL - begin\n"))); - CExtender* self = new (ELeave) CExtender(); - CleanupStack::PushL(self); - self->ConstructL(); - CleanupStack::Pop(); // self - LOG(Log::Printf(_L("CExtender::NewL - end\n"))); - return self; - } - -CExtender::~CExtender() - { - LOG(Log::Printf(_L("CExtender::~CExtender\n"))); - Cancel(); - - iVpnExtServ.Close(); - iNotifier.Close(); - delete iExtenderHelper; - } - -CExtender::CExtender() : CActive(EPriorityNormal) - { - - } - -void CExtender::ConstructL() - { - CActiveScheduler::Add(this); - User::LeaveIfError(iVpnExtServ.Connect()); - User::LeaveIfError(iNotifier.Connect()); - } - -void CExtender::DoCancel() - { - CancelOngoingOperation(); - } - -void CExtender::RunL() - { - ChangeStateL(); - } - -void CExtender::GotoState(TInt aState) - { - SetNextState(aState); - SetActive(); - TRequestStatus* status = &iStatus; - User::RequestComplete(status, KErrNone); - } - -void CExtender::SetCurrState(TInt aState) - { - iCurrState = aState; - } - -void CExtender::SetNextState(TInt aState) - { - iNextState = aState; - } - -TInt CExtender::CurrState() - { - return iCurrState; - } - -TInt CExtender::NextState() - { - return iNextState; - } - -TInt CExtender::RunError(TInt aError) - { - LOG(Log::Printf(_L("CExtender::RunError - error = %d\n"), aError)); - ProcessComplete(aError); - return KErrNone; - } - -void CExtender::ChangeStateL() - { - switch (NextState()) - { - case KStateCheckPolicyUpdateAvailability: - StateCheckPolicyUpdateAvailabilityL(); - break; - - case KStateAfterAskUpdateConfirmation: - StateAfterAskUpdateConfirmationL(); - break; - - case KStateUpdatePolicy: - StateUpdatePolicyL(); - break; - - case KStateAfterUpdatePolicy: - StateAfterUpdatePolicyL(); - break; - - case KStateShowUpdateCompleteNote: - StateShowUpdateCompleteNote(); - break; - - case KStateAfterShowUpdateCompleteNote: - StateAfterShowUpdateCompleteNote(); - break; - - case KStateShowApActFailureNote: - StateShowApActFailureNote(); - break; - - case KStateAfterShowApActFailureNote: - StateAfterShowApActFailureNote(); - break; - - default: - User::Panic(KSitName, EPanicInvalidTaskHandlerState); - } - } - -void CExtender::CancelOngoingOperation() - { - switch (CurrState()) - { - case KStateShowApActFailureNote: - case KStateAskUpdateConfirmation: - case KStateShowUpdateCompleteNote: - LOG(Log::Printf(_L("CExtender::CancelOngoingOperation - cancelling notifier\n"))); - iNotifier.CancelNotifier(KUidVpnDialogNotifier); - break; - - case KStateCheckPolicyUpdateAvailability: - case KStateUpdatePolicy: - case KStateAfterUpdatePolicy: - LOG(Log::Printf(_L("CExtender::CancelOngoingOperation - cancelling Policy Provision operation\n"))); - iVpnExtServ.CancelPolicyProvision(); - iExtenderHelper->Cancel(); - break; - - case KStateAfterShowApActFailureNote: - case KStateAfterAskUpdateConfirmation: - case KStateAfterCheckPolicyUpdateAvailability: - case KStateAfterShowUpdateCompleteNote: - LOG(Log::Printf(_L("CExtender::CancelOngoingOperation - cancelling nothing\n"))); - // Nothing to cancel - break; - - default: - User::Panic(KSitName, EPanicInvalidTaskHandlerState); - } - } - -void CExtender::OnVpnApActStart(CVpnConnStarter* aVpnConnStarter) - { - LOG(Log::Printf(_L("CExtender::OnVpnApActStart\n"))); - iVpnConnStarter = aVpnConnStarter; - - // Prevent the deletion of the iVpnConnStarter task - // handler (that owns us) as long as we are running - iVpnConnStarter->SetDelayedTaskEnd(ETrue); - } - -void CExtender::OnVpnApActCancel() - { - LOG(Log::Printf(_L("CExtender::OnVpnApActCancel\n"))); - - // Allow the deletion of the iVpnConnStarter task handler - // (the activation has been cancelled in which case - // automatic policy updating process will not be - // performed and thus the task handler can be deleted - // right away after cancel) - iVpnConnStarter->SetDelayedTaskEnd(EFalse); - } - -void CExtender::OnVpnApActEnd(const TVpnPolicyId* aPolicyId, TInt aStatus, TUint32 aRealIapId) - { - LOG(Log::Printf(_L("CExtender::OnVpnApActEnd\n"))); - iPolicyId.Copy(*aPolicyId); - iRealIapId = aRealIapId; - - iVpnActStatus = aStatus; - - if (iVpnActStatus != KErrNone && iVpnActStatus != KErrCancel) - { - // Report the failure to the system - // (management session runner if such is present) - // First show a VPN connection activation failure note - GotoState(KStateShowApActFailureNote); - } - else if (iVpnActStatus == KErrCancel) - { - // The user has cancelled the VPN connection activation, - // in that case the automatic policy update operation is - // not performed - EndTask(); - } - else - { - // Begin the combined policy update and - // certificate enrollment process right away - //GotoState(KStateCheckPolicyUpdateAvailability); - EndTask(); - } - } - -void CExtender::StateShowApActFailureNote() - { - LOG(Log::Printf(_L("CExtender::StateShowApActFailureNote\n"))); - SetCurrState(KStateShowApActFailureNote); - iStatus = KRequestPending; - SetActive(); - - TRequestStatus* ownStatus = &iStatus; - User::RequestComplete(ownStatus, KErrNone); - - SetNextState(KStateAfterShowApActFailureNote); - } - -void CExtender::StateAfterShowApActFailureNote() - { - LOG(Log::Printf(_L("CExtender::StateAfterShowApActFailureNote\n"))); - SetCurrState(KStateAfterShowApActFailureNote); - - iNotifier.CancelNotifier(KUidVpnDialogNotifier); - - // Begin the combined policy update - // and certificate enrollment process - GotoState(KStateCheckPolicyUpdateAvailability); - } - - -void CExtender::StateCheckPolicyUpdateAvailabilityL() - { - LOG(Log::Printf(_L("CExtender::StateCheckPolicyUpdateAvailabilityL\n"))); - SetCurrState(KStateCheckPolicyUpdateAvailability); - - LOG(Log::Printf(_L(" Doing the policy update.\n"))); - - - TAgileProvisionPolicy vpnPolicyName; - User::LeaveIfError(iVpnExtServ.GetPolicyName(vpnPolicyName)); - - if ( iPolicyId.Compare(vpnPolicyName.iPolicyName) == 0 ) - { - SetCurrState(KStateAskUpdateConfirmation); - - TVpnDialogInfo dialogInfo(TVpnDialog::EPolicyUpdateConfirmation, 0); - iDialogInfoDes() = dialogInfo; - - iNotifier.StartNotifierAndGetResponse(iStatus, KUidVpnDialogNotifier, - iDialogInfoDes, iDialogResponseDes); - - SetActive(); - SetNextState(KStateAfterAskUpdateConfirmation); - } - else - { - EndTask(); - } - } - - -void CExtender::StateAfterAskUpdateConfirmationL() - { - LOG(Log::Printf(_L("CExtender::StateAfterAskUpdateConfirmationL\n"))); - SetCurrState(KStateAfterAskUpdateConfirmation); - - iNotifier.CancelNotifier(KUidVpnDialogNotifier); - - // If the user pressed Cancel or an - // error occurred, we stop here - User::LeaveIfError(iStatus.Int()); - - iShowCompletionNote = ETrue; - GotoState(KStateUpdatePolicy); - } - -void CExtender::StateUpdatePolicyL() - { - LOG(Log::Printf(_L("CExtender::StateUpdatePolicy\n"))); - SetCurrState(KStateUpdatePolicy); - - if ( iExtenderHelper == NULL) - iExtenderHelper=CExtenderHelper::NewL(); - - iExtenderHelper->StartNotifierL(this); - - - iVpnExtServ.SynchronizePolicyServer(iStatus); - - SetActive(); - SetNextState(KStateAfterUpdatePolicy); - } - -void CExtender::StateAfterUpdatePolicyL() - { - LOG(Log::Printf(_L("CExtender::StateAfterUpdatePolicyL\n"))); - - - if (iStatus != KErrNone) - { - User::Leave(iStatus.Int()); - } - - ProcessComplete(KErrNone); - } - -void CExtender::ProcessComplete(TInt aStatus) - { - LOG(Log::Printf(_L("CExtender::ProcessComplete - status = %d\n"), aStatus)); - iFinalStatus = aStatus; - GotoState(KStateShowUpdateCompleteNote); - } - -void CExtender::StateShowUpdateCompleteNote() - { - LOG(Log::Printf(_L("CExtender::StateShowUpdateCompleteNote\n"))); - SetCurrState(KStateShowUpdateCompleteNote); - - if (!iShowCompletionNote || iFinalStatus == KErrCancel) - { - EndTask(); - } - else if ( iFinalStatus == KErrNone ) - { - - TVpnDialogInfo dialogInfo(TNoteDialog::EInfo, TVpnNoteDialog::EPolicyUpdateSucceeded); - iDialogInfoDes() = dialogInfo; - - iNotifier.StartNotifierAndGetResponse(iStatus, KUidVpnDialogNotifier, - iDialogInfoDes, iDialogResponseDes); - - SetActive(); - SetNextState(KStateAfterShowUpdateCompleteNote); - - } - else - { - TVpnDialogInfo dialogInfo(TNoteDialog::EInfo, TVpnNoteDialog::EPolicyUpdateFailed); - iDialogInfoDes() = dialogInfo; - - iNotifier.StartNotifierAndGetResponse(iStatus, KUidVpnDialogNotifier, - iDialogInfoDes, iDialogResponseDes); - - SetActive(); - SetNextState(KStateAfterShowUpdateCompleteNote); - } - - - } - -void CExtender::StateAfterShowUpdateCompleteNote() - { - LOG(Log::Printf(_L("CExtender::StateAfterShowUpdateCompleteNote\n"))); - SetCurrState(KStateAfterShowUpdateCompleteNote); - - iNotifier.CancelNotifier(KUidVpnDialogNotifier); - - EndTask(); - } - -TCmSettingSelection CExtender::GetPolicyServerSelectionL() - { - - // Get policy server details - // from the Policy Provision server configuration - TAgileProvisionApiServerSettings vpnPolicyServerDetails; - User::LeaveIfError(iVpnExtServ.ServerDetails(vpnPolicyServerDetails)); - - - // Return the server selection - return vpnPolicyServerDetails.iSelection; - } - -void CExtender::EndTask() - { - LOG(Log::Printf(_L("CExtender::EndTask\n"))); - // Allow the deletion of the CVpnConStarter task handler - iVpnConnStarter->SetDelayedTaskEnd(EFalse); - - // We're done and the enclosing connection starter - // object is now free to go (causing the deletion - // of this extender object as well) - iVpnConnStarter->TaskDone(); - } diff -r 9f4e37332ce5 -r 473321461bba vpnengine/sit/src/extenderhelper.cpp --- a/vpnengine/sit/src/extenderhelper.cpp Thu Aug 19 10:54:34 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,75 +0,0 @@ -/* -* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Helper class for extended functionality for policy provision process. -* -*/ - - -#include "extenderhelper.h" -#include "extender.h" - - -CExtenderHelper* CExtenderHelper::NewL() - { - CExtenderHelper* self = new (ELeave) CExtenderHelper(); - CleanupStack::PushL(self); - self->ConstructL(); - CleanupStack::Pop(); // self - return self; - } - -CExtenderHelper::~CExtenderHelper() - { - iExtender=NULL; - Cancel(); - iNotifier.Close(); - } - -CExtenderHelper::CExtenderHelper() : CActive(EPriorityNormal) - { - - } - -void CExtenderHelper::ConstructL() - { - CActiveScheduler::Add(this); - User::LeaveIfError(iNotifier.Connect()); - - } - -//From CActive -void CExtenderHelper::DoCancel() - { - iNotifier.CancelNotifier(KUidVpnDialogNotifier); - } - -void CExtenderHelper::RunL() - { - ASSERT(iStatus.Int() == KErrCancel); - iExtender->Cancel(); - - } - - -void CExtenderHelper::StartNotifierL(CExtender* aExtender) - { - iExtender=aExtender; - - TVpnDialogInfo dialogInfo(TVpnDialog::EPolicyInstallInProgress, 0); - iDialogInfoDes() = dialogInfo; - - iNotifier.StartNotifierAndGetResponse(iStatus, KUidVpnDialogNotifier, - iDialogInfoDes, iDialogResponseDes); - SetActive(); - } diff -r 9f4e37332ce5 -r 473321461bba vpnengine/utlpkcs10/src/pkcs10.cpp --- a/vpnengine/utlpkcs10/src/pkcs10.cpp Thu Aug 19 10:54:34 2010 +0300 +++ b/vpnengine/utlpkcs10/src/pkcs10.cpp Tue Aug 31 16:14:16 2010 +0300 @@ -1,5 +1,5 @@ /* -* Copyright (c) 2003 - 2007 Nokia Corporation and/or its subsidiary(-ies). +* Copyright (c) 2003 - 2010 Nokia Corporation and/or its subsidiary(-ies). * All rights reserved. * This component and the accompanying materials are made available * under the terms of "Eclipse Public License v1.0" @@ -1042,31 +1042,20 @@ CRInfoPtr += DERSetInteger(CRInfoPtr, 0); // version // Copy component ders - if(commonAttributes != NULL && commonAttributes->Length() > 0) + if(commonAttributes->Length() > 0) CRInfoPtr += CPkcs10Req::ASNCopy(CRInfoPtr, CONST_CAST(TUint8 *, commonAttributes->Ptr()), commonAttributes->Length()); - if(pkiInfo != NULL && pkiInfo->Length() > 0) + if(pkiInfo->Length() > 0) CRInfoPtr += CPkcs10Req::ASNCopy(CRInfoPtr, CONST_CAST(TUint8 *, pkiInfo->Ptr()), pkiInfo->Length()); - if(extendedAttributes != NULL && extendedAttributes->Length() > 0) + if(extendedAttributes->Length() > 0) CRInfoPtr += CPkcs10Req::ASNCopy(CRInfoPtr, CONST_CAST(TUint8 *, extendedAttributes->Ptr()), extendedAttributes->Length()); } - if(extendedAttributes != NULL) - { - delete extendedAttributes; - CleanupStack::Pop(1); - } - if(pkiInfo != NULL) - { - delete pkiInfo; - CleanupStack::Pop(1); - } - if(commonAttributes != NULL) - { - delete commonAttributes; - CleanupStack::Pop(1); - } + CleanupStack::PopAndDestroy(extendedAttributes); + CleanupStack::PopAndDestroy(pkiInfo); + CleanupStack::PopAndDestroy(commonAttributes); + if(CRInfoBuffer != NULL) CleanupStack::PushL(CRInfoBuffer); // to be destroyed by the caller diff -r 9f4e37332ce5 -r 473321461bba vpnengine/vpncleaner/group/vpncleaner.mmp --- a/vpnengine/vpncleaner/group/vpncleaner.mmp Thu Aug 19 10:54:34 2010 +0300 +++ b/vpnengine/vpncleaner/group/vpncleaner.mmp Tue Aug 31 16:14:16 2010 +0300 @@ -1,5 +1,5 @@ /* -* Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies). +* Copyright (c) 2003-2010 Nokia Corporation and/or its subsidiary(-ies). * All rights reserved. * This component and the accompanying materials are made available * under the terms of "Eclipse Public License v1.0" @@ -36,7 +36,6 @@ MW_LAYER_SYSTEMINCLUDE LIBRARY euser.lib -LIBRARY centralrepository.lib LIBRARY cmmanager.lib LIBRARY rfs.lib LIBRARY efsrv.lib diff -r 9f4e37332ce5 -r 473321461bba vpnengine/vpncleaner/src/vpncleanerexe.cpp --- a/vpnengine/vpncleaner/src/vpncleanerexe.cpp Thu Aug 19 10:54:34 2010 +0300 +++ b/vpnengine/vpncleaner/src/vpncleanerexe.cpp Tue Aug 31 16:14:16 2010 +0300 @@ -17,13 +17,10 @@ #include #include -#include // link against centralrepository.lib -#include #include "vpncleaner.h" -LOCAL_C void setKeysL(); LOCAL_C TBool vpnOnRom(); @@ -38,8 +35,6 @@ { TVpnCleaner vpnc; vpnc.Clean(); - - TRAP_IGNORE( setKeysL() ); } delete cleanup; @@ -49,19 +44,6 @@ } -LOCAL_C void setKeysL() - { - // Connecting and initialization: - CRepository* repository = CRepository::NewL( - KCRUidCommunicationSettings ); - - repository->Set( KSettingsVPNSupported, 0 ); - repository->Delete( KSettingsVPNImplementation ); - - delete repository; - } - - LOCAL_C TBool vpnOnRom() { TBool ret = EFalse; diff -r 9f4e37332ce5 -r 473321461bba vpnengine/vpncommon/inc/vpnclientuids.h --- a/vpnengine/vpncommon/inc/vpnclientuids.h Thu Aug 19 10:54:34 2010 +0300 +++ b/vpnengine/vpncommon/inc/vpnclientuids.h Tue Aug 31 16:14:16 2010 +0300 @@ -1,5 +1,5 @@ /* -* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). +* Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies). * All rights reserved. * This component and the accompanying materials are made available * under the terms of "Eclipse Public License v1.0" @@ -35,11 +35,6 @@ */ #define KUidGenericNotifier 0x10009D8D -/** -* UID of the generic GS plugin -*/ -#define KUidGenericGsPlugin 0x10207236 - /// VPN specific UIDs /** @@ -254,16 +249,6 @@ //#define KUidPkiNotifier 0x101FAE08 /** -* UID of the VpnManagementUi -*/ -#define KUidVpnManagementUi 0x101F6D31 - -/** -* UID of the KUidVpnManagementImplementation -*/ -#define KUidVpnManagementImplementation 0x101F6D32 - -/** * UID of the VpnPolIns */ #define KUidVpnPolIns 0x1000597E diff -r 9f4e37332ce5 -r 473321461bba vpnengine/vpnextapi/.cproject --- a/vpnengine/vpnextapi/.cproject Thu Aug 19 10:54:34 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,35 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -r 9f4e37332ce5 -r 473321461bba vpnengine/vpnextapi/.project --- a/vpnengine/vpnextapi/.project Thu Aug 19 10:54:34 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,19 +0,0 @@ - - - vpnextapi - - - - - - com.nokia.carbide.cdt.builder.carbideCPPBuilder - - - - - - org.eclipse.cdt.core.cnature - org.eclipse.cdt.core.ccnature - com.nokia.carbide.cdt.builder.carbideCPPBuilderNature - - diff -r 9f4e37332ce5 -r 473321461bba vpnengine/vpnextapi/bwins/vpnextapiu.def --- a/vpnengine/vpnextapi/bwins/vpnextapiu.def Thu Aug 19 10:54:34 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,10 +0,0 @@ -EXPORTS - ?GetPolicyName@RVpnExtApi@@QAEHAAVTAgileProvisionPolicy@@@Z @ 1 NONAME ; int RVpnExtApi::GetPolicyName(class TAgileProvisionPolicy &) - ?DeleteServer@RVpnExtApi@@QAEHXZ @ 2 NONAME ; int RVpnExtApi::DeleteServer(void) - ?ServerListL@RVpnExtApi@@QAEHAAVTAgileProvisionApiServerListElem@@@Z @ 3 NONAME ; int RVpnExtApi::ServerListL(class TAgileProvisionApiServerListElem &) - ?ServerDetails@RVpnExtApi@@QAEHAAVTAgileProvisionApiServerSettings@@@Z @ 4 NONAME ; int RVpnExtApi::ServerDetails(class TAgileProvisionApiServerSettings &) - ?SynchronizePolicyServer@RVpnExtApi@@QAEXAAVTRequestStatus@@@Z @ 5 NONAME ; void RVpnExtApi::SynchronizePolicyServer(class TRequestStatus &) - ??0RVpnExtApi@@QAE@XZ @ 6 NONAME ; RVpnExtApi::RVpnExtApi(void) - ?CreateServer@RVpnExtApi@@QAEHABVTAgileProvisionApiServerSettings@@@Z @ 7 NONAME ; int RVpnExtApi::CreateServer(class TAgileProvisionApiServerSettings const &) - ?CancelPolicyProvision@RVpnExtApi@@QAEHXZ @ 8 NONAME ; int RVpnExtApi::CancelPolicyProvision(void) - diff -r 9f4e37332ce5 -r 473321461bba vpnengine/vpnextapi/eabi/vpnextapiu.def --- a/vpnengine/vpnextapi/eabi/vpnextapiu.def Thu Aug 19 10:54:34 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,11 +0,0 @@ -EXPORTS - _ZN10RVpnExtApi11ServerListLER32TAgileProvisionApiServerListElem @ 1 NONAME - _ZN10RVpnExtApi12CreateServerERK32TAgileProvisionApiServerSettings @ 2 NONAME - _ZN10RVpnExtApi12DeleteServerEv @ 3 NONAME - _ZN10RVpnExtApi13GetPolicyNameER21TAgileProvisionPolicy @ 4 NONAME - _ZN10RVpnExtApi13ServerDetailsER32TAgileProvisionApiServerSettings @ 5 NONAME - _ZN10RVpnExtApi21CancelPolicyProvisionEv @ 6 NONAME - _ZN10RVpnExtApi23SynchronizePolicyServerER14TRequestStatus @ 7 NONAME - _ZN10RVpnExtApiC1Ev @ 8 NONAME - _ZN10RVpnExtApiC2Ev @ 9 NONAME - diff -r 9f4e37332ce5 -r 473321461bba vpnengine/vpnextapi/group/ABLD.BAT --- a/vpnengine/vpnextapi/group/ABLD.BAT Thu Aug 19 10:54:34 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,15 +0,0 @@ -@ECHO OFF - -REM Bldmake-generated batch file - ABLD.BAT -REM ** DO NOT EDIT ** - -perl -S ABLD.PL "\vpnclient\vpnengine\vpnextapi\group\\" %1 %2 %3 %4 %5 %6 %7 %8 %9 -if errorlevel==1 goto CheckPerl -goto End - -:CheckPerl -perl -v >NUL -if errorlevel==1 echo Is Perl, version 5.003_07 or later, installed? -goto End - -:End diff -r 9f4e37332ce5 -r 473321461bba vpnengine/vpnextapi/group/bld.inf --- a/vpnengine/vpnextapi/group/bld.inf Thu Aug 19 10:54:34 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,23 +0,0 @@ -/* -* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Build information file for VPN Ext API -* -*/ - -#include - -PRJ_EXPORTS - -PRJ_MMPFILES -vpnextapi.mmp diff -r 9f4e37332ce5 -r 473321461bba vpnengine/vpnextapi/group/vpnextapi.mmp --- a/vpnengine/vpnextapi/group/vpnextapi.mmp Thu Aug 19 10:54:34 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,37 +0,0 @@ -/* -* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Project definition file for VPN Ext API -* -*/ - -#include - -TARGET vpnextapi.dll -TARGETTYPE dll -UID 0x1000008d 0x20016A86 - -CAPABILITY ALL -Tcb -VENDORID VID_DEFAULT - -SOURCEPATH ../src -SOURCE vpnextapi.cpp - -USERINCLUDE ../inc -USERINCLUDE ../../../vpnengine/vpnmanager/inc - -MW_LAYER_SYSTEMINCLUDE - -LIBRARY euser.lib -LIBRARY vpnapi.lib - diff -r 9f4e37332ce5 -r 473321461bba vpnengine/vpnextapi/inc/vpnextapi.h --- a/vpnengine/vpnextapi/inc/vpnextapi.h Thu Aug 19 10:54:34 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,84 +0,0 @@ -/* -* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: VPN Ext API -* -*/ - -#ifndef R_VPNEXTAPI_H -#define R_VPNEXTAPI_H - -// INCLUDES -#include -#include -#include -#include "vpnextapiservantdefs.h" - - - -class TAgileProvisionApiServerSettings - - { - public: - TCmSettingSelection iSelection; - TBuf8 iServerUrl; - TBuf iServerNameLocal; - }; - - class TAgileProvisionApiServerListElem - - { - public: - TBuf8 iServerUrl; - TBuf iServerNameLocal; - }; - - class TAgileProvisionPolicy - - { - public: - TBuf iPolicyName; - }; - -/** - * VPN Ext API. - * - * VPN Ext API allows clients to manage VPN policies. VPN Ext API provides - * extended functionality to VPN API. - */ -class RVpnExtApi : public RVpnServ - { -public: - - - - - /** - * Constructor - */ - IMPORT_C RVpnExtApi(); - - - - IMPORT_C TInt CreateServer( const TAgileProvisionApiServerSettings& aServerDetails ); - IMPORT_C TInt ServerDetails( TAgileProvisionApiServerSettings& aServerDetails ); - IMPORT_C TInt ServerListL( TAgileProvisionApiServerListElem& aVpnPolicyServerList ); - IMPORT_C TInt DeleteServer( ); - IMPORT_C void SynchronizePolicyServer( TRequestStatus& aStatus ); - IMPORT_C TInt CancelPolicyProvision(); - IMPORT_C TInt GetPolicyName(TAgileProvisionPolicy& aVpnPolicyName); -private: - - }; - -#endif // R_VPNEXTAPI_H diff -r 9f4e37332ce5 -r 473321461bba vpnengine/vpnextapi/inc/vpnextapiservantdefs.h --- a/vpnengine/vpnextapi/inc/vpnextapiservantdefs.h Thu Aug 19 10:54:34 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,48 +0,0 @@ -/* -* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: VPN External API servant definitions -* -*/ - -#ifndef VPNEXTAPISERVANTDEFS_H -#define VPNEXTAPISERVANTDEFS_H - -const TInt KMaxProvisionServerUrlLength = 100; -const TInt KMaxProvisionServerNameLength = 100; -const TInt KMaxPolicyServerFileNameLength = 100; - -// VPN policy server settings file definition constants -const TInt KPolicyServerAddressLine = 1; //Address of the policy server -const TInt KPolicyServerNameLine = 2; //Name of the server. Not has to be equal to real host name of server -const TInt KPolicyServerIapIdLine = 3; // Used IAP for policy provision operation -const TInt KPolicyServerIapModeLine = 4; //Iap mode for used IAP (SNAP, AP) -const TInt KPolicyFileLine = 5; //real file name of the imported policy in private dir -const TInt KAgileProvisionVpnIapId = 6; //ID of created IAP for provisioned policy. - - -_LIT(KProvisionServerSettings, "vpnpolicyserver"); -_LIT(KNullDesc, ""); -_LIT8(KNullDesc8, ""); - - -class TAgileProvisionServerLocals -{ -public: - TCmSettingSelection iSelection; - TBuf8 iServerAddress; - TBuf iServerNameLocal; -}; - - -#endif // VPNEXTAPISERVANTDEFS_H diff -r 9f4e37332ce5 -r 473321461bba vpnengine/vpnextapi/rom/vpnextapi.iby --- a/vpnengine/vpnextapi/rom/vpnextapi.iby Thu Aug 19 10:54:34 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,28 +0,0 @@ -/* -* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Image description file for project -* VPN Ext API -* -*/ - -#ifndef __VPNEXTAPI_IBY__ -#define __VPNEXTAPI_IBY__ - -#ifdef FF_VPN_CLIENT - -file=ABI_DIR\BUILD_DIR\vpnextapi.dll SHARED_LIB_DIR\vpnextapi.dll - -#endif // FF_VPN_CLIENT - -#endif // __VPNEXTAPI_IBY__ diff -r 9f4e37332ce5 -r 473321461bba vpnengine/vpnextapi/src/vpnextapi.cpp --- a/vpnengine/vpnextapi/src/vpnextapi.cpp Thu Aug 19 10:54:34 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,68 +0,0 @@ -/* -* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: VPN Ext API -* -*/ - - -#include "vpnextapi.h" -#include "vpnextapiservantdefs.h" -#include "vpnmanagerserverdefs.h" - -EXPORT_C RVpnExtApi::RVpnExtApi() : RVpnServ() - { - } - - -EXPORT_C TInt RVpnExtApi::CreateServer( const TAgileProvisionApiServerSettings& aServerDetails ) - { - TPckg serverCreatePckg(aServerDetails); - return SendReceive(EExtCreateProvisionServer, TIpcArgs(&serverCreatePckg)); - } - - -EXPORT_C TInt RVpnExtApi::ServerDetails( TAgileProvisionApiServerSettings& aServerDetails ) - { - TPckg serverPckg( aServerDetails ); - - return SendReceive(EExtVPNPolicyServerDetails, TIpcArgs(&serverPckg)); - } - -EXPORT_C TInt RVpnExtApi::DeleteServer( ) - { - return SendReceive(EExtDeletePolicyServer); - } - -EXPORT_C TInt RVpnExtApi::ServerListL( TAgileProvisionApiServerListElem& aVpnPolicyServerList ) - { - TPckg serverPckg( aVpnPolicyServerList ); - return SendReceive(EExtVPNPolicyServerList, TIpcArgs(&serverPckg)); - } - -EXPORT_C void RVpnExtApi::SynchronizePolicyServer( TRequestStatus& aStatus ) - { - SendReceive(EExtSynchronizePolicyServer, aStatus); - } - -EXPORT_C TInt RVpnExtApi::CancelPolicyProvision( ) - { - return SendReceive(EExtCancelSynchronize); - } - -EXPORT_C TInt RVpnExtApi::GetPolicyName(TAgileProvisionPolicy& aVpnPolicyName) - { - TPckg serverPckg( aVpnPolicyName ); - return SendReceive(EExtGetPolicyName, TIpcArgs(&serverPckg)); - } - diff -r 9f4e37332ce5 -r 473321461bba vpnengine/vpnins/group/vpnins.mmp --- a/vpnengine/vpnins/group/vpnins.mmp Thu Aug 19 10:54:34 2010 +0300 +++ b/vpnengine/vpnins/group/vpnins.mmp Tue Aug 31 16:14:16 2010 +0300 @@ -1,5 +1,5 @@ /* -* Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies). +* Copyright (c) 2003-2010 Nokia Corporation and/or its subsidiary(-ies). * All rights reserved. * This component and the accompanying materials are made available * under the terms of "Eclipse Public License v1.0" @@ -33,6 +33,5 @@ MW_LAYER_SYSTEMINCLUDE LIBRARY euser.lib -LIBRARY centralrepository.lib LIBRARY certstore.lib LIBRARY ctframework.lib diff -r 9f4e37332ce5 -r 473321461bba vpnengine/vpnins/src/vpninsexe.cpp --- a/vpnengine/vpnins/src/vpninsexe.cpp Thu Aug 19 10:54:34 2010 +0300 +++ b/vpnengine/vpnins/src/vpninsexe.cpp Tue Aug 31 16:14:16 2010 +0300 @@ -1,5 +1,5 @@ /* -* Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +* Copyright (c) 2005-2010 Nokia Corporation and/or its subsidiary(-ies). * All rights reserved. * This component and the accompanying materials are made available * under the terms of "Eclipse Public License v1.0" @@ -18,23 +18,16 @@ #include - - #include // link against centralrepository.lib - #include +#include - #include - - -_LIT(KVpnManagementUiDllName, "vpnmanagementui.dll"); - -LOCAL_C void setKeysAndOtherSettingsL(); +LOCAL_C void setSettingsL(); // The starting point GLDEF_C TInt E32Main() { __UHEAP_MARK; CTrapCleanup* cleanup = CTrapCleanup::New(); - TRAPD(error, setKeysAndOtherSettingsL()); + TRAPD(error, setSettingsL()); if (error != KErrNone) { ; @@ -45,14 +38,8 @@ } -LOCAL_C void setKeysAndOtherSettingsL() +LOCAL_C void setSettingsL() { - // Connecting and initialization: - CRepository* repository = CRepository::NewL( KCRUidCommunicationSettings ); - repository->Set( KSettingsVPNSupported, 1 ); - repository->Set( KSettingsVPNImplementation, KVpnManagementUiDllName ); - delete repository; - CCertificateAppInfoManager* manager = CCertificateAppInfoManager::NewLC(); const TUid KUidVpn = {0x101F7993}; diff -r 9f4e37332ce5 -r 473321461bba vpnengine/vpnipsecpolparser/src/ipsecpolparser.cpp --- a/vpnengine/vpnipsecpolparser/src/ipsecpolparser.cpp Thu Aug 19 10:54:34 2010 +0300 +++ b/vpnengine/vpnipsecpolparser/src/ipsecpolparser.cpp Tue Aug 31 16:14:16 2010 +0300 @@ -1,5 +1,5 @@ /* -* Copyright (c) 2002-2005 Nokia Corporation and/or its subsidiary(-ies). +* Copyright (c) 2002-2010 Nokia Corporation and/or its subsidiary(-ies). * All rights reserved. * This component and the accompanying materials are made available * under the terms of "Eclipse Public License v1.0" @@ -2054,15 +2054,8 @@ LOG_("Querying DNS tasks\n"); - if (iPolicies != NULL) - { - iPolicies->GetFQDNAddressListL(*iPolicyList); - } - else - { - LOG_("No ipsec policies!\n"); - } - LOG_("CIpSecurityPiece::GetFQDNAddressListL() exit\n"); + iPolicies->GetFQDNAddressListL(*iPolicyList); } + LOG_("CIpSecurityPiece::GetFQDNAddressListL() exit\n"); return iPolicyList; } diff -r 9f4e37332ce5 -r 473321461bba vpnengine/vpnmanager/group/vpnmanager.mmp --- a/vpnengine/vpnmanager/group/vpnmanager.mmp Thu Aug 19 10:54:34 2010 +0300 +++ b/vpnengine/vpnmanager/group/vpnmanager.mmp Tue Aug 31 16:14:16 2010 +0300 @@ -1,5 +1,5 @@ /* -* Copyright (c) 2003-2010 Nokia Corporation and/or its subsidiary(-ies). +* Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies). * All rights reserved. * This component and the accompanying materials are made available * under the terms of "Eclipse Public License v1.0" @@ -21,7 +21,7 @@ TARGETTYPE exe UID 0x1000008d 0x101F7993 -CAPABILITY NetworkControl NetworkServices ProtServ WriteDeviceData ReadDeviceData +CAPABILITY NetworkControl NetworkServices ProtServ WriteDeviceData VENDORID VID_DEFAULT SOURCEPATH ../src @@ -52,11 +52,8 @@ USERINCLUDE ../../utlbase64/inc USERINCLUDE ../../utlpkcs10/inc USERINCLUDE ../../../vpnui/vpnecomnotifier/inc -USERINCLUDE ../../../vpnui/vpnpolins/inc USERINCLUDE ../../eventmediatorapi/inc USERINCLUDE ../../eventviewer/inc -USERINCLUDE ../../agileprovisionws/inc -USERINCLUDE ../../vpnextapi/inc MW_LAYER_SYSTEMINCLUDE @@ -78,9 +75,7 @@ LIBRARY charconv.lib LIBRARY cmmanager.lib LIBRARY cryptography.lib -LIBRARY agileprovisionws.lib -LIBRARY centralrepository.lib DEBUGLIBRARY flogger.lib -EPOCSTACKSIZE 0x5000 +EPOCSTACKSIZE 0x4000 diff -r 9f4e37332ce5 -r 473321461bba vpnengine/vpnmanager/group/vpnmanager_test.mmp --- a/vpnengine/vpnmanager/group/vpnmanager_test.mmp Thu Aug 19 10:54:34 2010 +0300 +++ b/vpnengine/vpnmanager/group/vpnmanager_test.mmp Tue Aug 31 16:14:16 2010 +0300 @@ -1,5 +1,5 @@ /* -* Copyright (c) 2003-2010 Nokia Corporation and/or its subsidiary(-ies). +* Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies). * All rights reserved. * This component and the accompanying materials are made available * under the terms of "Eclipse Public License v1.0" @@ -15,21 +15,23 @@ * */ + + #include TARGET vpnmanager.exe TARGETTYPE exe UID 0x1000008d 0x101F7993 -CAPABILITY NetworkControl NetworkServices ProtServ WriteDeviceData ReadDeviceData +CAPABILITY NetworkControl NetworkServices ProtServ WriteDeviceData VENDORID VID_DEFAULT SOURCEPATH ../src SOURCE fileutil.cpp -SOURCE pinparser.cpp -SOURCE pkiutil.cpp +SOURCE pinparser.cpp +SOURCE pkiutil.cpp SOURCE pwdchanger.cpp -SOURCE policyimporter.cpp +SOURCE policyimporter.cpp SOURCE policypatcher.cpp SOURCE policystore.cpp SOURCE vpnapiservant.cpp @@ -52,11 +54,8 @@ USERINCLUDE ../../utlbase64/inc USERINCLUDE ../../utlpkcs10/inc USERINCLUDE ../../../vpnui/vpnecomnotifier/inc -USERINCLUDE ../../../vpnui/vpnpolins/inc USERINCLUDE ../../eventmediatorapi/inc USERINCLUDE ../../eventviewer/inc -USERINCLUDE ../../agileprovisionws/inc -USERINCLUDE ../../vpnextapi/inc MW_LAYER_SYSTEMINCLUDE @@ -79,9 +78,7 @@ LIBRARY charconv.lib LIBRARY cmmanager.lib LIBRARY cryptography.lib -LIBRARY agileprovisionws.lib -LIBRARY centralrepository.lib DEBUGLIBRARY flogger.lib -EPOCSTACKSIZE 0x5000 +EPOCSTACKSIZE 0x4000 diff -r 9f4e37332ce5 -r 473321461bba vpnengine/vpnmanager/inc/cmmanagerutils.h --- a/vpnengine/vpnmanager/inc/cmmanagerutils.h Thu Aug 19 10:54:34 2010 +0300 +++ b/vpnengine/vpnmanager/inc/cmmanagerutils.h Tue Aug 31 16:14:16 2010 +0300 @@ -1,5 +1,5 @@ /* -* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). +* Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). * All rights reserved. * This component and the accompanying materials are made available * under the terms of "Eclipse Public License v1.0" @@ -37,12 +37,9 @@ { public: - static TUint32 CreateVPNConnectionMethodToIntranetL(const TVpnPolicyInfo& aVpnPolicyInfo, + static void CreateVPNConnectionMethodToIntranetL(const TVpnPolicyInfo& aVpnPolicyInfo, CEventLogger& aEventLogger); - static TBool ProvisionIAPNameExistL(TUint32 aAgileProvisionAPId); - - private: static void SetVpnConnectionMethodAttributesL(RCmConnectionMethodExt& aConnectionMethod, diff -r 9f4e37332ce5 -r 473321461bba vpnengine/vpnmanager/inc/policyimporter.h --- a/vpnengine/vpnmanager/inc/policyimporter.h Thu Aug 19 10:54:34 2010 +0300 +++ b/vpnengine/vpnmanager/inc/policyimporter.h Tue Aug 31 16:14:16 2010 +0300 @@ -34,7 +34,6 @@ class CPolicyPatchInfoList; class CIkeDataArray; class CIkeData; -class CAgileProvisionWs; const TInt KMaxExtPolicyIdLength = 256; const TInt KDoNotGetKeySize = -1; @@ -60,9 +59,7 @@ void ImportPolicyL(const TDesC& aDir); void ImportSinglePolicyL(const TDesC& aDir, TVpnPolicyId& aNewPolicyId); - void SynchronizeVpnPolicyServerL(); - - + private: CPolicyImporter(const RMessage2& aMessage, CVpnApiServant& aVpnApiServant, CPolicyStore& iPolicyStore, RFs& aFs); @@ -99,8 +96,6 @@ void StateImportPinAndPolL(); void StateCreateVpnDestinationL(); void StateEndPolicyImportL(); - void StateGetPolicyProvisionServiceL(); - void StateAfterGetPolicyProvisionServiceL(); void BuildPolicyIdListL(); TPkiServiceStoreType GetStoreTypeL(CIkeData* aData); @@ -156,25 +151,9 @@ /** * Returns Issuer name of certificate */ - HBufC8* CertIssuerL(const TFileName& aCertFile); - TFileName GetCAFromFileListL(const TDesC8& aCertSubjectName, CArrayFixFlat* aCertFileArray); - - /** - * Checks whether mVPN policy provision is requested - */ - TBool GetPolicyService(); - - void GetPolicyWsL(); - - HBufC8* GetPolicyNameL(HBufC* aPolicyFileName); - - void PatchPolicyProvisionL(); + HBufC8* CPolicyImporter::CertIssuerL(const TFileName& aCertFile); + TFileName CPolicyImporter::GetCAFromFileListL(const TDesC8& aCertSubjectName, CArrayFixFlat* aCertFileArray); - -public: - //Policy provision service - CAgileProvisionWs* iAgileProvisionWs; - private: RMessage2 iMessage; TRequestStatus* iExtStatus; @@ -219,16 +198,9 @@ TAny* iPkiOpContext; TBool iImportSinglePolicy; - TBool iAgileProvision; TVpnPolicyId* iNewPolicyId; - TVpnPolicyId iNewPolicyIdBuf; + TVpnPolicyId iPolicyId; - - TBuf iPolicyIdBuf; - - HBufC8* iAgileProvisionWSAddr; - - TUint32 iAgileProvisionAPId; }; #endif // __POLICYIMPORTER_H__ diff -r 9f4e37332ce5 -r 473321461bba vpnengine/vpnmanager/inc/vpnapiservant.h --- a/vpnengine/vpnmanager/inc/vpnapiservant.h Thu Aug 19 10:54:34 2010 +0300 +++ b/vpnengine/vpnmanager/inc/vpnapiservant.h Tue Aug 31 16:14:16 2010 +0300 @@ -22,11 +22,7 @@ #include #include "vpnapi.h" -#include "vpnextapi.h" -#include "vpnextapiservantdefs.h" #include "eventlogger.h" -#include "fileutil.h" - class RFs; class CPolicyStore; @@ -72,20 +68,12 @@ void AddPolicyL(const RMessage2& aMessage); void UpdatePolicyDetailsL(const RMessage2& aMessage); void UpdatePolicyDataL(const RMessage2& aMessage); - void CreateProvisionServerL( const RMessage2& aMessage ); - void ListProvisionServerL( const RMessage2& aMessage ); - void GetProvisionServerDetailsL( const RMessage2& aMessage ); - void DeleteVPNPolicyServerL( const RMessage2& aMessage ); - void SynchronizeVPNPolicyServerL( const RMessage2& aMessage ); - void CancelSynchronize( const RMessage2& aMessage ); - void GetVPNPolicyNameL( const RMessage2& aMessage ); private: CPolicyStore* iPolicyStore; CPwdChanger* iPwdChanger; CPolicyImporter* iPolicyImporter; RFs& iFs; - TFileUtil iFileUtil; }; #endif // __VPNAPISERVANT_H__ diff -r 9f4e37332ce5 -r 473321461bba vpnengine/vpnmanager/inc/vpnmanagerserverdefs.h --- a/vpnengine/vpnmanager/inc/vpnmanagerserverdefs.h Thu Aug 19 10:54:34 2010 +0300 +++ b/vpnengine/vpnmanager/inc/vpnmanagerserverdefs.h Tue Aug 31 16:14:16 2010 +0300 @@ -53,16 +53,7 @@ // OMA DM based policy management) EVpnAddPolicy, EVpnUpdatePolicyDetails, - EVpnUpdatePolicyData, - - //Policy provision - EExtCreateProvisionServer, - EExtDeletePolicyServer, - EExtVPNPolicyServerList, - EExtVPNPolicyServerDetails, - EExtSynchronizePolicyServer, - EExtCancelSynchronize, - EExtGetPolicyName + EVpnUpdatePolicyData }; // Panic codes diff -r 9f4e37332ce5 -r 473321461bba vpnengine/vpnmanager/src/cmmanagerutils.cpp --- a/vpnengine/vpnmanager/src/cmmanagerutils.cpp Thu Aug 19 10:54:34 2010 +0300 +++ b/vpnengine/vpnmanager/src/cmmanagerutils.cpp Tue Aug 31 16:14:16 2010 +0300 @@ -29,13 +29,11 @@ static const TUint KMaxDestinationNameLength = 32; -TUint32 CmManagerUtils::CreateVPNConnectionMethodToIntranetL(const TVpnPolicyInfo& aVpnPolicyInfo, +void CmManagerUtils::CreateVPNConnectionMethodToIntranetL(const TVpnPolicyInfo& aVpnPolicyInfo, CEventLogger& aEventLogger) { LOG_("CmManagerUtils::CreateVPNConnectionMethodToIntranetL \n"); - TUint32 connectionMethodId(0); - using namespace CMManager; RCmManagerExt cmManagerExt; @@ -77,7 +75,7 @@ internetDestinationId); CleanupClosePushL( vpnConnectionMethod ); - connectionMethodId = vpnConnectionMethod.GetIntAttributeL( ECmId ); + TUint32 connectionMethodId = vpnConnectionMethod.GetIntAttributeL( ECmId ); aEventLogger.LogEvent(R_VPN_MSG_CREATED_VPN_ACCESS_POINT_WITH_SNAP, &(aVpnPolicyInfo.iId), NULL, connectionMethodId, internetDestinationId); @@ -93,8 +91,6 @@ CleanupStack::PopAndDestroy(); //cmManagerExt LOG_("CmManagerUtils::CreateVPNConnectionMethodToIntranetL - end \n"); - return connectionMethodId; - } void CmManagerUtils::SetVpnConnectionMethodAttributesL(RCmConnectionMethodExt& aConnectionMethod, @@ -106,7 +102,7 @@ LOG_("CmManagerUtils::SetVpnConnectionMethodAttributesL \n"); - aConnectionMethod.SetIntAttributeL( ECmNamingMethod, ENamingUnique ); + aConnectionMethod.SetIntAttributeL( ECmNamingMethod, ENamingNothing ); aConnectionMethod.SetStringAttributeL( ECmName, aConnectionMethodName ); aConnectionMethod.SetStringAttributeL( EVpnServicePolicy, aPolicyId ); aConnectionMethod.SetIntAttributeL( ECmNextLayerSNAPId, aInternetDestinationId ); @@ -116,7 +112,7 @@ HBufC* CmManagerUtils::CreateConnectionMethodNameLC(const TDesC& aPolicyName) { - + LOG_("CmManagerUtils::CreateConnectionMethodNameLC \n"); HBufC* name = HBufC::NewLC(KMaxDestinationNameLength); @@ -263,42 +259,3 @@ LOG_("CmManagerUtils::CreateNewConnectionMethodToIntranetL - end \n"); return vpnConnectionMethod; } - -TBool CmManagerUtils::ProvisionIAPNameExistL(TUint32 aAgileProvisionAPId) - { - TBool apExist=EFalse; - using namespace CMManager; - RCmManagerExt cmManagerExt; - cmManagerExt.OpenL(); - CleanupClosePushL( cmManagerExt ); - - RArray aps; - - TBool supportedBearersOnly = ETrue; - TBool legacyCmsOnly = EFalse; - - cmManagerExt.ConnectionMethodL( aps, supportedBearersOnly, legacyCmsOnly ); - CleanupClosePushL( aps ); - - for( TInt i = 0; i < aps.Count(); ++i ) - { - RCmConnectionMethodExt ap = cmManagerExt.ConnectionMethodL( aps[i] ); - CleanupClosePushL( ap ); - - if( KPluginVPNBearerTypeUid == ap.GetIntAttributeL( ECmBearerType ) ) - if ( ap.GetIntAttributeL(ECmId) == aAgileProvisionAPId ) - { - apExist=ETrue; - } - CleanupStack::PopAndDestroy(); // ap - } - - CleanupStack::PopAndDestroy(); // aps - - - CleanupStack::PopAndDestroy(); //cmManagerExt - - return apExist; - } - - diff -r 9f4e37332ce5 -r 473321461bba vpnengine/vpnmanager/src/fileutil.cpp --- a/vpnengine/vpnmanager/src/fileutil.cpp Thu Aug 19 10:54:34 2010 +0300 +++ b/vpnengine/vpnmanager/src/fileutil.cpp Tue Aug 31 16:14:16 2010 +0300 @@ -19,7 +19,6 @@ #include #include "fileutil.h" -#include "log_r6.h" TFileUtil::TFileUtil(RFs& aFs) : iFs(aFs) { diff -r 9f4e37332ce5 -r 473321461bba vpnengine/vpnmanager/src/policyimporter.cpp --- a/vpnengine/vpnmanager/src/policyimporter.cpp Thu Aug 19 10:54:34 2010 +0300 +++ b/vpnengine/vpnmanager/src/policyimporter.cpp Tue Aug 31 16:14:16 2010 +0300 @@ -15,11 +15,7 @@ * */ -#include -#include -#include -#include -#include + #include "policyimporter.h" #include "vpnapiservant.h" @@ -32,16 +28,12 @@ #include "pkiutil.h" #include "cmmanagerutils.h" #include "log_r6.h" -#include "agileprovisionws.h" -#include "agileprovisiondefs.h" -#include "policyinstaller_constants.h" - +#include +#include const TInt KDefaultKeySize(1024); -_LIT8 (KPinFileNameTitle, "[POLICYNAME]"); - enum TImportState { EStateBeginPolicyImport = 1, @@ -55,9 +47,7 @@ EStateAfterAttachCertificate, EStateImportPinAndPol, EStateCreateVpnDestination, - EStateEndPolicyImport, - EStateGetPolicyProvisionService, - EStateAfterGetPolicyProvisionService + EStateEndPolicyImport }; CPolicyImporter* CPolicyImporter::NewL(const RMessage2& aMessage, CVpnApiServant& aVpnApiServant, @@ -126,10 +116,6 @@ delete iCertFileData; delete iKeyFileData; - - delete iAgileProvisionWSAddr; - delete iAgileProvisionWs; - LOG_("<- CPolicyImporter::~CPolicyImporter()"); } @@ -242,14 +228,7 @@ case EStateEndPolicyImport: StateEndPolicyImportL(); break; - - case EStateGetPolicyProvisionService: - StateGetPolicyProvisionServiceL(); - break; - case EStateAfterGetPolicyProvisionService: - StateAfterGetPolicyProvisionServiceL(); - break; default: User::Panic(KVpnManagerServer, EInvalidImportState); break; @@ -618,41 +597,9 @@ { LOG_("-> CPolicyImporter::StateImportPinAndPolL()"); SetCurrState(EStateImportPinAndPol); - HBufC* pinFile; - HBufC* polFile; - if ( !iAgileProvision ) - { - pinFile = iFileUtil.MakeFileNameLC(iImportDir, iCurrPolicyId, KPinFileExt); - polFile = iFileUtil.MakeFileNameLC(iImportDir, iCurrPolicyId, KPolFileExt); - } - else - { - pinFile = iFileUtil.MakeFileNameLC(KTempDirectory(), KAgileProvisionPinFileName(), KNullDesc()); - polFile = iFileUtil.MakeFileNameLC(KTempDirectory(), KAgileProvisionPolicyFileName(), KNullDesc()); - - HBufC8* infoData=NULL; - - if ( iFileUtil.FileExists(*polFile) ) - { - infoData=GetPolicyNameL(polFile); - CleanupStack::PushL(infoData); - } - else - User::Leave(KErrNotFound); - - - HBufC8* pinFileData = HBufC8::NewLC(KNullDesc().Length() + KPinFileNameTitle().Length() + KCRLF().Length() + infoData->Length()); - TPtr8 pinFilePtr (pinFileData->Des()) ; - pinFilePtr.Append(KPinFileNameTitle); - pinFilePtr.Append(KCRLF); - pinFilePtr.Append(*infoData); - - iFileUtil.SaveFileDataL(*pinFile, *pinFileData); - - CleanupStack::PopAndDestroy(pinFileData); - CleanupStack::PopAndDestroy(infoData); - } - + + HBufC* pinFile = iFileUtil.MakeFileNameLC(iImportDir, iCurrPolicyId, KPinFileExt); + HBufC* polFile = iFileUtil.MakeFileNameLC(iImportDir, iCurrPolicyId, KPolFileExt); if (!iFileUtil.FileExists(*pinFile)) { @@ -669,14 +616,9 @@ PatchPolicyCaCertInfoL(*polFile); iPolicyStore.ImportPolicyL(*pinFile, *polFile, iNewPolicyId); - - // if policy imported from Agile VPN provisioning web service - if ( iAgileProvision ) - { - PatchPolicyProvisionL(); - } + //iImportSinglePolicy is used when policy is installed via - //OMA DM. If the policy is installed from .vpn file + //OMA DM or ACU. If the policy is installed from .vpn file //the iImportSinglePolicy is not used. //The VPN destination is only created in .vpn case. if (iImportSinglePolicy) @@ -697,51 +639,16 @@ LOG_("-> CPolicyImporter::StateCreateVpnDestinationL()"); SetCurrState(EStateCreateVpnDestination); - //Gets the IAP name from policy name + //Gets the IAP name from policy name TVpnPolicyInfo* policyInfo = new (ELeave) TVpnPolicyInfo; CleanupDeletePushL(policyInfo); User::LeaveIfError(iPolicyStore.GetPolicyInfo(*iNewPolicyId, *policyInfo)); - TBool iapExist(EFalse); - if ( !iAgileProvision ) - TUint32 provisionIapId = CmManagerUtils::CreateVPNConnectionMethodToIntranetL(*policyInfo, - *(iVpnApiServant.iEventLogger)); - else - { - - if ( iAgileProvisionAPId > 0 ) - { - iapExist=CmManagerUtils::ProvisionIAPNameExistL(iAgileProvisionAPId); - } - - if ( !iapExist || iAgileProvisionAPId == 0) - { - TUint32 provisionIapId = CmManagerUtils::CreateVPNConnectionMethodToIntranetL(*policyInfo, - *(iVpnApiServant.iEventLogger)); - - TFileName serverSettingsFile; - User::LeaveIfError(iFs.PrivatePath(serverSettingsFile)); - - serverSettingsFile.Append(KProvisionServerSettings); - - if ( iFileUtil.FileExists(serverSettingsFile) ) - { - HBufC8* fileData=iFileUtil.LoadFileDataL(serverSettingsFile); - CleanupStack::PushL(fileData); - HBufC8* newFileData =HBufC8::New(fileData->Length() + KCRLF().Length() + 4); - CleanupStack::PushL(newFileData); - TPtr8 fileDataPtr = newFileData->Des(); - fileDataPtr.Copy(*fileData); - fileDataPtr.Append(KCRLF); - fileDataPtr.AppendNum(provisionIapId); - iFileUtil.SaveFileDataL(serverSettingsFile,fileDataPtr); - CleanupStack::PopAndDestroy(newFileData); - CleanupStack::PopAndDestroy(fileData); - } - } - } - CleanupStack::PopAndDestroy(policyInfo); + CmManagerUtils::CreateVPNConnectionMethodToIntranetL(*policyInfo, + *(iVpnApiServant.iEventLogger)); + + CleanupStack::PopAndDestroy(); //policyInfo GotoState(EStateEndPolicyImport); LOG_("<- CPolicyImporter::StateCreateVpnDestinationL()"); @@ -761,58 +668,13 @@ iFileUtil.DeleteFilesL(*fileFilter); CleanupStack::PopAndDestroy(); // fileFilter - if ( !iAgileProvision ) - { - LOG_EVENT_2B(R_VPN_MSG_INSTALLED_POLICY_FILE, iNewPolicyId, NULL, 0, iImportSinglePolicy); - } - else - { - _LIT8(KPolicySever, "Policy server"); - LOG_EVENT_2B(R_VPN_MSG_INSTALLED_POLICY_SERVER, iNewPolicyId, &KPolicySever(), KErrNone, EFalse); - } + + LOG_EVENT_2B(R_VPN_MSG_INSTALLED_POLICY_FILE, iNewPolicyId, NULL, 0, iImportSinglePolicy); + GotoState(EStateBeginPolicyImport); LOG_("<- CPolicyImporter::StateEndPolicyImportL()"); } -void CPolicyImporter::SynchronizeVpnPolicyServerL() - { - - GotoState(EStateGetPolicyProvisionService); - } - -void CPolicyImporter::StateGetPolicyProvisionServiceL() - { - GetPolicyWsL(); - SetNextState(EStateAfterGetPolicyProvisionService); - - } - -void CPolicyImporter::StateAfterGetPolicyProvisionServiceL() - { - - if (iStatus != KErrNone) - { - User::Leave(iStatus.Int()); - } - delete iCurrCaCertList; - iCurrCaCertList = NULL; - iCurrCaCertList = new (ELeave) CArrayFixFlat(2); - - delete iCurrUserCertList; - iCurrUserCertList = NULL; - iCurrUserCertList = new (ELeave) CArrayFixFlat(2); - - iNewPolicyId = &iPolicyId; - - BuildPolicyIdListL(); - iCurrPolicyId.Copy(iPolicyIdList->At(iCurrPolicyIdIndex)); - iImportSinglePolicy = EFalse; - iAgileProvision = ETrue; - GotoState(EStateImportPinAndPol); - - } - - void CPolicyImporter::BuildPolicyIdListL() { delete iPolicyIdList; @@ -1291,191 +1153,6 @@ } return aCertFileArray->At(currCaIndex); - } - - void CPolicyImporter::GetPolicyWsL() - { - const TInt KEolLen = 2; - - delete iAgileProvisionWs; - iImportDir=KTempDirectory(); - iFileUtil.CreateDirIfNeededL(iImportDir); - iAgileProvisionWs = CAgileProvisionWs::NewL(); - - TFileName serverSettingsFile; - User::LeaveIfError(iFs.PrivatePath(serverSettingsFile)); - - serverSettingsFile.Append(KProvisionServerSettings); - - - HBufC8* fileData; - TInt endOfLine; - HBufC8* serviceEndPoint; - TUint iapIdInt; - - if ( iFileUtil.FileExists(serverSettingsFile) ) - { - fileData=iFileUtil.LoadFileDataL(serverSettingsFile); - CleanupStack::PushL(fileData); - endOfLine=fileData->Find(KCRLF); - - serviceEndPoint=HBufC8::NewL( KHTTPprefix().Length() + KServiceSuffix().Length() + fileData->Mid(0,endOfLine).Length()); - CleanupStack::PushL(serviceEndPoint); - TPtr8 endPointPtr(serviceEndPoint->Des()); - endPointPtr=KHTTPprefix; - HBufC8* serviceAddrBuf=(fileData->Mid(0,endOfLine)).AllocL(); - CleanupStack::PushL(serviceAddrBuf); - - //serviceAddrBuf ownership transfer - iAgileProvisionWs->SetServiceAddr(serviceAddrBuf); - endPointPtr.Append(fileData->Mid(0,endOfLine)); - endPointPtr.Append(KServiceSuffix); - CleanupStack::Pop(serviceAddrBuf); - - TInt startOfLine(endOfLine+KEolLen); - TPtrC8 nameData=fileData->Right(fileData->Length()-startOfLine); - endOfLine=nameData.Find(KCRLF); - - startOfLine = endOfLine + KEolLen; - TPtrC8 iapIdData=nameData.Right(nameData.Length()-startOfLine); - endOfLine=iapIdData.Find(KCRLF); - TLex8 iapIdConverter(iapIdData.Left(endOfLine)); - - iapIdConverter.Val(iapIdInt); - iAgileProvisionWs->GetPolicy( *serviceEndPoint, iapIdInt, iStatus ); - CleanupStack::PopAndDestroy(serviceEndPoint); - CleanupStack::PopAndDestroy(fileData); - } - - - SetActive(); - - } - - HBufC8* CPolicyImporter::GetPolicyNameL(HBufC* aPolicyFileName) - { - HBufC8* infoData=NULL; - HBufC8* infoSection=NULL; - HBufC8* fileData=NULL; - if ( iFileUtil.FileExists(*aPolicyFileName) ) - { - fileData=iFileUtil.LoadFileDataL(*aPolicyFileName); - CleanupStack::PushL(fileData); - _LIT8(KInfo, "[INFO]"); - TInt i=(fileData->Find(KInfo)) + KInfo().Length() + KCRLF().Length(); - - infoSection=fileData->Right((fileData->Length())-i).AllocL(); - CleanupStack::PushL(infoSection); - TInt j=infoSection->Find(KCRLF); - - infoData=infoSection->Mid(0,j).AllocL(); - - CleanupStack::Pop(infoSection); - CleanupStack::Pop(fileData); - - delete infoSection; - delete fileData; - infoSection=NULL; - fileData=NULL; - - } - else - User::Leave(KErrNotFound); - - return infoData; - } - - - void CPolicyImporter::PatchPolicyProvisionL() - { - TPath privateDir; - User::LeaveIfError(iFs.PrivatePath(privateDir)); - - HBufC* policyServerSettingsFileName = HBufC::NewL(KProvisionServerSettings().Length() + privateDir.Length()); - CleanupStack::PushL(policyServerSettingsFileName); - TPtr fileNamePtr=policyServerSettingsFileName->Des(); - fileNamePtr.Append(privateDir); - fileNamePtr.Append(KProvisionServerSettings); - - - if ( iFileUtil.FileExists(fileNamePtr) ) - { - HBufC8* fileData=iFileUtil.LoadFileDataL(fileNamePtr); - CleanupStack::PushL(fileData); - - TPtrC8 restOfData = *fileData; - - TInt bofInt; - TInt line=1; - while ( (bofInt=restOfData.Find(KCRLF)) != KErrNotFound && line < KPolicyFileLine ) - { - restOfData.Set(restOfData.Mid(bofInt + KCRLF().Length())); - line++; - } - TInt iapIdStart=restOfData.Find(KCRLF); - HBufC16* iapIdBuf; - if ( iapIdStart!=KErrNotFound ) - { - TPtrC8 iapIdPtr=restOfData.Mid(iapIdStart + KCRLF().Length(),restOfData.Length()-KCRLF().Length()-iapIdStart); - iapIdBuf=iFileUtil.To16BitL(iapIdPtr); - CleanupStack::PushL(iapIdBuf); - TLex iapIdConverter(*iapIdBuf); - iapIdConverter.Val(iAgileProvisionAPId,EDecimal); - CleanupStack::PopAndDestroy(iapIdBuf); - } - - if ( iAgileProvisionAPId >0) - restOfData.Set(restOfData.Mid(0,iapIdStart)); - HBufC16* policyFileNameBuf = iFileUtil.To16BitL(restOfData); - CleanupStack::PushL(policyFileNameBuf); - HBufC* policyFilePath = iFileUtil.MakeFileNameLC(privateDir, *policyFileNameBuf, KPolFileExt); - - //server configuration file includes installed policy file name and policy exists. - if ( line == KPolicyFileLine && iFileUtil.FileExists(*policyFilePath) ) - { - HBufC16* restOfDataBuf=iFileUtil.To16BitL(restOfData); - CleanupStack::PushL(restOfDataBuf); - iPolicyIdBuf.Append(*restOfDataBuf); - iNewPolicyIdBuf=iPolicyIdBuf; - iPolicyStore.ReplacePolicyL(iPolicyIdBuf,*iNewPolicyId); - iNewPolicyId= &iNewPolicyIdBuf; - CleanupStack::PopAndDestroy(restOfDataBuf); - } - //either first configuration or policy removed - else - { - HBufC* serverFile = HBufC::NewL(fileData->Length() + KCRLF().Length() + iNewPolicyId->Length()); - CleanupStack::PushL(serverFile); - TPtr tPtr(serverFile->Des()); - HBufC16* fileData16=iFileUtil.To16BitL(*fileData); - CleanupStack::PushL(fileData16); - tPtr.Copy(*fileData16); - _LIT(KCRLF, "\r\n"); - - //policy removed - if ( line == KPolicyFileLine ) - { - TInt lengthOfPolicyId=restOfData.Length(); - tPtr.Replace(fileData->Length()-lengthOfPolicyId,lengthOfPolicyId,*iNewPolicyId); - } - //first configuration - else - { - tPtr.Append(KCRLF); - tPtr.Append(*iNewPolicyId); - } - iFileUtil.SaveFileDataL(fileNamePtr,tPtr); - - CleanupStack::PopAndDestroy(fileData16); - CleanupStack::PopAndDestroy(serverFile); - } - - CleanupStack::PopAndDestroy(policyFilePath); - CleanupStack::PopAndDestroy(policyFileNameBuf); - CleanupStack::PopAndDestroy(fileData); - CleanupStack::PopAndDestroy(policyServerSettingsFileName); - } - } /***/ diff -r 9f4e37332ce5 -r 473321461bba vpnengine/vpnmanager/src/policystore.cpp --- a/vpnengine/vpnmanager/src/policystore.cpp Thu Aug 19 10:54:34 2010 +0300 +++ b/vpnengine/vpnmanager/src/policystore.cpp Tue Aug 31 16:14:16 2010 +0300 @@ -1,5 +1,5 @@ /* -* Copyright (c) 2000-2010 Nokia Corporation and/or its subsidiary(-ies). +* Copyright (c) 2000-2007 Nokia Corporation and/or its subsidiary(-ies). * All rights reserved. * This component and the accompanying materials are made available * under the terms of "Eclipse Public License v1.0" @@ -15,11 +15,11 @@ * */ + + #include #include #include // vpn plugin -#include -#include #include "policystore.h" #include "pinparser.h" #include "ikepolparser.h" @@ -188,39 +188,6 @@ iFileUtil.DeleteFileL(*polFile); } CleanupStack::PopAndDestroy(2); // polFile, pinFile - - // Policy was deleted successfully. - TUint policyCount = PolicyCount(); - - if ( policyCount == 0 ) - { - CRepository* repository = CRepository::NewLC( KCRUidBrowser ); - TInt tempMode; - TBrowserCenRepApSelectionModeValues mode; - - TUint err = repository->Get( KBrowserOccAccessPointSelectionMode, tempMode ); - mode = static_cast ( tempMode ); - - // This was the last policy. Now restore old value, if appropriate. - if (mode != EBrowserCenRepApSelModeAlwaysAsk) - { - // Nothing to change because user has edited the setting in meanwhile and this code will not - // mess up user's choice. - LOG(Log::Printf(_L("Browser user has changed mode from EBrowserCenRepApSelModeAlwaysAsk - no change"))); - } - else - { - // Reset to original value - TInt err = repository->Reset( KBrowserOccAccessPointSelectionMode ); - LOG(Log::Printf(_L("Set KBrowserOccAccessPointSelectionMode -> Original value"))); - } - CleanupStack::PopAndDestroy( repository ); - } - else - { - LOG(Log::Printf(_L("Browser settings not changed because policy count > 0"))); - } - LOG(Log::Printf(_L("<- CPolicyStore::DeletePolicyL()"))); return KErrNone; } @@ -331,40 +298,6 @@ } CleanupStack::PopAndDestroy(policyInfo); - - // Policy was installed successfully. - // Now change Browser's settings so that it must ask always for SNAP/IAP. - // This is done because otherwise the VPN usage is seen difficult for Browser users. - TUint policyCount = PolicyCount(); - - if ( policyCount == 1 ) - { - CRepository* repository = CRepository::NewLC( KCRUidBrowser ); - TInt tempMode; - TBrowserCenRepApSelectionModeValues mode; - - TInt err = repository->Get( KBrowserOccAccessPointSelectionMode, tempMode ); - mode = static_cast ( tempMode ); - - // This is the first policy. Now do the changes and save old value. - if (mode == EBrowserCenRepApSelModeAlwaysAsk) - { - // Nothing to change - LOG(Log::Printf(_L("Browser already uses mode EBrowserCenRepApSelModeAlwaysAsk"))); - } - else - { - TInt err = repository->Set( KBrowserOccAccessPointSelectionMode, EBrowserCenRepApSelModeAlwaysAsk ); - LOG_1("Set KBrowserOccAccessPointSelectionMode -> EBrowserCenRepApSelModeAlwaysAsk, error code: %d", err); - } - - CleanupStack::PopAndDestroy( repository ); - } - else - { - LOG(Log::Printf(_L("Browser settings not changed because policy count > 1"))); - } - LOG(Log::Printf(_L("<- CPolicyStore::AddPolicyL"))); } diff -r 9f4e37332ce5 -r 473321461bba vpnengine/vpnmanager/src/vpnapiservant.cpp --- a/vpnengine/vpnmanager/src/vpnapiservant.cpp Thu Aug 19 10:54:34 2010 +0300 +++ b/vpnengine/vpnmanager/src/vpnapiservant.cpp Tue Aug 31 16:14:16 2010 +0300 @@ -1,5 +1,5 @@ /* -* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). +* Copyright (c) 2003 Nokia Corporation and/or its subsidiary(-ies). * All rights reserved. * This component and the accompanying materials are made available * under the terms of "Eclipse Public License v1.0" @@ -16,22 +16,15 @@ */ -#include -#include -#include "fileutil.h" #include "vpnapiservant.h" #include "policystore.h" #include "policyimporter.h" #include "pwdchanger.h" #include "vpnapidefs.h" #include "vpnmanagerserverdefs.h" -#include "vpnextapiservantdefs.h" #include "vpnmaninternal.h" #include "log_r6.h" -#include "agileprovisionws.h" -#include "agileprovisiondefs.h" -#include "cmmanagerutils.h" CVpnApiServant* CVpnApiServant::NewL(RFs& aFs) @@ -43,7 +36,7 @@ return self; } -CVpnApiServant::CVpnApiServant(RFs& aFs) : iFs(aFs), iFileUtil(aFs) +CVpnApiServant::CVpnApiServant(RFs& aFs) : iFs(aFs) { } @@ -120,36 +113,6 @@ UpdatePolicyDataL(aMessage); break; - - //Policy Provision Methods - case EExtCreateProvisionServer: - CreateProvisionServerL(aMessage); - break; - - case EExtVPNPolicyServerList: - ListProvisionServerL(aMessage); - break; - - case EExtVPNPolicyServerDetails: - GetProvisionServerDetailsL(aMessage); - break; - - case EExtSynchronizePolicyServer: - SynchronizeVPNPolicyServerL(aMessage); - break; - - case EExtDeletePolicyServer: - DeleteVPNPolicyServerL(aMessage); - break; - - case EExtCancelSynchronize: - CancelSynchronize(aMessage); - break; - - case EExtGetPolicyName: - GetVPNPolicyNameL(aMessage); - break; - default: requestHandled = EFalse; break; @@ -281,7 +244,7 @@ aMessage.Complete(ret); - LOG(Log::Printf(_L("CVpnApiServant::GetPolicyDetailsL: aMessage completed withd %d"), ret)); + LOG(Log::Printf(_L("CVpnApiServant::GetPolicyDetailsL: aMesage completed withd %d"), ret)); } void CVpnApiServant::DeletePolicyL(const RMessage2& aMessage) @@ -555,308 +518,3 @@ aMessage.Complete(KErrNone); } - -void CVpnApiServant::CreateProvisionServerL( const RMessage2& aMessage ) - { - TAgileProvisionApiServerSettings* serverCreate = new (ELeave) TAgileProvisionApiServerSettings(); - CleanupStack::PushL(serverCreate); - TPckg pckgServerCreate(*serverCreate); - aMessage.ReadL(0, pckgServerCreate); - TAgileProvisionServerLocals* serverAccountLocalData = new (ELeave) TAgileProvisionServerLocals(); - CleanupStack::PushL(serverAccountLocalData); - serverAccountLocalData->iSelection = serverCreate->iSelection; - serverAccountLocalData->iServerAddress.Copy(serverCreate->iServerUrl); - serverAccountLocalData->iServerNameLocal.Copy(serverCreate->iServerNameLocal); - - TFileName serverFilePath; - User::LeaveIfError(iFs.PrivatePath(serverFilePath)); - serverFilePath.Append(KProvisionServerSettings); - - /* Check if file allready exists and copy policy and vpn iap id to a new file */ - TFileName policyFileName; - TUint32 agileProvisionAPId=0; - - if ( iFileUtil.FileExists(serverFilePath) ) - { - HBufC8* fileData=iFileUtil.LoadFileDataL(serverFilePath); - CleanupStack::PushL(fileData); - - TPtrC8 restOfData = fileData->Des(); - - TInt bofInt; - TInt line=1; - while ( (bofInt=restOfData.Find(KCRLF)) != KErrNotFound && line < KPolicyFileLine ) - { - restOfData.Set(restOfData.Mid(bofInt + KCRLF().Length())); - line++; - } - TInt iapIdStart=restOfData.Find(KCRLF); - HBufC16* iapIdBuf; - - if ( iapIdStart!=KErrNotFound ) - { - TPtrC8 iapIdPtr=restOfData.Mid(iapIdStart + KCRLF().Length(),restOfData.Length()-KCRLF().Length()-iapIdStart); - iapIdBuf=iFileUtil.To16BitL(iapIdPtr); - CleanupStack::PushL(iapIdBuf); - TLex iapIdConverter(*iapIdBuf); - iapIdConverter.Val(agileProvisionAPId,EDecimal); - CleanupStack::PopAndDestroy(iapIdBuf); - } - - if ( agileProvisionAPId >0) - { - restOfData.Set(restOfData.Mid(0,iapIdStart)); - HBufC16* policyFileNameBuf = iFileUtil.To16BitL(restOfData); - policyFileName = *policyFileNameBuf; - delete policyFileNameBuf; - } - CleanupStack::PopAndDestroy(fileData); - } - /* end of saving old values */ - - //IAP data Max value 255 - TBuf<10> iapIdStr; - TBuf<10> iapModeStr; - TBuf<10> iapAgileIdStr; - - iapIdStr.Num(serverAccountLocalData->iSelection.iId); - iapModeStr.Num(serverAccountLocalData->iSelection.iResult); - HBufC* serverSettingsDataBuf; - if ( agileProvisionAPId >0 ) - { - iapAgileIdStr.Num(agileProvisionAPId); - - serverSettingsDataBuf = HBufC::NewL(serverAccountLocalData->iServerNameLocal.Length() + serverAccountLocalData->iServerAddress.Length() + - iapIdStr.Length() + iapModeStr.Length() + policyFileName.Length() + iapAgileIdStr.Length() + 5*(KCRLF().Length()) ); - } - else - { - serverSettingsDataBuf = HBufC::NewL(serverAccountLocalData->iServerNameLocal.Length() + serverAccountLocalData->iServerAddress.Length() + - iapIdStr.Length() + iapModeStr.Length() + 3*(KCRLF().Length()) ); - } - CleanupStack::PushL(serverSettingsDataBuf); - TPtr tPtr(serverSettingsDataBuf->Des()); - tPtr.Copy(serverAccountLocalData->iServerAddress); - _LIT(KCRLF, "\r\n"); - tPtr.Append(KCRLF); - tPtr.Append(serverAccountLocalData->iServerNameLocal); - tPtr.Append(KCRLF); - tPtr.Append(iapIdStr); - tPtr.Append(KCRLF); - tPtr.Append(iapModeStr); - if ( agileProvisionAPId >0 ) - { - tPtr.Append(KCRLF); - tPtr.Append(policyFileName); - tPtr.Append(KCRLF); - tPtr.Append(iapAgileIdStr); - } - - iFileUtil.SaveFileDataL(serverFilePath,tPtr); - CleanupStack::PopAndDestroy(3); - aMessage.Complete(KErrNone); - } - -void CVpnApiServant::ListProvisionServerL( const RMessage2& aMessage ) - { - _LIT8(KCRLF, "\r\n"); - - const TInt KEolLen = 2; - - TAgileProvisionApiServerListElem* serverList = new (ELeave) TAgileProvisionApiServerListElem(); - CleanupStack::PushL(serverList); - TPckg serverPckg(*serverList); - - TFileName serverFilePath; - User::LeaveIfError(iFs.PrivatePath(serverFilePath)); - serverFilePath.Append(KProvisionServerSettings); - - HBufC8* fileData(NULL); - - if ( iFileUtil.FileExists(serverFilePath) ) - { - fileData=iFileUtil.LoadFileDataL(serverFilePath); - CleanupStack::PushL(fileData); - TInt endOfLine=fileData->Find(KCRLF); - serverList->iServerUrl=fileData->Mid(0,endOfLine); - - TInt startOfLine(endOfLine+KEolLen); - TPtrC8 nameData=fileData->Right(fileData->Length()-startOfLine); - endOfLine=nameData.Find(KCRLF); - HBufC16* serverName=iFileUtil.To16BitL(nameData.Left(endOfLine)); - serverList->iServerNameLocal=*serverName; - delete serverName; - serverName = NULL; - } - - aMessage.WriteL(0, serverPckg); - if ( iFileUtil.FileExists(serverFilePath) ) - CleanupStack::PopAndDestroy(fileData); - - CleanupStack::PopAndDestroy(serverList); - aMessage.Complete(KErrNone); - } - -void CVpnApiServant::GetProvisionServerDetailsL( const RMessage2& aMessage ) - { - - TAgileProvisionApiServerSettings* serverList = new (ELeave) TAgileProvisionApiServerSettings(); - CleanupStack::PushL(serverList); - TPckg serverPckg(*serverList); - - _LIT8(KCRLF, "\r\n"); - - TFileName serverFilePath; - User::LeaveIfError(iFs.PrivatePath(serverFilePath)); - serverFilePath.Append(KProvisionServerSettings); - - HBufC8* fileData(NULL); - const TInt KEolLen = 2; - TBool serverFileExist = EFalse; - - if ( iFileUtil.FileExists(serverFilePath) ) - { - fileData=iFileUtil.LoadFileDataL(serverFilePath); - CleanupStack::PushL(fileData); - TInt endOfLine=fileData->Find(KCRLF); - serverList->iServerUrl=fileData->Mid(0,endOfLine); - - TInt startOfLine(endOfLine+2); - TPtrC8 nameData=fileData->Right(fileData->Length()-startOfLine); - endOfLine=nameData.Find(KCRLF); - - HBufC16* serverName=iFileUtil.To16BitL(nameData.Left(endOfLine)); - serverList->iServerNameLocal=*serverName; - delete serverName; - serverName = NULL; - - startOfLine = endOfLine + KEolLen; - TPtrC8 iapIdData=nameData.Right(nameData.Length()-startOfLine); - endOfLine=iapIdData.Find(KCRLF); - TLex8 iapIdConverter(iapIdData.Left(endOfLine)); - TUint idInt; - iapIdConverter.Val(idInt); - serverList->iSelection.iId = idInt; - - startOfLine = endOfLine + KEolLen; - TPtrC8 iapModeData=iapIdData.Right(iapIdData.Length()-startOfLine); - TLex8 iapModeConverter; - endOfLine=iapModeData.Find(KCRLF); - if ( endOfLine==KErrNotFound ) - iapModeConverter = iapModeData; - else - iapModeConverter = iapModeData.Left(endOfLine); - - iapModeConverter.Val(idInt); - CMManager::TCmSettingSelectionMode selectionMode = (CMManager::TCmSettingSelectionMode) idInt; - serverList->iSelection.iResult = selectionMode; - serverFileExist = ETrue; - } - aMessage.WriteL(0, serverPckg); - - if ( serverFileExist ) - CleanupStack::PopAndDestroy(fileData); - - CleanupStack::PopAndDestroy(serverList); - - aMessage.Complete(KErrNone); - } - -void CVpnApiServant::SynchronizeVPNPolicyServerL( const RMessage2& aMessage ) - { - iPolicyImporter = CPolicyImporter::NewL(aMessage, *this, *iPolicyStore, iFs); - - //Asynchronous call - iPolicyImporter->SynchronizeVpnPolicyServerL(); - } - -void CVpnApiServant::DeleteVPNPolicyServerL( const RMessage2& aMessage ) - { - TFileName serverFilePath; - User::LeaveIfError(iFs.PrivatePath(serverFilePath)); - serverFilePath.Append(KProvisionServerSettings); - iFileUtil.DeleteFileL(serverFilePath); - aMessage.Complete(KErrNone); - } - -void CVpnApiServant::CancelSynchronize( const RMessage2& aMessage ) - { - if (iPolicyImporter) - { - if ( iPolicyImporter->iAgileProvisionWs != NULL ) - { - CAgileProvisionWs* ws = iPolicyImporter->iAgileProvisionWs; - ws->CancelGetPolicy(); - } - iPolicyImporter->Cancel(); - delete iPolicyImporter; - iPolicyImporter = NULL; - } - aMessage.Complete(KErrCancel); - } - -void CVpnApiServant::GetVPNPolicyNameL( const RMessage2& aMessage ) - { - TAgileProvisionPolicy* policy = new (ELeave) TAgileProvisionPolicy(); - CleanupStack::PushL(policy); - TPckg serverPckg(*policy); - - _LIT8(KCRLF, "\r\n"); - - TFileName serverFilePath; - User::LeaveIfError(iFs.PrivatePath(serverFilePath)); - serverFilePath.Append(KProvisionServerSettings); - - HBufC8* fileData(NULL); - - const TInt KEolLen = 2; - TBool serverFileExist = EFalse; - - if ( iFileUtil.FileExists(serverFilePath) ) - { - fileData=iFileUtil.LoadFileDataL(serverFilePath); - CleanupStack::PushL(fileData); - TInt endOfLine=fileData->Find(KCRLF); - if (endOfLine<=0) - User::Leave(KErrArgument); - - TInt startOfLine(endOfLine + KEolLen); - TPtrC8 nameData=fileData->Right(fileData->Length()-startOfLine); - endOfLine=nameData.Find(KCRLF); - if (endOfLine<=0) - User::Leave(KErrArgument); - - startOfLine = endOfLine + KEolLen; - TPtrC8 iapIdData=nameData.Right(nameData.Length()-startOfLine); - endOfLine=iapIdData.Find(KCRLF); - if (endOfLine<=0) - User::Leave(KErrArgument); - - startOfLine = endOfLine + KEolLen; - TPtrC8 iapModeData=iapIdData.Right(iapIdData.Length()-startOfLine); - endOfLine=iapModeData.Find(KCRLF); - if (endOfLine<=0) - User::Leave(KErrArgument); - - startOfLine = endOfLine + KEolLen; - TPtrC8 policyData=iapModeData.Right(iapModeData.Length()-startOfLine); - endOfLine=policyData.Find(KCRLF); - if (endOfLine<=0) - User::Leave(KErrArgument); - - HBufC16* policyName = iFileUtil.To16BitL(policyData.Left(endOfLine)); - policy->iPolicyName = *policyName; - delete policyName; - policyName=NULL; - serverFileExist = ETrue; - } - - aMessage.WriteL(0, serverPckg); - - if ( serverFileExist ) - CleanupStack::PopAndDestroy(fileData); - - CleanupStack::PopAndDestroy(policy); - - aMessage.Complete(KErrNone); - } diff -r 9f4e37332ce5 -r 473321461bba vpnengine/vpnmanager/src/vpnmanagerserver.cpp --- a/vpnengine/vpnmanager/src/vpnmanagerserver.cpp Thu Aug 19 10:54:34 2010 +0300 +++ b/vpnengine/vpnmanager/src/vpnmanagerserver.cpp Tue Aug 31 16:14:16 2010 +0300 @@ -30,7 +30,7 @@ { 0, EVpnImportPolicy, - EExtGetPolicyName+1 + EVpnUpdatePolicyData+1 }; const TUint8 CVpnManagerServer::iVpnManElementIndex[iVpnManRangeCount] = diff -r 9f4e37332ce5 -r 473321461bba vpnui/vpnmanagementui/BMARM/VPNMANAGEMENTUIU.DEF --- a/vpnui/vpnmanagementui/BMARM/VPNMANAGEMENTUIU.DEF Thu Aug 19 10:54:34 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,5 +0,0 @@ -EXPORTS - NewUiRunnerL__Fv @ 1 NONAME R3UNUSED ; NewUiRunnerL(void) - NewLC__12CVpnUiLoaderRC5TRectG4TUid @ 2 NONAME R3UNUSED ; CVpnUiLoader::NewLC(TRect const &, TUid) - NewL__12CVpnUiLoaderRC5TRectG4TUid @ 3 NONAME R3UNUSED ; CVpnUiLoader::NewL(TRect const &, TUid) - diff -r 9f4e37332ce5 -r 473321461bba vpnui/vpnmanagementui/BWINS/VPNMANAGEMENTUIU.DEF --- a/vpnui/vpnmanagementui/BWINS/VPNMANAGEMENTUIU.DEF Thu Aug 19 10:54:34 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,3 +0,0 @@ -EXPORTS - ?ImplementationGroupProxy@@YAPBUTImplementationProxy@@AAH@Z @ 1 NONAME ; struct TImplementationProxy const * ImplementationGroupProxy(int &) - diff -r 9f4e37332ce5 -r 473321461bba vpnui/vpnmanagementui/EABI/vpnmanagementuiU.DEF --- a/vpnui/vpnmanagementui/EABI/vpnmanagementuiU.DEF Thu Aug 19 10:54:34 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,33 +0,0 @@ -EXPORTS - _ZTI12CVpnUiLoader @ 1 NONAME ; ## - _ZTI12CVpnUiRunner @ 2 NONAME ; ## - _ZTI14CAcuApiWrapper @ 3 NONAME ; ## - _ZTI14CVpnApiWrapper @ 4 NONAME ; ## - _ZTI16CVpnManagementUi @ 5 NONAME ; ## - _ZTI19CServerSettingsView @ 6 NONAME ; ## - _ZTI20CVpnManagementUiView @ 7 NONAME ; ## - _ZTI23CVpnManagementUiLogView @ 8 NONAME ; ## - _ZTI24CServerSettingsContainer @ 9 NONAME ; ## - _ZTI25CVpnManagementUiContainer @ 10 NONAME ; ## - _ZTI26CVpnManagementUiPolicyView @ 11 NONAME ; ## - _ZTI26CVpnManagementUiServerView @ 12 NONAME ; ## - _ZTI28CVpnManagementUiLogContainer @ 13 NONAME ; ## - _ZTI31CVpnManagementUiPolicyContainer @ 14 NONAME ; ## - _ZTI31CVpnManagementUiServerContainer @ 15 NONAME ; ## - _ZTV12CVpnUiLoader @ 16 NONAME ; ## - _ZTV12CVpnUiRunner @ 17 NONAME ; ## - _ZTV14CAcuApiWrapper @ 18 NONAME ; ## - _ZTV14CVpnApiWrapper @ 19 NONAME ; ## - _ZTV16CVpnManagementUi @ 20 NONAME ; ## - _ZTV19CServerSettingsView @ 21 NONAME ; ## - _ZTV20CVpnManagementUiView @ 22 NONAME ; ## - _ZTV23CVpnManagementUiLogView @ 23 NONAME ; ## - _ZTV24CServerSettingsContainer @ 24 NONAME ; ## - _ZTV25CVpnManagementUiContainer @ 25 NONAME ; ## - _ZTV26CVpnManagementUiPolicyView @ 26 NONAME ; ## - _ZTV26CVpnManagementUiServerView @ 27 NONAME ; ## - _ZTV28CVpnManagementUiLogContainer @ 28 NONAME ; ## - _ZTV31CVpnManagementUiPolicyContainer @ 29 NONAME ; ## - _ZTV31CVpnManagementUiServerContainer @ 30 NONAME ; ## - _Z24ImplementationGroupProxyRi @ 31 NONAME - diff -r 9f4e37332ce5 -r 473321461bba vpnui/vpnmanagementui/data/101F6D31.rss --- a/vpnui/vpnmanagementui/data/101F6D31.rss Thu Aug 19 10:54:34 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,45 +0,0 @@ -/* -* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* ECOM plugin resource file for VPN Management Ui plugin. -* -*/ - - -#include - - -RESOURCE REGISTRY_INFO theInfo - { - dll_uid = 0x101F6D31; // Plugin dll UID - interfaces = - { - INTERFACE_INFO - { - interface_uid = 0x10207236; // UID for CGSPluginInterface - implementations = - { - IMPLEMENTATION_INFO - { - implementation_uid = 0x101F6D32; // Plugin UID - version_no = 1; - display_name = "VPN Management Ui Plugin"; // Plugin debug name - default_data = "0x200255B9"; // Parent UID (Connection View) - opaque_data = "60"; // Order number - } - }; - } - }; - } - diff -r 9f4e37332ce5 -r 473321461bba vpnui/vpnmanagementui/data/vpnmanagementuirsc.rss --- a/vpnui/vpnmanagementui/data/vpnmanagementuirsc.rss Thu Aug 19 10:54:34 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1259 +0,0 @@ -/* -* Copyright (c) 2003-2007 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Resource definitions for project vpnmanagementui -* -*/ - - - -// RESOURCE IDENTIFIER -NAME VPNM // 4 letter ID - -// INCLUDES -#include -#include -#include -#include -#include - -#include -#include -#include - -#include - -#include "vpnmanagementui.hrh" - -// RESOURCE DEFINITIONS -RESOURCE RSS_SIGNATURE { } - -RESOURCE TBUF { buf="vpnui"; } - - -// **MANAGEMENT VIEW -//---------------------------------------------------- -// -// r_vpn_management_title -// Management view's title. -// -//---------------------------------------------------- -// -RESOURCE TITLE_PANE r_vpn_management_title - { - txt = qtn_vpn_management_title; - } - -RESOURCE TBUF r_vpn_management_title_buf - { - buf= qtn_set_folder_conn_vpn; - } - -//---------------------------------------------------- -// -// r_vpnui_management_view -// ?description -// -//---------------------------------------------------- -// -RESOURCE AVKON_VIEW r_vpnui_management_view - { - menubar=r_vpnui_menubar_management_view; - cba=R_AVKON_SOFTKEYS_SELECTION_LIST; - } - -//---------------------------------------------------- -// -// r_msk_open -// MiddleSoftKey in vpn management view -// -//---------------------------------------------------- -// -RESOURCE TBUF r_msk_open - { - buf= qtn_msk_open; - } - -//---------------------------------------------------- -// -// r_vpnui_menubar_management_view -// ?description -// -//---------------------------------------------------- -// -RESOURCE MENU_BAR r_vpnui_menubar_management_view - { - titles= - { - //MENU_TITLE { menu_pane=r_vpnui_app_menu; txt="App"; }, - MENU_TITLE { menu_pane=r_vpnui_management_view_menu; txt="View"; } - }; - } - -//---------------------------------------------------- -// -// r_vpnui_management_view_menu -// ?description -// -//---------------------------------------------------- -// -RESOURCE MENU_PANE r_vpnui_management_view_menu - { - items= - { - MENU_ITEM { command=EVpnUiCmdOpen; txt = qtn_set_options_open; flags = EEikMenuItemAction; }, - #ifdef __SERIES60_HELP - MENU_ITEM { command = EAknCmdHelp; txt = qtn_options_help; }, - #endif //__SERIES60_HELP - - MENU_ITEM { command=EAknCmdExit; txt = qtn_options_exit; } - }; - } - -//---------------------------------------------------- -// -// r_vpn_policies -// First item in VPN management view's list -// -//---------------------------------------------------- -// -RESOURCE TBUF r_vpn_policies - { - buf= "\t"qtn_vpn_policies; - } - -//---------------------------------------------------- -// -// r_vpn_policy_servers -// Second item in VPN management view's list -// -//---------------------------------------------------- -// -RESOURCE TBUF r_vpn_policy_servers - { - buf= "\t"qtn_vpn_policy_servers; - } - -//---------------------------------------------------- -// -// r_vpn_log -// Third item in VPN management view's list -// -//---------------------------------------------------- -// -RESOURCE TBUF r_vpn_log - { - buf= "\t"qtn_vpn_log; - } - -// **VPN Policies view -//---------------------------------------------------- -// -// r_vpn_policies_title -// VPN policies view's title -// -//---------------------------------------------------- -// -RESOURCE TITLE_PANE r_vpn_policies_title - { - txt= qtn_vpn_policies_title; - } - -//---------------------------------------------------- -// -// r_vpnui_policies_view -// VPN UI Policies View Menubar & Soft keys -// -//---------------------------------------------------- -// -RESOURCE AVKON_VIEW r_vpnui_policies_view - { - menubar=r_vpnui_policies_view_menubar; - cba=R_AVKON_SOFTKEYS_OPTIONS_BACK; - } - -//---------------------------------------------------- -// -// r_msk_install_vpn_policies -// MiddleSoftKey for empty policies view -// -//---------------------------------------------------- -// -RESOURCE TBUF r_msk_install_vpn_policies - { - buf= qtn_msk_install_vpn_policies; - } - -//---------------------------------------------------- -// -// r_msk_vpn_details -// MiddleSoftKey for policies view -// -//---------------------------------------------------- -// -RESOURCE TBUF r_msk_vpn_details - { - buf= qtn_msk_vpn_details; - } - -//---------------------------------------------------- -// -// r_vpnui_policies_view_menubar -// Menubar for VPN policies view -// -//---------------------------------------------------- -// -RESOURCE MENU_BAR r_vpnui_policies_view_menubar - { - titles= - { - MENU_TITLE { menu_pane=r_vpnui_policies_view_menu; } - }; - } - -//---------------------------------------------------- -// -// r_vpnui_policies_view_menu -// Menu pane for VPN policies view -// -//---------------------------------------------------- -// -RESOURCE MENU_PANE r_vpnui_policies_view_menu - { - items= - { - MENU_ITEM { - command=EVpnUiCmdPolicyDetails; - txt = qtn_vpn_options_policy_details; - flags=EEikMenuItemSpecific; - }, - - MENU_ITEM { - command=EVpnUiCmdDeletePolicy; - txt = qtn_vpn_options_delete_policy; - flags=EEikMenuItemSpecific; - }, - -#ifdef __SERIES60_HELP - MENU_ITEM { command = EAknCmdHelp; txt = qtn_options_help; }, -#endif //__SERIES60_HELP - - MENU_ITEM { command=EAknCmdExit; txt = qtn_options_exit; } - }; - } - -//---------------------------------------------------- -// -// r_vpn_policies_empty -// Empty Policy list text -// -//---------------------------------------------------- -// -RESOURCE TBUF r_vpn_policies_empty - { - buf = qtn_vpn_policies_empty; - } - -//---------------------------------------------------- -// -// r_vpn_quest_dl_policies_now -// Install policies from server query -// -//---------------------------------------------------- -// -RESOURCE TBUF r_vpn_quest_dl_policies_now - { - buf = qtn_vpn_quest_dl_policies_now; - } - -//---------------------------------------------------- -// -// r_vpn_quest_delete_policy -// Delete a VPN policy query not associated -// -//---------------------------------------------------- -// -RESOURCE TBUF r_vpn_quest_delete_policy - { - buf = qtn_vpn_quest_delete_policy; - } - -//---------------------------------------------------- -// -// r_vpn_quest_delete_policy_associated -// Delete a VPN policy query associated -// -//---------------------------------------------------- -// -RESOURCE TBUF r_vpn_quest_delete_policy_associated - { - buf = qtn_vpn_quest_delete_policy_associated; - } - - -// **VPN policy servers view -//---------------------------------------------------- -// -// r_vpn_policy_servers_title -// VPN policy servers view's title -// -//---------------------------------------------------- -// -RESOURCE TITLE_PANE r_vpn_policy_servers_title - { - txt= qtn_vpn_policy_servers_title; - } - - -//---------------------------------------------------- -// -// r_vpnui_policy_servers_view -// VPN UI Policy Server View Menubar & Soft keys -// -//---------------------------------------------------- -// -RESOURCE AVKON_VIEW r_vpnui_policy_servers_view - { - menubar=r_vpnui_policy_servers_view_menubar; - cba=R_AVKON_SOFTKEYS_OPTIONS_BACK; - } - -//---------------------------------------------------- -// -// r_msk_add_vpn_server -// MiddleSoftKey for servers view -// -//---------------------------------------------------- -// -RESOURCE TBUF r_msk_add_vpn_server - { - buf= qtn_msk_add_vpn_server; - } - -//---------------------------------------------------- -// -// r_msk_edit -// MiddleSoftKey for servers view -// -//---------------------------------------------------- -// -RESOURCE TBUF r_msk_edit - { - buf= qtn_msk_edit; - } - -//---------------------------------------------------- -// -// r_vpnui_policy_servers_view_menubar -// Menubar for VPN policy servers view -// -//---------------------------------------------------- -// -RESOURCE MENU_BAR r_vpnui_policy_servers_view_menubar - { - titles= - { - MENU_TITLE { menu_pane=r_vpnui_policy_servers_view_menu; } - }; - } - -//---------------------------------------------------- -// -// r_vpnui_policy_servers_view_menu -// Menu pane for VPN policy servers view -// -//---------------------------------------------------- -// -RESOURCE MENU_PANE r_vpnui_policy_servers_view_menu - { - items= - { - MENU_ITEM { - command=EVpnUiCmdEditServer; - txt = qtn_vpn_options_edit_server; }, - MENU_ITEM { - command=EVpnUiCmdAddServer; - txt = qtn_vpn_options_add_new_server; }, - MENU_ITEM { - command=EVpnUiCmdSynchronise; - txt = qtn_vpn_options_synchronise_server; }, - MENU_ITEM { - command=EVpnUiCmdDeleteServer; - txt = qtn_vpn_options_delete_server; }, - -#ifdef __SERIES60_HELP - MENU_ITEM { command = EAknCmdHelp; txt = qtn_options_help; }, -#endif //__SERIES60_HELP - - MENU_ITEM { command=EAknCmdExit; txt = qtn_options_exit; } - }; - } - -//---------------------------------------------------- -// -// r_vpn_policy_servers_empty -// Empty Policy servers list text -// -//---------------------------------------------------- -// -RESOURCE TBUF r_vpn_policy_servers_empty - { - buf = qtn_vpn_policy_servers_empty; - } - -//---------------------------------------------------- -// -// r_vpn_quest_define_new_server -// Define a policy server query -// -//---------------------------------------------------- -// -RESOURCE TBUF r_vpn_quest_define_new_server - { - buf = qtn_vpn_quest_define_new_server; - } - -//---------------------------------------------------- -// -// r_vpn_quest_synchronise_server -// Synchronise server query -// -//---------------------------------------------------- -// -RESOURCE TBUF r_vpn_quest_synchronise_server - { - buf = qtn_vpn_quest_synchronise_server; - } - -//---------------------------------------------------- -// -// r_vpn_quest_delete_server -// Delete a VPN policy server -// No policies related to the server -// -//---------------------------------------------------- -// -RESOURCE TBUF r_vpn_quest_delete_server - { - buf = qtn_vpn_quest_delete_server; - } - -//---------------------------------------------------- -// -// r_vpn_quest_delete_server_associated -// Delete a VPN policy server -// Policies related to the server -// -//---------------------------------------------------- -// -RESOURCE TBUF r_vpn_quest_delete_server_associated - { - buf = qtn_vpn_quest_delete_server_associated; - } - -//---------------------------------------------------- -// -// r_vpn_info_policy_server_in_use -// Policy server currently in use information note -// -//---------------------------------------------------- -// -RESOURCE TBUF r_vpn_info_policy_server_in_use - { - buf = qtn_vpn_info_policy_server_in_use; - } - -//---------------------------------------------------- -// -// r_list_query -// Policy server selection pop-up -// -//---------------------------------------------------- -// -RESOURCE DIALOG r_list_query - { - flags=EGeneralQueryFlags; - buttons=R_AVKON_SOFTKEYS_SELECT_CANCEL; - items= - { - DLG_LINE - { - type = EAknCtListQueryControl; - id = EListQueryControl; //Avkon.hrh - control = AVKON_LIST_QUERY_CONTROL - { - listtype = EAknCtSinglePopupMenuListBox; - listbox = LISTBOX - { - flags = EAknListBoxMenuList; - }; - heading = qtn_vpn_prmpt_policy_server_selection; - }; - } - }; - } - -//---------------------------------------------------- -// -// r_msk_change -// MiddleSoftKey in vpn server parameters view -// -//---------------------------------------------------- -// -RESOURCE TBUF r_msk_change - { - buf= qtn_msk_change; - } - - -// **VPN log view -//---------------------------------------------------- -// -// r_vpn_log_title -// VPN log view's title -// -//---------------------------------------------------- -// -RESOURCE TITLE_PANE r_vpn_log_title - { - txt= qtn_vpn_log_title; - } - -//---------------------------------------------------- -// -// r_vpnui_log_view -// VPN UI Log View Menubar & Soft keys -// -//---------------------------------------------------- -// -RESOURCE AVKON_VIEW r_vpnui_log_view - { - menubar=r_vpnui_log_view_menubar; - cba=R_AVKON_SOFTKEYS_OPTIONS_BACK; - } - -//---------------------------------------------------- -// -// r_msk_refresh_vpn_log -// MiddleSoftKey for log view -// -//---------------------------------------------------- -// -RESOURCE TBUF r_msk_refresh_vpn_log - { - buf= qtn_msk_refresh_vpn_log; - } - -//---------------------------------------------------- -// -// r_vpnui_log_view_menubar -// Menubar for VPN log view -// -//---------------------------------------------------- -// -RESOURCE MENU_BAR r_vpnui_log_view_menubar - { - titles= - { - MENU_TITLE { menu_pane=r_vpnui_log_view_menu; txt="View log"; } - }; - } - - -//---------------------------------------------------- -// -// r_vpnui_log_view_menu -// Menu pane for VPN log view -// -//---------------------------------------------------- -// -RESOURCE MENU_PANE r_vpnui_log_view_menu - { - items= - { - MENU_ITEM { - command=EVpnUiCmdLogDetails; - txt = qtn_logs_cmd_details; - flags=EEikMenuItemSpecific; - }, - MENU_ITEM { - command=EVpnUiCmdRefreshLog; - txt = qtn_vpn_options_refresh_log; }, - MENU_ITEM { - command=EVpnUiCmdClearLog; - txt = qtn_logs_cmd_clear_list; }, - -#ifdef __SERIES60_HELP - MENU_ITEM { command = EAknCmdHelp; txt = qtn_options_help; }, -#endif //__SERIES60_HELP - - MENU_ITEM { command=EAknCmdExit; txt = qtn_options_exit; } - }; - } - -//---------------------------------------------------- -// -// r_vpn_log_empty -// Empty VPN log list text -// -//---------------------------------------------------- -// -RESOURCE TBUF r_vpn_log_empty - { - buf = qtn_vpn_log_empty; - } - -//---------------------------------------------------- -// -// r_vpn_quest_clear_log -// Clear a VPN log confirmation query -// -//---------------------------------------------------- -// -RESOURCE TBUF r_vpn_quest_clear_log - { - buf = qtn_vpn_quest_clear_log; - } - -//---------------------------------------------------- -// -// r_vpn_navi_client_version -// Version text in VPN log navi pane -// -//---------------------------------------------------- -// -RESOURCE TBUF r_vpn_navi_client_version - { - buf = qtn_vpn_navi_client_version; - } - - -//---------------------------------------------------- -// -// r_vpn_log_icon_array -// Icons in the vpn log view. -// -//---------------------------------------------------- -// -RESOURCE AKN_ICON_ARRAY r_vpn_log_icon_array - { - bmpfile = "\\resource\\apps\\vpnmanagementui.mbm"; - - icons = - { - AKN_ICON - { - iconId = EMbmVpnmanagementuiQgn_prop_vpn_log_info; - maskId = EMbmVpnmanagementuiQgn_prop_vpn_log_info_mask; - }, - AKN_ICON - { - iconId = EMbmVpnmanagementuiQgn_prop_vpn_log_warn; - maskId = EMbmVpnmanagementuiQgn_prop_vpn_log_warn_mask; - }, - AKN_ICON - { - iconId = EMbmVpnmanagementuiQgn_prop_vpn_log_error; - maskId = EMbmVpnmanagementuiQgn_prop_vpn_log_error_mask; - } - }; - } - - -// **VPN Policy and VPN log details -//---------------------------------------------------- -// -// r_message_query_details_view -// VPN policy and VPN log details message query -// -//---------------------------------------------------- -// -RESOURCE DIALOG r_message_query_details_view - { - flags = EGeneralQueryFlags | EEikDialogFlagNoBorder | EEikDialogFlagNoShadow; - buttons = R_AVKON_SOFTKEYS_OK_EMPTY; - items= - { - DLG_LINE - { - type = EAknCtPopupHeadingPane; - id = EAknMessageQueryHeaderId; - control = AVKON_HEADING - { - }; - }, - DLG_LINE - { - type = EAknCtMessageQuery; - id = EAknMessageQueryContentId; - control = AVKON_MESSAGE_QUERY - { - }; - } - }; - } - -//---------------------------------------------------- -// -// r_confirmation_query -// Confirmation query -// -//---------------------------------------------------- -// -RESOURCE DIALOG r_confirmation_query - { - flags=EGeneralQueryFlags; - buttons=R_AVKON_SOFTKEYS_YES_NO; - items= - { - DLG_LINE - { - type=EAknCtQuery; - id=EGeneralQuery; - control= AVKON_CONFIRMATION_QUERY - { - layout = EConfirmationLayout; - }; - } - }; - } - -//*************************** - -//---------------------------------------------------- -// -// r_vpn_detail_policy_description -// Text for detail's topic -// -//---------------------------------------------------- -// -RESOURCE TBUF r_vpn_detail_policy_description - { - buf = qtn_vpn_detail_policy_description; - } - -//---------------------------------------------------- -// -// r_vpn_detail_policy_status -// Text for detail's topic -// -//---------------------------------------------------- -// -RESOURCE TBUF r_vpn_detail_policy_status - { - buf = qtn_vpn_detail_policy_status; - } - -//---------------------------------------------------- -// -// r_vpn_detail_cert_status -// Text for detail's topic -// -//---------------------------------------------------- -// -RESOURCE TBUF r_vpn_detail_cert_status - { - buf = qtn_vpn_detail_cert_status; - } - -//---------------------------------------------------- -// -// r_vpn_detail_policy_name -// Text for detail's topic -// -//---------------------------------------------------- -// -RESOURCE TBUF r_vpn_detail_policy_name - { - buf = qtn_vpn_detail_policy_name; - } - -//---------------------------------------------------- -// -// r_vpn_detail_source_server_name -// Text for detail's topic -// -//---------------------------------------------------- -// -RESOURCE TBUF r_vpn_detail_source_server_name - { - buf = qtn_vpn_detail_source_server_name; - } - -//---------------------------------------------------- -// -// r_vpn_detail_policy_update_time -// Text for detail's topic -// -//---------------------------------------------------- -// -RESOURCE TBUF r_vpn_detail_policy_update_time - { - buf = qtn_vpn_detail_policy_update_time; - } - -//---------------------------------------------------- -// -// r_vpn_detail_policy_not_associated -// Text for detailed info -// -//---------------------------------------------------- -// -RESOURCE TBUF r_vpn_detail_policy_not_associated - { - buf = qtn_vpn_detail_policy_not_associated; - } - -//---------------------------------------------------- -// -// r_vpn_detail_policy_associated -// Text for detailed info -// -//---------------------------------------------------- -// -RESOURCE TBUF r_vpn_detail_policy_associated - { - buf = qtn_vpn_detail_policy_associated; - } - -//---------------------------------------------------- -// -// r_vpn_detail_policy_active -// Text for detailed info -// -//---------------------------------------------------- -// -RESOURCE TBUF r_vpn_detail_policy_active - { - buf = qtn_vpn_detail_policy_active; - } - -//---------------------------------------------------- -// -// r_vpn_detail_cert_status_ok -// Text for detailed info -// -//---------------------------------------------------- -// -RESOURCE TBUF r_vpn_detail_cert_status_ok - { - buf = qtn_vpn_detail_cert_status_ok; - } - -//---------------------------------------------------- -// -// r_vpn_detail_cert_status_expired -// Text for detailed info -// -//---------------------------------------------------- -// -RESOURCE TBUF r_vpn_detail_cert_status_expired - { - buf = qtn_vpn_detail_cert_status_expired; - } - -//---------------------------------------------------- -// -// r_vpn_detail_cert_status_missing -// Text for detailed info -// -//---------------------------------------------------- -// -RESOURCE TBUF r_vpn_detail_cert_status_missing - { - buf = qtn_vpn_detail_cert_status_missing; - } - -//---------------------------------------------------- -// -// r_vpn_detail_cert_status_not_yet_valid -// Text for detailed info -// -//---------------------------------------------------- -// -RESOURCE TBUF r_vpn_detail_cert_status_not_yet_valid - { - buf = qtn_vpn_detail_cert_status_not_yet_valid; - } - -//---------------------------------------------------- -// -// r_vpn_detail_log_entry_info -// Text for detailed info -// -//---------------------------------------------------- -// -RESOURCE TBUF r_vpn_detail_log_entry_info - { - buf = "Information:"; - } - -//---------------------------------------------------- -// -// r_vpn_detail_log_entry_warning -// Text for detailed info -// -//---------------------------------------------------- -// -RESOURCE TBUF r_vpn_detail_log_entry_warning - { - buf = "Warning:"; - } - -//---------------------------------------------------- -// -// r_vpn_detail_log_entry_error -// Text for detailed info -// -//---------------------------------------------------- -// -RESOURCE TBUF r_vpn_detail_log_entry_error - { - buf = "Error:"; - } - -// **VPN Policy server parameters view - -//---------------------------------------------------- -// -// r_vpnmanagementui_server_parameters_view -// Server parameters view Menubar & Soft keys -// -//---------------------------------------------------- -// -RESOURCE AVKON_VIEW r_vpnmanagementui_server_parameters_view - { - menubar=r_vpnmanagementui_server_parameters_view_menubar; - cba=R_AVKON_SOFTKEYS_OPTIONS_BACK; - } - -//---------------------------------------------------- -// -// r_vpnmanagementui_server_parameters_view_menubar -// Menubar for VPN policy server parameters view -// -//---------------------------------------------------- -// -RESOURCE MENU_BAR r_vpnmanagementui_server_parameters_view_menubar - { - titles= - { - MENU_TITLE { menu_pane=r_vpnmanagementui_server_parameters_view_menu; txt="View parameters"; } - }; - } - -//---------------------------------------------------- -// -// r_vpnmanagementui_server_parameters_view_menu -// Menu pane for VPN policy server parameters view -// -//---------------------------------------------------- -// -RESOURCE MENU_PANE r_vpnmanagementui_server_parameters_view_menu - { - items= - { - MENU_ITEM { command=EVpnUiCmdChange;txt = qtn_set_options_change; }, - -#ifdef __SERIES60_HELP - MENU_ITEM { command = EAknCmdHelp; txt = qtn_options_help; }, -#endif //__SERIES60_HELP - - MENU_ITEM { command=EAknCmdExit; txt = qtn_options_exit; } - }; - } - -//---------------------------------------------------- -// r_text_resource_server_parameters_view_empty_list -//---------------------------------------------------- -// -RESOURCE TBUF r_text_resource_server_parameters_view_empty_list - { - buf = qtn_log_empty_list; - } - -//---------------------------------------------------- -// -// r_vpn_quest_incomplete_server_def_delete -// Incomplete VPN policy server definition query -// -//---------------------------------------------------- -// -RESOURCE TBUF r_vpn_quest_incomplete_server_def_delete - { - buf = qtn_vpn_quest_incomplete_server_def_delete; - } - -//---------------------------------------------------- -// -// r_fldr_name_already_used -// Name already in use note -// -//---------------------------------------------------- -// -RESOURCE TBUF r_fldr_name_already_used - { - buf = qtn_fldr_name_already_used; - } - - -// **VPN policy server name text setting page -//---------------------------------------------------- -// -// r_server_name_setting_page -//---------------------------------------------------- -// -RESOURCE AVKON_SETTING_PAGE r_server_name_setting_page - { - label= qtn_vpn_sett_policy_server_name; - softkey_resource = R_AVKON_SOFTKEYS_OK_CANCEL; - type = EEikCtEdwin; - editor_resource_id = r_server_name_edwin; - } - -//---------------------------------------------------- -// -// r_server_name_edwin -// Server name editor. -// -//---------------------------------------------------- -// -RESOURCE EDWIN r_server_name_edwin - { - width = 9; - lines = 5; - maxlength = 30; - allowed_input_modes = EAknEditorTextInputMode |EAknEditorNumericInputMode; - avkon_flags = EAknEditorFlagNoT9; - flags= EEikEdwinNoLineOrParaBreaks; - } - -// **VPN policy server address text setting page -//---------------------------------------------------- -// -// r_server_address_setting_page -// -// -//---------------------------------------------------- -// -RESOURCE AVKON_SETTING_PAGE r_server_address_setting_page - { - label= qtn_vpn_sett_policy_server_address; - softkey_resource = R_AVKON_SOFTKEYS_OK_CANCEL; - type = EEikCtEdwin; - editor_resource_id = r_server_address_edwin; - } - -//---------------------------------------------------- -// -// r_server_address_edwin -// Server address editor. -// -//---------------------------------------------------- -// -RESOURCE EDWIN r_server_address_edwin - { - width = 9; - lines = 5; - maxlength = 512; - numeric_keymap=EAknEditorCalculatorNumberModeKeymap; - allowed_input_modes = EAknEditorTextInputMode |EAknEditorNumericInputMode; - default_input_mode = EAknEditorTextInputMode; - special_character_table = R_AVKON_URL_SPECIAL_CHARACTER_TABLE_DIALOG; - default_case = EAknEditorLowerCase; - allowed_case_modes = EAknEditorLowerCase | EAknEditorUpperCase; - avkon_flags = EAknEditorFlagNoT9 | EAknEditorFlagLatinInputModesOnly; - flags= EEikEdwinAutoSelection | EAknEditorLowerCase | EEikEdwinNoLineOrParaBreaks; - } - -// ***************************************************** -// **CONFIRMATION QUERIES - -// **CONFIRMATION NOTES -//---------------------------------------------------- -// -// r_vpn_conf_policy_server_sync_ok -// VPN synchronisation OK confirmation note -// -//---------------------------------------------------- -// -RESOURCE TBUF r_vpn_conf_policy_server_sync_ok - { - buf = qtn_vpn_conf_policy_server_sync_ok; - } - -//---------------------------------------------------- -// -// r_vpn_conf_policy_update_complete -// VPN policy update OK confirmation note -// -//---------------------------------------------------- -// -RESOURCE TBUF r_vpn_conf_policy_update_complete - { - buf = qtn_vpn_conf_policy_update_complete; - } - -// **INFORMATION NOTES - -//---------------------------------------------------- -// -// r_vpn_info_cannot_modify_server_def -// Cannot be modified information note -// -//---------------------------------------------------- -// -RESOURCE TBUF r_vpn_info_cannot_modify_server_def - { - buf = qtn_vpn_info_cannot_modify_server_def; - } - -//---------------------------------------------------- -// -// r_vpn_info_policy_dl_error -// Policy update failed information note -// -//---------------------------------------------------- -// -RESOURCE TBUF r_vpn_info_policy_dl_error - { - buf = qtn_vpn_info_policy_dl_error; - } - -//---------------------------------------------------- -// -// r_vpn_info_server_cert_expired -// Server certificate expired information note -// -//---------------------------------------------------- -// -RESOURCE TBUF r_vpn_info_server_cert_expired - { - buf = qtn_vpn_info_server_cert_expired; - } - -//---------------------------------------------------- -// -// r_vpn_info_policy_server_sync_error -// Synchronisation failed information note -// -//---------------------------------------------------- -// -RESOURCE TBUF r_vpn_info_policy_server_sync_error - { - buf = qtn_vpn_info_policy_server_sync_error; - } - - -// **WAIT NOTES - -//---------------------------------------------------- -// -// r_vpn_connecting_via_ap -// wait note text for synchronise and update notes -// -//---------------------------------------------------- -// -RESOURCE TBUF r_vpn_connecting_via_ap - { - buf = qtn_vpn_connecting_via_ap; - } - -//---------------------------------------------------- -// -// r_vpn_wait_policy_dl_processing -// wait note text for synchronise and update notes -// -//---------------------------------------------------- -// -RESOURCE TBUF r_vpn_wait_policy_dl_processing - { - buf = qtn_vpn_wait_policy_dl_processing; - } - -//---------------------------------------------------- -// -// r_vpn_wait_importing_policy -// wait note for synchronizing and importing policy -// -//---------------------------------------------------- -// -RESOURCE TBUF r_vpn_wait_importing_policy - { - buf = qtn_vpn_wait_importing_policy; - } - -//---------------------------------------------------- -// -// r_vpn_wait_note -// wait note for synchronise and update process -// -//---------------------------------------------------- -// -RESOURCE DIALOG r_vpn_wait_note - { - flags = EAknProgressNoteFlags; - buttons = R_AVKON_SOFTKEYS_CANCEL; - items = - { - DLG_LINE - { - type = EAknCtNote; - id = EVpnUiWaitNote; - control= AVKON_NOTE - { - layout = EWaitLayout; - singular_label = ""; - plural_label = ""; - animation = R_QGN_GRAF_WAIT_BAR_ANIM; - }; - } - }; - } - -//------------------------------------------------------------------------------ -// r_vpn_server_setting_list -//------------------------------------------------------------------------------ -// -RESOURCE AVKON_SETTING_ITEM_LIST r_vpn_server_setting_list - { - items = - { - AVKON_SETTING_ITEM - { - identifier = EVpnUiSettingServerName; - setting_page_resource = r_server_name_setting_page; - name = qtn_vpn_sett_policy_server_name; - empty_item_text = qtn_selec_sett_val_field_none; - }, - AVKON_SETTING_ITEM - { - identifier = EVpnUiSettingServerAddress; - setting_page_resource = r_server_address_setting_page; - name = qtn_vpn_sett_policy_server_address; - empty_item_text = qtn_set_compulsory; - compulsory_ind_string = "*"; - }, - AVKON_SETTING_ITEM - { - identifier = EVpnUiSettingIap; - name = qtn_vpn_sett_vpn_iap_real_netw_reference; - empty_item_text = qtn_set_compulsory; - compulsory_ind_string = "*"; - } - - }; - } - - -// End of File diff -r 9f4e37332ce5 -r 473321461bba vpnui/vpnmanagementui/group/bld.inf --- a/vpnui/vpnmanagementui/group/bld.inf Thu Aug 19 10:54:34 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,41 +0,0 @@ -/* -* Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Build information file for vpnmanagementui -* -*/ - -#include - -PRJ_PLATFORMS - -PRJ_EXPORTS -// export localised loc file -../loc/vpnmanagementui.loc MW_LAYER_LOC_EXPORT_PATH(vpnmanagementui.loc) - -PRJ_MMPFILES - -vpnmanagementui.mmp - -PRJ_EXTENSIONS - -START EXTENSION s60/mifconv -OPTION TARGETFILE vpnmanagementui.mif -OPTION HEADERFILE vpnmanagementui.mbg -OPTION SOURCES -c8,8 qgn_prop_vpn_log_info \ - -c8,8 qgn_prop_vpn_log_warn \ - -c8,8 qgn_prop_vpn_log_error \ - -c16,8 qgn_prop_set_conn_vpn -END - -PRJ_TESTMMPFILES diff -r 9f4e37332ce5 -r 473321461bba vpnui/vpnmanagementui/group/vpnmanagementui.mmp --- a/vpnui/vpnmanagementui/group/vpnmanagementui.mmp Thu Aug 19 10:54:34 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,134 +0,0 @@ -/* -* Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Project definition file for project vpnmanagementui -* -*/ - -#include -#include -#include - -TARGET vpnmanagementui.dll -TARGETTYPE PLUGIN -UID 0x10009D8D 0x101F6D31 - -CAPABILITY CAP_ECOM_PLUGIN -VENDORID VID_DEFAULT - -SOURCEPATH ../data - -//ECOM resource definition -START RESOURCE 101F6D31.rss -TARGET vpnmanagementui.rsc -END - -START RESOURCE vpnmanagementuirsc.rss -HEADER -TARGETPATH RESOURCE_FILES_DIR -LANGUAGE_IDS -END - -SOURCEPATH ../src -SOURCE vpnmanagementuiview.cpp -SOURCE vpnmanagementuicontainer.cpp -SOURCE vpnmanagementuipolicyview.cpp -SOURCE vpnmanagementuiserverview.cpp -SOURCE vpnmanagementuilogview.cpp -SOURCE vpnmanagementuipolicycontainer.cpp -SOURCE vpnmanagementuiservercontainer.cpp -SOURCE vpnmanagementuilogcontainer.cpp -SOURCE vpnmanagementuiserversettingscontainer.cpp -SOURCE vpnmanagementuiserversettingsview.cpp -SOURCE vpnuiloader.cpp -SOURCE vpnapiwrapper.cpp -SOURCE vpnmanagementuiimplementationtable.cpp -SOURCE serversettingconnectionsettingitem.cpp - -USERINCLUDE . ../inc -USERINCLUDE ../data -USERINCLUDE ../../../vpnengine/pkiserviceapi/inc -USERINCLUDE ../../../vpnengine/eventmediatorapi/inc -USERINCLUDE ../../../vpnengine/vpnmanager/inc -USERINCLUDE ../../../vpnengine/kmdserver/inc -USERINCLUDE ../../../vpnengine/eventviewer/inc -USERINCLUDE ../../../vpnapiimpl/inc -USERINCLUDE ../../../vpnengine/vpncommon/inc //for logcommon.h -USERINCLUDE ../../vpnecomnotifier/data -USERINCLUDE ../../../vpnengine/vpnextapi/inc - -MW_LAYER_SYSTEMINCLUDE -APP_LAYER_SYSTEMINCLUDE - -LIBRARY commonengine.lib // StringLoader.h -LIBRARY eikctl.lib // markable icons -LIBRARY euser.lib -LIBRARY GSFramework.lib -LIBRARY GSEcomPlugin.lib -LIBRARY cone.lib -LIBRARY eikcore.lib -LIBRARY eikcoctl.lib -LIBRARY avkon.lib -LIBRARY bafl.lib -LIBRARY commdb.lib -LIBRARY efsrv.lib -LIBRARY sysutil.lib -LIBRARY commonui.lib -LIBRARY vpnapi.lib -LIBRARY eventmedapi.lib -LIBRARY eventviewer.lib -LIBRARY centralrepository.lib -LIBRARY cmmanager.lib -LIBRARY vpnextapi.lib -#ifdef __SCALABLE_ICONS -LIBRARY AknSkins.lib -#endif //__SCALABLE_ICONS -DEBUGLIBRARY flogger.lib - -#ifdef __SERIES60_HELP -LIBRARY hlplch.lib // for "Help" options menu -#endif //__SERIES60_HELP - -#ifndef __SCALABLE_ICONS -// Bitmaps for VPN log view -START BITMAP vpnmanagementui.mbm -HEADER - -SOURCEPATH S60_SRC_BITMAP_DIR - -TARGETPATH RESOURCE_FILES_DIR - -// VPN log icons -SOURCE c8 qgn_prop_vpn_log_info.bmp // Information -SOURCE c8 qgn_prop_vpn_log_warn.bmp // Warning -SOURCE c8 qgn_prop_vpn_log_error.bmp // Error - -// VPN GS listbox icon -SOURCE c16 qgn_prop_set_conn_vpn.bmp - -// Masks for VPN log icons -SOURCE c8 qgn_prop_vpn_log_info_mask.bmp // Information -SOURCE c8 qgn_prop_vpn_log_warn_mask.bmp // Warning -SOURCE c8 qgn_prop_vpn_log_error_mask.bmp // Error - -// Mask for VPN GS listbox icon -SOURCE c8 qgn_prop_set_conn_vpn_mask.bmp - -END - -// - used only by Codewarrior for convenience. -DOCUMENT 101F6D31.rss - -#endif - -// end of file \ No newline at end of file diff -r 9f4e37332ce5 -r 473321461bba vpnui/vpnmanagementui/group/vpnmanagementuiicons.mk --- a/vpnui/vpnmanagementui/group/vpnmanagementuiicons.mk Thu Aug 19 10:54:34 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,67 +0,0 @@ -# -# Copyright (c) 2004 Nokia Corporation and/or its subsidiary(-ies). -# All rights reserved. -# This component and the accompanying materials are made available -# under the terms of "Eclipse Public License v1.0" -# which accompanies this distribution, and is available -# at the URL "http://www.eclipse.org/legal/epl-v10.html". -# -# Initial Contributors: -# Nokia Corporation - initial contribution. -# -# Contributors: -# -# Description: VpnManagementUi icons. -# - -ifeq (WINS,$(findstring WINS, $(PLATFORM))) -ZDIR=\epoc32\release\$(PLATFORM)\$(CFG)\Z -else -ZDIR=\epoc32\data\z -endif - -TARGETDIR=$(ZDIR)\SYSTEM\Data -HEADERDIR=\epoc32\include -ICONTARGETFILENAME=$(TARGETDIR)\VpnManagementUi.MIF -HEADERFILENAME=$(HEADERDIR)\VpnManagementUi.MBG - -do_nothing : - @rem do_nothing - -MAKMAKE : do_nothing - -BLD : do_nothing - -CLEAN : do_nothing - -LIB : do_nothing - -CLEANLIB : do_nothing - -# ---------------------------------------------------------------------------- -# NOTE 1: DO NOT DEFINE MASK FILE NAMES! They are included automatically by -# MifConv if the mask detph is defined. -# -# NOTE 2: Usually, source paths should not be included in the bitmap -# definitions. MifConv searches for the icons in all icon directories in a -# predefined order, which is currently \s60\icons, \s60\bitmaps2. -# The directory \s60\icons is included in the search only if the feature flag -# __SCALABLE_ICONS is defined. -# ---------------------------------------------------------------------------- - -RESOURCE : - mifconv $(ICONTARGETFILENAME) /h$(HEADERFILENAME) \ - /c8,8 qgn_prop_vpn_log_info.bmp \ - /c8,8 qgn_prop_vpn_log_warn.bmp \ - /c8,8 qgn_prop_vpn_log_error.bmp \ - /c16,8 qgn_prop_set_conn_vpn.bmp - -FREEZE : do_nothing - -SAVESPACE : do_nothing - -RELEASABLES : - @echo $(HEADERFILENAME)&& \ - @echo $(ICONTARGETFILENAME) - -FINAL : do_nothing diff -r 9f4e37332ce5 -r 473321461bba vpnui/vpnmanagementui/group/vpnmanagementuiicons_dc.mk --- a/vpnui/vpnmanagementui/group/vpnmanagementuiicons_dc.mk Thu Aug 19 10:54:34 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,67 +0,0 @@ -# -# Copyright (c) 2004 Nokia Corporation and/or its subsidiary(-ies). -# All rights reserved. -# This component and the accompanying materials are made available -# under the terms of "Eclipse Public License v1.0" -# which accompanies this distribution, and is available -# at the URL "http://www.eclipse.org/legal/epl-v10.html". -# -# Initial Contributors: -# Nokia Corporation - initial contribution. -# -# Contributors: -# -# Description: VpnManagementUi icons. -# - -ifeq (WINS,$(findstring WINS, $(PLATFORM))) -ZDIR=\epoc32\release\$(PLATFORM)\$(CFG)\Z -else -ZDIR=\epoc32\data\z -endif - -TARGETDIR=$(ZDIR)\resource\apps -HEADERDIR=\epoc32\include -ICONTARGETFILENAME=$(TARGETDIR)\VpnManagementUi.MIF -HEADERFILENAME=$(HEADERDIR)\VpnManagementUi.MBG - -do_nothing : - @rem do_nothing - -MAKMAKE : do_nothing - -BLD : do_nothing - -CLEAN : do_nothing - -LIB : do_nothing - -CLEANLIB : do_nothing - -# ---------------------------------------------------------------------------- -# NOTE 1: DO NOT DEFINE MASK FILE NAMES! They are included automatically by -# MifConv if the mask detph is defined. -# -# NOTE 2: Usually, source paths should not be included in the bitmap -# definitions. MifConv searches for the icons in all icon directories in a -# predefined order, which is currently \s60\icons, \s60\bitmaps2. -# The directory \s60\icons is included in the search only if the feature flag -# __SCALABLE_ICONS is defined. -# ---------------------------------------------------------------------------- - -RESOURCE : - mifconv $(ICONTARGETFILENAME) /h$(HEADERFILENAME) \ - /c8,8 qgn_prop_vpn_log_info.bmp \ - /c8,8 qgn_prop_vpn_log_warn.bmp \ - /c8,8 qgn_prop_vpn_log_error.bmp \ - /c16,8 qgn_prop_set_conn_vpn.bmp - -FREEZE : do_nothing - -SAVESPACE : do_nothing - -RELEASABLES : - @echo $(HEADERFILENAME)&& \ - @echo $(ICONTARGETFILENAME) - -FINAL : do_nothing diff -r 9f4e37332ce5 -r 473321461bba vpnui/vpnmanagementui/inc/log_vpnmanagementui.h --- a/vpnui/vpnmanagementui/inc/log_vpnmanagementui.h Thu Aug 19 10:54:34 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,27 +0,0 @@ -/* -* Copyright (c) 2003 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Logging utility. -* -*/ - - - -#if !defined(__LOG_VPNMANAGEMENTUI_H__) -#define __LOG_VPNMANAGEMENTUI_H__ - -_LIT(KLogFile,"vpnmanagementui.txt"); - -#include "logcommon.h" - -#endif // __LOG_VPNMANAGEMENTUI_H__ diff -r 9f4e37332ce5 -r 473321461bba vpnui/vpnmanagementui/inc/serversettingconnectionsettingitem.h --- a/vpnui/vpnmanagementui/inc/serversettingconnectionsettingitem.h Thu Aug 19 10:54:34 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,54 +0,0 @@ -/* -* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Custom setting item for selectin used connection -* -*/ - - - -#ifndef SERVER_SETTING_CONNECTION_SETTING_ITEM_H -#define SERVER_SETTING_CONNECTION_SETTING_ITEM_H - -#include -#include -#include - -/** - * A custom setting for selecting the used destination or connection method. - */ -class CServerSettingConnectionSettingItem : public CAknSettingItem - { -public: - - CServerSettingConnectionSettingItem(TInt aIdentifier, TCmSettingSelection& aSelection); - virtual ~CServerSettingConnectionSettingItem(); - - - void StoreL(); - void LoadL(); - void EditItemL( TBool aCalledFromMenu ); - - const TDesC& SettingTextL(); - -private: - - void UpdateSettingTextL(); - - TCmSettingSelection& iExternalValue; - TCmSettingSelection iInternalValue; - - HBufC* iSettingText; - }; - -#endif // SERVER_SETTING_CONNECTION_SETTING_ITEM_H diff -r 9f4e37332ce5 -r 473321461bba vpnui/vpnmanagementui/inc/uirunner.h --- a/vpnui/vpnmanagementui/inc/uirunner.h Thu Aug 19 10:54:34 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,78 +0,0 @@ -/* -* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* The UI runner interface that applications can use to launch UI -* implementations. -* -*/ - -#ifndef __UI_RUNNER_H__ -#define __UI_RUNNER_H__ - -#include - -// The second UID for DLLs that implement -// the UI runner interface. -const TInt KUiRunnerUidValue = 0x10200EC4; -const TUid KUiRunnerUid = { KUiRunnerUidValue }; - -/** - * Flags that indicate how the UI launched through - * the UI runner interface completes. These flags - * are returned to the calling application in the - * aUirEvent parameter of the UiComplete call. The - * flags can be combined if needed. - */ -const TInt KUirEventNone = 0x00000000; // UI left with the Back button -const TInt KUirEventExitRequested = 0x00000020; // UI left with Options->Exit - -/** - * UI observation interface. An application that - * uses the UI runner interface to launch a certain - * UI must have an object that implements this - * interface and pass a pointer to this object - * in the RunUiL method (see below). The UI - * implementation will call the UiComplete method - * of this interface when the user leaves the UI. - */ -class MUiRunnerObserver - { -public: - virtual void UiComplete(TInt aUirEvent) = 0; - }; - -/** - * The UI runner interface that applications - * can use to launch UI implementations. - */ -class CUiRunner : public CBase - { -public: - /** - * Second-phase constructor - */ - virtual void ConstructL() = 0; - - /** - * Runs the UI, ASYNCHRONOUS. - * - * @param A pointer to an object that implements the - * MUiRunnerObserver interface. The UI implementation - * will call the UiComplete method of this interface - * when the user leaves the UI. - */ - virtual void RunUiL(MUiRunnerObserver* aObserver) = 0; - }; - -#endif // __UI_RUNNER_H__ diff -r 9f4e37332ce5 -r 473321461bba vpnui/vpnmanagementui/inc/vpnapiwrapper.h --- a/vpnui/vpnmanagementui/inc/vpnapiwrapper.h Thu Aug 19 10:54:34 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,131 +0,0 @@ -/* -* Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Declaration of the CVpnApiWrapper class. -* -*/ - -#ifndef __VPNAPIWRAPPER_H__ -#define __VPNAPIWRAPPER_H__ - -#include - -#include "vpnextapi.h" - - -class MVpnApiWrapperCaller - { -public: - - virtual void NotifySynchroniseServerCompleteL(TInt aResult) = 0; - }; - -/** - * The class definitions for CVpnApiWrapper - - * Wrapper class for VPN API calls - */ -class CVpnApiWrapper : public CActive - { -public: - /** - * NewL method starts the standard two phase construction. - */ - static CVpnApiWrapper* NewL(); - - /** - * Destructor - */ - ~CVpnApiWrapper(); - - CArrayFixFlat* PolicyListL(); - - /** - * Deletes the specified policy. - * - * @param aPolicyIndex Index of the listbox in the policy view - */ - void DeletePolicyL(TInt aPolicyIndex); - - /** - * Gets detailed information about the specified policy. - * - * @param aPolicyIndex Index of the listbox in the policy view - * - * @param aPolicyDetails [out] Policy information structure - */ - void GetPolicyDetailsL( - TInt aPolicyIndex, TVpnPolicyDetails& aPolicyDetails); - - /** - * Cretes the specified server definition. - * - * @param aServerDetails [in] Server details structure - */ - TInt CreateServer( const TAgileProvisionApiServerSettings& aServerDetails ); - - TAgileProvisionApiServerListElem& ServerListL(); - - void GetServerDetailsL( TAgileProvisionApiServerSettings& aServerDetails ); - TInt DeleteServer(); - void SynchroniseServerL( MVpnApiWrapperCaller* aCaller ); - void CancelSynchronise( ); - -protected: // From CActive - void DoCancel(); - void RunL(); - -private: - /** - * Constructor - */ - CVpnApiWrapper(); - - /** - * Second phase constructor - */ - void ConstructL(); - - /** - * Builds the list of the installed policies. - */ - void BuildPolicyListL(); - - /** - * Deletes all VPN AP that referes to policy aPolicyId. - * Ignores possible errors --> In case of an error the remaining - * APs are not deleted. - */ - void DeleteReferringVpnAps(const TVpnPolicyId& aPolicyId) const; - void DeleteReferringVpnApsL(const TVpnPolicyId& aPolicyId) const; - -private: - - enum TTask - { - ETaskNone = 1, - ETaskSynchroniseServer, - - }; - - - RVpnExtApi iVpnExtApi; - TAgileProvisionApiServerSettings iPolicyServer; - TAgileProvisionApiServerListElem iVpnPolicyServerList; - CArrayFixFlat* iPolicyList; - TFileName iImportDir; - - TTask iOngoingTask; - MVpnApiWrapperCaller* iCaller; - }; - -#endif // __VPNAPIWRAPPER_H__ diff -r 9f4e37332ce5 -r 473321461bba vpnui/vpnmanagementui/inc/vpnmanagementui.hrh --- a/vpnui/vpnmanagementui/inc/vpnmanagementui.hrh Thu Aug 19 10:54:34 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,54 +0,0 @@ -/* -* Copyright (c) 2003-2007 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Resource headers for project vpnmanagementui -* -*/ - - - -#ifndef VPNMANAGEMENTUI_HRH -#define VPNMANAGEMENTUI_HRH - -enum TVpnUiCommandIds - { - EVpnUiCmdInstallPolicies = 1, - EVpnUiCmdPolicyDetails, - EVpnUiCmdDeletePolicy, - EVpnUiCmdUpdatePolicy, - EVpnUiCmdEditServer, - EVpnUiCmdAddServer, - EVpnUiCmdSynchronise, - EVpnUiCmdDeleteServer, - EVpnUiCmdLogDetails, - EVpnUiCmdClearLog, - EVpnUiCmdRefreshLog, - EVpnUiCmdChangePassword, - EVpnUiCmdChange, - EVpnUiCmdOpen - }; - -enum TVpnUiSettingItems - { - EVpnUiSettingServerName, - EVpnUiSettingServerAddress, - EVpnUiSettingIap - }; - - -enum TVpnUiCtrlIds - { - EVpnUiWaitNote = 1 - }; - -#endif // VPNUI_HRH diff -r 9f4e37332ce5 -r 473321461bba vpnui/vpnmanagementui/inc/vpnmanagementuicontainer.h --- a/vpnui/vpnmanagementui/inc/vpnmanagementuicontainer.h Thu Aug 19 10:54:34 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,146 +0,0 @@ -/* -* Copyright (c) 2003-2006 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Declaration of the CVpnManagementUiContainer class. -* -*/ - - - -#ifndef __VPNMANAGEMENTUICONTAINER_H__ -#define __VPNMANAGEMENTUICONTAINER_H__ - -// INCLUDES -#include -#include "vpnmanagementuiview.h" - -// FORWARD DECLARATIONS -class CEikTextListBox; - -// CLASS DECLARATION - -/** -* CVpnManagementUiContainer container control class. -* -*/ -class CVpnManagementUiContainer : public CCoeControl, public MCoeControlObserver - { - /** - * Container needs to get access to CVpnManagementUiView's DoActivateL - */ - friend void CVpnManagementUiView::DoActivateL(const TVwsViewId&, TUid, const TDesC8&); - - public: // Constructors and destructor - - /** - * Overrided Default constructor - */ - CVpnManagementUiContainer(CVpnManagementUiView& aParent, CVpnUiLoader& aLoader); - - /** - * Destructor. - */ - ~CVpnManagementUiContainer(); - - /** - * Draws listbox - */ - void DrawListBoxL(TInt aCurrentPosition, TInt aTopItem); - - /** - * From CCoeControl - */ - void HandleResourceChange( TInt aType ); - - - public: // New functions - - public: // Functions from base classes - - private: // Functions from base classes - - /** - * Symbian OS default constructor. - * @param aRect Frame rectangle for container. - */ - void ConstructL(const TRect& aRect); - - /** - * From CoeControl,SizeChanged. - */ - void SizeChanged(); - - /** - * From CoeControl,CountComponentControls. - */ - TInt CountComponentControls() const; - - /** - * From CCoeControl,ComponentControl. - */ - CCoeControl* ComponentControl(TInt aIndex) const; - - /** - * Handles control events - * - * event handling section - * e.g Listbox events - */ - void HandleControlEventL(CCoeControl* aControl,TCoeEvent aEventType); - - /** - * Handles the key events OK button, arrow keys, delete key. - */ - TKeyResponse OfferKeyEventL(const TKeyEvent& aKeyEvent, TEventCode aType); - - void TitlePaneTextsL(); - - /** - * Creates listbox, sets empty listbox text - */ - void CreateListBoxL(); - - void ShowItemsL(); - - #ifdef __SERIES60_HELP - /** - * This function is called when Help application is launched. - * (other items were commented in a header). - */ - void GetHelpContext(TCoeHelpContext& aContext) const; - #endif //__SERIES60_HELP - - public: //data - - CEikTextListBox* iListBox; - - /** - * To get hold of View - */ - CVpnManagementUiView& iParent; - - /** - * To get hold of CVpnUiLoader - */ - CVpnUiLoader& iLoader; - - /** - * To store the list item count - */ - TInt iListItemCount; - - }; - -#endif // __VPNUIMANAGEMENTCONTAINER_H__ - -// End of File diff -r 9f4e37332ce5 -r 473321461bba vpnui/vpnmanagementui/inc/vpnmanagementuidefs.h --- a/vpnui/vpnmanagementui/inc/vpnmanagementuidefs.h Thu Aug 19 10:54:34 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,88 +0,0 @@ -/* -* Copyright (c) 2003-2006 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Common definitions of the vpnmanagementui.dll -* -*/ - - - -#ifndef __VPNMANAGEMENTUIDEFS_H__ -#define __VPNMANAGEMENTUIDEFS_H__ - -// INCLUDES -#include - -#include // for menu and cba support -#include -#include -#include -#include -#include -#include // for TResourceReader -#include - -// _LITS -_LIT(KVpnManagementUiEnter, "\n"); -_LIT(KVpnManagementUiEnterTwice, "\n\n"); -_LIT(KVpnManagementUiSpaceHyphenSpace, " - "); -_LIT(KVpnManagementUiSpace, " "); - -_LIT(KIpsecAcuPlugInDllName, "ipsecacuplugin.dll"); - -// Pathname of the MBM file containing icons for VPN Log view -_LIT( KVpnLogIcons, "\\resource\\apps\\VpnManagementUi.mbm" ); - -// FORWARD DECLARATIONS -// CONSTS -const TUid KUidVpnManagementUi = { 0x10200EC4 }; //UID of dll for help -const TUid KUidIpsecAcuPlugIn = { 0x101F6EB8 }; - -const TInt KChangeViewBack = -2; -const TInt KChangeViewPrevious = -1; -const TInt KChangeViewPolicy = 0; -const TInt KChangeViewServer = 1; -const TInt KChangeViewLog = 2; -const TInt KChangeViewSettings = 3; - -// For setting the correct title -const TInt KViewTitleManagementView = 4; -const TInt KViewTitlePolicyView = 5; -const TInt KViewTitleServerView = 6; -const TInt KViewTitleLogView = 7; -const TInt KViewTitleParametersView = 8; - -// Granularity of the created iconarrays -LOCAL_D const TInt KGranularity = 4; - -// "dd/mm/yyyy0" -const TInt KMaxLengthTextDateString = 11; -// Maximum length of dynamic strings is 4092, -// plus 13 resource strings with average lenght of 50 makes 650 -// total 4742 rounded up to 5000 -const TInt KMaxLengthTextDetailsBody = 5000; - -// Max length for ave_list_setting_pane_1 is 52 and -// for ave_list_setting_pane_2 51 (formatting 7) , total 103 + end mark -const TInt KMaxLengthTextSettListOneTwo = 104; -// Max length for ave_list_setting_pane_1 is 52 -const TInt KMaxLengthTextSettListOne = 52; - -const TInt KMaxServerUrlLength = 512; -const TInt KMaxServerNameLength = 30; -const TInt KMaxUiSelectionNameLength = 50; - -const TInt KMaxLogListLength = 50; -#endif // __VPNMANAGEMENTUIDEFS_H__ - -// End of File diff -r 9f4e37332ce5 -r 473321461bba vpnui/vpnmanagementui/inc/vpnmanagementuilogcontainer.h --- a/vpnui/vpnmanagementui/inc/vpnmanagementuilogcontainer.h Thu Aug 19 10:54:34 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,239 +0,0 @@ -/* -* Copyright (c) 2003-2006 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Declaration of the CVpnManagementUiLogContainer class. -* -*/ - - - - -#ifndef __VPNMANAGEMENTUILOGCONTAINER_H__ -#define __VPNMANAGEMENTUILOGCONTAINER_H__ -// INCLUDES -#include "vpnmanagementuilogview.h" -#include "eventviewer2.h" - - -// FORWARD DECLARATIONS -class CAknIconArray; - -// CLASS DECLARATION - -/** -* CVpnManagementUiLogContainer container control class. -* -* @lib vpnmanagementui.lib -*/ -class CVpnManagementUiLogContainer : public CCoeControl, MCoeControlObserver, MEikListBoxObserver - { - - /** - * Policy Container needs to get access to CVpnManagementUiLogView's DoActivateL - */ - friend void CVpnManagementUiLogView::DoActivateL(const TVwsViewId&, TUid, const TDesC8&); - - public: // functions - - /** - * Overrided Default constructor - */ - CVpnManagementUiLogContainer(CVpnManagementUiLogView& aParent, CVpnUiLoader& aLoader); - - /** - * Destructor. - */ - ~CVpnManagementUiLogContainer(); - - /** - * Change focus - */ - void FocusChanged(TDrawNow aDrawNow); - - /** - * From CCoeControl - */ - void HandleResourceChange( TInt aType ); - - /** - * Draws listbox, fetches graphic icons for markable list - */ - void DrawListBoxL(TInt aCurrentPosition, TInt aTopItem); - - /** - * Gets previous log event and updates listbox. - * @return KErrNone or KErrNotFound. - */ - TInt UpdateListBoxL(TInt& aCurrentPosition); - - /** - * Handles listbox events - */ - void HandleListBoxEventL(CEikListBox* aListBox, TListBoxEvent aEventType); - - /** - * Gets list of Log events and displays them in listbox. - */ - void ShowLogsL(); - - /** - * Creates the log details message query - * Appends strings from resource and eventviewer to one - * message body text and displays it. - */ - void LogDetailsL(TInt aIndex); - - /** - * Asks confirmation from user. - * Clears VPN log view. - * Calls eventviewer to clear log. - */ - void ClearLogL(); - - public: // data - - /** - * To handle listbox - * Cannot be private because CVpnManagementUiLogView uses it - */ - CAknDoubleGraphicStyleListBox* iListBox; - - /** - * To get hold of PolicyView - */ - CVpnManagementUiLogView& iParent; - - /** - * To get hold of CVpnUiLoader - */ - CVpnUiLoader& iLoader; - - /** - * To store the list item count - */ - TInt iListItemCount; - - private: // functions - - /** - * Default constructor - */ - CVpnManagementUiLogContainer(); - - /** - * Symbian OS default constructor. - * @param aRect Frame rectangle for container. - */ - void ConstructL(const TRect& aRect, TInt& aCurrentPosition); - - /** - * Creates listbox, sets empty listbox text - */ - void CreateListBoxL(); - - /** - * Reads text from resource to empty log view - * and put text to the listbox. - */ - void EmptyViewTextL(); - - /** - * Reads text from resource - */ - void ReadResourceL(HBufC& aText, TInt aResource); - - /** - * Removes all from listbox. - */ - void RemoveAllFromListBoxL(); - - /** - * From CoeControl,SizeChanged. - */ - void SizeChanged(); - - /** - * From CoeControl,CountComponentControls. - */ - TInt CountComponentControls() const; - - /** - * From CCoeControl,ComponentControl. - */ - CCoeControl* ComponentControl(TInt aIndex) const; - - /** - * Handles control events - * - * event handling section - * e.g Listbox events - */ - void HandleControlEventL(CCoeControl* aControl,TCoeEvent aEventType); - - /** - * Handles the key events OK button, arrow keys, delete key. - */ - TKeyResponse OfferKeyEventL(const TKeyEvent& aKeyEvent, TEventCode aType); - - /** - * Creates the iconarray. 0th icon is info icon, - * 1st icon is warning icon and 2nd icon is error icon. - * @return The created iconarray. Owner is the caller. - */ - CAknIconArray* CreateIconArrayL() const; - - /** - * Get resource id for the iconarray. - * @return The resource id for the icon array. - */ - TInt IconArrayResourceId() const; - - /** - * Get corresponding icon of category - * @param aCategory category of logtext - * @return The index of icon array. - */ - TInt GetIconArrayIndex(TLogCategory2& aCategory); - - /** - * Formats date and time string for Log entry. - */ - void TimeLogEntryL(TDes& aDes, TTime aTime); - - /** - * Searches all drive letters and tries - * to find vpnmanagementui.mif file. - * @return The full name and path of the MIF file - * containing icons for VPN Log view - */ - TFileName CVpnManagementUiLogContainer::GetIconFilenameL(); - - - -#ifdef __SERIES60_HELP - /** - * This function is called when Help application is launched. - * (other items were commented in a header). - */ - void GetHelpContext(TCoeHelpContext& aContext) const; -#endif //__SERIES60_HELP - - private: //data - - CEventViewer* iEventViewer; - CArrayFixFlat* iLogList; - }; - -#endif // __VPNMANAGEMENTUILOGCONTAINER_H__ - -// End of File diff -r 9f4e37332ce5 -r 473321461bba vpnui/vpnmanagementui/inc/vpnmanagementuilogview.h --- a/vpnui/vpnmanagementui/inc/vpnmanagementuilogview.h Thu Aug 19 10:54:34 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,140 +0,0 @@ -/* -* Copyright (c) 2003 - 2006 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Declaration of the CVpnManagementUiLogView class. -* -*/ - - -#ifndef __VPNMANAGEMENTUILOGVIEW_H__ -#define __VPNMANAGEMENTUILOGVIEW_H__ - -// INCLUDES -#include -#include "vpnmanagementuiviewid.h" - -class CVpnManagementUiLogContainer; -class CVpnUiLoader; -/** -* CVpnManagementUiLogView view class. -* -* @lib vpnmanagementui.dll -*/ -class CVpnManagementUiLogView : public CAknView - { - public: - - /** - * Destructor. - */ - ~CVpnManagementUiLogView(); - - /** - * NewL - */ - static class CVpnManagementUiLogView* NewL(const TRect& aRect, CVpnUiLoader& aLoader); - - /** - * NewLC - */ - static class CVpnManagementUiLogView* NewLC(const TRect& aRect, CVpnUiLoader& aLoader); - - /** - * Returns Log view id - */ - TUid Id() const; - - /** - * Handles ClientRectChange - */ - void HandleClientRectChange(); - - /** - * Returns iLogContainer - */ - CCoeControl* Container(); - - /** - * Handles Softkey and Options list commands - */ - void HandleCommandL(TInt aCommand); - - /** - * Sets appropriate MSK for view - */ - void SetMiddleSoftKeyL(TBool aDrawNow); - - - public: // data - - /** - * To get hold of VpnUiLoader - */ - CVpnUiLoader& iLoader; - - /** - * To get access to log list in log view - */ - CVpnManagementUiLogContainer* iLogContainer; - - /** - * To store the position of the focus in the Log view - */ - TInt iCurrentPosition; - - private: // functions - - /** - * Constructor. - */ - CVpnManagementUiLogView(CVpnUiLoader& aLoader); - - /** - * Symbian OS default constructor. - */ - void ConstructL(); - - /** - * From AknView, - * Updates the view when opening it - */ - void DoActivateL(const TVwsViewId& aPrevViewId,TUid aCustomMessageId, - const TDesC8& aCustomMessage); - - /** - * From AknView, - * Saves focus position when closing view - */ - void DoDeactivate(); - - /** - * Updates Options list with correct items depending on - * whether the listbox is empty or if it has any marked items - */ - void DynInitMenuPaneL(TInt aResourceId,CEikMenuPane* aMenuPane); - - /** - * Sets MSK - */ - void SetMiddleSoftKeyLabelL(TInt aResourceId, TInt aCommandId); - - private: // Data - - /** - * Stores top item in the listbox - */ - TInt iTopItem; - }; - - -#endif // __VPNMANAGEMENTUILOGVIEW_H__ \ No newline at end of file diff -r 9f4e37332ce5 -r 473321461bba vpnui/vpnmanagementui/inc/vpnmanagementuipolicycontainer.h --- a/vpnui/vpnmanagementui/inc/vpnmanagementuipolicycontainer.h Thu Aug 19 10:54:34 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,194 +0,0 @@ -/* -* Copyright (c) 2003 - 2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Declaration of the CVpnManagementUiPolicyContainer class. -* -*/ - -#ifndef __VPNMANAGEMENTUIPOLICYCONTAINER_H__ -#define __VPNMANAGEMENTUIPOLICYCONTAINER_H__ - -// INCLUDES -#include "vpnmanagementuipolicyview.h" - - -// FORWARD DECLARATIONS - -// CLASS DECLARATION - -/** -* CVpnManagementUiPolicyContainer container control class. -* -* @lib vpnmanagementui.lib -*/ -class CVpnManagementUiPolicyContainer : - public CCoeControl, - public MCoeControlObserver, - public MEikListBoxObserver - { - - /** - * Policy Container needs to get access to CVpnManagementUiPolicyView's DoActivateL - */ - friend void CVpnManagementUiPolicyView::DoActivateL( - const TVwsViewId&, TUid, const TDesC8&); - - public: // functions - - /** - * Overrided Default constructor - */ - CVpnManagementUiPolicyContainer( - CVpnManagementUiPolicyView& aParent, CVpnUiLoader& aLoader); - - /** - * Destructor. - */ - ~CVpnManagementUiPolicyContainer(); - - /** - * Overrided ActivateL function from base class CCoeControl - */ - virtual void ActivateL(); - - /** - * Change focus - */ - void FocusChanged(TDrawNow aDrawNow); - - /** - * From CCoeControl - */ - void HandleResourceChange( TInt aType ); - - /** - * Draws listbox, fetches graphic icons for markable list - */ - void DrawListBoxL(TInt aCurrentPosition, TInt aTopItem); - - /** - * Updates listbox after deletion, sets No VPN policies text - * if deleted policy was a last one. - */ - void UpdateListBoxL(TInt& aCurrentPosition); - - /** - * Handles listbox events - */ - void HandleListBoxEventL( - CEikListBox* aListBox, TListBoxEvent aEventType); - - - - public: // data - - /** - * To handle listbox - * Cannot be private because CVpnManagementUiPolicyView uses it - */ - CEikColumnListBox* iListBox; - - /** - * To get hold of PolicyView - */ - CVpnManagementUiPolicyView& iParent; - - /** - * To get hold of CVpnUiLoader - */ - CVpnUiLoader& iLoader; - - /** - * To store the list item count - */ - TInt iListItemCount; - - /** - * If ETrue, Show Waitnote. - */ - - - private: // functions - - /** - * Default constructor - */ - CVpnManagementUiPolicyContainer(); - - /** - * Symbian OS default constructor. - * @param aRect Frame rectangle for container. - */ - void ConstructL( - const TRect& aRect, TInt& aCurrentPosition, TInt& aTopItem); - - /** - * Creates listbox, sets empty listbox text - */ - void CreateListBoxL(); - - /** - * From CoeControl,SizeChanged. - */ - void SizeChanged(); - - /** - * From CoeControl,CountComponentControls. - */ - TInt CountComponentControls() const; - - /** - * From CCoeControl,ComponentControl. - */ - CCoeControl* ComponentControl(TInt aIndex) const; - - /** - * Handles control events - * - * event handling section - * e.g Listbox events - */ - void HandleControlEventL(CCoeControl* aControl,TCoeEvent aEventType); - - /** - * Handles the key events OK button, arrow keys, delete key. - */ - TKeyResponse OfferKeyEventL( - const TKeyEvent& aKeyEvent, TEventCode aType); - - /** - * Gets list of policies from VpnAPI and displays them in listbox. - * - */ - void ShowPoliciesL(); - - - - - -#ifdef __SERIES60_HELP - /** - * This function is called when Help application is launched. - * (other items were commented in a header). - */ - void GetHelpContext(TCoeHelpContext& aContext) const; -#endif //__SERIES60_HELP - - - private: //data - - }; - -#endif // __VPNMANAGEMENTUIPOLICYCONTAINER_H__ - -// End of File diff -r 9f4e37332ce5 -r 473321461bba vpnui/vpnmanagementui/inc/vpnmanagementuipolicyview.h --- a/vpnui/vpnmanagementui/inc/vpnmanagementuipolicyview.h Thu Aug 19 10:54:34 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,151 +0,0 @@ -/* -* Copyright (c) 2003 - 2006 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Declaration of the CVpnManagementUiPolicyView class. -* -*/ - - -#ifndef __VPNMANAGEMENTUIPOLICYVIEW_H__ -#define __VPNMANAGEMENTUIPOLICYVIEW_H__ - -// INCLUDES -#include -#include "vpnapiwrapper.h" -#include "vpnmanagementuiviewid.h" - -class CVpnManagementUiPolicyContainer; -/** -* CVpnManagementUiPolicyView view class. -* -* @lib vpnmanagementui.dll -*/ -class CVpnManagementUiPolicyView : public CAknView - { - public: - - /** - * Destructor. - */ - ~CVpnManagementUiPolicyView(); - - /** - * NewL - */ - static class CVpnManagementUiPolicyView* NewL(const TRect& aRect, CVpnUiLoader& aLoader); - - /** - * NewLC - */ - static class CVpnManagementUiPolicyView* NewLC(const TRect& aRect, CVpnUiLoader& aLoader); - - /** - * Returns Policy view id - */ - TUid Id() const; - - /** - * Handles ClientRectChange - */ - void HandleClientRectChange(); - - /** - * Returns iPolicyContainer - */ - CCoeControl* Container(); - - /** - * Handles Softkey and Options list commands - */ - void HandleCommandL(TInt aCommand); - - /** - * Creates the whole of policy details view - * Appends strings from both resources and VpnAPI to one - * message body text and displays it. - */ - void PolicyDetailsL(TInt aIndex); - - void ReadResourceL(HBufC& aText, TInt aResource); - - /** - * Sets appropriate MSK for view - */ - void SetMiddleSoftKeyL(TBool aDrawNow); - - - public: // data - - /** - * To get hold of VpnUiLoader - */ - CVpnUiLoader& iLoader; - - /** - * To get access to policy list in policy view - */ - CVpnManagementUiPolicyContainer* iPolicyContainer; - - /** - * To store the position of the focus in the Policy view - */ - TInt iCurrentPosition; - - private: // functions - - /** - * Constructor. - */ - CVpnManagementUiPolicyView(CVpnUiLoader& aLoader); - - /** - * Symbian OS default constructor. - */ - void ConstructL(); - - /** - * From AknView, - * Updates the view when opening it - */ - void DoActivateL(const TVwsViewId& aPrevViewId,TUid aCustomMessageId, - const TDesC8& aCustomMessage); - - /** - * From AknView, - * Saves focus position when closing view - */ - void DoDeactivate(); - - /** - * Updates Options list with correct items depending on - * whether the listbox is empty or if it has any marked items - */ - void DynInitMenuPaneL(TInt aResourceId,CEikMenuPane* aMenuPane); - - TBool NotAssociatedToIapL(TInt aIndex, TVpnPolicyName& aPolicyName); - - /** - * Sets MSK - */ - void SetMiddleSoftKeyLabelL(TInt aResourceId, TInt aCommandId); - - private: // Data - - /** - * Stores top item in the listbox - */ - TInt iTopItem; - }; - - -#endif // __VPNMANAGEMENTUIPOLICYVIEW_H__ \ No newline at end of file diff -r 9f4e37332ce5 -r 473321461bba vpnui/vpnmanagementui/inc/vpnmanagementuiservercontainer.h --- a/vpnui/vpnmanagementui/inc/vpnmanagementuiservercontainer.h Thu Aug 19 10:54:34 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,191 +0,0 @@ -/* -* Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Declaration of the CVpnManagementUiServerContainer class. -* -*/ - -#ifndef __VPNMANAGEMENTUISERVERCONTAINER_H__ -#define __VPNMANAGEMENTUISERVERCONTAINER_H__ - -// INCLUDES -#include "vpnmanagementuiserverview.h" - - -// FORWARD DECLARATIONS - -// CLASS DECLARATION - -/** -* CVpnManagementUiServerContainer container control class. -* -* @lib vpnmanagementui.lib -*/ -class CVpnManagementUiServerContainer : public CCoeControl, - public MCoeControlObserver, - public MEikListBoxObserver, - public MVpnApiWrapperCaller - { - /** - * Policy Container needs to get access to CVpnManagementUiServerView's DoActivateL - */ - friend void CVpnManagementUiServerView::DoActivateL(const TVwsViewId&, TUid, const TDesC8&); - - public: // functions - - /** - * Overrided Default constructor - */ - CVpnManagementUiServerContainer(CVpnManagementUiServerView& aParent, CVpnUiLoader& aLoader); - - /** - * Destructor. - */ - ~CVpnManagementUiServerContainer(); - - /** - * Overrided ActivateL function from base class CCoeControl - */ - virtual void ActivateL(); - - /** - * Change focus - */ - void FocusChanged(TDrawNow aDrawNow); - - /** - * From CCoeControl - */ - void HandleResourceChange( TInt aType ); - - /** - * Draws listbox - */ - void DrawListBoxL(TInt aCurrentPosition, TInt aTopItem); - - /** - * Refresh listbox after VPN policy server deletion. - */ - void UpdateListBoxL(TInt& aCurrentPosition); - - /** - * Ask confirmation to delete server. - * Calls AcuAgent API's DeleteServer and updates listbox and iServerList - * Show an information note if server is currently in use and - * can't be deleted. - */ - void DeleteServerL(TInt aIndex); - - /** - * Calls Agile provision web service to Synchronise mVPN configuration - */ - void SynchroniseServerL(); - - // from vpnapiwrapper - - void NotifySynchroniseServerCompleteL(TInt aResult); - - - void HandleListBoxEventL (CEikListBox *aListBox, TListBoxEvent aEventType); - - public: // data - - /** - * To handle listbox - */ - CEikColumnListBox* iListBox; - - /** - * To get hold of ServerView - */ - CVpnManagementUiServerView& iParent; - - /** - * To get hold of CVpnUiLoader - */ - CVpnUiLoader& iLoader; - - /** - * To store the list item count - */ - TInt iListItemCount; - - /** - * If ETrue, Show Waitnote. - */ - - - private: // functions - - /** - * Default constructor - */ - CVpnManagementUiServerContainer(); - - /** - * Symbian OS default constructor. - * @param aRect Frame rectangle for container. - */ - void ConstructL(const TRect& aRect, TInt& aCurrentPosition, TInt& aTopItem); - - /** - * Creates listbox, sets empty listbox text - */ - void CreateListBoxL(); - - /** - * From CoeControl,SizeChanged. - */ - void SizeChanged(); - - /** - * From CoeControl,CountComponentControls. - */ - TInt CountComponentControls() const; - - /** - * From CCoeControl,ComponentControl. - */ - CCoeControl* ComponentControl(TInt aIndex) const; - - /** - * Handles control events - * - * event handling section - * e.g Listbox events - */ - void HandleControlEventL(CCoeControl* aControl,TCoeEvent aEventType); - - /** - * Handles the key events OK button, arrow keys. - */ - TKeyResponse OfferKeyEventL(const TKeyEvent& aKeyEvent, TEventCode aType); - - void ShowServersL(); - - -#ifdef __SERIES60_HELP - /** - * This function is called when Help application is launched. - * (other items were commented in a header). - */ - void GetHelpContext(TCoeHelpContext& aContext) const; -#endif //__SERIES60_HELP - - private: //data - - }; - -#endif // __VPNMANAGEMENTUISERVERCONTAINER_H__ - -// End of File diff -r 9f4e37332ce5 -r 473321461bba vpnui/vpnmanagementui/inc/vpnmanagementuiserversettingscontainer.h --- a/vpnui/vpnmanagementui/inc/vpnmanagementuiserversettingscontainer.h Thu Aug 19 10:54:34 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,129 +0,0 @@ -/* -* Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Declaration of the CServerSettingsContainer class. -* -*/ - -#ifndef __VPNMANAGEMENTUISERVERSETTINGSCONTAINER_H__ -#define __VPNMANAGEMENTUISERVERSETTINGSCONTAINER_H__ - -#include - -#include "vpnextapi.h" - - -/** - * CServerSettingsContainer container control class. - * - * @lib vpnmanagementui.lib - * @since S60 v3.0 -*/ -class CServerSettingsContainer : public CAknSettingItemList - { -public: // functions - - /** - * NewL - * - * @since S60 3.2 - * @param aLoader VPN UI loader for common view handling. - * @param aServerIndex index of selected server or KErrNotFound. - * @return self - */ - static CServerSettingsContainer* NewL( - CVpnUiLoader& aLoader, TInt aServerIndex); - /** - * Destructor. - */ - ~CServerSettingsContainer(); - - /** - * From CAknSettingItemList - */ - CAknSettingItem* CreateSettingItemL( TInt aSettingId ); - - /** - * ServerNameExistsL - * @return ETrue name already in use - */ - TBool ServerNameExistsL( const TDesC& aText ) const; - /** - * ChangeSettingValueL - * Opens Setting page for currently selected setting item - */ - void ChangeSettingValueL(); - - - const TAgileProvisionApiServerSettings& ServerDetailsL(); - - static HBufC* GetDestinationNameL( TUint aId ); - static HBufC* GetConnectionMethodNameL( TUint aId ); - - void HandleListBoxEventL(CEikListBox* aListBox, TListBoxEvent aEventType); - - TInt ServerIndex() const; - -private: // functions - - /** - * Default constructor - */ - CServerSettingsContainer(); - - /** - * Overrided Default constructor - */ - CServerSettingsContainer( - CVpnUiLoader& aLoader, TInt aServerIndex ); - - /** - * Symbian OS default constructor. - * @param aRect Frame rectangle for container. - */ - void ConstructL(); - -private: // implementation - - void UpdateTitleL( TDes& aText ); - -#ifdef __SERIES60_HELP - /** - * This function is called when Help application is launched. - * (other items were commented in a header). - */ - void GetHelpContext(TCoeHelpContext& aContext) const; -#endif //__SERIES60_HELP - -private: // data - - /** - * To get hold of VpnUiLoader - */ - CVpnUiLoader& iLoader; - - /// Server details - TAgileProvisionApiServerSettings iServerDetails; - TBuf iServerAddressBuffer; - - /** - * To get the index of server list - * -1 when user has select Add new server - * Must be public so that view can access - */ - TInt iServerIndex; - }; - -#endif // __VPNMANAGEMENTUISERVERSETTINGSCONTAINER_H__ - -// End of File diff -r 9f4e37332ce5 -r 473321461bba vpnui/vpnmanagementui/inc/vpnmanagementuiserversettingsview.h --- a/vpnui/vpnmanagementui/inc/vpnmanagementuiserversettingsview.h Thu Aug 19 10:54:34 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,117 +0,0 @@ -/* -* Copyright (c) 2003-2007 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Declaration of the CServerSettingsView class. -* -*/ - - - -#ifndef __VPNMANAGEMENTUISERVERSETTINGSVIEW_H__ -#define __VPNMANAGEMENTUISERVERSETTINGSVIEW_H__ - -// INCLUDES -#include -#include "vpnmanagementuiviewid.h" - -// FORWARD DECLERATIONS -class CServerSettingsContainer; - -// CLASS DECLARATION - -/** -* CServerSettingsView view class. -* -* @lib vpnmanagementui.dll -*/ -class CServerSettingsView : public CAknView - { - public: // functions - - /** - * Destructor - */ - ~CServerSettingsView(); - - /** - * NewL - */ - static CServerSettingsView* NewL( - const TRect& aRect, CVpnUiLoader& aLoader); - - /** - * NewLC - */ - static CServerSettingsView* NewLC( - const TRect& aRect, CVpnUiLoader& aLoader); - - /** - * Returns Trust view id - */ - TUid Id() const; - - /** - * Handles ClientRectChange - */ - void HandleClientRectChange(); - - - /** - * Handles Softkey and Options list commands - */ - void HandleCommandL(TInt aCommand); - - public: // data - - /** - * To get hold of CVpnUiLoader - */ - CVpnUiLoader& iLoader; - - /** - * To get access to ServerSettingsContainer - */ - CServerSettingsContainer* iContainer; - - private: // functions - - /** - * Constructor. - */ - CServerSettingsView(CVpnUiLoader& aLoader); - - /** - * Symbian OS default constructor. - */ - void ConstructL(); - - /** - * Updates the view when opening it - */ - void DoActivateL(const TVwsViewId& aPrevViewId,TUid aCustomMessageId, - const TDesC8& aCustomMessage); - - /** - * Closes the view - */ - void DoDeactivate(); - - - TInt CompleteSettingsL(); - - private: // Data - }; - -#endif // __VPNMANAGEMENTUISERVERSETTINGSVIEW_H__ - -// End of File diff -r 9f4e37332ce5 -r 473321461bba vpnui/vpnmanagementui/inc/vpnmanagementuiserverview.h --- a/vpnui/vpnmanagementui/inc/vpnmanagementuiserverview.h Thu Aug 19 10:54:34 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,150 +0,0 @@ -/* -* Copyright (c) 2003 - 2006 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Declaration of the CVpnManagementUiServerView class. -* -*/ - - - -#ifndef __VPNMANAGEMENTUISERVERVIEW_H__ -#define __VPNMANAGEMENTUISERVERVIEW_H__ - -// INCLUDES -#include -#include "vpnmanagementuiviewid.h" - -// CONSTANTS - -// FORWARD DECLARATIONS -class CVpnManagementUiServerContainer; - -// CLASS DECLARATION - -/** -* CVpnManagementUiServerView view class. -* -* @lib vpnmanagementui.lib -*/ -class CVpnManagementUiServerView : public CAknView - { - public: // Constructors and destructor - - /** - * Destructor. - */ - ~CVpnManagementUiServerView(); - - /** - * NewL - */ - static class CVpnManagementUiServerView* NewL(const TRect& aRect, CVpnUiLoader& aLoader); - - /** - * NewLC - */ - static class CVpnManagementUiServerView* NewLC(const TRect& aRect, CVpnUiLoader& aLoader); - - /** - * Returns server view id - */ - TUid Id() const; - - /** - * Handles ClientRectChange - */ - void HandleClientRectChange(); - - /** - * Returns iServerContainer - */ - CCoeControl* Container(); - - /** - * Handles Softkey and Options list commands - */ - void HandleCommandL(TInt aCommand); - - /** - * Sets appropriate MSK for view - */ - void SetMiddleSoftKeyL(TBool aDrawNow); - - - public: // data - - /** - * To get hold of VpnUiLoader - */ - CVpnUiLoader& iLoader; - - - - private: // functions - - /** - * Constructor. - */ - CVpnManagementUiServerView(CVpnUiLoader& aLoader); - - /** - * Symbian OS default constructor. - */ - void ConstructL(); - - /** - * From AknView, - * Updates the view when opening it - */ - void DoActivateL(const TVwsViewId& aPrevViewId,TUid aCustomMessageId, - const TDesC8& aCustomMessage); - - /** - * From AknView, - * Saves focus position when closing view - */ - void DoDeactivate(); - - /** - * Updates Options list with correct items depending on - * whether the listbox is empty or if it has any marked items - */ - void DynInitMenuPaneL(TInt aResourceId,CEikMenuPane* aMenuPane); - - /** - * Sets MSK - */ - void SetMiddleSoftKeyLabelL(TInt aResourceId, TInt aCommandId); - - - private: // Data - - /** - * To get access to policy server list in Policy server view - */ - CVpnManagementUiServerContainer* iServerContainer; - - /** - * To store the position of the focus in the Policy server view - */ - TInt iCurrentPosition; - - /** - * Stores top item in the listbox - */ - TInt iTopItem; - - }; - - -#endif // __VPNMANAGEMENTUISERVERVIEW_H__ \ No newline at end of file diff -r 9f4e37332ce5 -r 473321461bba vpnui/vpnmanagementui/inc/vpnmanagementuiview.h --- a/vpnui/vpnmanagementui/inc/vpnmanagementuiview.h Thu Aug 19 10:54:34 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,236 +0,0 @@ -/* -* Copyright (c) 2003 - 2007 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Declaration of the CVpnManagementUiView class. -* -*/ - - - -#ifndef __VPNMANAGEMENTUIVIEW_H__ -#define __VPNMANAGEMENTUIVIEW_H__ - -// INCLUDES -#include -#include -#include -#include -#include "vpnmanagementuiviewid.h" -#include "vpnapiwrapper.h" -#include "vpnuiloader.h" - -#ifdef __SERIES60_HELP -#include // For HlpLauncher -#endif //__SERIES60_HELP - - -// FORWARD DECLARATIONS -class CVpnManagementUiContainer; - -// CLASS DECLARATION - -/** - * CVpnManagementUiView view class. - * - * @lib (internal) vpnmanagementui.lib - * @since S60 v3.0 - */ -class CVpnManagementUiView : public CGSPluginInterface, public MEikListBoxObserver, public MVpnApiWrapperCaller - { - public: // Constructors and destructor - - /** - * Destructor. - */ - ~CVpnManagementUiView(); - - /** - * NewL - */ - static class CVpnManagementUiView* NewL(); - - /** - * NewLC - */ - static class CVpnManagementUiView* NewLC(); - - - - public: // Functions from base classes - - /** - * Method for getting caption of this plugin. This should be the - * localized name of the settings view to be shown in parent view. - * - * @param aCaption pointer to Caption variable - */ - virtual void GetCaptionL( TDes& aCaption ) const; - - /** - * Returns Management view id - */ - TUid Id() const; - - /** - * Handles ClientRectChange - */ - void HandleClientRectChange(); - - /** - * Returns iContainer - */ - CCoeControl* Container(); - - /** - * Handles Softkey and Options list commands - */ - void HandleCommandL(TInt aCommand); - - - void NotifySynchroniseServerCompleteL(TInt aResult); - public: - - /** - * from CGSPluginInterface - */ - - /** - * Method for checking plugin's Uid. Uid identifies this GS plugin. Use - * same Uid as the ECOM plugin implementation Uid. - * - * @return PluginUid - */ - TUid PluginUid() const; - - /** - * Method for checking, if item has bitmap icon to be shown in list - * - * @return ETrue if plugin has icon bitmap - * @return EFalse if plugin does not have a bitmap - */ - TBool HasBitmap() const; - - /** - * Method for reading bitmap icon. - * - * @param aBitmap plugin bitmap - * @param aMask plugin icon bitmap mask - */ - void GetBitmapL( CFbsBitmap* aBitmap, CFbsBitmap* aMask ) const; - - /** - * Method for reading the ID of the plugin provider category. See - * - * @return Plugin provider category ID defined by - * - */ - TInt PluginProviderCategory() const; - - /** - * Method for checking, if plugin should be visible and used in GS FW. - * (for example shown in listbox of the parent view). - * - * On default plugin is visible. Overwrite this function to enable or - * disable your plugin dynamically. - * - * @return ETrue if plugin should be visible in GS. - * @return EFalse if plugin should not be visible in GS. - */ - virtual TBool Visible() const; - - /** - * Creates a new icon of desired type. Override this to provide custom - * icons. Othervise default icon is used. Ownership of the created icon - * is transferred to the caller. - * - * Icon type UIDs (use these defined constants): - * KGSIconTypeLbxItem - ListBox item icon. - * KGSIconTypeTab - Tab icon. - * - * @param aIconType UID Icon type UID of the icon to be created. - * @return Pointer of the icon. NOTE: Ownership of this icon is - * transferred to the caller. - */ - CGulIcon* CreateIconL( const TUid aIconType ); - - /** - * From MUiRunnerObserver - */ - void UiComplete( TInt aUirEvent ); - - /** - * Handles the actual selected list box item - */ - void HandleListBoxSelectionL(); - - /** - * Shows a information note. - * @param aResourceId Resource id of the showed text . - */ - void ShowInfoNoteL( TInt aResourceId ); - - public: // data - - /** - * To get hold of VpnUiLoader - */ - CVpnUiLoader* iLoader; - - /** - * To get access to list in management view - */ - CVpnManagementUiContainer* iContainer; - - /** - * To store the position of the focus in the management view - */ - TInt iCurrentPosition; - - private: // functions - - /** - * Constructor. - */ - CVpnManagementUiView(); - - /** - * Symbian OS default constructor. - */ - void ConstructL(); - - /** - * From AknView, - * Updates the view when opening it - */ - void DoActivateL(const TVwsViewId& aPrevViewId, - TUid aCustomMessageId, - const TDesC8& aCustomMessage); - - /** - * From AknView, - * Saves focus position when closing view - */ - void DoDeactivate(); - - void HandleListBoxEventL(CEikListBox* aListBox, - TListBoxEvent aEventType); - - private: // Data - - TInt iCurrentItem; // currently selected listbox item - TInt iTopItemIndex; // first item in the listbox - }; - -#endif // __VPNMANAGEMENTUIVIEW_H__ - -// End of File diff -r 9f4e37332ce5 -r 473321461bba vpnui/vpnmanagementui/inc/vpnmanagementuiviewid.h --- a/vpnui/vpnmanagementui/inc/vpnmanagementuiviewid.h Thu Aug 19 10:54:34 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,33 +0,0 @@ -/* -* Copyright (c) 2003 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Contains the view ID's for VPN management UI's views. -* -*/ - - - -#ifndef __VPNMANAGEMENTUIVIEWID_H__ -#define __VPNMANAGEMENTUIVIEWID_H__ - -// CONSTANTS -// -// View ID's -const TUid KVpnManagementPluginUid = { 0x101F6D31 }; -const TUid KVpnManagementUiPolicyViewId = {28}; -const TUid KVpnManagementUiServerViewId = {29}; -const TUid KVpnManagementUiLogViewId = {30}; -const TUid KVpnManagementUiParametersViewId = {31}; - -#endif // __VPNMANAGEMENTUIVIEWID_H - diff -r 9f4e37332ce5 -r 473321461bba vpnui/vpnmanagementui/inc/vpnuiloader.h --- a/vpnui/vpnmanagementui/inc/vpnuiloader.h Thu Aug 19 10:54:34 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,284 +0,0 @@ -/* -* Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: VPN management main view -* -*/ - -#ifndef __VPNUILOADER_H__ -#define __VPNUILOADER_H__ - -// INCLUDES -#include -#include -#include "vpnapiwrapper.h" -#include "vpnmanagementuidefs.h" -#include "uirunner.h" -#include "vpnextapi.h" - -// CONSTANTS -/** - * Specifies the type of the waitnote text. - */ -enum - { - EConnectingVia = 0x0, - EProcessingStepN = 0x1 - }; - -const TInt KSecondsToShowConnectingVia = 3; - -// FORWARD DECLARATIONS - -// CLASS DECLARATION -class CAknWaitDialog; -class CVpnManagementUiView; -class CVpnManagementUi; -/** -* CVpnUiLoader view control class. -* -* @lib vpnmanagementui.lib -*/ -class CVpnUiLoader : public CCoeControl, public MCoeControlObserver, - public MProgressDialogCallback - { - public: // functions - - /** - * Destructor. - */ - ~CVpnUiLoader(); - - /** - * NewL - * - * @since S60 3.0 - * @param aRect ?description - * @param aViewId ?description - * @return self - */ - static class CVpnUiLoader* NewL( - const TRect& aRect, TUid aViewId, CVpnManagementUiView* aUiView ); - - /** - * NewLC - */ - static class CVpnUiLoader* NewLC( - const TRect& aRect, TUid aViewId, CVpnManagementUiView* aUiView ); - - /** - * ChangeViewL - * @param aNewTab change to given tab - */ - void ChangeViewL(TInt aNewTab, TInt aSelectionIndex = -1); - - /** - * Activates the VPN policies, VPN policy servers and - * VPN log views title - */ - void ActivateTitleL(TInt aCurrentTitle); - - void ActivateTitleL(TInt aCurrentTitle, TDes& aText); - - /** - * Activates the VPN log view Navipane text - */ - void ActivateNaviTextL(); - - /** - * Added here because FocusChanged need to be included - * in every control derived from CCoeControl that can have listbox - */ - void FocusChanged(TDrawNow aDrawNow); - - /** - * Push the NaviPane to stack. - */ - void PushNaviPaneL(); - - /** - * Pop the NaviPane from stack. - */ - void PopNaviPane(); - - /** - * Push the DefaultNaviPane (empty) to stack. - */ - void PushDefaultNaviPaneL(); - - /** - * Shows the error note - */ - void ShowErrorNoteL(); - - /** - * Get selection name to the connecting via wait note - */ - void GetSelectionNameL(TDes& aText); - - /** - * Shows the Connecting via or Processing step wait note - */ - void ShowWaitNoteL(); - - /** - * Deletes the wait note - */ - void DeleteWaitNoteL(); - - /** - * Set text to wait note - */ - void SetTextL(); - - //from MProgressDialogCallback - void DialogDismissedL( TInt aButtonId ); - - /** - * Check if Disk space goes below critical level. - * @param aShowErrorNote If ETrue, a warning note is shown. - * @param aBytesToWrite Amount of disk space to be allocated. - * @return ETrue if allocation would go below critical level. - */ - TBool FFSSpaceBelowCriticalLevelL( TBool aShowErrorNote, - TInt aBytesToWrite /*=0*/ ); - - /** - * Returns pointer to main management view - */ - CAknView* GetVpnManagementUiView() const; - - /** - * CVpnApiWrapper - */ - CVpnApiWrapper& VpnApiWrapperL(); - - /** - * Returns the id to the GS view that launched us - */ - TVwsViewId GSViewId() const; - - /** - * Sets the id to the GS view that launched us - * @param aGsViewId The id to the GS view - */ - void SetGSViewId( TVwsViewId aGsViewId ); - - public: //data - - /** - * Added here because FocusChanged need to be included - * in every control derived from CCoeControl that can have listbox - */ - CEikColumnListBox* iListBox; - - /** - * If ETrue, We are coming back from server parameters view. - */ - TBool iBackFromServerDefinition; - - /** - * If ETrue, new Server definition has created. - */ - TBool iNewServerDefinition; - /** - * If ETrue, show Define policy server query when empty list. - */ - TBool iShowDefineQuery; - - MUiRunnerObserver* iObserver; - - CAknWaitDialog* iWaitDialog; - - TInt iCurrentPolicyIndex; - TInt iCurrentServerIndex; - TBool iPolicyUpdate; - TBuf iSelectionName; - - TBool iShowWaitNote; - RVpnExtApi iVpnExtApi; - - private: // data - - /** - * Used to wrap asynchronous calls - */ - CVpnApiWrapper* iVpnApiWrapper; - - private: // implementation - - void ConstructL(const TRect& aRect, TUid aViewId); - CVpnUiLoader(CVpnManagementUiView* aUiView); - void HandleControlEventL( CCoeControl* aControl, - TCoeEvent aEventType ); - TKeyResponse OfferKeyEventL( - const TKeyEvent& aKeyEvent, TEventCode aType); - public: - void AddResourceFileL(TBool aKeepOpen = EFalse); - void ReleaseResource(TBool aForceClose = EFalse); - - private: //data - - /** - * For Navipane - */ - CAknNavigationDecorator* iVersionInfoInNaviPane; - - /** - * For Navipane - */ - CAknNavigationControlContainer* iNaviPane; - - - /** - * To store the previous view id - */ - TUid iPreviousViewId; - - /** - * To store the previous view id - */ - TUid iPreviousAppViewId; - - TInt iTextToShow; - TInt iStateCodeToShow; - TTime iWaitNoteStartTime; - - /** - * Views to be registered and unregistered - */ - CAknView* iVpnManagementUiView; - CAknView* iVpnManagementUiLogView; - CAknView* iVpnManagementUiPolicyView; - CAknView* iVpnManagementUiParametersView; - CAknView* iVpnManagementUiServerView; - - CVpnManagementUi* iCVpnManagementUi; - - /** - * To get hold of iResourceLoader - */ - RConeResourceLoader iResourceLoader; - - TVwsViewId iGsViewId; // the view id of the view which launched us - TBool iKeepOpen; - TBool iPolicyViewVisited; - TBool iLogViewVisited; - TBool iServerViewVisited; - TBool iServerSettingsViewVisited; - - }; - -#endif // __VPNUILOADER_H__ - -// End of File diff -r 9f4e37332ce5 -r 473321461bba vpnui/vpnmanagementui/loc/vpnmanagementui.loc --- a/vpnui/vpnmanagementui/loc/vpnmanagementui.loc Thu Aug 19 10:54:34 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,420 +0,0 @@ -/* -* Copyright (c) 2003-2007 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: This is a localisation file for VPN management UI dll. -* -*/ - - - -// LOCALISATION STRINGS - -// ** VPN Setting item in GS connection view - -//d:Text of a list item in Connection view's list -//d:Item opens VPN view -//l:list_single_large_graphic_pane_t1 -//r:3.2 -// -#define qtn_set_folder_conn_vpn "Virtual Private Networking (VPN)" - - -// **VPN MANAGEMENT VIEW - -//d:Name of the view for title pane -//l:title_pane_t2/opt9 -// -#define qtn_vpn_management_title "VPN management" - -//d:Text of a list item in VPN management view -//d:Item opens VPN policies view -//l:list_setting_pane_t1 -// -#define qtn_vpn_policies "VPN policies" - -//d:Text of a list item in VPN management view -//d:Item opens Policy servers view -//l:list_setting_pane_t1 -// -#define qtn_vpn_policy_servers "VPN policy server" - -//d:Text of a list item in VPN management view -//d:Item opens VPN log view -//l:list_setting_pane_t1 -// -#define qtn_vpn_log "VPN log" - - - - -// **VPN POLICIES VIEW - -//d:Name of view for title pane -//l:title_pane_t2/opt9 -// -#define qtn_vpn_policies_title "VPN policies" - -//d:Policy view empty list placeholder text -//l:main_list_empty_pane -// -#define qtn_vpn_policies_empty "(no VPN policies)" - -//d:Middle soft key in VPN policies view when we have no policies installed. -//d:Starts policy installation procedure -//l:control_pane_t3/opt7 -// -#define qtn_msk_install_vpn_policies "Install policy" - -//d:Middle soft key in VPN policies view when we have installed policies. -//d:Opens VPN policy details view. -//l:control_pane_t3/opt7 -// -#define qtn_msk_vpn_details "Details" - - -// **OPTIONS MENU VPN POLICIES VIEW - -//d:Command in options menu in VPN policies view. -//d:Starts policy installation procedure -//l:list_single_pane_t1_cp2 -// -#define qtn_vpn_options_install_policies "Install policy" - -//d:Command in options menu in VPN policies view. -//d:Opens VPN policy details view. -//l:list_single_pane_t1_cp2 -// -#define qtn_vpn_options_policy_details "Details" - -//d:Command in options menu in VPN policies view. -//d:Starts policy update procedure -//l:list_single_pane_t1_cp2 -// -#define qtn_vpn_options_update_policy "Update policy" - -//d:Command in options menu in VPN policies view. -//d:Delete a VPN policy. -//l:list_single_pane_t1_cp2 -// -#define qtn_vpn_options_delete_policy "Delete policy" - - -// **VPN POLICY DETAILS VIEW - -//d:Detail's topic in message query. -//l:popup_info_list_pane_t2/opt1 -// -#define qtn_vpn_detail_policy_description "Description:" - -//d:Detail's topic in message query. -//l:popup_info_list_pane_t2/opt1 -// -#define qtn_vpn_detail_policy_status "Policy status:" - -//d:Detail's topic in message query. -//l:popup_info_list_pane_t2/opt1 -// -#define qtn_vpn_detail_cert_status "Certificate status:" - -//d:Detail's topic in message query. -//l:popup_info_list_pane_t2/opt1 -// -#define qtn_vpn_detail_policy_name "Policy name:" - -//d:Detail's topic in message query. -//l:popup_info_list_pane_t2/opt1 -// -#define qtn_vpn_detail_source_server_name "Source server name:" - -//d:Detail's topic in message query. -//l:popup_info_list_pane_t2/opt1 -// -#define qtn_vpn_detail_policy_update_time "Updated:" - -//d:Detailed info about Policy status in message query. -//l:popup_info_list_pane_t2/opt1 -// -#define qtn_vpn_detail_policy_not_associated "Not associated with a VPN access point" - -//d:Detailed info about Policy status in message query. -//l:popup_info_list_pane_t2/opt1 -// -#define qtn_vpn_detail_policy_associated "Associated with a VPN access point" - -//d:Detailed info about Policy status in message query. -//l:popup_info_list_pane_t2/opt1 -// -#define qtn_vpn_detail_policy_active "Active" - -//d:Detailed info about Certificate status in message query. -//l:popup_info_list_pane_t2/opt1 -// -#define qtn_vpn_detail_cert_status_ok "OK" - -//d:Detailed info about Certificate status in message query. -//l:popup_info_list_pane_t2/opt1 -// -#define qtn_vpn_detail_cert_status_expired "Expired" - -//d:Detailed info about Certificate status in message query. -//l:popup_info_list_pane_t2/opt1 -// -#define qtn_vpn_detail_cert_status_missing "Missing" - -//d:Detailed info about Certificate status in message query. -//l:popup_info_list_pane_t2/opt1 -// -#define qtn_vpn_detail_cert_status_not_yet_valid "Not yet valid" - - -// **VPN POLICY SERVERS VIEW - -//d:Name of view for title pane -//l:title_pane_t2/opt9 -// -#define qtn_vpn_policy_servers_title "VPN policy server" - -//d:Policy server view empty list placeholder text -//l:main_list_empty_pane -// -#define qtn_vpn_policy_servers_empty "(no VPN policy servers)" - -//d:Prompt text in VPN policy server selection popup. -//l:heading_pane_t1 -// -#define qtn_vpn_prmpt_policy_server_selection "Policy server:" - -//d:Middle soft key in empty VPN policy servers view. -//d:Opens VPN policy server parameters view for editing -//l:control_pane_t3/opt7 -// -#define qtn_msk_add_vpn_server "New server" - - - -// **OPTIONS MENU VPN POLICY SERVERS VIEW - -//d:Command in options menu in VPN policy servers view. -//d:Opens VPN policy server parameters view -//l:list_single_pane_t1_cp2 -// -#define qtn_vpn_options_add_new_server "New server" - -//d:Command in options menu in VPN policy servers view. -//d:Opens VPN policy server parameters view for editing -//l:list_single_pane_t1_cp2 -// -#define qtn_vpn_options_edit_server "Edit server" - -//d:Command in options menu in VPN policy servers view. -//d:Starts policy installation/update procedure -//l:list_single_pane_t1_cp2 -// -#define qtn_vpn_options_synchronise_server "Synchronise server" - -//d:Command in options menu in VPN policy servers view. -//d:Deletes a VPN policy server definition -//l:list_single_pane_t1_cp2 -// -#define qtn_vpn_options_delete_server "Delete server" - - -// **VPN POLICY SERVER PARAMETERS VIEW - -//d:Text of a first list item in VPN policy server parameters view's setting list -//d:Item opens VPN policy server name text setting item -//l:list_setting_pane_t1 -// -#define qtn_vpn_sett_policy_server_name "Policy server name" - -//d:Text of a second list item in VPN policy server parameters view's setting list -//d:Item opens VPN policy server address text setting item -//l:list_setting_pane_t1 -// -#define qtn_vpn_sett_policy_server_address "Policy server address" - -//d:Text of a third list item in VPN policy server parameters view's setting list -//d:Similar content as in §qtn_netw_conset_sett_destination§ in cmmanager.loc. -//d:Item opens a pop-up setting item -//l:list_setting_pane_t1 -// -#define qtn_vpn_sett_vpn_iap_real_netw_reference "Network connection" - - -// **VPN LOG VIEW - -//d:Name of view for title pane -//l:title_pane_t2/opt9 -// -#define qtn_vpn_log_title "VPN log" - -//d:Display version information about the VPN client installed. -//l:navi_text_pane_t1 -// -#define qtn_vpn_navi_client_version "mVPN v%U" - -//d:Log view empty list placeholder text -//l:main_list_empty_pane -// -#define qtn_vpn_log_empty "(no VPN log entries)" - -//d:Middle soft key in VPN log view. -//d:Refresh the VPN log -//l:control_pane_t3/opt7 -// -#define qtn_msk_refresh_vpn_log "Refresh log" - - -// **OPTIONS MENU VPN LOG VIEW - -//d:Command in options menu in VPN log view. -//d:Opens VPN log details view -//l:list_single_pane_t1_cp2 -// -#define qtn_logs_cmd_details "View details" - -//d:Command in options menu in VPN log view. -//d:Refresh the VPN log -//l:list_single_pane_t1_cp2 -// -#define qtn_vpn_options_refresh_log "Refresh log" - -//d:Command in options menu in VPN log view. -//d:Clears the VPN log -//l:list_single_pane_t1_cp2 -// -#define qtn_logs_cmd_clear_list "Clear log" - -// **CONFIRMATION QUERIES - -//d:Confirmation query text in empty VPN policies view. -//l:popup_note_window -// -#define qtn_vpn_quest_dl_policies_now "No VPN policies installed. Install now?" - -//d:Confirmation query text when user selects to delete -//d:a VPN policy. Case: not associated with a VPN access point. -//l:popup_note_window -// -#define qtn_vpn_quest_delete_policy "Delete VPN policy '%U'?" - -//d:Confirmation query text when user selects to delete -//d:a VPN policy. Case: associated with a VPN access point. -//l:popup_note_window -// -#define qtn_vpn_quest_delete_policy_associated "Policy is associated with a VPN access point. Delete anyway?" - -//d:Confirmation query text in empty VPN policy servers view -//l:popup_note_window -// -#define qtn_vpn_quest_define_new_server "No VPN policy servers defined. Define now?" - -//d:Confirmation query text after user has defined -//d:a new policy server -//l:popup_note_window -// -#define qtn_vpn_quest_synchronise_server "New VPN policy server defined. Synchronise now?" - -//d:Confirmation query text if the compulsory -//d:field is left empty -//l:popup_note_window -// -#define qtn_vpn_quest_incomplete_server_def_delete "Incomplete VPN policy server details. Exit without saving?" - -//d:Confirmation query text when user selects to delete a VPN -//d:policy server definition. Case: no policies related to the server. -//l:popup_note_window -// -#define qtn_vpn_quest_delete_server "Delete VPN policy server '%U'?" - -//d:Confirmation query text when user selects to delete a VPN -//d:policy server definition. Case: policies related to the server. -//l:popup_note_window -// -#define qtn_vpn_quest_delete_server_associated "Deleting this policy server will also delete related policies. Continue?" - -//d:Confirmation query text in VPN log view -//l:popup_note_window -// -#define qtn_vpn_quest_clear_log "Clear VPN log?" - - -// **CONFIRMATION NOTES - -//d:Confirmation note text in case when policy server -//d:synchronisation completed -//l:popup_note_window -// -#define qtn_vpn_conf_policy_server_sync_ok "Policy server synchronisation complete. See VPN log for details." - - -// **INFORMATION NOTES - -//d:Information note text in case when user tries to delete a policy server -//d:that is currently in use -//l:popup_note_window -// -#define qtn_vpn_info_policy_server_in_use "Policy server is currently in use. Unable to delete." - -//d:Information note text in case when user tries to edit a policy server -//d:address that cannot be modified -//l:popup_note_window -// -#define qtn_vpn_info_cannot_modify_server_def "Cannot be modified. Please create a new server definition." - -//d:Policy server synchronisation failed -//l:popup_note_window -// -#define qtn_vpn_info_policy_server_sync_error "Synchronisation failed. See VPN log for details." - -// **WAIT NOTE -//d:Wait note is shown when connecting the access point. -//d:%U indicates the name of access point which we are connecting to -//l:popup_note_wait_window -// -#define qtn_vpn_connecting_via_ap "Connecting via '%U'" - -//d:Wait note text in synchronization and update -//d:note dialogs -//l:popup_note_wait_window -// -#define qtn_vpn_wait_policy_dl_processing "Processing step %N" - - -// **SETTINGS VALUE TEXT - -//d:Setting value text in VPN policy server parameters view. -//l:list_set_graphic_pane_t1 -#define qtn_set_compulsory "Must be defined" - - -// **OPTIONS MENU - -//d:Command in options menu. -//d:Opens the currently selected setting item. -//l:list_single_pane_t1_cp2 -#define qtn_set_options_open "Open" - -//d:Command in Options menu settings view. -//d:Opens value changing dialog of highlighted item -//l:list_single_pane_t1_cp2 -#define qtn_set_options_change "Change" - - - - - - - - -// End of File diff -r 9f4e37332ce5 -r 473321461bba vpnui/vpnmanagementui/rom/vpnmanagementui.iby --- a/vpnui/vpnmanagementui/rom/vpnmanagementui.iby Thu Aug 19 10:54:34 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,29 +0,0 @@ -/* -* Copyright (c) 2005-2010 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Image description file for project vpnmanagementui -* -*/ - - -#ifndef __VPNMANAGEMENTUI_IBY__ -#define __VPNMANAGEMENTUI_IBY__ - -#ifdef FF_VPN_CLIENT - -data=ZRESOURCE\apps\vpnmanagementui.mif APP_RESOURCE_DIR\vpnmanagementui.mif -ECOM_PLUGIN(vpnmanagementui.dll,101F6D31.rsc) - -#endif // FF_VPN_CLIENT - -#endif // __VPNMANAGEMENTUI_IBY__ diff -r 9f4e37332ce5 -r 473321461bba vpnui/vpnmanagementui/rom/vpnmanagementuiResources.iby --- a/vpnui/vpnmanagementui/rom/vpnmanagementuiResources.iby Thu Aug 19 10:54:34 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,30 +0,0 @@ -/* -* Copyright (c) 2005-2010 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Image description file for project vpnmanagementui's resources -* -*/ - - - -#ifndef __VPNMANAGEMENTUIRESOURCES_IBY__ -#define __VPNMANAGEMENTUIRESOURCES_IBY__ - -#ifdef FF_VPN_CLIENT - -data=DATAZ_\RESOURCE_FILES_DIR\vpnmanagementuirsc.rsc RESOURCE_FILES_DIR\vpnmanagementuirsc.rsc -data=DATAZ_\HELP_FILE_DIR\vpn.hlp HELP_FILE_DIR\vpn.hlp - -#endif // FF_VPN_CLIENT - -#endif // __VPNMANAGEMENTUIRESOURCES_IBY__ diff -r 9f4e37332ce5 -r 473321461bba vpnui/vpnmanagementui/src/serversettingconnectionsettingitem.cpp --- a/vpnui/vpnmanagementui/src/serversettingconnectionsettingitem.cpp Thu Aug 19 10:54:34 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,149 +0,0 @@ -/* -* Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* Nokia Corporation -* -* Description: Setting item for the connection settings. -* -*/ - -#include "serversettingconnectionsettingitem.h" - -#include -#include -#include -#include -#include - -using namespace CMManager; - -CServerSettingConnectionSettingItem::CServerSettingConnectionSettingItem(TInt aIdentifier, - TCmSettingSelection& aSelection) -:CAknSettingItem(aIdentifier), iExternalValue(aSelection) - { - } - - -CServerSettingConnectionSettingItem::~CServerSettingConnectionSettingItem() - { - delete iSettingText; - } - - -void CServerSettingConnectionSettingItem::StoreL() - { - iExternalValue = iInternalValue; - } - - -void CServerSettingConnectionSettingItem::LoadL() - { - iInternalValue = iExternalValue; - UpdateSettingTextL(); - } - - -void CServerSettingConnectionSettingItem::EditItemL( TBool /*aCalledFromMenu*/ ) - { - RCmManagerExt cmManager; - cmManager.OpenLC(); - // Get supported bearer filter types - const TInt KArrayGranularity = 10; - RArray bearers = RArray( KArrayGranularity ); - CleanupClosePushL( bearers ); - cmManager.SupportedBearersL( bearers ); - // Do not include VPN bearer - TInt index = bearers.Find( KPluginVPNBearerTypeUid ); - if ( index != KErrNotFound ) - { - bearers.Remove( index ); - } - // Show settings page - - CCmApplicationSettingsUi* settings = CCmApplicationSettingsUi::NewL(); - CleanupStack::PushL( settings ); - TBool selected = settings->RunApplicationSettingsL( iInternalValue, - EShowDestinations | - EShowConnectionMethods, - bearers ); - CleanupStack::PopAndDestroy( 2 ); // settings, bearers - - if ( selected ) - { - UpdateSettingTextL(); - UpdateListBoxTextL(); - } - - CleanupStack::PopAndDestroy(); // cmManager - - } - - -const TDesC& CServerSettingConnectionSettingItem::SettingTextL() - { - if (iSettingText == NULL) - { - return CAknSettingItem::SettingTextL(); - } - else - { - return *iSettingText; - } - } - - -void CServerSettingConnectionSettingItem::UpdateSettingTextL() - { - delete iSettingText; - iSettingText = NULL; - - if ((iInternalValue.iResult == EDestination || - iInternalValue.iResult == EConnectionMethod) && - iInternalValue.iId != 0) - { - - RCmManagerExt cmManager; - cmManager.OpenLC(); - - if ( iInternalValue.iResult == EDestination ) - { - // Destination selected - RCmDestinationExt dest; - TRAPD( err, dest = cmManager.DestinationL( iInternalValue.iId ) ); - - if( KErrNone == err ) - { - CleanupClosePushL( dest ); - iSettingText = dest.NameLC(); - CleanupStack::Pop(iSettingText); - CleanupStack::PopAndDestroy(); // dest - } - } - else if ( iInternalValue.iResult == EConnectionMethod ) - { - // Connection method selected - RCmConnectionMethodExt conn; - TRAPD( err, conn = cmManager.ConnectionMethodL( iInternalValue.iId ) ); - - if( KErrNone == err ) - { - CleanupClosePushL( conn ); - iSettingText = conn.GetStringAttributeL( ECmName ); - CleanupStack::PopAndDestroy(); // conn - } - } - - CleanupStack::PopAndDestroy(); // cmManager - } - } - -/***/ diff -r 9f4e37332ce5 -r 473321461bba vpnui/vpnmanagementui/src/vpnapiwrapper.cpp --- a/vpnui/vpnmanagementui/src/vpnapiwrapper.cpp Thu Aug 19 10:54:34 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,250 +0,0 @@ -/* -* Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Wrapper for vpnapi -* -*/ - -#include -#include -#include -#include "vpnapiwrapper.h" - -#include "log_vpnmanagementui.h" - -using namespace CMManager; - -CVpnApiWrapper* CVpnApiWrapper::NewL() - { - CVpnApiWrapper* self = new (ELeave) CVpnApiWrapper(); - CleanupStack::PushL(self); - self->ConstructL(); - CleanupStack::Pop(); - return self; - } - -CVpnApiWrapper::CVpnApiWrapper() : - CActive(EPriorityNormal), iOngoingTask(ETaskNone) - { - } - -CVpnApiWrapper::~CVpnApiWrapper() - { - LOG_("CVpnApiWrapper::~CVpnApiWrapper() called\n"); - delete iPolicyList; - Cancel(); - - iVpnExtApi.Close(); - } - -void CVpnApiWrapper::DoCancel() - { - LOG_("CVpnApiWrapper::DoCancel() called\n"); - - TInt i=iVpnExtApi.CancelPolicyProvision(); - - iOngoingTask = ETaskNone; - } - -void CVpnApiWrapper::RunL() - { - LOG_1("CVpnApiWrapper::RunL():%d", iStatus.Int()); - - if (iOngoingTask == ETaskSynchroniseServer) - { - iCaller->NotifySynchroniseServerCompleteL(iStatus.Int()); - } - - iOngoingTask = ETaskNone; - } - -void CVpnApiWrapper::ConstructL() - { - LOG_("CVpnApiWrapper::ConstructL() - begin"); - - CActiveScheduler::Add(this); - - User::LeaveIfError(iVpnExtApi.Connect()); - LOG_("CVpnApiWrapper::ConstructL() - end"); - } - -CArrayFixFlat* CVpnApiWrapper::PolicyListL() - { - BuildPolicyListL(); - return iPolicyList; - } - -void CVpnApiWrapper::BuildPolicyListL() - { - LOG_("CVpnApiWrapper::BuildPolicyListL() - begin"); - - delete iPolicyList; - iPolicyList = NULL; - - iPolicyList = new (ELeave) CArrayFixFlat(2); - - User::LeaveIfError(iVpnExtApi.GetPolicyInfoList(iPolicyList)); - - TKeyArrayFix Key( _FOFF(TVpnPolicyInfo,iName), ECmpCollated ); - Key.SetPtr( iPolicyList ); - iPolicyList->Sort( Key ); - - LOG_("CVpnApiWrapper::BuildPolicyListL() - end"); - } - -void CVpnApiWrapper::DeletePolicyL(TInt aPolicyIndex) - { - LOG_("CVpnApiWrapper::DeletePolicyL() - begin"); - - TVpnPolicyId& policyToDelete = iPolicyList->At(aPolicyIndex).iId; - User::LeaveIfError(iVpnExtApi.DeletePolicy(policyToDelete)); - - //Delete all VPN APs pointing deleted policy - DeleteReferringVpnAps(policyToDelete); - - LOG_("CVpnApiWrapper::DeletePolicyL() - end"); - } - -void CVpnApiWrapper::GetPolicyDetailsL(TInt aPolicyIndex, TVpnPolicyDetails& aPolicyDetails) - { - LOG_("CVpnApiWrapper::GetPolicyDetailsL() - begin"); - - TVpnPolicyId& policyOfInterest = iPolicyList->At(aPolicyIndex).iId; - User::LeaveIfError(iVpnExtApi.GetPolicyDetails(policyOfInterest, aPolicyDetails)); - - LOG_("CVpnApiWrapper::GetPolicyDetailsL() - end"); - } - - - -TInt CVpnApiWrapper::CreateServer( const TAgileProvisionApiServerSettings& aServerDetails) - { - - iPolicyServer.iServerNameLocal = aServerDetails.iServerNameLocal; - iPolicyServer.iServerUrl = aServerDetails.iServerUrl; - iPolicyServer.iSelection = aServerDetails.iSelection; - - return iVpnExtApi.CreateServer(iPolicyServer); - } - -TAgileProvisionApiServerListElem& CVpnApiWrapper::ServerListL() - { - TInt err(iVpnExtApi.ServerListL( iVpnPolicyServerList )); - User::LeaveIfError( err ); - - return iVpnPolicyServerList; - - } - -void CVpnApiWrapper::GetServerDetailsL( TAgileProvisionApiServerSettings& aServerDetails ) - { - User::LeaveIfError( iVpnExtApi.ServerDetails(aServerDetails)); - } - -TInt CVpnApiWrapper::DeleteServer() - { - - return iVpnExtApi.DeleteServer(); - - } - -void CVpnApiWrapper::SynchroniseServerL( MVpnApiWrapperCaller* aCaller ) - { - iCaller=aCaller; - iVpnExtApi.SynchronizePolicyServer(iStatus); - SetActive(); - iOngoingTask = ETaskSynchroniseServer; - } - -void CVpnApiWrapper::CancelSynchronise() - { - - Cancel(); - - } - -void CVpnApiWrapper::DeleteReferringVpnAps(const TVpnPolicyId& aPolicyId) const - { - TRAP_IGNORE(DeleteReferringVpnApsL(aPolicyId)); - } - -void CVpnApiWrapper::DeleteReferringVpnApsL(const TVpnPolicyId& aPolicyId) const - { - RCmManager cmManager; - cmManager.OpenLC(); - - //First collect all VPN connection methods from destinations - RArray destinationArray; - cmManager.AllDestinationsL( destinationArray ); - CleanupClosePushL(destinationArray); - - for (TInt i = 0; i < destinationArray.Count(); ++i) - { - RCmDestination destination = cmManager.DestinationL( destinationArray[i] ); - CleanupClosePushL(destination); - - TInt connectionMethodCount = destination.ConnectionMethodCount(); - for (TInt j = connectionMethodCount - 1; j >= 0; --j) - { - RCmConnectionMethod connectionMethod = destination.ConnectionMethodL( j ); - CleanupClosePushL(connectionMethod); - - if ( connectionMethod.GetBoolAttributeL(ECmVirtual) && - connectionMethod.GetIntAttributeL( ECmBearerType ) == KPluginVPNBearerTypeUid) - { - HBufC* policyId = connectionMethod.GetStringAttributeL( EVpnServicePolicy ); - CleanupStack::PushL(policyId); - if (policyId->Compare(aPolicyId) == 0) - { - destination.DeleteConnectionMethodL( connectionMethod ); - destination.UpdateL(); - } - CleanupStack::PopAndDestroy(policyId); - } - CleanupStack::PopAndDestroy(); //connectionMethod - } - - CleanupStack::PopAndDestroy(); //destination - } - CleanupStack::PopAndDestroy(); //destinationArray - - //Second collect VPN connection methods, which are not inside a destination. - RArray connectionMethodArray; - cmManager.ConnectionMethodL( connectionMethodArray ); - CleanupClosePushL(connectionMethodArray); - - for ( TInt i = 0; i < connectionMethodArray.Count(); ++i) - { - RCmConnectionMethod connectionMethod = - cmManager.ConnectionMethodL( connectionMethodArray[i] ); - CleanupClosePushL(connectionMethod); - if ( connectionMethod.GetBoolAttributeL(ECmVirtual) && - connectionMethod.GetIntAttributeL( ECmBearerType ) == KPluginVPNBearerTypeUid) - { - HBufC* policyId = connectionMethod.GetStringAttributeL( EVpnServicePolicy ); - CleanupStack::PushL(policyId); - if (policyId->Compare(aPolicyId) == 0) - { - connectionMethod.DeleteL(); - connectionMethod.UpdateL(); - } - CleanupStack::PopAndDestroy(policyId); - } - - CleanupStack::PopAndDestroy(); //connectionMethod - } - CleanupStack::PopAndDestroy(); //connectionMethodArray - - CleanupStack::PopAndDestroy(); //cmManager - } -/***/ diff -r 9f4e37332ce5 -r 473321461bba vpnui/vpnmanagementui/src/vpnmanagementuicontainer.cpp --- a/vpnui/vpnmanagementui/src/vpnmanagementuicontainer.cpp Thu Aug 19 10:54:34 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,277 +0,0 @@ -/* -* Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Management UI Container -* -*/ - - - -// INCLUDE FILES -#include //for CAknTitlePane -#include //for TResourceReader -#include -#include //for listbox control -#include -#include -#include -#include "vpnuiloader.h" -#include "vpnmanagementuicontainer.h" - -#ifdef __SERIES60_HELP -#include // for help context of VPN Management UI -#endif //__SERIES60_HELP - - -// ================= MEMBER FUNCTIONS ======================= - -// --------------------------------------------------------- -// CVpnManagementUiContainer::CVpnManagementUiContainer( -// CVpnManagementUiView& aParent, CVpnUiLoader& aLoader) -// Constructor with parent -// --------------------------------------------------------- -// -CVpnManagementUiContainer::CVpnManagementUiContainer( - CVpnManagementUiView& aParent, CVpnUiLoader& aLoader ) : - iParent ( aParent ), iLoader ( aLoader ) - { - } - -// --------------------------------------------------------- -// CVpnManagementUiContainer::~CVpnManagementUiContainer() -// Destructor -// --------------------------------------------------------- -// -CVpnManagementUiContainer::~CVpnManagementUiContainer() - { - delete iListBox; - } - -// --------------------------------------------------------- -// CVpnManagementUiContainer::ConstructL(const TRect& aRect) -// EPOC two phased constructor -// --------------------------------------------------------- -// -void CVpnManagementUiContainer::ConstructL(const TRect& aRect) - { - CreateWindowL(); - - TitlePaneTextsL(); - - CreateListBoxL(); - ShowItemsL(); - - SetRect(aRect); - ActivateL(); - } - - -// --------------------------------------------------------- -// CVpnManagementUiContainer::SizeChanged() -// Called by framework when the view size is changed -// --------------------------------------------------------- -// -void CVpnManagementUiContainer::SizeChanged() - { - if (iListBox) - { - iListBox->SetRect(Rect()); - } - } - -// --------------------------------------------------------- -// CVpnManagementUiContainer::CountComponentControls -// --------------------------------------------------------- -// -TInt CVpnManagementUiContainer::CountComponentControls() const - { - return 1; // return nbr of controls inside this container - } - -// --------------------------------------------------------- -// CVpnManagementUiContainer::ComponentControl -// --------------------------------------------------------- -// -CCoeControl* CVpnManagementUiContainer::ComponentControl(TInt aIndex) const - { - switch ( aIndex ) - { - case 0: - return iListBox; - default: - return NULL; - } - } - -// --------------------------------------------------------- -// CVpnManagementUiContainer::HandleResourceChange -// --------------------------------------------------------- -// -void CVpnManagementUiContainer::HandleResourceChange( TInt aType ) - { - CCoeControl::HandleResourceChange(aType); - - //Handle change in layout orientation - if (aType == KEikDynamicLayoutVariantSwitch || - aType == KAknsMessageSkinChange ) - { - TRect mainPaneRect; - AknLayoutUtils::LayoutMetricsRect( - AknLayoutUtils::EMainPane, mainPaneRect); - SetRect(mainPaneRect); - DrawNow(); - } - } - -// --------------------------------------------------------- -// CVpnManagementUiContainer::DrawListBoxL() -// Draws listbox -// --------------------------------------------------------- -// -void CVpnManagementUiContainer::DrawListBoxL( - TInt aCurrentPosition, TInt aTopItem) - { - if (aCurrentPosition >= 0) - { - iListBox->SetTopItemIndex( aTopItem ); - iListBox->SetCurrentItemIndex( aCurrentPosition ); - } - ActivateL(); - DrawNow(); - } - -// --------------------------------------------------------- -// CVpnManagementUiContainer::HandleControlEventL( -// CCoeControl* aControl,TCoeEvent aEventType) -// --------------------------------------------------------- -// -void CVpnManagementUiContainer::HandleControlEventL( - CCoeControl* /*aControl*/,TCoeEvent /*aEventType*/) - { - } - -TKeyResponse CVpnManagementUiContainer::OfferKeyEventL( - const TKeyEvent& aKeyEvent, TEventCode aType) - { - if (aType!=EEventKey) - { - return EKeyWasNotConsumed; - } - switch (aKeyEvent.iCode) - { - case EKeyUpArrow: - if (iListBox) - { - return iListBox->OfferKeyEventL(aKeyEvent, aType); - } - break; - case EKeyDownArrow: - if (iListBox) - { - return iListBox->OfferKeyEventL(aKeyEvent, aType); - } - break; - case EKeyEnter: - case EKeyDevice3: - // Select button or enter key pressed, do default action - if (iListBox) - { - return iListBox->OfferKeyEventL(aKeyEvent, aType); - } - break; - - default: - break; - } - return EKeyWasNotConsumed; - } - -// --------------------------------------------------------- -// CVpnManagementUiContainer::TitlePaneTextsL -// Initialized Title pane text -// --------------------------------------------------------- -// -void CVpnManagementUiContainer::TitlePaneTextsL() - { - // first get StatusPane. Not owned - CEikStatusPane* statusPane = iEikonEnv->AppUiFactory()->StatusPane(); - if (statusPane) - { - // then get TitlePane. Not owned - CAknTitlePane* titlePane = ( CAknTitlePane* ) statusPane->ControlL( - TUid::Uid( EEikStatusPaneUidTitle ) ); - - // set new titlepane text - TResourceReader reader; - iEikonEnv->CreateResourceReaderLC(reader, R_VPN_MANAGEMENT_TITLE); - titlePane->SetFromResourceL( reader ); - CleanupStack::PopAndDestroy(); // reader - } - } - -void CVpnManagementUiContainer::CreateListBoxL() - { - iListBox = new(ELeave) CAknSettingStyleListBox; - iListBox->SetContainerWindowL( *this); - - iListBox->ConstructL( this, EAknListBoxSelectionList); - iListBox->CreateScrollBarFrameL(ETrue); - iListBox->ScrollBarFrame()->SetScrollBarVisibilityL( - CEikScrollBarFrame::EOff,CEikScrollBarFrame::EAuto); - } - - -void CVpnManagementUiContainer::ShowItemsL() - { - CDesCArrayFlat* itemTextArray = - static_cast(iListBox->Model()->ItemTextArray()); - - itemTextArray->Reset(); - iListBox->Reset(); - - HBufC* resourceText = NULL; - - //Create VPN policies setting listbox item - resourceText = StringLoader::LoadLC( R_VPN_POLICIES ); - itemTextArray->AppendL(*resourceText); - CleanupStack::PopAndDestroy(); // resourceText - - //Create Policy servers setting listbox item - - resourceText = StringLoader::LoadLC( R_VPN_POLICY_SERVERS ); - itemTextArray->AppendL(*resourceText); - CleanupStack::PopAndDestroy(); // resourceText - - //Create Log setting listbox item - resourceText = StringLoader::LoadLC( R_VPN_LOG ); - itemTextArray->AppendL(*resourceText); - CleanupStack::PopAndDestroy(); // resourceText - - iListBox->HandleItemAdditionL(); - } - -// --------------------------------------------------------- -// CVpnManagementUiContainer::GetHelpContext -// This function is called when Help application is launched. -// --------------------------------------------------------- -// -#ifdef __SERIES60_HELP -void CVpnManagementUiContainer::GetHelpContext( - TCoeHelpContext& aContext ) const - { - aContext.iMajor = KUidVpnManagementUi; - aContext.iContext = KSET_HLP_VPN_CONFIG_MAIN; - } -#endif //__SERIES60_HELP - -// End of File diff -r 9f4e37332ce5 -r 473321461bba vpnui/vpnmanagementui/src/vpnmanagementuiimplementationtable.cpp --- a/vpnui/vpnmanagementui/src/vpnmanagementuiimplementationtable.cpp Thu Aug 19 10:54:34 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,47 +0,0 @@ -/* -* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* ECOM proxy table for this plugin -* -*/ - - - -// System includes -#include -#include - -// User includes -#include "vpnmanagementuiview.h" - -// Constants -const TImplementationProxy KVpnManagementUiImplementationTable[] = - { - IMPLEMENTATION_PROXY_ENTRY( 0x101F6D32, CVpnManagementUiView::NewL ) - }; - - -// --------------------------------------------------------------------------- -// ImplementationGroupProxy -// Gate/factory function -// -// --------------------------------------------------------------------------- -// -EXPORT_C const TImplementationProxy* ImplementationGroupProxy(TInt& aTableCount) - { - aTableCount = sizeof( KVpnManagementUiImplementationTable ) - / sizeof( TImplementationProxy ); - return KVpnManagementUiImplementationTable; - } - diff -r 9f4e37332ce5 -r 473321461bba vpnui/vpnmanagementui/src/vpnmanagementuilogcontainer.cpp --- a/vpnui/vpnmanagementui/src/vpnmanagementuilogcontainer.cpp Thu Aug 19 10:54:34 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,692 +0,0 @@ -/* -* Copyright (c) 2003-2006 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: The container is responsible of showing log viewer. -* -*/ - - - -// INCLUDE FILES -#include -#include -#include -#include //for LOG details message query -#include -#include "vpnuiloader.h" -#include "vpnmanagementuilogcontainer.h" -#include "vpnmanagementuidefs.h" -#include "vpnmanagementui.hrh" -#ifdef __SCALABLE_ICONS -#include -#include -#endif //__SCALABLE_ICONS - - -#ifdef __SERIES60_HELP -#include // for help context of VPN Management UI -#endif //__SERIES60_HELP - -//CONSTANTS -const TInt KVpnLogNumberOfIcons = 3; - -// ================= MEMBER FUNCTIONS ======================= - -// --------------------------------------------------------- -// CVpnManagementUiLogContainer::CVpnManagementUiLogContainer( -// CVpnManagementUiLogView& aParent, CVpnUiLoader& aLoader) -// Constructor with parent -// --------------------------------------------------------- -// -CVpnManagementUiLogContainer::CVpnManagementUiLogContainer( - CVpnManagementUiLogView& aParent, CVpnUiLoader& aLoader ) : - iParent ( aParent ), iLoader ( aLoader ) - { - } - -// --------------------------------------------------------- -// CVpnManagementUiLogContainer::~CVpnManagementUiLogContainer() -// Destructor -// --------------------------------------------------------- -// -CVpnManagementUiLogContainer::~CVpnManagementUiLogContainer() - { - if(iEventViewer) - { - delete iEventViewer; - iEventViewer = NULL; - } - if(iLogList) - { - delete iLogList; - iLogList = NULL; - } - delete iListBox; - } - -// --------------------------------------------------------- -// CVpnManagementUiLogContainer::ConstructL( -// const TRect& aRect, TInt& aCurrentPosition, TInt& aTopItem) -// EPOC two phased constructor -// --------------------------------------------------------- -// -void CVpnManagementUiLogContainer::ConstructL( - const TRect& aRect, TInt& /*aCurrentPosition*/ ) - { - CreateWindowL(); - CreateListBoxL(); - - ShowLogsL(); - SetRect( aRect ); - } - -// --------------------------------------------------------- -// CVpnManagementUiLogContainer::SizeChanged() -// Called by framework when the view size is changed -// --------------------------------------------------------- -// -void CVpnManagementUiLogContainer::SizeChanged() - { - iListBox->SetRect(Rect()); - } - -// --------------------------------------------------------- -// CVpnManagementUiLogContainer::FocusChanged(TDrawNow aDrawNow) -// --------------------------------------------------------- -// -void CVpnManagementUiLogContainer::FocusChanged(TDrawNow aDrawNow) - { - if ( iListBox ) - { - iListBox->SetFocus( IsFocused(), aDrawNow ); - } - } - -// --------------------------------------------------------- -// CVpnManagementUiLogContainer::HandleResourceChange -// --------------------------------------------------------- -// -void CVpnManagementUiLogContainer::HandleResourceChange( TInt aType ) - { - CCoeControl::HandleResourceChange(aType); - - //Handle change in layout orientation - if (aType == KEikDynamicLayoutVariantSwitch || aType == KAknsMessageSkinChange ) - { - iListBox->HandleResourceChange(aType); - TRect mainPaneRect; - AknLayoutUtils::LayoutMetricsRect(AknLayoutUtils::EMainPane, mainPaneRect); - SetRect(mainPaneRect); - DrawNow(); - } - } - -// --------------------------------------------------------- -// CVpnManagementUiLogContainer::HandleListBoxEventL( -// CEikListBox* /*aListBox*/, TListBoxEvent aEventType) -// --------------------------------------------------------- -// -void CVpnManagementUiLogContainer::HandleListBoxEventL( - CEikListBox* /*aListBox*/, TListBoxEvent aEventType ) - { - switch(aEventType) - { - case EEventEnterKeyPressed: - case EEventItemSingleClicked: - iParent.HandleCommandL(EVpnUiCmdLogDetails); - break; - default: - //Do nothing - break; - } - } -enum { EListBoxControl, ENumberOfControls }; - -// --------------------------------------------------------- -// CVpnManagementUiLogContainer::CountComponentControls() const -// --------------------------------------------------------- -// -TInt CVpnManagementUiLogContainer::CountComponentControls() const - { - // return number of controls inside this container - return ENumberOfControls; // return nbr of controls inside this container - } - -// --------------------------------------------------------- -// CVpnManagementUiLogContainer::ComponentControl(TInt aIndex) const -// --------------------------------------------------------- -// -CCoeControl* CVpnManagementUiLogContainer::ComponentControl(TInt aIndex) const - { - switch ( aIndex ) - { - case 0: - return iListBox; - default: - return NULL; - } - } - -// --------------------------------------------------------- -// CVpnManagementUiLogContainer::HandleControlEventL( -// CCoeControl* /*aControl*/,TCoeEvent /*aEventType*/) -// Cannot be changed to non-leaving function. -// L-function is required by the class definition, even if empty. -// --------------------------------------------------------- -// -void CVpnManagementUiLogContainer::HandleControlEventL( - CCoeControl* /*aControl*/,TCoeEvent /*aEventType*/) - { - } - -// --------------------------------------------------------- -// CVpnManagementUiLogContainer::OfferKeyEventL( -// const TKeyEvent& aKeyEvent, TEventCode aType) -// Handles the key events OK button, arrow keys, delete key. -// OK button show VPN log details, -// if list is empty then arrow keys and OK inactive. -// Delete active only if list not empty. -// --------------------------------------------------------- -// -TKeyResponse CVpnManagementUiLogContainer::OfferKeyEventL( - const TKeyEvent& aKeyEvent, TEventCode aType) - { - TKeyResponse retval = EKeyWasNotConsumed; - if ( aType==EEventKey ) - { - if ( (aKeyEvent.iCode == EKeyOK || aKeyEvent.iCode == EKeyEnter) && // select or enter - iListBox->CurrentItemIndex() > -1) //This is for empty list - { - // Selection key pressed. - LogDetailsL(iListBox->CurrentItemIndex()); - - retval = EKeyWasConsumed; - } - - else if ( aKeyEvent.iCode == EKeyUpArrow ) - { - retval = iListBox->OfferKeyEventL( aKeyEvent, aType ); - } - else if ( aKeyEvent.iCode == EKeyDownArrow ) - { - TEventProperties eventProperties; - HBufC* eventText = NULL; - TInt currentPosition = iListBox->CurrentItemIndex(); - if((iEventViewer != NULL) && (iLogList->Count() > 0)) - { - iEventViewer->GetEventUsingEventNumber(eventText, iLogList->At(iLogList->Count() - 1).iEventNumber, eventProperties); - delete eventText; - } - UpdateListBoxL(currentPosition); - retval = iListBox->OfferKeyEventL( aKeyEvent, aType ); - } - } - else - { - retval = iListBox->OfferKeyEventL( aKeyEvent, aType ); - } - - - return retval; - } - -// --------------------------------------------------------- -// CVpnManagementUiLogContainer::CreateListBoxL() -// Creates listbox, sets empty listbox text. -// --------------------------------------------------------- -// -void CVpnManagementUiLogContainer::CreateListBoxL() - { - iListBox = new( ELeave ) CAknDoubleGraphicStyleListBox; - iListBox->SetContainerWindowL( *this ); - iListBox->ConstructL( this, EAknListBoxSelectionList ); - iListBox->CreateScrollBarFrameL( ETrue ); - iListBox->ScrollBarFrame()-> - SetScrollBarVisibilityL( CEikScrollBarFrame::EOff,CEikScrollBarFrame::EAuto ); - iListBox->SetListBoxObserver(this); - -#ifdef __SCALABLE_ICONS - - CArrayPtr< CGulIcon >* icons = new( ELeave ) CAknIconArray( KVpnLogNumberOfIcons ); - CleanupStack::PushL( icons ); - - MAknsSkinInstance* skinInstance = AknsUtils::SkinInstance(); - - TFileName fileName = GetIconFilenameL(); - - icons->AppendL( AknsUtils::CreateGulIconL( skinInstance, - KAknsIIDQgnPropVpnLogInfo, - fileName, - EMbmVpnmanagementuiQgn_prop_vpn_log_info, - EMbmVpnmanagementuiQgn_prop_vpn_log_info_mask ) ); - - icons->AppendL( AknsUtils::CreateGulIconL( skinInstance, - KAknsIIDQgnPropVpnLogWarn, - fileName, - EMbmVpnmanagementuiQgn_prop_vpn_log_warn, - EMbmVpnmanagementuiQgn_prop_vpn_log_warn_mask ) ); - - icons->AppendL( AknsUtils::CreateGulIconL( skinInstance, - KAknsIIDQgnPropVpnLogError, - fileName, - EMbmVpnmanagementuiQgn_prop_vpn_log_error, - EMbmVpnmanagementuiQgn_prop_vpn_log_error_mask ) ); - - iListBox->ItemDrawer()->ColumnData()->SetIconArray( icons ); - - CleanupStack::Pop(); // icons -#else - CAknIconArray* icons = new(ELeave) CAknIconArray(KVpnLogNumberOfIcons); - icons->ConstructFromResourceL(R_VPN_LOG_ICON_ARRAY); - - iListBox->ItemDrawer()->ColumnData()->SetIconArray(icons); - -#endif //__SCALABLE_ICONS - - EmptyViewTextL(); - } - -// --------------------------------------------------------- -// CVpnManagementUiLogContainer::EmptyViewTextL() -// Reads text from resource to empty log view -// and put text to the listbox. -// --------------------------------------------------------- -// -void CVpnManagementUiLogContainer::EmptyViewTextL() - { - HBufC* stringHolder = StringLoader::LoadLC( R_VPN_LOG_EMPTY ); - iListBox->View()->SetListEmptyTextL( *stringHolder ); - CleanupStack::PopAndDestroy(); // stringHolder - } - -// --------------------------------------------------------- -// CVpnManagementUiLogContainer::RemoveAllFromListBoxL() -// Removes all from listbox. -// --------------------------------------------------------- -// -void CVpnManagementUiLogContainer::RemoveAllFromListBoxL() - { - MDesCArray* itemList = iListBox->Model()->ItemTextArray(); - CDesCArray* itemArray = (CDesCArray*) itemList; - itemArray->Reset(); - iListBox->HandleItemRemovalL(); - iListItemCount = 0; - DrawNow(); - } - -// --------------------------------------------------------- -// CVpnManagementUiLogContainer::DrawListBoxL(TInt aCurrentPosition, TInt aTopItem) -// Draws listbox, fetches graphic icons for markable list -// --------------------------------------------------------- -// -void CVpnManagementUiLogContainer::DrawListBoxL( - TInt aCurrentPosition, TInt aTopItem ) - { - - if (aCurrentPosition >= 0) - { - iListBox->SetTopItemIndex( aTopItem ); - iListBox->SetCurrentItemIndex( aCurrentPosition ); - } - ActivateL(); - DrawNow(); - - } - -void CVpnManagementUiLogContainer::ShowLogsL() - { - iListItemCount = 0; - - //Create CEventViewer object - delete iEventViewer; - iEventViewer = NULL; - TRAPD(error, iEventViewer = CEventViewer::NewL()); - if (error != KErrNone) - return; - - delete iLogList; - iLogList = NULL; - iLogList = new (ELeave) CArrayFixFlat(3); - - CDesCArrayFlat* itemTextArray = static_cast(iListBox->Model()->ItemTextArray()); - - itemTextArray->Reset(); - iListBox->Reset(); - - TEventProperties eventProperties; - HBufC* eventText = NULL; - - //First item - TBuf<100> itemName; - TInt ret = iEventViewer->GetMostRecentEvent(eventText, eventProperties); - if(ret==KErrNone) - { - CleanupStack::PushL(eventText); - - iLogList->AppendL(eventProperties); - - //append index of icon array - itemName.AppendNum(GetIconArrayIndex(eventProperties.iCategory)); - - itemName.Append(_L("\t")); - - TPtr eventTextDesc(eventText->Des()); - TInt length = eventTextDesc.Length(); - if(length > KMaxLogListLength) - { - eventTextDesc.Delete(KMaxLogListLength, length-KMaxLogListLength); - } - itemName.Append(eventTextDesc); - CleanupStack::PopAndDestroy(); //eventText - itemName.Append(_L("\t")); - - //Format time stamp for LOG view - TBuf<2 * KMaxLengthTextDateString + 3> logEntry; - TimeLogEntryL(logEntry, eventProperties.iTimeStamp); - - itemName.Append(logEntry); - - itemTextArray->AppendL(itemName); - iListBox->HandleItemAdditionL(); - iListItemCount++; - //Get rest of events - while (ret==KErrNone) - { - TInt currentPosition = iListBox->CurrentItemIndex(); - ret = UpdateListBoxL(currentPosition); - } - - } - - } - -TInt CVpnManagementUiLogContainer::GetIconArrayIndex(TLogCategory2& aCategory) - { - //index of icon array - if (aCategory == ELogInfo) - return 0; //index of icon array - else if (aCategory == ELogWarning) - return 1; //index of icon array - else if (aCategory == ELogError) - return 2; //index of icon array - else - return 2; - } - - -void CVpnManagementUiLogContainer::TimeLogEntryL(TDes& aDes, TTime aTime) - { - // Date - HBufC* dateFormat = StringLoader::LoadLC(R_QTN_DATE_USUAL_WITH_ZERO); - TBuf dateString; - aTime.FormatL(dateString, *dateFormat); - AknTextUtils::DisplayTextLanguageSpecificNumberConversion(dateString); - CleanupStack::PopAndDestroy(); //dateFormat - - // Time - dateFormat = StringLoader::LoadLC(R_QTN_TIME_USUAL_WITH_ZERO); - TBuf timeString; - aTime.FormatL(timeString, *dateFormat); - AknTextUtils::DisplayTextLanguageSpecificNumberConversion(timeString); - CleanupStack::PopAndDestroy(); //dateFormat - -// TBuf dateBuffer; // KMaxShortDateFormatSpec is defined in e32std.h -// TBuf timeBuffer; // KMaxTimeFormatSpec is defined in e32std.h - - TBuf<2 * KMaxLengthTextDateString + 3> logEntry; - - TTime now; - now.HomeTime(); - if ( (now.YearsFrom( aTime ).Int() > 0) || - (aTime.DayNoInYear() < now.DayNoInYear()) ) - { - logEntry.Append(dateString); - logEntry.Append(KVpnManagementUiSpaceHyphenSpace); - } - - logEntry.Append(timeString); - aDes = logEntry; - } - -// --------------------------------------------------------- -// CVpnManagementUiLogContainer::UpdateListBoxL(TInt& aCurrentPosition) -// -// --------------------------------------------------------- -// -TInt CVpnManagementUiLogContainer::UpdateListBoxL(TInt& /*aCurrentPosition*/) - { - MDesCArray* itemList = iListBox->Model()->ItemTextArray(); - CDesCArray* itemArray = ( CDesCArray* )itemList; - - TEventProperties eventProperties; - HBufC* eventText = NULL; - TBuf<100> itemName; - - //next item - if(iEventViewer != NULL) - { - TInt ret = iEventViewer->GetPreviousEvent(eventText, eventProperties); - if(ret==KErrNone) - { - CleanupStack::PushL(eventText); - iLogList->AppendL(eventProperties); - - //append index of icon array - itemName.AppendNum(GetIconArrayIndex(eventProperties.iCategory)); - - itemName.Append(_L("\t")); - - TPtr eventTextDesc(eventText->Des()); - TInt length = eventTextDesc.Length(); - if(length > KMaxLogListLength) - eventTextDesc.Delete(KMaxLogListLength, length-KMaxLogListLength); - itemName.Append(eventTextDesc); - CleanupStack::PopAndDestroy(); //eventText - itemName.Append(_L("\t")); - - //Format time stamp for LOG view - TBuf<2 * KMaxLengthTextDateString + 3> logEntry; - TimeLogEntryL(logEntry, eventProperties.iTimeStamp); - - itemName.Append(logEntry); - - itemArray->AppendL(itemName); - iListBox->HandleItemAdditionL(); - iListItemCount++; - } - - iParent.SetMiddleSoftKeyL(ETrue); - return ret; - - } - - iParent.SetMiddleSoftKeyL(ETrue); - return KErrNotFound; - } - -// --------------------------------------------------------- -// CVpnManagementUiLogContainer::LogDetailsL() -// Creates the log details message query -// Appends strings from resource and eventviewer to one -// message body text and displays it. -// --------------------------------------------------------- -// -void CVpnManagementUiLogContainer::LogDetailsL(TInt aIndex) - { - TEventProperties eventProperties; - eventProperties = iLogList->At(aIndex); - - HBufC* message = NULL; - HBufC* eventText = NULL; - iEventViewer->GetEventUsingEventNumber(eventText, eventProperties.iEventNumber, eventProperties); - CleanupStack::PushL( eventText ); - - if(eventProperties.iCategory == ELogInfo) - { - // Info: - message = StringLoader::LoadLC( R_VPN_DETAIL_LOG_ENTRY_INFO ); - } - - if(eventProperties.iCategory == ELogWarning) - { - // Warning: - message = StringLoader::LoadLC( R_VPN_DETAIL_LOG_ENTRY_WARNING ); - } - - if(eventProperties.iCategory == ELogError) - { - // Error: - message = StringLoader::LoadLC( R_VPN_DETAIL_LOG_ENTRY_ERROR ); - } - - __ASSERT_DEBUG(message != NULL, User::Invariant()); - - HBufC* messageText = HBufC::NewLC(message->Length() + eventText->Length() + 2); - - messageText->Des().Append(*message); //Append category - messageText->Des().Append(KVpnManagementUiSpace); - messageText->Des().Append(*eventText); //Append log entry message - - // Heading is the date and the time of the log entry - //Format time stamp for LOG view - TBuf<2 * KMaxLengthTextDateString + 3> logEntry; - TimeLogEntryL(logEntry, eventProperties.iTimeStamp); - - CAknMessageQueryDialog* dlg = CAknMessageQueryDialog::NewL(*messageText); - - CleanupStack::PopAndDestroy(3); // message Text, message, eventText - - dlg->PrepareLC(R_MESSAGE_QUERY_DETAILS_VIEW); - dlg->QueryHeading()->SetTextL(logEntry); - dlg->RunLD(); - } - -// --------------------------------------------------------- -// CVpnManagementUiLogContainer::ReadResourceL(HBufC& aText, TInt aResource); -// Reads text from resource -// --------------------------------------------------------- -// -void CVpnManagementUiLogContainer::ReadResourceL(HBufC& aText, TInt aResource) - { - HBufC* text = StringLoader::LoadLC( aResource ); - aText.Des().Append(text->Des()); - CleanupStack::PopAndDestroy(); // text - } - -// --------------------------------------------------------- -// CVpnManagementUiLogContainer::ClearLogL() -// Asks confirmation from user. -// Clears VPN log view. -// Calls eventviewer to clear log. -// --------------------------------------------------------- -// -void CVpnManagementUiLogContainer::ClearLogL() - { - // Read query text from resource - HBufC* temp; - temp = StringLoader::LoadLC( R_VPN_QUEST_CLEAR_LOG ); - - // Asks confirmation from user - CAknQueryDialog* query = CAknQueryDialog::NewL( CAknQueryDialog::EConfirmationTone ); - TInt retval = query->ExecuteLD( R_CONFIRMATION_QUERY, *temp ); - CleanupStack::PopAndDestroy(); // temp - if ( retval ) - { - // Clear VPN log listbox - RemoveAllFromListBoxL(); - - // Calls eventviewer to clear log. - iEventViewer->DeleteLogFile(); - } - - iParent.SetMiddleSoftKeyL(ETrue); - } - -// --------------------------------------------------------- -// CVpnManagementUiLogContainer::IconArrayResourceId -// Loads Mark/Unmark icons from resource -// --------------------------------------------------------- -// -TInt CVpnManagementUiLogContainer::IconArrayResourceId() const - { - return 0; //TVA - } - -// --------------------------------------------------------- -// CVpnManagementUiLogContainer::CreateIconArrayL -// Creates Icon Array -// --------------------------------------------------------- -// -CAknIconArray* CVpnManagementUiLogContainer::CreateIconArrayL() const - { - CAknIconArray* icons = new (ELeave) CAknIconArray( KGranularity ); - CleanupStack::PushL( icons ); - icons->ConstructFromResourceL( IconArrayResourceId() ); - CleanupStack::Pop(); // icons - return icons; - } - -TFileName CVpnManagementUiLogContainer::GetIconFilenameL() - { - RFs& fsSession = CCoeEnv::Static()->FsSession(); - - TDriveList driveList; - User::LeaveIfError(fsSession.DriveList(driveList)); - - TInt driveNumber; - TDriveName drive = _L("a:"); - - TFileName iconName; - - for (driveNumber = EDriveA, drive[0] = 'a'; - driveNumber <= EDriveZ; - driveNumber++, drive[0]++) - { - if (!driveList[driveNumber]) - { - continue; - } - - TParse parse; - parse.Set(drive, &KVpnLogIcons, NULL); - iconName.Copy(parse.DriveAndPath()); - iconName.Append(parse.Name()); - iconName.Append(_L(".mif")); - - TEntry entry; - if (fsSession.Entry(iconName, entry) == KErrNone) - { - //icon founded - break; - } - } - - return iconName; - } - -// --------------------------------------------------------- -// CVpnManagementUiLogContainer::GetHelpContext -// This function is called when Help application is launched. -// (other items were commented in a header). -// --------------------------------------------------------- -// -#ifdef __SERIES60_HELP -void CVpnManagementUiLogContainer::GetHelpContext( - TCoeHelpContext& aContext ) const - { - aContext.iMajor = KUidVpnManagementUi; - aContext.iContext = KSET_HLP_VPN_LOG_VIEW; - } -#endif //__SERIES60_HELP - -// End of File diff -r 9f4e37332ce5 -r 473321461bba vpnui/vpnmanagementui/src/vpnmanagementuilogview.cpp --- a/vpnui/vpnmanagementui/src/vpnmanagementuilogview.cpp Thu Aug 19 10:54:34 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,300 +0,0 @@ -/* -* Copyright (c) 2003 - 2006 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Handles commands given through the UI for maintaining policies. -* -*/ - - - -// INCLUDE FILES -#include -#include // for warning & information notes -#include -#include "vpnuiloader.h" -#include "vpnmanagementuilogview.h" -#include "vpnmanagementuilogcontainer.h" -#include "vpnmanagementui.hrh" -#ifdef __SERIES60_HELP -#include // For HlpLauncher -#endif //__SERIES60_HELP - -/** MSK control Id. */ -const TInt KVpnMSKControlId = 3; - -// ================= MEMBER FUNCTIONS ======================= - -// --------------------------------------------------------- -// CVpnManagementUiLogView::CVpnManagementUiLogView(CVpnUiLoader& aLoader) -// : iLoader(aLoader) -// Constructor -// --------------------------------------------------------- -// -CVpnManagementUiLogView::CVpnManagementUiLogView( CVpnUiLoader& aLoader ) -: iLoader(aLoader) - { - } - -// --------------------------------------------------------- -// CVpnManagementUiLogView::~CVpnManagementUiLogView() -// Destructor -// --------------------------------------------------------- -// -CVpnManagementUiLogView::~CVpnManagementUiLogView() - { - if ( iLogContainer ) - { - AppUi()->RemoveFromViewStack(*this, iLogContainer); - delete iLogContainer; - } - } - -// --------------------------------------------------------- -// CVpnManagementUiLogView* CVpnManagementUiLogView::NewL( -// const TRect& /*aRect*/, CVpnUiLoader& aLoader) -// --------------------------------------------------------- -// -CVpnManagementUiLogView* CVpnManagementUiLogView::NewL( - const TRect& /*aRect*/, CVpnUiLoader& aLoader ) - { - CVpnManagementUiLogView* self = - new ( ELeave ) CVpnManagementUiLogView( aLoader ); - CleanupStack::PushL( self ); - self->ConstructL(); - CleanupStack::Pop(); - return self; - } - -// --------------------------------------------------------- -// CVpnManagementUiLogView* CVpnManagementUiLogView::NewLC( -// const TRect& /*aRect*/, CVpnUiLoader& aLoader) -// --------------------------------------------------------- -// -CVpnManagementUiLogView* CVpnManagementUiLogView::NewLC( - const TRect& /*aRect*/, CVpnUiLoader& aLoader ) - { - CVpnManagementUiLogView* self = - new ( ELeave ) CVpnManagementUiLogView( aLoader ); - CleanupStack::PushL( self ); - self->ConstructL(); - return self; - } - -// --------------------------------------------------------- -// CVpnManagementUiLogView::ConstructL() -// CVpnUiView::ConstructL(const TRect& aRect) -// EPOC two-phased constructor -// --------------------------------------------------------- -// -void CVpnManagementUiLogView::ConstructL() - { - BaseConstructL( R_VPNUI_LOG_VIEW ); - } - -// --------------------------------------------------------- -// CVpnManagementUiLogView::DynInitMenuPaneL( -// TInt aResourceId,CEikMenuPane* aMenuPane) -// Updates Options list with correct items depending on -// whether the listbox is empty or if it has any marked items -// --------------------------------------------------------- -// -void CVpnManagementUiLogView::DynInitMenuPaneL(TInt aResourceId, CEikMenuPane* aMenuPane) - { - - if ( aResourceId == R_VPNUI_LOG_VIEW_MENU ) - { - TInt currentItem = iLogContainer->iListBox->CurrentItemIndex(); - - // the VPN log list is empty all except Refresh, Help and Exit is dimmed - if ( currentItem == -1 ) - { - aMenuPane->SetItemDimmed( EVpnUiCmdLogDetails, ETrue ); - aMenuPane->SetItemDimmed( EVpnUiCmdClearLog, ETrue ); -// aMenuPane->SetItemDimmed( EVpnUiCmdRefreshLog, ETrue ); - } - - } - } - -// --------------------------------------------------------- -// CVpnManagementUiLogView::Id() const -// Returns Authority view id -// --------------------------------------------------------- -// -TUid CVpnManagementUiLogView::Id() const - { - return KVpnManagementUiLogViewId; - } - -// --------------------------------------------------------- -// CVpnManagementUiLogView::HandleCommandL(TInt aCommand) -// Handles Softkey and Options list commands -// --------------------------------------------------------- -// -void CVpnManagementUiLogView::HandleCommandL( TInt aCommand ) - { - switch ( aCommand ) - { - case EAknSoftkeyBack: - { - iLoader.ChangeViewL( KChangeViewPrevious ); - break; - } - case EAknCmdExit: - { - ((CAknViewAppUi*)iAvkonAppUi)->HandleCommandL( EAknCmdExit ); - break; - } - - case EVpnUiCmdRefreshLog: - { - iLogContainer->ShowLogsL(); - iLogContainer->DrawListBoxL( iCurrentPosition, iTopItem ); - break; - } - - case EVpnUiCmdLogDetails: - { - iLogContainer->LogDetailsL(iLogContainer->iListBox->CurrentItemIndex()); - break; - } - - case EVpnUiCmdClearLog: - { - iLogContainer->ClearLogL(); - break; - } -#ifdef __SERIES60_HELP - case EAknCmdHelp: - { - HlpLauncher::LaunchHelpApplicationL( - iEikonEnv->WsSession(), AppUi()->AppHelpContextL() ); - break; - } -#endif //__SERIES60_HELP - - default: - { - AppUi()->HandleCommandL( aCommand ); - break; - } - } - } - -// --------------------------------------------------------- -// CVpnManagementUiLogView::HandleClientRectChange() -// --------------------------------------------------------- -// -void CVpnManagementUiLogView::HandleClientRectChange() - { - if ( iLogContainer ) - { - iLogContainer->SetRect( ClientRect() ); - } - } - -// --------------------------------------------------------- -// CVpnManagementUiLogView::DoActivateL(const TVwsViewId& /*aPrevViewId*/, -// TUid /*aCustomMessageId*/, const TDesC8& /*aCustomMessage*/) -// Updates the view when opening it -// --------------------------------------------------------- -// -void CVpnManagementUiLogView::DoActivateL( - const TVwsViewId& /*aPrevViewId*/, - TUid /*aCustomMessageId*/, const TDesC8& /*aCustomMessage*/) - { - if ( iLogContainer ) - { - ((CAknViewAppUi*)iAvkonAppUi)->RemoveFromViewStack( - *this, iLogContainer ); - } - iLogContainer = new (ELeave) CVpnManagementUiLogContainer( - *this, iLoader ); - - iLogContainer->SetMopParent( this ); - iLogContainer->ConstructL( ClientRect(), iCurrentPosition ); - iLoader.ActivateTitleL( KViewTitleLogView ); - - iLoader.ActivateNaviTextL(); - iLoader.PushNaviPaneL(); - - ((CAknViewAppUi*)iAvkonAppUi)->AddToStackL( *this, iLogContainer ); - iLogContainer->DrawListBoxL( iCurrentPosition, iTopItem ); - - // Add MiddleSoftKey - SetMiddleSoftKeyL(EFalse); - } - - -void CVpnManagementUiLogView::SetMiddleSoftKeyL(TBool aDrawNow) - { - if (iLogContainer->iListItemCount > 0) - { - SetMiddleSoftKeyLabelL(R_MSK_VPN_DETAILS, EVpnUiCmdLogDetails); - } - else - { - SetMiddleSoftKeyLabelL(R_MSK_REFRESH_VPN_LOG, EVpnUiCmdRefreshLog); - } - - if (aDrawNow) - { - if (Cba()) - Cba()->DrawNow(); - } - } - - -void CVpnManagementUiLogView::SetMiddleSoftKeyLabelL(TInt aResourceId, TInt aCommandId) - { - CEikButtonGroupContainer* cbaGroup = Cba(); - if (cbaGroup) - { - cbaGroup->RemoveCommandFromStack(KVpnMSKControlId, EVpnUiCmdLogDetails); - cbaGroup->RemoveCommandFromStack(KVpnMSKControlId, EVpnUiCmdRefreshLog); - HBufC* text = StringLoader::LoadLC(aResourceId); - cbaGroup->AddCommandToStackL(KVpnMSKControlId, aCommandId, text->Des()); - CleanupStack::PopAndDestroy(text); - } - - } - -// --------------------------------------------------------- -// CVpnManagementUiLogView::DoDeactivate() -// Saves focus position when closing view -// --------------------------------------------------------- -// -void CVpnManagementUiLogView::DoDeactivate() - { - if ( iLogContainer ) - { - iLoader.PopNaviPane(); - AppUi()->RemoveFromViewStack( *this, iLogContainer ); - - delete iLogContainer; - iLogContainer = NULL; - } - } - -// --------------------------------------------------------- -// CVpnManagementUiLogView::Container() -// Returns iLogContainer -// --------------------------------------------------------- -// -CCoeControl* CVpnManagementUiLogView::Container() - { - return iLogContainer; - } - -// End of File - diff -r 9f4e37332ce5 -r 473321461bba vpnui/vpnmanagementui/src/vpnmanagementuipolicycontainer.cpp --- a/vpnui/vpnmanagementui/src/vpnmanagementuipolicycontainer.cpp Thu Aug 19 10:54:34 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,358 +0,0 @@ -/* -* Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Policy view container -* -*/ - -#include -#include -#include -#include -#include -#include -#include -#include "vpnuiloader.h" -#include "vpnmanagementuipolicycontainer.h" -#include "vpnmanagementui.hrh" -#include "vpnextapi.h" - -#ifdef __SERIES60_HELP -#include // for help context of VPN Management UI -#endif //__SERIES60_HELP - -// ================= MEMBER FUNCTIONS ======================= - -// --------------------------------------------------------- -// CVpnManagementUiPolicyContainer::CVpnManagementUiPolicyContainer( -// CVpnManagementUiPolicyView& aParent, CVpnUiLoader& aLoader) -// Constructor with parent -// --------------------------------------------------------- -// -CVpnManagementUiPolicyContainer::CVpnManagementUiPolicyContainer( - CVpnManagementUiPolicyView& aParent, CVpnUiLoader& aLoader ) : - iParent ( aParent ), iLoader ( aLoader ) - { - } - -// --------------------------------------------------------- -// CVpnManagementUiPolicyContainer::~CVpnManagementUiPolicyContainer() -// Destructor -// --------------------------------------------------------- -// -CVpnManagementUiPolicyContainer::~CVpnManagementUiPolicyContainer() - { - delete iListBox; - } - -// --------------------------------------------------------- -// CVpnManagementUiPolicyContainer::ConstructL( -// const TRect& aRect, TInt& aCurrentPosition, TInt& aTopItem) -// EPOC two phased constructor -// --------------------------------------------------------- -// -void CVpnManagementUiPolicyContainer::ConstructL( - const TRect& aRect, TInt& /*aCurrentPosition*/, TInt& /*aTopItem*/ ) - { - CreateWindowL(); - CreateListBoxL(); - - //Initialization - - - ShowPoliciesL(); - SetRect( aRect ); - } - -// --------------------------------------------------------- -// CVpnManagementUiPolicyContainer::ActivateL() -// called after the dialog is shown -// used to handle empty list - query -// --------------------------------------------------------- -// -void CVpnManagementUiPolicyContainer::ActivateL() - { - CCoeControl::ActivateL(); - - } - - -// --------------------------------------------------------- -// CVpnManagementUiPolicyContainer::SizeChanged() -// Called by framework when the view size is changed -// --------------------------------------------------------- -// -void CVpnManagementUiPolicyContainer::SizeChanged() - { - iListBox->SetRect(Rect()); - } - -// --------------------------------------------------------- -// CVpnManagementUiPolicyContainer::FocusChanged(TDrawNow aDrawNow) -// --------------------------------------------------------- -// -void CVpnManagementUiPolicyContainer::FocusChanged(TDrawNow aDrawNow) - { - if ( iListBox ) - { - iListBox->SetFocus( IsFocused(), aDrawNow ); - } - } - -// --------------------------------------------------------- -// CVpnManagementUiPolicyContainer::HandleResourceChangeL -// --------------------------------------------------------- -// - -void CVpnManagementUiPolicyContainer::HandleResourceChange( TInt aType ) - { - CCoeControl::HandleResourceChange(aType); - - //Handle change in layout orientation - if (aType == KEikDynamicLayoutVariantSwitch || aType == KAknsMessageSkinChange ) - { - iListBox->HandleResourceChange(aType); - TRect mainPaneRect; - AknLayoutUtils::LayoutMetricsRect(AknLayoutUtils::EMainPane, mainPaneRect); - SetRect(mainPaneRect); - DrawNow(); - } - } - -// --------------------------------------------------------- -// CVpnManagementUiPolicyContainer::HandleListBoxEventL( -// CEikListBox* /*aListBox*/, TListBoxEvent aEventType) -// --------------------------------------------------------- -// -void CVpnManagementUiPolicyContainer::HandleListBoxEventL( - CEikListBox* /*aListBox*/, TListBoxEvent aEventType ) - { - switch(aEventType) - { - case EEventEnterKeyPressed: - case EEventItemSingleClicked: - iParent.HandleCommandL(EVpnUiCmdPolicyDetails); - break; - default: - //Do nothing - break; - } - } -enum { EListBoxControl, ENumberOfControls }; - -// --------------------------------------------------------- -// CVpnManagementUiPolicyContainer::CountComponentControls() const -// --------------------------------------------------------- -// -TInt CVpnManagementUiPolicyContainer::CountComponentControls() const - { - // return number of controls inside this container - return ENumberOfControls; // return nbr of controls inside this container - } - -// --------------------------------------------------------- -// CVpnManagementUiPolicyContainer::ComponentControl(TInt aIndex) const -// --------------------------------------------------------- -// -CCoeControl* CVpnManagementUiPolicyContainer::ComponentControl(TInt aIndex) const - { - switch ( aIndex ) - { - case 0: - return iListBox; - default: - return NULL; - } - } - -// --------------------------------------------------------- -// CVpnManagementUiPolicyContainer::HandleControlEventL( -// CCoeControl* /*aControl*/,TCoeEvent /*aEventType*/) -// Cannot be changed to non-leaving function. -// L-function is required by the class definition, even if empty. -// --------------------------------------------------------- -// -void CVpnManagementUiPolicyContainer::HandleControlEventL( - CCoeControl* /*aControl*/,TCoeEvent /*aEventType*/) - { - } - -// --------------------------------------------------------- -// CVpnManagementUiPolicyContainer::OfferKeyEventL( -// const TKeyEvent& aKeyEvent, TEventCode aType) -// Handles the key events OK button, arrow keys, delete key. -// OK button functionality is different depending on the number of marked items -// in the list; zero marked -> show details view, one or more marked -> show -// OKOptions list, list empty -> OK inactive. -// Delete active only if list not empty. -// --------------------------------------------------------- -// -TKeyResponse CVpnManagementUiPolicyContainer::OfferKeyEventL( - const TKeyEvent& aKeyEvent, TEventCode aType) - { - - // If operation is currenly onway, do not continue. - TKeyResponse retval = EKeyWasNotConsumed; - if ( aType==EEventKey ) - { - if ( (aKeyEvent.iCode == EKeyOK || aKeyEvent.iCode == EKeyEnter) && // select or enter - iListBox->CurrentItemIndex() > -1) //This is for empty list - { - // Selection key pressed. - iParent.PolicyDetailsL(iListBox->CurrentItemIndex()); - - retval = EKeyWasConsumed; - } - - else if ( aKeyEvent.iCode == EKeyDelete - || aKeyEvent.iCode == EKeyBackspace ) - { - if ( iListBox->CurrentItemIndex() > -1 ) - { - iParent.HandleCommandL( EVpnUiCmdDeletePolicy ); - retval = EKeyWasConsumed; - } - } - else - { - retval = iListBox->OfferKeyEventL( aKeyEvent, aType ); - } - } - else - { - retval = iListBox->OfferKeyEventL( aKeyEvent, aType ); - } - - - return retval; - } - -// --------------------------------------------------------- -// CVpnManagementUiPolicyContainer::CreateListBoxL() -// Creates listbox, sets empty listbox text. -// --------------------------------------------------------- -// -void CVpnManagementUiPolicyContainer::CreateListBoxL() - { - - iListBox = new( ELeave ) CAknSingleStyleListBox; - iListBox->SetContainerWindowL( *this ); - iListBox->ConstructL( this, EAknListBoxMarkableList ); - iListBox->CreateScrollBarFrameL( ETrue ); - iListBox->ScrollBarFrame()-> - SetScrollBarVisibilityL( CEikScrollBarFrame::EOff,CEikScrollBarFrame::EAuto ); - iListBox->SetListBoxObserver(this); - - HBufC* stringHolder = StringLoader::LoadLC( R_VPN_POLICIES_EMPTY ); - iListBox->View()->SetListEmptyTextL( *stringHolder ); - CleanupStack::PopAndDestroy(); // stringHolder - - } - -// --------------------------------------------------------- -// CVpnManagementUiPolicyContainer::DrawListBoxL(TInt aCurrentPosition, TInt aTopItem) -// Draws listbox, fetches graphic icons for markable list -// --------------------------------------------------------- -// -void CVpnManagementUiPolicyContainer::DrawListBoxL( - TInt aCurrentPosition, TInt aTopItem ) - { - - if (aCurrentPosition >= 0) - { - iListBox->SetTopItemIndex( aTopItem ); - iListBox->SetCurrentItemIndex( aCurrentPosition ); - } - ActivateL(); - DrawNow(); - } - -// --------------------------------------------------------- -// CVpnManagementUiPolicyContainer::UpdateListBoxL(TInt& aCurrentPosition) -// Updates listbox after deletion, sets No VPN policies text -// if deleted policy was a last one. -// --------------------------------------------------------- -// -void CVpnManagementUiPolicyContainer::UpdateListBoxL( TInt& aCurrentPosition ) - { - MDesCArray* itemList = iListBox->Model()->ItemTextArray(); - CDesCArray* itemArray = ( CDesCArray* )itemList; - - itemArray->Delete(aCurrentPosition); - itemArray->Compress(); - - iListBox->HandleItemRemovalL(); - if(aCurrentPosition > 0) - { - iListBox->SetCurrentItemIndexAndDraw(aCurrentPosition-1); - } - if(aCurrentPosition == 0 ) - { - if (iListItemCount > 1 ) - { - iListBox->SetCurrentItemIndexAndDraw(aCurrentPosition); - } - else - { - HBufC* stringHolder = StringLoader::LoadLC( R_VPN_POLICIES_EMPTY ); - iListBox->View()->SetListEmptyTextL( *stringHolder ); - CleanupStack::PopAndDestroy(); // stringHolder - } - } - iListItemCount = iListItemCount -1; - iParent.SetMiddleSoftKeyL(ETrue); - DrawNow(); - } - -void CVpnManagementUiPolicyContainer::ShowPoliciesL() - { - CArrayFixFlat* policyList = - iLoader.VpnApiWrapperL().PolicyListL(); - - CDesCArrayFlat* itemTextArray = - static_cast(iListBox->Model()->ItemTextArray()); - - itemTextArray->Reset(); - iListBox->Reset(); - - iListItemCount = policyList->Count(); - - for (TInt i = 0; i < iListItemCount; ++i) - { - TBuf policyName; - policyName.Append(_L("\t")); - policyName.Append(policyList->At(i).iName); - itemTextArray->AppendL(policyName); - } - - iListBox->HandleItemAdditionL(); - } - - - -// --------------------------------------------------------- -// CVpnManagementUiPolicyContainer::GetHelpContext -// This function is called when Help application is launched. -// (other items were commented in a header). -// --------------------------------------------------------- -// -#ifdef __SERIES60_HELP -void CVpnManagementUiPolicyContainer::GetHelpContext( - TCoeHelpContext& aContext ) const - { - aContext.iMajor = KUidVpnManagementUi; - aContext.iContext = KSET_HLP_VPN_POLICY_VIEW; - } -#endif //__SERIES60_HELP - -// End of File diff -r 9f4e37332ce5 -r 473321461bba vpnui/vpnmanagementui/src/vpnmanagementuipolicyview.cpp --- a/vpnui/vpnmanagementui/src/vpnmanagementuipolicyview.cpp Thu Aug 19 10:54:34 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,399 +0,0 @@ -/* -* Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: VPN Policy view -* -*/ - - - -// INCLUDE FILES -#include -#include // for warning & information notes -#include -#include - -#include "vpnuiloader.h" -#include "vpnmanagementuipolicyview.h" -#include "vpnmanagementuipolicycontainer.h" -#include "vpnmanagementui.hrh" -#ifdef __SERIES60_HELP -#include // For HlpLauncher -#endif //__SERIES60_HELP - -/** MSK control Id. */ -const TInt KVpnMSKControlId = 3; - -// ================= MEMBER FUNCTIONS ======================= - -// --------------------------------------------------------- -// CVpnManagementUiPolicyView::CVpnManagementUiPolicyView -// --------------------------------------------------------- -// -CVpnManagementUiPolicyView::CVpnManagementUiPolicyView( - CVpnUiLoader& aLoader ) : iLoader(aLoader) - { - } - -// --------------------------------------------------------- -// CVpnManagementUiPolicyView::~CVpnManagementUiPolicyView() -// Destructor -// --------------------------------------------------------- -// -CVpnManagementUiPolicyView::~CVpnManagementUiPolicyView() - { - if ( iPolicyContainer ) - { - AppUi()->RemoveFromViewStack(*this, iPolicyContainer); - delete iPolicyContainer; - } - } - -// --------------------------------------------------------- -// CVpnManagementUiPolicyView::NewL -// --------------------------------------------------------- -// -CVpnManagementUiPolicyView* CVpnManagementUiPolicyView::NewL( - const TRect& aRect, CVpnUiLoader& aLoader ) - { - CVpnManagementUiPolicyView* self = NewLC( aRect, aLoader ); - CleanupStack::Pop( self ); - return self; - } - -// --------------------------------------------------------- -// CVpnManagementUiPolicyView::NewLC -// --------------------------------------------------------- -// -CVpnManagementUiPolicyView* CVpnManagementUiPolicyView::NewLC( - const TRect& /*aRect*/, CVpnUiLoader& aLoader ) - { - CVpnManagementUiPolicyView* self = - new ( ELeave ) CVpnManagementUiPolicyView( aLoader ); - CleanupStack::PushL( self ); - self->ConstructL(); - return self; - } - -// --------------------------------------------------------- -// CVpnManagementUiPolicyView::ConstructL() -// EPOC two-phased constructor -// --------------------------------------------------------- -// -void CVpnManagementUiPolicyView::ConstructL() - { - BaseConstructL( R_VPNUI_POLICIES_VIEW ); - } - -// --------------------------------------------------------- -// CVpnManagementUiPolicyView::DynInitMenuPaneL( -// TInt aResourceId,CEikMenuPane* aMenuPane) -// Updates Options list with correct items depending on -// whether the listbox is empty or if it has any marked items -// --------------------------------------------------------- -// -void CVpnManagementUiPolicyView::DynInitMenuPaneL(TInt aResourceId, CEikMenuPane* aMenuPane) - { - if ( aResourceId == R_VPNUI_POLICIES_VIEW_MENU ) - { - TInt currentItem = iPolicyContainer->iListBox->CurrentItemIndex(); - - if ( currentItem == -1 ) - { - aMenuPane->SetItemDimmed( EVpnUiCmdPolicyDetails, ETrue ); - aMenuPane->SetItemDimmed( EVpnUiCmdDeletePolicy, ETrue ); - - } - - } - } - -// --------------------------------------------------------- -// CVpnManagementUiPolicyView::Id() const -// Returns Authority view id -// --------------------------------------------------------- -// -TUid CVpnManagementUiPolicyView::Id() const - { - return KVpnManagementUiPolicyViewId; - } - -// --------------------------------------------------------- -// CVpnManagementUiPolicyView::HandleCommandL(TInt aCommand) -// Handles Softkey and Options list commands -// --------------------------------------------------------- -// -void CVpnManagementUiPolicyView::HandleCommandL( TInt aCommand ) - { - switch ( aCommand ) - { - case EAknSoftkeyBack: - { - iLoader.ChangeViewL( KChangeViewPrevious ); - break; - } - case EAknCmdExit: - { - ((CAknViewAppUi*)iAvkonAppUi)->HandleCommandL( EAknCmdExit ); - break; - } - - case EVpnUiCmdPolicyDetails: - { - // Show details - PolicyDetailsL(iPolicyContainer->iListBox->CurrentItemIndex()); - break; - } - - - case EVpnUiCmdDeletePolicy: - { - //confirmation query - HBufC* temp; - - TVpnPolicyName policyName; - iCurrentPosition = iPolicyContainer->iListBox->CurrentItemIndex(); - iTopItem = iPolicyContainer->iListBox->TopItemIndex(); - - if (NotAssociatedToIapL(iCurrentPosition, policyName)) - { - temp = StringLoader::LoadLC( R_VPN_QUEST_DELETE_POLICY, policyName ); - } - else - { - temp = StringLoader::LoadLC( R_VPN_QUEST_DELETE_POLICY_ASSOCIATED ); - } - CAknQueryDialog* query = CAknQueryDialog::NewL( CAknQueryDialog::EConfirmationTone ); - TInt retval = query->ExecuteLD( R_CONFIRMATION_QUERY, *temp ); - CleanupStack::PopAndDestroy(); // temp - if ( retval ) - { - //Delete policy - iLoader.VpnApiWrapperL().DeletePolicyL(iPolicyContainer->iListBox->CurrentItemIndex()); - //Update listbox - iPolicyContainer->UpdateListBoxL(iCurrentPosition); - //Update iPolicyList - iLoader.VpnApiWrapperL().PolicyListL(); - iCurrentPosition = iPolicyContainer->iListBox->CurrentItemIndex(); - } - break; - } -#ifdef __SERIES60_HELP - case EAknCmdHelp: - { - HlpLauncher::LaunchHelpApplicationL( - iEikonEnv->WsSession(), AppUi()->AppHelpContextL() ); - break; - } -#endif //__SERIES60_HELP - - default: - { - AppUi()->HandleCommandL( aCommand ); - break; - } - } - } - -// --------------------------------------------------------- -// CVpnManagementUiPolicyView::HandleClientRectChange() -// --------------------------------------------------------- -// -void CVpnManagementUiPolicyView::HandleClientRectChange() - { - if ( iPolicyContainer ) - { - iPolicyContainer->SetRect( ClientRect() ); - } - } - -// --------------------------------------------------------- -// CVpnManagementUiPolicyView::DoActivateL -// Updates the view when opening it -// --------------------------------------------------------- -// -void CVpnManagementUiPolicyView::DoActivateL( - const TVwsViewId& /*aPrevViewId*/, - TUid /*aCustomMessageId*/, const TDesC8& /*aCustomMessage*/) - { - if ( iPolicyContainer ) - { - ((CAknViewAppUi*)iAvkonAppUi)->RemoveFromViewStack( - *this, iPolicyContainer ); - } - iPolicyContainer = new (ELeave) CVpnManagementUiPolicyContainer( - *this, iLoader ); - - iPolicyContainer->SetMopParent( this ); - iPolicyContainer->ConstructL( - ClientRect(), iCurrentPosition, iTopItem ); - iLoader.ActivateTitleL( KViewTitlePolicyView ); - iLoader.PushDefaultNaviPaneL(); - - ((CAknViewAppUi*)iAvkonAppUi)->AddToStackL( *this, iPolicyContainer ); - iPolicyContainer->DrawListBoxL( iCurrentPosition, iTopItem ); - - SetMiddleSoftKeyL(EFalse); - } - -void CVpnManagementUiPolicyView::SetMiddleSoftKeyL(TBool aDrawNow) - { - if (iPolicyContainer->iListItemCount > 0) - { - SetMiddleSoftKeyLabelL(R_MSK_VPN_DETAILS, EVpnUiCmdPolicyDetails); - } - else - { - SetMiddleSoftKeyLabelL(R_MSK_INSTALL_VPN_POLICIES, EVpnUiCmdInstallPolicies); - } - - if (aDrawNow) - { - if (Cba()) - Cba()->DrawNow(); - } - } - - -void CVpnManagementUiPolicyView::SetMiddleSoftKeyLabelL( - TInt aResourceId, TInt aCommandId) - { - CEikButtonGroupContainer* cbaGroup = Cba(); - if (cbaGroup) - { - HBufC* text = HBufC::NewLC(KMaxLengthTextDetailsBody); - ReadResourceL(*text, aResourceId); - cbaGroup->RemoveCommandFromStack( - KVpnMSKControlId, EVpnUiCmdPolicyDetails); - cbaGroup->AddCommandToStackL( - KVpnMSKControlId, aCommandId, text->Des()); - CleanupStack::PopAndDestroy(text); - } - } - -// --------------------------------------------------------- -// CVpnManagementUiPolicyView::DoDeactivate() -// Saves focus position when closing view -// --------------------------------------------------------- -// -void CVpnManagementUiPolicyView::DoDeactivate() - { - if ( iPolicyContainer ) - { - AppUi()->RemoveFromViewStack( *this, iPolicyContainer ); - - delete iPolicyContainer; - iPolicyContainer = NULL; - } - } - -// --------------------------------------------------------- -// CVpnManagementUiPolicyView::Container() -// Returns iPolicyContainer -// --------------------------------------------------------- -// -CCoeControl* CVpnManagementUiPolicyView::Container() - { - return iPolicyContainer; - } - -// --------------------------------------------------------- -// CVpnManagementUiPolicyView::PolicyDetailsL() -// Creates the whole of policy details view -// Appends strings from both resources and VPN API to one -// message body text and displays it. -// --------------------------------------------------------- -// -void CVpnManagementUiPolicyView::PolicyDetailsL(TInt aIndex) - { - TVpnPolicyDetails policyDetails; - - iLoader.VpnApiWrapperL().GetPolicyDetailsL(aIndex,policyDetails); - HBufC* message = HBufC::NewLC(KMaxLengthTextDetailsBody); - - // Description: - ReadResourceL(*message, R_VPN_DETAIL_POLICY_DESCRIPTION ); - message->Des().Append(KVpnManagementUiEnter); - message->Des().Append(policyDetails.iDescription); - message->Des().Append(KVpnManagementUiEnterTwice); - - // Policy status: - ReadResourceL(*message, R_VPN_DETAIL_POLICY_STATUS ); - message->Des().Append(KVpnManagementUiEnter); - - if (policyDetails.iUsageStatus == EUsageStatusUnused) - ReadResourceL(*message, R_VPN_DETAIL_POLICY_NOT_ASSOCIATED ); - else if (policyDetails.iUsageStatus == EUsageStatusAssignedToIap) - ReadResourceL(*message, R_VPN_DETAIL_POLICY_ASSOCIATED ); - else if (policyDetails.iUsageStatus == EUsageStatusActive) - ReadResourceL(*message, R_VPN_DETAIL_POLICY_ACTIVE ); - - message->Des().Append(KVpnManagementUiEnterTwice); - - // Certificate status: - ReadResourceL(*message, R_VPN_DETAIL_CERT_STATUS ); - message->Des().Append(KVpnManagementUiEnter); - - if (policyDetails.iPkiStatus == EPkiStatusReady) - ReadResourceL(*message, R_VPN_DETAIL_CERT_STATUS_OK ); - else if (policyDetails.iPkiStatus == EPkiStatusCertExpired) - ReadResourceL(*message, R_VPN_DETAIL_CERT_STATUS_EXPIRED ); - else if (policyDetails.iPkiStatus == EPkiStatusNoCert) - ReadResourceL(*message, R_VPN_DETAIL_CERT_STATUS_MISSING ); - else if (policyDetails.iPkiStatus == EPkiStatusCertNotValidYet) - ReadResourceL(*message, R_VPN_DETAIL_CERT_STATUS_NOT_YET_VALID ); - - message->Des().Append(KVpnManagementUiEnterTwice); - - // Policy name: - ReadResourceL(*message, R_VPN_DETAIL_POLICY_NAME ); - message->Des().Append(KVpnManagementUiEnter); - message->Des().Append(policyDetails.iName); - message->Des().Append(KVpnManagementUiEnterTwice); - - // Header for the message query dialog - - CAknMessageQueryDialog* dlg = CAknMessageQueryDialog::NewL(*message); - dlg->PrepareLC(R_MESSAGE_QUERY_DETAILS_VIEW); - dlg->QueryHeading()->SetTextL(policyDetails.iName); - dlg->RunLD(); - - CleanupStack::PopAndDestroy(); // message - } - -TBool CVpnManagementUiPolicyView::NotAssociatedToIapL(TInt aIndex, TVpnPolicyName& aPolicyName) - { - TVpnPolicyDetails policyDetails; - iLoader.VpnApiWrapperL().GetPolicyDetailsL(aIndex,policyDetails); - aPolicyName = policyDetails.iName; - if (policyDetails.iUsageStatus == EUsageStatusUnused) - return ETrue; - else - return EFalse; - } - -// --------------------------------------------------------- -// CVpnManagementUiPolicyView::ReadResourceL -// Reads text from resource -// --------------------------------------------------------- -// -void CVpnManagementUiPolicyView::ReadResourceL(HBufC& aText, TInt aResource) - { - HBufC* text = StringLoader::LoadLC( aResource ); - aText.Des().Append(text->Des()); - CleanupStack::PopAndDestroy(); // text - } - - -// End of File - diff -r 9f4e37332ce5 -r 473321461bba vpnui/vpnmanagementui/src/vpnmanagementuiservercontainer.cpp --- a/vpnui/vpnmanagementui/src/vpnmanagementuiservercontainer.cpp Thu Aug 19 10:54:34 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,483 +0,0 @@ -/* -* Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: Management UI Container -* -*/ - -// INCLUDE FILES -#include -#include -#include -#include -#include -#include -#include "vpnuiloader.h" -#include "vpnmanagementuiservercontainer.h" -#include "vpnmanagementuidefs.h" -#include "vpnmanagementui.hrh" -#include "log_vpnmanagementui.h" - -#ifdef __SERIES60_HELP -#include // for help context of VPN Management UI -#endif //__SERIES60_HELP - -// ================= MEMBER FUNCTIONS ======================= - -// --------------------------------------------------------- -// CVpnManagementUiServerContainer::CVpnManagementUiServerContainer( -// CVpnManagementUiServerView& aParent, CVpnUiLoader& aLoader) -// Constructor with parent -// --------------------------------------------------------- -// -CVpnManagementUiServerContainer::CVpnManagementUiServerContainer( - CVpnManagementUiServerView& aParent, CVpnUiLoader& aLoader ) : - iParent ( aParent ), iLoader ( aLoader ) - { - } - -// --------------------------------------------------------- -// CVpnManagementUiServerContainer::~CVpnManagementUiServerContainer() -// Destructor -// --------------------------------------------------------- -// -CVpnManagementUiServerContainer::~CVpnManagementUiServerContainer() - { - delete iListBox; - } - -// --------------------------------------------------------- -// CVpnManagementUiServerContainer::ConstructL( -// const TRect& aRect, TInt& aCurrentPosition, TInt& aTopItem) -// EPOC two phased constructor -// --------------------------------------------------------- -// -void CVpnManagementUiServerContainer::ConstructL( - const TRect& aRect, TInt& /*aCurrentPosition*/, TInt& /*aTopItem*/ ) - { - CreateWindowL(); - CreateListBoxL(); - ShowServersL(); - if ((iListItemCount == 0) && (!iLoader.iBackFromServerDefinition)) - { - iLoader.iShowDefineQuery = ETrue; - } - iLoader.iBackFromServerDefinition = EFalse; - - SetRect( aRect ); - } - -// --------------------------------------------------------- -// CVpnManagementUiServerContainer::ActivateL() -// called after the dialog is shown -// used to handle empty list - query -// --------------------------------------------------------- -// -void CVpnManagementUiServerContainer::ActivateL() - { - CCoeControl::ActivateL(); - // put empty list checking & required actions here. - if ((iListItemCount == 0) && (iLoader.iShowDefineQuery)) - { - HBufC* temp; - temp = StringLoader::LoadLC( R_VPN_QUEST_DEFINE_NEW_SERVER ); - CAknQueryDialog* query = CAknQueryDialog::NewL( - CAknQueryDialog::EConfirmationTone ); - TInt retval = query->ExecuteLD( R_CONFIRMATION_QUERY, *temp ); - CleanupStack::PopAndDestroy(); // temp - iLoader.iShowDefineQuery = EFalse; - if ( retval ) - { - if (!SysUtil::FFSSpaceBelowCriticalLevelL(0, 0)) - { - iLoader.ChangeViewL(KChangeViewSettings); - } - else - { - CErrorUI* errorUi = CErrorUI::NewLC( *(CCoeEnv::Static()) ); - errorUi->ShowGlobalErrorNoteL( KErrDiskFull ); - CleanupStack::PopAndDestroy(); // errorUi - iLoader.iShowDefineQuery = EFalse; - iLoader.iNewServerDefinition = EFalse; - } - } - } - - } - - -// --------------------------------------------------------- -// CVpnManagementUiServerContainer::SizeChanged() -// Called by framework when the view size is changed -// --------------------------------------------------------- -// -void CVpnManagementUiServerContainer::SizeChanged() - { - iListBox->SetRect(Rect()); - } - -// --------------------------------------------------------- -// CVpnManagementUiServerContainer::FocusChanged(TDrawNow aDrawNow) -// --------------------------------------------------------- -// -void CVpnManagementUiServerContainer::FocusChanged(TDrawNow aDrawNow) - { - if ( iListBox ) - { - iListBox->SetFocus( IsFocused(), aDrawNow ); - } - } - -// --------------------------------------------------------- -// CVpnManagementUiServerContainer::HandleResourceChange -// --------------------------------------------------------- -// -void CVpnManagementUiServerContainer::HandleResourceChange( TInt aType ) - { - CCoeControl::HandleResourceChange(aType); - - //Handle change in layout orientation - if (aType == KEikDynamicLayoutVariantSwitch || aType == KAknsMessageSkinChange ) - { - iListBox->HandleResourceChange(aType); - TRect mainPaneRect; - AknLayoutUtils::LayoutMetricsRect(AknLayoutUtils::EMainPane, mainPaneRect); - SetRect(mainPaneRect); - DrawNow(); - } - } - -enum { EListBoxControl, ENumberOfControls }; - -// --------------------------------------------------------- -// CVpnManagementUiServerContainer::CountComponentControls() const -// --------------------------------------------------------- -// -TInt CVpnManagementUiServerContainer::CountComponentControls() const - { - // return number of controls inside this container - return ENumberOfControls; // return nbr of controls inside this container - } - -// --------------------------------------------------------- -// CVpnManagementUiServerContainer::ComponentControl(TInt aIndex) const -// --------------------------------------------------------- -// -CCoeControl* CVpnManagementUiServerContainer::ComponentControl(TInt aIndex) const - { - switch ( aIndex ) - { - case 0: - return iListBox; - default: - return NULL; - } - } - -// --------------------------------------------------------- -// CVpnManagementUiServerContainer::HandleControlEventL( -// CCoeControl* /*aControl*/,TCoeEvent /*aEventType*/) -// Cannot be changed to non-leaving function. -// L-function is required by the class definition, even if empty. -// --------------------------------------------------------- -// -void CVpnManagementUiServerContainer::HandleControlEventL( - CCoeControl* /*aControl*/,TCoeEvent /*aEventType*/) - { - } - -// --------------------------------------------------------- -// CVpnManagementUiServerContainer::OfferKeyEventL( -// const TKeyEvent& aKeyEvent, TEventCode aType) -// Handles the key events OK button, arrow keys, delete key. -// OK button functionality is different depending on the number of marked items -// in the list; zero marked -> show details view, one or more marked -> show -// OKOptions list, list empty -> OK inactive. -// Delete active only if list not empty. -// --------------------------------------------------------- -// -TKeyResponse CVpnManagementUiServerContainer::OfferKeyEventL( - const TKeyEvent& aKeyEvent, TEventCode aType) - { - TKeyResponse retval = EKeyWasNotConsumed; - if ( aType==EEventKey ) - { - if ( (aKeyEvent.iCode == EKeyOK || aKeyEvent.iCode == EKeyEnter) && //select or enter - iListBox->CurrentItemIndex() > -1 ) //This is for empty list - { - // Selection key pressed - iParent.HandleCommandL( EVpnUiCmdEditServer ); - retval = EKeyWasConsumed; - } - - else if ( aKeyEvent.iCode == EKeyDelete - || aKeyEvent.iCode == EKeyBackspace ) - { - if ( iListBox->CurrentItemIndex() > -1 ) - { - iParent.HandleCommandL( EVpnUiCmdDeleteServer ); - retval = EKeyWasConsumed; - } - } - else - { - retval = iListBox->OfferKeyEventL( aKeyEvent, aType ); - } - } - else - { - retval = iListBox->OfferKeyEventL( aKeyEvent, aType ); - } - return retval; - } - -// --------------------------------------------------------- -// CVpnManagementUiServerContainer::CreateListBoxL() -// Creates listbox, sets empty listbox text. -// --------------------------------------------------------- -// -void CVpnManagementUiServerContainer::CreateListBoxL() - { - iListBox = new( ELeave ) CAknSingleStyleListBox; - iListBox->SetContainerWindowL( *this ); - iListBox->ConstructL( this, EAknListBoxMarkableList ); - iListBox->CreateScrollBarFrameL( ETrue ); - iListBox->ScrollBarFrame()-> - SetScrollBarVisibilityL( CEikScrollBarFrame::EOff,CEikScrollBarFrame::EAuto ); - - HBufC* stringHolder = StringLoader::LoadLC( R_VPN_POLICY_SERVERS_EMPTY ); - iListBox->View()->SetListEmptyTextL( *stringHolder ); - CleanupStack::PopAndDestroy(); // stringHolder - - iListBox->SetListBoxObserver (this); - } - -// --------------------------------------------------------- -// CVpnManagementUiServerContainer::DrawListBoxL(TInt aCurrentPosition, TInt aTopItem) -// Draws listbox, fetches graphic icons for markable list -// --------------------------------------------------------- -// -void CVpnManagementUiServerContainer::DrawListBoxL( TInt aCurrentPosition, TInt aTopItem ) - { - if (aCurrentPosition >= 0) - { - iListBox->SetTopItemIndex( aTopItem ); - iListBox->SetCurrentItemIndex( aCurrentPosition ); - } - - ActivateL(); - DrawNow(); - } - -// --------------------------------------------------------- -// CVpnManagementUiServerContainer::UpdateListBoxL(TInt& aCurrentPosition) -// Refresh listbox after VPN policy server deletion. -// --------------------------------------------------------- -// -void CVpnManagementUiServerContainer::UpdateListBoxL(TInt& aCurrentPosition) - { - MDesCArray* itemList = iListBox->Model()->ItemTextArray(); - CDesCArray* itemArray = ( CDesCArray* )itemList; - - itemArray->Delete(aCurrentPosition); - itemArray->Compress(); - - iListBox->HandleItemRemovalL(); - if(aCurrentPosition > 0) - { - iListBox->SetCurrentItemIndexAndDraw(aCurrentPosition-1); - } - if(aCurrentPosition == 0 ) - { - if (iListItemCount > 1 ) - { - iListBox->SetCurrentItemIndexAndDraw(aCurrentPosition); - } - else - { - HBufC* stringHolder = StringLoader::LoadLC( R_VPN_POLICY_SERVERS_EMPTY ); - iListBox->View()->SetListEmptyTextL( *stringHolder ); - CleanupStack::PopAndDestroy(); // stringHolder - } - } - iListItemCount = iListItemCount -1; - iParent.SetMiddleSoftKeyL(ETrue); - DrawNow(); - } - - -void CVpnManagementUiServerContainer::ShowServersL() - { - - TAgileProvisionApiServerListElem& serverList = iLoader.VpnApiWrapperL().ServerListL(); - - CDesCArrayFlat* itemTextArray = static_cast(iListBox->Model()->ItemTextArray()); - - itemTextArray->Reset(); - iListBox->Reset(); - - if ( serverList.iServerUrl.Length()>0 ) - { - iListItemCount = 1; - TBuf serverName; - serverName.Append(_L("\t")); - serverName.Append(serverList.iServerNameLocal); - itemTextArray->AppendL(serverName); - } - - iListBox->HandleItemAdditionL(); - - } - - -void CVpnManagementUiServerContainer::DeleteServerL(TInt /* aIndex */) - { - LOG(Log::Printf(_L("CVpnManagementUiServerContainer::DeleteServerL\n"))); - - TAgileProvisionApiServerListElem& serverList = iLoader.VpnApiWrapperL().ServerListL(); - TBuf serverName; - serverName.Append(serverList.iServerNameLocal); - - HBufC* temp = StringLoader::LoadLC( R_VPN_QUEST_DELETE_SERVER, serverName ); - - CAknQueryDialog* query = CAknQueryDialog::NewL( CAknQueryDialog::EConfirmationTone ); - TInt retval = query->ExecuteLD( R_CONFIRMATION_QUERY, *temp ); - CleanupStack::PopAndDestroy(); // temp - if ( retval ) - { - TInt ret = iLoader.VpnApiWrapperL().DeleteServer(); - TInt ind = 0; - if(ret == KErrNone) - { - //Update listbox - UpdateListBoxL( ind ); - - //Update iServerList - iLoader.VpnApiWrapperL().ServerListL(); - - //Set iNewServerDefinition to false - iLoader.iNewServerDefinition = EFalse; - } - else if (ret == KErrServerBusy) - { - //Show an information note that server is currently in use - HBufC* noteText; - noteText = StringLoader::LoadLC( R_VPN_INFO_POLICY_SERVER_IN_USE ); - CAknInformationNote* note = new(ELeave)CAknInformationNote(ETrue); - note->SetTimeout(CAknNoteDialog::ELongTimeout); //3sec - note->ExecuteLD(noteText->Des()); - CleanupStack::PopAndDestroy(); // noteText - } - } - - } - -void CVpnManagementUiServerContainer::SynchroniseServerL() - { - LOG_("CVpnManagementUiServerContainer::SynchroniseServerL"); - - // Get selection name for connecting via note - // and save it to the member variable of iLoader - iLoader.GetSelectionNameL( iLoader.iSelectionName ); - //Show wait dialog - iLoader.ShowWaitNoteL(); - - iLoader.VpnApiWrapperL().SynchroniseServerL( this ); - - - //Set iNewServerDefinition to false, because when - //we go to the policy view we don't want to show note - //"new server defined synchronise now" - iLoader.iNewServerDefinition = EFalse; - - } - - - -void CVpnManagementUiServerContainer::NotifySynchroniseServerCompleteL(TInt aResult) - { - LOG(Log::Printf(_L("CVpnManagementUiServerContainer::NotifySynchroniseServerCompleteL - Result %d\n"), aResult)); - - if ( iLoader.iWaitDialog ) - { - iLoader.DeleteWaitNoteL();//// deletes the wait dialog - } - - - if (aResult == KErrNone) - { - //Confirmation note - HBufC* string = StringLoader::LoadLC( R_VPN_CONF_POLICY_SERVER_SYNC_OK ); - CAknConfirmationNote* note = new ( ELeave ) CAknConfirmationNote( ETrue ); - note->ExecuteLD( *string ); - CleanupStack::PopAndDestroy( string ); - } - - else if (aResult == KErrDiskFull) - { - CErrorUI* errorUi = CErrorUI::NewLC( *(CCoeEnv::Static()) ); - errorUi->ShowGlobalErrorNoteL( KErrDiskFull ); - CleanupStack::PopAndDestroy(); // errorUi - } - else if (aResult == KErrCancel) - { - // No operation, i.e. don't show anything - } - else - { - //Show an information note - HBufC* noteText; - noteText = StringLoader::LoadLC( R_VPN_INFO_POLICY_SERVER_SYNC_ERROR ); - CAknInformationNote* note = new(ELeave)CAknInformationNote(ETrue); - note->SetTimeout(CAknNoteDialog::ELongTimeout); //3sec - note->ExecuteLD(noteText->Des()); - CleanupStack::PopAndDestroy(); // noteText - } - - iParent.SetMiddleSoftKeyL(ETrue); - - } - - -void CVpnManagementUiServerContainer::HandleListBoxEventL (CEikListBox* /*aListBox*/, - TListBoxEvent aEventType) - { - switch(aEventType) - { - case EEventEnterKeyPressed: - case EEventItemSingleClicked: - iParent.HandleCommandL(EVpnUiCmdEditServer); - break; - default: - //Do nothing - break; - } - } - - -// --------------------------------------------------------- -// CVpnManagementUiServerContainer::GetHelpContext -// This function is called when Help application is launched. -// (other items were commented in a header). -// --------------------------------------------------------- -// -#ifdef __SERIES60_HELP -void CVpnManagementUiServerContainer::GetHelpContext( - TCoeHelpContext& aContext ) const - { - aContext.iMajor = KUidVpnManagementUi; - aContext.iContext = KSET_HLP_VPN_POLICY_SERVERS; - } -#endif //__SERIES60_HELP - -// End of File diff -r 9f4e37332ce5 -r 473321461bba vpnui/vpnmanagementui/src/vpnmanagementuiserversettingscontainer.cpp --- a/vpnui/vpnmanagementui/src/vpnmanagementuiserversettingscontainer.cpp Thu Aug 19 10:54:34 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,374 +0,0 @@ -/* -* Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: The container is responsible of showing policy server details. -* -*/ - -// INCLUDE FILES -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include "vpnuiloader.h" -#include "vpnmanagementuiserversettingscontainer.h" -#include "vpnmanagementuidefs.h" -#include "serversettingconnectionsettingitem.h" -#include "vpnmanagementui.hrh" -#include "log_vpnmanagementui.h" - - -#ifdef __SERIES60_HELP -#include // for help context of VPN Management UI -#endif //__SERIES60_HELP - -using namespace CMManager; - -// ================= MEMBER FUNCTIONS ======================= - -CServerSettingsContainer* CServerSettingsContainer::NewL( - CVpnUiLoader& aLoader, TInt aServerIndex ) - { - CServerSettingsContainer* self = new(ELeave) CServerSettingsContainer( - aLoader, aServerIndex ); - CleanupStack::PushL(self); - self->ConstructL(); - CleanupStack::Pop(self); - return self; - } - -// --------------------------------------------------------- -// CServerSettingsContainer::CServerSettingsContainer() -// --------------------------------------------------------- -// -CServerSettingsContainer::CServerSettingsContainer( - CVpnUiLoader& aLoader, TInt aServerIndex ) - :iLoader(aLoader), iServerIndex(aServerIndex) - { - ASSERT(aServerIndex >= KErrNotFound); - } - -// --------------------------------------------------------- -// CServerSettingsContainer::~CServerSettingsContainer() -// Destructor -// --------------------------------------------------------- -// -CServerSettingsContainer::~CServerSettingsContainer() - { - } - - -// --------------------------------------------------------------------------- -// CreateSettingItemL -// --------------------------------------------------------------------------- -// -CAknSettingItem* CServerSettingsContainer::CreateSettingItemL( - TInt aSettingId ) - { - CAknSettingItem* settingItem(NULL); - - switch (aSettingId) - { - case EVpnUiSettingServerName: - settingItem = new (ELeave) CAknTextSettingItem( - aSettingId, iServerDetails.iServerNameLocal ); - break; - case EVpnUiSettingServerAddress: - if (iServerDetails.iServerUrl.Length() > 0) - { - iServerAddressBuffer.Copy(iServerDetails.iServerUrl); - } - settingItem = new (ELeave) CAknTextSettingItem( - aSettingId, iServerAddressBuffer ); - break; - case EVpnUiSettingIap: - if ( iServerDetails.iSelection.iId <1 ) - { - RCmManagerExt cmManagerExt; - cmManagerExt.OpenL(); - CleanupClosePushL( cmManagerExt ); - - //Makes sure that Internet Destination Exists - RArray destinationArray; - cmManagerExt.AllDestinationsL( destinationArray ); - CleanupClosePushL(destinationArray); - - TUint32 internetDestinationId = 0; - for (TInt i = 0; i < destinationArray.Count(); ++i) - { - RCmDestinationExt destination = cmManagerExt.DestinationL( destinationArray[i] ); - CleanupClosePushL(destination); - - TUint32 purposeMetaData = destination.MetadataL( ESnapMetadataPurpose ); - if ( ESnapPurposeInternet == purposeMetaData ) - { - internetDestinationId = destinationArray[i]; - CleanupStack::PopAndDestroy(); //destination - break; - } - CleanupStack::PopAndDestroy(); //destination - } - - iServerDetails.iSelection.iId = internetDestinationId; - - iServerDetails.iSelection.iResult=EDestination; - - - settingItem = new (ELeave) CServerSettingConnectionSettingItem( - aSettingId, iServerDetails.iSelection); - CleanupStack::PopAndDestroy(2); //destinationArray,cmManagerExt - - } - else - settingItem = new (ELeave) CServerSettingConnectionSettingItem( - aSettingId, iServerDetails.iSelection); - break; - default: - // Do nothing - break; - } - - return settingItem; - } - - -// --------------------------------------------------------------------------- -// CServerSettingsContainer::ConstructL() -// --------------------------------------------------------------------------- -// -void CServerSettingsContainer::ConstructL() - { - // Server settings view sets iServerIndex to -1 when creating a new - // server - if ( iServerIndex >= 0 ) - { - iLoader.VpnApiWrapperL().GetServerDetailsL( iServerDetails ); - UpdateTitleL( iServerDetails.iServerNameLocal ); - } - ConstructFromResourceL(R_VPN_SERVER_SETTING_LIST); - CAknSettingItem* item = SettingItemArray()->At(EVpnUiSettingIap); - - using namespace CMManager; - - RCmManagerExt cmManagerExt; - cmManagerExt.OpenL(); - CleanupClosePushL( cmManagerExt ); - - //Makes sure that Internet Destination Exists - RArray destinationArray; - cmManagerExt.AllDestinationsL( destinationArray ); - CleanupClosePushL(destinationArray); - TBool internetIapExist=EFalse; - TUint32 internetDestinationId = 0; - for (TInt i = 0; i < destinationArray.Count(); ++i) - { - RCmDestinationExt destination = cmManagerExt.DestinationL( destinationArray[i] ); - CleanupClosePushL(destination); - - TUint32 purposeMetaData = destination.MetadataL( ESnapMetadataPurpose ); - if ( ESnapPurposeInternet == purposeMetaData ) - { - internetDestinationId = destinationArray[i]; - CleanupStack::PopAndDestroy(); //destination - internetIapExist=ETrue; - break; - } - CleanupStack::PopAndDestroy(); //destination - } - - if ( internetIapExist != EFalse) - { - HBufC* defaultConn = GetDestinationNameL(internetDestinationId); - CleanupStack::PushL(defaultConn); - item->SetEmptyItemTextL(*defaultConn); - item->LoadL(); - item->UpdateListBoxTextL(); - CleanupStack::PopAndDestroy(defaultConn); - } - - CleanupStack::PopAndDestroy(); //destinationArray - CleanupStack::PopAndDestroy(); //cmManagerExt - } - - -// --------------------------------------------------------------------------- -// UpdateTitleL -// --------------------------------------------------------------------------- -// -void CServerSettingsContainer::UpdateTitleL( TDes& aText ) - { - iLoader.ActivateTitleL(KViewTitleParametersView,aText); - } - - -void CServerSettingsContainer::HandleListBoxEventL(CEikListBox* aListBox, TListBoxEvent aEventType) - { - switch(aEventType) - { - case EEventEnterKeyPressed: - case EEventItemSingleClicked: - ChangeSettingValueL(); - break; - default: - CAknSettingItemList::HandleListBoxEventL(aListBox, aEventType); - } - } - - -// --------------------------------------------------------------------------- -// ChangeSettingValueL -// --------------------------------------------------------------------------- -// -void CServerSettingsContainer::ChangeSettingValueL() - { - - TInt currentItem( ListBox()->CurrentItemIndex() ); - - switch(currentItem) - { - case EVpnUiSettingServerName: - { - EditItemL(EVpnUiSettingServerName, ETrue); - SettingItemArray()->At(EVpnUiSettingServerName)->StoreL(); - } - if (iServerDetails.iServerNameLocal.Length() > 0) - { - UpdateTitleL( iServerDetails.iServerNameLocal ); - } - - break; - case EVpnUiSettingServerAddress: - { - EditItemL(EVpnUiSettingServerAddress, ETrue); - } - break; - case EVpnUiSettingIap: - { - EditItemL(EVpnUiSettingIap, ETrue); - } - break; - default: - User::Invariant(); - break; - } - } - - - -const TAgileProvisionApiServerSettings& CServerSettingsContainer::ServerDetailsL() - { - StoreSettingsL(); - if (iServerAddressBuffer.Length() > 0) - { - iServerDetails.iServerUrl.Copy(iServerAddressBuffer); - } - - //If server name is left empty, but we have an address, - //set address as a server name. - if (iServerDetails.iServerNameLocal.Length() == 0 && - iServerDetails.iServerUrl.Length() > 0) - { - - //If the address is already in use as server name, generate - //a new unique name. - TUint16 i = 1; - static const TInt KSuffixLength = 10; - _LIT(KSuffixFormat, "(%d)"); - - TBuf suffix; - suffix.Zero(); - if (i > 1) - { - suffix.Format(KSuffixFormat, i); - } - i++; - - //First assumes that the address is too long to fit - TInt numberOfCharactersCopiedFromAddress = - iServerDetails.iServerNameLocal.MaxLength() - suffix.Length(); - - //If this is not the case adjust the length - if (numberOfCharactersCopiedFromAddress > iServerDetails.iServerUrl.Length()) - { - numberOfCharactersCopiedFromAddress = iServerDetails.iServerUrl.Length(); - } - - TPtrC8 serverNameAddress = iServerDetails.iServerUrl.Left(numberOfCharactersCopiedFromAddress); - iServerDetails.iServerNameLocal.Copy(serverNameAddress); - iServerDetails.iServerNameLocal.Append(suffix); - - CAknSettingItem* item = SettingItemArray()->At(EVpnUiSettingServerName); - - item->LoadL(); - item->UpdateListBoxTextL(); - } - return iServerDetails; - } - - -// --------------------------------------------------------------------------- -// GetIapNameL -// --------------------------------------------------------------------------- -// -HBufC* CServerSettingsContainer::GetDestinationNameL( TUint aId ) - { - RCmManagerExt cmManager; - cmManager.OpenLC(); - RCmDestinationExt dest = cmManager.DestinationL( aId ); - CleanupClosePushL( dest ); - HBufC* name = dest.NameLC(); - CleanupStack::Pop(name); - CleanupStack::PopAndDestroy( 2 ); // dest, cmManager - return name; - } - - -HBufC* CServerSettingsContainer::GetConnectionMethodNameL( TUint aId ) - { - RCmManagerExt cmManager; - cmManager.OpenLC(); - RCmConnectionMethodExt conn = cmManager.ConnectionMethodL( aId ); - CleanupClosePushL( conn ); - HBufC* name = conn.GetStringAttributeL( ECmName ); - CleanupStack::PopAndDestroy( 2 ); // conn, cmManager - return name; - } - - -TInt CServerSettingsContainer::ServerIndex() const - { - return iServerIndex; - } - - -// --------------------------------------------------------- -// CServerSettingsContainer::GetHelpContext -// --------------------------------------------------------- - -#ifdef __SERIES60_HELP -void CServerSettingsContainer::GetHelpContext( TCoeHelpContext& aContext ) const - { - aContext.iMajor = KUidVpnManagementUi; - aContext.iContext = KSET_HLP_VPN_POLICY_SERVER_SET; - } -#endif //__SERIES60_HELP - - -// End of File diff -r 9f4e37332ce5 -r 473321461bba vpnui/vpnmanagementui/src/vpnmanagementuiserversettingsview.cpp --- a/vpnui/vpnmanagementui/src/vpnmanagementuiserversettingsview.cpp Thu Aug 19 10:54:34 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,272 +0,0 @@ -/* -* Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* Handles commands given through the UI for maintaining information -* of single policy server. -* -*/ - -// INCLUDE FILES -#include -#include -#include -#include -#include -#include "vpnuiloader.h" -#include "vpnmanagementuiserversettingsview.h" -#include "vpnmanagementuiserversettingscontainer.h" -#include "vpnmanagementui.hrh" - -#ifdef __SERIES60_HELP -#include // For HlpLauncher -#endif //__SERIES60_HELP - -/** MSK control Id. */ -const TInt KVpnMSKControlId = 3; - -// ================= MEMBER FUNCTIONS ======================= - -// --------------------------------------------------------- -// CServerSettingsView::CServerSettingsView(CVpnUiLoader& aLoader) -// Constructor -// --------------------------------------------------------- -// -CServerSettingsView::CServerSettingsView( CVpnUiLoader& aLoader ) - : iLoader( aLoader ) - { - } - -// --------------------------------------------------------- -// CServerSettingsView::~CServerSettingsView() -// Destructor -// --------------------------------------------------------- -// -CServerSettingsView::~CServerSettingsView() - { - if ( iContainer ) - { - AppUi()->RemoveFromViewStack( *this, iContainer ); - delete iContainer; - } - } - -// --------------------------------------------------------- -// CServerSettingsView* CServerSettingsView::NewL(const TRect& /*aRect*/, -// CVpnUiLoader& aLoader) -// --------------------------------------------------------- -// -CServerSettingsView* CServerSettingsView::NewL( - const TRect& /*aRect*/, CVpnUiLoader& aLoader) - { - CServerSettingsView* self = new (ELeave) CServerSettingsView(aLoader); - CleanupStack::PushL(self); - self->ConstructL(); - CleanupStack::Pop(); - return self; - } - -// --------------------------------------------------------- -// CServerSettingsView* CServerSettingsView::NewLC(const TRect& /*aRect*/, -// CVpnUiLoader& aLoader) -// --------------------------------------------------------- -// -CServerSettingsView* CServerSettingsView::NewLC(const TRect& /*aRect*/, - CVpnUiLoader& aLoader) - { - CServerSettingsView* self = new (ELeave) CServerSettingsView(aLoader); - CleanupStack::PushL( self ); - self->ConstructL(); - return self; - } - -// --------------------------------------------------------- -// CServerSettingsView::ConstructL() -// EPOC two-phased constructor -// --------------------------------------------------------- -// -void CServerSettingsView::ConstructL() - { - BaseConstructL( R_VPNMANAGEMENTUI_SERVER_PARAMETERS_VIEW ); - } - - -// --------------------------------------------------------- -// CServerSettingsView::Id() const -// Returns Trust view id -// --------------------------------------------------------- -// -TUid CServerSettingsView::Id() const - { - return KVpnManagementUiParametersViewId; - } - -// --------------------------------------------------------- -// CServerSettingsView::HandleCommandL(TInt aCommand) -// Handles Softkey and Options list commands -// --------------------------------------------------------- -// -void CServerSettingsView::HandleCommandL( TInt aCommand) - { - - TBool ffs(EFalse); - switch ( aCommand ) - { - case EAknSoftkeyBack: - { - //GET CURRENT ADDRESS - ASSERT( iContainer ); - - const TAgileProvisionApiServerSettings& serverDetails = iContainer->ServerDetailsL(); - - ffs = iLoader.FFSSpaceBelowCriticalLevelL( ETrue, 0 ); - if (ffs) - { - iLoader.iBackFromServerDefinition = ETrue; - iLoader.ChangeViewL( KChangeViewPrevious ); - } - else if(serverDetails.iServerUrl.Length()==0 || serverDetails.iSelection.iId==0) - { - TInt ret = CompleteSettingsL(); - if (ret) - { - iLoader.iShowDefineQuery = EFalse; - iLoader.iBackFromServerDefinition = ETrue; - iLoader.ChangeViewL( KChangeViewPrevious ); - } - } - else - { - - int aResult = iLoader.VpnApiWrapperL().CreateServer(serverDetails); - if (aResult == KErrNone) - { - - - iLoader.iNewServerDefinition = ETrue; - } - else - { - iLoader.iShowDefineQuery = EFalse; - iLoader.iBackFromServerDefinition = ETrue; - iLoader.iNewServerDefinition = EFalse; - - CErrorUI* errorUi = CErrorUI::NewLC( *(CCoeEnv::Static()) ); - errorUi->ShowGlobalErrorNoteL( aResult ); - CleanupStack::PopAndDestroy(); // errorUi - } - - } - - iLoader.ChangeViewL( KChangeViewPrevious ); - break; - } - case EAknCmdExit: - { - ((CAknViewAppUi*)iAvkonAppUi)->HandleCommandL( EAknCmdExit ); - break; - } - case EVpnUiCmdChange: - { - ASSERT(iContainer); - iContainer->ChangeSettingValueL(); - break; - } - #ifdef __SERIES60_HELP - case EAknCmdHelp: - { - HlpLauncher::LaunchHelpApplicationL( iEikonEnv->WsSession(), - AppUi()->AppHelpContextL() ); - break; - } - #endif //__SERIES60_HELP - - default: - { - AppUi()->HandleCommandL( aCommand ); - break; - } - } - } - -// --------------------------------------------------------- -// CServerSettingsView::HandleClientRectChange() -// --------------------------------------------------------- -// -void CServerSettingsView::HandleClientRectChange() - { - if ( iContainer ) - { - iContainer->SetRect( ClientRect() ); - } - } - -// --------------------------------------------------------- -// CServerSettingsView::DoActivateL() -// Updates the view when opening it -// --------------------------------------------------------- -// -void CServerSettingsView::DoActivateL(const TVwsViewId& /*aPrevViewId*/, - TUid aCustomMessageId, const TDesC8& /*aCustomMessage*/) - { - __ASSERT_DEBUG(iContainer == NULL, User::Invariant()); - - // aCustomMessageId contains index of the policy servers listbox - iContainer = CServerSettingsContainer::NewL( iLoader, - static_cast ( aCustomMessageId.iUid ) ); - iContainer->SetMopParent( this ); - - iLoader.PushDefaultNaviPaneL(); - - ((CAknViewAppUi*)iAvkonAppUi)->AddToStackL( *this, iContainer ); - - // Add MiddleSoftKey - CEikButtonGroupContainer* cbaGroup = Cba(); - if (cbaGroup) - { - HBufC* text = StringLoader::LoadLC(R_MSK_CHANGE); - cbaGroup->AddCommandToStackL(KVpnMSKControlId, EVpnUiCmdChange, text->Des()); - CleanupStack::PopAndDestroy(text); - } - iContainer->ActivateL(); - } - -// --------------------------------------------------------- -// CServerSettingsView::DoDeactivate() -// --------------------------------------------------------- -// -void CServerSettingsView::DoDeactivate() - { - if ( iContainer ) - { - ((CAknViewAppUi*)iAvkonAppUi)->RemoveFromViewStack( *this, iContainer ); - - delete iContainer; - iContainer = NULL; - } - } - - -TInt CServerSettingsView::CompleteSettingsL() - { - // compulsory field is empty, confirmation query - HBufC* temp; - temp = StringLoader::LoadLC( R_VPN_QUEST_INCOMPLETE_SERVER_DEF_DELETE ); - CAknQueryDialog* query = CAknQueryDialog::NewL( CAknQueryDialog::EConfirmationTone ); - TInt retval = query->ExecuteLD( R_CONFIRMATION_QUERY, *temp ); - CleanupStack::PopAndDestroy(); // temp - return retval; - } - -// End of File - diff -r 9f4e37332ce5 -r 473321461bba vpnui/vpnmanagementui/src/vpnmanagementuiserverview.cpp --- a/vpnui/vpnmanagementui/src/vpnmanagementuiserverview.cpp Thu Aug 19 10:54:34 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,321 +0,0 @@ -/* -* Copyright (c) 2003 - 2006 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: -* Handles commands given through the UI for maintaining policy servers. -* -*/ - - - -// INCLUDE FILES -#include -#include // for warning & information notes -#include -#include "vpnuiloader.h" -#include "vpnmanagementuiserverview.h" -#include "vpnmanagementuiservercontainer.h" -#include "vpnmanagementui.hrh" -#ifdef __SERIES60_HELP -#include // For HlpLauncher -#endif //__SERIES60_HELP - -/** MSK control Id. */ -const TInt KVpnMSKControlId = 3; - -// ================= MEMBER FUNCTIONS ======================= - -// --------------------------------------------------------- -// CVpnManagementUiServerView::CVpnManagementUiServerView(CVpnUiLoader& aLoader) -// : iLoader(aLoader) -// Constructor -// --------------------------------------------------------- -// -CVpnManagementUiServerView::CVpnManagementUiServerView( CVpnUiLoader& aLoader ) -: iLoader(aLoader) - { - } - -// --------------------------------------------------------- -// CVpnManagementUiServerView::~CVpnManagementUiServerView() -// Destructor -// --------------------------------------------------------- -// -CVpnManagementUiServerView::~CVpnManagementUiServerView() - { - if ( iServerContainer ) - { - AppUi()->RemoveFromViewStack(*this, iServerContainer); - delete iServerContainer; - } - } - -// --------------------------------------------------------- -// CVpnManagementUiServerView* CVpnManagementUiServerView::NewL( -// const TRect& /*aRect*/, CVpnUiLoader& aLoader) -// --------------------------------------------------------- -// -CVpnManagementUiServerView* CVpnManagementUiServerView::NewL( - const TRect& /*aRect*/, CVpnUiLoader& aLoader ) - { - CVpnManagementUiServerView* self = - new ( ELeave ) CVpnManagementUiServerView( aLoader ); - CleanupStack::PushL( self ); - self->ConstructL(); - CleanupStack::Pop(); - return self; - } - -// --------------------------------------------------------- -// CVpnManagementUiServerView* CVpnManagementUiServerView::NewLC( -// const TRect& /*aRect*/, CVpnUiLoader& aLoader) -// --------------------------------------------------------- -// -CVpnManagementUiServerView* CVpnManagementUiServerView::NewLC( - const TRect& /*aRect*/, CVpnUiLoader& aLoader ) - { - CVpnManagementUiServerView* self = - new ( ELeave ) CVpnManagementUiServerView( aLoader ); - CleanupStack::PushL( self ); - self->ConstructL(); - return self; - } - -// --------------------------------------------------------- -// CVpnManagementUiServerView::ConstructL() -// CVpnUiView::ConstructL(const TRect& aRect) -// EPOC two-phased constructor -// --------------------------------------------------------- -// -void CVpnManagementUiServerView::ConstructL() - { - BaseConstructL( R_VPNUI_POLICY_SERVERS_VIEW ); - } - -// --------------------------------------------------------- -// CVpnManagementUiServerView::DynInitMenuPaneL( -// TInt aResourceId,CEikMenuPane* aMenuPane) -// Updates Options list with correct items depending on -// whether the listbox is empty or if it has any marked items -// --------------------------------------------------------- -// -void CVpnManagementUiServerView::DynInitMenuPaneL(TInt aResourceId, CEikMenuPane* aMenuPane) - { - - if ( aResourceId == R_VPNUI_POLICY_SERVERS_VIEW_MENU ) - { - TInt currentItem = iServerContainer->iListBox->CurrentItemIndex(); - - // the policy server list is empty all except Add new server, Help and Exit is dimmed - if ( currentItem == -1 ) - { - aMenuPane->SetItemDimmed( EVpnUiCmdEditServer, ETrue ); - aMenuPane->SetItemDimmed( EVpnUiCmdSynchronise, ETrue ); - aMenuPane->SetItemDimmed( EVpnUiCmdDeleteServer, ETrue ); - } - else - aMenuPane->SetItemDimmed( EVpnUiCmdAddServer, ETrue ); - } - } - -// --------------------------------------------------------- -// CVpnManagementUiServerView::Id() const -// Returns Authority view id -// --------------------------------------------------------- -// -TUid CVpnManagementUiServerView::Id() const - { - return KVpnManagementUiServerViewId; - } - -// --------------------------------------------------------- -// CVpnManagementUiServerView::HandleCommandL(TInt aCommand) -// Handles Softkey and Options list commands -// --------------------------------------------------------- -// -void CVpnManagementUiServerView::HandleCommandL( TInt aCommand ) - { - TBool ffsLow; - - switch ( aCommand ) - { - case EAknSoftkeyBack: - { - iLoader.ChangeViewL( KChangeViewPrevious ); - break; - } - case EAknCmdExit: - { - ((CAknViewAppUi*)iAvkonAppUi)->HandleCommandL( EAknCmdExit ); - break; - } - - case EVpnUiCmdEditServer: - { - ffsLow = iLoader.FFSSpaceBelowCriticalLevelL( ETrue, 0 ); - if (!ffsLow) - { - iCurrentPosition = iServerContainer->iListBox->CurrentItemIndex(); - iLoader.ChangeViewL(KChangeViewSettings, iCurrentPosition); - } - break; - } - - case EVpnUiCmdAddServer: - { - ffsLow = iLoader.FFSSpaceBelowCriticalLevelL( ETrue, 0 ); - if(!ffsLow) - { - iLoader.ChangeViewL(KChangeViewSettings); - } - break; - } - case EVpnUiCmdSynchronise: - { - ffsLow = iLoader.FFSSpaceBelowCriticalLevelL( ETrue, 0 ); - if(!ffsLow) - { - iServerContainer->SynchroniseServerL(); - } - break; - } - - case EVpnUiCmdDeleteServer: - { - iCurrentPosition = iServerContainer->iListBox->CurrentItemIndex(); - iServerContainer->DeleteServerL(iCurrentPosition); - iCurrentPosition = iServerContainer->iListBox->CurrentItemIndex(); - break; - } - -#ifdef __SERIES60_HELP - case EAknCmdHelp: - { - HlpLauncher::LaunchHelpApplicationL( - iEikonEnv->WsSession(), AppUi()->AppHelpContextL() ); - break; - } -#endif //__SERIES60_HELP - - default: - { - AppUi()->HandleCommandL( aCommand ); - break; - } - } - } - -// --------------------------------------------------------- -// CVpnManagementUiServerView::HandleClientRectChange() -// --------------------------------------------------------- -// -void CVpnManagementUiServerView::HandleClientRectChange() - { - if ( iServerContainer ) - { - iServerContainer->SetRect( ClientRect() ); - } - } - -// --------------------------------------------------------- -// CVpnManagementUiServerView::DoActivateL(const TVwsViewId& /*aPrevViewId*/, -// TUid /*aCustomMessageId*/, const TDesC8& /*aCustomMessage*/) -// Updates the view when opening it -// --------------------------------------------------------- -// -void CVpnManagementUiServerView::DoActivateL( - const TVwsViewId& /*aPrevViewId*/, - TUid /*aCustomMessageId*/, const TDesC8& /*aCustomMessage*/) - { - if ( iServerContainer ) - { - ((CAknViewAppUi*)iAvkonAppUi)->RemoveFromViewStack( - *this, iServerContainer ); - } - iServerContainer = new (ELeave) CVpnManagementUiServerContainer( - *this, iLoader ); - - iServerContainer->SetMopParent( this ); - iServerContainer->ConstructL( - ClientRect(), iCurrentPosition, iTopItem ); - iLoader.ActivateTitleL( KViewTitleServerView ); - iLoader.PushDefaultNaviPaneL(); - - ((CAknViewAppUi*)iAvkonAppUi)->AddToStackL( *this, iServerContainer ); - iServerContainer->DrawListBoxL( iCurrentPosition, iTopItem ); - - // Add MiddleSoftKey - SetMiddleSoftKeyL(EFalse); - } - -void CVpnManagementUiServerView::SetMiddleSoftKeyL(TBool aDrawNow) - { - if (iServerContainer->iListItemCount > 0) - { - SetMiddleSoftKeyLabelL(R_MSK_EDIT, EVpnUiCmdEditServer); - } - else - { - SetMiddleSoftKeyLabelL(R_MSK_ADD_VPN_SERVER, EVpnUiCmdAddServer); - } - - if (aDrawNow) - { - if (Cba()) - Cba()->DrawNow(); - } - } - - -void CVpnManagementUiServerView::SetMiddleSoftKeyLabelL(TInt aResourceId, TInt aCommandId) - { - CEikButtonGroupContainer* cbaGroup = Cba(); - if (cbaGroup) - { - cbaGroup->RemoveCommandFromStack(KVpnMSKControlId, EVpnUiCmdEditServer); - cbaGroup->RemoveCommandFromStack(KVpnMSKControlId, EVpnUiCmdAddServer); - HBufC* text = StringLoader::LoadLC(aResourceId); - cbaGroup->AddCommandToStackL(KVpnMSKControlId, aCommandId, text->Des()); - CleanupStack::PopAndDestroy(text); - } - } - - -// --------------------------------------------------------- -// CVpnManagementUiServerView::DoDeactivate() -// Saves focus position when closing view -// --------------------------------------------------------- -// -void CVpnManagementUiServerView::DoDeactivate() - { - if ( iServerContainer ) - { - AppUi()->RemoveFromViewStack( *this, iServerContainer ); - - delete iServerContainer; - iServerContainer = NULL; - } - } - -// --------------------------------------------------------- -// CVpnManagementUiServerView::Container() -// Returns iServerContainer -// --------------------------------------------------------- -// -CCoeControl* CVpnManagementUiServerView::Container() - { - return iServerContainer; - } - -// End of File - diff -r 9f4e37332ce5 -r 473321461bba vpnui/vpnmanagementui/src/vpnmanagementuiview.cpp --- a/vpnui/vpnmanagementui/src/vpnmanagementuiview.cpp Thu Aug 19 10:54:34 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,416 +0,0 @@ -/* -* Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: VPN management main view -* -*/ - - - -// INCLUDE FILES -#include -#include -#include -#include -#include -#include -#include -#include "vpnmanagementui.hrh" -#include "vpnuiloader.h" -#include "vpnmanagementuiview.h" -#include "vpnmanagementuicontainer.h" -#include "vpnmanagementuiviewid.h" -#include "log_vpnmanagementui.h" - -/** MSK control Id. */ -const TInt KVpnMSKControlId = 3; - - -// ROM folder - -// Name of the MBM file containing icons -_LIT( KFileIcons, "vpnmanagementui.mbm"); - -// Constants -enum TVpnUiCommands - { - KVpnUiPolicyViewListItemId, - KVpnUiServerViewListItemId, - KVpnUiLogViewListItemId - }; - -// ================= MEMBER FUNCTIONS ======================= - -// --------------------------------------------------------------------------- -// CVpnManagementUiView::CVpnManagementUiView() -// --------------------------------------------------------------------------- -// -CVpnManagementUiView::CVpnManagementUiView() - { - } - -// --------------------------------------------------------------------------- -// CVpnManagementUiView::~CVpnManagementUiView() -// Destructor -// --------------------------------------------------------------------------- -// -CVpnManagementUiView::~CVpnManagementUiView() - { - LOG_("CVpnManagementUiView::~CVpnManagementUiView entered"); - if ( iContainer ) - { - AppUi()->RemoveFromViewStack(*this, iContainer); - delete iContainer; - } - delete iLoader; - LOG_("CVpnManagementUiView::~CVpnManagementUiView() exited"); - } - - -// --------------------------------------------------------------------------- -// CVpnManagementUiView::NewL() -// --------------------------------------------------------------------------- -// -CVpnManagementUiView* CVpnManagementUiView::NewL() - { - LOG_("CVpnManagementUiView::NewL() entered"); - CVpnManagementUiView* self = NewLC(); - CleanupStack::Pop(); - LOG_("CVpnManagementUiView::NewL() exited"); - return self; - } - -// --------------------------------------------------------------------------- -// CVpnManagementUiView::NewLC() -// --------------------------------------------------------------------------- -// -CVpnManagementUiView* CVpnManagementUiView::NewLC() - { - LOG_("CVpnManagementUiView::NewLC() entered"); - CVpnManagementUiView* self = new ( ELeave ) CVpnManagementUiView(); - CleanupStack::PushL( self ); - self->ConstructL(); - return self; - } - - -// --------------------------------------------------------------------------- -// CVpnManagementUiView::ConstructL() -// --------------------------------------------------------------------------- -// -void CVpnManagementUiView::ConstructL() - { - LOG_("CVpnManagementUiView::ConstructL() entered"); - iLoader = CVpnUiLoader::NewL(iAvkonViewAppUi->ClientRect(), - KVpnManagementPluginUid, this ); - BaseConstructL( R_VPNUI_MANAGEMENT_VIEW ); - iLoader->ReleaseResource(); - LOG_("CVpnManagementUiView::ConstructL() exited"); - } - -// --------------------------------------------------------------------------- -// void CVpnManagementUiView::GetCaptionL( TDes& aCaption ) const -// --------------------------------------------------------------------------- -void CVpnManagementUiView::GetCaptionL( TDes& aCaption ) const - { - LOG_("CVpnManagementUiView::GetCaptionL() entered"); - iLoader->AddResourceFileL(); - StringLoader::Load( aCaption, R_VPN_MANAGEMENT_TITLE_BUF ); - iLoader->ReleaseResource(); - LOG_("CVpnManagementUiView::GetCaptionL() exited"); - } - -// --------------------------------------------------------------------------- -// TUid CVpnManagementUiView::Id() -// --------------------------------------------------------------------------- -// -TUid CVpnManagementUiView::Id() const - { - LOG_("CVpnManagementUiView::Id called"); - return KVpnManagementPluginUid; - } - -// --------------------------------------------------------------------------- -// CVpnManagementUiView::HandleCommandL() -// Handles commands directed to this class. -// --------------------------------------------------------------------------- -// -void CVpnManagementUiView::HandleCommandL(TInt aCommand) - { - LOG_1("CVpnManagementUiView::HandleCommandL():%d", aCommand); - switch ( aCommand ) - { - case EAknSoftkeyBack: - { - iLoader->ChangeViewL( KChangeViewBack ); - break; - } - case EAknCmdExit: - { - ((CAknViewAppUi*)iAvkonAppUi)->HandleCommandL( EAknCmdExit ); - break; - } - case EVpnUiCmdOpen: - { - HandleListBoxSelectionL(); - break; - } - - #ifdef __SERIES60_HELP - case EAknCmdHelp: - { - HlpLauncher::LaunchHelpApplicationL( - iEikonEnv->WsSession(), AppUi()->AppHelpContextL() ); - break; - } - #endif //__SERIES60_HELP - - default: - { - AppUi()->HandleCommandL( aCommand ); - break; - } - } - } - - - -// --------------------------------------------------------------------------- -// CVpnManagementUiView::HandleClientRectChange() -// --------------------------------------------------------------------------- -// -void CVpnManagementUiView::HandleClientRectChange() - { - if ( iContainer ) - { - iContainer->SetRect( ClientRect() ); - } - } - -// --------------------------------------------------------------------------- -// CVpnManagementUiView::DoActivateL() -// --------------------------------------------------------------------------- -// -void CVpnManagementUiView::DoActivateL( - const TVwsViewId& aPrevViewId,TUid /*aCustomMessageId*/, - const TDesC8& /*aCustomMessage*/) - { - LOG_("CVpnManagementUiView::DoActivateL() entered"); - iLoader->AddResourceFileL(ETrue); - if ( iLoader->GSViewId().iViewUid.iUid == 0 ) - { - //must be prepared to application switch, so it stores - //only the parent view (General Settings Main View) - iLoader->SetGSViewId( aPrevViewId ); - - } - if ( iContainer ) - { - ((CAknViewAppUi*)iAvkonAppUi)->RemoveFromViewStack( - *this, iContainer ); - } - iContainer = new (ELeave) CVpnManagementUiContainer( - *this, *iLoader ); - - iContainer->SetMopParent( this ); - iContainer->ConstructL( ClientRect() ); - iLoader->ActivateTitleL( KViewTitleManagementView ); - iLoader->PushDefaultNaviPaneL(); - - ((CAknViewAppUi*)iAvkonAppUi)->AddToStackL( *this, iContainer ); - iContainer->DrawListBoxL( iCurrentItem, iTopItemIndex ); - - //Listbox observer is set here, instead create listbox - iContainer->iListBox->SetListBoxObserver(this); - - // Add MiddleSoftKey - CEikButtonGroupContainer* cbaGroup = Cba(); - if (cbaGroup) - { - HBufC* text = StringLoader::LoadLC(R_MSK_OPEN); - cbaGroup->AddCommandToStackL( - KVpnMSKControlId, EVpnUiCmdOpen, text->Des()); - CleanupStack::PopAndDestroy(text); - } - LOG_("CVpnManagementUiView::DoActivateL() exited"); - } - -// --------------------------------------------------------------------------- -// CVpnManagementUiView::HandleCommandL() -// --------------------------------------------------------------------------- -// -void CVpnManagementUiView::DoDeactivate() - { - LOG_("CVpnManagementUiView::DoDeactivate() entered"); - if ( iContainer ) - { - AppUi()->RemoveFromViewStack( *this, iContainer ); - - delete iContainer; - iContainer = NULL; - } - LOG_("CVpnManagementUiView::DoDeactivate() exited"); - } - -// --------------------------------------------------------------------------- -// CVpnManagementUiView::HandleListBoxEventL -// --------------------------------------------------------------------------- - -void CVpnManagementUiView::HandleListBoxEventL(CEikListBox* /*aListBox*/, - TListBoxEvent aEventType) - { - switch (aEventType) - { - case EEventEnterKeyPressed: - case EEventItemSingleClicked: - HandleListBoxSelectionL(); - break; - default: - break; - } - } - -// --------------------------------------------------------------------------- -// CVpnManagementUiView::HandleListBoxSelectionL() -// --------------------------------------------------------------------------- -// -void CVpnManagementUiView::HandleListBoxSelectionL() - { - ASSERT(iContainer && iContainer->iListBox && iLoader); - iCurrentItem = iContainer->iListBox->CurrentItemIndex(); - iTopItemIndex = iContainer->iListBox->TopItemIndex(); - switch (iCurrentItem) - { - case KVpnUiPolicyViewListItemId: - iLoader->ChangeViewL(KChangeViewPolicy); - break; - - - case KVpnUiServerViewListItemId: - iLoader->ChangeViewL(KChangeViewServer); - break; - - - case KVpnUiLogViewListItemId: - iLoader->ChangeViewL(KChangeViewLog); - break; - - default: - LOG_("CVpnManagementUiView::HandleListBoxSelectionL default"); - break; - } - } - - - -void CVpnManagementUiView::NotifySynchroniseServerCompleteL(TInt aResult) - { - if ( aResult != KErrNone) - LOG_1("CVpnManagementUiView::NotifySynchroniseServerCompleteL:%d", aResult); - } - -// --------------------------------------------------------------------------- -// CVpnManagementUiView::HasBitmap -// --------------------------------------------------------------------------- -TBool CVpnManagementUiView::HasBitmap() const - { - LOG_("CVpnManagementUiView::HasBitmap() called"); - return EFalse; - } - -// --------------------------------------------------------------------------- -// CVpnManagementUiView::GetBitmapL -// --------------------------------------------------------------------------- -void CVpnManagementUiView::GetBitmapL( CFbsBitmap* /*aBitmap*/, - CFbsBitmap* /*aMask*/ ) const - { - LOG_("CVpnManagementUiView::GetBitmapL() entered"); - //no bitmap - User::Leave( KErrNotFound ); - LOG_("CVpnManagementUiView::GetBitmapL() exited"); - } - -// --------------------------------------------------------------------------- -// CVpnManagementUiView::PluginProviderCategory -// --------------------------------------------------------------------------- -TInt CVpnManagementUiView::PluginProviderCategory() const - { - LOG_("CVpnManagementUiView::PluginProviderCategory() called"); - return EGSPluginProviderOEM; - } - -// --------------------------------------------------------------------------- -// CVpnManagementUiView::CreateIconL -// --------------------------------------------------------------------------- -CGulIcon* CVpnManagementUiView::CreateIconL( const TUid aIconType ) - { - LOG_("CVpnManagementUiView::CreateIconL() entered"); - - TFileName iconsFileName; - TFileName dllName; - Dll::FileName(dllName); - TBuf<2> drive = dllName.Left(2); - iconsFileName.Insert(0, drive); - - - iconsFileName.Append( KDC_APP_BITMAP_DIR ); - iconsFileName.Append( KFileIcons ); - - CGulIcon* icon; - - if( aIconType == KGSIconTypeLbxItem ) - { - icon = AknsUtils::CreateGulIconL( - AknsUtils::SkinInstance(), - KAknsIIDQgnPropSetConnVpn, - iconsFileName, - EMbmVpnmanagementuiQgn_prop_set_conn_vpn, - EMbmVpnmanagementuiQgn_prop_set_conn_vpn_mask ); - } - else - { - icon = CGSPluginInterface::CreateIconL( aIconType ); - } - LOG_("CVpnManagementUiView::CreateIconL() exited"); - return icon; - } - -// --------------------------------------------------------------------------- -// CVpnManagementUiView::Visible -// --------------------------------------------------------------------------- -TBool CVpnManagementUiView::Visible() const - { - LOG_("CVpnManagementUiView::Visible() entered"); - TInt vpnSupported( 0 ); - TInt readError(0); - TRAPD(loadError, - { - CRepository* repository = CRepository::NewL(KCRUidCommunicationSettings); - readError = repository->Get(KSettingsVPNSupported, vpnSupported); - delete repository; - }); - LOG_1("CVpnManagementUiView::Visible():%d exited", vpnSupported); - return (vpnSupported && !readError && !loadError) ? ETrue : EFalse; - } - -// --------------------------------------------------------------------------- -// CVpnManagementUiView::PluginUid -// --------------------------------------------------------------------------- -TUid CVpnManagementUiView::PluginUid() const - { - LOG_("CVpnManagementUiView::PluginUid() called"); - return KVpnManagementPluginUid; - } - -// End of File - diff -r 9f4e37332ce5 -r 473321461bba vpnui/vpnmanagementui/src/vpnuiloader.cpp --- a/vpnui/vpnmanagementui/src/vpnuiloader.cpp Thu Aug 19 10:54:34 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,612 +0,0 @@ -/* -* Copyright (c) 2003 - 2010 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: VPN management main view -* -*/ - - - -// INCLUDE FILES -#include // for warning & information notes -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "vpnuiloader.h" -#include "vpnmanagementuiview.h" -#include "vpnmanagementuipolicyview.h" -#include "vpnmanagementuiserverview.h" -#include "vpnmanagementuilogview.h" -#include "vpnmanagementuiserversettingsview.h" -#include "version.h" -#include "vpnmanagementuiserversettingscontainer.h" - -#include "log_vpnmanagementui.h" - -// CONSTANTS - - -using namespace CMManager; - - -// ================= MEMBER FUNCTIONS ======================= - -// --------------------------------------------------------- -// CVpnUiLoader::CVpnUiLoader() -// Constructor with parent -// --------------------------------------------------------- -// -CVpnUiLoader::CVpnUiLoader( CVpnManagementUiView* aUiView ): - iVpnManagementUiView(aUiView), - iResourceLoader(*iCoeEnv) - { - LOG_("CVpnUiLoader::CVpnUiLoader()"); - ASSERT( aUiView ); - } - -// --------------------------------------------------------- -// CVpnUiLoader::~CVpnUiLoader() -// Destructor -// --------------------------------------------------------- -// -CVpnUiLoader::~CVpnUiLoader() - { - LOG_("CVpnUiLoader::~CVpnUiLoader()"); - iVpnManagementUiView = NULL; - - if(iVersionInfoInNaviPane) - { - delete iVersionInfoInNaviPane; - } - delete iVpnApiWrapper; - delete iWaitDialog; - iResourceLoader.Close(); - } - -// --------------------------------------------------------- -// CVpnUiLoader* CVpnUiLoader::NewL() -// --------------------------------------------------------- -// -CVpnUiLoader* CVpnUiLoader::NewL( - const TRect& aRect, TUid aViewId, - CVpnManagementUiView* aUiView ) - { - CVpnUiLoader* self = NewLC( aRect, aViewId, aUiView ); - CleanupStack::Pop(); - return self; - } - -// --------------------------------------------------------- -// CVpnUiLoader* CVpnUiLoader::NewLC() -// --------------------------------------------------------- -// -CVpnUiLoader* CVpnUiLoader::NewLC( - const TRect& aRect, TUid aViewId, - CVpnManagementUiView* aUiView ) - { - CVpnUiLoader* self = new ( ELeave ) CVpnUiLoader( aUiView ); - CleanupStack::PushL( self ); - self->ConstructL( aRect, aViewId ); - return self; - } - -// --------------------------------------------------------- -// CVpnUiLoader::ConstructL() -// --------------------------------------------------------- -// -void CVpnUiLoader::ConstructL( const TRect& aRect, TUid aViewId ) - { - LOG_("CVpnUiLoader::ConstructL() - begin"); - - AddResourceFileL(); - //Initialization - iBackFromServerDefinition = EFalse; - iNewServerDefinition = EFalse; - iPolicyUpdate = EFalse; - - CEikStatusPane* statusPane = STATIC_CAST( - CAknAppUi*, iEikonEnv->EikAppUi())->StatusPane(); - - // Fetch pointer to the default navi pane control - iNaviPane = static_cast ( - statusPane->ControlL( TUid::Uid(EEikStatusPaneUidNavi) ) ); - - iPreviousAppViewId = aViewId; - CreateWindowL(); - - User::LeaveIfError( iVpnExtApi.Connect() ); - SetRect(aRect); - - LOG(Log::Printf(_L("CVpnUiLoader::ConstructL() - end\n"))); - } - -// --------------------------------------------------------- -// CVpnUiLoader::FocusChanged(TDrawNow aDrawNow) -// Added here because FocusChanged need to be included -// in every control derived from CCoeControl that can have listbox -// --------------------------------------------------------- -// -void CVpnUiLoader::FocusChanged(TDrawNow aDrawNow) - { - if (iListBox) - { - iListBox->SetFocus(IsFocused(), aDrawNow); - } - } - -// --------------------------------------------------------- -// CVpnUiLoader::ChangeViewL(TInt aNewTab, TInt aSelectionIndex) -// Called when the view tab is changed -// --------------------------------------------------------- -// -void CVpnUiLoader::ChangeViewL(TInt aNewTab, TInt aSelectionIndex) - { - LOG_1("CVpnUiLoader::ChangeViewL():%d", aNewTab); - switch (aNewTab) - { - - case KChangeViewPrevious: - { - TVwsViewId currentViewId; - ((CAknViewAppUi*)iAvkonAppUi)->GetActiveViewId(currentViewId); - - if(iPreviousViewId == currentViewId.iViewUid) - { - ((CAknViewAppUi*)iAvkonAppUi)->RegisterViewL(*iVpnManagementUiView); - ((CAknViewAppUi*)iAvkonAppUi)->ActivateLocalViewL( KVpnManagementPluginUid ); - } - else - { - ((CAknViewAppUi*)iAvkonAppUi)->RegisterViewL(*iVpnManagementUiView); - ((CAknViewAppUi*)iAvkonAppUi)->ActivateLocalViewL( - iPreviousViewId ); - } - break; - } - case KChangeViewBack: - ((CAknViewAppUi*)iAvkonAppUi)->RemoveView(KVpnManagementUiPolicyViewId); - iPolicyViewVisited = EFalse; - ((CAknViewAppUi*)iAvkonAppUi)->RemoveView(KVpnManagementUiLogViewId); - iLogViewVisited = EFalse; - ((CAknViewAppUi*)iAvkonAppUi)->RemoveView(KVpnManagementUiParametersViewId); - iServerSettingsViewVisited = EFalse; - ((CAknViewAppUi*)iAvkonAppUi)->RemoveView(KVpnManagementUiServerViewId); - iServerViewVisited = EFalse; - ((CAknViewAppUi*)iAvkonAppUi)->ActivateLocalViewL( iGsViewId.iViewUid ); - if(iObserver) - { - iObserver->UiComplete(KUirEventNone); - } - break; - - case KChangeViewPolicy: //Policy view - { - // the current view is saved so we - // know where to come back - TVwsViewId localCurrentViewId; - ((CAknViewAppUi*)iAvkonAppUi)->GetActiveViewId( - localCurrentViewId ); - - iPreviousViewId = localCurrentViewId.iViewUid; - if ( iPolicyViewVisited == EFalse) - { - TRect rect; - iVpnManagementUiPolicyView = CVpnManagementUiPolicyView::NewL( - rect, *this); - ((CAknViewAppUi*)iAvkonAppUi)->AddViewL(iVpnManagementUiPolicyView); - } - iPolicyViewVisited=ETrue; - ((CAknViewAppUi*)iAvkonAppUi)->ActivateLocalViewL( - KVpnManagementUiPolicyViewId ); - break; - } - case KChangeViewServer: //Policy server view - { - // the current view is saved so we - // know where to come back - TVwsViewId localCurrentViewId; - ((CAknViewAppUi*)iAvkonAppUi)->GetActiveViewId( - localCurrentViewId ); - - iPreviousViewId = localCurrentViewId.iViewUid; - if ( iServerViewVisited == EFalse) - { - TRect rect; - iVpnManagementUiServerView = CVpnManagementUiServerView::NewL( rect, *this); - ((CAknViewAppUi*)iAvkonAppUi)->AddViewL(iVpnManagementUiServerView); - } - iServerViewVisited = ETrue; - ((CAknViewAppUi*)iAvkonAppUi)->ActivateLocalViewL( - KVpnManagementUiServerViewId ); - break; - } - case KChangeViewLog: //Log view - { - // the current view is saved so we - // know where to come back - TVwsViewId localCurrentViewId; - ((CAknViewAppUi*)iAvkonAppUi)->GetActiveViewId( - localCurrentViewId ); - - iPreviousViewId = localCurrentViewId.iViewUid; - if ( iLogViewVisited == EFalse) - { - TRect rect; - iVpnManagementUiLogView = CVpnManagementUiLogView::NewL( rect, *this); - ((CAknViewAppUi*)iAvkonAppUi)->AddViewL(iVpnManagementUiLogView); - } - iLogViewVisited=ETrue; - ((CAknViewAppUi*)iAvkonAppUi)->ActivateLocalViewL( - KVpnManagementUiLogViewId ); - break; - } - - case KChangeViewSettings: //VPN policy server parameters view - { - // the current view is saved so that close settings - // knows where to come back - TVwsViewId localCurrentViewId; - ((CAknViewAppUi*)iAvkonAppUi)->GetActiveViewId( - localCurrentViewId ); - - iPreviousViewId = localCurrentViewId.iViewUid; - //Put selected server to CustomMessageId - if ( iServerSettingsViewVisited == EFalse) - { - TRect rect; - iVpnManagementUiParametersView = CServerSettingsView::NewL( rect, *this); - ((CAknViewAppUi*)iAvkonAppUi)->AddViewL(iVpnManagementUiParametersView); - } - iServerSettingsViewVisited = ETrue; - ((CAknViewAppUi*)iAvkonAppUi)->ActivateLocalViewL( - KVpnManagementUiParametersViewId, - TUid::Uid( aSelectionIndex), KNullDesC8 ); - break; - } - - default: - break; - } - } - -// ---------------------------------------------------- -// CVpnUiLoader::ActivateTitleL(TInt aCurrentTitle) -// Activates the VPN policies, VPN policy servers and -// VPN log views title -// ---------------------------------------------------- -// -void CVpnUiLoader::ActivateTitleL(TInt aCurrentTitle) - { - CEikStatusPane* sp = STATIC_CAST( - CAknAppUi*, iEikonEnv->EikAppUi())->StatusPane(); - // Fetch pointer to the default title pane control - CAknTitlePane* title = STATIC_CAST( - CAknTitlePane*, sp->ControlL(TUid::Uid(EEikStatusPaneUidTitle)) ); - TResourceReader reader; - - if ( aCurrentTitle == KViewTitleManagementView ) - { - iCoeEnv->CreateResourceReaderLC( reader, R_VPN_MANAGEMENT_TITLE ); - } - if ( aCurrentTitle == KViewTitlePolicyView ) - { - iCoeEnv->CreateResourceReaderLC( reader, R_VPN_POLICIES_TITLE ); - } - if ( aCurrentTitle == KViewTitleServerView ) - { - iCoeEnv->CreateResourceReaderLC( reader, R_VPN_POLICY_SERVERS_TITLE ); - } - if ( aCurrentTitle == KViewTitleLogView ) - { - iCoeEnv->CreateResourceReaderLC( reader, R_VPN_LOG_TITLE ); - } - - title->SetFromResourceL( reader ); - CleanupStack::PopAndDestroy(); // reader - } - -void CVpnUiLoader::ActivateTitleL(TInt aCurrentTitle, TDes& aText) - { - CEikStatusPane* sp = STATIC_CAST( - CAknAppUi*, iEikonEnv->EikAppUi())->StatusPane(); - // Fetch pointer to the default title pane control - CAknTitlePane* title = STATIC_CAST( - CAknTitlePane*, sp->ControlL(TUid::Uid(EEikStatusPaneUidTitle)) ); - - if ( aCurrentTitle == KViewTitleParametersView ) - { - title->SetTextL(aText); - } - } -// ---------------------------------------------------- -// CVpnUiLoader::ActivateNaviTextL() -// Activates the VPN log view Navipane text (Version information) -// ---------------------------------------------------- -// -void CVpnUiLoader::ActivateNaviTextL() - { - // version information in navi pane text shown in VPN Log view - //TBuf version(KVersion); - HBufC* naviText = StringLoader::LoadLC( - R_VPN_NAVI_CLIENT_VERSION, KVersion/*version*/ ); - TPtr naviDes=naviText->Des(); - AknTextUtils::DisplayTextLanguageSpecificNumberConversion(naviDes); - iVersionInfoInNaviPane = iNaviPane->CreateMessageLabelL(*naviText); - CleanupStack::PopAndDestroy(); //naviText - } - -// --------------------------------------------------------- -// CVpnUiLoader::PushNaviPaneL -// --------------------------------------------------------- -// -void CVpnUiLoader::PushNaviPaneL() - { - iNaviPane->PushL( *iVersionInfoInNaviPane ); - } - -// --------------------------------------------------------- -// CVpnUiLoader::PopNaviPane -// --------------------------------------------------------- -// -void CVpnUiLoader::PopNaviPane() - { - if(iVersionInfoInNaviPane) - { - delete iVersionInfoInNaviPane; //A control is popped from stack - iVersionInfoInNaviPane = NULL; - } - } - -// --------------------------------------------------------- -// CVpnUiLoader::PushDefaultNaviPaneL -// --------------------------------------------------------- -// -void CVpnUiLoader::PushDefaultNaviPaneL() - { - iNaviPane->PushDefaultL(); - } - -// --------------------------------------------------------- -// CVpnUiLoader::HandleControlEventL( -// CCoeControl* /*aControl*/,TCoeEvent /*aEventType*/) -// Cannot be changed to non-leaving function. -// L-function is required by the class definition, even if empty. -// --------------------------------------------------------- -// -void CVpnUiLoader::HandleControlEventL( - CCoeControl* /*aControl*/,TCoeEvent /*aEventType*/) - { - } - -// --------------------------------------------------------- -// CVpnUiLoader::OfferKeyEventL() -// --------------------------------------------------------- -// -TKeyResponse CVpnUiLoader::OfferKeyEventL( - const TKeyEvent& /*aKeyEvent*/, TEventCode /*aType*/) - { - // Listbox takes all event even if it doesn't use them - return EKeyWasNotConsumed; - } - -// ---------------------------------------------------------- -// AddResourceFileL() -// ---------------------------------------------------------- -// -void CVpnUiLoader::AddResourceFileL(TBool aKeepOpen) - { - if (!iKeepOpen) - { - iKeepOpen = aKeepOpen; - _LIT(KResourceFile, "\\resource\\vpnmanagementuirsc.rsc"); - TFileName resourceFileName(KResourceFile); - TFileName dllName; - Dll::FileName(dllName); - TBuf<2> drive = dllName.Left(2); - resourceFileName.Insert(0, drive); - - // To enable loading of e.g. vpnmanagementuirsc.r** - BaflUtils::NearestLanguageFile(iCoeEnv->FsSession(), resourceFileName); - iResourceLoader.OpenL(resourceFileName); - LOG_("CVpnUiLoader::AddResourceFileL("); - } - } -// ---------------------------------------------------------- -// ReleaseResource() -// ---------------------------------------------------------- -// -void CVpnUiLoader::ReleaseResource(TBool aForceClose) - { - if(!iKeepOpen || aForceClose) - { - LOG_("CVpnUiLoader::ReleaseResource()"); - iKeepOpen = EFalse; - iResourceLoader.Close(); - } - } -// --------------------------------------------------------- -// CVpnUiLoader::DialogDismissedL -// --------------------------------------------------------- -// -void CVpnUiLoader::DialogDismissedL( TInt /*aButtonId*/ ) - { - // The UI is left in an inactive state if the progress dialog is cancelled - // very quickly. Thus, we ensure that the UI ends up in an active - // state by activating the view that should be active. - TVwsViewId activeViewId; - ((CAknViewAppUi*)iAvkonAppUi)->GetActiveViewId(activeViewId); - ((CAknViewAppUi*)iAvkonAppUi)->ActivateLocalViewL(activeViewId.iViewUid); - - if ( !iShowWaitNote ) - { - iVpnApiWrapper->CancelSynchronise( ); - } - } - -// --------------------------------------------------------- -// CVpnUiLoader::ShowWaitNoteL -// --------------------------------------------------------- -// -void CVpnUiLoader::ShowWaitNoteL() - { - // Initialization (before the progress dialog is shown) - iWaitNoteStartTime.UniversalTime(); - - if ( iWaitDialog ) - { - delete iWaitDialog; - iWaitDialog = NULL; - } - iWaitDialog = new ( ELeave ) CAknWaitDialog - ( REINTERPRET_CAST(CEikDialog**,&iWaitDialog),ETrue ); - iWaitDialog->PrepareLC( R_VPN_WAIT_NOTE ); - iWaitDialog->SetTone( CAknNoteDialog::ENoTone ); - iWaitDialog->SetCallback( this ); - - SetTextL(); - - iWaitDialog->RunLD(); - iWaitDialog->DrawNow(); - } - -void CVpnUiLoader::DeleteWaitNoteL() - { - TInt error; - // Dismiss wait dialog - TRAP(error, iWaitDialog->ProcessFinishedL()); // deletes the wait dialog - if (error != KErrNone) - { - // on error destroy wait note by force. - delete iWaitDialog; - } - iWaitDialog = NULL; - iShowWaitNote = EFalse; - } - -void CVpnUiLoader::SetTextL() - { - LOG(Log::Printf(_L("CVpnUiLoader::SetTextL()\n"))); - - - HBufC* string = StringLoader::LoadLC( R_VPN_WAIT_IMPORTING_POLICY ); - iWaitDialog->SetTextL( *string ); - CleanupStack::PopAndDestroy( string ); - - } - - -void CVpnUiLoader::GetSelectionNameL( TDes& aText ) - { - TCmSettingSelection selection = TCmSettingSelection(); - - //Reset update operation for Connecting via note - iPolicyUpdate = EFalse; - - HBufC* name = NULL; - TInt err = KErrNone; - if ( selection.iResult == EDestination ) - { - TRAP( err, (name = CServerSettingsContainer::GetDestinationNameL( selection.iId ))); - } - else if ( selection.iResult == EConnectionMethod ) - { - TRAP( err, (name = CServerSettingsContainer::GetConnectionMethodNameL( selection.iId ))); - } - - if ( name ) - { - aText.Copy(*name); - } - delete name; - name = NULL; - } - - -// --------------------------------------------------------- -// CVpnUiLoader::FFSSpaceBelowCriticalLevelL -// --------------------------------------------------------- -// -TBool CVpnUiLoader::FFSSpaceBelowCriticalLevelL - ( TBool aShowErrorNote, TInt aBytesToWrite /*=0*/ ) - { - LOG_("CVpnUiLoader::FFSSpaceBelowCriticalLevelL() - begin"); - - TBool ret( EFalse ); - if ( SysUtil::FFSSpaceBelowCriticalLevelL - ( &(CCoeEnv::Static()->FsSession()), aBytesToWrite ) ) - { - ret = ETrue; - if ( aShowErrorNote ) - { - CErrorUI* errorUi = CErrorUI::NewLC( *(CCoeEnv::Static()) ); - errorUi->ShowGlobalErrorNoteL( KErrDiskFull ); - CleanupStack::PopAndDestroy(); // errorUi - } - } - - LOG( Log::Printf(_L("CVpnUiLoader::FFSSpaceBelowCriticalLevelL() - end\n"))); - - return ret; - } - -// --------------------------------------------------------- -// CVpnUiLoader::GetVpnManagementUiView() -// -// --------------------------------------------------------- -// -CAknView* CVpnUiLoader::GetVpnManagementUiView() const - { - return iVpnManagementUiView; - } - -// --------------------------------------------------------- -// CVpnUiLoader::VpnApiWrapperL() -// --------------------------------------------------------- -// -CVpnApiWrapper& CVpnUiLoader::VpnApiWrapperL() - { - LOG_("CVpnUiLoader::VpnApiWrapperL()"); - if (!iVpnApiWrapper) - iVpnApiWrapper = CVpnApiWrapper::NewL(); - return *iVpnApiWrapper; - } - -// --------------------------------------------------------- -// CVpnUiLoader::GsViewId() -// Called when the view tab is changed -// --------------------------------------------------------- -// -TVwsViewId CVpnUiLoader::GSViewId() const - { - return iGsViewId; - } - -// --------------------------------------------------------- -// CVpnUiLoader::SetGsViewId( TVwsViewId ) -// Called when the view tab is changed -// --------------------------------------------------------- -// -void CVpnUiLoader::SetGSViewId( TVwsViewId aGsViewUid ) - { - iGsViewId = aGsViewUid; - } - -// End of File diff -r 9f4e37332ce5 -r 473321461bba vpnui/vpnpolicyrecognizer/rom/vpnpolicyrecognizer.iby --- a/vpnui/vpnpolicyrecognizer/rom/vpnpolicyrecognizer.iby Thu Aug 19 10:54:34 2010 +0300 +++ b/vpnui/vpnpolicyrecognizer/rom/vpnpolicyrecognizer.iby Tue Aug 31 16:14:16 2010 +0300 @@ -22,9 +22,13 @@ #ifdef FF_VPN_CLIENT +#ifndef FF_GENERIC_ACCESS_NETWORK // UMA not supported + ECOM_PLUGIN(vpnpolicyrecognizer.dll,vpnpolicyrecognizer.rsc) data=ZRESOURCE\plugins\vpnpolicyrecognizer.rsc RESOURCE_FILES_DIR\plugins\vpnpolicyrecognizer.rsc #endif +#endif // FF_VPN_CLIENT + #endif // __VPNPOLICYRECOGNIZER_IBY__