on 2b5d9df help sign in
unity8/plugins/SessionManager/SessionManager.h
60 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
33 Q_PROPERTY(bool active
34 READ active
35 NOTIFY activeChanged
36 FINAL)
38public:
39 explicit SessionManager(QObject *parent = 0);
41 bool active() const;
43public Q_SLOTS:
44 void lock();
46Q_SIGNALS:
47 void activeChanged();
49private Q_SLOTS:
50 void getSessionSlot(QDBusPendingCallWatcher *watcher);
51 void propertiesChanged(const QString &interface, const QVariantMap &changed, const QStringList &invalid);
53private:
54 QDBusInterface *l1_manager;
55 QDBusInterface *l1_session;
56 QDBusInterface *ldm_session;
57 bool is_active;
58};
60#endif