summaryrefslogtreecommitdiff
path: root/AudioManagerDeamon/AudioManagerCore.h
blob: 36d86b5d37e3972865fb280ad7275b9c5ba95d1e (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
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
/**
 * Copyright (C) 2011, BMW AG
 *
 * AudioManangerDeamon
 *
 * \file AudioManagerCore.h
 *
 * \date 20.05.2011
 * \author Christian Müller (christian.ei.mueller@bmw.de)
 *
 * \section License
 * GNU Lesser General Public License, version 2.1, with special exception (GENIVI clause)
 * Copyright (C) 2011, BMW AG – Christian Müller  Christian.ei.mueller@bmw.de
 *
 * This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License, version 2.1, as published by the Free Software Foundation.
 * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License, version 2.1, for more details.
 * You should have received a copy of the GNU Lesser General Public License, version 2.1, along with this program; if not, see <http://www.gnu.org/licenses/lgpl-2.1.html>.
 * Note that the copyright holders assume that the GNU Lesser General Public License, version 2.1, may also be applicable to programs even in cases in which the program is not a library in the technical sense.
 * Linking AudioManager statically or dynamically with other modules is making a combined work based on AudioManager. You may license such other modules under the GNU Lesser General Public License, version 2.1. If you do not want to license your linked modules under the GNU Lesser General Public License, version 2.1, you may use the program under the following exception.
 * As a special exception, the copyright holders of AudioManager give you permission to combine AudioManager with software programs or libraries that are released under any license unless such a combination is not permitted by the license of such a software program or library. You may copy and distribute such a system following the terms of the GNU Lesser General Public License, version 2.1, including this special exception, for AudioManager and the licenses of the other code concerned.
 * Note that people who make modified versions of AudioManager are not obligated to grant this special exception for their modified versions; it is their choice whether to do so. The GNU Lesser General Public License, version 2.1, gives permission to release a modified version without this exception; this exception also makes it possible to release a modified version which carries forward this exception.
 *
 *
 */

#ifndef AUDIOMANAGERCORE_H_
#define AUDIOMANAGERCORE_H_

#include <QtCore/QObject>

#include "audioManagerIncludes.h"

/**CONSTANT for the Connection timeout when using asynchronous connect. In mseconds.
 *
 */
#define CONNECT_TIMEOUT 3000

class HookHandler;
class AudioManagerCore;
class Queue;
class Router;
class Bushandler;
class DBusCommandInterface;

/**
 * \class Task
 * \brief Base Class for all Tasks
 * \details a Base Class for a basic operation together with a set of parameters
 * Every Task that can be created by the Hook Plugins is derived from this class
 * Be sure to implement executeTask() because this will be called when the task is executed
 * Whenever the task is finished, you need to emit the signal signal_nextTask() that will call the next
 * Task in the queue.
 * \fn virtual void Task::executeTask(Queue* queue)=0
 * \brief This needs to be overwritten in implementation of the class
 * The queue calls this function to start the execution of the task
 * \param queue pointer to the queue
 * \fn void Task::signal_nextTask()
 * \brief by emitting this signal, the next task in the queue is triggered
 */
class Task: public QObject {
Q_OBJECT
public:
	Task();
	Task(AudioManagerCore* core);
	virtual ~Task();
	virtual void executeTask(Queue* queue)=0;

signals:
	void signal_nextTask();
protected:
	AudioManagerCore* m_core; //!< pointer to the core
};

/**
 * \class TaskAsyncConnect
 * \brief This task is used to connect a source and a sink asynchronous
 *
 * \fn TaskAsyncConnect::TaskAsyncConnect(AudioManagerCore* core, sink_t sink, source_t source)
 * \brief Constructor
 * \param core pointer to the core
 * \param sink	the sink to be connected
 * \param source the source to be connected
 *
 * \fn void TaskAsyncConnect::setSink(sink_t sink)
 * \brief Sets the Sink that should be connected to
 * \param sink the sink
 *
 * \fn void TaskAsyncConnect::setSource(source_t source)
 * \brief sets the source
 * \param source the source
 *
 * \fn sink_t TaskAsyncConnect::getSink()
 * \brief returns the sink
 *
 * \fn source_t TaskAsyncConnect::getSource()
 * \brief returns the source
 *
 * \fn void TaskAsyncConnect::slot_connect_finished(genHandle_t handle, genError_t error)
 * \brief is used to receive the asynchronous answer.
 *
 * \fn void TaskAsyncConnect::slot_timeout()
 * \brief used to handle the timeout
 */
class TaskAsyncConnect: public Task {
Q_OBJECT
public:
	TaskAsyncConnect(AudioManagerCore* core, sink_t sink, source_t source);
	virtual ~TaskAsyncConnect();
	void setSink(sink_t sink);
	void setSource(source_t source);
	sink_t getSink();
	source_t getSource();
	void executeTask(Queue* queue);

public slots:
	void slot_connect_finished(genHandle_t handle, genError_t error);
	void slot_timeout();
private:
	sink_t m_ParamSink; //!< the sink to be connected
	source_t m_ParamSource; //!< the source to be connected
	genHandle_t m_handle; //!< the handle (ConnectionID)
	QTimer* m_timer; //!< pointer to a timer used for timeout tracking
};

/**
 * \class TaskConnect
 * \brief This task is used to connect a source and a sink synchronous
 *
 * \fn TaskConnect::TaskConnect(AudioManagerCore* core, sink_t sink, source_t source)
 * \brief constructor
 * \param core pointer to the core
 * \param sink	the sink to be connected
 * \param source the source to be connected
 *
 */
class TaskConnect: public Task {
Q_OBJECT
public:
	TaskConnect(AudioManagerCore* core, sink_t sink, source_t source);
	virtual ~TaskConnect();
	void executeTask(Queue* queue);

private:
	sink_t m_ParamSink; //!< the sink to be connected
	source_t m_ParamSource; //!< the source to be connected
};

/**
 * \class TaskDisconnect
 * \brief This task is used to connect a source and a sink synchronous
 *
 * \fn TaskDisconnect::TaskDisconnect(AudioManagerCore* core, connection_t ID)
 * \brief constructor
 * \param core pointer to the core
 * \param ID the connection ID to be disconnected
 *
 */
class TaskDisconnect: public Task {
Q_OBJECT
public:
	TaskDisconnect(AudioManagerCore* core, connection_t ID);
	virtual ~TaskDisconnect();
	void executeTask(Queue* queue);
private:
	connection_t m_ParamConnectionID; //!< the connection to disconnect
};

/**
 * \class TaskInterruptWait
 * \brief this class waits for an interrupt to be resumed
 *
 * \fn TaskInterruptWait::TaskInterruptWait(AudioManagerCore* core, genInt_t connectionID)
 * \brief Constructor
 * \param core link to AudioManagercore
 * \param connectionID the connection ID to be waited for
 *
 * \fn void TaskInterruptWait::slot_interrupt_ready(genInt_t ID)
 * \brief slot that is called when the interrupt resumes
 * \param the interrupt ID of the interrupt that resumed
 */
class TaskInterruptWait: public Task {
Q_OBJECT
public:
	TaskInterruptWait(AudioManagerCore* core, genInt_t connectionID);
	virtual ~TaskInterruptWait();
	void executeTask(Queue* queue);
public slots:
	void slot_interrupt_ready(genInt_t ID);
private:
	genInt_t m_interruptID; //!< the interrupt ID that should be waited for
};

/**
 * \class TaskSetVolume
 * \brief a task that sets the volume for a sink
 *
 * \fn TaskSetVolume::TaskSetVolume(AudioManagerCore* core, volume_t newVolume=0, sink_t sink=0)
 * \brief constructor
 * \param core the pointer to the AudioManagerCore
 * \param newVolume the volume to be set
 * \param sink the sink that the volume shall be applied to
 *
 * \fn void TaskSetVolume::setVolume(volume_t newVolume)
 * \brief sets the volume
 *
 * \fn void TaskSetVolume::setSink(sink_t sink)
 * \brief sets the sink
 *
 * \fn void TaskSetVolume::volume_t getVolume()
 * \brief returns the volume
 *
 * \fn sink_t TaskSetVolume::getSink()
 * \brief returns the volume
 */
class TaskSetVolume: public Task {
Q_OBJECT
public:
	TaskSetVolume(AudioManagerCore* core, volume_t newVolume=0, sink_t sink=0);
	virtual ~TaskSetVolume();

	void setVolume(volume_t newVolume);
	void setSink(sink_t sink);

	volume_t getVolume();
	sink_t getSink();

	void executeTask(Queue* queue);
private:
	volume_t m_volume; //!< the volume
	sink_t m_sink; //!< the sink
};

/**
 * \class TaskSetSourceVolume
 * \brief sets the volume of a source
 *
 * \fn TaskSetSourceVolume::TaskSetSourceVolume(AudioManagerCore* core, volume_t newVolume=0, source_t source=0)
 * \brief constructor
 * \param core the pointer to the AudioManagerCore
 * \param newVolume the volumesink_t  to be set
 * \param source the source that the volume shall be applied to
 *
 *  * \fn void TaskSetSourceVolume::setVolume(volume_t newVolume)
 * \brief sets the volume
 *
 * \fn void TaskSetSourceVolume::setSink(sink_t sink)
 * \brief sets the sink
 *
 * \fn void TaskSetSourceVolume::volume_t getVolume()
 * \brief returns the volume
 *
 * \fn sink_t TaskSetSourceVolume::getSink()
 * \brief returns the volume
 *
 */
class TaskSetSourceVolume: public Task {
Q_OBJECT
public:
	TaskSetSourceVolume(AudioManagerCore* core, volume_t newVolume=0, source_t source=0);
	virtual ~TaskSetSourceVolume();

	void setVolume(volume_t newVolume);
	void setSource(source_t source);

	volume_t getVolume();
	source_t getSource();

	void executeTask(Queue* queue);
private:
	volume_t m_volume; //!< the volume
	source_t m_source; //!< the source
};

/**
 * \class TaskWait
 * \brief implements a wait in msecons
 *
 * \fn TaskWait::TaskWait(AudioManagerCore* core, int mseconds)
 * \brief constructor
 * \param core the pointer to the AudioManagerCore
 * \param newmseconds delay in milliseconds
 *
 * \fn void TaskWait::setTime(int mseconds)
 * \brief sets the time
 *
 * \fn int TaskWait::getTime()
 * \brief returns the time
 *
 * \fn 	void TaskWait::slot_timeIsup()
 * \brief slot called when the time is up
 */
class TaskWait: public Task {
Q_OBJECT
public:
	TaskWait(AudioManagerCore* core, int mseconds);
	virtual ~TaskWait();
	void setTime(int mseconds);
	int getTime();
	void executeTask(Queue* queue);

public slots:
	void slot_timeIsup();
private:
	int m_ParamMSeconds;//!< time to be delayed in milli seconds
	QTimer* m_timer; //!< pointer to timer
};

/**
 * \class TaskEnterUserConnect
 * \brief This task enters the user connection into the struct of the AudioManagerCore
 * \details We need this because the connection shall be entered not before it is build up
 *
 * \fn TaskEnterUserConnect::TaskEnterUserConnect(AudioManagerCore* core, genRoute_t route, connection_t connID=0)
 * \brief enters a user connect into the database
 */
class TaskEnterUserConnect: public Task {
Q_OBJECT
public:
	TaskEnterUserConnect(AudioManagerCore* core, genRoute_t route, connection_t connID=0);
	virtual ~TaskEnterUserConnect();
	void setConnection(genRoute_t route, connection_t connID);
	genRoute_t returnConnection();
	void executeTask(Queue* queue);
private:
	genRoute_t m_route;		//!< the route to be entered
	connection_t m_connectionID; //!< the connection ID
};

/**
 * \class TaskRemoveUserConnect
 * \brief removes a user Connect
 *
 * \fn TaskRemoveUserConnect::TaskRemoveUserConnect(AudioManagerCore* core, connection_t connID)
 * \brief constructor
 */
class TaskRemoveUserConnect : public Task {
Q_OBJECT
public:
	TaskRemoveUserConnect(AudioManagerCore* core, connection_t connID);
	virtual ~TaskRemoveUserConnect();
	void setConnectionID(connection_t connID);
	connection_t returnConnectionID();
	void executeTask(Queue* queue);
private:
	connection_t m_connectionID; //!< the connection ID
};

/**
 * \class TaskEnterInterrupt
 * \brief enters an interrupt into the database
 */
class TaskEnterInterrupt: public Task {
Q_OBJECT
public:
	TaskEnterInterrupt(AudioManagerCore* core, genInt_t ID,bool mixed, connection_t connID,	QList<source_t> listInterruptedSources);
	virtual ~TaskEnterInterrupt();
	void executeTask(Queue* queue);
private:
	genInt_t m_intID; //!< the interrupt ID
	bool m_mixed; //!< true if mixed
	connection_t m_connectionID; //!< the connection ID
	QList<source_t> m_interruptedSourcesList; //!< the list of interrupted sources
};

/**
 * \class TaskRemoveInterrupt
 * \brief removes an interrupt
 */
class TaskRemoveInterrupt: public Task {
Q_OBJECT
public:
	TaskRemoveInterrupt(AudioManagerCore* core, genInt_t ID);
	virtual ~TaskRemoveInterrupt();
	void executeTask(Queue* queue);
private:
	genInt_t m_intID; //!< the interrupt ID
};

/**
 * \class TaskSetSourceMute
 * \brief mutes a source
 */
class TaskSetSourceMute: public Task {
Q_OBJECT
public:
	TaskSetSourceMute(AudioManagerCore* core, source_t source);
	virtual ~TaskSetSourceMute();
	void executeTask(Queue* queue);
private:
	source_t m_source; //!< the source to be muted
};

/**
 * \class TaskSetSourceUnmute
 * \brief unmutes a source
 */
class TaskSetSourceUnmute: public Task {
Q_OBJECT
public:
	TaskSetSourceUnmute(AudioManagerCore* core, source_t source);
	virtual ~TaskSetSourceUnmute();
	void executeTask(Queue* queue);
private:
	source_t m_source; //!< the source to be unmuted
};

/**
 * \class TaskEmitSignalConnect
 * \brief emits the signal connect
 */
class TaskEmitSignalConnect: public Task {
Q_OBJECT
public:
	TaskEmitSignalConnect(AudioManagerCore* core);
	virtual ~TaskEmitSignalConnect();
	void executeTask(Queue* queue);
};

/**
 * \class Queue
 * \brief With the help of this class, all events that need to be processed are organized and queued
 * \details tasks to be added have to be created with new, after the queue is done all tasks will be deleted and the memory freed.
 * \todo error handling
 * \todo sorting of tasks
 * \todo add some function to attach parameters to the Queue so that organizing and handling is possible
 *
 * \fn Queue::Queue(AudioManagerCore* core,QString name="")
 * \brief constructor
 * \param name give the queue a name
 * \param core pointer to AudioManagerCore
 *
 * \fn void Queue::run()
 * \brief starts the queue
 *
 * \fn void Queue::addTask(Task* task)
 * \brief add a task to the queue
 * \param task pointer to the task
 *
 * \fn genError_t Queue::removeTask(Task* task)
 * \brief removes a task
 * \param task pointer to the task
 * \return GEN_OK on success
 *
 * \fn 	QList<Task*> Queue::getTaskList()
 * \brief returns the actual task list
 * \return list with pointers to the tasks
 *
 * \fn QString Queue::returnName()
 * \brief returns the name of the Queue
 * \return the name in QString format
 *
 * \fn void Queue::slot_nextTask()
 * \brief is called when a task is finished and the next task can be called
 */
class Queue: public QObject {
Q_OBJECT
public:
	Queue(AudioManagerCore* core,QString name="");
	virtual ~Queue();
	void run();
	void addTask(Task* task);
	genError_t removeTask(Task* task);
	QList<Task*> getTaskList();
	QString returnName();

public slots:
	void slot_nextTask();
private:
	AudioManagerCore* m_core; //!< pointer to AudioManagerCore
	int m_currentIndex; //!< the index of the list wich is currently worked on
	QString m_name; //!< name of the Queue
	QList<Task*> m_taskList; //!< the list with pointers to the tasks
};

/**
 * \class AudioManagerCore
 * \brief The central Managing Class of the AudioManager
 *
 * \fn genError_t AudioManagerCore::UserConnect(source_t source, sink_t sink)
 * \brief does a user connect
 *
 * \fn genError_t AudioManagerCore::UserDisconnect(connection_t connID)
 * \brief does a user disconnect
 *
 * \fn genError_t AudioManagerCore::UserSetVolume(sink_t sink, volume_t volume)
 * \brief set the user volume (on sink level)
 *
 * \fn genError_t AudioManagerCore::connect(source_t source, sink_t sink, genHandle_t* handle = NULL)
 * \brief connects sources and sinks
 *
 * \fn genError_t AudioManagerCore::disconnect(connection_t ID)
 * \brief disconnects sources and sinks
 *
 * \fn genError_t AudioManagerCore::setVolume(sink_t sink, volume_t volume)
 * \brief sets the volume to a sink
 *
 * \fn genError_t AudioManagerCore::interruptRequest(source_t interruptSource, sink_t sink, genInt_t* interruptID)
 * \brief via this call, an interrupt is requested
 *
 * \fn genError_t AudioManagerCore::setSourceVolume (source_t source, volume_t volume)
 * \brief sets the source volume
 *
 * \fn genError_t AudioManagerCore::setSourceMute (source_t source)
 * \brief mutes a source
 *
 * \fn genError_t AudioManagerCore::setSourceUnMute (source_t source)
 * \brief unmutes a source
 *
 * \fn genError_t AudioManagerCore::getRoute(const bool onlyfree, const source_t source, const sink_t sink, QList<genRoute_t>* ReturnList)
 * \brief returns a route
 *
 * \fn connection_t AudioManagerCore::returnConnectionIDforSinkSource (sink_t sink, source_t source)
 * \brief returns the connection ID for a sink source combination
 *
 * \fn source_t AudioManagerCore::returnSourceIDfromName(const QString name)
 * \brief returns the source ID for a name
 *
 * \fn sink_t AudioManagerCore::returnSinkIDfromName(const QString name)
 * \brief returns the sink ID for a given name
 *
 * \fn QList<ConnectionType> AudioManagerCore::getListConnections()
 * \brief returns the list of connections
 *
 * \fn QList<SinkType> AudioManagerCore::getListSinks()
 * \brief returns a list of all sinks
 *
 * \fn QList<SourceType> AudioManagerCore::getListSources()
 * \brief returns a list of all sources
 *
 * \fn void AudioManagerCore::emitSignalConnect()
 * \brief emits the signal connect
 *
 * \fn Router* AudioManagerCore::returnRouter()
 * \brief returns the pointer to the router
 *
 * \fn DataBaseHandler* AudioManagerCore::returnDatabaseHandler()
 * \brief returns the pointer to the database handler
 *
 * \fn RoutingReceiver* AudioManagerCore::returnReceiver()
 * \brief returns the pointer to the receiver
 *
 * \fn DBusCommandInterface* AudioManagerCore::returnCommandInterface()
 * \brief returns the pointer to the command interface
 *
 * \fn void AudioManagerCore::registerDatabasehandler(DataBaseHandler * handler)
 * \brief registers the database handler @ the core
 *
 * \fn void AudioManagerCore::registerRouter(Router* router)
 * \brief registers the router @ the core
 *
 * \fn void AudioManagerCore::registerBushandler(Bushandler* handler)
 * \brief registers the bushandler @ the core
 *
 * \fn void AudioManagerCore::registerHookEngine(HookHandler* handler)
 * \brief registers the hook engine @ the core
 *
 * \fn void AudioManagerCore::registerReceiver(RoutingReceiver* receiver)
 * \brief registers the receiver @ the core
 *
 * \fn void AudioManagerCore::registerCommandInterface(DBusCommandInterface* command)
 * \brief registers the command interface @ the core
 *
 * \fn void AudioManagerCore::addQueue(Queue* queue)
 * \brief adds a queue
 *
 * \fn genError_t AudioManagerCore::removeQueue(Queue* queue)
 * \brief removes a queue
 *
 *
 */
class AudioManagerCore :public QObject {
Q_OBJECT
public:
	AudioManagerCore();
	virtual ~AudioManagerCore();

	genError_t UserConnect(source_t source, sink_t sink);
	genError_t UserDisconnect(connection_t connID);
	genError_t UserSetVolume(sink_t sink, volume_t volume);
	genError_t connect(source_t source, sink_t sink, genHandle_t* handle = NULL);
	genError_t disconnect(connection_t ID);
	genError_t setVolume(sink_t sink, volume_t volume);
	genError_t interruptRequest(source_t interruptSource, sink_t sink, genInt_t* interruptID);
	genError_t setSourceVolume (source_t source, volume_t volume);
	genError_t setSourceMute (source_t source);
	genError_t setSourceUnMute (source_t source);

	genError_t getRoute(const bool onlyfree, const source_t source, const sink_t sink, QList<genRoute_t>* ReturnList);
	connection_t returnConnectionIDforSinkSource (sink_t sink, source_t source);
	source_t returnSourceIDfromName(const QString name);
	sink_t returnSinkIDfromName(const QString name);

	QList<ConnectionType> getListConnections();
	QList<SinkType> getListSinks();
	QList<SourceType> getListSources();

	void emitSignalConnect();

	Router* returnRouter();
	DataBaseHandler* returnDatabaseHandler();
	RoutingReceiver* returnReceiver();
	DBusCommandInterface* returnCommandInterface();

	void registerDatabasehandler(DataBaseHandler * handler);
	void registerRouter(Router* router);
	void registerBushandler(Bushandler* handler);
	void registerHookEngine(HookHandler* handler);
	void registerReceiver(RoutingReceiver* receiver);
	void registerCommandInterface(DBusCommandInterface* command);

	void addQueue(Queue* queue);
	genError_t removeQueue(Queue* queue);

signals:
	void signal_connectionChanged();
	void signal_numberOfSinksChanged();
	void signal_numberOfSourcesChanged();

private:
	DataBaseHandler* m_databaseHandler; //!< pointer to the DataBasehandler Class
	Router* m_router; //!< pointer to the Router Class
	Bushandler* m_busHandler; //!< pointer to the Bushandler Class
	HookHandler* m_hookHandler; //!< pointer to the HookHandler CLass
	RoutingReceiver* m_receiver; //!< pointer to the Routing receiver Class
	DBusCommandInterface* m_command; //!< pointer to the command Interface Class

	QList<Queue*> m_queueList; //!< List of pointers to all running queues
};

#endif /* AUDIOMANAGERCORE_H_ */