#include <metadatabase.h>
Link against: commsdat.lib
class CommsDat::CMDBSession : public CBase, public CBase |
Public Member Functions | |
---|---|
~CMDBSession() | |
IMPORT_C TInt | CancelAllNotifications() |
IMPORT_C void | ClearAttributeMask(TMDBAttributeFlags) |
IMPORT_C void | Close() |
IMPORT_C void | CommitTransactionL() |
IMPORT_C TInt | IsInTransaction() |
IMPORT_C TBool | IsSetAttributeMask(TMDBAttributeFlags) |
IMPORT_C TVersion | LatestVersion() |
IMPORT_C CMDBSession * | NewL(TVersion) |
IMPORT_C CMDBSession * | NewLC(TVersion) |
IMPORT_C void | OpenTransactionL() |
IMPORT_C TInt | PublishProperties() |
IMPORT_C void | RollbackTransactionL() |
IMPORT_C void | SetAttributeMask(TMDBAttributeFlags) |
IMPORT_C TVersion | VersionInUse() |
A session with the underlying storage server
IMPORT_C TInt | CancelAllNotifications | ( | ) |
Cancel all notification requests that are outstanding from calls to MMetaDatabase::RequestNotification Individual requests can be cancelled via MMetaDatabase::CancelNotify.
IMPORT_C void | ClearAttributeMask | ( | TMDBAttributeFlags | aAttributeFlags | ) |
Clear attribute mask settings, indicating required access level to stored data Clear flags in the attribute mask for this session
Flags indicate the requested access level to stored data
Attribute flags that have been set in this function will be cleared from the session's attribute mask and will be obeyed as restrictions in all database interactions, providing the client has enough platform security capabilities to back up the request
IMPORT_C void | Close | ( | ) |
Close session with storage server. Deprecatedv9.1 Destructor is all that is required
IMPORT_C void | CommitTransactionL | ( | ) |
Commit Transaction in database.
On failure, any open data containers may not be in sync with the database and should be discarded or reloaded
Leave Codes | |
---|---|
Will | leave with KErrNotFound if not in transaction |
Will | leave with a system-wide error code if an error occurs during commit |
IMPORT_C TInt | IsInTransaction | ( | ) |
IMPORT_C TBool | IsSetAttributeMask | ( | TMDBAttributeFlags | aAttributeFlags | ) |
Check flags in attribute mask aAttributeFlags indicates the requested access level to stored data Attribute flags that have been set will be ignored as restrictions in all database interactions, providing the client has enough platform security capabilities to back up the request
IMPORT_C TVersion | LatestVersion | ( | ) | [static] |
Returns the KCDCurrentVersion constant which maps to the KCDVersion1_1 constant for backward compatibility reason. Please avoid using this method when creating a CommsDat session object and use explicit schema version instead.
IMPORT_C CMDBSession * | NewL | ( | TVersion | aRequiredVersion | ) | [static] |
Open a session with the storage server and establish data format version in use CommsDat always attempts to support the required version of the client-facing data set. The client must carefully choose the dataset version as it affects binary compatibility
aRequiredVersion If the requested version is deprecated but still supported, mapping will be performed within CommsDat to maintain Data and Binary compatibility for the client If the requested version is the latest version, no mapping will be performed and deprecated fields will be ignored A client that needs to maintain BC must use a specific version A client that always wants to use the latest dataset can start the session with KCDLatestVersion
Leave Codes | |
---|---|
KErrUnsupported | If an old unsupported version is requested |
System-wide | error codes if there is an unexpected error |
IMPORT_C CMDBSession * | NewLC | ( | TVersion | aRequiredVersion | ) | [static] |
As NewL and adds Session to the CleanupStack
IMPORT_C void | OpenTransactionL | ( | ) |
Open Transaction with storage server and obtain write lock - if not already set
Leave Codes | |
---|---|
Will | leave with KErrNotAvailable if Database write locked by another process |
Will | report KErrAlreadyInTransaction if transaction this session is already in a transaction |
Will | leave with a system-wide error code if an error occurs during commit |
Capability | |
---|---|
WriteDeviceData |
IMPORT_C TInt | PublishProperties | ( | ) |
Attempt to create publish/subscribe properties if not already defined.
This function is normally called as a setup activity by System components
Capability | |
---|---|
WriteDeviceData | - since these properties are created in KUidSystemCategory category. |
IMPORT_C void | RollbackTransactionL | ( | ) |
Cancel Transaction with database and rollback all associated changes
Leave Codes | |
---|---|
Will | fail with KErrNotFound if not in transaction |
IMPORT_C void | SetAttributeMask | ( | TMDBAttributeFlags | aAttributeFlags | ) |
Set attributes to ignore for all database operations during this session
aAttributeFlags indicates the requested access level to stored data. Attributes set by this call will be ignored as restrictions in all database interactions, providing the client has enough platform security capabilities to back up the request
IMPORT_C TVersion | VersionInUse | ( | ) |
Lookup data format version currently in use by client