QGrpcOperation Class

The QGrpcOperation class implements common logic to handle communication in Grpc channel. More...

Header: #include <QGrpcOperation>
CMake: find_package(Qt6 REQUIRED COMPONENTS Grpc)
target_link_libraries(mytarget PRIVATE Qt6::Grpc)
Since: Qt 6.5
Inherits: QObject
Inherited By:

QGrpcCallReply and QGrpcStream

Public Functions

T read() const
void setData(const QByteArray &data)
void setData(QByteArray &&data)

Signals

void errorOccurred(const QGrpcStatus &status)
void finished()

Detailed Description

Member Function Documentation

[signal] void QGrpcOperation::errorOccurred(const QGrpcStatus &status)

This signal indicates the error occurred during serialization.

This signal is emitted when error with status occurs in channel or during serialization.

See also QAbstractGrpcClient::errorOccurred.

[signal] void QGrpcOperation::finished()

This signal indicates the end of communication for this call.

If signal emitted by stream this means that stream is successfully closed either by client or server.

template <typename T> T QGrpcOperation::read() const

Reads message from raw byte array stored in QGrpcCallReply.

Returns a copy of the deserialized message or, on failure, a default-constructed message.

void QGrpcOperation::setData(const QByteArray &data)

Interface for implementation of QAbstractGrpcChannel.

Should be used to write raw data from channel to reply data raw data received from channel.

void QGrpcOperation::setData(QByteArray &&data)

Interface for implementation of QAbstractGrpcChannel.

Should be used to write raw data from channel to reply data raw data received from channel.

© 2024 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.