]>
code.delx.au - pulseaudio/blob - src/polyp/browser.h
1ff58d8c758f02c61620e3f056d0db93a59e4523
7 This file is part of polypaudio.
9 polypaudio is free software; you can redistribute it and/or modify
10 it under the terms of the GNU Lesser General Public License as
11 published by the Free Software Foundation; either version 2 of the
12 License, or (at your option) any later version.
14 polypaudio is distributed in the hope that it will be useful, but
15 WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 General Public License for more details.
19 You should have received a copy of the GNU Lesser General Public
20 License along with polypaudio; if not, write to the Free Software
21 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
25 #include <polyp/mainloop-api.h>
26 #include <polyp/sample.h>
27 #include <polyp/channelmap.h>
28 #include <polyp/cdecl.h>
32 typedef struct pa_browser pa_browser
;
34 typedef enum pa_browse_opcode
{
35 PA_BROWSE_NEW_SERVER
= 0,
38 PA_BROWSE_REMOVE_SERVER
,
39 PA_BROWSE_REMOVE_SINK
,
40 PA_BROWSE_REMOVE_SOURCE
43 pa_browser
*pa_browser_new(pa_mainloop_api
*mainloop
);
44 pa_browser
*pa_browser_ref(pa_browser
*z
);
45 void pa_browser_unref(pa_browser
*z
);
47 typedef struct pa_browse_info
{
48 /* Unique service name */
49 const char *name
; /* always available */
52 const char *server
; /* always available */
53 const char *server_version
, *user_name
, *fqdn
; /* optional */
54 const uint32_t *cookie
; /* optional */
57 const char *device
; /* always available when this information is of a sink/source */
58 const char *description
; /* optional */
59 const pa_sample_spec
*sample_spec
; /* optional */
62 typedef void (*pa_browse_cb_t
)(pa_browser
*z
, pa_browse_opcode_t c
, const pa_browse_info
*i
, void *userdata
);
64 void pa_browser_set_callback(pa_browser
*z
, pa_browse_cb_t cb
, void *userdata
);