32 #include "qabstractgrpcchannel.h"
33 #include "qabstractgrpcclient.h"
34 #include "qgrpcasyncoperationbase_p.h"
36 #include "qtgrpcglobal.h"
38 namespace QtProtobuf {
40 class QAbstractGrpcClient;
65 QByteArray
arg()
const {
77 for (
auto handler : m_handlers) {
91 QGrpcSubscription(
const std::shared_ptr<QAbstractGrpcChannel> &channel,
const QString &method,
97 void addHandler(
const SubscriptionHandler &handler);
100 return other.
method() == this->method() &&
101 other.
arg() == this->arg();
108 std::vector<SubscriptionHandler> m_handlers;
The QAbstractGrpcClient class is bridge between gRPC clients and channels.
Definition: qabstractgrpcclient.h:67
The QGrpcSubscription class.
Definition: qgrpcsubscription.h:47
QString method() const
Returns method for this subscription.
Definition: qgrpcsubscription.h:58
void updated()
The signal is emitted when subscription received updated value from server.
QByteArray arg() const
Returns serialized arguments for this subscription.
Definition: qgrpcsubscription.h:65
void handler(const QByteArray &data)
Invokes handler method assigned to this subscription.
Definition: qgrpcsubscription.h:75