From fa7744f11f110ed4ed24a6270cc963abfa99a2b0 Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Tue, 19 Jan 2016 16:25:04 +0100 Subject: Add support for locations query --- src/main.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src/main.cpp') diff --git a/src/main.cpp b/src/main.cpp index 83c93de..4d0053e 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -34,6 +34,7 @@ int main(int argc, char *argv[]) { " -b --base base directory where VM images are accessible\n" " -d, --default name of default session\n" " -c, --config alternative config file\n" + " -l, --location location id(s), space separated\n" " -P, --pool one or more pool names to display (comma separated)\n" " -f, --file direct boot .desktop file\n" " -x, --xpath path of X Session .desktop files\n" @@ -204,6 +205,11 @@ int main(int argc, char *argv[]) { defaultTab = cmdOptions.value("tab").toInt(); } + QString locationIds; + if (cmdOptions.contains("locations")) { + locationIds = cmdOptions.value("locations"); + } + /* read session files */ QList xsessions(XSession::readSessions(xSessionPath)); @@ -215,7 +221,7 @@ int main(int argc, char *argv[]) { SLOT(addSessionsAfterDownload(QNetworkReply*))); // read xml and add items later - httpxmldownloader.makeRequest(urlBase + "list.php"); + httpxmldownloader.makeRequest(urlBase + "list.php", locationIds); /* DOWNLOAD NEWS */ HttpXmlDownloader news_downloader; -- cgit v1.2.3-55-g7522