Skip to content
Snippets Groups Projects
Commit efb33ddd authored by George Kiagiadakis's avatar George Kiagiadakis
Browse files

lib: introduce export macros and hide all private symbols

parent 83a0725b
No related branches found
No related tags found
No related merge requests found
......@@ -19,10 +19,12 @@ static const guint32 WP_STREAM_ID_NONE = 0xffffffff;
static const guint32 WP_CONTROL_ID_NONE = 0xffffffff;
#define WP_TYPE_BASE_ENDPOINT (wp_base_endpoint_get_type ())
WP_API
G_DECLARE_DERIVABLE_TYPE (WpBaseEndpoint, wp_base_endpoint,
WP, BASE_ENDPOINT, GObject)
#define WP_TYPE_BASE_ENDPOINT_LINK (wp_base_endpoint_link_get_type ())
WP_API
G_DECLARE_DERIVABLE_TYPE (WpBaseEndpointLink, wp_base_endpoint_link,
WP, BASE_ENDPOINT_LINK, GObject)
......@@ -45,43 +47,90 @@ struct _WpBaseEndpointClass
const gchar * (*get_endpoint_link_factory) (WpBaseEndpoint * self);
};
WP_API
WpBaseEndpoint * wp_base_endpoint_new_finish (GObject *initable, GAsyncResult *res,
GError **error);
WP_API
void wp_base_endpoint_register (WpBaseEndpoint * self);
WP_API
void wp_base_endpoint_unregister (WpBaseEndpoint * self);
WP_API
WpCore *wp_base_endpoint_get_core (WpBaseEndpoint * self);
WP_API
const gchar * wp_base_endpoint_get_name (WpBaseEndpoint * self);
WP_API
const gchar * wp_base_endpoint_get_media_class (WpBaseEndpoint * self);
WP_API
guint wp_base_endpoint_get_direction (WpBaseEndpoint * self);
WP_API
guint64 wp_base_endpoint_get_creation_time (WpBaseEndpoint * self);
WP_API
guint32 wp_base_endpoint_get_priority (WpBaseEndpoint * self);
WP_API
WpProperties * wp_base_endpoint_get_properties (WpBaseEndpoint * self);
WP_API
const char * wp_base_endpoint_get_role (WpBaseEndpoint * self);
WP_API
guint32 wp_base_endpoint_get_global_id (WpBaseEndpoint * self);
WP_API
void wp_base_endpoint_register_stream (WpBaseEndpoint * self, GVariant * stream);
WP_API
GVariant * wp_base_endpoint_get_stream (WpBaseEndpoint * self, guint32 stream_id);
WP_API
GVariant * wp_base_endpoint_list_streams (WpBaseEndpoint * self);
WP_API
guint32 wp_base_endpoint_find_stream (WpBaseEndpoint * self, const gchar * name);
WP_API
void wp_base_endpoint_register_control (WpBaseEndpoint * self, GVariant * control);
WP_API
GVariant * wp_base_endpoint_get_control (WpBaseEndpoint * self, guint32 control_id);
WP_API
GVariant * wp_base_endpoint_list_controls (WpBaseEndpoint * self);
WP_API
guint32 wp_base_endpoint_find_control (WpBaseEndpoint * self, guint32 stream_id,
const gchar * name);
WP_API
GVariant * wp_base_endpoint_get_control_value (WpBaseEndpoint * self,
guint32 control_id);
WP_API
gboolean wp_base_endpoint_set_control_value (WpBaseEndpoint * self,
guint32 control_id, GVariant * value);
WP_API
void wp_base_endpoint_notify_control_value (WpBaseEndpoint * self,
guint32 control_id);
WP_API
gboolean wp_base_endpoint_is_linked (WpBaseEndpoint * self);
WP_API
GPtrArray * wp_base_endpoint_get_links (WpBaseEndpoint * self);
WP_API
void wp_base_endpoint_unlink (WpBaseEndpoint * self);
struct _WpBaseEndpointLinkClass
{
GObjectClass parent_class;
......@@ -91,19 +140,33 @@ struct _WpBaseEndpointLinkClass
void (*destroy) (WpBaseEndpointLink * self);
};
WP_API
WpBaseEndpoint * wp_base_endpoint_link_get_source_endpoint (
WpBaseEndpointLink * self);
WP_API
guint32 wp_base_endpoint_link_get_source_stream (WpBaseEndpointLink * self);
WP_API
WpBaseEndpoint * wp_base_endpoint_link_get_sink_endpoint (
WpBaseEndpointLink * self);
WP_API
guint32 wp_base_endpoint_link_get_sink_stream (WpBaseEndpointLink * self);
WP_API
gboolean wp_base_endpoint_link_is_kept (WpBaseEndpointLink * self);
WP_API
void wp_base_endpoint_link_new (WpCore * core, WpBaseEndpoint * src,
guint32 src_stream, WpBaseEndpoint * sink, guint32 sink_stream,
gboolean keep, GAsyncReadyCallback ready, gpointer data);
WP_API
WpBaseEndpointLink * wp_base_endpoint_link_new_finish (GObject *initable,
GAsyncResult *res, GError **error);
WP_API
void wp_base_endpoint_link_destroy (WpBaseEndpointLink * self);
G_END_DECLS
......
......@@ -13,7 +13,10 @@
G_BEGIN_DECLS
/* WpConfigParser */
#define WP_TYPE_CONFIG_PARSER (wp_config_parser_get_type ())
WP_API
G_DECLARE_INTERFACE (WpConfigParser, wp_config_parser, WP,
CONFIG_PARSER, GObject)
......@@ -26,24 +29,45 @@ struct _WpConfigParserInterface
void (*reset) (WpConfigParser *parser);
};
WP_API
gboolean wp_config_parser_add_file (WpConfigParser *self, const char *location);
WP_API
gconstpointer wp_config_parser_get_matched_data (WpConfigParser *self,
gpointer data);
WP_API
void wp_config_parser_reset (WpConfigParser *self);
/* WpConfiguration */
#define WP_TYPE_CONFIGURATION (wp_configuration_get_type ())
WP_API
G_DECLARE_FINAL_TYPE (WpConfiguration, wp_configuration, WP, CONFIGURATION,
GObject)
WP_API
WpConfiguration * wp_configuration_get_instance (WpCore *core);
WP_API
void wp_configuration_add_path (WpConfiguration *self, const char *path);
WP_API
void wp_configuration_remove_path (WpConfiguration *self, const char *path);
WP_API
gboolean wp_configuration_add_extension (WpConfiguration *self,
const gchar * extension, GType parser_type);
WP_API
gboolean wp_configuration_remove_extension (WpConfiguration *self,
const gchar * extension);
WP_API
WpConfigParser *wp_configuration_get_parser (WpConfiguration *self,
const char *extension);
WP_API
void wp_configuration_reload (WpConfiguration *self, const char *extension);
G_END_DECLS
......
......@@ -18,35 +18,60 @@ G_BEGIN_DECLS
struct pw_context;
#define WP_TYPE_CORE (wp_core_get_type ())
WP_API
G_DECLARE_FINAL_TYPE (WpCore, wp_core, WP, CORE, GObject)
/* Basic */
WP_API
WpCore * wp_core_new (GMainContext *context, WpProperties * properties);
WP_API
GMainContext * wp_core_get_context (WpCore * self);
WP_API
struct pw_context * wp_core_get_pw_context (WpCore * self);
/* Connection */
WP_API
gboolean wp_core_connect (WpCore *self);
WP_API
void wp_core_disconnect (WpCore *self);
WP_API
gboolean wp_core_is_connected (WpCore * self);
/* Callback */
WP_API
guint wp_core_idle_add (WpCore * self, GSourceFunc function, gpointer data,
GDestroyNotify destroy);
WP_API
gboolean wp_core_sync (WpCore * self, GCancellable * cancellable,
GAsyncReadyCallback callback, gpointer user_data);
/* Object */
WP_API
WpProxy * wp_core_export_object (WpCore * self, const gchar * interface_type,
gpointer local_object, WpProperties * properties);
WP_API
WpProxy * wp_core_create_local_object (WpCore * self,
const gchar *factory_name, const gchar * interface_type,
guint32 interface_version, WpProperties * properties);
WP_API
WpProxy * wp_core_create_remote_object (WpCore * self,
const gchar * factory_name, const gchar * interface_type,
guint32 interface_version, WpProperties * properties);
/* Object Manager */
WP_API
void wp_core_install_object_manager (WpCore * self, WpObjectManager * om);
G_END_DECLS
......
/* WirePlumber
*
* Copyright © 2020 Collabora Ltd.
* @author George Kiagiadakis <george.kiagiadakis@collabora.com>
*
* SPDX-License-Identifier: MIT
*/
#ifndef __WIREPLUMBER_DEFS_H__
#define __WIREPLUMBER_DEFS_H__
#if defined(__GNUC__)
# define WP_PLUGIN_EXPORT __attribute__ ((visibility ("default")))
# define WP_API_EXPORT extern __attribute__ ((visibility ("default")))
#else
# define WP_PLUGIN_EXPORT
# define WP_API_EXPORT extern
#endif
#define WP_API_IMPORT extern
#ifndef WP_API
# ifdef BUILDING_WP
# define WP_API WP_API_EXPORT
# else
# define WP_API WP_API_IMPORT
# endif
#endif
#endif
......@@ -15,6 +15,7 @@
G_BEGIN_DECLS
#define WP_TYPE_ENDPOINT (wp_endpoint_get_type ())
WP_API
G_DECLARE_INTERFACE (WpEndpoint, wp_endpoint, WP, ENDPOINT, GObject)
/**
......@@ -52,27 +53,47 @@ struct _WpEndpointInterface
// void (*create_link) (WpEndpoint * self, WpProperties * props);
};
WP_API
WpProperties * wp_endpoint_get_properties (WpEndpoint * self);
WP_API
const gchar * wp_endpoint_get_name (WpEndpoint * self);
WP_API
const gchar * wp_endpoint_get_media_class (WpEndpoint * self);
WP_API
WpDirection wp_endpoint_get_direction (WpEndpoint * self);
WP_API
const struct spa_pod * wp_endpoint_get_control (WpEndpoint * self,
guint32 control_id);
WP_API
gboolean wp_endpoint_get_control_boolean (WpEndpoint * self, guint32 control_id,
gboolean * value);
WP_API
gboolean wp_endpoint_get_control_int (WpEndpoint * self, guint32 control_id,
gint * value);
WP_API
gboolean wp_endpoint_get_control_float (WpEndpoint * self, guint32 control_id,
gfloat * value);
WP_API
gboolean wp_endpoint_set_control (WpEndpoint * self, guint32 control_id,
const struct spa_pod * value);
WP_API
gboolean wp_endpoint_set_control_boolean (WpEndpoint * self, guint32 control_id,
gboolean value);
WP_API
gboolean wp_endpoint_set_control_int (WpEndpoint * self, guint32 control_id,
gint value);
WP_API
gboolean wp_endpoint_set_control_float (WpEndpoint * self, guint32 control_id,
gfloat value);
......@@ -85,15 +106,18 @@ typedef enum { /*< flags >*/
} WpProxyEndpointFeatures;
#define WP_TYPE_PROXY_ENDPOINT (wp_proxy_endpoint_get_type ())
WP_API
G_DECLARE_FINAL_TYPE (WpProxyEndpoint, wp_proxy_endpoint,
WP, PROXY_ENDPOINT, WpProxy)
WP_API
const struct pw_endpoint_info * wp_proxy_endpoint_get_info (
WpProxyEndpoint * self);
/* exported */
#define WP_TYPE_EXPORTED_ENDPOINT (wp_exported_endpoint_get_type ())
WP_API
G_DECLARE_DERIVABLE_TYPE (WpExportedEndpoint, wp_exported_endpoint,
WP, EXPORTED_ENDPOINT, WpExported)
......@@ -102,22 +126,33 @@ struct _WpExportedEndpointClass
WpExportedClass parent_class;
};
WP_API
WpExportedEndpoint * wp_exported_endpoint_new (WpCore * core);
WP_API
guint32 wp_exported_endpoint_get_global_id (WpExportedEndpoint * self);
WP_API
void wp_exported_endpoint_set_property (WpExportedEndpoint * self,
const gchar * key, const gchar * value);
WP_API
void wp_exported_endpoint_update_properties (WpExportedEndpoint * self,
WpProperties * updates);
WP_API
void wp_exported_endpoint_set_name (WpExportedEndpoint * self,
const gchar * name);
WP_API
void wp_exported_endpoint_set_media_class (WpExportedEndpoint * self,
const gchar * media_class);
WP_API
void wp_exported_endpoint_set_direction (WpExportedEndpoint * self,
WpDirection dir);
WP_API
void wp_exported_endpoint_register_control (WpExportedEndpoint * self,
WpEndpointControl control);
......
......@@ -10,9 +10,11 @@
#define __WP_ERROR_H__
#include <glib.h>
#include "defs.h"
G_BEGIN_DECLS
WP_API
GQuark wp_domain_library_quark (void);
#define WP_DOMAIN_LIBRARY (wp_domain_library_quark ())
......
......@@ -15,6 +15,7 @@
G_BEGIN_DECLS
#define WP_TYPE_EXPORTED (wp_exported_get_type ())
WP_API
G_DECLARE_DERIVABLE_TYPE (WpExported, wp_exported, WP, EXPORTED, GObject)
struct _WpExportedClass
......@@ -26,15 +27,21 @@ struct _WpExportedClass
WpProxy * (*get_proxy) (WpExported * self);
};
WP_API
WpCore * wp_exported_get_core (WpExported * self);
WP_API
void wp_exported_export (WpExported * self, GCancellable * cancellable,
GAsyncReadyCallback callback, gpointer user_data);
WP_API
gboolean wp_exported_export_finish (WpExported * self,
GAsyncResult * res, GError ** error);
WP_API
void wp_exported_unexport (WpExported * self);
WP_API
WpProxy * wp_exported_get_proxy (WpExported * self);
G_END_DECLS
......
......@@ -16,20 +16,30 @@
G_BEGIN_DECLS
#define WP_TYPE_FACTORY (wp_factory_get_type ())
WP_API
G_DECLARE_FINAL_TYPE (WpFactory, wp_factory, WP, FACTORY, GObject)
typedef void (*WpFactoryFunc) (WpFactory * self, GType type,
GVariant * properties, GAsyncReadyCallback ready, gpointer user_data);
WP_API
WpFactory * wp_factory_new (WpCore * core, const gchar * name,
WpFactoryFunc func);
WP_API
const gchar * wp_factory_get_name (WpFactory * self);
WP_API
WpCore * wp_factory_get_core (WpFactory * self);
WP_API
void wp_factory_create_object (WpFactory * self, GType type,
GVariant * properties, GAsyncReadyCallback ready, gpointer user_data);
WP_API
WpFactory * wp_factory_find (WpCore * core, const gchar * name);
WP_API
void wp_factory_make (WpCore * core, const gchar * name, GType type,
GVariant * properties, GAsyncReadyCallback ready, gpointer user_data);
......
......@@ -24,8 +24,9 @@ wp_lib_sources = [
wp_lib_headers = [
'base-endpoint.h',
'configuration.h',
'endpoint.h',
'core.h',
'defs.h',
'endpoint.h',
'error.h',
'exported.h',
'factory.h',
......@@ -50,6 +51,8 @@ install_headers(wp_lib_headers,
enums = gnome.mkenums_simple('wpenums',
sources: wp_lib_headers,
header_prefix: '#include "wp/defs.h"',
decorator: 'WP_API',
install_header: true,
install_dir: join_paths(get_option('includedir'), 'wireplumber-' + wireplumber_api_version, 'wp'),
)
......@@ -61,6 +64,7 @@ wp_lib = library('wireplumber-' + wireplumber_api_version,
'-DG_LOG_USE_STRUCTURED',
'-DG_LOG_DOMAIN="libwireplumber"',
'-DWIREPLUMBER_DEFAULT_MODULE_DIR="@0@"'.format(wireplumber_module_dir),
'-DBUILDING_WP',
],
install: true,
include_directories: wp_lib_include_dir,
......
......@@ -14,14 +14,20 @@
G_BEGIN_DECLS
#define WP_TYPE_MODULE (wp_module_get_type ())
WP_API
G_DECLARE_FINAL_TYPE (WpModule, wp_module, WP, MODULE, GObject)
WP_API
WpModule * wp_module_load (WpCore * core, const gchar * abi,
const gchar * module_name, GVariant * args, GError ** error);
WP_API
GVariant * wp_module_get_properties (WpModule * module);
WP_API
WpCore * wp_module_get_core (WpModule * self);
WP_API
void wp_module_set_destroy_callback (WpModule * module, GDestroyNotify callback,
gpointer data);
......
......@@ -22,15 +22,23 @@ typedef enum { /*< flags, prefix=WP_MONITOR_FLAG_ >*/
#define WP_MONITOR_KEY_OBJECT_ID "wp.monitor.object.id"
#define WP_TYPE_MONITOR (wp_monitor_get_type ())
WP_API
G_DECLARE_FINAL_TYPE (WpMonitor, wp_monitor, WP, MONITOR, GObject)
WP_API
WpMonitor * wp_monitor_new (WpCore * core, const gchar * factory_name,
WpProperties *props, WpMonitorFlags flags);
WP_API
const gchar * wp_monitor_get_factory_name (WpMonitor *self);
WP_API
WpMonitorFlags wp_monitor_get_flags (WpMonitor *self);
WP_API
gboolean wp_monitor_start (WpMonitor *self, GError **error);
WP_API
void wp_monitor_stop (WpMonitor *self);
G_END_DECLS
......
......@@ -21,16 +21,22 @@ typedef enum {
} WpObjectManagerConstraintType;
#define WP_TYPE_OBJECT_MANAGER (wp_object_manager_get_type ())
WP_API
G_DECLARE_FINAL_TYPE (WpObjectManager, wp_object_manager, WP, OBJECT_MANAGER, GObject)
WP_API
WpObjectManager * wp_object_manager_new (void);
WP_API
void wp_object_manager_add_proxy_interest (WpObjectManager *self,
const gchar * iface_type, GVariant * constraints,
WpProxyFeatures wanted_features);
WP_API
void wp_object_manager_add_object_interest (WpObjectManager *self,
GType gtype, GVariant * constraints);
WP_API
GPtrArray * wp_object_manager_get_objects (WpObjectManager *self,
GType type_filter);
......
......@@ -35,9 +35,11 @@ typedef enum {
} WpPolicyRank;
#define WP_TYPE_POLICY_MANAGER (wp_policy_manager_get_type ())
WP_API
G_DECLARE_FINAL_TYPE (WpPolicyManager, wp_policy_manager, WP, POLICY_MANAGER, GObject)
#define WP_TYPE_POLICY (wp_policy_get_type ())
WP_API
G_DECLARE_DERIVABLE_TYPE (WpPolicy, wp_policy, WP, POLICY, GObject)
struct _WpPolicyClass
......@@ -51,20 +53,32 @@ struct _WpPolicyClass
guint32 *stream_id);
};
WP_API
WpPolicyManager * wp_policy_manager_get_instance (WpCore *core);
WP_API
WpSession * wp_policy_manager_get_session (WpPolicyManager *self);
WP_API
GPtrArray * wp_policy_manager_list_endpoints (WpPolicyManager * self,
const gchar * media_class);
WP_API
guint32 wp_policy_get_rank (WpPolicy *self);
WP_API
WpCore *wp_policy_get_core (WpPolicy *self);
WP_API
void wp_policy_register (WpPolicy *self, WpCore *core);
WP_API
void wp_policy_unregister (WpPolicy *self);
WP_API
void wp_policy_notify_changed (WpPolicy *self);
WP_API
WpBaseEndpoint * wp_policy_find_endpoint (WpCore *core, GVariant *props,
guint32 *stream_id);
......
......@@ -10,6 +10,7 @@
#define __WIREPLUMBER_PROPERTIES_H__
#include <glib-object.h>
#include "defs.h"
G_BEGIN_DECLS
......@@ -17,47 +18,84 @@ struct pw_properties;
struct spa_dict;
#define WP_TYPE_PROPERTIES (wp_properties_get_type ())
WP_API
GType wp_properties_get_type (void);
typedef struct _WpProperties WpProperties;
WP_API
WpProperties * wp_properties_new_empty (void);
WP_API
WpProperties * wp_properties_new (const gchar * key, ...) G_GNUC_NULL_TERMINATED;
WP_API
WpProperties * wp_properties_new_valist (const gchar * key, va_list args);
WP_API
WpProperties * wp_properties_new_string (const gchar * str);
WP_API
WpProperties * wp_properties_new_wrap (struct pw_properties * props);
WP_API
WpProperties * wp_properties_new_take (struct pw_properties * props);
WP_API
WpProperties * wp_properties_new_copy (const struct pw_properties * props);
WP_API
WpProperties * wp_properties_new_wrap_dict (const struct spa_dict * dict);
WP_API
WpProperties * wp_properties_new_copy_dict (const struct spa_dict * dict);
WP_API
WpProperties * wp_properties_copy (WpProperties * other);
WP_API
WpProperties * wp_properties_ref (WpProperties * self);
WP_API
void wp_properties_unref (WpProperties * self);
WP_API
gint wp_properties_update_from_dict (WpProperties * self,
const struct spa_dict * dict);
WP_API
gint wp_properties_copy_keys (WpProperties * src, WpProperties * dst,
const gchar *key1, ...) G_GNUC_NULL_TERMINATED;
WP_API
gint wp_properties_copy_keys_valist (WpProperties * src, WpProperties * dst,
const gchar *key1, va_list args);
WP_API
void wp_properties_copy_all (WpProperties * src, WpProperties * dst);
WP_API
const gchar * wp_properties_get (WpProperties * self, const gchar * key);
WP_API
gint wp_properties_set (WpProperties * self, const gchar * key,
const gchar * value);
WP_API
gint wp_properties_setf (WpProperties * self, const gchar * key,
const gchar * format, ...) G_GNUC_PRINTF(3, 4);
WP_API
gint wp_properties_setf_valist (WpProperties * self, const gchar * key,
const gchar * format, va_list args);
WP_API
const struct spa_dict * wp_properties_peek_dict (WpProperties * self);
WP_API
struct pw_properties * wp_properties_to_pw_properties (WpProperties * self);
WP_API
gboolean wp_properties_matches (WpProperties * self, WpProperties *other);
G_DEFINE_AUTOPTR_CLEANUP_FUNC (WpProperties, wp_properties_unref)
......
......@@ -17,14 +17,20 @@ struct pw_client_info;
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
const struct pw_client_info * wp_proxy_client_get_info (WpProxyClient * self);
WP_API
WpProperties * wp_proxy_client_get_properties (WpProxyClient * self);
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);
......
......@@ -14,8 +14,10 @@
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)
WP_API
WpProperties * wp_proxy_device_get_properties (WpProxyDevice * self);
G_END_DECLS
......
......@@ -16,10 +16,13 @@ G_BEGIN_DECLS
struct pw_link_info;
#define WP_TYPE_PROXY_LINK (wp_proxy_link_get_type ())
WP_API
G_DECLARE_FINAL_TYPE (WpProxyLink, wp_proxy_link, WP, PROXY_LINK, WpProxy)
WP_API
const struct pw_link_info * wp_proxy_link_get_info (WpProxyLink * self);
WP_API
WpProperties * wp_proxy_link_get_properties (WpProxyLink * self);
G_END_DECLS
......
......@@ -17,25 +17,37 @@ struct spa_pod;
struct pw_node_info;
#define WP_TYPE_PROXY_NODE (wp_proxy_node_get_type ())
WP_API
G_DECLARE_FINAL_TYPE (WpProxyNode, wp_proxy_node, WP, PROXY_NODE, WpProxy)
WP_API
const struct pw_node_info * wp_proxy_node_get_info (WpProxyNode * self);
WP_API
WpProperties * wp_proxy_node_get_properties (WpProxyNode * self);
WP_API
void wp_proxy_node_enum_params_collect (WpProxyNode * self,
guint32 id, const struct spa_pod *filter,
GCancellable * cancellable, GAsyncReadyCallback callback,
gpointer user_data);
WP_API
GPtrArray * wp_proxy_node_enum_params_collect_finish (WpProxyNode * self,
GAsyncResult * res, GError ** error);
WP_API
gint wp_proxy_node_enum_params (WpProxyNode * self,
guint32 id, const struct spa_pod *filter);
WP_API
void wp_proxy_node_subscribe_params (WpProxyNode * self, guint32 n_ids, ...);
WP_API
void wp_proxy_node_subscribe_params_array (WpProxyNode * self, guint32 n_ids,
guint32 *ids);
WP_API
void wp_proxy_node_set_param (WpProxyNode * self, guint32 id,
guint32 flags, const struct spa_pod *param);
......
......@@ -17,22 +17,33 @@ struct spa_pod;
struct pw_port_info;
#define WP_TYPE_PROXY_PORT (wp_proxy_port_get_type ())
WP_API
G_DECLARE_FINAL_TYPE (WpProxyPort, wp_proxy_port, WP, PROXY_PORT, WpProxy)
WP_API
const struct pw_port_info * wp_proxy_port_get_info (WpProxyPort * self);
WP_API
WpProperties * wp_proxy_port_get_properties (WpProxyPort * self);
WP_API
void wp_proxy_port_enum_params_collect (WpProxyPort * self,
guint32 id, const struct spa_pod *filter,
GCancellable * cancellable, GAsyncReadyCallback callback,
gpointer user_data);
WP_API
GPtrArray * wp_proxy_port_enum_params_collect_finish (WpProxyPort * self,
GAsyncResult * res, GError ** error);
WP_API
gint wp_proxy_port_enum_params (WpProxyPort * self,
guint32 id, const struct spa_pod *filter);
WP_API
void wp_proxy_port_subscribe_params (WpProxyPort * self, guint32 n_ids, ...);
WP_API
void wp_proxy_port_subscribe_params_array (WpProxyPort * self, guint32 n_ids,
guint32 *ids);
......
......@@ -27,6 +27,7 @@ typedef enum { /*< flags >*/
} WpProxyFeatures;
#define WP_TYPE_PROXY (wp_proxy_get_type ())
WP_API
G_DECLARE_DERIVABLE_TYPE (WpProxy, wp_proxy, WP, PROXY, GObject)
/* The proxy base class */
......@@ -40,32 +41,54 @@ struct _WpProxyClass
void (*pw_proxy_destroyed) (WpProxy * self);
};
WP_API
WpProxy * wp_proxy_new_wrap (WpCore * core, struct pw_proxy * proxy,
const char *type, guint32 version, gpointer local_object);
WP_API
void wp_proxy_augment (WpProxy *self,
WpProxyFeatures wanted_features, GCancellable * cancellable,
GAsyncReadyCallback callback, gpointer user_data);
WP_API
gboolean wp_proxy_augment_finish (WpProxy * self, GAsyncResult * res,
GError ** error);
WP_API
WpProxyFeatures wp_proxy_get_features (WpProxy * self);
WP_API
WpCore * wp_proxy_get_core (WpProxy * self);
WP_API
gboolean wp_proxy_is_global (WpProxy * self);
WP_API
guint32 wp_proxy_get_global_id (WpProxy * self);
WP_API
guint32 wp_proxy_get_global_permissions (WpProxy * self);
WP_API
WpProperties * wp_proxy_get_global_properties (WpProxy * self);
WP_API
const char * wp_proxy_get_interface_type (WpProxy * self);
WP_API
GQuark wp_proxy_get_interface_quark (WpProxy * self);
WP_API
guint32 wp_proxy_get_interface_version (WpProxy * self);
WP_API
struct pw_proxy * wp_proxy_get_pw_proxy (WpProxy * self);
WP_API
void wp_proxy_sync (WpProxy * self, GCancellable * cancellable,
GAsyncReadyCallback callback, gpointer user_data);
WP_API
gboolean wp_proxy_sync_finish (WpProxy * self, GAsyncResult * res,
GError ** error);
......
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