#include <cdbpreftable.h>
class CCommsDbConnectionPrefTableView : public CBase |
Protected Attributes | |
---|---|
CCommsDatabase & | iDb |
CCommDbTableExtension * | iTableExt |
RDbView | iTableView |
Protected Member Functions | |
---|---|
CCommsDbConnectionPrefTableView(CCommsDatabase &) | |
void | Close() |
TDbColNo | ColNum(const TDesC &) |
void | ConstructL(const TDbQuery &) |
void | ConstructL(TCommDbConnectionDirection, TBool) |
void | ConstructL(TCommDbConnectionDirection, TUint32) |
RDbRowSet::TAccess | GetL() |
void | GetUint32L(const TDesC &, TUint32 &) |
void | OpenL(const TDbQuery &) |
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.
See also: CCommDbOverrideSettings::GetConnectionPreferenceOverride() CCommDbOverrideSettings::SetConnectionPreferenceOverride()
RDbView | iTableView | [protected] |
DBMS view. Variable not used in shim. Not removed because of BC break
CCommsDbConnectionPrefTableView | ( | CCommsDatabase & | aDb | ) | [protected] |
Constructor
Parameter | Description |
---|---|
aDb | reference to the database to use. |
IMPORT_C | ~CCommsDbConnectionPrefTableView | ( | ) | [virtual] |
Destructor.
IMPORT_C void | ChangeConnectionPreferenceRankL | ( | TUint32 | aNewRank | ) |
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.
Parameter | Description |
---|---|
aNewRank | The new rank for the record. |
Returns the column number of the Column aColumn in the table
Coloumn concept doesn't exist in CommsDat depNot supported from v9.1
Parameter | Description |
---|---|
aColumn | A reference to a descriptor containing the name of a column in the current record. |
Returns: The ordinal number of the column else KDbNullColNo if no such column exists.
void | ConstructL | ( | const TDbQuery & | aQuery | ) | [protected] |
Prepares and evaluates the table view using the SQL query aQuery
DeprecatedThis method is deprecated from 9.1 and always returns/leaves with KErrNotSupported instead of describing past operation/parameters.
Parameter | Description |
---|---|
aQuery | Query to perform |
void | ConstructL | ( | TCommDbConnectionDirection | aDirection, |
TBool | aSortRanking | |||
) | [protected] |
Creates RecordSet Container and loads date to it.
void | ConstructL | ( | TCommDbConnectionDirection | aDirection, |
TUint32 | aRank | |||
) | [protected] |
Prepares and evaluates the table view using params
IMPORT_C void | DeleteConnectionPreferenceL | ( | ) |
RDbRowSet::TAccess | GetL | ( | ) | [protected] |
Gets the operations that can be performed on the current connection preference record If there isn't an access table at all, then treat the table as updatable.
Returns: EUpdatable, if All operations can be performed on the rowset. EReadOnly, Row navigation and reading are permitted. EInsertOnly, Inserting new rows is the only valid operation on the rowset.
IMPORT_C TInt | GotoFirstRecord | ( | ) |
Sets the first connection preference record in this view as the current record.
Returns: KErrNotFound if the view has no records. Error codes from DBMS can also be returned.
IMPORT_C TInt | GotoNextRecord | ( | ) |
Sets the next connection preference record in the view as the current record.
Returns: KErrNotFound if the current record is the last in the view. Error codes from DBMS can also be returned.
IMPORT_C TInt | GotoPreviousRecord | ( | ) |
Sets the previous connection preference record in the view as the current record.
Returns: KErrNotFound if the current record is the first in the view. Error codes from DBMS can also be returned.
IMPORT_C void | InsertConnectionPreferenceL | ( | const TCommDbIapConnectionPref & | aPref, |
TBool | aReadOnly = EFalse | |||
) |
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
Parameter | Description |
---|---|
aPref | Settings for the new connection preference. |
aReadOnly | If ETrue the record is set to be read-only. If left unspecified the default is EFalse. |
IMPORT_C void | InsertConnectionPreferenceL | ( | const TCommDbIspConnectionPref & | aPref, |
TBool | aReadOnly = EFalse | |||
) |
Override version of InsertConnectionPreferenceL for BC purposes. DeprecatedThis method is deprecated from 9.1 and always returns/leaves with KErrNotSupported instead of describing past operation/parameters.
Parameter | Description |
---|---|
aPref | Preferences. |
aReadOnly | Read only? |
CCommsDbConnectionPrefTableView * | NewL | ( | CCommsDatabase & | aDb, |
TCommDbConnectionDirection | aDirection, | |||
TUint32 | aRank | |||
) | [static] |
Create a view. Usually, however, views are created by calling one of the CCommsDatabase::OpenConnectionPrefTable*LC() functions.
Parameter | Description |
---|---|
aDb | reference to the database to use. |
Returns: Reference to the new CCommsDbConnectionPrefTableView.
CCommsDbConnectionPrefTableView * | NewLC | ( | CCommsDatabase & | aDb, |
const TDbQuery & | aQuery | |||
) | [static] |
CCommsDbConnectionPrefTableView definitions Create a view. Usually, however, views are created by calling one of the CCommsDatabase::OpenConnectionPrefTable*LC() functions.
DeprecatedThis method is deprecated from 9.1 and always returns/leaves with KErrNotSupported instead of describing past operation/parameters.
Parameter | Description |
---|---|
aDb | reference to the database to use. |
aQuery | Query to preform |
Returns: Reference to the new CCommsDbConnectionPrefTableView.
CCommsDbConnectionPrefTableView * | NewLC | ( | CCommsDatabase & | aDb, |
TCommDbConnectionDirection | aDirection, | |||
TBool | aSortRanking = EFalse | |||
) | [static] |
Create a view. Usually, however, views are created by calling one of the CCommsDatabase::OpenConnectionPrefTable*LC() functions.
Parameter | Description |
---|---|
aDb | reference to the database to use. |
aSortRanking | -> ETrue Sort by ranking, EFalse not sorted |
Returns: Reference to the new CCommsDbConnectionPrefTableView.
IMPORT_C void | ReadConnectionPreferenceL | ( | TCommDbIapConnectionPref & | aPref | ) |
Gets the IAP connection preferences record currently selected in the view.
Parameter | Description |
---|---|
aPref | On return, the connection preferences |
IMPORT_C void | ReadConnectionPreferenceL | ( | TCommDbIspConnectionPref & | aPref | ) |
Deprecatedin v7.0
IMPORT_C 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).
Note that the dialogue option is not altered.
Parameter | Description |
---|---|
aDirection | Direction of the connection preferences records |
aFirstRank | Rank of the first record to swap |
aSecondRank | Rank of the second record to swap |
IMPORT_C void | UpdateBearerL | ( | const TCommDbIapBearer & | aUpdate, |
TBool | aReadOnly = EFalse | |||
) |
Parameter | Description |
---|---|
aUpdate | Updated settings for the connection preference. Note that all fields need to be set, including any unchanged fields. |
aReadOnly | If true, the record is set to be read-only. If unspecified, EFalse by default. |
IMPORT_C void | UpdateBearerL | ( | const TCommDbIspBearer & | aUpdate, |
TBool | aReadOnly = EFalse | |||
) |
Override version of UpdateBearerL for BC purposes. DeprecatedThis method is deprecated from 9.1 and always returns/leaves with KErrNotSupported instead of describing past operation/parameters.
Parameter | Description |
---|---|
aUpdate | Update. |
aReadOnly | Read only? |
Returns: KErrNotSupported.
IMPORT_C void | UpdateDialogPrefL | ( | const TCommDbDialogPref & | aUpdate | ) |
Updates the dialog preference field (CONNECT_PREF_DIALOG_PREF) in the currently selected connection preferences IAP record in the view.
Parameter | Description |
---|---|
aUpdate | New value for the dialog preference field |