50 #ifndef _FORMATTERSCHEDULER_H_
51 #define _FORMATTERSCHEDULER_H_
57 #include "contextmanager/IContextListener.h"
58 using namespace ::br::pucrio::telemidia::ginga::core::contextmanager;
60 #include "model/ExecutionObject.h"
61 #include "model/NodeNesting.h"
62 #include "model/CompositeExecutionObject.h"
63 using namespace ::br::pucrio::telemidia::ginga::ncl::model::components;
65 #include "model/ExecutionObjectSwitch.h"
66 #include "model/SwitchEvent.h"
67 using namespace ::br::pucrio::telemidia::ginga::ncl::model::switches;
69 #include "model/AttributionEvent.h"
70 #include "model/IEventListener.h"
71 #include "model/FormatterEvent.h"
72 #include "model/PresentationEvent.h"
73 using namespace ::br::pucrio::telemidia::ginga::ncl::model::event;
75 #include "model/LinkAssignmentAction.h"
76 #include "model/LinkSimpleAction.h"
77 using namespace ::br::pucrio::telemidia::ginga::ncl::model::link;
79 #include "model/FormatterLayout.h"
80 using namespace ::br::pucrio::telemidia::ginga::ncl::model::presentation;
82 #include "adaptation/context/RuleAdapter.h"
83 #include "adaptation/context/IPresentationContext.h"
84 using namespace ::br::pucrio::telemidia::ginga::ncl::adaptation::context;
86 #include "adapters/application/ApplicationPlayerAdapter.h"
87 using namespace ::br::pucrio::telemidia::ginga::ncl::adapters::application;
89 #include "adapters/FormatterPlayerAdapter.h"
90 #include "adapters/PlayerAdapterManager.h"
91 using namespace ::br::pucrio::telemidia::ginga::ncl::adapters;
93 #include "ncl/connectors/SimpleAction.h"
94 #include "ncl/connectors/EventUtil.h"
95 using namespace ::br::pucrio::telemidia::ncl::connectors;
97 #include "ncl/components/CompositeNode.h"
98 #include "ncl/components/ContentNode.h"
99 #include "ncl/components/Node.h"
100 #include "ncl/components/NodeEntity.h"
101 using namespace ::br::pucrio::telemidia::ncl::components;
103 #include "ncl/interfaces/Port.h"
104 #include "ncl/interfaces/Anchor.h"
105 #include "ncl/interfaces/ContentAnchor.h"
106 #include "ncl/interfaces/PropertyAnchor.h"
107 #include "ncl/interfaces/SwitchPort.h"
108 using namespace ::br::pucrio::telemidia::ncl::interfaces;
110 #include "ncl/reuse/ReferNode.h"
111 using namespace ::br::pucrio::telemidia::ncl::reuse;
113 #include "focus/FormatterFocusManager.h"
114 using namespace ::br::pucrio::telemidia::ginga::ncl::focus;
116 #include "multidevice/IFormatterMultiDevice.h"
117 using namespace ::br::pucrio::telemidia::ginga::ncl::multidevice;
119 #include "IFormatterSchedulerListener.h"
120 #include "emconverter/ObjectCreationForbiddenException.h"
122 #include "animation/AnimationController.h"
123 using namespace ::br::pucrio::telemidia::ginga::ncl::animation;
133 namespace telemidia {
137 public ILinkActionListener,
139 public IEventListener,
140 public IContextListener {
143 RuleAdapter* ruleAdapter;
144 PlayerAdapterManager* playerManager;
145 IPresentationContext* presContext;
146 IFormatterMultiDevice* multiDevPres;
147 FormatterFocusManager* focusManager;
150 vector<IFormatterSchedulerListener*> schedulerListeners;
151 vector<FormatterEvent*> documentEvents;
152 map<FormatterEvent*, bool> documentStatus;
158 pthread_mutex_t mutexD;
159 pthread_mutex_t mutexActions;
161 set<FormatterEvent*> listening;
162 pthread_mutex_t lMutex;
166 PlayerAdapterManager* playerManager,
167 RuleAdapter* ruleAdapter,
168 IFormatterMultiDevice* multiDevice,
173 void addAction(
void* action);
174 void removeAction(
void* action);
176 bool setKeyHandler(
bool isHandler);
178 FormatterFocusManager* getFocusManager();
179 void* getFormatterLayout(
void* descriptor,
void*
object);
182 bool isDocumentRunning(FormatterEvent* event);
184 void setTimeBaseObject(
185 ExecutionObject*
object,
186 FormatterPlayerAdapter* objectPlayer,
string nodeId);
188 static void printAction(
190 LinkCondition* condition,
191 LinkSimpleAction* linkAction);
194 void scheduleAction(
void* condition,
void* action);
197 void runAction(LinkCondition* condition, LinkSimpleAction* action);
200 FormatterEvent* event,
201 LinkCondition* condition,
202 LinkSimpleAction* action);
204 void runActionOverProperty(
205 FormatterEvent* event,
206 LinkSimpleAction* action);
208 void runActionOverApplicationObject(
209 ApplicationExecutionObject* executionObject,
210 FormatterEvent* event,
211 FormatterPlayerAdapter* player,
212 LinkSimpleAction* action);
214 void runActionOverComposition(
215 CompositeExecutionObject* compositeObject,
216 LinkSimpleAction* action);
218 void runActionOverSwitch(
219 ExecutionObjectSwitch* switchObject,
221 LinkSimpleAction* action);
224 ExecutionObjectSwitch* switchObject,
225 SwitchEvent* switchEvent,
226 ExecutionObject* selectedObject,
227 LinkSimpleAction* action);
229 string solveImplicitRefAssessment(
230 string propValue, AttributionEvent* event);
233 void startEvent(FormatterEvent* event);
234 void stopEvent(FormatterEvent* event);
235 void pauseEvent(FormatterEvent* event);
236 void resumeEvent(FormatterEvent* event);
239 void initializeDefaultSettings();
240 void initializeDocumentSettings(Node* node);
244 FormatterEvent* documentEvent,
245 vector<FormatterEvent*>* entryEvents);
248 void removeDocument(FormatterEvent* documentEvent);
251 void stopDocument(FormatterEvent* documentEvent);
252 void pauseDocument(FormatterEvent* documentEvent);
253 void resumeDocument(FormatterEvent* documentEvent);
254 void stopAllDocuments();
255 void pauseAllDocuments();
256 void resumeAllDocuments();
257 void eventStateChanged(
258 void* someEvent,
short transition,
short previousState);
260 short getPriorityType();
263 void receiveGlobalAttribution(
string propertyName,
string value);
271 #endif //_FORMATTERSCHEDULER_H_
Definition: IFormatterSchedulerListener.h:61
Definition: IFormatterScheduler.h:60
Definition: FormatterScheduler.h:136