Branch data Line data Source code
1 : : #ifndef foopulsedeviceporthfoo
2 : : #define foopulsedeviceporthfoo
3 : :
4 : : /***
5 : : This file is part of PulseAudio.
6 : :
7 : : Copyright 2004-2006 Lennart Poettering
8 : : Copyright 2006 Pierre Ossman <ossman@cendio.se> for Cendio AB
9 : : Copyright 2011 David Henningsson, Canonical Ltd.
10 : :
11 : : PulseAudio is free software; you can redistribute it and/or modify
12 : : it under the terms of the GNU Lesser General Public License as published
13 : : by the Free Software Foundation; either version 2.1 of the License,
14 : : or (at your option) any later version.
15 : :
16 : : PulseAudio is distributed in the hope that it will be useful, but
17 : : WITHOUT ANY WARRANTY; without even the implied warranty of
18 : : MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19 : : General Public License for more details.
20 : :
21 : : You should have received a copy of the GNU Lesser General Public License
22 : : along with PulseAudio; if not, write to the Free Software
23 : : Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
24 : : USA.
25 : : ***/
26 : :
27 : : typedef struct pa_device_port pa_device_port;
28 : :
29 : : #ifdef HAVE_CONFIG_H
30 : : #include <config.h>
31 : : #endif
32 : :
33 : : #include <inttypes.h>
34 : :
35 : : #include <pulse/def.h>
36 : : #include <pulsecore/object.h>
37 : : #include <pulsecore/hashmap.h>
38 : : #include <pulsecore/core.h>
39 : :
40 : : struct pa_device_port {
41 : : pa_object parent; /* Needed for reference counting */
42 : : pa_core *core;
43 : :
44 : : char *name;
45 : : char *description;
46 : :
47 : : unsigned priority;
48 : : pa_port_available_t available; /* PA_PORT_AVAILABLE_UNKNOWN, PA_PORT_AVAILABLE_NO or PA_PORT_AVAILABLE_YES */
49 : :
50 : : pa_proplist *proplist;
51 : : pa_hashmap *profiles; /* Does not own the profiles */
52 : : pa_bool_t is_input:1;
53 : : pa_bool_t is_output:1;
54 : : int64_t latency_offset;
55 : :
56 : : /* .. followed by some implementation specific data */
57 : : };
58 : :
59 [ # # ][ # # ]: 0 : PA_DECLARE_PUBLIC_CLASS(pa_device_port);
[ # # ]
60 : : #define PA_DEVICE_PORT(s) (pa_device_port_cast(s))
61 : :
62 : : #define PA_DEVICE_PORT_DATA(d) ((void*) ((uint8_t*) d + PA_ALIGN(sizeof(pa_device_port))))
63 : :
64 : : pa_device_port *pa_device_port_new(pa_core *c, const char *name, const char *description, size_t extra);
65 : :
66 : : void pa_device_port_hashmap_free(pa_hashmap *h);
67 : :
68 : : /* The port's available status has changed */
69 : : void pa_device_port_set_available(pa_device_port *p, pa_port_available_t available);
70 : :
71 : : void pa_device_port_set_latency_offset(pa_device_port *p, int64_t offset);
72 : :
73 : : #endif
|