Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Julian Bouzas
WirePlumber
Commits
d39307ee
Commit
d39307ee
authored
Nov 07, 2019
by
George Kiagiadakis
Browse files
lib/wp: move internal functions and declarations to a private.h header
parent
857217bc
Changes
13
Hide whitespace changes
Inline
Side-by-side
lib/wp/core.c
View file @
d39307ee
...
...
@@ -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>
...
...
lib/wp/core.h
View file @
d39307ee
...
...
@@ -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
lib/wp/endpoint.c
View file @
d39307ee
...
...
@@ -87,6 +87,7 @@
#include
"endpoint.h"
#include
"error.h"
#include
"factory.h"
#include
"private.h"
typedef
struct
_WpEndpointPrivate
WpEndpointPrivate
;
struct
_WpEndpointPrivate
...
...
lib/wp/factory.c
View file @
d39307ee
...
...
@@ -7,6 +7,7 @@
*/
#include
"factory.h"
#include
"private.h"
struct
_WpFactory
{
...
...
lib/wp/module.c
View file @
d39307ee
...
...
@@ -8,6 +8,7 @@
#include
"module.h"
#include
"error.h"
#include
"private.h"
#include
<gmodule.h>
#define WP_MODULE_INIT_SYMBOL "wireplumber__module_init"
...
...
lib/wp/policy.c
View file @
d39307ee
...
...
@@ -7,6 +7,7 @@
*/
#include
"policy.h"
#include
"private.h"
/* WpPolicyManager */
...
...
lib/wp/private.h
0 → 100644
View file @
d39307ee
/* 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
lib/wp/proxy-client.c
View file @
d39307ee
...
...
@@ -7,6 +7,7 @@
*/
#include
"proxy-client.h"
#include
"private.h"
#include
<pipewire/pipewire.h>
...
...
lib/wp/proxy-link.c
View file @
d39307ee
...
...
@@ -7,6 +7,7 @@
*/
#include
"proxy-link.h"
#include
"private.h"
#include
<pipewire/pipewire.h>
...
...
lib/wp/proxy-node.c
View file @
d39307ee
...
...
@@ -8,6 +8,7 @@
#include
"proxy-node.h"
#include
"error.h"
#include
"private.h"
#include
<pipewire/pipewire.h>
#include
<spa/pod/builder.h>
...
...
lib/wp/proxy-port.c
View file @
d39307ee
...
...
@@ -8,6 +8,7 @@
#include
"proxy-port.h"
#include
"error.h"
#include
"private.h"
#include
<pipewire/pipewire.h>
#include
<spa/pod/builder.h>
...
...
lib/wp/proxy.c
View file @
d39307ee
...
...
@@ -11,6 +11,7 @@
#include
"core.h"
#include
"error.h"
#include
"wpenums.h"
#include
"private.h"
#include
"proxy-client.h"
#include
"proxy-link.h"
...
...
lib/wp/proxy.h
View file @
d39307ee
...
...
@@ -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
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment