mirror of https://github.com/qt/qtgrpc.git
QGrpcOperation: move Private into separate file
For private access. Pick-to: 6.10 6.9 6.8 Change-Id: I9d8436c9f283cfe1c2ecb6ba98481ee94d2f5b3e Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
This commit is contained in:
parent
b86f9cb5d9
commit
56999b3605
|
|
@ -4,7 +4,7 @@
|
|||
qt_internal_add_module(Grpc
|
||||
SOURCES
|
||||
qgrpcoperation.h qgrpcoperation_p.h qgrpcoperation.cpp
|
||||
qgrpcoperationcontext.h qgrpcoperationcontext.cpp
|
||||
qgrpcoperationcontext.h qgrpcoperationcontext_p.h qgrpcoperationcontext.cpp
|
||||
qgrpccallreply.h qgrpccallreply.cpp
|
||||
qgrpcstream.h qgrpcstream.cpp
|
||||
qgrpcstatus.h qgrpcstatus.cpp
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
|
||||
|
||||
#include <QtGrpc/private/qgrpccommonoptions_p.h>
|
||||
#include <QtGrpc/qgrpccalloptions.h>
|
||||
#include <QtGrpc/private/qgrpcoperationcontext_p.h>
|
||||
#include <QtGrpc/qgrpcoperationcontext.h>
|
||||
#include <QtGrpc/qgrpcstatus.h>
|
||||
|
||||
|
|
@ -142,31 +142,6 @@ QT_BEGIN_NAMESPACE
|
|||
\sa QGrpcBidiStream::writesDone
|
||||
*/
|
||||
|
||||
class QGrpcOperationContextPrivate : public QObjectPrivate
|
||||
{
|
||||
Q_DECLARE_PUBLIC(QGrpcOperationContext)
|
||||
public:
|
||||
QGrpcOperationContextPrivate(QLatin1StringView method_, QLatin1StringView service_,
|
||||
QByteArrayView argument_, QGrpcCallOptions options_,
|
||||
std::shared_ptr<QAbstractProtobufSerializer> &&serializer_)
|
||||
: method(method_), service(service_), argument(argument_.toByteArray()),
|
||||
options(std::move(options_)), serializer(std::move(serializer_))
|
||||
{
|
||||
}
|
||||
|
||||
QLatin1StringView method;
|
||||
QLatin1StringView service;
|
||||
QByteArray argument;
|
||||
QGrpcCallOptions options;
|
||||
std::shared_ptr<QAbstractProtobufSerializer> serializer;
|
||||
QMetaType responseMetaType;
|
||||
QMultiHash<QByteArray, QByteArray> serverInitialMetadata;
|
||||
#if QT_DEPRECATED_SINCE(6, 13)
|
||||
QHash<QByteArray, QByteArray> deprServerInitialMetadata;
|
||||
#endif
|
||||
QMultiHash<QByteArray, QByteArray> serverTrailingMetadata;
|
||||
};
|
||||
|
||||
/*!
|
||||
\internal
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,56 @@
|
|||
// Copyright (C) 2025 The Qt Company Ltd.
|
||||
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
|
||||
|
||||
#ifndef QGRPCOPERATIONCONTEXT_P_H
|
||||
#define QGRPCOPERATIONCONTEXT_P_H
|
||||
|
||||
//
|
||||
// W A R N I N G
|
||||
// -------------
|
||||
//
|
||||
// This file is not part of the Qt API. It exists for the convenience
|
||||
// of other Qt classes. This header file may change from version to
|
||||
// version without notice, or even be removed.
|
||||
//
|
||||
// We mean it.
|
||||
//
|
||||
|
||||
#include <QtGrpc/qabstractgrpcchannel.h>
|
||||
#include <QtGrpc/qgrpccalloptions.h>
|
||||
#include <QtGrpc/qgrpcoperationcontext.h>
|
||||
|
||||
#include <QtCore/private/qobject_p.h>
|
||||
#include <QtCore/qhash.h>
|
||||
#include <QtCore/qmetatype.h>
|
||||
#include <QtCore/qtconfigmacros.h>
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
class QGrpcOperationContextPrivate : public QObjectPrivate
|
||||
{
|
||||
Q_DECLARE_PUBLIC(QGrpcOperationContext)
|
||||
public:
|
||||
QGrpcOperationContextPrivate(QLatin1StringView method_, QLatin1StringView service_,
|
||||
QByteArrayView argument_, QGrpcCallOptions options_,
|
||||
std::shared_ptr<QAbstractProtobufSerializer> &&serializer_)
|
||||
: method(method_), service(service_), argument(argument_.toByteArray()),
|
||||
options(std::move(options_)), serializer(std::move(serializer_))
|
||||
{
|
||||
}
|
||||
|
||||
QLatin1StringView method;
|
||||
QLatin1StringView service;
|
||||
QByteArray argument;
|
||||
QGrpcCallOptions options;
|
||||
std::shared_ptr<QAbstractProtobufSerializer> serializer;
|
||||
QMetaType responseMetaType;
|
||||
QMultiHash<QByteArray, QByteArray> serverInitialMetadata;
|
||||
#if QT_DEPRECATED_SINCE(6, 13)
|
||||
QHash<QByteArray, QByteArray> deprServerInitialMetadata;
|
||||
#endif
|
||||
QMultiHash<QByteArray, QByteArray> serverTrailingMetadata;
|
||||
};
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
#endif // QGRPCOPERATIONCONTEXT_P_H
|
||||
Loading…
Reference in New Issue