Debian Codegraph @

online-accounts-daemon/lib/LomiriOnlineAccountsDaemon/manager.h

raw symbols SCIP
1 /*
2 * This file is part of OnlineAccountsDaemon
3 *
4 * Copyright (C) 2015 Canonical Ltd.
5 *
6 * Contact: Alberto Mardegan <[email protected]>
7 *
8 * This program is free software: you can redistribute it and/or modify it
9 * under the terms of the GNU Lesser General Public License version 3, as
10 * published by the Free Software Foundation.
11 *
12 * This program is distributed in the hope that it will be useful, but
13 * WITHOUT ANY WARRANTY; without even the implied warranties of
14 * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR
15 * PURPOSE. See the GNU Lesser General Public License for more details.
16 *
17 * You should have received a copy of the GNU Lesser General Public License
18 * along with this program. If not, see <http://www.gnu.org/licenses/>.
19 */
20
21 #ifndef ONLINE_ACCOUNTS_DAEMON_MANAGER_H
22 #define ONLINE_ACCOUNTS_DAEMON_MANAGER_H
23
24 #include <QDBusArgument>
25 #include <QDBusContext>
26 #include <QList>
27 #include <QObject>
28 #include <QVariantMap>
29
30 #include "global.h"
31
32 namespace OnlineAccountsDaemon {
33
34 struct AccountInfo;
35 class CallContext;
36 class ManagerAdaptor;
37
38 class ManagerPrivate;
39 class OAD_EXPORT Manager: public QObject, protected QDBusContext
40 {
41 Q_OBJECT
42 Q_PROPERTY(bool isIdle READ isIdle NOTIFY isIdleChanged)
43
44 public:
45 explicit Manager(QObject *parent = 0);
46 ~Manager();
47
48 bool isIdle() const;
49
50 QList<AccountInfo> getAccounts(const QVariantMap &filters,
51 const CallContext &context,
52 QList<QVariantMap> &services);
53 void authenticate(uint accountId, const QString &serviceId,
54 bool interactive, bool invalidate,
55 const QVariantMap &parameters,
56 const CallContext &context);
57 void requestAccess(const QString &serviceId,
58 const QVariantMap &parameters,
59 const CallContext &context);
60
61 public Q_SLOTS:
62 void onDisconnected();
63
64 Q_SIGNALS:
65 void isIdleChanged();
66
67 private:
68 friend class ManagerAdaptor;
69 Q_DECLARE_PRIVATE(Manager)
70 ManagerPrivate *d_ptr;
71 };
72
73 } // namespace
74
75 #endif // ONLINE_ACCOUNTS_DAEMON_MANAGER_H