summaryrefslogtreecommitdiff
path: root/noncore/net/opietooth
authorzecke <zecke>2004-03-14 13:22:42 (UTC)
committer zecke <zecke>2004-03-14 13:22:42 (UTC)
commit0f7217afa7cdcb108dd2afba0ff6b42c97ab6f44 (patch) (side-by-side diff)
treef6a68afa76a9be4099c3de7a286caeadd250c966 /noncore/net/opietooth
parentd9d68663164078b8dbdbfe70d291291b9fd5aacf (diff)
downloadopie-0f7217afa7cdcb108dd2afba0ff6b42c97ab6f44.zip
opie-0f7217afa7cdcb108dd2afba0ff6b42c97ab6f44.tar.gz
opie-0f7217afa7cdcb108dd2afba0ff6b42c97ab6f44.tar.bz2
Convert net to ODP and QtAUX
Diffstat (limited to 'noncore/net/opietooth') (more/less context) (show whitespace changes)
-rw-r--r--noncore/net/opietooth/applet/bluezapplet.cpp2
-rw-r--r--noncore/net/opietooth/lib/device.cc12
-rw-r--r--noncore/net/opietooth/lib/device.h12
-rw-r--r--noncore/net/opietooth/lib/manager.cc22
-rw-r--r--noncore/net/opietooth/lib/manager.h26
-rw-r--r--noncore/net/opietooth/lib/startdunconnection.cpp6
-rw-r--r--noncore/net/opietooth/lib/startdunconnection.h8
-rw-r--r--noncore/net/opietooth/lib/startpanconnection.cpp10
-rw-r--r--noncore/net/opietooth/lib/startpanconnection.h8
-rw-r--r--noncore/net/opietooth/manager/main.cpp4
-rw-r--r--noncore/net/opietooth/manager/obexdialog.cpp7
-rw-r--r--noncore/net/opietooth/manager/obexdialog.h2
-rw-r--r--noncore/net/opietooth/manager/pppdialog.cpp6
-rw-r--r--noncore/net/opietooth/manager/pppdialog.h4
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
@@ -25,25 +25,25 @@
Boston, MA 02111-1307, USA.
*/
#include "bluezapplet.h"
#include <qapplication.h>
#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>
#include <qframe.h>
#include <qpixmap.h>
#include <qstring.h>
#include <qtimer.h>
#include <qpopupmenu.h>
#include <device.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,21 +1,23 @@
#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 );
QStringList list = QStringList::split( '\n', string );
for( QStringList::Iterator it = list.begin(); it != list.end(); ++it ){
qWarning("parsePID: %s", (*it).latin1() );
if( !(*it).startsWith("CSR") ){
id = (*it).toInt();
break;
}
}
@@ -38,29 +40,29 @@ Device::Device(const QString &device, const QString &mode, const QString &speed
Device::~Device(){
detach();
}
void Device::attach(){
qWarning("attaching %s %s %s", m_device.latin1(), m_mode.latin1(), m_speed.latin1() );
if(m_process == 0 ){
m_output.resize(0);
qWarning("new process to create" );
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;
m_process = 0;
}
};
}
void Device::detach(){
delete m_hci;
delete m_process;
// kill the pid we got
@@ -87,25 +89,25 @@ void Device::slotExited( OProcess* proc)
int ret = m_process->exitStatus();
if( ret == 0 ){ // attached
qWarning("attached" );
qWarning("Output: %s", m_output.data() );
pid = parsePid( m_output );
qWarning("Pid = %d", pid );
// now hciconfig hci0 up ( determine hciX FIXME)
// and call hciconfig hci0 up
// 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;
emit device("hci0", false );
}
}else{
qWarning("crass" );
m_attached = false;
emit device("hci0", 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
@@ -1,23 +1,23 @@
#ifndef OpieToothDevice_H
#define OpieToothDevice_H
#include <qobject.h>
#include <qstring.h>
#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.
* After attaching it hciconfig ups it
*/
class Device : public QObject {
Q_OBJECT
public:
@@ -58,31 +58,31 @@ namespace OpieTooth {
*/
QString devName()const ; // hci0
signals:
/**
* Signals devicename and up status
* @return &device QString, Devicename
* @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;
QCString m_output;
};
};
#endif
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,22 +1,24 @@
-#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");
m_device = dev;
m_hcitool = 0;
m_sdp = 0;
}
Manager::Manager( Device* /*dev*/ )
: QObject()
{
m_hcitool = 0;
@@ -33,45 +35,45 @@ Manager::~Manager(){
delete m_sdp;
}
void Manager::setDevice( const QString& dev ){
m_device = dev;
}
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;
}
}
void Manager::isAvailable( Device* /*dev*/ ){
}
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;
emit foundDevices( device, list );
delete hcitool;
}
}
void Manager::searchDevices(Device* /*d*/ ){
@@ -98,27 +100,27 @@ void Manager::removeService( const QString& name ){
emit removedService( name, bo );
}
void Manager::removeServices( const QStringList& list){
QStringList::ConstIterator it;
for (it = list.begin(); it != list.end(); ++it )
removeService( (*it) );
}
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;
Services::ValueList list;
emit foundServices( remDevice, list );
}
}
void Manager::searchServices( const RemoteDevice& dev){
searchServices( dev.mac() );
}
QString Manager::toDevice( const QString& /*mac*/ ){
@@ -237,27 +239,27 @@ void Manager::connectTo( const QString& mac) {
proc << "hcitool";
proc << "cc";
proc << mac;
proc.start(OProcess::DontCare); // the lib does not care at this point
}
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";
if (!proc->start(OProcess::NotifyOnExit, OProcess::AllOutput) ) {
ConnectionState::ValueList list;
emit connections( list );
delete proc;
}
}
void Manager::slotConnectionExited( OProcess* proc ) {
ConnectionState::ValueList list;
@@ -296,27 +298,27 @@ ConnectionState::ValueList Manager::parseConnections( const QString& out ) {
con.setHandle( value[4].toInt() );
con.setState( value[6].toInt() );
con.setLinkMode( value[8] == QString::fromLatin1("MASTER") ? Master : Client );
list2.append( con );
}
return list2;
}
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;
sig_proc->setName( mac.latin1() );
if (!sig_proc->start(OProcess::NotifyOnExit, OProcess::AllOutput) ) {
emit signalStrength( mac, "-1" );
delete sig_proc;
}
}
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
@@ -2,25 +2,25 @@
#ifndef OpieToothManager_H
#define OpieToothManager_H
#include <qobject.h>
#include <qstring.h>
#include <qmap.h>
#include <qvaluelist.h>
#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
* could do from command line in a OO and asynchronus
* way.
*/
class Manager : public QObject {
Q_OBJECT
public:
/** c'tor whichs create a new Manager
* @param device is the device to use. Either a mac or blueZ device name
@@ -133,41 +133,41 @@ namespace OpieTooth {
signals:
// device either mac or dev name
// the first device is the device which you access
void available( const QString& device, bool connected );
void addedService( const QString& service, bool added );
void removedService( const QString& service, bool removed );
void foundServices( const QString& device, Services::ValueList );
void foundDevices( const QString& device, RemoteDevice::ValueList );
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;
};
};
#endif
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
@@ -1,18 +1,20 @@
#include "startdunconnection.h"
using namespace OpieTooth;
+using namespace Opie::Core;
+using namespace Opie::Core;
StartDunConnection::StartDunConnection() {
m_dunConnect = 0l;
setConnectionType();
}
StartDunConnection::~StartDunConnection() {
delete m_dunConnect;
}
StartDunConnection::StartDunConnection( QString mac ) {
m_dunConnect = 0l;
m_mac = mac;
@@ -30,27 +32,27 @@ QString StartDunConnection::name() {
void StartDunConnection::setConnectionType() {
m_connectionType = Pan;
}
StartConnection::ConnectionType StartDunConnection::type() {
return m_connectionType;
}
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;
}
}
void StartDunConnection::slotExited( OProcess* proc ) {
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
@@ -1,40 +1,40 @@
#ifndef startdunconnection_h
#define startdunconnection_h
#include <qobject.h>
#include "connection.h"
-#include <opie/oprocess.h>
+#include <opie2/oprocess.h>
namespace OpieTooth {
class StartDunConnection : StartConnection {
Q_OBJECT
public:
StartDunConnection();
StartDunConnection( QString mac );
~StartDunConnection();
QString name();
void setName( QString name );
StartConnection::ConnectionType type();
void setConnectionType( );
void start();
void stop();
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 );
};
}
#endif
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
@@ -1,18 +1,20 @@
#include "startpanconnection.h"
using namespace OpieTooth;
+using namespace Opie::Core;
+using namespace Opie::Core;
StartPanConnection::StartPanConnection() {
m_panConnect = 0l;
setConnectionType();
}
StartPanConnection::~StartPanConnection() {
delete m_panConnect;
}
StartPanConnection::StartPanConnection( QString mac ) {
m_panConnect = 0l;
m_mac = mac;
@@ -31,27 +33,27 @@ void StartPanConnection::setConnectionType() {
m_connectionType = Pan;
}
StartConnection::ConnectionType StartPanConnection::type() {
return m_connectionType;
}
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;
}
}
void StartPanConnection::slotExited( OProcess* proc ) {
delete m_panConnect;
m_panConnect = 0l;
}
@@ -61,22 +63,22 @@ void StartPanConnection::slotStdOut(OProcess* proc, char* chars, int len)
void StartPanConnection::stop() {
if ( m_panConnect ) {
delete m_panConnect;
m_panConnect = 0l;
}
m_panConnect = new OProcess();
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
@@ -1,40 +1,40 @@
#ifndef startpanconnection_h
#define startpanconnection_h
#include <qobject.h>
#include "connection.h"
-#include <opie/oprocess.h>
+#include <opie2/oprocess.h>
namespace OpieTooth {
class StartPanConnection : StartConnection {
Q_OBJECT
public:
StartPanConnection();
StartPanConnection( QString mac );
~StartPanConnection();
QString name();
void setName( QString name );
StartConnection::ConnectionType type();
void setConnectionType( );
void start();
void stop();
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 );
};
}
#endif
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,25 +1,27 @@
/*
+using namespace Opie::Core;
+using namespace Opie::Core;
* main.cpp
*
* ---------------------
*
* begin : Sun 10 17:20:00 CEST 2002
* copyright : (c) 2002 by Maximilian Reiß
* email : max.reiss@gmx.de
*
*/
/***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
***************************************************************************/
#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
@@ -1,28 +1,31 @@
#include "obexdialog.h"
#include <qpushbutton.h>
#include <qmultilineedit.h>
#include <qlineedit.h>
#include <qlayout.h>
#include <qlabel.h>
#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 )
setName( "ObexDialog" );
setCaption( tr( "beam files " ) ) ;
m_device = device;
layout = new QVBoxLayout( this );
QLabel* info = new QLabel( this );
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
@@ -1,18 +1,18 @@
#ifndef OBEXDIALOG_H
#define OBEXDIALOG_H
#include <qdialog.h>
-#include <opie/oprocess.h>
+#include <opie2/oprocess.h>
class QVBoxLayout;
class QPushButton;
class QMultiLineEdit;
class QLineEdit;
namespace OpieTooth {
class ObexDialog : public QDialog {
Q_OBJECT
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
@@ -1,23 +1,25 @@
#include "pppdialog.h"
#include <qpushbutton.h>
#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 )
setName( "PPPDialog" );
setCaption( tr( "ppp connection " ) ) ;
m_device = device;
layout = new QVBoxLayout( this );
QLabel* info = new QLabel( this );
@@ -43,25 +45,25 @@ PPPDialog::PPPDialog( QWidget* parent, const char* name, bool modal, WFlags fl,
}
PPPDialog::~PPPDialog() {
}
void PPPDialog::connectToDevice() {
outPut->clear();
// 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;
}
}
void PPPDialog::fillOutPut( OProcess* pppDial, char* cha, int len ) {
QCString str(cha, len );
outPut->insertLine( str );
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
@@ -1,37 +1,37 @@
#ifndef PPPDIALOG_H
#define PPPDIALOG_H
#include <qdialog.h>
-#include <opie/oprocess.h>
+#include <opie2/oprocess.h>
class QVBoxLayout;
class QPushButton;
class QMultiLineEdit;
class QLineEdit;
namespace OpieTooth {
class PPPDialog : public QDialog {
Q_OBJECT
public:
PPPDialog( QWidget* parent = 0, const char* name = 0, bool modal = TRUE, WFlags fl = 0, const QString& device = 0);
~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;
QMultiLineEdit* outPut;
private:
QString m_device;
};
}
#endif