-rw-r--r-- | noncore/net/opietooth/lib/device.h | 40 |
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 | |||
@@ -7,22 +7,52 @@ | |||
7 | #include <qvaluelist.h> | 7 | #include <qvaluelist.h> |
8 | 8 | ||
9 | namespace OpieTooth { | 9 | namespace OpieTooth { |
10 | |||
10 | class Device : public QObject { | 11 | class Device : public QObject { |
11 | Q_OBJECT | 12 | Q_OBJECT |
13 | |||
12 | public: | 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 | 24 | |
25 | /** | ||
26 | * unloads the device | ||
27 | */ | ||
15 | ~Device(); | 28 | ~Device(); |
16 | // was the device loaded? | 29 | |
30 | /** | ||
31 | * attach the device | ||
32 | */ | ||
17 | void attach(); | 33 | void attach(); |
34 | |||
35 | /** | ||
36 | * detach the device | ||
37 | */ | ||
18 | void detach(); | 38 | void detach(); |
19 | bool up()const; | 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 | */ | ||
20 | QString devName()const ; // hci0 | 50 | QString devName()const ; // hci0 |
51 | |||
21 | signals: | 52 | signals: |
53 | |||
22 | device(const QString& device, bool up ); | 54 | device(const QString& device, bool up ); |
23 | }; | 55 | }; |
24 | }; | 56 | }; |
25 | 57 | ||
26 | |||
27 | |||
28 | #endif | 58 | #endif |