Mercurial > hg > piper-cpp
comparison utilities/vampipe-convert.cpp @ 53:9bebe2780cc0
Update adapter etc for feature set strings
author | Chris Cannam <c.cannam@qmul.ac.uk> |
---|---|
date | Fri, 16 Sep 2016 16:28:47 +0100 |
parents | e90fd30990eb |
children | 524a6d5ee813 |
comparison
equal
deleted
inserted
replaced
52:e90fd30990eb | 53:9bebe2780cc0 |
---|---|
202 void | 202 void |
203 writeResponseJson(RequestOrResponse &rr, bool useBase64) | 203 writeResponseJson(RequestOrResponse &rr, bool useBase64) |
204 { | 204 { |
205 Json j; | 205 Json j; |
206 | 206 |
207 VampJson::BufferSerialisation serialisation = | |
208 (m_useBase64 ? | |
209 VampJson::BufferSerialisation::Base64 : | |
210 VampJson::BufferSerialisation::Text); | |
211 | |
207 if (!rr.success) { | 212 if (!rr.success) { |
208 | 213 |
209 j = VampJson::fromError(rr.errorText, rr.type); | 214 j = VampJson::fromError(rr.errorText, rr.type); |
210 | 215 |
211 } else { | 216 } else { |
221 case RRType::Configure: | 226 case RRType::Configure: |
222 j = VampJson::fromVampResponse_Configure(rr.configurationResponse); | 227 j = VampJson::fromVampResponse_Configure(rr.configurationResponse); |
223 break; | 228 break; |
224 case RRType::Process: | 229 case RRType::Process: |
225 j = VampJson::fromVampResponse_Process | 230 j = VampJson::fromVampResponse_Process |
226 (rr.processResponse, | 231 (rr.processResponse, mapper, serialisation); |
227 mapper, | |
228 useBase64 ? | |
229 VampJson::BufferSerialisation::Base64 : | |
230 VampJson::BufferSerialisation::Text); | |
231 break; | 232 break; |
232 case RRType::Finish: | 233 case RRType::Finish: |
233 j = VampJson::fromVampResponse_Finish | 234 j = VampJson::fromVampResponse_Finish |
234 (rr.finishResponse, | 235 (rr.finishResponse, mapper, serialisation); |
235 mapper, | |
236 useBase64 ? | |
237 VampJson::BufferSerialisation::Base64 : | |
238 VampJson::BufferSerialisation::Text); | |
239 break; | 236 break; |
240 case RRType::NotValid: | 237 case RRType::NotValid: |
241 break; | 238 break; |
242 } | 239 } |
243 } | 240 } |