summaryrefslogtreecommitdiff
path: root/noncore/net/opietooth/lib
Side-by-side diff
Diffstat (limited to 'noncore/net/opietooth/lib') (more/less context) (show whitespace changes)
-rw-r--r--noncore/net/opietooth/lib/device.h40
1 files changed, 35 insertions, 5 deletions
diff --git a/noncore/net/opietooth/lib/device.h b/noncore/net/opietooth/lib/device.h
index 47e09c0..3798e0d 100644
--- a/noncore/net/opietooth/lib/device.h
+++ b/noncore/net/opietooth/lib/device.h
@@ -4,25 +4,55 @@
#include <qobject.h>
#include <qstring.h>
#include <qvaluelist.h>
namespace OpieTooth {
+
class Device : public QObject {
Q_OBJECT
+
public:
+
+ /**
+ * Brings up an device.
+ * Usage example: new Device(/dev/ttySB0, csr)
+ *
+ * @param &device QString the device name
+ * @param &mode QString the mode
+ */
Device(const QString &device, const QString& mode);
- // unloads the device
+
+ /**
+ * unloads the device
+ */
~Device();
- // was the device loaded?
+
+ /**
+ * attach the device
+ */
void attach();
+
+ /**
+ * detach the device
+ */
void detach();
- bool up()const;
+
+ /**
+ * Is the device loaded?
+ * @return bool, if the device is loaded
+
+ bool isLoaded()const;
+
+ /**
+ * Returns the device name
+ * @return QString, the device name
+ */
QString devName()const ; // hci0
+
signals:
+
device(const QString& device, bool up );
};
};
-
-
#endif