| 1 | // Copyright (C) 2025 The Qt Company Ltd. |
| 2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only |
| 3 | |
| 4 | #ifndef QGRPCOPERATIONCONTEXT_P_H |
| 5 | #define QGRPCOPERATIONCONTEXT_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 for the convenience |
| 12 | // of other Qt classes. 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/qabstractgrpcchannel.h> |
| 19 | #include <QtGrpc/qgrpccalloptions.h> |
| 20 | #include <QtGrpc/qgrpcoperationcontext.h> |
| 21 | |
| 22 | #include <QtCore/private/qobject_p.h> |
| 23 | #include <QtCore/qhash.h> |
| 24 | #include <QtCore/qmetatype.h> |
| 25 | #include <QtCore/qtconfigmacros.h> |
| 26 | |
| 27 | QT_BEGIN_NAMESPACE |
| 28 | |
| 29 | class QGrpcOperationContextPrivate : public QObjectPrivate |
| 30 | { |
| 31 | Q_DECLARE_PUBLIC(QGrpcOperationContext) |
| 32 | public: |
| 33 | QGrpcOperationContextPrivate(QLatin1StringView method_, QLatin1StringView service_, |
| 34 | QByteArrayView argument_, QGrpcCallOptions options_, |
| 35 | std::shared_ptr<QAbstractProtobufSerializer> &&serializer_) |
| 36 | : method(method_), service(service_), argument(argument_.toByteArray()), |
| 37 | options(std::move(options_)), serializer(std::move(serializer_)) |
| 38 | { |
| 39 | } |
| 40 | |
| 41 | QLatin1StringView method; |
| 42 | QLatin1StringView service; |
| 43 | QByteArray argument; |
| 44 | QGrpcCallOptions options; |
| 45 | std::shared_ptr<QAbstractProtobufSerializer> serializer; |
| 46 | QMetaType responseMetaType; |
| 47 | QMultiHash<QByteArray, QByteArray> serverInitialMetadata; |
| 48 | #if QT_DEPRECATED_SINCE(6, 13) |
| 49 | QHash<QByteArray, QByteArray> deprServerInitialMetadata; |
| 50 | #endif |
| 51 | QMultiHash<QByteArray, QByteArray> serverTrailingMetadata; |
| 52 | }; |
| 53 | |
| 54 | QT_END_NAMESPACE |
| 55 | |
| 56 | #endif // QGRPCOPERATIONCONTEXT_P_H |
| 57 | |