libmpdclient 2.22
message.h
Go to the documentation of this file.
1// SPDX-License-Identifier: BSD-2-Clause
2// Copyright The Music Player Daemon Project
3
10#ifndef MPD_MESSAGE_H
11#define MPD_MESSAGE_H
12
13#include "recv.h"
14#include "compiler.h"
15
16#include <stdbool.h>
17
18struct mpd_pair;
22struct mpd_message;
23struct mpd_connection;
24
25#ifdef __cplusplus
26extern "C" {
27#endif
28
38mpd_malloc
39struct mpd_message *
40mpd_message_begin(const struct mpd_pair *pair);
41
52bool
53mpd_message_feed(struct mpd_message *output, const struct mpd_pair *pair);
54
60void
62
68mpd_pure
69const char *
70mpd_message_get_channel(const struct mpd_message *message);
71
77mpd_pure
78const char *
79mpd_message_get_text(const struct mpd_message *message);
80
90bool
91mpd_send_subscribe(struct mpd_connection *connection, const char *channel);
92
102bool
103mpd_run_subscribe(struct mpd_connection *connection, const char *channel);
104
115bool
116mpd_send_unsubscribe(struct mpd_connection *connection, const char *channel);
117
127bool
128mpd_run_unsubscribe(struct mpd_connection *connection, const char *channel);
129
140bool
142 const char *channel, const char *text);
143
154bool
156 const char *channel, const char *text);
157
166bool
168
178mpd_malloc
179struct mpd_message *
181
190bool
192
205mpd_malloc
206static inline struct mpd_pair *
208{
209 return mpd_recv_pair_named(connection, "channel");
210}
211
212#ifdef __cplusplus
213}
214#endif
215
216#endif
bool mpd_send_send_message(struct mpd_connection *connection, const char *channel, const char *text)
const char * mpd_message_get_text(const struct mpd_message *message)
void mpd_message_free(struct mpd_message *message)
bool mpd_message_feed(struct mpd_message *output, const struct mpd_pair *pair)
bool mpd_send_channels(struct mpd_connection *connection)
static struct mpd_pair * mpd_recv_channel_pair(struct mpd_connection *connection)
Definition message.h:207
const char * mpd_message_get_channel(const struct mpd_message *message)
bool mpd_run_send_message(struct mpd_connection *connection, const char *channel, const char *text)
bool mpd_send_read_messages(struct mpd_connection *connection)
struct mpd_message * mpd_message_begin(const struct mpd_pair *pair)
bool mpd_send_subscribe(struct mpd_connection *connection, const char *channel)
struct mpd_message * mpd_recv_message(struct mpd_connection *connection)
bool mpd_run_unsubscribe(struct mpd_connection *connection, const char *channel)
bool mpd_send_unsubscribe(struct mpd_connection *connection, const char *channel)
bool mpd_run_subscribe(struct mpd_connection *connection, const char *channel)
MPD client library.
struct mpd_pair * mpd_recv_pair_named(struct mpd_connection *connection, const char *name)