From 3a755f46d9cf6e3650d40a960d0d0db8c1ad9fa1 Mon Sep 17 00:00:00 2001 From: "Javier S. Pedro" Date: Sat, 17 Sep 2011 03:03:23 +0200 Subject: preparing for library package --- libsowatch/main.cpp | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 libsowatch/main.cpp (limited to 'libsowatch/main.cpp') diff --git a/libsowatch/main.cpp b/libsowatch/main.cpp new file mode 100644 index 0000000..d0eae3f --- /dev/null +++ b/libsowatch/main.cpp @@ -0,0 +1,35 @@ +#include +#include + +#include "metawatchsimulator.h" +#include "metawatch.h" +#include "watchserver.h" +#include "testwatchlet.h" +#include "testdeclarativewatchlet.h" + +using namespace sowatch; +QTM_USE_NAMESPACE + +static Watch *watch; +static WatchServer *server; + +int main(int argc, char *argv[]) +{ + QApplication a(argc, argv); + + if (a.arguments().count() > 1) { + watch = new MetaWatch(QBluetoothAddress(a.arguments().at(1))); + } else { + watch = new MetaWatchSimulator(); + } + + /* D0:37:61:C3:C7:99 */ + server = new WatchServer(watch); + new TestDeclarativeWatchlet(server); + new TestWatchlet(server); + + server->runWatchlet("com.javispedro.sowatch.testdeclarativewatchlet"); + //server->runWatchlet("com.javispedro.sowatch.testwatchlet"); + + return a.exec(); +} -- cgit v1.2.3