1// Copyright (C) 2017 Ford Motor Company
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3
4#ifndef QREMOTEOBJECTPENDINGCALL_P_H
5#define QREMOTEOBJECTPENDINGCALL_P_H
6
7//
8// W A R N I N G
9// -------------
10//
11// This file is not part of the Qt API. It exists purely as an
12// implementation detail. This header file may change from version to
13// version without notice, or even be removed.
14//
15// We mean it.
16//
17
18#include "qremoteobjectpendingcall.h"
19
20#include <QtCore/qmutex.h>
21#include <QtCore/private/qglobal_p.h>
22
23QT_BEGIN_NAMESPACE
24
25class QRemoteObjectPendingCallWatcherHelper;
26class QRemoteObjectReplicaImplementation;
27
28class QRemoteObjectPendingCallData : public QSharedData
29{
30public:
31 typedef QExplicitlySharedDataPointer<QRemoteObjectPendingCallData> Ptr;
32
33 explicit QRemoteObjectPendingCallData(int serialId = -1, QRemoteObjectReplicaImplementation *replica = nullptr);
34 ~QRemoteObjectPendingCallData();
35
36 QRemoteObjectReplicaImplementation *replica;
37 int serialId;
38
39 QVariant returnValue;
40 QRemoteObjectPendingCall::Error error;
41
42 mutable QMutex mutex;
43
44 mutable QScopedPointer<QRemoteObjectPendingCallWatcherHelper> watcherHelper;
45};
46
47class QRemoteObjectPendingCallWatcherHelper: public QObject
48{
49 Q_OBJECT
50public:
51 void add(QRemoteObjectPendingCallWatcher *watcher);
52
53 void emitSignals();
54
55Q_SIGNALS:
56 void finished();
57};
58
59QT_END_NAMESPACE
60
61#endif
62

source code of qtremoteobjects/src/remoteobjects/qremoteobjectpendingcall_p.h