From 69cee4d57942ae2ecbd567ee6ed3ce89f774bb8c Mon Sep 17 00:00:00 2001 From: Nav Date: Tue, 22 Jun 2021 14:44:00 +0100 Subject: [PATCH] Removed EventRef alias for clarity --- src/Application.cpp | 6 +-- src/Application.hpp | 6 +-- src/DebugServers/DebugServer.cpp | 2 +- src/DebugServers/DebugServer.hpp | 2 +- src/DebugServers/GdbRsp/GdbRspDebugServer.cpp | 4 +- src/DebugServers/GdbRsp/GdbRspDebugServer.hpp | 4 +- src/EventManager/EventListener.hpp | 10 ++--- src/EventManager/Events/Events.hpp | 4 -- src/Insight/Insight.cpp | 9 ++-- src/Insight/Insight.hpp | 6 +-- src/Insight/InsightWorker.cpp | 23 +++++----- src/Insight/InsightWorker.hpp | 10 ++--- src/TargetController/TargetController.cpp | 42 +++++++++---------- src/TargetController/TargetController.hpp | 36 ++++++++-------- 14 files changed, 78 insertions(+), 86 deletions(-) diff --git a/src/Application.cpp b/src/Application.cpp index 2db0ae05..e6b61d84 100644 --- a/src/Application.cpp +++ b/src/Application.cpp @@ -323,19 +323,19 @@ void Application::stopDebugServer() { } } -void Application::onTargetControllerThreadStateChanged(EventRef event) { +void Application::onTargetControllerThreadStateChanged(const Events::TargetControllerThreadStateChanged& event) { if (event.getState() == ThreadState::STOPPED || event.getState() == ThreadState::SHUTDOWN_INITIATED) { // TargetController has unexpectedly shutdown - it must have encountered a fatal error. this->shutdown(); } } -void Application::onShutdownApplicationRequest(EventRef) { +void Application::onShutdownApplicationRequest(const Events::ShutdownApplication&) { Logger::debug("ShutdownApplication event received."); this->shutdown(); } -void Application::onDebugServerThreadStateChanged(EventRef event) { +void Application::onDebugServerThreadStateChanged(const Events::DebugServerThreadStateChanged& event) { if (event.getState() == ThreadState::STOPPED || event.getState() == ThreadState::SHUTDOWN_INITIATED) { // DebugServer has unexpectedly shutdown - it must have encountered a fatal error. this->shutdown(); diff --git a/src/Application.hpp b/src/Application.hpp index 1d4f821b..1f4a9b97 100644 --- a/src/Application.hpp +++ b/src/Application.hpp @@ -233,7 +233,7 @@ namespace Bloom * * @param event */ - void onTargetControllerThreadStateChanged(Events::EventRef event); + void onTargetControllerThreadStateChanged(const Events::TargetControllerThreadStateChanged& event); /** * Same goes for the DebugServer - it should never shutdown unless a shutdown request was issued. If it does, @@ -241,12 +241,12 @@ namespace Bloom * * @param event */ - void onDebugServerThreadStateChanged(Events::EventRef event); + void onDebugServerThreadStateChanged(const Events::DebugServerThreadStateChanged& event); /** * Triggers a shutdown of Bloom and all of its components. */ - void onShutdownApplicationRequest(Events::EventRef); + void onShutdownApplicationRequest(const Events::ShutdownApplication&); /** * Checks if the current effective user running Bloom has root privileges. diff --git a/src/DebugServers/DebugServer.cpp b/src/DebugServers/DebugServer.cpp index a33467c3..eb62b2ca 100644 --- a/src/DebugServers/DebugServer.cpp +++ b/src/DebugServers/DebugServer.cpp @@ -55,6 +55,6 @@ void DebugServer::shutdown() { this->eventManager.deregisterListener(this->eventListener->getId()); } -void DebugServer::onShutdownDebugServerEvent(EventRef event) { +void DebugServer::onShutdownDebugServerEvent(const Events::ShutdownDebugServer& event) { this->shutdown(); } diff --git a/src/DebugServers/DebugServer.hpp b/src/DebugServers/DebugServer.hpp index 46d700d5..2bc3be6b 100644 --- a/src/DebugServers/DebugServer.hpp +++ b/src/DebugServers/DebugServer.hpp @@ -59,7 +59,7 @@ namespace Bloom::DebugServers * * @param event */ - void onShutdownDebugServerEvent(Events::EventRef event); + void onShutdownDebugServerEvent(const Events::ShutdownDebugServer& event); protected: /** diff --git a/src/DebugServers/GdbRsp/GdbRspDebugServer.cpp b/src/DebugServers/GdbRsp/GdbRspDebugServer.cpp index 044f3ed0..92c304a6 100644 --- a/src/DebugServers/GdbRsp/GdbRspDebugServer.cpp +++ b/src/DebugServers/GdbRsp/GdbRspDebugServer.cpp @@ -201,7 +201,7 @@ void GdbRspDebugServer::waitForConnection() { } } -void GdbRspDebugServer::onTargetControllerStateReported(Events::EventRef event) { +void GdbRspDebugServer::onTargetControllerStateReported(const Events::TargetControllerStateReported& event) { if (event.state == TargetControllerState::SUSPENDED && this->clientConnection.has_value()) { Logger::warning("Terminating debug session - TargetController suspended unexpectedly"); this->closeClientConnection(); @@ -232,7 +232,7 @@ void GdbRspDebugServer::handleGdbPacket(CommandPacket& packet) { } } -void GdbRspDebugServer::onTargetExecutionStopped(EventRef) { +void GdbRspDebugServer::onTargetExecutionStopped(const Events::TargetExecutionStopped&) { if (this->clientConnection.has_value() && this->clientConnection->waitingForBreak) { this->clientConnection->writePacket(TargetStopped(Signal::TRAP)); this->clientConnection->waitingForBreak = false; diff --git a/src/DebugServers/GdbRsp/GdbRspDebugServer.hpp b/src/DebugServers/GdbRsp/GdbRspDebugServer.hpp index b193c593..ced78948 100644 --- a/src/DebugServers/GdbRsp/GdbRspDebugServer.hpp +++ b/src/DebugServers/GdbRsp/GdbRspDebugServer.hpp @@ -169,13 +169,13 @@ namespace Bloom::DebugServers::Gdb return "GDB Remote Serial Protocol DebugServer"; }; - void onTargetControllerStateReported(Events::EventRef event); + void onTargetControllerStateReported(const Events::TargetControllerStateReported& event); /** * If the GDB client is currently waiting for the target execution to stop, this event handler will issue * a "stop reply" packet to the client once the target execution stops. */ - void onTargetExecutionStopped(Events::EventRef); + void onTargetExecutionStopped(const Events::TargetExecutionStopped&); /** * Handles any other GDB command packet that has not been promoted to a more specific type. diff --git a/src/EventManager/EventListener.hpp b/src/EventManager/EventListener.hpp index 436b06bd..018a5c29 100644 --- a/src/EventManager/EventListener.hpp +++ b/src/EventManager/EventListener.hpp @@ -70,7 +70,7 @@ namespace Bloom * we perform a downcast before invoking the callback. See EventListener::registerCallbackForEventType() * for more) */ - SyncSafe>>> eventTypeToCallbacksMapping; + SyncSafe>>> eventTypeToCallbacksMapping; SyncSafe> registeredEventTypes; std::shared_ptr interruptEventNotifier = nullptr; @@ -110,12 +110,12 @@ namespace Bloom * @param callback */ template - void registerCallbackForEventType(std::function)> callback) { + void registerCallbackForEventType(std::function callback) { // We encapsulate the callback in a lambda to handle the downcasting. - std::function parentCallback = - [callback] (Events::GenericEventRef event) { + std::function parentCallback = + [callback] (const Events::Event& event) { // Downcast the event to the expected type - callback(dynamic_cast>(event)); + callback(dynamic_cast(event)); } ; diff --git a/src/EventManager/Events/Events.hpp b/src/EventManager/Events/Events.hpp index 4cef38f9..21bf733f 100644 --- a/src/EventManager/Events/Events.hpp +++ b/src/EventManager/Events/Events.hpp @@ -46,9 +46,5 @@ namespace Bloom::Events template using SharedEventPointer = std::shared_ptr; - template - using EventRef = const EventType&; - using SharedGenericEventPointer = SharedEventPointer; - using GenericEventRef = EventRef; } diff --git a/src/Insight/Insight.cpp b/src/Insight/Insight.cpp index 29905381..8437d06f 100644 --- a/src/Insight/Insight.cpp +++ b/src/Insight/Insight.cpp @@ -9,7 +9,6 @@ #include "src/Targets/TargetState.hpp" using namespace Bloom; -using namespace Bloom::Events; using namespace Bloom::Exceptions; void Insight::run() { @@ -38,11 +37,11 @@ void Insight::startup() { this->setThreadState(ThreadState::STARTING); this->eventManager.registerListener(this->eventListener); - this->eventListener->registerCallbackForEventType( + this->eventListener->registerCallbackForEventType( std::bind(&Insight::onShutdownApplicationEvent, this, std::placeholders::_1) ); - this->eventListener->registerCallbackForEventType( + this->eventListener->registerCallbackForEventType( std::bind(&Insight::onTargetControllerThreadStateChangedEvent, this, std::placeholders::_1) ); @@ -119,7 +118,7 @@ void Insight::shutdown() { this->setThreadState(ThreadState::STOPPED); } -void Insight::onShutdownApplicationEvent(EventRef) { +void Insight::onShutdownApplicationEvent(const Events::ShutdownApplication&) { /* * Once Insight shuts down, control of the main thread will be returned to Application::run(), which * will pickup the ShutdownApplication event and proceed with the shutdown. @@ -127,7 +126,7 @@ void Insight::onShutdownApplicationEvent(EventRef) { this->shutdown(); } -void Insight::onTargetControllerThreadStateChangedEvent(EventRef event) { +void Insight::onTargetControllerThreadStateChangedEvent(const Events::TargetControllerThreadStateChanged& event) { if (event.getState() == ThreadState::STOPPED) { // Something horrible has happened with the TargetController - Insight is useless without the TargetController this->shutdown(); diff --git a/src/Insight/Insight.hpp b/src/Insight/Insight.hpp index efa25726..8d90ff30 100644 --- a/src/Insight/Insight.hpp +++ b/src/Insight/Insight.hpp @@ -81,16 +81,14 @@ namespace Bloom * * @param event */ - void onShutdownApplicationEvent(Events::EventRef event); + void onShutdownApplicationEvent(const Events::ShutdownApplication& event); /** * If the something horrible was to happen and the TC dies unexpectedly, Insight will shutdown in response. * * @param event */ - void onTargetControllerThreadStateChangedEvent( - Events::EventRef event - ); + void onTargetControllerThreadStateChangedEvent(const Events::TargetControllerThreadStateChanged& event); /** * Dispatches any events currently in the queue. diff --git a/src/Insight/InsightWorker.cpp b/src/Insight/InsightWorker.cpp index c9c65d8d..083a4f6d 100644 --- a/src/Insight/InsightWorker.cpp +++ b/src/Insight/InsightWorker.cpp @@ -10,7 +10,6 @@ #include "src/Exceptions/InvalidConfig.hpp" using namespace Bloom; -using namespace Bloom::Events; using namespace Bloom::Exceptions; using Bloom::Targets::TargetState; @@ -19,23 +18,23 @@ void InsightWorker::startup() { Logger::debug("Starting InsightWorker thread"); this->eventManager.registerListener(this->eventListener); - this->eventListener->registerCallbackForEventType( + this->eventListener->registerCallbackForEventType( std::bind(&InsightWorker::onTargetControllerStateReported, this, std::placeholders::_1) ); - this->eventListener->registerCallbackForEventType( + this->eventListener->registerCallbackForEventType( std::bind(&InsightWorker::onTargetStoppedEvent, this, std::placeholders::_1) ); - this->eventListener->registerCallbackForEventType( + this->eventListener->registerCallbackForEventType( std::bind(&InsightWorker::onTargetResumedEvent, this, std::placeholders::_1) ); - this->eventListener->registerCallbackForEventType( + this->eventListener->registerCallbackForEventType( std::bind(&InsightWorker::onTargetPinStatesRetrievedEvent, this, std::placeholders::_1) ); - this->eventListener->registerCallbackForEventType( + this->eventListener->registerCallbackForEventType( std::bind(&InsightWorker::onTargetIoPortsUpdatedEvent, this, std::placeholders::_1) ); @@ -60,7 +59,7 @@ void InsightWorker::requestPinStateUpdate( this->targetControllerConsole.setPinState(variantId, pinDescriptor, pinState); } -void InsightWorker::onTargetStoppedEvent(EventRef event) { +void InsightWorker::onTargetStoppedEvent(const Events::TargetExecutionStopped& event) { /* * When we report a target halt to Insight, Insight will immediately seek more data from the target (such as GPIO * pin states). This can be problematic for cases where the target had halted due to a conditional breakpoint. @@ -82,7 +81,7 @@ void InsightWorker::onTargetStoppedEvent(EventRef event) * only way. It would be nice if the debug client gave us some form of indication of whether the breakpoint is a * conditional one. */ - auto resumedEvent = this->eventListener->waitForEvent( + auto resumedEvent = this->eventListener->waitForEvent( std::chrono::milliseconds(650) ); @@ -92,19 +91,19 @@ void InsightWorker::onTargetStoppedEvent(EventRef event) } } -void InsightWorker::onTargetResumedEvent(EventRef event) { +void InsightWorker::onTargetResumedEvent(const Events::TargetExecutionResumed& event) { emit this->targetStateUpdated(TargetState::RUNNING); } -void InsightWorker::onTargetPinStatesRetrievedEvent(EventRef event) { +void InsightWorker::onTargetPinStatesRetrievedEvent(const Events::TargetPinStatesRetrieved& event) { emit this->targetPinStatesUpdated(event.variantId, event.pinSatesByNumber); } -void InsightWorker::onTargetIoPortsUpdatedEvent(EventRef event) { +void InsightWorker::onTargetIoPortsUpdatedEvent(const Events::TargetIoPortsUpdated& event) { emit this->targetIoPortsUpdated(); } -void InsightWorker::onTargetControllerStateReported(EventRef event) { +void InsightWorker::onTargetControllerStateReported(const Events::TargetControllerStateReported& event) { if (this->lastTargetControllerState == TargetControllerState::ACTIVE && event.state == TargetControllerState::SUSPENDED ) { diff --git a/src/Insight/InsightWorker.hpp b/src/Insight/InsightWorker.hpp index a8408c84..f585f3b4 100644 --- a/src/Insight/InsightWorker.hpp +++ b/src/Insight/InsightWorker.hpp @@ -33,11 +33,11 @@ namespace Bloom QTimer* eventDispatchTimer = nullptr; - void onTargetStoppedEvent(Events::EventRef event); - void onTargetResumedEvent(Events::EventRef event); - void onTargetPinStatesRetrievedEvent(Events::EventRef event); - void onTargetIoPortsUpdatedEvent(Events::EventRef event); - void onTargetControllerStateReported(Events::EventRef event); + void onTargetStoppedEvent(const Events::TargetExecutionStopped& event); + void onTargetResumedEvent(const Events::TargetExecutionResumed& event); + void onTargetPinStatesRetrievedEvent(const Events::TargetPinStatesRetrieved& event); + void onTargetIoPortsUpdatedEvent(const Events::TargetIoPortsUpdated& event); + void onTargetControllerStateReported(const Events::TargetControllerStateReported& event); public: explicit InsightWorker(EventManager& eventManager): eventManager(eventManager) {}; diff --git a/src/TargetController/TargetController.cpp b/src/TargetController/TargetController.cpp index 6ce9b125..ea21b49e 100644 --- a/src/TargetController/TargetController.cpp +++ b/src/TargetController/TargetController.cpp @@ -360,17 +360,17 @@ void TargetController::emitErrorEvent(int correlationId) { this->eventManager.triggerEvent(errorEvent); } -void TargetController::onShutdownTargetControllerEvent(EventRef) { +void TargetController::onShutdownTargetControllerEvent(const Events::ShutdownTargetController&) { this->shutdown(); } -void TargetController::onStateReportRequest(EventRef event) { - auto stateEvent = std::make_shared(this->state); +void TargetController::onStateReportRequest(const Events::ReportTargetControllerState& event) { + auto stateEvent = std::make_shared(this->state); stateEvent->correlationId = event.id; this->eventManager.triggerEvent(stateEvent); } -void TargetController::onDebugSessionStartedEvent(EventRef) { +void TargetController::onDebugSessionStartedEvent(const Events::DebugSessionStarted&) { if (this->state == TargetControllerState::SUSPENDED) { Logger::debug("Waking TargetController"); @@ -385,7 +385,7 @@ void TargetController::onDebugSessionStartedEvent(EventRef) { +void TargetController::onDebugSessionFinishedEvent(const DebugSessionFinished&) { if (this->target->getState() != TargetState::RUNNING) { this->target->run(); this->fireTargetEvents(); @@ -396,7 +396,7 @@ void TargetController::onDebugSessionFinishedEvent(EventRef event) { +void TargetController::onExtractTargetDescriptor(const Events::ExtractTargetDescriptor& event) { if (!this->cachedTargetDescriptor.has_value()) { this->cachedTargetDescriptor = this->target->getDescriptor(); } @@ -408,13 +408,13 @@ void TargetController::onExtractTargetDescriptor(EventRefeventManager.triggerEvent(targetDescriptorExtracted); } -void TargetController::onStopTargetExecutionEvent(EventRef event) { +void TargetController::onStopTargetExecutionEvent(const Events::StopTargetExecution& event) { if (this->target->getState() != TargetState::STOPPED) { this->target->stop(); this->lastTargetState = TargetState::STOPPED; } - auto executionStoppedEvent = std::make_shared( + auto executionStoppedEvent = std::make_shared( this->target->getProgramCounter(), TargetBreakCause::UNKNOWN ); @@ -423,7 +423,7 @@ void TargetController::onStopTargetExecutionEvent(EventRefeventManager.triggerEvent(executionStoppedEvent); } -void TargetController::onStepTargetExecutionEvent(EventRef event) { +void TargetController::onStepTargetExecutionEvent(const Events::StepTargetExecution& event) { try { if (this->target->getState() != TargetState::STOPPED) { // We can't step the target if it's already running. @@ -437,7 +437,7 @@ void TargetController::onStepTargetExecutionEvent(EventReftarget->step(); this->lastTargetState = TargetState::RUNNING; - auto executionResumedEvent = std::make_shared(); + auto executionResumedEvent = std::make_shared(); executionResumedEvent->correlationId = event.id; this->eventManager.triggerEvent(executionResumedEvent); @@ -447,7 +447,7 @@ void TargetController::onStepTargetExecutionEvent(EventRef event) { +void TargetController::onResumeTargetExecutionEvent(const Events::ResumeTargetExecution& event) { try { if (this->target->getState() != TargetState::RUNNING) { if (event.fromProgramCounter.has_value()) { @@ -468,7 +468,7 @@ void TargetController::onResumeTargetExecutionEvent(EventRef event) { +void TargetController::onReadRegistersEvent(const Events::RetrieveRegistersFromTarget& event) { try { auto registers = this->target->readRegisters(event.descriptors); @@ -485,7 +485,7 @@ void TargetController::onReadRegistersEvent(EventRef event) { +void TargetController::onWriteRegistersEvent(const Events::WriteRegistersToTarget& event) { try { this->target->writeRegisters(event.registers); @@ -499,7 +499,7 @@ void TargetController::onWriteRegistersEvent(EventRef event) { +void TargetController::onReadMemoryEvent(const Events::RetrieveMemoryFromTarget& event) { try { auto memoryReadEvent = std::make_shared(); memoryReadEvent->correlationId = event.id; @@ -513,7 +513,7 @@ void TargetController::onReadMemoryEvent(EventRef event) { +void TargetController::onWriteMemoryEvent(const Events::WriteMemoryToTarget& event) { try { this->target->writeMemory(event.memoryType, event.startAddress, event.buffer); @@ -536,7 +536,7 @@ void TargetController::onWriteMemoryEvent(EventRef } } -void TargetController::onSetBreakpointEvent(EventRef event) { +void TargetController::onSetBreakpointEvent(const Events::SetBreakpointOnTarget& event) { try { this->target->setBreakpoint(event.breakpoint.address); auto breakpointSetEvent = std::make_shared(); @@ -550,7 +550,7 @@ void TargetController::onSetBreakpointEvent(EventRef event) { +void TargetController::onRemoveBreakpointEvent(const Events::RemoveBreakpointOnTarget& event) { try { this->target->removeBreakpoint(event.breakpoint.address); auto breakpointRemovedEvent = std::make_shared(); @@ -564,7 +564,7 @@ void TargetController::onRemoveBreakpointEvent(EventRef event) { +void TargetController::onSetProgramCounterEvent(const Events::SetProgramCounterOnTarget& event) { try { if (this->target->getState() != TargetState::STOPPED) { throw Exception("Invalid target state - target must be stopped before the program counter can be updated"); @@ -583,7 +583,7 @@ void TargetController::onSetProgramCounterEvent(EventRef event) { +void TargetController::onInsightStateChangedEvent(const Events::InsightThreadStateChanged& event) { if (event.getState() == ThreadState::READY) { /* * Insight has just started up. @@ -595,7 +595,7 @@ void TargetController::onInsightStateChangedEvent(EventRef event) { +void TargetController::onRetrieveTargetPinStatesEvent(const Events::RetrieveTargetPinStates& event) { try { if (this->target->getState() != TargetState::STOPPED) { throw Exception("Invalid target state - target must be stopped before pin states can be retrieved"); @@ -614,7 +614,7 @@ void TargetController::onRetrieveTargetPinStatesEvent(EventRef event) { +void TargetController::onSetPinStateEvent(const Events::SetTargetPinState& event) { try { if (this->target->getState() != TargetState::STOPPED) { throw Exception("Invalid target state - target must be stopped before pin state can be set"); diff --git a/src/TargetController/TargetController.hpp b/src/TargetController/TargetController.hpp index d3c42617..f053f2de 100644 --- a/src/TargetController/TargetController.hpp +++ b/src/TargetController/TargetController.hpp @@ -244,70 +244,70 @@ namespace Bloom * * @param event */ - void onStateReportRequest(Events::EventRef event); + void onStateReportRequest(const Events::ReportTargetControllerState& event); /** * Obtains a TargetDescriptor from the target and includes it in a TargetDescriptorExtracted event. * * @param event */ - void onExtractTargetDescriptor(Events::EventRef event); + void onExtractTargetDescriptor(const Events::ExtractTargetDescriptor& event); /** * Will attempt to stop execution on the target and emit a TargetExecutionStopped event. * * @param event */ - void onStopTargetExecutionEvent(Events::EventRef event); + void onStopTargetExecutionEvent(const Events::StopTargetExecution& event); /** * Will attempt to step execution on the target and emit a TargetExecutionResumed event. * * @param event */ - void onStepTargetExecutionEvent(Events::EventRef event); + void onStepTargetExecutionEvent(const Events::StepTargetExecution& event); /** * Will attempt to resume execution on the target and emit a TargetExecutionResumed event. * * @param event */ - void onResumeTargetExecutionEvent(Events::EventRef event); + void onResumeTargetExecutionEvent(const Events::ResumeTargetExecution& event); /** * Invokes a shutdown. * * @param event */ - void onShutdownTargetControllerEvent(Events::EventRef event); + void onShutdownTargetControllerEvent(const Events::ShutdownTargetController& event); /** * Will attempt to read the requested registers and emit a RegistersRetrievedFromTarget event. * * @param event */ - void onReadRegistersEvent(Events::EventRef event); + void onReadRegistersEvent(const Events::RetrieveRegistersFromTarget& event); /** * Will attempt to write the specified register values and emit a RegistersWrittenToTarget event. * * @param event */ - void onWriteRegistersEvent(Events::EventRef event); + void onWriteRegistersEvent(const Events::WriteRegistersToTarget& event); /** * Will attempt to read memory from the target and include the data in a MemoryRetrievedFromTarget event. * * @param event */ - void onReadMemoryEvent(Events::EventRef event); + void onReadMemoryEvent(const Events::RetrieveMemoryFromTarget& event); /** * Will attempt to write memory to the target. On success, a MemoryWrittenToTarget event is emitted. * * @param event */ - void onWriteMemoryEvent(Events::EventRef event); + void onWriteMemoryEvent(const Events::WriteMemoryToTarget& event); /** * Will attempt to set the specific breakpoint on the target. On success, the BreakpointSetOnTarget event will @@ -315,7 +315,7 @@ namespace Bloom * * @param event */ - void onSetBreakpointEvent(Events::EventRef event); + void onSetBreakpointEvent(const Events::SetBreakpointOnTarget& event); /** * Will attempt to remove a breakpoint at the specified address, on the target. On success, the @@ -323,21 +323,21 @@ namespace Bloom * * @param event */ - void onRemoveBreakpointEvent(Events::EventRef event); + void onRemoveBreakpointEvent(const Events::RemoveBreakpointOnTarget& event); /** * Will hold the target stopped at it's current state. * * @param event */ - void onDebugSessionStartedEvent(Events::EventRef event); + void onDebugSessionStartedEvent(const Events::DebugSessionStarted& event); /** * Will simply kick off execution on the target. * * @param event */ - void onDebugSessionFinishedEvent(Events::EventRef event); + void onDebugSessionFinishedEvent(const Events::DebugSessionFinished& event); /** * Will update the program counter value on the target. On success, a ProgramCounterSetOnTarget event is @@ -345,7 +345,7 @@ namespace Bloom * * @param event */ - void onSetProgramCounterEvent(Events::EventRef event); + void onSetProgramCounterEvent(const Events::SetProgramCounterOnTarget& event); /** * Will automatically fire a target state update event. @@ -353,14 +353,14 @@ namespace Bloom * * @param event */ - void onInsightStateChangedEvent(Events::EventRef event); + void onInsightStateChangedEvent(const Events::InsightThreadStateChanged& event); /** * Will attempt to obtain the pin states from the target. Will emit a TargetPinStatesRetrieved event on success. * * @param event */ - void onRetrieveTargetPinStatesEvent(Events::EventRef event); + void onRetrieveTargetPinStatesEvent(const Events::RetrieveTargetPinStates& event); /** * Will update a pin state for a particular pin. Will emit a TargetPinStatesRetrieved with the new pin @@ -368,6 +368,6 @@ namespace Bloom * * @param event */ - void onSetPinStateEvent(Events::EventRef event); + void onSetPinStateEvent(const Events::SetTargetPinState& event); }; }