QGrpcCallReply Class
The QGrpcCallReply class contains data for asynchronous call of gRPC client API. More...
Header: | #include <QGrpcCallReply> |
CMake: | find_package(Qt6 REQUIRED COMPONENTS Grpc) target_link_libraries(mytarget PRIVATE Qt6::Grpc) |
Since: | Qt 6.5 |
Inherits: | QGrpcOperation |
Public Functions
void | subscribe(QObject *receiver, Func1 &&finishCallback, Func2 &&errorCallback, Qt::ConnectionType type = Qt::AutoConnection) |
void | subscribe(QObject *receiver, Func1 &&finishCallback, Qt::ConnectionType type = Qt::AutoConnection) |
Reimplemented Public Functions
virtual void | abort() override |
Detailed Description
The QGrpcCallReply object is owned by the client object that created it. QGrpcCallReply can be used by QAbstractGrpcChannel implementations to control call workflow and abort calls if possible in the event of QGrpcCallReply::abort being called by a library user.
Member Function Documentation
[override virtual]
void QGrpcCallReply::abort()
Aborts this reply and try to abort call in channel.
template <typename Func1, typename Func2> void QGrpcCallReply::subscribe(QObject *receiver, Func1 &&finishCallback, Func2 &&errorCallback, Qt::ConnectionType type = Qt::AutoConnection)
Convenience function to connect the finishCallback and errorCallback of receiver to the QGrpcCallReply::finished and the QGrpcCallReply::errorOccurred signals with the given connection type.
Calling this function is equivalent to the following:
QObject::connect(this, &QGrpcCallReply::finished, receiver, std::forward<Func1>(finishCallback), type); QObject::connect(this, &QGrpcCallReply::errorOccurred, receiver, std::forward<Func2>(errorCallback), type);
template <typename Func1> void QGrpcCallReply::subscribe(QObject *receiver, Func1 &&finishCallback, Qt::ConnectionType type = Qt::AutoConnection)
Convenience function to connect the finishCallback of receiver to the QGrpcCallReply::finished signal with given connection type.
Calling this function is equivalent to the following:
QObject::connect(this, &QGrpcCallReply::finished, receiver, std::forward<Func1>(finishCallback), type);
© 2023 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.