-
Notifications
You must be signed in to change notification settings - Fork 2
/
router-userdata.h
58 lines (51 loc) · 1.64 KB
/
router-userdata.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
/******************************************************************************
* @file: router-userdata.h
*
* The file contains the definition of user data structure
*
*
*
* @component: PulseAudio router module
*
* @author: Toshiaki Isogai <[email protected]>
* Kapildev Patel <[email protected]>
*
* @copyright (c) 2016 Advanced Driver Information Technology.
* This code is developed by Advanced Driver Information Technology.
* Copyright of Advanced Driver Information Technology, Bosch, and DENSO.
* All rights reserved.
*
*****************************************************************************/
#ifndef __USERDATA_ROUTER_H__
#define __USERDATA_ROUTER_H__
#include <pulsecore/protocol-dbus.h>
#include <pulsecore/log.h>
typedef struct router_dbusif router_dbusif;
typedef struct router_hooks router_hooks;
#define AM_MAX_SOURCE_SINK 100
#define AM_MAX_NAME_LENGTH 256
typedef struct name_id_map_t {
uint16_t id;
uint16_t domain_id;
bool builtin;
uint16_t source_state;
float volume;
bool volume_valid;
void* data;
char name[AM_MAX_NAME_LENGTH];
char description[AM_MAX_NAME_LENGTH];
} name_id_map;
struct userdata {
pa_core *core;
router_hooks *h;
router_dbusif *dbusif;
pa_hashmap *main_connection_map;
pa_hashmap *connection_map;
void* domain;
name_id_map sink_map[AM_MAX_SOURCE_SINK];
name_id_map source_map[AM_MAX_SOURCE_SINK];
};
#define ROUTER_FUNCTION_ENTRY pa_log_info("%s entered",__func__)
#define ROUTER_FUNCTION_EXIT pa_log_info("%s exited",__func__)
#define MODULE_ROUTER_FREE(p) { if(p) pa_xfree(p); }
#endif //__USERDATA_ROUTER_H__