author | chicken <chicken> | 2004-03-01 17:44:52 (UTC) |
---|---|---|
committer | chicken <chicken> | 2004-03-01 17:44:52 (UTC) |
commit | 5b640d3f070b0b2de361421abf93949410546e19 (patch) (side-by-side diff) | |
tree | 98d6ebb158e780a299cca27cbb7c7105a8dedef3 /core | |
parent | bdac663be648746b868757a6fc9e6c443e6f51b1 (diff) | |
download | opie-5b640d3f070b0b2de361421abf93949410546e19.zip opie-5b640d3f070b0b2de361421abf93949410546e19.tar.gz opie-5b640d3f070b0b2de361421abf93949410546e19.tar.bz2 |
fix includes
-rw-r--r-- | core/qws/main.cpp | 2 | ||||
-rw-r--r-- | core/qws/oqwsserver.cpp | 15 | ||||
-rw-r--r-- | core/qws/qcopbridge.cpp | 6 | ||||
-rw-r--r-- | core/qws/transferserver.cpp | 8 |
4 files changed, 0 insertions, 31 deletions
diff --git a/core/qws/main.cpp b/core/qws/main.cpp index bfed283..1c3c621 100644 --- a/core/qws/main.cpp +++ b/core/qws/main.cpp @@ -1,50 +1,48 @@ -#include <qwindowsystem_qws.h> -#include <qapplication.h> #include "oqwsserver.h" #include <sys/types.h> #include <sys/stat.h> #include <fcntl.h> #include <unistd.h> #include <syslog.h> #include <stdio.h> #define APPNAME "op-qws" void toSyslog(QtMsgType type, const char *msg) { int level = LOG_INFO; switch (type) { case QtDebugMsg: level = LOG_DEBUG; break; case QtWarningMsg: level = LOG_WARNING; break; case QtFatalMsg: level = LOG_ERR; break; } syslog (LOG_DAEMON | level, msg); } int daemon_init(void) { pid_t pid; if ((pid = fork()) < 0) return(-1); else if (pid != 0) exit(0); setsid(); chdir("/"); umask(0); fclose(stdout); fclose(stderr); fclose(stdin); diff --git a/core/qws/oqwsserver.cpp b/core/qws/oqwsserver.cpp index 1c61d19..907686a 100644 --- a/core/qws/oqwsserver.cpp +++ b/core/qws/oqwsserver.cpp @@ -1,97 +1,82 @@ /********************************************************************** ** Copyright (C) 2000 Trolltech AS. All rights reserved. ** ** This file is part of Qtopia Environment. ** ** This file may be distributed and/or modified under the terms of the ** GNU General Public License version 2 as published by the Free Software ** Foundation and appearing in the file LICENSE.GPL included in the ** packaging of this file. ** ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. ** ** See http://www.trolltech.com/gpl/ for GPL licensing information. ** ** Contact info@trolltech.com if any conditions of this licensing are ** not clear to you. ** **********************************************************************/ #include <syslog.h> #include "oqwsserver.h" #include "qcopbridge.h" #include "transferserver.h" -#include <qpe/applnk.h> -#include <qpe/mimetype.h> -#include <qpe/password.h> -#include <qpe/config.h> -#include <qpe/power.h> -#include <qpe/timeconversion.h> -#include <qpe/qcopenvelope_qws.h> -#include <qpe/network.h> -#include <qpe/global.h> #if defined( QT_QWS_SL5XXX ) || defined( QT_QWS_IPAQ ) #include <qpe/custom.h> #endif #include <opie/odevice.h> -#include <qgfx_qws.h> -#include <qmainwindow.h> -#include <qmessagebox.h> -#include <qtimer.h> -#include <qwindowsystem_qws.h> -#include <qvaluelist.h> #include <stdlib.h> #include <unistd.h> #include <fcntl.h> using namespace Opie; OQWSServer::OQWSServer( int& argc, char **argv, Type appType ) : QPEApplication( argc, argv, appType ) { startServers(); } OQWSServer::~OQWSServer() { terminateServers(); } bool OQWSServer::eventFilter ( QObject *o, QEvent *e ) { #if 0 if ( e-> type ( ) == QEvent::KeyPress || e-> type ( ) == QEvent::KeyRelease ) { QKeyEvent *ke = (QKeyEvent *) e; const ODeviceButton *db = ODevice::inst ( )-> buttonForKeycode ( ke-> key ( )); if ( db ) { if (checkButtonAction ( db, ke-> key ( ), e-> type ( ) == QEvent::KeyPress, ke-> isAutoRepeat ( ))) return true; //checkButtonAction retrune false if events should be routed through } } #endif return QPEApplication::eventFilter ( o, e ); } #ifdef Q_WS_QWS bool OQWSServer::qwsEventFilter( QWSEvent *e ) { #if 0 qpedesktop->checkMemory(); if ( e->type == QWSEvent::Key ) { QWSKeyEvent * ke = (QWSKeyEvent *) e; ushort keycode = ke-> simpleData. keycode; if ( !loggedin && keycode != Key_F34 ) return true; diff --git a/core/qws/qcopbridge.cpp b/core/qws/qcopbridge.cpp index 6177a7c..c0c52e8 100644 --- a/core/qws/qcopbridge.cpp +++ b/core/qws/qcopbridge.cpp @@ -1,82 +1,76 @@ /********************************************************************** ** Copyright (C) 2000-2002 Trolltech AS. All rights reserved. ** ** This file is part of the Qtopia Environment. ** ** This file may be distributed and/or modified under the terms of the ** GNU General Public License version 2 as published by the Free Software ** Foundation and appearing in the file LICENSE.GPL included in the ** packaging of this file. ** ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. ** ** See http://www.trolltech.com/gpl/ for GPL licensing information. ** ** Contact info@trolltech.com if any conditions of this licensing are ** not clear to you. ** **********************************************************************/ #include "qcopbridge.h" #include "transferserver.h" #include <qpe/qcopenvelope_qws.h> #include <qpe/qpeapplication.h> #include <qpe/version.h> -#include <qdir.h> -#include <qfile.h> #include <qtextstream.h> -#include <qdatastream.h> -#include <qstringlist.h> -#include <qfileinfo.h> -#include <qregexp.h> #ifdef QWS #include <qcopchannel_qws.h> #endif #define _XOPEN_SOURCE #include <pwd.h> #include <sys/types.h> #include <unistd.h> #if defined(_OS_LINUX_) #include <shadow.h> #endif //#define INSECURE const int block_size = 51200; QCopBridge::QCopBridge( Q_UINT16 port, QObject *parent , const char* name ) : QServerSocket( port, 1, parent, name ), desktopChannel( 0 ), cardChannel( 0 ) { if ( !ok() ) qWarning( "Failed to bind to port %d", port ); else { #ifndef QT_NO_COP desktopChannel = new QCopChannel( "QPE/Desktop", this ); connect( desktopChannel, SIGNAL(received(const QCString &, const QByteArray &)), this, SLOT(desktopMessage( const QCString &, const QByteArray &)) ); cardChannel = new QCopChannel( "QPE/Card", this ); connect( cardChannel, SIGNAL(received(const QCString &, const QByteArray &)), this, SLOT(desktopMessage( const QCString &, const QByteArray &)) ); #endif } sendSync = FALSE; } QCopBridge::~QCopBridge() { #ifndef QT_NO_COP delete desktopChannel; #endif } void QCopBridge::newConnection( int socket ) { QCopBridgePI *pi = new QCopBridgePI( socket, this ); diff --git a/core/qws/transferserver.cpp b/core/qws/transferserver.cpp index 239c824..30bf438 100644 --- a/core/qws/transferserver.cpp +++ b/core/qws/transferserver.cpp @@ -1,118 +1,110 @@ /********************************************************************** ** Copyright (C) 2000-2002 Trolltech AS. All rights reserved. ** ** This file is part of the Qtopia Environment. ** ** This file may be distributed and/or modified under the terms of the ** GNU General Public License version 2 as published by the Free Software ** Foundation and appearing in the file LICENSE.GPL included in the ** packaging of this file. ** ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. ** ** See http://www.trolltech.com/gpl/ for GPL licensing information. ** ** Contact info@trolltech.com if any conditions of this licensing are ** not clear to you. ** **********************************************************************/ #define _XOPEN_SOURCE #include <pwd.h> #include <sys/types.h> #include <unistd.h> #include <stdlib.h> #include <time.h> #ifndef Q_OS_MACX #include <shadow.h> #endif /* Q_OS_MACX */ /* we need the _OS_LINUX stuff first ! */ -#include <qglobal.h> #ifndef _OS_LINUX_ // Is anybody able to review this ? The include "uuid/uuid.h" couldn't be found // anywhere ? Therfore I removed it completely.. // I think it should be made permanentyl !? (eilers) #warning "Where should uuid/uuid.h be found ? Removed this part .. (eilers)" #if 0 extern "C" { #include <uuid/uuid.h> #define UUID_H_INCLUDED } #endif #endif // not defined linux #if defined(_OS_LINUX_) #include <shadow.h> #elif defined(Q_OS_MACX) #include <stdlib.h> #endif -#include <qdir.h> -#include <qfile.h> #include <qtextstream.h> -#include <qdatastream.h> #include <qmessagebox.h> -#include <qstringlist.h> -#include <qfileinfo.h> -#include <qregexp.h> //#include <qpe/qcopchannel_qws.h> #include <qpe/process.h> #include <qpe/global.h> #include <qpe/config.h> #include <qpe/contact.h> -#include <qpe/quuid.h> #include <qpe/version.h> #include <qpe/qcopenvelope_qws.h> #include "transferserver.h" #include <opie/oprocess.h> const int block_size = 51200; TransferServer::TransferServer( Q_UINT16 port, QObject *parent , const char* name ) : QServerSocket( port, 1, parent, name ) { if ( !ok() ) qWarning( "Failed to bind to port %d", port ); } TransferServer::~TransferServer() { } void TransferServer::newConnection( int socket ) { (void) new ServerPI( socket, this ); } /* * small class in anonymous namespace * to generate a QUUid for us */ namespace { struct UidGen { QString uuid(); }; #if defined(Q_OS_MACX) QString UidGen::uuid() { srandom( random() ); QString numStr = QString::number( random() ); return "{" + numStr + "}"; } #elif defined(_OS_LINUX_) /* * linux got a /proc/sys/kernel/random/uuid file * it'll generate the uuids for us */ |