|
|
|
Location:
cdbover.h
Link against: commdb.lib
class CCommDbOverrideSettings : public CBase
Supported from 5.0
Repository of override settings for columns in tables.
|
Defined in CCommDbOverrideSettings:
CCommDbOverrideSettings(), CheckL(), Compare(), ConstructL(), EBoolValue, EDes16Value, EDes8Value, EIntValue, ELongDesValue, EParamListFull, EParamListPartial, EUnknownType, FindOverride(), GetBoolOverride(), GetConnectionPreferenceOverride(), GetDesOverride(), GetDesOverride(), GetIntOverride(), GetLongDesOverride(), GetLongDesOverrideLength(), IllegalOverride(), IsOverridden(), MatchIapOverride(), NewL(), NewL(), PartialFull(), SetBoolOverride(), SetConnectionPreferenceOverride(), SetDesOverride(), SetDesOverride(), SetIntOverride(), SetLongDesOverride(), TParamList, TValueType, Type(), iDb, iIapOverrides, iOverrides, iPartialFull, ~CCommDbOverrideSettings()
Inherited from CBase:
operator new()
static CCommDbOverrideSettings* NewL(TParamList aParamList);
Withdrawn in 6.0
Supported from 7.0
Allocates and constructs an override settings object.
The construction process automatically opens the communications database and connects to the DBMS. The database is closed and the connection to the DBMS is severed when this override object is destroyed.
|
|
static CCommDbOverrideSettings* NewL(TParamList aParamList, TCommDbDatabaseType aType);
Supported from 6.0
Withdrawn in 7.0
Allocates and constructs an override settings object.
The construction process automatically opens the communications database and connects to the DBMS. The database is closed and the connection to the DBMS is severed when this override object is destroyed.
|
|
~CCommDbOverrideSettings();
Frees all resources owned by this object, prior to its destruction. Specifically, it closes the communications database and severs the connection with the DBMS.
TCommDbDatabaseType Type() const;
Supported from 6.0
Withdrawn in 7.0
Gets the database type.
|
TInt SetIntOverride(const TDesC& aTableName, const TDesC& aColumnName, TUint32 aValue);
Sets an override value for the specified unsigned integer type column in the specified table in the communications database.
If the column name is empty, i.e. the length of the descriptor
aColumnName is zero, then the override value is assumed to be the
overriding ID for the default record for table aTableName. This
means that the table must be one which supports default records.
For the function to succeed:
The column must exist
The column type must be an unsigned integer
An override for this column (or the overriding default record ID) for this table must not already exist
The table must be one which supports override settings
|
|
TInt SetBoolOverride(const TDesC& aTableName, const TDesC& aColumnName, TBool aValue);
Sets an override value for a boolean type column in the specified table in the communications database.
For the function to succeed:
The column must exist
The column type must be boolean
An override for this column for this table must not already exist.
The table must be one which supports override settings
|
|
TInt SetDesOverride(const TDesC& aTableName, const TDesC& aColumnName, const TDesC8& aValue);
Sets an override value for an 8 bit descriptor text type column in the specified table in the communications database.
For the function to succeed:
The column must exist
The column type must be narrow (ASCII) text
An override for this column for this table must not already exist.
The table must be one which supports override settings
In addition, the maximum length of text expected by this
function is the value of the constant KCommsDbSvrMaxFieldLength. The length of aValue supplied by the caller
cannot be greater than this value.
|
|
TInt SetDesOverride(const TDesC& aTableName, const TDesC& aColumnName, const TDesC16& aValue);
Sets an override value for a 16 bit descriptor text type column in the specified table in the communications database.
For the function to succeed:
The column must exist
The column type must be wide (UNICODE) text
An override for this column for this table must not already exist.
The table must be one which supports override settings
In addition, the maximum length of text expected by this
function is the value of the constant KCommsDbSvrMaxFieldLength. The length of aValue supplied by the caller
cannot be greater than this value.
|
|
TInt SetLongDesOverride(const TDesC& aTableName, const TDesC& aColumnName, const TDesC& aValue);
Sets an override value for a long text type column in a specified table in the communications database.
For the function to succeed:
The column must exist
The column type is assumed to be arbitrarily long text (within the limits defined by descriptors)
An override for this column for this table must not already exist.
The table must be one which supports override settings
|
|
TInt GetIntOverride(const TDesC& aTableName, const TDesC& aColumnName, TUint32& aValue);
Gets an override value for an unsigned integer type column in
the specified table in the communications database. If the column name is empty, i.e. the length of the descriptor
aColumnName is zero, then the override value is assumed to be the
overriding Id for the default record for table aTableName.
For this function to succeed:
an override for this column (or the the overriding default record Id) for this table must exist.
the table must be one which supports override settings.
|
|
TInt GetBoolOverride(const TDesC& aTableName, const TDesC& aColumnName, TBool& aValue);
Gets an override value for a boolean type column in the specified table in the communications database.
For this function to succeed:
an override for this column for this table must exist
the table must be one which supports override settings
|
|
TInt GetDesOverride(const TDesC& aTableName, const TDesC& aColumnName, TDes8& aValue);
Gets an override value for an 8 bit descriptor text type column in the specified table in the communications database.
For this function to succeed:
an override for this column for this table must exist
the table must be one which supports override settings
|
|
TInt GetDesOverride(const TDesC& aTableName, const TDesC& aColumnName, TDes16& aValue);
Gets an override value for a 16 bit descriptor text type column in the specified table in the communications database.
For this function to succeed:
an override for this column for this table must exist
the table must be one which supports override settings
|
|
TInt GetLongDesOverrideLength(const TDesC& aTableName, const TDesC& aColumnName, TInt& aLength);
Gets the length of the long text override value for a column in the specified table in the communications database.
For this function to succeed:
an override for this column for this table must exist
the table must be one which supports override settings
|
|
TInt GetLongDesOverride(const TDesC& aTableName, const TDesC& aColumnName, TDes& aValue);
Gets the override value for a column in the specified table in the communications database.
For this function to succeed:
an override for this column for this table must exist
the table must be one which supports override settings
|
|
aValue must
be large enough to contain the override text. Use the
TBool IsOverridden(const TDesC& aTableName, const TDesC& aColumnName, TValueType aType);
Tests whether an override value of a specified type exists in the communications database.
|
|
TParamList PartialFull() const;
Returns the value set in the constructor.
|
TBool Compare(CCommDbOverrideSettings* aOverrides) const;
Compares aOverrides with this class.
|
|
A note on overriding connection preferences. This is clearly a desirable thing to be able to do, so that the application may choose its own particular first and second preference for a connection. However, at the moment it is only possible to override one row of settings per table, i.e. it would only be possible to override the first ranked connection preferences or the second ranked connection preferences, but not both. To solve this problem, two API functions are added to the CCommDbOverrideSettings class specifically for overriding connection preferences:
TInt SetConnectionPreferenceOverride(const CCommsDbConnectionPrefTableView::TCommDbIapConnectionPref& aPref);
Supported from 6.1
Sets overrides for a record in the Connection preferences table.
The rank
(CONNECT_PREF_RANKING and the direction (CONNECTION_PREF_DIRECTION part of the aPref parameter must be filled in to indicate which connection preference is to be overridden. It is therefore not possible to override the rank or direction of a connection preference.
The other fields should be filled in one of the following ways to override the other settings:
Only dialog preference (CONNECT_PREF_DIALOG_PREF) is filled in to override this field (all others should have zero value).
Only bearer set and IAP ID (CONNECT_PREF_BEARER_SET) are filled in to override these fields (all other fields should have zero value).
The bearer set, IAP ID and the dialog preference are filled in to override thse fields.
CommDb treats zero values as fields that the client does not wish to override.
|
|
TInt GetConnectionPreferenceOverride(CCommsDbConnectionPrefTableView::TCommDbIapConnectionPref& aPref);
Supported from 6.1
Gets the overrides for a record in the Connection preferences
table. The client should set the ranking and the direction of the aPref parameter to the values to be matched when getting the override, e.g. set the iRanking member to 1 and iDirection to ECommDbConnectionDirectionOutgoing to retrieve the overrides for the outgoing connection preference with ranking 1.
|
|
TParamList
This enumeration has been deprecated in 7.0
Override setting flags returned by
PartialFull().
|
enum TValueType
The value types that may be stored in as overrides
|
protected: CCommDbOverrideSettings(TParamList aParamList);
This member is internal and not intended for use.
protected: TInt FindOverride(const TDesC& aTableName, const TDesC& aColumnName, TValueType aType) const;
This member is internal and not intended for use.
protected: TBool IllegalOverride(const TDesC& aTableName, const TDesC& aColumnName) const;
This member is internal and not intended for use.
protected: void CheckL(const TDesC& aTableName, const TDesC& aColumnName, TValueType aType) const;
This member is internal and not intended for use.
protected: static TBool MatchIapOverride(const TCommDbIapConnectionPrefOverride& aFirst, const TCommDbIapConnectionPrefOverride& aSecond);
This member is internal and not intended for use.
protected: RPointerArray<CCommDbOverride> iOverrides;
This member is internal and not intended for use.
protected: RArray<TCommDbIapConnectionPrefOverride> iIapOverrides;
This member is internal and not intended for use.
protected: CCommsDatabase* iDb;
This member is internal and not intended for use.