CApUtils Class Reference

API published in: S60 1st Ed
API deprecated in: S60 3rd Ed FP 2

Link against: apengine.lib

Capability Information

Required Capabilities

None

Exceptions

Functions modifying database (Create, Update, Delete) need WriteDeviceData. (CApDataHandler, CApUtils Setxxx functions)


#include <aputils.h>

Detailed Description

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).


Public Member Functions

virtual IMPORT_C  ~CApUtils ()
  Destructor.
IMPORT_C TBool  IsAPInUseL (TUint32 aUid)
  Indicates whether a given access point is in use or not.
IMPORT_C void  WapBearerTypeL (TUint32 aUid, TDes &aBearer)
  Indicates the WAP bearer type of a given access point.
IMPORT_C TApBearerType  BearerTypeL (TUint32 aUid)
  Gets the bearer type of a given access point.
IMPORT_C void  ISPTypeL (TUint32 aUid, TCommsDbIspType &aIspType)
  Indicates the ISP type of a given access point.
IMPORT_C TBool  IsValidNameL (const TDesC &aNameText)
  Indicates whether a given name is valid or not.
IMPORT_C TBool  MakeValidNameL (TDes &aNameText)
  TBool CApUtils::MakeValidNameL(TDes& aNameText); Creates a valid name based on the given one.
IMPORT_C void  NameL (TUint32 aUid, TDes &aName)
  Reads the Name of a given access point.
IMPORT_C void  SetNameL (TDes &aName, TUint32 aUid)
  Sets the Name of a given access point Name is validated and modified if needed.
IMPORT_C void  SetISPTypeL (TUint32 aUid, TCommsDbIspType aIspType)
  Sets the ISP type for a given access point.
IMPORT_C TUint32  IapIdFromWapIdL (TUint32 aUid)
  Gets the Iap record ID for a given access point ID.
IMPORT_C TUint32  WapIdFromIapIdL (TUint32 aUid)
  Gets the Wap record ID for a given Iap record ID.
IMPORT_C TBool  HasMandatoryFieldsFilledL (TUint32 aUid)
  Returns whether the access point has the WAP-mandatory fields filled or not.
IMPORT_C TBool  IAPExistsL (TUint32 aUid)
  Returns in a TBool whether the internet access point part identified by the passed aUid exists or not.
IMPORT_C TBool  WapApExistsL (TUint32 aUid)
  Returns in a TBool whether the access point identified by the passed aUid exists or not.
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.
IMPORT_C TBool  IsValidNameL (const TDesC &aNameText, TUint32 aAcceptUid)
  Indicates whether a given name is valid or not.
IMPORT_C TBool  IsReadOnlyL (TUint32 aUid)
  Determines whether a given AP is read-only or not.
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.
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.

Static Public Member Functions

static IMPORT_C CApUtils NewLC (CCommsDatabase &aDb)
  Two-phased constructor.

Protected Member Functions

IMPORT_C  CApUtils ()
  C++ default constructor.
IMPORT_C void  ConstructL (CCommsDatabase &aDb)
  Second-phase constructor.
void  DoWapBearerTypeL (TUint32 aUid, TDes &aBearer)
  Indicates the WAP bearer type of a given access point.
TApBearerType  DoBearerTypeL (TUint32 aUid)
  Gets the bearer type of a given access point.
void  DoISPTypeL (TUint32 aUid, TCommsDbIspType &aIspType)
  Indicates the ISP type of a given access point.
void  DoNameL (TUint32 aUid, TDes &aName)
  Reads the Name of a given access point.
void  DoSetNameL (TDes &aName, TUint32 aUid)
  Sets the Name of a given access point Name is validated and modified if needed.
void  DoSetISPTypeL (TUint32 aUid, TCommsDbIspType aIspType)
  Sets the ISP type for a given access point.
TBool  DoesExistsL (TPtrC aTable, TUint32 aUid)
  Returns in a TBool whether the record identified by the passed aUid exists or not in the table identified by the passed table name.
TBool  DoIsWlanL (TUint32 aLanCommdbId)
  Wrapper for public API.

Constructor & Destructor Documentation

virtual IMPORT_C CApUtils::~CApUtils  )  [virtual]
 

Destructor.

Deprecated:
IMPORT_C CApUtils::CApUtils  )  [protected]
 

C++ default constructor.

Deprecated:

Member Function Documentation

IMPORT_C TApBearerType CApUtils::BearerTypeL TUint32  aUid  ) 
 

Gets the bearer type of a given access point.

Leaves on error.

Parameters:
aUid  The UID of the access point.
Returns:
The type of the bearer.
Deprecated:
IMPORT_C void CApUtils::ConstructL CCommsDatabase &  aDb  )  [protected]
 

Second-phase constructor.

Deprecated:
TApBearerType CApUtils::DoBearerTypeL TUint32  aUid  )  [protected]
 

Gets the bearer type of a given access point.

Leaves on error.

Parameters:
aUid  The UID of the access point.
Returns:
The type of the bearer.
TBool CApUtils::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:
aTable  The name of the table to check
aUid  The UID to check for
Returns:
TBool indicating whether the record with the given ID exists in the given table or not.
IMPORT_C TBool CApUtils::DoHasMandatoryFieldsFilledL TUint32  aUid,
CCommsDbTableView *  aWapt = NULL,
TApBearerType  aBearertype = EApBearerTypeAllBearers
 

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

Parameters:
aUid  The UID of the access point
Returns:
TBool Are the WAP-mandatory fields filled in the access point?
Deprecated:
void CApUtils::DoISPTypeL TUint32  aUid,
TCommsDbIspType &  aIspType
[protected]
 

Indicates the ISP type of a given access point.

Parameters:
aUid  The UID of the access point.
aIspType  A reference to a TCommsDbIspType to hold the value
Returns:
No return value.
TBool CApUtils::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:
aUid  A UID to look for
Returns:
Boolean indicating if it is WLAN or not.
void CApUtils::DoNameL TUint32  aUid,
TDes &  aName
[protected]
 

Reads the Name of a given access point.

Parameters:
aUid  The UID of the access point.
A  reference to hold the name of the access point.
Returns:
no return value. Passed descriptor MUST be large enough to hold the new data, otherwise leaves with KErrDescOverflow.
void CApUtils::DoSetISPTypeL TUint32  aUid,
TCommsDbIspType  aIspType
[protected]
 

Sets the ISP type for a given access point.

Parameters:
aUid  The UID of the access point
aIspType  The desired Isp type of the access point
Returns:
no return value.
void CApUtils::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:
aName  A reference to the name of the access point. The given name is returned in it.
aUid  The UID of the access point.
Returns:
no return value.
void CApUtils::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:
aUid  The UID of the access point.
aBearer  A reference to a TBearer to hold the bearer type of the access point.
Returns:
no return value.
IMPORT_C TBool CApUtils::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:
aUid  The UID of the access point
Returns:
TBool Are the WAP-mandatory fields filled in the access point?
Deprecated:
TBool CApUtils::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:
aUid  A UID to look for
Returns:
Boolean indicating if it has WLAN SSID or not.
IMPORT_C TBool CApUtils::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.

Deprecated:
IMPORT_C TUint32 CApUtils::IapIdFromWapIdL TUint32  aUid  ) 
 

Gets the Iap record ID for a given access point ID.

Parameters:
aUid  The UID of the access point
Returns:
The Iap record ID.
Deprecated:
IMPORT_C TBool CApUtils::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:
aUid  The UID of the access point.
Returns:
Boolean indicating if it is in use (if used, TRUE)
Deprecated:
IMPORT_C void CApUtils::ISPTypeL TUint32  aUid,
TCommsDbIspType &  aIspType
 

Indicates the ISP type of a given access point.

Parameters:
aUid  The UID of the access point.
aIspType  A reference to a TCommsDbIspType to hold the value
Returns:
No return value.
Deprecated:
IMPORT_C TBool CApUtils::IsReadOnlyL TUint32  aUid  ) 
 

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

Parameters:
aUid  A UID to look for
Returns:
Boolean indicating if it is read-only or not.
Deprecated:
IMPORT_C TBool CApUtils::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:
aNameText  The name to check.
aAcceptUid  A UID to accept with this name
Returns:
Boolean indicating if it is valid or not.
Deprecated:
IMPORT_C TBool CApUtils::IsValidNameL const TDesC &  aNameText  ) 
 

Indicates whether a given name is valid or not.

Parameters:
aNameText  The name to check.
Returns:
Boolean indicating if it is valid or not.
Deprecated:
TBool CApUtils::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:
aUid  A UID to look for
Returns:
Boolean indicating if it is WLAN or not.
IMPORT_C TBool CApUtils::MakeValidNameL TDes &  aNameText  ) 
 

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

Parameters:
aNameText  The name to use for creating a valid name. The new name is returned in it, too.
Returns:
Whether the name was changed or not
Deprecated:
IMPORT_C void CApUtils::NameL TUint32  aUid,
TDes &  aName
 

Reads the Name of a given access point.

Parameters:
aUid  The UID of the access point.
A  reference to hold the name of the access point.
Returns:
no return value. Passed descriptor MUST be large enough to hold the new data, otherwise leaves with KErrDescOverflow.
Deprecated:
static IMPORT_C CApUtils* CApUtils::NewLC CCommsDatabase &  aDb  )  [static]
 

Two-phased constructor.

Leaves on failure, places instance on cleanup stack.

Parameters:
aDb  a reference to a CCommsDataBase object.
Returns:
The constructed CApUtils.
Deprecated:
IMPORT_C void CApUtils::SetISPTypeL TUint32  aUid,
TCommsDbIspType  aIspType
 

Sets the ISP type for a given access point.

Parameters:
aUid  The UID of the access point
aIspType  The desired Isp type of the access point
Returns:
no return value.
Deprecated:
IMPORT_C void CApUtils::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:
aName  A reference to the name of the access point. The given name is returned in it.
aUid  The UID of the access point.
Returns:
no return value.
Deprecated:
IMPORT_C TBool CApUtils::WapApExistsL TUint32  aUid  ) 
 

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

Parameters:
aUid  the access point ID to check for.(Wap access point ID).
Returns:
TBool indicating whether an access point with the given ID exists or not.
Deprecated:
IMPORT_C void CApUtils::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:
aUid  The UID of the access point.
aBearer  A reference to a TBearer to hold the bearer type of the access point.
Returns:
no return value.
Deprecated:
IMPORT_C TUint32 CApUtils::WapIdFromIapIdL TUint32  aUid  ) 
 

Gets the Wap record ID for a given Iap record ID.

Parameters:
aUid  The UID of the Iap
Returns:
The Wap access point ID.
Deprecated:

The documentation for this class was generated from the following file:

Copyright © Nokia Corporation 2001-2008
Back to top