API published in: S60 1st Ed
API deprecated in: S60 3rd Ed FP 2
Link against: apengine.lib
Required Capabilities
None
Exceptions
Functions modifying database (Create, Update, Delete) need WriteDeviceData. (CApDataHandler, CApUtils Setxxx functions)
#include <apaccesspointitem.h>
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 |
|
Destructor. |
|
C++ default constructor. |
|
This function returns the bearer type for the current access point.
|
|
This function returns the name of the connection Ownership is not passed.
|
|
Second-phase constructor. |
|
Copies the data from another CApAccessPointItem. Substitute for the "assignment operator". It requires allocation thus can leave. Wap Access Point Uid is not copied. |
|
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.
|
|
This function returns whether the access point is read-only or not.
|
|
Returnes whether the given access point is a VPN ap or not. |
|
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.
|
|
Inequality operator. Wap Access Point Uid is not counted. |
|
Equality operator. Wap Access Point Uid is not counted. |
|
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.
|
|
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.
|
|
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.
|
|
This function reads up a 16-bit text value from the specified column.
|
|
This function reads up an 8-bit text value from the specified column.
|
|
This function reads the length of the text in the specified column.
|
|
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.
|
|
This function checks the integrity of the CApAccessPointItem. Currently checks: IF WAP_IP_BEARER, WAP_ISP_TYPE conforms to IAP_SERVICE_TYPE
|
|
This function sets the bearer type for the current access point.
|
|
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.
|
|
Sets the current access point as VPN or as normal AP. Internal use only!
|
|
This function returns the current WAP bearer for the access point Ownership is not passed.
|
|
This function returns the ID of the access point.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|