API published in: S60 2nd Ed FP 2
Link against: drmhelper.lib
Required Capabilities
None
Exceptions
The capability DRM is required in:
CDRMHelper::Consume2( const TDesC8& aContentURI, TUint32 aRightsSpec, TDRMHelperConsumeAction anAction); If the calling process doesn't have Nokia VID and "aRightsSpec is EInstall or EPeek"
CDRMHelper::ConsumeFile2( const TDesC& aFileName, TUint32 aRightsSpec, TDRMHelperConsumeAction anAction); If the calling process doesn't have Nokia VID and "aRightsSpec is EInstall or EPeek"
CDRMHelper::ConsumeFile2( RFile& aFileHandle, TUint32 aRightsSpec, TDRMHelperConsumeAction anAction); If the calling process doesn't have Nokia VID and "aRightsSpec is EInstall or EPeek"
#include <drmhelper.h>
Inherits MAknServerAppExitObserver.
Public Types |
|
enum | TDRMHelperNotificationID { ETActivateTextId = 1, ETCountBasedErrorTextId = 2, ETCountUsageReduceId = 3, ETCountUsageReduceMediaId = 4 } |
enum | TDRMHelperConsumeAction { EStart, EFinish, EPause, EContinue } |
enum | TDRMHelperOMALevel { EOMA_None, EOMA_1_0, EOMA_2_0 } |
enum | TDRMHelperPreviewType { ENoPreview, EEmbeddedPreview, EPreviewRights } |
enum | TDRMHelperAutomatedType { EAutomatedTypeRingingTone, EAutomatedTypeMessageAlert, EAutomatedTypeEmailAlert, EAutomatedTypeIMAlert, EAutomatedTypeCalendarAlarm, EAutomatedTypeScreenSaver, EAutomatedTypeWallpaper, EAutomatedTypeTheme, EAutomatedTypeClockAlarm, EAutomatedTypeOther = KMaxTUint8 } |
enum | TDRMHelperDRMMethods { EForwardLock = 0x0001, ECombinedDelivery = 0x0002, ESeparateDelivery = 0x0004, ESuperDistribution = 0x0008 } |
Public Member Functions |
|
IMPORT_C | ~CDRMHelper () |
Destructor. |
|
IMPORT_C TInt | HandleErrorL (TInt aError, const TDesC8 &aURI) |
Displays appropriate error note depending on error code. |
|
IMPORT_C TInt | HandleErrorL (TInt aError, const TDesC &aFileName) |
Displays: Handles error situations 'rights expired', 'no rights' and 'rights database corrupted'. |
|
IMPORT_C TInt | HandleErrorL (TInt aError, RFile &aFileHandle) |
Displays: Handles error situations 'rights expired', 'no rights' and 'rights database corrupted'. |
|
IMPORT_C TInt | HandleErrorOrPreviewL (TInt aError, RFile &aFile, HBufC8 *&aEmbeddedPreviewUri) |
Handles DRM-specific error situations. |
|
IMPORT_C TInt | HandleErrorOrPreviewL (TInt aError, const TDesC &aFileName, HBufC8 *&aEmbeddedPreviewUri) |
Handles DRM specific error situations. |
|
IMPORT_C TInt | CheckRightsAmountL (const TDesC &aFileName, TInt aCount=KDRMHelperDefaultCountThreshold, TInt aDays=KDRMHelperDefaultTimeThreshold) |
Check rights for the file. |
|
IMPORT_C TInt | CheckRightsAmountL (RFile &aFileHandle, TInt aCount=KDRMHelperDefaultCountThreshold, TInt aDays=KDRMHelperDefaultTimeThreshold) |
Check rights for the file. |
|
IMPORT_C TInt | CheckRightsAmountL (const TDesC8 &aUri, TInt aCount=KDRMHelperDefaultCountThreshold, TInt aDays=KDRMHelperDefaultTimeThreshold) |
Check rights for the file. |
|
IMPORT_C TInt | CheckRightsPercentL (const TDesC &aFileName, TInt aThreshold=KDRMHelperDefaultPercentageThreshold) |
Check rights for the file. |
|
IMPORT_C TInt | CheckRightsPercentL (RFile &aFileHandle, TInt aThreshold=KDRMHelperDefaultPercentageThreshold) |
Check rights for the file. |
|
IMPORT_C void | LaunchDetailsViewEmbeddedL (const TDesC8 &aURI) |
Launches DRM Rights Manager UI embedded with details view related to given content. |
|
IMPORT_C void | LaunchDetailsViewEmbeddedL (const TDesC &aFileName) |
Launches DRM Rights Manager UI embedded with details view related to given file. |
|
IMPORT_C void | LaunchDetailsViewEmbeddedL (RFile &aFileHandle) |
Launches DRM Rights Manager UI embedded with details view related to given file. |
|
IMPORT_C void | LaunchDetailsViewEmbeddedL (const HBufC8 *aContentURI) |
Launches DRM Rights Manager UI embedded with details view related to given content. |
|
IMPORT_C void | GetRightsDetailsL (const TDesC &aFileName, TUint32 aIntent, TBool &aExpired, TBool &aSendingAllowed, CDRMHelperRightsConstraints *&aPlay, CDRMHelperRightsConstraints *&aDisplay, CDRMHelperRightsConstraints *&aExecute, CDRMHelperRightsConstraints *&aPrint) |
Gets details of rights object associated of given file. |
|
IMPORT_C void | GetRightsDetailsL (RFile &aFileHandle, TUint32 aIntent, TBool &aExpired, TBool &aSendingAllowed, CDRMHelperRightsConstraints *&aPlay, CDRMHelperRightsConstraints *&aDisplay, CDRMHelperRightsConstraints *&aExecute, CDRMHelperRightsConstraints *&aPrint) |
Gets details of rights object associated of given file. |
|
IMPORT_C void | GetRightsDetailsL (const TDesC &aFileName, TUint32 aIntent, TBool &aExpired, TBool &aSendingAllowed, CDRMRightsConstraints *&aPlay, CDRMRightsConstraints *&aDisplay, CDRMRightsConstraints *&aExecute, CDRMRightsConstraints *&aPrint) |
Gets details of rights object associated of given file. |
|
IMPORT_C void | GetRightsDetailsL (RFile &aFileHandle, TUint32 aIntent, TBool &aExpired, TBool &aSendingAllowed, CDRMRightsConstraints *&aPlay, CDRMRightsConstraints *&aDisplay, CDRMRightsConstraints *&aExecute, CDRMRightsConstraints *&aPrint) |
Gets details of rights object associated of given file. |
|
IMPORT_C TInt | SetAutomated (const TDesC8 &aURI) |
Registers given content to be used as an automated content. |
|
IMPORT_C TInt | SetAutomated (const TDesC &aFilename) |
Registers given content to be used as an automated content. |
|
IMPORT_C TInt | SetAutomated (RFile &aFileHandle) |
Registers given content to be used as an automated content. |
|
IMPORT_C TInt | ShowAutomatedNote (const TDesC8 &aURI) |
Displays the confirmation query about setting given content as an automated content. |
|
IMPORT_C TInt | ShowAutomatedNote (const TDesC &aFilename) |
Displays the confirmation query about setting given content as an automated content. |
|
IMPORT_C TInt | ShowAutomatedNote (RFile &aFileHandle) |
Displays the confirmation query about setting given content as an automated content. |
|
IMPORT_C TInt | SetAutomatedPassive (const TDesC8 &aURI) |
Registers given content to be used as an automated content. |
|
IMPORT_C TInt | SetAutomatedPassive (const TDesC &aFilename) |
Registers given content to be used as an automated content. |
|
IMPORT_C TInt | SetAutomatedPassive (RFile &aFileHandle) |
Registers given content to be used as an automated content. |
|
IMPORT_C TInt | SetAutomatedSilent (const TDesC8 &aURI, TBool aActive) |
Registers given content to be used as an automated content without confirmation query. |
|
IMPORT_C TInt | SetAutomatedSilent (const TDesC &aFilename, TBool aActive) |
Registers given content to be used as an automated content without confirmation query. |
|
IMPORT_C TInt | SetAutomatedSilent (RFile &aFileHandle, TBool aActive) |
Registers given content to be used as an automated content without confirmation query. |
|
IMPORT_C TInt | RemoveAutomated (const TDesC8 &aURI) |
Unregisters given content to be used as an automated content. |
|
IMPORT_C TInt | RemoveAutomated (const TDesC &aFilename) |
Unregisters given content to be used as an automated content. |
|
IMPORT_C TInt | RemoveAutomated (RFile &aFileHandle) |
Unregisters given content to be used as an automated content. |
|
IMPORT_C TInt | RemoveAutomatedPassive (const TDesC8 &aURI) |
Unregisters given content to be used as an automated content. |
|
IMPORT_C TInt | RemoveAutomatedPassive (const TDesC &aFilename) |
Unregisters given content to be used as an automated content. |
|
IMPORT_C TInt | RemoveAutomatedPassive (RFile &aFileHandle) |
Unregisters given content to be used as an automated content. |
|
IMPORT_C TInt | CanSetAutomated (const TDesC8 &aURI, TBool &aValue) |
Checks if given content can be set as an automated content. |
|
IMPORT_C TInt | CanSetAutomated (const TDesC &aFilename, TBool &aValue) |
Checks if given content can be set as an automated content. |
|
IMPORT_C TInt | CanSetAutomated (RFile &aFileHandle, TBool &aValue) |
Checks if given content can be set as an automated content. |
|
IMPORT_C void | IndicateIdle () |
Informs DRMHelper that idle-screen has been activated. |
|
IMPORT_C TInt | ShowDRMUINotification2L (TDRMHelperNotificationID aTextId, const TDesC8 &aURI) |
Handle the general UI based error notes. |
|
IMPORT_C TInt | ShowDRMUINotification2L (TDRMHelperNotificationID aTextId, const TDesC &aFileName) |
Handle the general UI based error notes. |
|
IMPORT_C void | SetCountLimitL (TUint aCounts) |
Set count limit for CheckRightsAmountL. |
|
IMPORT_C void | SetTimeLimitL (TUint aDays) |
Set time limit in days for CheckRightsAmountL. |
|
IMPORT_C void | SetPercentageLimitL (TUint aPercentage) |
Set percentage limit for CheckRightsAmountL. |
|
IMPORT_C TInt | GetContentURIList (RPointerArray< HBufC8 > *&aURIList) |
GetContentURIList. |
|
IMPORT_C TInt | DataTypesCount (TInt &aCount) |
DataTypesCount. |
|
IMPORT_C TInt | SupportedDataType (const TInt aIndex, TDataType &aDataType) |
SupportedDataType. |
|
IMPORT_C TInt | RegisterDataType (const TDataType &aDataType) |
RegisterDataType. |
|
IMPORT_C TInt | UnRegisterDataType (const TInt aIndex) |
UnRegisterDataType. |
|
IMPORT_C TInt | SupportedDRMMethods2 (TInt &aDRMMethod, TDRMHelperOMALevel &aOMALevel) |
SupportedDRMMethods. |
|
IMPORT_C TInt | Consume2 (const TDesC8 &aContentURI, TUint32 aRightsSpec, TDRMHelperConsumeAction anAction) |
Consume2. |
|
IMPORT_C TInt | ConsumeFile2 (const TDesC &aFileName, TUint32 aRightsSpec, TDRMHelperConsumeAction anAction) |
ConsumeFile2. |
|
IMPORT_C TInt | ConsumeFile2 (RFile &aFileHandle, TUint32 aRightsSpec, TDRMHelperConsumeAction anAction) |
ConsumeFile2. |
|
IMPORT_C void | ActivateContentL (CData &aContent) |
Acquires rights for given content if rights have been expired or rights are missing. |
|
IMPORT_C void | ActivateContentL (TDesC &aFileName) |
Acquires rights for given content if rights have been expired or rights are missing. |
|
IMPORT_C TDRMHelperPreviewType | HasPreviewL (CData &aContent, HBufC8 *&aPreviewUri) |
Checks if given content has embedded preview or if it is possible to get preview rights for it. |
|
IMPORT_C TDRMHelperPreviewType | HasPreviewL (TDesC &aFileName, HBufC8 *&aPreviewUri) |
Checks if given content has embedded preview or if it is possible to get preview rights for it. |
|
IMPORT_C void | GetPreviewRightsL (CData &aContent) |
Acquires preview rights for given content. |
|
IMPORT_C void | GetPreviewRightsL (TDesC &aFileName) |
Acquires preview rights for given content. |
|
IMPORT_C TBool | EmbeddedPreviewCompletedL (CData &aContent) |
This method should be called after embedded preview has been played. |
|
IMPORT_C TBool | EmbeddedPreviewCompletedL (TDesC &aFileName) |
This method should be called after embedded preview has been played. |
|
IMPORT_C TBool | HasInfoUrlL (CData &aContent, HBufC8 *&aInfoUrl) |
Checks if given content has InfoUrl. |
|
IMPORT_C TBool | HasInfoUrlL (TDesC &aFileName, HBufC8 *&aInfoUrl) |
Checks if given content has InfoUrl. |
|
IMPORT_C void | OpenInfoUrlL (CData &aContent) |
Opens browser with InfoUrl of the content. |
|
IMPORT_C void | OpenInfoUrlL (TDesC &aFileName) |
Opens browser with InfoUrl of the content. |
|
IMPORT_C TInt | SetAutomatedType (TDRMHelperAutomatedType aAutomatedType) |
Sets the type of automated content to be registered. |
|
IMPORT_C TInt | SetPreviewMediaType (TDRMHelperPreviewMediaType aMediaType) |
Sets media type of content for preview. |
|
Static Public Member Functions |
|
static IMPORT_C CDRMHelper * | NewL (CCoeEnv &aCoeEnv) |
Two-phased constructor. |
|
static IMPORT_C CDRMHelper * | NewLC (CCoeEnv &aCoeEnv) |
static IMPORT_C CDRMHelper * | NewL () |
Two-phased constructor. |
|
static IMPORT_C CDRMHelper * | NewLC () |
static IMPORT_C CDRMHelper * | NewL (CCoeEnv &aCoeEnv, RFs &aFs) |
Two-phased constructor. |
|
static IMPORT_C CDRMHelper * | NewLC (CCoeEnv &aCoeEnv, RFs &aFs) |
static IMPORT_C CDRMHelper * | NewL (RFs &aFs) |
Two-phased constructor. |
|
static IMPORT_C CDRMHelper * | NewLC (RFs &aFs) |
|
|
|
|
|
|
|
Destructor. |
|
Acquires rights for given content if rights have been expired or rights are missing. If content already has valid or future rights, does nothing. This function should be called when user selects activate from options menu. Leaves with system-wide error code in case of error.
|
|
Acquires rights for given content if rights have been expired or rights are missing. If content already has valid or future rights, does nothing. This function should be called when user selects activate from options menu. Leaves with system-wide error code in case of error.
|
|
Checks if given content can be set as an automated content.
|
|
Checks if given content can be set as an automated content.
|
|
Checks if given content can be set as an automated content.
|
|
Check rights for the file. If there is less than given amount of usage time/count left, one of the following note is displayed depending on situation: 'Usage rights about to expire. View details?' 'Usage rights about to expire. N days left. View details?' 'Usage rights about to expire. 1 day left. View details?' 'Usage rights about to expire. N counts left. View details?' 'Usage rights about to expire. 1 count left. View details?' It also checks that rights are valid and displays appropriate note, if they are not.
|
|
Check rights for the file. If there is less than given amount of usage time/count left, one of the following note is displayed depending on situation: 'Usage rights about to expire. View details?' 'Usage rights about to expire. N days left. View details?' 'Usage rights about to expire. 1 day left. View details?' 'Usage rights about to expire. N counts left. View details?' 'Usage rights about to expire. 1 count left. View details?' It also checks that rights are valid and displays appropriate note, if they are not.
|
|
Check rights for the file. If there is less than given amount of usage time/count left, one of the following note is displayed depending on situation: 'Usage rights about to expire. View details?' 'Usage rights about to expire. N days left. View details?' 'Usage rights about to expire. 1 day left. View details?' 'Usage rights about to expire. N counts left. View details?' 'Usage rights about to expire. 1 count left. View details?' It also checks that rights are valid and displays appropriate note, if they are not.
|
|
Check rights for the file. If there is less than aThreshold percent of usage time/count left, one of the following note is displayed depending on situation: 'Usage rights about to expire. View details?' 'Usage rights about to expire. N days left. View details?' 'Usage rights about to expire. 1 day left. View details?' 'Usage rights about to expire. N counts left. View details?' 'Usage rights about to expire. 1 count left. View details?' It also checks that rights are valid and displays appropriate note, if they are not.
|
|
Check rights for the file. If there is less than aThreshold percent of usage time/count left, one of the following note is displayed depending on situation: 'Usage rights about to expire. View details?' 'Usage rights about to expire. N days left. View details?' 'Usage rights about to expire. 1 day left. View details?' 'Usage rights about to expire. N counts left. View details?' 'Usage rights about to expire. 1 count left. View details?' It also checks that rights are valid and displays appropriate note, if they are not.
|
|
Consume2. Overrides any rights consumption. This function must only be used by applications with user interaction and not by intermediate components. The main use cases are signalling that content is to be installed (including thumbnail generation), or that content is to be consumed. They are characterized as calls to this function with the correct intent (i.e. EPlay or EInstall) and the corresponding action (i.e. telling whether the indicated intent is started or finished). Calls to this function must be the result of a user interaction or otherwise high level event.
|
|
ConsumeFile2. Overrides any rights consumption. This function must only be used by applications with user interaction and not by intermediate components. The main use cases are signalling that content is to be installed (including thumbnail generation), or that content is to be consumed. They are characterized as calls to this function with the correct intent (i.e. EPlay or EInstall) and the corresponding action (i.e. telling whether the indicated intent is started or finished). Calls to this function must be the result of a user interaction or otherwise high level event.
|
|
ConsumeFile2. Overrides any rights consumption. This function must only be used by applications with user interaction and not by intermediate components. The main use cases are signalling that content is to be installed (including thumbnail generation), or that content is to be consumed. They are characterized as calls to this function with the correct intent (i.e. EPlay or EInstall) and the corresponding action (i.e. telling whether the indicated intent is started or finished). Calls to this function must be the result of a user interaction or otherwise high level event.
|
|
DataTypesCount. Returns the number of previously registered datatypes which are supported by the DRM system and associated applications.
|
|
This method should be called after embedded preview has been played. It asks from user if he/she wants to buy rights and acquires those if user agrees. Leaves with system-wide error code in case of error.
|
|
This method should be called after embedded preview has been played. It asks from user if he/she wants to buy rights and acquires those if user agrees. Leaves with system-wide error code in case of error.
|
|
GetContentURIList. Returns a list of all content URIs that have rights in the rights database.
|
|
Acquires preview rights for given content. Leaves with system-wide error code in case of error.
|
|
Acquires preview rights for given content. Leaves with system-wide error code in case of error.
|
|
Gets details of rights object associated of given file.
|
|
Gets details of rights object associated of given file.
|
|
Gets details of rights object associated of given file.
|
|
Gets details of rights object associated of given file.
|
|
Displays: Handles error situations 'rights expired', 'no rights' and 'rights database corrupted'.
|
|
Displays: Handles error situations 'rights expired', 'no rights' and 'rights database corrupted'.
|
|
Displays appropriate error note depending on error code.
|
|
Handles DRM specific error situations. Should be called instead of HandleErrorL if user should be asked to play embedded preview or get preview/silent rights if there is no valid rights and either embedded preview or preview rights are available.
|
|
Handles DRM-specific error situations. Should be called instead of HandleErrorL if user should be asked to play embedded preview or get preview/silent rights if there is no valid rights and either embedded preview or preview rights are available.
|
|
Checks if given content has InfoUrl. Leaves with system-wide error code in case of error.
|
|
Checks if given content has InfoUrl. Leaves with system-wide error code in case of error.
|
|
Checks if given content has embedded preview or if it is possible to get preview rights for it. Leaves with system-wide error code in case of error.
|
|
Checks if given content has embedded preview or if it is possible to get preview rights for it. Leaves with system-wide error code in case of error.
|
|
Informs DRMHelper that idle-screen has been activated.
|
|
Launches DRM Rights Manager UI embedded with details view related to given content.
|
|
Launches DRM Rights Manager UI embedded with details view related to given file.
|
|
Launches DRM Rights Manager UI embedded with details view related to given file.
|
|
Launches DRM Rights Manager UI embedded with details view related to given content.
|
|
Two-phased constructor. |
|
Two-phased constructor. |
|
Two-phased constructor. |
|
Two-phased constructor. |
|
|
|
|
|
Opens browser with InfoUrl of the content. Leaves with system-wide error code in case of error.
|
|
Opens browser with InfoUrl of the content. Leaves with system-wide error code in case of error.
|
|
RegisterDataType. Registers a datatype as a supported datatype.
|
|
Unregisters given content to be used as an automated content.
|
|
Unregisters given content to be used as an automated content.
|
|
Unregisters given content to be used as an automated content.
|
|
Unregisters given content to be used as an automated content. This function must be used when content was registered using SetAutomatedPassive.
|
|
Unregisters given content to be used as an automated content. This function must be used when content was registered using SetAutomatedPassive.
|
|
Unregisters given content to be used as an automated content. This function must be used when content was registered using SetAutomatedPassive.
|
|
Registers given content to be used as an automated content. This function is used when registering application listens expiry
|
|
Registers given content to be used as an automated content. This function is used when registering application listens expiry notifications itself.
|
|
Registers given content to be used as an automated content. This function is used when registering application listens expiry notifications itself
|
|
Registers given content to be used as an automated content. This function is used when phone application listens to expiry notifications.
|
|
Registers given content to be used as an automated content. This function is used when phone application listens to expiry notifications.
|
|
Registers given content to be used as an automated content. This function is used when phone application listens to expiry notifications.
|
|
Registers given content to be used as an automated content without confirmation query.
|
|
Registers given content to be used as an automated content without confirmation query.
|
|
Registers given content to be used as an automated content without confirmation query.
|
|
Sets the type of automated content to be registered. This method should be called before calling any of SetAutomated* methods.
|
|
Set count limit for CheckRightsAmountL.
|
|
Set percentage limit for CheckRightsAmountL. Applies to both counts and time.
|
|
Sets media type of content for preview. Should be called prior to calling HandleErrorOrPreviewL or EmbeddedPreviewCompletedL.
|
|
Set time limit in days for CheckRightsAmountL.
|
|
Displays the confirmation query about setting given content as an automated content. Note that this function does not actually register content, just displays the note
|
|
Displays the confirmation query about setting given content as an automated content. Note that this function does not actually register content, just displays the note
|
|
Displays the confirmation query about setting given content as an automated content. Note that this function does not actually register content, just displays the note
|
|
Handle the general UI based error notes.
|
|
Handle the general UI based error notes.
|
|
SupportedDataType. Returns a specific datatype which has been registered before by giving an index
|
|
SupportedDRMMethods. Returns the supported DRM protection methods and the OMA compliance level of the DRM engine
|
|
UnRegisterDataType. Unregisters a datatype via its index.
|