summaryrefslogtreecommitdiff
path: root/metawatch/metawatchplugin.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'metawatch/metawatchplugin.cpp')
-rw-r--r--metawatch/metawatchplugin.cpp29
1 files changed, 29 insertions, 0 deletions
diff --git a/metawatch/metawatchplugin.cpp b/metawatch/metawatchplugin.cpp
new file mode 100644
index 0000000..e5eaabf
--- /dev/null
+++ b/metawatch/metawatchplugin.cpp
@@ -0,0 +1,29 @@
+#include "metawatch.h"
+#include "metawatchsimulator.h"
+#include "metawatchplugin.h"
+
+using namespace sowatch;
+
+MetaWatchPlugin::~MetaWatchPlugin()
+{
+
+}
+
+QStringList MetaWatchPlugin::drivers()
+{
+ QStringList d;
+ d << "metawatch-digital";
+ d << "metawatch-digital-sim";
+ return d;
+}
+
+Watch* MetaWatchPlugin::getWatch(const QString& driver, const QString& connId, QObject *parent)
+{
+ if (driver == "metawatch-digital") {
+ return new MetaWatch(QBluetoothAddress(connId), parent);
+ } else if (driver == "metawatch-digital-sim") {
+ return new MetaWatchSimulator(parent);
+ } else {
+ return 0;
+ }
+}