-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathformat_structs.h
More file actions
47 lines (38 loc) · 869 Bytes
/
format_structs.h
File metadata and controls
47 lines (38 loc) · 869 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#pragma once
#define DEFAULT_FORMAT_STRING "Current Track (Vol %volume%%):\n -%status%-\n %artist% - %title%"
#define DEFAULT_STOPPED_STRING "-stopped-"
typedef enum {
FORMAT_PLAY, FORMAT_STOP, FORMAT_PAUSE
} FORMAT_TYPE;
typedef struct {
char* name;
void* action;
} MPD_TOKEN;
typedef struct FormatToken {
const MPD_TOKEN* type;
void* data;
struct FormatToken* next;
} FormatToken;
typedef struct DecisionToken {
char* name;
const MPD_TOKEN* type;
FormatToken* condition;
FormatToken* yes;
FormatToken* no;
struct DecisionToken* next;
} DecisionToken;
typedef struct {
char* play;
char* pause;
char* stop;
char* none;
char* off;
} TokenConfigItem;
typedef struct {
TokenConfigItem* repeat;
TokenConfigItem* random;
TokenConfigItem* dbupdate;
} TokenConfig;
#define TOKEN_TEXT 0
#define TOKEN_IF 1
extern const MPD_TOKEN MPD_FORMAT_TAGS[];