summaryrefslogtreecommitdiff
path: root/AudioManagerDaemon/src/main.cpp
blob: 3aa5f8b9d3f5550bc8c6594b45ff6fb9b49372a5 (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
/*
 * main.cpp
 *
 *  Created on: Oct 24, 2011
 *      Author: christian
 */

//todo: add debug commandline option to allow to use other than memory database
//todo: make real daemon out of it- systemd conform

#include "RoutingReceiver.h"
#include "CommandReceiver.h"
#include "ControlReceiver.h"
#include "DatabaseHandler.h"
#include "ControlSender.h"
#include "CommandSender.h"
#include "RoutingSender.h"
#include "DBusWrapper.h"
#include <dbus/dbus.h>
#include <dlt/dlt.h>

DLT_DECLARE_CONTEXT(AudioManager);

using namespace am;

int main(int argc, char *argv[])
{
	DLT_REGISTER_APP("AudioManagerDeamon","AudioManagerDeamon");
	DLT_REGISTER_CONTEXT(AudioManager,"Main","Main Context");
	DLT_LOG(AudioManager,DLT_LOG_INFO, DLT_STRING("The AudioManager is started "));

	DatabaseHandler iDatabaseHandler;
	DBusWrapper iDBusWrapper;
	CommandReceiver iCommandReceiver(&iDatabaseHandler,&iDBusWrapper);
	RoutingReceiver iRoutingReceiver;
	ControlReceiver iControlReceiver(&iDatabaseHandler);
	RoutingSender iRoutingSender;
	CommandSender iCommandSender;


	iCommandSender.startupInterface(&iCommandReceiver);

	iDBusWrapper.dbusMainLoop();

}