Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
W
wireplumber
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
pkg
wireplumber
Commits
3b086167
Commit
3b086167
authored
4 years ago
by
George Kiagiadakis
Browse files
Options
Downloads
Patches
Plain Diff
proxy: add _request_destroy() method for destroying remote objects
Useful to destroy links and endpoint-links
parent
bd0ede2c
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
lib/wp/proxy.c
+31
-0
31 additions, 0 deletions
lib/wp/proxy.c
lib/wp/proxy.h
+3
-0
3 additions, 0 deletions
lib/wp/proxy.h
with
34 additions
and
0 deletions
lib/wp/proxy.c
+
31
−
0
View file @
3b086167
...
...
@@ -433,6 +433,7 @@ wp_proxy_class_init (WpProxyClass * klass)
G_TYPE_NONE
,
1
,
G_TYPE_STRING
);
}
/* private */
void
wp_proxy_destroy
(
WpProxy
*
self
)
{
...
...
@@ -445,6 +446,36 @@ wp_proxy_destroy (WpProxy *self)
pw_proxy_destroy
(
priv
->
pw_proxy
);
}
/**
* wp_proxy_request_destroy:
* @self: the proxy
*
* Requests the PipeWire server to destroy the object represented by this proxy.
* If the server allows it, the object will be destroyed and the
* WpProxy::pw-proxy-destroyed signal will be emitted. If the server does
* not allow it, nothing will happen.
*
* This is mostly useful for destroying #WpLink and #WpEndpointLink objects.
*/
void
wp_proxy_request_destroy
(
WpProxy
*
self
)
{
WpProxyPrivate
*
priv
;
g_autoptr
(
WpCore
)
core
=
NULL
;
WpRegistry
*
reg
;
g_return_if_fail
(
WP_IS_PROXY
(
self
));
priv
=
wp_proxy_get_instance_private
(
self
);
core
=
wp_proxy_get_core
(
self
);
if
(
priv
->
pw_proxy
&&
core
)
{
reg
=
wp_core_get_registry
(
core
);
pw_registry_destroy
(
reg
->
pw_registry
,
pw_proxy_get_bound_id
(
priv
->
pw_proxy
));
}
}
void
wp_proxy_augment
(
WpProxy
*
self
,
WpProxyFeatures
ft_wanted
,
GCancellable
*
cancellable
,
...
...
This diff is collapsed.
Click to expand it.
lib/wp/proxy.h
+
3
−
0
View file @
3b086167
...
...
@@ -98,6 +98,9 @@ struct _WpProxyClass
void
(
*
control_changed
)
(
WpProxy
*
self
,
const
char
*
id_name
);
};
WP_API
void
wp_proxy_request_destroy
(
WpProxy
*
self
);
/* features API */
WP_API
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment