author | zecke <zecke> | 2004-03-14 13:22:42 (UTC) |
---|---|---|
committer | zecke <zecke> | 2004-03-14 13:22:42 (UTC) |
commit | 0f7217afa7cdcb108dd2afba0ff6b42c97ab6f44 (patch) (side-by-side diff) | |
tree | f6a68afa76a9be4099c3de7a286caeadd250c966 /noncore/net/opietooth | |
parent | d9d68663164078b8dbdbfe70d291291b9fd5aacf (diff) | |
download | opie-0f7217afa7cdcb108dd2afba0ff6b42c97ab6f44.zip opie-0f7217afa7cdcb108dd2afba0ff6b42c97ab6f44.tar.gz opie-0f7217afa7cdcb108dd2afba0ff6b42c97ab6f44.tar.bz2 |
Convert net to ODP and QtAUX
-rw-r--r-- | noncore/net/opietooth/applet/bluezapplet.cpp | 2 | ||||
-rw-r--r-- | noncore/net/opietooth/lib/device.cc | 12 | ||||
-rw-r--r-- | noncore/net/opietooth/lib/device.h | 12 | ||||
-rw-r--r-- | noncore/net/opietooth/lib/manager.cc | 22 | ||||
-rw-r--r-- | noncore/net/opietooth/lib/manager.h | 26 | ||||
-rw-r--r-- | noncore/net/opietooth/lib/startdunconnection.cpp | 6 | ||||
-rw-r--r-- | noncore/net/opietooth/lib/startdunconnection.h | 8 | ||||
-rw-r--r-- | noncore/net/opietooth/lib/startpanconnection.cpp | 10 | ||||
-rw-r--r-- | noncore/net/opietooth/lib/startpanconnection.h | 8 | ||||
-rw-r--r-- | noncore/net/opietooth/manager/main.cpp | 4 | ||||
-rw-r--r-- | noncore/net/opietooth/manager/obexdialog.cpp | 7 | ||||
-rw-r--r-- | noncore/net/opietooth/manager/obexdialog.h | 2 | ||||
-rw-r--r-- | noncore/net/opietooth/manager/pppdialog.cpp | 6 | ||||
-rw-r--r-- | noncore/net/opietooth/manager/pppdialog.h | 4 |
14 files changed, 72 insertions, 57 deletions
diff --git a/noncore/net/opietooth/applet/bluezapplet.cpp b/noncore/net/opietooth/applet/bluezapplet.cpp index 817936d..93b2c67 100644 --- a/noncore/net/opietooth/applet/bluezapplet.cpp +++ b/noncore/net/opietooth/applet/bluezapplet.cpp @@ -33,9 +33,9 @@ #include <qpe/qcopenvelope_qws.h> #include <qpe/config.h> #include <qpe/resource.h> -#include <opie/odevice.h> +#include <opie2/odevice.h> #include <qpoint.h> #include <qpainter.h> #include <qlayout.h> diff --git a/noncore/net/opietooth/lib/device.cc b/noncore/net/opietooth/lib/device.cc index bae1c47..d913853 100644 --- a/noncore/net/opietooth/lib/device.cc +++ b/noncore/net/opietooth/lib/device.cc @@ -1,13 +1,15 @@ #include <signal.h> -#include <opie/oprocess.h> +#include <opie2/oprocess.h> #include "device.h" using namespace OpieTooth; +using namespace Opie::Core; +using namespace Opie::Core; namespace { int parsePid( const QCString& par ){ int id=0; QString string( par ); @@ -46,13 +48,13 @@ void Device::attach(){ m_process = new OProcess(); *m_process << "hciattach"; *m_process << "-p"; *m_process << m_device << m_mode << m_speed; - connect(m_process, SIGNAL( processExited(OProcess*) ), + connect(m_process, SIGNAL( processExited(Opie::Core::OProcess*) ), this, SLOT( slotExited(OProcess* ) ) ); - connect(m_process, SIGNAL( receivedStdout(OProcess*, char*, int) ), + connect(m_process, SIGNAL( receivedStdout(Opie::Core::OProcess*, char*, int) ), this, SLOT(slotStdOut(OProcess*,char*,int ) ) ); - connect(m_process, SIGNAL(receivedStderr(OProcess*, char*, int ) ), + connect(m_process, SIGNAL(receivedStderr(Opie::Core::OProcess*, char*, int ) ), this, SLOT(slotStdErr(OProcess*,char*,int) ) ); if(!m_process->start(OProcess::NotifyOnExit, OProcess::AllOutput ) ){ qWarning("Could not start" ); delete m_process; @@ -95,9 +97,9 @@ void Device::slotExited( OProcess* proc) // FIXME hardcoded to hci0 now :( m_hci = new OProcess( ); *m_hci << "hciconfig"; *m_hci << "hci0 up"; - connect(m_hci, SIGNAL( processExited(OProcess*) ), + connect(m_hci, SIGNAL( processExited(Opie::Core::OProcess*) ), this, SLOT( slotExited(OProcess* ) ) ); if(!m_hci->start() ){ qWarning("could not start" ); m_attached = false; diff --git a/noncore/net/opietooth/lib/device.h b/noncore/net/opietooth/lib/device.h index ce7fccc..f3339fc 100644 --- a/noncore/net/opietooth/lib/device.h +++ b/noncore/net/opietooth/lib/device.h @@ -7,9 +7,9 @@ #include <qvaluelist.h> #include <sys/types.h> -class OProcess; +namespace Opie {namespace Core {class Opie::Core::OProcess;}} namespace OpieTooth { /** * Device takes care of attaching serial * devices to the blueZ stack. @@ -66,18 +66,18 @@ namespace OpieTooth { * @return up bool, if the device is up or not. */ void device(const QString& device, bool up ); private slots: - virtual void slotExited( OProcess* ); - virtual void slotStdOut(OProcess*, char*, int ); - virtual void slotStdErr(OProcess*, char*, int ); + virtual void slotExited( Opie::Core::OProcess* ); + virtual void slotStdOut(Opie::Core::OProcess*, char*, int ); + virtual void slotStdErr(Opie::Core::OProcess*, char*, int ); private: class Private; Private *d; QString m_device; bool m_attached:1; - OProcess* m_hci; - OProcess* m_process; + Opie::Core::OProcess* m_hci; + Opie::Core::OProcess* m_process; QString m_devId; QString m_mode; QString m_speed; pid_t pid; diff --git a/noncore/net/opietooth/lib/manager.cc b/noncore/net/opietooth/lib/manager.cc index c89d325..56156a8 100644 --- a/noncore/net/opietooth/lib/manager.cc +++ b/noncore/net/opietooth/lib/manager.cc @@ -1,14 +1,16 @@ -#include <opie/oprocess.h> +#include <opie2/oprocess.h> #include "parser.h" #include "manager.h" using namespace OpieTooth; +using namespace Opie::Core; +using namespace Opie::Core; Manager::Manager( const QString& dev ) : QObject() { qWarning("created"); @@ -41,9 +43,9 @@ void Manager::setDevice( Device* /*dev*/ ){ void Manager::isAvailable( const QString& device ){ OProcess* l2ping = new OProcess(); l2ping->setName( device.latin1() ); *l2ping << "l2ping" << "-c1" << device; - connect(l2ping, SIGNAL(processExited(OProcess* ) ), + connect(l2ping, SIGNAL(processExited(Opie::Core::OProcess* ) ), this, SLOT(slotProcessExited(OProcess*) ) ); if (!l2ping->start() ) { emit available( device, false ); delete l2ping; @@ -59,11 +61,11 @@ void Manager::searchDevices( const QString& device ){ qWarning("search devices"); OProcess* hcitool = new OProcess(); hcitool->setName( device.isEmpty() ? "hci0" : device.latin1() ); *hcitool << "hcitool" << "scan"; - connect( hcitool, SIGNAL(processExited(OProcess*) ) , + connect( hcitool, SIGNAL(processExited(Opie::Core::OProcess*) ) , this, SLOT(slotHCIExited(OProcess* ) ) ); - connect( hcitool, SIGNAL(receivedStdout(OProcess*, char*, int ) ), + connect( hcitool, SIGNAL(receivedStdout(Opie::Core::OProcess*, char*, int ) ), this, SLOT(slotHCIOut(OProcess*, char*, int ) ) ); if (!hcitool->start(OProcess::NotifyOnExit, OProcess::AllOutput) ) { qWarning("could not start"); RemoteDevice::ValueList list; @@ -106,11 +108,11 @@ void Manager::searchServices( const QString& remDevice ){ OProcess *m_sdp =new OProcess(); *m_sdp << "sdptool" << "browse" << remDevice; m_sdp->setName( remDevice.latin1() ); qWarning("search Services for %s", remDevice.latin1() ); - connect(m_sdp, SIGNAL(processExited(OProcess*) ), + connect(m_sdp, SIGNAL(processExited(Opie::Core::OProcess*) ), this, SLOT(slotSDPExited(OProcess* ) ) ); - connect(m_sdp, SIGNAL(receivedStdout(OProcess*, char*, int ) ), + connect(m_sdp, SIGNAL(receivedStdout(Opie::Core::OProcess*, char*, int ) ), this, SLOT(slotSDPOut(OProcess*, char*, int) ) ); if (!m_sdp->start(OProcess::NotifyOnExit, OProcess::AllOutput) ) { qWarning("could not start sdptool" ); delete m_sdp; @@ -245,11 +247,11 @@ void Manager::searchConnections() { qWarning("searching connections?"); OProcess* proc = new OProcess(); m_hcitoolCon = QString::null; - connect(proc, SIGNAL(processExited(OProcess*) ), + connect(proc, SIGNAL(processExited(Opie::Core::OProcess*) ), this, SLOT(slotConnectionExited( OProcess*) ) ); - connect(proc, SIGNAL(receivedStdout(OProcess*, char*, int) ), + connect(proc, SIGNAL(receivedStdout(Opie::Core::OProcess*, char*, int) ), this, SLOT(slotConnectionOutput(OProcess*, char*, int) ) ); *proc << "hcitool"; *proc << "con"; @@ -304,11 +306,11 @@ ConnectionState::ValueList Manager::parseConnections( const QString& out ) { void Manager::signalStrength( const QString &mac ) { OProcess* sig_proc = new OProcess(); - connect(sig_proc, SIGNAL(processExited(OProcess*) ), + connect(sig_proc, SIGNAL(processExited(Opie::Core::OProcess*) ), this, SLOT(slotSignalStrengthExited( OProcess*) ) ); - connect(sig_proc, SIGNAL(receivedStdout(OProcess*, char*, int) ), + connect(sig_proc, SIGNAL(receivedStdout(Opie::Core::OProcess*, char*, int) ), this, SLOT(slotSignalStrengthOutput(OProcess*, char*, int) ) ); *sig_proc << "hcitool"; *sig_proc << "lq"; *sig_proc << mac; diff --git a/noncore/net/opietooth/lib/manager.h b/noncore/net/opietooth/lib/manager.h index abc8ba1..9b1c714 100644 --- a/noncore/net/opietooth/lib/manager.h +++ b/noncore/net/opietooth/lib/manager.h @@ -10,9 +10,9 @@ #include "connection.h" #include "remotedevice.h" #include "services.h" -class OProcess; +namespace Opie {namespace Core {class Opie::Core::OProcess;}} namespace OpieTooth { class Device; /** Manager manages a blueZ device (hci0 for example) * without Manager you can control the things you @@ -141,32 +141,32 @@ namespace OpieTooth { void connections( ConnectionState::ValueList ); void signalStrength( const QString& mac, const QString& strengh ); private slots: - void slotProcessExited(OProcess* ); + void slotProcessExited(Opie::Core::OProcess* ); - void slotSDPExited(OProcess*); - void slotSDPOut(OProcess*, char*, int); + void slotSDPExited(Opie::Core::OProcess*); + void slotSDPOut(Opie::Core::OProcess*, char*, int); - void slotHCIExited(OProcess* ); - void slotHCIOut(OProcess*, char*, int ); + void slotHCIExited(Opie::Core::OProcess* ); + void slotHCIOut(Opie::Core::OProcess*, char*, int ); - void slotConnectionExited(OProcess* ); - void slotConnectionOutput(OProcess*, char*, int ); + void slotConnectionExited(Opie::Core::OProcess* ); + void slotConnectionOutput(Opie::Core::OProcess*, char*, int ); - void slotSignalStrengthOutput( OProcess*, char*, int ); - void slotSignalStrengthExited( OProcess* ); + void slotSignalStrengthOutput( Opie::Core::OProcess*, char*, int ); + void slotSignalStrengthExited( Opie::Core::OProcess* ); private: Services::ValueList parseSDPOutput( const QString& ); RemoteDevice::ValueList parseHCIOutput( const QString& ); ConnectionState::ValueList parseConnections( const QString& ); - OProcess *m_hcitool; - OProcess *m_sdp; // not only one + Opie::Core::OProcess *m_hcitool; + Opie::Core::OProcess *m_sdp; // not only one QString m_device; QMap<QString, int> m_signalStrength; QMap<QString, QString> m_out; QMap<QString, QString> m_devices; - QMap<OProcess*, QString> m_signalMac; + QMap<Opie::Core::OProcess*, QString> m_signalMac; QString m_hcitoolCon; }; }; diff --git a/noncore/net/opietooth/lib/startdunconnection.cpp b/noncore/net/opietooth/lib/startdunconnection.cpp index c3850eb..90ef04a 100644 --- a/noncore/net/opietooth/lib/startdunconnection.cpp +++ b/noncore/net/opietooth/lib/startdunconnection.cpp @@ -3,8 +3,10 @@ using namespace OpieTooth; +using namespace Opie::Core; +using namespace Opie::Core; StartDunConnection::StartDunConnection() { m_dunConnect = 0l; setConnectionType(); } @@ -38,11 +40,11 @@ StartConnection::ConnectionType StartDunConnection::type() { void StartDunConnection::start() { m_dunConnect = new OProcess(); *m_dunConnect << "dund" << "--listen" << "--connect" << m_mac; - connect( m_dunConnect, SIGNAL( processExited(OProcess*) ) , + connect( m_dunConnect, SIGNAL( processExited(Opie::Core::OProcess*) ) , this, SLOT( slotExited(OProcess*) ) ); - connect( m_dunConnect, SIGNAL( receivedStdout(OProcess*,char*,int) ), + connect( m_dunConnect, SIGNAL( receivedStdout(Opie::Core::OProcess*,char*,int) ), this, SLOT( slotStdOut(OProcess*,char*,int) ) ); if (!m_dunConnect->start( OProcess::NotifyOnExit, OProcess::AllOutput) ) { qWarning( "could not start" ); delete m_dunConnect; diff --git a/noncore/net/opietooth/lib/startdunconnection.h b/noncore/net/opietooth/lib/startdunconnection.h index 43a852a..f6107f6 100644 --- a/noncore/net/opietooth/lib/startdunconnection.h +++ b/noncore/net/opietooth/lib/startdunconnection.h @@ -2,9 +2,9 @@ #define startdunconnection_h #include <qobject.h> #include "connection.h" -#include <opie/oprocess.h> +#include <opie2/oprocess.h> namespace OpieTooth { class StartDunConnection : StartConnection { @@ -26,13 +26,13 @@ namespace OpieTooth { private: QString m_name; QString m_mac; ConnectionType m_connectionType; - OProcess* m_dunConnect; + Opie::Core::OProcess* m_dunConnect; private slots: - void slotExited( OProcess* proc ); - void slotStdOut( OProcess* proc, char* chars, int len ); + void slotExited( Opie::Core::OProcess* proc ); + void slotStdOut( Opie::Core::OProcess* proc, char* chars, int len ); }; } diff --git a/noncore/net/opietooth/lib/startpanconnection.cpp b/noncore/net/opietooth/lib/startpanconnection.cpp index a42b407..fef35d9 100644 --- a/noncore/net/opietooth/lib/startpanconnection.cpp +++ b/noncore/net/opietooth/lib/startpanconnection.cpp @@ -3,8 +3,10 @@ using namespace OpieTooth; +using namespace Opie::Core; +using namespace Opie::Core; StartPanConnection::StartPanConnection() { m_panConnect = 0l; setConnectionType(); } @@ -39,11 +41,11 @@ void StartPanConnection::start() { m_panConnect = new OProcess(); qDebug( "IM START " + m_mac ); *m_panConnect << "pand" << "--connect" << m_mac; - connect( m_panConnect, SIGNAL( processExited(OProcess*) ) , + connect( m_panConnect, SIGNAL( processExited(Opie::Core::OProcess*) ) , this, SLOT( slotExited(OProcess*) ) ); - connect( m_panConnect, SIGNAL( receivedStdout(OProcess*,char*,int) ), + connect( m_panConnect, SIGNAL( receivedStdout(Opie::Core::OProcess*,char*,int) ), this, SLOT( slotStdOut(OProcess*,char*,int) ) ); if (!m_panConnect->start( OProcess::NotifyOnExit, OProcess::AllOutput) ) { qWarning( "could not start" ); delete m_panConnect; @@ -69,11 +71,11 @@ void StartPanConnection::stop() { qDebug("IM STOP " + m_mac); *m_panConnect << "pand" << "--kill" << m_mac; - connect( m_panConnect, SIGNAL( processExited(OProcess*) ) , + connect( m_panConnect, SIGNAL( processExited(Opie::Core::OProcess*) ) , this, SLOT( slotExited(OProcess*) ) ); - connect( m_panConnect, SIGNAL( receivedStdout(OProcess*,char*,int) ), + connect( m_panConnect, SIGNAL( receivedStdout(Opie::Core::OProcess*,char*,int) ), this, SLOT( slotStdOut(OProcess*,char*,int) ) ); if (!m_panConnect->start( OProcess::NotifyOnExit, OProcess::AllOutput) ) { qWarning( "could not stop" ); delete m_panConnect; diff --git a/noncore/net/opietooth/lib/startpanconnection.h b/noncore/net/opietooth/lib/startpanconnection.h index 7e5bd95..e12dad0 100644 --- a/noncore/net/opietooth/lib/startpanconnection.h +++ b/noncore/net/opietooth/lib/startpanconnection.h @@ -2,9 +2,9 @@ #define startpanconnection_h #include <qobject.h> #include "connection.h" -#include <opie/oprocess.h> +#include <opie2/oprocess.h> namespace OpieTooth { class StartPanConnection : StartConnection { @@ -26,13 +26,13 @@ namespace OpieTooth { private: QString m_name; QString m_mac; ConnectionType m_connectionType; - OProcess* m_panConnect; + Opie::Core::OProcess* m_panConnect; private slots: - void slotExited( OProcess* proc ); - void slotStdOut( OProcess* proc, char* chars, int len ); + void slotExited( Opie::Core::OProcess* proc ); + void slotStdOut( Opie::Core::OProcess* proc, char* chars, int len ); }; } diff --git a/noncore/net/opietooth/manager/main.cpp b/noncore/net/opietooth/manager/main.cpp index 82aeebd..a96f128 100644 --- a/noncore/net/opietooth/manager/main.cpp +++ b/noncore/net/opietooth/manager/main.cpp @@ -1,5 +1,7 @@ /* +using namespace Opie::Core; +using namespace Opie::Core; * main.cpp * * --------------------- * @@ -18,8 +20,8 @@ ***************************************************************************/ #include "bluebase.h" #include <qpe/qpeapplication.h> -#include <opie/oapplicationfactory.h> +#include <opie2/oapplicationfactory.h> OPIE_EXPORT_APP( OApplicationFactory<OpieTooth::BlueBase> ) diff --git a/noncore/net/opietooth/manager/obexdialog.cpp b/noncore/net/opietooth/manager/obexdialog.cpp index 46a0e3d..1ef862a 100644 --- a/noncore/net/opietooth/manager/obexdialog.cpp +++ b/noncore/net/opietooth/manager/obexdialog.cpp @@ -8,13 +8,16 @@ #include <qfileinfo.h> #include <qpe/resource.h> -#include <opie/oprocess.h> -#include <opie/ofiledialog.h> +#include <opie2/oprocess.h> +#include <opie2/ofiledialog.h> using namespace OpieTooth; +using namespace Opie::Core; +using namespace Opie::Ui; +using namespace Opie::Core; ObexDialog::ObexDialog( QWidget* parent, const char* name, bool modal, WFlags fl, const QString& device ) : QDialog( parent, name, modal, fl ) { if ( !name ) diff --git a/noncore/net/opietooth/manager/obexdialog.h b/noncore/net/opietooth/manager/obexdialog.h index b3d5e6d..d5b5682 100644 --- a/noncore/net/opietooth/manager/obexdialog.h +++ b/noncore/net/opietooth/manager/obexdialog.h @@ -2,9 +2,9 @@ #define OBEXDIALOG_H #include <qdialog.h> -#include <opie/oprocess.h> +#include <opie2/oprocess.h> class QVBoxLayout; class QPushButton; class QMultiLineEdit; diff --git a/noncore/net/opietooth/manager/pppdialog.cpp b/noncore/net/opietooth/manager/pppdialog.cpp index 4e58552..870e7fd 100644 --- a/noncore/net/opietooth/manager/pppdialog.cpp +++ b/noncore/net/opietooth/manager/pppdialog.cpp @@ -4,12 +4,14 @@ #include <qmultilineedit.h> #include <qlineedit.h> #include <qlayout.h> #include <qlabel.h> -#include <opie/oprocess.h> +#include <opie2/oprocess.h> using namespace OpieTooth; +using namespace Opie::Core; +using namespace Opie::Core; PPPDialog::PPPDialog( QWidget* parent, const char* name, bool modal, WFlags fl, const QString& device ) : QDialog( parent, name, modal, fl ) { if ( !name ) @@ -51,9 +53,9 @@ void PPPDialog::connectToDevice() { // vom popupmenu beziehen QString connectScript = "/etc/ppp/peers/" + cmdLine->text(); OProcess* pppDial = new OProcess(); *pppDial << "pppd" << m_device << "call" << connectScript; - connect( pppDial, SIGNAL(receivedStdout(OProcess*,char*,int) ), + connect( pppDial, SIGNAL(receivedStdout(Opie::Core::OProcess*,char*,int) ), this, SLOT(fillOutPut(OProcess*,char*,int) ) ); if (!pppDial->start(OProcess::DontCare, OProcess::AllOutput) ) { qWarning("could not start"); delete pppDial; diff --git a/noncore/net/opietooth/manager/pppdialog.h b/noncore/net/opietooth/manager/pppdialog.h index bb8b734..05894e2 100644 --- a/noncore/net/opietooth/manager/pppdialog.h +++ b/noncore/net/opietooth/manager/pppdialog.h @@ -2,9 +2,9 @@ #define PPPDIALOG_H #include <qdialog.h> -#include <opie/oprocess.h> +#include <opie2/oprocess.h> class QVBoxLayout; class QPushButton; class QMultiLineEdit; @@ -22,9 +22,9 @@ namespace OpieTooth { ~PPPDialog(); private slots: void connectToDevice(); - void fillOutPut( OProcess* pppDial, char* cha, int len ); + void fillOutPut( Opie::Core::OProcess* pppDial, char* cha, int len ); protected: QVBoxLayout* layout; QLineEdit* cmdLine; QPushButton* connectButton; |