browser.h

Go to the documentation of this file.
00001 #ifndef foobrowserhfoo
00002 #define foobrowserhfoo
00003 
00004 /* $Id: browser.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 
00011   PulseAudio is free software; you can redistribute it and/or modify
00012   it under the terms of the GNU Lesser General Public License as
00013   published by the Free Software Foundation; either version 2 of the
00014   License, or (at your option) any later version.
00015 
00016   PulseAudio is distributed in the hope that it will be useful, but
00017   WITHOUT ANY WARRANTY; without even the implied warranty of
00018   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
00019   General Public License for more details.
00020 
00021   You should have received a copy of the GNU Lesser General Public
00022   License along with PulseAudio; if not, write to the Free Software
00023   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
00024   USA.
00025 ***/
00026 
00027 #include <pulse/mainloop-api.h>
00028 #include <pulse/sample.h>
00029 #include <pulse/channelmap.h>
00030 #include <pulse/cdecl.h>
00031 
00035 PA_C_DECL_BEGIN
00036 
00038 typedef struct pa_browser pa_browser;
00039 
00041 typedef enum pa_browse_opcode {
00042     PA_BROWSE_NEW_SERVER = 0, 
00043     PA_BROWSE_NEW_SINK,       
00044     PA_BROWSE_NEW_SOURCE,     
00045     PA_BROWSE_REMOVE_SERVER,  
00046     PA_BROWSE_REMOVE_SINK,    
00047     PA_BROWSE_REMOVE_SOURCE   
00048 } pa_browse_opcode_t;
00049 
00050 typedef enum pa_browse_flags {
00051     PA_BROWSE_FOR_SERVERS = 1, 
00052     PA_BROWSE_FOR_SINKS = 2, 
00053     PA_BROWSE_FOR_SOURCES = 4 
00054 } pa_browse_flags_t;
00055 
00057 pa_browser *pa_browser_new(pa_mainloop_api *mainloop);
00058 
00060 pa_browser *pa_browser_new_full(pa_mainloop_api *mainloop, pa_browse_flags_t flags, const char **error_string);
00061 
00063 pa_browser *pa_browser_ref(pa_browser *z);
00064 
00066 void pa_browser_unref(pa_browser *z);
00067 
00069 typedef struct pa_browse_info {
00070     const char *name;  
00072     const char *server; 
00073     const char *server_version; 
00074     const char *user_name; 
00075     const char *fqdn; /* Server version; optional */
00076     const uint32_t *cookie;  /* Server cookie; optional */
00077 
00078     const char *device; /* Device name; always available when this information is of a sink/source */
00079     const char *description;  /* Device description; optional */
00080     const pa_sample_spec *sample_spec;  /* Sample specification of the device; optional */
00081 } pa_browse_info;
00082 
00084 typedef void (*pa_browse_cb_t)(pa_browser *z, pa_browse_opcode_t c, const pa_browse_info *i, void *userdata);
00085 
00087 void pa_browser_set_callback(pa_browser *z, pa_browse_cb_t cb, void *userdata);
00088 
00090 typedef void (*pa_browser_error_cb_t)(pa_browser *z, const char *error_string, void *userdata);
00091 
00096 void pa_browser_set_error_callback(pa_browser *z, pa_browser_error_cb_t, void *userdata);
00097 
00098 PA_C_DECL_END
00099 
00100 #endif

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