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_PENDING_CALL_H
22
#define ONLINE_ACCOUNTS_PENDING_CALL_H
24
#include <QExplicitlySharedDataPointer>
29
namespace OnlineAccounts {
31
class AuthenticationReplyPrivate;
34
class PendingCallPrivate;
35
class ONLINE_ACCOUNTS_EXPORT PendingCall
38
PendingCall(const PendingCall &other);
40
PendingCall &operator=(const PendingCall &other);
42
bool isFinished() const;
43
void waitForFinished();
46
friend class PendingCallPrivate;
47
friend class PendingCallWatcher;
48
friend class AuthenticationReplyPrivate;
49
friend class RequestAccessReplyPrivate;
50
friend class ManagerPrivate;
51
QExplicitlySharedDataPointer<PendingCallPrivate> d;
54
PendingCall(PendingCallPrivate *priv);
57
class PendingCallWatcherPrivate;
58
class ONLINE_ACCOUNTS_EXPORT PendingCallWatcher:
59
public QObject, public PendingCall
64
PendingCallWatcher(const PendingCall &call, QObject *parent = 0);
65
~PendingCallWatcher();
71
Q_DECLARE_PRIVATE(PendingCallWatcher)
72
PendingCallWatcherPrivate *d_ptr;
77
#endif // ONLINE_ACCOUNTS_PENDING_CALL_H