myMPD
Internal API documentation
Loading...
Searching...
No Matches
lua_mympd_state.h
Go to the documentation of this file.
1/*
2 SPDX-License-Identifier: GPL-3.0-or-later
3 myMPD (c) 2018-2025 Juergen Mang <mail@jcgames.de>
4 https://github.com/jcorporation/mympd
5*/
6
11#ifndef MYMPD_LUA_MYMPD_STATE_H
12#define MYMPD_LUA_MYMPD_STATE_H
13
14#include "src/lib/list.h"
15#include "src/lib/mympd_state.h"
16
17#include <stdbool.h>
18
23 LUA_TYPE_STRING,
24 LUA_TYPE_INTEGER,
25 LUA_TYPE_NUMBER,
26 LUA_TYPE_BOOLEAN,
27 LUA_TYPE_MPD_SONG
28};
29
35 sds p;
36 int64_t i;
37 double f;
38 bool b;
39};
40
41bool mympd_api_status_lua_mympd_state_set(struct t_list *lua_partition_state, struct t_mympd_state *mympd_state,
42 struct t_partition_state *partition_state);
43void lua_mympd_state_set_p(struct t_list *lua_mympd_state, const char *k, const char *v);
44void lua_mympd_state_set_i(struct t_list *lua_mympd_state, const char *k, int64_t v);
45void lua_mympd_state_set_u(struct t_list *lua_mympd_state, const char *k, unsigned v);
46void lua_mympd_state_set_b(struct t_list *lua_mympd_state, const char *k, bool v);
47void lua_mympd_state_set_f(struct t_list *lua_mympd_state, const char *k, double v);
48void lua_mympd_state_set_mpd_song(struct t_list *lua_mympd_state, const char *k, const struct mpd_song *song);
49void lua_mympd_state_free(struct t_list *lua_mympd_state);
50void lua_mympd_state_free_void(void *lua_mympd_state);
51
52#endif
Linked list implementation.
bool mympd_api_status_lua_mympd_state_set(struct t_list *lua_partition_state, struct t_mympd_state *mympd_state, struct t_partition_state *partition_state)
Definition lua_mympd_state.c:39
lua_mympd_state_type
Definition lua_mympd_state.h:22
void lua_mympd_state_set_mpd_song(struct t_list *lua_mympd_state, const char *k, const struct mpd_song *song)
Definition lua_mympd_state.c:122
void lua_mympd_state_set_p(struct t_list *lua_mympd_state, const char *k, const char *v)
Definition lua_mympd_state.c:132
void lua_mympd_state_set_b(struct t_list *lua_mympd_state, const char *k, bool v)
Definition lua_mympd_state.c:180
void lua_mympd_state_free(struct t_list *lua_mympd_state)
Definition lua_mympd_state.c:190
void lua_mympd_state_set_f(struct t_list *lua_mympd_state, const char *k, double v)
Definition lua_mympd_state.c:156
void lua_mympd_state_set_u(struct t_list *lua_mympd_state, const char *k, unsigned v)
Definition lua_mympd_state.c:168
void lua_mympd_state_free_void(void *lua_mympd_state)
Definition lua_mympd_state.c:198
void lua_mympd_state_set_i(struct t_list *lua_mympd_state, const char *k, int64_t v)
Definition lua_mympd_state.c:144
Central myMPD state for the mympd_api thread.
Definition list.h:32
Definition lua_mympd_state.h:34
bool b
lua bool
Definition lua_mympd_state.h:38
int64_t i
lua number
Definition lua_mympd_state.h:36
sds p
lua string
Definition lua_mympd_state.h:35
double f
lua float
Definition lua_mympd_state.h:37
Definition mympd_state.h:215
Definition mympd_state.h:114