-rw-r--r-- | noncore/net/opietooth/manager/ReleaseNotes.txt | 2 | ||||
-rw-r--r-- | noncore/net/opietooth/manager/TODO.txt | 2 | ||||
-rw-r--r-- | noncore/net/opietooth/manager/dunpopup.cpp | 31 | ||||
-rw-r--r-- | noncore/net/opietooth/manager/dunpopup.h | 9 | ||||
-rw-r--r-- | noncore/net/opietooth/manager/manager.pro | 5 | ||||
-rw-r--r-- | noncore/net/opietooth/manager/panpopup.cpp | 14 | ||||
-rw-r--r-- | noncore/net/opietooth/manager/panpopup.h | 2 | ||||
-rw-r--r-- | noncore/net/opietooth/manager/stdpopups.cpp | 4 |
8 files changed, 40 insertions, 29 deletions
diff --git a/noncore/net/opietooth/manager/ReleaseNotes.txt b/noncore/net/opietooth/manager/ReleaseNotes.txt index 9c0fa8c..0b21f85 100644 --- a/noncore/net/opietooth/manager/ReleaseNotes.txt +++ b/noncore/net/opietooth/manager/ReleaseNotes.txt | |||
@@ -6,3 +6,3 @@ Sun 19 Mar 2006 17:29:28 | |||
6 | 2. In "ppp connection" dialog if you press connect with an empty ppp script | 6 | 2. In "ppp connection" dialog if you press connect with an empty ppp script |
7 | name it runs rfcomm connect 0 <device> <port>. | 7 | name it runs rfcomm connect <number of a port selected> <device> <port>. |
8 | 8 | ||
diff --git a/noncore/net/opietooth/manager/TODO.txt b/noncore/net/opietooth/manager/TODO.txt index 76fae68..1914d8b 100644 --- a/noncore/net/opietooth/manager/TODO.txt +++ b/noncore/net/opietooth/manager/TODO.txt | |||
@@ -1,2 +1,2 @@ | |||
1 | 1. Add an rfcomm port number to the connection dialog. | 1 | 1. Try and run and correct authentification and encoding. |
2 | 2. Collect requirements from others. | 2 | 2. Collect requirements from others. |
diff --git a/noncore/net/opietooth/manager/dunpopup.cpp b/noncore/net/opietooth/manager/dunpopup.cpp index 10505a9..3017d63 100644 --- a/noncore/net/opietooth/manager/dunpopup.cpp +++ b/noncore/net/opietooth/manager/dunpopup.cpp | |||
@@ -1,5 +1,6 @@ | |||
1 | #include <qpe/qcopenvelope_qws.h> | 1 | #include <qpe/qcopenvelope_qws.h> |
2 | 2 | #include <qmessagebox.h> | |
3 | #include <qtimer.h> | ||
4 | #include <opie2/odebug.h> | 3 | #include <opie2/odebug.h> |
4 | #include <opie2/oprocess.h> | ||
5 | #include <qpe/qpeapplication.h> | ||
5 | using namespace Opie::Core; | 6 | using namespace Opie::Core; |
@@ -7,2 +8,3 @@ using namespace Opie::Core; | |||
7 | #include "dunpopup.h" | 8 | #include "dunpopup.h" |
9 | #include "dundialog.h" | ||
8 | 10 | ||
@@ -13,3 +15,4 @@ using namespace OpieTooth; | |||
13 | */ | 15 | */ |
14 | DunPopup::DunPopup( OpieTooth::BTDeviceItem* item ) : QPopupMenu() { | 16 | DunPopup::DunPopup( const Services& service, |
17 | BTDeviceItem* item ) : QPopupMenu(), m_service(service) { | ||
15 | 18 | ||
@@ -20,6 +23,2 @@ DunPopup::DunPopup( OpieTooth::BTDeviceItem* item ) : QPopupMenu() { | |||
20 | 23 | ||
21 | m_dunconnection = 0l; | ||
22 | /* connect action */ | ||
23 | |||
24 | |||
25 | a = new QAction(); // so it's get deleted | 24 | a = new QAction(); // so it's get deleted |
@@ -29,3 +28,2 @@ DunPopup::DunPopup( OpieTooth::BTDeviceItem* item ) : QPopupMenu() { | |||
29 | 28 | ||
30 | |||
31 | b = new QAction(); | 29 | b = new QAction(); |
@@ -47,5 +45,6 @@ DunPopup::~DunPopup() { | |||
47 | void DunPopup::slotConnect() { | 45 | void DunPopup::slotConnect() { |
48 | 46 | odebug << "connect" << oendl; | |
49 | m_dunconnection = new StartDunConnection( m_item->mac() ); | 47 | DunDialog dundlg(m_item->mac(), |
50 | m_dunconnection->start(); | 48 | m_service.protocolDescriptorList().last().port()); |
49 | QPEApplication::execDialog( &dundlg ); | ||
51 | } | 50 | } |
@@ -53,3 +52,10 @@ void DunPopup::slotConnect() { | |||
53 | void DunPopup::slotDisconnect() { | 52 | void DunPopup::slotDisconnect() { |
54 | m_dunconnection->stop(); | 53 | OProcess dunDis; |
54 | OProcess pppDis; | ||
55 | dunDis << tr("dund") << tr("--kill") << m_item->mac(); | ||
56 | dunDis.start(OProcess::DontCare, OProcess::NoCommunication); | ||
57 | pppDis << tr("killall") << tr("-q") << tr("pppd"); | ||
58 | pppDis.start(OProcess::DontCare, OProcess::NoCommunication); | ||
59 | sleep(1); | ||
60 | QMessageBox::information(this, tr("DUN Disconnect"), tr("DUN Disconnected")); | ||
55 | } | 61 | } |
@@ -63,3 +69,2 @@ void DunPopup::slotConnectAndConfig() { | |||
63 | e << QString( "networksettings" ); | 69 | e << QString( "networksettings" ); |
64 | |||
65 | } | 70 | } |
diff --git a/noncore/net/opietooth/manager/dunpopup.h b/noncore/net/opietooth/manager/dunpopup.h index c070c56..6058b20 100644 --- a/noncore/net/opietooth/manager/dunpopup.h +++ b/noncore/net/opietooth/manager/dunpopup.h | |||
@@ -5,4 +5,3 @@ | |||
5 | #include <qaction.h> | 5 | #include <qaction.h> |
6 | 6 | #include <services.h> | |
7 | #include <startdunconnection.h> | ||
8 | 7 | ||
@@ -18,3 +17,3 @@ namespace OpieTooth { | |||
18 | public: | 17 | public: |
19 | DunPopup( OpieTooth::BTDeviceItem* ); | 18 | DunPopup(const OpieTooth::Services&, OpieTooth::BTDeviceItem* ); |
20 | ~DunPopup(); | 19 | ~DunPopup(); |
@@ -23,4 +22,4 @@ namespace OpieTooth { | |||
23 | QAction* m_push; | 22 | QAction* m_push; |
24 | OpieTooth::StartDunConnection* m_dunconnection; | 23 | OpieTooth::BTDeviceItem *m_item; //device item |
25 | OpieTooth::BTDeviceItem *m_item; | 24 | Services m_service; //device service (port) |
26 | private slots: | 25 | private slots: |
diff --git a/noncore/net/opietooth/manager/manager.pro b/noncore/net/opietooth/manager/manager.pro index d042c4c..dc43f40 100644 --- a/noncore/net/opietooth/manager/manager.pro +++ b/noncore/net/opietooth/manager/manager.pro | |||
@@ -6,3 +6,4 @@ HEADERS = btconnectionitem.h btdeviceitem.h \ | |||
6 | hciconfwrapper.h bticonloader.h \ | 6 | hciconfwrapper.h bticonloader.h \ |
7 | pppdialog.h dundialog.h obexdialog.h obexftpdialog.h \ | 7 | pppdialog.h dundialog.h pandialog.h \ |
8 | obexdialog.h obexftpdialog.h \ | ||
8 | rfcommassigndialogimpl.h rfcommassigndialogitem.h \ | 9 | rfcommassigndialogimpl.h rfcommassigndialogitem.h \ |
@@ -16,3 +17,3 @@ SOURCES = btconnectionitem.cpp btdeviceitem.cpp \ | |||
16 | btlistitem.cpp hciconfwrapper.cpp \ | 17 | btlistitem.cpp hciconfwrapper.cpp \ |
17 | bticonloader.cpp pppdialog.cpp dundialog.cpp \ | 18 | bticonloader.cpp pppdialog.cpp dundialog.cpp pandialog.cpp \ |
18 | rfcommassigndialogimpl.cpp rfcommassigndialogitem.cpp \ | 19 | rfcommassigndialogimpl.cpp rfcommassigndialogitem.cpp \ |
diff --git a/noncore/net/opietooth/manager/panpopup.cpp b/noncore/net/opietooth/manager/panpopup.cpp index f02a58c..2fd9eaf 100644 --- a/noncore/net/opietooth/manager/panpopup.cpp +++ b/noncore/net/opietooth/manager/panpopup.cpp | |||
@@ -1,3 +1,7 @@ | |||
1 | #include <qpe/qcopenvelope_qws.h> | 1 | #include <qpe/qcopenvelope_qws.h> |
2 | #include <qmessagebox.h> | ||
2 | #include <opie2/odebug.h> | 3 | #include <opie2/odebug.h> |
4 | #include <opie2/oprocess.h> | ||
5 | #include <qpe/qpeapplication.h> | ||
6 | #include "pandialog.h" | ||
3 | using namespace Opie::Core; | 7 | using namespace Opie::Core; |
@@ -47,5 +51,5 @@ PanPopup::~PanPopup() { | |||
47 | void PanPopup::slotConnect() { | 51 | void PanPopup::slotConnect() { |
48 | 52 | odebug << "connect" << oendl; | |
49 | m_panconnection = new StartPanConnection( m_item->mac() ); | 53 | PanDialog pandlg(m_item->mac()); |
50 | m_panconnection->start(); | 54 | QPEApplication::execDialog(&pandlg); |
51 | } | 55 | } |
@@ -53,4 +57,6 @@ void PanPopup::slotConnect() { | |||
53 | void PanPopup::slotDisconnect() { | 57 | void PanPopup::slotDisconnect() { |
54 | if (!m_panconnection) m_panconnection = new StartPanConnection( m_item->mac() ); | 58 | if (!m_panconnection) |
59 | m_panconnection = new StartPanConnection( m_item->mac() ); | ||
55 | m_panconnection->stop(); | 60 | m_panconnection->stop(); |
61 | QMessageBox::information(this, tr("Pan Disconnect"), tr("PAN Disconnected")); | ||
56 | } | 62 | } |
diff --git a/noncore/net/opietooth/manager/panpopup.h b/noncore/net/opietooth/manager/panpopup.h index 1496f3a..3e535e3 100644 --- a/noncore/net/opietooth/manager/panpopup.h +++ b/noncore/net/opietooth/manager/panpopup.h | |||
@@ -29,3 +29,3 @@ namespace OpieTooth { | |||
29 | void slotConnectAndConfig(); | 29 | void slotConnectAndConfig(); |
30 | }; | 30 | }; |
31 | }; | 31 | }; |
diff --git a/noncore/net/opietooth/manager/stdpopups.cpp b/noncore/net/opietooth/manager/stdpopups.cpp index 68f19c0..f58d3a6 100644 --- a/noncore/net/opietooth/manager/stdpopups.cpp +++ b/noncore/net/opietooth/manager/stdpopups.cpp | |||
@@ -24,4 +24,4 @@ extern "C" { | |||
24 | 24 | ||
25 | QPopupMenu* newDunPopup( const OpieTooth::Services&, OpieTooth::BTDeviceItem* item ) { | 25 | QPopupMenu* newDunPopup( const OpieTooth::Services& service, OpieTooth::BTDeviceItem* item ) { |
26 | return new OpieTooth::DunPopup( item ); | 26 | return new OpieTooth::DunPopup(service, item); |
27 | } | 27 | } |