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 struct pa_sink_input_info
{
99 uint32_t owner_module
;
102 struct pa_sample_spec sample_spec
;
107 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
);
108 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
);
110 struct pa_source_output_info
{
113 uint32_t owner_module
;
116 struct pa_sample_spec sample_spec
;
119 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
);
120 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
);
122 /** Set the volume of a sink device specified by its index */
123 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
);
125 /** Set the volume of a sink device specified by its name */
126 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
);
128 /** Set the volume of a sink input stream */
129 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
);
131 /** Memory block statistics */
132 struct pa_stat_info
{
133 uint32_t memblock_total
; /**< Currently allocated memory blocks */
134 uint32_t memblock_total_size
; /**< Currentl total size of allocated memory blocks */
135 uint32_t memblock_allocated
; /**< Allocated memory blocks during the whole lifetime of the daemon */
136 uint32_t memblock_allocated_size
; /**< Total size of all memory blocks allocated during the whole lifetime of the daemon */
139 /** Get daemon memory block statistics */
140 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
);