kioslaves
mimeio.h
Go to the documentation of this file.00001 /*************************************************************************** 00002 mimeio.h - description 00003 ------------------- 00004 begin : Wed Oct 25 2000 00005 copyright : (C) 2000 by Sven Carstens 00006 email : s.carstens@gmx.de 00007 ***************************************************************************/ 00008 00009 /*************************************************************************** 00010 * * 00011 * This program is free software; you can redistribute it and/or modify * 00012 * it under the terms of the GNU General Public License as published by * 00013 * the Free Software Foundation; either version 2 of the License, or * 00014 * (at your option) any later version. * 00015 * * 00016 ***************************************************************************/ 00017 00018 #ifndef MIMEIO_H 00019 #define MIMEIO_H 00020 00021 #include <qcstring.h> 00022 #include <qfile.h> 00023 00028 class mimeIO 00029 { 00030 public: 00031 mimeIO (); 00032 virtual ~ mimeIO (); 00033 00034 virtual int outputLine (const QCString &, int len = -1); 00035 virtual int outputMimeLine (const QCString &); 00036 virtual int inputLine (QCString &); 00037 virtual int outputChar (char); 00038 virtual int inputChar (char &); 00039 00040 void setCRLF (const char *); 00041 00042 protected: 00043 QCString theCRLF; 00044 int crlfLen; 00045 }; 00046 00047 class mimeIOQFile:public mimeIO 00048 { 00049 public: 00050 mimeIOQFile (const QString &); 00051 virtual ~ mimeIOQFile (); 00052 virtual int outputLine (const QCString &, int len = -1); 00053 virtual int inputLine (QCString &); 00054 00055 protected: 00056 QFile myFile; 00057 }; 00058 00059 class mimeIOQString:public mimeIO 00060 { 00061 public: 00062 mimeIOQString (); 00063 virtual ~ mimeIOQString (); 00064 virtual int outputLine (const QCString &, int len = -1); 00065 virtual int inputLine (QCString &); 00066 const QString& getString () const 00067 { 00068 return theString; 00069 } 00070 void setString (const QString & _str) 00071 { 00072 theString = _str; 00073 } 00074 00075 protected: 00076 QString theString; 00077 }; 00078 00079 #endif