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 ( TInt aOperationId,
const TDesC & aUniqueId,
TInt aRightsStatus,
TInt aReason
) [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 aOperationId Identifier 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 & aUniqueId Unique ID of embedded preview part.
TInt aRightsStatus Status of the rights as defined per TDrmRightsInfo
TInt aReason Rejection reason, a bitvector which states for what reasons rights have been rejected from use using TRejectionType

PlayEmbeddedPreviewSelected(TInt, const TDesC &)

void PlayEmbeddedPreviewSelected ( TInt aOperationId,
const TDesC & aUniqueId
) [pure virtual]

Called if user selected to play embedded preview part.

Since
S60 v5.0

Parameters

TInt aOperationId Identifier 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 & aUniqueId Unique ID of embedded preview part.

PreviewRightsAvailable(TInt, TInt)

void PreviewRightsAvailable ( TInt aOperationId,
TInt aError
) [pure virtual]

Called when preview rights have been acquired for content.

Since
S60 v5.0

Parameters

TInt aOperationId Identifier 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 aError Return 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 ( TInt aOperationId,
const TDesC & aPreviewRightsUrl,
TInt aRightsStatus,
TInt aReason
) [pure virtual]

Called if preview rights can be acquired for content.

Since
S60 v5.0

Parameters

TInt aOperationId Identifier 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 & aPreviewRightsUrl URL from where preview rights can be fetched.
TInt aRightsStatus Status of the rights as defined per TDrmRightsInfo
TInt aReason Rejection reason, a bitvector which states for what reasons rights have been rejected from use using TRejectionType

RightsAvailable(TInt, TInt)

void RightsAvailable ( TInt aOperationId,
TInt aError
) [pure virtual]

Called when rights have been acquired for content.

Since
S60 v5.0

Parameters

TInt aOperationId Identifier 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 aError Return 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 ( TInt aOperationId,
const TDesC & aRightsUrl,
TInt aRightsStatus,
TInt aReason,
TInt aUrlType
) [pure virtual]

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

Since
S60 v5.0

Parameters

TInt aOperationId Identifier 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 & aRightsUrl URL from where rights can be fetched.
TInt aRightsStatus Status of the rights as defined per TDrmRightsInfo
TInt aReason Rejection reason, a bitvector which states for what reasons rights have been rejected from use using TRejectionType
TInt aUrlType The type of url available in TDrmUiUrlType

SilentRightsAvailable(TInt, TInt)

void SilentRightsAvailable ( TInt aOperationId,
TInt aError
) [pure virtual]

Called when silent rights have been acquired for content.

Since
S60 v5.0

Parameters

TInt aOperationId Identifier 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 aError Return 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 ( TInt aOperationId,
const TDesC & aSilentRightsUrl,
TInt aRightsStatus,
TInt aReason
) [pure virtual]

Called if silent rights can be acquired for content.

Since
S60 v5.0

Parameters

TInt aOperationId Identifier 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 & aSilentRightsUrl URL from where silent rights can be fetched.
TInt aRightsStatus Status of the rights as defined per TDrmRightsInfo
TInt aReason Rejection reason, a bitvector which states for what reasons rights have been rejected from use using TRejectionType