PipeWire
0.3.66
pod/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
#ifdef __cplusplus
9
extern
"C"
{
10
#endif
11
12
#include <
spa/utils/defs.h
>
13
#include <
spa/pod/pod.h
>
14
20
struct
spa_command_body
{
21
struct
spa_pod_object_body
body
;
22
};
23
24
struct
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
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:
pod/command.h:25
spa_command_body::body
struct spa_pod_object_body body
Definition:
pod/command.h:26
spa_command
Definition:
pod/command.h:29
spa_command::body
struct spa_command_body body
Definition:
pod/command.h:31
spa_command::pod
struct spa_pod pod
Definition:
pod/command.h:30
spa_pod_object_body
Definition:
pod/pod.h:177
spa_pod
Definition:
pod/pod.h:43
spa
pod
command.h
Generated by
1.9.1