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