Commit d39307ee authored by George Kiagiadakis's avatar George Kiagiadakis
Browse files

lib/wp: move internal functions and declarations to a private.h header

parent 857217bc
......@@ -9,6 +9,7 @@
#include "core.h"
#include "proxy.h"
#include "wpenums.h"
#include "private.h"
#include <pipewire/pipewire.h>
#include <spa/utils/result.h>
......
......@@ -52,43 +52,6 @@ WpProxy * wp_core_create_remote_object (WpCore * self,
const gchar * factory_name, guint32 interface_type,
guint32 interface_version, WpProperties * properties);
/* private */
struct pw_core_proxy;
struct pw_registry_proxy;
struct pw_core_proxy * wp_core_get_pw_core_proxy (WpCore * self);
struct pw_registry_proxy * wp_core_get_pw_registry_proxy (WpCore * self);
enum {
WP_CORE_FOREACH_GLOBAL_DONE = FALSE,
WP_CORE_FOREACH_GLOBAL_CONTINUE = TRUE,
};
typedef gboolean (*WpCoreForeachGlobalFunc) (GQuark key, gpointer global,
gpointer user_data);
gpointer wp_core_get_global (WpCore * self, GQuark key);
void wp_core_foreach_global (WpCore * self, WpCoreForeachGlobalFunc callback,
gpointer user_data);
void wp_core_register_global (WpCore * self, GQuark key, gpointer obj,
GDestroyNotify destroy_obj);
void wp_core_remove_global (WpCore * self, GQuark key, gpointer obj);
#define WP_GLOBAL_ENDPOINT (wp_global_endpoint_quark ())
GQuark wp_global_endpoint_quark (void);
#define WP_GLOBAL_FACTORY (wp_global_factory_quark ())
GQuark wp_global_factory_quark (void);
#define WP_GLOBAL_MODULE (wp_global_module_quark ())
GQuark wp_global_module_quark (void);
#define WP_GLOBAL_POLICY_MANAGER (wp_global_policy_manager_quark ())
GQuark wp_global_policy_manager_quark (void);
G_END_DECLS
#endif
......@@ -87,6 +87,7 @@
#include "endpoint.h"
#include "error.h"
#include "factory.h"
#include "private.h"
typedef struct _WpEndpointPrivate WpEndpointPrivate;
struct _WpEndpointPrivate
......
......@@ -7,6 +7,7 @@
*/
#include "factory.h"
#include "private.h"
struct _WpFactory
{
......
......@@ -8,6 +8,7 @@
#include "module.h"
#include "error.h"
#include "private.h"
#include <gmodule.h>
#define WP_MODULE_INIT_SYMBOL "wireplumber__module_init"
......
......@@ -7,6 +7,7 @@
*/
#include "policy.h"
#include "private.h"
/* WpPolicyManager */
......
/* WirePlumber
*
* Copyright © 2019 Collabora Ltd.
* @author George Kiagiadakis <george.kiagiadakis@collabora.com>
*
* SPDX-License-Identifier: MIT
*/
#ifndef __WIREPLUMBER_PRIVATE_H__
#define __WIREPLUMBER_PRIVATE_H__
G_BEGIN_DECLS
/* core */
struct pw_core_proxy;
struct pw_registry_proxy;
struct pw_core_proxy * wp_core_get_pw_core_proxy (WpCore * self);
struct pw_registry_proxy * wp_core_get_pw_registry_proxy (WpCore * self);
enum {
WP_CORE_FOREACH_GLOBAL_DONE = FALSE,
WP_CORE_FOREACH_GLOBAL_CONTINUE = TRUE,
};
typedef gboolean (*WpCoreForeachGlobalFunc) (GQuark key, gpointer global,
gpointer user_data);
gpointer wp_core_get_global (WpCore * self, GQuark key);
void wp_core_foreach_global (WpCore * self, WpCoreForeachGlobalFunc callback,
gpointer user_data);
void wp_core_register_global (WpCore * self, GQuark key, gpointer obj,
GDestroyNotify destroy_obj);
void wp_core_remove_global (WpCore * self, GQuark key, gpointer obj);
#define WP_GLOBAL_ENDPOINT (wp_global_endpoint_quark ())
GQuark wp_global_endpoint_quark (void);
#define WP_GLOBAL_FACTORY (wp_global_factory_quark ())
GQuark wp_global_factory_quark (void);
#define WP_GLOBAL_MODULE (wp_global_module_quark ())
GQuark wp_global_module_quark (void);
#define WP_GLOBAL_POLICY_MANAGER (wp_global_policy_manager_quark ())
GQuark wp_global_policy_manager_quark (void);
/* proxy */
void wp_proxy_set_feature_ready (WpProxy * self, WpProxyFeatures feature);
void wp_proxy_augment_error (WpProxy * self, GError * error);
void wp_proxy_register_async_task (WpProxy * self, int seq, GTask * task);
GTask * wp_proxy_find_async_task (WpProxy * self, int seq, gboolean steal);
G_END_DECLS
#endif
......@@ -7,6 +7,7 @@
*/
#include "proxy-client.h"
#include "private.h"
#include <pipewire/pipewire.h>
......
......@@ -7,6 +7,7 @@
*/
#include "proxy-link.h"
#include "private.h"
#include <pipewire/pipewire.h>
......
......@@ -8,6 +8,7 @@
#include "proxy-node.h"
#include "error.h"
#include "private.h"
#include <pipewire/pipewire.h>
#include <spa/pod/builder.h>
......
......@@ -8,6 +8,7 @@
#include "proxy-port.h"
#include "error.h"
#include "private.h"
#include <pipewire/pipewire.h>
#include <spa/pod/builder.h>
......
......@@ -11,6 +11,7 @@
#include "core.h"
#include "error.h"
#include "wpenums.h"
#include "private.h"
#include "proxy-client.h"
#include "proxy-link.h"
......
......@@ -73,14 +73,6 @@ void wp_proxy_sync (WpProxy * self, GCancellable * cancellable,
gboolean wp_proxy_sync_finish (WpProxy * self, GAsyncResult * res,
GError ** error);
/* for subclasses only */
void wp_proxy_set_feature_ready (WpProxy * self, WpProxyFeatures feature);
void wp_proxy_augment_error (WpProxy * self, GError * error);
void wp_proxy_register_async_task (WpProxy * self, int seq, GTask * task);
GTask * wp_proxy_find_async_task (WpProxy * self, int seq, gboolean steal);
G_END_DECLS
#endif
Markdown is supported
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