PipeWire  0.3.65
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 #include <spa/utils/enum-types.h>
50 
51 #include <spa/monitor/type-info.h>
52 #include <spa/node/type-info.h>
53 #include <spa/param/type-info.h>
54 #include <spa/control/type-info.h>
55 
56 static const struct spa_type_info spa_types[] = {
57  /* Basic types */
79 
84 
88 
92 
106 
107  { 0, 0, NULL, NULL }
108 };
109 
114 #ifdef __cplusplus
115 } /* extern "C" */
116 #endif
117 
118 #endif /* SPA_TYPE_INFO_H */
Definition: spa/include/spa/utils/type.h:100
#define SPA_TYPE_INFO_Event
Definition: spa/include/spa/utils/type.h:153
uint32_t type
Definition: spa/include/spa/utils/type.h:163
Definition: spa/include/spa/utils/type.h:93
Definition: spa/include/spa/utils/type.h:70
#define SPA_TYPE_INFO_PARAM_Route
Definition: route-types.h:48
Definition: spa/include/spa/utils/type.h:89
Definition: spa/include/spa/utils/type.h:103
static const struct spa_type_info spa_type_param_route[]
Definition: route-types.h:52
Definition: spa/include/spa/utils/type.h:50
#define SPA_TYPE_INFO_PARAM_Meta
Definition: buffers-types.h:48
Definition: spa/include/spa/utils/type.h:69
#define SPA_TYPE_INFO_COMMAND_BASE
Definition: spa/include/spa/utils/type.h:160
#define SPA_TYPE_INFO_POINTER_BASE
Definition: spa/include/spa/utils/type.h:145
#define SPA_TYPE_INFO_BASE
Definition: spa/include/spa/utils/type.h:115
spa/monitor/type-info.h
Definition: spa/include/spa/utils/type.h:51
static const struct spa_type_info spa_type_device_event[]
Definition: monitor/type-info.h:61
#define SPA_TYPE_INFO_Pointer
Definition: spa/include/spa/utils/type.h:143
#define SPA_TYPE_INFO_PARAM_Buffers
Definition: buffers-types.h:75
#define SPA_TYPE_INFO_PARAM_Latency
Definition: latency-types.h:47
Definition: spa/include/spa/utils/type.h:82
Definition: spa/include/spa/utils/type.h:54
Definition: spa/include/spa/utils/type.h:94
Definition: spa/include/spa/utils/type.h:66
spa/utils/defs.h
#define SPA_TYPE_INFO_PARAM_Profile
Definition: profile-types.h:47
Definition: spa/include/spa/utils/type.h:61
spa/utils/type.h
static const struct spa_type_info spa_type_param_meta[]
Definition: buffers-types.h:52
Definition: spa/include/spa/utils/type.h:97
#define SPA_TYPE_INFO_Format
Definition: format-types.h:49
Definition: spa/include/spa/utils/type.h:162
Definition: spa/include/spa/utils/type.h:64
static const struct spa_type_info spa_type_props[]
Definition: props-types.h:52
static const struct spa_type_info spa_types[]
Definition: utils/type-info.h:62
#define SPA_TYPE_INFO_Pod
Definition: spa/include/spa/utils/type.h:128
Definition: spa/include/spa/utils/type.h:95
Definition: spa/include/spa/utils/type.h:102
#define SPA_TYPE_INFO_PARAM_ProcessLatency
Definition: latency-types.h:64
static const struct spa_type_info spa_type_node_command[]
Definition: node/type-info.h:105
Definition: spa/include/spa/utils/type.h:74
#define SPA_TYPE_INFO_Command
Definition: spa/include/spa/utils/type.h:158
#define SPA_TYPE_INFO_Struct
Definition: spa/include/spa/utils/type.h:133
static const struct spa_type_info spa_type_param_latency[]
Definition: latency-types.h:51
static const struct spa_type_info spa_type_format[]
Definition: format-types.h:148
static const struct spa_type_info spa_type_param_io[]
Definition: buffers-types.h:67
Definition: spa/include/spa/utils/type.h:104
Definition: spa/include/spa/utils/type.h:76
#define SPA_TYPE_INFO_PARAM_IO
Base for parameters that describe IO areas to exchange data, control and properties with a node...
Definition: buffers-types.h:63
uint32_t parent
Definition: spa/include/spa/utils/type.h:164
#define SPA_TYPE_INFO_Profiler
Definition: profiler-types.h:46
#define SPA_TYPE_INFO_PARAM_PortConfig
Definition: port-config-types.h:60
Definition: spa/include/spa/utils/type.h:96
Definition: spa/include/spa/utils/type.h:101
Definition: spa/include/spa/utils/type.h:99
static const struct spa_type_info spa_type_param_buffers[]
Definition: buffers-types.h:84
Definition: spa/include/spa/utils/type.h:98
Definition: spa/include/spa/utils/type.h:56
static const struct spa_type_info spa_type_param_process_latency[]
Definition: latency-types.h:68
Definition: spa/include/spa/utils/type.h:67
Definition: spa/include/spa/utils/type.h:59
static const struct spa_type_info spa_type_profiler[]
Definition: profiler-types.h:50
Definition: spa/include/spa/utils/type.h:58
#define SPA_TYPE_INFO_PropInfo
Enum Property info.
Definition: props-types.h:104
Definition: spa/include/spa/utils/type.h:55
static const struct spa_type_info spa_type_node_event[]
Definition: node/type-info.h:80
Definition: spa/include/spa/utils/type.h:75
Definition: spa/include/spa/utils/type.h:105
Definition: spa/include/spa/utils/type.h:52
spa/node/type-info.h
Definition: spa/include/spa/utils/type.h:62
static bool spa_type_is_a(const char *type, const char *parent)
Definition: utils/type-info.h:49
Definition: spa/include/spa/utils/type.h:65
#define SPA_TYPE_INFO_Object
Definition: spa/include/spa/utils/type.h:138
static const struct spa_type_info spa_type_param_port_config[]
Definition: port-config-types.h:64
spa/control/type-info.h
Definition: spa/include/spa/utils/type.h:77
static const struct spa_type_info spa_type_prop_info[]
Definition: props-types.h:108
Definition: spa/include/spa/utils/type.h:87
#define SPA_TYPE_INFO_POD_BASE
Definition: spa/include/spa/utils/type.h:130
Definition: spa/include/spa/utils/type.h:88
Definition: spa/include/spa/utils/type.h:68
#define SPA_TYPE_INFO_EVENT_BASE
Definition: spa/include/spa/utils/type.h:155
Definition: spa/include/spa/utils/type.h:63
Definition: spa/include/spa/utils/type.h:60
Definition: spa/include/spa/utils/type.h:81
Definition: spa/include/spa/utils/type.h:57
Definition: spa/include/spa/utils/type.h:83
#define SPA_TYPE_INFO_Props
Props Param.
Definition: props-types.h:48
static const struct spa_type_info spa_type_param_profile[]
Definition: profile-types.h:51
Definition: spa/include/spa/utils/type.h:53