on 00a39ec help sign in
unity8/plugins/SessionManager/SessionManager.h
58 lines 1.6 kB history raw
1/*
2 * Copyright (C) 2012,2013 Canonical, Ltd.
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; version 3.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 *
16 * Authors: Gerry Boland <gerry.boland@canonical.com>
17 * Michael Terry <michael.terry@canonical.com>
18 */
20#ifndef UNITY_SESSIONMANAGER_H
21#define UNITY_SESSIONMANAGER_H
23#include <QtCore/QObject>
24#include <QtCore/QString>
25#include <QtCore/QStringList>
26#include <QtCore/QVariantMap>
27#include <QtDBus/QDBusInterface>
28#include <QtDBus/QDBusPendingCallWatcher>
30class SessionManager: public QObject
32 Q_OBJECT
34 Q_PROPERTY(bool active READ active NOTIFY activeChanged FINAL)
36public:
37 explicit SessionManager(QObject *parent = 0);
39 bool active() const;
41public Q_SLOTS:
42 void lock();
44Q_SIGNALS:
45 void activeChanged();
47private Q_SLOTS:
48 void getSessionSlot(QDBusPendingCallWatcher *watcher);
49 void propertiesChanged(const QString &interface, const QVariantMap &changed, const QStringList &invalid);
51private:
52 QDBusInterface *l1_manager;
53 QDBusInterface *l1_session;
54 QDBusInterface *ldm_session;
55 bool is_active;
56};
58#endif