uint32_t SBListener::StartListeningForEvents (const SBBroadcaster& broadcaster, uint32_t event_mask) { if (m_opaque_ptr && broadcaster.IsValid()) { return m_opaque_ptr->StartListeningForEvents (broadcaster.get(), event_mask); } return false; }
uint32_t SBListener::StartListeningForEvents (const SBBroadcaster& broadcaster, uint32_t event_mask) { uint32_t acquired_event_mask = 0; if (m_opaque_sp && broadcaster.IsValid()) { acquired_event_mask = m_opaque_sp->StartListeningForEvents (broadcaster.get(), event_mask); } Log *log = lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API); if (log) { StreamString sstr_requested; StreamString sstr_acquired; Broadcaster *lldb_broadcaster = broadcaster.get(); if (lldb_broadcaster) { const bool got_requested_names = lldb_broadcaster->GetEventNames (sstr_requested, event_mask, false); const bool got_acquired_names = lldb_broadcaster->GetEventNames (sstr_acquired, acquired_event_mask, false); log->Printf ("SBListener(%p)::StartListeneingForEvents (SBBroadcaster(%p): %s, event_mask=0x%8.8x%s%s%s) => 0x%8.8x%s%s%s", static_cast<void*>(m_opaque_sp.get()), static_cast<void*>(lldb_broadcaster), lldb_broadcaster->GetBroadcasterName().GetCString(), event_mask, got_requested_names ? " (" : "", sstr_requested.GetData(), got_requested_names ? ")" : "", acquired_event_mask, got_acquired_names ? " (" : "", sstr_acquired.GetData(), got_acquired_names ? ")" : ""); } else { log->Printf ("SBListener(%p)::StartListeneingForEvents (SBBroadcaster(%p), event_mask=0x%8.8x) => 0x%8.8x", static_cast<void*>(m_opaque_sp.get()), static_cast<void*>(lldb_broadcaster), event_mask, acquired_event_mask); } } return acquired_event_mask; }
bool SBEvent::BroadcasterMatchesRef (const SBBroadcaster &broadcaster) { Event *lldb_event = get(); bool success = false; if (lldb_event) success = lldb_event->BroadcasterIs (broadcaster.get()); // For logging, this gets a little chatty so only enable this when verbose logging is on Log *log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API | LIBLLDB_LOG_VERBOSE)); if (log) log->Printf ("SBEvent(%p)::BroadcasterMatchesRef (SBBroadcaster(%p): %s) => %i", static_cast<void*>(get()), static_cast<void*>(broadcaster.get()), broadcaster.GetName(), success); return success; }
bool SBListener::PeekAtNextEventForBroadcaster (const SBBroadcaster &broadcaster, SBEvent &event) { if (m_opaque_sp && broadcaster.IsValid()) { event.reset (m_opaque_sp->PeekAtNextEventForBroadcaster (broadcaster.get())); return event.IsValid(); } event.reset (NULL); return false; }
bool SBListener::PeekAtNextEventForBroadcasterWithType (const SBBroadcaster &broadcaster, uint32_t event_type_mask, SBEvent &event) { if (m_opaque_sp && broadcaster.IsValid()) { event.reset(m_opaque_sp->PeekAtNextEventForBroadcasterWithType (broadcaster.get(), event_type_mask)); return event.IsValid(); } event.reset (NULL); return false; }
SBBroadcaster SBCommandInterpreter::GetBroadcaster () { LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API)); SBBroadcaster broadcaster (m_opaque_ptr, false); if (log) log->Printf ("SBCommandInterpreter(%p)::GetBroadcaster() => SBBroadcaster(%p)", m_opaque_ptr, broadcaster.get()); return broadcaster; }
SBBroadcaster SBCommunication::GetBroadcaster () { SBBroadcaster broadcaster (m_opaque, false); LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API)); if (log) log->Printf ("SBCommunication(%p)::GetBroadcaster () => SBBroadcaster (%p)", m_opaque, broadcaster.get()); return broadcaster; }
bool SBListener::GetNextEventForBroadcaster (const SBBroadcaster &broadcaster, SBEvent &event) { if (m_opaque_sp && broadcaster.IsValid()) { EventSP event_sp; if (m_opaque_sp->GetNextEventForBroadcaster (broadcaster.get(), event_sp)) { event.reset (event_sp); return true; } } event.reset (NULL); return false; }
bool SBListener::GetNextEventForBroadcasterWithType ( const SBBroadcaster &broadcaster, uint32_t event_type_mask, SBEvent &event ) { if (m_opaque_ptr && broadcaster.IsValid()) { EventSP event_sp; if (m_opaque_ptr->GetNextEventForBroadcasterWithType (broadcaster.get(), event_type_mask, event_sp)) { event.reset (event_sp); return true; } } event.reset (NULL); return false; }