DRM::MDrmHandleErrorObserver Class Reference

class DRM::MDrmHandleErrorObserver : public DRM::MDrmAsyncObserver

An interface containing callbacks for CDrmUiHandling::HandleError().

By implementing these methods observer can get more information about what kind of rights are available and can also override the default behaviour.

      #include <DrmUiHandling.h>
      #include <DrmHandleErrorObserver.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, this );

      // delete the created instance of CDrmUiHandling
      CleanupStack::PopAndDestroy( drmUiHandler );

      ...

      // implement callbacks
      TEmbeddedPreviewAction CMyClass::EmbeddedPreviewAvailable( const TDesC& aUniqueId )
          {
          return EEmbeddedPreviewActionDefault;
          }

      TPreviewRightsAction CMyClass::PreviewRightsUrlAvailable( const TDesC& aPreviewRightsUrl )
          {
          return EPreviewRightsActionDefault;
          }

      TSilentRightsAction CMyClass::SilentRightsUrlAvailable( const TDesC& aSilentRightsUrl )
          {
          return ESilentRightsActionDefault;
          }

      void CMyClass::PreviewRightsAvailable()
          {
          // play the content, since preview rights were retrieved
          }

      void CMyClass::SilentRightsAvailable()
          {
          // play the content, since silent rights were retrieved
          }

      void CMyClass::PlayEmbeddedPreviewSelected( const TDesC& aUniqueId )
          {
          // play embedded preview part
          ...
          }
Since
S60 v5.0
CDrmUiHandling::HandleError

Inherits from

Member Functions Documentation

EmbeddedPreviewAvailable(TInt, const TDesC &, TInt, TInt)

TEmbeddedPreviewAction EmbeddedPreviewAvailable(TIntaOperationId,
const TDesC &aUniqueId,
TIntaRightsStatus,
TIntaReason
)[pure virtual]

Called when content has embedded preview part. If EEmbeddedPreviewActionDefault is returned, PlayEmbeddedPreviewSelected is called if user selects to play embedded preview.

Since
S60 v5.0

Parameters

TInt aOperationIdIdentifier of the asynchronous operation which was returned when the asynchronous operation was initiated, Zero(0) if it is a call back from a synchronous operation
const TDesC & aUniqueIdUnique ID of embedded preview part.
TInt aRightsStatusStatus of the rights as defined per TDrmRightsInfo
TInt aReasonRejection reason, a bitvector which states for what reasons rights have been rejected from use using TRejectionType

PlayEmbeddedPreviewSelected(TInt, const TDesC &)

voidPlayEmbeddedPreviewSelected(TIntaOperationId,
const TDesC &aUniqueId
)[pure virtual]

Called if user selected to play embedded preview part.

Since
S60 v5.0

Parameters

TInt aOperationIdIdentifier of the asynchronous operation which was returned when the asynchronous operation was initiated, Zero(0) if it is a call back from a synchronous operation
const TDesC & aUniqueIdUnique ID of embedded preview part.

PreviewRightsAvailable(TInt, TInt)

voidPreviewRightsAvailable(TIntaOperationId,
TIntaError
)[pure virtual]

Called when preview rights have been acquired for content.

Since
S60 v5.0

Parameters

TInt aOperationIdIdentifier of the asynchronous operation which was returned when the asynchronous operation was initiated, Zero(0) if it is a call back from a synchronous operation
TInt aErrorReturn status of the requested URI type KErrNone if successful and rights are available KErrCANoRights if the rights are not available KErrNotFound if the requested URI type was not available

PreviewRightsUrlAvailable(TInt, const TDesC &, TInt, TInt)

TPreviewRightsAction PreviewRightsUrlAvailable(TIntaOperationId,
const TDesC &aPreviewRightsUrl,
TIntaRightsStatus,
TIntaReason
)[pure virtual]

Called if preview rights can be acquired for content.

Since
S60 v5.0

Parameters

TInt aOperationIdIdentifier of the asynchronous operation which was returned when the asynchronous operation was initiated, Zero(0) if it is a call back from a synchronous operation
const TDesC & aPreviewRightsUrlURL from where preview rights can be fetched.
TInt aRightsStatusStatus of the rights as defined per TDrmRightsInfo
TInt aReasonRejection reason, a bitvector which states for what reasons rights have been rejected from use using TRejectionType

RightsAvailable(TInt, TInt)

voidRightsAvailable(TIntaOperationId,
TIntaError
)[pure virtual]

Called when rights have been acquired for content.

Since
S60 v5.0

Parameters

TInt aOperationIdIdentifier of the asynchronous operation which was returned when the asynchronous operation was initiated, Zero(0) if it is a call back from a synchronous operation
TInt aErrorReturn status of the requested URI type KErrNone if successful and rights are available KErrCANoRights if the rights are not available KErrNotFound if the requested URI type was not available

RightsUrlAvailable(TInt, const TDesC &, TInt, TInt, TInt)

TRightsAction RightsUrlAvailable(TIntaOperationId,
const TDesC &aRightsUrl,
TIntaRightsStatus,
TIntaReason,
TIntaUrlType
)[pure virtual]

Called if only rights-issuer URL or domain rights-issuer URL is available.

Since
S60 v5.0

Parameters

TInt aOperationIdIdentifier of the asynchronous operation which was returned when the asynchronous operation was initiated, Zero(0) if it is a call back from a synchronous operation
const TDesC & aRightsUrlURL from where rights can be fetched.
TInt aRightsStatusStatus of the rights as defined per TDrmRightsInfo
TInt aReasonRejection reason, a bitvector which states for what reasons rights have been rejected from use using TRejectionType
TInt aUrlTypeThe type of url available in TDrmUiUrlType

SilentRightsAvailable(TInt, TInt)

voidSilentRightsAvailable(TIntaOperationId,
TIntaError
)[pure virtual]

Called when silent rights have been acquired for content.

Since
S60 v5.0

Parameters

TInt aOperationIdIdentifier of the asynchronous operation which was returned when the asynchronous operation was initiated, Zero(0) if it is a call back from a synchronous operation
TInt aErrorReturn status of the requested URI type KErrNone if successful and rights are available KErrCANoRights if the rights are not available KErrNotFound if the requested URI type was not available

SilentRightsUrlAvailable(TInt, const TDesC &, TInt, TInt)

TSilentRightsAction SilentRightsUrlAvailable(TIntaOperationId,
const TDesC &aSilentRightsUrl,
TIntaRightsStatus,
TIntaReason
)[pure virtual]

Called if silent rights can be acquired for content.

Since
S60 v5.0

Parameters

TInt aOperationIdIdentifier of the asynchronous operation which was returned when the asynchronous operation was initiated, Zero(0) if it is a call back from a synchronous operation
const TDesC & aSilentRightsUrlURL from where silent rights can be fetched.
TInt aRightsStatusStatus of the rights as defined per TDrmRightsInfo
TInt aReasonRejection reason, a bitvector which states for what reasons rights have been rejected from use using TRejectionType