mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-05 13:29:57 -05:00
bluetooth: Use enum to represent form factors
Avoid using strings only to represent form factors in the bluetooth-util API and instead use a new dedicated enum type: pa_bt_form_factor_t.
This commit is contained in:
parent
278ceb453f
commit
11d7a2d197
3 changed files with 57 additions and 17 deletions
|
|
@ -154,7 +154,20 @@ void pa_bluetooth_transport_set_speaker_gain(pa_bluetooth_transport *t, uint16_t
|
|||
|
||||
pa_hook* pa_bluetooth_discovery_hook(pa_bluetooth_discovery *y, pa_bluetooth_hook_t hook);
|
||||
|
||||
const char* pa_bluetooth_get_form_factor(uint32_t class);
|
||||
typedef enum pa_bt_form_factor {
|
||||
PA_BT_FORM_FACTOR_UNKNOWN,
|
||||
PA_BT_FORM_FACTOR_HEADSET,
|
||||
PA_BT_FORM_FACTOR_HANDSFREE,
|
||||
PA_BT_FORM_FACTOR_MICROPHONE,
|
||||
PA_BT_FORM_FACTOR_SPEAKER,
|
||||
PA_BT_FORM_FACTOR_HEADPHONE,
|
||||
PA_BT_FORM_FACTOR_PORTABLE,
|
||||
PA_BT_FORM_FACTOR_CAR,
|
||||
PA_BT_FORM_FACTOR_HIFI,
|
||||
} pa_bt_form_factor_t;
|
||||
|
||||
pa_bt_form_factor_t pa_bluetooth_get_form_factor(uint32_t class);
|
||||
const char *pa_bt_form_factor_to_string(pa_bt_form_factor_t ff);
|
||||
|
||||
char *pa_bluetooth_cleanup_name(const char *name);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue