00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034 #ifndef __KMAIL_INTERFACES_BODYPART_H__
00035 #define __KMAIL_INTERFACES_BODYPART_H__
00036
00037 #include <tqcstring.h>
00038
00039 template <typename T> class TQMemArray;
00040 class TQString;
00041
00042 namespace KMail {
00043 namespace Interface {
00044
00045 class Observer;
00046 class Observable;
00047
00051 class BodyPartMemento {
00052 public:
00053 virtual ~BodyPartMemento() {}
00054
00061 virtual Observer * asObserver() = 0;
00062
00069 virtual Observable * asObservable() = 0;
00070 };
00071
00075 class BodyPart {
00076 public:
00077 virtual ~BodyPart() {}
00078
00083 virtual TQString makeLink( const TQString & path ) const = 0;
00084
00090 virtual TQString asText() const = 0;
00091
00096 virtual TQByteArray asBinary() const = 0;
00097
00114 virtual TQString contentTypeParameter( const char * parameter ) const = 0;
00115
00121 virtual TQString contentDescription() const = 0;
00122
00123
00133 virtual TQString contentDispositionParameter( const char * parameter ) const = 0;
00134
00139 virtual bool hasCompleteBody() const = 0;
00140
00145 virtual BodyPartMemento * memento() const = 0;
00146
00151 virtual void setBodyPartMemento( BodyPartMemento * ) = 0;
00152
00153 enum Display { None, AsIcon, Inline };
00157 virtual Display defaultDisplay() const = 0;
00158 };
00159
00160 }
00161
00162 }
00163
00164 #endif // __KMAIL_INTERFACES_BODYPART_H__