Add a 'list' option for the CLI

This commit addresses Issue #448 by adding a command line option that allows the listing of all the Apps reported by the remote host as a CSV.
This commit is contained in:
Anselm Busse
2021-03-10 17:43:30 +01:00
committed by Cameron Gutman
parent aca82f400a
commit de88176995
8 changed files with 361 additions and 0 deletions

View File

@@ -28,6 +28,7 @@
#include <openssl/ssl.h>
#endif
#include "cli/listapps.h"
#include "cli/quitstream.h"
#include "cli/startstream.h"
#include "cli/pair.h"
@@ -620,6 +621,15 @@ int main(int argc, char *argv[])
engine.rootContext()->setContextProperty("launcher", launcher);
break;
}
case GlobalCommandLineParser::ListRequested:
{
initialView = "qrc:/gui/CliListAppsSegue.qml";
ListCommandLineParser listParser;
listParser.parse(app.arguments());
auto launcher = new CliListApps::Launcher(listParser.getHost(), &app);
engine.rootContext()->setContextProperty("launcher", launcher);
break;
}
}
engine.rootContext()->setContextProperty("initialView", initialView);