Lines Matching defs:broadcaster
16 #include "lldb/Core/Broadcaster.h"
70 Listener::StartListeningForEvents (Broadcaster* broadcaster, uint32_t event_mask)
72 if (broadcaster)
75 // Tell the broadcaster to add this object as a listener
78 m_broadcasters.insert(std::make_pair(broadcaster, BroadcasterInfo(event_mask)));
81 uint32_t acquired_mask = broadcaster->AddListener (this, event_mask);
89 log->Printf ("%p Listener::StartListeningForEvents (broadcaster = %p, mask = 0x%8.8x) acquired_mask = 0x%8.8x for %s",
91 broadcaster,
103 Listener::StartListeningForEvents (Broadcaster* broadcaster, uint32_t event_mask, HandleBroadcastCallback callback, void *callback_user_data)
105 if (broadcaster)
108 // Tell the broadcaster to add this object as a listener
111 m_broadcasters.insert(std::make_pair(broadcaster, BroadcasterInfo(event_mask, callback, callback_user_data)));
114 uint32_t acquired_mask = broadcaster->AddListener (this, event_mask);
118 log->Printf ("%p Listener::StartListeningForEvents (broadcaster = %p, mask = 0x%8.8x, callback = %p, user_data = %p) acquired_mask = 0x%8.8x for %s",
119 this, broadcaster, event_mask, callback, callback_user_data, acquired_mask, m_name.c_str());
127 Listener::StopListeningForEvents (Broadcaster* broadcaster, uint32_t event_mask)
129 if (broadcaster)
134 m_broadcasters.erase (broadcaster);
136 // Remove the broadcaster from our set of broadcasters
137 return broadcaster->RemoveListener (this, event_mask);
143 // Called when a Broadcaster is in its destuctor. We need to remove all
144 // knowledge of this broadcaster and any events that it may have queued up
146 Listener::BroadcasterWillDestruct (Broadcaster *broadcaster)
151 m_broadcasters.erase (broadcaster);
157 // Remove all events for this broadcaster object.
161 if ((*pos)->GetBroadcaster() == broadcaster)
201 EventBroadcasterMatches (Broadcaster *broadcaster) :
202 m_broadcaster (broadcaster) {
214 Broadcaster *m_broadcaster;
221 EventMatcher (Broadcaster *broadcaster, const ConstString *broadcaster_names, uint32_t num_broadcaster_names, uint32_t event_type_mask) :
222 m_broadcaster (broadcaster),
256 Broadcaster *m_broadcaster;
266 Broadcaster *broadcaster, // NULL for any broadcaster
283 if (broadcaster == NULL && broadcaster_names == NULL && event_type_mask == 0)
289 pos = std::find_if (m_events.begin(), m_events.end(), EventMatcher (broadcaster, broadcaster_names, num_broadcaster_names, event_type_mask));
297 log->Printf ("%p '%s' Listener::FindNextEventInternal(broadcaster=%p, broadcaster_names=%p[%u], event_type_mask=0x%8.8x, remove=%i) event %p",
300 broadcaster,
341 Listener::PeekAtNextEventForBroadcaster (Broadcaster *broadcaster)
344 if (FindNextEventInternal (broadcaster, NULL, 0, 0, event_sp, false))
350 Listener::PeekAtNextEventForBroadcasterWithType (Broadcaster *broadcaster, uint32_t event_type_mask)
353 if (FindNextEventInternal (broadcaster, NULL, 0, event_type_mask, event_sp, false))
362 Broadcaster *broadcaster, // NULL for any broadcaster
369 return FindNextEventInternal (broadcaster, broadcaster_names, num_broadcaster_names, event_type_mask, event_sp, true);
380 Listener::GetNextEventForBroadcaster (Broadcaster *broadcaster, EventSP &event_sp)
382 return GetNextEventInternal (broadcaster, NULL, 0, 0, event_sp);
386 Listener::GetNextEventForBroadcasterWithType (Broadcaster *broadcaster, uint32_t event_type_mask, EventSP &event_sp)
388 return GetNextEventInternal (broadcaster, NULL, 0, event_type_mask, event_sp);
396 Broadcaster *broadcaster, // NULL for any broadcaster
416 if (GetNextEventInternal (broadcaster, broadcaster_names, num_broadcaster_names, event_type_mask, event_sp))
427 if (FindNextEventInternal (broadcaster, broadcaster_names, num_broadcaster_names, event_type_mask, event_sp, remove))
459 Broadcaster *broadcaster,
464 return WaitForEventsInternal (timeout, broadcaster, NULL, 0, event_type_mask, event_sp);
471 Broadcaster *broadcaster,
475 return WaitForEventsInternal (timeout, broadcaster, NULL, 0, 0, event_sp);
485 //Listener::FindBroadcasterWithMask (Broadcaster *broadcaster, uint32_t event_mask, bool exact)
489 // for (pos = m_broadcasters.find (broadcaster);
490 // pos != end && pos->first == broadcaster;
512 Broadcaster *broadcaster = event_sp->GetBroadcaster();
515 for (pos = m_broadcasters.find (broadcaster);
516 pos != end && pos->first == broadcaster;