comparison vamp-client/CapnpRRClient.h @ 132:d04958b5d3ad

Use ListRequest object in api
author Chris Cannam <c.cannam@qmul.ac.uk>
date Thu, 03 Nov 2016 15:36:48 +0000
parents 183fe1f03980
children 3dcf0394971d
comparison
equal deleted inserted replaced
131:183fe1f03980 132:d04958b5d3ad
97 //!!! sort out the api here 97 //!!! sort out the api here
98 98
99 // Loader methods: 99 // Loader methods:
100 100
101 ListResponse 101 ListResponse
102 listPluginData(std::vector<std::string> from) override { 102 listPluginData(const ListRequest &req) override {
103 103
104 if (!m_transport->isOK()) { 104 if (!m_transport->isOK()) {
105 throw std::runtime_error("Piper server crashed or failed to start"); 105 throw std::runtime_error("Piper server crashed or failed to start");
106 } 106 }
107 107
108 capnp::MallocMessageBuilder message; 108 capnp::MallocMessageBuilder message;
109 piper::RpcRequest::Builder builder = message.initRoot<piper::RpcRequest>(); 109 piper::RpcRequest::Builder builder = message.initRoot<piper::RpcRequest>();
110 ListRequest req;
111 req.from = from;
112 VampnProto::buildRpcRequest_List(builder, req); 110 VampnProto::buildRpcRequest_List(builder, req);
113 ReqId id = getId(); 111 ReqId id = getId();
114 builder.getId().setNumber(id); 112 builder.getId().setNumber(id);
115 113
116 auto karr = call(message, true); 114 auto karr = call(message, true);