#include <commdb.h>
Link against: commdb.lib
class CCommsDatabase : public CCommsDatabaseBase |
Protected Member Functions | |
---|---|
CCommsDatabase() | |
void | DoOpenL(TCommDbOpeningMethod &, TBool) |
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.
IMPORT_C | ~CCommsDatabase | ( | ) | [virtual] |
Frees all resources owned by this object, prior to its destruction.
In particular, the destructor closes the communications database and disconnects from the DBMS.
IMPORT_C void | ClearAgentAndExtL | ( | const TDesC & | aService | ) |
DeprecatedThis method is deprecated from 9.1 and always returns/leaves with KErrNotSupported instead of describing past operation/parameters.
Deprecated
Parameters | |
---|---|
aService | The service that will be cleared of all the agent settings. |
IMPORT_C void | ClearGlobalSettingL | ( | const TDesC & | aSetting | ) |
Clears a global settings table field.
Parameters | |
---|---|
aSetting | Setting to clear. |
Leave Codes | |
---|---|
KErrNotSupported | aSetting is invalid |
Capability | |
---|---|
Dependent | on table, see the guide page referenced below. |
void | DoOpenL | ( | TCommDbOpeningMethod & | aOpeningMethod, |
TBool | aUseDefaultDb | |||
) | [protected] |
Connects to the Commsdat and set version number
Parameters | |
---|---|
aService | The service that the timeout is associated with. This is one of DIAL OUT ISP TABLE, DIAL IN ISP TABLE, OUTGOING WCDMA TABLE. |
Leave Codes | |
---|---|
KErrNotSupported | No longer supported. |
Parameters | |
---|---|
aService | The service that will use the agent. This is one of DIAL OUT ISP TABLE, DIAL IN ISP TABLE, OUTGOING WCDMA TABLE. |
aAgentExt | On return, the agent extension. |
Leave Codes | |
---|---|
KErrNotSupported | No longer supported. |
Parameters | |
---|---|
aService | The service that will use the agent. This is one of DIAL OUT ISP TABLE, DIAL IN ISP TABLE, OUTGOING WCDMA TABLE. |
aAgent | On return, the agent. |
Leave Codes | |
---|---|
KErrNotSupported | No longer supported. |
Parameters | |
---|---|
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. |
Leave Codes | |
---|---|
KErrNotSupported | No longer supported. |
DeprecatedThis method is deprecated from 9.1 and always returns/leaves with KErrNotSupported instead of describing past operation/parameters.
Past use: Retrieve settings for the dial in IAP.
Parameters | |
---|---|
aSetting | Setting to get. |
aValue | On return, setting value. |
Leave Codes | |
---|---|
KErrNotSupported | No longer supported. |
DeprecatedThis method is deprecated from 9.1 and always returns/leaves with KErrNotSupported instead of describing past operation/parameters.
Parameters | |
---|---|
aSetting | Setting to get. |
aValue | On return, setting value. |
Leave Codes | |
---|---|
KErrNotSupported | No longer supported. |
IMPORT_C void | GetDefaultTsyL | ( | TDes & | aValue | ) |
Capability | |
---|---|
Dependent | on table, see the guide page referenced below. |
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 | |
---|---|
aSetting | Setting to get. |
aValue | On return, the setting value. |
Leave Codes | |
---|---|
KErrNotSupported | if aSetting is invalid; KErrNotFound if the global setting has not been set. |
Capability | |
---|---|
Dependent | on table, see the guide page referenced below. |
Gets a global settings table string field.
Parameters | |
---|---|
aSetting | Setting to get. |
aValue | On return, the setting value |
Leave Codes | |
---|---|
KErrNotSupported | if aSetting is invalid; KErrNotFound if the global setting has not been set |
Capability | |
---|---|
Dependent | on table, see the guide page referenced below. |
IMPORT_C CCommsDatabase * | NewL | ( | ) | [static] |
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.
IMPORT_C CCommsDatabase * | NewL | ( | TBool | aUseDefaultDb | ) | [static] |
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 | |
---|---|
aUseDefaultDb | Use the default database. |
Leave Codes | |
---|---|
KErrNotSupported | when aUseDefaultDb is EFalse and the database filestore does not exists. |
IMPORT_C CCommsDatabase * | NewL | ( | TCommDbOpeningMethod & | aOpeningMethod | ) | [static] |
Creates a CCommsDatabase as with NewL(). The method of opening (Created, CopiedDefault or Opened) is returned in aOpeningMethod.
Parameters | |
---|---|
aOpeningMethod | On return, the opening method. 0 |
IMPORT_C CCommsDatabase * | NewL | ( | TCommDbDatabaseType | aDbType | ) | [static] |
Re-instated override variant of NewL function in order to maintain BC with 6.1
Parameters | |
---|---|
aDbType | Whether Database is IAP or ISP version. All Db's are IAP type now. |
IMPORT_C CCommsDatabase * | NewL | ( | TCommDbDatabaseType | aDbType, |
TCommDbOpeningMethod & | aOpeningMethod | |||
) | [static] |
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 | |
---|---|
aDbType | Whether Database is IAP or ISP version. All Db's are IAP type now. |
aOpeningMethod | On return, the method of opening. |
IMPORT_C CCommsDbConnectionPrefTableView * | OpenConnectionPrefTableInRankOrderLC | ( | TCommDbConnectionDirection | aDirection | ) |
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 | |
---|---|
aDirection | Direction of the records to include in the view |
Capability | |
---|---|
Dependent | on table, see the guide page referenced below. |
IMPORT_C CCommsDbConnectionPrefTableView * | OpenConnectionPrefTableLC | ( | ) |
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.
Capability | |
---|---|
Dependent | on table, see the guide page referenced below. |
IMPORT_C CCommsDbConnectionPrefTableView * | OpenConnectionPrefTableLC | ( | TCommDbConnectionDirection | aDirection | ) |
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 | |
---|---|
aDirection | Direction of the records to include in the view |
Capability | |
---|---|
Dependent | on table, see the guide page referenced below. |
IMPORT_C CCommsDbConnectionPrefTableView * | OpenConnectionPrefTableViewOnRankLC | ( | TCommDbConnectionDirection | aDirection, |
TUint32 | aRank | |||
) |
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 | |
---|---|
aDirection | Direction of the records to include in the view |
aRank | Ranking of the records to include in the view |
Capability | |
---|---|
Dependent | on table, see the guide page referenced below. |
IMPORT_C CCommsDbTableView * | OpenIAPTableViewMatchingBearerSetLC | ( | TUint32 | aBearerSet, |
TCommDbConnectionDirection | aDirection | |||
) |
Open a view on the IAP table containing records that match the bearers and direction specified. `aBearerSet` is a bit mask of type `TCommDbBearer`.
Opens a view on records in the IAP table with a specified range of service types.
IAP records are included that have the specified bearers and direction, as read from the Connection preference table.
When the use of the view object is complete, it should be popped from the cleanup stack, and deleted.
Parameters | |
---|---|
aBearerSet | Bearers to match. For suitable values, see CONNECT_PREF_BEARER_SET in the Connection preferences table. Bitwise mask of the TCommDbBearer. |
aDirection | Direction to match. |
Leave Codes | |
---|---|
KErrArgument | if either aBearerSet or aDirection is invalid; other DBMS-related error codes. |
Capability | |
---|---|
Dependent | on table, see the guide page referenced below. |
IMPORT_C CCommsDbTableView * | OpenIAPTableViewMatchingNetworkLC | ( | TUint32 | aNetwork | ) |
Open a viewon the IAP table containing records which match the specified network
Capability | |
---|---|
Dependent | on table, see the guide page referenced below. |
IMPORT_C CCommsDbTableView * | OpenViewOnProxyRecordLC | ( | TUint32 | aServiceId, |
const TDesC & | aServiceType | |||
) |
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 | |
---|---|
aServiceId | ID of the service to match |
aServiceType | Service type to match |
Leave Codes | |
---|---|
KErrArgument | if either aServiceId or aServiceType is invalid; other DBMS-related error codes. |
Capability | |
---|---|
Dependent | on table, see the guide page referenced below. |
Parameters | |
---|---|
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. |
aClientTimeout | The client timeout. |
Leave Codes | |
---|---|
KErrNotSupported | No longer supported. |
Parameters | |
---|---|
aService | The service that will use the agent. This is one of DIAL OUT ISP TABLE, DIAL IN ISP TABLE, OUTGOING WCDMA TABLE. |
aAgentExt | The agent extention to use. |
Leave Codes | |
---|---|
KErrNotSupported | No longer supported. |
DeprecatedThis method is deprecated from 9.1 and always returns/leaves with KErrNotSupported instead of describing past operation/parameters. Agent table has been removed.
Parameters | |
---|---|
aService | The service that will use the agent. This is one of DIAL OUT ISP TABLE, DIAL IN ISP TABLE, OUTGOING WCDMA TABLE. |
aAgent | The agent to use. |
Leave Codes | |
---|---|
KErrNotSupported | No longer supported. |
Parameters | |
---|---|
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. |
aRouteTimeout | The route timeout. |
Leave Codes | |
---|---|
KErrNotSupported | No longer supported. |
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 | |
---|---|
aSetting | Setting to get. |
aValue | Setting value. |
Leave Codes | |
---|---|
KErrNotSupported | aSetting is invalid. |
Capability | |
---|---|
Dependent | on table, see the guide page referenced below. |