summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/net/opietooth/lib/device.h56
1 files changed, 43 insertions, 13 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
@@ -1,28 +1,58 @@
1 1
2#ifndef OpieToothDevice_H 2#ifndef OpieToothDevice_H
3#define OpieToothDevice_H 3#define OpieToothDevice_H
4 4
5#include <qobject.h> 5#include <qobject.h>
6#include <qstring.h> 6#include <qstring.h>
7#include <qvaluelist.h> 7#include <qvaluelist.h>
8 8
9namespace OpieTooth { 9namespace OpieTooth {
10 class Device : public QObject { 10
11 class Device : public QObject {
11 Q_OBJECT 12 Q_OBJECT
12 public: 13
14 public:
15
16 /**
17 * Brings up an device.
18 * Usage example: new Device(/dev/ttySB0, csr)
19 *
20 * @param &device QString the device name
21 * @param &mode QString the mode
22 */
13 Device(const QString &device, const QString& mode); 23 Device(const QString &device, const QString& mode);
14 // unloads the device
15 ~Device();
16 // was the device loaded?
17 void attach();
18 void detach();
19 bool up()const;
20 QString devName()const ; // hci0
21 signals:
22 device(const QString& device, bool up );
23 };
24};
25 24
25 /**
26 * unloads the device
27 */
28 ~Device();
29
30 /**
31 * attach the device
32 */
33 void attach();
34
35 /**
36 * detach the device
37 */
38 void detach();
26 39
40 /**
41 * Is the device loaded?
42 * @return bool, if the device is loaded
43
44 bool isLoaded()const;
45
46 /**
47 * Returns the device name
48 * @return QString, the device name
49 */
50 QString devName()const ; // hci0
51
52 signals:
53
54 device(const QString& device, bool up );
55 };
56};
27 57
28#endif 58#endif