40 virtual void log(
LogLevel level, std::string_view message,
float fraction = 0.0f) = 0;
42 std::string_view value) = 0;
46 std::string_view value) = 0;
49 void printInfo (std::string_view message);
76 template<
typename... Args>
78 auto tmp =
tmpStrCat(std::forward<Args>(args)...);
81 template<
typename... Args>
83 auto tmp =
tmpStrCat(std::forward<Args>(args)...);
86 template<
typename... Args>
88 auto tmp =
tmpStrCat(std::forward<Args>(args)...);
93 [[nodiscard]]
static std::span<const std::string_view, NUM_LEVELS>
getLevelStrings() {
94 static constexpr std::array<std::string_view, NUM_LEVELS> levelStr = {
95 "info",
"warning",
"error",
"progress"
99 [[nodiscard]]
static std::span<const std::string_view, NUM_UPDATES>
getUpdateStrings() {
100 static constexpr std::array<std::string_view, NUM_UPDATES> updateStr = {
101 "led",
"setting",
"setting-info",
"hardware",
"plug",
102 "media",
"status",
"extension",
"sounddevice",
"connector",
void printInfo(std::string_view message)
virtual void updateFiltered(UpdateType type, std::string_view name, std::string_view value)=0
Same as update(), but checks that the value for type-name is the same as in the previous call.
virtual void log(LogLevel level, std::string_view message, float fraction=0.0f)=0
Log a message with a certain priority level.
void printProgress(std::string_view message, float fraction)
void printError(const char *message)
virtual void update(UpdateType type, std::string_view name, std::string_view value)=0
void printProgress(const char *message, float fraction)
void printInfo(Args &&...args)
void printError(std::string_view message)
static std::span< const std::string_view, NUM_LEVELS > getLevelStrings()
void printWarning(Args &&...args)
void printWarning(std::string_view message)
void printError(Args &&...args)
void printWarning(const char *message)
void printInfo(const char *message)
static std::span< const std::string_view, NUM_UPDATES > getUpdateStrings()
This file implemented 3 utility functions:
TemporaryString tmpStrCat(Ts &&... ts)