summaryrefslogtreecommitdiff
authormickeyl <mickeyl>2004-03-24 00:20:42 (UTC)
committer mickeyl <mickeyl>2004-03-24 00:20:42 (UTC)
commitcc2fd242ec29023784748e6c9d662cb1f89e83ec (patch) (side-by-side diff)
tree55fa7676f1c64607e9a9327c2b206dd3a95625a4
parentf08adf125dbaa2a411fad9fba22443c7364afca3 (diff)
downloadopie-cc2fd242ec29023784748e6c9d662cb1f89e83ec.zip
opie-cc2fd242ec29023784748e6c9d662cb1f89e83ec.tar.gz
opie-cc2fd242ec29023784748e6c9d662cb1f89e83ec.tar.bz2
convert to libopie2
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/qws/config.in13
-rw-r--r--core/qws/oqwsserver.cpp2
-rw-r--r--core/qws/oqwsserver.h2
-rw-r--r--core/qws/qws.pro4
-rw-r--r--core/qws/transferserver.cpp47
-rw-r--r--core/qws/transferserver.h15
6 files changed, 37 insertions, 46 deletions
diff --git a/core/qws/config.in b/core/qws/config.in
index 3706405..903eaa1 100644
--- a/core/qws/config.in
+++ b/core/qws/config.in
@@ -3,14 +3,3 @@
default "n"
- depends ( LIBQPE || LIBQPE-X11 ) && LIBOPIE && EXPERIMENTAL
+ depends ( LIBQPE || LIBQPE-X11 ) && LIBOPIE2CORE && LIBOPIE2UI && EXPERIMENTAL
-# menu "Advanced QWS Server Config"
-# config QWS_QCOP
-# bool "QCop bridge and Transfer server (sync)"
-# default y
-# depends on QWS
-#
-# config QWS_PACKAGE
-# bool "Package Slave (package installs via sync software)"
-# default n
-# depends on QWS
-# endmenu
diff --git a/core/qws/oqwsserver.cpp b/core/qws/oqwsserver.cpp
index 907686a..d6b6504 100644
--- a/core/qws/oqwsserver.cpp
+++ b/core/qws/oqwsserver.cpp
@@ -31,3 +31,3 @@
-#include <opie/odevice.h>
+#include <opie2/odevice.h>
diff --git a/core/qws/oqwsserver.h b/core/qws/oqwsserver.h
index b95c3fb..c8622d4 100644
--- a/core/qws/oqwsserver.h
+++ b/core/qws/oqwsserver.h
@@ -25,3 +25,3 @@
#include <qpe/qpeapplication.h>
-#include <opie/odevicebutton.h>
+#include <opie2/odevicebutton.h>
diff --git a/core/qws/qws.pro b/core/qws/qws.pro
index 5656a59..50d0b2b 100644
--- a/core/qws/qws.pro
+++ b/core/qws/qws.pro
@@ -16,4 +16,4 @@ INCLUDEPATH += $(OPIEDIR)/include
DEPENDPATH += $(OPIEDIR)/include .
-TARGET = op-qws
-LIBS += -lqpe -lopie
+TARGET = qws
+LIBS += -lqpe -lopiecore2 -lopieui2
diff --git a/core/qws/transferserver.cpp b/core/qws/transferserver.cpp
index daf63ec..d0fec89 100644
--- a/core/qws/transferserver.cpp
+++ b/core/qws/transferserver.cpp
@@ -66,3 +66,4 @@ extern "C"
#include "transferserver.h"
-#include <opie/oprocess.h>
+#include <opie2/oprocess.h>
+using namespace Opie::Core;
@@ -1051,7 +1052,7 @@ ServerDTP::ServerDTP( QObject *parent, const char* name)
- gzipProc = new OProcess( this, "gzipProc" );
+ gzipProc = new Opie::Core::OProcess( this, "gzipProc" );
- createTargzProc = new OProcess( QString("tar"), this, "createTargzProc");
+ createTargzProc = new Opie::Core::OProcess( QString("tar"), this, "createTargzProc");
createTargzProc->setWorkingDirectory( QDir::rootDirPath() );
- connect( createTargzProc, SIGNAL( processExited(OProcess*) ), SLOT( targzDone() ) );
+ connect( createTargzProc, SIGNAL( processExited(Opie::Core::OProcess*) ), SLOT( targzDone() ) );
@@ -1059,7 +1060,7 @@ ServerDTP::ServerDTP( QObject *parent, const char* name)
args += "-xv";
- retrieveTargzProc = new OProcess( args, this, "retrieveTargzProc" );
+ retrieveTargzProc = new Opie::Core::OProcess( args, this, "retrieveTargzProc" );
retrieveTargzProc->setWorkingDirectory( QDir::rootDirPath() );
- connect( retrieveTargzProc, SIGNAL( processExited(OProcess*) ),
+ connect( retrieveTargzProc, SIGNAL( processExited(Opie::Core::OProcess*) ),
SIGNAL( completed() ) );
- connect( retrieveTargzProc, SIGNAL( processExited(OProcess*) ),
+ connect( retrieveTargzProc, SIGNAL( processExited(Opie::Core::OProcess*) ),
SLOT( extractTarDone() ) );
@@ -1123,3 +1124,3 @@ void ServerDTP::connected()
qDebug("==>start send tar process");
- if ( !createTargzProc->start(OProcess::NotifyOnExit, OProcess::Stdout) )
+ if ( !createTargzProc->start(Opie::Core::OProcess::NotifyOnExit, Opie::Core::OProcess::Stdout) )
qWarning("Error starting %s or %s",
@@ -1258,3 +1259,3 @@ void ServerDTP::readyRead()
if ( !gzipProc->isRunning() )
- gzipProc->start(OProcess::NotifyOnExit, (OProcess::Communication) ( OProcess::Stdin | OProcess::Stdout ));
+ gzipProc->start(Opie::Core::OProcess::NotifyOnExit, (Opie::Core::OProcess::Communication) ( Opie::Core::OProcess::Stdin | Opie::Core::OProcess::Stdout ));
@@ -1275,3 +1276,3 @@ void ServerDTP::readyRead()
-void ServerDTP::writeTargzBlock(OProcess *, char *buffer, int buflen)
+void ServerDTP::writeTargzBlock(Opie::Core::OProcess *, char *buffer, int buflen)
{
@@ -1283,4 +1284,4 @@ void ServerDTP::writeTargzBlock(OProcess *, char *buffer, int buflen)
mode = Idle;
- disconnect( gzipProc, SIGNAL( receivedStdout(OProcess*,char*,int) ),
- this, SLOT( writeTargzBlock(OProcess*,char*,int) ) );
+ disconnect( gzipProc, SIGNAL( receivedStdout(Opie::Core::OProcess*,char*,int) ),
+ this, SLOT( writeTargzBlock(Opie::Core::OProcess*,char*,int) ) );
}
@@ -1291,4 +1292,4 @@ void ServerDTP::targzDone()
//qDebug("targz done");
- disconnect( createTargzProc, SIGNAL( receivedStdout(OProcess*,char*,int) ),
- this, SLOT( gzipTarBlock(OProcess*,char*,int) ) );
+ disconnect( createTargzProc, SIGNAL( receivedStdout(Opie::Core::OProcess*,char*,int) ),
+ this, SLOT( gzipTarBlock(Opie::Core::OProcess*,char*,int) ) );
gzipProc->closeStdin();
@@ -1296,3 +1297,3 @@ void ServerDTP::targzDone()
-void ServerDTP::gzipTarBlock(OProcess *, char *buffer, int buflen)
+void ServerDTP::gzipTarBlock(Opie::Core::OProcess *, char *buffer, int buflen)
{
@@ -1301,3 +1302,3 @@ void ServerDTP::gzipTarBlock(OProcess *, char *buffer, int buflen)
//qDebug("auto start gzip proc");
- gzipProc->start(OProcess::NotifyOnExit, (OProcess::Communication) ( OProcess::Stdin | OProcess::Stdout ));
+ gzipProc->start(Opie::Core::OProcess::NotifyOnExit, (Opie::Core::OProcess::Communication) ( Opie::Core::OProcess::Stdin | Opie::Core::OProcess::Stdout ));
}
@@ -1340,3 +1341,3 @@ void ServerDTP::sendGzipFile( const QString &fn,
connect( createTargzProc,
- SIGNAL( receivedStdout(OProcess*,char*,int) ), SLOT( gzipTarBlock(OProcess*,char*,int) ) );
+ SIGNAL( receivedStdout(Opie::Core::OProcess*,char*,int) ), SLOT( gzipTarBlock(Opie::Core::OProcess*,char*,int) ) );
@@ -1344,4 +1345,4 @@ void ServerDTP::sendGzipFile( const QString &fn,
*gzipProc << "gzip";
- connect( gzipProc, SIGNAL( receivedStdout(OProcess*,char*,int) ),
- SLOT( writeTargzBlock(OProcess*,char*,int) ) );
+ connect( gzipProc, SIGNAL( receivedStdout(Opie::Core::OProcess*,char*,int) ),
+ SLOT( writeTargzBlock(Opie::Core::OProcess*,char*,int) ) );
}
@@ -1354,7 +1355,7 @@ void ServerDTP::gunzipDone()
retrieveTargzProc->closeStdin();
- disconnect( gzipProc, SIGNAL( receivedStdout(OProcess*,char*,int) ),
- this, SLOT( tarExtractBlock(OProcess*,char*,int) ) );
+ disconnect( gzipProc, SIGNAL( receivedStdout(Opie::Core::OProcess*,char*,int) ),
+ this, SLOT( tarExtractBlock(Opie::Core::OProcess*,char*,int) ) );
}
-void ServerDTP::tarExtractBlock(OProcess *, char *buffer, int buflen)
+void ServerDTP::tarExtractBlock(Opie::Core::OProcess *, char *buffer, int buflen)
{
@@ -1363,3 +1364,3 @@ void ServerDTP::tarExtractBlock(OProcess *, char *buffer, int buflen)
qDebug("auto start ungzip proc");
- if ( !retrieveTargzProc->start(OProcess::NotifyOnExit, OProcess::Stdin) )
+ if ( !retrieveTargzProc->start(Opie::Core::OProcess::NotifyOnExit, Opie::Core::OProcess::Stdin) )
qWarning(" failed to start tar -x process");
diff --git a/core/qws/transferserver.h b/core/qws/transferserver.h
index 1c5ab4b..82dae40 100644
--- a/core/qws/transferserver.h
+++ b/core/qws/transferserver.h
@@ -26,3 +26,4 @@
class QFileInfo;
-class OProcess;
+namespace Opie { namespace Core { class OProcess; } }
+
class TransferServer : public QServerSocket
@@ -94,7 +95,7 @@ private slots:
void readyRead();
- void writeTargzBlock(OProcess *, char *, int);
+ void writeTargzBlock(Opie::Core::OProcess *, char *, int);
void targzDone();
- void gzipTarBlock(OProcess *, char *, int);
- void tarExtractBlock(OProcess *, char *, int);
+ void gzipTarBlock(Opie::Core::OProcess *, char *, int);
+ void tarExtractBlock(Opie::Core::OProcess *, char *, int);
void gunzipDone();
@@ -108,5 +109,5 @@ private:
QBuffer buf;
- OProcess *createTargzProc;
- OProcess *retrieveTargzProc;
- OProcess *gzipProc;
+ Opie::Core::OProcess *createTargzProc;
+ Opie::Core::OProcess *retrieveTargzProc;
+ Opie::Core::OProcess *gzipProc;
};