diff options
| author | Joel Klinghed <the_jk@spawned.biz> | 2025-10-10 10:01:01 +0200 |
|---|---|---|
| committer | Joel Klinghed <the_jk@spawned.biz> | 2025-10-19 00:13:47 +0200 |
| commit | dad0aaa9b33a5a217ac115334a94fe299dce9e08 (patch) | |
| tree | baeffb1e3ef6a6e100bc2f255581d77c4b9a45d3 /src/signals.hh | |
| parent | 86ec0b5386fc2078891a829026844d2ec21ea7db (diff) | |
Add bluetooth module
Can't really do anything yet, but finds the bluetooth adapter
and registers an agent to make it pairable.
Diffstat (limited to 'src/signals.hh')
| -rw-r--r-- | src/signals.hh | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/src/signals.hh b/src/signals.hh new file mode 100644 index 0000000..f387f9f --- /dev/null +++ b/src/signals.hh @@ -0,0 +1,33 @@ +#ifndef SIGNALS_HH +#define SIGNALS_HH + +#include <functional> +#include <memory> + +namespace looper { +class Looper; +} // namespace looper + +namespace signals { + +enum class Signal { + INT, + TERM, +}; + +class Handler { + public: + virtual ~Handler() = default; + + static std::unique_ptr<Handler> create(looper::Looper& looper, Signal signal, + std::function<void()> callback); + + protected: + Handler() = default; + Handler(Handler const&) = delete; + Handler& operator=(Handler const&) = delete; +}; + +} // namespace signals + +#endif // SIGNALS_HH |
