• Main Page
  • Related Pages
  • Data Structures
  • Files
  • Examples
  • File List
  • Globals

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, 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 #include <pulse/version.h>
00033 
00150 PA_C_DECL_BEGIN
00151 
00153 typedef struct pa_context pa_context;
00154 
00156 typedef void (*pa_context_notify_cb_t)(pa_context *c, void *userdata);
00157 
00159 typedef void (*pa_context_success_cb_t) (pa_context *c, int success, void *userdata);
00160 
00166 typedef void (*pa_context_event_cb_t)(pa_context *c, const char *name, pa_proplist *p, void *userdata);
00167 
00171 pa_context *pa_context_new(pa_mainloop_api *mainloop, const char *name);
00172 
00176 pa_context *pa_context_new_with_proplist(pa_mainloop_api *mainloop, const char *name, pa_proplist *proplist);
00177 
00179 void pa_context_unref(pa_context *c);
00180 
00182 pa_context* pa_context_ref(pa_context *c);
00183 
00185 void pa_context_set_state_callback(pa_context *c, pa_context_notify_cb_t cb, void *userdata);
00186 
00189 void pa_context_set_event_callback(pa_context *p, pa_context_event_cb_t cb, void *userdata);
00190 
00192 int pa_context_errno(pa_context *c);
00193 
00195 int pa_context_is_pending(pa_context *c);
00196 
00198 pa_context_state_t pa_context_get_state(pa_context *c);
00199 
00208 int pa_context_connect(pa_context *c, const char *server, pa_context_flags_t flags, const pa_spawn_api *api);
00209 
00211 void pa_context_disconnect(pa_context *c);
00212 
00214 pa_operation* pa_context_drain(pa_context *c, pa_context_notify_cb_t cb, void *userdata);
00215 
00219 pa_operation* pa_context_exit_daemon(pa_context *c, pa_context_success_cb_t cb, void *userdata);
00220 
00222 pa_operation* pa_context_set_default_sink(pa_context *c, const char *name, pa_context_success_cb_t cb, void *userdata);
00223 
00225 pa_operation* pa_context_set_default_source(pa_context *c, const char *name, pa_context_success_cb_t cb, void *userdata);
00226 
00228 int pa_context_is_local(pa_context *c);
00229 
00231 pa_operation* pa_context_set_name(pa_context *c, const char *name, pa_context_success_cb_t cb, void *userdata);
00232 
00234 const char* pa_context_get_server(pa_context *c);
00235 
00237 uint32_t pa_context_get_protocol_version(pa_context *c);
00238 
00240 uint32_t pa_context_get_server_protocol_version(pa_context *c);
00241 
00247 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);
00248 
00250 pa_operation *pa_context_proplist_remove(pa_context *c, const char *const keys[], pa_context_success_cb_t cb, void *userdata);
00251 
00255 uint32_t pa_context_get_index(pa_context *s);
00256 
00259 pa_time_event* pa_context_rttime_new(pa_context *c, pa_usec_t usec, pa_time_event_cb_t cb, void *userdata);
00262 void pa_context_rttime_restart(pa_context *c, pa_time_event *e, pa_usec_t usec);
00263 
00264 PA_C_DECL_END
00265 
00266 #endif

Generated on Sat Nov 20 2010 for PulseAudio by  doxygen 1.7.1