dataprotocol.h
00001 // dataprotocol.h 00002 // ================ 00003 // 00004 // Interface of the KDE data protocol core operations 00005 // 00006 // Author: Leo Savernik 00007 // Email: l.savernik@aon.at 00008 // (C) 2002 by Leo Savernik 00009 // Created: Sam Dez 28 14:11:18 CET 2002 00010 00011 /*************************************************************************** 00012 * * 00013 * This program is free software; you can redistribute it and/or modify * 00014 * it under the terms of the GNU Lesser General Public License as * 00015 * published by the Free Software Foundation; version 2. * 00016 * * 00017 ***************************************************************************/ 00018 00019 #ifndef __dataprotocol_h__ 00020 #define __dataprotocol_h__ 00021 00022 // dataprotocol.* interprets the following defines 00023 // DATAKIOSLAVE: define if you want to compile this into a stand-alone 00024 // tdeioslave 00025 // TESTKIO: define for test-driving 00026 // Both defines are mutually exclusive. Defining none of them compiles 00027 // DataProtocol for internal usage within libtdeiocore. 00028 00029 class TQString; 00030 class TQCString; 00031 00032 class KURL; 00033 00034 #if defined(DATAKIOSLAVE) 00035 # include <tdeio/slavebase.h> 00036 #elif !defined(TESTKIO) 00037 # include "tdeio/dataslave.h" 00038 #endif 00039 00040 namespace TDEIO { 00041 00046 #if defined(DATAKIOSLAVE) 00047 class DataProtocol : public TDEIO::SlaveBase { 00048 #elif defined(TESTKIO) 00049 class DataProtocol : public TestSlave { 00050 #else 00051 class DataProtocol : public DataSlave { 00052 #endif 00053 00054 public: 00055 #if defined(DATAKIOSLAVE) 00056 DataProtocol(const TQCString &pool_socket, const TQCString &app_socket); 00057 #else 00058 DataProtocol(); 00059 #endif 00060 virtual ~DataProtocol(); 00061 virtual void mimetype(const KURL &url); 00062 virtual void get(const KURL &url); 00063 #if defined(TESTKIO) 00064 void ref() {} 00065 void deref() {} 00066 #endif 00067 }; 00068 00069 }/*end namespace*/ 00070 00071 #endif