blob: c3c451c29afd1ff0e87f43efa1691e43e10e70cc (
plain)
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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
|
/*
* Copyright (C) 2011, BMW AG
*
* AudioManagerDeamon
*
* @file dataTypes.h
*
* @date: 20.05.2011
* @author: Christian Müller (christian.ei.mueller@bmw.de)
*
*/
#ifndef DATATYPES_H_
#define DATATYPES_H_
#include <list>
#include <string>
typedef int source_t;
typedef int sink_t;
typedef int domain_t;
typedef int gateway_t;
typedef int connection_t;
typedef int interrupt_t;
typedef int volume_t;
typedef int genHandle_t;
typedef int genInt_t;
typedef int hookprio_t;
typedef int sourceClass_t;
typedef int sinkClass_t;
/**Global defined error Type
*
*/
typedef enum genError {
GEN_OK, //!< GEN_OK
GEN_UNKNOWN, //!< GEN_UNKNOWN
GEN_OUTOFRANGE, //!< GEN_OUTOFRANGE
GEN_NOTUSED, //!< GEN_NOTUSED
GEN_DATABASE_ERROR
//!< GEN_DATABASE_ERROR
} genError_t;
/** the resulttype for the hooks
*
*/
typedef enum genHookResult {
HOOK_OK, //!< HOOK_OK
HOOK_STOP,//!< HOOK_STOP
HOOK_UNUSED
//!< HOOK_UNUSED
} genHookResult_t;
/** This represents one "hopp" in the route
* TODO: change from public structs into own public classes
*/
struct genRoutingElement_t {
source_t source;
sink_t sink;
domain_t Domain_ID;
};
/**This is a container for a complete route.
* A List of "hopps" and a length.
*/
class genRoute_t {
public:
int len;
source_t Source_ID;
sink_t Sink_ID;
std::list<genRoutingElement_t> route;
};
/**This class describes the interrupt Type.
* \var ID the ID of the Interrupt (unique)
* \var connID the Connection ID that is used
* \var sourceID the SourceID of the Interrupt
* \var sinkID the sinkID of the interrupt
* \var mixed true if interrupt is mixed into current audio
* \var listInterruptSources the list of the interrupted sources.
*/
class interruptType_t {
public:
genInt_t ID;
connection_t connID;
source_t sourceID;
sink_t SinkID;
bool mixed;
std::list<source_t> listInterruptedSources;
};
class SinkType {
public:
std::string name;
sink_t ID;
};
class SourceType {
public:
std::string name;
source_t ID;
};
class ConnectionType {
public:
source_t Source_ID;
sink_t Sink_ID;
};
#endif /* DATATYPES_H_ */
|