Skip to content
Snippets Groups Projects
Commit c1bece82 authored by Julian Bouzas's avatar Julian Bouzas
Browse files

core: add wp_core_export_object API

parent 4699946e
No related branches found
No related tags found
No related merge requests found
......@@ -545,6 +545,27 @@ wp_core_get_remote_state (WpCore * self, const gchar ** error)
return (WpRemoteState) pw_remote_get_state (self->pw_remote, error);
}
WpProxy *
wp_core_export_object (WpCore * self, guint32 interface_type,
gpointer local_object, WpProperties * properties)
{
struct pw_proxy *proxy = NULL;
guint32 type;
guint32 version;
g_return_val_if_fail (WP_IS_CORE (self), NULL);
g_return_val_if_fail (self->pw_remote, NULL);
proxy = pw_remote_export (self->pw_remote, interface_type,
properties ? wp_properties_to_pw_properties (properties) : NULL,
local_object, 0);
if (!proxy)
return NULL;
type = pw_proxy_get_type (proxy, &version);
return wp_proxy_new_wrap (self, proxy, type, version, NULL);
}
WpProxy *
wp_core_create_local_object (WpCore * self, const gchar *factory_name,
guint32 interface_type, guint32 interface_version,
......
......@@ -50,6 +50,8 @@ struct pw_remote * wp_core_get_pw_remote (WpCore * self);
gboolean wp_core_connect (WpCore * self);
WpRemoteState wp_core_get_remote_state (WpCore * self, const gchar ** error);
WpProxy * wp_core_export_object (WpCore * self, guint32 interface_type,
gpointer local_object, WpProperties * properties);
WpProxy * wp_core_create_local_object (WpCore * self,
const gchar *factory_name, guint32 interface_type,
guint32 interface_version, WpProperties * properties);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment