diff --git a/src/pulse/def.h b/src/pulse/def.h index ca74dfc..ef82370 100644 --- a/src/pulse/def.h +++ b/src/pulse/def.h @@ -124,6 +124,20 @@ typedef enum pa_context_flags { #define PA_CONTEXT_NOFAIL PA_CONTEXT_NOFAIL /** \endcond */ +/** Direction bitfield - while we currently do not expose anything bidirectional, + one should test against the bit instead of the value (e g if (d & PA_DIRECTION_OUTPUT)), + because we might add bidirectional stuff in the future. \since 2.0 +*/ +typedef enum pa_direction { + PA_DIRECTION_OUTPUT = 0x0001U, /**< Output direction */ + PA_DIRECTION_INPUT = 0x0002U /**< Input direction */ +} pa_direction_t; + +/** \cond fulldocs */ +#define PA_DIRECTION_OUTPUT PA_DIRECTION_OUTPUT +#define PA_DIRECTION_INPUT PA_DIRECTION_INPUT +/** \endcond */ + /** The type of device we are dealing with */ typedef enum pa_device_type { PA_DEVICE_TYPE_SINK, /**< Playback device */ diff --git a/src/pulse/introspect.h b/src/pulse/introspect.h index 07c7233..b15633f 100644 --- a/src/pulse/introspect.h +++ b/src/pulse/introspect.h @@ -454,6 +454,19 @@ typedef struct pa_card_profile_info { uint32_t priority; /**< The higher this value is the more useful this profile is as a default */ } pa_card_profile_info; +/** Stores information about a specific port of a card. Please + * note that this structure can be extended as part of evolutionary + * API updates at any time in any new release. \since 2.0 */ +typedef struct pa_card_port_info { + const char *name; /**< Name of this port */ + const char *description; /**< Description of this port */ + uint32_t priority; /**< The higher this value is the more useful this port is as a default */ + pa_port_available_t available; /**< Is this port currently available? \since 2.0 */ + int direction; /**< This is a \link pa_direction_t enum */ + uint32_t n_profiles; /**< Number of entries in profile array */ + pa_card_profile_info** profiles; /**< Array of pointers available profile, or NULL. Array is terminated by an entry set to NULL. */ +} pa_card_port_info; + /** Stores information about cards. Please note that this structure * can be extended as part of evolutionary API updates at any time in * any new release. \since 0.9.15 */ @@ -466,6 +479,8 @@ typedef struct pa_card_info { pa_card_profile_info* profiles; /**< Array of available profile, or NULL. Array is terminated by an entry with name set to NULL. Number of entries is stored in n_profiles */ pa_card_profile_info* active_profile; /**< Pointer to active profile in the array, or NULL */ pa_proplist *proplist; /**< Property list */ + uint32_t n_ports; /**< Number of entries in port array */ + pa_card_port_info **ports; /**< Array of pointers to ports, or NULL. Array is terminated by an entry set to NULL. */ } pa_card_info; /** Callback prototype for pa_context_get_card_info_...() \since 0.9.15 */