bodypart.h
1 /*
2  bodypart.h
3 
4  This file is part of KMail's plugin interface.
5  Copyright (c) 2004 Marc Mutz <mutz@kde.org>,
6  Ingo Kloecker <kloecker@kde.org>
7 
8  KMail is free software; you can redistribute it and/or modify it
9  under the terms of the GNU General Public License as published by
10  the Free Software Foundation; either version 2 of the License, or
11  (at your option) any later version.
12 
13  KMail is distributed in the hope that it will be useful, but
14  WITHOUT ANY WARRANTY; without even the implied warranty of
15  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16  General Public License for more details.
17 
18  You should have received a copy of the GNU General Public License
19  along with this program; if not, write to the Free Software
20  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
21 
22  In addition, as a special exception, the copyright holders give
23  permission to link the code of this program with any edition of
24  the TQt library by Trolltech AS, Norway (or with modified versions
25  of TQt that use the same license as TQt), and distribute linked
26  combinations including the two. You must obey the GNU General
27  Public License in all respects for all of the code used other than
28  TQt. If you modify this file, you may extend this exception to
29  your version of the file, but you are not obligated to do so. If
30  you do not wish to do so, delete this exception statement from
31  your version.
32 */
33 
34 #ifndef __KMAIL_INTERFACES_BODYPART_H__
35 #define __KMAIL_INTERFACES_BODYPART_H__
36 
37 #include <tqcstring.h>
38 
39 template <typename T> class TQMemArray;
40 class TQString;
41 
42 namespace KMail {
43  namespace Interface {
44 
45  class Observer;
46  class Observable;
47 
52  public:
53  virtual ~BodyPartMemento() {}
54 
61  virtual Observer * asObserver() = 0;
62 
69  virtual Observable * asObservable() = 0;
70  };
71 
75  class BodyPart {
76  public:
77  virtual ~BodyPart() {}
78 
83  virtual TQString makeLink( const TQString & path ) const = 0;
84 
90  virtual TQString asText() const = 0;
91 
96  virtual TQByteArray asBinary() const = 0;
97 
114  virtual TQString contentTypeParameter( const char * parameter ) const = 0;
115 
121  virtual TQString contentDescription() const = 0;
122 
123  //virtual int contentDisposition() const = 0;
133  virtual TQString contentDispositionParameter( const char * parameter ) const = 0;
134 
139  virtual bool hasCompleteBody() const = 0;
140 
145  virtual BodyPartMemento * memento() const = 0;
146 
151  virtual void setBodyPartMemento( BodyPartMemento * ) = 0;
152 
153  enum Display { None, AsIcon, Inline };
157  virtual Display defaultDisplay() const = 0;
158  };
159 
160  } // namespace Interface
161 
162 } // namespace KMail
163 
164 #endif // __KMAIL_INTERFACES_BODYPART_H__
interface of classes that implement status for BodyPartFormatters.
Definition: bodypart.h:51
virtual Observer * asObserver()=0
If your BodyPartMemento implementation also implements the KMail::Observer interface,...
virtual Observable * asObservable()=0
If your BodyPartMemento implementation also implements the KMail::Observable interface,...
interface of message body parts.
Definition: bodypart.h:75
virtual Display defaultDisplay() const =0
virtual TQString makeLink(const TQString &path) const =0
virtual bool hasCompleteBody() const =0
virtual TQString asText() const =0
virtual TQString contentDescription() const =0
virtual void setBodyPartMemento(BodyPartMemento *)=0
virtual TQByteArray asBinary() const =0
virtual TQString contentDispositionParameter(const char *parameter) const =0
virtual BodyPartMemento * memento() const =0
virtual TQString contentTypeParameter(const char *parameter) const =0
observable interface
Definition: observable.h:44
observer interface
Definition: observer.h:44
folderdiaquotatab.h
Definition: aboutdata.cpp:40