context.h

Go to the documentation of this file.
00001 #ifndef foocontexthfoo
00002 #define foocontexthfoo
00003 
00004 /* $Id: context.h 1426 2007-02-13 15:35:19Z ossman $ */
00005 
00006 /***
00007   This file is part of PulseAudio.
00008 
00009   Copyright 2004-2006 Lennart Poettering
00010   Copyright 2006 Pierre Ossman <ossman@cendio.se> for Cendio AB
00011 
00012   PulseAudio is free software; you can redistribute it and/or modify
00013   it under the terms of the GNU Lesser General Public License as published
00014   by the Free Software Foundation; either version 2 of the License,
00015   or (at your option) any later version.
00016 
00017   PulseAudio is distributed in the hope that it will be useful, but
00018   WITHOUT ANY WARRANTY; without even the implied warranty of
00019   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
00020   General Public License for more details.
00021 
00022   You should have received a copy of the GNU Lesser General Public License
00023   along with PulseAudio; if not, write to the Free Software
00024   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
00025   USA.
00026 ***/
00027 
00028 #include <pulse/sample.h>
00029 #include <pulse/def.h>
00030 #include <pulse/mainloop-api.h>
00031 #include <pulse/cdecl.h>
00032 #include <pulse/operation.h>
00033 
00157 PA_C_DECL_BEGIN
00158 
00160 typedef struct pa_context pa_context;
00161 
00163 typedef void (*pa_context_notify_cb_t)(pa_context *c, void *userdata);
00164 
00166 typedef void (*pa_context_success_cb_t) (pa_context *c, int success, void *userdata);
00167 
00170 pa_context *pa_context_new(pa_mainloop_api *mainloop, const char *name);
00171 
00173 void pa_context_unref(pa_context *c);
00174 
00176 pa_context* pa_context_ref(pa_context *c);
00177 
00179 void pa_context_set_state_callback(pa_context *c, pa_context_notify_cb_t cb, void *userdata);
00180 
00182 int pa_context_errno(pa_context *c);
00183 
00185 int pa_context_is_pending(pa_context *c);
00186 
00188 pa_context_state_t pa_context_get_state(pa_context *c);
00189 
00197 int pa_context_connect(pa_context *c, const char *server, pa_context_flags_t flags, const pa_spawn_api *api);
00198 
00200 void pa_context_disconnect(pa_context *c);
00201 
00203 pa_operation* pa_context_drain(pa_context *c, pa_context_notify_cb_t cb, void *userdata);
00204 
00208 pa_operation* pa_context_exit_daemon(pa_context *c, pa_context_success_cb_t cb, void *userdata);
00209 
00211 pa_operation* pa_context_set_default_sink(pa_context *c, const char *name, pa_context_success_cb_t cb, void *userdata);
00212 
00214 pa_operation* pa_context_set_default_source(pa_context *c, const char *name, pa_context_success_cb_t cb, void *userdata);
00215 
00217 int pa_context_is_local(pa_context *c);
00218 
00220 pa_operation* pa_context_set_name(pa_context *c, const char *name, pa_context_success_cb_t cb, void *userdata);
00221 
00223 const char* pa_context_get_server(pa_context *c);
00224 
00226 uint32_t pa_context_get_protocol_version(pa_context *c);
00227 
00229 uint32_t pa_context_get_server_protocol_version(pa_context *c);
00230 
00231 PA_C_DECL_END
00232 
00233 #endif

Generated on Wed Jan 23 11:06:29 2008 for PulseAudio by  doxygen 1.5.4