153a5a1b3Sopenharmony_ci#ifndef foointrospecthfoo 253a5a1b3Sopenharmony_ci#define foointrospecthfoo 353a5a1b3Sopenharmony_ci 453a5a1b3Sopenharmony_ci/*** 553a5a1b3Sopenharmony_ci This file is part of PulseAudio. 653a5a1b3Sopenharmony_ci 753a5a1b3Sopenharmony_ci Copyright 2004-2006 Lennart Poettering 853a5a1b3Sopenharmony_ci Copyright 2006 Pierre Ossman <ossman@cendio.se> for Cendio AB 953a5a1b3Sopenharmony_ci 1053a5a1b3Sopenharmony_ci PulseAudio is free software; you can redistribute it and/or modify 1153a5a1b3Sopenharmony_ci it under the terms of the GNU Lesser General Public License as published 1253a5a1b3Sopenharmony_ci by the Free Software Foundation; either version 2.1 of the License, 1353a5a1b3Sopenharmony_ci or (at your option) any later version. 1453a5a1b3Sopenharmony_ci 1553a5a1b3Sopenharmony_ci PulseAudio is distributed in the hope that it will be useful, but 1653a5a1b3Sopenharmony_ci WITHOUT ANY WARRANTY; without even the implied warranty of 1753a5a1b3Sopenharmony_ci MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 1853a5a1b3Sopenharmony_ci General Public License for more details. 1953a5a1b3Sopenharmony_ci 2053a5a1b3Sopenharmony_ci You should have received a copy of the GNU Lesser General Public License 2153a5a1b3Sopenharmony_ci along with PulseAudio; if not, see <http://www.gnu.org/licenses/>. 2253a5a1b3Sopenharmony_ci***/ 2353a5a1b3Sopenharmony_ci 2453a5a1b3Sopenharmony_ci#include <inttypes.h> 2553a5a1b3Sopenharmony_ci 2653a5a1b3Sopenharmony_ci#include <pulse/operation.h> 2753a5a1b3Sopenharmony_ci#include <pulse/context.h> 2853a5a1b3Sopenharmony_ci#include <pulse/cdecl.h> 2953a5a1b3Sopenharmony_ci#include <pulse/gccmacro.h> 3053a5a1b3Sopenharmony_ci#include <pulse/channelmap.h> 3153a5a1b3Sopenharmony_ci#include <pulse/volume.h> 3253a5a1b3Sopenharmony_ci#include <pulse/proplist.h> 3353a5a1b3Sopenharmony_ci#include <pulse/format.h> 3453a5a1b3Sopenharmony_ci#include <pulse/version.h> 3553a5a1b3Sopenharmony_ci 3653a5a1b3Sopenharmony_ci/** \page introspect Server Query and Control 3753a5a1b3Sopenharmony_ci * 3853a5a1b3Sopenharmony_ci * \section overv_sec Overview 3953a5a1b3Sopenharmony_ci * 4053a5a1b3Sopenharmony_ci * Sometimes it is necessary to query and modify global settings in the 4153a5a1b3Sopenharmony_ci * server. For this, PulseAudio has the introspection API. It can list sinks, 4253a5a1b3Sopenharmony_ci * sources, samples and other aspects of the server. It can also modify the 4353a5a1b3Sopenharmony_ci * attributes of the server that will affect operations on a global level, 4453a5a1b3Sopenharmony_ci * and not just the application's context. 4553a5a1b3Sopenharmony_ci * 4653a5a1b3Sopenharmony_ci * \section query_sec Querying 4753a5a1b3Sopenharmony_ci * 4853a5a1b3Sopenharmony_ci * All querying is done through callbacks. This approach is necessary to 4953a5a1b3Sopenharmony_ci * maintain an asynchronous design. The client will request the information 5053a5a1b3Sopenharmony_ci * and some time later, the server will respond with the desired data. 5153a5a1b3Sopenharmony_ci * 5253a5a1b3Sopenharmony_ci * Some objects can have multiple instances on the server. When requesting all 5353a5a1b3Sopenharmony_ci * of these at once, the callback will be called multiple times, once for 5453a5a1b3Sopenharmony_ci * each object. When the list has been exhausted, the callback will be called 5553a5a1b3Sopenharmony_ci * without an information structure and the eol parameter set to a positive 5653a5a1b3Sopenharmony_ci * value. 5753a5a1b3Sopenharmony_ci * 5853a5a1b3Sopenharmony_ci * Note that even if a single object is requested, and not the entire list, 5953a5a1b3Sopenharmony_ci * the terminating call will still be made. 6053a5a1b3Sopenharmony_ci * 6153a5a1b3Sopenharmony_ci * If an error occurs, the callback will be invoked without an information 6253a5a1b3Sopenharmony_ci * structure and eol set to a negative value.. 6353a5a1b3Sopenharmony_ci * 6453a5a1b3Sopenharmony_ci * Data members in the information structures are only valid during the 6553a5a1b3Sopenharmony_ci * duration of the callback. If they are required after the callback is 6653a5a1b3Sopenharmony_ci * finished, a deep copy of the information structure must be performed. 6753a5a1b3Sopenharmony_ci * 6853a5a1b3Sopenharmony_ci * \subsection server_subsec Server Information 6953a5a1b3Sopenharmony_ci * 7053a5a1b3Sopenharmony_ci * The server can be queried about its name, the environment it's running on 7153a5a1b3Sopenharmony_ci * and the currently active global defaults. Calling 7253a5a1b3Sopenharmony_ci * pa_context_get_server_info() provides access to a pa_server_info structure 7353a5a1b3Sopenharmony_ci * containing all of these. 7453a5a1b3Sopenharmony_ci * 7553a5a1b3Sopenharmony_ci * \subsection memstat_subsec Memory Usage 7653a5a1b3Sopenharmony_ci * 7753a5a1b3Sopenharmony_ci * Statistics about memory usage can be fetched using pa_context_stat(), 7853a5a1b3Sopenharmony_ci * giving a pa_stat_info structure. 7953a5a1b3Sopenharmony_ci * 8053a5a1b3Sopenharmony_ci * \subsection sinksrc_subsec Sinks and Sources 8153a5a1b3Sopenharmony_ci * 8253a5a1b3Sopenharmony_ci * The server can have an arbitrary number of sinks and sources. Each sink 8353a5a1b3Sopenharmony_ci * and source have both an index and a name associated with it. As such, 8453a5a1b3Sopenharmony_ci * there are three ways to get access to them: 8553a5a1b3Sopenharmony_ci * 8653a5a1b3Sopenharmony_ci * \li By index - pa_context_get_sink_info_by_index() / 8753a5a1b3Sopenharmony_ci * pa_context_get_source_info_by_index() 8853a5a1b3Sopenharmony_ci * \li By name - pa_context_get_sink_info_by_name() / 8953a5a1b3Sopenharmony_ci * pa_context_get_source_info_by_name() 9053a5a1b3Sopenharmony_ci * \li All - pa_context_get_sink_info_list() / 9153a5a1b3Sopenharmony_ci * pa_context_get_source_info_list() 9253a5a1b3Sopenharmony_ci * 9353a5a1b3Sopenharmony_ci * All three method use the same callback and will provide a pa_sink_info or 9453a5a1b3Sopenharmony_ci * pa_source_info structure. 9553a5a1b3Sopenharmony_ci * 9653a5a1b3Sopenharmony_ci * \subsection siso_subsec Sink Inputs and Source Outputs 9753a5a1b3Sopenharmony_ci * 9853a5a1b3Sopenharmony_ci * Sink inputs and source outputs are the representations of the client ends 9953a5a1b3Sopenharmony_ci * of streams inside the server. I.e. they connect a client stream to one of 10053a5a1b3Sopenharmony_ci * the global sinks or sources. 10153a5a1b3Sopenharmony_ci * 10253a5a1b3Sopenharmony_ci * Sink inputs and source outputs only have an index to identify them. As 10353a5a1b3Sopenharmony_ci * such, there are only two ways to get information about them: 10453a5a1b3Sopenharmony_ci * 10553a5a1b3Sopenharmony_ci * \li By index - pa_context_get_sink_input_info() / 10653a5a1b3Sopenharmony_ci * pa_context_get_source_output_info() 10753a5a1b3Sopenharmony_ci * \li All - pa_context_get_sink_input_info_list() / 10853a5a1b3Sopenharmony_ci * pa_context_get_source_output_info_list() 10953a5a1b3Sopenharmony_ci * 11053a5a1b3Sopenharmony_ci * The structure returned is the pa_sink_input_info or pa_source_output_info 11153a5a1b3Sopenharmony_ci * structure. 11253a5a1b3Sopenharmony_ci * 11353a5a1b3Sopenharmony_ci * \subsection samples_subsec Samples 11453a5a1b3Sopenharmony_ci * 11553a5a1b3Sopenharmony_ci * The list of cached samples can be retrieved from the server. Three methods 11653a5a1b3Sopenharmony_ci * exist for querying the sample cache list: 11753a5a1b3Sopenharmony_ci * 11853a5a1b3Sopenharmony_ci * \li By index - pa_context_get_sample_info_by_index() 11953a5a1b3Sopenharmony_ci * \li By name - pa_context_get_sample_info_by_name() 12053a5a1b3Sopenharmony_ci * \li All - pa_context_get_sample_info_list() 12153a5a1b3Sopenharmony_ci * 12253a5a1b3Sopenharmony_ci * Note that this only retrieves information about the sample, not the sample 12353a5a1b3Sopenharmony_ci * data itself. 12453a5a1b3Sopenharmony_ci * 12553a5a1b3Sopenharmony_ci * \subsection module_subsec Driver Modules 12653a5a1b3Sopenharmony_ci * 12753a5a1b3Sopenharmony_ci * PulseAudio driver modules are identified by index and are retrieved using either 12853a5a1b3Sopenharmony_ci * pa_context_get_module_info() or pa_context_get_module_info_list(). The 12953a5a1b3Sopenharmony_ci * information structure is called pa_module_info. 13053a5a1b3Sopenharmony_ci * 13153a5a1b3Sopenharmony_ci * \subsection client_subsec Clients 13253a5a1b3Sopenharmony_ci * 13353a5a1b3Sopenharmony_ci * PulseAudio clients are also identified by index and are retrieved using 13453a5a1b3Sopenharmony_ci * either pa_context_get_client_info() or pa_context_get_client_info_list(). 13553a5a1b3Sopenharmony_ci * The information structure is called pa_client_info. 13653a5a1b3Sopenharmony_ci * 13753a5a1b3Sopenharmony_ci * \section ctrl_sec Control 13853a5a1b3Sopenharmony_ci * 13953a5a1b3Sopenharmony_ci * Some parts of the server are only possible to read, but most can also be 14053a5a1b3Sopenharmony_ci * modified in different ways. Note that these changes will affect all 14153a5a1b3Sopenharmony_ci * connected clients and not just the one issuing the request. 14253a5a1b3Sopenharmony_ci * 14353a5a1b3Sopenharmony_ci * \subsection sinksrc_subsec Sinks and Sources 14453a5a1b3Sopenharmony_ci * 14553a5a1b3Sopenharmony_ci * The most common change one would want to apply to sinks and sources is to 14653a5a1b3Sopenharmony_ci * modify the volume of the audio. Identically to how sinks and sources can 14753a5a1b3Sopenharmony_ci * be queried, there are two ways of identifying them: 14853a5a1b3Sopenharmony_ci * 14953a5a1b3Sopenharmony_ci * \li By index - pa_context_set_sink_volume_by_index() / 15053a5a1b3Sopenharmony_ci * pa_context_set_source_volume_by_index() 15153a5a1b3Sopenharmony_ci * \li By name - pa_context_set_sink_volume_by_name() / 15253a5a1b3Sopenharmony_ci * pa_context_set_source_volume_by_name() 15353a5a1b3Sopenharmony_ci * 15453a5a1b3Sopenharmony_ci * It is also possible to mute a sink or source: 15553a5a1b3Sopenharmony_ci * 15653a5a1b3Sopenharmony_ci * \li By index - pa_context_set_sink_mute_by_index() / 15753a5a1b3Sopenharmony_ci * pa_context_set_source_mute_by_index() 15853a5a1b3Sopenharmony_ci * \li By name - pa_context_set_sink_mute_by_name() / 15953a5a1b3Sopenharmony_ci * pa_context_set_source_mute_by_name() 16053a5a1b3Sopenharmony_ci * 16153a5a1b3Sopenharmony_ci * \subsection siso_subsec Sink Inputs and Source Outputs 16253a5a1b3Sopenharmony_ci * 16353a5a1b3Sopenharmony_ci * If an application desires to modify the volume of just a single stream 16453a5a1b3Sopenharmony_ci * (commonly one of its own streams), this can be done by setting the volume 16553a5a1b3Sopenharmony_ci * of its associated sink input or source output, using 16653a5a1b3Sopenharmony_ci * pa_context_set_sink_input_volume() or pa_context_set_source_output_volume(). 16753a5a1b3Sopenharmony_ci * 16853a5a1b3Sopenharmony_ci * It is also possible to remove sink inputs and source outputs, terminating 16953a5a1b3Sopenharmony_ci * the streams associated with them: 17053a5a1b3Sopenharmony_ci * 17153a5a1b3Sopenharmony_ci * \li Sink input - pa_context_kill_sink_input() 17253a5a1b3Sopenharmony_ci * \li Source output - pa_context_kill_source_output() 17353a5a1b3Sopenharmony_ci * 17453a5a1b3Sopenharmony_ci * It is strongly recommended that all volume changes are done as a direct 17553a5a1b3Sopenharmony_ci * result of user input. With automated requests, such as those resulting 17653a5a1b3Sopenharmony_ci * from misguided attempts of crossfading, PulseAudio can store the stream 17753a5a1b3Sopenharmony_ci * volume at an inappropriate moment and restore it later. Besides, such 17853a5a1b3Sopenharmony_ci * attempts lead to OSD popups in some desktop environments. 17953a5a1b3Sopenharmony_ci * 18053a5a1b3Sopenharmony_ci * As a special case of the general rule above, it is recommended that your 18153a5a1b3Sopenharmony_ci * application leaves the task of saving and restoring the volume of its 18253a5a1b3Sopenharmony_ci * streams to PulseAudio and does not attempt to do it by itself. PulseAudio 18353a5a1b3Sopenharmony_ci * really knows better about events such as stream moving or headphone 18453a5a1b3Sopenharmony_ci * plugging that would make the volume stored by the application inapplicable 18553a5a1b3Sopenharmony_ci * to the new configuration. 18653a5a1b3Sopenharmony_ci * 18753a5a1b3Sopenharmony_ci * Another important case where setting a sink input volume may be a bad idea 18853a5a1b3Sopenharmony_ci * is related to interpreters that interpret potentially untrusted scripts. 18953a5a1b3Sopenharmony_ci * PulseAudio relies on your application not making malicious requests (such 19053a5a1b3Sopenharmony_ci * as repeatedly setting the volume to 100%). Thus, script interpreters that 19153a5a1b3Sopenharmony_ci * represent a security boundary must sandbox volume-changing requests coming 19253a5a1b3Sopenharmony_ci * from their scripts. In the worst case, it may be necessary to apply the 19353a5a1b3Sopenharmony_ci * script-requested volume to the script-produced sounds by altering the 19453a5a1b3Sopenharmony_ci * samples in the script interpreter and not touching the sink or sink input 19553a5a1b3Sopenharmony_ci * volume as seen by PulseAudio. 19653a5a1b3Sopenharmony_ci * 19753a5a1b3Sopenharmony_ci * If an application changes any volume, it should also listen to changes of 19853a5a1b3Sopenharmony_ci * the same volume originating from outside the application (e.g., from the 19953a5a1b3Sopenharmony_ci * system mixer application) and update its user interface accordingly. Use 20053a5a1b3Sopenharmony_ci * \ref subscribe to get such notifications. 20153a5a1b3Sopenharmony_ci * 20253a5a1b3Sopenharmony_ci * \subsection module_subsec Modules 20353a5a1b3Sopenharmony_ci * 20453a5a1b3Sopenharmony_ci * Server modules can be remotely loaded and unloaded using 20553a5a1b3Sopenharmony_ci * pa_context_load_module() and pa_context_unload_module(). 20653a5a1b3Sopenharmony_ci * 20753a5a1b3Sopenharmony_ci * \subsection message_subsec Messages 20853a5a1b3Sopenharmony_ci * 20953a5a1b3Sopenharmony_ci * Server objects like sinks, sink inputs or modules can register a message 21053a5a1b3Sopenharmony_ci * handler to communicate with clients. A message can be sent to a named 21153a5a1b3Sopenharmony_ci * message handler using pa_context_send_message_to_object(). 21253a5a1b3Sopenharmony_ci * 21353a5a1b3Sopenharmony_ci * \subsection client_subsec Clients 21453a5a1b3Sopenharmony_ci * 21553a5a1b3Sopenharmony_ci * The only operation supported on clients is the possibility of kicking 21653a5a1b3Sopenharmony_ci * them off the server using pa_context_kill_client(). 21753a5a1b3Sopenharmony_ci */ 21853a5a1b3Sopenharmony_ci 21953a5a1b3Sopenharmony_ci/** \file 22053a5a1b3Sopenharmony_ci * 22153a5a1b3Sopenharmony_ci * Routines for daemon introspection. 22253a5a1b3Sopenharmony_ci * 22353a5a1b3Sopenharmony_ci * See also \subpage introspect 22453a5a1b3Sopenharmony_ci */ 22553a5a1b3Sopenharmony_ci 22653a5a1b3Sopenharmony_ciPA_C_DECL_BEGIN 22753a5a1b3Sopenharmony_ci 22853a5a1b3Sopenharmony_ci/** @{ \name Sinks */ 22953a5a1b3Sopenharmony_ci 23053a5a1b3Sopenharmony_ci/** Stores information about a specific port of a sink. Please 23153a5a1b3Sopenharmony_ci * note that this structure can be extended as part of evolutionary 23253a5a1b3Sopenharmony_ci * API updates at any time in any new release. \since 0.9.16 */ 23353a5a1b3Sopenharmony_citypedef struct pa_sink_port_info { 23453a5a1b3Sopenharmony_ci const char *name; /**< Name of this port */ 23553a5a1b3Sopenharmony_ci const char *description; /**< Description of this port */ 23653a5a1b3Sopenharmony_ci uint32_t priority; /**< The higher this value is, the more useful this port is as a default. */ 23753a5a1b3Sopenharmony_ci int available; /**< A flags (see #pa_port_available), indicating availability status of this port. \since 2.0 */ 23853a5a1b3Sopenharmony_ci const char *availability_group; /**< An indentifier for the group of ports that share their availability status with 23953a5a1b3Sopenharmony_ci * each other. This is meant especially for handling cases where one 3.5 mm connector 24053a5a1b3Sopenharmony_ci * is used for headphones, headsets and microphones, and the hardware can only tell 24153a5a1b3Sopenharmony_ci * that something was plugged in but not what exactly. In this situation the ports for 24253a5a1b3Sopenharmony_ci * all those devices share their availability status, and PulseAudio can't tell which 24353a5a1b3Sopenharmony_ci * one is actually plugged in, and some application may ask the user what was plugged 24453a5a1b3Sopenharmony_ci * in. Such applications should get a list of all card ports and compare their 24553a5a1b3Sopenharmony_ci * `availability_group` fields. Ports that have the same group are those that need 24653a5a1b3Sopenharmony_ci * input from the user to determine which device was plugged in. The application should 24753a5a1b3Sopenharmony_ci * then activate the user-chosen port. 24853a5a1b3Sopenharmony_ci * 24953a5a1b3Sopenharmony_ci * May be NULL, in which case the port is not part of any availability group. 25053a5a1b3Sopenharmony_ci * 25153a5a1b3Sopenharmony_ci * The group identifier must be treated as an opaque identifier. The string may look 25253a5a1b3Sopenharmony_ci * like an ALSA control name, but applications must not assume any such relationship. 25353a5a1b3Sopenharmony_ci * The group naming scheme can change without a warning. 25453a5a1b3Sopenharmony_ci * 25553a5a1b3Sopenharmony_ci * Since one group can include both input and output ports, the grouping should be done 25653a5a1b3Sopenharmony_ci * using pa_card_port_info instead of pa_sink_port_info, but this field is duplicated 25753a5a1b3Sopenharmony_ci * also in pa_sink_port_info (and pa_source_port_info) in case someone finds that 25853a5a1b3Sopenharmony_ci * convenient. 25953a5a1b3Sopenharmony_ci * 26053a5a1b3Sopenharmony_ci * \since 14.0 */ 26153a5a1b3Sopenharmony_ci uint32_t type; /**< Port type, see #pa_device_port_type. \since 14.0 */ 26253a5a1b3Sopenharmony_ci} pa_sink_port_info; 26353a5a1b3Sopenharmony_ci 26453a5a1b3Sopenharmony_ci/** Stores information about sinks. Please note that this structure 26553a5a1b3Sopenharmony_ci * can be extended as part of evolutionary API updates at any time in 26653a5a1b3Sopenharmony_ci * any new release. */ 26753a5a1b3Sopenharmony_citypedef struct pa_sink_info { 26853a5a1b3Sopenharmony_ci const char *name; /**< Name of the sink */ 26953a5a1b3Sopenharmony_ci uint32_t index; /**< Index of the sink */ 27053a5a1b3Sopenharmony_ci const char *description; /**< Description of this sink */ 27153a5a1b3Sopenharmony_ci pa_sample_spec sample_spec; /**< Sample spec of this sink */ 27253a5a1b3Sopenharmony_ci pa_channel_map channel_map; /**< Channel map */ 27353a5a1b3Sopenharmony_ci uint32_t owner_module; /**< Index of the owning module of this sink, or PA_INVALID_INDEX. */ 27453a5a1b3Sopenharmony_ci pa_cvolume volume; /**< Volume of the sink */ 27553a5a1b3Sopenharmony_ci int mute; /**< Mute switch of the sink */ 27653a5a1b3Sopenharmony_ci uint32_t monitor_source; /**< Index of the monitor source connected to this sink. */ 27753a5a1b3Sopenharmony_ci const char *monitor_source_name; /**< The name of the monitor source. */ 27853a5a1b3Sopenharmony_ci pa_usec_t latency; /**< Length of queued audio in the output buffer. */ 27953a5a1b3Sopenharmony_ci const char *driver; /**< Driver name */ 28053a5a1b3Sopenharmony_ci pa_sink_flags_t flags; /**< Flags */ 28153a5a1b3Sopenharmony_ci pa_proplist *proplist; /**< Property list \since 0.9.11 */ 28253a5a1b3Sopenharmony_ci pa_usec_t configured_latency; /**< The latency this device has been configured to. \since 0.9.11 */ 28353a5a1b3Sopenharmony_ci 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 */ 28453a5a1b3Sopenharmony_ci pa_sink_state_t state; /**< State \since 0.9.15 */ 28553a5a1b3Sopenharmony_ci uint32_t n_volume_steps; /**< Number of volume steps for sinks which do not support arbitrary volumes. \since 0.9.15 */ 28653a5a1b3Sopenharmony_ci uint32_t card; /**< Card index, or PA_INVALID_INDEX. \since 0.9.15 */ 28753a5a1b3Sopenharmony_ci uint32_t n_ports; /**< Number of entries in port array \since 0.9.16 */ 28853a5a1b3Sopenharmony_ci pa_sink_port_info** ports; /**< Array of available ports, or NULL. Array is terminated by an entry set to NULL. The number of entries is stored in n_ports. \since 0.9.16 */ 28953a5a1b3Sopenharmony_ci pa_sink_port_info* active_port; /**< Pointer to active port in the array, or NULL. \since 0.9.16 */ 29053a5a1b3Sopenharmony_ci uint8_t n_formats; /**< Number of formats supported by the sink. \since 1.0 */ 29153a5a1b3Sopenharmony_ci pa_format_info **formats; /**< Array of formats supported by the sink. \since 1.0 */ 29253a5a1b3Sopenharmony_ci} pa_sink_info; 29353a5a1b3Sopenharmony_ci 29453a5a1b3Sopenharmony_ci/** Callback prototype for pa_context_get_sink_info_by_name() and friends */ 29553a5a1b3Sopenharmony_citypedef void (*pa_sink_info_cb_t)(pa_context *c, const pa_sink_info *i, int eol, void *userdata); 29653a5a1b3Sopenharmony_ci 29753a5a1b3Sopenharmony_ci/** Get information about a sink by its name */ 29853a5a1b3Sopenharmony_cipa_operation* pa_context_get_sink_info_by_name(pa_context *c, const char *name, pa_sink_info_cb_t cb, void *userdata); 29953a5a1b3Sopenharmony_ci 30053a5a1b3Sopenharmony_ci/** Get information about a sink by its index */ 30153a5a1b3Sopenharmony_cipa_operation* pa_context_get_sink_info_by_index(pa_context *c, uint32_t idx, pa_sink_info_cb_t cb, void *userdata); 30253a5a1b3Sopenharmony_ci 30353a5a1b3Sopenharmony_ci/** Get the complete sink list */ 30453a5a1b3Sopenharmony_cipa_operation* pa_context_get_sink_info_list(pa_context *c, pa_sink_info_cb_t cb, void *userdata); 30553a5a1b3Sopenharmony_ci 30653a5a1b3Sopenharmony_ci/** Set the volume of a sink device specified by its index */ 30753a5a1b3Sopenharmony_cipa_operation* pa_context_set_sink_volume_by_index(pa_context *c, uint32_t idx, const pa_cvolume *volume, pa_context_success_cb_t cb, void *userdata); 30853a5a1b3Sopenharmony_ci 30953a5a1b3Sopenharmony_ci/** Set the volume of a sink device specified by its name */ 31053a5a1b3Sopenharmony_cipa_operation* pa_context_set_sink_volume_by_name(pa_context *c, const char *name, const pa_cvolume *volume, pa_context_success_cb_t cb, void *userdata); 31153a5a1b3Sopenharmony_ci 31253a5a1b3Sopenharmony_ci/** Set the mute switch of a sink device specified by its index */ 31353a5a1b3Sopenharmony_cipa_operation* pa_context_set_sink_mute_by_index(pa_context *c, uint32_t idx, int mute, pa_context_success_cb_t cb, void *userdata); 31453a5a1b3Sopenharmony_ci 31553a5a1b3Sopenharmony_ci/** Set the mute switch of a sink device specified by its name */ 31653a5a1b3Sopenharmony_cipa_operation* pa_context_set_sink_mute_by_name(pa_context *c, const char *name, int mute, pa_context_success_cb_t cb, void *userdata); 31753a5a1b3Sopenharmony_ci 31853a5a1b3Sopenharmony_ci/** Suspend/Resume a sink. \since 0.9.7 */ 31953a5a1b3Sopenharmony_cipa_operation* pa_context_suspend_sink_by_name(pa_context *c, const char *sink_name, int suspend, pa_context_success_cb_t cb, void* userdata); 32053a5a1b3Sopenharmony_ci 32153a5a1b3Sopenharmony_ci/** Suspend/Resume a sink. If idx is PA_INVALID_INDEX all sinks will be suspended. \since 0.9.7 */ 32253a5a1b3Sopenharmony_cipa_operation* pa_context_suspend_sink_by_index(pa_context *c, uint32_t idx, int suspend, pa_context_success_cb_t cb, void* userdata); 32353a5a1b3Sopenharmony_ci 32453a5a1b3Sopenharmony_ci/** Change the profile of a sink. \since 0.9.16 */ 32553a5a1b3Sopenharmony_cipa_operation* pa_context_set_sink_port_by_index(pa_context *c, uint32_t idx, const char*port, pa_context_success_cb_t cb, void *userdata); 32653a5a1b3Sopenharmony_ci 32753a5a1b3Sopenharmony_ci/** Change the profile of a sink. \since 0.9.15 */ 32853a5a1b3Sopenharmony_cipa_operation* pa_context_set_sink_port_by_name(pa_context *c, const char*name, const char*port, pa_context_success_cb_t cb, void *userdata); 32953a5a1b3Sopenharmony_ci 33053a5a1b3Sopenharmony_ci/** @} */ 33153a5a1b3Sopenharmony_ci 33253a5a1b3Sopenharmony_ci/** @{ \name Sources */ 33353a5a1b3Sopenharmony_ci 33453a5a1b3Sopenharmony_ci/** Stores information about a specific port of a source. Please 33553a5a1b3Sopenharmony_ci * note that this structure can be extended as part of evolutionary 33653a5a1b3Sopenharmony_ci * API updates at any time in any new release. \since 0.9.16 */ 33753a5a1b3Sopenharmony_citypedef struct pa_source_port_info { 33853a5a1b3Sopenharmony_ci const char *name; /**< Name of this port */ 33953a5a1b3Sopenharmony_ci const char *description; /**< Description of this port */ 34053a5a1b3Sopenharmony_ci uint32_t priority; /**< The higher this value is, the more useful this port is as a default. */ 34153a5a1b3Sopenharmony_ci int available; /**< A flags (see #pa_port_available), indicating availability status of this port. \since 2.0 */ 34253a5a1b3Sopenharmony_ci const char *availability_group; /**< An indentifier for the group of ports that share their availability status with 34353a5a1b3Sopenharmony_ci * each other. This is meant especially for handling cases where one 3.5 mm connector 34453a5a1b3Sopenharmony_ci * is used for headphones, headsets and microphones, and the hardware can only tell 34553a5a1b3Sopenharmony_ci * that something was plugged in but not what exactly. In this situation the ports for 34653a5a1b3Sopenharmony_ci * all those devices share their availability status, and PulseAudio can't tell which 34753a5a1b3Sopenharmony_ci * one is actually plugged in, and some application may ask the user what was plugged 34853a5a1b3Sopenharmony_ci * in. Such applications should get a list of all card ports and compare their 34953a5a1b3Sopenharmony_ci * `availability_group` fields. Ports that have the same group are those that need 35053a5a1b3Sopenharmony_ci * input from the user to determine which device was plugged in. The application should 35153a5a1b3Sopenharmony_ci * then activate the user-chosen port. 35253a5a1b3Sopenharmony_ci * 35353a5a1b3Sopenharmony_ci * May be NULL, in which case the port is not part of any availability group (which is 35453a5a1b3Sopenharmony_ci * the same as having a group with only one member). 35553a5a1b3Sopenharmony_ci * 35653a5a1b3Sopenharmony_ci * The group identifier must be treated as an opaque identifier. The string may look 35753a5a1b3Sopenharmony_ci * like an ALSA control name, but applications must not assume any such relationship. 35853a5a1b3Sopenharmony_ci * The group naming scheme can change without a warning. 35953a5a1b3Sopenharmony_ci * 36053a5a1b3Sopenharmony_ci * Since one group can include both input and output ports, the grouping should be done 36153a5a1b3Sopenharmony_ci * using pa_card_port_info instead of pa_source_port_info, but this field is duplicated 36253a5a1b3Sopenharmony_ci * also in pa_source_port_info (and pa_sink_port_info) in case someone finds that 36353a5a1b3Sopenharmony_ci * convenient. 36453a5a1b3Sopenharmony_ci * 36553a5a1b3Sopenharmony_ci * \since 14.0 */ 36653a5a1b3Sopenharmony_ci uint32_t type; /**< Port type, see #pa_device_port_type. \since 14.0 */ 36753a5a1b3Sopenharmony_ci} pa_source_port_info; 36853a5a1b3Sopenharmony_ci 36953a5a1b3Sopenharmony_ci/** Stores information about sources. Please note that this structure 37053a5a1b3Sopenharmony_ci * can be extended as part of evolutionary API updates at any time in 37153a5a1b3Sopenharmony_ci * any new release. */ 37253a5a1b3Sopenharmony_citypedef struct pa_source_info { 37353a5a1b3Sopenharmony_ci const char *name; /**< Name of the source */ 37453a5a1b3Sopenharmony_ci uint32_t index; /**< Index of the source */ 37553a5a1b3Sopenharmony_ci const char *description; /**< Description of this source */ 37653a5a1b3Sopenharmony_ci pa_sample_spec sample_spec; /**< Sample spec of this source */ 37753a5a1b3Sopenharmony_ci pa_channel_map channel_map; /**< Channel map */ 37853a5a1b3Sopenharmony_ci uint32_t owner_module; /**< Owning module index, or PA_INVALID_INDEX. */ 37953a5a1b3Sopenharmony_ci pa_cvolume volume; /**< Volume of the source */ 38053a5a1b3Sopenharmony_ci int mute; /**< Mute switch of the sink */ 38153a5a1b3Sopenharmony_ci uint32_t monitor_of_sink; /**< If this is a monitor source, the index of the owning sink, otherwise PA_INVALID_INDEX. */ 38253a5a1b3Sopenharmony_ci const char *monitor_of_sink_name; /**< Name of the owning sink, or NULL. */ 38353a5a1b3Sopenharmony_ci pa_usec_t latency; /**< Length of filled record buffer of this source. */ 38453a5a1b3Sopenharmony_ci const char *driver; /**< Driver name */ 38553a5a1b3Sopenharmony_ci pa_source_flags_t flags; /**< Flags */ 38653a5a1b3Sopenharmony_ci pa_proplist *proplist; /**< Property list \since 0.9.11 */ 38753a5a1b3Sopenharmony_ci pa_usec_t configured_latency; /**< The latency this device has been configured to. \since 0.9.11 */ 38853a5a1b3Sopenharmony_ci 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 */ 38953a5a1b3Sopenharmony_ci pa_source_state_t state; /**< State \since 0.9.15 */ 39053a5a1b3Sopenharmony_ci uint32_t n_volume_steps; /**< Number of volume steps for sources which do not support arbitrary volumes. \since 0.9.15 */ 39153a5a1b3Sopenharmony_ci uint32_t card; /**< Card index, or PA_INVALID_INDEX. \since 0.9.15 */ 39253a5a1b3Sopenharmony_ci uint32_t n_ports; /**< Number of entries in port array \since 0.9.16 */ 39353a5a1b3Sopenharmony_ci pa_source_port_info** ports; /**< Array of available ports, or NULL. Array is terminated by an entry set to NULL. The number of entries is stored in n_ports. \since 0.9.16 */ 39453a5a1b3Sopenharmony_ci pa_source_port_info* active_port; /**< Pointer to active port in the array, or NULL. \since 0.9.16 */ 39553a5a1b3Sopenharmony_ci uint8_t n_formats; /**< Number of formats supported by the source. \since 1.0 */ 39653a5a1b3Sopenharmony_ci pa_format_info **formats; /**< Array of formats supported by the source. \since 1.0 */ 39753a5a1b3Sopenharmony_ci} pa_source_info; 39853a5a1b3Sopenharmony_ci 39953a5a1b3Sopenharmony_ci/** Callback prototype for pa_context_get_source_info_by_name() and friends */ 40053a5a1b3Sopenharmony_citypedef void (*pa_source_info_cb_t)(pa_context *c, const pa_source_info *i, int eol, void *userdata); 40153a5a1b3Sopenharmony_ci 40253a5a1b3Sopenharmony_ci/** Get information about a source by its name */ 40353a5a1b3Sopenharmony_cipa_operation* pa_context_get_source_info_by_name(pa_context *c, const char *name, pa_source_info_cb_t cb, void *userdata); 40453a5a1b3Sopenharmony_ci 40553a5a1b3Sopenharmony_ci/** Get information about a source by its index */ 40653a5a1b3Sopenharmony_cipa_operation* pa_context_get_source_info_by_index(pa_context *c, uint32_t idx, pa_source_info_cb_t cb, void *userdata); 40753a5a1b3Sopenharmony_ci 40853a5a1b3Sopenharmony_ci/** Get the complete source list */ 40953a5a1b3Sopenharmony_cipa_operation* pa_context_get_source_info_list(pa_context *c, pa_source_info_cb_t cb, void *userdata); 41053a5a1b3Sopenharmony_ci 41153a5a1b3Sopenharmony_ci/** Set the volume of a source device specified by its index */ 41253a5a1b3Sopenharmony_cipa_operation* pa_context_set_source_volume_by_index(pa_context *c, uint32_t idx, const pa_cvolume *volume, pa_context_success_cb_t cb, void *userdata); 41353a5a1b3Sopenharmony_ci 41453a5a1b3Sopenharmony_ci/** Set the volume of a source device specified by its name */ 41553a5a1b3Sopenharmony_cipa_operation* pa_context_set_source_volume_by_name(pa_context *c, const char *name, const pa_cvolume *volume, pa_context_success_cb_t cb, void *userdata); 41653a5a1b3Sopenharmony_ci 41753a5a1b3Sopenharmony_ci/** Set the mute switch of a source device specified by its index */ 41853a5a1b3Sopenharmony_cipa_operation* pa_context_set_source_mute_by_index(pa_context *c, uint32_t idx, int mute, pa_context_success_cb_t cb, void *userdata); 41953a5a1b3Sopenharmony_ci 42053a5a1b3Sopenharmony_ci/** Set the mute switch of a source device specified by its name */ 42153a5a1b3Sopenharmony_cipa_operation* pa_context_set_source_mute_by_name(pa_context *c, const char *name, int mute, pa_context_success_cb_t cb, void *userdata); 42253a5a1b3Sopenharmony_ci 42353a5a1b3Sopenharmony_ci/** Suspend/Resume a source. \since 0.9.7 */ 42453a5a1b3Sopenharmony_cipa_operation* pa_context_suspend_source_by_name(pa_context *c, const char *source_name, int suspend, pa_context_success_cb_t cb, void* userdata); 42553a5a1b3Sopenharmony_ci 42653a5a1b3Sopenharmony_ci/** Suspend/Resume a source. If idx is PA_INVALID_INDEX, all sources will be suspended. \since 0.9.7 */ 42753a5a1b3Sopenharmony_cipa_operation* pa_context_suspend_source_by_index(pa_context *c, uint32_t idx, int suspend, pa_context_success_cb_t cb, void* userdata); 42853a5a1b3Sopenharmony_ci 42953a5a1b3Sopenharmony_ci/** Change the profile of a source. \since 0.9.16 */ 43053a5a1b3Sopenharmony_cipa_operation* pa_context_set_source_port_by_index(pa_context *c, uint32_t idx, const char*port, pa_context_success_cb_t cb, void *userdata); 43153a5a1b3Sopenharmony_ci 43253a5a1b3Sopenharmony_ci/** Change the profile of a source. \since 0.9.15 */ 43353a5a1b3Sopenharmony_cipa_operation* pa_context_set_source_port_by_name(pa_context *c, const char*name, const char*port, pa_context_success_cb_t cb, void *userdata); 43453a5a1b3Sopenharmony_ci 43553a5a1b3Sopenharmony_ci/** @} */ 43653a5a1b3Sopenharmony_ci 43753a5a1b3Sopenharmony_ci/** @{ \name Server */ 43853a5a1b3Sopenharmony_ci 43953a5a1b3Sopenharmony_ci/** Server information. Please note that this structure can be 44053a5a1b3Sopenharmony_ci * extended as part of evolutionary API updates at any time in any new 44153a5a1b3Sopenharmony_ci * release. */ 44253a5a1b3Sopenharmony_citypedef struct pa_server_info { 44353a5a1b3Sopenharmony_ci const char *user_name; /**< User name of the daemon process */ 44453a5a1b3Sopenharmony_ci const char *host_name; /**< Host name the daemon is running on */ 44553a5a1b3Sopenharmony_ci const char *server_version; /**< Version string of the daemon */ 44653a5a1b3Sopenharmony_ci const char *server_name; /**< Server package name (usually "pulseaudio") */ 44753a5a1b3Sopenharmony_ci pa_sample_spec sample_spec; /**< Default sample specification */ 44853a5a1b3Sopenharmony_ci const char *default_sink_name; /**< Name of default sink. */ 44953a5a1b3Sopenharmony_ci const char *default_source_name; /**< Name of default source. */ 45053a5a1b3Sopenharmony_ci uint32_t cookie; /**< A random cookie for identifying this instance of PulseAudio. */ 45153a5a1b3Sopenharmony_ci pa_channel_map channel_map; /**< Default channel map. \since 0.9.15 */ 45253a5a1b3Sopenharmony_ci} pa_server_info; 45353a5a1b3Sopenharmony_ci 45453a5a1b3Sopenharmony_ci/** Callback prototype for pa_context_get_server_info() */ 45553a5a1b3Sopenharmony_citypedef void (*pa_server_info_cb_t) (pa_context *c, const pa_server_info*i, void *userdata); 45653a5a1b3Sopenharmony_ci 45753a5a1b3Sopenharmony_ci/** Get some information about the server */ 45853a5a1b3Sopenharmony_cipa_operation* pa_context_get_server_info(pa_context *c, pa_server_info_cb_t cb, void *userdata); 45953a5a1b3Sopenharmony_ci 46053a5a1b3Sopenharmony_ci/** @} */ 46153a5a1b3Sopenharmony_ci 46253a5a1b3Sopenharmony_ci/** @{ \name Modules */ 46353a5a1b3Sopenharmony_ci 46453a5a1b3Sopenharmony_ci/** Stores information about modules. Please note that this structure 46553a5a1b3Sopenharmony_ci * can be extended as part of evolutionary API updates at any time in 46653a5a1b3Sopenharmony_ci * any new release. */ 46753a5a1b3Sopenharmony_citypedef struct pa_module_info { 46853a5a1b3Sopenharmony_ci uint32_t index; /**< Index of the module */ 46953a5a1b3Sopenharmony_ci const char*name, /**< Name of the module */ 47053a5a1b3Sopenharmony_ci *argument; /**< Argument string of the module */ 47153a5a1b3Sopenharmony_ci uint32_t n_used; /**< Usage counter or PA_INVALID_INDEX */ 47253a5a1b3Sopenharmony_ci/** \cond fulldocs */ 47353a5a1b3Sopenharmony_ci int auto_unload; /**< \deprecated Non-zero if this is an autoloaded module. */ 47453a5a1b3Sopenharmony_ci/** \endcond */ 47553a5a1b3Sopenharmony_ci pa_proplist *proplist; /**< Property list \since 0.9.15 */ 47653a5a1b3Sopenharmony_ci} pa_module_info; 47753a5a1b3Sopenharmony_ci 47853a5a1b3Sopenharmony_ci/** Callback prototype for pa_context_get_module_info() and friends */ 47953a5a1b3Sopenharmony_citypedef void (*pa_module_info_cb_t) (pa_context *c, const pa_module_info*i, int eol, void *userdata); 48053a5a1b3Sopenharmony_ci 48153a5a1b3Sopenharmony_ci/** Get some information about a module by its index */ 48253a5a1b3Sopenharmony_cipa_operation* pa_context_get_module_info(pa_context *c, uint32_t idx, pa_module_info_cb_t cb, void *userdata); 48353a5a1b3Sopenharmony_ci 48453a5a1b3Sopenharmony_ci/** Get the complete list of currently loaded modules */ 48553a5a1b3Sopenharmony_cipa_operation* pa_context_get_module_info_list(pa_context *c, pa_module_info_cb_t cb, void *userdata); 48653a5a1b3Sopenharmony_ci 48753a5a1b3Sopenharmony_ci/** Callback prototype for pa_context_load_module() */ 48853a5a1b3Sopenharmony_citypedef void (*pa_context_index_cb_t)(pa_context *c, uint32_t idx, void *userdata); 48953a5a1b3Sopenharmony_ci 49053a5a1b3Sopenharmony_ci/** Load a module. */ 49153a5a1b3Sopenharmony_cipa_operation* pa_context_load_module(pa_context *c, const char*name, const char *argument, pa_context_index_cb_t cb, void *userdata); 49253a5a1b3Sopenharmony_ci 49353a5a1b3Sopenharmony_ci/** Unload a module. */ 49453a5a1b3Sopenharmony_cipa_operation* pa_context_unload_module(pa_context *c, uint32_t idx, pa_context_success_cb_t cb, void *userdata); 49553a5a1b3Sopenharmony_ci 49653a5a1b3Sopenharmony_ci/** @} */ 49753a5a1b3Sopenharmony_ci 49853a5a1b3Sopenharmony_ci/** @{ \name Messages */ 49953a5a1b3Sopenharmony_ci 50053a5a1b3Sopenharmony_ci/** Callback prototype for pa_context_send_message_to_object() \since 15.0 */ 50153a5a1b3Sopenharmony_citypedef void (*pa_context_string_cb_t)(pa_context *c, int success, char *response, void *userdata); 50253a5a1b3Sopenharmony_ci 50353a5a1b3Sopenharmony_ci/** Send a message to an object that registered a message handler. For more information 50453a5a1b3Sopenharmony_ci * see https://cgit.freedesktop.org/pulseaudio/pulseaudio/tree/doc/messaging_api.txt. \since 15.0 */ 50553a5a1b3Sopenharmony_cipa_operation* pa_context_send_message_to_object(pa_context *c, const char *recipient_name, const char *message, const char *message_parameters, pa_context_string_cb_t cb, void *userdata); 50653a5a1b3Sopenharmony_ci 50753a5a1b3Sopenharmony_ci/** @} */ 50853a5a1b3Sopenharmony_ci 50953a5a1b3Sopenharmony_ci/** @{ \name Clients */ 51053a5a1b3Sopenharmony_ci 51153a5a1b3Sopenharmony_ci/** Stores information about clients. Please note that this structure 51253a5a1b3Sopenharmony_ci * can be extended as part of evolutionary API updates at any time in 51353a5a1b3Sopenharmony_ci * any new release. */ 51453a5a1b3Sopenharmony_citypedef struct pa_client_info { 51553a5a1b3Sopenharmony_ci uint32_t index; /**< Index of this client */ 51653a5a1b3Sopenharmony_ci const char *name; /**< Name of this client */ 51753a5a1b3Sopenharmony_ci uint32_t owner_module; /**< Index of the owning module, or PA_INVALID_INDEX. */ 51853a5a1b3Sopenharmony_ci const char *driver; /**< Driver name */ 51953a5a1b3Sopenharmony_ci pa_proplist *proplist; /**< Property list \since 0.9.11 */ 52053a5a1b3Sopenharmony_ci} pa_client_info; 52153a5a1b3Sopenharmony_ci 52253a5a1b3Sopenharmony_ci/** Callback prototype for pa_context_get_client_info() and friends */ 52353a5a1b3Sopenharmony_citypedef void (*pa_client_info_cb_t) (pa_context *c, const pa_client_info*i, int eol, void *userdata); 52453a5a1b3Sopenharmony_ci 52553a5a1b3Sopenharmony_ci/** Get information about a client by its index */ 52653a5a1b3Sopenharmony_cipa_operation* pa_context_get_client_info(pa_context *c, uint32_t idx, pa_client_info_cb_t cb, void *userdata); 52753a5a1b3Sopenharmony_ci 52853a5a1b3Sopenharmony_ci/** Get the complete client list */ 52953a5a1b3Sopenharmony_cipa_operation* pa_context_get_client_info_list(pa_context *c, pa_client_info_cb_t cb, void *userdata); 53053a5a1b3Sopenharmony_ci 53153a5a1b3Sopenharmony_ci/** Kill a client. */ 53253a5a1b3Sopenharmony_cipa_operation* pa_context_kill_client(pa_context *c, uint32_t idx, pa_context_success_cb_t cb, void *userdata); 53353a5a1b3Sopenharmony_ci 53453a5a1b3Sopenharmony_ci/** @} */ 53553a5a1b3Sopenharmony_ci 53653a5a1b3Sopenharmony_ci/** @{ \name Cards */ 53753a5a1b3Sopenharmony_ci 53853a5a1b3Sopenharmony_ci/** \deprecated Superseded by pa_card_profile_info2 \since 0.9.15 */ 53953a5a1b3Sopenharmony_citypedef struct pa_card_profile_info { 54053a5a1b3Sopenharmony_ci const char *name; /**< Name of this profile */ 54153a5a1b3Sopenharmony_ci const char *description; /**< Description of this profile */ 54253a5a1b3Sopenharmony_ci uint32_t n_sinks; /**< Number of sinks this profile would create */ 54353a5a1b3Sopenharmony_ci uint32_t n_sources; /**< Number of sources this profile would create */ 54453a5a1b3Sopenharmony_ci uint32_t priority; /**< The higher this value is, the more useful this profile is as a default. */ 54553a5a1b3Sopenharmony_ci} pa_card_profile_info; 54653a5a1b3Sopenharmony_ci 54753a5a1b3Sopenharmony_ci/** Stores information about a specific profile of a card. Please 54853a5a1b3Sopenharmony_ci * note that this structure can be extended as part of evolutionary 54953a5a1b3Sopenharmony_ci * API updates at any time in any new release. \since 5.0 */ 55053a5a1b3Sopenharmony_citypedef struct pa_card_profile_info2 { 55153a5a1b3Sopenharmony_ci const char *name; /**< Name of this profile */ 55253a5a1b3Sopenharmony_ci const char *description; /**< Description of this profile */ 55353a5a1b3Sopenharmony_ci uint32_t n_sinks; /**< Number of sinks this profile would create */ 55453a5a1b3Sopenharmony_ci uint32_t n_sources; /**< Number of sources this profile would create */ 55553a5a1b3Sopenharmony_ci uint32_t priority; /**< The higher this value is, the more useful this profile is as a default. */ 55653a5a1b3Sopenharmony_ci int available; 55753a5a1b3Sopenharmony_ci /**< Is this profile available? If this is zero, meaning "unavailable", 55853a5a1b3Sopenharmony_ci * then it makes no sense to try to activate this profile. If this is 55953a5a1b3Sopenharmony_ci * non-zero, it's still not a guarantee that activating the profile will 56053a5a1b3Sopenharmony_ci * result in anything useful, it just means that the server isn't aware of 56153a5a1b3Sopenharmony_ci * any reason why the profile would definitely be useless. \since 5.0 */ 56253a5a1b3Sopenharmony_ci} pa_card_profile_info2; 56353a5a1b3Sopenharmony_ci 56453a5a1b3Sopenharmony_ci/** Stores information about a specific port of a card. Please 56553a5a1b3Sopenharmony_ci * note that this structure can be extended as part of evolutionary 56653a5a1b3Sopenharmony_ci * API updates at any time in any new release. \since 2.0 */ 56753a5a1b3Sopenharmony_citypedef struct pa_card_port_info { 56853a5a1b3Sopenharmony_ci const char *name; /**< Name of this port */ 56953a5a1b3Sopenharmony_ci const char *description; /**< Description of this port */ 57053a5a1b3Sopenharmony_ci uint32_t priority; /**< The higher this value is, the more useful this port is as a default. */ 57153a5a1b3Sopenharmony_ci int available; /**< A #pa_port_available enum, indicating availability status of this port. */ 57253a5a1b3Sopenharmony_ci int direction; /**< A #pa_direction enum, indicating the direction of this port. */ 57353a5a1b3Sopenharmony_ci uint32_t n_profiles; /**< Number of entries in profile array */ 57453a5a1b3Sopenharmony_ci pa_card_profile_info** profiles; /**< \deprecated Superseded by profiles2 */ 57553a5a1b3Sopenharmony_ci pa_proplist *proplist; /**< Property list */ 57653a5a1b3Sopenharmony_ci int64_t latency_offset; /**< Latency offset of the port that gets added to the sink/source latency when the port is active. \since 3.0 */ 57753a5a1b3Sopenharmony_ci pa_card_profile_info2** profiles2; /**< Array of pointers to available profiles, or NULL. Array is terminated by an entry set to NULL. \since 5.0 */ 57853a5a1b3Sopenharmony_ci const char *availability_group; /**< An indentifier for the group of ports that share their availability status with 57953a5a1b3Sopenharmony_ci * each other. This is meant especially for handling cases where one 3.5 mm connector 58053a5a1b3Sopenharmony_ci * is used for headphones, headsets and microphones, and the hardware can only tell 58153a5a1b3Sopenharmony_ci * that something was plugged in but not what exactly. In this situation the ports for 58253a5a1b3Sopenharmony_ci * all those devices share their availability status, and PulseAudio can't tell which 58353a5a1b3Sopenharmony_ci * one is actually plugged in, and some application may ask the user what was plugged 58453a5a1b3Sopenharmony_ci * in. Such applications should get a list of all card ports and compare their 58553a5a1b3Sopenharmony_ci * `availability_group` fields. Ports that have the same group are those that need 58653a5a1b3Sopenharmony_ci * input from the user to determine which device was plugged in. The application should 58753a5a1b3Sopenharmony_ci * then activate the user-chosen port. 58853a5a1b3Sopenharmony_ci * 58953a5a1b3Sopenharmony_ci * May be NULL, in which case the port is not part of any availability group (which is 59053a5a1b3Sopenharmony_ci * the same as having a group with only one member). 59153a5a1b3Sopenharmony_ci * 59253a5a1b3Sopenharmony_ci * The group identifier must be treated as an opaque identifier. The string may look 59353a5a1b3Sopenharmony_ci * like an ALSA control name, but applications must not assume any such relationship. 59453a5a1b3Sopenharmony_ci * The group naming scheme can change without a warning. 59553a5a1b3Sopenharmony_ci * 59653a5a1b3Sopenharmony_ci * \since 14.0 */ 59753a5a1b3Sopenharmony_ci uint32_t type; /**< Port type, see #pa_device_port_type. \since 14.0 */ 59853a5a1b3Sopenharmony_ci} pa_card_port_info; 59953a5a1b3Sopenharmony_ci 60053a5a1b3Sopenharmony_ci/** Stores information about cards. Please note that this structure 60153a5a1b3Sopenharmony_ci * can be extended as part of evolutionary API updates at any time in 60253a5a1b3Sopenharmony_ci * any new release. \since 0.9.15 */ 60353a5a1b3Sopenharmony_citypedef struct pa_card_info { 60453a5a1b3Sopenharmony_ci uint32_t index; /**< Index of this card */ 60553a5a1b3Sopenharmony_ci const char *name; /**< Name of this card */ 60653a5a1b3Sopenharmony_ci uint32_t owner_module; /**< Index of the owning module, or PA_INVALID_INDEX. */ 60753a5a1b3Sopenharmony_ci const char *driver; /**< Driver name */ 60853a5a1b3Sopenharmony_ci uint32_t n_profiles; /**< Number of entries in profile array */ 60953a5a1b3Sopenharmony_ci pa_card_profile_info* profiles; /**< \deprecated Superseded by profiles2 */ 61053a5a1b3Sopenharmony_ci pa_card_profile_info* active_profile; /**< \deprecated Superseded by active_profile2 */ 61153a5a1b3Sopenharmony_ci pa_proplist *proplist; /**< Property list */ 61253a5a1b3Sopenharmony_ci uint32_t n_ports; /**< Number of entries in port array */ 61353a5a1b3Sopenharmony_ci pa_card_port_info **ports; /**< Array of pointers to ports, or NULL. Array is terminated by an entry set to NULL. */ 61453a5a1b3Sopenharmony_ci pa_card_profile_info2** profiles2; /**< Array of pointers to available profiles, or NULL. Array is terminated by an entry set to NULL. \since 5.0 */ 61553a5a1b3Sopenharmony_ci pa_card_profile_info2* active_profile2; /**< Pointer to active profile in the array, or NULL. \since 5.0 */ 61653a5a1b3Sopenharmony_ci} pa_card_info; 61753a5a1b3Sopenharmony_ci 61853a5a1b3Sopenharmony_ci/** Callback prototype for pa_context_get_card_info_...() \since 0.9.15 */ 61953a5a1b3Sopenharmony_citypedef void (*pa_card_info_cb_t) (pa_context *c, const pa_card_info*i, int eol, void *userdata); 62053a5a1b3Sopenharmony_ci 62153a5a1b3Sopenharmony_ci/** Get information about a card by its index \since 0.9.15 */ 62253a5a1b3Sopenharmony_cipa_operation* pa_context_get_card_info_by_index(pa_context *c, uint32_t idx, pa_card_info_cb_t cb, void *userdata); 62353a5a1b3Sopenharmony_ci 62453a5a1b3Sopenharmony_ci/** Get information about a card by its name \since 0.9.15 */ 62553a5a1b3Sopenharmony_cipa_operation* pa_context_get_card_info_by_name(pa_context *c, const char *name, pa_card_info_cb_t cb, void *userdata); 62653a5a1b3Sopenharmony_ci 62753a5a1b3Sopenharmony_ci/** Get the complete card list \since 0.9.15 */ 62853a5a1b3Sopenharmony_cipa_operation* pa_context_get_card_info_list(pa_context *c, pa_card_info_cb_t cb, void *userdata); 62953a5a1b3Sopenharmony_ci 63053a5a1b3Sopenharmony_ci/** Change the profile of a card. \since 0.9.15 */ 63153a5a1b3Sopenharmony_cipa_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); 63253a5a1b3Sopenharmony_ci 63353a5a1b3Sopenharmony_ci/** Change the profile of a card. \since 0.9.15 */ 63453a5a1b3Sopenharmony_cipa_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); 63553a5a1b3Sopenharmony_ci 63653a5a1b3Sopenharmony_ci/** Set the latency offset of a port. \since 3.0 */ 63753a5a1b3Sopenharmony_cipa_operation* pa_context_set_port_latency_offset(pa_context *c, const char *card_name, const char *port_name, int64_t offset, pa_context_success_cb_t cb, void *userdata); 63853a5a1b3Sopenharmony_ci 63953a5a1b3Sopenharmony_ci/** @} */ 64053a5a1b3Sopenharmony_ci 64153a5a1b3Sopenharmony_ci/** @{ \name Sink Inputs */ 64253a5a1b3Sopenharmony_ci 64353a5a1b3Sopenharmony_ci/** Stores information about sink inputs. Please note that this structure 64453a5a1b3Sopenharmony_ci * can be extended as part of evolutionary API updates at any time in 64553a5a1b3Sopenharmony_ci * any new release. */ 64653a5a1b3Sopenharmony_citypedef struct pa_sink_input_info { 64753a5a1b3Sopenharmony_ci uint32_t index; /**< Index of the sink input */ 64853a5a1b3Sopenharmony_ci const char *name; /**< Name of the sink input */ 64953a5a1b3Sopenharmony_ci uint32_t owner_module; /**< Index of the module this sink input belongs to, or PA_INVALID_INDEX when it does not belong to any module. */ 65053a5a1b3Sopenharmony_ci uint32_t client; /**< Index of the client this sink input belongs to, or PA_INVALID_INDEX when it does not belong to any client. */ 65153a5a1b3Sopenharmony_ci uint32_t sink; /**< Index of the connected sink */ 65253a5a1b3Sopenharmony_ci pa_sample_spec sample_spec; /**< The sample specification of the sink input. */ 65353a5a1b3Sopenharmony_ci pa_channel_map channel_map; /**< Channel map */ 65453a5a1b3Sopenharmony_ci pa_cvolume volume; /**< The volume of this sink input. */ 65553a5a1b3Sopenharmony_ci pa_usec_t buffer_usec; /**< Latency due to buffering in sink input, see pa_timing_info for details. */ 65653a5a1b3Sopenharmony_ci pa_usec_t sink_usec; /**< Latency of the sink device, see pa_timing_info for details. */ 65753a5a1b3Sopenharmony_ci const char *resample_method; /**< The resampling method used by this sink input. */ 65853a5a1b3Sopenharmony_ci const char *driver; /**< Driver name */ 65953a5a1b3Sopenharmony_ci int mute; /**< Stream muted \since 0.9.7 */ 66053a5a1b3Sopenharmony_ci pa_proplist *proplist; /**< Property list \since 0.9.11 */ 66153a5a1b3Sopenharmony_ci int corked; /**< Stream corked \since 1.0 */ 66253a5a1b3Sopenharmony_ci int has_volume; /**< Stream has volume. If not set, then the meaning of this struct's volume member is unspecified. \since 1.0 */ 66353a5a1b3Sopenharmony_ci int volume_writable; /**< The volume can be set. If not set, the volume can still change even though clients can't control the volume. \since 1.0 */ 66453a5a1b3Sopenharmony_ci pa_format_info *format; /**< Stream format information. \since 1.0 */ 66553a5a1b3Sopenharmony_ci} pa_sink_input_info; 66653a5a1b3Sopenharmony_ci 66753a5a1b3Sopenharmony_ci/** Callback prototype for pa_context_get_sink_input_info() and friends */ 66853a5a1b3Sopenharmony_citypedef void (*pa_sink_input_info_cb_t) (pa_context *c, const pa_sink_input_info *i, int eol, void *userdata); 66953a5a1b3Sopenharmony_ci 67053a5a1b3Sopenharmony_ci/** Get some information about a sink input by its index */ 67153a5a1b3Sopenharmony_cipa_operation* pa_context_get_sink_input_info(pa_context *c, uint32_t idx, pa_sink_input_info_cb_t cb, void *userdata); 67253a5a1b3Sopenharmony_ci 67353a5a1b3Sopenharmony_ci/** Get the complete sink input list */ 67453a5a1b3Sopenharmony_cipa_operation* pa_context_get_sink_input_info_list(pa_context *c, pa_sink_input_info_cb_t cb, void *userdata); 67553a5a1b3Sopenharmony_ci 67653a5a1b3Sopenharmony_ci/** Move the specified sink input to a different sink. \since 0.9.5 */ 67753a5a1b3Sopenharmony_cipa_operation* pa_context_move_sink_input_by_name(pa_context *c, uint32_t idx, const char *sink_name, pa_context_success_cb_t cb, void* userdata); 67853a5a1b3Sopenharmony_ci 67953a5a1b3Sopenharmony_ci/** Move the specified sink input to a different sink. \since 0.9.5 */ 68053a5a1b3Sopenharmony_cipa_operation* pa_context_move_sink_input_by_index(pa_context *c, uint32_t idx, uint32_t sink_idx, pa_context_success_cb_t cb, void* userdata); 68153a5a1b3Sopenharmony_ci 68253a5a1b3Sopenharmony_ci/** Set the volume of a sink input stream */ 68353a5a1b3Sopenharmony_cipa_operation* pa_context_set_sink_input_volume(pa_context *c, uint32_t idx, const pa_cvolume *volume, pa_context_success_cb_t cb, void *userdata); 68453a5a1b3Sopenharmony_ci 68553a5a1b3Sopenharmony_ci/** Set the mute switch of a sink input stream \since 0.9.7 */ 68653a5a1b3Sopenharmony_cipa_operation* pa_context_set_sink_input_mute(pa_context *c, uint32_t idx, int mute, pa_context_success_cb_t cb, void *userdata); 68753a5a1b3Sopenharmony_ci 68853a5a1b3Sopenharmony_ci/** Kill a sink input. */ 68953a5a1b3Sopenharmony_cipa_operation* pa_context_kill_sink_input(pa_context *c, uint32_t idx, pa_context_success_cb_t cb, void *userdata); 69053a5a1b3Sopenharmony_ci 69153a5a1b3Sopenharmony_ci/** @} */ 69253a5a1b3Sopenharmony_ci 69353a5a1b3Sopenharmony_ci/** @{ \name Source Outputs */ 69453a5a1b3Sopenharmony_ci 69553a5a1b3Sopenharmony_ci/** Stores information about source outputs. Please note that this structure 69653a5a1b3Sopenharmony_ci * can be extended as part of evolutionary API updates at any time in 69753a5a1b3Sopenharmony_ci * any new release. */ 69853a5a1b3Sopenharmony_citypedef struct pa_source_output_info { 69953a5a1b3Sopenharmony_ci uint32_t index; /**< Index of the source output */ 70053a5a1b3Sopenharmony_ci const char *name; /**< Name of the source output */ 70153a5a1b3Sopenharmony_ci uint32_t owner_module; /**< Index of the module this source output belongs to, or PA_INVALID_INDEX when it does not belong to any module. */ 70253a5a1b3Sopenharmony_ci uint32_t client; /**< Index of the client this source output belongs to, or PA_INVALID_INDEX when it does not belong to any client. */ 70353a5a1b3Sopenharmony_ci uint32_t source; /**< Index of the connected source */ 70453a5a1b3Sopenharmony_ci pa_sample_spec sample_spec; /**< The sample specification of the source output */ 70553a5a1b3Sopenharmony_ci pa_channel_map channel_map; /**< Channel map */ 70653a5a1b3Sopenharmony_ci pa_usec_t buffer_usec; /**< Latency due to buffering in the source output, see pa_timing_info for details. */ 70753a5a1b3Sopenharmony_ci pa_usec_t source_usec; /**< Latency of the source device, see pa_timing_info for details. */ 70853a5a1b3Sopenharmony_ci const char *resample_method; /**< The resampling method used by this source output. */ 70953a5a1b3Sopenharmony_ci const char *driver; /**< Driver name */ 71053a5a1b3Sopenharmony_ci pa_proplist *proplist; /**< Property list \since 0.9.11 */ 71153a5a1b3Sopenharmony_ci int corked; /**< Stream corked \since 1.0 */ 71253a5a1b3Sopenharmony_ci pa_cvolume volume; /**< The volume of this source output \since 1.0 */ 71353a5a1b3Sopenharmony_ci int mute; /**< Stream muted \since 1.0 */ 71453a5a1b3Sopenharmony_ci int has_volume; /**< Stream has volume. If not set, then the meaning of this struct's volume member is unspecified. \since 1.0 */ 71553a5a1b3Sopenharmony_ci int volume_writable; /**< The volume can be set. If not set, the volume can still change even though clients can't control the volume. \since 1.0 */ 71653a5a1b3Sopenharmony_ci pa_format_info *format; /**< Stream format information. \since 1.0 */ 71753a5a1b3Sopenharmony_ci} pa_source_output_info; 71853a5a1b3Sopenharmony_ci 71953a5a1b3Sopenharmony_ci/** Callback prototype for pa_context_get_source_output_info() and friends */ 72053a5a1b3Sopenharmony_citypedef void (*pa_source_output_info_cb_t) (pa_context *c, const pa_source_output_info *i, int eol, void *userdata); 72153a5a1b3Sopenharmony_ci 72253a5a1b3Sopenharmony_ci/** Get information about a source output by its index */ 72353a5a1b3Sopenharmony_cipa_operation* pa_context_get_source_output_info(pa_context *c, uint32_t idx, pa_source_output_info_cb_t cb, void *userdata); 72453a5a1b3Sopenharmony_ci 72553a5a1b3Sopenharmony_ci/** Get the complete list of source outputs */ 72653a5a1b3Sopenharmony_cipa_operation* pa_context_get_source_output_info_list(pa_context *c, pa_source_output_info_cb_t cb, void *userdata); 72753a5a1b3Sopenharmony_ci 72853a5a1b3Sopenharmony_ci/** Move the specified source output to a different source. \since 0.9.5 */ 72953a5a1b3Sopenharmony_cipa_operation* pa_context_move_source_output_by_name(pa_context *c, uint32_t idx, const char *source_name, pa_context_success_cb_t cb, void* userdata); 73053a5a1b3Sopenharmony_ci 73153a5a1b3Sopenharmony_ci/** Move the specified source output to a different source. \since 0.9.5 */ 73253a5a1b3Sopenharmony_cipa_operation* pa_context_move_source_output_by_index(pa_context *c, uint32_t idx, uint32_t source_idx, pa_context_success_cb_t cb, void* userdata); 73353a5a1b3Sopenharmony_ci 73453a5a1b3Sopenharmony_ci/** Set the volume of a source output stream \since 1.0 */ 73553a5a1b3Sopenharmony_cipa_operation* pa_context_set_source_output_volume(pa_context *c, uint32_t idx, const pa_cvolume *volume, pa_context_success_cb_t cb, void *userdata); 73653a5a1b3Sopenharmony_ci 73753a5a1b3Sopenharmony_ci/** Set the mute switch of a source output stream \since 1.0 */ 73853a5a1b3Sopenharmony_cipa_operation* pa_context_set_source_output_mute(pa_context *c, uint32_t idx, int mute, pa_context_success_cb_t cb, void *userdata); 73953a5a1b3Sopenharmony_ci 74053a5a1b3Sopenharmony_ci/** Kill a source output. */ 74153a5a1b3Sopenharmony_cipa_operation* pa_context_kill_source_output(pa_context *c, uint32_t idx, pa_context_success_cb_t cb, void *userdata); 74253a5a1b3Sopenharmony_ci 74353a5a1b3Sopenharmony_ci/** @} */ 74453a5a1b3Sopenharmony_ci 74553a5a1b3Sopenharmony_ci/** @{ \name Statistics */ 74653a5a1b3Sopenharmony_ci 74753a5a1b3Sopenharmony_ci/** Memory block statistics. Please note that this structure 74853a5a1b3Sopenharmony_ci * can be extended as part of evolutionary API updates at any time in 74953a5a1b3Sopenharmony_ci * any new release. */ 75053a5a1b3Sopenharmony_citypedef struct pa_stat_info { 75153a5a1b3Sopenharmony_ci uint32_t memblock_total; /**< Currently allocated memory blocks */ 75253a5a1b3Sopenharmony_ci uint32_t memblock_total_size; /**< Current total size of allocated memory blocks */ 75353a5a1b3Sopenharmony_ci uint32_t memblock_allocated; /**< Allocated memory blocks during the whole lifetime of the daemon. */ 75453a5a1b3Sopenharmony_ci uint32_t memblock_allocated_size; /**< Total size of all memory blocks allocated during the whole lifetime of the daemon. */ 75553a5a1b3Sopenharmony_ci uint32_t scache_size; /**< Total size of all sample cache entries. */ 75653a5a1b3Sopenharmony_ci} pa_stat_info; 75753a5a1b3Sopenharmony_ci 75853a5a1b3Sopenharmony_ci/** Callback prototype for pa_context_stat() */ 75953a5a1b3Sopenharmony_citypedef void (*pa_stat_info_cb_t) (pa_context *c, const pa_stat_info *i, void *userdata); 76053a5a1b3Sopenharmony_ci 76153a5a1b3Sopenharmony_ci/** Get daemon memory block statistics */ 76253a5a1b3Sopenharmony_cipa_operation* pa_context_stat(pa_context *c, pa_stat_info_cb_t cb, void *userdata); 76353a5a1b3Sopenharmony_ci 76453a5a1b3Sopenharmony_ci/** @} */ 76553a5a1b3Sopenharmony_ci 76653a5a1b3Sopenharmony_ci/** @{ \name Cached Samples */ 76753a5a1b3Sopenharmony_ci 76853a5a1b3Sopenharmony_ci/** Stores information about sample cache entries. Please note that this structure 76953a5a1b3Sopenharmony_ci * can be extended as part of evolutionary API updates at any time in 77053a5a1b3Sopenharmony_ci * any new release. */ 77153a5a1b3Sopenharmony_citypedef struct pa_sample_info { 77253a5a1b3Sopenharmony_ci uint32_t index; /**< Index of this entry */ 77353a5a1b3Sopenharmony_ci const char *name; /**< Name of this entry */ 77453a5a1b3Sopenharmony_ci pa_cvolume volume; /**< Default volume of this entry */ 77553a5a1b3Sopenharmony_ci pa_sample_spec sample_spec; /**< Sample specification of the sample */ 77653a5a1b3Sopenharmony_ci pa_channel_map channel_map; /**< The channel map */ 77753a5a1b3Sopenharmony_ci pa_usec_t duration; /**< Duration of this entry */ 77853a5a1b3Sopenharmony_ci uint32_t bytes; /**< Length of this sample in bytes. */ 77953a5a1b3Sopenharmony_ci int lazy; /**< Non-zero when this is a lazy cache entry. */ 78053a5a1b3Sopenharmony_ci const char *filename; /**< In case this is a lazy cache entry, the filename for the sound file to be loaded on demand. */ 78153a5a1b3Sopenharmony_ci pa_proplist *proplist; /**< Property list for this sample. \since 0.9.11 */ 78253a5a1b3Sopenharmony_ci} pa_sample_info; 78353a5a1b3Sopenharmony_ci 78453a5a1b3Sopenharmony_ci/** Callback prototype for pa_context_get_sample_info_by_name() and friends */ 78553a5a1b3Sopenharmony_citypedef void (*pa_sample_info_cb_t)(pa_context *c, const pa_sample_info *i, int eol, void *userdata); 78653a5a1b3Sopenharmony_ci 78753a5a1b3Sopenharmony_ci/** Get information about a sample by its name */ 78853a5a1b3Sopenharmony_cipa_operation* pa_context_get_sample_info_by_name(pa_context *c, const char *name, pa_sample_info_cb_t cb, void *userdata); 78953a5a1b3Sopenharmony_ci 79053a5a1b3Sopenharmony_ci/** Get information about a sample by its index */ 79153a5a1b3Sopenharmony_cipa_operation* pa_context_get_sample_info_by_index(pa_context *c, uint32_t idx, pa_sample_info_cb_t cb, void *userdata); 79253a5a1b3Sopenharmony_ci 79353a5a1b3Sopenharmony_ci/** Get the complete list of samples stored in the daemon. */ 79453a5a1b3Sopenharmony_cipa_operation* pa_context_get_sample_info_list(pa_context *c, pa_sample_info_cb_t cb, void *userdata); 79553a5a1b3Sopenharmony_ci 79653a5a1b3Sopenharmony_ci/** @} */ 79753a5a1b3Sopenharmony_ci 79853a5a1b3Sopenharmony_ci/** \cond fulldocs */ 79953a5a1b3Sopenharmony_ci 80053a5a1b3Sopenharmony_ci/** @{ \name Autoload Entries */ 80153a5a1b3Sopenharmony_ci 80253a5a1b3Sopenharmony_ci/** \deprecated Type of an autoload entry. */ 80353a5a1b3Sopenharmony_citypedef enum pa_autoload_type { 80453a5a1b3Sopenharmony_ci PA_AUTOLOAD_SINK = 0, 80553a5a1b3Sopenharmony_ci PA_AUTOLOAD_SOURCE = 1 80653a5a1b3Sopenharmony_ci} pa_autoload_type_t; 80753a5a1b3Sopenharmony_ci 80853a5a1b3Sopenharmony_ci/** \deprecated Stores information about autoload entries. Please note that this structure 80953a5a1b3Sopenharmony_ci * can be extended as part of evolutionary API updates at any time in 81053a5a1b3Sopenharmony_ci * any new release. */ 81153a5a1b3Sopenharmony_citypedef struct pa_autoload_info { 81253a5a1b3Sopenharmony_ci uint32_t index; /**< Index of this autoload entry */ 81353a5a1b3Sopenharmony_ci const char *name; /**< Name of the sink or source */ 81453a5a1b3Sopenharmony_ci pa_autoload_type_t type; /**< Type of the autoload entry */ 81553a5a1b3Sopenharmony_ci const char *module; /**< Module name to load */ 81653a5a1b3Sopenharmony_ci const char *argument; /**< Argument string for module */ 81753a5a1b3Sopenharmony_ci} pa_autoload_info; 81853a5a1b3Sopenharmony_ci 81953a5a1b3Sopenharmony_ci/** \deprecated Callback prototype for pa_context_get_autoload_info_by_name() and friends */ 82053a5a1b3Sopenharmony_citypedef void (*pa_autoload_info_cb_t)(pa_context *c, const pa_autoload_info *i, int eol, void *userdata); 82153a5a1b3Sopenharmony_ci 82253a5a1b3Sopenharmony_ci/** \deprecated Get info about a specific autoload entry. */ 82353a5a1b3Sopenharmony_cipa_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; 82453a5a1b3Sopenharmony_ci 82553a5a1b3Sopenharmony_ci/** \deprecated Get info about a specific autoload entry. */ 82653a5a1b3Sopenharmony_cipa_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; 82753a5a1b3Sopenharmony_ci 82853a5a1b3Sopenharmony_ci/** \deprecated Get the complete list of autoload entries. */ 82953a5a1b3Sopenharmony_cipa_operation* pa_context_get_autoload_info_list(pa_context *c, pa_autoload_info_cb_t cb, void *userdata) PA_GCC_DEPRECATED; 83053a5a1b3Sopenharmony_ci 83153a5a1b3Sopenharmony_ci/** \deprecated Add a new autoload entry. */ 83253a5a1b3Sopenharmony_cipa_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; 83353a5a1b3Sopenharmony_ci 83453a5a1b3Sopenharmony_ci/** \deprecated Remove an autoload entry. */ 83553a5a1b3Sopenharmony_cipa_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; 83653a5a1b3Sopenharmony_ci 83753a5a1b3Sopenharmony_ci/** \deprecated Remove an autoload entry. */ 83853a5a1b3Sopenharmony_cipa_operation* pa_context_remove_autoload_by_index(pa_context *c, uint32_t idx, pa_context_success_cb_t cb, void* userdata) PA_GCC_DEPRECATED; 83953a5a1b3Sopenharmony_ci 84053a5a1b3Sopenharmony_ci/** @} */ 84153a5a1b3Sopenharmony_ci 84253a5a1b3Sopenharmony_ci/** \endcond */ 84353a5a1b3Sopenharmony_ci 84453a5a1b3Sopenharmony_ciPA_C_DECL_END 84553a5a1b3Sopenharmony_ci 84653a5a1b3Sopenharmony_ci#endif 847