mirror of
				https://gitlab.freedesktop.org/pipewire/pipewire.git
				synced 2025-11-03 09:01:54 -05:00 
			
		
		
		
	permission: add some helpers
Add PW_PERM_ALL as a shortcut for all permissions Add PW_PERMISSION_FORMAT and PW_PERMISSION_ARGS to nicely format permissions.
This commit is contained in:
		
							parent
							
								
									f5e78196c4
								
							
						
					
					
						commit
						91d4806611
					
				
					 23 changed files with 58 additions and 61 deletions
				
			
		| 
						 | 
				
			
			@ -189,7 +189,7 @@ static void *create_object(void *data,
 | 
			
		|||
	pw_properties_setf(properties, PW_KEY_FACTORY_ID, "%d",
 | 
			
		||||
			pw_impl_factory_get_info(factory)->id);
 | 
			
		||||
 | 
			
		||||
	this->resource = pw_resource_new(owner, new_id, PW_PERM_RWX, type, version, 0);
 | 
			
		||||
	this->resource = pw_resource_new(owner, new_id, PW_PERM_ALL, type, version, 0);
 | 
			
		||||
	if (this->resource == NULL)
 | 
			
		||||
		goto no_mem;
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -188,7 +188,7 @@ static void *create_object(void *data,
 | 
			
		|||
	pw_properties_setf(properties, PW_KEY_FACTORY_ID, "%d",
 | 
			
		||||
			pw_impl_factory_get_info(factory)->id);
 | 
			
		||||
 | 
			
		||||
	this->resource = pw_resource_new(owner, new_id, PW_PERM_RWX, type, version, 0);
 | 
			
		||||
	this->resource = pw_resource_new(owner, new_id, PW_PERM_ALL, type, version, 0);
 | 
			
		||||
	if (this->resource == NULL)
 | 
			
		||||
		goto no_mem;
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -439,7 +439,7 @@ static void *create_object(void *data,
 | 
			
		|||
	void *result;
 | 
			
		||||
	int res;
 | 
			
		||||
 | 
			
		||||
	impl_resource = pw_resource_new(client, new_id, PW_PERM_RWX, type, version, 0);
 | 
			
		||||
	impl_resource = pw_resource_new(client, new_id, PW_PERM_ALL, type, version, 0);
 | 
			
		||||
	if (impl_resource == NULL) {
 | 
			
		||||
		res = -errno;
 | 
			
		||||
		goto error_resource;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -430,7 +430,7 @@ static void *create_object(void *data,
 | 
			
		|||
	void *result;
 | 
			
		||||
	int res;
 | 
			
		||||
 | 
			
		||||
	impl_resource = pw_resource_new(client, new_id, PW_PERM_RWX, type, version, 0);
 | 
			
		||||
	impl_resource = pw_resource_new(client, new_id, PW_PERM_ALL, type, version, 0);
 | 
			
		||||
	if (impl_resource == NULL) {
 | 
			
		||||
		res = -errno;
 | 
			
		||||
		goto error_resource;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -439,7 +439,7 @@ static void *create_object(void *data,
 | 
			
		|||
	void *result;
 | 
			
		||||
	int res;
 | 
			
		||||
 | 
			
		||||
	impl_resource = pw_resource_new(client, new_id, PW_PERM_RWX, type, version, 0);
 | 
			
		||||
	impl_resource = pw_resource_new(client, new_id, PW_PERM_ALL, type, version, 0);
 | 
			
		||||
	if (impl_resource == NULL) {
 | 
			
		||||
		res = -errno;
 | 
			
		||||
		goto error_resource;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -430,7 +430,7 @@ static void *create_object(void *data,
 | 
			
		|||
	void *result;
 | 
			
		||||
	int res;
 | 
			
		||||
 | 
			
		||||
	impl_resource = pw_resource_new(client, new_id, PW_PERM_RWX, type, version, 0);
 | 
			
		||||
	impl_resource = pw_resource_new(client, new_id, PW_PERM_ALL, type, version, 0);
 | 
			
		||||
	if (impl_resource == NULL) {
 | 
			
		||||
		res = -errno;
 | 
			
		||||
		goto error_resource;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue