PipeWire: spa/pod/command.h Source File

PipeWire 1.6.5

Loading...
Searching...
No Matches
command.h
Go to the documentation of this file.
1/* Simple Plugin API */
2/* SPDX-FileCopyrightText: Copyright © 2018 Wim Taymans */
3/* SPDX-License-Identifier: MIT */
4
5#ifndef SPA_COMMAND_H
6#define SPA_COMMAND_H
7
8#include <spa/utils/defs.h>
9#include <spa/pod/pod.h>
10
11#ifdef __cplusplus
12extern "C" {
13#endif
14
19
20struct spa_command_body {
21 struct spa_pod_object_body body;
22};
23
24struct spa_command {
25 struct spa_pod pod;
26 struct spa_command_body body;
27};
28
29#define SPA_COMMAND_TYPE(cmd) ((cmd)->body.body.type)
30#define SPA_COMMAND_ID(cmd,type) (SPA_COMMAND_TYPE(cmd) == (type) ? \
31 (cmd)->body.body.id : SPA_ID_INVALID)
32
33#define SPA_COMMAND_INIT_FULL(t,size,type,id,...) ((t) \
34 { { (size), SPA_TYPE_Object }, \
35 { { (type), (id) }, ##__VA_ARGS__ } })
36
37#define SPA_COMMAND_INIT(type,id) \
38 SPA_COMMAND_INIT_FULL(struct spa_command, \
39 sizeof(struct spa_command_body), type, id)
40
42
43 */
44
45#ifdef __cplusplus
46} /* extern "C" */
47#endif
48
49#endif /* SPA_COMMAND_H */
defs.h
spa/utils/defs.h
pod.h
spa/pod/pod.h
spa_command_body
Definition command.h:25
spa_command_body::body
struct spa_pod_object_body body
Definition command.h:26
spa_command
Definition command.h:29
spa_command::pod
struct spa_pod pod
Definition command.h:30
spa_pod
Definition pod.h:57