Symbian
Symbian OS Library

SYMBIAN OS V9.3

[Index] [Spacer] [Previous] [Next]



Location: CDBPREFTABLE.H
Link against: commdb.lib

Class CCommsDbConnectionPrefTableView

class CCommsDbConnectionPrefTableView : public CBase;

Description

Implements actions on records of the Connection Preferences table, to allow clients to set the preferred order in which connections are attempted.

The class is similiar to CCommsDbTableView, but only allows access to connection preferences as a set and not to individual fields in the table. This prevents inappropriate updates of the records. Like CCommsDbTableView, the class has a group of functions for navigating through the records in the view, and another group for setting fields in the current record.

Clients do not create this type of object, but get an instance through CCommsDatabase::OpenConnectionPrefTableLC(), CCommsDatabase::OpenConnectionPrefTableInRankOrderLC(), or CCommsDatabase::OpenConnectionPrefTableViewOnRankLC().

In addition to the leave codes documented, all leaving functions can leave with any error returned by DBMS during database manipulation.

Derivation

Members

Defined in CCommsDbConnectionPrefTableView:
ChangeConnectionPreferenceRankL(), ColNum(), DeleteConnectionPreferenceL(), GotoFirstRecord(), GotoNextRecord(), GotoPreviousRecord(), InsertConnectionPreferenceL(), InsertConnectionPreferenceL(), ReadConnectionPreferenceL(), ReadConnectionPreferenceL(), SwapConnectionPreferencesL(), TCommDbIapBearer, TCommDbIapConnectionPref, TCommDbIspBearer, TCommDbIspConnectionPref, UpdateBearerL(), UpdateBearerL(), UpdateDialogPrefL(), iDb, iTableExt, iTableView, ~CCommsDbConnectionPrefTableView()

Inherited from CBase:
Delete(), Extension_(), operator new()


Construction and destruction


~CCommsDbConnectionPrefTableView()

virtual IMPORT_C ~CCommsDbConnectionPrefTableView();

Description

Destructor.

[Top]


Member functions


InsertConnectionPreferenceL()

Capability: Dependent on table, see the guide page referenced below.

IMPORT_C void InsertConnectionPreferenceL(const TCommDbIapConnectionPref &aPref, TBool aReadOnly=EFalse);

Description

Inserts a new IAP connection preference into the connetion preference table. The supplied `aPref` is checked to ensure that the rank and direction do not conflict with existing records. The dialog option, bearer set and IAP are checked for consistancy. Deprecated in 7.0 but re-instated to accommodate 6.1 BC

Parameters

const TCommDbIapConnectionPref &aPref

Settings for the new connection preference.

TBool aReadOnly

If ETrue the record is set to be read-only. If left unspecified the default is EFalse.

See also


ReadConnectionPreferenceL()

Capability: Dependent on table, see the guide page referenced below.

IMPORT_C void ReadConnectionPreferenceL(TCommDbIapConnectionPref &aPref);

Description

Gets the IAP connection preferences record currently selected in the view.

Parameters

TCommDbIapConnectionPref &aPref

On return, the connection preferences

Leave codes

KErrNotFound

There is no current record in the view

KErrUnknown

A field in the connection preference record is null

See also


UpdateBearerL()

Capability: Dependent on table, see the guide page referenced below.

IMPORT_C void UpdateBearerL(const TCommDbIapBearer &aUpdate, TBool aReadOnly=EFalse);

Description

Update the bearer set and IAP for the currently selected IAP connection preference record. The dialog option, bearer set and IAP are checked for consistancy. Deprecated in 7.0 but re-instated to accomodate 6.1 BC. Update the bearer set and iap for the currently selected connection preference. The dialog option, bearer set and IAP are checked for consistancy. The function sets the bearer set (CONNECT_PREF_BEARER_SET) and IAP (CONNECT_PREF_IAP) fields. The direction field (CONNECTION_PREF_DIRECTION) cannot be altered after it has been written to the record.

Parameters

const TCommDbIapBearer &aUpdate

Updated settings for the connection preference. Note that all fields need to be set, including any unchanged fields.

TBool aReadOnly

If true, the record is set to be read-only. If unspecified, EFalse by default.

Leave codes

KErrAccessDenied

The record cannot be updated as it is read-only; KErrArgument The specified IAP (aPref.iBearer.iIapId) cannot be used, as it does not fall in the bearer set defined by aPref.iBearer.iBearerSet and have the same direction as aPref.iDirection; KErrNotFound There is no current record in the view.

See also


UpdateDialogPrefL()

Capability: Dependent on table, see the guide page referenced below.

IMPORT_C void UpdateDialogPrefL(const TCommDbDialogPref &aUpdate);

Description

Updates the dialog preference field (CONNECT_PREF_DIALOG_PREF) in the currently selected connection preferences IAP record in the view.

Parameters

const TCommDbDialogPref &aUpdate

New value for the dialog preference field

Leave codes

KErrAccessDenied

The record cannot be updated as it is read-only

KErrNotFound

There is no current record in the view

See also


ChangeConnectionPreferenceRankL()

Capability: Dependent on table, see the guide page referenced below.

IMPORT_C void ChangeConnectionPreferenceRankL(TUint32 aNewRank);

Description

Sets the rank field (CONNECT_PREF_RANKING) in the currently selected connection preference record in the view.

Note that if the new rank is not zero, and there is already a record with this rank and the same direction, then the existing record's rank is set to zero. This means that record is not used when the system finds the preferred connections.

Parameters

TUint32 aNewRank

The new rank for the record.

Leave codes

KErrAccessDenied

The record cannot be updated as it is read-only

KErrNotFound

There is no current record in the view

KErrOverflow

aNewRank is greater than the maximum allowed


DeleteConnectionPreferenceL()

Capability: Dependent on table, see the guide page referenced below.

IMPORT_C void DeleteConnectionPreferenceL();

Description

Deletes the currently selected connection preference record in the view.


SwapConnectionPreferencesL()

Capability: Dependent on table, see the guide page referenced below.

IMPORT_C void SwapConnectionPreferencesL(TCommDbConnectionDirection aDirection, TUint32 aFirstRank, TUint32 aSecondRank);

Description

Swaps the bearer (CONNECT_PREF_BEARER_SET) and the IAP (CONNECT_PREF_IAP) fields between two connection preferences records.

The records to use are specified by their rank (CONNECT_PREF_RANKING) and direction (CONNECTION_PREF_DIRECTION).

Note that the dialogue option is not altered.

Parameters

TCommDbConnectionDirection aDirection

Direction of the connection preferences records

TUint32 aFirstRank

Rank of the first record to swap

TUint32 aSecondRank

Rank of the second record to swap

Leave codes

KErrAccessDenied

The record cannot be updated as it is read-only

KErrArgument

There is more than one record with the same ranking as one of the rankings

KErrNotFound

A record with one of the rankings does not exist

KErrOverflow

One of the rankings is greater than the maximum allowed

See also


GotoFirstRecord()

Capability: Dependent on table, see the guide page referenced below.

IMPORT_C TInt GotoFirstRecord();

Description

Sets the first connection preference record in this view as the current record.

Return value

TInt

KErrNotFound if the view has no records. Error codes from DBMS can also be returned.


GotoNextRecord()

Capability: Dependent on table, see the guide page referenced below.

IMPORT_C TInt GotoNextRecord();

Description

Sets the next connection preference record in the view as the current record.

Return value

TInt

KErrNotFound if the current record is the last in the view. Error codes from DBMS can also be returned.


GotoPreviousRecord()

Capability: Dependent on table, see the guide page referenced below.

IMPORT_C TInt GotoPreviousRecord();

Description

Sets the previous connection preference record in the view as the current record.

Return value

TInt

KErrNotFound if the current record is the first in the view. Error codes from DBMS can also be returned.


InsertConnectionPreferenceL()

IMPORT_C void InsertConnectionPreferenceL(const TCommDbIspConnectionPref &aPref, TBool aReadOnly=EFalse);

Description

Override version of InsertConnectionPreferenceL for BC purposes.

Parameters

const TCommDbIspConnectionPref &aPref

Preferences.

TBool aReadOnly

Read only?

See also


UpdateBearerL()

IMPORT_C void UpdateBearerL(const TCommDbIspBearer &aUpdate, TBool aReadOnly=EFalse);

Description

Override version of UpdateBearerL for BC purposes.

Parameters

const TCommDbIspBearer &aUpdate

Update.

TBool aReadOnly

Read only?

See also


ReadConnectionPreferenceL()

IMPORT_C void ReadConnectionPreferenceL(TCommDbIspConnectionPref &aPref);

Description

Framework left to support BC with v6.1

Parameters

TCommDbIspConnectionPref &aPref

Leave codes

KErrNotSupported

See also


ColNum()

protected: inline TDbColNo ColNum(const TDesC &aColumn) const;

Description

Returns the column number of the Column aColumn in the table

Coloumn concept doesn't exist in CommsDat depNot supported from v9.1

Parameters

const TDesC &aColumn

A reference to a descriptor containing the name of a column in the current record.

Return value

TDbColNo

The ordinal number of the column else KDbNullColNo if no such column exists.

[Top]


Member classes


Class TCommDbIapBearer

class TCommDbIapBearer;

Description

Encapsulates the bearer set (CONNECT_PREF_BEARER_SET) and IAP (CONNECT_PREF_IAP) fields. Used in calls to UpdateBearerL() and as a public member of TCommDbIapConnectionPref.

Members

Defined in CCommsDbConnectionPrefTableView::TCommDbIapBearer:
TCommDbIapBearer(), iBearerSet, iIapId

Construction and destruction


TCommDbIapBearer()

IMPORT_C TCommDbIapBearer();

Description

Default constructor. All member data is initialised to zero.

Member data


iBearerSet

TUint32 iBearerSet;

Description

Value for the bearer set (CONNECT_PREF_BEARER_SET) field.


iIapId

TUint32 iIapId;

Description

Value for the IAP (CONNECT_PREF_IAP) field.


Class TCommDbIapConnectionPref

class TCommDbIapConnectionPref;

Description

Encapsulates the rank (CONNECT_PREF_RANKING), direction (CONNECTION_PREF_DIRECTION), and dialog preference (CONNECT_PREF_DIALOG_PREF) fields, plus a TCommDbIapBearer object. A complete connection preference - containing rank, direction, dialogue option, bearers for the dialogue and the prefered IAP.

Members

Defined in CCommsDbConnectionPrefTableView::TCommDbIapConnectionPref:
TCommDbIapConnectionPref(), iBearer, iDialogPref, iDirection, iRanking, operator==()

See also:

Construction and destruction


TCommDbIapConnectionPref()

IMPORT_C TCommDbIapConnectionPref();

Description

Default constructor. The rank is set to 0, and the direction and dialog preference to unknown.

Member functions


operator==()

IMPORT_C TBool operator==(const TCommDbIapConnectionPref &aPref) const;

Description

Overloaded equality operator. Checks for equality between 'this' and another TCommDbIapConnectionPref object passed in.

Parameters

const TCommDbIapConnectionPref &aPref

Object to compare.

Return value

TBool

ETrue if all fields in the objects are equal, otherwise EFalse.

Member data


iRanking

TUint32 iRanking;

Description

Value for the rank (CONNECT_PREF_BEARER_SET) field.


iDirection

TCommDbConnectionDirection iDirection;

Description

Value for the direction (CONNECTION_PREF_DIRECTION) field.

See also:


iDialogPref

TCommDbDialogPref iDialogPref;

Description

Value for the dialog preference (CONNECT_PREF_DIALOG_PREF) field.

See also:


iBearer

TCommDbIapBearer iBearer;

Description

Values for the bearer (CONNECT_PREF_BEARER_SET) and IAP (CONNECT_PREF_IAP) fields.

See also:


Class TCommDbIspBearer

class TCommDbIspBearer;

Description

Frame left in place for BC with 6.1

Members

Defined in CCommsDbConnectionPrefTableView::TCommDbIspBearer:
TCommDbIspBearer()

Construction and destruction


TCommDbIspBearer()

IMPORT_C TCommDbIspBearer();

Description

Framework left in place for 6.1BC purposes.


Class TCommDbIspConnectionPref

class TCommDbIspConnectionPref;

Description

Members

Defined in CCommsDbConnectionPrefTableView::TCommDbIspConnectionPref:
TCommDbIspConnectionPref(), iBearer, operator==()

Construction and destruction


TCommDbIspConnectionPref()

IMPORT_C TCommDbIspConnectionPref();

Description

Framework left in place for 6.1BC purposes.

Member functions


operator==()

IMPORT_C TBool operator==(const TCommDbIspConnectionPref &aPref) const;

Description

Check for equality between 'this' and another TCommDbIspConnectionPref object passed in. Framework letf in place for 6.1BC purposes. Returns KErrNotSupported only.

Parameters

const TCommDbIspConnectionPref &aPref

Preferences.

Return value

TBool

KErrNotSupported Function has been deprecated therefore always return with this error.

Member data


iBearer

TCommDbIspBearer iBearer;

Description

[Top]


Member data


iTableView

protected: RDbView iTableView;

Description

DBMS view. Variable not used in shim. Not removed because of BC break


iTableExt

protected: CCommDbTableExtension * iTableExt;

Description


iDb

protected: CCommsDatabase & iDb;

Description

Comms data base that is being viewed.