Mercurial > hg > piper-vamp-js
comparison VamPipePluginLibrary.cpp @ 93:13245b6ae809
Update adapter code to new configuration+finish structures
author | Chris Cannam <c.cannam@qmul.ac.uk> |
---|---|
date | Mon, 19 Sep 2016 13:42:06 +0100 |
parents | 3b7b709db48e |
children | 4a5de1bb2c6a |
comparison
equal
deleted
inserted
replaced
92:3b7b709db48e | 93:13245b6ae809 |
---|---|
98 break; | 98 break; |
99 case RRType::Process: | 99 case RRType::Process: |
100 rr.processRequest = VampJson::toVampRequest_Process(j, m_mapper, serialisation); | 100 rr.processRequest = VampJson::toVampRequest_Process(j, m_mapper, serialisation); |
101 break; | 101 break; |
102 case RRType::Finish: | 102 case RRType::Finish: |
103 rr.finishPlugin = VampJson::toVampRequest_Finish(j, m_mapper); | 103 rr.finishRequest = VampJson::toVampRequest_Finish(j, m_mapper); |
104 break; | 104 break; |
105 case RRType::NotValid: | 105 case RRType::NotValid: |
106 break; | 106 break; |
107 } | 107 } |
108 | 108 |
136 break; | 136 break; |
137 case RRType::Load: | 137 case RRType::Load: |
138 j = VampJson::fromVampResponse_Load(rr.loadResponse, m_mapper); | 138 j = VampJson::fromVampResponse_Load(rr.loadResponse, m_mapper); |
139 break; | 139 break; |
140 case RRType::Configure: | 140 case RRType::Configure: |
141 j = VampJson::fromVampResponse_Configure(rr.configurationResponse); | 141 j = VampJson::fromVampResponse_Configure(rr.configurationResponse, |
142 m_mapper); | |
142 break; | 143 break; |
143 case RRType::Process: | 144 case RRType::Process: |
144 j = VampJson::fromVampResponse_Process | 145 j = VampJson::fromVampResponse_Process |
145 (rr.processResponse, m_mapper, serialisation); | 146 (rr.processResponse, m_mapper, serialisation); |
146 break; | 147 break; |
312 break; | 313 break; |
313 } | 314 } |
314 | 315 |
315 case RRType::Finish: | 316 case RRType::Finish: |
316 { | 317 { |
317 response.finishResponse.plugin = request.finishPlugin; | 318 response.finishResponse.plugin = request.finishRequest.plugin; |
318 response.finishResponse.features = | 319 response.finishResponse.features = |
319 request.finishPlugin->getRemainingFeatures(); | 320 request.finishRequest.plugin->getRemainingFeatures(); |
320 | 321 |
321 // We do not delete the plugin here -- we need it in the | 322 // We do not delete the plugin here -- we need it in the |
322 // mapper when converting the features. It gets deleted | 323 // mapper when converting the features. It gets deleted |
323 // below, after the writeResponse() call. | 324 // below, after the writeResponse() call. |
324 | 325 |
331 } | 332 } |
332 | 333 |
333 string rstr = writeResponse(response); | 334 string rstr = writeResponse(response); |
334 | 335 |
335 if (request.type == RRType::Finish) { | 336 if (request.type == RRType::Finish) { |
336 auto h = m_mapper.pluginToHandle(request.finishPlugin); | 337 auto h = m_mapper.pluginToHandle(request.finishRequest.plugin); |
337 m_mapper.removePlugin(h); | 338 m_mapper.removePlugin(h); |
338 delete request.finishPlugin; | 339 delete request.finishRequest.plugin; |
339 } | 340 } |
340 | 341 |
341 return rstr; | 342 return rstr; |
342 | 343 |
343 } catch (const std::exception &e) { | 344 } catch (const std::exception &e) { |