comparison capnproto/VampnProto.h @ 25:5b9690d18241

Pull up type determination into VampJson
author Chris Cannam <c.cannam@qmul.ac.uk>
date Tue, 24 May 2016 10:43:34 +0100
parents 533ca5ca3404
children 13393bdfc7ef
comparison
equal deleted inserted replaced
24:533ca5ca3404 25:5b9690d18241
651 buildVampRequest_List(VampRequest::Builder &b) { 651 buildVampRequest_List(VampRequest::Builder &b) {
652 b.getRequest().setList(); 652 b.getRequest().setList();
653 } 653 }
654 654
655 static void 655 static void
656 readVampRequest_List(const VampRequest::Reader &r) {
657 if (r.getRequest().which() != VampRequest::Request::Which::LIST) {
658 throw std::runtime_error("not a list request");
659 }
660 }
661
662 static void
656 buildVampResponse_List(VampResponse::Builder &b, 663 buildVampResponse_List(VampResponse::Builder &b,
657 std::string errorText, 664 std::string errorText,
658 const std::vector<Vamp::HostExt::PluginStaticData> &d) { 665 const std::vector<Vamp::HostExt::PluginStaticData> &d) {
659 b.setSuccess(errorText == ""); 666 b.setSuccess(errorText == "");
660 b.setErrorText(errorText); 667 b.setErrorText(errorText);