| 1 | // Copyright (C) 2024 The Qt Company Ltd. |
|---|---|
| 2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only |
| 3 | |
| 4 | #ifndef QTGRPCOPERATION_P_H |
| 5 | #define QTGRPCOPERATION_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 <QtGrpc/qgrpcoperation.h> |
| 19 | |
| 20 | #include <QtCore/private/qobject_p.h> |
| 21 | #include <QtCore/qatomic.h> |
| 22 | |
| 23 | QT_BEGIN_NAMESPACE |
| 24 | |
| 25 | class QGrpcOperationPrivate : public QObjectPrivate |
| 26 | { |
| 27 | Q_DECLARE_PUBLIC(QGrpcOperation) |
| 28 | public: |
| 29 | explicit QGrpcOperationPrivate(std::shared_ptr<QGrpcOperationContext> &&operationContext_) |
| 30 | : operationContext(std::move(operationContext_)) |
| 31 | { |
| 32 | } |
| 33 | ~QGrpcOperationPrivate() override; |
| 34 | |
| 35 | QByteArray data; |
| 36 | std::shared_ptr<QGrpcOperationContext> operationContext; |
| 37 | QAtomicInteger<bool> isFinished{ false }; |
| 38 | |
| 39 | static const QGrpcOperationPrivate *get(const QGrpcOperation *op) { return op->d_func(); } |
| 40 | }; |
| 41 | |
| 42 | QT_END_NAMESPACE |
| 43 | |
| 44 | #endif // QTGRPCOPERATION_P_H |
| 45 |
