CApSelect Class Reference

class CApSelect : public CBase

This class is used to help client's access point selection. Selection can be tailored with specific filters, rules and sort order. Provides methods for setting and getting filters and sort order.

Inherits from

Public Member Functions
~CApSelect ()
IMPORT_C TInt AllListItemDataL ( CApListItemList &)
IMPORT_C TInt BearerFilter ()
IMPORT_C TApBearerType BearerType ()
IMPORT_C TUint32 Count ()
IMPORT_C TBool IsReadOnly ()
IMPORT_C TInt IspTypeFilter ()
IMPORT_C TBool MoveLast ()
IMPORT_C TBool MoveNext ()
IMPORT_C TBool MovePrev ()
IMPORT_C TBool MoveToFirst ()
IMPORT_C const TDesC & Name ()
IMPORT_C CApSelect * NewLC ( CCommsDatabase &, TInt , TInt , TInt )
IMPORT_C CApSelect * NewLC ( CCommsDatabase &, TInt , TInt , TInt , TInt )
IMPORT_C CApSelect * NewLC ( CCommsDatabase &, TInt , TInt , TInt , TInt , TVpnFilterType )
IMPORT_C CApSelect * NewLC ( CCommsDatabase &, TInt , TInt , TInt , TInt , TVpnFilterType , TBool )
IMPORT_C void SetFiltersL ( TInt , TInt , TInt )
IMPORT_C TInt SortOrder ()
IMPORT_C TCommsDbIspType Type ()
IMPORT_C TUint32 Uid ()
Protected Member Functions
CApSelect ()
IMPORT_C void ConstructL ( CCommsDatabase &, TInt , TInt , TInt )
IMPORT_C void ConstructL ( CCommsDatabase &, TInt , TInt , TInt , TInt )
IMPORT_C void ConstructL ( CCommsDatabase &, TInt , TInt , TInt , TInt , TVpnFilterType )
IMPORT_C void ConstructL ( CCommsDatabase &, TInt , TInt , TInt , TInt , TVpnFilterType , TBool )
Private Member Functions
void AddLanL ( TBool )
TInt DoUpdateL ()
CCommsDbTableView * GetFilteredSortedGprsTableViewLC ( TBool )
CCommsDbTableView * GetFilteredSortedIpBearerTableViewLC ()
CCommsDbTableView * GetFilteredSortedIspOutTableViewLC ()
CCommsDbTableView * GetFilteredSortedWapTableViewLC ()
TInt GetIapPos ( CArrayFixFlat < TUint32 [3]> *, TUint32 )
void GetIspValuesL ( CCommsDbTableView *, CArrayFixFlat < TUint32 [3]> *, const TDesC &)
TInt GetItemPos ( CApListItemList *, TUint32 )
void GetLongTextValuesL ( CCommsDbTableView *, const TDesC &, CArrayPtrFlat < HBufC > &)
void GetProtValuesL ( CCommsDbTableView *, CArrayFixFlat < TUint32 > &)
TInt GetSupportedBearerSet ( TInt )
void GetTextValuesL ( CCommsDbTableView *, const TDesC &, CArrayPtrFlat < HBufC > &)
void GetUintValuesL ( CCommsDbTableView *, const TDesC &, CArrayFixFlat < TUint32 > &)
CCommsDbTableView * GetVpnTableViewLC ()
void GetVpnValuesL ( CCommsDbTableView *, CArrayFixFlat < TVpnData > *)
TBool IsInArray ( CArrayFixFlat < TUint32 > *, TUint32 )
CCommsDbTableView * OpenViewMatchingTextL (const TDesC &, const TDesC &, const TDesC16 &)
TInt PosInArray ( CArrayFixFlat < TUint32 > *, TUint32 )
void SetFiltersL ( TInt , TInt , TInt , TInt , TInt )
void SortLocalisedNameL ( TBool )
void SortUidL ( TBool )
Inherited Functions
CBase::CBase()
CBase::Delete(CBase *)
CBase::Extension_(TUint,TAny *&,TAny *)
CBase::operator new(TUint)
CBase::operator new(TUint,TAny *)
CBase::operator new(TUint,TLeave)
CBase::operator new(TUint,TLeave,TUint)
CBase::operator new(TUint,TUint)
CBase::~CBase()
Private Attributes
CApListItemList * iApList
TInt iBearer
TInt iCount
TInt iCursor
CCommsDatabase * iDb
TSelectExtra * iExt
TInt iIsp
TInt iSort

Constructor & Destructor Documentation

CApSelect()

IMPORT_C CApSelect ( ) [protected]

C++ default constructor.

~CApSelect()

IMPORT_C ~CApSelect ( ) [virtual]

Destructor.

Member Functions Documentation

AddLanL(TBool)

void AddLanL ( TBool aWlan ) [private]

Adding WLAN or LAN access points to existing list. aWlan a TBool specifying whether WLAN or LAN

Parameters

TBool aWlan

AllListItemDataL(CApListItemList &)

IMPORT_C TInt AllListItemDataL ( CApListItemList & aList )

Provides all data in a CApListItemList array.

Parameters

CApListItemList & aList A reference to a CApListItemList object to hold the values.

BearerFilter()

IMPORT_C TInt BearerFilter ( )

Gets the current bearer-type filter

BearerType()

IMPORT_C TApBearerType BearerType ( )

Gets the bearer-type of the current access point

ConstructL(CCommsDatabase &, TInt, TInt, TInt)

IMPORT_C void ConstructL ( CCommsDatabase & aDb,
TInt aIspFilter,
TInt aBearerFilter,
TInt aSortType
) [protected]

Second-phase constructor.

Parameters

CCommsDatabase & aDb a pointer to a CCommsDataBase.
TInt aIspFilter
TInt aBearerFilter Filtering criteria on bearer type Possible values are the TApBearer enums and their combinations (or-ed).
TInt aSortType Specifies the sort order to use. Possible values are: KEApSortUidAscending, KEApSortUidDescending, KEApSortNameAscending, KEApSortNameDescending

ConstructL(CCommsDatabase &, TInt, TInt, TInt, TInt)

IMPORT_C void ConstructL ( CCommsDatabase & aDb,
TInt aIspFilter,
TInt aBearerFilter,
TInt aSortType,
TInt aReqIpvType
) [protected]

Second-phase constructor.

Parameters

CCommsDatabase & aDb a pointer to a CCommsDataBase.
TInt aIspFilter
TInt aBearerFilter Filtering criteria on bearer type Possible values are the TApBearer enums and their combinations (or-ed).
TInt aSortType Specifies the sort order to use. Possible values are: KEApSortUidAscending, KEApSortUidDescending, KEApSortNameAscending, KEApSortNameDescending
TInt aReqIpvType Filtering criteria on the IPv type of the access point. In case of GPRS, GPRS_PDP_TYPE holds it, while in case of CSD, all CSD access points are considered to be IPv4 & IPv6 (both)

ConstructL(CCommsDatabase &, TInt, TInt, TInt, TInt, TVpnFilterType)

IMPORT_C void ConstructL ( CCommsDatabase & aDb,
TInt aIspFilter,
TInt aBearerFilter,
TInt aSortType,
TInt aReqIpvType,
TVpnFilterType aVpnFilterType
) [protected]

Second-phase constructor.

Parameters

CCommsDatabase & aDb a pointer to a CCommsDataBase.
TInt aIspFilter
TInt aBearerFilter Filtering criteria on bearer type Possible values are the TApBearer enums and their combinations (or-ed).
TInt aSortType Specifies the sort order to use. Possible values are: KEApSortUidAscending, KEApSortUidDescending, KEApSortNameAscending, KEApSortNameDescending
TInt aReqIpvType Filtering criteria on the IPv type of the access point. In case of GPRS, GPRS_PDP_TYPE holds it, while in case of CSD, all CSD access points are considered to be IPv4 & IPv6 (both)
TVpnFilterType aVpnFilterType a TVpnFilterType enum specifying the vpn filtering.

ConstructL(CCommsDatabase &, TInt, TInt, TInt, TInt, TVpnFilterType, TBool)

IMPORT_C void ConstructL ( CCommsDatabase & aDb,
TInt aIspFilter,
TInt aBearerFilter,
TInt aSortType,
TInt aReqIpvType,
TVpnFilterType aVpnFilterType,
TBool aIncludeEasyWlan
) [protected]

Second-phase constructor.

Parameters

CCommsDatabase & aDb a pointer to a CCommsDataBase.
TInt aIspFilter
TInt aBearerFilter Filtering criteria on bearer type Possible values are the TApBearer enums and their combinations (or-ed).
TInt aSortType Specifies the sort order to use. Possible values are: KEApSortUidAscending, KEApSortUidDescending, KEApSortNameAscending, KEApSortNameDescending
TInt aReqIpvType Filtering criteria on the IPv type of the access point. In case of GPRS, GPRS_PDP_TYPE holds it, while in case of CSD, all CSD access points are considered to be IPv4 & IPv6 (both)
TVpnFilterType aVpnFilterType a TVpnFilterType enum specifying the vpn filtering.
TBool aIncludeEasyWlan TBool specifying whther to include EasyWlan access point in the list or not...

Count()

IMPORT_C TUint32 Count ( )

Counts the items in the list

DoUpdateL()

TInt DoUpdateL ( ) [private]

This function updates the member data according to the current filter settings.

GetFilteredSortedGprsTableViewLC(TBool)

CCommsDbTableView * GetFilteredSortedGprsTableViewLC ( TBool aIn ) [private]

Gets the filtered and sorted GPRS table and places it on the Cleanupstack

Parameters

TBool aIn

GetFilteredSortedIpBearerTableViewLC()

CCommsDbTableView * GetFilteredSortedIpBearerTableViewLC ( ) [private]

Gets the filtered and sorted IP bearer table and places it on the Cleanupstack

GetFilteredSortedIspOutTableViewLC()

CCommsDbTableView * GetFilteredSortedIspOutTableViewLC ( ) [private]

Gets the filtered and sorted ISP table and places it on the Cleanupstack

GetFilteredSortedWapTableViewLC()

CCommsDbTableView * GetFilteredSortedWapTableViewLC ( ) [private]

Gets the filtered and sorted wap table and places it on the Cleanupstack

GetIapPos(CArrayFixFlat< TUint32[3]> *, TUint32)

TInt GetIapPos ( CArrayFixFlat < TUint32 [3]> * aArray,
TUint32 aValue
) [private]

Gets the position of an element with a given IAP UID

Parameters

CArrayFixFlat < TUint32 [3]> * aArray
TUint32 aValue

GetIspValuesL(CCommsDbTableView *, CArrayFixFlat< TUint32[3]> *, const TDesC &)

void GetIspValuesL ( CCommsDbTableView * aTable,
CArrayFixFlat < TUint32 [3]> * aArray,
const TDesC & aColName
) [private]

Gets the ISP values (ISP UID, ISP type, ISP bearer type) from a given table

Parameters

CCommsDbTableView * aTable the table to go through (already filtered & ordered)
CArrayFixFlat < TUint32 [3]> * aArray An array to hold the readed values
const TDesC & aColName Column name (different column names are used for CSD/GPRS/CDMA.

GetItemPos(CApListItemList *, TUint32)

TInt GetItemPos ( CApListItemList * aTmpApList,
TUint32 aId
) [private]

Returns the position of an item with a given UID in the given list.

Parameters

CApListItemList * aTmpApList
TUint32 aId

GetLongTextValuesL(CCommsDbTableView *, const TDesC &, CArrayPtrFlat< HBufC > &)

void GetLongTextValuesL ( CCommsDbTableView * aTable,
const TDesC & aField,
CArrayPtrFlat < HBufC > & aArray
) [private]

Reads up the specified columns long text values stored in the table and returns it in the passed array

Parameters

CCommsDbTableView * aTable
const TDesC & aField
CArrayPtrFlat < HBufC > & aArray

GetProtValuesL(CCommsDbTableView *, CArrayFixFlat< TUint32 > &)

void GetProtValuesL ( CCommsDbTableView * aTable,
CArrayFixFlat < TUint32 > & aArray
) [private]

Reads up the protection values stored in the table and returns it in the passed array

Parameters

CCommsDbTableView * aTable
CArrayFixFlat < TUint32 > & aArray

GetSupportedBearerSet(TInt)

TInt GetSupportedBearerSet ( TInt aBearerFilter ) [private]

Returns the supported bearer set from the passed requested bearer set

Parameters

TInt aBearerFilter The requested bearer set return The supported subset of the requested bearers.

GetTextValuesL(CCommsDbTableView *, const TDesC &, CArrayPtrFlat< HBufC > &)

void GetTextValuesL ( CCommsDbTableView * aTable,
const TDesC & aField,
CArrayPtrFlat < HBufC > & aArray
) [private]

Reads up the specified columns text values stored in the table and returns it in the passed array

Parameters

CCommsDbTableView * aTable
const TDesC & aField
CArrayPtrFlat < HBufC > & aArray

GetUintValuesL(CCommsDbTableView *, const TDesC &, CArrayFixFlat< TUint32 > &)

void GetUintValuesL ( CCommsDbTableView * aTable,
const TDesC & aField,
CArrayFixFlat < TUint32 > & aArray
) [private]

Reads up the specified columns TUint32 values stored in the table and returns it in the passed array

Parameters

CCommsDbTableView * aTable
const TDesC & aField
CArrayFixFlat < TUint32 > & aArray

GetVpnTableViewLC()

CCommsDbTableView * GetVpnTableViewLC ( ) [private]

Returns a pointer to the opened VPN_SERVICE table

GetVpnValuesL(CCommsDbTableView *, CArrayFixFlat< TVpnData > *)

void GetVpnValuesL ( CCommsDbTableView * aTable,
CArrayFixFlat < TVpnData > * aVpnArray
) [private]

Gets the VPN values (VPN IAP UID, VPN HOME IAP UID, VPN Name ) from the given VPN table

Parameters

CCommsDbTableView * aTable the table to go through (already filtered & ordered)
CArrayFixFlat < TVpnData > * aVpnArray An array to hold the readed vpn data values

IsInArray(CArrayFixFlat< TUint32 > *, TUint32)

TBool IsInArray ( CArrayFixFlat < TUint32 > * aArray,
TUint32 aValue
) [private]

Returns whether a given value is in the given array or not

Parameters

CArrayFixFlat < TUint32 > * aArray
TUint32 aValue

IsReadOnly()

IMPORT_C TBool IsReadOnly ( ) const

Returns whether the current item is read-only or not.

IspTypeFilter()

IMPORT_C TInt IspTypeFilter ( )

Gets the current ISP-type filter

MoveLast()

IMPORT_C TBool MoveLast ( )

Navigates to the last access point in the list.

MoveNext()

IMPORT_C TBool MoveNext ( )

Navigates to the next access point in the list.

MovePrev()

IMPORT_C TBool MovePrev ( )

Navigates to the previous access point in the list.

MoveToFirst()

IMPORT_C TBool MoveToFirst ( )

Navigates to the first access point in the list.

Name()

IMPORT_C const TDesC & Name ( )

Gets the name of the 'current' access point Ownership of the returned text is not passed.

NewLC(CCommsDatabase &, TInt, TInt, TInt)

IMPORT_C CApSelect * NewLC ( CCommsDatabase & aDb,
TInt aIspFilter,
TInt aBearerFilter,
TInt aSortType
) [static]

Two-phased constructor. Leaves on failure, places instance on cleanup stack.

Parameters

CCommsDatabase & aDb a pointer to a CCommsDataBase.
TInt aIspFilter
TInt aBearerFilter Filtering criteria on bearer type Possible values are the TApBearer enums and their combinations (or-ed).
TInt aSortType Specifies the sort order to use. Possible values are: KEApSortUidAscending, KEApSortUidDescending, KEApSortNameAscending, KEApSortNameDescending

NewLC(CCommsDatabase &, TInt, TInt, TInt, TInt)

IMPORT_C CApSelect * NewLC ( CCommsDatabase & aDb,
TInt aIspFilter,
TInt aBearerFilter,
TInt aSortType,
TInt aReqIpvType
) [static]

Two-phased constructor. Leaves on failure, places instance on cleanup stack.

Parameters

CCommsDatabase & aDb a pointer to a CCommsDataBase.
TInt aIspFilter
TInt aBearerFilter Filtering criteria on bearer type Possible values are the TApBearer enums and their combinations (or-ed).
TInt aSortType Specifies the sort order to use. Possible values are: KEApSortUidAscending, KEApSortUidDescending, KEApSortNameAscending, KEApSortNameDescending
TInt aReqIpvType Filtering criteria on the IPv type of the access point. In case of GPRS, GPRS_PDP_TYPE holds it, while in case of CSD, all CSD access points are considered to be IPv4 & IPv6 (both)

NewLC(CCommsDatabase &, TInt, TInt, TInt, TInt, TVpnFilterType)

IMPORT_C CApSelect * NewLC ( CCommsDatabase & aDb,
TInt aIspFilter,
TInt aBearerFilter,
TInt aSortType,
TInt aReqIpvType,
TVpnFilterType aVpnFilterType
) [static]

Two-phased constructor. Leaves on failure, places instance on cleanup stack.

Parameters

CCommsDatabase & aDb a pointer to a CCommsDataBase.
TInt aIspFilter
TInt aBearerFilter Filtering criteria on bearer type Possible values are the TApBearer enums and their combinations (or-ed).
TInt aSortType Specifies the sort order to use. Possible values are: KEApSortUidAscending, KEApSortUidDescending, KEApSortNameAscending, KEApSortNameDescending
TInt aReqIpvType Filtering criteria on the IPv type of the access point. In case of GPRS, GPRS_PDP_TYPE holds it, while in case of CSD, all CSD access points are considered to be IPv4 & IPv6 (both)
TVpnFilterType aVpnFilterType a TVpnFilterType enum specifying the vpn filtering.

NewLC(CCommsDatabase &, TInt, TInt, TInt, TInt, TVpnFilterType, TBool)

IMPORT_C CApSelect * NewLC ( CCommsDatabase & aDb,
TInt aIspFilter,
TInt aBearerFilter,
TInt aSortType,
TInt aReqIpvType,
TVpnFilterType aVpnFilterType,
TBool aIncludeEasyWlan
) [static]

Two-phased constructor. Leaves on failure, places instance on cleanup stack.

Parameters

CCommsDatabase & aDb a pointer to a CCommsDataBase.
TInt aIspFilter
TInt aBearerFilter Filtering criteria on bearer type Possible values are the TApBearer enums and their combinations (or-ed).
TInt aSortType Specifies the sort order to use. Possible values are: KEApSortUidAscending, KEApSortUidDescending, KEApSortNameAscending, KEApSortNameDescending
TInt aReqIpvType Filtering criteria on the IPv type of the access point. In case of GPRS, GPRS_PDP_TYPE holds it, while in case of CSD, all CSD access points are considered to be IPv4 & IPv6 (both)
TVpnFilterType aVpnFilterType a TVpnFilterType enum specifying the vpn filtering.
TBool aIncludeEasyWlan TBool specifying whther to include EasyWlan access point in the list or not...

OpenViewMatchingTextL(const TDesC &, const TDesC &, const TDesC16 &)

CCommsDbTableView * OpenViewMatchingTextL ( const TDesC & aTableName,
const TDesC & aColumnToMatch,
const TDesC16 & aValueToMatch
) [private]

Opens a view on the given table where a given text coloumn has a given value

Parameters

const TDesC & aTableName
const TDesC & aColumnToMatch
const TDesC16 & aValueToMatch

PosInArray(CArrayFixFlat< TUint32 > *, TUint32)

TInt PosInArray ( CArrayFixFlat < TUint32 > * aArray,
TUint32 aValue
) [private]

Returns the position of a given value in the given array.

Parameters

CArrayFixFlat < TUint32 > * aArray
TUint32 aValue

SetFiltersL(TInt, TInt, TInt)

IMPORT_C void SetFiltersL ( TInt aIspFilter,
TInt aBearerFilter,
TInt aSortType
)

Sets filters and sorting order for the list of available access points

Parameters

TInt aIspFilter
TInt aBearerFilter Filtering criteria on bearer type Possible values are the TApBearer enums and their combinations (or-ed).
TInt aSortType Specifies the sort order to use. Possible values are: KEApSortUidAscending, KEApSortUidDescending, KEApSortNameAscending, KEApSortNameDescending

SetFiltersL(TInt, TInt, TInt, TInt, TInt)

void SetFiltersL ( TInt aIspFilter,
TInt aBearerFilter,
TInt aSortType,
TInt aReqIpvType,
TInt aVpnFilterType
) [private]

Sets filters and sorting order for the list of available access points

Parameters

TInt aIspFilter
TInt aBearerFilter Filtering criteria on bearer type Possible values are the TApBearer enums and their combinations (or-ed).
TInt aSortType Specifies the sort order to use. Possible values are: KEApSortUidAscending, KEApSortUidDescending, KEApSortNameAscending, KEApSortNameDescending
TInt aReqIpvType The filtering criteria for IPv type
TInt aVpnFilterType The Vpn filtering type, TVpnFilterType values

SortLocalisedNameL(TBool)

void SortLocalisedNameL ( TBool aAscending = ETrue ) [private]

Sorts the data according to localised sorting on the access point names, using CompareC

Parameters

TBool aAscending = ETrue

SortOrder()

IMPORT_C TInt SortOrder ( )

Gets the current sorting order

SortUidL(TBool)

void SortUidL ( TBool aAscending = ETrue ) [private]

Sorts the data according to Uids

Parameters

TBool aAscending = ETrue

Type()

IMPORT_C TCommsDbIspType Type ( )

Gets the ISP-type of the current access point

Uid()

IMPORT_C TUint32 Uid ( )

Gets the UID of the current access point

Member Data Documentation

CApListItemList * iApList

CApListItemList * iApList [private]

TInt iBearer

TInt iBearer [private]

TInt iCount

TInt iCount [private]

TInt iCursor

TInt iCursor [private]

CCommsDatabase * iDb

CCommsDatabase * iDb [private]

TSelectExtra * iExt

TSelectExtra * iExt [private]

TInt iIsp

TInt iIsp [private]

TInt iSort

TInt iSort [private]