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 TApBearerType BearerTypeL ( TUint32 )
IMPORT_C TBool DoHasMandatoryFieldsFilledL ( TUint32 , CCommsDbTableView *, TApBearerType )
IMPORT_C TBool HasMandatoryFieldsFilledL ( TUint32 )
TBool HasWlanSSIDL ( TUint32 )
IMPORT_C TBool IAPExistsL ( TUint32 )
IMPORT_C void ISPTypeL ( TUint32 , TCommsDbIspType &)
IMPORT_C TUint32 IapIdFromWapIdL ( TUint32 )
IMPORT_C TBool IsAPInUseL ( TUint32 )
IMPORT_C TBool IsReadOnlyL ( TUint32 )
IMPORT_C TBool IsValidNameL (const TDesC &)
IMPORT_C TBool IsValidNameL (const TDesC &, TUint32 )
TBool IsWlanL ( TUint32 )
IMPORT_C TBool MakeValidNameL ( TDes &)
IMPORT_C void NameL ( TUint32 , TDes &)
IMPORT_C CApUtils * NewLC ( CCommsDatabase &)
IMPORT_C void SetISPTypeL ( TUint32 , TCommsDbIspType )
IMPORT_C void SetNameL ( TDes &, TUint32 )
IMPORT_C TBool WapApExistsL ( TUint32 )
IMPORT_C void WapBearerTypeL ( TUint32 , TDes &)
IMPORT_C TUint32 WapIdFromIapIdL ( TUint32 )
Protected Member Functions
CApUtils ()
IMPORT_C void ConstructL ( CCommsDatabase &)
TApBearerType DoBearerTypeL ( TUint32 )
void DoISPTypeL ( TUint32 , TCommsDbIspType &)
TBool DoIsWlanL ( TUint32 )
void DoNameL ( TUint32 , TDes &)
void DoSetISPTypeL ( TUint32 , TCommsDbIspType )
void DoSetNameL ( TDes &, TUint32 )
void DoWapBearerTypeL ( 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_C CApUtils ( ) [protected]

C++ default constructor.

~CApUtils()

IMPORT_C ~CApUtils ( ) [virtual]

Destructor.

Member Functions Documentation

BearerTypeL(TUint32)

IMPORT_C TApBearerType BearerTypeL ( TUint32 aUid )

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

Parameters

TUint32 aUid The UID of the access point.

ConstructL(CCommsDatabase &)

IMPORT_C void ConstructL ( CCommsDatabase & aDb ) [protected]

Second-phase constructor.

Parameters

CCommsDatabase & aDb

DoBearerTypeL(TUint32)

TApBearerType DoBearerTypeL ( TUint32 aUid ) [protected]

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

Parameters

TUint32 aUid The UID of the access point.

DoHasMandatoryFieldsFilledL(TUint32, CCommsDbTableView *, TApBearerType)

IMPORT_C TBool DoHasMandatoryFieldsFilledL ( TUint32 aUid,
CCommsDbTableView * aWapt = NULL,
TApBearerType aBearertype = EApBearerTypeAllBearers
)

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

Parameters

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

DoISPTypeL(TUint32, TCommsDbIspType &)

void DoISPTypeL ( TUint32 aUid,
TCommsDbIspType & aIspType
) [protected]

Indicates the ISP type of a given access point.

Parameters

TUint32 aUid The UID of the access point.
TCommsDbIspType & aIspType A reference to a TCommsDbIspType to hold the value

DoIsWlanL(TUint32)

TBool DoIsWlanL ( TUint32 aLanCommdbId ) [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 &)

void DoNameL ( TUint32 aUid,
TDes & aName
) [protected]

Reads the Name of a given access point

Parameters

TUint32 aUid The UID of the access point.
TDes & aName

DoSetISPTypeL(TUint32, TCommsDbIspType)

void DoSetISPTypeL ( TUint32 aUid,
TCommsDbIspType aIspType
) [protected]

Sets the ISP type for a given access point

Parameters

TUint32 aUid The UID of the access point
TCommsDbIspType aIspType The desired Isp type of the access point

DoSetNameL(TDes &, TUint32)

void DoSetNameL ( TDes & aName,
TUint32 aUid
) [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 & aName A reference to the name of the access point. The given name is returned in it.
TUint32 aUid The UID of the access point.

DoWapBearerTypeL(TUint32, TDes &)

void DoWapBearerTypeL ( TUint32 aUid,
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 aUid The UID of the access point.
TDes & aBearer A reference to a TBearer to hold the bearer type of the access point.

DoesExistsL(TPtrC, TUint32)

TBool DoesExistsL ( TPtrC aTable,
TUint32 aUid
) [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 aTable The name of the table to check
TUint32 aUid The UID to check for

HasMandatoryFieldsFilledL(TUint32)

IMPORT_C TBool HasMandatoryFieldsFilledL ( TUint32 aUid )

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 aUid The UID of the access point

HasWlanSSIDL(TUint32)

TBool HasWlanSSIDL ( TUint32 aLanCommdbId )

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 TBool IAPExistsL ( TUint32 aUid )

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 void ISPTypeL ( TUint32 aUid,
TCommsDbIspType & aIspType
)

Indicates the ISP type of a given access point.

Parameters

TUint32 aUid The UID of the access point.
TCommsDbIspType & aIspType A reference to a TCommsDbIspType to hold the value

IapIdFromWapIdL(TUint32)

IMPORT_C TUint32 IapIdFromWapIdL ( TUint32 aUid )

Gets the Iap record ID for a given access point ID

Parameters

TUint32 aUid The UID of the access point

IsAPInUseL(TUint32)

IMPORT_C TBool IsAPInUseL ( TUint32 aUid )

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

Parameters

TUint32 aUid The UID of the access point.

IsReadOnlyL(TUint32)

IMPORT_C TBool IsReadOnlyL ( TUint32 aUid )

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

Parameters

TUint32 aUid A UID to look for

IsValidNameL(const TDesC &)

IMPORT_C TBool IsValidNameL ( const TDesC & aNameText )

Indicates whether a given name is valid or not.

Parameters

const TDesC & aNameText The name to check.

IsValidNameL(const TDesC &, TUint32)

IMPORT_C TBool IsValidNameL ( const TDesC & aNameText,
TUint32 aAcceptUid
)

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 & aNameText The name to check.
TUint32 aAcceptUid A UID to accept with this name

IsWlanL(TUint32)

TBool IsWlanL ( TUint32 aLanCommdbId )

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 TBool MakeValidNameL ( TDes & aNameText )

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

Parameters

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

NameL(TUint32, TDes &)

IMPORT_C void NameL ( TUint32 aUid,
TDes & aName
)

Reads the Name of a given access point

Parameters

TUint32 aUid The 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 & aDb a reference to a CCommsDataBase object.

SetISPTypeL(TUint32, TCommsDbIspType)

IMPORT_C void SetISPTypeL ( TUint32 aUid,
TCommsDbIspType aIspType
)

Sets the ISP type for a given access point

Parameters

TUint32 aUid The UID of the access point
TCommsDbIspType aIspType The desired Isp type of the access point

SetNameL(TDes &, TUint32)

IMPORT_C void SetNameL ( TDes & aName,
TUint32 aUid
)

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 & aName A reference to the name of the access point. The given name is returned in it.
TUint32 aUid The UID of the access point.

WapApExistsL(TUint32)

IMPORT_C TBool WapApExistsL ( TUint32 aUid )

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

Parameters

TUint32 aUid the access point ID to check for.(Wap access point ID).

WapBearerTypeL(TUint32, TDes &)

IMPORT_C void WapBearerTypeL ( TUint32 aUid,
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 aUid The UID of the access point.
TDes & aBearer A reference to a TBearer to hold the bearer type of the access point.

WapIdFromIapIdL(TUint32)

IMPORT_C TUint32 WapIdFromIapIdL ( TUint32 aUid )

Gets the Wap record ID for a given Iap record ID

Parameters

TUint32 aUid The UID of the Iap

Member Data Documentation

CCommsDatabase * iDb

CCommsDatabase * iDb [private]

TUtilsExtra * iExt

TUtilsExtra * iExt [private]