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 TIntAllListItemDataL(CApListItemList &)
IMPORT_C TIntBearerFilter()
IMPORT_C TApBearerTypeBearerType()
IMPORT_C TUint32Count()
IMPORT_C TBoolIsReadOnly()
IMPORT_C TIntIspTypeFilter()
IMPORT_C TBoolMoveLast()
IMPORT_C TBoolMoveNext()
IMPORT_C TBoolMovePrev()
IMPORT_C TBoolMoveToFirst()
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 voidSetFiltersL(TInt, TInt, TInt)
IMPORT_C TIntSortOrder()
IMPORT_C TCommsDbIspTypeType()
IMPORT_C TUint32Uid()
Protected Member Functions
CApSelect()
IMPORT_C voidConstructL(CCommsDatabase &, TInt, TInt, TInt)
IMPORT_C voidConstructL(CCommsDatabase &, TInt, TInt, TInt, TInt)
IMPORT_C voidConstructL(CCommsDatabase &, TInt, TInt, TInt, TInt, TVpnFilterType)
IMPORT_C voidConstructL(CCommsDatabase &, TInt, TInt, TInt, TInt, TVpnFilterType, TBool)
Private Member Functions
voidAddLanL(TBool)
TInt DoUpdateL()
CCommsDbTableView *GetFilteredSortedGprsTableViewLC(TBool)
CCommsDbTableView *GetFilteredSortedIpBearerTableViewLC()
CCommsDbTableView *GetFilteredSortedIspOutTableViewLC()
CCommsDbTableView *GetFilteredSortedWapTableViewLC()
TInt GetIapPos(CArrayFixFlat< TUint32[3]> *, TUint32)
voidGetIspValuesL(CCommsDbTableView *, CArrayFixFlat< TUint32[3]> *, const TDesC &)
TInt GetItemPos(CApListItemList *, TUint32)
voidGetLongTextValuesL(CCommsDbTableView *, const TDesC &, CArrayPtrFlat< HBufC > &)
voidGetProtValuesL(CCommsDbTableView *, CArrayFixFlat< TUint32 > &)
TInt GetSupportedBearerSet(TInt)
voidGetTextValuesL(CCommsDbTableView *, const TDesC &, CArrayPtrFlat< HBufC > &)
voidGetUintValuesL(CCommsDbTableView *, const TDesC &, CArrayFixFlat< TUint32 > &)
CCommsDbTableView *GetVpnTableViewLC()
voidGetVpnValuesL(CCommsDbTableView *, CArrayFixFlat< TVpnData > *)
TBool IsInArray(CArrayFixFlat< TUint32 > *, TUint32)
CCommsDbTableView *OpenViewMatchingTextL(const TDesC &, const TDesC &, const TDesC16 &)
TInt PosInArray(CArrayFixFlat< TUint32 > *, TUint32)
voidSetFiltersL(TInt, TInt, TInt, TInt, TInt)
voidSortLocalisedNameL(TBool)
voidSortUidL(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_CCApSelect()[protected]

C++ default constructor.

~CApSelect()

IMPORT_C~CApSelect()[virtual]

Destructor.

Member Functions Documentation

AddLanL(TBool)

voidAddLanL(TBoolaWlan)[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 TIntAllListItemDataL(CApListItemList &aList)

Provides all data in a CApListItemList array.

Parameters

CApListItemList & aListA reference to a CApListItemList object to hold the values.

BearerFilter()

IMPORT_C TIntBearerFilter()

Gets the current bearer-type filter

BearerType()

IMPORT_C TApBearerTypeBearerType()

Gets the bearer-type of the current access point

ConstructL(CCommsDatabase &, TInt, TInt, TInt)

IMPORT_C voidConstructL(CCommsDatabase &aDb,
TIntaIspFilter,
TIntaBearerFilter,
TIntaSortType
)[protected]

Second-phase constructor.

Parameters

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

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

IMPORT_C voidConstructL(CCommsDatabase &aDb,
TIntaIspFilter,
TIntaBearerFilter,
TIntaSortType,
TIntaReqIpvType
)[protected]

Second-phase constructor.

Parameters

CCommsDatabase & aDba pointer to a CCommsDataBase.
TInt aIspFilter
TInt aBearerFilterFiltering criteria on bearer type Possible values are the TApBearer enums and their combinations (or-ed).
TInt aSortTypeSpecifies the sort order to use. Possible values are: KEApSortUidAscending, KEApSortUidDescending, KEApSortNameAscending, KEApSortNameDescending
TInt aReqIpvTypeFiltering 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 voidConstructL(CCommsDatabase &aDb,
TIntaIspFilter,
TIntaBearerFilter,
TIntaSortType,
TIntaReqIpvType,
TVpnFilterTypeaVpnFilterType
)[protected]

Second-phase constructor.

Parameters

CCommsDatabase & aDba pointer to a CCommsDataBase.
TInt aIspFilter
TInt aBearerFilterFiltering criteria on bearer type Possible values are the TApBearer enums and their combinations (or-ed).
TInt aSortTypeSpecifies the sort order to use. Possible values are: KEApSortUidAscending, KEApSortUidDescending, KEApSortNameAscending, KEApSortNameDescending
TInt aReqIpvTypeFiltering 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 aVpnFilterTypea TVpnFilterType enum specifying the vpn filtering.

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

IMPORT_C voidConstructL(CCommsDatabase &aDb,
TIntaIspFilter,
TIntaBearerFilter,
TIntaSortType,
TIntaReqIpvType,
TVpnFilterTypeaVpnFilterType,
TBoolaIncludeEasyWlan
)[protected]

Second-phase constructor.

Parameters

CCommsDatabase & aDba pointer to a CCommsDataBase.
TInt aIspFilter
TInt aBearerFilterFiltering criteria on bearer type Possible values are the TApBearer enums and their combinations (or-ed).
TInt aSortTypeSpecifies the sort order to use. Possible values are: KEApSortUidAscending, KEApSortUidDescending, KEApSortNameAscending, KEApSortNameDescending
TInt aReqIpvTypeFiltering 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 aVpnFilterTypea TVpnFilterType enum specifying the vpn filtering.
TBool aIncludeEasyWlanTBool specifying whther to include EasyWlan access point in the list or not...

Count()

IMPORT_C TUint32Count()

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(TBoolaIn)[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,
TUint32aValue
)[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 &)

voidGetIspValuesL(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 * aTablethe table to go through (already filtered & ordered)
CArrayFixFlat< TUint32[3]> * aArrayAn array to hold the readed values
const TDesC & aColNameColumn name (different column names are used for CSD/GPRS/CDMA.

GetItemPos(CApListItemList *, TUint32)

TInt GetItemPos(CApListItemList *aTmpApList,
TUint32aId
)[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 > &)

voidGetLongTextValuesL(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 > &)

voidGetProtValuesL(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(TIntaBearerFilter)[private]

Returns the supported bearer set from the passed requested bearer set

Parameters

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

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

voidGetTextValuesL(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 > &)

voidGetUintValuesL(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 > *)

voidGetVpnValuesL(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 * aTablethe table to go through (already filtered & ordered)
CArrayFixFlat< TVpnData > * aVpnArrayAn array to hold the readed vpn data values

IsInArray(CArrayFixFlat< TUint32 > *, TUint32)

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

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

Parameters

CArrayFixFlat< TUint32 > * aArray
TUint32 aValue

IsReadOnly()

IMPORT_C TBoolIsReadOnly()const

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

IspTypeFilter()

IMPORT_C TIntIspTypeFilter()

Gets the current ISP-type filter

MoveLast()

IMPORT_C TBoolMoveLast()

Navigates to the last access point in the list.

MoveNext()

IMPORT_C TBoolMoveNext()

Navigates to the next access point in the list.

MovePrev()

IMPORT_C TBoolMovePrev()

Navigates to the previous access point in the list.

MoveToFirst()

IMPORT_C TBoolMoveToFirst()

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,
TIntaIspFilter,
TIntaBearerFilter,
TIntaSortType
)[static]

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

Parameters

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

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

IMPORT_C CApSelect *NewLC(CCommsDatabase &aDb,
TIntaIspFilter,
TIntaBearerFilter,
TIntaSortType,
TIntaReqIpvType
)[static]

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

Parameters

CCommsDatabase & aDba pointer to a CCommsDataBase.
TInt aIspFilter
TInt aBearerFilterFiltering criteria on bearer type Possible values are the TApBearer enums and their combinations (or-ed).
TInt aSortTypeSpecifies the sort order to use. Possible values are: KEApSortUidAscending, KEApSortUidDescending, KEApSortNameAscending, KEApSortNameDescending
TInt aReqIpvTypeFiltering 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,
TIntaIspFilter,
TIntaBearerFilter,
TIntaSortType,
TIntaReqIpvType,
TVpnFilterTypeaVpnFilterType
)[static]

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

Parameters

CCommsDatabase & aDba pointer to a CCommsDataBase.
TInt aIspFilter
TInt aBearerFilterFiltering criteria on bearer type Possible values are the TApBearer enums and their combinations (or-ed).
TInt aSortTypeSpecifies the sort order to use. Possible values are: KEApSortUidAscending, KEApSortUidDescending, KEApSortNameAscending, KEApSortNameDescending
TInt aReqIpvTypeFiltering 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 aVpnFilterTypea TVpnFilterType enum specifying the vpn filtering.

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

IMPORT_C CApSelect *NewLC(CCommsDatabase &aDb,
TIntaIspFilter,
TIntaBearerFilter,
TIntaSortType,
TIntaReqIpvType,
TVpnFilterTypeaVpnFilterType,
TBoolaIncludeEasyWlan
)[static]

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

Parameters

CCommsDatabase & aDba pointer to a CCommsDataBase.
TInt aIspFilter
TInt aBearerFilterFiltering criteria on bearer type Possible values are the TApBearer enums and their combinations (or-ed).
TInt aSortTypeSpecifies the sort order to use. Possible values are: KEApSortUidAscending, KEApSortUidDescending, KEApSortNameAscending, KEApSortNameDescending
TInt aReqIpvTypeFiltering 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 aVpnFilterTypea TVpnFilterType enum specifying the vpn filtering.
TBool aIncludeEasyWlanTBool 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,
TUint32aValue
)[private]

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

Parameters

CArrayFixFlat< TUint32 > * aArray
TUint32 aValue

SetFiltersL(TInt, TInt, TInt)

IMPORT_C voidSetFiltersL(TIntaIspFilter,
TIntaBearerFilter,
TIntaSortType
)

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

Parameters

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

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

voidSetFiltersL(TIntaIspFilter,
TIntaBearerFilter,
TIntaSortType,
TIntaReqIpvType,
TIntaVpnFilterType
)[private]

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

Parameters

TInt aIspFilter
TInt aBearerFilterFiltering criteria on bearer type Possible values are the TApBearer enums and their combinations (or-ed).
TInt aSortTypeSpecifies the sort order to use. Possible values are: KEApSortUidAscending, KEApSortUidDescending, KEApSortNameAscending, KEApSortNameDescending
TInt aReqIpvTypeThe filtering criteria for IPv type
TInt aVpnFilterTypeThe Vpn filtering type, TVpnFilterType values

SortLocalisedNameL(TBool)

voidSortLocalisedNameL(TBoolaAscending = ETrue)[private]

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

Parameters

TBool aAscending = ETrue

SortOrder()

IMPORT_C TIntSortOrder()

Gets the current sorting order

SortUidL(TBool)

voidSortUidL(TBoolaAscending = ETrue)[private]

Sorts the data according to Uids

Parameters

TBool aAscending = ETrue

Type()

IMPORT_C TCommsDbIspTypeType()

Gets the ISP-type of the current access point

Uid()

IMPORT_C TUint32Uid()

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]