• 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 
00153 PA_C_DECL_BEGIN
00154 
00156 typedef struct pa_context pa_context;
00157 
00159 typedef void (*pa_context_notify_cb_t)(pa_context *c, void *userdata);
00160 
00162 typedef void (*pa_context_success_cb_t) (pa_context *c, int success, void *userdata);
00163 
00169 typedef void (*pa_context_event_cb_t)(pa_context *c, const char *name, pa_proplist *p, void *userdata);
00170 
00174 pa_context *pa_context_new(pa_mainloop_api *mainloop, const char *name);
00175 
00179 pa_context *pa_context_new_with_proplist(pa_mainloop_api *mainloop, const char *name, pa_proplist *proplist);
00180 
00182 void pa_context_unref(pa_context *c);
00183 
00185 pa_context* pa_context_ref(pa_context *c);
00186 
00188 void pa_context_set_state_callback(pa_context *c, pa_context_notify_cb_t cb, void *userdata);
00189 
00192 void pa_context_set_event_callback(pa_context *p, pa_context_event_cb_t cb, void *userdata);
00193 
00195 int pa_context_errno(pa_context *c);
00196 
00198 int pa_context_is_pending(pa_context *c);
00199 
00201 pa_context_state_t pa_context_get_state(pa_context *c);
00202 
00211 int pa_context_connect(pa_context *c, const char *server, pa_context_flags_t flags, const pa_spawn_api *api);
00212 
00214 void pa_context_disconnect(pa_context *c);
00215 
00217 pa_operation* pa_context_drain(pa_context *c, pa_context_notify_cb_t cb, void *userdata);
00218 
00222 pa_operation* pa_context_exit_daemon(pa_context *c, pa_context_success_cb_t cb, void *userdata);
00223 
00225 pa_operation* pa_context_set_default_sink(pa_context *c, const char *name, pa_context_success_cb_t cb, void *userdata);
00226 
00228 pa_operation* pa_context_set_default_source(pa_context *c, const char *name, pa_context_success_cb_t cb, void *userdata);
00229 
00231 int pa_context_is_local(pa_context *c);
00232 
00234 pa_operation* pa_context_set_name(pa_context *c, const char *name, pa_context_success_cb_t cb, void *userdata);
00235 
00237 const char* pa_context_get_server(pa_context *c);
00238 
00240 uint32_t pa_context_get_protocol_version(pa_context *c);
00241 
00243 uint32_t pa_context_get_server_protocol_version(pa_context *c);
00244 
00250 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);
00251 
00253 pa_operation *pa_context_proplist_remove(pa_context *c, const char *const keys[], pa_context_success_cb_t cb, void *userdata);
00254 
00258 uint32_t pa_context_get_index(pa_context *s);
00259 
00262 pa_time_event* pa_context_rttime_new(pa_context *c, pa_usec_t usec, pa_time_event_cb_t cb, void *userdata);
00265 void pa_context_rttime_restart(pa_context *c, pa_time_event *e, pa_usec_t usec);
00266 
00267 PA_C_DECL_END
00268 
00269 #endif

Generated on Fri Nov 26 2010 for PulseAudio by  doxygen 1.7.2