murphyif: Free the connect timer when unloading
[profile/ivi/pulseaudio-module-murphy-ivi.git] / murphy / utils.h
1 /*
2  * module-murphy-ivi -- PulseAudio module for providing audio routing support
3  * Copyright (c) 2012, Intel Corporation.
4  *
5  * This program is free software; you can redistribute it and/or modify it
6  * under the terms and conditions of the GNU Lesser General Public License,
7  * version 2.1, as published by the Free Software Foundation.
8  *
9  * This program is distributed in the hope it will be useful, but WITHOUT
10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11  * FITNESS FOR A PARTICULAR PURPOSE.
12  * See the GNU Lesser General Public License for more details.
13  *
14  * You should have received a copy of the GNU Lesser General Public License
15  * along with this program; if not, write to the
16  * Free Software Foundation, Inc., 51 Franklin St - Fifth Floor, Boston,
17  * MA 02110-1301 USA.
18  *
19  */
20 #ifndef foomurphyiviutilsfoo
21 #define foomurphyiviutilsfoo
22
23 #include <stdbool.h>
24 #include <pulsecore/core.h>
25
26 struct pa_null_sink;
27
28 struct pa_null_sink *pa_utils_create_null_sink(struct userdata *,const char *);
29 void pa_utils_destroy_null_sink(struct userdata *);
30 pa_sink   *pa_utils_get_null_sink(struct userdata *);
31 pa_source *pa_utils_get_null_source(struct userdata *);
32
33 char *pa_utils_get_card_name(pa_card *);
34 char *pa_utils_get_card_bus(pa_card *);
35 char *pa_utils_get_sink_name(pa_sink *);
36 char *pa_utils_get_source_name(pa_source *);
37 char *pa_utils_get_sink_input_name(pa_sink_input *);
38 char *pa_utils_get_sink_input_name_from_data(pa_sink_input_new_data *);
39 char *pa_utils_get_source_output_name(pa_source_output *);
40 char *pa_utils_get_source_output_name_from_data(pa_source_output_new_data *);
41
42 char *pa_utils_get_zone(pa_proplist *);
43 const char *pa_utils_get_appid(pa_proplist *);
44
45 bool pa_utils_set_stream_routing_properties(pa_proplist *, int, void *);
46 bool pa_utils_unset_stream_routing_properties(pa_proplist *);
47 void      pa_utils_set_stream_routing_method_property(pa_proplist *,bool);
48 bool pa_utils_stream_has_default_route(pa_proplist *);
49 int       pa_utils_get_stream_class(pa_proplist *);
50
51
52 #ifdef foomurphyuserdatafoo  /* argh ... */
53 bool pa_utils_set_resource_properties(pa_proplist *, pa_nodeset_resdef *);
54 bool pa_utils_unset_resource_properties(pa_proplist *);
55 pa_nodeset_resdef *pa_utils_get_resource_properties(pa_proplist *,
56                                                     pa_nodeset_resdef *);
57
58 void      pa_utils_set_port_properties(pa_device_port *, mir_node *);
59 mir_node *pa_utils_get_node_from_port(struct userdata *, pa_device_port *, void **);
60 mir_node *pa_utils_get_node_from_stream(struct userdata *,mir_direction,void*);
61 mir_node *pa_utils_get_node_from_data(struct userdata *, mir_direction,void *);
62 #endif
63
64 const char *pa_utils_file_path(const char *, const char *, char *, size_t);
65
66 uint32_t pa_utils_new_stamp(void);
67 uint32_t pa_utils_get_stamp(void);
68
69 #endif
70
71 /*
72  * Local Variables:
73  * c-basic-offset: 4
74  * indent-tabs-mode: nil
75  * End:
76  *
77  */