1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
|
/* This file is autogenerated. DO NOT CHANGE. All changes will be lost */
#include "qtgrpc/tests/testservice_client.grpc.qpb.h"
namespace qtgrpc::tests {
namespace TestService {
using namespace Qt::StringLiterals;
Client::Client(QObject *parent)
: QAbstractGrpcClient("qtgrpc.tests.TestService"_L1, parent)
{
}
std::shared_ptr<QGrpcCallReply> Client::testMethod(const qtgrpc::tests::SimpleStringMessage &arg, const QGrpcCallOptions &options)
{
return call("testMethod"_L1, arg, options);
}
void Client::testMethod(const qtgrpc::tests::SimpleStringMessage &arg, const QObject *context, const std::function<void(std::shared_ptr<QGrpcCallReply>)> &callback, const QGrpcCallOptions &options)
{
std::shared_ptr<QGrpcCallReply> reply = call("testMethod"_L1, arg, options);
QObject::connect(reply.get(), &QGrpcCallReply::finished, context, [reply, callback]() {
callback(reply);
}, Qt::SingleShotConnection);
}
std::shared_ptr<QGrpcServerStream> Client::streamTestMethodServerStream(const qtgrpc::tests::SimpleStringMessage &arg, const QGrpcCallOptions &options)
{
return startStream<QGrpcServerStream>("testMethodServerStream"_L1, arg, options);
}
std::shared_ptr<QGrpcClientStream> Client::streamTestMethodClientStream(const qtgrpc::tests::SimpleStringMessage &arg, const QGrpcCallOptions &options)
{
return startStream<QGrpcClientStream>("testMethodClientStream"_L1, arg, options);
}
std::shared_ptr<QGrpcBidirStream> Client::streamTestMethodBiStream(const qtgrpc::tests::SimpleStringMessage &arg, const QGrpcCallOptions &options)
{
return startStream<QGrpcBidirStream>("testMethodBiStream"_L1, arg, options);
}
} // namespace TestService
} // namespace qtgrpc::tests
|