|
1 /* |
|
2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: |
|
15 * |
|
16 */ |
|
17 #include "SVGTimedEntityInterface.h" |
|
18 #include "SVGTimeContainer.h" |
|
19 |
|
20 class CSvgDocumentImpl; |
|
21 |
|
22 NONSHARABLE_CLASS( CSvgLockedRealTimeEntity ): public CSvgMediaElementBase |
|
23 { |
|
24 |
|
25 public: |
|
26 static CSvgLockedRealTimeEntity* NewL(CSvgDocumentImpl* aDoc); |
|
27 |
|
28 void ConstructL(CSvgDocumentImpl* aDoc); |
|
29 |
|
30 CSvgLockedRealTimeEntity(CSvgDocumentImpl* aDoc); |
|
31 |
|
32 ~CSvgLockedRealTimeEntity(); |
|
33 |
|
34 |
|
35 |
|
36 //from svgelementimpl |
|
37 void Print(TInt aValue) ; |
|
38 |
|
39 |
|
40 public: // from svgtimedentityinterface |
|
41 |
|
42 /** |
|
43 * The parent time container provides the timing clock to |
|
44 * the timed entity (audio, video, animation, document) |
|
45 * using this routine. |
|
46 * @since S60 3.2 |
|
47 * @param aTick Current tick information |
|
48 * @return none. |
|
49 */ |
|
50 void ParentTimeContainerTick( TSvgTick aTick ); |
|
51 /** |
|
52 * Returns the sync behavior of the entity. |
|
53 * @since S60 3.2 |
|
54 * @param none. |
|
55 * @return TSvgSyncBehaviour Element's Sync Behaviour. |
|
56 */ |
|
57 TSvgSyncBehaviour GetEntitySyncBehavior(); |
|
58 |
|
59 /** |
|
60 * When the timed entity acts as timing master in the time container, |
|
61 * the time container gets the timed entity clock using this method |
|
62 * and feeds to rest of timed entities. |
|
63 * @since S60 3.2 |
|
64 * @param aEntityCurTime Current Entity Time in msecs. |
|
65 * @return none. |
|
66 */ |
|
67 void GetEntityCurrentTime( TUint32& |
|
68 aEntityCurTime ); |
|
69 /** |
|
70 * Returns the configured sync master value(as per DOM tree) as specified |
|
71 * in the SVG content. |
|
72 * @since S60 3.2 |
|
73 * @param aIsSyncMaster Indicates whether the element is configured as |
|
74 * Sync Master. |
|
75 * @return none. |
|
76 */ |
|
77 void GetCnfSyncMasterStatus( TBool& aIsSyncMaster ); |
|
78 |
|
79 /** |
|
80 * Check if timed entity is going to act as timing master in the |
|
81 * time container. This behavior could change dynamically. |
|
82 * @since S60 3.2 |
|
83 * @param aIsSyncMaster Indicates whether the element is currrently Sync Master. |
|
84 * @return none. |
|
85 */ |
|
86 void GetCurSyncMasterStatus( TBool& isSyncMaster ); |
|
87 |
|
88 |
|
89 /** If some other element is resolved as syncMaster in the time container group, |
|
90 * this element can not act as sync master. |
|
91 * @since S60 3.2 |
|
92 * @param aSyncMasterStatus Indicates whether the element is currrently |
|
93 * Sync Master. |
|
94 * @return none. |
|
95 */ |
|
96 void SetCurSyncMasterStatus( TBool aSyncMasterStatus ); |
|
97 |
|
98 /** |
|
99 * Check if timed entity can provide timing ticks to rest of time |
|
100 * container elements. This behavior could change dynamically. |
|
101 * For example, if audio clip is over, the audio element can't generate |
|
102 * ticks for others. |
|
103 * @since S60 3.2 |
|
104 * @param none. |
|
105 * @return TBool True if can generate timing tick. |
|
106 */ |
|
107 TBool CanGenerateTick(); |
|
108 |
|
109 /** |
|
110 * Check if timed entity can use its parent's tick. Usually only the |
|
111 * parent document should return true for this function. |
|
112 * All other elements return false |
|
113 * @since S60 3.2 |
|
114 * @param none. |
|
115 * @return TBool True if can use parent's timing tick. |
|
116 */ |
|
117 TBool CanUseParentTick(); |
|
118 |
|
119 /** |
|
120 * If the timed entity needs to be in sync with the time container and |
|
121 * it has slipped beyond the sync tolerance limit, the method is called to |
|
122 * bring the element in sync with the time container. |
|
123 * @since S60 3.2 |
|
124 * @param aSynctime Time for resync in msecs. |
|
125 * @return none. |
|
126 */ |
|
127 void ResyncTimedEntity( TUint32 aSynctime ); |
|
128 |
|
129 /** |
|
130 * This would be used for pausing the locked timed entity while other locked |
|
131 * timed entities get loaded. |
|
132 * @since S60 3.2 |
|
133 * @param none. |
|
134 * @return none. |
|
135 */ |
|
136 void PauseTimedEntity(); |
|
137 |
|
138 /** |
|
139 * This would be used for resuming the locked timed entity once all locked |
|
140 * timed entities get loaded. |
|
141 * @since S60 3.2 |
|
142 * @param none. |
|
143 * @return none. |
|
144 */ |
|
145 void ResumeTimedEntity(); |
|
146 |
|
147 /** |
|
148 * This would be used for stopping the timed entity. |
|
149 * @since S60 3.2 |
|
150 * @param none. |
|
151 * @return none. |
|
152 */ |
|
153 void StopTimedEntity() ; |
|
154 |
|
155 |
|
156 /* Return the type of class |
|
157 @Return Type Enumeration of object type |
|
158 @Parameters none |
|
159 */ |
|
160 TSvgObjectType ObjectType(); |
|
161 |
|
162 CSvgTimeContainer* GetChildTimeContainer() ; |
|
163 |
|
164 TBool AnimProcL( MSvgTimerEvent* aEvent ); |
|
165 void ResetAnimationL(); |
|
166 |
|
167 private: |
|
168 |
|
169 // Current Tick stored here so that it can be accessed by |
|
170 // timed entities which are offset |
|
171 TSvgTick iStoredTick; |
|
172 |
|
173 CSvgDocumentImpl* iOwnerDocument; |
|
174 |
|
175 TBool iIsPaused; |
|
176 |
|
177 TBool iSyncMasterCurrent; |
|
178 }; |