32 #include "qabstractgrpcchannel.h"
33 #include "qabstractgrpcclient.h"
34 #include "qgrpcasyncoperationbase_p.h"
36 #include "qtgrpcglobal.h"
38 namespace QtProtobuf {
58 template <
typename Func1,
typename Func2>
59 inline void subscribe(QObject *receiver, Func1 finishCallback, Func2 errorCallback,
60 Qt::ConnectionType type = Qt::AutoConnection)
62 QObject::connect(
this, &QGrpcAsyncReply::finished, receiver, finishCallback, type);
63 QObject::connect(
this, &QGrpcAsyncReply::error, receiver, errorCallback, type);
70 template <
typename Func1>
71 inline void subscribe(QObject *receiver, Func1 finishCallback,
72 Qt::ConnectionType type = Qt::AutoConnection)
74 QObject::connect(
this, &QGrpcAsyncReply::finished, receiver, finishCallback, type);
82 ~QGrpcAsyncReply() =
default;
87 Q_DISABLE_COPY_MOVE(QGrpcAsyncReply)
89 friend class QAbstractGrpcClient;
The QAbstractGrpcClient class is bridge between gRPC clients and channels.
Definition: qabstractgrpcclient.h:67
The QGrpcAsyncReply class contains data for asynchronous call of gRPC client API.
Definition: qgrpcasyncreply.h:47
void subscribe(QObject *receiver, Func1 finishCallback, Func2 errorCallback, Qt::ConnectionType type=Qt::AutoConnection)
Subscribe to QGrpcAsyncReply signals.
Definition: qgrpcasyncreply.h:59
void subscribe(QObject *receiver, Func1 finishCallback, Qt::ConnectionType type=Qt::AutoConnection)
Overloaded QGrpcAsyncReply::subscribe method, to subscribe to finished signal only.
Definition: qgrpcasyncreply.h:71