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

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