Add the following methods:
- QGrpcOperation::read(QProtobufMessage *message) const
- QGrpcClientStream::sendMessage(const QProtobufMessage *message)
- QGrpcBidirStream::sendMessage(const QProtobufMessage *message)
Methods allow serializing/deserializing protobuf message using the
interface base class. These methods use the serializeRawMessage
and deserializeRawMessage methods of QAbstractProtobufSerializer, so
in current implentation they work relatively slower than their template
counterparts.
[ChangeLog][GRPC] Added the following interfaces to gRPC operation
classes:
- QGrpcOperation::read(QProtobufMessage *message) const
- QGrpcClientStream::sendMessage(const QProtobufMessage *message)
- QGrpcBidirStream::sendMessage(const QProtobufMessage *message)
Task-number: QTBUG-120972
Change-Id: I6fb1ec20efd680cb45ccf13833cd5b712d2dd0aa
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Tatiana Borisova <tatiana.borisova@qt.io>
Add documentation and link QAbstractGrpcClient::errorOccurred and
QGrpcOperation::errorOccurred wis see also tags.
Pick-to: 6.5 6.6 6.7
Change-Id: I6b07f0d6f9113e1b60a0417f3d9bece0911bdccc
Reviewed-by: Tatiana Borisova <tatiana.borisova@qt.io>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
The API was based on the nested QEventLoop which might cause
potential issues. Since we didn't find a good way to implement this
in channels, it's better to remove the API. It can be restored in
the future releases.
[ChangeLog][GRPC][UnaryCall] The synchronous gRPC calls are not
generated anymore. All related API is removed.
Fixes: QTBUG-118097
Change-Id: Id6d1a610a24ff079ed9a4112ca69ceb61fe03d52
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Reviewed-by: Dennis Oberst <dennis.oberst@qt.io>
Introduce interceptors mechanism for every type of call.
Introduce QGrpcInterceptorContinuation, which is
a std::function wrapper for a call.
Introduce QGrpcClientInterceptor - a interface, client API
to implement interception logic by QtGRPC user.
Introduce QGrpcInterceptorManager - registry and a runner
of interception chain.
[ChangeLog][GRPC] Add gRPC client interceptors mechanism,
with QGrpcInterceptorContinuation, QGrpcClientInterceptor,
and QGrpcClientInterceptorManager classes.
[ChangeLog][GRPC] Added setter methods to QGrpcChannelOperation.
[ChangeLog][GRPC] Added addInterceptorManager() method to
the QAbstractGrpcChannel class.
[ChangeLog][GRPC] Added QGrpcOperation::isFinished() method.
[ChangeLog][GRPC] Added QGrpcOperation::waitForFinished() method.
Task-number: QTBUG-111038
Change-Id: I8d49b8f3e8aec52441bf4aada5fdef6875926de2
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Add the getter of the 'method' name to the QGrpcOperation.
The userfacing getter can be useful for debugging and other
related operations.
Task-numner: QTBUG-105494
Change-Id: Iac210e3e34d16c4aa1b3123ecb98eeab0be5a7af
Reviewed-by: Konrad Kujawa <konrad.kujawa@qt.io>
This is valid from the design point of view API separation, that
unlock further streaming API improvements.
[ChangeLog][GRPC] QGrpcOperation::abort function is replaced by
QGrpcOperation::cancel function. The logic of new function is generic
for all gRPC operations. All grpc operations(calls and streams) now
emit errorOccurred signal when cancelling.
Task-number: QTBUG-105494
Change-Id: If306dd1ae43daebf5049b5fee55ad90c7fa848c3
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Konrad Kujawa <konrad.kujawa@qt.io>
Since QGrpcOperation::read is the common entry-point for the message
deserialization it makes sense to add the deserialization error
processing to the QGrpcOperation primitive.
Change-Id: Ia8ee5e44ab63dfac5c27e505c0194d4548bac157
Reviewed-by: Konrad Kujawa <konrad.kujawa@qt.io>
Add the interface that allows reading metadata information received
from the server from the grpc streams and call replies.
TODO: This commit only add interface that should be used in channel
implementation.
Task-number: QTBUG-113663
Change-Id: I9e3d1810d1ee6a3b4e04fbd3555e093789b623ce
Reviewed-by: Tatiana Borisova <tatiana.borisova@qt.io>
Reviewed-by: Konrad Kujawa <konrad.kujawa@qt.io>
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
Make QGrpcOperation use QAbstractProtobufSerializer to perform
serialization.
Fixes: QTBUG-111406
Change-Id: I48e7ca97e043de3827d7c655ae508e221d3d4ca8
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Fix qdoc warnings with missing module header, for example QtGrpcDoc,
by removing moduleheader variable from the .qdocconf files.
Initially that was resolving issues when building documentation on macOS.
Fix the root cause of the problem by changing capitalization of the project
from QtGRPC, to QtGrpc (inspired by the QtNfc module).
Pick-to: 6.5
Change-Id: I3b9cc408235b191bbf1350a18bdd91ae45327e41
Reviewed-by: Luca Di Sera <luca.disera@qt.io>
Reviewed-by: Tatiana Borisova <tatiana.borisova@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
In the recent implementation the std::shared_ptr takes the real
ownership over the Qt GRPC channel primitives such as QGrpcOperation,
QGrpcStream, and QGrpcReply. Meanwhile these primitives had the QObject
parent-children relationships with the classes derived of the
QAbstractGrpcClient. This led to the floating double free issue when
Qt GC removed the primitives before the std::shared_ptr did.
Break the parent-child linking between the Qt GRPC channel primitives
and QAbstractGrpcClient. Cleanup the code parts that suppressed the
issue - the use of deleteLater instead of calling destructor directly.
Pick-to: 6.5
Change-Id: I9c6562335020e45ddb8e440311ec119fc90777f8
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Add the missing class to the message declaration.
Amends 0d56724387
Pick-to: 6.5
Change-Id: Ida7e60904bbe7d337a46f764321bb9580e93f04d
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
Add QtGrpc index and classes documentation pages.
Fix missing links to QtGrpc documentation.
The modules are now consistently named 'Qt GRPC', 'Qt Protobuf'.
Pick-to: 6.5
Change-Id: Iabd91336c871e43c97c49712a52f3aa82f7e75a5
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
Add missing explicit, override, default, const keywords.
Omit pointless inline.
Remove empty () in lambdas.
Include mocs for QtGrpc module.
Use trailing , in enums.
Use underlying type for enums.
Task-number: QTBUG-108833
Pick-to: 6.5
Change-Id: I34e73a7f2715f374303634f9ed0236601c094a84
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Reflow QtGrpc documentation and messages.
Fix style and grammar issues in the QtGrpc.
Address minor code review suggestions from 'Introduce QtGrpc' patch.
Task-number: QTBUG-108833
Pick-to: 6.5
Change-Id: I74b9725e82e23d0ad6ae9be19b6c5542e63fc487
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
QGrpcOperation name is more matching the implementation,
because is no longer thread safe and does not implement any of
async methods.
Task-number: QTBUG-108833
Pick-to: 6.5
Change-Id: I926dc651b2c3daa58429bcb358a827bd398cee46
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>