]> code.delx.au - pulseaudio/blob - polyp/polyplib-browser.h
* fix include file names in installed header files
[pulseaudio] / polyp / polyplib-browser.h
1 #ifndef foopolyplibbrowserhfoo
2 #define foopolyplibbrowserhfoo
3
4 /* $Id$ */
5
6 /***
7 This file is part of polypaudio.
8
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.
13
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.
18
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
22 USA.
23 ***/
24
25 #include <polyp/mainloop-api.h>
26 #include <polyp/sample.h>
27 #include <polyp/cdecl.h>
28 #include <polyp/typeid.h>
29
30 PA_C_DECL_BEGIN
31
32 struct pa_browser;
33
34 enum pa_browse_opcode {
35 PA_BROWSE_NEW_SERVER,
36 PA_BROWSE_NEW_SINK,
37 PA_BROWSE_NEW_SOURCE,
38 PA_BROWSE_REMOVE
39 };
40
41 struct pa_browser *pa_browser_new(struct pa_mainloop_api *mainloop);
42 struct pa_browser *pa_browser_ref(struct pa_browser *z);
43 void pa_browser_unref(struct pa_browser *z);
44
45 struct pa_browse_info {
46 /* Unique service name */
47 const char *name; /* always available */
48
49 /* Server info */
50 const char *server; /* always available */
51 const char *server_version, *user_name, *fqdn; /* optional */
52 const uint32_t *cookie; /* optional */
53
54 /* Device info */
55 const char *device; /* always available when this information is of a sink/source */
56 const char *description; /* optional */
57 const pa_typeid_t *typeid; /* optional */
58 const struct pa_sample_spec *sample_spec; /* optional */
59 };
60
61 void pa_browser_set_callback(struct pa_browser *z, void (*cb)(struct pa_browser *z, enum pa_browse_opcode c, const struct pa_browse_info *i, void *userdata), void *userdata);
62
63 PA_C_DECL_END
64
65 #endif