summaryrefslogtreecommitdiff
path: root/core/qws/transferserver.cpp
Side-by-side diff
Diffstat (limited to 'core/qws/transferserver.cpp') (more/less context) (show whitespace changes)
-rw-r--r--core/qws/transferserver.cpp8
1 files changed, 0 insertions, 8 deletions
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
*/