| 1 | // Copyright (C) 2022 The Qt Company Ltd. |
| 2 | // Copyright (C) 2019 Alexey Edelev <semlanik@gmail.com> |
| 3 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only |
| 4 | |
| 5 | #include <QtGrpc/qgrpccallreply.h> |
| 6 | #include <QtGrpc/qgrpcoperationcontext.h> |
| 7 | |
| 8 | #include <QtCore/qeventloop.h> |
| 9 | #include <QtCore/qthread.h> |
| 10 | |
| 11 | QT_BEGIN_NAMESPACE |
| 12 | |
| 13 | using namespace Qt::StringLiterals; |
| 14 | |
| 15 | /*! |
| 16 | \class QGrpcCallReply |
| 17 | \inmodule QtGrpc |
| 18 | \brief The QGrpcCallReply class provides access in handling unary RPCs. |
| 19 | |
| 20 | The QGrpcCallReply class provides the interface for handling unary remote |
| 21 | procedure calls (RPCs), which is one of the four \gRPC \l{Service |
| 22 | Methods}{service methods}. |
| 23 | |
| 24 | For a high-level overview, refer to the \l{Unary Calls} {Qt GRPC |
| 25 | Client Guide}. |
| 26 | |
| 27 | \include qtgrpc-shared.qdocinc rpc-lifetime-note |
| 28 | */ |
| 29 | |
| 30 | /*! |
| 31 | \internal |
| 32 | |
| 33 | Constructs a new QGrpcCallReply from an \a operationContext. |
| 34 | |
| 35 | This is usually called by the generated client interface. |
| 36 | |
| 37 | \sa QGrpcClientBase::call QAbstractGrpcChannel::call |
| 38 | */ |
| 39 | QGrpcCallReply::QGrpcCallReply(std::shared_ptr<QGrpcOperationContext> operationContext) |
| 40 | : QGrpcOperation(std::move(operationContext)) |
| 41 | { |
| 42 | } |
| 43 | |
| 44 | /*! |
| 45 | Destroys the QGrpcCallReply. |
| 46 | */ |
| 47 | QGrpcCallReply::~QGrpcCallReply() = default; |
| 48 | |
| 49 | bool QGrpcCallReply::event(QEvent *event) |
| 50 | { |
| 51 | return QObject::event(event); |
| 52 | } |
| 53 | |
| 54 | QT_END_NAMESPACE |
| 55 | |
| 56 | #include "moc_qgrpccallreply.cpp" |
| 57 | |