diff options
Diffstat (limited to 'src/event_to_string.cpp')
-rw-r--r-- | src/event_to_string.cpp | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/event_to_string.cpp b/src/event_to_string.cpp index 83455bf..503144c 100644 --- a/src/event_to_string.cpp +++ b/src/event_to_string.cpp @@ -16,6 +16,7 @@ #include "event_to_string.hpp" +#include "ClientType.hpp" #include "PatchageEvent.hpp" #include "warnings.hpp" @@ -34,6 +35,26 @@ struct EventPrinter { using result_type = std::string; ///< For boost::apply_visitor + std::string operator()(const ClientType type) + { + switch (type) { + case ClientType::jack: + return "JACK"; + case ClientType::alsa: + return "ALSA"; + } + } + + std::string operator()(const DriverAttachmentEvent& event) + { + return fmt::format("Attached to {}", (*this)(event.type)); + } + + std::string operator()(const DriverDetachmentEvent& event) + { + return fmt::format("Detached from {}", (*this)(event.type)); + } + std::string operator()(const ClientCreationEvent& event) { return fmt::format( |