context.h

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

Generated on Wed May 30 19:36:31 2007 for PulseAudio by  doxygen 1.5.1