PulseAudio  9.0
context.h
Go to the documentation of this file.
00001 #ifndef foocontexthfoo
00002 #define foocontexthfoo
00003 
00004 /***
00005   This file is part of PulseAudio.
00006 
00007   Copyright 2004-2006 Lennart Poettering
00008   Copyright 2006 Pierre Ossman <ossman@cendio.se> for Cendio AB
00009 
00010   PulseAudio is free software; you can redistribute it and/or modify
00011   it under the terms of the GNU Lesser General Public License as published
00012   by the Free Software Foundation; either version 2.1 of the License,
00013   or (at your option) any later version.
00014 
00015   PulseAudio is distributed in the hope that it will be useful, but
00016   WITHOUT ANY WARRANTY; without even the implied warranty of
00017   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
00018   General Public License for more details.
00019 
00020   You should have received a copy of the GNU Lesser General Public License
00021   along with PulseAudio; if not, see <http://www.gnu.org/licenses/>.
00022 ***/
00023 
00024 #include <pulse/sample.h>
00025 #include <pulse/def.h>
00026 #include <pulse/mainloop-api.h>
00027 #include <pulse/cdecl.h>
00028 #include <pulse/operation.h>
00029 #include <pulse/proplist.h>
00030 #include <pulse/version.h>
00031 
00151 PA_C_DECL_BEGIN
00152 
00154 typedef struct pa_context pa_context;
00155 
00157 typedef void (*pa_context_notify_cb_t)(pa_context *c, void *userdata);
00158 
00160 typedef void (*pa_context_success_cb_t) (pa_context *c, int success, void *userdata);
00161 
00167 typedef void (*pa_context_event_cb_t)(pa_context *c, const char *name, pa_proplist *p, void *userdata);
00168 
00172 pa_context *pa_context_new(pa_mainloop_api *mainloop, const char *name);
00173 
00177 pa_context *pa_context_new_with_proplist(pa_mainloop_api *mainloop, const char *name, pa_proplist *proplist);
00178 
00180 void pa_context_unref(pa_context *c);
00181 
00183 pa_context* pa_context_ref(pa_context *c);
00184 
00186 void pa_context_set_state_callback(pa_context *c, pa_context_notify_cb_t cb, void *userdata);
00187 
00190 void pa_context_set_event_callback(pa_context *p, pa_context_event_cb_t cb, void *userdata);
00191 
00193 int pa_context_errno(pa_context *c);
00194 
00196 int pa_context_is_pending(pa_context *c);
00197 
00199 pa_context_state_t pa_context_get_state(pa_context *c);
00200 
00209 int pa_context_connect(pa_context *c, const char *server, pa_context_flags_t flags, const pa_spawn_api *api);
00210 
00212 void pa_context_disconnect(pa_context *c);
00213 
00215 pa_operation* pa_context_drain(pa_context *c, pa_context_notify_cb_t cb, void *userdata);
00216 
00220 pa_operation* pa_context_exit_daemon(pa_context *c, pa_context_success_cb_t cb, void *userdata);
00221 
00223 pa_operation* pa_context_set_default_sink(pa_context *c, const char *name, pa_context_success_cb_t cb, void *userdata);
00224 
00226 pa_operation* pa_context_set_default_source(pa_context *c, const char *name, pa_context_success_cb_t cb, void *userdata);
00227 
00229 int pa_context_is_local(pa_context *c);
00230 
00232 pa_operation* pa_context_set_name(pa_context *c, const char *name, pa_context_success_cb_t cb, void *userdata);
00233 
00235 const char* pa_context_get_server(pa_context *c);
00236 
00238 uint32_t pa_context_get_protocol_version(pa_context *c);
00239 
00241 uint32_t pa_context_get_server_protocol_version(pa_context *c);
00242 
00248 pa_operation *pa_context_proplist_update(pa_context *c, pa_update_mode_t mode, pa_proplist *p, pa_context_success_cb_t cb, void *userdata);
00249 
00251 pa_operation *pa_context_proplist_remove(pa_context *c, const char *const keys[], pa_context_success_cb_t cb, void *userdata);
00252 
00256 uint32_t pa_context_get_index(pa_context *s);
00257 
00260 pa_time_event* pa_context_rttime_new(pa_context *c, pa_usec_t usec, pa_time_event_cb_t cb, void *userdata);
00261 
00264 void pa_context_rttime_restart(pa_context *c, pa_time_event *e, pa_usec_t usec);
00265 
00279 size_t pa_context_get_tile_size(pa_context *c, const pa_sample_spec *ss);
00280 
00287 int pa_context_load_cookie_from_file(pa_context *c, const char *cookie_file_path);
00288 
00289 PA_C_DECL_END
00290 
00291 #endif