1
Fork 0

feat(context): Add getter for connection state

This commit is contained in:
Lucas Schwiderski 2022-05-16 14:22:56 +02:00
parent 4e1b02e65f
commit d88abd87c6
Signed by: lucas
GPG key ID: AA12679AAA6DF4D8

View file

@ -63,6 +63,14 @@ int context_connect(lua_State*);
*/
int context_disconnect(lua_State*);
/** Returns the current connection state.
*
* @function Context:get_state
* @treturn number
*/
int context_get_state(lua_State*);
/** Sets the default sink.
*
* @function Context:set_default_sink
@ -452,6 +460,7 @@ static const struct luaL_Reg context_mt[] = {
static const struct luaL_Reg context_f[] = {
{"connect", context_connect },
{ "disconnect", context_disconnect },
{ "get_state", context_get_state },
{ "set_default_sink", context_set_default_sink },
{ "set_default_source", context_set_default_source },
{ "get_server_info", context_get_server_info },