diff options
Diffstat (limited to 'src/pulse/introspect.h')
-rw-r--r-- | src/pulse/introspect.h | 100 |
1 files changed, 66 insertions, 34 deletions
diff --git a/src/pulse/introspect.h b/src/pulse/introspect.h index b409cadb..badc787e 100644 --- a/src/pulse/introspect.h +++ b/src/pulse/introspect.h @@ -32,6 +32,7 @@ #include <pulse/channelmap.h> #include <pulse/volume.h> #include <pulse/proplist.h> +#include <pulse/version.h> /** \page introspect Server Query and Control * @@ -128,18 +129,6 @@ * pa_context_get_module_info() or pa_context_get_module_info_list(). The * information structure is called pa_module_info. * - * \subsection autoload_subsec Autoload Entries - * - * Modules can be autoloaded as a result of a client requesting a - * certain sink or source. Please note that autoloading is deprecated - * in 0.9.11. and is likely to be removed from the API in a later - * version. This mapping between sink/source names and modules can be - * queried from the server: - * - * \li By index - pa_context_get_autoload_info_by_index() - * \li By sink/source name - pa_context_get_autoload_info_by_name() - * \li All - pa_context_get_autoload_info_list() - * * \subsection client_subsec Clients * * PulseAudio clients are also identified by index and are retrieved using @@ -189,14 +178,6 @@ * Server modules can be remotely loaded and unloaded using * pa_context_load_module() and pa_context_unload_module(). * - * \subsection autoload_subsec Autoload Entries - * - * New module autoloading rules can be added, and existing can be removed - * using pa_context_add_autoload() and pa_context_remove_autoload_by_index() - * / pa_context_remove_autoload_by_name(). Please note that autoloading is deprecated - * in 0.9.11. and is likely to be removed from the API in a later - * version. - * * \subsection client_subsec Clients * * The only operation supported on clients, is the possibility of kicking @@ -231,7 +212,9 @@ typedef struct pa_sink_info { pa_sink_flags_t flags; /**< Flags */ pa_proplist *proplist; /**< Property list \since 0.9.11 */ pa_usec_t configured_latency; /**< The latency this device has been configured to. \since 0.9.11 */ - pa_volume_t base_volume; /**< Some kind of "base" volume that refers to unamplified/unattenuated volume in the context of the output device. \since 0.9.14 */ + pa_volume_t base_volume; /**< Some kind of "base" volume that refers to unamplified/unattenuated volume in the context of the output device. \since 0.9.15 */ + pa_sink_state_t state; /**< State \since 0.9.15 */ + uint32_t n_volume_steps; /**< Number of volume steps for sinks which do not support arbitrary volumes. \since 0.9.15 */ } pa_sink_info; /** Callback prototype for pa_context_get_sink_info_by_name() and friends */ @@ -241,7 +224,7 @@ typedef void (*pa_sink_info_cb_t)(pa_context *c, const pa_sink_info *i, int eol, pa_operation* pa_context_get_sink_info_by_name(pa_context *c, const char *name, pa_sink_info_cb_t cb, void *userdata); /** Get information about a sink by its index */ -pa_operation* pa_context_get_sink_info_by_index(pa_context *c, uint32_t id, pa_sink_info_cb_t cb, void *userdata); +pa_operation* pa_context_get_sink_info_by_index(pa_context *c, uint32_t idx, pa_sink_info_cb_t cb, void *userdata); /** Get the complete sink list */ pa_operation* pa_context_get_sink_info_list(pa_context *c, pa_sink_info_cb_t cb, void *userdata); @@ -287,7 +270,9 @@ typedef struct pa_source_info { pa_source_flags_t flags; /**< Flags */ pa_proplist *proplist; /**< Property list \since 0.9.11 */ pa_usec_t configured_latency; /**< The latency this device has been configured to. \since 0.9.11 */ - pa_volume_t base_volume; /**< Some kind of "base" volume that refers to unamplified/unattenuated volume in the context of the input device. \since 0.9.14 */ + pa_volume_t base_volume; /**< Some kind of "base" volume that refers to unamplified/unattenuated volume in the context of the input device. \since 0.9.15 */ + pa_source_state_t state; /**< State \since 0.9.15 */ + uint32_t n_volume_steps; /**< Number of volume steps for sources which do not support arbitrary volumes. \since 0.9.15 */ } pa_source_info; /** Callback prototype for pa_context_get_source_info_by_name() and friends */ @@ -297,7 +282,7 @@ typedef void (*pa_source_info_cb_t)(pa_context *c, const pa_source_info *i, int pa_operation* pa_context_get_source_info_by_name(pa_context *c, const char *name, pa_source_info_cb_t cb, void *userdata); /** Get information about a source by its index */ -pa_operation* pa_context_get_source_info_by_index(pa_context *c, uint32_t id, pa_source_info_cb_t cb, void *userdata); +pa_operation* pa_context_get_source_info_by_index(pa_context *c, uint32_t idx, pa_source_info_cb_t cb, void *userdata); /** Get the complete source list */ pa_operation* pa_context_get_source_info_list(pa_context *c, pa_source_info_cb_t cb, void *userdata); @@ -350,7 +335,10 @@ typedef struct pa_module_info { const char*name, /**< Name of the module */ *argument; /**< Argument string of the module */ uint32_t n_used; /**< Usage counter or PA_INVALID_INDEX */ - int auto_unload; /**< Non-zero if this is an autoloaded module */ +/** \cond fulldocs */ + int auto_unload; /**< \deprecated Non-zero if this is an autoloaded module */ +/** \endcond */ + pa_proplist *proplist; /**< Property list \since 0.9.15 */ } pa_module_info; /** Callback prototype for pa_context_get_module_info() and firends*/ @@ -400,6 +388,50 @@ pa_operation* pa_context_kill_client(pa_context *c, uint32_t idx, pa_context_suc /** @} */ +/** @{ \name Cards */ + +/** Stores information about a specific profile 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 0.9.15 */ +typedef struct pa_card_profile_info { + const char *name; /**< Name of this profile */ + const char *description; /**< Description of this profile */ +} pa_card_profile_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 */ +typedef struct pa_card_info { + uint32_t index; /**< Index of this card */ + const char *name; /**< Name of this card */ + uint32_t owner_module; /**< Index of the owning module, or PA_INVALID_INDEX */ + const char *driver; /**< Driver name */ + uint32_t n_profiles; /**< Number of entries in profile array */ + 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 */ +} pa_card_info; + +/** Callback prototype for pa_context_get_card_info() and firends \since 0.9.15 */ +typedef void (*pa_card_info_cb_t) (pa_context *c, const pa_card_info*i, int eol, void *userdata); + +/** Get information about a card by its index \since 0.9.15 */ +pa_operation* pa_context_get_card_info_by_index(pa_context *c, uint32_t idx, pa_card_info_cb_t cb, void *userdata); + +/** Get information about a card by its name \since 0.9.15 */ +pa_operation* pa_context_get_card_info_by_name(pa_context *c, const char *name, pa_card_info_cb_t cb, void *userdata); + +/** Get the complete card list \since 0.9.15 */ +pa_operation* pa_context_get_card_info_list(pa_context *c, pa_card_info_cb_t cb, void *userdata); + +/** Change the profile of a card. \since 0.9.15 */ +pa_operation* pa_context_set_card_profile_by_index(pa_context *c, uint32_t idx, const char*profile, pa_context_success_cb_t cb, void *userdata); + +/** Change the profile of a card. \since 0.9.15 */ +pa_operation* pa_context_set_card_profile_by_name(pa_context *c, const char*name, const char*profile, pa_context_success_cb_t cb, void *userdata); + +/** @} */ + /** @{ \name Sink Inputs */ /** Stores information about sink inputs. Please note that this structure @@ -551,13 +583,13 @@ pa_operation* pa_context_get_sample_info_list(pa_context *c, pa_sample_info_cb_t /** @{ \name Autoload Entries */ -/** Type of an autoload entry. */ +/** \deprecated Type of an autoload entry. */ typedef enum pa_autoload_type { PA_AUTOLOAD_SINK = 0, PA_AUTOLOAD_SOURCE = 1 } pa_autoload_type_t; -/** Stores information about autoload entries. Please note that this structure +/** \deprecated Stores information about autoload entries. Please note that this structure * can be extended as part of evolutionary API updates at any time in * any new release. */ typedef struct pa_autoload_info { @@ -568,25 +600,25 @@ typedef struct pa_autoload_info { const char *argument; /**< Argument string for module */ } pa_autoload_info; -/** Callback prototype for pa_context_get_autoload_info_by_name() and firends */ +/** \deprecated Callback prototype for pa_context_get_autoload_info_by_name() and firends */ typedef void (*pa_autoload_info_cb_t)(pa_context *c, const pa_autoload_info *i, int eol, void *userdata); -/** Get info about a specific autoload entry. */ +/** \deprecated Get info about a specific autoload entry. */ pa_operation* pa_context_get_autoload_info_by_name(pa_context *c, const char *name, pa_autoload_type_t type, pa_autoload_info_cb_t cb, void *userdata) PA_GCC_DEPRECATED; -/** Get info about a specific autoload entry. */ +/** \deprecated Get info about a specific autoload entry. */ pa_operation* pa_context_get_autoload_info_by_index(pa_context *c, uint32_t idx, pa_autoload_info_cb_t cb, void *userdata) PA_GCC_DEPRECATED; -/** Get the complete list of autoload entries. */ +/** \deprecated Get the complete list of autoload entries. */ pa_operation* pa_context_get_autoload_info_list(pa_context *c, pa_autoload_info_cb_t cb, void *userdata) PA_GCC_DEPRECATED; -/** Add a new autoload entry. */ +/** \deprecated Add a new autoload entry. */ pa_operation* pa_context_add_autoload(pa_context *c, const char *name, pa_autoload_type_t type, const char *module, const char*argument, pa_context_index_cb_t, void* userdata) PA_GCC_DEPRECATED; -/** Remove an autoload entry. */ +/** \deprecated Remove an autoload entry. */ pa_operation* pa_context_remove_autoload_by_name(pa_context *c, const char *name, pa_autoload_type_t type, pa_context_success_cb_t cb, void* userdata) PA_GCC_DEPRECATED; -/** Remove an autoload entry. */ +/** \deprecated Remove an autoload entry. */ pa_operation* pa_context_remove_autoload_by_index(pa_context *c, uint32_t idx, pa_context_success_cb_t cb, void* userdata) PA_GCC_DEPRECATED; /** @} */ |