apselect.h

Go to the documentation of this file.
00001 /*
00002 * ============================================================================
00003 *  Name     : ApSelect.h
00004 *  Part of  : Access Point Engine
00005 *
00006 *  Description: Declaration of the CApSelect class.
00007 *  Version:
00008 *
00009 *  Copyright (C) 2002 Nokia Corporation.
00010 *  This material, including documentation and any related 
00011 *  computer programs, is protected by copyright controlled by 
00012 *  Nokia Corporation. All rights are reserved. Copying, 
00013 *  including reproducing, storing,  adapting or translating, any 
00014 *  or all of this material requires the prior written consent of 
00015 *  Nokia Corporation. This material also contains confidential 
00016 *  information which may not be disclosed to others without the 
00017 *  prior written consent of Nokia Corporation.
00018 *
00019 * ============================================================================
00020 */
00021 
00022 #ifndef CAPSELECT_H
00023 #define CAPSELECT_H
00024 
00025 // Deprecation warning
00026 #warning This header file has been deprecated. Will be removed in one of the next SDK releases.
00027  
00028  
00029 //  INCLUDES
00030 #include <commdb.h>
00031 #include <ApEngineVer.h>
00032 #include <ApEngineConsts.h>
00033 
00034 
00035 // FORWARD DECLARATIONS
00036 class CApListItem;
00037 class CApListItemList;
00038 class CApUtils;
00039 
00040 
00041 
00042 enum TVpnFilterType
00043     {
00044     EVpnFilterVpnOnly,          
00045     EVpnFilterNoVpn,            
00046     EVpnFilterBoth              
00047     };
00048 
00049 
00050 // CLASS DECLARATION
00051 // Extra data holder
00052 typedef struct
00053     {
00054         TInt                iMaxIndex;
00055         TInt                iReqIpvType;
00056         TInt                iIsIpv6Supported;
00057         TInt                iExtra;
00058         TBool               iIsFeatureManagerInitialised;
00059         TBool               iCdma;
00060         TInt                iVpnFilterType; // TVpnFilterType values !!
00061         TBool               iWlanSupported;
00062         TBool               iIncludeEasyWlan;
00063     }TSelectExtra;
00064 
00065 
00066 
00067 typedef struct
00068     {
00069     TUint32     iVpnIapId;
00070     TUint32     iHomeIapId;
00071     HBufC *     iName;
00072     }TVpnData;
00073 
00074 
00081 class CApSelect :public CBase
00082     {
00083     public:  // Constructors and destructor
00084 
00105         IMPORT_C static CApSelect* NewLC(
00106                                         CCommsDatabase& aDb,
00107                                         TInt aIspFilter,
00108                                         TInt aBearerFilter,
00109                                         TInt aSortType
00110                                         );
00111 
00112 
00137         IMPORT_C static CApSelect* NewLC(
00138                                         CCommsDatabase& aDb,
00139                                         TInt aIspFilter,
00140                                         TInt aBearerFilter,
00141                                         TInt aSortType,
00142                                         TInt aReqIpvType
00143                                         );
00144 
00145 
00146 
00173         IMPORT_C static CApSelect* NewLC(
00174                                         CCommsDatabase& aDb,
00175                                         TInt aIspFilter,
00176                                         TInt aBearerFilter,
00177                                         TInt aSortType,
00178                                         TInt aReqIpvType,
00179                                         TVpnFilterType aVpnFilterType );
00180 
00181 
00210         IMPORT_C static CApSelect* NewLC(
00211                                         CCommsDatabase& aDb,
00212                                         TInt aIspFilter,
00213                                         TInt aBearerFilter,
00214                                         TInt aSortType,
00215                                         TInt aReqIpvType,
00216                                         TVpnFilterType aVpnFilterType,
00217                                         TBool aIncludeEasyWlan );
00218 
00219 
00225         IMPORT_C virtual ~CApSelect();
00226 
00227 
00228     protected:      // Constructors
00229 
00235         IMPORT_C CApSelect();
00236 
00237 
00256         IMPORT_C void ConstructL(
00257                                 CCommsDatabase& aDb,
00258                                 TInt aIspFilter,
00259                                 TInt aBearerFilter,
00260                                 TInt aSortType
00261                                 );
00262 
00263 
00286         IMPORT_C void ConstructL(
00287                                 CCommsDatabase& aDb,
00288                                 TInt aIspFilter,
00289                                 TInt aBearerFilter,
00290                                 TInt aSortType,
00291                                 TInt aReqIpvType
00292                                 );
00293 
00294 
00319         IMPORT_C void ConstructL( CCommsDatabase& aDb,
00320                                  TInt aIspFilter,
00321                                  TInt aBearerFilter,
00322                                  TInt aSortType,
00323                                  TInt aReqIpvType,
00324                                  TVpnFilterType aVpnFilterType 
00325                                  );
00326                                  
00353         IMPORT_C void ConstructL( CCommsDatabase& aDb,
00354                                  TInt aIspFilter,
00355                                  TInt aBearerFilter,
00356                                  TInt aSortType,
00357                                  TInt aReqIpvType,
00358                                  TVpnFilterType aVpnFilterType,
00359                                  TBool aIncludeEasyWlan );
00360                                  
00361     public: // New functions
00380         IMPORT_C void SetFiltersL(
00381                                  TInt aIspFilter,
00382                                  TInt aBearerFilter,
00383                                  TInt aSortType
00384                                  );
00385 
00386 
00387 
00394         IMPORT_C TInt IspTypeFilter();
00395 
00396 
00403         IMPORT_C TInt BearerFilter();
00404 
00405 
00412         IMPORT_C TInt SortOrder();
00413 
00414 
00421         IMPORT_C TBool  MoveToFirst();
00422 
00423 
00430         IMPORT_C TBool  MoveNext();
00431 
00432 
00439         IMPORT_C TBool  MoveLast();
00440 
00441 
00448         IMPORT_C TBool  MovePrev();
00449 
00450 
00457         IMPORT_C TUint32 Count();
00458 
00459 
00467         IMPORT_C const TDesC& Name();
00468 
00469 
00476         IMPORT_C TUint32 Uid();
00477 
00478 
00485         IMPORT_C TCommsDbIspType Type();
00486 
00487 
00494         IMPORT_C TApBearerType BearerType();
00495 
00496 
00509         IMPORT_C TInt AllListItemDataL( CApListItemList& aList );
00510 
00517         IMPORT_C TBool IsReadOnly() const;
00518 
00519     private:
00525         TInt DoUpdateL();
00526 
00527 
00532         CCommsDbTableView* GetFilteredSortedWapTableViewLC();
00533 
00534 
00539         CCommsDbTableView* GetFilteredSortedIpBearerTableViewLC();
00540 
00541 
00546         CCommsDbTableView* GetFilteredSortedIspOutTableViewLC();
00547 
00548 
00553         CCommsDbTableView* GetFilteredSortedGprsTableViewLC( TBool aIn );
00554 
00555 
00560         CCommsDbTableView* GetFilteredSortedCdmaTableViewLC();
00561 
00562 
00567         void GetUintValuesL
00568                 (
00569                 CCommsDbTableView* aTable,
00570                 const TDesC& aField,
00571                 CArrayFixFlat<TUint32>& aArray
00572                 );
00573 
00574 
00579         void GetProtValuesL( CCommsDbTableView* aTable,
00580                              CArrayFixFlat<TUint32>& aArray );
00581 
00586         void GetTextValuesL
00587                 (
00588                 CCommsDbTableView* aTable,
00589                 const TDesC& aField,
00590                 CArrayPtrFlat<HBufC>& aArray
00591                 );
00592 
00593 
00598         void GetLongTextValuesL
00599                 (
00600                 CCommsDbTableView* aTable,
00601                 const TDesC& aField,
00602                 CArrayPtrFlat<HBufC>& aArray
00603                 );
00604 
00605 
00609         TBool IsInArray( CArrayFixFlat<TUint32>* aArray, TUint32 aValue );
00610 
00611 
00615         TInt PosInArray( CArrayFixFlat<TUint32>* aArray, TUint32 aValue );
00616 
00617 
00621         TInt GetItemPos( CApListItemList* aTmpApList, TUint32 aId );
00622 
00623 
00629         CCommsDbTableView* OpenViewMatchingTextL
00630                                 (
00631                                 const TDesC& aTableName,
00632                                 const TDesC& aColumnToMatch,
00633                                 const TDesC16& aValueToMatch
00634                                 );
00635 
00644         void GetIspValuesL
00645                 (
00646                 CCommsDbTableView* aTable,
00647                 CArrayFixFlat<TUint32[3]>* aArray,
00648                 const TDesC& aColName
00649                 );
00650 
00654         TInt GetIapPos
00655                 (
00656                 CArrayFixFlat<TUint32[3]>* aArray,
00657                 TUint32 aValue
00658                 );
00659 
00664         void SortLocalisedNameL( TBool aAscending = ETrue );
00665 
00666 
00670         void SortUidL( TBool aAscending = ETrue );
00671 
00672 
00673 
00674     private:    // New functions
00693         void SetFiltersL( TInt aIspFilter,
00694                           TInt aBearerFilter,
00695                           TInt aSortType,
00696                           TInt aReqIpvType,
00697                           TInt aVpnFilterType
00698                          );
00699 
00700 
00704         CCommsDbTableView* GetVpnTableViewLC();
00705 
00706 
00713         void GetVpnValuesL( CCommsDbTableView* aTable, 
00714                             CArrayFixFlat<TVpnData>* aVpnArray );
00715 
00716 
00722         TInt GetSupportedBearerSet( TInt aBearerFilter );
00723 
00724 
00729         void AddLanL( TBool aWlan );
00730 
00731 
00732 
00733 
00734     private:    // Data
00735         CCommsDatabase*             iDb;    // Does not own it!
00736         TInt                        iIsp;
00737         TInt                        iBearer;
00738         TInt                        iSort;
00739         CApListItemList*            iApList;
00740         TInt                        iCursor;
00741         TInt                        iCount;
00742         TSelectExtra*               iExt;
00743 
00744     };
00745 
00746 // CAPSELECT_H
00747 #endif
00748 
00749 // End of File

Copyright © Nokia Corporation 2001-2008
Back to top