DRM::CDrmUiHandling Class Reference

class DRM::CDrmUiHandling : public CBase

Utility class for DRM related UI

By using this class an application can resolve situation where there is no valid rights for the content, check status of rights and display an embedded rights details view.

Usage:
      #include <DrmUiHandling.h>

      using namespace DRM;

      // Call NewLC() to create an instance of CDrmUiHandling.
      CDrmUiHandling* drmUiHandler = CDrmUiHandling::NewLC();

      // Handling the error got when tried to read the file
      drmHandlerError = drmUiHandler->HandleErrorL( file, error, NULL );

      // checking the status of the rights
      drmHandlerError = drmUiHandler->CheckRightsAmountL( file, NULL );

      // opening embedded details view
      drmHandlerError = drmUiHandler->ShowDetailsViewL( file );

      // delete the created instance of CDrmUiHandling
      CleanupStack::PopAndDestroy( drmUiHandler );
drmutilityuihandling.lib
Since
S60 v5.0

Inherits from

Public Member Functions
~CDrmUiHandling()
IMPORT_C TIntAvailableUrlsAsyncL(RFile &, TDrmUiUrlType &, MDrmAsyncObserver &)
IMPORT_C TIntAvailableUrlsAsyncL(ContentAccess::CData &, TDrmUiUrlType &, MDrmAsyncObserver &)
IMPORT_C voidAvailableUrlsL(RFile &, TDrmUiUrlType &)
IMPORT_C voidAvailableUrlsL(ContentAccess::CData &, TDrmUiUrlType &)
IMPORT_C TIntCancelOperation(TInt)
IMPORT_C TIntCheckRightsAmountAsyncL(RFile &, ContentAccess::TIntent, MDrmUiCheckRightsObserver &)
IMPORT_C TIntCheckRightsAmountAsyncL(ContentAccess::CData &, ContentAccess::TIntent, MDrmUiCheckRightsObserver &)
IMPORT_C voidCheckRightsAmountL(RFile &, ContentAccess::TIntent, MDrmUiCheckRightsObserver *)
IMPORT_C voidCheckRightsAmountL(ContentAccess::CData &, ContentAccess::TIntent, MDrmUiCheckRightsObserver *)
IMPORT_C MDrmErrorHandling &GetErrorHandler()
IMPORT_C CDrmUtility &GetUtility()
IMPORT_C TIntHandleUrlAsyncL(RFile &, TDrmUiUrlType, MDrmAsyncObserver &)
IMPORT_C TIntHandleUrlAsyncL(ContentAccess::CData &, TDrmUiUrlType, MDrmAsyncObserver &)
IMPORT_C voidHandleUrlL(RFile &, TDrmUiUrlType)
IMPORT_C voidHandleUrlL(ContentAccess::CData &, TDrmUiUrlType)
IMPORT_C CDrmUiHandling *NewL(CCoeEnv *)
IMPORT_C CDrmUiHandling *NewLC(CCoeEnv *)
IMPORT_C TIntShowDetailsViewAsyncL(RFile &, MDrmAsyncObserver &)
IMPORT_C TIntShowDetailsViewAsyncL(ContentAccess::CData &, MDrmAsyncObserver &)
IMPORT_C voidShowDetailsViewL(RFile &)
IMPORT_C voidShowDetailsViewL(ContentAccess::CData &)
Private Member Functions
CDrmUiHandling()
voidConstructL(CCoeEnv *)
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()
Private Attributes
MDrmErrorHandling *iErrorHandler
CDrmUiHandlingImpl *iImplementation
CDrmUtility *iUtility

Constructor & Destructor Documentation

CDrmUiHandling()

CDrmUiHandling()[private]

Default Constructor

~CDrmUiHandling()

~CDrmUiHandling()[virtual]

Destructor

Member Functions Documentation

AvailableUrlsAsyncL(RFile &, TDrmUiUrlType &, MDrmAsyncObserver &)

IMPORT_C TIntAvailableUrlsAsyncL(RFile &aFile,
TDrmUiUrlType &aType,
MDrmAsyncObserver &aObserver
)

Get information of the available urls Asynchronous method

Since
S60 v5.0
leave
KErrArgument File is not DRM protected.

Parameters

RFile & aFilefile whose url is being handled
TDrmUiUrlType & aTypeA bitmask of the supported url types
MDrmAsyncObserver & aObserverreference to observer

AvailableUrlsAsyncL(ContentAccess::CData &, TDrmUiUrlType &, MDrmAsyncObserver &)

IMPORT_C TIntAvailableUrlsAsyncL(ContentAccess::CData &aFile,
TDrmUiUrlType &aType,
MDrmAsyncObserver &aObserver
)

Get information of the available urls Asynchronous method

Since
S60 v5.0
leave
KErrArgument File is not DRM protected.

Parameters

ContentAccess::CData & aFilecontent whose url is being handled
TDrmUiUrlType & aTypeA bitmask of the supported url types
MDrmAsyncObserver & aObserverreference to observer

AvailableUrlsL(RFile &, TDrmUiUrlType &)

IMPORT_C voidAvailableUrlsL(RFile &aFile,
TDrmUiUrlType &aType
)

Get information of the available urls

Since
S60 v5.0
leave
KErrArgument File is not DRM protected.

Parameters

RFile & aFilefile whose url is being handled
TDrmUiUrlType & aTypeA bitmask of the supported url types

AvailableUrlsL(ContentAccess::CData &, TDrmUiUrlType &)

IMPORT_C voidAvailableUrlsL(ContentAccess::CData &aFile,
TDrmUiUrlType &aType
)

Get information of the available urls

Since
S60 v5.0
leave
KErrArgument File is not DRM protected.

Parameters

ContentAccess::CData & aFilecontent whose url is being handled
TDrmUiUrlType & aTypeA bitmask of the supported url types

CancelOperation(TInt)

IMPORT_C TIntCancelOperation(TIntaOperationId)

Cancel an asyncronous operation

Since
S60 v5.0

Parameters

TInt aOperationIdidentifier of the async operation to be cancelled

CheckRightsAmountAsyncL(RFile &, ContentAccess::TIntent, MDrmUiCheckRightsObserver &)

IMPORT_C TIntCheckRightsAmountAsyncL(RFile &aFile,
ContentAccess::TIntentaIntent,
MDrmUiCheckRightsObserver &aObserver
)

Check how much rights there are left for the content. This method also displays appropriate notes, which observer can override, if rights are invalid. Asynchronous version, all errors are signalled using request status.

Since
S60 v5.0
leave
System wide error code KErrArgument if file is not DRM protected.
MDrmUiCheckRightsObserver ContentAccess::TIntent

Parameters

RFile & aFilefile of which rights are checked.
ContentAccess::TIntent aIntentthe CAF intent to be used for checking
MDrmUiCheckRightsObserver & aObserverreference to observer

CheckRightsAmountAsyncL(ContentAccess::CData &, ContentAccess::TIntent, MDrmUiCheckRightsObserver &)

IMPORT_C TIntCheckRightsAmountAsyncL(ContentAccess::CData &aFile,
ContentAccess::TIntentaIntent,
MDrmUiCheckRightsObserver &aObserver
)

Check how much rights there are left for the content. This method also displays appropriate notes, which observer can override, if rights are invalid. Asynchronous version, all errors are signalled using request status.

Since
S60 v5.0
leave
System wide error code KErrArgument if file is not DRM protected.
MDrmUiCheckRightsObserver ContentAccess::TIntent

Parameters

ContentAccess::CData & aFilecontent of which rights are checked.
ContentAccess::TIntent aIntentthe CAF intent to be used for checking
MDrmUiCheckRightsObserver & aObserverreference to observer

CheckRightsAmountL(RFile &, ContentAccess::TIntent, MDrmUiCheckRightsObserver *)

IMPORT_C voidCheckRightsAmountL(RFile &aFile,
ContentAccess::TIntentaIntent,
MDrmUiCheckRightsObserver *aObserver
)

Check how much rights there are left for the content. This method also displays appropriate notes, which observer can override, if rights are invalid. Synchronous version, leaves in case of error.

Since
S60 v5.0
leave
System wide error code KErrArgument if file is not DRM protected.
MDrmUiCheckRightsObserver ContentAccess::TIntent

Parameters

RFile & aFilefile of which rights are checked.
ContentAccess::TIntent aIntentthe CAF intent to be used for checking
MDrmUiCheckRightsObserver * aObserverpointer to observer, NULL if no observer

CheckRightsAmountL(ContentAccess::CData &, ContentAccess::TIntent, MDrmUiCheckRightsObserver *)

IMPORT_C voidCheckRightsAmountL(ContentAccess::CData &aFile,
ContentAccess::TIntentaIntent,
MDrmUiCheckRightsObserver *aObserver
)

Check how much rights there are left for the content. This method also displays appropriate notes, which observer can override, if rights are invalid. Synchronous version, leaves in case of error.

Since
S60 v5.0
leave
System wide error code KErrArgument if file is not DRM protected.
MDrmUiCheckRightsObserver ContentAccess::TIntent

Parameters

ContentAccess::CData & aFilecontent of which rights are checked.
ContentAccess::TIntent aIntentthe CAF intent to be used for checking
MDrmUiCheckRightsObserver * aObserverpointer to observer, NULL if no observer

ConstructL(CCoeEnv *)

voidConstructL(CCoeEnv *aCoeEnv)[private]

2nd phase constructor

Parameters

CCoeEnv * aCoeEnv

GetErrorHandler()

IMPORT_C MDrmErrorHandling &GetErrorHandler()const

Returns a reference to a class which implements the MDrmErrorHandling interface. The ownership of the instance stays with the CDrmUiHandling -class

Since
S60 v5.0
leave
None
MDrmErrorHandling

GetUtility()

IMPORT_C CDrmUtility &GetUtility()const

Returns a reference to a CDrmUtility instance. The ownership of the instance stays with the CDrmUiHandling -class

Since
S60 v5.0
leave
None
CDrmUtility

HandleUrlAsyncL(RFile &, TDrmUiUrlType, MDrmAsyncObserver &)

IMPORT_C TIntHandleUrlAsyncL(RFile &aFile,
TDrmUiUrlTypeaType,
MDrmAsyncObserver &aObserver
)

Handle the specific url defined by the file, such as InfoUrl Asynchronous method

Since
S60 v5.0
leave
KErrArgument File is not DRM protected.
leave
KErrNotSupported Url type is not supported for the file

Parameters

RFile & aFilefile whose url is being handled
TDrmUiUrlType aTypetype of the requested url, only a single url may be requested at a time
MDrmAsyncObserver & aObserverreference to observer

HandleUrlAsyncL(ContentAccess::CData &, TDrmUiUrlType, MDrmAsyncObserver &)

IMPORT_C TIntHandleUrlAsyncL(ContentAccess::CData &aFile,
TDrmUiUrlTypeaType,
MDrmAsyncObserver &aObserver
)

Handle the specific url defined by the file, such as InfoUrl Asynchronous method

Since
S60 v5.0
leave
KErrArgument File is not DRM protected, or multiple url:s were requested
leave
KErrNotSupported Url type is not supported for the file

Parameters

ContentAccess::CData & aFilecontent whose url is being handled
TDrmUiUrlType aTypetype of the requested url, only a single url may be requested at a time
MDrmAsyncObserver & aObserverreference to observer

HandleUrlL(RFile &, TDrmUiUrlType)

IMPORT_C voidHandleUrlL(RFile &aFile,
TDrmUiUrlTypeaType
)

Handle the specific url defined by the file, such as InfoUrl

Since
S60 v5.0
leave
KErrArgument File is not DRM protected.
leave
KErrNotSupported Url type is not supported for the file

Parameters

RFile & aFilefile whose url is being handled
TDrmUiUrlType aTypetype of the requested url, only a single url may be requested at a time

HandleUrlL(ContentAccess::CData &, TDrmUiUrlType)

IMPORT_C voidHandleUrlL(ContentAccess::CData &aFile,
TDrmUiUrlTypeaType
)

Handle the specific url defined by the file, such as InfoUrl

Since
S60 v5.0
leave
KErrArgument File is not DRM protected.
leave
KErrNotSupported Url type is not supported for the file

Parameters

ContentAccess::CData & aFilecontent whose url is being handled
TDrmUiUrlType aTypetype of the requested url, only a single url may be requested at a time

NewL(CCoeEnv *)

IMPORT_C CDrmUiHandling *NewL(CCoeEnv *aCoeEnv = NULL)[static]

Creates a new CDrmUiHandling object and returns a pointer to it

If no CCoeEnv instance is available, applications launched will be launched as standalone applications.

leave
System wide error code

Parameters

CCoeEnv * aCoeEnv = NULLA 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.

NewLC(CCoeEnv *)

IMPORT_C CDrmUiHandling *NewLC(CCoeEnv *aCoeEnv = NULL)[static]

Creates a new CDrmUiHandling object and returns a pointer to it Leaves the pointer to the cleanup stack

If no CCoeEnv instance is available, applications launched will be launched as standalone applications.

leave
System wide error code

Parameters

CCoeEnv * aCoeEnv = NULLA 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.

ShowDetailsViewAsyncL(RFile &, MDrmAsyncObserver &)

IMPORT_C TIntShowDetailsViewAsyncL(RFile &aFile,
MDrmAsyncObserver &aObserver
)

Displays information about rights for given content. Asynchronous version.

Since
S60 v5.0
leave
System wide error code

Parameters

RFile & aFilefile for which rights details are displayed.
MDrmAsyncObserver & aObserverreference to observer

ShowDetailsViewAsyncL(ContentAccess::CData &, MDrmAsyncObserver &)

IMPORT_C TIntShowDetailsViewAsyncL(ContentAccess::CData &aFile,
MDrmAsyncObserver &aObserver
)

Displays information about rights for given content. Asynchronous version.

Since
S60 v5.0
leave
System wide error code

Parameters

ContentAccess::CData & aFilecontent for which rights details are displayed.
MDrmAsyncObserver & aObserverreference to observer

ShowDetailsViewL(RFile &)

IMPORT_C voidShowDetailsViewL(RFile &aFile)

Displays information about rights for given content. Synchronous version, leaves in case of error.

Since
S60 v5.0
leave
KErrArgument File is not DRM protected.
leave
KErrCANoRights Rights object does not exist.
caferr.h

Parameters

RFile & aFilefile for which rights details are displayed.

ShowDetailsViewL(ContentAccess::CData &)

IMPORT_C voidShowDetailsViewL(ContentAccess::CData &aFile)

Displays information about rights for given content. Synchronous version, leaves in case of error.

Since
S60 v5.0
leave
KErrArgument Content is not DRM protected.
leave
KErrCANoRights Rights object does not exist.
leave
System wide error code
caferr.h

Parameters

ContentAccess::CData & aFilecontent for which rights details are displayed.

Member Data Documentation

MDrmErrorHandling * iErrorHandler

MDrmErrorHandling *iErrorHandler[private]

Pointer to an MDrmErrorHandling interface class instance Owned

CDrmUiHandlingImpl * iImplementation

CDrmUiHandlingImpl *iImplementation[private]

Pointer to the implementation Owned

CDrmUtility * iUtility

CDrmUtility *iUtility[private]

Pointer to a CDrmUtility -Instance Owned