»
Symbian OS v9.3 »
Symbian OS reference »
C++ component reference »
Communications Infrastructure COMMDB_SHIM »
CCommsDatabase
Location:
COMMDB.H
Link against: commdb.lib
class CCommsDatabase : public CCommsDatabaseBase;
Description
Accesses the communications database through the DBMS.
An object of this type must be constructed and opened by a client before any of the tables in the database can be accessed,
e.g. to create views and access template records.
Implements the pure virtual functions CreateDatabaseL()
and DoOpen(). Responsible for Global settings and Connection Preferences. Has utility functions for accessing Global and
Agent tables. No additional state (to CCommsDatabaseBase
) is stored.
Derivation
CBase
- Base class for all classes to be instantiated on the heap
CCommsDatabase
- Accesses the communications database through the DBMS
Members
Defined in CCommsDatabase
:
ClearAgentAndExtL()
, ClearGlobalSettingL()
, CreateDatabaseL()
, GetAgentClientTimeoutL()
, GetAgentExtL()
, GetAgentL()
, GetAgentRouteTimeoutL()
, GetCurrentDialInSettingL()
, GetCurrentDialOutSettingL()
, GetDefaultTsyL()
, GetGlobalSettingL()
, GetGlobalSettingL()
, NewL()
, NewL()
, NewL()
, NewL()
, NewL()
, OpenConnectionPrefTableInRankOrderLC()
, OpenConnectionPrefTableLC()
, OpenConnectionPrefTableLC()
, OpenConnectionPrefTableViewOnRankLC()
, OpenIAPTableViewMatchingBearerSetLC()
, OpenIAPTableViewMatchingNetworkLC()
, OpenViewOnProxyRecordLC()
, SetAgentClientTimeoutL()
, SetAgentExtL()
, SetAgentL()
, SetAgentRouteTimeoutL()
, SetGlobalSettingL()
, SetGlobalSettingL()
, ~CCommsDatabase()
Inherited from CBase
:
Delete()
,
Extension_()
,
operator new()
Inherited from CCommsDatabaseBase
:
BeginTransaction()
,
CancelRequestNotification()
,
CheckReadCapability()
,
CheckWriteCapability()
,
CommitTransaction()
,
Database()
,
InTransaction()
,
IsDatabaseWriteLockedL()
,
OpenTableLC()
,
OpenViewLC()
,
OpenViewMatchingBoolLC()
,
OpenViewMatchingTextLC()
,
OpenViewMatchingUintLC()
,
RequestNotification()
,
ResolvePhoneNumberFromDatabaseL()
,
ResolvePhoneNumberL()
,
RollbackTransaction()
,
ShowHiddenRecords()
,
Version()
,
iDatabase
,
iImpl
,
iImplNotCreated
,
iInInternalTransaction
,
iNotifications
,
iNotifier
,
iNotifierOpenError
,
iShowHiddenRecords
Construction and destruction
static IMPORT_C CCommsDatabase *NewL();
Description
Allocates and constructs a new communications database object on the heap. If the database filestore does not exist the default
filestore is duplicated. If no default filestore exists an empty database is created.
If there is insufficient memory available to create the object, the function leaves. If allocation is successful, it returns
a pointer to the new object.
Return value
static IMPORT_C CCommsDatabase *NewL(TBool aUseDefaultDb);
Description
Creates a CCommsDatabase. If the database filestore exists and aUseDefaultDb is ETrue the default filestore is duplicated.
Otherwise an empty database is created. If the commdb doesn't exist and this and aUseDefaultDb is EFalse the this function
will leave.
Parameters
TBool aUseDefaultDb |
Use the default database.
|
|
Return value
Leave codes
KErrNotSupported |
when aUseDefaultDb is EFalse and the database filestore does not exists.
|
|
static IMPORT_C CCommsDatabase *NewL(TCommDbOpeningMethod &aOpeningMethod);
Description
Creates a CCommsDatabase as with NewL()
. The method of opening (Created, CopiedDefault or Opened) is returned in aOpeningMethod.
Parameters
Return value
virtual IMPORT_C ~CCommsDatabase();
Description
Frees all resources owned by this object, prior to its destruction.
In particular, the destructor closes the communications database and disconnects from the DBMS.
static IMPORT_C CCommsDatabase *NewL(TCommDbDatabaseType aDbType);
Description
Re-instated override variant of NewL function in order to maintain BC with 6.1
Parameters
Return value
CCommsDatabase *
|
CCommDbOverrideSettings* the calling function takes ownership of the returned object
|
|
static IMPORT_C CCommsDatabase *NewL(TCommDbDatabaseType aDbType, TCommDbOpeningMethod &aOpeningMethod);
Description
Re-instated override variant of NewL function in order to maintain BC with 6.1 Creates a CCommsDatabase and gets the method
of opening (Created, CopiedDefault or Opened).
Parameters
Return value
CCommsDatabase *
|
CCommDbOverrideSettings* the calling function takes ownership of the returned object.
|
|
Capability: |
Dependent |
on table, see the guide page referenced below. |
IMPORT_C void GetGlobalSettingL(const TDesC &aSetting, TUint32 &aValue);
Description
Gets a global settings table integer field.
If a client attempts to get the default Dial Out IAP with a Version 6.1 database, the function gets the default IAP in the
first connection preference for the outgoing direction if it is a dial out ISP-type IAP and returns its ID, otherwise an error
is returned.
If a client attempts to get the ASK_USER_BEFORE_DIAL field with a Version 6.1 database, the function returns a true value
if CONNECT_PREF_DIALOG_PREF in the first connection preference has been set to produce a prompt, otherwise false.
Parameters
const TDesC &aSetting |
Setting to get.
|
TUint32 &aValue |
On return, the setting value.
|
|
Leave codes
KErrNotSupported |
if aSetting is invalid; KErrNotFound if the global setting has not been set.
|
|
See also
Capability: |
Dependent |
on table, see the guide page referenced below. |
IMPORT_C void GetGlobalSettingL(const TDesC &aSetting, TDes &aValue);
Description
Gets a global settings table string field.
Parameters
const TDesC &aSetting |
Setting to get.
|
TDes &aValue |
On return, the setting value
|
|
Leave codes
KErrNotSupported |
if aSetting is invalid; KErrNotFound if the global setting has not been set
|
|
See also
Capability: |
Dependent |
on table, see the guide page referenced below. |
IMPORT_C void SetGlobalSettingL(const TDesC &aSetting, TUint32 aValue);
Description
Sets a global settings table integer field.
If a client attempts to set the default Dial Out IAP with a Version 6.1 database, the function sets the default IAP in the
first connection preference for the outgoing direction to the specified IAP, and the bearer set to CSD.
If a client attempts to set the ASK_USER_BEFORE_DIAL field with a Version 6.1 database, the function sets CONNECT_PREF_DIALOG_PREF
in the first connection preference to produce a prompt if true is specified, or do not prompt if false is specified.
Parameters
const TDesC &aSetting |
Setting to get.
|
TUint32 aValue |
Setting value.
|
|
Leave codes
KErrNotSupported |
aSetting is invalid.
|
|
See also
Capability: |
Dependent |
on table, see the guide page referenced below. |
IMPORT_C void SetGlobalSettingL(const TDesC &aSetting, const TDesC &aValue);
Description
Sets a global settings table string field.
Parameters
const TDesC &aSetting |
Setting to get.
|
const TDesC &aValue |
On return, the setting value.
|
|
Leave codes
KErrNotSupported |
aSetting is invalid.
|
|
See also
Capability: |
Dependent |
on table, see the guide page referenced below. |
IMPORT_C void ClearGlobalSettingL(const TDesC &aSetting);
Description
Clears a global settings table field.
Parameters
const TDesC &aSetting |
Setting to clear.
|
|
Leave codes
KErrNotSupported |
aSetting is invalid
|
|
See also
Capability: |
Dependent |
on table, see the guide page referenced below. |
IMPORT_C void GetDefaultTsyL(TDes &aValue);
Description
Retrieves the default TSY used for bearer availibility, SMS and data services.
Parameters
See also
GetCurrentDialOutSettingL()
IMPORT_C void GetCurrentDialOutSettingL(const TDesC &aSetting, TUint32 &aValue);
Description
Parameters
const TDesC &aSetting |
Setting to get.
|
TUint32 &aValue |
On return, setting value.
|
|
Leave codes
KErrNotSupported |
No longer supported.
|
|
GetCurrentDialInSettingL()
IMPORT_C void GetCurrentDialInSettingL(const TDesC &aSetting, TUint32 &aValue);
Description
Past use: Retrieve settings for the dial in IAP.
Parameters
const TDesC &aSetting |
Setting to get.
|
TUint32 &aValue |
On return, setting value.
|
|
Leave codes
KErrNotSupported |
No longer supported.
|
|
OpenConnectionPrefTableLC()
Capability: |
Dependent |
on table, see the guide page referenced below. |
IMPORT_C CCommsDbConnectionPrefTableView *OpenConnectionPrefTableLC();
Description
Opens a view on the whole Connection Preferences table and returns a pointer to it.
Shows hidden records only if requested.
When the use of the view object is complete it should be popped from the cleanup stack, and deleted.
Return value
OpenConnectionPrefTableLC()
Capability: |
Dependent |
on table, see the guide page referenced below. |
IMPORT_C CCommsDbConnectionPrefTableView *OpenConnectionPrefTableLC(TCommDbConnectionDirection aDirection);
Description
Opens a view on the records in the Connection Preferences table with a specified direction and return a pointer to it.
Shows hidden records only if requested..
When the use of the view object is complete, it should be popped from the cleanup stack, and deleted.
Parameters
Return value
OpenConnectionPrefTableInRankOrderLC()
Capability: |
Dependent |
on table, see the guide page referenced below. |
IMPORT_C CCommsDbConnectionPrefTableView *OpenConnectionPrefTableInRankOrderLC(TCommDbConnectionDirection aDirection);
Description
Opens a view on the records in the Connection Preferences table with a specified direction, and with records sorted into ranking
order.
Records are sorted in rank order from ranking 1 first. Records with rank 0 are not included.
Shows hidden records only if requested.
When the use of the view object is complete, it should be popped from the cleanup stack, and deleted.
Parameters
Return value
OpenConnectionPrefTableViewOnRankLC()
Capability: |
Dependent |
on table, see the guide page referenced below. |
IMPORT_C CCommsDbConnectionPrefTableView *OpenConnectionPrefTableViewOnRankLC(TCommDbConnectionDirection aDirection, TUint32
aRank);
Description
Opens a view on the records in the Connection Preferences table with a specified direction and ranking.
When the use of the view object is complete, it should be popped from the cleanup stack, and deleted.
Parameters
Return value
See also
IMPORT_C void SetAgentL(const TDesC &aService, const TDesC &aAgent);
Description
Parameters
const TDesC &aService |
The service that will use the agent. This is one of DIAL OUT ISP TABLE, DIAL IN ISP TABLE, OUTGOING WCDMA TABLE or CDMA2000
PACKET SERVICE TABLE.
|
const TDesC &aAgent |
The agent to use.
|
|
Leave codes
KErrNotSupported |
No longer supported.
|
|
IMPORT_C void SetAgentExtL(const TDesC &aService, const TDesC &aAgentExt);
Description
Past use: Sets the agent extension to be used when accessing the specified service.
Parameters
const TDesC &aService |
The service that will use the agent. This is one of DIAL OUT ISP TABLE, DIAL IN ISP TABLE, OUTGOING WCDMA TABLE or CDMA2000
PACKET SERVICE TABLE.
|
const TDesC &aAgentExt |
The agent extention to use.
|
|
Leave codes
KErrNotSupported |
No longer supported.
|
|
IMPORT_C void GetAgentL(const TDesC &aService, TDes &aAgent);
Description
Past use: Gets the agent associated with the specified service.
Parameters
const TDesC &aService |
The service that will use the agent. This is one of DIAL OUT ISP TABLE, DIAL IN ISP TABLE, OUTGOING WCDMA TABLE or CDMA2000
PACKET SERVICE TABLE.
|
TDes &aAgent |
On return, the agent.
|
|
Leave codes
KErrNotSupported |
No longer supported.
|
|
IMPORT_C void GetAgentExtL(const TDesC &aService, TDes &aAgentExt);
Description
Past use: Gets the agent extension associated with the specified service.
Parameters
const TDesC &aService |
The service that will use the agent. This is one of DIAL OUT ISP TABLE, DIAL IN ISP TABLE, OUTGOING WCDMA TABLE or CDMA2000
PACKET SERVICE TABLE.
|
TDes &aAgentExt |
On return, the agent extension.
|
|
Leave codes
KErrNotSupported |
No longer supported.
|
|
IMPORT_C void ClearAgentAndExtL(const TDesC &aService);
Description
Parameters
const TDesC &aService |
The service that will be cleared of all the agent settings.
|
|
IMPORT_C void SetAgentClientTimeoutL(const TDesC &aService, TInt aClientTimeout);
Description
Past use: Sets the client timeout associated with the specified service.
Parameters
const TDesC &aService |
The service that the client timeout is associated with. This is one of DIAL OUT ISP TABLE, DIAL IN ISP TABLE, OUTGOING WCDMA
TABLE or CDMA2000 PACKET SERVICE TABLE.
|
TInt aClientTimeout |
The client timeout.
|
|
Leave codes
KErrNotSupported |
No longer supported.
|
|
IMPORT_C void SetAgentRouteTimeoutL(const TDesC &aService, TInt aRouteTimeout);
Description
Past use: Sets the route timeout associated with the specified service.
Parameters
const TDesC &aService |
The service that the client route timeout is associated with. This is one of DIAL OUT ISP TABLE, DIAL IN ISP TABLE, OUTGOING
WCDMA TABLE or CDMA2000 PACKET SERVICE TABLE.
|
TInt aRouteTimeout |
The route timeout.
|
|
Leave codes
KErrNotSupported |
No longer supported.
|
|
IMPORT_C TInt GetAgentClientTimeoutL(const TDesC &aService);
Description
Past use: Gets the client timeout associated with the specified service.
Parameters
const TDesC &aService |
The service that the timeout is associated with. This is one of DIAL OUT ISP TABLE, DIAL IN ISP TABLE, OUTGOING WCDMA TABLE
or CDMA2000 PACKET SERVICE TABLE.
|
|
Return value
TInt
|
The agent timeout setting.
|
|
Leave codes
KErrNotSupported |
No longer supported.
|
|
IMPORT_C TInt GetAgentRouteTimeoutL(const TDesC &aService);
Description
Past use: Gets the route timeout associated with the specified service.
Parameters
const TDesC &aService |
The service that the route timeout is associated with. This is one of DIAL OUT ISP TABLE, DIAL IN ISP TABLE, OUTGOING WCDMA
TABLE or CDMA2000 PACKET SERVICE TABLE.
|
|
Return value
Leave codes
KErrNotSupported |
No longer supported.
|
|
OpenIAPTableViewMatchingBearerSetLC()
IMPORT_C CCommsDbTableView *OpenIAPTableViewMatchingBearerSetLC(TUint32 aBearerSet, TCommDbConnectionDirection aDirection);
Description
Open a view on the IAP table containing records that match the bearers and direction specified. `aBearerSet` is a bit mask
of type `TCommDbBearer`.
Parameters
Return value
See also
OpenIAPTableViewMatchingNetworkLC()
IMPORT_C CCommsDbTableView *OpenIAPTableViewMatchingNetworkLC(TUint32 aNetwork);
Description
Open a viewon the IAP table containing records which match the specified network
Parameters
Return value
See also
OpenViewOnProxyRecordLC()
Capability: |
Dependent |
on table, see the guide page referenced below. |
IMPORT_C CCommsDbTableView *OpenViewOnProxyRecordLC(TUint32 aServiceId, const TDesC &aServiceType);
Description
Opens a view on records in the Proxies table containing records that match the service ID and service type specified.
When the use of the view object is complete, it should be popped from the cleanup stack, and deleted.
Parameters
TUint32 aServiceId |
ID of the service to match
|
const TDesC &aServiceType |
Service type to match
|
|
Return value
Leave codes
KErrArgument |
if either aServiceId or aServiceType is invalid; other DBMS-related error codes.
|
|
private: virtual void CreateDatabaseL();
Description
CCommsDatabaseBase
pure virtuals