aboutsummaryrefslogtreecommitdiff
path: root/smartpenmanager.h
diff options
context:
space:
mode:
Diffstat (limited to 'smartpenmanager.h')
-rw-r--r--smartpenmanager.h42
1 files changed, 42 insertions, 0 deletions
diff --git a/smartpenmanager.h b/smartpenmanager.h
new file mode 100644
index 0000000..d1b4800
--- /dev/null
+++ b/smartpenmanager.h
@@ -0,0 +1,42 @@
+#ifndef SMARTPENMANAGER_H
+#define SMARTPENMANAGER_H
+
+#include <QtCore/QObject>
+#include <QtCore/QSocketNotifier>
+#include <QtCore/QMap>
+#include <QtCore/QPair>
+#include "smartpensyncer.h"
+
+struct udev;
+struct udev_monitor;
+struct udev_device;
+
+class SmartpenManager : public QObject
+{
+ Q_OBJECT
+
+public:
+ explicit SmartpenManager(QObject *parent = 0);
+ ~SmartpenManager();
+
+signals:
+ void syncComplete(const QString &penName);
+
+public slots:
+
+private slots:
+ void handleMonitorActivity();
+ void handleSyncerFinished();
+
+private:
+ void processDevice(udev_device *dev);
+
+private:
+ udev *_udev;
+ udev_monitor *_monitor;
+ QSocketNotifier *_notifier;
+ QMap<QPair<int, int>, SmartpenSyncer*> _syncers;
+
+};
+
+#endif // SMARTPENMANAGER_H