CSmilPresentation Class Reference

class CSmilPresentation : public CActive

A SMIL presentation

Inherits from

Nested Classes and Structures

Public Member Functions
~CSmilPresentation ()
void ActivateAnchorL (const CSmilAnchor *)
IMPORT_C void ActivateFocusedL ()
void AddTransitionL ( CSmilTransition *)
void AfterL ( MSmilActive *, const TSmilTime &, TBool )
IMPORT_C TPtrC BaseUrl ()
void CancelActive ( MSmilActive *)
IMPORT_C void CancelFocusL ()
void ClearSchedule ()
void ClearTransitions ()
IMPORT_C TInt CurrentSlide ()
IMPORT_C TSmilTime CurrentTime ()
IMPORT_C void Draw ( CGraphicsContext &, const TRect &)
IMPORT_C TSmilTime Duration ()
CSmilTransition * FindTransition (const TDesC &)
IMPORT_C CSmilObject * FocusedObject ()
TEndAction GetEndAction ()
CSmilRootRegion * GetLayout ()
TReal32 GetMaxDownScaling ()
TReal32 GetMaxUpScaling ()
MSmilMediaFactory * GetMediaFactory ()
MSmilPlayer * GetPlayer ()
IMPORT_C TReal32 GetScalingFactor ()
TStartAction GetStartAction ()
CSmilTimeContainer * GetTimegraph ()
MSmilTransitionFactory * GetTransitionFactory ()
IMPORT_C TKeyResponse HandleKeyEventL (const TKeyEvent &, TEventCode )
IMPORT_C void HandlePointerEventL (const TPointerEvent &)
IMPORT_C TBool IsInteractive ()
IMPORT_C TBool IsTransparent ()
TBool MediaSelected ()
IMPORT_C void MouseClickedL (const TPoint &)
IMPORT_C void MoveFocusL ( TInt , TInt )
IMPORT_C CSmilPresentation * NewL ( MSmilPlayer *)
IMPORT_C TBool NextSlideL ()
IMPORT_C void Pause ()
IMPORT_C void PlayL ()
IMPORT_C TBool PreviousSlideL ()
void PrintDebug ()
void ProcessScheduledL ()
void ProcessScheduledRecL ()
TBool RTLNavigation ()
void ReadyL ()
TSmilTime RealTime ()
IMPORT_C void Resume ()
IMPORT_C TRect RootRegionRect ()
TBool ScaleLayout ()
void ScheduleNext ()
void ScheduleUpdateL (const TSmilTime &, MSmilActive *)
IMPORT_C TBool SeekL ( TSmilTime )
TBool SeekL ( CSmilObject *)
IMPORT_C void SetBaseUrlL (const TDesC &)
void SetEndAction ( TEndAction )
void SetFocusedObjectL ( CSmilObject *)
void SetLayout ( CSmilRootRegion *)
void SetMaxDownUpScaling ( TReal , TReal )
void SetRTLNavigation ( TBool )
void SetScaleLayout ( TBool )
void SetSlideModeEnabled ( TBool )
void SetStartAction ( TStartAction )
void SetTimegraph ( CSmilTimeContainer *)
void SetTwoWayNavigation ( TBool )
IMPORT_C void SetVolume (const TInt )
IMPORT_C TInt SlideCount ()
TBool SlideModeEnabled ()
IMPORT_C TPresentationState State ()
IMPORT_C void StopL ()
IMPORT_C void SubmitEventL (const TDesC &, const TDesC &)
IMPORT_C void SubmitEventL (const TDesC &, CSmilObject *)
void SubmitEventL (const TSmilEvent &, TSmilTime )
TBool TwoWayNavigation ()
void UpdateFocusListL ()
TInt Volume ()
Protected Member Functions
CSmilPresentation ()
void AutoFocusL ()
void ConstructL ( MSmilPlayer *)
void DoCancel ()
TBool MoveDirectionL ( TInt , TInt )
void PauseInternal ()
void RunL ()
TBool SelectionKeyPressedL ()
Inherited Functions
CActive::CActive(TInt)
CActive::Cancel()
CActive::Deque()
CActive::Extension_(TUint,TAny *&,TAny *)
CActive::IsActive()const
CActive::IsAdded()const
CActive::Priority()const
CActive::RunError(TInt)
CActive::SetActive()
CActive::SetPriority(TInt)
CActive::~CActive()
CBase::CBase()
CBase::Delete(CBase *)
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()
Public Member Enumerations
enum TEndAction { EStopAtEnd , EPauseAtEnd , ERepeatAtEnd }
enum TPresentationState { EPlaying , EStopped , EPaused }
enum TStartAction { EDoNothing , EShowFirstFrame }
Inherited Enumerations
CActive:TPriority
Protected Attributes
TBool iSlideModeEnabled
Private Attributes
TSmilTime iAccumulatedTime
RSmilTextBuf iBaseUrl
TSmilTime iClock
const CSmilAnchor * iDelayedAnchor
TReal iDown
TEndAction iEndAction
TBool iEventsEnabled
TBool iFirstFramePaused
CLinkedList < CSmilObject * > iFocusOrder
CSmilObject * iFocusedObject
CSmilMedia * iInBounds
TTime iLastEventTime
CSmilRootRegion * iLayout
TBool iMediaSelected
MSmilPlayer * iPlayer
TBool iProcessing
TBool iRTL
ScheduleItem * iSchedule
TBool iSchedulingEnabled
TStartAction iStartAction
TTime iStartTime
TPresentationState iState
CSmilTimeContainer * iTimegraph
RTimer iTimer
CSmilTransition * iTransitions
TBool iTwoWayNavigation
TReal iUp
TInt iVolume
Inherited Attributes
CActive::iStatus

Constructor & Destructor Documentation

CSmilPresentation()

CSmilPresentation ( ) [protected]

constructor

~CSmilPresentation()

~CSmilPresentation ( ) [virtual]

Destructor.

Member Functions Documentation

ActivateAnchorL(const CSmilAnchor *)

void ActivateAnchorL ( const CSmilAnchor * anchor )

Parameters

const CSmilAnchor * anchor

ActivateFocusedL()

IMPORT_C void ActivateFocusedL ( )

Generate activate event for currently focused media (if there is one)

AddTransitionL(CSmilTransition *)

void AddTransitionL ( CSmilTransition * aTransition )

Parameters

CSmilTransition * aTransition

AfterL(MSmilActive *, const TSmilTime &, TBool)

void AfterL ( MSmilActive * aActive,
const TSmilTime & aDelay,
TBool aLazy
)

Parameters

MSmilActive * aActive
const TSmilTime & aDelay
TBool aLazy

AutoFocusL()

void AutoFocusL ( ) [protected]

BaseUrl()

IMPORT_C TPtrC BaseUrl ( ) const

Returns the base URL of the presentation

CancelActive(MSmilActive *)

void CancelActive ( MSmilActive * aActive )

Parameters

MSmilActive * aActive

CancelFocusL()

IMPORT_C void CancelFocusL ( )

Remove focus if exists

ClearSchedule()

void ClearSchedule ( )

ClearTransitions()

void ClearTransitions ( )

ConstructL(MSmilPlayer *)

void ConstructL ( MSmilPlayer * aPlayer ) [protected]

Parameters

MSmilPlayer * aPlayer

CurrentSlide()

IMPORT_C TInt CurrentSlide ( ) const

Return the sequence number (starting from 1) of current slide (top level <body> child element)

CurrentTime()

IMPORT_C TSmilTime CurrentTime ( )

Current position on presentation timeline

DoCancel()

void DoCancel ( ) [protected, virtual]

Implements cancellation of an outstanding request.

This function is called as part of the active object's Cancel() .

It must call the appropriate cancel function offered by the active object's asynchronous service provider. The asynchronous service provider's cancel is expected to act immediately.

DoCancel() must not wait for event completion; this is handled by Cancel() .

CActive::Cancel

Draw(CGraphicsContext &, const TRect &)

IMPORT_C void Draw ( CGraphicsContext & aGc,
const TRect & aRect
)

Called from outside of the engine to update the given region within the presentation area, using the given graphics context The engine draws the region backgrounds and the media objects that are not responsible for performing their own drawing.

This method should ultimately be called by the Draw method of the CCoeControl that contains the SMIL presentation. It should also be called as a result of MSmilPlayer::Redraw() call.

Parameters

CGraphicsContext & aGc
const TRect & aRect

Duration()

IMPORT_C TSmilTime Duration ( ) const

FindTransition(const TDesC &)

CSmilTransition * FindTransition ( const TDesC & aName )

Parameters

const TDesC & aName

FocusedObject()

IMPORT_C CSmilObject * FocusedObject ( ) const

Return currently focused object, or null

GetEndAction()

TEndAction GetEndAction ( ) const [inline]

What to do at the end of the presentation. Values: EStopAtEnd, EPauseAtEnd, ERepeatAtEnd

GetLayout()

CSmilRootRegion * GetLayout ( ) [inline]

GetMaxDownScaling()

TReal32 GetMaxDownScaling ( )

GetMaxUpScaling()

TReal32 GetMaxUpScaling ( )

GetMediaFactory()

MSmilMediaFactory * GetMediaFactory ( )

GetPlayer()

MSmilPlayer * GetPlayer ( ) [inline]

Returns the MSmilPlayer object associated with this presentation

GetScalingFactor()

IMPORT_C TReal32 GetScalingFactor ( )

GetStartAction()

TStartAction GetStartAction ( ) const [inline]

What to do when then the presentation is in the beginning (stopped) and not playing. Values: EDoNothing, EShowFirstFrame

GetTimegraph()

CSmilTimeContainer * GetTimegraph ( ) [inline]

GetTransitionFactory()

MSmilTransitionFactory * GetTransitionFactory ( )

HandleKeyEventL(const TKeyEvent &, TEventCode)

IMPORT_C TKeyResponse HandleKeyEventL ( const TKeyEvent & aKeyEvent,
TEventCode aType
)

Handle Symbian OS key event. This may generate SMIL events, may move key focus and may cause media to scroll

Parameters

const TKeyEvent & aKeyEvent
TEventCode aType

HandlePointerEventL(const TPointerEvent &)

IMPORT_C void HandlePointerEventL ( const TPointerEvent & aPointerEvent )

Handle Symbian OS mouse event. This may generate SMIL events, may move key focus and may cause media to scroll

Parameters

const TPointerEvent & aPointerEvent

IsInteractive()

IMPORT_C TBool IsInteractive ( ) const

Returns true if the presentation contains interactive elements (besides scrollable media)

IsTransparent()

IMPORT_C TBool IsTransparent ( ) const

Returns true if presentation background is transparent

MediaSelected()

TBool MediaSelected ( ) const [inline]

MouseClickedL(const TPoint &)

IMPORT_C void MouseClickedL ( const TPoint & aPoint )

Convenience method for generating UI events

Parameters

const TPoint & aPoint

MoveDirectionL(TInt, TInt)

TBool MoveDirectionL ( TInt aX,
TInt aY
) [protected]

Parameters

TInt aX
TInt aY

MoveFocusL(TInt, TInt)

IMPORT_C void MoveFocusL ( TInt aX,
TInt aY
)

Move media focus maintained by the SMIL engine to given direction. HandleKeyEvent replaces this method in most cases.

Parameters

TInt aX
TInt aY

NewL(MSmilPlayer *)

IMPORT_C CSmilPresentation * NewL ( MSmilPlayer * aPlayer ) [static]

Two-phased constructor.

Parameters

MSmilPlayer * aPlayer

NextSlideL()

IMPORT_C TBool NextSlideL ( )

Go to next slide in the presentation:

Pause()

IMPORT_C void Pause ( )

Pauses the presentation playback.

PauseInternal()

void PauseInternal ( ) [protected]

PlayL()

IMPORT_C void PlayL ( )

Starts the presentation playback.

PreviousSlideL()

IMPORT_C TBool PreviousSlideL ( )

Go to previous slide in the presentation:

PrintDebug()

void PrintDebug ( )

ProcessScheduledL()

void ProcessScheduledL ( )

ProcessScheduledRecL()

void ProcessScheduledRecL ( )

RTLNavigation()

TBool RTLNavigation ( ) const [inline]

Gets the keyboards focus navigation order EFalse: from left to right ETrue: from right to left

ReadyL()

void ReadyL ( )

RealTime()

TSmilTime RealTime ( )

Resume()

IMPORT_C void Resume ( )

Resumes the presentation playback.

RootRegionRect()

IMPORT_C TRect RootRegionRect ( ) const

Returns root region rectangle.

RunL()

void RunL ( ) [protected, virtual]

Handles an active object's request completion event.

A derived class must provide an implementation to handle the completed request. If appropriate, it may issue another request.

The function is called by the active scheduler when a request completion event occurs, i.e. after the active scheduler's WaitForAnyRequest() function completes.

Before calling this active object's RunL() function, the active scheduler has:

1. decided that this is the highest priority active object with a completed request

2. marked this active object's request as complete (i.e. the request is no longer outstanding)

RunL() runs under a trap harness in the active scheduler. If it leaves, then the active scheduler calls RunError() to handle the leave.

Note that once the active scheduler's Start() function has been called, all user code is run under one of the program's active object's RunL() or RunError() functions.

CActiveScheduler::Start CActiveScheduler::Error CActiveScheduler::WaitForAnyRequest TRAPD

ScaleLayout()

TBool ScaleLayout ( ) const [inline]

If set to true (default), scale down oversized SMIL layouts

ScheduleNext()

void ScheduleNext ( )

ScheduleUpdateL(const TSmilTime &, MSmilActive *)

void ScheduleUpdateL ( const TSmilTime & aTime,
MSmilActive * aActive = 0
)

Parameters

const TSmilTime & aTime
MSmilActive * aActive = 0

SeekL(TSmilTime)

IMPORT_C TBool SeekL ( TSmilTime aTo )

Tries to seek the presentation to the given position in the timeline. If this fails, the presentation is stopped.

Returns TRUE if succesful.

Parameters

TSmilTime aTo

SeekL(CSmilObject *)

TBool SeekL ( CSmilObject * aTo )

Parameters

CSmilObject * aTo

SelectionKeyPressedL()

TBool SelectionKeyPressedL ( ) [protected]

SetBaseUrlL(const TDesC &)

IMPORT_C void SetBaseUrlL ( const TDesC & aUrl )

Sets the base URL of the presentation

Parameters

const TDesC & aUrl

SetEndAction(TEndAction)

void SetEndAction ( TEndAction aEndAction ) [inline]

What to do at the end of the presentation. Values: EStopAtEnd, EPauseAtEnd, ERepeatAtEnd

Parameters

TEndAction aEndAction

SetFocusedObjectL(CSmilObject *)

void SetFocusedObjectL ( CSmilObject * aFocus )

Parameters

CSmilObject * aFocus

SetLayout(CSmilRootRegion *)

void SetLayout ( CSmilRootRegion * aRoot )

Parameters

CSmilRootRegion * aRoot

SetMaxDownUpScaling(TReal, TReal)

void SetMaxDownUpScaling ( TReal aDown,
TReal aUp
) [inline]

Parameters

TReal aDown
TReal aUp

SetRTLNavigation(TBool)

void SetRTLNavigation ( TBool aRTL ) [inline]

Sets the keyboards focus navigation order EFalse: from left to right ETrue: from right to left

Parameters

TBool aRTL

SetScaleLayout(TBool)

void SetScaleLayout ( TBool aScale ) [inline]

If set to true (default), scale down oversized SMIL layouts

Parameters

TBool aScale

SetSlideModeEnabled(TBool)

void SetSlideModeEnabled ( TBool aEnable ) [inline]

Set to true to enable slide mode used for playing back Conformance Document MMS messages. Use NextSlide(), CurrentSlide() , SlideCount() to navigate.

Parameters

TBool aEnable

SetStartAction(TStartAction)

void SetStartAction ( TStartAction aStartAction ) [inline]

What to do when then the presentation is in the beginning (stopped) and not playing. Values: EDoNothing, EShowFirstFrame

Parameters

TStartAction aStartAction

SetTimegraph(CSmilTimeContainer *)

void SetTimegraph ( CSmilTimeContainer * aBody )

Parameters

CSmilTimeContainer * aBody

SetTwoWayNavigation(TBool)

void SetTwoWayNavigation ( TBool aEnable ) [inline]

If set to true (default), use two-way (up-down) navigation mode, four-way otherwise

Parameters

TBool aEnable

SetVolume(const TInt)

IMPORT_C void SetVolume ( const TInt aVolume )

Volume setter function. SetVolume notifies renderes about changes. Range: [0..100]

Parameters

const TInt aVolume

SlideCount()

IMPORT_C TInt SlideCount ( ) const

Return total number of slides in the presentation (top level <body> child elements)

SlideModeEnabled()

TBool SlideModeEnabled ( ) const [inline]

State()

IMPORT_C TPresentationState State ( )

State of the presentation:

EStopped EPlaying EPaused

StopL()

IMPORT_C void StopL ( )

Stops the presentation playback, resetting the timeline to the beginning and possibly freeing some allocated resouces.

SubmitEventL(const TDesC &, const TDesC &)

IMPORT_C void SubmitEventL ( const TDesC & aName,
const TDesC & aSource
)

Submits an event to the Engine. Events are characterised by event name and event source.

Event source is a name of a source element. If the source is within the timegraph the name can be obtained using TSmilObject::GetName() method.

Event name is a name of an event class, for example "activateEvent".

Parameters

const TDesC & aName
const TDesC & aSource

SubmitEventL(const TDesC &, CSmilObject *)

IMPORT_C void SubmitEventL ( const TDesC & aName,
CSmilObject * aSource
)

Parameters

const TDesC & aName
CSmilObject * aSource

SubmitEventL(const TSmilEvent &, TSmilTime)

void SubmitEventL ( const TSmilEvent & aEvent,
TSmilTime aNow = TSmilTime::KUnresolved
)

Parameters

const TSmilEvent & aEvent
TSmilTime aNow = TSmilTime::KUnresolved

TwoWayNavigation()

TBool TwoWayNavigation ( ) const [inline]

If true, using two-way (up-down) navigation mode, four-way otherwise

UpdateFocusListL()

void UpdateFocusListL ( )

Volume()

TInt Volume ( ) [inline]

Volume getter function. SetVolume notifies renderes about changes. Range: [0..100]

Member Enumerations Documentation

Enum TEndAction

Enumerators

EStopAtEnd
EPauseAtEnd
ERepeatAtEnd

Enum TPresentationState

Enumerators

EPlaying
EStopped
EPaused

Enum TStartAction

Enumerators

EDoNothing
EShowFirstFrame

Member Data Documentation

TSmilTime iAccumulatedTime

TSmilTime iAccumulatedTime [private]

RSmilTextBuf iBaseUrl

RSmilTextBuf iBaseUrl [private]

TSmilTime iClock

TSmilTime iClock [private]

const CSmilAnchor * iDelayedAnchor

const CSmilAnchor * iDelayedAnchor [private]

TReal iDown

TReal iDown [private]

TEndAction iEndAction

TEndAction iEndAction [private]

TBool iEventsEnabled

TBool iEventsEnabled [private]

TBool iFirstFramePaused

TBool iFirstFramePaused [private]

CLinkedList< CSmilObject * > iFocusOrder

CLinkedList < CSmilObject * > iFocusOrder [private]

CSmilObject * iFocusedObject

CSmilObject * iFocusedObject [private]

CSmilMedia * iInBounds

CSmilMedia * iInBounds [private]

TTime iLastEventTime

TTime iLastEventTime [private]

CSmilRootRegion * iLayout

CSmilRootRegion * iLayout [private]

TBool iMediaSelected

TBool iMediaSelected [private]

MSmilPlayer * iPlayer

MSmilPlayer * iPlayer [private]

TBool iProcessing

TBool iProcessing [private]

TBool iRTL

TBool iRTL [private]

ScheduleItem * iSchedule

ScheduleItem * iSchedule [private]

TBool iSchedulingEnabled

TBool iSchedulingEnabled [private]

TBool iSlideModeEnabled

TBool iSlideModeEnabled [protected]

TStartAction iStartAction

TStartAction iStartAction [private]

TTime iStartTime

TTime iStartTime [private]

TPresentationState iState

TPresentationState iState [private]

CSmilTimeContainer * iTimegraph

CSmilTimeContainer * iTimegraph [private]

RTimer iTimer

RTimer iTimer [private]

CSmilTransition * iTransitions

CSmilTransition * iTransitions [private]

TBool iTwoWayNavigation

TBool iTwoWayNavigation [private]

TReal iUp

TReal iUp [private]

TInt iVolume

TInt iVolume [private]