]> code.delx.au - pulseaudio/blobdiff - src/pulse/introspect.h
libpulse: introduce pa_context_get_tile_size() call
[pulseaudio] / src / pulse / introspect.h
index 117880c8d33043a6c3920f1b5b88a72288cb35fb..68cfc8745482201df1f471475b5f0a5a0c318387 100644 (file)
@@ -193,6 +193,15 @@ PA_C_DECL_BEGIN
 
 /** @{ \name Sinks */
 
+/** Stores information about a specific port of a sink.  Please
+ * note that this structure can be extended as part of evolutionary
+ * API updates at any time in any new release. \since 0.9.16 */
+typedef struct pa_sink_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_sink_port_info;
+
 /** Stores information about sinks. Please note that this structure
  * can be extended as part of evolutionary API updates at any time in
  * any new release. */
@@ -216,6 +225,9 @@ typedef struct pa_sink_info {
     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 */
     uint32_t card;                     /**< Card index, or PA_INVALID_INDEX. \since 0.9.15 */
+    uint32_t n_ports;                  /**< Number of entries in port array \since 0.9.16 */
+    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 */
+    pa_sink_port_info* active_port;    /**< Pointer to active port in the array, or NULL \since 0.9.16 */
 } pa_sink_info;
 
 /** Callback prototype for pa_context_get_sink_info_by_name() and friends */
@@ -248,10 +260,25 @@ pa_operation* pa_context_suspend_sink_by_name(pa_context *c, const char *sink_na
 /** Suspend/Resume a sink. If idx is PA_INVALID_INDEX all sinks will be suspended. \since 0.9.7 */
 pa_operation* pa_context_suspend_sink_by_index(pa_context *c, uint32_t idx, int suspend,  pa_context_success_cb_t cb, void* userdata);
 
+/** Change the profile of a sink. \since 0.9.16 */
+pa_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);
+
+/** Change the profile of a sink. \since 0.9.15 */
+pa_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);
+
 /** @} */
 
 /** @{ \name Sources */
 
+/** Stores information about a specific port of a source.  Please
+ * note that this structure can be extended as part of evolutionary
+ * API updates at any time in any new release. \since 0.9.16 */
+typedef struct pa_source_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_source_port_info;
+
 /** Stores information about sources. Please note that this structure
  * can be extended as part of evolutionary API updates at any time in
  * any new release. */
@@ -275,6 +302,9 @@ typedef struct pa_source_info {
     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 */
     uint32_t card;                      /**< Card index, or PA_INVALID_INDEX. \since 0.9.15 */
+    uint32_t n_ports;                   /**< Number of entries in port array \since 0.9.16 */
+    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  */
+    pa_source_port_info* active_port;   /**< Pointer to active port in the array, or NULL \since 0.9.16  */
 } pa_source_info;
 
 /** Callback prototype for pa_context_get_source_info_by_name() and friends */
@@ -301,6 +331,18 @@ pa_operation* pa_context_set_source_mute_by_index(pa_context *c, uint32_t idx, i
 /** Set the mute switch of a source device specified by its name */
 pa_operation* pa_context_set_source_mute_by_name(pa_context *c, const char *name, int mute, pa_context_success_cb_t cb, void *userdata);
 
+/** Suspend/Resume a source. \since 0.9.7 */
+pa_operation* pa_context_suspend_source_by_name(pa_context *c, const char *source_name, int suspend, pa_context_success_cb_t cb, void* userdata);
+
+/** Suspend/Resume a source. If idx is PA_INVALID_INDEX all sources will be suspended. \since 0.9.7 */
+pa_operation* pa_context_suspend_source_by_index(pa_context *c, uint32_t idx, int suspend, pa_context_success_cb_t cb, void* userdata);
+
+/** Change the profile of a source. \since 0.9.16 */
+pa_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);
+
+/** Change the profile of a source. \since 0.9.15 */
+pa_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);
+
 /** @} */
 
 /** @{ \name Server */
@@ -521,12 +563,6 @@ pa_operation* pa_context_move_source_output_by_name(pa_context *c, uint32_t idx,
 /** Move the specified source output to a different source. \since 0.9.5 */
 pa_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);
 
-/** Suspend/Resume a source. \since 0.9.7 */
-pa_operation* pa_context_suspend_source_by_name(pa_context *c, const char *source_name, int suspend, pa_context_success_cb_t cb, void* userdata);
-
-/** Suspend/Resume a source. If idx is PA_INVALID_INDEX all sources will be suspended. \since 0.9.7 */
-pa_operation* pa_context_suspend_source_by_index(pa_context *c, uint32_t idx, int suspend, pa_context_success_cb_t cb, void* userdata);
-
 /** Kill a source output. */
 pa_operation* pa_context_kill_source_output(pa_context *c, uint32_t idx, pa_context_success_cb_t cb, void *userdata);