summaryrefslogtreecommitdiff
path: root/libsowatch/main.cpp
diff options
context:
space:
mode:
authorJavier S. Pedro <maemo@javispedro.com>2011-09-17 03:03:23 +0200
committerJavier S. Pedro <maemo@javispedro.com>2011-09-17 03:03:23 +0200
commit3a755f46d9cf6e3650d40a960d0d0db8c1ad9fa1 (patch)
treef330f63caec08b6626c808b5ae70c64cab0246a6 /libsowatch/main.cpp
parent0dca79a8c15b76ca53617c0ed3396ab6435f0152 (diff)
downloadsowatch-3a755f46d9cf6e3650d40a960d0d0db8c1ad9fa1.tar.gz
sowatch-3a755f46d9cf6e3650d40a960d0d0db8c1ad9fa1.zip
preparing for library package
Diffstat (limited to 'libsowatch/main.cpp')
-rw-r--r--libsowatch/main.cpp35
1 files changed, 35 insertions, 0 deletions
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 <QtGui/QApplication>
+#include <QtConnectivity/QBluetoothAddress>
+
+#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();
+}