0
|
1 /* |
|
2 Bellaciao: a Salut à Toi frontend |
|
3 Copyright (C) 2011 Jérôme Poisson (goffi@goffi.org) |
|
4 |
|
5 This program is free software: you can redistribute it and/or modify |
|
6 it under the terms of the GNU Affero General Public License as published by |
|
7 the Free Software Foundation, either version 3 of the License, or |
|
8 (at your option) any later version. |
|
9 |
|
10 This program is distributed in the hope that it will be useful, |
|
11 but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
13 GNU Affero General Public License for more details. |
|
14 |
|
15 You should have received a copy of the GNU Affero General Public License |
|
16 along with this program. If not, see <http://www.gnu.org/licenses/>. |
|
17 */ |
|
18 |
|
19 #include "bridge.h" |
|
20 |
|
21 Bridge::Bridge(const QString &service, const QString &path, const QDBusConnection &connection, QObject *parent) |
|
22 : DBusBridgeFrontend(service, path, connection, parent) |
|
23 { |
|
24 qDebug() << "Bridge initialisation"; |
|
25 } |
|
26 |
|
27 Bridge* Bridge::_bridge_instance = 0; |
|
28 |
|
29 Bridge* Bridge::getBridge() |
|
30 { |
|
31 if (_bridge_instance == 0) { |
|
32 qDBusRegisterMetaType<StringDict>(); |
|
33 qDBusRegisterMetaType<MenuT>(); |
|
34 qDBusRegisterMetaType< QList<MenuT> >(); |
|
35 qDBusRegisterMetaType<ContactT>(); |
|
36 qDBusRegisterMetaType< QList<ContactT> >(); |
|
37 |
|
38 _bridge_instance = new Bridge("org.goffi.SAT", "/org/goffi/SAT/bridge", QDBusConnection::sessionBus()); |
|
39 } |
|
40 |
|
41 return _bridge_instance; |
|
42 } |