2
* This file is part of libOnlineAccounts
4
* Copyright (C) 2015 Canonical Ltd.
6
* Contact: Alberto Mardegan <alberto.mardegan@canonical.com>
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.
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.
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/>.
21
#ifndef ONLINE_ACCOUNTS_DBUS_INTERFACE_H
22
#define ONLINE_ACCOUNTS_DBUS_INTERFACE_H
24
#include <QDBusAbstractInterface>
25
#include <QDBusPendingCall>
26
#include <QDBusPendingReply>
29
#include "account_info.h"
31
namespace OnlineAccounts {
33
/* Avoid using QDBusInterface which does a blocking introspection call.
35
class DBusInterface: public QDBusAbstractInterface
40
DBusInterface(const QString &service,
42
const char *interface,
43
const QDBusConnection &connection,
45
virtual ~DBusInterface();
47
QDBusPendingCall getAccounts(const QVariantMap &filters);
49
QDBusPendingCall authenticate(AccountId accountId, const QString &service,
50
bool interactive, bool invalidate,
51
const QVariantMap ¶meters);
53
QDBusPendingCall requestAccess(const QString &service,
54
const QVariantMap ¶meters);
57
void accountChanged(const QString &service,
58
const OnlineAccounts::AccountInfo &info);
61
void onAccountChanged(const QString &service,
62
const OnlineAccounts::AccountInfo &info);
65
bool connect(const char *signal, const char *signature,
66
QObject *receiver, const char *slot);
71
#endif // ONLINE_ACCOUNTS_DBUS_INTERFACE_H