Overrides allow CommDb clients to override the settings in the database. The system's connection components will then use these settings for the following connection only.
Override settings are implemented by the CCommDbOverrideSettings
class. Note that there is no need to explicitly open the communications database in order to use the override classes. The classes themselves access the communications database, but only to check that the tables and columns being overridden exist.
All setings in all tables can be overridden except the following:
all settings in the Modem table, except MODEM_TSY_NAME
all settings in the Proxies table
all settings in the WAP Access Point table
all global settings, except the CONNECTION_ATTEMPTS
setting
all settings in the GPRS Defaults table
Some special conditions apply to overriding connection preferences, as explained below.
Override settings are set according to column type, i.e. the class provides a member function for setting each column type, for example SetIntOverride()
and SetBoolOverride()
. This means that the user of the class must know the type of the column for which an override is being set.
Existing override settings can also be retrieved by using corresponding functions, for example, GetIntOverride()
and GetBoolOverride()
.
A set of override settings can be declared as being either full or partial. A client is free to assign its own meaning to this idea, but the usual interpretation is that:
full means that the CCommDbOverrideSettings
object maintains override values for all columns
partial means that the CCommDbOverrideSettings
object maintains override values for only some of the columns
An instance of CCommDbOverrideSettings
is declared as full or partial by passing a suitable TParamList
parameter to its NewL()
construction function.
Override settings can be stored in a CBufStore
by using CStoreableOverrideSettings
, a sub-class of CCommDbOverrideSettings
.
CStoreableOverrideSettings
provides the additional behaviour for streaming to and from memory and may be more suitable for passing the information across threads or across processes.
CCommDbOverrideSettings
is not used with the Connection preferences table. Instead, connection preferences can be overriden using SetConnectionPreferenceOverride()
. This takes a CCommsDbConnectionPrefTableView::TCommDbIapConnectionPref
parameter, which is used to specify which connection preference record to override, and the override values for the preferred bearer and/or the dialog. Direction and rank of a connection preference cannot be overriden.
Connection preference overrides can be retrieved with GetConnectionPreferenceOverride()
.