mirror of
				https://gitlab.freedesktop.org/pipewire/pipewire.git
				synced 2025-11-03 09:01:54 -05:00 
			
		
		
		
	add const to spa_event and spa_command
This commit is contained in:
		
							parent
							
								
									4661ee882c
								
							
						
					
					
						commit
						5299677f88
					
				
					 10 changed files with 11 additions and 11 deletions
				
			
		| 
						 | 
				
			
			@ -100,7 +100,7 @@ struct spa_device_events {
 | 
			
		|||
	void (*result) (void *data, int seq, int res, const void *result);
 | 
			
		||||
 | 
			
		||||
	/** 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
 | 
			
		||||
	 * the object is removed */
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -84,7 +84,7 @@ struct spa_monitor_callbacks {
 | 
			
		|||
	int (*info) (void *data, const struct spa_dict *info);
 | 
			
		||||
 | 
			
		||||
	/** 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);
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -168,7 +168,7 @@ struct spa_node_events {
 | 
			
		|||
	 * This will be called when an out-of-bound event is notified
 | 
			
		||||
	 * on \a node.
 | 
			
		||||
	 */
 | 
			
		||||
	void (*event) (void *data, struct spa_event *event);
 | 
			
		||||
	void (*event) (void *data, const struct spa_event *event);
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
/** Node callbacks
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -67,7 +67,7 @@ static int on_monitor_info(void *_data, const struct spa_dict *info)
 | 
			
		|||
	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;
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -284,7 +284,7 @@ struct pw_client_node_proxy_methods {
 | 
			
		|||
	 * Send an event to the node
 | 
			
		||||
	 * \param event the event to send
 | 
			
		||||
	 */
 | 
			
		||||
	int (*event) (void *object, struct spa_event *event);
 | 
			
		||||
	int (*event) (void *object, const struct spa_event *event);
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1089,7 +1089,7 @@ static int client_node_set_active(void *data, bool 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 node *this = &impl->node;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -223,7 +223,7 @@ static int client_node_marshal_set_active(void *object, bool active)
 | 
			
		|||
	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 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 spa_pod_parser prs;
 | 
			
		||||
	struct spa_event *event;
 | 
			
		||||
	const struct spa_event *event;
 | 
			
		||||
 | 
			
		||||
	spa_pod_parser_init(&prs, msg->data, msg->size);
 | 
			
		||||
	if (spa_pod_parser_get_struct(&prs,
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -1186,7 +1186,7 @@ static int node_demarshal_send_command(void *object, const struct pw_protocol_na
 | 
			
		|||
{
 | 
			
		||||
	struct pw_resource *resource = object;
 | 
			
		||||
	struct spa_pod_parser prs;
 | 
			
		||||
	struct spa_command *command;
 | 
			
		||||
	const struct spa_command *command;
 | 
			
		||||
 | 
			
		||||
	spa_pod_parser_init(&prs, msg->data, msg->size);
 | 
			
		||||
	if (spa_pod_parser_get_struct(&prs,
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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 pw_spa_monitor *this = &impl->this;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
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 impl *impl = SPA_CONTAINER_OF(node, struct impl, this);
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue