mirror of
https://gitlab.freedesktop.org/pipewire/wireplumber.git
synced 2026-02-03 13:50:27 +01:00
lua/api: add bindings for client:send_error()
This commit is contained in:
parent
5ce2dd3e66
commit
30407f9930
1 changed files with 12 additions and 0 deletions
|
|
@ -1117,8 +1117,20 @@ client_update_permissions (lua_State *L)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int
|
||||
client_send_error (lua_State *L)
|
||||
{
|
||||
WpClient *client = wplua_checkobject (L, 1, WP_TYPE_CLIENT);
|
||||
guint id = luaL_checkinteger (L, 2);
|
||||
int res = luaL_checkinteger (L, 3);
|
||||
const char *message = luaL_checkstring (L, 4);
|
||||
wp_client_send_error (client, id, res, message);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static const luaL_Reg client_methods[] = {
|
||||
{ "update_permissions", client_update_permissions },
|
||||
{ "send_error", client_send_error },
|
||||
{ NULL, NULL }
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue