pw_client_endpoint_proxy -> pw_client_endpoint

pw_client_session_proxy -> pw_client_session
This commit is contained in:
Wim Taymans 2019-12-11 16:31:58 +01:00
parent 743450a19f
commit 94ed9c8e38
9 changed files with 138 additions and 138 deletions

View file

@ -61,7 +61,7 @@ struct endpoint {
struct node *node;
struct spa_hook listener;
struct pw_client_endpoint_proxy *client_endpoint;
struct pw_client_endpoint *client_endpoint;
struct spa_hook proxy_listener;
struct spa_hook client_endpoint_listener;
struct pw_endpoint_info info;
@ -219,8 +219,8 @@ exit:
return res;
}
static const struct pw_client_endpoint_proxy_events client_endpoint_events = {
PW_VERSION_CLIENT_ENDPOINT_PROXY_EVENTS,
static const struct pw_client_endpoint_events client_endpoint_events = {
PW_VERSION_CLIENT_ENDPOINT_EVENTS,
.set_session_id = client_endpoint_set_session_id,
.set_param = client_endpoint_set_param,
.stream_set_param = client_endpoint_stream_set_param,
@ -261,7 +261,7 @@ static struct stream *endpoint_add_stream(struct endpoint *endpoint)
s->format = endpoint->format;
pw_log_debug("stream %d", s->info.id);
pw_client_endpoint_proxy_stream_update(endpoint->client_endpoint,
pw_client_endpoint_stream_update(endpoint->client_endpoint,
s->info.id,
PW_CLIENT_ENDPOINT_STREAM_UPDATE_INFO,
0, NULL,
@ -277,7 +277,7 @@ static void destroy_stream(struct stream *stream)
{
struct endpoint *endpoint = stream->endpoint;
pw_client_endpoint_proxy_stream_update(endpoint->client_endpoint,
pw_client_endpoint_stream_update(endpoint->client_endpoint,
stream->info.id,
PW_CLIENT_ENDPOINT_STREAM_UPDATE_DESTROYED,
0, NULL,
@ -313,7 +313,7 @@ static void update_params(void *data)
}
}
pw_client_endpoint_proxy_update(endpoint->client_endpoint,
pw_client_endpoint_update(endpoint->client_endpoint,
PW_CLIENT_ENDPOINT_UPDATE_PARAMS |
PW_CLIENT_ENDPOINT_UPDATE_INFO,
n_params, params,
@ -371,7 +371,7 @@ static void complete_endpoint(void *data)
endpoint->format = info;
}
pw_client_endpoint_proxy_update(endpoint->client_endpoint,
pw_client_endpoint_update(endpoint->client_endpoint,
PW_CLIENT_ENDPOINT_UPDATE_INFO,
0, NULL,
&endpoint->info);
@ -475,7 +475,7 @@ static struct endpoint *create_endpoint(struct node *node, struct endpoint *moni
proxy = sm_media_session_create_object(impl->session,
"client-endpoint",
PW_TYPE_INTERFACE_ClientEndpoint,
PW_VERSION_CLIENT_ENDPOINT_PROXY,
PW_VERSION_CLIENT_ENDPOINT,
&props->dict, sizeof(*endpoint));
if (proxy == NULL) {
pw_properties_free(props);
@ -487,7 +487,7 @@ static struct endpoint *create_endpoint(struct node *node, struct endpoint *moni
endpoint->node = node;
endpoint->monitor = monitor;
endpoint->props = props;
endpoint->client_endpoint = (struct pw_client_endpoint_proxy *) proxy;
endpoint->client_endpoint = (struct pw_client_endpoint *) proxy;
endpoint->info.version = PW_VERSION_ENDPOINT_INFO;
endpoint->info.name = (char*)pw_properties_get(endpoint->props, PW_KEY_ENDPOINT_NAME);
endpoint->info.media_class = (char*)pw_properties_get(endpoint->props, PW_KEY_MEDIA_CLASS);
@ -512,7 +512,7 @@ static struct endpoint *create_endpoint(struct node *node, struct endpoint *moni
&endpoint->proxy_listener,
&proxy_events, endpoint);
pw_client_endpoint_proxy_add_listener(endpoint->client_endpoint,
pw_client_endpoint_add_listener(endpoint->client_endpoint,
&endpoint->client_endpoint_listener,
&client_endpoint_events,
endpoint);

View file

@ -106,8 +106,8 @@ struct impl {
struct spa_hook_list hooks;
struct pw_client_session_proxy *client_session;
struct spa_hook client_session_proxy_listener;
struct pw_client_session *client_session;
struct spa_hook proxy_client_session_listener;
struct spa_hook client_session_listener;
struct spa_list endpoint_link_list; /** list of struct endpoint_link */
@ -1274,7 +1274,7 @@ static void check_endpoint_link(struct endpoint_link *link)
spa_list_remove(&link->link);
pw_map_remove(&link->impl->endpoint_links, link->id);
pw_client_session_proxy_link_update(link->impl->client_session,
pw_client_session_link_update(link->impl->client_session,
link->id,
PW_CLIENT_SESSION_LINK_UPDATE_DESTROYED,
0, NULL, NULL);
@ -1447,7 +1447,7 @@ int sm_media_session_create_links(struct sm_media_session *sess,
if (link != NULL) {
/* now create the endpoint link */
pw_client_session_proxy_link_update(impl->client_session,
pw_client_session_link_update(impl->client_session,
link->id,
PW_CLIENT_SESSION_UPDATE_INFO,
0, NULL,
@ -1482,14 +1482,14 @@ static int client_session_link_request_state(void *object, uint32_t link_id, uin
return -ENOTSUP;
}
static const struct pw_client_session_proxy_events client_session_events = {
PW_VERSION_CLIENT_SESSION_PROXY_METHODS,
static const struct pw_client_session_events client_session_events = {
PW_VERSION_CLIENT_SESSION_METHODS,
.set_param = client_session_set_param,
.link_set_param = client_session_link_set_param,
.link_request_state = client_session_link_request_state,
};
static void client_session_proxy_bound(void *data, uint32_t id)
static void proxy_client_session_bound(void *data, uint32_t id)
{
struct impl *impl = data;
struct pw_session_info info;
@ -1502,7 +1502,7 @@ static void client_session_proxy_bound(void *data, uint32_t id)
pw_log_debug("got sesssion id:%d", id);
pw_client_session_proxy_update(impl->client_session,
pw_client_session_update(impl->client_session,
PW_CLIENT_SESSION_UPDATE_INFO,
0, NULL,
&info);
@ -1517,9 +1517,9 @@ static void client_session_proxy_bound(void *data, uint32_t id)
sm_stream_monitor_start(&impl->this);
}
static const struct pw_proxy_events client_session_proxy_events = {
static const struct pw_proxy_events proxy_client_session_events = {
PW_VERSION_PROXY_EVENTS,
.bound = client_session_proxy_bound,
.bound = proxy_client_session_bound,
};
static int start_session(struct impl *impl)
@ -1533,14 +1533,14 @@ static int start_session(struct impl *impl)
impl->client_session = pw_core_create_object(impl->monitor_core,
"client-session",
PW_TYPE_INTERFACE_ClientSession,
PW_VERSION_CLIENT_SESSION_PROXY,
PW_VERSION_CLIENT_SESSION,
NULL, 0);
pw_proxy_add_listener((struct pw_proxy*)impl->client_session,
&impl->client_session_proxy_listener,
&client_session_proxy_events, impl);
&impl->proxy_client_session_listener,
&proxy_client_session_events, impl);
pw_client_session_proxy_add_listener(impl->client_session,
pw_client_session_add_listener(impl->client_session,
&impl->client_session_listener,
&client_session_events, impl);

View file

@ -87,7 +87,7 @@ struct endpoint {
struct pw_properties *props;
struct node *node;
struct pw_client_endpoint_proxy *client_endpoint;
struct pw_client_endpoint *client_endpoint;
struct spa_hook client_endpoint_listener;
struct spa_hook proxy_listener;
struct pw_endpoint_info info;
@ -216,8 +216,8 @@ exit:
return res;
}
static const struct pw_client_endpoint_proxy_events client_endpoint_events = {
PW_VERSION_CLIENT_ENDPOINT_PROXY_EVENTS,
static const struct pw_client_endpoint_events client_endpoint_events = {
PW_VERSION_CLIENT_ENDPOINT_EVENTS,
.set_session_id = client_endpoint_set_session_id,
.set_param = client_endpoint_set_param,
.stream_set_param = client_endpoint_stream_set_param,
@ -254,7 +254,7 @@ static struct stream *endpoint_add_stream(struct endpoint *endpoint)
spa_list_append(&endpoint->stream_list, &s->link);
pw_log_debug("stream %d", node->id);
pw_client_endpoint_proxy_stream_update(endpoint->client_endpoint,
pw_client_endpoint_stream_update(endpoint->client_endpoint,
s->info.id,
PW_CLIENT_ENDPOINT_STREAM_UPDATE_INFO,
0, NULL,
@ -266,7 +266,7 @@ static void destroy_stream(struct stream *stream)
{
struct endpoint *endpoint = stream->endpoint;
pw_client_endpoint_proxy_stream_update(endpoint->client_endpoint,
pw_client_endpoint_stream_update(endpoint->client_endpoint,
stream->info.id,
PW_CLIENT_ENDPOINT_STREAM_UPDATE_DESTROYED,
0, NULL,
@ -312,7 +312,7 @@ static void complete_endpoint(void *data)
break;
}
}
pw_client_endpoint_proxy_update(endpoint->client_endpoint,
pw_client_endpoint_update(endpoint->client_endpoint,
PW_CLIENT_ENDPOINT_UPDATE_INFO,
0, NULL,
&endpoint->info);
@ -344,7 +344,7 @@ static void update_params(void *data)
}
}
pw_client_endpoint_proxy_update(endpoint->client_endpoint,
pw_client_endpoint_update(endpoint->client_endpoint,
PW_CLIENT_ENDPOINT_UPDATE_PARAMS |
PW_CLIENT_ENDPOINT_UPDATE_INFO,
n_params, params,
@ -406,7 +406,7 @@ static struct endpoint *create_endpoint(struct node *node)
proxy = sm_media_session_create_object(impl->session,
"client-endpoint",
PW_TYPE_INTERFACE_ClientEndpoint,
PW_VERSION_CLIENT_ENDPOINT_PROXY,
PW_VERSION_CLIENT_ENDPOINT,
&props->dict, sizeof(*endpoint));
if (proxy == NULL) {
pw_properties_free(props);
@ -417,7 +417,7 @@ static struct endpoint *create_endpoint(struct node *node)
endpoint->impl = impl;
endpoint->node = node;
endpoint->props = props;
endpoint->client_endpoint = (struct pw_client_endpoint_proxy *) proxy;
endpoint->client_endpoint = (struct pw_client_endpoint *) proxy;
endpoint->info.version = PW_VERSION_ENDPOINT_INFO;
endpoint->info.name = (char*)pw_properties_get(props, PW_KEY_ENDPOINT_NAME);
endpoint->info.media_class = (char*)pw_properties_get(props, PW_KEY_MEDIA_CLASS);
@ -441,7 +441,7 @@ static struct endpoint *create_endpoint(struct node *node)
&endpoint->proxy_listener,
&proxy_events, endpoint);
pw_client_endpoint_proxy_add_listener(endpoint->client_endpoint,
pw_client_endpoint_add_listener(endpoint->client_endpoint,
&endpoint->client_endpoint_listener,
&client_endpoint_events,
endpoint);

View file

@ -36,17 +36,17 @@
extern "C" {
#endif
#define PW_VERSION_CLIENT_ENDPOINT_PROXY 0
struct pw_client_endpoint_proxy;
#define PW_VERSION_CLIENT_ENDPOINT 0
struct pw_client_endpoint;
#define PW_CLIENT_ENDPOINT_PROXY_EVENT_SET_SESSION_ID 0
#define PW_CLIENT_ENDPOINT_PROXY_EVENT_SET_PARAM 1
#define PW_CLIENT_ENDPOINT_PROXY_EVENT_STREAM_SET_PARAM 2
#define PW_CLIENT_ENDPOINT_PROXY_EVENT_CREATE_LINK 3
#define PW_CLIENT_ENDPOINT_PROXY_EVENT_NUM 4
#define PW_CLIENT_ENDPOINT_EVENT_SET_SESSION_ID 0
#define PW_CLIENT_ENDPOINT_EVENT_SET_PARAM 1
#define PW_CLIENT_ENDPOINT_EVENT_STREAM_SET_PARAM 2
#define PW_CLIENT_ENDPOINT_EVENT_CREATE_LINK 3
#define PW_CLIENT_ENDPOINT_EVENT_NUM 4
struct pw_client_endpoint_proxy_events {
#define PW_VERSION_CLIENT_ENDPOINT_PROXY_EVENTS 0
struct pw_client_endpoint_events {
#define PW_VERSION_CLIENT_ENDPOINT_EVENTS 0
uint32_t version; /**< version of this structure */
/**
@ -118,18 +118,18 @@ struct pw_client_endpoint_proxy_events {
int (*create_link) (void *object, const struct spa_dict *props);
};
#define PW_CLIENT_ENDPOINT_PROXY_METHOD_ADD_LISTENER 0
#define PW_CLIENT_ENDPOINT_PROXY_METHOD_UPDATE 1
#define PW_CLIENT_ENDPOINT_PROXY_METHOD_STREAM_UPDATE 2
#define PW_CLIENT_ENDPOINT_PROXY_METHOD_NUM 3
#define PW_CLIENT_ENDPOINT_METHOD_ADD_LISTENER 0
#define PW_CLIENT_ENDPOINT_METHOD_UPDATE 1
#define PW_CLIENT_ENDPOINT_METHOD_STREAM_UPDATE 2
#define PW_CLIENT_ENDPOINT_METHOD_NUM 3
struct pw_client_endpoint_proxy_methods {
#define PW_VERSION_CLIENT_ENDPOINT_PROXY_METHODS 0
struct pw_client_endpoint_methods {
#define PW_VERSION_CLIENT_ENDPOINT_METHODS 0
uint32_t version; /**< version of this structure */
int (*add_listener) (void *object,
struct spa_hook *listener,
const struct pw_client_endpoint_proxy_events *events,
const struct pw_client_endpoint_events *events,
void *data);
/** Update endpoint information */
@ -153,30 +153,30 @@ struct pw_client_endpoint_proxy_methods {
const struct pw_endpoint_stream_info *info);
};
#define pw_client_endpoint_proxy_method(o,method,version,...) \
#define pw_client_endpoint_method(o,method,version,...) \
({ \
int _res = -ENOTSUP; \
spa_interface_call_res((struct spa_interface*)o, \
struct pw_client_endpoint_proxy_methods, _res, \
struct pw_client_endpoint_methods, _res, \
method, version, ##__VA_ARGS__); \
_res; \
})
#define pw_client_endpoint_proxy_add_listener(o,...) pw_client_endpoint_proxy_method(o,add_listener,0,__VA_ARGS__)
#define pw_client_endpoint_proxy_update(o,...) pw_client_endpoint_proxy_method(o,update,0,__VA_ARGS__)
#define pw_client_endpoint_proxy_stream_update(o,...) pw_client_endpoint_proxy_method(o,stream_update,0,__VA_ARGS__)
#define pw_client_endpoint_add_listener(o,...) pw_client_endpoint_method(o,add_listener,0,__VA_ARGS__)
#define pw_client_endpoint_update(o,...) pw_client_endpoint_method(o,update,0,__VA_ARGS__)
#define pw_client_endpoint_stream_update(o,...) pw_client_endpoint_method(o,stream_update,0,__VA_ARGS__)
#define PW_VERSION_CLIENT_SESSION_PROXY 0
struct pw_client_session_proxy;
#define PW_VERSION_CLIENT_SESSION 0
struct pw_client_session;
#define PW_CLIENT_SESSION_PROXY_EVENT_SET_PARAM 0
#define PW_CLIENT_SESSION_PROXY_EVENT_LINK_SET_PARAM 1
#define PW_CLIENT_SESSION_PROXY_EVENT_LINK_REQUEST_STATE 2
#define PW_CLIENT_SESSION_PROXY_EVENT_NUM 3
#define PW_CLIENT_SESSION_EVENT_SET_PARAM 0
#define PW_CLIENT_SESSION_EVENT_LINK_SET_PARAM 1
#define PW_CLIENT_SESSION_EVENT_LINK_REQUEST_STATE 2
#define PW_CLIENT_SESSION_EVENT_NUM 3
struct pw_client_session_proxy_events {
#define PW_VERSION_CLIENT_SESSION_PROXY_EVENTS 0
struct pw_client_session_events {
#define PW_VERSION_CLIENT_SESSION_EVENTS 0
uint32_t version; /**< version of this structure */
/**
@ -231,18 +231,18 @@ struct pw_client_session_proxy_events {
int (*link_request_state) (void *object, uint32_t link_id, uint32_t state);
};
#define PW_CLIENT_SESSION_PROXY_METHOD_ADD_LISTENER 0
#define PW_CLIENT_SESSION_PROXY_METHOD_UPDATE 1
#define PW_CLIENT_SESSION_PROXY_METHOD_LINK_UPDATE 2
#define PW_CLIENT_SESSION_PROXY_METHOD_NUM 3
#define PW_CLIENT_SESSION_METHOD_ADD_LISTENER 0
#define PW_CLIENT_SESSION_METHOD_UPDATE 1
#define PW_CLIENT_SESSION_METHOD_LINK_UPDATE 2
#define PW_CLIENT_SESSION_METHOD_NUM 3
struct pw_client_session_proxy_methods {
#define PW_VERSION_CLIENT_SESSION_PROXY_METHODS 0
struct pw_client_session_methods {
#define PW_VERSION_CLIENT_SESSION_METHODS 0
uint32_t version; /**< version of this structure */
int (*add_listener) (void *object,
struct spa_hook *listener,
const struct pw_client_session_proxy_events *events,
const struct pw_client_session_events *events,
void *data);
/** Update session information */
@ -266,18 +266,18 @@ struct pw_client_session_proxy_methods {
const struct pw_endpoint_link_info *info);
};
#define pw_client_session_proxy_method(o,method,version,...) \
#define pw_client_session_method(o,method,version,...) \
({ \
int _res = -ENOTSUP; \
spa_interface_call_res((struct spa_interface*)o, \
struct pw_client_session_proxy_methods, _res, \
struct pw_client_session_methods, _res, \
method, version, ##__VA_ARGS__); \
_res; \
})
#define pw_client_session_proxy_add_listener(o,...) pw_client_session_proxy_method(o,add_listener,0,__VA_ARGS__)
#define pw_client_session_proxy_update(o,...) pw_client_session_proxy_method(o,update,0,__VA_ARGS__)
#define pw_client_session_proxy_link_update(o,...) pw_client_session_proxy_method(o,link_update,0,__VA_ARGS__)
#define pw_client_session_add_listener(o,...) pw_client_session_method(o,add_listener,0,__VA_ARGS__)
#define pw_client_session_update(o,...) pw_client_session_method(o,update,0,__VA_ARGS__)
#define pw_client_session_link_update(o,...) pw_client_session_method(o,link_update,0,__VA_ARGS__)
#ifdef __cplusplus
} /* extern "C" */

View file

@ -129,8 +129,8 @@ static int client_endpoint_stream_update(void *object,
return -ENOMEM;
}
static struct pw_client_endpoint_proxy_methods methods = {
PW_VERSION_CLIENT_ENDPOINT_PROXY_METHODS,
static struct pw_client_endpoint_methods methods = {
PW_VERSION_CLIENT_ENDPOINT_METHODS,
.update = client_endpoint_update,
.stream_update = client_endpoint_stream_update,
};
@ -259,7 +259,7 @@ int client_endpoint_factory_init(struct pw_impl_module *module)
factory = pw_impl_factory_new(context,
"client-endpoint",
PW_TYPE_INTERFACE_ClientEndpoint,
PW_VERSION_CLIENT_ENDPOINT_PROXY,
PW_VERSION_CLIENT_ENDPOINT,
NULL,
sizeof(*data));
if (factory == NULL)

View file

@ -41,7 +41,7 @@ struct client_endpoint {
};
#define pw_client_endpoint_resource(r,m,v,...) \
pw_resource_call_res(r,struct pw_client_endpoint_proxy_events,m,v,__VA_ARGS__)
pw_resource_call_res(r,struct pw_client_endpoint_events,m,v,__VA_ARGS__)
#define pw_client_endpoint_resource_set_id(r,...) \
pw_client_endpoint_resource(r,set_id,0,__VA_ARGS__)
#define pw_client_endpoint_resource_set_session_id(r,...) \

View file

@ -128,8 +128,8 @@ static int client_session_link_update(void *object,
return -ENOMEM;
}
static struct pw_client_session_proxy_methods methods = {
PW_VERSION_CLIENT_SESSION_PROXY_METHODS,
static struct pw_client_session_methods methods = {
PW_VERSION_CLIENT_SESSION_METHODS,
.update = client_session_update,
.link_update = client_session_link_update,
};
@ -258,7 +258,7 @@ int client_session_factory_init(struct pw_impl_module *module)
factory = pw_impl_factory_new(context,
"client-session",
PW_TYPE_INTERFACE_ClientSession,
PW_VERSION_CLIENT_SESSION_PROXY,
PW_VERSION_CLIENT_SESSION,
NULL,
sizeof(*data));
if (factory == NULL)

View file

@ -41,7 +41,7 @@ struct client_session {
};
#define pw_client_session_resource(r,m,v,...) \
pw_resource_call_res(r,struct pw_client_session_proxy_events,m,v,__VA_ARGS__)
pw_resource_call_res(r,struct pw_client_session_events,m,v,__VA_ARGS__)
#define pw_client_session_resource_set_id(r,...) \
pw_client_session_resource(r,set_id,0,__VA_ARGS__)
#define pw_client_session_resource_set_param(r,...) \

View file

@ -314,7 +314,7 @@ static int client_endpoint_marshal_set_session_id (void *object, uint32_t id)
struct spa_pod_builder *b;
b = pw_protocol_native_begin_resource(resource,
PW_CLIENT_ENDPOINT_PROXY_EVENT_SET_SESSION_ID, NULL);
PW_CLIENT_ENDPOINT_EVENT_SET_SESSION_ID, NULL);
spa_pod_builder_add_struct(b,
SPA_POD_Int(id));
@ -330,7 +330,7 @@ static int client_endpoint_marshal_set_param (void *object,
struct spa_pod_builder *b;
b = pw_protocol_native_begin_resource(resource,
PW_CLIENT_ENDPOINT_PROXY_EVENT_SET_PARAM, NULL);
PW_CLIENT_ENDPOINT_EVENT_SET_PARAM, NULL);
spa_pod_builder_add_struct(b,
SPA_POD_Id(id),
@ -348,7 +348,7 @@ static int client_endpoint_marshal_stream_set_param (void *object,
struct spa_pod_builder *b;
b = pw_protocol_native_begin_resource(resource,
PW_CLIENT_ENDPOINT_PROXY_EVENT_STREAM_SET_PARAM, NULL);
PW_CLIENT_ENDPOINT_EVENT_STREAM_SET_PARAM, NULL);
spa_pod_builder_add_struct(b,
SPA_POD_Int(stream_id),
@ -366,7 +366,7 @@ static int client_endpoint_marshal_create_link (void *object,
struct spa_pod_builder *b;
b = pw_protocol_native_begin_resource(resource,
PW_CLIENT_ENDPOINT_PROXY_EVENT_CREATE_LINK, NULL);
PW_CLIENT_ENDPOINT_EVENT_CREATE_LINK, NULL);
push_dict(b, props);
@ -375,7 +375,7 @@ static int client_endpoint_marshal_create_link (void *object,
static int client_endpoint_marshal_add_listener(void *object,
struct spa_hook *listener,
const struct pw_client_endpoint_proxy_events *events,
const struct pw_client_endpoint_events *events,
void *data)
{
struct pw_proxy *proxy = object;
@ -395,7 +395,7 @@ static int client_endpoint_marshal_update(void *object,
uint32_t i;
b = pw_protocol_native_begin_proxy(proxy,
PW_CLIENT_ENDPOINT_PROXY_METHOD_UPDATE, NULL);
PW_CLIENT_ENDPOINT_METHOD_UPDATE, NULL);
spa_pod_builder_push_struct(b, &f);
spa_pod_builder_add(b,
@ -429,7 +429,7 @@ static int client_endpoint_marshal_stream_update(void *object,
uint32_t i;
b = pw_protocol_native_begin_proxy(proxy,
PW_CLIENT_ENDPOINT_PROXY_METHOD_STREAM_UPDATE, NULL);
PW_CLIENT_ENDPOINT_METHOD_STREAM_UPDATE, NULL);
spa_pod_builder_push_struct(b, &f);
spa_pod_builder_add(b,
@ -463,7 +463,7 @@ static int client_endpoint_demarshal_set_session_id(void *object,
SPA_POD_Int(&id)) < 0)
return -EINVAL;
return pw_proxy_notify(proxy, struct pw_client_endpoint_proxy_events,
return pw_proxy_notify(proxy, struct pw_client_endpoint_events,
set_session_id, 0, id);
}
@ -482,7 +482,7 @@ static int client_endpoint_demarshal_set_param(void *object,
SPA_POD_PodObject(&param)) < 0)
return -EINVAL;
return pw_proxy_notify(proxy, struct pw_client_endpoint_proxy_events,
return pw_proxy_notify(proxy, struct pw_client_endpoint_events,
set_param, 0, id, flags, param);
}
@ -502,7 +502,7 @@ static int client_endpoint_demarshal_stream_set_param(void *object,
SPA_POD_PodObject(&param)) < 0)
return -EINVAL;
return pw_proxy_notify(proxy, struct pw_client_endpoint_proxy_events,
return pw_proxy_notify(proxy, struct pw_client_endpoint_events,
stream_set_param, 0, stream_id, id, flags, param);
}
@ -518,7 +518,7 @@ static int client_endpoint_demarshal_create_link(void *object,
parse_dict(&prs, &f, &props);
return pw_proxy_notify(proxy, struct pw_client_endpoint_proxy_events,
return pw_proxy_notify(proxy, struct pw_client_endpoint_events,
create_link, 0, &props);
}
@ -557,7 +557,7 @@ static int client_endpoint_demarshal_update(void *object,
demarshal_pw_endpoint_info(&prs[1], &f[1], infop);
}
return pw_resource_notify(resource, struct pw_client_endpoint_proxy_methods,
return pw_resource_notify(resource, struct pw_client_endpoint_methods,
update, 0, change_mask, n_params, params, infop);
}
@ -597,12 +597,12 @@ static int client_endpoint_demarshal_stream_update(void *object,
demarshal_pw_endpoint_stream_info(&prs[1], &f[1], infop);
}
return pw_resource_notify(resource, struct pw_client_endpoint_proxy_methods,
return pw_resource_notify(resource, struct pw_client_endpoint_methods,
stream_update, 0, stream_id, change_mask, n_params, params, infop);
}
static const struct pw_client_endpoint_proxy_events pw_protocol_native_client_endpoint_event_marshal = {
PW_VERSION_CLIENT_ENDPOINT_PROXY_EVENTS,
static const struct pw_client_endpoint_events pw_protocol_native_client_endpoint_event_marshal = {
PW_VERSION_CLIENT_ENDPOINT_EVENTS,
.set_session_id = client_endpoint_marshal_set_session_id,
.set_param = client_endpoint_marshal_set_param,
.stream_set_param = client_endpoint_marshal_stream_set_param,
@ -610,35 +610,35 @@ static const struct pw_client_endpoint_proxy_events pw_protocol_native_client_en
};
static const struct pw_protocol_native_demarshal
pw_protocol_native_client_endpoint_event_demarshal[PW_CLIENT_ENDPOINT_PROXY_EVENT_NUM] =
pw_protocol_native_client_endpoint_event_demarshal[PW_CLIENT_ENDPOINT_EVENT_NUM] =
{
[PW_CLIENT_ENDPOINT_PROXY_EVENT_SET_SESSION_ID] = { client_endpoint_demarshal_set_session_id, 0 },
[PW_CLIENT_ENDPOINT_PROXY_EVENT_SET_PARAM] = { client_endpoint_demarshal_set_param, 0 },
[PW_CLIENT_ENDPOINT_PROXY_EVENT_STREAM_SET_PARAM] = { client_endpoint_demarshal_stream_set_param, 0 },
[PW_CLIENT_ENDPOINT_PROXY_EVENT_CREATE_LINK] = { client_endpoint_demarshal_create_link, 0 },
[PW_CLIENT_ENDPOINT_EVENT_SET_SESSION_ID] = { client_endpoint_demarshal_set_session_id, 0 },
[PW_CLIENT_ENDPOINT_EVENT_SET_PARAM] = { client_endpoint_demarshal_set_param, 0 },
[PW_CLIENT_ENDPOINT_EVENT_STREAM_SET_PARAM] = { client_endpoint_demarshal_stream_set_param, 0 },
[PW_CLIENT_ENDPOINT_EVENT_CREATE_LINK] = { client_endpoint_demarshal_create_link, 0 },
};
static const struct pw_client_endpoint_proxy_methods pw_protocol_native_client_endpoint_method_marshal = {
PW_VERSION_CLIENT_ENDPOINT_PROXY_METHODS,
static const struct pw_client_endpoint_methods pw_protocol_native_client_endpoint_method_marshal = {
PW_VERSION_CLIENT_ENDPOINT_METHODS,
.add_listener = client_endpoint_marshal_add_listener,
.update = client_endpoint_marshal_update,
.stream_update = client_endpoint_marshal_stream_update,
};
static const struct pw_protocol_native_demarshal
pw_protocol_native_client_endpoint_method_demarshal[PW_CLIENT_ENDPOINT_PROXY_METHOD_NUM] =
pw_protocol_native_client_endpoint_method_demarshal[PW_CLIENT_ENDPOINT_METHOD_NUM] =
{
[PW_CLIENT_ENDPOINT_PROXY_METHOD_ADD_LISTENER] = { NULL, 0 },
[PW_CLIENT_ENDPOINT_PROXY_METHOD_UPDATE] = { client_endpoint_demarshal_update, 0 },
[PW_CLIENT_ENDPOINT_PROXY_METHOD_STREAM_UPDATE] = { client_endpoint_demarshal_stream_update, 0 },
[PW_CLIENT_ENDPOINT_METHOD_ADD_LISTENER] = { NULL, 0 },
[PW_CLIENT_ENDPOINT_METHOD_UPDATE] = { client_endpoint_demarshal_update, 0 },
[PW_CLIENT_ENDPOINT_METHOD_STREAM_UPDATE] = { client_endpoint_demarshal_stream_update, 0 },
};
static const struct pw_protocol_marshal pw_protocol_native_client_endpoint_marshal = {
PW_TYPE_INTERFACE_ClientEndpoint,
PW_VERSION_CLIENT_ENDPOINT_PROXY,
PW_VERSION_CLIENT_ENDPOINT,
0,
PW_CLIENT_ENDPOINT_PROXY_METHOD_NUM,
PW_CLIENT_ENDPOINT_PROXY_EVENT_NUM,
PW_CLIENT_ENDPOINT_METHOD_NUM,
PW_CLIENT_ENDPOINT_EVENT_NUM,
&pw_protocol_native_client_endpoint_method_marshal,
&pw_protocol_native_client_endpoint_method_demarshal,
&pw_protocol_native_client_endpoint_event_marshal,
@ -657,7 +657,7 @@ static int client_session_marshal_set_param (void *object,
struct spa_pod_builder *b;
b = pw_protocol_native_begin_resource(resource,
PW_CLIENT_SESSION_PROXY_EVENT_SET_PARAM, NULL);
PW_CLIENT_SESSION_EVENT_SET_PARAM, NULL);
spa_pod_builder_add_struct(b,
SPA_POD_Id(id),
@ -675,7 +675,7 @@ static int client_session_marshal_link_set_param (void *object,
struct spa_pod_builder *b;
b = pw_protocol_native_begin_resource(resource,
PW_CLIENT_SESSION_PROXY_EVENT_LINK_SET_PARAM, NULL);
PW_CLIENT_SESSION_EVENT_LINK_SET_PARAM, NULL);
spa_pod_builder_add_struct(b,
SPA_POD_Int(link_id),
@ -693,7 +693,7 @@ static int client_session_marshal_link_request_state (void *object,
struct spa_pod_builder *b;
b = pw_protocol_native_begin_resource(resource,
PW_CLIENT_SESSION_PROXY_EVENT_LINK_REQUEST_STATE, NULL);
PW_CLIENT_SESSION_EVENT_LINK_REQUEST_STATE, NULL);
spa_pod_builder_add_struct(b,
SPA_POD_Int(link_id),
@ -704,7 +704,7 @@ static int client_session_marshal_link_request_state (void *object,
static int client_session_marshal_add_listener(void *object,
struct spa_hook *listener,
const struct pw_client_session_proxy_events *events,
const struct pw_client_session_events *events,
void *data)
{
struct pw_proxy *proxy = object;
@ -724,7 +724,7 @@ static int client_session_marshal_update(void *object,
uint32_t i;
b = pw_protocol_native_begin_proxy(proxy,
PW_CLIENT_SESSION_PROXY_METHOD_UPDATE, NULL);
PW_CLIENT_SESSION_METHOD_UPDATE, NULL);
spa_pod_builder_push_struct(b, &f);
spa_pod_builder_add(b,
@ -758,7 +758,7 @@ static int client_session_marshal_link_update(void *object,
uint32_t i;
b = pw_protocol_native_begin_proxy(proxy,
PW_CLIENT_SESSION_PROXY_METHOD_LINK_UPDATE, NULL);
PW_CLIENT_SESSION_METHOD_LINK_UPDATE, NULL);
spa_pod_builder_push_struct(b, &f);
spa_pod_builder_add(b,
@ -795,7 +795,7 @@ static int client_session_demarshal_set_param(void *object,
SPA_POD_PodObject(&param)) < 0)
return -EINVAL;
return pw_proxy_notify(proxy, struct pw_client_session_proxy_events,
return pw_proxy_notify(proxy, struct pw_client_session_events,
set_param, 0, id, flags, param);
}
@ -815,7 +815,7 @@ static int client_session_demarshal_link_set_param(void *object,
SPA_POD_PodObject(&param)) < 0)
return -EINVAL;
return pw_proxy_notify(proxy, struct pw_client_session_proxy_events,
return pw_proxy_notify(proxy, struct pw_client_session_events,
link_set_param, 0, link_id, id, flags, param);
}
@ -832,7 +832,7 @@ static int client_session_demarshal_link_request_state(void *object,
SPA_POD_Int(&state)) < 0)
return -EINVAL;
return pw_proxy_notify(proxy, struct pw_client_session_proxy_events,
return pw_proxy_notify(proxy, struct pw_client_session_events,
link_request_state, 0, link_id, state);
}
@ -871,7 +871,7 @@ static int client_session_demarshal_update(void *object,
demarshal_pw_session_info(&prs[1], &f[1], infop);
}
return pw_resource_notify(resource, struct pw_client_session_proxy_methods,
return pw_resource_notify(resource, struct pw_client_session_methods,
update, 0, change_mask, n_params, params, infop);
}
@ -911,46 +911,46 @@ static int client_session_demarshal_link_update(void *object,
demarshal_pw_endpoint_link_info(&prs[1], &f[1], infop);
}
return pw_resource_notify(resource, struct pw_client_session_proxy_methods,
return pw_resource_notify(resource, struct pw_client_session_methods,
link_update, 0, link_id, change_mask, n_params, params, infop);
}
static const struct pw_client_session_proxy_events pw_protocol_native_client_session_event_marshal = {
PW_VERSION_CLIENT_SESSION_PROXY_EVENTS,
static const struct pw_client_session_events pw_protocol_native_client_session_event_marshal = {
PW_VERSION_CLIENT_SESSION_EVENTS,
.set_param = client_session_marshal_set_param,
.link_set_param = client_session_marshal_link_set_param,
.link_request_state = client_session_marshal_link_request_state,
};
static const struct pw_protocol_native_demarshal
pw_protocol_native_client_session_event_demarshal[PW_CLIENT_SESSION_PROXY_EVENT_NUM] =
pw_protocol_native_client_session_event_demarshal[PW_CLIENT_SESSION_EVENT_NUM] =
{
[PW_CLIENT_SESSION_PROXY_EVENT_SET_PARAM] = { client_session_demarshal_set_param, 0 },
[PW_CLIENT_SESSION_PROXY_EVENT_LINK_SET_PARAM] = { client_session_demarshal_link_set_param, 0 },
[PW_CLIENT_SESSION_PROXY_EVENT_LINK_REQUEST_STATE] = { client_session_demarshal_link_request_state, 0 },
[PW_CLIENT_SESSION_EVENT_SET_PARAM] = { client_session_demarshal_set_param, 0 },
[PW_CLIENT_SESSION_EVENT_LINK_SET_PARAM] = { client_session_demarshal_link_set_param, 0 },
[PW_CLIENT_SESSION_EVENT_LINK_REQUEST_STATE] = { client_session_demarshal_link_request_state, 0 },
};
static const struct pw_client_session_proxy_methods pw_protocol_native_client_session_method_marshal = {
PW_VERSION_CLIENT_SESSION_PROXY_METHODS,
static const struct pw_client_session_methods pw_protocol_native_client_session_method_marshal = {
PW_VERSION_CLIENT_SESSION_METHODS,
.add_listener = client_session_marshal_add_listener,
.update = client_session_marshal_update,
.link_update = client_session_marshal_link_update,
};
static const struct pw_protocol_native_demarshal
pw_protocol_native_client_session_method_demarshal[PW_CLIENT_SESSION_PROXY_METHOD_NUM] =
pw_protocol_native_client_session_method_demarshal[PW_CLIENT_SESSION_METHOD_NUM] =
{
[PW_CLIENT_SESSION_PROXY_METHOD_ADD_LISTENER] = { NULL, 0 },
[PW_CLIENT_SESSION_PROXY_METHOD_UPDATE] = { client_session_demarshal_update, 0 },
[PW_CLIENT_SESSION_PROXY_METHOD_LINK_UPDATE] = { client_session_demarshal_link_update, 0 },
[PW_CLIENT_SESSION_METHOD_ADD_LISTENER] = { NULL, 0 },
[PW_CLIENT_SESSION_METHOD_UPDATE] = { client_session_demarshal_update, 0 },
[PW_CLIENT_SESSION_METHOD_LINK_UPDATE] = { client_session_demarshal_link_update, 0 },
};
static const struct pw_protocol_marshal pw_protocol_native_client_session_marshal = {
PW_TYPE_INTERFACE_ClientSession,
PW_VERSION_CLIENT_SESSION_PROXY,
PW_VERSION_CLIENT_SESSION,
0,
PW_CLIENT_SESSION_PROXY_METHOD_NUM,
PW_CLIENT_SESSION_PROXY_EVENT_NUM,
PW_CLIENT_SESSION_METHOD_NUM,
PW_CLIENT_SESSION_EVENT_NUM,
&pw_protocol_native_client_session_method_marshal,
&pw_protocol_native_client_session_method_demarshal,
&pw_protocol_native_client_session_event_marshal,