on 578bc33 help sign in
41 lines 1.4 kB history raw
1/* -*- mode: c++; indent-tabs-mode: nil; tab-width: 4 -*- */
2/*
3 * Copyright (C) 2014 Canonical, Ltd.
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; version 3.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program. If not, see <http://www.gnu.org/licenses/>.
16 *
17 * Authors: Ying-Chun Liu (PaulLiu) <paul.liu@canonical.com>
18 */
20#include "plugin.h"
21#include "dbusunitysessionservice.h"
23#include <QAbstractItemModel>
24#include <QDBusConnection>
25#include <QtQml/qqml.h>
27static QObject *dbusunitysessionservice_provider(QQmlEngine *engine, QJSEngine *scriptEngine)
29 Q_UNUSED(engine)
30 Q_UNUSED(scriptEngine)
32 return new DBusUnitySessionService();
35void SessionPlugin::registerTypes(const char *uri)
37 qmlRegisterType<QAbstractItemModel>();
39 Q_ASSERT(uri == QLatin1String("Unity.Session"));
40 qmlRegisterSingletonType<DBusUnitySessionService>(uri, 0, 1, "DBusUnitySessionService", dbusunitysessionservice_provider);