add const to spa_event and spa_command

This commit is contained in:
Wim Taymans 2019-05-28 13:51:12 +02:00
parent 4661ee882c
commit 5299677f88
10 changed files with 11 additions and 11 deletions

View file

@ -100,7 +100,7 @@ struct spa_device_events {
void (*result) (void *data, int seq, int res, const void *result); void (*result) (void *data, int seq, int res, const void *result);
/** a device event */ /** a device event */
void (*event) (void *data, struct spa_event *event); void (*event) (void *data, const struct spa_event *event);
/** info changed for an object managed by the device, info is NULL when /** info changed for an object managed by the device, info is NULL when
* the object is removed */ * the object is removed */

View file

@ -84,7 +84,7 @@ struct spa_monitor_callbacks {
int (*info) (void *data, const struct spa_dict *info); int (*info) (void *data, const struct spa_dict *info);
/** an item is added/removed/changed on the monitor */ /** an item is added/removed/changed on the monitor */
int (*event) (void *data, struct spa_event *event); int (*event) (void *data, const struct spa_event *event);
}; };
/** /**

View file

@ -168,7 +168,7 @@ struct spa_node_events {
* This will be called when an out-of-bound event is notified * This will be called when an out-of-bound event is notified
* on \a node. * on \a node.
*/ */
void (*event) (void *data, struct spa_event *event); void (*event) (void *data, const struct spa_event *event);
}; };
/** Node callbacks /** Node callbacks

View file

@ -67,7 +67,7 @@ static int on_monitor_info(void *_data, const struct spa_dict *info)
return 0; return 0;
} }
static int on_monitor_event(void *_data, struct spa_event *event) static int on_monitor_event(void *_data, const struct spa_event *event)
{ {
struct data *data = _data; struct data *data = _data;

View file

@ -284,7 +284,7 @@ struct pw_client_node_proxy_methods {
* Send an event to the node * Send an event to the node
* \param event the event to send * \param event the event to send
*/ */
int (*event) (void *object, struct spa_event *event); int (*event) (void *object, const struct spa_event *event);
}; };

View file

@ -1089,7 +1089,7 @@ static int client_node_set_active(void *data, bool active)
return pw_node_set_active(impl->this.node, active); return pw_node_set_active(impl->this.node, active);
} }
static int client_node_event(void *data, struct spa_event *event) static int client_node_event(void *data, const struct spa_event *event)
{ {
struct impl *impl = data; struct impl *impl = data;
struct node *this = &impl->node; struct node *this = &impl->node;

View file

@ -223,7 +223,7 @@ static int client_node_marshal_set_active(void *object, bool active)
return pw_protocol_native_end_proxy(proxy, b); return pw_protocol_native_end_proxy(proxy, b);
} }
static int client_node_marshal_event_method(void *object, struct spa_event *event) static int client_node_marshal_event_method(void *object, const struct spa_event *event)
{ {
struct pw_proxy *proxy = object; struct pw_proxy *proxy = object;
struct spa_pod_builder *b; struct spa_pod_builder *b;
@ -1007,7 +1007,7 @@ static int client_node_demarshal_event_method(void *object, const struct pw_prot
{ {
struct pw_resource *resource = object; struct pw_resource *resource = object;
struct spa_pod_parser prs; struct spa_pod_parser prs;
struct spa_event *event; const struct spa_event *event;
spa_pod_parser_init(&prs, msg->data, msg->size); spa_pod_parser_init(&prs, msg->data, msg->size);
if (spa_pod_parser_get_struct(&prs, if (spa_pod_parser_get_struct(&prs,

View file

@ -1186,7 +1186,7 @@ static int node_demarshal_send_command(void *object, const struct pw_protocol_na
{ {
struct pw_resource *resource = object; struct pw_resource *resource = object;
struct spa_pod_parser prs; struct spa_pod_parser prs;
struct spa_command *command; const struct spa_command *command;
spa_pod_parser_init(&prs, msg->data, msg->size); spa_pod_parser_init(&prs, msg->data, msg->size);
if (spa_pod_parser_get_struct(&prs, if (spa_pod_parser_get_struct(&prs,

View file

@ -264,7 +264,7 @@ static void change_item(struct pw_spa_monitor *this, struct spa_pod *item, uint6
} }
} }
static int on_monitor_event(void *data, struct spa_event *event) static int on_monitor_event(void *data, const struct spa_event *event)
{ {
struct impl *impl = data; struct impl *impl = data;
struct pw_spa_monitor *this = &impl->this; struct pw_spa_monitor *this = &impl->this;

View file

@ -997,7 +997,7 @@ static void node_result(void *data, int seq, int res, const void *result)
pw_node_emit_result(node, seq, res, result); pw_node_emit_result(node, seq, res, result);
} }
static void node_event(void *data, struct spa_event *event) static void node_event(void *data, const struct spa_event *event)
{ {
struct pw_node *node = data; struct pw_node *node = data;
struct impl *impl = SPA_CONTAINER_OF(node, struct impl, this); struct impl *impl = SPA_CONTAINER_OF(node, struct impl, this);