|
|
|
Location:
cdbpreftable.h
Link against: commdb.lib
class CCommsDbConnectionPrefTableView : public CBase;
Supported from 6.1
Provides access to 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.
|
Defined in CCommsDbConnectionPrefTableView:
CCommsDbConnectionPrefTableView(), ChangeConnectionPreferenceRankL(), CheckRankDoesNotExistL(), ColNum(), ConstructL(), DeleteConnectionPreferenceL(), DoGotoRecordL(), DoReadBearerInfoL(), DoSwapConnectionPreferencesL(), DoWriteBearerInfoL(), FindConnectionFromDirectionAndRankL(), GetUint32L(), GetUint32OrNull(), GotoFirstRecord(), GotoNextRecord(), GotoPreviousRecord(), InsertConnectionPreferenceL(), NewLC(), ReadConnectionPreferenceL(), RefreshL(), SetRankL(), SwapConnectionPreferencesL(), TCommDbIapBearer, TCommDbIapConnectionPref, UpdateBearerL(), UpdateDialogPrefL(), ValidateBearerAndDirectionL(), ValidateIapL(), ValidateRankL(), iColSet, iDb, iTableView, ~CCommsDbConnectionPrefTableView()
Inherited from CBase:
operator new()
CCommDbOverrideSettings::GetConnectionPreferenceOverride()CCommDbOverrideSettings::SetConnectionPreferenceOverride()static CCommsDbConnectionPrefTableView* NewLC(CCommsDatabase& aDb, const TDbQuery& aQuery);
Create a view. Usually, however, views are created by calling one of the CCommsDatabase::OpenConnectionPrefTable*LC() functions.
|
|
TInt GotoFirstRecord();
Sets the first record in the view as the current record.
|
TInt GotoNextRecord();
Sets the next record in the view as the current record.
|
TInt GotoPreviousRecord();
Sets the previous record in the view as the current record.
|
void ChangeConnectionPreferenceRankL(TUint32 aNewRank);
Sets the rank field (CONNECT_PREF_RANKING) in the current 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.
|
|
void InsertConnectionPreferenceL(const TCommDbIapConnectionPref& aPref, TBool aReadOnly = EFalse);
Insert a new 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.
|
|
void ReadConnectionPreferenceL(TCommDbIapConnectionPref& aPref);
Gets the connection preferences from the current record in the view.
|
|
void SwapConnectionPreferencesL(TCommDbConnectionDirection aDirection, TUint32 aFirstRank, TUint32 aSecondRank);
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).
|
|
void UpdateBearerL(const TCommDbIapBearer& aUpdate, TBool aReadOnly = EFalse);
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.
|
|
void UpdateDialogPrefL(const TCommDbDialogPref& aUpdate);
Updates the dialog preference field (CONNECT_PREF_DIALOG_PREF) in the current record in the view.
|
|
class TCommDbIapBearer;
Encapsulates the bearer set (CONNECT_PREF_BEARER_SET) and IAP (CONNECT_PREF_IAP) fields.
Defined in CCommsDbConnectionPrefTableView::TCommDbIapBearer:
TCommDbIapBearer(), iBearerSet, iIapId
TCommDbIapBearer()TCommDbIapBearer();
Default constructor.
All member data is initialised to zero.
iBearerSetTUint32 iBearerSet;
Value for the bearer set (CONNECT_PREF_BEARER_SET) field.
iIapIdTUint32 iIapId;
Value for the IAP (CONNECT_PREF_IAP) field.
class TCommDbIapConnectionPref;
Encapsulates the rank (CONNECT_PREF_RANKING), direction (CONNECTION_PREF_DIRECTION), and dialog preference (CONNECT_PREF_DIALOG_PREF) fields, plus a TCommDbIapBearer object.
Defined in CCommsDbConnectionPrefTableView::TCommDbIapConnectionPref:
TCommDbIapConnectionPref(), iBearer, iDialogPref, iDirection, iRanking, operator==()
TCommDbIapConnectionPref()TCommDbIapConnectionPref();
Default constructor.
The rank is set to 0, and the direction and dialog preference to unknown.
operator==()TBool operator==(const TCommDbIapConnectionPref& aPref) const;
Overloaded equality operator.
|
|
iRankingTUint32 iRanking;
Value for the rank (CONNECT_PREF_BEARER_SET) field.
iDirectionTCommDbConnectionDirection iDirection;
Value for the direction (CONNECTION_PREF_DIRECTION) field.
iDialogPrefTCommDbDialogPref iDialogPref;
Value for the dialog preference (CONNECT_PREF_DIALOG_PREF) field.
iBearerTCommDbIapBearer iBearer;
Values for the bearer (CONNECT_PREF_BEARER_SET) and IAP (CONNECT_PREF_IAP) fields.
private: CCommsDbConnectionPrefTableView(CCommsDatabase& aDb);
This member is internal and not intended for use.
private: void ConstructL(const TDbQuery& aQuery);
This member is internal and not intended for use.
private: void RefreshL(TBool aMustBeWriteable);
This member is internal and not intended for use.
private: void SetRankL(TUint32 aNewRank, TBool aNotify=ETrue);
This member is internal and not intended for use.
private: void FindConnectionFromDirectionAndRankL(TCommDbConnectionDirection aDirection, TUint32 aRank, TDbBookmark& aBookmark);
This member is internal and not intended for use.
private: inline TDbColNo ColNum(const TDesC& aColumn) const;
This member is internal and not intended for use.
private: void DoReadBearerInfoL(TCommDbCommonBearerInfo& aInfo);
This member is internal and not intended for use.
private: void DoWriteBearerInfoL(const TCommDbCommonBearerInfo& aInfo);
This member is internal and not intended for use.
private: void DoSwapConnectionPreferencesL(TCommDbConnectionDirection aDirection, TUint32 aFirstRank, TUint32 aSecondRank);
This member is internal and not intended for use.
private: void CheckRankDoesNotExistL(TUint32 aRank, TCommDbConnectionDirection aDirection);
This member is internal and not intended for use.
private: void GetUint32L(const TDesC& aColumnName, TUint32& aValue);
This member is internal and not intended for use.
private: void GetUint32OrNull(const TDesC& aColumnName, TUint32& aValue, TBool& aExists);
This member is internal and not intended for use.
private: void ValidateIapL(TUint32 aIapId, TCommDbConnectionDirection aDirection, TUint32 aBearerSet, TCommDbDialogPref aDlgPref);
This member is internal and not intended for use.
private: void ValidateBearerAndDirectionL(const TDesC& aServiceType, TCommDbConnectionDirection aDirection, TUint32 aBearerSet, TCommDbDialogPref aDlgPref);
This member is internal and not intended for use.
private: void ValidateRankL(TUint32 aRank);
This member is internal and not intended for use.
private: void DoGotoRecordL(RDbView::TPosition aPos);
This member is internal and not intended for use.
private: CDbColSet* iColSet;
This member is internal and not intended for use.