1 /***********************************************************************
2 * AUTHOR: Marcus Overhagen
3 * FILE: TimedEventQueuePrivate.cpp
4 * DESCR: implements _event_queue_imp used by BTimedEventQueue,
6 ***********************************************************************/
8 #ifndef _TIMED_EVENT_QUEUE_PRIVATE_H
9 #define _TIMED_EVENT_QUEUE_PRIVATE_H
11 #include <MediaDefs.h>
15 struct _event_queue_imp
20 status_t
AddEvent(const media_timed_event
&event
);
21 status_t
RemoveEvent(const media_timed_event
*event
);
22 status_t
RemoveFirstEvent(media_timed_event
* outEvent
);
24 bool HasEvents() const;
25 int32
EventCount() const;
27 const media_timed_event
* FirstEvent() const;
28 bigtime_t
FirstEventTime() const;
29 const media_timed_event
* LastEvent() const;
30 bigtime_t
LastEventTime() const;
32 const media_timed_event
* FindFirstMatch(
34 BTimedEventQueue::time_direction direction
,
39 BTimedEventQueue::for_each_hook hook
,
42 BTimedEventQueue::time_direction direction
,
46 void SetCleanupHook(BTimedEventQueue::cleanup_hook hook
, void *context
);
49 BTimedEventQueue::time_direction direction
,
58 struct event_queue_entry
60 struct event_queue_entry
*prev
;
61 struct event_queue_entry
*next
;
62 media_timed_event event
;
65 void RemoveEntry(event_queue_entry
*entry
);
66 void CleanupEvent(media_timed_event
*event
);
68 event_queue_entry
*GetEnd_BeforeTime(bigtime_t eventTime
, bool inclusive
);
69 event_queue_entry
*GetStart_AfterTime(bigtime_t eventTime
, bool inclusive
);
73 event_queue_entry
*fFirstEntry
;
74 event_queue_entry
*fLastEntry
;
75 void * fCleanupHookContext
;
76 BTimedEventQueue::cleanup_hook fCleanupHook
;
79 #endif //_TIMED_EVENT_QUEUE_PRIVATE_H