Pool Video Switch v2
Software video switch for distributed remote display in a lecture environment
main.cpp
Go to the documentation of this file.
1 #include "serverapp/serverapp.h"
2 
3 #include <QDebug>
4 
5 void usage()
6 {
7  puts(
8  "USAGE pvsmgr [OPTIONS]\n"
9  "OPTIONS: \n"
10  "--manager-only\n"
11  " pvsmgr terminates if this computer is not a manager of a room\n"
12  "--config=INIFILE\n"
13  " read configuration from INIFILE instead of default path (/opt/openslx/pvs2/pvs2.ini) \n"
14  "--usage\n"
15  " shows this message\n"
16  );
17 }
18 
19 
20 int main(int argc, char** argv)
21 {
22  ServerApp app(argc, argv);
23  if (app.shouldExit())
24  return 0;
25 
26  for (QString a : app.arguments()) {
27  if (a == "--usage" || a == "--help") {
28  usage();
29  exit(0);
30  } else if (a.endsWith("pvsmgr")) {
31  /* ignore */
32  } else {
33  qDebug() << "ignoring unknown argument: \"" << a << "\"";
34  }
35  }
36 
37  return app.exec();
38 }
virtual QStringList arguments()
Definition: serverapp.cpp:70
void usage()
Definition: main.cpp:5
bool shouldExit() const
Definition: serverapp.h:80
int main(int argc, char **argv)
Definition: main.cpp:12