control.h
Go to the documentation of this file.
/* PipeWire
* Copyright (C) 2015 Wim Taymans <wim.taymans@gmail.com>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the
* Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
* Boston, MA 02110-1301, USA.
*/
#ifndef __PIPEWIRE_CONTROL_H__
#define __PIPEWIRE_CONTROL_H__
#ifdef __cplusplus
extern "C" {
#endif
#define PW_TYPE__Control "PipeWire:Object:Control"
#define PW_TYPE_CONTROL_BASE PW_TYPE__Control ":"
#include <spa/utils/hook.h>
struct pw_control;
#include <pipewire/core.h>
#include <pipewire/introspect.h>
#include <pipewire/node.h>
struct pw_control_events {
#define PW_VERSION_PORT_EVENTS 0
uint32_t version;
void (*destroy) (void *data);
void (*free) (void *data);
void (*linked) (void *data, struct pw_control *other);
void (*unlinked) (void *data, struct pw_control *other);
};
struct pw_port *pw_control_get_port(struct pw_control *control);
void pw_control_add_listener(struct pw_control *control,
struct spa_hook *listener,
const struct pw_control_events *events,
void *data);
int pw_control_link(struct pw_control *control, struct pw_control *other);
int pw_control_unlink(struct pw_control *control, struct pw_control *other);
#ifdef __cplusplus
}
#endif
#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