Consistency in application event handler naming
This commit is contained in:
@@ -73,7 +73,7 @@ void Application::startup() {
|
||||
auto applicationEventListener = this->applicationEventListener;
|
||||
this->eventManager.registerListener(applicationEventListener);
|
||||
applicationEventListener->registerCallbackForEventType<Events::ShutdownApplication>(
|
||||
std::bind(&Application::handleShutdownApplicationEvent, this, std::placeholders::_1)
|
||||
std::bind(&Application::onShutdownApplicationRequest, this, std::placeholders::_1)
|
||||
);
|
||||
|
||||
this->applicationConfig = this->extractConfig();
|
||||
@@ -107,7 +107,7 @@ void Application::startup() {
|
||||
}
|
||||
|
||||
applicationEventListener->registerCallbackForEventType<Events::TargetControllerStateChanged>(
|
||||
std::bind(&Application::handleTargetControllerStateChangedEvent, this, std::placeholders::_1)
|
||||
std::bind(&Application::onTargetControllerStateChanged, this, std::placeholders::_1)
|
||||
);
|
||||
|
||||
applicationEventListener->registerCallbackForEventType<Events::DebugServerStateChanged>(
|
||||
@@ -316,14 +316,14 @@ void Application::stopDebugServer() {
|
||||
}
|
||||
}
|
||||
|
||||
void Application::handleTargetControllerStateChangedEvent(EventPointer<Events::TargetControllerStateChanged> event) {
|
||||
void Application::onTargetControllerStateChanged(EventPointer<Events::TargetControllerStateChanged> 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::handleShutdownApplicationEvent(EventPointer<Events::ShutdownApplication>) {
|
||||
void Application::onShutdownApplicationRequest(EventPointer<Events::ShutdownApplication>) {
|
||||
Logger::debug("ShutdownApplication event received.");
|
||||
this->shutdown();
|
||||
}
|
||||
|
||||
@@ -228,7 +228,7 @@ namespace Bloom
|
||||
*
|
||||
* @param event
|
||||
*/
|
||||
void handleTargetControllerStateChangedEvent(EventPointer<Events::TargetControllerStateChanged> event);
|
||||
void onTargetControllerStateChanged(EventPointer<Events::TargetControllerStateChanged> event);
|
||||
|
||||
/**
|
||||
* Same goes for the DebugServer - it should never shutdown unless a shutdown request was issued. If it does,
|
||||
@@ -241,7 +241,7 @@ namespace Bloom
|
||||
/**
|
||||
* Triggers a shutdown of Bloom and all of its components.
|
||||
*/
|
||||
void handleShutdownApplicationEvent(EventPointer<Events::ShutdownApplication>);
|
||||
void onShutdownApplicationRequest(EventPointer<Events::ShutdownApplication>);
|
||||
|
||||
/**
|
||||
* Returns the path to the directory in which the Bloom binary resides.
|
||||
|
||||
Reference in New Issue
Block a user