CSmilPresentation Class Reference

class CSmilPresentation : public CActive

A SMIL presentation

Inherits from

Nested Classes and Structures

Public Member Functions
~CSmilPresentation()
voidActivateAnchorL(const CSmilAnchor *)
IMPORT_C voidActivateFocusedL()
voidAddTransitionL(CSmilTransition *)
voidAfterL(MSmilActive *, const TSmilTime &, TBool)
IMPORT_C TPtrCBaseUrl()
voidCancelActive(MSmilActive *)
IMPORT_C voidCancelFocusL()
voidClearSchedule()
voidClearTransitions()
IMPORT_C TIntCurrentSlide()
IMPORT_C TSmilTimeCurrentTime()
IMPORT_C voidDraw(CGraphicsContext &, const TRect &)
IMPORT_C TSmilTimeDuration()
CSmilTransition *FindTransition(const TDesC &)
IMPORT_C CSmilObject *FocusedObject()
TEndAction GetEndAction()
CSmilRootRegion *GetLayout()
TReal32 GetMaxDownScaling()
TReal32 GetMaxUpScaling()
MSmilMediaFactory *GetMediaFactory()
MSmilPlayer *GetPlayer()
IMPORT_C TReal32GetScalingFactor()
TStartAction GetStartAction()
CSmilTimeContainer *GetTimegraph()
MSmilTransitionFactory *GetTransitionFactory()
IMPORT_C TKeyResponseHandleKeyEventL(const TKeyEvent &, TEventCode)
IMPORT_C voidHandlePointerEventL(const TPointerEvent &)
IMPORT_C TBoolIsInteractive()
IMPORT_C TBoolIsTransparent()
TBool MediaSelected()
IMPORT_C voidMouseClickedL(const TPoint &)
IMPORT_C voidMoveFocusL(TInt, TInt)
IMPORT_C CSmilPresentation *NewL(MSmilPlayer *)
IMPORT_C TBoolNextSlideL()
IMPORT_C voidPause()
IMPORT_C voidPlayL()
IMPORT_C TBoolPreviousSlideL()
voidPrintDebug()
voidProcessScheduledL()
voidProcessScheduledRecL()
TBool RTLNavigation()
voidReadyL()
TSmilTime RealTime()
IMPORT_C voidResume()
IMPORT_C TRectRootRegionRect()
TBool ScaleLayout()
voidScheduleNext()
voidScheduleUpdateL(const TSmilTime &, MSmilActive *)
IMPORT_C TBoolSeekL(TSmilTime)
TBool SeekL(CSmilObject *)
IMPORT_C voidSetBaseUrlL(const TDesC &)
voidSetEndAction(TEndAction)
voidSetFocusedObjectL(CSmilObject *)
voidSetLayout(CSmilRootRegion *)
voidSetMaxDownUpScaling(TReal, TReal)
voidSetRTLNavigation(TBool)
voidSetScaleLayout(TBool)
voidSetSlideModeEnabled(TBool)
voidSetStartAction(TStartAction)
voidSetTimegraph(CSmilTimeContainer *)
voidSetTwoWayNavigation(TBool)
IMPORT_C voidSetVolume(const TInt)
IMPORT_C TIntSlideCount()
TBool SlideModeEnabled()
IMPORT_C TPresentationStateState()
IMPORT_C voidStopL()
IMPORT_C voidSubmitEventL(const TDesC &, const TDesC &)
IMPORT_C voidSubmitEventL(const TDesC &, CSmilObject *)
voidSubmitEventL(const TSmilEvent &, TSmilTime)
TBool TwoWayNavigation()
voidUpdateFocusListL()
TInt Volume()
Protected Member Functions
CSmilPresentation()
voidAutoFocusL()
voidConstructL(MSmilPlayer *)
voidDoCancel()
TBool MoveDirectionL(TInt, TInt)
voidPauseInternal()
voidRunL()
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
enumTEndAction { EStopAtEnd, EPauseAtEnd, ERepeatAtEnd }
enumTPresentationState { EPlaying, EStopped, EPaused }
enumTStartAction { 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 *)

voidActivateAnchorL(const CSmilAnchor *anchor)

Parameters

const CSmilAnchor * anchor

ActivateFocusedL()

IMPORT_C voidActivateFocusedL()

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

AddTransitionL(CSmilTransition *)

voidAddTransitionL(CSmilTransition *aTransition)

Parameters

CSmilTransition * aTransition

AfterL(MSmilActive *, const TSmilTime &, TBool)

voidAfterL(MSmilActive *aActive,
const TSmilTime &aDelay,
TBoolaLazy
)

Parameters

MSmilActive * aActive
const TSmilTime & aDelay
TBool aLazy

AutoFocusL()

voidAutoFocusL()[protected]

BaseUrl()

IMPORT_C TPtrCBaseUrl()const

Returns the base URL of the presentation

CancelActive(MSmilActive *)

voidCancelActive(MSmilActive *aActive)

Parameters

MSmilActive * aActive

CancelFocusL()

IMPORT_C voidCancelFocusL()

Remove focus if exists

ClearSchedule()

voidClearSchedule()

ClearTransitions()

voidClearTransitions()

ConstructL(MSmilPlayer *)

voidConstructL(MSmilPlayer *aPlayer)[protected]

Parameters

MSmilPlayer * aPlayer

CurrentSlide()

IMPORT_C TIntCurrentSlide()const

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

CurrentTime()

IMPORT_C TSmilTimeCurrentTime()

Current position on presentation timeline

DoCancel()

voidDoCancel()[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 voidDraw(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 TSmilTimeDuration()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 TReal32GetScalingFactor()

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 TKeyResponseHandleKeyEventL(const TKeyEvent &aKeyEvent,
TEventCodeaType
)

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 voidHandlePointerEventL(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 TBoolIsInteractive()const

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

IsTransparent()

IMPORT_C TBoolIsTransparent()const

Returns true if presentation background is transparent

MediaSelected()

TBool MediaSelected()const [inline]

MouseClickedL(const TPoint &)

IMPORT_C voidMouseClickedL(const TPoint &aPoint)

Convenience method for generating UI events

Parameters

const TPoint & aPoint

MoveDirectionL(TInt, TInt)

TBool MoveDirectionL(TIntaX,
TIntaY
)[protected]

Parameters

TInt aX
TInt aY

MoveFocusL(TInt, TInt)

IMPORT_C voidMoveFocusL(TIntaX,
TIntaY
)

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 TBoolNextSlideL()

Go to next slide in the presentation:

Pause()

IMPORT_C voidPause()

Pauses the presentation playback.

PauseInternal()

voidPauseInternal()[protected]

PlayL()

IMPORT_C voidPlayL()

Starts the presentation playback.

PreviousSlideL()

IMPORT_C TBoolPreviousSlideL()

Go to previous slide in the presentation:

PrintDebug()

voidPrintDebug()

ProcessScheduledL()

voidProcessScheduledL()

ProcessScheduledRecL()

voidProcessScheduledRecL()

RTLNavigation()

TBool RTLNavigation()const [inline]

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

ReadyL()

voidReadyL()

RealTime()

TSmilTime RealTime()

Resume()

IMPORT_C voidResume()

Resumes the presentation playback.

RootRegionRect()

IMPORT_C TRectRootRegionRect()const

Returns root region rectangle.

RunL()

voidRunL()[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()

voidScheduleNext()

ScheduleUpdateL(const TSmilTime &, MSmilActive *)

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

Parameters

const TSmilTime & aTime
MSmilActive * aActive = 0

SeekL(TSmilTime)

IMPORT_C TBoolSeekL(TSmilTimeaTo)

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 voidSetBaseUrlL(const TDesC &aUrl)

Sets the base URL of the presentation

Parameters

const TDesC & aUrl

SetEndAction(TEndAction)

voidSetEndAction(TEndActionaEndAction)[inline]

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

Parameters

TEndAction aEndAction

SetFocusedObjectL(CSmilObject *)

voidSetFocusedObjectL(CSmilObject *aFocus)

Parameters

CSmilObject * aFocus

SetLayout(CSmilRootRegion *)

voidSetLayout(CSmilRootRegion *aRoot)

Parameters

CSmilRootRegion * aRoot

SetMaxDownUpScaling(TReal, TReal)

voidSetMaxDownUpScaling(TRealaDown,
TRealaUp
)[inline]

Parameters

TReal aDown
TReal aUp

SetRTLNavigation(TBool)

voidSetRTLNavigation(TBoolaRTL)[inline]

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

Parameters

TBool aRTL

SetScaleLayout(TBool)

voidSetScaleLayout(TBoolaScale)[inline]

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

Parameters

TBool aScale

SetSlideModeEnabled(TBool)

voidSetSlideModeEnabled(TBoolaEnable)[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)

voidSetStartAction(TStartActionaStartAction)[inline]

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

Parameters

TStartAction aStartAction

SetTimegraph(CSmilTimeContainer *)

voidSetTimegraph(CSmilTimeContainer *aBody)

Parameters

CSmilTimeContainer * aBody

SetTwoWayNavigation(TBool)

voidSetTwoWayNavigation(TBoolaEnable)[inline]

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

Parameters

TBool aEnable

SetVolume(const TInt)

IMPORT_C voidSetVolume(const TIntaVolume)

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

Parameters

const TInt aVolume

SlideCount()

IMPORT_C TIntSlideCount()const

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

SlideModeEnabled()

TBool SlideModeEnabled()const [inline]

State()

IMPORT_C TPresentationStateState()

State of the presentation:

EStopped EPlaying EPaused

StopL()

IMPORT_C voidStopL()

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

SubmitEventL(const TDesC &, const TDesC &)

IMPORT_C voidSubmitEventL(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 voidSubmitEventL(const TDesC &aName,
CSmilObject *aSource
)

Parameters

const TDesC & aName
CSmilObject * aSource

SubmitEventL(const TSmilEvent &, TSmilTime)

voidSubmitEventL(const TSmilEvent &aEvent,
TSmilTimeaNow = 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()

voidUpdateFocusListL()

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]