11#ifndef MYMPD_JSONRPC_H
12#define MYMPD_JSONRPC_H
14#include "dist/sds/sds.h"
23 RESPONSE_TYPE_JSONRPC_RESPONSE = 0,
24 RESPONSE_TYPE_JSONRPC_NOTIFY,
33 JSONRPC_SEVERITY_EMERG = 0,
34 JSONRPC_SEVERITY_ALERT,
35 JSONRPC_SEVERITY_CRIT,
36 JSONRPC_SEVERITY_ERROR,
37 JSONRPC_SEVERITY_WARN,
38 JSONRPC_SEVERITY_NOTICE,
39 JSONRPC_SEVERITY_INFO,
40 JSONRPC_SEVERITY_DEBUG,
48 JSONRPC_FACILITY_DATABASE = 0,
49 JSONRPC_FACILITY_GENERAL,
50 JSONRPC_FACILITY_HOME,
51 JSONRPC_FACILITY_JUKEBOX,
52 JSONRPC_FACILITY_LYRICS,
54 JSONRPC_FACILITY_PLAYLIST,
55 JSONRPC_FACILITY_PLAYER,
56 JSONRPC_FACILITY_QUEUE,
57 JSONRPC_FACILITY_SESSION,
58 JSONRPC_FACILITY_SCRIPT,
59 JSONRPC_FACILITY_STICKER,
60 JSONRPC_FACILITY_TIMER,
61 JSONRPC_FACILITY_TRIGGER,
69 JSONRPC_EVENT_MPD_CONNECTED = 0,
70 JSONRPC_EVENT_MPD_DISCONNECTED,
72 JSONRPC_EVENT_UPDATE_DATABASE,
73 JSONRPC_EVENT_UPDATE_FINISHED,
74 JSONRPC_EVENT_UPDATE_HOME,
75 JSONRPC_EVENT_UPDATE_JUKEBOX,
76 JSONRPC_EVENT_UPDATE_LAST_PLAYED,
77 JSONRPC_EVENT_UPDATE_OPTIONS,
78 JSONRPC_EVENT_UPDATE_OUTPUTS,
79 JSONRPC_EVENT_UPDATE_QUEUE,
80 JSONRPC_EVENT_UPDATE_STARTED,
81 JSONRPC_EVENT_UPDATE_STATE,
82 JSONRPC_EVENT_UPDATE_STORED_PLAYLIST,
83 JSONRPC_EVENT_UPDATE_VOLUME,
84 JSONRPC_EVENT_WELCOME,
85 JSONRPC_EVENT_UPDATE_CACHE_STARTED,
86 JSONRPC_EVENT_UPDATE_CACHE_FINISHED,
jsonrpc_events
Definition json_rpc.h:68
sds jsonrpc_respond_with_message_or_error(sds buffer, enum mympd_cmd_ids cmd_id, unsigned request_id, bool rc, enum jsonrpc_facilities facility, const char *message, const char *error)
Definition json_rpc.c:285
sds jsonrpc_notify(sds buffer, enum jsonrpc_facilities facility, enum jsonrpc_severities severity, const char *message)
Definition json_rpc.c:158
jsonrpc_response_types
Definition json_rpc.h:22
void send_jsonrpc_event(enum jsonrpc_events event, const char *partition)
Definition json_rpc.c:129
sds jsonrpc_notify_phrase(sds buffer, enum jsonrpc_facilities facility, enum jsonrpc_severities severity, const char *message, int count,...)
Definition json_rpc.c:174
sds jsonrpc_respond_message(sds buffer, enum mympd_cmd_ids cmd_id, unsigned request_id, enum jsonrpc_facilities facility, enum jsonrpc_severities severity, const char *message)
Definition json_rpc.c:303
sds jsonrpc_respond_message_phrase(sds buffer, enum mympd_cmd_ids cmd_id, unsigned request_id, enum jsonrpc_facilities facility, enum jsonrpc_severities severity, const char *message, int count,...)
Definition json_rpc.c:323
sds jsonrpc_respond_with_ok_or_error(sds buffer, enum mympd_cmd_ids cmd_id, unsigned request_id, bool rc, enum jsonrpc_facilities facility, const char *error)
Definition json_rpc.c:267
sds jsonrpc_respond_start(sds buffer, enum mympd_cmd_ids cmd_id, unsigned request_id)
Definition json_rpc.c:228
sds jsonrpc_respond_ok(sds buffer, enum mympd_cmd_ids cmd_id, unsigned request_id, enum jsonrpc_facilities facility)
Definition json_rpc.c:253
jsonrpc_facilities
Definition json_rpc.h:47
void send_jsonrpc_notify(enum jsonrpc_facilities facility, enum jsonrpc_severities severity, const char *partition, const char *message)
Definition json_rpc.c:105
sds jsonrpc_notify_start(sds buffer, enum jsonrpc_events event)
Definition json_rpc.c:212
jsonrpc_severities
Definition json_rpc.h:32
sds jsonrpc_end(sds buffer)
Definition json_rpc.c:241
sds jsonrpc_event(sds buffer, enum jsonrpc_events event)
Definition json_rpc.c:141
void send_jsonrpc_notify_client(enum jsonrpc_facilities facility, enum jsonrpc_severities severity, unsigned request_id, const char *message)
Definition json_rpc.c:118
mympd_cmd_ids
Definition api.h:261