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 TInt AvailableUrlsAsyncL ( RFile &, TDrmUiUrlType &, MDrmAsyncObserver &)
IMPORT_C TInt AvailableUrlsAsyncL ( ContentAccess::CData &, TDrmUiUrlType &, MDrmAsyncObserver &)
IMPORT_C void AvailableUrlsL ( RFile &, TDrmUiUrlType &)
IMPORT_C void AvailableUrlsL ( ContentAccess::CData &, TDrmUiUrlType &)
IMPORT_C TInt CancelOperation ( TInt )
IMPORT_C TInt CheckRightsAmountAsyncL ( RFile &, ContentAccess::TIntent , MDrmUiCheckRightsObserver &)
IMPORT_C TInt CheckRightsAmountAsyncL ( ContentAccess::CData &, ContentAccess::TIntent , MDrmUiCheckRightsObserver &)
IMPORT_C void CheckRightsAmountL ( RFile &, ContentAccess::TIntent , MDrmUiCheckRightsObserver *)
IMPORT_C void CheckRightsAmountL ( ContentAccess::CData &, ContentAccess::TIntent , MDrmUiCheckRightsObserver *)
IMPORT_C MDrmErrorHandling & GetErrorHandler ()
IMPORT_C CDrmUtility & GetUtility ()
IMPORT_C TInt HandleUrlAsyncL ( RFile &, TDrmUiUrlType , MDrmAsyncObserver &)
IMPORT_C TInt HandleUrlAsyncL ( ContentAccess::CData &, TDrmUiUrlType , MDrmAsyncObserver &)
IMPORT_C void HandleUrlL ( RFile &, TDrmUiUrlType )
IMPORT_C void HandleUrlL ( ContentAccess::CData &, TDrmUiUrlType )
IMPORT_C CDrmUiHandling * NewL ( CCoeEnv *)
IMPORT_C CDrmUiHandling * NewLC ( CCoeEnv *)
IMPORT_C TInt ShowDetailsViewAsyncL ( RFile &, MDrmAsyncObserver &)
IMPORT_C TInt ShowDetailsViewAsyncL ( ContentAccess::CData &, MDrmAsyncObserver &)
IMPORT_C void ShowDetailsViewL ( RFile &)
IMPORT_C void ShowDetailsViewL ( ContentAccess::CData &)
Private Member Functions
CDrmUiHandling ()
void ConstructL ( 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 TInt AvailableUrlsAsyncL ( 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 & aFile file whose url is being handled
TDrmUiUrlType & aType A bitmask of the supported url types
MDrmAsyncObserver & aObserver reference to observer

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

IMPORT_C TInt AvailableUrlsAsyncL ( 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 & aFile content whose url is being handled
TDrmUiUrlType & aType A bitmask of the supported url types
MDrmAsyncObserver & aObserver reference to observer

AvailableUrlsL(RFile &, TDrmUiUrlType &)

IMPORT_C void AvailableUrlsL ( RFile & aFile,
TDrmUiUrlType & aType
)

Get information of the available urls

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

Parameters

RFile & aFile file whose url is being handled
TDrmUiUrlType & aType A bitmask of the supported url types

AvailableUrlsL(ContentAccess::CData &, TDrmUiUrlType &)

IMPORT_C void AvailableUrlsL ( 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 & aFile content whose url is being handled
TDrmUiUrlType & aType A bitmask of the supported url types

CancelOperation(TInt)

IMPORT_C TInt CancelOperation ( TInt aOperationId )

Cancel an asyncronous operation

Since
S60 v5.0

Parameters

TInt aOperationId identifier of the async operation to be cancelled

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

IMPORT_C TInt CheckRightsAmountAsyncL ( RFile & aFile,
ContentAccess::TIntent aIntent,
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 & aFile file of which rights are checked.
ContentAccess::TIntent aIntent the CAF intent to be used for checking
MDrmUiCheckRightsObserver & aObserver reference to observer

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

IMPORT_C TInt CheckRightsAmountAsyncL ( ContentAccess::CData & aFile,
ContentAccess::TIntent aIntent,
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 & aFile content of which rights are checked.
ContentAccess::TIntent aIntent the CAF intent to be used for checking
MDrmUiCheckRightsObserver & aObserver reference to observer

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

IMPORT_C void CheckRightsAmountL ( RFile & aFile,
ContentAccess::TIntent aIntent,
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 & aFile file of which rights are checked.
ContentAccess::TIntent aIntent the CAF intent to be used for checking
MDrmUiCheckRightsObserver * aObserver pointer to observer, NULL if no observer

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

IMPORT_C void CheckRightsAmountL ( ContentAccess::CData & aFile,
ContentAccess::TIntent aIntent,
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 & aFile content of which rights are checked.
ContentAccess::TIntent aIntent the CAF intent to be used for checking
MDrmUiCheckRightsObserver * aObserver pointer to observer, NULL if no observer

ConstructL(CCoeEnv *)

void ConstructL ( 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 TInt HandleUrlAsyncL ( RFile & aFile,
TDrmUiUrlType aType,
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 & aFile file whose url is being handled
TDrmUiUrlType aType type of the requested url, only a single url may be requested at a time
MDrmAsyncObserver & aObserver reference to observer

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

IMPORT_C TInt HandleUrlAsyncL ( ContentAccess::CData & aFile,
TDrmUiUrlType aType,
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 & aFile content whose url is being handled
TDrmUiUrlType aType type of the requested url, only a single url may be requested at a time
MDrmAsyncObserver & aObserver reference to observer

HandleUrlL(RFile &, TDrmUiUrlType)

IMPORT_C void HandleUrlL ( RFile & aFile,
TDrmUiUrlType aType
)

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 & aFile file whose url is being handled
TDrmUiUrlType aType type of the requested url, only a single url may be requested at a time

HandleUrlL(ContentAccess::CData &, TDrmUiUrlType)

IMPORT_C void HandleUrlL ( ContentAccess::CData & aFile,
TDrmUiUrlType aType
)

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 & aFile content whose url is being handled
TDrmUiUrlType aType type 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 = 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.

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 = 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.

ShowDetailsViewAsyncL(RFile &, MDrmAsyncObserver &)

IMPORT_C TInt ShowDetailsViewAsyncL ( RFile & aFile,
MDrmAsyncObserver & aObserver
)

Displays information about rights for given content. Asynchronous version.

Since
S60 v5.0
leave
System wide error code

Parameters

RFile & aFile file for which rights details are displayed.
MDrmAsyncObserver & aObserver reference to observer

ShowDetailsViewAsyncL(ContentAccess::CData &, MDrmAsyncObserver &)

IMPORT_C TInt ShowDetailsViewAsyncL ( 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 & aFile content for which rights details are displayed.
MDrmAsyncObserver & aObserver reference to observer

ShowDetailsViewL(RFile &)

IMPORT_C void ShowDetailsViewL ( 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 & aFile file for which rights details are displayed.

ShowDetailsViewL(ContentAccess::CData &)

IMPORT_C void ShowDetailsViewL ( 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 & aFile content 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