• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdepim API Reference
  • KDE Home
  • Contact Us
 

messageviewer

  • sources
  • kde-4.14
  • kdepim
  • messageviewer
  • interfaces
bodypart.h
Go to the documentation of this file.
1 /* -*- mode: C++; c-file-style: "gnu" -*-
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 Qt library by Trolltech AS, Norway (or with modified versions
25  of Qt that use the same license as Qt), 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  Qt. 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 class QByteArray;
38 class QString;
39 
40 namespace KMime {
41  class Content;
42 }
43 
44 namespace MessageViewer {
45 class NodeHelper;
46 namespace Interface {
47 
48 /*FIXME(Andras) review, port
49  class Observer;
50  class Observable;
51 */
55  class BodyPartMemento {
56  public:
57  virtual ~BodyPartMemento() {}
58 
59  virtual void detach() = 0;
60 #if 0
61 //FIXME(Andras) review, port
68  virtual Observer * asObserver() = 0;
69 
76  virtual Observable * asObservable() = 0;
77 #endif
78  };
79 
83  class BodyPart {
84  public:
85  virtual ~BodyPart() {}
86 
91  virtual QString makeLink( const QString & path ) const = 0;
92 
98  virtual QString asText() const = 0;
99 
104  virtual QByteArray asBinary() const = 0;
105 
122  virtual QString contentTypeParameter( const char * parameter ) const = 0;
123 
129  virtual QString contentDescription() const = 0;
130 
131  //virtual int contentDisposition() const = 0;
141  virtual QString contentDispositionParameter( const char * parameter ) const = 0;
142 
147  virtual bool hasCompleteBody() const = 0;
148 
153  virtual BodyPartMemento * memento() const = 0;
154 
159  virtual void setBodyPartMemento( BodyPartMemento * ) = 0;
160 
161  enum Display { None, AsIcon, Inline };
165  virtual Display defaultDisplay() const = 0;
166 
170  virtual KMime::Content* content() const = 0;
171 
179  virtual KMime::Content* topLevelContent() const = 0;
180 
185  virtual MessageViewer::NodeHelper* nodeHelper() const = 0;
186  };
187 
188 } // namespace Interface
189 
190 }
191 
192 #endif // __KMAIL_INTERFACES_BODYPART_H__
MessageViewer::Interface::BodyPart::hasCompleteBody
virtual bool hasCompleteBody() const =0
MessageViewer::Interface::BodyPart
interface of message body parts.
Definition: bodypart.h:83
QByteArray
MessageViewer::Interface::BodyPart::AsIcon
Definition: bodypart.h:161
MessageViewer::Interface::BodyPart::Inline
Definition: bodypart.h:161
MessageViewer::Interface::BodyPart::nodeHelper
virtual MessageViewer::NodeHelper * nodeHelper() const =0
Ok, this is ugly, exposing the node helper here, but there is too much useful stuff in there for real...
MessageViewer::Interface::BodyPart::contentDispositionParameter
virtual QString contentDispositionParameter(const char *parameter) const =0
MessageViewer::Interface::BodyPartMemento::~BodyPartMemento
virtual ~BodyPartMemento()
Definition: bodypart.h:57
MessageViewer::Interface::BodyPart::topLevelContent
virtual KMime::Content * topLevelContent() const =0
Returns the top-level content.
MessageViewer::Interface::BodyPart::contentTypeParameter
virtual QString contentTypeParameter(const char *parameter) const =0
MessageViewer::Interface::BodyPart::asBinary
virtual QByteArray asBinary() const =0
QString
MessageViewer::Interface::BodyPart::None
Definition: bodypart.h:161
MessageViewer::Interface::BodyPart::~BodyPart
virtual ~BodyPart()
Definition: bodypart.h:85
MessageViewer::Interface::BodyPart::setBodyPartMemento
virtual void setBodyPartMemento(BodyPartMemento *)=0
MessageViewer::Interface::BodyPart::memento
virtual BodyPartMemento * memento() const =0
MessageViewer::Interface::BodyPart::makeLink
virtual QString makeLink(const QString &path) const =0
MessageViewer::Interface::BodyPart::Display
Display
Definition: bodypart.h:161
MessageViewer::Interface::BodyPartMemento
interface of classes that implement status for BodyPartFormatters.
Definition: bodypart.h:55
MessageViewer::NodeHelper
Definition: nodehelper.h:74
MessageViewer::Interface::BodyPart::defaultDisplay
virtual Display defaultDisplay() const =0
MessageViewer::Interface::BodyPartMemento::detach
virtual void detach()=0
MessageViewer::Interface::BodyPart::contentDescription
virtual QString contentDescription() const =0
MessageViewer::Interface::BodyPart::asText
virtual QString asText() const =0
MessageViewer::Interface::BodyPart::content
virtual KMime::Content * content() const =0
Returns the KMime::Content node represented here.
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:32:45 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

messageviewer

Skip menu "messageviewer"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

kdepim API Reference

Skip menu "kdepim API Reference"
  • akonadi_next
  • akregator
  • blogilo
  • calendarsupport
  • console
  •   kabcclient
  •   konsolekalendar
  • kaddressbook
  • kalarm
  •   lib
  • kdgantt2
  • kjots
  • kleopatra
  • kmail
  • knode
  • knotes
  • kontact
  • korgac
  • korganizer
  • ktimetracker
  • libkdepim
  • libkleo
  • libkpgp
  • mailcommon
  • messagelist
  • messageviewer
  • pimprint

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal