class CCommsDatabase : public CCommsDatabaseBase |
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.
Protected Member Functions | |
---|---|
CCommsDatabase () | |
void | DoOpenL ( TCommDbOpeningMethod &, TBool ) |
Private Member Functions | |
---|---|
void | CreateDatabaseL () |
TGlobalSettingType | GlobalSettingTypeL (const TDesC &) |
CCommsDbTableView * | OpenGlobalSettingsTableLC (const TDesC &, TBool &) |
Private Member Enumerations | |
---|---|
enum | TGlobalSettingType { ENotASetting , EGlobalSetting , ECompatibilitySetting } |
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 | ) |
This method is deprecated from 9.1 and always returns/leaves with KErrNotSupported instead of describing past operation/parameters.
const TDesC & 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.
const TDesC & aSetting | Setting to clear. |
void | DoOpenL | ( | TCommDbOpeningMethod & | aOpeningMethod, |
TBool | aUseDefaultDb | |||
) | [protected] |
Connects to the Commsdat and set version number
TCommDbOpeningMethod & aOpeningMethod | |
TBool aUseDefaultDb |
IMPORT_C TInt | GetAgentClientTimeoutL | ( | const TDesC & | aService | ) |
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. |
IMPORT_C void | GetAgentExtL | ( | const TDesC & | aService, |
TDes & | aAgentExt | |||
) |
IMPORT_C void | GetAgentL | ( | const TDesC & | aService, |
TDes & | aAgent | |||
) |
IMPORT_C TInt | GetAgentRouteTimeoutL | ( | const TDesC & | aService | ) |
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. |
IMPORT_C void | GetCurrentDialInSettingL | ( | const TDesC & | aSetting, |
TUint32 & | aValue | |||
) |
This 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.
IMPORT_C void | GetCurrentDialOutSettingL | ( | const TDesC & | aSetting, |
TUint32 & | aValue | |||
) |
This method is deprecated from 9.1 and always returns/leaves with KErrNotSupported instead of describing past operation/parameters.
IMPORT_C void | GetDefaultTsyL | ( | TDes & | aValue | ) |
TDes & aValue |
IMPORT_C void | GetGlobalSettingL | ( | const TDesC & | aSetting, |
TUint32 & | 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.
IMPORT_C void | GetGlobalSettingL | ( | const TDesC & | aSetting, |
TDes & | aValue | |||
) |
Gets a global settings table string field.
TGlobalSettingType | GlobalSettingTypeL | ( | const TDesC & | aSetting | ) | const [private] |
Returns whether aSetting is a known global setting, a former global setting supported for compatibility reasons or not known. These are rougly in the optimal order.....
const TDesC & aSetting |
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.
TBool aUseDefaultDb | Use the default database. |
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.
TCommDbOpeningMethod & 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
TCommDbDatabaseType 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).
TCommDbDatabaseType aDbType | Whether Database is IAP or ISP version. All Db's are IAP type now. |
TCommDbOpeningMethod & 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.
TCommDbConnectionDirection aDirection | Direction of the records to include in the 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.
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.
TCommDbConnectionDirection aDirection | Direction of the records to include in the 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.
TCommDbConnectionDirection aDirection | Direction of the records to include in the view |
TUint32 aRank | Ranking of the records to include in the view |
CCommsDbTableView * | OpenGlobalSettingsTableLC | ( | const TDesC & | aSetting, |
TBool & | aExists | |||
) | [private] |
Opens a view on the global settings table showing the entry (if it exists) called aSetting. Global settings are hidden therfore require the `aIncludeHiddenRecords` argument set to True.
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.
TUint32 aBearerSet | Bearers to match. For suitable values, see CONNECT_PREF_BEARER_SET in the Connection preferences table. Bitwise mask of the TCommDbBearer. |
TCommDbConnectionDirection aDirection | Direction to match. |
IMPORT_C CCommsDbTableView * | OpenIAPTableViewMatchingNetworkLC | ( | TUint32 | aNetwork | ) |
Open a viewon the IAP table containing records which match the specified network
TUint32 aNetwork |
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.
IMPORT_C void | SetAgentClientTimeoutL | ( | const TDesC & | aService, |
TInt | aClientTimeout | |||
) |
IMPORT_C void | SetAgentExtL | ( | const TDesC & | aService, |
const TDesC & | aAgentExt | |||
) |
IMPORT_C void | SetAgentL | ( | const TDesC & | aService, |
const TDesC & | aAgent | |||
) |
This method is deprecated from 9.1 and always returns/leaves with KErrNotSupported instead of describing past operation/parameters. Agent table has been removed.
IMPORT_C void | SetAgentRouteTimeoutL | ( | const TDesC & | aService, |
TInt | aRouteTimeout | |||
) |
IMPORT_C void | SetGlobalSettingL | ( | const TDesC & | aSetting, |
TUint32 | aValue | |||
) |
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.
IMPORT_C void | SetGlobalSettingL | ( | const TDesC & | aSetting, |
const TDesC & | aValue | |||
) |
Sets a global settings table string field.
Copyright ©2010 Nokia Corporation and/or its subsidiary(-ies).
All rights
reserved. Unless otherwise stated, these materials are provided under the terms of the Eclipse Public License
v1.0.