adding feature in the compile script:
[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 <qlist.h>
17
18 typedef int source_t;
19 typedef int sink_t;
20 typedef int domain_t;
21 typedef int gateway_t;
22 typedef int connection_t;
23 typedef int interrupt_t;
24 typedef int volume_t;
25 typedef int genHandle_t;
26 typedef int genInt_t;
27 typedef int hookprio_t;
28 typedef int sourceClass_t;
29 typedef int sinkClass_t;
30
31 /**Global defined error Type
32  *
33  */
34 typedef enum genError {
35         GEN_OK, //!< GEN_OK
36         GEN_UNKNOWN, //!< GEN_UNKNOWN
37         GEN_OUTOFRANGE, //!< GEN_OUTOFRANGE
38         GEN_NOTUSED, //!< GEN_NOTUSED
39         GEN_DATABASE_ERROR
40 //!< GEN_DATABASE_ERROR
41 } genError_t;
42
43 /** the resulttype for the hooks
44  *
45  */
46 typedef enum genHookResult {
47         HOOK_OK, //!< HOOK_OK
48         HOOK_STOP,//!< HOOK_STOP
49         HOOK_UNUSED
50 //!< HOOK_UNUSED
51 } genHookResult_t;
52
53 /** This represents one "hopp" in the route
54  * TODO: change from public structs into own public classes
55  */
56 struct genRoutingElement_t {
57         source_t source;
58         sink_t sink;
59         domain_t Domain_ID;
60 };
61
62 /**This is a container for a complete route.
63  * A List of "hopps" and a length.
64  */
65 class genRoute_t {
66 public:
67         int len;
68         source_t Source_ID;
69         sink_t Sink_ID;
70         QList<genRoutingElement_t> route;
71 };
72
73 /**This class describes the interrupt Type.
74  * \var ID the ID of the Interrupt (unique)
75  * \var connID the Connection ID that is used
76  * \var sourceID the SourceID of the Interrupt
77  * \var sinkID the sinkID of the interrupt
78  * \var mixed true if interrupt is mixed into current audio
79  * \var listInterruptSources the list of the interrupted sources.
80  */
81 class interruptType_t {
82 public:
83         genInt_t ID;
84         connection_t connID;
85         source_t sourceID;
86         sink_t SinkID;
87         bool mixed;
88         QList<source_t> listInterruptedSources;
89 };
90
91 #endif /* DATATYPES_H_ */