comparison plugin/PiperVampPluginFactory.cpp @ 1248:58dd6a6fe414 piper

Update to use listargs variant of Piper stuff (so that the plugin winnowing feature from the penultimate commit actually works)
author Chris Cannam
date Thu, 03 Nov 2016 15:38:17 +0000
parents 8f076d02569a
children d45a16c232bd
comparison
equal deleted inserted replaced
1247:8f076d02569a 1248:58dd6a6fe414
195 errorMessage = QObject::tr("Could not start external plugin host"); 195 errorMessage = QObject::tr("Could not start external plugin host");
196 return; 196 return;
197 } 197 }
198 198
199 piper_vamp::client::CapnpRRClient client(&transport); 199 piper_vamp::client::CapnpRRClient client(&transport);
200 piper_vamp::ListResponse lr; 200
201 piper_vamp::ListRequest req;
202 req.from = from;
203
204 piper_vamp::ListResponse resp;
201 205
202 try { 206 try {
203 lr = client.listPluginData(); 207 resp = client.listPluginData(req);
204 } catch (piper_vamp::client::ServerCrashed) { 208 } catch (piper_vamp::client::ServerCrashed) {
205 errorMessage = QObject::tr 209 errorMessage = QObject::tr
206 ("External plugin host exited unexpectedly while listing plugins"); 210 ("External plugin host exited unexpectedly while listing plugins");
207 return; 211 return;
208 } catch (const std::exception &e) { 212 } catch (const std::exception &e) {
210 .arg(e.what()); 214 .arg(e.what());
211 return; 215 return;
212 } 216 }
213 217
214 SVDEBUG << "PiperVampPluginFactory: server \"" << executable << "\" lists " 218 SVDEBUG << "PiperVampPluginFactory: server \"" << executable << "\" lists "
215 << lr.available.size() << " plugin(s)" << endl; 219 << resp.available.size() << " plugin(s)" << endl;
216 220
217 for (const auto &pd: lr.available) { 221 for (const auto &pd: resp.available) {
218 222
219 QString identifier = 223 QString identifier =
220 QString("vamp:") + QString::fromStdString(pd.pluginKey); 224 QString("vamp:") + QString::fromStdString(pd.pluginKey);
221 225
222 if (m_origins.find(identifier) != m_origins.end()) { 226 if (m_origins.find(identifier) != m_origins.end()) {