void RpcServer::addService(const std::string& praefix, const ServiceRegistry& service) { std::vector<std::string> procs = service.getProcedureNames(); for (std::vector<std::string>::const_iterator it = procs.begin(); it != procs.end(); ++it) { registerProcedure(praefix + *it, service.getProcedure(*it)); } }
void RpcServer::addService(const std::string& domain, const ServiceRegistry& service) { std::vector<std::string> procs = service.getProcedureNames(); for (std::vector<std::string>::const_iterator it = procs.begin(); it != procs.end(); ++it) { registerProcedure(domain.empty() ? *it : (domain + '\0' + *it), service.getProcedure(*it)); } }
void PluginViewerController::buildItems() { const QList<Plugin*>& plugins = AppContext::getPluginSupport()->getPlugins(); foreach(Plugin* p, plugins) { QTreeWidget* treeWidget = ui.treeWidget; PlugViewPluginItem* pluginItem = new PlugViewPluginItem(NULL, p, showServices); if (showServices) { const QList<Service*>& services = p->getServices(); //this method is called for default state init also -> look for registered plugin services ServiceRegistry* sr = AppContext::getServiceRegistry(); QList<Service*> registered = sr->getServices(); foreach(Service* s, services) { if (registered.contains(s)) { PlugViewTreeItem* serviceItem = new PlugViewServiceItem(pluginItem, s); pluginItem->addChild(serviceItem); } } } treeWidget->addTopLevelItem(pluginItem); pluginItem->setExpanded(true); }
static void registerCoreServices() { ServiceRegistry* sr = AppContext::getServiceRegistry(); TaskScheduler* ts = AppContext::getTaskScheduler(); ts->registerTopLevelTask(sr->registerServiceTask(new PluginViewerImpl())); ts->registerTopLevelTask(sr->registerServiceTask(new ProjectViewImpl())); }