summaryrefslogtreecommitdiffstats
path: root/apps/mmi-browser.cpp
diff options
context:
space:
mode:
authorStefan Radomski <radomski@tk.informatik.tu-darmstadt.de>2012-11-07 22:20:09 (GMT)
committerStefan Radomski <radomski@tk.informatik.tu-darmstadt.de>2012-11-07 22:20:09 (GMT)
commitda08a1d3c3bca8070c9b029cfc1f8faf9e34dd25 (patch)
treeb285148ab6ca415814d9370148f91736f83c852c /apps/mmi-browser.cpp
parent0ae6c27d9322208053033d9b19c0ffffed3d99eb (diff)
downloaduscxml-da08a1d3c3bca8070c9b029cfc1f8faf9e34dd25.zip
uscxml-da08a1d3c3bca8070c9b029cfc1f8faf9e34dd25.tar.gz
uscxml-da08a1d3c3bca8070c9b029cfc1f8faf9e34dd25.tar.bz2
Committing local version again
Diffstat (limited to 'apps/mmi-browser.cpp')
-rw-r--r--apps/mmi-browser.cpp46
1 files changed, 46 insertions, 0 deletions
diff --git a/apps/mmi-browser.cpp b/apps/mmi-browser.cpp
new file mode 100644
index 0000000..f21bd20
--- /dev/null
+++ b/apps/mmi-browser.cpp
@@ -0,0 +1,46 @@
+#include "uscxml/config.h"
+#include "uscxml/Interpreter.h"
+#include <glog/logging.h>
+
+#ifdef _WIN32
+#include "XGetopt.h"
+#endif
+
+void printUsageAndExit() {
+ printf("mmi-browser version " USCXML_VERSION " (" CMAKE_BUILD_TYPE " build)\n");
+ printf("Usage\n");
+ printf("\tmmi-browser URL\n");
+ printf("\n");
+ // printf("Options\n");
+ // printf("\t-l loglevel : loglevel to use\n");
+ exit(1);
+}
+
+int main(int argc, char** argv) {
+ if (argc < 2) {
+ printUsageAndExit();
+ }
+
+ char* loglevel;
+ int option;
+ while ((option = getopt(argc, argv, "l:")) != -1) {
+ switch(option) {
+ case 'l':
+ loglevel = optarg;
+ break;
+ default:
+ printUsageAndExit();
+ break;
+ }
+ }
+
+ google::InitGoogleLogging(argv[0]);
+
+ using namespace uscxml;
+
+ Interpreter* interpreter = Interpreter::fromURI(argv[1]);
+ interpreter->interpret();
+
+
+ return EXIT_SUCCESS;
+} \ No newline at end of file