blob: f21bd2040c60608b6c997204ce401950d43026ed (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
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;
}
|