pw_module_proxy -> pw_module

This commit is contained in:
Wim Taymans 2019-12-11 15:16:30 +01:00
parent e633e205c2
commit 199fa47216
10 changed files with 58 additions and 58 deletions

View file

@ -34,8 +34,8 @@ extern "C" {
#include <pipewire/proxy.h>
#define PW_VERSION_MODULE_PROXY 3
struct pw_module_proxy;
#define PW_VERSION_MODULE 3
struct pw_module;
/** The module information. Extra information can be added in later versions \memberof pw_introspect */
struct pw_module_info {
@ -57,12 +57,12 @@ pw_module_info_update(struct pw_module_info *info,
/** Free a \ref pw_module_info \memberof pw_introspect */
void pw_module_info_free(struct pw_module_info *info);
#define PW_MODULE_PROXY_EVENT_INFO 0
#define PW_MODULE_PROXY_EVENT_NUM 1
#define PW_MODULE_EVENT_INFO 0
#define PW_MODULE_EVENT_NUM 1
/** Module events */
struct pw_module_proxy_events {
#define PW_VERSION_MODULE_PROXY_EVENTS 0
struct pw_module_events {
#define PW_VERSION_MODULE_EVENTS 0
uint32_t version;
/**
* Notify module info
@ -72,30 +72,30 @@ struct pw_module_proxy_events {
void (*info) (void *object, const struct pw_module_info *info);
};
#define PW_MODULE_PROXY_METHOD_ADD_LISTENER 0
#define PW_MODULE_PROXY_METHOD_NUM 1
#define PW_MODULE_METHOD_ADD_LISTENER 0
#define PW_MODULE_METHOD_NUM 1
/** Module methods */
struct pw_module_proxy_methods {
#define PW_VERSION_MODULE_PROXY_METHODS 0
struct pw_module_methods {
#define PW_VERSION_MODULE_METHODS 0
uint32_t version;
int (*add_listener) (void *object,
struct spa_hook *listener,
const struct pw_module_proxy_events *events,
const struct pw_module_events *events,
void *data);
};
#define pw_module_proxy_method(o,method,version,...) \
#define pw_module_method(o,method,version,...) \
({ \
int _res = -ENOTSUP; \
spa_interface_call_res((struct spa_interface*)o, \
struct pw_module_proxy_methods, _res, \
struct pw_module_methods, _res, \
method, version, ##__VA_ARGS__); \
_res; \
})
#define pw_module_proxy_add_listener(c,...) pw_module_proxy_method(c,add_listener,0,__VA_ARGS__)
#define pw_module_add_listener(c,...) pw_module_method(c,add_listener,0,__VA_ARGS__)
#ifdef __cplusplus
} /* extern "C" */