1 #ifndef foopolyplibintrospecthfoo
2 #define foopolyplibintrospecthfoo
7 This file is part of polypaudio.
9 polypaudio is free software; you can redistribute it and/or modify
10 it under the terms of the GNU General Public License as published
11 by the Free Software Foundation; either version 2 of the License,
12 or (at your option) any later version.
14 polypaudio is distributed in the hope that it will be useful, but
15 WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 General Public License for more details.
19 You should have received a copy of the GNU General Public License
20 along with polypaudio; if not, write to the Free Software
21 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
27 #include "polyplib-operation.h"
28 #include "polyplib-context.h"
32 * Routines for daemon introspection. */
39 const char *description
;
40 struct pa_sample_spec sample_spec
;
41 uint32_t owner_module
;
43 uint32_t monitor_source
;
44 const char *monitor_source_name
;
48 struct pa_operation
* pa_context_get_sink_info_by_name(struct pa_context
*c
, const char *name
, void (*cb
)(struct pa_context
*c
, const struct pa_sink_info
*i
, int is_last
, void *userdata
), void *userdata
);
49 struct pa_operation
* pa_context_get_sink_info_by_index(struct pa_context
*c
, uint32_t id
, void (*cb
)(struct pa_context
*c
, const struct pa_sink_info
*i
, int is_last
, void *userdata
), void *userdata
);
50 struct pa_operation
* pa_context_get_sink_info_list(struct pa_context
*c
, void (*cb
)(struct pa_context
*c
, const struct pa_sink_info
*i
, int is_last
, void *userdata
), void *userdata
);
52 struct pa_source_info
{
55 const char *description
;
56 struct pa_sample_spec sample_spec
;
57 uint32_t owner_module
;
58 uint32_t monitor_of_sink
;
59 const char *monitor_of_sink_name
;
62 struct pa_operation
* pa_context_get_source_info_by_name(struct pa_context
*c
, const char *name
, void (*cb
)(struct pa_context
*c
, const struct pa_source_info
*i
, int is_last
, void *userdata
), void *userdata
);
63 struct pa_operation
* pa_context_get_source_info_by_index(struct pa_context
*c
, uint32_t id
, void (*cb
)(struct pa_context
*c
, const struct pa_source_info
*i
, int is_last
, void *userdata
), void *userdata
);
64 struct pa_operation
* pa_context_get_source_info_list(struct pa_context
*c
, void (*cb
)(struct pa_context
*c
, const struct pa_source_info
*i
, int is_last
, void *userdata
), void *userdata
);
66 /** Server information */
67 struct pa_server_info
{
68 const char *user_name
; /**< User name of the daemon process */
69 const char *host_name
; /**< Host name the daemon is running on */
70 const char *server_version
; /**< Version string of the daemon */
71 const char *server_name
; /**< Server package name (usually "polypaudio") */
72 struct pa_sample_spec sample_spec
; /**< Default sample specification */
75 struct pa_operation
* pa_context_get_server_info(struct pa_context
*c
, void (*cb
)(struct pa_context
*c
, const struct pa_server_info
*i
, void *userdata
), void *userdata
);
77 struct pa_module_info
{
79 const char*name
, *argument
;
80 uint32_t n_used
, auto_unload
;
83 struct pa_operation
* pa_context_get_module_info(struct pa_context
*c
, uint32_t index
, void (*cb
)(struct pa_context
*c
, const struct pa_module_info
*i
, int is_last
, void *userdata
), void *userdata
);
84 struct pa_operation
* pa_context_get_module_info_list(struct pa_context
*c
, void (*cb
)(struct pa_context
*c
, const struct pa_module_info
*i
, int is_last
, void *userdata
), void *userdata
);
86 struct pa_client_info
{
89 uint32_t owner_module
;
90 const char *protocol_name
;
93 struct pa_operation
* pa_context_get_client_info(struct pa_context
*c
, uint32_t index
, void (*cb
)(struct pa_context
*c
, const struct pa_client_info
*i
, int is_last
, void *userdata
), void *userdata
);
94 struct pa_operation
* pa_context_get_client_info_list(struct pa_context
*c
, void (*cb
)(struct pa_context
*c
, const struct pa_client_info
*i
, int is_last
, void *userdata
), void *userdata
);
96 /** Stores information about sink inputs */
97 struct pa_sink_input_info
{
98 uint32_t index
; /**< Name of this index */
99 const char *name
; /**< Name of the sink input */
100 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 */
101 uint32_t client
; /**< Index of the client this sink input belongs to, or PA_INVALID_INDEX when it does not belong to any client */
102 uint32_t sink
; /**< Index of the connected sink */
103 struct pa_sample_spec sample_spec
; /**< The sample specification of the sink input */
104 pa_volume_t volume
; /**< The volume of this sink input */
105 pa_usec_t buffer_usec
; /**< Latency due to buffering in sink input, see pa_latency_info for details */
106 pa_usec_t sink_usec
; /**< Latency of the sink device, see pa_latency_info for details */
109 struct pa_operation
* pa_context_get_sink_input_info(struct pa_context
*c
, uint32_t index
, void (*cb
)(struct pa_context
*c
, const struct pa_sink_input_info
*i
, int is_last
, void *userdata
), void *userdata
);
110 struct pa_operation
* pa_context_get_sink_input_info_list(struct pa_context
*c
, void (*cb
)(struct pa_context
*c
, const struct pa_sink_input_info
*i
, int is_last
, void *userdata
), void *userdata
);
112 struct pa_source_output_info
{
115 uint32_t owner_module
;
118 struct pa_sample_spec sample_spec
;
121 struct pa_operation
* pa_context_get_source_output_info(struct pa_context
*c
, uint32_t index
, void (*cb
)(struct pa_context
*c
, const struct pa_source_output_info
*i
, int is_last
, void *userdata
), void *userdata
);
122 struct pa_operation
* pa_context_get_source_output_info_list(struct pa_context
*c
, void (*cb
)(struct pa_context
*c
, const struct pa_source_output_info
*i
, int is_last
, void *userdata
), void *userdata
);
124 /** Set the volume of a sink device specified by its index */
125 struct pa_operation
* pa_context_set_sink_volume_by_index(struct pa_context
*c
, uint32_t index
, pa_volume_t volume
, void (*cb
)(struct pa_context
*c
, int success
, void *userdata
), void *userdata
);
127 /** Set the volume of a sink device specified by its name */
128 struct pa_operation
* pa_context_set_sink_volume_by_name(struct pa_context
*c
, const char *name
, pa_volume_t volume
, void (*cb
)(struct pa_context
*c
, int success
, void *userdata
), void *userdata
);
130 /** Set the volume of a sink input stream */
131 struct pa_operation
* pa_context_set_sink_input_volume(struct pa_context
*c
, uint32_t index
, pa_volume_t volume
, void (*cb
)(struct pa_context
*c
, int success
, void *userdata
), void *userdata
);
133 /** Memory block statistics */
134 struct pa_stat_info
{
135 uint32_t memblock_total
; /**< Currently allocated memory blocks */
136 uint32_t memblock_total_size
; /**< Currentl total size of allocated memory blocks */
137 uint32_t memblock_allocated
; /**< Allocated memory blocks during the whole lifetime of the daemon */
138 uint32_t memblock_allocated_size
; /**< Total size of all memory blocks allocated during the whole lifetime of the daemon */
141 /** Get daemon memory block statistics */
142 struct pa_operation
* pa_context_stat(struct pa_context
*c
, void (*cb
)(struct pa_context
*c
, const struct pa_stat_info
*i
, void *userdata
), void *userdata
);
144 struct pa_sample_info
{
148 struct pa_sample_spec sample_spec
;
152 struct pa_operation
* pa_context_get_sample_info_by_name(struct pa_context
*c
, const char *name
, void (*cb
)(struct pa_context
*c
, const struct pa_sample_info
*i
, int is_last
, void *userdata
), void *userdata
);
153 struct pa_operation
* pa_context_get_sample_info_by_index(struct pa_context
*c
, uint32_t index
, void (*cb
)(struct pa_context
*c
, const struct pa_sample_info
*i
, int is_last
, void *userdata
), void *userdata
);
154 struct pa_operation
* pa_context_get_sample_info_list(struct pa_context
*c
, void (*cb
)(struct pa_context
*c
, const struct pa_sample_info
*i
, int is_last
, void *userdata
), void *userdata
);