S60 3rd Edition API Reference: apselect.h Source File

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 //  INCLUDES
00026 #include <commdb.h>
00027 #include <ApEngineVer.h>
00028 #include <ApEngineConsts.h>
00029 
00030 
00031 // FORWARD DECLARATIONS
00032 class CApListItem;
00033 class CApListItemList;
00034 class CApUtils;
00035 
00036 
00037 
00038 enum TVpnFilterType
00039     {
00040     EVpnFilterVpnOnly,          
00041     EVpnFilterNoVpn,            
00042     EVpnFilterBoth              
00043     };
00044 
00045 
00046 // CLASS DECLARATION
00047 // Extra data holder
00048 typedef struct
00049     {
00050         TInt                iMaxIndex;
00051         TInt                iReqIpvType;
00052         TInt                iIsIpv6Supported;
00053         TInt                iExtra;
00054         TBool               iIsFeatureManagerInitialised;
00055         TBool               iCdma;
00056         TInt                iVpnFilterType; // TVpnFilterType values !!
00057         TBool               iWlanSupported;
00058         TBool               iIncludeEasyWlan;
00059     }TSelectExtra;
00060 
00061 
00062 
00063 typedef struct
00064     {
00065     TUint32     iVpnIapId;
00066     TUint32     iHomeIapId;
00067     HBufC *     iName;
00068     }TVpnData;
00069 
00070 
00077 class CApSelect :public CBase
00078     {
00079     public:  // Constructors and destructor
00080 
00100         IMPORT_C static CApSelect* NewLC(
00101                                         CCommsDatabase& aDb,
00102                                         TInt aIspFilter,
00103                                         TInt aBearerFilter,
00104                                         TInt aSortType
00105                                         );
00106 
00107 
00131         IMPORT_C static CApSelect* NewLC(
00132                                         CCommsDatabase& aDb,
00133                                         TInt aIspFilter,
00134                                         TInt aBearerFilter,
00135                                         TInt aSortType,
00136                                         TInt aReqIpvType
00137                                         );
00138 
00139 
00140 
00166         IMPORT_C static CApSelect* NewLC(
00167                                         CCommsDatabase& aDb,
00168                                         TInt aIspFilter,
00169                                         TInt aBearerFilter,
00170                                         TInt aSortType,
00171                                         TInt aReqIpvType,
00172                                         TVpnFilterType aVpnFilterType );
00173 
00174 
00202         IMPORT_C static CApSelect* NewLC(
00203                                         CCommsDatabase& aDb,
00204                                         TInt aIspFilter,
00205                                         TInt aBearerFilter,
00206                                         TInt aSortType,
00207                                         TInt aReqIpvType,
00208                                         TVpnFilterType aVpnFilterType,
00209                                         TBool aIncludeEasyWlan );
00210 
00211 
00216         IMPORT_C virtual ~CApSelect();
00217 
00218 
00219     protected:      // Constructors
00220 
00225         IMPORT_C CApSelect();
00226 
00227 
00245         IMPORT_C void ConstructL(
00246                                 CCommsDatabase& aDb,
00247                                 TInt aIspFilter,
00248                                 TInt aBearerFilter,
00249                                 TInt aSortType
00250                                 );
00251 
00252 
00274         IMPORT_C void ConstructL(
00275                                 CCommsDatabase& aDb,
00276                                 TInt aIspFilter,
00277                                 TInt aBearerFilter,
00278                                 TInt aSortType,
00279                                 TInt aReqIpvType
00280                                 );
00281 
00282 
00306         IMPORT_C void ConstructL( CCommsDatabase& aDb,
00307                                  TInt aIspFilter,
00308                                  TInt aBearerFilter,
00309                                  TInt aSortType,
00310                                  TInt aReqIpvType,
00311                                  TVpnFilterType aVpnFilterType 
00312                                  );
00313                                  
00339         IMPORT_C void ConstructL( CCommsDatabase& aDb,
00340                                  TInt aIspFilter,
00341                                  TInt aBearerFilter,
00342                                  TInt aSortType,
00343                                  TInt aReqIpvType,
00344                                  TVpnFilterType aVpnFilterType,
00345                                  TBool aIncludeEasyWlan );
00346                                  
00347     public: // New functions
00365         IMPORT_C void SetFiltersL(
00366                                  TInt aIspFilter,
00367                                  TInt aBearerFilter,
00368                                  TInt aSortType
00369                                  );
00370 
00371 
00372 
00378         IMPORT_C TInt IspTypeFilter();
00379 
00380 
00386         IMPORT_C TInt BearerFilter();
00387 
00388 
00394         IMPORT_C TInt SortOrder();
00395 
00396 
00402         IMPORT_C TBool  MoveToFirst();
00403 
00404 
00410         IMPORT_C TBool  MoveNext();
00411 
00412 
00418         IMPORT_C TBool  MoveLast();
00419 
00420 
00426         IMPORT_C TBool  MovePrev();
00427 
00428 
00434         IMPORT_C TUint32 Count();
00435 
00436 
00443         IMPORT_C const TDesC& Name();
00444 
00445 
00451         IMPORT_C TUint32 Uid();
00452 
00453 
00459         IMPORT_C TCommsDbIspType Type();
00460 
00461 
00467         IMPORT_C TApBearerType BearerType();
00468 
00469 
00481         IMPORT_C TInt AllListItemDataL( CApListItemList& aList );
00482 
00488         IMPORT_C TBool IsReadOnly() const;
00489 
00490     private:
00496         TInt DoUpdateL();
00497 
00498 
00503         CCommsDbTableView* GetFilteredSortedWapTableViewLC();
00504 
00505 
00510         CCommsDbTableView* GetFilteredSortedIpBearerTableViewLC();
00511 
00512 
00517         CCommsDbTableView* GetFilteredSortedIspOutTableViewLC();
00518 
00519 
00524         CCommsDbTableView* GetFilteredSortedGprsTableViewLC( TBool aIn );
00525 
00526 
00531         CCommsDbTableView* GetFilteredSortedCdmaTableViewLC();
00532 
00533 
00538         void GetUintValuesL
00539                 (
00540                 CCommsDbTableView* aTable,
00541                 const TDesC& aField,
00542                 CArrayFixFlat<TUint32>& aArray
00543                 );
00544 
00545 
00550         void GetProtValuesL( CCommsDbTableView* aTable,
00551                              CArrayFixFlat<TUint32>& aArray );
00552 
00557         void GetTextValuesL
00558                 (
00559                 CCommsDbTableView* aTable,
00560                 const TDesC& aField,
00561                 CArrayPtrFlat<HBufC>& aArray
00562                 );
00563 
00564 
00569         void GetLongTextValuesL
00570                 (
00571                 CCommsDbTableView* aTable,
00572                 const TDesC& aField,
00573                 CArrayPtrFlat<HBufC>& aArray
00574                 );
00575 
00576 
00580         TBool IsInArray( CArrayFixFlat<TUint32>* aArray, TUint32 aValue );
00581 
00582 
00586         TInt PosInArray( CArrayFixFlat<TUint32>* aArray, TUint32 aValue );
00587 
00588 
00592         TInt GetItemPos( CApListItemList* aTmpApList, TUint32 aId );
00593 
00594 
00600         CCommsDbTableView* OpenViewMatchingTextL
00601                                 (
00602                                 const TDesC& aTableName,
00603                                 const TDesC& aColumnToMatch,
00604                                 const TDesC16& aValueToMatch
00605                                 );
00606 
00615         void GetIspValuesL
00616                 (
00617                 CCommsDbTableView* aTable,
00618                 CArrayFixFlat<TUint32[3]>* aArray,
00619                 const TDesC& aColName
00620                 );
00621 
00625         TInt GetIapPos
00626                 (
00627                 CArrayFixFlat<TUint32[3]>* aArray,
00628                 TUint32 aValue
00629                 );
00630 
00635         void SortLocalisedNameL( TBool aAscending = ETrue );
00636 
00637 
00641         void SortUidL( TBool aAscending = ETrue );
00642 
00643 
00644 
00645     private:    // New functions
00664         void SetFiltersL( TInt aIspFilter,
00665                           TInt aBearerFilter,
00666                           TInt aSortType,
00667                           TInt aReqIpvType,
00668                           TInt aVpnFilterType
00669                          );
00670 
00671 
00675         CCommsDbTableView* GetVpnTableViewLC();
00676 
00677 
00684         void GetVpnValuesL( CCommsDbTableView* aTable, 
00685                             CArrayFixFlat<TVpnData>* aVpnArray );
00686 
00687 
00693         TInt GetSupportedBearerSet( TInt aBearerFilter );
00694 
00695 
00700         void AddLanL( TBool aWlan );
00701 
00702 
00703 
00704 
00705     private:    // Data
00706         CCommsDatabase*             iDb;    // Does not own it!
00707         TInt                        iIsp;
00708         TInt                        iBearer;
00709         TInt                        iSort;
00710         CApListItemList*            iApList;
00711         TInt                        iCursor;
00712         TInt                        iCount;
00713         TSelectExtra*               iExt;
00714 
00715     };
00716 
00717 // CAPSELECT_H
00718 #endif
00719 
00720 // End of File

Copyright © Nokia Corporation 2001-2007
Back to top