lib: drop the proxy- prefix from client, device, link, port & node

This commit is contained in:
George Kiagiadakis 2020-01-22 18:54:45 +02:00
parent 5c47f1df2c
commit c671b0faca
28 changed files with 264 additions and 266 deletions

View file

@ -6,12 +6,12 @@
* SPDX-License-Identifier: MIT
*/
#include "proxy-client.h"
#include "client.h"
#include "private.h"
#include <pipewire/pipewire.h>
struct _WpProxyClient
struct _WpClient
{
WpProxy parent;
struct pw_client_info *info;
@ -20,39 +20,39 @@ struct _WpProxyClient
struct spa_hook listener;
};
G_DEFINE_TYPE (WpProxyClient, wp_proxy_client, WP_TYPE_PROXY)
G_DEFINE_TYPE (WpClient, wp_client, WP_TYPE_PROXY)
static void
wp_proxy_client_init (WpProxyClient * self)
wp_client_init (WpClient * self)
{
}
static void
wp_proxy_client_finalize (GObject * object)
wp_client_finalize (GObject * object)
{
WpProxyClient *self = WP_PROXY_CLIENT (object);
WpClient *self = WP_CLIENT (object);
g_clear_pointer (&self->info, pw_client_info_free);
G_OBJECT_CLASS (wp_proxy_client_parent_class)->finalize (object);
G_OBJECT_CLASS (wp_client_parent_class)->finalize (object);
}
static gconstpointer
wp_proxy_client_get_info (WpProxy * self)
wp_client_get_info (WpProxy * self)
{
return WP_PROXY_CLIENT (self)->info;
return WP_CLIENT (self)->info;
}
WpProperties *
wp_proxy_client_get_properties (WpProxy * self)
wp_client_get_properties (WpProxy * self)
{
return wp_properties_new_wrap_dict (WP_PROXY_CLIENT (self)->info->props);
return wp_properties_new_wrap_dict (WP_CLIENT (self)->info->props);
}
static void
client_event_info(void *data, const struct pw_client_info *info)
{
WpProxyClient *self = WP_PROXY_CLIENT (data);
WpClient *self = WP_CLIENT (data);
self->info = pw_client_info_update (self->info, info);
g_object_notify (G_OBJECT (self), "info");
@ -69,30 +69,29 @@ static const struct pw_client_events client_events = {
};
static void
wp_proxy_client_pw_proxy_created (WpProxy * proxy, struct pw_proxy * pw_proxy)
wp_client_pw_proxy_created (WpProxy * proxy, struct pw_proxy * pw_proxy)
{
WpProxyClient *self = WP_PROXY_CLIENT (proxy);
WpClient *self = WP_CLIENT (proxy);
pw_client_add_listener ((struct pw_client *) pw_proxy,
&self->listener, &client_events, self);
}
static void
wp_proxy_client_class_init (WpProxyClientClass * klass)
wp_client_class_init (WpClientClass * klass)
{
GObjectClass *object_class = (GObjectClass *) klass;
WpProxyClass *proxy_class = (WpProxyClass *) klass;
object_class->finalize = wp_proxy_client_finalize;
object_class->finalize = wp_client_finalize;
proxy_class->get_info = wp_proxy_client_get_info;
proxy_class->get_properties = wp_proxy_client_get_properties;
proxy_class->get_info = wp_client_get_info;
proxy_class->get_properties = wp_client_get_properties;
proxy_class->pw_proxy_created = wp_proxy_client_pw_proxy_created;
proxy_class->pw_proxy_created = wp_client_pw_proxy_created;
}
void
wp_proxy_client_update_permissions (WpProxyClient * self,
guint n_perm, ...)
wp_client_update_permissions (WpClient * self, guint n_perm, ...)
{
va_list args;
struct pw_permission *perm =
@ -105,17 +104,17 @@ wp_proxy_client_update_permissions (WpProxyClient * self,
}
va_end (args);
wp_proxy_client_update_permissions_array (self, n_perm, perm);
wp_client_update_permissions_array (self, n_perm, perm);
}
void
wp_proxy_client_update_permissions_array (WpProxyClient * self,
wp_client_update_permissions_array (WpClient * self,
guint n_perm, const struct pw_permission *permissions)
{
struct pw_client *pwp;
int client_update_permissions_result;
g_return_if_fail (WP_IS_PROXY_CLIENT (self));
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);

31
lib/wp/client.h Normal file
View file

@ -0,0 +1,31 @@
/* WirePlumber
*
* Copyright © 2019 Collabora Ltd.
* @author George Kiagiadakis <george.kiagiadakis@collabora.com>
*
* SPDX-License-Identifier: MIT
*/
#ifndef __WIREPLUMBER_CLIENT_H__
#define __WIREPLUMBER_CLIENT_H__
#include "proxy.h"
G_BEGIN_DECLS
struct pw_permission;
#define WP_TYPE_CLIENT (wp_client_get_type ())
WP_API
G_DECLARE_FINAL_TYPE (WpClient, wp_client, WP, CLIENT, WpProxy)
WP_API
void wp_client_update_permissions (WpClient * self, guint n_perm, ...);
WP_API
void wp_client_update_permissions_array (WpClient * self,
guint n_perm, const struct pw_permission *permissions);
G_END_DECLS
#endif

View file

@ -6,12 +6,12 @@
* SPDX-License-Identifier: MIT
*/
#include "proxy-device.h"
#include "device.h"
#include "private.h"
#include <pipewire/pipewire.h>
struct _WpProxyDevice
struct _WpDevice
{
WpProxy parent;
struct pw_device_info *info;
@ -20,37 +20,37 @@ struct _WpProxyDevice
struct spa_hook listener;
};
G_DEFINE_TYPE (WpProxyDevice, wp_proxy_device, WP_TYPE_PROXY)
G_DEFINE_TYPE (WpDevice, wp_device, WP_TYPE_PROXY)
static void
wp_proxy_device_init (WpProxyDevice * self)
wp_device_init (WpDevice * self)
{
}
static void
wp_proxy_device_finalize (GObject * object)
wp_device_finalize (GObject * object)
{
WpProxyDevice *self = WP_PROXY_DEVICE (object);
WpDevice *self = WP_DEVICE (object);
g_clear_pointer (&self->info, pw_device_info_free);
G_OBJECT_CLASS (wp_proxy_device_parent_class)->finalize (object);
G_OBJECT_CLASS (wp_device_parent_class)->finalize (object);
}
static gconstpointer
wp_proxy_device_get_info (WpProxy * self)
wp_device_get_info (WpProxy * self)
{
return WP_PROXY_DEVICE (self)->info;
return WP_DEVICE (self)->info;
}
static WpProperties *
wp_proxy_device_get_properties (WpProxy * self)
wp_device_get_properties (WpProxy * self)
{
return wp_properties_new_wrap_dict (WP_PROXY_DEVICE (self)->info->props);
return wp_properties_new_wrap_dict (WP_DEVICE (self)->info->props);
}
static gint
wp_proxy_device_enum_params (WpProxy * self, guint32 id, guint32 start,
wp_device_enum_params (WpProxy * self, guint32 id, guint32 start,
guint32 num, const struct spa_pod *filter)
{
struct pw_device *pwp;
@ -65,7 +65,7 @@ wp_proxy_device_enum_params (WpProxy * self, guint32 id, guint32 start,
}
static gint
wp_proxy_device_set_param (WpProxy * self, guint32 id, guint32 flags,
wp_device_set_param (WpProxy * self, guint32 id, guint32 flags,
const struct spa_pod *param)
{
struct pw_device *pwp;
@ -81,7 +81,7 @@ wp_proxy_device_set_param (WpProxy * self, guint32 id, guint32 flags,
static void
device_event_info(void *data, const struct pw_device_info *info)
{
WpProxyDevice *self = WP_PROXY_DEVICE (data);
WpDevice *self = WP_DEVICE (data);
self->info = pw_device_info_update (self->info, info);
g_object_notify (G_OBJECT (self), "info");
@ -99,25 +99,25 @@ static const struct pw_device_events device_events = {
};
static void
wp_proxy_device_pw_proxy_created (WpProxy * proxy, struct pw_proxy * pw_proxy)
wp_device_pw_proxy_created (WpProxy * proxy, struct pw_proxy * pw_proxy)
{
WpProxyDevice *self = WP_PROXY_DEVICE (proxy);
WpDevice *self = WP_DEVICE (proxy);
pw_device_add_listener ((struct pw_device *) pw_proxy,
&self->listener, &device_events, self);
}
static void
wp_proxy_device_class_init (WpProxyDeviceClass * klass)
wp_device_class_init (WpDeviceClass * klass)
{
GObjectClass *object_class = (GObjectClass *) klass;
WpProxyClass *proxy_class = (WpProxyClass *) klass;
object_class->finalize = wp_proxy_device_finalize;
object_class->finalize = wp_device_finalize;
proxy_class->get_info = wp_proxy_device_get_info;
proxy_class->get_properties = wp_proxy_device_get_properties;
proxy_class->enum_params = wp_proxy_device_enum_params;
proxy_class->set_param = wp_proxy_device_set_param;
proxy_class->get_info = wp_device_get_info;
proxy_class->get_properties = wp_device_get_properties;
proxy_class->enum_params = wp_device_enum_params;
proxy_class->set_param = wp_device_set_param;
proxy_class->pw_proxy_created = wp_proxy_device_pw_proxy_created;
proxy_class->pw_proxy_created = wp_device_pw_proxy_created;
}

View file

@ -6,16 +6,16 @@
* SPDX-License-Identifier: MIT
*/
#ifndef __WIREPLUMBER_PROXY_LINK_H__
#define __WIREPLUMBER_PROXY_LINK_H__
#ifndef __WIREPLUMBER_DEVICE_H__
#define __WIREPLUMBER_DEVICE_H__
#include "proxy.h"
G_BEGIN_DECLS
#define WP_TYPE_PROXY_LINK (wp_proxy_link_get_type ())
#define WP_TYPE_DEVICE (wp_device_get_type ())
WP_API
G_DECLARE_FINAL_TYPE (WpProxyLink, wp_proxy_link, WP, PROXY_LINK, WpProxy)
G_DECLARE_FINAL_TYPE (WpDevice, wp_device, WP, DEVICE, WpProxy)
G_END_DECLS

View file

@ -6,12 +6,12 @@
* SPDX-License-Identifier: MIT
*/
#include "proxy-link.h"
#include "link.h"
#include "private.h"
#include <pipewire/pipewire.h>
struct _WpProxyLink
struct _WpLink
{
WpProxy parent;
struct pw_link_info *info;
@ -20,39 +20,39 @@ struct _WpProxyLink
struct spa_hook listener;
};
G_DEFINE_TYPE (WpProxyLink, wp_proxy_link, WP_TYPE_PROXY)
G_DEFINE_TYPE (WpLink, wp_link, WP_TYPE_PROXY)
static void
wp_proxy_link_init (WpProxyLink * self)
wp_link_init (WpLink * self)
{
}
static void
wp_proxy_link_finalize (GObject * object)
wp_link_finalize (GObject * object)
{
WpProxyLink *self = WP_PROXY_LINK (object);
WpLink *self = WP_LINK (object);
g_clear_pointer (&self->info, pw_link_info_free);
G_OBJECT_CLASS (wp_proxy_link_parent_class)->finalize (object);
G_OBJECT_CLASS (wp_link_parent_class)->finalize (object);
}
static gconstpointer
wp_proxy_link_get_info (WpProxy * self)
wp_link_get_info (WpProxy * self)
{
return WP_PROXY_LINK (self)->info;
return WP_LINK (self)->info;
}
static WpProperties *
wp_proxy_link_get_properties (WpProxy * self)
wp_link_get_properties (WpProxy * self)
{
return wp_properties_new_wrap_dict (WP_PROXY_LINK (self)->info->props);
return wp_properties_new_wrap_dict (WP_LINK (self)->info->props);
}
static void
link_event_info(void *data, const struct pw_link_info *info)
{
WpProxyLink *self = WP_PROXY_LINK (data);
WpLink *self = WP_LINK (data);
self->info = pw_link_info_update (self->info, info);
g_object_notify (G_OBJECT (self), "info");
@ -69,23 +69,23 @@ static const struct pw_link_events link_events = {
};
static void
wp_proxy_link_pw_proxy_created (WpProxy * proxy, struct pw_proxy * pw_proxy)
wp_link_pw_proxy_created (WpProxy * proxy, struct pw_proxy * pw_proxy)
{
WpProxyLink *self = WP_PROXY_LINK (proxy);
WpLink *self = WP_LINK (proxy);
pw_link_add_listener ((struct pw_link *) pw_proxy,
&self->listener, &link_events, self);
}
static void
wp_proxy_link_class_init (WpProxyLinkClass * klass)
wp_link_class_init (WpLinkClass * klass)
{
GObjectClass *object_class = (GObjectClass *) klass;
WpProxyClass *proxy_class = (WpProxyClass *) klass;
object_class->finalize = wp_proxy_link_finalize;
object_class->finalize = wp_link_finalize;
proxy_class->get_info = wp_proxy_link_get_info;
proxy_class->get_properties = wp_proxy_link_get_properties;
proxy_class->get_info = wp_link_get_info;
proxy_class->get_properties = wp_link_get_properties;
proxy_class->pw_proxy_created = wp_proxy_link_pw_proxy_created;
proxy_class->pw_proxy_created = wp_link_pw_proxy_created;
}

View file

@ -6,16 +6,16 @@
* SPDX-License-Identifier: MIT
*/
#ifndef __WIREPLUMBER_PROXY_PORT_H__
#define __WIREPLUMBER_PROXY_PORT_H__
#ifndef __WIREPLUMBER_LINK_H__
#define __WIREPLUMBER_LINK_H__
#include "proxy.h"
G_BEGIN_DECLS
#define WP_TYPE_PROXY_PORT (wp_proxy_port_get_type ())
#define WP_TYPE_LINK (wp_link_get_type ())
WP_API
G_DECLARE_FINAL_TYPE (WpProxyPort, wp_proxy_port, WP, PROXY_PORT, WpProxy)
G_DECLARE_FINAL_TYPE (WpLink, wp_link, WP, LINK, WpProxy)
G_END_DECLS

View file

@ -1,46 +1,46 @@
wp_lib_sources = files(
'base-endpoint.c',
'client.c',
'configuration.c',
'core.c',
'device.c',
'endpoint.c',
'error.c',
'exported.c',
'factory.c',
'link.c',
'module.c',
'monitor.c',
'node.c',
'object-manager.c',
'policy.c',
'port.c',
'properties.c',
'proxy.c',
'proxy-client.c',
'proxy-device.c',
'proxy-link.c',
'proxy-node.c',
'proxy-port.c',
'session.c',
'spa-props.c',
)
wp_lib_headers = files(
'base-endpoint.h',
'client.h',
'configuration.h',
'core.h',
'defs.h',
'device.h',
'endpoint.h',
'error.h',
'exported.h',
'factory.h',
'link.h',
'module.h',
'monitor.h',
'node.h',
'object-manager.h',
'policy.h',
'port.h',
'properties.h',
'proxy.h',
'proxy-client.h',
'proxy-device.h',
'proxy-node.h',
'proxy-port.h',
'proxy-link.h',
'session.h',
'wp.h',
)

View file

@ -12,8 +12,8 @@
#include <spa/utils/result.h>
#include <pipewire/pipewire.h>
#include "proxy-node.h"
#include "proxy-device.h"
#include "node.h"
#include "device.h"
#include "monitor.h"
#include "error.h"
#include "wpenums.h"
@ -264,7 +264,7 @@ node_new (struct object *dev, uint32_t id,
node = g_slice_new0 (struct object);
node->self = self;
node->id = id;
node->type = WP_TYPE_PROXY_NODE;
node->type = WP_TYPE_NODE;
node->proxy = g_steal_pointer (&proxy);
return node;
@ -329,7 +329,7 @@ device_new (WpMonitor *self, uint32_t id, const gchar *factory_name,
dev = g_slice_new0 (struct object);
dev->self = self;
dev->id = id;
dev->type = WP_TYPE_PROXY_DEVICE;
dev->type = WP_TYPE_DEVICE;
dev->spa_obj = g_steal_pointer (&spa_dev);
dev->properties = g_steal_pointer (&props);
dev->proxy = g_steal_pointer (&proxy);

View file

@ -6,12 +6,12 @@
* SPDX-License-Identifier: MIT
*/
#include "proxy-node.h"
#include "node.h"
#include "private.h"
#include <pipewire/pipewire.h>
struct _WpProxyNode
struct _WpNode
{
WpProxy parent;
struct pw_node_info *info;
@ -20,37 +20,37 @@ struct _WpProxyNode
struct spa_hook listener;
};
G_DEFINE_TYPE (WpProxyNode, wp_proxy_node, WP_TYPE_PROXY)
G_DEFINE_TYPE (WpNode, wp_node, WP_TYPE_PROXY)
static void
wp_proxy_node_init (WpProxyNode * self)
wp_node_init (WpNode * self)
{
}
static void
wp_proxy_node_finalize (GObject * object)
wp_node_finalize (GObject * object)
{
WpProxyNode *self = WP_PROXY_NODE (object);
WpNode *self = WP_NODE (object);
g_clear_pointer (&self->info, pw_node_info_free);
G_OBJECT_CLASS (wp_proxy_node_parent_class)->finalize (object);
G_OBJECT_CLASS (wp_node_parent_class)->finalize (object);
}
static gconstpointer
wp_proxy_node_get_info (WpProxy * self)
wp_node_get_info (WpProxy * self)
{
return WP_PROXY_NODE (self)->info;
return WP_NODE (self)->info;
}
static WpProperties *
wp_proxy_node_get_properties (WpProxy * self)
wp_node_get_properties (WpProxy * self)
{
return wp_properties_new_wrap_dict (WP_PROXY_NODE (self)->info->props);
return wp_properties_new_wrap_dict (WP_NODE (self)->info->props);
}
static gint
wp_proxy_node_enum_params (WpProxy * self, guint32 id, guint32 start,
wp_node_enum_params (WpProxy * self, guint32 id, guint32 start,
guint32 num, const struct spa_pod *filter)
{
struct pw_node *pwp;
@ -64,7 +64,7 @@ wp_proxy_node_enum_params (WpProxy * self, guint32 id, guint32 start,
}
static gint
wp_proxy_node_subscribe_params (WpProxy * self, guint32 n_ids, guint32 *ids)
wp_node_subscribe_params (WpProxy * self, guint32 n_ids, guint32 *ids)
{
struct pw_node *pwp;
int node_subscribe_params_result;
@ -77,7 +77,7 @@ wp_proxy_node_subscribe_params (WpProxy * self, guint32 n_ids, guint32 *ids)
}
static gint
wp_proxy_node_set_param (WpProxy * self, guint32 id, guint32 flags,
wp_node_set_param (WpProxy * self, guint32 id, guint32 flags,
const struct spa_pod *param)
{
struct pw_node *pwp;
@ -93,7 +93,7 @@ wp_proxy_node_set_param (WpProxy * self, guint32 id, guint32 flags,
static void
node_event_info(void *data, const struct pw_node_info *info)
{
WpProxyNode *self = WP_PROXY_NODE (data);
WpNode *self = WP_NODE (data);
self->info = pw_node_info_update (self->info, info);
g_object_notify (G_OBJECT (self), "info");
@ -111,26 +111,26 @@ static const struct pw_node_events node_events = {
};
static void
wp_proxy_node_pw_proxy_created (WpProxy * proxy, struct pw_proxy * pw_proxy)
wp_node_pw_proxy_created (WpProxy * proxy, struct pw_proxy * pw_proxy)
{
WpProxyNode *self = WP_PROXY_NODE (proxy);
WpNode *self = WP_NODE (proxy);
pw_node_add_listener ((struct pw_node *) pw_proxy,
&self->listener, &node_events, self);
}
static void
wp_proxy_node_class_init (WpProxyNodeClass * klass)
wp_node_class_init (WpNodeClass * klass)
{
GObjectClass *object_class = (GObjectClass *) klass;
WpProxyClass *proxy_class = (WpProxyClass *) klass;
object_class->finalize = wp_proxy_node_finalize;
object_class->finalize = wp_node_finalize;
proxy_class->get_info = wp_proxy_node_get_info;
proxy_class->get_properties = wp_proxy_node_get_properties;
proxy_class->enum_params = wp_proxy_node_enum_params;
proxy_class->subscribe_params = wp_proxy_node_subscribe_params;
proxy_class->set_param = wp_proxy_node_set_param;
proxy_class->get_info = wp_node_get_info;
proxy_class->get_properties = wp_node_get_properties;
proxy_class->enum_params = wp_node_enum_params;
proxy_class->subscribe_params = wp_node_subscribe_params;
proxy_class->set_param = wp_node_set_param;
proxy_class->pw_proxy_created = wp_proxy_node_pw_proxy_created;
proxy_class->pw_proxy_created = wp_node_pw_proxy_created;
}

View file

@ -6,16 +6,16 @@
* SPDX-License-Identifier: MIT
*/
#ifndef __WIREPLUMBER_PROXY_NODE_H__
#define __WIREPLUMBER_PROXY_NODE_H__
#ifndef __WIREPLUMBER_NODE_H__
#define __WIREPLUMBER_NODE_H__
#include "proxy.h"
G_BEGIN_DECLS
#define WP_TYPE_PROXY_NODE (wp_proxy_node_get_type ())
#define WP_TYPE_NODE (wp_node_get_type ())
WP_API
G_DECLARE_FINAL_TYPE (WpProxyNode, wp_proxy_node, WP, PROXY_NODE, WpProxy)
G_DECLARE_FINAL_TYPE (WpNode, wp_node, WP, NODE, WpProxy)
G_END_DECLS

View file

@ -6,12 +6,12 @@
* SPDX-License-Identifier: MIT
*/
#include "proxy-port.h"
#include "port.h"
#include "private.h"
#include <pipewire/pipewire.h>
struct _WpProxyPort
struct _WpPort
{
WpProxy parent;
struct pw_port_info *info;
@ -20,37 +20,37 @@ struct _WpProxyPort
struct spa_hook listener;
};
G_DEFINE_TYPE (WpProxyPort, wp_proxy_port, WP_TYPE_PROXY)
G_DEFINE_TYPE (WpPort, wp_port, WP_TYPE_PROXY)
static void
wp_proxy_port_init (WpProxyPort * self)
wp_port_init (WpPort * self)
{
}
static void
wp_proxy_port_finalize (GObject * object)
wp_port_finalize (GObject * object)
{
WpProxyPort *self = WP_PROXY_PORT (object);
WpPort *self = WP_PORT (object);
g_clear_pointer (&self->info, pw_port_info_free);
G_OBJECT_CLASS (wp_proxy_port_parent_class)->finalize (object);
G_OBJECT_CLASS (wp_port_parent_class)->finalize (object);
}
static gconstpointer
wp_proxy_port_get_info (WpProxy * self)
wp_port_get_info (WpProxy * self)
{
return WP_PROXY_PORT (self)->info;
return WP_PORT (self)->info;
}
static WpProperties *
wp_proxy_port_get_properties (WpProxy * self)
wp_port_get_properties (WpProxy * self)
{
return wp_properties_new_wrap_dict (WP_PROXY_PORT (self)->info->props);
return wp_properties_new_wrap_dict (WP_PORT (self)->info->props);
}
static gint
wp_proxy_port_enum_params (WpProxy * self, guint32 id, guint32 start,
wp_port_enum_params (WpProxy * self, guint32 id, guint32 start,
guint32 num, const struct spa_pod *filter)
{
struct pw_port *pwp;
@ -64,7 +64,7 @@ wp_proxy_port_enum_params (WpProxy * self, guint32 id, guint32 start,
}
static gint
wp_proxy_port_subscribe_params (WpProxy * self, guint32 n_ids, guint32 *ids)
wp_port_subscribe_params (WpProxy * self, guint32 n_ids, guint32 *ids)
{
struct pw_port *pwp;
int port_subscribe_params_result;
@ -79,7 +79,7 @@ wp_proxy_port_subscribe_params (WpProxy * self, guint32 n_ids, guint32 *ids)
static void
port_event_info(void *data, const struct pw_port_info *info)
{
WpProxyPort *self = WP_PROXY_PORT (data);
WpPort *self = WP_PORT (data);
self->info = pw_port_info_update (self->info, info);
g_object_notify (G_OBJECT (self), "info");
@ -97,25 +97,25 @@ static const struct pw_port_events port_events = {
};
static void
wp_proxy_port_pw_proxy_created (WpProxy * proxy, struct pw_proxy * pw_proxy)
wp_port_pw_proxy_created (WpProxy * proxy, struct pw_proxy * pw_proxy)
{
WpProxyPort *self = WP_PROXY_PORT (proxy);
WpPort *self = WP_PORT (proxy);
pw_port_add_listener ((struct pw_port *) pw_proxy,
&self->listener, &port_events, self);
}
static void
wp_proxy_port_class_init (WpProxyPortClass * klass)
wp_port_class_init (WpPortClass * klass)
{
GObjectClass *object_class = (GObjectClass *) klass;
WpProxyClass *proxy_class = (WpProxyClass *) klass;
object_class->finalize = wp_proxy_port_finalize;
object_class->finalize = wp_port_finalize;
proxy_class->get_info = wp_proxy_port_get_info;
proxy_class->get_properties = wp_proxy_port_get_properties;
proxy_class->enum_params = wp_proxy_port_enum_params;
proxy_class->subscribe_params = wp_proxy_port_subscribe_params;
proxy_class->get_info = wp_port_get_info;
proxy_class->get_properties = wp_port_get_properties;
proxy_class->enum_params = wp_port_enum_params;
proxy_class->subscribe_params = wp_port_subscribe_params;
proxy_class->pw_proxy_created = wp_proxy_port_pw_proxy_created;
proxy_class->pw_proxy_created = wp_port_pw_proxy_created;
}

22
lib/wp/port.h Normal file
View file

@ -0,0 +1,22 @@
/* WirePlumber
*
* Copyright © 2019 Collabora Ltd.
* @author Julian Bouzas <julian.bouzas@collabora.com>
*
* SPDX-License-Identifier: MIT
*/
#ifndef __WIREPLUMBER_PORT_H__
#define __WIREPLUMBER_PORT_H__
#include "proxy.h"
G_BEGIN_DECLS
#define WP_TYPE_PORT (wp_port_get_type ())
WP_API
G_DECLARE_FINAL_TYPE (WpPort, wp_port, WP, PORT, WpProxy)
G_END_DECLS
#endif

View file

@ -1,32 +0,0 @@
/* WirePlumber
*
* Copyright © 2019 Collabora Ltd.
* @author George Kiagiadakis <george.kiagiadakis@collabora.com>
*
* SPDX-License-Identifier: MIT
*/
#ifndef __WIREPLUMBER_PROXY_CLIENT_H__
#define __WIREPLUMBER_PROXY_CLIENT_H__
#include "proxy.h"
G_BEGIN_DECLS
struct pw_permission;
#define WP_TYPE_PROXY_CLIENT (wp_proxy_client_get_type ())
WP_API
G_DECLARE_FINAL_TYPE (WpProxyClient, wp_proxy_client, WP, PROXY_CLIENT, WpProxy)
WP_API
void wp_proxy_client_update_permissions (WpProxyClient * self,
guint n_perm, ...);
WP_API
void wp_proxy_client_update_permissions_array (WpProxyClient * self,
guint n_perm, const struct pw_permission *permissions);
G_END_DECLS
#endif

View file

@ -1,22 +0,0 @@
/* WirePlumber
*
* Copyright © 2019 Collabora Ltd.
* @author Julian Bouzas <julian.bouzas@collabora.com>
*
* SPDX-License-Identifier: MIT
*/
#ifndef __WIREPLUMBER_PROXY_DEVICE_H__
#define __WIREPLUMBER_PROXY_DEVICE_H__
#include "proxy.h"
G_BEGIN_DECLS
#define WP_TYPE_PROXY_DEVICE (wp_proxy_device_get_type ())
WP_API
G_DECLARE_FINAL_TYPE (WpProxyDevice, wp_proxy_device, WP, PROXY_DEVICE, WpProxy)
G_END_DECLS
#endif

View file

@ -14,11 +14,11 @@
#include "private.h"
#include "endpoint.h"
#include "proxy-client.h"
#include "proxy-device.h"
#include "proxy-link.h"
#include "proxy-node.h"
#include "proxy-port.h"
#include "client.h"
#include "device.h"
#include "link.h"
#include "node.h"
#include "port.h"
#include "session.h"
#include <pipewire/pipewire.h>
@ -96,13 +96,13 @@ static struct {
} types_assoc[] = {
{ PW_TYPE_INTERFACE_Core, 0, wp_proxy_get_type, NULL },
{ PW_TYPE_INTERFACE_Registry, 0, wp_proxy_get_type, NULL },
{ PW_TYPE_INTERFACE_Node, 0, wp_proxy_node_get_type, (GDestroyNotify)pw_impl_node_destroy },
{ PW_TYPE_INTERFACE_Port, 0, wp_proxy_port_get_type, NULL },
{ PW_TYPE_INTERFACE_Node, 0, wp_node_get_type, (GDestroyNotify)pw_impl_node_destroy },
{ PW_TYPE_INTERFACE_Port, 0, wp_port_get_type, NULL },
{ PW_TYPE_INTERFACE_Factory, 0, wp_proxy_get_type, (GDestroyNotify)pw_impl_factory_destroy },
{ PW_TYPE_INTERFACE_Link, 0, wp_proxy_link_get_type, (GDestroyNotify)pw_impl_link_destroy },
{ PW_TYPE_INTERFACE_Client, 0, wp_proxy_client_get_type, (GDestroyNotify)pw_impl_client_destroy },
{ PW_TYPE_INTERFACE_Link, 0, wp_link_get_type, (GDestroyNotify)pw_impl_link_destroy },
{ PW_TYPE_INTERFACE_Client, 0, wp_client_get_type, (GDestroyNotify)pw_impl_client_destroy },
{ PW_TYPE_INTERFACE_Module, 0, wp_proxy_get_type, (GDestroyNotify)pw_impl_module_destroy },
{ PW_TYPE_INTERFACE_Device, 0, wp_proxy_device_get_type, (GDestroyNotify)pw_impl_device_destroy },
{ PW_TYPE_INTERFACE_Device, 0, wp_device_get_type, (GDestroyNotify)pw_impl_device_destroy },
{ PW_TYPE_INTERFACE_Metadata, 0, wp_proxy_get_type, NULL },
{ PW_TYPE_INTERFACE_Session, 0, wp_proxy_session_get_type, NULL },
{ PW_TYPE_INTERFACE_Endpoint, 0, wp_proxy_endpoint_get_type, NULL },

View file

@ -7,22 +7,22 @@
*/
#include "base-endpoint.h"
#include "client.h"
#include "configuration.h"
#include "core.h"
#include "device.h"
#include "endpoint.h"
#include "error.h"
#include "exported.h"
#include "factory.h"
#include "link.h"
#include "module.h"
#include "monitor.h"
#include "node.h"
#include "object-manager.h"
#include "policy.h"
#include "port.h"
#include "properties.h"
#include "proxy.h"
#include "proxy-client.h"
#include "proxy-device.h"
#include "proxy-link.h"
#include "proxy-node.h"
#include "proxy-port.h"
#include "session.h"
#include "wpenums.h"

View file

@ -10,7 +10,7 @@
#include <pipewire/pipewire.h>
static void
client_added (WpObjectManager * om, WpProxyClient *client, gpointer data)
client_added (WpObjectManager * om, WpClient *client, gpointer data)
{
g_autoptr (WpProperties) properties = NULL;
const char *access;
@ -23,7 +23,7 @@ client_added (WpObjectManager * om, WpProxyClient *client, gpointer data)
if (!g_strcmp0 (access, "flatpak") || !g_strcmp0 (access, "restricted")) {
g_debug ("Granting full access to client %d", id);
wp_proxy_client_update_permissions (client, 1, -1, PW_PERM_RWX);
wp_client_update_permissions (client, 1, -1, PW_PERM_RWX);
}
}

View file

@ -57,7 +57,7 @@ on_endpoint_created (GObject *initable, GAsyncResult *res, gpointer d)
}
/* Get the endpoint global id */
g_object_get (endpoint, "proxy-node", &proxy, NULL);
g_object_get (endpoint, "node", &proxy, NULL);
global_id = wp_proxy_get_global_id (proxy);
/* Register the endpoint and add it to the table */
@ -143,7 +143,7 @@ on_node_added (WpObjectManager *om, WpProxy *proxy, gpointer d)
g_variant_builder_add (&b, "{sv}",
"priority", g_variant_new_uint32 (endpoint_data->e.priority));
g_variant_builder_add (&b, "{sv}",
"proxy-node", g_variant_new_uint64 ((guint64) proxy));
"node", g_variant_new_uint64 ((guint64) proxy));
if (streams_variant)
g_variant_builder_add (&b, "{sv}", "streams",
g_steal_pointer (&streams_variant));

View file

@ -34,7 +34,7 @@ struct _WpPwAudioSoftdspEndpoint
WpBaseEndpoint parent;
/* Properties */
WpProxyNode *proxy_node;
WpNode *node;
GVariant *streams;
char *role;
@ -100,7 +100,7 @@ endpoint_get_properties (WpBaseEndpoint * ep)
{
WpPwAudioSoftdspEndpoint *self = WP_PW_AUDIO_SOFTDSP_ENDPOINT (ep);
return wp_proxy_get_properties (WP_PROXY (self->proxy_node));
return wp_proxy_get_properties (WP_PROXY (self->node));
}
static const char *
@ -232,11 +232,11 @@ do_export (WpPwAudioSoftdspEndpoint *self)
// wp_exported_endpoint_register_control (self->exported_ep,
// WP_ENDPOINT_CONTROL_CHANNEL_VOLUMES);
props = wp_proxy_get_properties (WP_PROXY (self->proxy_node));
props = wp_proxy_get_properties (WP_PROXY (self->node));
extra_props = wp_properties_new_empty ();
wp_properties_setf (extra_props, PW_KEY_NODE_ID, "%d",
wp_proxy_get_global_id (WP_PROXY (self->proxy_node)));
wp_proxy_get_global_id (WP_PROXY (self->node)));
wp_properties_set (extra_props, PW_KEY_ENDPOINT_CLIENT_ID,
wp_properties_get (props, PW_KEY_CLIENT_ID));
wp_properties_setf (extra_props, "endpoint.priority", "%d",
@ -317,7 +317,7 @@ on_audio_adapter_created(GObject *initable, GAsyncResult *res,
if (!self->adapter)
return;
props = wp_proxy_get_properties (WP_PROXY (self->proxy_node));
props = wp_proxy_get_properties (WP_PROXY (self->node));
/* Set the role */
self->role = g_strdup (wp_properties_get (props, PW_KEY_MEDIA_ROLE));
@ -369,7 +369,7 @@ endpoint_finalize (GObject * object)
/* Destroy the done task */
g_clear_object(&self->init_task);
g_clear_object(&self->proxy_node);
g_clear_object(&self->node);
g_free (self->role);
G_OBJECT_CLASS (endpoint_parent_class)->finalize (object);
@ -383,7 +383,7 @@ endpoint_set_property (GObject * object, guint property_id,
switch (property_id) {
case PROP_PROXY_NODE:
self->proxy_node = g_value_dup_object (value);
self->node = g_value_dup_object (value);
break;
case PROP_STREAMS:
self->streams = g_value_dup_variant(value);
@ -406,7 +406,7 @@ endpoint_get_property (GObject * object, guint property_id,
switch (property_id) {
case PROP_PROXY_NODE:
g_value_set_object (value, self->proxy_node);
g_value_set_object (value, self->node);
break;
case PROP_STREAMS:
g_value_set_variant (value, self->streams);
@ -434,7 +434,7 @@ wp_base_endpoint_init_async (GAsyncInitable *initable, int io_priority,
/* Create the adapter proxy */
wp_audio_adapter_new (WP_BASE_ENDPOINT(self), WP_STREAM_ID_NONE, "master",
direction, self->proxy_node, FALSE, on_audio_adapter_created, self);
direction, self->node, FALSE, on_audio_adapter_created, self);
/* Register the selected control */
self->selected = FALSE;
@ -485,8 +485,8 @@ endpoint_class_init (WpPwAudioSoftdspEndpointClass * klass)
/* Instal the properties */
g_object_class_install_property (object_class, PROP_PROXY_NODE,
g_param_spec_object ("proxy-node", "proxy-node",
"The node this endpoint refers to", WP_TYPE_PROXY_NODE,
g_param_spec_object ("node", "node",
"The node this endpoint refers to", WP_TYPE_NODE,
G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_STRINGS));
g_object_class_install_property (object_class, PROP_STREAMS,
@ -526,7 +526,7 @@ audio_softdsp_endpoint_factory (WpFactory * factory, GType type, GVariant * prop
return;
if (!g_variant_lookup (properties, "priority", "u", &priority))
return;
if (!g_variant_lookup (properties, "proxy-node", "t", &node))
if (!g_variant_lookup (properties, "node", "t", &node))
return;
streams = g_variant_lookup_value (properties, "streams",
G_VARIANT_TYPE ("a(su)"));
@ -539,7 +539,7 @@ audio_softdsp_endpoint_factory (WpFactory * factory, GType type, GVariant * prop
"media-class", media_class,
"direction", direction,
"priority", priority,
"proxy-node", (gpointer) node,
"node", (gpointer) node,
"streams", streams,
NULL);
}

View file

@ -113,7 +113,7 @@ wp_audio_adapter_init_async (GAsyncInitable *initable, int io_priority,
GCancellable *cancellable, GAsyncReadyCallback callback, gpointer data)
{
WpAudioAdapter *self = WP_AUDIO_ADAPTER(initable);
WpProxyNode *proxy = wp_audio_stream_get_proxy_node (WP_AUDIO_STREAM (self));
WpNode *proxy = wp_audio_stream_get_node (WP_AUDIO_STREAM (self));
/* Call the parent interface */
/* This will also augment the proxy and therefore bind it */
@ -189,7 +189,7 @@ wp_audio_adapter_class_init (WpAudioAdapterClass * klass)
void
wp_audio_adapter_new (WpBaseEndpoint *endpoint, guint stream_id,
const char *stream_name, enum pw_direction direction, WpProxyNode *node,
const char *stream_name, enum pw_direction direction, WpNode *node,
gboolean convert, GAsyncReadyCallback callback, gpointer user_data)
{
g_async_initable_new_async (
@ -198,7 +198,7 @@ wp_audio_adapter_new (WpBaseEndpoint *endpoint, guint stream_id,
"id", stream_id,
"name", stream_name,
"direction", direction,
"proxy-node", node,
"node", node,
"convert", convert,
NULL);
}

View file

@ -23,7 +23,7 @@ G_DECLARE_FINAL_TYPE (WpAudioAdapter, wp_audio_adapter, WP, AUDIO_ADAPTER,
WpAudioStream)
void wp_audio_adapter_new (WpBaseEndpoint *endpoint, guint stream_id,
const char *stream_name, enum pw_direction direction, WpProxyNode *node,
const char *stream_name, enum pw_direction direction, WpNode *node,
gboolean convert, GAsyncReadyCallback callback, gpointer user_data);
struct spa_audio_info_raw *wp_audio_adapter_get_format (WpAudioAdapter *self);

View file

@ -160,10 +160,10 @@ wp_audio_convert_init_async (GAsyncInitable *initable, int io_priority,
g_autoptr (WpProxy) proxy = NULL;
g_autoptr (WpProperties) props = NULL;
g_autoptr (WpCore) core = wp_audio_stream_get_core (WP_AUDIO_STREAM (self));
WpProxyNode *node;
WpNode *node;
/* Create the properties */
node = wp_audio_stream_get_proxy_node (self->target);
node = wp_audio_stream_get_node (self->target);
props = wp_properties_copy (wp_proxy_get_properties (WP_PROXY (node)));
wp_properties_setf (props, PW_KEY_OBJECT_PATH, "%s:%s",
@ -181,7 +181,7 @@ wp_audio_convert_init_async (GAsyncInitable *initable, int io_priority,
PW_TYPE_INTERFACE_Node, PW_VERSION_NODE, props);
g_return_if_fail (proxy);
g_object_set (self, "proxy-node", proxy, NULL);
g_object_set (self, "node", proxy, NULL);
g_signal_connect_object (proxy, "notify::info",
(GCallback) wp_audio_convert_event_info, self, 0);

View file

@ -29,7 +29,7 @@ struct _WpAudioStreamPrivate
enum pw_direction direction;
/* Stream Proxy */
WpProxyNode *proxy;
WpNode *proxy;
WpObjectManager *ports_om;
GVariantBuilder port_vb;
@ -322,8 +322,8 @@ wp_audio_stream_class_init (WpAudioStreamClass * klass)
"The direction of the audio stream", 0, 1, 0,
G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_STRINGS));
g_object_class_install_property (object_class, PROP_PROXY_NODE,
g_param_spec_object ("proxy-node", "proxy-node",
"The node proxy of the stream", WP_TYPE_PROXY_NODE,
g_param_spec_object ("node", "node",
"The node proxy of the stream", WP_TYPE_NODE,
G_PARAM_READWRITE | G_PARAM_CONSTRUCT | G_PARAM_STATIC_STRINGS));
signals[SIGNAL_CONTROL_CHANGED] = g_signal_new (
@ -355,8 +355,8 @@ wp_audio_stream_get_direction (WpAudioStream * self)
return priv->direction;
}
WpProxyNode *
wp_audio_stream_get_proxy_node (WpAudioStream * self)
WpNode *
wp_audio_stream_get_node (WpAudioStream * self)
{
WpAudioStreamPrivate *priv = wp_audio_stream_get_instance_private (self);

View file

@ -27,7 +27,7 @@ WpAudioStream * wp_audio_stream_new_finish (GObject *initable,
GAsyncResult *res, GError **error);
const char *wp_audio_stream_get_name (WpAudioStream * self);
enum pw_direction wp_audio_stream_get_direction (WpAudioStream * self);
WpProxyNode * wp_audio_stream_get_proxy_node (WpAudioStream * self);
WpNode * wp_audio_stream_get_node (WpAudioStream * self);
const struct pw_node_info * wp_audio_stream_get_info (WpAudioStream * self);
gboolean wp_audio_stream_prepare_link (WpAudioStream * self,
GVariant ** properties, GError ** error);

View file

@ -146,7 +146,7 @@ simple_endpoint_link_get_property (GObject * object, guint property_id,
}
static void
on_proxy_link_augmented (WpProxy *proxy, GAsyncResult *res, gpointer data)
on_link_augmented (WpProxy *proxy, GAsyncResult *res, gpointer data)
{
WpPipewireSimpleEndpointLink *self = data;
g_autoptr (GError) error = NULL;
@ -185,7 +185,7 @@ create_link_cb (WpProperties *props, gpointer user_data)
by waiting for the info event, which will be signaled anyway */
self->link_count++;
wp_proxy_augment (proxy, WP_PROXY_FEATURE_INFO, NULL,
(GAsyncReadyCallback) on_proxy_link_augmented, self);
(GAsyncReadyCallback) on_link_augmented, self);
}
static gboolean

View file

@ -17,7 +17,7 @@ struct _WpEndpointAudiotestsrc
guint id;
/* Props */
WpProxyNode *proxy_node;
WpNode *node;
GVariant *streams;
};
@ -40,7 +40,7 @@ static WpProperties *
wp_endpoint_audiotestsrc_get_properties (WpBaseEndpoint * ep)
{
WpEndpointAudiotestsrc *self = WP_ENDPOINT_AUDIOTESTSRC (ep);
return wp_proxy_get_properties (WP_PROXY (self->proxy_node));
return wp_proxy_get_properties (WP_PROXY (self->node));
}
static const char *
@ -101,7 +101,7 @@ wp_endpoint_audiotestsrc_set_property (GObject * object, guint property_id,
switch (property_id) {
case PROP_PROXY_NODE:
self->proxy_node = g_value_dup_object (value);
self->node = g_value_dup_object (value);
break;
case PROP_STREAMS:
self->streams = g_value_dup_variant(value);
@ -120,7 +120,7 @@ wp_endpoint_audiotestsrc_get_property (GObject * object, guint property_id,
switch (property_id) {
case PROP_PROXY_NODE:
g_value_set_object (value, self->proxy_node);
g_value_set_object (value, self->node);
break;
case PROP_STREAMS:
g_value_set_variant (value, self->streams);
@ -136,7 +136,7 @@ wp_endpoint_audiotestsrc_finalize (GObject * object)
{
WpEndpointAudiotestsrc *self = WP_ENDPOINT_AUDIOTESTSRC (object);
g_clear_object(&self->proxy_node);
g_clear_object(&self->node);
g_clear_pointer(&self->streams, g_variant_unref);
G_OBJECT_CLASS (wp_endpoint_audiotestsrc_parent_class)->finalize (object);
@ -203,8 +203,8 @@ wp_endpoint_audiotestsrc_class_init (WpEndpointAudiotestsrcClass * klass)
wp_endpoint_audiotestsrc_get_endpoint_link_factory;
g_object_class_install_property (object_class, PROP_PROXY_NODE,
g_param_spec_object ("proxy-node", "proxy-node",
"The node this endpoint refers to", WP_TYPE_PROXY_NODE,
g_param_spec_object ("node", "node",
"The node this endpoint refers to", WP_TYPE_NODE,
G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_STRINGS));
g_object_class_install_property (object_class, PROP_STREAMS,
@ -235,7 +235,7 @@ wp_endpoint_audiotestsrc_factory (WpFactory * factory, GType type,
return;
if (!g_variant_lookup (properties, "priority", "u", &priority))
return;
if (!g_variant_lookup (properties, "proxy-node", "t", &node))
if (!g_variant_lookup (properties, "node", "t", &node))
return;
streams = g_variant_lookup_value (properties, "streams",
G_VARIANT_TYPE ("a(su)"));
@ -247,7 +247,7 @@ wp_endpoint_audiotestsrc_factory (WpFactory * factory, GType type,
"media-class", media_class,
"direction", direction,
"priority", priority,
"proxy-node", (gpointer) node,
"node", (gpointer) node,
"streams", streams,
NULL);
}

View file

@ -118,7 +118,7 @@ test_proxy_basic_object_added (WpObjectManager *om, WpProxy *proxy,
g_assert_cmpstr (wp_proxy_get_interface_type (proxy), ==,
PW_TYPE_INTERFACE_Client);
g_assert_cmphex (wp_proxy_get_global_permissions (proxy), ==, PW_PERM_RWX);
g_assert_true (WP_IS_PROXY_CLIENT (proxy));
g_assert_true (WP_IS_CLIENT (proxy));
g_assert_cmphex (wp_proxy_get_features (proxy), ==, 0);
g_assert_null (wp_proxy_get_pw_proxy (proxy));
@ -153,18 +153,18 @@ test_proxy_basic (TestProxyFixture *fixture, gconstpointer data)
typedef struct {
TestProxyFixture *fixture;
guint n_params;
} TestProxyNodeParamData;
} TestNodeParamData;
static void
test_proxy_node_param (WpProxyNode *node, int seq, guint id, guint index,
guint next, struct spa_pod *param, TestProxyNodeParamData *data)
test_node_param (WpNode *node, int seq, guint id, guint index,
guint next, struct spa_pod *param, TestNodeParamData *data)
{
data->n_params++;
}
static void
test_proxy_node_enum_params_done (WpProxy *node, GAsyncResult *res,
TestProxyNodeParamData *data)
test_node_enum_params_done (WpProxy *node, GAsyncResult *res,
TestNodeParamData *data)
{
g_autoptr (GPtrArray) params = NULL;
g_autoptr (GError) error = NULL;
@ -187,11 +187,11 @@ test_proxy_node_enum_params_done (WpProxy *node, GAsyncResult *res,
}
static void
test_proxy_node_object_added (WpObjectManager *om, WpProxy *proxy,
test_node_object_added (WpObjectManager *om, WpProxy *proxy,
TestProxyFixture *fixture)
{
const struct pw_node_info *info;
TestProxyNodeParamData *param_data;
TestNodeParamData *param_data;
g_assert_nonnull (proxy);
g_assert_true (wp_proxy_is_global (proxy));
@ -201,7 +201,7 @@ test_proxy_node_object_added (WpObjectManager *om, WpProxy *proxy,
WP_PROXY_FEATURE_PW_PROXY | WP_PROXY_FEATURE_INFO);
g_assert_nonnull (wp_proxy_get_pw_proxy (proxy));
g_assert_true (WP_IS_PROXY_NODE (proxy));
g_assert_true (WP_IS_NODE (proxy));
info = wp_proxy_get_info (proxy);
g_assert_nonnull (info);
g_assert_cmpint (wp_proxy_get_global_id (proxy), ==, info->id);
@ -217,18 +217,18 @@ test_proxy_node_object_added (WpObjectManager *om, WpProxy *proxy,
g_assert_cmpint (info->id, ==, atoi(id));
}
param_data = g_new0 (TestProxyNodeParamData, 1);
param_data = g_new0 (TestNodeParamData, 1);
param_data->fixture = fixture;
g_signal_connect (proxy, "param", (GCallback) test_proxy_node_param,
g_signal_connect (proxy, "param", (GCallback) test_node_param,
param_data);
wp_proxy_enum_params_collect (proxy, SPA_PARAM_PropInfo, 0, -1,
NULL, NULL, (GAsyncReadyCallback) test_proxy_node_enum_params_done,
NULL, NULL, (GAsyncReadyCallback) test_node_enum_params_done,
param_data);
}
static void
test_proxy_node (TestProxyFixture *fixture, gconstpointer data)
test_node (TestProxyFixture *fixture, gconstpointer data)
{
/* load audiotestsrc on the server side */
pw_thread_loop_lock (fixture->server.thread_loop);
@ -244,7 +244,7 @@ test_proxy_node (TestProxyFixture *fixture, gconstpointer data)
/* we should be able to see this exported audiotestsrc node on the client */
g_signal_connect (fixture->om, "object-added",
(GCallback) test_proxy_node_object_added, fixture);
(GCallback) test_node_object_added, fixture);
/* declare interest and set default features to be ready
when the signal is fired */
@ -266,7 +266,7 @@ main (gint argc, gchar *argv[])
g_test_add ("/wp/proxy/basic", TestProxyFixture, NULL,
test_proxy_setup, test_proxy_basic, test_proxy_teardown);
g_test_add ("/wp/proxy/node", TestProxyFixture, NULL,
test_proxy_setup, test_proxy_node, test_proxy_teardown);
test_proxy_setup, test_node, test_proxy_teardown);
return g_test_run ();
}

View file

@ -178,7 +178,7 @@ device_node_props (WpObjectManager * om, struct WpCliData * d)
const struct spa_dict * dict;
const struct spa_dict_item *item;
arr = wp_object_manager_get_objects (om, WP_TYPE_PROXY_NODE);
arr = wp_object_manager_get_objects (om, WP_TYPE_NODE);
g_print ("Capture device nodes:\n");