tdeioslave/imap4

mimeio.h
1/***************************************************************************
2 mimeio.h - description
3 -------------------
4 begin : Wed Oct 25 2000
5 copyright : (C) 2000 by Sven Carstens
6 email : s.carstens@gmx.de
7 ***************************************************************************/
8
9/***************************************************************************
10 * *
11 * This program is free software; you can redistribute it and/or modify *
12 * it under the terms of the GNU General Public License as published by *
13 * the Free Software Foundation; either version 2 of the License, or *
14 * (at your option) any later version. *
15 * *
16 ***************************************************************************/
17
18#ifndef MIMEIO_H
19#define MIMEIO_H
20
21#include <tqcstring.h>
22#include <tqfile.h>
23
28class mimeIO
29{
30public:
31 mimeIO ();
32 virtual ~ mimeIO ();
33
34 virtual int outputLine (const TQCString &, int len = -1);
35 virtual int outputMimeLine (const TQCString &);
36 virtual int inputLine (TQCString &);
37 virtual int outputChar (char);
38 virtual int inputChar (char &);
39
40 void setCRLF (const char *);
41
42protected:
43 TQCString theCRLF;
44 int crlfLen;
45};
46
47class mimeIOTQFile:public mimeIO
48{
49public:
50 mimeIOTQFile (const TQString &);
51 virtual ~ mimeIOTQFile ();
52 virtual int outputLine (const TQCString &, int len = -1);
53 virtual int inputLine (TQCString &);
54
55protected:
56 TQFile myFile;
57};
58
59class mimeIOTQString:public mimeIO
60{
61public:
62 mimeIOTQString ();
63 virtual ~ mimeIOTQString ();
64 virtual int outputLine (const TQCString &, int len = -1);
65 virtual int inputLine (TQCString &);
66 const TQString& getString () const
67 {
68 return theString;
69 }
70 void setString (const TQString & _str)
71 {
72 theString = _str;
73 }
74
75protected:
76 TQString theString;
77};
78
79#endif
Definition: mimeio.h:29