-rw-r--r-- | noncore/net/opietooth/manager/btconnectionitem.cpp | 23 | ||||
-rw-r--r-- | noncore/net/opietooth/manager/btconnectionitem.h | 26 | ||||
-rw-r--r-- | noncore/net/opietooth/manager/btdeviceitem.cpp | 30 | ||||
-rw-r--r-- | noncore/net/opietooth/manager/btdeviceitem.h | 26 | ||||
-rw-r--r-- | noncore/net/opietooth/manager/btserviceitem.cpp | 23 | ||||
-rw-r--r-- | noncore/net/opietooth/manager/btserviceitem.h | 26 | ||||
-rw-r--r-- | noncore/net/opietooth/manager/stdpopups.cpp | 10 | ||||
-rw-r--r-- | noncore/net/opietooth/manager/stdpopups.h | 15 |
8 files changed, 179 insertions, 0 deletions
diff --git a/noncore/net/opietooth/manager/btconnectionitem.cpp b/noncore/net/opietooth/manager/btconnectionitem.cpp new file mode 100644 index 0000000..6fb9c11 --- a/dev/null +++ b/noncore/net/opietooth/manager/btconnectionitem.cpp | |||
@@ -0,0 +1,23 @@ | |||
1 | #include <connection.h> | ||
2 | #include "btconnectionitem.h" | ||
3 | |||
4 | using namespace OpieTooth; | ||
5 | |||
6 | BTConnectionItem::BTConnectionItem( QListView* parent, const ConnectionState& con ) | ||
7 | : BTListItem( parent ){ | ||
8 | m_con = con; | ||
9 | setText(0, m_con.mac() ); | ||
10 | } | ||
11 | BTConnectionItem::~BTConnectionItem() { | ||
12 | |||
13 | } | ||
14 | QString BTConnectionItem::type() const { | ||
15 | return QString::fromLatin1("connection"); | ||
16 | } | ||
17 | int BTConnectionItem::typeId() const { | ||
18 | return Connection; | ||
19 | } | ||
20 | ConnectionState BTConnectionItem::connection() const { | ||
21 | return m_con; | ||
22 | } | ||
23 | |||
diff --git a/noncore/net/opietooth/manager/btconnectionitem.h b/noncore/net/opietooth/manager/btconnectionitem.h new file mode 100644 index 0000000..3c0cd79 --- a/dev/null +++ b/noncore/net/opietooth/manager/btconnectionitem.h | |||
@@ -0,0 +1,26 @@ | |||
1 | |||
2 | #ifndef OPIE_TOOTH_BT_CONNECTION_ITEM_H | ||
3 | #define OPIE_TOOTH_BT_CONNECTION_ITEM_H | ||
4 | |||
5 | |||
6 | #include "btlistitem.h" | ||
7 | |||
8 | namespace OpieTooth { | ||
9 | |||
10 | class ConnectionState; | ||
11 | class BTConnectionItem : public BTListItem { | ||
12 | public: | ||
13 | BTConnectionItem( QListView* parent, const ConnectionState& state ); | ||
14 | ~BTConnectionItem(); | ||
15 | QString type()const; | ||
16 | int typeId() const; | ||
17 | ConnectionState connection()const; | ||
18 | private: | ||
19 | ConnectionState m_con; | ||
20 | |||
21 | }; | ||
22 | |||
23 | }; | ||
24 | |||
25 | |||
26 | #endif | ||
diff --git a/noncore/net/opietooth/manager/btdeviceitem.cpp b/noncore/net/opietooth/manager/btdeviceitem.cpp new file mode 100644 index 0000000..fb1b1c1 --- a/dev/null +++ b/noncore/net/opietooth/manager/btdeviceitem.cpp | |||
@@ -0,0 +1,30 @@ | |||
1 | |||
2 | #include "btdeviceitem.h" | ||
3 | |||
4 | using namespace OpieTooth; | ||
5 | |||
6 | |||
7 | BTDeviceItem::BTDeviceItem( QListView* parent, const RemoteDevice& dev ) | ||
8 | : BTListItem( parent ) { | ||
9 | |||
10 | setText( 0, dev.name() ); | ||
11 | m_device = dev; | ||
12 | }; | ||
13 | BTDeviceItem::~BTDeviceItem() { | ||
14 | // nothing I'm aware of | ||
15 | } | ||
16 | RemoteDevice BTDeviceItem::remoteDevice() const { | ||
17 | return m_device; | ||
18 | } | ||
19 | QString BTDeviceItem::mac()const { | ||
20 | return m_device.mac(); | ||
21 | } | ||
22 | QString BTDeviceItem::name() const { | ||
23 | return m_device.name(); | ||
24 | } | ||
25 | QString BTDeviceItem::type() const { | ||
26 | return QString::fromLatin1("device"); | ||
27 | } | ||
28 | int BTDeviceItem::typeId() const { | ||
29 | return Device; | ||
30 | } | ||
diff --git a/noncore/net/opietooth/manager/btdeviceitem.h b/noncore/net/opietooth/manager/btdeviceitem.h new file mode 100644 index 0000000..ae51483 --- a/dev/null +++ b/noncore/net/opietooth/manager/btdeviceitem.h | |||
@@ -0,0 +1,26 @@ | |||
1 | |||
2 | #ifndef OPIE_TOOTH_BT_DEVIVE_ITEM | ||
3 | #define OPIE_TOOTH_BT_DEVIVE_ITEM | ||
4 | |||
5 | |||
6 | #include <remotedevice.h> | ||
7 | #include "btlistitem.h" | ||
8 | |||
9 | namespace OpieTooth { | ||
10 | class BTDeviceItem : public BTListItem { | ||
11 | public: | ||
12 | BTDeviceItem( QListView* parent, const RemoteDevice& dev ); | ||
13 | ~BTDeviceItem(); | ||
14 | RemoteDevice remoteDevice() const; | ||
15 | QString type()const; | ||
16 | int typeId()const; | ||
17 | QString mac()const; | ||
18 | QString name() const; | ||
19 | private: | ||
20 | RemoteDevice m_device; | ||
21 | }; | ||
22 | |||
23 | }; | ||
24 | |||
25 | |||
26 | #endif | ||
diff --git a/noncore/net/opietooth/manager/btserviceitem.cpp b/noncore/net/opietooth/manager/btserviceitem.cpp new file mode 100644 index 0000000..db71c3c --- a/dev/null +++ b/noncore/net/opietooth/manager/btserviceitem.cpp | |||
@@ -0,0 +1,23 @@ | |||
1 | |||
2 | #include <qobject.h> | ||
3 | #include "btserviceitem.h" | ||
4 | |||
5 | using namespace OpieTooth; | ||
6 | |||
7 | BTServiceItem::BTServiceItem( QListViewItem* item, const Services& serv ) | ||
8 | : BTListItem( item ) { | ||
9 | m_service = serv; | ||
10 | setText(0, QObject::tr(serv.serviceName() ) ); | ||
11 | } | ||
12 | BTServiceItem::~BTServiceItem() { | ||
13 | |||
14 | } | ||
15 | QString BTServiceItem::type() const { | ||
16 | return QString::fromLatin1("Service"); | ||
17 | } | ||
18 | int BTServiceItem::typeId() const { | ||
19 | return Service; | ||
20 | } | ||
21 | Services BTServiceItem::services() const { | ||
22 | return m_service; | ||
23 | } | ||
diff --git a/noncore/net/opietooth/manager/btserviceitem.h b/noncore/net/opietooth/manager/btserviceitem.h new file mode 100644 index 0000000..6dbd8f1 --- a/dev/null +++ b/noncore/net/opietooth/manager/btserviceitem.h | |||
@@ -0,0 +1,26 @@ | |||
1 | |||
2 | |||
3 | #ifndef OPIE_TOOTH_BT_SERVICE_ITEM | ||
4 | #define OPIE_TOOTH_BT_SERVICE_ITEM | ||
5 | |||
6 | #include <services.h> | ||
7 | |||
8 | #include "btlistitem.h" | ||
9 | |||
10 | namespace OpieTooth { | ||
11 | |||
12 | class BTServiceItem : public BTListItem { | ||
13 | public: | ||
14 | BTServiceItem( QListViewItem* item, const Services& ); | ||
15 | ~BTServiceItem(); | ||
16 | QString type() const; | ||
17 | int typeId() const; | ||
18 | Services services() const; | ||
19 | private: | ||
20 | Services m_service; | ||
21 | |||
22 | }; | ||
23 | }; | ||
24 | |||
25 | |||
26 | #endif | ||
diff --git a/noncore/net/opietooth/manager/stdpopups.cpp b/noncore/net/opietooth/manager/stdpopups.cpp new file mode 100644 index 0000000..43a0f62 --- a/dev/null +++ b/noncore/net/opietooth/manager/stdpopups.cpp | |||
@@ -0,0 +1,10 @@ | |||
1 | |||
2 | #include "stdpopups.h" | ||
3 | |||
4 | |||
5 | QPopupMenu* newRfcComPopup( const OpieTooth::Services&, QListViewItem* ) { | ||
6 | return 0l; | ||
7 | } | ||
8 | QPopupMenu* newObexPushPopup( const OpieTooth::Services&, QListViewItem* ) { | ||
9 | return 0l; | ||
10 | } | ||
diff --git a/noncore/net/opietooth/manager/stdpopups.h b/noncore/net/opietooth/manager/stdpopups.h new file mode 100644 index 0000000..185d68d --- a/dev/null +++ b/noncore/net/opietooth/manager/stdpopups.h | |||
@@ -0,0 +1,15 @@ | |||
1 | |||
2 | #ifndef OPIE_TOOTH_STD_POPUPS | ||
3 | #define OPIE_TOOTH_STD_POPUPS | ||
4 | |||
5 | #include <qlistview.h> | ||
6 | #include <qpopupmenu.h> | ||
7 | |||
8 | #include <services.h> | ||
9 | |||
10 | extern "C" { | ||
11 | QPopupMenu* newRfcComPopup( const OpieTooth::Services&, QListViewItem* ); | ||
12 | QPopupMenu* newObexPushPopup( const OpieTooth::Services&, QListViewItem* ); | ||
13 | } | ||
14 | |||
15 | #endif | ||