20 #include "dbusunitysessionservice.h"
21 #include "orientationlock.h"
23 #include <QAbstractItemModel>
24 #include <QDBusConnection>
25 #include <QtQml/qqml.h>
27 static QObject *dbusunitysessionservice_provider(QQmlEngine *, QJSEngine *)
29 new DBusGnomeSessionManagerWrapper();
30 new DBusGnomeScreensaverWrapper();
31 new DBusScreensaverWrapper();
35 static QObject *orientationlock_provider(QQmlEngine *, QJSEngine *)
40 void SessionPlugin::registerTypes(
const char *uri)
42 qmlRegisterType<QAbstractItemModel>();
44 Q_ASSERT(uri == QLatin1String(
"Unity.Session"));
45 qmlRegisterSingletonType<DBusUnitySessionService>(uri, 0, 1,
"DBusUnitySessionService", dbusunitysessionservice_provider);
46 qmlRegisterSingletonType<OrientationLock>(uri, 0, 1,
"OrientationLock", orientationlock_provider);
The OrientationLock class exports orientation lock related properties to QML It has two properties: ...