Mercurial > hg > piper-cpp
comparison utilities/json-to-capnp.cpp @ 55:38780f15ac8d
Make RequestResponse types more consistent by adding plugin to ConfigurationResponse and introducing a FinishRequest
author | Chris Cannam <c.cannam@qmul.ac.uk> |
---|---|
date | Mon, 19 Sep 2016 13:35:56 +0100 |
parents | f4244a2d55ac |
children |
comparison
equal
deleted
inserted
replaced
54:524a6d5ee813 | 55:38780f15ac8d |
---|---|
53 VampnProto::buildConfigurationRequest | 53 VampnProto::buildConfigurationRequest |
54 (req, VampJson::toConfigurationRequest(payload, mapper), mapper); | 54 (req, VampJson::toConfigurationRequest(payload, mapper), mapper); |
55 | 55 |
56 } else if (type == "configurationresponse") { | 56 } else if (type == "configurationresponse") { |
57 auto resp = message.initRoot<ConfigurationResponse>(); | 57 auto resp = message.initRoot<ConfigurationResponse>(); |
58 PreservingPluginHandleMapper mapper; | |
58 VampnProto::buildConfigurationResponse | 59 VampnProto::buildConfigurationResponse |
59 (resp, VampJson::toConfigurationResponse(payload)); | 60 (resp, VampJson::toConfigurationResponse(payload, mapper), mapper); |
60 | 61 |
61 } else if (type == "feature") { | 62 } else if (type == "feature") { |
62 auto f = message.initRoot<Feature>(); | 63 auto f = message.initRoot<Feature>(); |
63 VampnProto::buildFeature | 64 VampnProto::buildFeature |
64 (f, VampJson::toFeature(payload, serialisation)); | 65 (f, VampJson::toFeature(payload, serialisation)); |