-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 2. In "ppp connection" dialog if you press connect with an empty ppp script - name it runs rfcomm connect 0 <device> <port>. + name it runs rfcomm connect <number of a port selected> <device> <port>. 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. Add an rfcomm port number to the connection dialog. +1. Try and run and correct authentification and encoding. 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 @@ #include <qpe/qcopenvelope_qws.h> - -#include <qtimer.h> +#include <qmessagebox.h> #include <opie2/odebug.h> +#include <opie2/oprocess.h> +#include <qpe/qpeapplication.h> using namespace Opie::Core; @@ -7,2 +8,3 @@ using namespace Opie::Core; #include "dunpopup.h" +#include "dundialog.h" @@ -13,3 +15,4 @@ using namespace OpieTooth; */ -DunPopup::DunPopup( OpieTooth::BTDeviceItem* item ) : QPopupMenu() { +DunPopup::DunPopup( const Services& service, + BTDeviceItem* item ) : QPopupMenu(), m_service(service) { @@ -20,6 +23,2 @@ DunPopup::DunPopup( OpieTooth::BTDeviceItem* item ) : QPopupMenu() { - m_dunconnection = 0l; - /* connect action */ - - a = new QAction(); // so it's get deleted @@ -29,3 +28,2 @@ DunPopup::DunPopup( OpieTooth::BTDeviceItem* item ) : QPopupMenu() { - b = new QAction(); @@ -47,5 +45,6 @@ DunPopup::~DunPopup() { void DunPopup::slotConnect() { - - m_dunconnection = new StartDunConnection( m_item->mac() ); - m_dunconnection->start(); + odebug << "connect" << oendl; + DunDialog dundlg(m_item->mac(), + m_service.protocolDescriptorList().last().port()); + QPEApplication::execDialog( &dundlg ); } @@ -53,3 +52,10 @@ void DunPopup::slotConnect() { void DunPopup::slotDisconnect() { - m_dunconnection->stop(); + OProcess dunDis; + OProcess pppDis; + dunDis << tr("dund") << tr("--kill") << m_item->mac(); + dunDis.start(OProcess::DontCare, OProcess::NoCommunication); + pppDis << tr("killall") << tr("-q") << tr("pppd"); + pppDis.start(OProcess::DontCare, OProcess::NoCommunication); + sleep(1); + QMessageBox::information(this, tr("DUN Disconnect"), tr("DUN Disconnected")); } @@ -63,3 +69,2 @@ void DunPopup::slotConnectAndConfig() { e << QString( "networksettings" ); - } 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 @@ #include <qaction.h> - -#include <startdunconnection.h> +#include <services.h> @@ -18,3 +17,3 @@ namespace OpieTooth { public: - DunPopup( OpieTooth::BTDeviceItem* ); + DunPopup(const OpieTooth::Services&, OpieTooth::BTDeviceItem* ); ~DunPopup(); @@ -23,4 +22,4 @@ namespace OpieTooth { QAction* m_push; - OpieTooth::StartDunConnection* m_dunconnection; - OpieTooth::BTDeviceItem *m_item; + OpieTooth::BTDeviceItem *m_item; //device item + Services m_service; //device service (port) 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 \ hciconfwrapper.h bticonloader.h \ - pppdialog.h dundialog.h obexdialog.h obexftpdialog.h \ + pppdialog.h dundialog.h pandialog.h \ + obexdialog.h obexftpdialog.h \ rfcommassigndialogimpl.h rfcommassigndialogitem.h \ @@ -16,3 +17,3 @@ SOURCES = btconnectionitem.cpp btdeviceitem.cpp \ btlistitem.cpp hciconfwrapper.cpp \ - bticonloader.cpp pppdialog.cpp dundialog.cpp \ + bticonloader.cpp pppdialog.cpp dundialog.cpp pandialog.cpp \ 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 @@ #include <qpe/qcopenvelope_qws.h> +#include <qmessagebox.h> #include <opie2/odebug.h> +#include <opie2/oprocess.h> +#include <qpe/qpeapplication.h> +#include "pandialog.h" using namespace Opie::Core; @@ -47,5 +51,5 @@ PanPopup::~PanPopup() { void PanPopup::slotConnect() { - - m_panconnection = new StartPanConnection( m_item->mac() ); - m_panconnection->start(); + odebug << "connect" << oendl; + PanDialog pandlg(m_item->mac()); + QPEApplication::execDialog(&pandlg); } @@ -53,4 +57,6 @@ void PanPopup::slotConnect() { void PanPopup::slotDisconnect() { - if (!m_panconnection) m_panconnection = new StartPanConnection( m_item->mac() ); + if (!m_panconnection) + m_panconnection = new StartPanConnection( m_item->mac() ); m_panconnection->stop(); + QMessageBox::information(this, tr("Pan Disconnect"), tr("PAN Disconnected")); } 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 { void slotConnectAndConfig(); - }; + }; }; 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" { - QPopupMenu* newDunPopup( const OpieTooth::Services&, OpieTooth::BTDeviceItem* item ) { - return new OpieTooth::DunPopup( item ); + QPopupMenu* newDunPopup( const OpieTooth::Services& service, OpieTooth::BTDeviceItem* item ) { + return new OpieTooth::DunPopup(service, item); } |