PipeWire  0.3.29
utils/type-info.h
Go to the documentation of this file.
1 /* Simple Plugin API
2  *
3  * Copyright © 2018 Wim Taymans
4  *
5  * Permission is hereby granted, free of charge, to any person obtaining a
6  * copy of this software and associated documentation files (the "Software"),
7  * to deal in the Software without restriction, including without limitation
8  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
9  * and/or sell copies of the Software, and to permit persons to whom the
10  * Software is furnished to do so, subject to the following conditions:
11  *
12  * The above copyright notice and this permission notice (including the next
13  * paragraph) shall be included in all copies or substantial portions of the
14  * Software.
15  *
16  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
19  * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
21  * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
22  * DEALINGS IN THE SOFTWARE.
23  */
24 
25 #ifndef SPA_TYPE_INFO_H
26 #define SPA_TYPE_INFO_H
27 
28 #ifdef __cplusplus
29 extern "C" {
30 #endif
31 
32 #include <spa/utils/defs.h>
33 
39 #ifndef SPA_TYPE_ROOT
40 #define SPA_TYPE_ROOT spa_types
41 #endif
42 
43 /* static */ inline bool spa_type_is_a(const char *type, const char *parent)
44 {
45  return type != NULL && parent != NULL && strncmp(type, parent, strlen(parent)) == 0;
46 }
47 
48 #include <spa/utils/type.h>
49 
50 /* base for parameter object enumerations */
51 #define SPA_TYPE_INFO_Direction SPA_TYPE_INFO_ENUM_BASE "Direction"
52 #define SPA_TYPE_INFO_DIRECTION_BASE SPA_TYPE_INFO_Direction ":"
53 
54 /* static */ const struct spa_type_info spa_type_direction[] = {
57  { 0, 0, NULL, NULL }
58 };
59 
60 #include <spa/monitor/type-info.h>
61 #include <spa/node/type-info.h>
62 #include <spa/param/type-info.h>
63 #include <spa/control/type-info.h>
64 
65 /* base for parameter object enumerations */
66 #define SPA_TYPE_INFO_Choice SPA_TYPE_INFO_ENUM_BASE "Choice"
67 #define SPA_TYPE_INFO_CHOICE_BASE SPA_TYPE_INFO_Choice ":"
68 
69 /* static */ const struct spa_type_info spa_type_choice[] = {
75  { 0, 0, NULL, NULL }
76 };
77 
78 /* static */ const struct spa_type_info spa_types[] = {
79  /* Basic types */
101 
106 
110 
114 
127 
128  { 0, 0, NULL, NULL }
129 };
130 
135 #ifdef __cplusplus
136 } /* extern "C" */
137 #endif
138 
139 #endif /* SPA_TYPE_INFO_H */
#define SPA_TYPE_INFO_Event
Definition: x86_64-redhat-linux-gnu/doc/spa/utils/type.h:130
uint32_t type
Definition: x86_64-redhat-linux-gnu/doc/spa/utils/type.h:137
#define SPA_TYPE_INFO_PARAM_Route
Definition: param/type-info.h:352
Definition: x86_64-redhat-linux-gnu/doc/spa/utils/type.h:97
const struct spa_type_info spa_type_param_route[]
Definition: param/type-info.h:355
const struct spa_type_info spa_type_device_event[]
Definition: monitor/type-info.h:47
#define SPA_TYPE_INFO_PARAM_Meta
Definition: param/type-info.h:150
Definition: x86_64-redhat-linux-gnu/doc/spa/utils/type.h:47
#define SPA_TYPE_INFO_COMMAND_BASE
Definition: x86_64-redhat-linux-gnu/doc/spa/utils/type.h:134
#define SPA_TYPE_INFO_POINTER_BASE
Definition: x86_64-redhat-linux-gnu/doc/spa/utils/type.h:125
Definition: x86_64-redhat-linux-gnu/doc/spa/utils/type.h:51
#define SPA_TYPE_INFO_BASE
Definition: x86_64-redhat-linux-gnu/doc/spa/utils/type.h:107
Definition: x86_64-redhat-linux-gnu/doc/spa/utils/type.h:46
Definition: x86_64-redhat-linux-gnu/doc/spa/utils/type.h:45
flags: default, possible flags,...
Definition: pod/pod.h:145
#define SPA_TYPE_INFO_Pointer
Definition: x86_64-redhat-linux-gnu/doc/spa/utils/type.h:124
#define SPA_TYPE_INFO_PARAM_Buffers
Definition: param/type-info.h:284
#define SPA_TYPE_INFO_PARAM_Latency
Definition: param/type-info.h:387
Definition: x86_64-redhat-linux-gnu/doc/spa/utils/type.h:60
Definition: x86_64-redhat-linux-gnu/doc/spa/utils/type.h:94
Definition: x86_64-redhat-linux-gnu/doc/spa/utils/type.h:88
#define SPA_TYPE_INFO_PARAM_Profile
Definition: param/type-info.h:311
Definition: x86_64-redhat-linux-gnu/doc/spa/utils/type.h:83
Definition: x86_64-redhat-linux-gnu/doc/spa/utils/type.h:77
const struct spa_type_info spa_type_param_meta[]
Definition: param/type-info.h:153
Definition: x86_64-redhat-linux-gnu/doc/spa/utils/type.h:49
Definition: x86_64-redhat-linux-gnu/doc/spa/utils/type.h:82
#define SPA_TYPE_INFO_Format
Definition: param/type-info.h:173
Definition: x86_64-redhat-linux-gnu/doc/spa/utils/type.h:96
Definition: x86_64-redhat-linux-gnu/doc/spa/utils/type.h:136
const struct spa_type_info spa_type_props[]
Definition: param/type-info.h:87
const struct spa_type_info spa_types[]
Definition: utils/type-info.h:78
Definition: defs.h:78
#define SPA_TYPE_INFO_Pod
Definition: x86_64-redhat-linux-gnu/doc/spa/utils/type.h:115
const struct spa_type_info spa_type_node_command[]
Definition: node/type-info.h:92
Definition: x86_64-redhat-linux-gnu/doc/spa/utils/type.h:55
Definition: x86_64-redhat-linux-gnu/doc/spa/utils/type.h:56
Definition: x86_64-redhat-linux-gnu/doc/spa/utils/type.h:59
#define SPA_TYPE_INFO_Command
Definition: x86_64-redhat-linux-gnu/doc/spa/utils/type.h:133
#define SPA_TYPE_INFO_Struct
Definition: x86_64-redhat-linux-gnu/doc/spa/utils/type.h:118
Definition: defs.h:79
const struct spa_type_info spa_type_param_latency[]
Definition: param/type-info.h:390
const struct spa_type_info spa_type_format[]
Definition: param/type-info.h:243
const struct spa_type_info spa_type_param_io[]
Definition: param/type-info.h:166
Definition: x86_64-redhat-linux-gnu/doc/spa/utils/type.h:87
Definition: x86_64-redhat-linux-gnu/doc/spa/utils/type.h:58
Definition: x86_64-redhat-linux-gnu/doc/spa/utils/type.h:52
Definition: x86_64-redhat-linux-gnu/doc/spa/utils/type.h:62
#define SPA_TYPE_INFO_DIRECTION_BASE
Definition: utils/type-info.h:52
Definition: x86_64-redhat-linux-gnu/doc/spa/utils/type.h:70
Definition: x86_64-redhat-linux-gnu/doc/spa/utils/type.h:75
#define SPA_TYPE_INFO_PARAM_IO
Base for parameters that describe IO areas to exchange data, control and properties with a node...
Definition: param/type-info.h:163
Definition: x86_64-redhat-linux-gnu/doc/spa/utils/type.h:68
uint32_t parent
Definition: x86_64-redhat-linux-gnu/doc/spa/utils/type.h:138
#define SPA_TYPE_INFO_Profiler
Definition: param/type-info.h:375
#define SPA_TYPE_INFO_PARAM_PortConfig
Definition: param/type-info.h:338
Definition: x86_64-redhat-linux-gnu/doc/spa/utils/type.h:95
no choice, first value is current
Definition: pod/pod.h:141
list: default, alternative,...
Definition: pod/pod.h:144
Definition: x86_64-redhat-linux-gnu/doc/spa/utils/type.h:89
range: default, min, max
Definition: pod/pod.h:142
const struct spa_type_info spa_type_param_buffers[]
Definition: param/type-info.h:290
Definition: x86_64-redhat-linux-gnu/doc/spa/utils/type.h:53
Definition: x86_64-redhat-linux-gnu/doc/spa/utils/type.h:54
const struct spa_type_info spa_type_direction[]
Definition: utils/type-info.h:54
Definition: x86_64-redhat-linux-gnu/doc/spa/utils/type.h:81
Definition: x86_64-redhat-linux-gnu/doc/spa/utils/type.h:48
bool spa_type_is_a(const char *type, const char *parent)
Definition: utils/type-info.h:43
#define SPA_TYPE_INFO_CHOICE_BASE
Definition: utils/type-info.h:67
Definition: x86_64-redhat-linux-gnu/doc/spa/utils/type.h:92
range with step: default, min, max, step
Definition: pod/pod.h:143
Definition: x86_64-redhat-linux-gnu/doc/spa/utils/type.h:64
const struct spa_type_info spa_type_choice[]
Definition: utils/type-info.h:69
Definition: x86_64-redhat-linux-gnu/doc/spa/utils/type.h:44
Definition: x86_64-redhat-linux-gnu/doc/spa/utils/type.h:91
Definition: x86_64-redhat-linux-gnu/doc/spa/utils/type.h:76
const struct spa_type_info spa_type_profiler[]
Definition: param/type-info.h:378
#define SPA_TYPE_INFO_PropInfo
Enum Property info.
Definition: param/type-info.h:136
const struct spa_type_info spa_type_node_event[]
Definition: node/type-info.h:70
Definition: x86_64-redhat-linux-gnu/doc/spa/utils/type.h:71
Definition: x86_64-redhat-linux-gnu/doc/spa/utils/type.h:69
Definition: x86_64-redhat-linux-gnu/doc/spa/utils/type.h:63
#define SPA_TYPE_INFO_Object
Definition: x86_64-redhat-linux-gnu/doc/spa/utils/type.h:121
Definition: x86_64-redhat-linux-gnu/doc/spa/utils/type.h:57
const struct spa_type_info spa_type_param_port_config[]
Definition: param/type-info.h:341
const struct spa_type_info spa_type_prop_info[]
Definition: param/type-info.h:139
Definition: x86_64-redhat-linux-gnu/doc/spa/utils/type.h:90
#define SPA_TYPE_INFO_POD_BASE
Definition: x86_64-redhat-linux-gnu/doc/spa/utils/type.h:116
Definition: x86_64-redhat-linux-gnu/doc/spa/utils/type.h:93
Definition: x86_64-redhat-linux-gnu/doc/spa/utils/type.h:61
#define SPA_TYPE_INFO_EVENT_BASE
Definition: x86_64-redhat-linux-gnu/doc/spa/utils/type.h:131
Definition: x86_64-redhat-linux-gnu/doc/spa/utils/type.h:98
Definition: x86_64-redhat-linux-gnu/doc/spa/utils/type.h:50
#define SPA_TYPE_INFO_Props
Definition: param/type-info.h:70
const struct spa_type_info spa_type_param_profile[]
Definition: param/type-info.h:314