QGrpcOperation Class▲
-
Header: QGrpcOperation
-
Since: Qt 6.5
-
CMake:
find_package(Qt6 REQUIRED COMPONENTS Grpc)
target_link_libraries(mytarget PRIVATE Qt6::Grpc)
-
Inherits: QObject
-
Inherited By: QGrpcBidirStream, QGrpcCallReply, QGrpcClientStream, and QGrpcServerStream
Detailed Description▲
Member Function Documentation▲
void QGrpcOperation::cancel()▲
Attempts to cancel the operation in a channel and immediately emits QGrpcOperation::errorOccurred with the QGrpcStatus::Cancelled status code.
Any manipulation of the operation after this call has no effect.
void QGrpcOperation::errorOccurred(const QGrpcStatus &status) const▲
This signal indicates the error occurred during serialization.
This signal is emitted when error with status occurs in channel or during serialization.
See Also▲
See also QAbstractGrpcClient::errorOccurred
void QGrpcOperation::finished()▲
This signal indicates the end of communication for this call.
If this signal is emitted by the stream then this stream is successfully closed either by client or server.
bool QGrpcOperation::isFinished() const▲
Returns true when QGrpcOperation finished its workflow, meaning it was finished, canceled, or error occurred, otherwise returns false.
QGrpcMetadata QGrpcOperation::metadata() const▲
Getter of the metadata received from the channel. For the HTTP2 channels it usually contains the HTTP headers received from the server.
QLatin1StringView QGrpcOperation::method() const▲
Getter of the method that this operation was intialized with.
T QGrpcOperation::read() const▲
Reads message from raw byte array stored in QGrpcOperation.
Returns a deserialized message or, on failure, a default-constructed message. If deserialization is not successful the QGrpcOperation::errorOccurred signal is emitted.