-rw-r--r-- | noncore/net/opietooth/lib/device.cc | 24 | ||||
-rw-r--r-- | noncore/net/opietooth/lib/device.h | 2 | ||||
-rw-r--r-- | noncore/net/opietooth/lib/lib.pro | 4 |
3 files changed, 27 insertions, 3 deletions
diff --git a/noncore/net/opietooth/lib/device.cc b/noncore/net/opietooth/lib/device.cc new file mode 100644 index 0000000..b567e2b --- a/dev/null +++ b/noncore/net/opietooth/lib/device.cc | |||
@@ -0,0 +1,24 @@ | |||
1 | |||
2 | #include "device.h" | ||
3 | |||
4 | using namespace OpieTooth; | ||
5 | |||
6 | Device::Device(const QString &device, const QString &mode ) | ||
7 | : QObject(0, "device" ){ | ||
8 | |||
9 | } | ||
10 | Device::~Device(){ | ||
11 | |||
12 | } | ||
13 | void Device::attach(){ | ||
14 | |||
15 | } | ||
16 | void Device::detach(){ | ||
17 | |||
18 | } | ||
19 | bool Device::isLoaded()const{ | ||
20 | return false; | ||
21 | } | ||
22 | QString Device::devName()const { | ||
23 | return QString::fromLatin1("hci0"); | ||
24 | }; | ||
diff --git a/noncore/net/opietooth/lib/device.h b/noncore/net/opietooth/lib/device.h index d6cf049..d23f24c 100644 --- a/noncore/net/opietooth/lib/device.h +++ b/noncore/net/opietooth/lib/device.h | |||
@@ -31,37 +31,37 @@ namespace OpieTooth { | |||
31 | */ | 31 | */ |
32 | ~Device(); | 32 | ~Device(); |
33 | 33 | ||
34 | /** | 34 | /** |
35 | * attach the device | 35 | * attach the device |
36 | */ | 36 | */ |
37 | void attach(); | 37 | void attach(); |
38 | 38 | ||
39 | /** | 39 | /** |
40 | * detach the device | 40 | * detach the device |
41 | */ | 41 | */ |
42 | void detach(); | 42 | void detach(); |
43 | 43 | ||
44 | /** | 44 | /** |
45 | * Is the device loaded? | 45 | * Is the device loaded? |
46 | * @return bool, if the device is loaded | 46 | * @return bool, if the device is loaded |
47 | */ | 47 | */ |
48 | bool isLoaded()const; | 48 | bool isLoaded()const; |
49 | 49 | ||
50 | /** | 50 | /** |
51 | * Returns the device name | 51 | * Returns the device name |
52 | * @return QString, the device name | 52 | * @return QString, the device name |
53 | */ | 53 | */ |
54 | QString devName()const ; // hci0 | 54 | QString devName()const ; // hci0 |
55 | 55 | ||
56 | signals: | 56 | signals: |
57 | 57 | ||
58 | /** | 58 | /** |
59 | * Signals devicename and up status | 59 | * Signals devicename and up status |
60 | * @return &device QString, Devicename | 60 | * @return &device QString, Devicename |
61 | * @return up bool, if the device is up or not. | 61 | * @return up bool, if the device is up or not. |
62 | */ | 62 | */ |
63 | device(const QString& device, bool up ); | 63 | void device(const QString& device, bool up ); |
64 | }; | 64 | }; |
65 | }; | 65 | }; |
66 | 66 | ||
67 | #endif | 67 | #endif |
diff --git a/noncore/net/opietooth/lib/lib.pro b/noncore/net/opietooth/lib/lib.pro index 99274a7..7cededf 100644 --- a/noncore/net/opietooth/lib/lib.pro +++ b/noncore/net/opietooth/lib/lib.pro | |||
@@ -1,8 +1,8 @@ | |||
1 | TEMPLATE = lib | 1 | TEMPLATE = lib |
2 | CONFIG += qte warn_on release | 2 | CONFIG += qte warn_on release |
3 | HEADERS = kprocctrl.h kprocess.h | 3 | HEADERS = kprocctrl.h kprocess.h device.h |
4 | SOURCES = kprocctrl.cpp kprocess.cpp | 4 | SOURCES = kprocctrl.cpp kprocess.cpp device.cc |
5 | TARGET = opietooth | 5 | TARGET = opietooth |
6 | INCLUDEPATH += $(OPIEDIR)/include | 6 | INCLUDEPATH += $(OPIEDIR)/include |
7 | DESTDIR = $(QTDIR)/lib$(PROJMAK) | 7 | DESTDIR = $(QTDIR)/lib$(PROJMAK) |
8 | #VERSION = 0.0.0 | 8 | #VERSION = 0.0.0 |