PipeWire 0.2.6

control.h
Go to the documentation of this file.
1 /* PipeWire
2 * Copyright (C) 2015 Wim Taymans <wim.taymans@gmail.com>
3 *
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Library General Public
6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version.
8 *
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Library General Public License for more details.
13 *
14 * You should have received a copy of the GNU Library General Public
15 * License along with this library; if not, write to the
16 * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
17 * Boston, MA 02110-1301, USA.
18 */
19
20 #ifndef __PIPEWIRE_CONTROL_H__
21 #define __PIPEWIRE_CONTROL_H__
22
23 #ifdef __cplusplus
24 extern "C" {
25 #endif
26
27 #define PW_TYPE__Control "PipeWire:Object:Control"
28 #define PW_TYPE_CONTROL_BASE PW_TYPE__Control ":"
29
30 #include <spa/utils/hook.h>
31
42 struct pw_control;
43
44 #include <pipewire/core.h>
45 #include <pipewire/introspect.h>
46 #include <pipewire/node.h>
47
49 struct pw_control_events {
50 #define PW_VERSION_PORT_EVENTS 0
51 uint32_t version;
52
54 void (*destroy) (void *data);
55
57 void (*free) (void *data);
58
60 void (*linked) (void *data, struct pw_control *other);
62 void (*unlinked) (void *data, struct pw_control *other);
63
64 };
65
67 struct pw_port *pw_control_get_port(struct pw_control *control);
68
70 void pw_control_add_listener(struct pw_control *control,
71 struct spa_hook *listener,
72 const struct pw_control_events *events,
73 void *data);
74
75 int pw_control_link(struct pw_control *control, struct pw_control *other);
76 int pw_control_unlink(struct pw_control *control, struct pw_control *other);
77
78 #ifdef __cplusplus
79 }
80 #endif
81
82 #endif /* __PIPEWIRE_CONTROL_H__ */
node.h
pw_control_events::version
uint32_t version
Definition: control.h:51
pw_control_events
Port events, use pw_control_add_listener.
Definition: control.h:49
pw_control_get_port
struct pw_port * pw_control_get_port(struct pw_control *control)
Get the control parent port or NULL when not set.
Definition: control.c:124
introspect.h
core.h
pw_control
The control object.
pw_control_add_listener
void pw_control_add_listener(struct pw_control *control, struct spa_hook *listener, const struct pw_control_events *events, void *data)
Add an event listener on the control.
Definition: control.c:130
pw_control_events::unlinked
void(* unlinked)(void *data, struct pw_control *other)
control is unlinked from another control
Definition: control.h:62
pw_control_link
int pw_control_link(struct pw_control *control, struct pw_control *other)
Definition: control.c:139
pw_control_events::free
void(* free)(void *data)
The control is freed.
Definition: control.h:57
pw_control_events::destroy
void(* destroy)(void *data)
The control is destroyed.
Definition: control.h:54
pw_control_events::linked
void(* linked)(void *data, struct pw_control *other)
control is linked to another control
Definition: control.h:60
pw_port
The port object.
pw_control_unlink
int pw_control_unlink(struct pw_control *control, struct pw_control *other)
Definition: control.c:205