ipcm_pub/access_point_engine_api/inc/APSelect.h
changeset 70 ac5daea24fb0
equal deleted inserted replaced
61:8b0c979bbe8c 70:ac5daea24fb0
       
     1 /*
       
     2 * Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies). 
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:  Declaration of the CApSelect class.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef CAPSELECT_H
       
    20 #define CAPSELECT_H
       
    21 
       
    22 // Deprecation warning
       
    23 #warning This header file has been deprecated and will be fully removed between weeks 12 and 18 of 2010. See Polonium CR #153 for details.
       
    24  
       
    25  
       
    26 //  INCLUDES
       
    27 #include <commdb.h>
       
    28 #include <ApEngineVer.h>
       
    29 #include <ApEngineConsts.h>
       
    30 
       
    31 
       
    32 // FORWARD DECLARATIONS
       
    33 class CApListItem;
       
    34 class CApListItemList;
       
    35 class CApUtils;
       
    36 
       
    37 
       
    38 
       
    39 enum TVpnFilterType
       
    40     {
       
    41     EVpnFilterVpnOnly,          ///< Shows only VPN access points
       
    42     EVpnFilterNoVpn,            ///< Shows only non-VPN access points
       
    43     EVpnFilterBoth              ///< Shows both normal and VPN access points
       
    44     };
       
    45 
       
    46 
       
    47 // CLASS DECLARATION
       
    48 // Extra data holder
       
    49 typedef struct
       
    50     {
       
    51         TInt                iMaxIndex;
       
    52         TInt                iReqIpvType;
       
    53         TInt                iIsIpv6Supported;
       
    54         TInt                iExtra;
       
    55         TBool               iIsFeatureManagerInitialised;
       
    56         TBool               iCdma;
       
    57         TInt                iVpnFilterType; // TVpnFilterType values !!
       
    58         TBool               iWlanSupported;
       
    59         TBool               iIncludeEasyWlan;
       
    60     }TSelectExtra;
       
    61 
       
    62 
       
    63 
       
    64 typedef struct
       
    65     {
       
    66     TUint32     iVpnIapId;
       
    67     TUint32     iHomeIapId;
       
    68     TUint32     iHomeSnapId;
       
    69     HBufC *     iName;
       
    70     }TVpnData;
       
    71 
       
    72 
       
    73 /**
       
    74 *  This class is used to help client's access point selection.
       
    75 *  Selection can be tailored with specific filters, rules and sort order.
       
    76 *  Provides methods for setting and getting filters and sort order.
       
    77 *
       
    78 */
       
    79 class CApSelect :public CBase
       
    80     {
       
    81     public:  // Constructors and destructor
       
    82 
       
    83         /**
       
    84         * Two-phased constructor. Leaves on failure, places instance
       
    85         * on cleanup stack.
       
    86         * @param aDb a pointer to a CCommsDataBase.
       
    87         * @param aIspTypeFilter Filtering criteria on ISP type
       
    88         * Possible values are:
       
    89         * KEApIspTypeInternetOnly, KEApIspTypeWAPOnly,
       
    90         * KEApIspTypeInternetAndWAP, KEApIspTypeWAPMandatory
       
    91         * KEApIspTypeAll and their combinations.
       
    92         * @param aBearerFilter Filtering criteria on bearer type
       
    93         * Possible values are the TApBearer enums and
       
    94         * their combinations (or-ed).
       
    95         * @param aSortType Specifies the sort order to use.
       
    96         * Possible values are:
       
    97         * KEApSortUidAscending, KEApSortUidDescending,
       
    98         * KEApSortNameAscending, KEApSortNameDescending
       
    99         * @return The constructed CApSelect.
       
   100         *
       
   101         * @deprecated
       
   102         */
       
   103         IMPORT_C static CApSelect* NewLC(
       
   104                                         CCommsDatabase& aDb,
       
   105                                         TInt aIspFilter,
       
   106                                         TInt aBearerFilter,
       
   107                                         TInt aSortType
       
   108                                         );
       
   109 
       
   110 
       
   111         /**
       
   112         * Two-phased constructor. Leaves on failure, places instance
       
   113         * on cleanup stack.
       
   114         * @param aDb a pointer to a CCommsDataBase.
       
   115         * @param aIspTypeFilter Filtering criteria on ISP type
       
   116         * Possible values are:
       
   117         * KEApIspTypeInternetOnly, KEApIspTypeWAPOnly,
       
   118         * KEApIspTypeInternetAndWAP, KEApIspTypeWAPMandatory
       
   119         * KEApIspTypeAll and their combinations.
       
   120         * @param aBearerFilter Filtering criteria on bearer type
       
   121         * Possible values are the TApBearer enums and
       
   122         * their combinations (or-ed).
       
   123         * @param aSortType Specifies the sort order to use.
       
   124         * Possible values are:
       
   125         * KEApSortUidAscending, KEApSortUidDescending,
       
   126         * KEApSortNameAscending, KEApSortNameDescending
       
   127         * @param aReqIpvType Filtering criteria on the IPv type of the 
       
   128         * access point. In case of GPRS, GPRS_PDP_TYPE holds it, while
       
   129         * in case of CSD, all CSD access points are 
       
   130         * considered to be IPv4 & IPv6 (both)
       
   131         * @return The constructed CApSelect.
       
   132         *
       
   133         * @deprecated
       
   134         */
       
   135         IMPORT_C static CApSelect* NewLC(
       
   136                                         CCommsDatabase& aDb,
       
   137                                         TInt aIspFilter,
       
   138                                         TInt aBearerFilter,
       
   139                                         TInt aSortType,
       
   140                                         TInt aReqIpvType
       
   141                                         );
       
   142 
       
   143 
       
   144 
       
   145         /**
       
   146         * Two-phased constructor. Leaves on failure, places instance
       
   147         * on cleanup stack.
       
   148         * @param aDb a pointer to a CCommsDataBase.
       
   149         * @param aIspTypeFilter Filtering criteria on ISP type
       
   150         * Possible values are:
       
   151         * KEApIspTypeInternetOnly, KEApIspTypeWAPOnly,
       
   152         * KEApIspTypeInternetAndWAP, KEApIspTypeWAPMandatory
       
   153         * KEApIspTypeAll and their combinations.
       
   154         * @param aBearerFilter Filtering criteria on bearer type
       
   155         * Possible values are the TApBearer enums and
       
   156         * their combinations (or-ed).
       
   157         * @param aSortType Specifies the sort order to use.
       
   158         * Possible values are:
       
   159         * KEApSortUidAscending, KEApSortUidDescending,
       
   160         * KEApSortNameAscending, KEApSortNameDescending
       
   161         * @param aReqIpvType Filtering criteria on the IPv type of the 
       
   162         * access point. In case of GPRS, GPRS_PDP_TYPE holds it, while
       
   163         * in case of CSD, all CSD access points are 
       
   164         * considered to be IPv4 & IPv6 (both)
       
   165         * @param aVpnFilterType a TVpnFilterType enum specifying the 
       
   166         * vpn filtering.
       
   167         * @return The constructed CApSelect.
       
   168         *
       
   169         * @deprecated
       
   170         */
       
   171         IMPORT_C static CApSelect* NewLC(
       
   172                                         CCommsDatabase& aDb,
       
   173                                         TInt aIspFilter,
       
   174                                         TInt aBearerFilter,
       
   175                                         TInt aSortType,
       
   176                                         TInt aReqIpvType,
       
   177                                         TVpnFilterType aVpnFilterType );
       
   178 
       
   179 
       
   180         /**
       
   181         * Two-phased constructor. Leaves on failure, places instance
       
   182         * on cleanup stack.
       
   183         * @param aDb a pointer to a CCommsDataBase.
       
   184         * @param aIspTypeFilter Filtering criteria on ISP type
       
   185         * Possible values are:
       
   186         * KEApIspTypeInternetOnly, KEApIspTypeWAPOnly,
       
   187         * KEApIspTypeInternetAndWAP, KEApIspTypeWAPMandatory
       
   188         * KEApIspTypeAll and their combinations.
       
   189         * @param aBearerFilter Filtering criteria on bearer type
       
   190         * Possible values are the TApBearer enums and
       
   191         * their combinations (or-ed).
       
   192         * @param aSortType Specifies the sort order to use.
       
   193         * Possible values are:
       
   194         * KEApSortUidAscending, KEApSortUidDescending,
       
   195         * KEApSortNameAscending, KEApSortNameDescending
       
   196         * @param aReqIpvType Filtering criteria on the IPv type of the 
       
   197         * access point. In case of GPRS, GPRS_PDP_TYPE holds it, while
       
   198         * in case of CSD, all CSD access points are 
       
   199         * considered to be IPv4 & IPv6 (both)
       
   200         * @param aVpnFilterType a TVpnFilterType enum specifying the 
       
   201         * vpn filtering.
       
   202         * @param aIncludeEasyWlan TBool specifying whther to include
       
   203         * EasyWlan access point in the list or not...
       
   204         * @return The constructed CApSelect.
       
   205         *
       
   206         * @deprecated
       
   207         */
       
   208         IMPORT_C static CApSelect* NewLC(
       
   209                                         CCommsDatabase& aDb,
       
   210                                         TInt aIspFilter,
       
   211                                         TInt aBearerFilter,
       
   212                                         TInt aSortType,
       
   213                                         TInt aReqIpvType,
       
   214                                         TVpnFilterType aVpnFilterType,
       
   215                                         TBool aIncludeEasyWlan );
       
   216 
       
   217 
       
   218         /**
       
   219         * Destructor.
       
   220         *
       
   221         * @deprecated
       
   222         */
       
   223         IMPORT_C virtual ~CApSelect();
       
   224 
       
   225 
       
   226     protected:      // Constructors
       
   227 
       
   228         /**
       
   229         * C++ default constructor.
       
   230         *
       
   231         * @deprecated
       
   232         */
       
   233         IMPORT_C CApSelect();
       
   234 
       
   235 
       
   236         /**
       
   237         * Second-phase constructor.
       
   238         * @param aDb a pointer to a CCommsDataBase.
       
   239         * @param aIspTypeFilter Filtering criteria on ISP type
       
   240         * Possible values are:
       
   241         * KEApIspTypeInternetOnly, KEApIspTypeWAPOnly,
       
   242         * KEApIspTypeInternetAndWAP, KEApIspTypeWAPMandatory
       
   243         * KEApIspTypeAll and their combinations.
       
   244         * @param aBearerFilter Filtering criteria on bearer type
       
   245         * Possible values are the TApBearer enums and
       
   246         * their combinations (or-ed).
       
   247         * @param aSortType Specifies the sort order to use.
       
   248         * Possible values are:
       
   249         * KEApSortUidAscending, KEApSortUidDescending,
       
   250         * KEApSortNameAscending, KEApSortNameDescending
       
   251         *
       
   252         * @deprecated
       
   253         */
       
   254         IMPORT_C void ConstructL(
       
   255                                 CCommsDatabase& aDb,
       
   256                                 TInt aIspFilter,
       
   257                                 TInt aBearerFilter,
       
   258                                 TInt aSortType
       
   259                                 );
       
   260 
       
   261 
       
   262         /**
       
   263         * Second-phase constructor.
       
   264         * @param aDb a pointer to a CCommsDataBase.
       
   265         * @param aIspTypeFilter Filtering criteria on ISP type
       
   266         * Possible values are:
       
   267         * KEApIspTypeInternetOnly, KEApIspTypeWAPOnly,
       
   268         * KEApIspTypeInternetAndWAP, KEApIspTypeWAPMandatory
       
   269         * KEApIspTypeAll and their combinations.
       
   270         * @param aBearerFilter Filtering criteria on bearer type
       
   271         * Possible values are the TApBearer enums and
       
   272         * their combinations (or-ed).
       
   273         * @param aSortType Specifies the sort order to use.
       
   274         * Possible values are:
       
   275         * KEApSortUidAscending, KEApSortUidDescending,
       
   276         * KEApSortNameAscending, KEApSortNameDescending
       
   277         * @param aReqIpvType Filtering criteria on the IPv type of the 
       
   278         * access point. In case of GPRS, GPRS_PDP_TYPE holds it, while
       
   279         * in case of CSD, all CSD access points are 
       
   280         * considered to be IPv4 & IPv6 (both)
       
   281         *
       
   282         * @deprecated
       
   283         */
       
   284         IMPORT_C void ConstructL(
       
   285                                 CCommsDatabase& aDb,
       
   286                                 TInt aIspFilter,
       
   287                                 TInt aBearerFilter,
       
   288                                 TInt aSortType,
       
   289                                 TInt aReqIpvType
       
   290                                 );
       
   291 
       
   292 
       
   293         /**
       
   294         * Second-phase constructor.
       
   295         * @param aDb a pointer to a CCommsDataBase.
       
   296         * @param aIspTypeFilter Filtering criteria on ISP type
       
   297         * Possible values are:
       
   298         * KEApIspTypeInternetOnly, KEApIspTypeWAPOnly,
       
   299         * KEApIspTypeInternetAndWAP, KEApIspTypeWAPMandatory
       
   300         * KEApIspTypeAll and their combinations.
       
   301         * @param aBearerFilter Filtering criteria on bearer type
       
   302         * Possible values are the TApBearer enums and
       
   303         * their combinations (or-ed).
       
   304         * @param aSortType Specifies the sort order to use.
       
   305         * Possible values are:
       
   306         * KEApSortUidAscending, KEApSortUidDescending,
       
   307         * KEApSortNameAscending, KEApSortNameDescending
       
   308         * @param aReqIpvType Filtering criteria on the IPv type of the 
       
   309         * access point. In case of GPRS, GPRS_PDP_TYPE holds it, while
       
   310         * in case of CSD, all CSD access points are 
       
   311         * considered to be IPv4 & IPv6 (both)
       
   312         * @param aVpnFilterType a TVpnFilterType enum specifying the 
       
   313         * vpn filtering.
       
   314         *
       
   315         * @deprecated
       
   316         */
       
   317         IMPORT_C void ConstructL( CCommsDatabase& aDb,
       
   318                                  TInt aIspFilter,
       
   319                                  TInt aBearerFilter,
       
   320                                  TInt aSortType,
       
   321                                  TInt aReqIpvType,
       
   322                                  TVpnFilterType aVpnFilterType 
       
   323                                  );
       
   324                                  
       
   325         /**
       
   326         * Second-phase constructor.
       
   327         * @param aDb a pointer to a CCommsDataBase.
       
   328         * @param aIspTypeFilter Filtering criteria on ISP type
       
   329         * Possible values are:
       
   330         * KEApIspTypeInternetOnly, KEApIspTypeWAPOnly,
       
   331         * KEApIspTypeInternetAndWAP, KEApIspTypeWAPMandatory
       
   332         * KEApIspTypeAll and their combinations.
       
   333         * @param aBearerFilter Filtering criteria on bearer type
       
   334         * Possible values are the TApBearer enums and
       
   335         * their combinations (or-ed).
       
   336         * @param aSortType Specifies the sort order to use.
       
   337         * Possible values are:
       
   338         * KEApSortUidAscending, KEApSortUidDescending,
       
   339         * KEApSortNameAscending, KEApSortNameDescending
       
   340         * @param aReqIpvType Filtering criteria on the IPv type of the 
       
   341         * access point. In case of GPRS, GPRS_PDP_TYPE holds it, while
       
   342         * in case of CSD, all CSD access points are 
       
   343         * considered to be IPv4 & IPv6 (both)
       
   344         * @param aVpnFilterType a TVpnFilterType enum specifying the 
       
   345         * vpn filtering.
       
   346         * @param aIncludeEasyWlan TBool specifying whther to include
       
   347         * EasyWlan access point in the list or not...
       
   348         *
       
   349         * @deprecated
       
   350         */                                 
       
   351         IMPORT_C void ConstructL( CCommsDatabase& aDb,
       
   352                                  TInt aIspFilter,
       
   353                                  TInt aBearerFilter,
       
   354                                  TInt aSortType,
       
   355                                  TInt aReqIpvType,
       
   356                                  TVpnFilterType aVpnFilterType,
       
   357                                  TBool aIncludeEasyWlan );
       
   358                                  
       
   359     public: // New functions
       
   360         /**
       
   361         * Sets filters and sorting order for the list of available
       
   362         * access points
       
   363         * @param aIspTypeFilter Filtering criteria on ISP type
       
   364         * Possible values are:
       
   365         * KEApIspTypeInternetOnly, KEApIspTypeWAPOnly,
       
   366         * KEApIspTypeInternetAndWAP,
       
   367         * KEApIspTypeWAPMandatory, KEApIspTypeAll and their combinations.
       
   368         * @param aBearerFilter Filtering criteria on bearer type
       
   369         * Possible values are the TApBearer enums and
       
   370         * their combinations (or-ed).
       
   371         * @param aSortType Specifies the sort order to use.
       
   372         * Possible values are:
       
   373         * KEApSortUidAscending, KEApSortUidDescending,
       
   374         * KEApSortNameAscending, KEApSortNameDescending
       
   375         *
       
   376         * @deprecated
       
   377         */
       
   378         IMPORT_C void SetFiltersL(
       
   379                                  TInt aIspFilter,
       
   380                                  TInt aBearerFilter,
       
   381                                  TInt aSortType
       
   382                                  );
       
   383 
       
   384 
       
   385 
       
   386         /**
       
   387         * Gets the current ISP-type filter
       
   388         * @return The current ISP-type filter
       
   389         *
       
   390         * @deprecated
       
   391         */
       
   392         IMPORT_C TInt IspTypeFilter();
       
   393 
       
   394 
       
   395         /**
       
   396         * Gets the current bearer-type filter
       
   397         * @return The current bearer-type filter
       
   398         *
       
   399         * @deprecated
       
   400         */
       
   401         IMPORT_C TInt BearerFilter();
       
   402 
       
   403 
       
   404         /**
       
   405         * Gets the current sorting order
       
   406         * @return The current sorting order
       
   407         *
       
   408         * @deprecated
       
   409         */
       
   410         IMPORT_C TInt SortOrder();
       
   411 
       
   412 
       
   413         /**
       
   414         * Navigates to the first access point in the list.
       
   415         * @return Boolean indicating the success of the operation.
       
   416         *
       
   417         * @deprecated
       
   418         */
       
   419         IMPORT_C TBool  MoveToFirst();
       
   420 
       
   421 
       
   422         /**
       
   423         * Navigates to the next access point in the list.
       
   424         * @return Boolean indicating the success of the operation.
       
   425         *
       
   426         * @deprecated
       
   427         */
       
   428         IMPORT_C TBool  MoveNext();
       
   429 
       
   430 
       
   431         /**
       
   432         * Navigates to the last access point in the list.
       
   433         * @return Boolean indicating the success of the operation.
       
   434         *
       
   435         * @deprecated
       
   436         */
       
   437         IMPORT_C TBool  MoveLast();
       
   438 
       
   439 
       
   440         /**
       
   441         * Navigates to the previous access point in the list.
       
   442         * @return Boolean indicating the success of the operation.
       
   443         *
       
   444         * @deprecated
       
   445         */
       
   446         IMPORT_C TBool  MovePrev();
       
   447 
       
   448 
       
   449         /**
       
   450         * Counts the items in the list
       
   451         * @return The number of items in the list.
       
   452         *
       
   453         * @deprecated
       
   454         */
       
   455         IMPORT_C TUint32 Count();
       
   456 
       
   457 
       
   458         /**
       
   459         * Gets the name of the 'current' access point
       
   460         * Ownership of the returned text is not passed.
       
   461         * @return The name of the current access point
       
   462         *
       
   463         * @deprecated
       
   464         */
       
   465         IMPORT_C const TDesC& Name();
       
   466 
       
   467 
       
   468         /**
       
   469         * Gets the UID of the current access point
       
   470         * @return The UID of the current access point
       
   471         *
       
   472         * @deprecated
       
   473         */
       
   474         IMPORT_C TUint32 Uid();
       
   475 
       
   476 
       
   477         /**
       
   478         * Gets the ISP-type of the current access point
       
   479         * @return The ISP-type of the current access point.
       
   480         *
       
   481         * @deprecated
       
   482         */
       
   483         IMPORT_C TCommsDbIspType Type();
       
   484 
       
   485 
       
   486         /**
       
   487         * Gets the bearer-type of the current access point
       
   488         * @return The bearer-type of the current access point.
       
   489         *
       
   490         * @deprecated
       
   491         */
       
   492         IMPORT_C TApBearerType BearerType();
       
   493 
       
   494 
       
   495         /**
       
   496         * Provides all data in a CApListItemList array.
       
   497         * @param aList A reference to a CApListItemList object
       
   498         * to hold the values.
       
   499         * @return The number of items in the list.
       
   500         * All elements in the aList array and their memory
       
   501         * will be freed inside the routine.
       
   502         * The routine expands or shrinks the array as necessary
       
   503         * to minimize memory consumption.
       
   504         *
       
   505         * @deprecated
       
   506         */
       
   507         IMPORT_C TInt AllListItemDataL( CApListItemList& aList );
       
   508 
       
   509         /**
       
   510         * Returns whether the current item is read-only or not.
       
   511         * @return Returns whether the current item is read-only or not.
       
   512         *
       
   513         * @deprecated
       
   514         */
       
   515         IMPORT_C TBool IsReadOnly() const;
       
   516 
       
   517     private:
       
   518         /**
       
   519         * This function updates the member data according to the
       
   520         * current filter settings.
       
   521         * @return Error code.
       
   522         */
       
   523         TInt DoUpdateL();
       
   524 
       
   525 
       
   526         /**
       
   527         * Gets the filtered and sorted wap table
       
   528         * and places it on the Cleanupstack
       
   529         */
       
   530         CCommsDbTableView* GetFilteredSortedWapTableViewLC();
       
   531 
       
   532 
       
   533         /**
       
   534         * Gets the filtered and sorted IP bearer table
       
   535         * and places it on the Cleanupstack
       
   536         */
       
   537         CCommsDbTableView* GetFilteredSortedIpBearerTableViewLC();
       
   538 
       
   539 
       
   540         /**
       
   541         * Gets the filtered and sorted ISP table
       
   542         * and places it on the Cleanupstack
       
   543         */
       
   544         CCommsDbTableView* GetFilteredSortedIspOutTableViewLC();
       
   545 
       
   546 
       
   547         /**
       
   548         * Gets the filtered and sorted GPRS table
       
   549         * and places it on the Cleanupstack
       
   550         */
       
   551         CCommsDbTableView* GetFilteredSortedGprsTableViewLC( TBool aIn );
       
   552 
       
   553         /**
       
   554         * Reads up the specified columns TUint32 values stored
       
   555         * in the table and returns it in the passed array
       
   556         */
       
   557         void GetUintValuesL
       
   558                 (
       
   559                 CCommsDbTableView* aTable,
       
   560                 const TDesC& aField,
       
   561                 CArrayFixFlat<TUint32>& aArray
       
   562                 );
       
   563 
       
   564 
       
   565         /**
       
   566         * Reads up the protection values stored
       
   567         * in the table and returns it in the passed array
       
   568         */
       
   569         void GetProtValuesL( CCommsDbTableView* aTable,
       
   570                              CArrayFixFlat<TUint32>& aArray );
       
   571 
       
   572         /**
       
   573         * Reads up the specified columns text values stored
       
   574         * in the table and returns it in the passed array
       
   575         */
       
   576         void GetTextValuesL
       
   577                 (
       
   578                 CCommsDbTableView* aTable,
       
   579                 const TDesC& aField,
       
   580                 CArrayPtrFlat<HBufC>& aArray
       
   581                 );
       
   582 
       
   583 
       
   584         /**
       
   585         * Reads up the specified columns long text values stored
       
   586         * in the table and returns it in the passed array
       
   587         */
       
   588         void GetLongTextValuesL
       
   589                 (
       
   590                 CCommsDbTableView* aTable,
       
   591                 const TDesC& aField,
       
   592                 CArrayPtrFlat<HBufC>& aArray
       
   593                 );
       
   594 
       
   595 
       
   596         /**
       
   597         * Returns whether a given value is in the given array or not
       
   598         */
       
   599         TBool IsInArray( CArrayFixFlat<TUint32>* aArray, TUint32 aValue );
       
   600 
       
   601 
       
   602         /**
       
   603         * Returns the position of a given value in the given array.
       
   604         */
       
   605         TInt PosInArray( CArrayFixFlat<TUint32>* aArray, TUint32 aValue );
       
   606 
       
   607 
       
   608         /**
       
   609         * Returns the position of an item with a given UID in the given list.
       
   610         */
       
   611         TInt GetItemPos( CApListItemList* aTmpApList, TUint32 aId );
       
   612 
       
   613 
       
   614         /**
       
   615         * Opens a view on the given table where a given text coloumn has
       
   616         * a given value
       
   617         * @return the opened view on the table
       
   618         */
       
   619         CCommsDbTableView* OpenViewMatchingTextL
       
   620                                 (
       
   621                                 const TDesC& aTableName,
       
   622                                 const TDesC& aColumnToMatch,
       
   623                                 const TDesC16& aValueToMatch
       
   624                                 );
       
   625 
       
   626         /**
       
   627         * Gets the ISP values (ISP UID, ISP type, ISP bearer type)
       
   628         * from a given table
       
   629         * @param aTable the table to go through (already filtered & ordered)
       
   630         * @param aArray An array to hold the readed values
       
   631         * @param aColName Column name (different column names are used for
       
   632         * CSD/GPRS/CDMA.
       
   633         */
       
   634         void GetIspValuesL
       
   635                 (
       
   636                 CCommsDbTableView* aTable,
       
   637                 CArrayFixFlat<TUint32[3]>* aArray,
       
   638                 const TDesC& aColName
       
   639                 );
       
   640 
       
   641         /**
       
   642         * Gets the position of an element with a given IAP UID
       
   643         */
       
   644         TInt GetIapPos
       
   645                 (
       
   646                 CArrayFixFlat<TUint32[3]>* aArray,
       
   647                 TUint32 aValue
       
   648                 );
       
   649 
       
   650         /**
       
   651         * Sorts the data according to localised sorting on the 
       
   652         * access point names, using CompareC
       
   653         */
       
   654         void SortLocalisedNameL( TBool aAscending = ETrue );
       
   655 
       
   656 
       
   657         /**
       
   658         * Sorts the data according to Uids
       
   659         */
       
   660         void SortUidL( TBool aAscending = ETrue );
       
   661 
       
   662 
       
   663 
       
   664     private:    // New functions
       
   665         /**
       
   666         * Sets filters and sorting order for the list of available
       
   667         * access points
       
   668         * @param aIspTypeFilter Filtering criteria on ISP type
       
   669         * Possible values are:
       
   670         * KEApIspTypeInternetOnly, KEApIspTypeWAPOnly,
       
   671         * KEApIspTypeInternetAndWAP,
       
   672         * KEApIspTypeWAPMandatory, KEApIspTypeAll and their combinations.
       
   673         * @param aBearerFilter Filtering criteria on bearer type
       
   674         * Possible values are the TApBearer enums and
       
   675         * their combinations (or-ed).
       
   676         * @param aSortType Specifies the sort order to use.
       
   677         * Possible values are:
       
   678         * KEApSortUidAscending, KEApSortUidDescending,
       
   679         * KEApSortNameAscending, KEApSortNameDescending
       
   680         * @param aReqIpvType The filtering criteria for IPv type
       
   681         * @param aVpnFilterType The Vpn filtering type, TVpnFilterType values
       
   682         */
       
   683         void SetFiltersL( TInt aIspFilter,
       
   684                           TInt aBearerFilter,
       
   685                           TInt aSortType,
       
   686                           TInt aReqIpvType,
       
   687                           TInt aVpnFilterType
       
   688                          );
       
   689 
       
   690 
       
   691         /**
       
   692         * Returns a pointer to the opened VPN_SERVICE table
       
   693         */
       
   694         CCommsDbTableView* GetVpnTableViewLC();
       
   695 
       
   696 
       
   697         /**
       
   698         * Gets the VPN values (VPN IAP UID, VPN HOME IAP UID, VPN Name )
       
   699         * from the given VPN table
       
   700         * @param aTable the table to go through (already filtered & ordered)
       
   701         * @param aVpnArray An array to hold the readed vpn data values
       
   702         */
       
   703         void GetVpnValuesL( CCommsDbTableView* aTable, 
       
   704                             CArrayFixFlat<TVpnData>* aVpnArray );
       
   705 
       
   706 
       
   707         /**
       
   708         * Returns the supported bearer set from the passed requested bearer set
       
   709         * @param aBearerFilter The requested bearer set
       
   710         * return The supported subset of the requested bearers.
       
   711         */
       
   712         TInt GetSupportedBearerSet( TInt aBearerFilter );
       
   713 
       
   714 
       
   715         /**
       
   716         * Adding WLAN or LAN access points to existing list.
       
   717         * aWlan a TBool specifying whether WLAN or LAN
       
   718         */
       
   719         void AddLanL( TBool aWlan );
       
   720 
       
   721 
       
   722 
       
   723 
       
   724     private:    // Data
       
   725         CCommsDatabase*             iDb;    // Does not own it!
       
   726         TInt                        iIsp;
       
   727         TInt                        iBearer;
       
   728         TInt                        iSort;
       
   729         CApListItemList*            iApList;
       
   730         TInt                        iCursor;
       
   731         TInt                        iCount;
       
   732         TSelectExtra*               iExt;
       
   733 
       
   734     };
       
   735 
       
   736 #endif      // CAPSELECT_H
       
   737 
       
   738 // End of File