CApUtils Class Reference

class CApUtils : public CBase

Representation of access point utilities. Provides utilities to access points for clients. Encapsulates database handling. This class provides utility functions for clients that need some specific information or parameters from (maybe more than one) AP. It is provided for ease of use so clients do not have to work with CApDataHandler's concept (one object-one Uid).

Inherits from

Public Member Functions
~CApUtils()
IMPORT_C TApBearerTypeBearerTypeL(TUint32)
IMPORT_C TBoolDoHasMandatoryFieldsFilledL(TUint32, CCommsDbTableView *, TApBearerType)
IMPORT_C TBoolHasMandatoryFieldsFilledL(TUint32)
TBool HasWlanSSIDL(TUint32)
IMPORT_C TBoolIAPExistsL(TUint32)
IMPORT_C voidISPTypeL(TUint32, TCommsDbIspType &)
IMPORT_C TUint32IapIdFromWapIdL(TUint32)
IMPORT_C TBoolIsAPInUseL(TUint32)
IMPORT_C TBoolIsReadOnlyL(TUint32)
IMPORT_C TBoolIsValidNameL(const TDesC &)
IMPORT_C TBoolIsValidNameL(const TDesC &, TUint32)
TBool IsWlanL(TUint32)
IMPORT_C TBoolMakeValidNameL(TDes &)
IMPORT_C voidNameL(TUint32, TDes &)
IMPORT_C CApUtils *NewLC(CCommsDatabase &)
IMPORT_C voidSetISPTypeL(TUint32, TCommsDbIspType)
IMPORT_C voidSetNameL(TDes &, TUint32)
IMPORT_C TBoolWapApExistsL(TUint32)
IMPORT_C voidWapBearerTypeL(TUint32, TDes &)
IMPORT_C TUint32WapIdFromIapIdL(TUint32)
Protected Member Functions
CApUtils()
IMPORT_C voidConstructL(CCommsDatabase &)
TApBearerType DoBearerTypeL(TUint32)
voidDoISPTypeL(TUint32, TCommsDbIspType &)
TBool DoIsWlanL(TUint32)
voidDoNameL(TUint32, TDes &)
voidDoSetISPTypeL(TUint32, TCommsDbIspType)
voidDoSetNameL(TDes &, TUint32)
voidDoWapBearerTypeL(TUint32, TDes &)
TBool DoesExistsL(TPtrC, TUint32)
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
CCommsDatabase *iDb
TUtilsExtra *iExt

Constructor & Destructor Documentation

CApUtils()

IMPORT_CCApUtils()[protected]

C++ default constructor.

~CApUtils()

IMPORT_C~CApUtils()[virtual]

Destructor.

Member Functions Documentation

BearerTypeL(TUint32)

IMPORT_C TApBearerTypeBearerTypeL(TUint32aUid)

Gets the bearer type of a given access point. Leaves on error.

Parameters

TUint32 aUidThe UID of the access point.

ConstructL(CCommsDatabase &)

IMPORT_C voidConstructL(CCommsDatabase &aDb)[protected]

Second-phase constructor.

Parameters

CCommsDatabase & aDb

DoBearerTypeL(TUint32)

TApBearerType DoBearerTypeL(TUint32aUid)[protected]

Gets the bearer type of a given access point. Leaves on error.

Parameters

TUint32 aUidThe UID of the access point.

DoHasMandatoryFieldsFilledL(TUint32, CCommsDbTableView *, TApBearerType)

IMPORT_C TBoolDoHasMandatoryFieldsFilledL(TUint32aUid,
CCommsDbTableView *aWapt = NULL,
TApBearerTypeaBearertype = EApBearerTypeAllBearers
)

Returns whether the access point has the WAP-mandatory fields filled or not.

Parameters

TUint32 aUidThe UID of the access point
CCommsDbTableView * aWapt = NULL
TApBearerType aBearertype = EApBearerTypeAllBearers

DoISPTypeL(TUint32, TCommsDbIspType &)

voidDoISPTypeL(TUint32aUid,
TCommsDbIspType &aIspType
)[protected]

Indicates the ISP type of a given access point.

Parameters

TUint32 aUidThe UID of the access point.
TCommsDbIspType & aIspTypeA reference to a TCommsDbIspType to hold the value

DoIsWlanL(TUint32)

TBool DoIsWlanL(TUint32aLanCommdbId)[protected]

Wrapper for public API. Determines whether a given LAN_SERVICE commsdb id is linked to a WLAN data (thus is it a WLAN) or not.

Parameters

TUint32 aLanCommdbId

DoNameL(TUint32, TDes &)

voidDoNameL(TUint32aUid,
TDes &aName
)[protected]

Reads the Name of a given access point

Parameters

TUint32 aUidThe UID of the access point.
TDes & aName

DoSetISPTypeL(TUint32, TCommsDbIspType)

voidDoSetISPTypeL(TUint32aUid,
TCommsDbIspTypeaIspType
)[protected]

Sets the ISP type for a given access point

Parameters

TUint32 aUidThe UID of the access point
TCommsDbIspType aIspTypeThe desired Isp type of the access point

DoSetNameL(TDes &, TUint32)

voidDoSetNameL(TDes &aName,
TUint32aUid
)[protected]

Sets the Name of a given access point Name is validated and modified if needed. Passed aName buffer MUST be large enough to hold the modified name.

Parameters

TDes & aNameA reference to the name of the access point. The given name is returned in it.
TUint32 aUidThe UID of the access point.

DoWapBearerTypeL(TUint32, TDes &)

voidDoWapBearerTypeL(TUint32aUid,
TDes &aBearer
)[protected]

Indicates the WAP bearer type of a given access point. Passed descriptor MUST be large enough to hold the new data, otherwise leaves with KErrDescOverflow. The maximum length is the maximum length of a 'normal' text fields length in Comms DB, KCommsDbSvrMaxFieldLength, which is defined in cdblen.h.

Parameters

TUint32 aUidThe UID of the access point.
TDes & aBearerA reference to a TBearer to hold the bearer type of the access point.

DoesExistsL(TPtrC, TUint32)

TBool DoesExistsL(TPtrCaTable,
TUint32aUid
)[protected]

Returns in a TBool whether the record identified by the passed aUid exists or not in the table identified by the passed table name.

Parameters

TPtrC aTableThe name of the table to check
TUint32 aUidThe UID to check for

HasMandatoryFieldsFilledL(TUint32)

IMPORT_C TBoolHasMandatoryFieldsFilledL(TUint32aUid)

Returns whether the access point has the WAP-mandatory fields filled or not. Starts a transaction which is 'internal' to ApEngine if client not started one.

Parameters

TUint32 aUidThe UID of the access point

HasWlanSSIDL(TUint32)

TBool HasWlanSSIDL(TUint32aLanCommdbId)

Determines whether a given LAN_SERVICE commsdb id which is linked to a WLAN data (thus is it a WLAN) has a valid SSID or it is empty

Parameters

TUint32 aLanCommdbId

IAPExistsL(TUint32)

IMPORT_C TBoolIAPExistsL(TUint32aUid)

Returns in a TBool whether the internet access point part identified by the passed aUid exists or not. param aUid the internet access point ID to check for (NOT equals to Wap access point ID). return TBool indicating whether an internet access point with the given ID exists or not.

Parameters

TUint32 aUid

ISPTypeL(TUint32, TCommsDbIspType &)

IMPORT_C voidISPTypeL(TUint32aUid,
TCommsDbIspType &aIspType
)

Indicates the ISP type of a given access point.

Parameters

TUint32 aUidThe UID of the access point.
TCommsDbIspType & aIspTypeA reference to a TCommsDbIspType to hold the value

IapIdFromWapIdL(TUint32)

IMPORT_C TUint32IapIdFromWapIdL(TUint32aUid)

Gets the Iap record ID for a given access point ID

Parameters

TUint32 aUidThe UID of the access point

IsAPInUseL(TUint32)

IMPORT_C TBoolIsAPInUseL(TUint32aUid)

Indicates whether a given access point is in use or not. If access point does not exists, return value is TRUE

Parameters

TUint32 aUidThe UID of the access point.

IsReadOnlyL(TUint32)

IMPORT_C TBoolIsReadOnlyL(TUint32aUid)

Determines whether a given AP is read-only or not.

Parameters

TUint32 aUidA UID to look for

IsValidNameL(const TDesC &)

IMPORT_C TBoolIsValidNameL(const TDesC &aNameText)

Indicates whether a given name is valid or not.

Parameters

const TDesC & aNameTextThe name to check.

IsValidNameL(const TDesC &, TUint32)

IMPORT_C TBoolIsValidNameL(const TDesC &aNameText,
TUint32aAcceptUid
)

Indicates whether a given name is valid or not. The name is valid if none, or only the aAcceptUid AP has it.

Parameters

const TDesC & aNameTextThe name to check.
TUint32 aAcceptUidA UID to accept with this name

IsWlanL(TUint32)

TBool IsWlanL(TUint32aLanCommdbId)

Determines whether a given LAN_SERVICE commsdb id is linked to a WLAN data (thus is it a WLAN) or not.

Parameters

TUint32 aLanCommdbId

MakeValidNameL(TDes &)

IMPORT_C TBoolMakeValidNameL(TDes &aNameText)

TBool CApUtils::MakeValidNameL(TDes& aNameText); Creates a valid name based on the given one.

Parameters

TDes & aNameTextThe name to use for creating a valid name. The new name is returned in it, too.

NameL(TUint32, TDes &)

IMPORT_C voidNameL(TUint32aUid,
TDes &aName
)

Reads the Name of a given access point

Parameters

TUint32 aUidThe UID of the access point.
TDes & aName

NewLC(CCommsDatabase &)

IMPORT_C CApUtils *NewLC(CCommsDatabase &aDb)[static]

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

Parameters

CCommsDatabase & aDba reference to a CCommsDataBase object.

SetISPTypeL(TUint32, TCommsDbIspType)

IMPORT_C voidSetISPTypeL(TUint32aUid,
TCommsDbIspTypeaIspType
)

Sets the ISP type for a given access point

Parameters

TUint32 aUidThe UID of the access point
TCommsDbIspType aIspTypeThe desired Isp type of the access point

SetNameL(TDes &, TUint32)

IMPORT_C voidSetNameL(TDes &aName,
TUint32aUid
)

Sets the Name of a given access point Name is validated and modified if needed. Passed aName buffer MUST be large enough to hold the modified name.

Parameters

TDes & aNameA reference to the name of the access point. The given name is returned in it.
TUint32 aUidThe UID of the access point.

WapApExistsL(TUint32)

IMPORT_C TBoolWapApExistsL(TUint32aUid)

Returns in a TBool whether the access point identified by the passed aUid exists or not.

Parameters

TUint32 aUidthe access point ID to check for.(Wap access point ID).

WapBearerTypeL(TUint32, TDes &)

IMPORT_C voidWapBearerTypeL(TUint32aUid,
TDes &aBearer
)

Indicates the WAP bearer type of a given access point. Passed descriptor MUST be large enough to hold the new data, otherwise leaves with KErrDescOverflow. The maximum length is the maximum length of a 'normal' text fields length in Comms DB, KCommsDbSvrMaxFieldLength, which is defined in cdblen.h.

Parameters

TUint32 aUidThe UID of the access point.
TDes & aBearerA reference to a TBearer to hold the bearer type of the access point.

WapIdFromIapIdL(TUint32)

IMPORT_C TUint32WapIdFromIapIdL(TUint32aUid)

Gets the Wap record ID for a given Iap record ID

Parameters

TUint32 aUidThe UID of the Iap

Member Data Documentation

CCommsDatabase * iDb

CCommsDatabase *iDb[private]

TUtilsExtra * iExt

TUtilsExtra *iExt[private]