update on dbus
[profile/ivi/audiomanager.git] / AudioManagerDaemon / dbusRoothandler.h
1 /*
2  * dbusRoothandler.h
3  *
4  *  Created on: Aug 1, 2011
5  *      Author: christian
6  */
7
8 #ifndef DBUSROOTHANDLER_H_
9 #define DBUSROOTHANDLER_H_
10
11 #include "audioManagerIncludes.h"
12 #ifdef WITH_DBUS
13 #include <dbus/dbus.h>
14 #include <string.h>
15 #include <list>
16 #include <sstream>
17
18 const char DBUS_SERVICE_SERVICE[]="org.genivi.audiomanager\0";
19 const char DBUS_SERVICE_ROOT[]="/org/genivi/audiomanager\0";
20
21 class dbusRoothandler {
22 public:
23         dbusRoothandler();
24         virtual ~dbusRoothandler();
25         DBusConnection* returnConnection();
26         static DBusHandlerResult cbRootIntrospection(DBusConnection *conn, DBusMessage *msg, void *reference);
27         void registerNode(std::string node);
28 private:
29         static dbusRoothandler* m_reference;
30     DBusConnection* m_pConnection;
31     DBusError m_err;
32     std::list<std::string> m_nodesList;
33 };
34
35 #endif
36 #endif /* DBUSROOTHANDLER_H_ */