parser.h
Go to the documentation of this file.
// SPDX-License-Identifier: BSD-2-Clause
// Copyright The Music Player Daemon Project
#ifndef LIBMPDCLIENT_PARSER_H
#define LIBMPDCLIENT_PARSER_H
#include "protocol.h"
#include "compiler.h"
#include <stdbool.h>
enum mpd_parser_result {
MPD_PARSER_MALFORMED,
MPD_PARSER_SUCCESS,
MPD_PARSER_ERROR,
MPD_PARSER_PAIR,
};
struct mpd_parser;
#ifdef __cplusplus
extern "C" {
#endif
mpd_malloc
struct mpd_parser *
mpd_parser_new(void);
void
mpd_parser_free(struct mpd_parser *parser);
enum mpd_parser_result
mpd_parser_feed(struct mpd_parser *parser, char *line);
mpd_pure
bool
mpd_parser_is_discrete(const struct mpd_parser *parser);
mpd_pure
enum mpd_server_error
mpd_parser_get_server_error(const struct mpd_parser *parser);
mpd_pure
unsigned
mpd_parser_get_at(const struct mpd_parser *parser);
mpd_pure
const char *
mpd_parser_get_message(const struct mpd_parser *parser);
mpd_pure
const char *
mpd_parser_get_name(const struct mpd_parser *parser);
mpd_pure
const char *
mpd_parser_get_value(const struct mpd_parser *parser);
#ifdef __cplusplus
}
#endif
#endif
mpd_parser_feed
enum mpd_parser_result mpd_parser_feed(struct mpd_parser *parser, char *line)
mpd_parser_get_name
const char * mpd_parser_get_name(const struct mpd_parser *parser)
mpd_parser_get_at
unsigned mpd_parser_get_at(const struct mpd_parser *parser)
mpd_parser_is_discrete
bool mpd_parser_is_discrete(const struct mpd_parser *parser)
mpd_parser_new
struct mpd_parser * mpd_parser_new(void)
mpd_parser_free
void mpd_parser_free(struct mpd_parser *parser)
mpd_parser_get_message
const char * mpd_parser_get_message(const struct mpd_parser *parser)
mpd_parser_get_value
const char * mpd_parser_get_value(const struct mpd_parser *parser)
mpd_parser_result
mpd_parser_result
Definition parser.h:12
MPD_PARSER_PAIR
@ MPD_PARSER_PAIR
Definition parser.h:34
MPD_PARSER_MALFORMED
@ MPD_PARSER_MALFORMED
Definition parser.h:16
MPD_PARSER_ERROR
@ MPD_PARSER_ERROR
Definition parser.h:28
MPD_PARSER_SUCCESS
@ MPD_PARSER_SUCCESS
Definition parser.h:22
mpd_parser_get_server_error
enum mpd_server_error mpd_parser_get_server_error(const struct mpd_parser *parser)
protocol.h
MPD client library.
mpd_server_error
mpd_server_error
Definition protocol.h:14
mpd_parser