#include <commdb.h>
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.
Parameter | Description |
---|---|
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.
Parameter | Description |
---|---|
aSetting | Setting to clear. |
void | DoOpenL | ( | TCommDbOpeningMethod & | aOpeningMethod, |
TBool | aUseDefaultDb | |||
) | [protected] |
Connects to the Commsdat and set version number
Parameter | Description |
---|---|
aService | The service that the timeout is associated with. This is one of DIAL OUT ISP TABLE, DIAL IN ISP TABLE, OUTGOING WCDMA TABLE. |
Returns: The agent timeout setting.
Parameter | Description |
---|---|
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. |
Parameter | Description |
---|---|
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. |
Parameter | Description |
---|---|
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. |
Returns: The route timeout.
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.
Parameter | Description |
---|---|
aSetting | Setting to get. |
aValue | On return, setting value. |
DeprecatedThis method is deprecated from 9.1 and always returns/leaves with KErrNotSupported instead of describing past operation/parameters.
Parameter | Description |
---|---|
aSetting | Setting to get. |
aValue | On return, setting value. |
IMPORT_C void | GetDefaultTsyL | ( | TDes & | aValue | ) |
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.
Parameter | Description |
---|---|
aSetting | Setting to get. |
aValue | On return, the setting value. |
Gets a global settings table string field.
Parameter | Description |
---|---|
aSetting | Setting to get. |
aValue | On return, the setting value |
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.
Returns: A pointer to a communications database 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.
Parameter | Description |
---|---|
aUseDefaultDb | Use the default database. |
Returns: A pointer to a communications database object.
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.
Parameter | Description |
---|---|
aOpeningMethod | On return, the opening method. 0 |
Returns: A pointer to a communications database object.
IMPORT_C CCommsDatabase * | NewL | ( | TCommDbDatabaseType | aDbType | ) | [static] |
Re-instated override variant of NewL function in order to maintain BC with 6.1
Parameter | Description |
---|---|
aDbType | Whether Database is IAP or ISP version. All Db's are IAP type now. |
Returns: CCommDbOverrideSettings* the calling function takes ownership of the returned object
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).
Parameter | Description |
---|---|
aDbType | Whether Database is IAP or ISP version. All Db's are IAP type now. |
aOpeningMethod | On return, the method of opening. |
Returns: CCommDbOverrideSettings* the calling function takes ownership of the returned object.
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.
Parameter | Description |
---|---|
aDirection | Direction of the records to include in the view |
Returns: The opened view
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.
Returns: The opened view
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.
Parameter | Description |
---|---|
aDirection | Direction of the records to include in the view |
Returns: The opened view
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.
Parameter | Description |
---|---|
aDirection | Direction of the records to include in the view |
aRank | Ranking of the records to include in the view |
Returns: The opened view
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.
Parameter | Description |
---|---|
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. |
Returns: The opened view.
IMPORT_C CCommsDbTableView * | OpenIAPTableViewMatchingNetworkLC | ( | TUint32 | aNetwork | ) |
Open a viewon the IAP table containing records which match the specified network
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.
Parameter | Description |
---|---|
aServiceId | ID of the service to match |
aServiceType | Service type to match |
Returns: The opened view
Parameter | Description |
---|---|
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. |
Parameter | Description |
---|---|
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. |
DeprecatedThis method is deprecated from 9.1 and always returns/leaves with KErrNotSupported instead of describing past operation/parameters. Agent table has been removed.
Parameter | Description |
---|---|
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. |
Parameter | Description |
---|---|
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. |
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.
Parameter | Description |
---|---|
aSetting | Setting to get. |
aValue | Setting value. |