mirror of
				https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
				synced 2025-11-03 09:01:50 -05:00 
			
		
		
		
	bluetooth: Use array to store profile states
Refactor the code to use an array of states instead of independent member fields, avoiding duplicated code and improving readability.
This commit is contained in:
		
							parent
							
								
									689f9413ad
								
							
						
					
					
						commit
						726435045e
					
				
					 3 changed files with 67 additions and 93 deletions
				
			
		| 
						 | 
				
			
			@ -126,17 +126,8 @@ struct pa_bluetooth_device {
 | 
			
		|||
    /* Audio state */
 | 
			
		||||
    pa_bt_audio_state_t audio_state;
 | 
			
		||||
 | 
			
		||||
    /* AudioSink state */
 | 
			
		||||
    pa_bt_audio_state_t audio_sink_state;
 | 
			
		||||
 | 
			
		||||
    /* AudioSource state */
 | 
			
		||||
    pa_bt_audio_state_t audio_source_state;
 | 
			
		||||
 | 
			
		||||
    /* Headset state */
 | 
			
		||||
    pa_bt_audio_state_t headset_state;
 | 
			
		||||
 | 
			
		||||
    /* HandsfreeGateway state */
 | 
			
		||||
    pa_bt_audio_state_t hfgw_state;
 | 
			
		||||
    /* AudioSink, AudioSource, Headset and HandsfreeGateway states */
 | 
			
		||||
    pa_bt_audio_state_t profile_state[PA_BLUETOOTH_PROFILE_COUNT];
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
pa_bluetooth_discovery* pa_bluetooth_discovery_get(pa_core *core);
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue