Don't use __ in defines or declarations, it's reserved

SPA_TYPE -> SPA_TYPE_INFO for type info strings
improve includes

Fixes #115
This commit is contained in:
Wim Taymans 2019-01-14 12:58:23 +01:00
parent 6856f02cab
commit 3dc6820e9e
146 changed files with 890 additions and 951 deletions

View file

@ -23,8 +23,8 @@
* DEALINGS IN THE SOFTWARE.
*/
#ifndef __PIPEWIRE_DAEMON_CONFIG_H__
#define __PIPEWIRE_DAEMON_CONFIG_H__
#ifndef PIPEWIRE_DAEMON_CONFIG_H
#define PIPEWIRE_DAEMON_CONFIG_H
#ifdef __cplusplus
extern "C" {
@ -50,4 +50,4 @@ int pw_daemon_config_run_commands(struct pw_daemon_config *config, struct pw_cor
}
#endif
#endif /* __PIPEWIRE_DAEMON_CONFIG_H__ */
#endif /* PIPEWIRE_DAEMON_CONFIG_H */

View file

@ -34,8 +34,6 @@
#include <spa/debug/pod.h>
#include <pipewire/pipewire.h>
#include <pipewire/module.h>
#include <pipewire/factory.h>
#define WIDTH 640
#define HEIGHT 480

View file

@ -30,7 +30,6 @@
#include <spa/param/props.h>
#include <pipewire/pipewire.h>
#include <pipewire/factory.h>
struct data {
struct pw_main_loop *loop;

View file

@ -37,8 +37,6 @@
#include <spa/debug/format.h>
#include <pipewire/pipewire.h>
#include <pipewire/module.h>
#include <pipewire/factory.h>
struct data {
SDL_Renderer *renderer;

View file

@ -36,12 +36,7 @@
#include <spa/param/props.h>
#include <spa/debug/pod.h>
#include "pipewire/core.h"
#include "pipewire/control.h"
#include "pipewire/link.h"
#include "pipewire/log.h"
#include "pipewire/module.h"
#include "pipewire/type.h"
#include "pipewire/pipewire.h"
#include "pipewire/private.h"
#define NAME "media-session"

View file

@ -22,8 +22,8 @@
* DEALINGS IN THE SOFTWARE.
*/
#ifndef __PIPEWIRE_EXT_CLIENT_NODE_H__
#define __PIPEWIRE_EXT_CLIENT_NODE_H__
#ifndef PIPEWIRE_EXT_CLIENT_NODE_H
#define PIPEWIRE_EXT_CLIENT_NODE_H
#ifdef __cplusplus
extern "C" {
@ -389,4 +389,4 @@ pw_client_node_proxy_add_listener(struct pw_client_node_proxy *p,
} /* extern "C" */
#endif
#endif /* __PIPEWIRE_EXT_CLIENT_NODE_H__ */
#endif /* PIPEWIRE_EXT_CLIENT_NODE_H */

View file

@ -22,8 +22,8 @@
* DEALINGS IN THE SOFTWARE.
*/
#ifndef __PIPEWIRE_EXT_PROTOCOL_NATIVE_H__
#define __PIPEWIRE_EXT_PROTOCOL_NATIVE_H__
#ifndef PIPEWIRE_EXT_PROTOCOL_NATIVE_H
#define PIPEWIRE_EXT_PROTOCOL_NATIVE_H
#ifdef __cplusplus
extern "C" {
@ -33,7 +33,7 @@ extern "C" {
#include <spa/param/param.h>
#include <spa/node/node.h>
#define PW_TYPE_PROTOCOL__Native PW_TYPE_PROTOCOL_BASE "Native"
#define PW_TYPE_INFO_PROTOCOL_Native PW_TYPE_INFO_PROTOCOL_BASE "Native"
struct pw_protocol_native_demarshal {
int (*func) (void *object, void *data, size_t size);
@ -79,4 +79,4 @@ struct pw_protocol_native_ext {
} /* extern "C" */
#endif
#endif /* __PIPEWIRE_EXT_PROTOCOL_NATIVE_H__ */
#endif /* PIPEWIRE_EXT_PROTOCOL_NATIVE_H */

View file

@ -32,13 +32,7 @@
#include "config.h"
#include "pipewire/core.h"
#include "pipewire/interfaces.h"
#include "pipewire/link.h"
#include "pipewire/log.h"
#include "pipewire/module.h"
#include "pipewire/properties.h"
#include "pipewire/utils.h"
#include <pipewire/pipewire.h>
static const struct spa_dict_item module_props[] = {
{ PW_MODULE_PROP_AUTHOR, "Wim Taymans <wim.taymans@gmail.com>" },

View file

@ -34,10 +34,7 @@
#include <spa/param/audio/format-utils.h>
#include <spa/pod/filter.h>
#include "pipewire/core.h"
#include "pipewire/interfaces.h"
#include "pipewire/log.h"
#include "pipewire/module.h"
#include <pipewire/pipewire.h>
#include "pipewire/private.h"
#include "module-audio-dsp/audio-dsp.h"

View file

@ -36,11 +36,7 @@
#include <spa/utils/type-info.h>
#include <spa/param/audio/type-info.h>
#include "pipewire/core.h"
#include "pipewire/link.h"
#include "pipewire/log.h"
#include "pipewire/module.h"
#include "pipewire/type.h"
#include "pipewire/pipewire.h"
#include "pipewire/private.h"
#include "modules/spa/spa-node.h"

View file

@ -22,8 +22,8 @@
* DEALINGS IN THE SOFTWARE.
*/
#ifndef __PIPEWIRE_AUDIO_DSP_H__
#define __PIPEWIRE_AUDIO_DSP_H__
#ifndef PIPEWIRE_AUDIO_DSP_H
#define PIPEWIRE_AUDIO_DSP_H
#include <pipewire/core.h>
#include <pipewire/node.h>
@ -45,4 +45,4 @@ void *pw_audio_dsp_get_user_data(struct pw_node *node);
}
#endif
#endif /* __PIPEWIRE_AUDIO_DSP_H__ */
#endif /* PIPEWIRE_AUDIO_DSP_H */

View file

@ -29,10 +29,7 @@
#include "config.h"
#include "pipewire/core.h"
#include "pipewire/interfaces.h"
#include "pipewire/log.h"
#include "pipewire/module.h"
#include <pipewire/pipewire.h>
#include "module-client-node/client-node.h"
#include "module-client-node/client-stream.h"

View file

@ -37,11 +37,9 @@
#include <spa/pod/filter.h>
#include <spa/debug/types.h>
#include "pipewire/pipewire.h"
#include "pipewire/interfaces.h"
#include <pipewire/pipewire.h>
#include "pipewire/private.h"
#include "pipewire/core.h"
#include "modules/spa/spa-node.h"
#include "client-node.h"

View file

@ -22,8 +22,8 @@
* DEALINGS IN THE SOFTWARE.
*/
#ifndef __PIPEWIRE_CLIENT_NODE_H__
#define __PIPEWIRE_CLIENT_NODE_H__
#ifndef PIPEWIRE_CLIENT_NODE_H
#define PIPEWIRE_CLIENT_NODE_H
#include <pipewire/node.h>
#include <extensions/client-node.h>
@ -58,4 +58,4 @@ void pw_client_node_registered(struct pw_client_node *node, uint32_t node_id);
}
#endif
#endif /* __PIPEWIRE_CLIENT_NODE_H__ */
#endif /* PIPEWIRE_CLIENT_NODE_H */

View file

@ -22,8 +22,8 @@
* DEALINGS IN THE SOFTWARE.
*/
#ifndef __PIPEWIRE_CLIENT_STREAM_H__
#define __PIPEWIRE_CLIENT_STREAM_H__
#ifndef PIPEWIRE_CLIENT_STREAM_H
#define PIPEWIRE_CLIENT_STREAM_H
#include <pipewire/node.h>
@ -51,4 +51,4 @@ pw_client_stream_destroy(struct pw_client_stream *stream);
}
#endif
#endif /* __PIPEWIRE_CLIENT_STREAM_H__ */
#endif /* PIPEWIRE_CLIENT_STREAM_H */

View file

@ -26,13 +26,10 @@
#include <spa/pod/parser.h>
#include "pipewire/pipewire.h"
#include "pipewire/interfaces.h"
#include "pipewire/protocol.h"
#include "pipewire/client.h"
#include <pipewire/pipewire.h>
#include "extensions/protocol-native.h"
#include "extensions/client-node.h"
#include <extensions/protocol-native.h>
#include <extensions/client-node.h>
static void
client_node_marshal_done(void *object, int seq, int res)
@ -928,7 +925,7 @@ struct pw_protocol *pw_protocol_native_ext_client_node_init(struct pw_core *core
{
struct pw_protocol *protocol;
protocol = pw_core_find_protocol(core, PW_TYPE_PROTOCOL__Native);
protocol = pw_core_find_protocol(core, PW_TYPE_INFO_PROTOCOL_Native);
if (protocol == NULL)
return NULL;

View file

@ -29,11 +29,7 @@
#include "config.h"
#include "pipewire/core.h"
#include "pipewire/interfaces.h"
#include "pipewire/log.h"
#include "pipewire/module.h"
#include "pipewire/link.h"
#include <pipewire/pipewire.h>
#include "pipewire/private.h"
static const struct spa_dict_item module_props[] = {

View file

@ -42,21 +42,10 @@
#include <systemd/sd-daemon.h>
#endif
#include "pipewire/pipewire.h"
#include <pipewire/pipewire.h>
#include <extensions/protocol-native.h>
#include "pipewire/private.h"
#include "pipewire/log.h"
#include "pipewire/interfaces.h"
#include "pipewire/core.h"
#include "pipewire/node.h"
#include "pipewire/module.h"
#include "pipewire/client.h"
#include "pipewire/resource.h"
#include "pipewire/link.h"
#include "pipewire/factory.h"
#include "pipewire/data-loop.h"
#include "pipewire/main-loop.h"
#include "extensions/protocol-native.h"
#include "modules/module-protocol-native/connection.h"
#include "modules/module-protocol-native/defs.h"
@ -854,10 +843,10 @@ static int module_init(struct pw_module *module, struct pw_properties *propertie
const char *val;
struct protocol_data *d;
if (pw_core_find_protocol(core, PW_TYPE_PROTOCOL__Native) != NULL)
if (pw_core_find_protocol(core, PW_TYPE_INFO_PROTOCOL_Native) != NULL)
return 0;
this = pw_protocol_new(core, PW_TYPE_PROTOCOL__Native, sizeof(struct protocol_data));
this = pw_protocol_new(core, PW_TYPE_INFO_PROTOCOL_Native, sizeof(struct protocol_data));
if (this == NULL)
return -ENOMEM;

View file

@ -33,7 +33,7 @@
#include <spa/debug/pod.h>
#include <pipewire/pipewire.h>
#include <pipewire/private.h>
#include "pipewire/private.h"
#include "connection.h"

View file

@ -22,8 +22,8 @@
* DEALINGS IN THE SOFTWARE.
*/
#ifndef __PIPEWIRE_PROTOCOL_NATIVE_CONNECTION_H__
#define __PIPEWIRE_PROTOCOL_NATIVE_CONNECTION_H__
#ifndef PIPEWIRE_PROTOCOL_NATIVE_CONNECTION_H
#define PIPEWIRE_PROTOCOL_NATIVE_CONNECTION_H
#ifdef __cplusplus
extern "C" {
@ -104,4 +104,4 @@ pw_protocol_native_connection_clear(struct pw_protocol_native_connection *conn);
} /* extern "C" */
#endif
#endif /* __PIPEWIRE_PROTOCOL_NATIVE_CONNECTION_H__ */
#endif /* PIPEWIRE_PROTOCOL_NATIVE_CONNECTION_H */

View file

@ -35,7 +35,6 @@
#include <sys/file.h>
#include <pipewire/pipewire.h>
#include <pipewire/private.h>
static const char *
get_remote(const struct pw_properties *properties)

View file

@ -31,7 +31,6 @@
#include <sys/socket.h>
#include <pipewire/pipewire.h>
#include <pipewire/private.h>
int pw_protocol_native_connect_portal_screencast(struct pw_protocol_client *client,
void (*done_callback) (void *data, int res),

View file

@ -25,13 +25,10 @@
#include <stdio.h>
#include <errno.h>
#include "spa/pod/parser.h"
#include <spa/pod/parser.h>
#include "pipewire/pipewire.h"
#include "pipewire/protocol.h"
#include "pipewire/interfaces.h"
#include "pipewire/resource.h"
#include "extensions/protocol-native.h"
#include <pipewire/pipewire.h>
#include <extensions/protocol-native.h>
#include "connection.h"

View file

@ -39,12 +39,7 @@
#include <spa/support/dbus.h>
#include "pipewire/core.h"
#include "pipewire/interfaces.h"
#include "pipewire/link.h"
#include "pipewire/log.h"
#include "pipewire/module.h"
#include "pipewire/utils.h"
#include <pipewire/pipewire.h>
static const struct spa_dict_item module_props[] = {
{ PW_MODULE_PROP_AUTHOR, "Wim Taymans <wim.taymans@gmail.com>" },

View file

@ -29,10 +29,7 @@
#include "config.h"
#include "pipewire/interfaces.h"
#include "pipewire/core.h"
#include "pipewire/log.h"
#include "pipewire/module.h"
#include "pipewire/pipewire.h"
#include "spa-node.h"

View file

@ -39,6 +39,7 @@
#include "pipewire/port.h"
#include "pipewire/log.h"
#include "pipewire/private.h"
#include "pipewire/pipewire.h"
struct impl {
struct pw_device *this;

View file

@ -22,8 +22,8 @@
* DEALINGS IN THE SOFTWARE.
*/
#ifndef __PIPEWIRE_SPA_DEVICE_H__
#define __PIPEWIRE_SPA_DEVICE_H__
#ifndef PIPEWIRE_SPA_DEVICE_H
#define PIPEWIRE_SPA_DEVICE_H
#include <spa/monitor/device.h>
@ -67,4 +67,4 @@ void *pw_spa_device_get_user_data(struct pw_device *device);
}
#endif
#endif /* __PIPEWIRE_SPA_DEVICE_H__ */
#endif /* PIPEWIRE_SPA_DEVICE_H */

View file

@ -22,8 +22,8 @@
* DEALINGS IN THE SOFTWARE.
*/
#ifndef __PIPEWIRE_SPA_MONITOR_H__
#define __PIPEWIRE_SPA_MONITOR_H__
#ifndef PIPEWIRE_SPA_MONITOR_H
#define PIPEWIRE_SPA_MONITOR_H
#include <spa/monitor/monitor.h>
@ -59,4 +59,4 @@ pw_spa_monitor_destroy(struct pw_spa_monitor *monitor);
}
#endif
#endif /* __PIPEWIRE_SPA_MONITOR_H__ */
#endif /* PIPEWIRE_SPA_MONITOR_H */

View file

@ -22,8 +22,8 @@
* DEALINGS IN THE SOFTWARE.
*/
#ifndef __PIPEWIRE_SPA_NODE_H__
#define __PIPEWIRE_SPA_NODE_H__
#ifndef PIPEWIRE_SPA_NODE_H
#define PIPEWIRE_SPA_NODE_H
#include <spa/node/node.h>
@ -69,4 +69,4 @@ void *pw_spa_node_get_user_data(struct pw_node *node);
}
#endif
#endif /* __PIPEWIRE_SPA_NODE_H__ */
#endif /* PIPEWIRE_SPA_NODE_H */

View file

@ -22,8 +22,8 @@
* DEALINGS IN THE SOFTWARE.
*/
#ifndef __PIPEWIRE_ARRAY_H__
#define __PIPEWIRE_ARRAY_H__
#ifndef PIPEWIRE_ARRAY_H
#define PIPEWIRE_ARRAY_H
#ifdef __cplusplus
extern "C" {
@ -152,4 +152,4 @@ static inline void *pw_array_add_fixed(struct pw_array *arr, size_t size)
} /* extern "C" */
#endif
#endif /* __PIPEWIRE_ARRAY_H__ */
#endif /* PIPEWIRE_ARRAY_H */

View file

@ -25,12 +25,11 @@
#include <errno.h>
#include <string.h>
#include "pipewire/pipewire.h"
#include "pipewire/interfaces.h"
#include "pipewire/client.h"
#include "pipewire/private.h"
#include "pipewire/resource.h"
#include "pipewire/type.h"
/** \cond */
struct impl {

View file

@ -22,8 +22,8 @@
* DEALINGS IN THE SOFTWARE.
*/
#ifndef __PIPEWIRE_CLIENT_H__
#define __PIPEWIRE_CLIENT_H__
#ifndef PIPEWIRE_CLIENT_H
#define PIPEWIRE_CLIENT_H
#ifdef __cplusplus
extern "C" {
@ -187,4 +187,4 @@ void pw_client_set_busy(struct pw_client *client, bool busy);
}
#endif
#endif /* __PIPEWIRE_CLIENT_H__ */
#endif /* PIPEWIRE_CLIENT_H */

View file

@ -29,7 +29,6 @@
#include <unistd.h>
#include <limits.h>
#include <pipewire/pipewire.h>
#include <pipewire/utils.h>
#include <pipewire/module.h>

View file

@ -23,8 +23,8 @@
* DEALINGS IN THE SOFTWARE.
*/
#ifndef __PIPEWIRE_COMMAND_H__
#define __PIPEWIRE_COMMAND_H__
#ifndef PIPEWIRE_COMMAND_H
#define PIPEWIRE_COMMAND_H
#ifdef __cplusplus
extern "C" {
@ -51,4 +51,4 @@ int pw_command_run(struct pw_command *command, struct pw_core *core, char **err)
}
#endif
#endif /* __PIPEWIRE_COMMAND_H__ */
#endif /* PIPEWIRE_COMMAND_H */

View file

@ -22,8 +22,8 @@
* DEALINGS IN THE SOFTWARE.
*/
#ifndef __PIPEWIRE_CONTROL_H__
#define __PIPEWIRE_CONTROL_H__
#ifndef PIPEWIRE_CONTROL_H
#define PIPEWIRE_CONTROL_H
#ifdef __cplusplus
extern "C" {
@ -81,4 +81,4 @@ int pw_control_unlink(struct pw_control *control, struct pw_control *other);
}
#endif
#endif /* __PIPEWIRE_CONTROL_H__ */
#endif /* PIPEWIRE_CONTROL_H */

View file

@ -39,6 +39,10 @@
#include <pipewire/core.h>
#include <pipewire/data-loop.h>
#include <pipewire/device.h>
#include <pipewire/map.h>
#include <pipewire/type.h>
#include <pipewire/module.h>
#include <pipewire/version.h>
/** \cond */
struct impl {

View file

@ -22,8 +22,8 @@
* DEALINGS IN THE SOFTWARE.
*/
#ifndef __PIPEWIRE_CORE_H__
#define __PIPEWIRE_CORE_H__
#ifndef PIPEWIRE_CORE_H
#define PIPEWIRE_CORE_H
#ifdef __cplusplus
extern "C" {
@ -42,13 +42,11 @@ extern "C" {
*/
struct pw_core;
#include <pipewire/type.h>
#include <pipewire/client.h>
#include <pipewire/global.h>
#include <pipewire/introspect.h>
#include <pipewire/global.h>
#include <pipewire/loop.h>
#include <pipewire/factory.h>
#include <pipewire/port.h>
#include <pipewire/properties.h>
/** \page page_core_api Core API
@ -164,4 +162,4 @@ pw_core_find_factory(struct pw_core *core /**< the core */,
}
#endif
#endif /* __PIPEWIRE_CORE_H__ */
#endif /* PIPEWIRE_CORE_H */

View file

@ -22,8 +22,8 @@
* DEALINGS IN THE SOFTWARE.
*/
#ifndef __PIPEWIRE_DATA_LOOP_H__
#define __PIPEWIRE_DATA_LOOP_H__
#ifndef PIPEWIRE_DATA_LOOP_H
#define PIPEWIRE_DATA_LOOP_H
#ifdef __cplusplus
extern "C" {
@ -79,4 +79,4 @@ bool pw_data_loop_in_thread(struct pw_data_loop *loop);
}
#endif
#endif /* __PIPEWIRE_DATA_LOOP_H__ */
#endif /* PIPEWIRE_DATA_LOOP_H */

View file

@ -26,9 +26,10 @@
#include <spa/debug/types.h>
#include "pipewire/pipewire.h"
#include "pipewire/device.h"
#include "pipewire/private.h"
#include "pipewire/interfaces.h"
#include "pipewire/type.h"
struct resource_data {
struct spa_hook resource_listener;

View file

@ -22,8 +22,8 @@
* DEALINGS IN THE SOFTWARE.
*/
#ifndef __PIPEWIRE_DEVICE_H__
#define __PIPEWIRE_DEVICE_H__
#ifndef PIPEWIRE_DEVICE_H
#define PIPEWIRE_DEVICE_H
#ifdef __cplusplus
extern "C" {
@ -105,4 +105,4 @@ int pw_device_for_each_param(struct pw_device *device,
}
#endif
#endif /* __PIPEWIRE_DEVICE_H__ */
#endif /* PIPEWIRE_DEVICE_H */

View file

@ -26,9 +26,10 @@
#include <spa/debug/types.h>
#include "pipewire/pipewire.h"
#include "pipewire/factory.h"
#include "pipewire/private.h"
#include "pipewire/type.h"
#include "pipewire/interfaces.h"
struct resource_data {
struct spa_hook resource_listener;

View file

@ -22,8 +22,8 @@
* DEALINGS IN THE SOFTWARE.
*/
#ifndef __PIPEWIRE_FACTORY_H__
#define __PIPEWIRE_FACTORY_H__
#ifndef PIPEWIRE_FACTORY_H
#define PIPEWIRE_FACTORY_H
#ifdef __cplusplus
extern "C" {
@ -105,4 +105,4 @@ void *pw_factory_create_object(struct pw_factory *factory,
}
#endif
#endif /* __PIPEWIRE_FACTORY_H__ */
#endif /* PIPEWIRE_FACTORY_H */

View file

@ -27,9 +27,10 @@
#include <time.h>
#include <stdio.h>
#include <pipewire/pipewire.h>
#include <pipewire/private.h>
#include <pipewire/global.h>
#include <pipewire/interfaces.h>
#include <pipewire/type.h>
#include <spa/debug/types.h>

View file

@ -22,8 +22,8 @@
* DEALINGS IN THE SOFTWARE.
*/
#ifndef __PIPEWIRE_GLOBAL_H__
#define __PIPEWIRE_GLOBAL_H__
#ifndef PIPEWIRE_GLOBAL_H
#define PIPEWIRE_GLOBAL_H
#ifdef __cplusplus
extern "C" {
@ -143,4 +143,4 @@ void pw_global_destroy(struct pw_global *global);
}
#endif
#endif /* __PIPEWIRE_GLOBAL_H__ */
#endif /* PIPEWIRE_GLOBAL_H */

View file

@ -22,14 +22,15 @@
* DEALINGS IN THE SOFTWARE.
*/
#ifndef __PIPEWIRE_INTERFACES_H__
#define __PIPEWIRE_INTERFACES_H__
#ifndef PIPEWIRE_INTERFACES_H
#define PIPEWIRE_INTERFACES_H
#ifdef __cplusplus
extern "C" {
#endif
#include <spa/utils/defs.h>
#include <spa/node/command.h>
#include <spa/param/param.h>
#include <pipewire/introspect.h>
@ -895,4 +896,4 @@ pw_link_proxy_add_listener(struct pw_link_proxy *link,
} /* extern "C" */
#endif
#endif /* __PIPEWIRE_INTERFACES_H__ */
#endif /* PIPEWIRE_INTERFACES_H */

View file

@ -22,8 +22,8 @@
* DEALINGS IN THE SOFTWARE.
*/
#ifndef __PIPEWIRE_INTROSPECT_H__
#define __PIPEWIRE_INTROSPECT_H__
#ifndef PIPEWIRE_INTROSPECT_H
#define PIPEWIRE_INTROSPECT_H
#include <spa/utils/defs.h>
#include <spa/param/param.h>
@ -250,4 +250,4 @@ pw_link_info_free(struct pw_link_info *info);
}
#endif
#endif /* __PIPEWIRE_INTROSPECT_H__ */
#endif /* PIPEWIRE_INTROSPECT_H */

View file

@ -30,12 +30,12 @@
#include <spa/pod/compare.h>
#include <spa/param/param.h>
#include "private.h"
#include "pipewire.h"
#include "interfaces.h"
#include "control.h"
#include "link.h"
#include "work-queue.h"
#include "pipewire/private.h"
#include "pipewire/interfaces.h"
#include "pipewire/control.h"
#include "pipewire/link.h"
#include "pipewire/type.h"
#include "pipewire/work-queue.h"
#undef spa_debug
#include <spa/debug/node.h>

View file

@ -22,8 +22,8 @@
* DEALINGS IN THE SOFTWARE.
*/
#ifndef __PIPEWIRE_LINK_H__
#define __PIPEWIRE_LINK_H__
#ifndef PIPEWIRE_LINK_H
#define PIPEWIRE_LINK_H
#ifdef __cplusplus
extern "C" {
@ -129,4 +129,4 @@ struct pw_link *pw_link_find(struct pw_port *output, struct pw_port *input);
}
#endif
#endif /* __PIPEWIRE_LINK_H__ */
#endif /* PIPEWIRE_LINK_H */

View file

@ -22,8 +22,8 @@
* DEALINGS IN THE SOFTWARE.
*/
#ifndef __PIPEWIRE_LOG_H__
#define __PIPEWIRE_LOG_H__
#ifndef PIPEWIRE_LOG_H
#define PIPEWIRE_LOG_H
#include <spa/support/log.h>
@ -81,4 +81,4 @@ pw_log_logv(enum spa_log_level level,
#ifdef __cplusplus
}
#endif
#endif /* __PIPEWIRE_LOG_H__ */
#endif /* PIPEWIRE_LOG_H */

View file

@ -29,6 +29,7 @@
#include <pipewire/pipewire.h>
#include <pipewire/loop.h>
#include <pipewire/log.h>
#include <pipewire/type.h>
#define DATAS_SIZE (4096 * 8)

View file

@ -22,8 +22,8 @@
* DEALINGS IN THE SOFTWARE.
*/
#ifndef __PIPEWIRE_LOOP_H__
#define __PIPEWIRE_LOOP_H__
#ifndef PIPEWIRE_LOOP_H
#define PIPEWIRE_LOOP_H
#ifdef __cplusplus
extern "C" {
@ -77,4 +77,4 @@ pw_loop_destroy(struct pw_loop *loop);
}
#endif
#endif /* __PIPEWIRE_LOOP_H__ */
#endif /* PIPEWIRE_LOOP_H */

View file

@ -22,8 +22,8 @@
* DEALINGS IN THE SOFTWARE.
*/
#ifndef __PIPEWIRE_MAIN_LOOP_H__
#define __PIPEWIRE_MAIN_LOOP_H__
#ifndef PIPEWIRE_MAIN_LOOP_H
#define PIPEWIRE_MAIN_LOOP_H
#ifdef __cplusplus
extern "C" {
@ -76,4 +76,4 @@ void pw_main_loop_quit(struct pw_main_loop *loop);
}
#endif
#endif /* __PIPEWIRE_MAIN_LOOP_H__ */
#endif /* PIPEWIRE_MAIN_LOOP_H */

View file

@ -22,8 +22,8 @@
* DEALINGS IN THE SOFTWARE.
*/
#ifndef __PIPEWIRE_MAP_H__
#define __PIPEWIRE_MAP_H__
#ifndef PIPEWIRE_MAP_H
#define PIPEWIRE_MAP_H
#ifdef __cplusplus
extern "C" {
@ -197,4 +197,4 @@ static inline int pw_map_for_each(struct pw_map *map,
} /* extern "C" */
#endif
#endif /* __PIPEWIRE_MAP_H__ */
#endif /* PIPEWIRE_MAP_H */

View file

@ -22,8 +22,8 @@
* DEALINGS IN THE SOFTWARE.
*/
#ifndef __PIPEWIRE_MEM_H__
#define __PIPEWIRE_MEM_H__
#ifndef PIPEWIRE_MEM_H
#define PIPEWIRE_MEM_H
#include <spa/utils/defs.h>
@ -95,4 +95,4 @@ static inline void pw_map_range_init(struct pw_map_range *range,
}
#endif
#endif /* __PIPEWIRE_MEM_H__ */
#endif /* PIPEWIRE_MEM_H */

View file

@ -33,11 +33,11 @@
#include <sys/stat.h>
#include <errno.h>
#include "pipewire/pipewire.h"
#include "pipewire/private.h"
#include "pipewire/interfaces.h"
#include "pipewire/utils.h"
#include "pipewire/module.h"
#include "pipewire/type.h"
/** \cond */
struct impl {

View file

@ -23,8 +23,8 @@
* DEALINGS IN THE SOFTWARE.
*/
#ifndef __PIPEWIRE_MODULE_H__
#define __PIPEWIRE_MODULE_H__
#ifndef PIPEWIRE_MODULE_H
#define PIPEWIRE_MODULE_H
#ifdef __cplusplus
extern "C" {
@ -106,4 +106,4 @@ void pw_module_destroy(struct pw_module *module);
}
#endif
#endif /* __PIPEWIRE_MODULE_H__ */
#endif /* PIPEWIRE_MODULE_H */

View file

@ -30,13 +30,13 @@
#include <spa/pod/parser.h>
#include "pipewire/pipewire.h"
#include "pipewire/interfaces.h"
#include "pipewire/private.h"
#include "pipewire/node.h"
#include "pipewire/data-loop.h"
#include "pipewire/main-loop.h"
#include "pipewire/type.h"
#include "pipewire/work-queue.h"
#ifndef spa_debug

View file

@ -22,8 +22,8 @@
* DEALINGS IN THE SOFTWARE.
*/
#ifndef __PIPEWIRE_NODE_H__
#define __PIPEWIRE_NODE_H__
#ifndef PIPEWIRE_NODE_H
#define PIPEWIRE_NODE_H
#ifdef __cplusplus
extern "C" {
@ -43,6 +43,8 @@ extern "C" {
*/
struct pw_node;
#include <spa/node/event.h>
#include <pipewire/core.h>
#include <pipewire/global.h>
#include <pipewire/introspect.h>
@ -193,4 +195,4 @@ bool pw_node_is_enabled(struct pw_node *node);
}
#endif
#endif /* __PIPEWIRE_NODE_H__ */
#endif /* PIPEWIRE_NODE_H */

View file

@ -22,8 +22,8 @@
* DEALINGS IN THE SOFTWARE.
*/
#ifndef __PIPEWIRE_PERMISSION_H__
#define __PIPEWIRE_PERMISSION_H__
#ifndef PIPEWIRE_PERMISSION_H
#define PIPEWIRE_PERMISSION_H
#ifdef __cplusplus
extern "C" {
@ -62,4 +62,4 @@ struct pw_permission {
}
#endif
#endif /* __PIPEWIRE_PERMISSION_H__ */
#endif /* PIPEWIRE_PERMISSION_H */

View file

@ -39,7 +39,6 @@
#include "pipewire.h"
#include "private.h"
#include "version.h"
#define MAX_SUPPORT 32
@ -618,16 +617,16 @@ const char* pw_get_library_version(void)
}
static const struct spa_type_info type_info[] = {
{ PW_TYPE_INTERFACE_Core, PW_TYPE_INTERFACE_BASE "Core", SPA_TYPE_Pointer, NULL },
{ PW_TYPE_INTERFACE_Registry, PW_TYPE_INTERFACE_BASE "Registry", SPA_TYPE_Pointer, NULL },
{ PW_TYPE_INTERFACE_Node, PW_TYPE_INTERFACE_BASE "Node", SPA_TYPE_Pointer, NULL },
{ PW_TYPE_INTERFACE_Port, PW_TYPE_INTERFACE_BASE "Port", SPA_TYPE_Pointer, NULL },
{ PW_TYPE_INTERFACE_Factory, PW_TYPE_INTERFACE_BASE "Factory", SPA_TYPE_Pointer, NULL },
{ PW_TYPE_INTERFACE_Link, PW_TYPE_INTERFACE_BASE "Link", SPA_TYPE_Pointer, NULL },
{ PW_TYPE_INTERFACE_Client, PW_TYPE_INTERFACE_BASE "Client", SPA_TYPE_Pointer, NULL },
{ PW_TYPE_INTERFACE_Module, PW_TYPE_INTERFACE_BASE "Module", SPA_TYPE_Pointer, NULL },
{ PW_TYPE_INTERFACE_ClientNode, PW_TYPE_INTERFACE_BASE "ClientNode", SPA_TYPE_Pointer, NULL },
{ PW_TYPE_INTERFACE_Device, PW_TYPE_INTERFACE_BASE "Device", SPA_TYPE_Pointer, NULL },
{ PW_TYPE_INTERFACE_Core, PW_TYPE_INFO_INTERFACE_BASE "Core", SPA_TYPE_Pointer, NULL },
{ PW_TYPE_INTERFACE_Registry, PW_TYPE_INFO_INTERFACE_BASE "Registry", SPA_TYPE_Pointer, NULL },
{ PW_TYPE_INTERFACE_Node, PW_TYPE_INFO_INTERFACE_BASE "Node", SPA_TYPE_Pointer, NULL },
{ PW_TYPE_INTERFACE_Port, PW_TYPE_INFO_INTERFACE_BASE "Port", SPA_TYPE_Pointer, NULL },
{ PW_TYPE_INTERFACE_Factory, PW_TYPE_INFO_INTERFACE_BASE "Factory", SPA_TYPE_Pointer, NULL },
{ PW_TYPE_INTERFACE_Link, PW_TYPE_INFO_INTERFACE_BASE "Link", SPA_TYPE_Pointer, NULL },
{ PW_TYPE_INTERFACE_Client, PW_TYPE_INFO_INTERFACE_BASE "Client", SPA_TYPE_Pointer, NULL },
{ PW_TYPE_INTERFACE_Module, PW_TYPE_INFO_INTERFACE_BASE "Module", SPA_TYPE_Pointer, NULL },
{ PW_TYPE_INTERFACE_ClientNode, PW_TYPE_INFO_INTERFACE_BASE "ClientNode", SPA_TYPE_Pointer, NULL },
{ PW_TYPE_INTERFACE_Device, PW_TYPE_INFO_INTERFACE_BASE "Device", SPA_TYPE_Pointer, NULL },
{ SPA_ID_INVALID, "spa_types", SPA_ID_INVALID, spa_types },
{ 0, NULL, 0, NULL },
};

View file

@ -22,8 +22,8 @@
* DEALINGS IN THE SOFTWARE.
*/
#ifndef __PIPEWIRE_H__
#define __PIPEWIRE_H__
#ifndef PIPEWIRE_H
#define PIPEWIRE_H
#ifdef __cplusplus
extern "C" {
@ -159,4 +159,4 @@ pw_get_support(uint32_t *n_support);
}
#endif
#endif /* __PIPEWIRE_H__ */
#endif /* PIPEWIRE_H */

View file

@ -30,8 +30,10 @@
#include <spa/debug/types.h>
#include "pipewire/pipewire.h"
#include "pipewire/interfaces.h"
#include "pipewire/private.h"
#include "pipewire/port.h"
#include "pipewire/link.h"
/** \cond */
struct impl {

View file

@ -22,8 +22,8 @@
* DEALINGS IN THE SOFTWARE.
*/
#ifndef __PIPEWIRE_PORT_H__
#define __PIPEWIRE_PORT_H__
#ifndef PIPEWIRE_PORT_H
#define PIPEWIRE_PORT_H
#ifdef __cplusplus
extern "C" {
@ -113,4 +113,4 @@ void pw_port_add_listener(struct pw_port *port,
}
#endif
#endif /* __PIPEWIRE_PORT_H__ */
#endif /* PIPEWIRE_PORT_H */

View file

@ -22,8 +22,8 @@
* DEALINGS IN THE SOFTWARE.
*/
#ifndef __PIPEWIRE_PRIVATE_H__
#define __PIPEWIRE_PRIVATE_H__
#ifndef PIPEWIRE_PRIVATE_H
#define PIPEWIRE_PRIVATE_H
#ifdef __cplusplus
extern "C" {
@ -32,9 +32,11 @@ extern "C" {
#include <sys/socket.h>
#include <sys/types.h> /* for pthread_t */
#include "pipewire/map.h"
#include "pipewire/remote.h"
#include "pipewire/mem.h"
#include "pipewire/pipewire.h"
#include "pipewire/introspect.h"
#include "pipewire/stream.h"
#include "pipewire/log.h"
#ifndef spa_debug
@ -789,4 +791,4 @@ void pw_control_destroy(struct pw_control *control);
}
#endif
#endif /* __PIPEWIRE_PRIVATE_H__ */
#endif /* PIPEWIRE_PRIVATE_H */

View file

@ -23,8 +23,10 @@
*/
#include <stdio.h>
#include <stdarg.h>
#include "pipewire/pipewire.h"
#include "pipewire/array.h"
#include "pipewire/utils.h"
#include "pipewire/properties.h"
/** \cond */

View file

@ -22,8 +22,8 @@
* DEALINGS IN THE SOFTWARE.
*/
#ifndef __PIPEWIRE_PROPERTIES_H__
#define __PIPEWIRE_PROPERTIES_H__
#ifndef PIPEWIRE_PROPERTIES_H
#define PIPEWIRE_PROPERTIES_H
#ifdef __cplusplus
extern "C" {
@ -109,4 +109,4 @@ static inline double pw_properties_parse_double(const char *value) {
}
#endif
#endif /* __PIPEWIRE_PROPERTIES_H__ */
#endif /* PIPEWIRE_PROPERTIES_H */

View file

@ -28,6 +28,7 @@
#include <pipewire/protocol.h>
#include <pipewire/private.h>
#include <pipewire/type.h>
/** \cond */
struct impl {

View file

@ -22,8 +22,8 @@
* DEALINGS IN THE SOFTWARE.
*/
#ifndef __PIPEWIRE_PROTOCOL_H__
#define __PIPEWIRE_PROTOCOL_H__
#ifndef PIPEWIRE_PROTOCOL_H
#define PIPEWIRE_PROTOCOL_H
#ifdef __cplusplus
extern "C" {
@ -37,8 +37,8 @@ struct pw_protocol;
#include <pipewire/properties.h>
#include <pipewire/utils.h>
#define PW_TYPE__Protocol "PipeWire:Protocol"
#define PW_TYPE_PROTOCOL_BASE PW_TYPE__Protocol ":"
#define PW_TYPE_INFO_Protocol "PipeWire:Protocol"
#define PW_TYPE_INFO_PROTOCOL_BASE PW_TYPE_INFO_Protocol ":"
struct pw_protocol_client {
struct spa_list link; /**< link in protocol client_list */
@ -140,4 +140,4 @@ struct pw_protocol * pw_core_find_protocol(struct pw_core *core, const char *nam
} /* extern "C" */
#endif
#endif /* __PIPEWIRE_PROTOCOL_H__ */
#endif /* PIPEWIRE_PROTOCOL_H */

View file

@ -27,6 +27,7 @@
#include <pipewire/core.h>
#include <pipewire/remote.h>
#include <pipewire/private.h>
#include <pipewire/type.h>
#include <spa/debug/types.h>

View file

@ -22,8 +22,8 @@
* DEALINGS IN THE SOFTWARE.
*/
#ifndef __PIPEWIRE_PROXY_H__
#define __PIPEWIRE_PROXY_H__
#ifndef PIPEWIRE_PROXY_H
#define PIPEWIRE_PROXY_H
#ifdef __cplusplus
extern "C" {
@ -157,4 +157,4 @@ const struct pw_protocol_marshal *pw_proxy_get_marshal(struct pw_proxy *proxy);
}
#endif
#endif /* __PIPEWIRE_PROXY_H__ */
#endif /* PIPEWIRE_PROXY_H */

View file

@ -34,12 +34,6 @@
#include "pipewire/pipewire.h"
#include "pipewire/private.h"
#include "pipewire/introspect.h"
#include "pipewire/interfaces.h"
#include "pipewire/remote.h"
#include "pipewire/core.h"
#include "pipewire/module.h"
#include "pipewire/stream.h"
#include "extensions/protocol-native.h"
#include "extensions/client-node.h"
@ -231,7 +225,7 @@ struct pw_remote *pw_remote_new(struct pw_core *core,
if (!pw_module_load(core, "libpipewire-module-protocol-native", NULL, NULL, NULL, NULL))
goto no_protocol;
protocol_name = PW_TYPE_PROTOCOL__Native;
protocol_name = PW_TYPE_INFO_PROTOCOL_Native;
}
protocol = pw_core_find_protocol(core, protocol_name);

View file

@ -22,8 +22,8 @@
* DEALINGS IN THE SOFTWARE.
*/
#ifndef __PIPEWIRE_REMOTE_H__
#define __PIPEWIRE_REMOTE_H__
#ifndef PIPEWIRE_REMOTE_H
#define PIPEWIRE_REMOTE_H
#ifdef __cplusplus
extern "C" {
@ -113,7 +113,7 @@ struct pw_remote;
#include <pipewire/core.h>
#include <pipewire/properties.h>
#include <pipewire/protocol.h>
#include <pipewire/node.h>
#include <pipewire/proxy.h>
/** \enum pw_remote_state The state of a \ref pw_remote \memberof pw_remote */
@ -209,4 +209,4 @@ struct pw_proxy *pw_remote_export(struct pw_remote *remote, struct pw_node *node
}
#endif
#endif /* __PIPEWIRE_REMOTE_H__ */
#endif /* PIPEWIRE_REMOTE_H */

View file

@ -28,6 +28,7 @@
#include "pipewire/private.h"
#include "pipewire/protocol.h"
#include "pipewire/resource.h"
#include "pipewire/type.h"
#include <spa/debug/types.h>

View file

@ -22,8 +22,8 @@
* DEALINGS IN THE SOFTWARE.
*/
#ifndef __PIPEWIRE_RESOURCE_H__
#define __PIPEWIRE_RESOURCE_H__
#ifndef PIPEWIRE_RESOURCE_H
#define PIPEWIRE_RESOURCE_H
#ifdef __cplusplus
extern "C" {
@ -138,4 +138,4 @@ const struct pw_protocol_marshal *pw_resource_get_marshal(struct pw_resource *re
}
#endif
#endif /* __PIPEWIRE_RESOURCE_H__ */
#endif /* PIPEWIRE_RESOURCE_H */

View file

@ -22,8 +22,8 @@
* DEALINGS IN THE SOFTWARE.
*/
#ifndef __PIPEWIRE_STREAM_H__
#define __PIPEWIRE_STREAM_H__
#ifndef PIPEWIRE_STREAM_H
#define PIPEWIRE_STREAM_H
#ifdef __cplusplus
extern "C" {
@ -357,4 +357,4 @@ int pw_stream_flush(struct pw_stream *stream, bool drain);
}
#endif
#endif /* __PIPEWIRE_STREAM_H__ */
#endif /* PIPEWIRE_STREAM_H */

View file

@ -26,7 +26,7 @@
#include <errno.h>
#include <sys/time.h>
#include "pipewire.h"
#include "log.h"
#include "thread-loop.h"
#define pw_thread_loop_events_emit(o,m,v,...) spa_hook_list_call(&o->listener_list, struct pw_thread_loop_events, m, v, ##__VA_ARGS__)

View file

@ -22,8 +22,8 @@
* DEALINGS IN THE SOFTWARE.
*/
#ifndef __PIPEWIRE_THREAD_LOOP_H__
#define __PIPEWIRE_THREAD_LOOP_H__
#ifndef PIPEWIRE_THREAD_LOOP_H
#define PIPEWIRE_THREAD_LOOP_H
#ifdef __cplusplus
extern "C" {
@ -151,4 +151,4 @@ bool pw_thread_loop_in_thread(struct pw_thread_loop *loop);
}
#endif
#endif /* __PIPEWIRE_THREAD_LOOP_H__ */
#endif /* PIPEWIRE_THREAD_LOOP_H */

View file

@ -22,20 +22,14 @@
* DEALINGS IN THE SOFTWARE.
*/
#ifndef __PIPEWIRE_TYPE_H__
#define __PIPEWIRE_TYPE_H__
#ifndef PIPEWIRE_TYPE_H
#define PIPEWIRE_TYPE_H
#ifdef __cplusplus
extern "C" {
#endif
#include <spa/node/event.h>
#include <spa/node/command.h>
#include <spa/monitor/monitor.h>
#include <spa/param/param.h>
#include <spa/node/io.h>
#include <pipewire/map.h>
#include <spa/utils/type.h>
enum {
PW_TYPE_FIRST = SPA_TYPE_VENDOR_PipeWire,
@ -53,13 +47,13 @@ enum {
};
#define PW_TYPE_BASE "PipeWire:"
#define PW_TYPE_INFO_BASE "PipeWire:"
#define PW_TYPE__Object PW_TYPE_BASE "Object"
#define PW_TYPE_OBJECT_BASE PW_TYPE__Object ":"
#define PW_TYPE_INFO_Object PW_TYPE_INFO_BASE "Object"
#define PW_TYPE_INFO_OBJECT_BASE PW_TYPE_INFO_Object ":"
#define PW_TYPE__Interface PW_TYPE_BASE "Interface"
#define PW_TYPE_INTERFACE_BASE PW_TYPE__Interface ":"
#define PW_TYPE_INFO_Interface PW_TYPE_INFO_BASE "Interface"
#define PW_TYPE_INFO_INTERFACE_BASE PW_TYPE_INFO_Interface ":"
const struct spa_type_info * pw_type_info(void);
@ -67,4 +61,4 @@ const struct spa_type_info * pw_type_info(void);
}
#endif
#endif /* __PIPEWIRE_TYPE_H__ */
#endif /* PIPEWIRE_TYPE_H */

View file

@ -22,8 +22,8 @@
* DEALINGS IN THE SOFTWARE.
*/
#ifndef __PIPEWIRE_UTILS_H__
#define __PIPEWIRE_UTILS_H__
#ifndef PIPEWIRE_UTILS_H
#define PIPEWIRE_UTILS_H
#ifdef __cplusplus
extern "C" {
@ -70,4 +70,4 @@ pw_spa_pod_copy(const struct spa_pod *pod)
} /* extern "C" */
#endif
#endif /* __PIPEWIRE_UTILS_H__ */
#endif /* PIPEWIRE_UTILS_H */

View file

@ -22,8 +22,8 @@
* DEALINGS IN THE SOFTWARE.
*/
#ifndef __PIPEWIRE_VERSION_H__
#define __PIPEWIRE_VERSION_H__
#ifndef PIPEWIRE_VERSION_H
#define PIPEWIRE_VERSION_H
/* WARNING: Make sure to edit the real source file version.h.in! */
@ -65,4 +65,4 @@ const char* pw_get_library_version(void);
}
#endif
#endif /* __PIPEWIRE_VERION_H__ */
#endif /* PIPEWIRE_VERION_H */

View file

@ -22,8 +22,8 @@
* DEALINGS IN THE SOFTWARE.
*/
#ifndef __PIPEWIRE_WORK_QUEUE_H__
#define __PIPEWIRE_WORK_QUEUE_H__
#ifndef PIPEWIRE_WORK_QUEUE_H
#define PIPEWIRE_WORK_QUEUE_H
#ifdef __cplusplus
extern "C" {
@ -60,4 +60,4 @@ pw_work_queue_complete(struct pw_work_queue *queue, void *obj, uint32_t seq, int
}
#endif
#endif /* __PIPEWIRE_WORK_QUEUE_H__ */
#endif /* PIPEWIRE_WORK_QUEUE_H */

View file

@ -31,6 +31,7 @@
#include <spa/debug/pod.h>
#include <spa/debug/format.h>
#include <pipewire/map.h>
#include <pipewire/pipewire.h>
#include <pipewire/command.h>
#include <pipewire/interfaces.h>

View file

@ -29,9 +29,11 @@
#include <spa/debug/format.h>
#include <spa/debug/types.h>
#include <pipewire/pipewire.h>
#include <pipewire/interfaces.h>
#include <pipewire/type.h>
#include <pipewire/remote.h>
#include <pipewire/main-loop.h>
#include <pipewire/pipewire.h>
struct proxy_data;