The QGrpcClientBase class serves as base for generated client interfaces. More...
| Header: | #include <QGrpcClientBase> |
| CMake: | find_package(Qt6 REQUIRED COMPONENTS Grpc)target_link_libraries(mytarget PRIVATE Qt6::Grpc) |
| Since: | Qt 6.5 |
| Inherits: | QObject |
| virtual | ~QGrpcClientBase() override |
| bool | attachChannel(std::shared_ptr<QAbstractGrpcChannel> channel) |
(since 6.7) std::shared_ptr<QAbstractGrpcChannel> |
channel() const |
(since 6.7) void |
channelChanged() |
The QGrpcClientBase class provides a common set of functionalities for the generated client interface of the gRPC™ service definition.
The RPC methods of this class should not be called directly.
Note: Thread safety is enforced for the non-const member functions. These functions must be called from the same thread in which the object was created.
[override virtual noexcept] QGrpcClientBase::~QGrpcClientBase()Destroys the QGrpcClientBase.
Attaches channel to the client as transport layer for gRPC operations. Returns true if the channel successfully attached; otherwise, returns
false.
Request and response messages will be serialized in a format that the channel supports.
Note: Warning: Qt GRPC doesn't guarantee thread safety on the channel level. You have to invoke the channel-related functions on the same thread as QGrpcClientBase.
Note: Setter function for property channel.
[since 6.7] std::shared_ptr<QAbstractGrpcChannel> QGrpcClientBase::channel() constReturns the channel attached to this client.
Note: Getter function for property channel.
This function was introduced in Qt 6.7.
[signal, since 6.7] void QGrpcClientBase::channelChanged()Indicates that a new channel is attached to the client.
Note: Notifier signal for property channel.
This function was introduced in Qt 6.7.
As part of the free Business evaluation, we offer a free welcome call for companies, to talk about your requirements, and how the Felgo SDK & Services can help you. Just sign up and schedule your call.
Sign up now to start your free Business evaluation: