Commit 191346f0 authored by Sergey Chupligin's avatar Sergey Chupligin Committed by akozhevnikov

[ssu] Provide list repos over dbus

parent 64028867
......@@ -93,6 +93,11 @@
<arg direction="in" type="s" name="repo" />
<arg direction="in" type="s" name="url" />
<method name="listRepos">
<annotation name="org.qtproject.QtDBus.QtTypeName.Out0" value="QVariantList"/>
<arg direction="in" type="b" name="rnd" />
<arg direction="out" type="a(v)" name="repos"/>
<method name="updateRepos">
......@@ -231,3 +231,16 @@ void Ssud::updateRepos()
QVariantList Ssud::listRepos(bool rnd)
QVariantList reposList;
SsuRepoManager repoManager;
for (const QString &repo : repoManager.repos(rnd)) {
const QString repoUrl = ssu.repoUrl(repo, rnd);
reposList << QVariantMap({{ "url", repoUrl }, { "name", repo }});
return reposList;
......@@ -45,6 +45,7 @@ public slots:
void modifyRepo(int action, const QString &repo);
void addRepo(const QString &repo, const QString &url);
void updateRepos();
QVariantList listRepos(bool rnd);
bool error();
QString lastError();
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment