class DRM::CDrmAutomatedUsage : public CBase |
Utility class for DRM related automated usage handling
#include <drmautomatedusage.h> // Instantiate class CDrmAutomatedUsage DRM::CDrmAutomatedUsage* iAutomatedUsage = DRM::CDrmAutomatedUsage::NewLC(); // ... // RFile myRingToneFile; // open my Ringtone for reading // ... ContentAccess::CData* myDataObject = ContentAccess::CData::NewL( myRingToneFile, ContentAccess::KDefaultContentObject, ContentAccess::EPeek ); // check if content can be set as automated if ( iAutomatedUsage->CanSetAutomatedL( myDataObject, ContentAccess::EPlay, DRM::EAUAutomatedTypeRingingTone ) ) { // automated usage allowed // we register content as ringing tone in this example iAutomatedUsage->SetAutomated( myDataObject, ContentAccess::EPlay, DRM::EAUAutomatedTypeRingingTone, DRM::EAUPassive ); } else { // automated usage not allowed }
Public Member Functions | |
---|---|
~CDrmAutomatedUsage () | |
IMPORT_C TBool | CanSetAutomatedL ( RFile &, const ContentAccess::TIntent , const TDrmAutomatedType ) |
IMPORT_C TBool | CanSetAutomatedL (const ContentAccess::CData &, const ContentAccess::TIntent , const TDrmAutomatedType ) |
IMPORT_C TInt | CancelOperation ( TInt ) |
IMPORT_C MDrmErrorHandling & | GetErrorHandler () |
IMPORT_C CDrmUtility & | GetUtility () |
IMPORT_C CDrmAutomatedUsage * | NewL (CCoeEnv *) |
IMPORT_C CDrmAutomatedUsage * | NewLC (CCoeEnv *) |
IMPORT_C void | RegisterEventObserverL ( MDrmAutomatedUsageObserver &) |
IMPORT_C TInt | RemoveAutomatedAsyncL ( RFile &, const ContentAccess::TIntent , const TDrmAutomatedType , MDrmAsyncObserver &, const TDrmAutomatedServiceType ) |
IMPORT_C TInt | RemoveAutomatedAsyncL (const ContentAccess::CData &, const ContentAccess::TIntent , const TDrmAutomatedType , MDrmAsyncObserver &, const TDrmAutomatedServiceType ) |
IMPORT_C TInt | RemoveAutomatedAsyncL (const TDesC &, const ContentAccess::TIntent , const TDrmAutomatedType , MDrmAsyncObserver &, const TDrmAutomatedServiceType ) |
IMPORT_C void | RemoveAutomatedL ( RFile &, const ContentAccess::TIntent , const TDrmAutomatedType , const TDrmAutomatedServiceType ) |
IMPORT_C void | RemoveAutomatedL (const ContentAccess::CData &, const ContentAccess::TIntent , const TDrmAutomatedType , const TDrmAutomatedServiceType ) |
IMPORT_C void | RemoveAutomatedL (const TDesC &, const ContentAccess::TIntent , const TDrmAutomatedType , const TDrmAutomatedServiceType ) |
IMPORT_C TInt | SetAutomatedAsyncL ( RFile &, const ContentAccess::TIntent , const TDrmAutomatedType , MDrmAsyncObserver &, const TDrmAutomatedServiceType ) |
IMPORT_C TInt | SetAutomatedAsyncL (const ContentAccess::CData &, const ContentAccess::TIntent , const TDrmAutomatedType , MDrmAsyncObserver &, const TDrmAutomatedServiceType ) |
IMPORT_C void | SetAutomatedL ( RFile &, const ContentAccess::TIntent , const TDrmAutomatedType , const TDrmAutomatedServiceType ) |
IMPORT_C void | SetAutomatedL (const ContentAccess::CData &, const ContentAccess::TIntent , const TDrmAutomatedType , const TDrmAutomatedServiceType ) |
IMPORT_C void | UnregisterEventObserverL ( MDrmAutomatedUsageObserver &) |
Private Member Functions | |
---|---|
CDrmAutomatedUsage () | |
void | ConstructL (CCoeEnv *) |
Private Attributes | |
---|---|
MDrmErrorHandling * | iErrorHandler |
CDrmAutomatedUsageImpl * | iImplementation |
CDrmUtility * | iUtility |
IMPORT_C TBool | CanSetAutomatedL | ( | RFile & | aFile, |
const ContentAccess::TIntent | aIntent, | |||
const TDrmAutomatedType | aAutomatedType | |||
) |
Checks if given content can be set as an automated content.
RFile & aFile | file handle to the file |
const ContentAccess::TIntent aIntent | See ContentAccess::Intent |
const TDrmAutomatedType aAutomatedType |
IMPORT_C TBool | CanSetAutomatedL | ( | const ContentAccess::CData & | aData, |
const ContentAccess::TIntent | aIntent, | |||
const TDrmAutomatedType | aAutomatedType | |||
) |
Checks if given content can be set as an automated content.
const ContentAccess::CData & aData | CData object to the protected content |
const ContentAccess::TIntent aIntent | See ContentAccess::Intent |
const TDrmAutomatedType aAutomatedType |
IMPORT_C TInt | CancelOperation | ( | TInt | aOperationId | ) |
Cancel an asyncronous operation
TInt aOperationId | identifier of the async operation to be cancelled |
void | ConstructL | ( | CCoeEnv * | aCoeEnv | ) | [private] |
Second phase constructor
CCoeEnv * aCoeEnv |
IMPORT_C MDrmErrorHandling & | GetErrorHandler | ( | ) | const |
Returns a reference to a class which implements the MDrmErrorHandling interface. The ownership of the instance stays with the CDrmAutomatedUsage -class
IMPORT_C CDrmUtility & | GetUtility | ( | ) | const |
Returns a reference to a CDrmUtility instance. The ownership of the instance stays with the CDrmAutomatedUsage -class
IMPORT_C CDrmAutomatedUsage * | NewL | ( | CCoeEnv * | aCoeEnv = NULL | ) | [static] |
Creates a new CDrmAutomatedUsage object and returns a pointer to it
CCoeEnv * aCoeEnv = NULL | A pointer to an instance of CCoeEnv. If the parameter is not provided the global instance will be used. In the case of a server process where the global instance is not available, global notes will be used. |
IMPORT_C CDrmAutomatedUsage * | NewLC | ( | CCoeEnv * | aCoeEnv = NULL | ) | [static] |
Creates a new CDrmAutomatedUsage object and returns a pointer to it Leaves the pointer to the cleanup stack
CCoeEnv * aCoeEnv = NULL | A pointer to an instance of CCoeEnv. If the parameter is not provided the global instance will be used. In the case of a server process where the global instance is not available, global notes will be used. |
IMPORT_C void | RegisterEventObserverL | ( | MDrmAutomatedUsageObserver & | aObserver | ) |
Registers client to listen events related to automated usage. If the client doesn't do this, all the events are handled automatically according to the S60 style.
The observer registered with this function needs to be unregistered before it is deleted.
MDrmAutomatedUsageObserver & aObserver |
IMPORT_C TInt | RemoveAutomatedAsyncL | ( | RFile & | aFile, |
const ContentAccess::TIntent | aIntent, | |||
const TDrmAutomatedType | aAutomatedType, | |||
MDrmAsyncObserver & | aObserver, | |||
const TDrmAutomatedServiceType | aServiceType = EAUActive | |||
) |
Unregisters given content from being used as an automated content.
RFile & aFile | file handle to the file |
const ContentAccess::TIntent aIntent | See ContentAccess::Intent |
const TDrmAutomatedType aAutomatedType | Usage intention of the automated content |
MDrmAsyncObserver & aObserver | Async callback observer |
const TDrmAutomatedServiceType aServiceType = EAUActive | default: EAUActive |
IMPORT_C TInt | RemoveAutomatedAsyncL | ( | const ContentAccess::CData & | aData, |
const ContentAccess::TIntent | aIntent, | |||
const TDrmAutomatedType | aAutomatedType, | |||
MDrmAsyncObserver & | aObserver, | |||
const TDrmAutomatedServiceType | aServiceType = EAUActive | |||
) |
Unregisters given content from being used as an automated content.
const ContentAccess::CData & aData | CData object to the protected content |
const ContentAccess::TIntent aIntent | See ContentAccess::Intent |
const TDrmAutomatedType aAutomatedType | Usage intention of the automated content |
MDrmAsyncObserver & aObserver | Async callback observer |
const TDrmAutomatedServiceType aServiceType = EAUActive | default: EAUActive |
IMPORT_C TInt | RemoveAutomatedAsyncL | ( | const TDesC & | aUniqueId, |
const ContentAccess::TIntent | aIntent, | |||
const TDrmAutomatedType | aAutomatedType, | |||
MDrmAsyncObserver & | aObserver, | |||
const TDrmAutomatedServiceType | aServiceType = EAUActive | |||
) |
Unregisters given content from being used as an automated content.
const TDesC & aUniqueId | unique content id |
const ContentAccess::TIntent aIntent | See ContentAccess::Intent |
const TDrmAutomatedType aAutomatedType | Usage intention of the automated content |
MDrmAsyncObserver & aObserver | Async callback observer |
const TDrmAutomatedServiceType aServiceType = EAUActive | default: EAUActive |
IMPORT_C void | RemoveAutomatedL | ( | RFile & | aFile, |
const ContentAccess::TIntent | aIntent, | |||
const TDrmAutomatedType | aAutomatedType, | |||
const TDrmAutomatedServiceType | aServiceType = EAUActive | |||
) |
Unregisters given content from being used as an automated content.
RFile & aFile | file handle to the file |
const ContentAccess::TIntent aIntent | See ContentAccess::Intent |
const TDrmAutomatedType aAutomatedType | Usage intention of the automated content |
const TDrmAutomatedServiceType aServiceType = EAUActive | default: EAUActive |
IMPORT_C void | RemoveAutomatedL | ( | const ContentAccess::CData & | aData, |
const ContentAccess::TIntent | aIntent, | |||
const TDrmAutomatedType | aAutomatedType, | |||
const TDrmAutomatedServiceType | aServiceType = EAUActive | |||
) |
Unregisters given content from being used as an automated content.
const ContentAccess::CData & aData | CData object to the protected content |
const ContentAccess::TIntent aIntent | See ContentAccess::Intent |
const TDrmAutomatedType aAutomatedType | Usage intention of the automated content |
const TDrmAutomatedServiceType aServiceType = EAUActive | default: EAUActive |
IMPORT_C void | RemoveAutomatedL | ( | const TDesC & | aUniqueId, |
const ContentAccess::TIntent | aIntent, | |||
const TDrmAutomatedType | aAutomatedType, | |||
const TDrmAutomatedServiceType | aServiceType = EAUActive | |||
) |
Unregisters given content from being used as an automated content.
const TDesC & aUniqueId | unique content id |
const ContentAccess::TIntent aIntent | See ContentAccess::Intent |
const TDrmAutomatedType aAutomatedType | Usage intention of the automated content |
const TDrmAutomatedServiceType aServiceType = EAUActive | default: EAUActive |
IMPORT_C TInt | SetAutomatedAsyncL | ( | RFile & | aFile, |
const ContentAccess::TIntent | aIntent, | |||
const TDrmAutomatedType | aAutomatedType, | |||
MDrmAsyncObserver & | aObserver, | |||
const TDrmAutomatedServiceType | aServiceType = EAUActive | |||
) |
Registers given content to be used as an automated content.
RFile & aFile | file handle to the file |
const ContentAccess::TIntent aIntent | See ContentAccess::Intent |
const TDrmAutomatedType aAutomatedType | Usage intention of the automated content |
MDrmAsyncObserver & aObserver | Async callback observer |
const TDrmAutomatedServiceType aServiceType = EAUActive | default: EAUActive |
IMPORT_C TInt | SetAutomatedAsyncL | ( | const ContentAccess::CData & | aData, |
const ContentAccess::TIntent | aIntent, | |||
const TDrmAutomatedType | aAutomatedType, | |||
MDrmAsyncObserver & | aObserver, | |||
const TDrmAutomatedServiceType | aServiceType = EAUActive | |||
) |
Registers given content to be used as an automated content.
const ContentAccess::CData & aData | CData object to the protected content |
const ContentAccess::TIntent aIntent | See ContentAccess::Intent |
const TDrmAutomatedType aAutomatedType | Usage intention of the automated content |
MDrmAsyncObserver & aObserver | Async callback observer |
const TDrmAutomatedServiceType aServiceType = EAUActive | default: EAUActive |
IMPORT_C void | SetAutomatedL | ( | RFile & | aFile, |
const ContentAccess::TIntent | aIntent, | |||
const TDrmAutomatedType | aAutomatedType, | |||
const TDrmAutomatedServiceType | aServiceType = EAUActive | |||
) |
Registers given content to be used as an automated content.
RFile & aFile | file handle to the file |
const ContentAccess::TIntent aIntent | See ContentAccess::Intent |
const TDrmAutomatedType aAutomatedType | Usage intention of the automated content |
const TDrmAutomatedServiceType aServiceType = EAUActive | default: EAUActive |
IMPORT_C void | SetAutomatedL | ( | const ContentAccess::CData & | aData, |
const ContentAccess::TIntent | aIntent, | |||
const TDrmAutomatedType | aAutomatedType, | |||
const TDrmAutomatedServiceType | aServiceType = EAUActive | |||
) |
Registers given content to be used as an automated content.
const ContentAccess::CData & aData | CData object to the protected content |
const ContentAccess::TIntent aIntent | See ContentAccess::Intent |
const TDrmAutomatedType aAutomatedType | Usage intention of the automated content |
const TDrmAutomatedServiceType aServiceType = EAUActive | default: EAUActive |
IMPORT_C void | UnregisterEventObserverL | ( | MDrmAutomatedUsageObserver & | aObserver | ) |
Unregisters client from listening to events related to automated usage.
If register event observer has been called, it must be unregistered before the observer object is deleted.
MDrmAutomatedUsageObserver & aObserver |
MDrmErrorHandling * | iErrorHandler | [private] |
Implementation class pointer Owned
CDrmAutomatedUsageImpl * | iImplementation | [private] |
Implementation class pointer Owned
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.