A communications database can store multiple records of the same type, such as multiple IAPs. It can be useful to try a different connection after a first connection has failed: for example, to try a GSM connection if a GRPS connection is not available. To set the preferred order in which connections are attempted, the Connection preferences table is provided.
The table is accessed through a specialist class CCommsDbConnectionPrefTableView
, rather than a general CCommsDbTableView
. To obtain a CCommsDbConnectionPrefTableView
object, use one of the following CCommsDatabase
functions:
The table has a number of fields:
a ranking number that determines if the record is the first, or a lower, preference for making a connection
a flag that determines whether the system, on a connection attempt being started, should: a) offer the user a menu of the available connection options; b) warn that a connection is about to take place; or c) connect without further notifying the user.
the bearer to use
the direction of the connection (outgoing or incoming)
These settings are encapsulated in a CCommsDbConnectionPrefTableView::TCommDbIapConnectionPref
class.
In versions of CommDb before 6.1, instead of ranked preferences, there was a concept of a default connection setting, stored in the Global table.