mirror of
https://github.com/clangen/musikcube.git
synced 2024-11-19 20:13:36 +00:00
cleanup ugly initialization trick
This commit is contained in:
parent
1d73e5ed0e
commit
bca0d259b7
@ -2,6 +2,7 @@
|
|||||||
#include "mpris.h"
|
#include "mpris.h"
|
||||||
#include "dbus.h"
|
#include "dbus.h"
|
||||||
#include <map>
|
#include <map>
|
||||||
|
#include <vector>
|
||||||
#include <chrono>
|
#include <chrono>
|
||||||
#include <functional>
|
#include <functional>
|
||||||
|
|
||||||
@ -12,12 +13,7 @@ extern "C" {
|
|||||||
thread_local char localBuffer[4096];
|
thread_local char localBuffer[4096];
|
||||||
static MPRISRemote remote;
|
static MPRISRemote remote;
|
||||||
|
|
||||||
struct sd_null_term_str {
|
static const std::map<MPRISProperty, std::vector<const char*>> MPRISPropertyNames =
|
||||||
const char* string;
|
|
||||||
const char* terminator;
|
|
||||||
};
|
|
||||||
|
|
||||||
static const std::map<MPRISProperty, struct sd_null_term_str> MPRISPropertyNames =
|
|
||||||
{{MPRISProperty::Volume, {"Volume", NULL}},
|
{{MPRISProperty::Volume, {"Volume", NULL}},
|
||||||
{MPRISProperty::PlaybackStatus, {"PlaybackStatus", NULL}},
|
{MPRISProperty::PlaybackStatus, {"PlaybackStatus", NULL}},
|
||||||
{MPRISProperty::LoopStatus, {"LoopStatus", NULL}},
|
{MPRISProperty::LoopStatus, {"LoopStatus", NULL}},
|
||||||
|
Loading…
Reference in New Issue
Block a user