2022-03-27 18:32:13 +01:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
|
|
#include <string>
|
|
|
|
|
|
2022-03-31 16:05:39 +01:00
|
|
|
namespace Bloom::DebugServer
|
2022-03-27 18:32:13 +01:00
|
|
|
{
|
|
|
|
|
class ServerInterface
|
|
|
|
|
{
|
|
|
|
|
public:
|
|
|
|
|
/**
|
|
|
|
|
* Should return the name of the server.
|
|
|
|
|
*
|
|
|
|
|
* @return
|
|
|
|
|
*/
|
|
|
|
|
[[nodiscard]] virtual std::string getName() const = 0;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Called on startup of the DebugServerComponent. The server should implement any initialisation work here.
|
|
|
|
|
*/
|
|
|
|
|
virtual void init() = 0;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Called repeatedly in an infinite loop when the DebugServerComponent is running. The server should serve
|
|
|
|
|
* from here.
|
|
|
|
|
*
|
|
|
|
|
* This function should return when any blocking operation is interrupted via an EventNotifier instance.
|
|
|
|
|
*/
|
|
|
|
|
virtual void run() = 0;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Called on shutdown of the DebugServerComponent.
|
|
|
|
|
*/
|
|
|
|
|
virtual void close() = 0;
|
|
|
|
|
};
|
|
|
|
|
}
|