on bb5feb3 help sign in
unity8/plugins/AccountsService/AccountsService.h
70 lines 2.0 kB history raw
1/*
2 * Copyright (C) 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: Michael Terry <michael.terry@canonical.com>
17 */
19#ifndef UNITY_ACCOUNTSSERVICE_H
20#define UNITY_ACCOUNTSSERVICE_H
22#include <QObject>
23#include <QString>
25class AccountsServiceDBusAdaptor;
27class AccountsService: public QObject
29 Q_OBJECT
30 Q_PROPERTY (QString user
31 READ getUser
32 WRITE setUser
33 NOTIFY userChanged)
34 Q_PROPERTY (bool demoEdges
35 READ getDemoEdges
36 WRITE setDemoEdges
37 NOTIFY demoEdgesChanged)
38 Q_PROPERTY (QString backgroundFile
39 READ getBackgroundFile
40 NOTIFY backgroundFileChanged)
42public:
43 explicit AccountsService(QObject *parent = 0);
45 QString getUser();
46 void setUser(const QString &user);
47 bool getDemoEdges();
48 void setDemoEdges(bool demoEdges);
49 QString getBackgroundFile();
51Q_SIGNALS:
52 void userChanged();
53 void demoEdgesChanged();
54 void backgroundFileChanged();
56private Q_SLOTS:
57 void propertiesChanged(const QString &user, const QString &interface, const QStringList &changed);
58 void maybeChanged(const QString &user);
60private:
61 void updateDemoEdges();
62 void updateBackgroundFile();
64 AccountsServiceDBusAdaptor *m_service;
65 QString m_user;
66 bool m_demoEdges;
67 QString m_backgroundFile;
68};
70#endif