libmpdclient 2.22
async.h
Go to the documentation of this file.
1// SPDX-License-Identifier: BSD-2-Clause
2// Copyright The Music Player Daemon Project
3
16#ifndef MPD_ASYNC_H
17#define MPD_ASYNC_H
18
19#include "error.h"
20#include "compiler.h"
21
22#include <stdbool.h>
23#include <stdarg.h>
24#include <stddef.h>
25
32
35
38
41};
42
49struct mpd_async;
50
51#ifdef __cplusplus
52extern "C" {
53#endif
54
62mpd_malloc
63struct mpd_async *
65
69void
71
76mpd_pure
77enum mpd_error
78mpd_async_get_error(const struct mpd_async *async);
79
91mpd_pure
92const char *
94
102mpd_pure
103int
105
112mpd_pure
113int
114mpd_async_get_fd(const struct mpd_async *async);
115
131bool
133 bool keepalive);
134
138mpd_pure
140mpd_async_events(const struct mpd_async *async);
141
149bool
150mpd_async_io(struct mpd_async *async, enum mpd_async_event events);
151
162bool
163mpd_async_send_command_v(struct mpd_async *async, const char *command,
164 va_list args);
165
175mpd_sentinel
176bool
177mpd_async_send_command(struct mpd_async *async, const char *command, ...);
178
189mpd_malloc
190char *
192
205size_t
206mpd_async_recv_raw(struct mpd_async *async, void *dest, size_t length);
207
208#ifdef __cplusplus
209}
210#endif
211
212#endif
const char * mpd_async_get_error_message(const struct mpd_async *async)
bool mpd_async_io(struct mpd_async *async, enum mpd_async_event events)
int mpd_async_get_fd(const struct mpd_async *async)
void mpd_async_free(struct mpd_async *async)
int mpd_async_get_system_error(const struct mpd_async *async)
enum mpd_error mpd_async_get_error(const struct mpd_async *async)
mpd_sentinel bool mpd_async_send_command(struct mpd_async *async, const char *command,...)
char * mpd_async_recv_line(struct mpd_async *async)
bool mpd_async_send_command_v(struct mpd_async *async, const char *command, va_list args)
struct mpd_async * mpd_async_new(int fd)
enum mpd_async_event mpd_async_events(const struct mpd_async *async)
bool mpd_async_set_keepalive(struct mpd_async *async, bool keepalive)
mpd_async_event
Definition async.h:29
@ MPD_ASYNC_EVENT_ERROR
Definition async.h:40
@ MPD_ASYNC_EVENT_READ
Definition async.h:31
@ MPD_ASYNC_EVENT_HUP
Definition async.h:37
@ MPD_ASYNC_EVENT_WRITE
Definition async.h:34
size_t mpd_async_recv_raw(struct mpd_async *async, void *dest, size_t length)
MPD client library.
mpd_error
Definition error.h:14