- first attempt to remove QT
[profile/ivi/audiomanager.git] / AudioManagerDaemon / dataTypes.h
1 /*
2  * Copyright (C) 2011, BMW AG
3  *
4  * AudioManagerDeamon
5  *
6  * @file dataTypes.h
7  *
8  * @date: 20.05.2011
9  * @author: Christian Müller (christian.ei.mueller@bmw.de)
10  *
11  */
12
13 #ifndef DATATYPES_H_
14 #define DATATYPES_H_
15
16 #include <list>
17 #include <string>
18
19 typedef int source_t;
20 typedef int sink_t;
21 typedef int domain_t;
22 typedef int gateway_t;
23 typedef int connection_t;
24 typedef int interrupt_t;
25 typedef int volume_t;
26 typedef int genHandle_t;
27 typedef int genInt_t;
28 typedef int hookprio_t;
29 typedef int sourceClass_t;
30 typedef int sinkClass_t;
31
32 /**Global defined error Type
33  *
34  */
35 typedef enum genError {
36         GEN_OK, //!< GEN_OK
37         GEN_UNKNOWN, //!< GEN_UNKNOWN
38         GEN_OUTOFRANGE, //!< GEN_OUTOFRANGE
39         GEN_NOTUSED, //!< GEN_NOTUSED
40         GEN_DATABASE_ERROR
41 //!< GEN_DATABASE_ERROR
42 } genError_t;
43
44 /** the resulttype for the hooks
45  *
46  */
47 typedef enum genHookResult {
48         HOOK_OK, //!< HOOK_OK
49         HOOK_STOP,//!< HOOK_STOP
50         HOOK_UNUSED
51 //!< HOOK_UNUSED
52 } genHookResult_t;
53
54 /** This represents one "hopp" in the route
55  * TODO: change from public structs into own public classes
56  */
57 struct genRoutingElement_t {
58         source_t source;
59         sink_t sink;
60         domain_t Domain_ID;
61 };
62
63 /**This is a container for a complete route.
64  * A List of "hopps" and a length.
65  */
66 class genRoute_t {
67 public:
68         int len;
69         source_t Source_ID;
70         sink_t Sink_ID;
71         std::list<genRoutingElement_t> route;
72 };
73
74 /**This class describes the interrupt Type.
75  * \var ID the ID of the Interrupt (unique)
76  * \var connID the Connection ID that is used
77  * \var sourceID the SourceID of the Interrupt
78  * \var sinkID the sinkID of the interrupt
79  * \var mixed true if interrupt is mixed into current audio
80  * \var listInterruptSources the list of the interrupted sources.
81  */
82 class interruptType_t {
83 public:
84         genInt_t ID;
85         connection_t connID;
86         source_t sourceID;
87         sink_t SinkID;
88         bool mixed;
89         std::list<source_t> listInterruptedSources;
90 };
91
92 class SinkType {
93 public:
94         std::string name;
95         sink_t ID;
96 };
97
98 class SourceType {
99 public:
100         std::string name;
101         source_t ID;
102 };
103
104 class ConnectionType {
105 public:
106         source_t Source_ID;
107         sink_t Sink_ID;
108 };
109
110 #endif /* DATATYPES_H_ */