DRM::MDrmAutomatedUsageObserver Class Reference

class DRM::MDrmAutomatedUsageObserver

Observer for DRM automated usage

In order to be able to get notifications of drm automated usage events client must implement this interface

Usage:
        // Call NewL() to create an instance of CDrmAutomatedUsage. 
        iDrmAutomatedUsage = DRM::CDrmAutomatedUsage::NewL();
        
        // register to listen automated usage events
        iDrmAutomatedUsage->RegisterEventObserverL( this );
        
        // Implement automated usage callback
        DRM::TAutomatedUsageAction CMyClass::AutomatedUsageEvent( 
            DRM::TAutomatedUsageEvent aAutomatedUsageEvent,
            const TDesC& aUniqueId,
            ContentAccess::TIntent aIntent )
            {
            if ( aAutomatedUsageEvent == DRM::EAutomatedContentExpired )
                {
                // some automated content expired
                
                // check unique id if we are interested about this content
                if ( !aUniqueId.Compare( myUniqueId ) )
                    {
                    // in this example we let utility to handle situation
                    return DRM::EAUActionDefault;
                    }
                }
                return DRM::EAUActionIgnore;
            }
       
drmautomatedusage.lib
Since
S60 5.0
Public Member Functions
TAutomatedUsageAction AutomatedUsageEvent ( TAutomatedUsageEvent , const TDesC &, const TDrmAutomatedType , const TDrmAutomatedServiceType , ContentAccess::TIntent )
void AutomatedUsageKeyCode ( TAutomatedUsageEvent , const TDesC &, TInt )

Member Functions Documentation

AutomatedUsageEvent(TAutomatedUsageEvent, const TDesC &, const TDrmAutomatedType, const TDrmAutomatedServiceType, ContentAccess::TIntent)

TAutomatedUsageAction AutomatedUsageEvent ( TAutomatedUsageEvent aAutomatedUsageEvent,
const TDesC & aUniqueId,
const TDrmAutomatedType aType,
const TDrmAutomatedServiceType aServiceType,
ContentAccess::TIntent aIntent = ContentAccess::EUnknown
) [pure virtual]

Callback for automated usage events

Since
S60 5.0
ContentAccess::TIntent DRM::TAutomatedUsageAction DRM::TAutomatedUsageEvent

Parameters

TAutomatedUsageEvent aAutomatedUsageEvent Automated usage event type
const TDesC & aUniqueId Unique ID of the content related to event
const TDrmAutomatedType aType Type of the automated content related to the event
const TDrmAutomatedServiceType aServiceType
ContentAccess::TIntent aIntent = ContentAccess::EUnknown

AutomatedUsageKeyCode(TAutomatedUsageEvent, const TDesC &, TInt)

void AutomatedUsageKeyCode ( TAutomatedUsageEvent aAutomatedUsageEvent,
const TDesC & aUniqueId,
TInt aKeyCode
) [pure virtual]

Callback for drm utility handled event keycodes.

Since
S60 5.0
DRM::TAutomatedUsageEvent

Parameters

TAutomatedUsageEvent aAutomatedUsageEvent Automated usage event type
const TDesC & aUniqueId Unique ID of the content under event aKeycode button/key code returned from user interaction
TInt aKeyCode