browser.h

Go to the documentation of this file.
00001 #ifndef foobrowserhfoo
00002 #define foobrowserhfoo
00003 
00004 /* $Id: browser.h 1069 2006-07-13 17:33:44Z 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
00011   published by the Free Software Foundation; either version 2 of the
00012   License, 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
00020   License 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/mainloop-api.h>
00026 #include <pulse/sample.h>
00027 #include <pulse/channelmap.h>
00028 #include <pulse/cdecl.h>
00029 
00033 PA_C_DECL_BEGIN
00034 
00036 typedef struct pa_browser pa_browser;
00037 
00039 typedef enum pa_browse_opcode {
00040     PA_BROWSE_NEW_SERVER = 0, 
00041     PA_BROWSE_NEW_SINK,       
00042     PA_BROWSE_NEW_SOURCE,     
00043     PA_BROWSE_REMOVE_SERVER,  
00044     PA_BROWSE_REMOVE_SINK,    
00045     PA_BROWSE_REMOVE_SOURCE   
00046 } pa_browse_opcode_t;
00047 
00048 typedef enum pa_browse_flags {
00049     PA_BROWSE_FOR_SERVERS = 1, 
00050     PA_BROWSE_FOR_SINKS = 2, 
00051     PA_BROWSE_FOR_SOURCES = 4 
00052 } pa_browse_flags_t;
00053 
00055 pa_browser *pa_browser_new(pa_mainloop_api *mainloop);
00056 
00058 pa_browser *pa_browser_new_full(pa_mainloop_api *mainloop, pa_browse_flags_t flags, const char **error_string);
00059 
00061 pa_browser *pa_browser_ref(pa_browser *z);
00062 
00064 void pa_browser_unref(pa_browser *z);
00065 
00067 typedef struct pa_browse_info {
00068     const char *name;  
00070     const char *server; 
00071     const char *server_version; 
00072     const char *user_name; 
00073     const char *fqdn; /* Server version; optional */
00074     const uint32_t *cookie;  /* Server cookie; optional */
00075 
00076     const char *device; /* Device name; always available when this information is of a sink/source */
00077     const char *description;  /* Device description; optional */
00078     const pa_sample_spec *sample_spec;  /* Sample specification of the device; optional */
00079 } pa_browse_info;
00080 
00082 typedef void (*pa_browse_cb_t)(pa_browser *z, pa_browse_opcode_t c, const pa_browse_info *i, void *userdata);
00083 
00085 void pa_browser_set_callback(pa_browser *z, pa_browse_cb_t cb, void *userdata);
00086 
00088 typedef void (*pa_browser_error_cb_t)(pa_browser *z, const char *error_string, void *userdata);
00089 
00094 void pa_browser_set_error_callback(pa_browser *z, pa_browser_error_cb_t, void *userdata);
00095 
00096 PA_C_DECL_END
00097 
00098 #endif

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