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 | |
23 | QT_BEGIN_NAMESPACE |
24 | |
25 | class QRemoteObjectPendingCallWatcherHelper; |
26 | class QRemoteObjectReplicaImplementation; |
27 | |
28 | class QRemoteObjectPendingCallData : public QSharedData |
29 | { |
30 | public: |
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 | |
47 | class QRemoteObjectPendingCallWatcherHelper: public QObject |
48 | { |
49 | Q_OBJECT |
50 | public: |
51 | void add(QRemoteObjectPendingCallWatcher *watcher); |
52 | |
53 | void emitSignals(); |
54 | |
55 | Q_SIGNALS: |
56 | void finished(); |
57 | }; |
58 | |
59 | QT_END_NAMESPACE |
60 | |
61 | #endif |
62 |