CApAccessPointItem 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 <apaccesspointitem.h>

Detailed Description

CApAccessPointItem is used to exchange data between engine and client.

It holds the information for an access point including WAP, IAP, ISP (if present & applies). This class uses the same approach as CommDB to read and write data: it has functions for each data type implemented. To read or write the data, we have to know the data type and the enum name of the 'column'. The column values has the names of the database columns with the 'EAp' prefix. The reason for this (not using the database column descriptors) is performance. It is much faster to compare enum values than literals.


Public Member Functions

virtual IMPORT_C  ~CApAccessPointItem ()
  Destructor.
IMPORT_C void  CopyFromL (const CApAccessPointItem &aCopyFrom)
  Copies the data from another CApAccessPointItem.
IMPORT_C TBool  operator== (const CApAccessPointItem &aitem) const
  Equality operator.
IMPORT_C TBool  operator!= (const CApAccessPointItem &aitem) const
  Inequality operator.
IMPORT_C void  ReadTextL (const TApMember aColumn, TDes8 &aValue)
  This function reads up an 8-bit text value from the specified column.
IMPORT_C void  ReadTextL (const TApMember aColumn, TDes16 &aValue)
  This function reads up a 16-bit text value from the specified column.
IMPORT_C HBufC *  ReadLongTextL (const TApMember aColumn)
  NOTE: This function is deprecated.
IMPORT_C const HBufC *  ReadConstLongTextL (const TApMember aColumn)
  This function reads up a long text value from the specified column.
IMPORT_C TUint32  ReadTextLengthL (const TApMember aColumn)
  This function reads the length of the text in the specified column.
IMPORT_C TInt  ReadUint (const TApMember aColumn, TUint32 &aValue)
  This function reads up a TUint32 value from the specified column.
IMPORT_C TInt  ReadBool (const TApMember aColumn, TBool &aValue)
  This function reads up a boolean value from the specified column.
IMPORT_C TInt  WriteTextL (const TApMember aColumn, const TDesC8 &aValue)
  This function writes an 8-bit text value to the specified column.
IMPORT_C TInt  WriteTextL (const TApMember aColumn, const TDesC16 &aValue)
  This function writes a 16-bit text value to the specified column.
IMPORT_C TInt  WriteLongTextL (const TApMember aColumn, const TDesC &aValue)
  This function writes a long text value to the specified column.
IMPORT_C TInt  WriteUint (const TApMember aColumn, const TUint32 &aValue)
  This function writes a TUint32 value to the specified column.
IMPORT_C TInt  WriteBool (const TApMember aColumn, const TBool &aValue)
  This function writes a boolean value to the specified column.
IMPORT_C TUint32  WapUid () const
  This function returns the ID of the access point.
IMPORT_C const TDesC &  ConnectionName () const
  This function returns the name of the connection Ownership is not passed.
IMPORT_C const TDesC &  WapBearer () const
  This function returns the current WAP bearer for the access point Ownership is not passed.
IMPORT_C TApBearerType  BearerTypeL ()
  This function returns the bearer type for the current access point.
IMPORT_C void  SetBearerTypeL (TApBearerType aBearer)
  This function sets the bearer type for the current access point.
IMPORT_C void  SetNamesL (const TDesC16 &aValue)
  This function writes a 16-bit text value to the 'name' fields of the access point.
IMPORT_C TBool  SanityCheckOk ()
  This function checks the integrity of the CApAccessPointItem.
IMPORT_C TBool  HasSameIspAndBearerL (CApAccessPointItem &aItem)
  This function compares this and the passed CApAccessPointItem whether they have the same ISP and bearer Returns true if the APs have the same phone number.
IMPORT_C TBool  IsReadOnly () const
  This function returns whether the access point is read-only or not.
TBool  IsVpnAp () const
  Returnes whether the given access point is a VPN ap or not.
void  SetVpnAp (TBool aIsVpn)
  Sets the current access point as VPN or as normal AP.

Static Public Member Functions

static IMPORT_C CApAccessPointItem NewLC ()
  Two-phased constructor.

Protected Member Functions

IMPORT_C  CApAccessPointItem ()
  C++ default constructor.
IMPORT_C void  ConstructL ()
  Second-phase constructor.

Friends

class  CApDataHandler

Constructor & Destructor Documentation

virtual IMPORT_C CApAccessPointItem::~CApAccessPointItem  )  [virtual]
 

Destructor.

Deprecated:
IMPORT_C CApAccessPointItem::CApAccessPointItem  )  [protected]
 

C++ default constructor.

Deprecated:

Member Function Documentation

IMPORT_C TApBearerType CApAccessPointItem::BearerTypeL  ) 
 

This function returns the bearer type for the current access point.

Returns:
The current bearer type for the access point
Deprecated:
IMPORT_C const TDesC& CApAccessPointItem::ConnectionName  )  const
 

This function returns the name of the connection Ownership is not passed.

Returns:
The name of the connection
Deprecated:
IMPORT_C void CApAccessPointItem::ConstructL  )  [protected]
 

Second-phase constructor.

Deprecated:
IMPORT_C void CApAccessPointItem::CopyFromL const CApAccessPointItem aCopyFrom  ) 
 

Copies the data from another CApAccessPointItem.

Substitute for the "assignment operator". It requires allocation thus can leave. Wap Access Point Uid is not copied.

Deprecated:
IMPORT_C TBool CApAccessPointItem::HasSameIspAndBearerL CApAccessPointItem aItem  ) 
 

This function compares this and the passed CApAccessPointItem whether they have the same ISP and bearer Returns true if the APs have the same phone number.

Parameters:
aItem  a CApAccessPointItem to compare with
Returns:
whether the APs have the same isp and bearer
Deprecated:
IMPORT_C TBool CApAccessPointItem::IsReadOnly  )  const
 

This function returns whether the access point is read-only or not.

Returns:
Whether the current access point is read-only or not.
Deprecated:
TBool CApAccessPointItem::IsVpnAp  )  const
 

Returnes whether the given access point is a VPN ap or not.

static IMPORT_C CApAccessPointItem* CApAccessPointItem::NewLC  )  [static]
 

Two-phased constructor.

Leaves on failure, places instance on cleanup stack. Instance is initialised to default values. The created instance is suitable for passing to CApDataHandler's functions, contains all necessary information.

Returns:
The constructed CApAccessPointItem.
Deprecated:
IMPORT_C TBool CApAccessPointItem::operator!= const CApAccessPointItem aitem  )  const
 

Inequality operator.

Wap Access Point Uid is not counted.

Deprecated:
IMPORT_C TBool CApAccessPointItem::operator== const CApAccessPointItem aitem  )  const
 

Equality operator.

Wap Access Point Uid is not counted.

Deprecated:
IMPORT_C TInt CApAccessPointItem::ReadBool const TApMember  aColumn,
TBool &  aValue
 

This function reads up a boolean value from the specified column.

If the specified column does not exist (that is, not part of the database structure), it will Panic in debug builds and it will return KErrInvalidColumn in release builds without Panicking. Panic is used in debug builds because it indicates a programming error. In release, it 'notifies' the caller about the error through the return value but enables system to continue operation.

Parameters:
aColumn  Enum value indicating the column to read.
aValue  A reference to a boolean to hold the value
Returns:
Error code.
Deprecated:
IMPORT_C const HBufC* CApAccessPointItem::ReadConstLongTextL const TApMember  aColumn  ) 
 

This function reads up a long text value from the specified column.

The ownership is not passed to the caller. It means that the caller should not delete the received value. If the caller must take the ownership for any reason, must make a copy and use that and delete the copy when no longer needed.

Parameters:
aColumn  Enum value indicating the column to read.
Returns:
A const HBufC* to the value.
Deprecated:
IMPORT_C HBufC* CApAccessPointItem::ReadLongTextL const TApMember  aColumn  ) 
 

NOTE: This function is deprecated.

Use ReadConstLongTextL! This function reads up a long text value from the specified column. The ownership is not passed to the caller. It means that the caller should not delete the received value. If the caller must take the ownership for any reason, must make a copy and use that and delete the copy when no longer needed.

Parameters:
aColumn  Enum value indicating the column to read.
Returns:
A HBufC* to the value.
Deprecated:
IMPORT_C void CApAccessPointItem::ReadTextL const TApMember  aColumn,
TDes16 &  aValue
 

This function reads up a 16-bit text value from the specified column.

Parameters:
aColumn  Enum value indicating the column to read.
aValue  Reference to a 16-bit descriptor to hold the value
Returns:
no return value
Deprecated:
IMPORT_C void CApAccessPointItem::ReadTextL const TApMember  aColumn,
TDes8 &  aValue
 

This function reads up an 8-bit text value from the specified column.

Parameters:
aColumn  Enum value indicating the column to read.
aValue  Reference to an 8-bit descriptor to hold the value
Returns:
no return value
Deprecated:
IMPORT_C TUint32 CApAccessPointItem::ReadTextLengthL const TApMember  aColumn  ) 
 

This function reads the length of the text in the specified column.

Parameters:
aColumn  Enum value indicating the column to read.
Returns:
The length of the text in that column.
Deprecated:
IMPORT_C TInt CApAccessPointItem::ReadUint const TApMember  aColumn,
TUint32 &  aValue
 

This function reads up a TUint32 value from the specified column.

In case the given value was not written to the database, it will return KErrValueUnspecified. If the specified column does not exist (that is, not part of the database structure), it will Panic in debug builds and it will return KErrInvalidColumn in release builds without Panicking. Panic is used in debug builds because it indicates a programming error. In release, it 'notifies' the caller about the error through the return value but enables system to continue operation.

Parameters:
aColumn  Enum value indicating the column to read.
aValue  A reference to a TUint32 to hold the value
Returns:
Error code.
Deprecated:
IMPORT_C TBool CApAccessPointItem::SanityCheckOk  ) 
 

This function checks the integrity of the CApAccessPointItem.

Currently checks: IF WAP_IP_BEARER, WAP_ISP_TYPE conforms to IAP_SERVICE_TYPE

Returns:
Boolean indicating whether the sanity check has passed(ETrue) or not(EFalse)
Deprecated:
IMPORT_C void CApAccessPointItem::SetBearerTypeL TApBearerType  aBearer  ) 
 

This function sets the bearer type for the current access point.

Parameters:
aBearer  TApBearerType enum indicating the desired bearer type.
Returns:
No return value.
Deprecated:
IMPORT_C void CApAccessPointItem::SetNamesL const TDesC16 &  aValue  ) 
 

This function writes a 16-bit text value to the 'name' fields of the access point.

This includes: WAP_ACCESS_POINT, IAP, Dial/in/out/Gprs In/Out table's COMM_DB_NAME fields. These fields are (by TApMember): EApWapAccessPointName, EApIapName, EApIspName. It is useful if we need to use same names.

Parameters:
aValue  A const reference to a 16-bit text descriptor to the value.
Returns:
No return value.
Deprecated:
void CApAccessPointItem::SetVpnAp TBool  aIsVpn  ) 
 

Sets the current access point as VPN or as normal AP.

Internal use only!

Parameters:
aIsVpn  a TBool specifiyng that the current AP is VPN or not.
IMPORT_C const TDesC& CApAccessPointItem::WapBearer  )  const
 

This function returns the current WAP bearer for the access point Ownership is not passed.

Returns:
The current WAP bearer for the access point
Deprecated:
IMPORT_C TUint32 CApAccessPointItem::WapUid  )  const
 

This function returns the ID of the access point.

Returns:
The ID of this access point
Deprecated:
IMPORT_C TInt CApAccessPointItem::WriteBool const TApMember  aColumn,
const TBool &  aValue
 

This function writes a boolean value to the specified column.

If the specified column does not exist (that is, not part of the database structure), it will Panic in debug builds and it will return KErrInvalidColumn in release builds without Panicking. Panic is used in debug builds because it indicates a programming error. In release, it 'notifies' the caller about the error through the return value but enables system to continue operation.

Parameters:
aColumn  Enum value indicating the column to write.
aValue  A const reference to a boolean value
Returns:
Error code.
Deprecated:
IMPORT_C TInt CApAccessPointItem::WriteLongTextL const TApMember  aColumn,
const TDesC &  aValue
 

This function writes a long text value to the specified column.

If the specified column does not exist (that is, not part of the database structure), it will Panic in debug builds and it will return KErrInvalidColumn in release builds without Panicking. Panic is used in debug builds because it indicates a programming error. In release, it 'notifies' the caller about the error through the return value but enables system to continue operation. This function can Leave if the copying of the text does not succeed.

Parameters:
aColumn  Enum value indicating the column to write.
aValue  Reference to a 16-bit text descriptor to the value
Returns:
Error code.
Deprecated:
IMPORT_C TInt CApAccessPointItem::WriteTextL const TApMember  aColumn,
const TDesC16 &  aValue
 

This function writes a 16-bit text value to the specified column.

If the specified column does not exist (that is, not part of the database structure), it will Panic in debug builds and it will return KErrInvalidColumn in release builds without Panicking. Panic is used in debug builds because it indicates a programming error. In release, it 'notifies' the caller about the error through the return value but enables system to continue operation. This function can Leave if the copying of the text does not succeed.

Parameters:
aColumn  Enum value indicating the column to write.
aValue  Reference to a 16-bit text descriptor to the value
Returns:
Error code.
Deprecated:
IMPORT_C TInt CApAccessPointItem::WriteTextL const TApMember  aColumn,
const TDesC8 &  aValue
 

This function writes an 8-bit text value to the specified column.

If the specified column does not exist (that is, not part of the database structure), it will Panic in debug builds and it will return KErrInvalidColumn in release builds without Panicking. Panic is used in debug builds because it indicates a programming error. In release, it 'notifies' the caller about the error through the return value but enables system to continue operation. This function can Leave if the copying of the text does not succeed. Possible leave codes are the system leave codes.

Parameters:
aColumn  Enum value indicating the column to write.
aValue  Reference to an 8-bit text descriptor to the value
Returns:
Error code.
Deprecated:
IMPORT_C TInt CApAccessPointItem::WriteUint const TApMember  aColumn,
const TUint32 &  aValue
 

This function writes a TUint32 value to the specified column.

If the specified column does not exist (that is, not part of the database structure), it will Panic in debug builds and it will return KErrInvalidColumn in release builds without Panicking. Panic is used in debug builds because it indicates a programming error. In release, it 'notifies' the caller about the error through the return value but enables system to continue operation.

Parameters:
aColumn  Enum value indicating the column to write.
aValue  A const reference to a TUint32 value
Returns:
Error code.
Deprecated:

Friends And Related Function Documentation

friend class CApDataHandler [friend]
 

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

Copyright © Nokia Corporation 2001-2008
Back to top