From 9ff99942ab2585033dbabb96fb9a9d6c6ee3d459 Mon Sep 17 00:00:00 2001 From: Ivailo Monev Date: Tue, 5 Jan 2016 18:21:59 +0200 Subject: [PATCH] kio: remove code for standalone kioslave Signed-off-by: Ivailo Monev --- kio/kio/dataprotocol.cpp | 48 ++-------------------------------- kio/kio/dataprotocol.h | 17 ++---------- kio/tests/dataprotocoltest.cpp | 3 --- 3 files changed, 4 insertions(+), 64 deletions(-) diff --git a/kio/kio/dataprotocol.cpp b/kio/kio/dataprotocol.cpp index fe5323fd..d21b6d0d 100644 --- a/kio/kio/dataprotocol.cpp +++ b/kio/kio/dataprotocol.cpp @@ -28,39 +28,7 @@ #include #include -#ifdef DATAKIOSLAVE -# include -# include -#endif - -#if !defined(DATAKIOSLAVE) -# define DISPATCH(f) dispatch_##f -#else -# define DISPATCH(f) f -#endif - using namespace KIO; -#ifdef DATAKIOSLAVE -extern "C" { - - int kdemain( int argc, char **argv ) { - KComponentData componentData( "kio_data" ); - - kDebug(7101) << "*** Starting kio_data "; - - if (argc != 4) { - kDebug(7101) << "Usage: kio_data protocol domain-socket1 domain-socket2"; - exit(-1); - } - - DataProtocol slave(argv[2], argv[3]); - slave.dispatchLoop(); - - kDebug(7101) << "*** kio_data Done"; - return 0; - } -} -#endif /** structure containing header information */ struct DataHeader { @@ -235,12 +203,7 @@ static DataHeader parseDataHeader(const KUrl &url, const bool mimeOnly) return header_info; } -#ifdef DATAKIOSLAVE -DataProtocol::DataProtocol(const QByteArray &pool_socket, const QByteArray &app_socket) - : SlaveBase("kio_data", pool_socket, app_socket) { -#else DataProtocol::DataProtocol() { -#endif kDebug(); } @@ -283,14 +246,7 @@ void DataProtocol::get(const KUrl& url) { totalSize(outData.size()); //kDebug() << "emit setMetaData@"< -#elif !defined(TESTKIO) +#if !defined(TESTKIO) # include "kio/dataslave.h" #endif @@ -55,20 +48,14 @@ namespace KIO { * @see http://www.ietf.org/rfc/rfc2397.txt * @author Leo Savernik */ -#if defined(DATAKIOSLAVE) -class DataProtocol : public KIO::SlaveBase { -#elif defined(TESTKIO) +#if defined(TESTKIO) class DataProtocol : public TestSlave { #else class DataProtocol : public DataSlave { #endif public: -#if defined(DATAKIOSLAVE) - DataProtocol(const QByteArray &pool_socket, const QByteArray &app_socket); -#else DataProtocol(); -#endif virtual ~DataProtocol(); virtual void mimetype(const KUrl &url); virtual void get(const KUrl &url); diff --git a/kio/tests/dataprotocoltest.cpp b/kio/tests/dataprotocoltest.cpp index 673a3499..dd99eff1 100644 --- a/kio/tests/dataprotocoltest.cpp +++ b/kio/tests/dataprotocoltest.cpp @@ -3,9 +3,6 @@ * Copyright (C) 2012 Rolf Eike Beer */ -#ifdef DATAKIOSLAVE -# undef DATAKIOSLAVE -#endif #ifndef TESTKIO # define TESTKIO #endif