mirror of
https://gitlab.freedesktop.org/pipewire/wireplumber.git
synced 2026-05-09 02:48:05 +02:00
client: add _send_error() method
This commit is contained in:
parent
03f14105cf
commit
079139f01d
2 changed files with 27 additions and 0 deletions
|
|
@ -110,6 +110,29 @@ wp_client_pw_object_mixin_priv_interface_init (
|
|||
wp_pw_object_mixin_priv_interface_info_init_no_params (iface, client, CLIENT);
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief Send an error to the client
|
||||
*
|
||||
* \ingroup wpclient
|
||||
* \param self the client
|
||||
* \param id the global id to report the error on
|
||||
* \param res an errno style error code
|
||||
* \param message the error message string
|
||||
*/
|
||||
void
|
||||
wp_client_send_error (WpClient * self, guint32 id, int res,
|
||||
const gchar * message)
|
||||
{
|
||||
struct pw_client *pwp;
|
||||
|
||||
g_return_if_fail (WP_IS_CLIENT (self));
|
||||
|
||||
pwp = (struct pw_client *) wp_proxy_get_pw_proxy (WP_PROXY (self));
|
||||
g_return_if_fail (pwp != NULL);
|
||||
|
||||
pw_client_error (pwp, id, res, message);
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief Update client's permissions on a list of objects.
|
||||
*
|
||||
|
|
|
|||
|
|
@ -23,6 +23,10 @@ struct pw_permission;
|
|||
WP_API
|
||||
G_DECLARE_FINAL_TYPE (WpClient, wp_client, WP, CLIENT, WpGlobalProxy)
|
||||
|
||||
WP_API
|
||||
void wp_client_send_error (WpClient * self, guint32 id, int res,
|
||||
const gchar * message);
|
||||
|
||||
WP_API
|
||||
void wp_client_update_permissions (WpClient * self, guint n_perm, ...);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue