CDRMHelper Class Reference

#include <mw/DRMHelper.h>

Link against: drmhelper.lib

class CDRMHelper : public CBase

Inherits from

  • CDRMHelper
    Public Member Enumerations
    enumTDRMHelperAutomatedType { EAutomatedTypeRingingTone, EAutomatedTypeMessageAlert, EAutomatedTypeEmailAlert, EAutomatedTypeIMAlert, ..., EAutomatedTypeOther }
    enumTDRMHelperConsumeAction { EStart, EFinish, EPause, EContinue }
    enumTDRMHelperDRMMethods { EForwardLock, ECombinedDelivery, ESeparateDelivery, ESuperDistribution }
    enumTDRMHelperNotificationID { ETActivateTextId, ETCountBasedErrorTextId, ETCountUsageReduceId, ETCountUsageReduceMediaId }
    enumTDRMHelperOMALevel { EOMA_None, EOMA_1_0, EOMA_2_0 }
    enumTDRMHelperPreviewType { ENoPreview, EEmbeddedPreview, EPreviewRights }
    Public Member Functions
    ~CDRMHelper()
    IMPORT_C voidActivateContentL(CData &)
    IMPORT_C voidActivateContentL(TDesC &)
    IMPORT_C TIntCanSetAutomated(const TDesC8 &, TBool &)
    IMPORT_C TIntCanSetAutomated(const TDesC &, TBool &)
    IMPORT_C TIntCanSetAutomated(RFile &, TBool &)
    IMPORT_C TIntCheckRightsAmountL(const TDesC &, TInt, TInt)
    IMPORT_C TIntCheckRightsAmountL(RFile &, TInt, TInt)
    IMPORT_C TIntCheckRightsAmountL(const TDesC8 &, TInt, TInt)
    IMPORT_C TIntCheckRightsPercentL(const TDesC &, TInt)
    IMPORT_C TIntCheckRightsPercentL(RFile &, TInt)
    IMPORT_C TIntConsume2(const TDesC8 &, TUint32, TDRMHelperConsumeAction)
    IMPORT_C TIntConsumeFile2(const TDesC &, TUint32, TDRMHelperConsumeAction)
    IMPORT_C TIntConsumeFile2(RFile &, TUint32, TDRMHelperConsumeAction)
    IMPORT_C TIntDataTypesCount(TInt &)
    IMPORT_C TBoolEmbeddedPreviewCompletedL(CData &)
    IMPORT_C TBoolEmbeddedPreviewCompletedL(TDesC &)
    IMPORT_C TIntGetContentURIList(RPointerArray< HBufC8 > *&)
    IMPORT_C voidGetPreviewRightsL(CData &)
    IMPORT_C voidGetPreviewRightsL(TDesC &)
    IMPORT_C voidGetRightsDetailsL(const TDesC &, TUint32, TBool &, TBool &, CDRMHelperRightsConstraints *&, CDRMHelperRightsConstraints *&, CDRMHelperRightsConstraints *&, CDRMHelperRightsConstraints *&)
    IMPORT_C voidGetRightsDetailsL(RFile &, TUint32, TBool &, TBool &, CDRMHelperRightsConstraints *&, CDRMHelperRightsConstraints *&, CDRMHelperRightsConstraints *&, CDRMHelperRightsConstraints *&)
    IMPORT_C voidGetRightsDetailsL(const TDesC &, TUint32, TBool &, TBool &, CDRMRightsConstraints *&, CDRMRightsConstraints *&, CDRMRightsConstraints *&, CDRMRightsConstraints *&)
    IMPORT_C voidGetRightsDetailsL(RFile &, TUint32, TBool &, TBool &, CDRMRightsConstraints *&, CDRMRightsConstraints *&, CDRMRightsConstraints *&, CDRMRightsConstraints *&)
    IMPORT_C TIntHandleErrorL(TInt, const TDesC8 &)
    IMPORT_C TIntHandleErrorL(TInt, const TDesC &)
    IMPORT_C TIntHandleErrorL(TInt, RFile &)
    IMPORT_C TIntHandleErrorOrPreviewL(TInt, RFile &, HBufC8 *&)
    IMPORT_C TIntHandleErrorOrPreviewL(TInt, const TDesC &, HBufC8 *&)
    IMPORT_C TBoolHasInfoUrlL(CData &, HBufC8 *&)
    IMPORT_C TBoolHasInfoUrlL(TDesC &, HBufC8 *&)
    IMPORT_C TDRMHelperPreviewTypeHasPreviewL(CData &, HBufC8 *&)
    IMPORT_C TDRMHelperPreviewTypeHasPreviewL(TDesC &, HBufC8 *&)
    IMPORT_C voidIndicateIdle()
    IMPORT_C voidLaunchDetailsViewEmbeddedL(const TDesC8 &)
    IMPORT_C voidLaunchDetailsViewEmbeddedL(const TDesC &)
    IMPORT_C voidLaunchDetailsViewEmbeddedL(RFile &)
    IMPORT_C voidLaunchDetailsViewEmbeddedL(const HBufC8 *)
    IMPORT_C CDRMHelper *NewL(CCoeEnv &)
    IMPORT_C CDRMHelper *NewL()
    IMPORT_C CDRMHelper *NewL(CCoeEnv &, RFs &)
    IMPORT_C CDRMHelper *NewL(RFs &)
    IMPORT_C CDRMHelper *NewLC(CCoeEnv &)
    IMPORT_C CDRMHelper *NewLC()
    IMPORT_C CDRMHelper *NewLC(CCoeEnv &, RFs &)
    IMPORT_C CDRMHelper *NewLC(RFs &)
    IMPORT_C voidOpenInfoUrlL(CData &)
    IMPORT_C voidOpenInfoUrlL(TDesC &)
    IMPORT_C TIntRegisterDataType(const TDataType &)
    IMPORT_C TIntRemoveAutomated(const TDesC8 &)
    IMPORT_C TIntRemoveAutomated(const TDesC &)
    IMPORT_C TIntRemoveAutomated(RFile &)
    IMPORT_C TIntRemoveAutomatedPassive(const TDesC8 &)
    IMPORT_C TIntRemoveAutomatedPassive(const TDesC &)
    IMPORT_C TIntRemoveAutomatedPassive(RFile &)
    IMPORT_C TIntSetAutomated(const TDesC8 &)
    IMPORT_C TIntSetAutomated(const TDesC &)
    IMPORT_C TIntSetAutomated(RFile &)
    IMPORT_C TIntSetAutomatedPassive(const TDesC8 &)
    IMPORT_C TIntSetAutomatedPassive(const TDesC &)
    IMPORT_C TIntSetAutomatedPassive(RFile &)
    IMPORT_C TIntSetAutomatedSilent(const TDesC8 &, TBool)
    IMPORT_C TIntSetAutomatedSilent(const TDesC &, TBool)
    IMPORT_C TIntSetAutomatedSilent(RFile &, TBool)
    IMPORT_C TIntSetAutomatedType(TDRMHelperAutomatedType)
    IMPORT_C voidSetCountLimitL(TUint)
    IMPORT_C voidSetPercentageLimitL(TUint)
    IMPORT_C TIntSetPreviewMediaType(TDRMHelperPreviewMediaType)
    IMPORT_C voidSetTimeLimitL(TUint)
    IMPORT_C TIntShowAutomatedNote(const TDesC8 &)
    IMPORT_C TIntShowAutomatedNote(const TDesC &)
    IMPORT_C TIntShowAutomatedNote(RFile &)
    IMPORT_C TIntShowDRMUINotification2L(TDRMHelperNotificationID, const TDesC8 &)
    IMPORT_C TIntShowDRMUINotification2L(TDRMHelperNotificationID, const TDesC &)
    IMPORT_C TIntSupportedDRMMethods2(TInt &, TDRMHelperOMALevel &)
    IMPORT_C TIntSupportedDataType(const TInt, TDataType &)
    IMPORT_C TIntUnRegisterDataType(const TInt)
    Inherited Functions
    CBase::CBase()
    CBase::Delete(CBase *)
    CBase::Extension_(TUint,TAny *&,TAny *)
    CBase::operator new(TUint)
    CBase::operator new(TUint,TAny *)
    CBase::operator new(TUint,TLeave)
    CBase::operator new(TUint,TLeave,TUint)
    CBase::operator new(TUint,TUint)
    CBase::~CBase()

    Detailed Description

    Handles some error situations DRM-aware applications may encounter.

    Since
    Series 60 2.1

    Member Enumeration Documentation

    Enum TDRMHelperAutomatedType

    Enum TDRMHelperConsumeAction

    EnumeratorValueDescription
    EStart
    EFinish
    EPause
    EContinue

    Enum TDRMHelperDRMMethods

    EnumeratorValueDescription
    EForwardLock0x0001
    ECombinedDelivery0x0002
    ESeparateDelivery0x0004
    ESuperDistribution0x0008

    Enum TDRMHelperNotificationID

    Enum TDRMHelperOMALevel

    EnumeratorValueDescription
    EOMA_None
    EOMA_1_0
    EOMA_2_0

    Enum TDRMHelperPreviewType

    EnumeratorValueDescription
    ENoPreview
    EEmbeddedPreview
    EPreviewRights

    Constructor & Destructor Documentation

    ~CDRMHelper ( )

    IMPORT_C~CDRMHelper()

    Destructor.

    Member Function Documentation

    ActivateContentL ( CData & )

    IMPORT_C voidActivateContentL(CData &aContent)

    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.

    ActivateContentL ( TDesC & )

    IMPORT_C voidActivateContentL(TDesC &aFileName)

    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.

    CanSetAutomated ( const TDesC8 &, TBool & )

    IMPORT_C TIntCanSetAutomated(const TDesC8 &aURI,
    TBool &aValue
    )
    Checks if given content can be set as an automated content.
    Since
    Series 60 2.6

    Returns: System wide or DRM specific error code.

    CanSetAutomated ( const TDesC &, TBool & )

    IMPORT_C TIntCanSetAutomated(const TDesC &aFilename,
    TBool &aValue
    )
    Checks if given content can be set as an automated content.
    Since
    Series 60 2.6

    Returns: System wide or DRM specific error code.

    CanSetAutomated ( RFile &, TBool & )

    IMPORT_C TIntCanSetAutomated(RFile &aFileHandle,
    TBool &aValue
    )
    Checks if given content can be set as an automated content.
    Since
    3.0

    Returns: System wide or DRM specific error code.

    CheckRightsAmountL ( const TDesC &, TInt, TInt )

    IMPORT_C TIntCheckRightsAmountL(const TDesC &aFileName,
    TIntaCount =  KDRMHelperDefaultCountThreshold ,
    TIntaDays =  KDRMHelperDefaultTimeThreshold
    )
    Check rights for the content. If there is less than given amount of usage time/count left, appropriate note is displayed depending on situation.
    Since
    3.0 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.

    Returns: Button code Check rights for the file. If there is less than given amount of usage time/count/percentage left, appropriate note is displayed depending on situation. Button code Check rights for the file. If there is less than given amount of usage time/count/percentage left, appropriate note is displayed depending on situation. Button code Button code

    CheckRightsAmountL ( RFile &, TInt, TInt )

    IMPORT_C TIntCheckRightsAmountL(RFile &aFileHandle,
    TIntaCount =  KDRMHelperDefaultCountThreshold ,
    TIntaDays =  KDRMHelperDefaultTimeThreshold
    )
    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.
    Since
    3.0

    Returns: Button code

    CheckRightsAmountL ( const TDesC8 &, TInt, TInt )

    IMPORT_C TIntCheckRightsAmountL(const TDesC8 &aUri,
    TIntaCount =  KDRMHelperDefaultCountThreshold ,
    TIntaDays =  KDRMHelperDefaultTimeThreshold
    )

    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.

    Returns: Button code

    CheckRightsPercentL ( const TDesC &, TInt )

    IMPORT_C TIntCheckRightsPercentL(const TDesC &aFileName,
    TIntaThreshold =  KDRMHelperDefaultPercentageThreshold
    )

    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.

    Returns: Button code

    CheckRightsPercentL ( RFile &, TInt )

    IMPORT_C TIntCheckRightsPercentL(RFile &aFileHandle,
    TIntaThreshold =  KDRMHelperDefaultPercentageThreshold
    )
    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.
    Since
    3.0

    Returns: Button code

    Consume2 ( const TDesC8 &, TUint32, TDRMHelperConsumeAction )

    IMPORT_C TIntConsume2(const TDesC8 &aContentURI,
    TUint32aRightsSpec,
    TDRMHelperConsumeActionanAction
    )

    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.

    Since
    3.0

    Returns: EOk if consume action was successfully signalled to the engine.

    ConsumeFile2 ( const TDesC &, TUint32, TDRMHelperConsumeAction )

    IMPORT_C TIntConsumeFile2(const TDesC &aFileName,
    TUint32aRightsSpec,
    TDRMHelperConsumeActionanAction
    )

    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.

    Since
    3.0

    Returns: EOk if consume action was successfully signalled to the engine.

    ConsumeFile2 ( RFile &, TUint32, TDRMHelperConsumeAction )

    IMPORT_C TIntConsumeFile2(RFile &aFileHandle,
    TUint32aRightsSpec,
    TDRMHelperConsumeActionanAction
    )

    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.

    Since
    3.0

    Returns: EOk if consume action was successfully signalled to the engine.

    DataTypesCount ( TInt & )

    IMPORT_C TIntDataTypesCount(TInt &aCount)

    DataTypesCount

    Returns the number of previously registered datatypes which are supported by the DRM system and associated applications.

    Since
    2.0

    Returns: EOk if the number of datatypes has been returned correctly

    EmbeddedPreviewCompletedL ( CData & )

    IMPORT_C TBoolEmbeddedPreviewCompletedL(CData &aContent)

    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.

    Returns: ETrue if user selects to buy rights.

    EmbeddedPreviewCompletedL ( TDesC & )

    IMPORT_C TBoolEmbeddedPreviewCompletedL(TDesC &aFileName)

    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.

    Returns: ETrue if user selects to buy rights.

    GetContentURIList ( RPointerArray< HBufC8 > *& )

    IMPORT_C TIntGetContentURIList(RPointerArray< HBufC8 > *&aURIList)

    GetContentURIList

    Returns a list of all content URIs that have rights in the rights database.

    Since
    2.5

    Returns: Ok if the URI list could be retreived.

    GetPreviewRightsL ( CData & )

    IMPORT_C voidGetPreviewRightsL(CData &aContent)

    Acquires preview rights for given content. Leaves with system-wide error code in case of error.

    GetPreviewRightsL ( TDesC & )

    IMPORT_C voidGetPreviewRightsL(TDesC &aFileName)

    Acquires preview rights for given content. Leaves with system-wide error code in case of error.

    GetRightsDetailsL ( const TDesC &, TUint32, TBool &, TBool &, CDRMHelperRightsConstraints *&, CDRMHelperRightsConstraints *&, CDRMHelperRightsConstraints *&, CDRMHelperRightsConstraints *& )

    IMPORT_C voidGetRightsDetailsL(const TDesC &aFileName,
    TUint32aIntent,
    TBool &aExpired,
    TBool &aSendingAllowed,
    CDRMHelperRightsConstraints *&aPlay,
    CDRMHelperRightsConstraints *&aDisplay,
    CDRMHelperRightsConstraints *&aExecute,
    CDRMHelperRightsConstraints *&aPrint
    )

    Gets details of rights object associated of given file.

    leave
    KErrArgument file is not DRM-protected.
    leave
    KErrCANoRights no rights

    See also: caferr.h caftypes.h

    ParameterDescription
    aFileNameFull path to file
    aIntentContentAccess::EPlay, ContentAccess::EView, ContentAccess::EPrint or ContentAccess::EExecute
    aExpiredETrue if rights are not valid. If this is ETrue and some constraints are returned, rights will become valid in future
    aSendingAllowedETrue if content can be sent
    aPlayplay constraints, must be deleted by caller
    aDisplaydisplay constraints, must be deleted by caller
    aExecuteexecute constraints, must be deleted by caller
    aPrintprint constraints, must be deleted by caller

    GetRightsDetailsL ( RFile &, TUint32, TBool &, TBool &, CDRMHelperRightsConstraints *&, CDRMHelperRightsConstraints *&, CDRMHelperRightsConstraints *&, CDRMHelperRightsConstraints *& )

    IMPORT_C voidGetRightsDetailsL(RFile &aFileHandle,
    TUint32aIntent,
    TBool &aExpired,
    TBool &aSendingAllowed,
    CDRMHelperRightsConstraints *&aPlay,
    CDRMHelperRightsConstraints *&aDisplay,
    CDRMHelperRightsConstraints *&aExecute,
    CDRMHelperRightsConstraints *&aPrint
    )

    Gets details of rights object associated of given file.

    leave
    KErrArgument file is not DRM-protected.
    leave
    KErrCANoRights no rights

    See also: caferr.h caftypes.h

    Since
    3.0
    ParameterDescription
    aFileHandlefile handle to the file
    aIntentContentAccess::EPlay, ContentAccess::EView, ContentAccess::EPrint or ContentAccess::EExecute
    aExpiredETrue if rights are not valid. If this is ETrue and some constraints are returned, rights will become valid in future
    aSendingAllowedETrue if content can be sent
    aPlayplay constraints, must be deleted by caller
    aDisplaydisplay constraints, must be deleted by caller
    aExecuteexecute constraints, must be deleted by caller
    aPrintprint constraints, must be deleted by caller

    GetRightsDetailsL ( const TDesC &, TUint32, TBool &, TBool &, CDRMRightsConstraints *&, CDRMRightsConstraints *&, CDRMRightsConstraints *&, CDRMRightsConstraints *& )

    IMPORT_C voidGetRightsDetailsL(const TDesC &aFileName,
    TUint32aIntent,
    TBool &aExpired,
    TBool &aSendingAllowed,
    CDRMRightsConstraints *&aPlay,
    CDRMRightsConstraints *&aDisplay,
    CDRMRightsConstraints *&aExecute,
    CDRMRightsConstraints *&aPrint
    )

    Gets details of rights object associated of given file.

    leave
    KErrArgument file is not DRM-protected.
    leave
    KErrCANoRights no rights

    See also: caferr.h caftypes.h

    ParameterDescription
    aFileNameFull path to file
    aIntentContentAccess::EPlay, ContentAccess::EView, ContentAccess::EPrint or ContentAccess::EExecute
    aExpiredETrue if rights are not valid. If this is ETrue and some constraints are returned, rights will become valid in future
    aSendingAllowedETrue if content can be sent
    aPlayplay constraints, must be deleted by caller
    aDisplaydisplay constraints, must be deleted by caller
    aExecuteexecute constraints, must be deleted by caller
    aPrintprint constraints, must be deleted by caller

    GetRightsDetailsL ( RFile &, TUint32, TBool &, TBool &, CDRMRightsConstraints *&, CDRMRightsConstraints *&, CDRMRightsConstraints *&, CDRMRightsConstraints *& )

    IMPORT_C voidGetRightsDetailsL(RFile &aFileHandle,
    TUint32aIntent,
    TBool &aExpired,
    TBool &aSendingAllowed,
    CDRMRightsConstraints *&aPlay,
    CDRMRightsConstraints *&aDisplay,
    CDRMRightsConstraints *&aExecute,
    CDRMRightsConstraints *&aPrint
    )

    Gets details of rights object associated of given file.

    leave
    KErrArgument file is not DRM-protected.
    leave
    KErrCANoRights no rights

    See also: caferr.h caftypes.h

    Since
    3.0
    ParameterDescription
    aFileHandlefile handle to the file
    aIntentContentAccess::EPlay, ContentAccess::EView, ContentAccess::EPrint or ContentAccess::EExecute
    aExpiredETrue if rights are not valid. If this is ETrue and some constraints are returned, rights will become valid in future
    aSendingAllowedETrue if content can be sent
    aPlayplay constraints, must be deleted by caller
    aDisplaydisplay constraints, must be deleted by caller
    aExecuteexecute constraints, must be deleted by caller
    aPrintprint constraints, must be deleted by caller

    HandleErrorL ( TInt, const TDesC8 & )

    IMPORT_C TIntHandleErrorL(TIntaError,
    const TDesC8 &aURI
    )

    Displays appropriate error note depending on error code.

    Returns: Button code, if user selected "buy rights" or "launch rights manager" in query.0 if user selected "No", "Back" or "Cancel" (or whatever which just dismiss the query)0 if just a simple error note is displayed

    HandleErrorL ( TInt, const TDesC & )

    IMPORT_C TIntHandleErrorL(TIntaError,
    const TDesC &aFileName
    )

    Displays: Handles error situations 'rights expired', 'no rights' and 'rights database corrupted'.

    Returns: Button code, if user selected "buy rights" or "launch rights manager" in query.0 if user selected "No", "Back" or "Cancel" (or whatever which just dismiss the query)0 if just a simple error note is displayed

    HandleErrorL ( TInt, RFile & )

    IMPORT_C TIntHandleErrorL(TIntaError,
    RFile &aFileHandle
    )
    Displays: Handles error situations 'rights expired', 'no rights' and 'rights database corrupted'.
    Since
    3.0

    Returns: Button code, if user selected "buy rights" or "launch rights manager" in query.0 if user selected "No", "Back" or "Cancel" (or anything that just dismisses the query)0 if just a simple error note is displayed

    HandleErrorOrPreviewL ( TInt, RFile &, HBufC8 *& )

    IMPORT_C TIntHandleErrorOrPreviewL(TIntaError,
    RFile &aFile,
    HBufC8 *&aEmbeddedPreviewUri
    )
    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.
    Since
    S60 3.1

    Returns: KErrNone if the content is now usable (e.g. silent rights or preview rights were gotten). If the return code is KErrNone and the aEmbeddedPreviewUri parameter is not NULL, the player should use embedded preview KErrCancel if the user cancelled any of the actions within the function KErrCANoRights and KErrCANoPermission if after the function call, still no rights exist KErrCompletion if the user did launch the browser, but it is not clear whether the content was activated

    HandleErrorOrPreviewL ( TInt, const TDesC &, HBufC8 *& )

    IMPORT_C TIntHandleErrorOrPreviewL(TIntaError,
    const TDesC &aFileName,
    HBufC8 *&aEmbeddedPreviewUri
    )
    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.
    Since
    S60 3.1

    Returns: KErrNone if the content is now usable (e.g. silent rights or preview rights were gotten). If the return code is KErrNone and the aEmbeddedPreviewUri parameter is not NULL, the player should use embedded preview KErrCancel if the user cancelled any of the actions within the function KErrCANoRights and KErrCANoPermission if after the function call, still no rights exist KErrCompletion if the user did launch the browser, but it is not clear whether the content was activated

    HasInfoUrlL ( CData &, HBufC8 *& )

    IMPORT_C TBoolHasInfoUrlL(CData &aContent,
    HBufC8 *&aInfoUrl
    )

    Checks if given content has InfoUrl. Leaves with system-wide error code in case of error.

    Returns: ETrue if content has InfoUrl.

    HasInfoUrlL ( TDesC &, HBufC8 *& )

    IMPORT_C TBoolHasInfoUrlL(TDesC &aFileName,
    HBufC8 *&aInfoUrl
    )

    Checks if given content has InfoUrl. Leaves with system-wide error code in case of error.

    Returns: ETrue if content has InfoUrl.

    HasPreviewL ( CData &, HBufC8 *& )

    IMPORT_C TDRMHelperPreviewTypeHasPreviewL(CData &aContent,
    HBufC8 *&aPreviewUri
    )

    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.

    Returns: preview type

    HasPreviewL ( TDesC &, HBufC8 *& )

    IMPORT_C TDRMHelperPreviewTypeHasPreviewL(TDesC &aFileName,
    HBufC8 *&aPreviewUri
    )

    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.

    Returns: preview type

    IndicateIdle ( )

    IMPORT_C voidIndicateIdle()
    Informs DRMHelper that idle-screen has been activated.
    Since
    Series 60 2.6

    Returns: -

    LaunchDetailsViewEmbeddedL ( const TDesC8 & )

    IMPORT_C voidLaunchDetailsViewEmbeddedL(const TDesC8 &aURI)

    Launches DRM Rights Manager UI embedded with details view related to given content.

    Returns: -

    LaunchDetailsViewEmbeddedL ( const TDesC & )

    IMPORT_C voidLaunchDetailsViewEmbeddedL(const TDesC &aFileName)

    Launches DRM Rights Manager UI embedded with details view related to given file.

    Returns: -

    LaunchDetailsViewEmbeddedL ( RFile & )

    IMPORT_C voidLaunchDetailsViewEmbeddedL(RFile &aFileHandle)
    Launches DRM Rights Manager UI embedded with details view related to given file.
    Since
    3.0

    Returns: -

    LaunchDetailsViewEmbeddedL ( const HBufC8 * )

    IMPORT_C voidLaunchDetailsViewEmbeddedL(const HBufC8 *aContentURI)

    Launches DRM Rights Manager UI embedded with details view related to given content.

    Returns: -

    NewL ( CCoeEnv & )

    IMPORT_C CDRMHelper *NewL(CCoeEnv &aCoeEnv)[static]

    Two-phased constructor.

    NewL ( )

    IMPORT_C CDRMHelper *NewL()[static]
    Two-phased constructor.
    Since
    Series 60 2.6

    NewL ( CCoeEnv &, RFs & )

    IMPORT_C CDRMHelper *NewL(CCoeEnv &aCoeEnv,
    RFs &aFs
    )[static]
    Two-phased constructor.
    Since
    Series 60 3.0

    NewL ( RFs & )

    IMPORT_C CDRMHelper *NewL(RFs &aFs)[static]
    Two-phased constructor.
    Since
    Series 60 3.0

    NewLC ( CCoeEnv & )

    IMPORT_C CDRMHelper *NewLC(CCoeEnv &aCoeEnv)[static]

    NewLC ( )

    IMPORT_C CDRMHelper *NewLC()[static]

    NewLC ( CCoeEnv &, RFs & )

    IMPORT_C CDRMHelper *NewLC(CCoeEnv &aCoeEnv,
    RFs &aFs
    )[static]

    NewLC ( RFs & )

    IMPORT_C CDRMHelper *NewLC(RFs &aFs)[static]

    OpenInfoUrlL ( CData & )

    IMPORT_C voidOpenInfoUrlL(CData &aContent)

    Opens browser with InfoUrl of the content. Leaves with system-wide error code in case of error.

    OpenInfoUrlL ( TDesC & )

    IMPORT_C voidOpenInfoUrlL(TDesC &aFileName)

    Opens browser with InfoUrl of the content. Leaves with system-wide error code in case of error.

    RegisterDataType ( const TDataType & )

    IMPORT_C TIntRegisterDataType(const TDataType &aDataType)

    RegisterDataType

    Registers a datatype as a supported datatype.

    Since
    2.0

    Returns: EOk if the datatype has been registered

    RemoveAutomated ( const TDesC8 & )

    IMPORT_C TIntRemoveAutomated(const TDesC8 &aURI)
    Unregisters given content to be used as an automated content.
    Since
    Series 60 2.6

    Returns: System wide error code.

    RemoveAutomated ( const TDesC & )

    IMPORT_C TIntRemoveAutomated(const TDesC &aFilename)
    Unregisters given content to be used as an automated content.
    Since
    Series 60 2.6

    Returns: System wide error code.

    RemoveAutomated ( RFile & )

    IMPORT_C TIntRemoveAutomated(RFile &aFileHandle)
    Unregisters given content to be used as an automated content.
    Since
    3.0

    Returns: System wide error code.

    RemoveAutomatedPassive ( const TDesC8 & )

    IMPORT_C TIntRemoveAutomatedPassive(const TDesC8 &aURI)
    Unregisters given content to be used as an automated content. This function must be used when content was registered using SetAutomatedPassive.
    Since
    Series 60 2.6

    Returns: System wide error code.

    RemoveAutomatedPassive ( const TDesC & )

    IMPORT_C TIntRemoveAutomatedPassive(const TDesC &aFilename)
    Unregisters given content to be used as an automated content. This function must be used when content was registered using SetAutomatedPassive.
    Since
    Series 60 2.6

    Returns: System wide error code.

    RemoveAutomatedPassive ( RFile & )

    IMPORT_C TIntRemoveAutomatedPassive(RFile &aFileHandle)
    Unregisters given content to be used as an automated content. This function must be used when content was registered using SetAutomatedPassive.
    Since
    3.0

    Returns: System wide error code.

    SetAutomated ( const TDesC8 & )

    IMPORT_C TIntSetAutomated(const TDesC8 &aURI)
    Registers given content to be used as an automated content. This function is used when registering application listens expiry notifications itself
    Since
    Series 60 2.6

    Returns: System wide error code (KErrCancel if user pressed no to query).

    SetAutomated ( const TDesC & )

    IMPORT_C TIntSetAutomated(const TDesC &aFilename)
    Registers given content to be used as an automated content. This function is used when registering application listens expiry notifications itself.
    Since
    Series 60 2.6

    Returns: System wide error code (KErrCancel if user pressed no to query).

    SetAutomated ( RFile & )

    IMPORT_C TIntSetAutomated(RFile &aFileHandle)
    Registers given content to be used as an automated content. This function is used when registering application listens expiry
    Since
    3.0

    Returns: System wide error code (KErrCancel if user pressed no to query).

    SetAutomatedPassive ( const TDesC8 & )

    IMPORT_C TIntSetAutomatedPassive(const TDesC8 &aURI)
    Registers given content to be used as an automated content. This function is used when phone application listens to expiry notifications.
    Since
    Series 60 2.6

    Returns: System wide error code (KErrCancel if user pressed no to query).

    SetAutomatedPassive ( const TDesC & )

    IMPORT_C TIntSetAutomatedPassive(const TDesC &aFilename)
    Registers given content to be used as an automated content. This function is used when phone application listens to expiry notifications.
    Since
    Series 60 2.6

    Returns: System wide error code (KErrCancel if user pressed no to query).

    SetAutomatedPassive ( RFile & )

    IMPORT_C TIntSetAutomatedPassive(RFile &aFileHandle)
    Registers given content to be used as an automated content. This function is used when phone application listens to expiry notifications.
    Since
    3.0

    Returns: System wide error code (KErrCancel if user pressed no to query).

    SetAutomatedSilent ( const TDesC8 &, TBool )

    IMPORT_C TIntSetAutomatedSilent(const TDesC8 &aURI,
    TBoolaActive
    )
    Registers given content to be used as an automated content without confirmation query.
    Since
    Series 60 2.6

    Returns: System wide error code (KErrCancel if user pressed no to query).

    SetAutomatedSilent ( const TDesC &, TBool )

    IMPORT_C TIntSetAutomatedSilent(const TDesC &aFilename,
    TBoolaActive
    )
    Registers given content to be used as an automated content without confirmation query.
    Since
    Series 60 2.6

    Returns: System wide error code (KErrCancel if user pressed no to query).

    SetAutomatedSilent ( RFile &, TBool )

    IMPORT_C TIntSetAutomatedSilent(RFile &aFileHandle,
    TBoolaActive
    )
    Registers given content to be used as an automated content without confirmation query.
    Since
    3.0

    Returns: System wide error code (KErrCancel if user pressed no to query).

    SetAutomatedType ( TDRMHelperAutomatedType )

    IMPORT_C TIntSetAutomatedType(TDRMHelperAutomatedTypeaAutomatedType)
    Sets the type of automated content to be registered. This method should be called before calling any of SetAutomated* methods.
    Since
    Series 60 3.0

    Returns: System wide error code

    SetCountLimitL ( TUint )

    IMPORT_C voidSetCountLimitL(TUintaCounts)

    Set count limit for CheckRightsAmountL

    Returns: -

    SetPercentageLimitL ( TUint )

    IMPORT_C voidSetPercentageLimitL(TUintaPercentage)

    Set percentage limit for CheckRightsAmountL. Applies to both counts and time.

    Returns: -

    SetPreviewMediaType ( TDRMHelperPreviewMediaType )

    IMPORT_C TIntSetPreviewMediaType(TDRMHelperPreviewMediaTypeaMediaType)
    Sets media type of content for preview. Should be called prior to calling HandleErrorOrPreviewL or EmbeddedPreviewCompletedL.
    Since
    S60 3.1u

    Returns: System wide error code

    SetTimeLimitL ( TUint )

    IMPORT_C voidSetTimeLimitL(TUintaDays)

    Set time limit in days for CheckRightsAmountL

    Returns: -

    ShowAutomatedNote ( const TDesC8 & )

    IMPORT_C TIntShowAutomatedNote(const TDesC8 &aURI)
    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
    Since
    Series 60 2.6

    Returns: System wide error code (KErrCancel if user pressed no to query).

    ShowAutomatedNote ( const TDesC & )

    IMPORT_C TIntShowAutomatedNote(const TDesC &aFilename)
    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
    Since
    Series 60 2.6

    Returns: System wide error code (KErrCancel if user pressed no to query).

    ShowAutomatedNote ( RFile & )

    IMPORT_C TIntShowAutomatedNote(RFile &aFileHandle)
    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
    Since
    3.0

    Returns: System wide error code (KErrCancel if user pressed no to query).

    ShowDRMUINotification2L ( TDRMHelperNotificationID, const TDesC8 & )

    IMPORT_C TIntShowDRMUINotification2L(TDRMHelperNotificationIDaTextId,
    const TDesC8 &aURI
    )
    Handle the general UI based error notes
    Since
    3.0
    ParameterDescription
    aTextIdThe code for DRM general notification note.
    aURIThe DRM files URI, that caused the DRM error.

    Returns: KErrnone if everything went ok, else wide scale of Symbian errors

    ShowDRMUINotification2L ( TDRMHelperNotificationID, const TDesC & )

    IMPORT_C TIntShowDRMUINotification2L(TDRMHelperNotificationIDaTextId,
    const TDesC &aFileName
    )
    Handle the general UI based error notes
    Since
    3.0
    ParameterDescription
    aTextIdThe code for DRM general notification note.
    aFileNameThe DRM file's name and path, that caused the DRM error.

    Returns: KErrnone if everything went ok, else wide scale of Symbian errors

    SupportedDRMMethods2 ( TInt &, TDRMHelperOMALevel & )

    IMPORT_C TIntSupportedDRMMethods2(TInt &aDRMMethod,
    TDRMHelperOMALevel &aOMALevel
    )

    SupportedDRMMethods

    Returns the supported DRM protection methods and the OMA compliance level of the DRM engine

    Since
    2.0

    Returns: DRMCommon error code

    SupportedDataType ( const TInt, TDataType & )

    IMPORT_C TIntSupportedDataType(const TIntaIndex,
    TDataType &aDataType
    )

    SupportedDataType

    Returns a specific datatype which has been registered before by giving an index

    Since
    2.0

    Returns: EOk if the datatype was returned correctly

    UnRegisterDataType ( const TInt )

    IMPORT_C TIntUnRegisterDataType(const TIntaIndex)

    UnRegisterDataType

    Unregisters a datatype via its index.

    Since
    2.5

    Returns: EOk if the datatype has been unregistered