00001 /* 00002 * ============================================================================ 00003 * Name : ApSettingsHandlerUi.h 00004 * Part of : Access Point Settings Handler UI 00005 * 00006 * Description: 00007 * Declares the main handler, CApSettingsHandler and public API for the 00008 * Access Point settings. 00009 * Version: 00010 * 00011 * Copyright (C) 2002 Nokia Corporation. 00012 * This material, including documentation and any related 00013 * computer programs, is protected by copyright controlled by 00014 * Nokia Corporation. All rights are reserved. Copying, 00015 * including reproducing, storing, adapting or translating, any 00016 * or all of this material requires the prior written consent of 00017 * Nokia Corporation. This material also contains confidential 00018 * information which may not be disclosed to others without the 00019 * prior written consent of Nokia Corporation. 00020 * 00021 * ============================================================================ 00022 */ 00023 00024 #ifndef APSETTINGS_HANDLER_H 00025 #define APSETTINGS_HANDLER_H 00026 00027 // INCLUDES 00028 #include <ApSettingsHandlerCommons.h> 00029 #include <ApEngineConsts.h> 00030 #include <ApSelect.h> 00031 00032 // CONSTANTS 00033 const TUid KUidApSettingsHandler = { 0x10008d3B }; 00034 00035 typedef struct 00036 { 00037 TInt iResOffset; 00038 TBool iIsIpv6Supported; // Default is NO 00039 TBool iIsFeatureManagerInitialised; 00040 TInt iExtra; 00041 TInt iSortType; 00042 TVpnFilterType iVpnFilterType; 00043 TInt iVariant; 00044 TBool iIncludeEasyWlan; 00045 }TApSetHandlerExtra; 00046 00047 // FORWARD DECLARATIONS 00048 class CActiveApDb; 00049 class CApSelector; 00050 class CApSettingsModel; 00051 class CApSettings; 00052 class CTextOverrides; 00053 class CApAccessPointItem; 00054 00055 class CApSettingsHandlerImpl; 00056 00057 // CLASS DECLARATION 00063 class CApSettingsHandler : public CBase 00064 { 00065 00066 public: // Constructors and destructor 00067 00068 00160 IMPORT_C static CApSettingsHandler* NewLC( 00161 TBool aStartWithSelection, 00162 TSelectionListType aListType, 00163 TSelectionMenuType aSelMenuType, 00164 TInt aIspFilter, 00165 TInt aBearerFilter, 00166 TInt aSortType 00167 ); 00168 00169 00170 00265 IMPORT_C static CApSettingsHandler* NewLC( 00266 CActiveApDb& aDb, 00267 TBool aStartWithSelection, 00268 TSelectionListType aListType, 00269 TSelectionMenuType aSelMenuType, 00270 TInt aIspFilter, 00271 TInt aBearerFilter, 00272 TInt aSortType 00273 ); 00274 00275 00276 00277 00278 00279 00280 00281 00375 IMPORT_C static CApSettingsHandler* NewLC( 00376 TBool aStartWithSelection, 00377 TSelectionListType aListType, 00378 TSelectionMenuType aSelMenuType, 00379 TInt aIspFilter, 00380 TInt aBearerFilter, 00381 TInt aSortType, 00382 TInt aReqIpvType 00383 ); 00384 00385 00386 00478 IMPORT_C static CApSettingsHandler* NewLC( 00479 CActiveApDb& aDb, 00480 TBool aStartWithSelection, 00481 TSelectionListType aListType, 00482 TSelectionMenuType aSelMenuType, 00483 TInt aIspFilter, 00484 TInt aBearerFilter, 00485 TInt aSortType, 00486 TInt aReqIpvType 00487 ); 00488 00489 00490 00491 00587 IMPORT_C static CApSettingsHandler* NewLC( 00588 TBool aStartWithSelection, 00589 TSelectionListType aListType, 00590 TSelectionMenuType aSelMenuType, 00591 TInt aIspFilter, 00592 TInt aBearerFilter, 00593 TInt aSortType, 00594 TInt aReqIpvType, 00595 TVpnFilterType aVpnFilterType 00596 ); 00597 00598 00599 00693 IMPORT_C static CApSettingsHandler* NewLC( 00694 CActiveApDb& aDb, 00695 TBool aStartWithSelection, 00696 TSelectionListType aListType, 00697 TSelectionMenuType aSelMenuType, 00698 TInt aIspFilter, 00699 TInt aBearerFilter, 00700 TInt aSortType, 00701 TInt aReqIpvType, 00702 TVpnFilterType aVpnFilterType 00703 ); 00704 00705 00706 00707 00708 00804 IMPORT_C static CApSettingsHandler* NewLC( 00805 CActiveApDb& aDb, 00806 TBool aStartWithSelection, 00807 TSelectionListType aListType, 00808 TSelectionMenuType aSelMenuType, 00809 TInt aIspFilter, 00810 TInt aBearerFilter, 00811 TInt aSortType, 00812 TInt aReqIpvType, 00813 TVpnFilterType aVpnFilterType, 00814 TBool aIncludeEasyWlan 00815 ); 00816 00817 00818 00819 00824 IMPORT_C ~CApSettingsHandler(); 00825 00826 00827 protected: 00838 IMPORT_C CApSettingsHandler( 00839 TBool aStartWithSelection, 00840 TSelectionListType aListType, 00841 TSelectionMenuType aSelMenuType 00842 ); 00843 00855 IMPORT_C CApSettingsHandler( 00856 TBool aStartWithSelection, 00857 TSelectionListType aListType, 00858 TSelectionMenuType aSelMenuType, 00859 TUid aHelpMajor 00860 ); 00861 00862 00873 CApSettingsHandler( 00874 TBool aStartWithSelection, 00875 TSelectionListType aListType, 00876 TSelectionMenuType aSelMenuType, 00877 TBool aNeedIpv6Support 00878 ); 00879 00880 00881 00889 IMPORT_C void ConstructL( 00890 TInt aIspFilter, 00891 TInt aBearerFilter, 00892 TInt aSortType 00893 ); 00894 00895 00904 IMPORT_C void ConstructL( 00905 CActiveApDb& aDb, 00906 TInt aIspFilter, 00907 TInt aBearerFilter, 00908 TInt aSortType 00909 ); 00910 00911 00921 IMPORT_C void ConstructL( 00922 TInt aIspFilter, 00923 TInt aBearerFilter, 00924 TInt aSortType, 00925 TVpnFilterType aVpnFilterType 00926 ); 00927 00928 00939 IMPORT_C void ConstructL( 00940 CActiveApDb& aDb, 00941 TInt aIspFilter, 00942 TInt aBearerFilter, 00943 TInt aSortType, 00944 TVpnFilterType aVpnFilterType 00945 ); 00946 00947 00948 00949 00962 IMPORT_C void ConstructL( 00963 CActiveApDb& aDb, 00964 TInt aIspFilter, 00965 TInt aBearerFilter, 00966 TInt aSortType, 00967 TVpnFilterType aVpnFilterType, 00968 TBool aIncludeEasyWlan 00969 ); 00970 00971 00972 public: // New functions 00981 IMPORT_C void SetFilterL( 00982 TInt aIspFilter, 00983 TInt aBearerFilter, 00984 TInt aSortType 00985 ); 00986 00987 01000 IMPORT_C void SetTextOverrideL( TTextID aText2Change, 01001 const TDesC& aNewText ); 01002 01003 01016 IMPORT_C const TDesC& TextOverrideL( TTextID aTextId ); 01017 01018 01053 IMPORT_C TInt RunSettingsL( TUint32 aHighLight, TUint32& aSelected ); 01054 01055 01061 IMPORT_C static TInt Cvt(); 01062 01063 01064 protected: // New functions 01093 TInt DoRunSettingsL( TUint32 aHighLight, TUint32& aSelected ); 01094 01095 01112 IMPORT_C TInt RunViewerL( TUint32 aUid ); 01113 01114 01127 TInt DoRunViewerL( TUint32 aUid ); 01128 01129 01130 // handles the Delete access Point command. 01131 // @Deprecated Since 3rd Ed FP1 01132 void HandleApDeleteCmdL( TUint32 aUid, TBool aIsLast ); 01133 01134 01135 // handles the Create blank new access Point command. 01136 // @Deprecated Since 3rd Ed FP1 01137 TUint32 HandleApBlankNewL( TInt aBearers, TInt aIsps ); 01138 01139 01140 // handles the Create new access Point by using existing one command. 01141 // @Deprecated Since 3rd Ed FP1 01142 TUint32 HandleApUseOldNewL(); 01143 01144 01145 // handles the Editing of the newly created access Point. 01146 // @Deprecated Since 3rd Ed FP1 01147 TUint32 EditAfterCreateL( TUint32 aUid, 01148 CApAccessPointItem* aItem = NULL ); 01149 01150 01162 void DoConstructL( CActiveApDb* aDb, TInt aIspFilter, 01163 TInt aBearerFilter, TInt aSortType, 01164 TVpnFilterType aVpnFilterType, 01165 TBool aIncludeEasyWlan ); 01166 01167 01196 void DoRunListSettingsL( TUint32 aHighLight, TUint32& aSelected ); 01197 01198 01227 void DoRunSetPageSettingsL( TUint32 aHighLight, TUint32& aSelected ); 01228 01229 01238 TUint32 DoHandleApUseOldNewL( TUint32 aSelected ); 01239 01245 TUint32 SelectApToCopyL(); 01246 01247 01252 TUint32 DoHandleApBlankNewL( TInt aBearers, TInt aIsps ); 01253 01254 01260 void HandleNetworkDeleteCmdL( TUint32 aUid ); 01261 01262 01268 TInt GetVariantL(); 01269 01270 01280 TInt ConfirmDeleteL( TUint32 aUid, TBool aIsLast ); 01281 01282 01287 void HandleRunSettingsL( TUint32 aHighLight, TUint32& aSelected ); 01288 01289 01290 protected: // Functions from base classes 01291 01292 friend class CApSettingsDlg; 01293 friend class CApSelectorDialog; 01294 friend class CApSelPopupList; 01295 friend class CApNetSelPopupList; 01296 01297 private: 01305 void ChooseBearerTypeL( TInt aBearers, CApAccessPointItem& aItem ); 01306 01313 TUint32 HandleDuplicateL( TUint32 aUid ); 01314 01315 01316 private: //data 01317 TBool iStartWithSelection; 01318 TSelectionListType iListType; 01319 TSelectionMenuType iSelMenuType; 01320 01321 TInt iIspFilter; 01322 TInt iBearerFilter; 01323 TApSetHandlerExtra* iExt; // Extra data holder structure 01324 01325 TInt iReqIpvType; // Default is IPv4 01326 01327 // replacing iModel with iImpl, no size change 01328 // CApSettingsModel* iModel; 01329 CApSettingsHandlerImpl* iImpl; // owned 01330 01331 CTextOverrides* iTextOverrides; 01332 TUint32 iEventStore; // to hold the events 01333 TUid iHelpMajor; 01334 01335 #ifdef __TEST_OOMDEBUG 01336 TBool iMemTestOn; 01337 // __TEST_OOMDEBUG 01338 #endif 01339 01340 }; 01341 01342 #endif 01343 01344 // End of File