DRM::CDrmAutomatedUsage Class Reference

class DRM::CDrmAutomatedUsage : public CBase

Utility class for DRM related automated usage handling

Usage:
      #include <drmautomatedusage.h>
      // Instantiate class CDrmAutomatedUsage
      DRM::CDrmAutomatedUsage* iAutomatedUsage =
          DRM::CDrmAutomatedUsage::NewLC();
      // ...
      // RFile myRingToneFile;
      // open my Ringtone for reading
      // ...
      ContentAccess::CData* myDataObject = ContentAccess::CData::NewL(
          myRingToneFile,
          ContentAccess::KDefaultContentObject,
          ContentAccess::EPeek );
      // check if content can be set as automated
      if ( iAutomatedUsage->CanSetAutomatedL(
          myDataObject,
          ContentAccess::EPlay,
          DRM::EAUAutomatedTypeRingingTone ) )
          {
          // automated usage allowed

          // we register content as ringing tone in this example
          iAutomatedUsage->SetAutomated(
              myDataObject,
              ContentAccess::EPlay,
              DRM::EAUAutomatedTypeRingingTone,
              DRM::EAUPassive );

          }
          else
          {
          // automated usage not allowed
          }
drmautomatedusage.lib
Since
S60 5.0

Inherits from

  • DRM::CDrmAutomatedUsage
Public Member Functions
~CDrmAutomatedUsage()
IMPORT_C TBoolCanSetAutomatedL(RFile &, const ContentAccess::TIntent, const TDrmAutomatedType)
IMPORT_C TBoolCanSetAutomatedL(const ContentAccess::CData &, const ContentAccess::TIntent, const TDrmAutomatedType)
IMPORT_C TIntCancelOperation(TInt)
IMPORT_C MDrmErrorHandling &GetErrorHandler()
IMPORT_C CDrmUtility &GetUtility()
IMPORT_C CDrmAutomatedUsage *NewL(CCoeEnv *)
IMPORT_C CDrmAutomatedUsage *NewLC(CCoeEnv *)
IMPORT_C voidRegisterEventObserverL(MDrmAutomatedUsageObserver &)
IMPORT_C TIntRemoveAutomatedAsyncL(RFile &, const ContentAccess::TIntent, const TDrmAutomatedType, MDrmAsyncObserver &, const TDrmAutomatedServiceType)
IMPORT_C TIntRemoveAutomatedAsyncL(const ContentAccess::CData &, const ContentAccess::TIntent, const TDrmAutomatedType, MDrmAsyncObserver &, const TDrmAutomatedServiceType)
IMPORT_C TIntRemoveAutomatedAsyncL(const TDesC &, const ContentAccess::TIntent, const TDrmAutomatedType, MDrmAsyncObserver &, const TDrmAutomatedServiceType)
IMPORT_C voidRemoveAutomatedL(RFile &, const ContentAccess::TIntent, const TDrmAutomatedType, const TDrmAutomatedServiceType)
IMPORT_C voidRemoveAutomatedL(const ContentAccess::CData &, const ContentAccess::TIntent, const TDrmAutomatedType, const TDrmAutomatedServiceType)
IMPORT_C voidRemoveAutomatedL(const TDesC &, const ContentAccess::TIntent, const TDrmAutomatedType, const TDrmAutomatedServiceType)
IMPORT_C TIntSetAutomatedAsyncL(RFile &, const ContentAccess::TIntent, const TDrmAutomatedType, MDrmAsyncObserver &, const TDrmAutomatedServiceType)
IMPORT_C TIntSetAutomatedAsyncL(const ContentAccess::CData &, const ContentAccess::TIntent, const TDrmAutomatedType, MDrmAsyncObserver &, const TDrmAutomatedServiceType)
IMPORT_C voidSetAutomatedL(RFile &, const ContentAccess::TIntent, const TDrmAutomatedType, const TDrmAutomatedServiceType)
IMPORT_C voidSetAutomatedL(const ContentAccess::CData &, const ContentAccess::TIntent, const TDrmAutomatedType, const TDrmAutomatedServiceType)
IMPORT_C voidUnregisterEventObserverL(MDrmAutomatedUsageObserver &)
Private Member Functions
CDrmAutomatedUsage()
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
CDrmAutomatedUsageImpl *iImplementation
CDrmUtility *iUtility

Constructor & Destructor Documentation

CDrmAutomatedUsage()

CDrmAutomatedUsage()[private]

Default constructor

~CDrmAutomatedUsage()

~CDrmAutomatedUsage()[virtual]

Destructor

Member Functions Documentation

CanSetAutomatedL(RFile &, const ContentAccess::TIntent, const TDrmAutomatedType)

IMPORT_C TBoolCanSetAutomatedL(RFile &aFile,
const ContentAccess::TIntentaIntent,
const TDrmAutomatedTypeaAutomatedType
)

Checks if given content can be set as an automated content.

Since
S60 5.0
leave
System wide or DRM specific error code.
RFile ContentAccess::TIntent DRM::TDrmAutomatedType

Parameters

RFile & aFilefile handle to the file
const ContentAccess::TIntent aIntentSee ContentAccess::Intent
const TDrmAutomatedType aAutomatedType

CanSetAutomatedL(const ContentAccess::CData &, const ContentAccess::TIntent, const TDrmAutomatedType)

IMPORT_C TBoolCanSetAutomatedL(const ContentAccess::CData &aData,
const ContentAccess::TIntentaIntent,
const TDrmAutomatedTypeaAutomatedType
)

Checks if given content can be set as an automated content.

Since
S60 5.0
leave
System wide or DRM specific error code.
ContentAccess::CData ContentAccess::TIntent DRM::TDrmAutomatedType

Parameters

const ContentAccess::CData & aDataCData object to the protected content
const ContentAccess::TIntent aIntentSee ContentAccess::Intent
const TDrmAutomatedType aAutomatedType

CancelOperation(TInt)

IMPORT_C TIntCancelOperation(TIntaOperationId)

Cancel an asyncronous operation

Since
S60 5.0

Parameters

TInt aOperationIdidentifier of the async operation to be cancelled

ConstructL(CCoeEnv *)

voidConstructL(CCoeEnv *aCoeEnv)[private]

Second 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 CDrmAutomatedUsage -class

Since
S60 5.0
DRM::MDrmErrorHandling

GetUtility()

IMPORT_C CDrmUtility &GetUtility()const

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

Since
S60 5.0
DRM::CDrmUtility

NewL(CCoeEnv *)

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

Creates a new CDrmAutomatedUsage object and returns a pointer to it

Since
S60 5.0
If no CCoeEnv instance is available, applications launched will be launched as standalone applications.
leave
System wide error code
CCoeEnv

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 CDrmAutomatedUsage *NewLC(CCoeEnv *aCoeEnv = NULL)[static]

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

Since
S60 5.0
If no CCoeEnv instance is available, applications launched will be launched as standalone applications.
leave
System wide error code
CCoeEnv

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.

RegisterEventObserverL(MDrmAutomatedUsageObserver &)

IMPORT_C voidRegisterEventObserverL(MDrmAutomatedUsageObserver &aObserver)

Registers client to listen events related to automated usage. If the client doesn't do this, all the events are handled automatically according to the S60 style.

The observer registered with this function needs to be unregistered before it is deleted.

Since
S60 5.0
leave
System wide or DRM specific error code.
DRM::MDrmAutomatedUsageObserver

Parameters

MDrmAutomatedUsageObserver & aObserver

RemoveAutomatedAsyncL(RFile &, const ContentAccess::TIntent, const TDrmAutomatedType, MDrmAsyncObserver &, const TDrmAutomatedServiceType)

IMPORT_C TIntRemoveAutomatedAsyncL(RFile &aFile,
const ContentAccess::TIntentaIntent,
const TDrmAutomatedTypeaAutomatedType,
MDrmAsyncObserver &aObserver,
const TDrmAutomatedServiceTypeaServiceType = EAUActive
)

Unregisters given content from being used as an automated content.

Since
S60 5.0
leave
System wide or DRM specific error code.
RFile ContentAccess::TIntent DRM::TDrmAutomatedType DRM::MDrmAsyncObserver DRM::TDrmAutomatedServiceType

Parameters

RFile & aFilefile handle to the file
const ContentAccess::TIntent aIntentSee ContentAccess::Intent
const TDrmAutomatedType aAutomatedTypeUsage intention of the automated content
MDrmAsyncObserver & aObserverAsync callback observer
const TDrmAutomatedServiceType aServiceType = EAUActivedefault: EAUActive

RemoveAutomatedAsyncL(const ContentAccess::CData &, const ContentAccess::TIntent, const TDrmAutomatedType, MDrmAsyncObserver &, const TDrmAutomatedServiceType)

IMPORT_C TIntRemoveAutomatedAsyncL(const ContentAccess::CData &aData,
const ContentAccess::TIntentaIntent,
const TDrmAutomatedTypeaAutomatedType,
MDrmAsyncObserver &aObserver,
const TDrmAutomatedServiceTypeaServiceType = EAUActive
)

Unregisters given content from being used as an automated content.

Since
S60 5.0
leave
System wide or DRM specific error code.
ContentAccess::CData ContentAccess::TIntent DRM::TDrmAutomatedType DRM::MDrmAsyncObserver DRM::TDrmAutomatedServiceType

Parameters

const ContentAccess::CData & aDataCData object to the protected content
const ContentAccess::TIntent aIntentSee ContentAccess::Intent
const TDrmAutomatedType aAutomatedTypeUsage intention of the automated content
MDrmAsyncObserver & aObserverAsync callback observer
const TDrmAutomatedServiceType aServiceType = EAUActivedefault: EAUActive

RemoveAutomatedAsyncL(const TDesC &, const ContentAccess::TIntent, const TDrmAutomatedType, MDrmAsyncObserver &, const TDrmAutomatedServiceType)

IMPORT_C TIntRemoveAutomatedAsyncL(const TDesC &aUniqueId,
const ContentAccess::TIntentaIntent,
const TDrmAutomatedTypeaAutomatedType,
MDrmAsyncObserver &aObserver,
const TDrmAutomatedServiceTypeaServiceType = EAUActive
)

Unregisters given content from being used as an automated content.

Since
S60 5.0
leave
System wide or DRM specific error code.
ContentAccess::CData::GetStringAttribute() ContentAccess::TStringAttribute ContentAccess::TIntent DRM::TDrmAutomatedType DRM::MDrmAsyncObserver DRM::TDrmAutomatedServiceType

Parameters

const TDesC & aUniqueIdunique content id
const ContentAccess::TIntent aIntentSee ContentAccess::Intent
const TDrmAutomatedType aAutomatedTypeUsage intention of the automated content
MDrmAsyncObserver & aObserverAsync callback observer
const TDrmAutomatedServiceType aServiceType = EAUActivedefault: EAUActive

RemoveAutomatedL(RFile &, const ContentAccess::TIntent, const TDrmAutomatedType, const TDrmAutomatedServiceType)

IMPORT_C voidRemoveAutomatedL(RFile &aFile,
const ContentAccess::TIntentaIntent,
const TDrmAutomatedTypeaAutomatedType,
const TDrmAutomatedServiceTypeaServiceType = EAUActive
)

Unregisters given content from being used as an automated content.

Since
S60 5.0
leave
System wide or DRM specific error code.
RFile ContentAccess::TIntent DRM::TDrmAutomatedType DRM::TDrmAutomatedServiceType

Parameters

RFile & aFilefile handle to the file
const ContentAccess::TIntent aIntentSee ContentAccess::Intent
const TDrmAutomatedType aAutomatedTypeUsage intention of the automated content
const TDrmAutomatedServiceType aServiceType = EAUActivedefault: EAUActive

RemoveAutomatedL(const ContentAccess::CData &, const ContentAccess::TIntent, const TDrmAutomatedType, const TDrmAutomatedServiceType)

IMPORT_C voidRemoveAutomatedL(const ContentAccess::CData &aData,
const ContentAccess::TIntentaIntent,
const TDrmAutomatedTypeaAutomatedType,
const TDrmAutomatedServiceTypeaServiceType = EAUActive
)

Unregisters given content from being used as an automated content.

Since
S60 5.0
leave
System wide or DRM specific error code.
ContentAccess::CData ContentAccess::TIntent DRM::TDrmAutomatedType DRM::TDrmAutomatedServiceType

Parameters

const ContentAccess::CData & aDataCData object to the protected content
const ContentAccess::TIntent aIntentSee ContentAccess::Intent
const TDrmAutomatedType aAutomatedTypeUsage intention of the automated content
const TDrmAutomatedServiceType aServiceType = EAUActivedefault: EAUActive

RemoveAutomatedL(const TDesC &, const ContentAccess::TIntent, const TDrmAutomatedType, const TDrmAutomatedServiceType)

IMPORT_C voidRemoveAutomatedL(const TDesC &aUniqueId,
const ContentAccess::TIntentaIntent,
const TDrmAutomatedTypeaAutomatedType,
const TDrmAutomatedServiceTypeaServiceType = EAUActive
)

Unregisters given content from being used as an automated content.

Since
S60 5.0
leave
System wide or DRM specific error code.
ContentAccess::TIntentContentAccess::CData::GetStringAttribute() ContentAccess::TStringAttribute ContentAccess::TIntent DRM::TDrmAutomatedType DRM::TDrmAutomatedServiceType

Parameters

const TDesC & aUniqueIdunique content id
const ContentAccess::TIntent aIntentSee ContentAccess::Intent
const TDrmAutomatedType aAutomatedTypeUsage intention of the automated content
const TDrmAutomatedServiceType aServiceType = EAUActivedefault: EAUActive

SetAutomatedAsyncL(RFile &, const ContentAccess::TIntent, const TDrmAutomatedType, MDrmAsyncObserver &, const TDrmAutomatedServiceType)

IMPORT_C TIntSetAutomatedAsyncL(RFile &aFile,
const ContentAccess::TIntentaIntent,
const TDrmAutomatedTypeaAutomatedType,
MDrmAsyncObserver &aObserver,
const TDrmAutomatedServiceTypeaServiceType = EAUActive
)

Registers given content to be used as an automated content.

Since
S60 5.0
leave
System wide or DRM specific error code.
RFile ContentAccess::TIntent DRM::TDrmAutomatedType DRM::MDrmAsyncObserver DRM::TDrmAutomatedServiceType

Parameters

RFile & aFilefile handle to the file
const ContentAccess::TIntent aIntentSee ContentAccess::Intent
const TDrmAutomatedType aAutomatedTypeUsage intention of the automated content
MDrmAsyncObserver & aObserverAsync callback observer
const TDrmAutomatedServiceType aServiceType = EAUActivedefault: EAUActive

SetAutomatedAsyncL(const ContentAccess::CData &, const ContentAccess::TIntent, const TDrmAutomatedType, MDrmAsyncObserver &, const TDrmAutomatedServiceType)

IMPORT_C TIntSetAutomatedAsyncL(const ContentAccess::CData &aData,
const ContentAccess::TIntentaIntent,
const TDrmAutomatedTypeaAutomatedType,
MDrmAsyncObserver &aObserver,
const TDrmAutomatedServiceTypeaServiceType = EAUActive
)

Registers given content to be used as an automated content.

Since
S60 5.0
leave
System wide or DRM specific error code.
ContentAccess::CData ContentAccess::TIntent DRM::TDrmAutomatedType DRM::MDrmAsyncObserver DRM::TDrmAutomatedServiceType

Parameters

const ContentAccess::CData & aDataCData object to the protected content
const ContentAccess::TIntent aIntentSee ContentAccess::Intent
const TDrmAutomatedType aAutomatedTypeUsage intention of the automated content
MDrmAsyncObserver & aObserverAsync callback observer
const TDrmAutomatedServiceType aServiceType = EAUActivedefault: EAUActive

SetAutomatedL(RFile &, const ContentAccess::TIntent, const TDrmAutomatedType, const TDrmAutomatedServiceType)

IMPORT_C voidSetAutomatedL(RFile &aFile,
const ContentAccess::TIntentaIntent,
const TDrmAutomatedTypeaAutomatedType,
const TDrmAutomatedServiceTypeaServiceType = EAUActive
)

Registers given content to be used as an automated content.

Since
S60 5.0
leave
System wide or DRM specific error code.
RFile ContentAccess::TIntent DRM::TDrmAutomatedType DRM::TDrmAutomatedServiceType

Parameters

RFile & aFilefile handle to the file
const ContentAccess::TIntent aIntentSee ContentAccess::Intent
const TDrmAutomatedType aAutomatedTypeUsage intention of the automated content
const TDrmAutomatedServiceType aServiceType = EAUActivedefault: EAUActive

SetAutomatedL(const ContentAccess::CData &, const ContentAccess::TIntent, const TDrmAutomatedType, const TDrmAutomatedServiceType)

IMPORT_C voidSetAutomatedL(const ContentAccess::CData &aData,
const ContentAccess::TIntentaIntent,
const TDrmAutomatedTypeaAutomatedType,
const TDrmAutomatedServiceTypeaServiceType = EAUActive
)

Registers given content to be used as an automated content.

Since
S60 5.0
leave
System wide or DRM specific error code.
ContentAccess::CData ContentAccess::TIntent DRM::TDrmAutomatedType DRM::TDrmAutomatedServiceType

Parameters

const ContentAccess::CData & aDataCData object to the protected content
const ContentAccess::TIntent aIntentSee ContentAccess::Intent
const TDrmAutomatedType aAutomatedTypeUsage intention of the automated content
const TDrmAutomatedServiceType aServiceType = EAUActivedefault: EAUActive

UnregisterEventObserverL(MDrmAutomatedUsageObserver &)

IMPORT_C voidUnregisterEventObserverL(MDrmAutomatedUsageObserver &aObserver)

Unregisters client from listening to events related to automated usage.

If register event observer has been called, it must be unregistered before the observer object is deleted.

Since
S60 5.0
leave
System wide or DRM specific error code.
DRM::MDrmAutomatedUsageObserver

Parameters

MDrmAutomatedUsageObserver & aObserver

Member Data Documentation

MDrmErrorHandling * iErrorHandler

MDrmErrorHandling *iErrorHandler[private]

Implementation class pointer Owned

CDrmAutomatedUsageImpl * iImplementation

CDrmAutomatedUsageImpl *iImplementation[private]

Implementation class pointer Owned

CDrmUtility * iUtility

CDrmUtility *iUtility[private]

Implementation class pointer Owned