Exemplo n.º 1
0
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));
    }
}
Exemplo n.º 2
0
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));
    }
}
Exemplo n.º 3
0
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);
    }
Exemplo n.º 4
0
static void registerCoreServices() {
    ServiceRegistry* sr = AppContext::getServiceRegistry();
    TaskScheduler* ts = AppContext::getTaskScheduler();
    ts->registerTopLevelTask(sr->registerServiceTask(new PluginViewerImpl()));
    ts->registerTopLevelTask(sr->registerServiceTask(new ProjectViewImpl()));
}