2
* Copyright (C) 2011 Canonical, Ltd.
5
* Ugo Riboni <ugo.riboni@canonical.com>
6
* Michał Sawicz <michal.sawicz@canonical.com>
8
* This program is free software; you can redistribute it and/or modify
9
* it under the terms of the GNU General Public License as published by
10
* the Free Software Foundation; version 3.
12
* This program is distributed in the hope that it will be useful,
13
* but WITHOUT ANY WARRANTY; without even the implied warranty of
14
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
* GNU General Public License for more details.
17
* You should have received a copy of the GNU General Public License
18
* along with this program. If not, see <http://www.gnu.org/licenses/>.
21
#include "shelldbus.h"
24
#include <shelldeclarativeview.h>
29
#include <QtDBus/QDBusConnection>
31
static const char* SHELL_DBUS_SERVICE = "com.canonical.Unity2d.Shell";
32
static const char* DASH_DBUS_OBJECT_PATH = "/Dash";
33
static const char* HUD_DBUS_OBJECT_PATH = "/HUD";
35
ShellDBus::ShellDBus(ShellManager* manager, QObject* parent)
41
ShellDBus::~ShellDBus()
43
QDBusConnection::sessionBus().unregisterService(SHELL_DBUS_SERVICE);
47
ShellDBus::connectToBus()
49
bool ok = QDBusConnection::sessionBus().registerService(SHELL_DBUS_SERVICE);
54
DashDBus *dashDBus = new DashDBus(m_manager, this);
55
QDBusConnection::sessionBus().registerObject(DASH_DBUS_OBJECT_PATH, dashDBus);
57
HUDDBus *hudDBus = new HUDDBus(m_manager, this);
58
QDBusConnection::sessionBus().registerObject(HUD_DBUS_OBJECT_PATH, hudDBus);