Commit d49ffbef authored by Julian Bouzas's avatar Julian Bouzas
Browse files

endpoint: add get_properties API

parent b2c4162c
......@@ -451,6 +451,17 @@ wp_endpoint_get_creation_time (WpEndpoint * self)
return priv->creation_time;
}
WpProperties *
wp_endpoint_get_properties (WpEndpoint * self)
{
g_return_val_if_fail (WP_IS_ENDPOINT (self), NULL);
if (WP_ENDPOINT_GET_CLASS (self)->get_properties)
return WP_ENDPOINT_GET_CLASS (self)->get_properties (self);
return NULL;
}
/**
* wp_endpoint_register_stream:
* @self: the endpoint
......
......@@ -28,6 +28,8 @@ struct _WpEndpointClass
{
GObjectClass parent_class;
WpProperties * (*get_properties) (WpEndpoint * self);
GVariant * (*get_control_value) (WpEndpoint * self, guint32 control_id);
gboolean (*set_control_value) (WpEndpoint * self, guint32 control_id,
GVariant * value);
......@@ -49,6 +51,7 @@ const gchar * wp_endpoint_get_name (WpEndpoint * self);
const gchar * wp_endpoint_get_media_class (WpEndpoint * self);
guint wp_endpoint_get_direction (WpEndpoint * self);
guint64 wp_endpoint_get_creation_time (WpEndpoint * self);
WpProperties * wp_endpoint_get_properties (WpEndpoint * self);
void wp_endpoint_register_stream (WpEndpoint * self, GVariant * stream);
GVariant * wp_endpoint_get_stream (WpEndpoint * self, guint32 stream_id);
......
......@@ -92,6 +92,14 @@ object_safe_new_finish(WpPwAudioSoftdspEndpoint * self, GObject *initable,
return g_steal_pointer (&object);
}
static WpProperties *
endpoint_get_properties (WpEndpoint * ep)
{
WpPwAudioSoftdspEndpoint *self = WP_PW_AUDIO_SOFTDSP_ENDPOINT (ep);
return wp_proxy_node_get_properties (self->proxy_node);
}
static gboolean
endpoint_prepare_link (WpEndpoint * ep, guint32 stream_id,
WpEndpointLink * link, GVariant ** properties, GError ** error)
......@@ -397,6 +405,7 @@ endpoint_class_init (WpPwAudioSoftdspEndpointClass * klass)
object_class->set_property = endpoint_set_property;
object_class->get_property = endpoint_get_property;
endpoint_class->get_properties = endpoint_get_properties;
endpoint_class->prepare_link = endpoint_prepare_link;
endpoint_class->get_control_value = endpoint_get_control_value;
endpoint_class->set_control_value = endpoint_set_control_value;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment