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 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, write to the Free Software
00022   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
00023   USA.
00024 ***/
00025 
00026 #include <pulse/sample.h>
00027 #include <pulse/def.h>
00028 #include <pulse/mainloop-api.h>
00029 #include <pulse/cdecl.h>
00030 #include <pulse/operation.h>
00031 #include <pulse/proplist.h>
00032 
00155 PA_C_DECL_BEGIN
00156 
00158 typedef struct pa_context pa_context;
00159 
00161 typedef void (*pa_context_notify_cb_t)(pa_context *c, void *userdata);
00162 
00164 typedef void (*pa_context_success_cb_t) (pa_context *c, int success, void *userdata);
00165 
00169 pa_context *pa_context_new(pa_mainloop_api *mainloop, const char *name);
00170 
00174 pa_context *pa_context_new_with_proplist(pa_mainloop_api *mainloop, const char *name, pa_proplist *proplist);
00175 
00177 void pa_context_unref(pa_context *c);
00178 
00180 pa_context* pa_context_ref(pa_context *c);
00181 
00183 void pa_context_set_state_callback(pa_context *c, pa_context_notify_cb_t cb, void *userdata);
00184 
00186 int pa_context_errno(pa_context *c);
00187 
00189 int pa_context_is_pending(pa_context *c);
00190 
00192 pa_context_state_t pa_context_get_state(pa_context *c);
00193 
00201 int pa_context_connect(pa_context *c, const char *server, pa_context_flags_t flags, const pa_spawn_api *api);
00202 
00204 void pa_context_disconnect(pa_context *c);
00205 
00207 pa_operation* pa_context_drain(pa_context *c, pa_context_notify_cb_t cb, void *userdata);
00208 
00212 pa_operation* pa_context_exit_daemon(pa_context *c, pa_context_success_cb_t cb, void *userdata);
00213 
00215 pa_operation* pa_context_set_default_sink(pa_context *c, const char *name, pa_context_success_cb_t cb, void *userdata);
00216 
00218 pa_operation* pa_context_set_default_source(pa_context *c, const char *name, pa_context_success_cb_t cb, void *userdata);
00219 
00221 int pa_context_is_local(pa_context *c);
00222 
00224 pa_operation* pa_context_set_name(pa_context *c, const char *name, pa_context_success_cb_t cb, void *userdata);
00225 
00227 const char* pa_context_get_server(pa_context *c);
00228 
00230 uint32_t pa_context_get_protocol_version(pa_context *c);
00231 
00233 uint32_t pa_context_get_server_protocol_version(pa_context *c);
00234 
00235 /* Update the property list of the client, adding new entries. Please
00236  * note that it is highly recommended to set as much properties
00237  * initially via pa_context_new_with_proplist() as possible instead a
00238  * posteriori with this function, since that information may then be
00239  * used to route streams of the client to the right device. \since 0.9.11 */
00240 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);
00241 
00242 /* Update the property list of the client, remove entries. \since 0.9.11 */
00243 pa_operation *pa_context_proplist_remove(pa_context *c, const char *const keys[], pa_context_success_cb_t cb, void *userdata);
00244 
00248 uint32_t pa_context_get_index(pa_context *s);
00249 
00250 PA_C_DECL_END
00251 
00252 #endif

Generated on Tue Sep 16 10:58:58 2008 for PulseAudio by  doxygen 1.5.4