• 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
interfaces/bodypartformatter.h
Go to the documentation of this file.
1 /* -*- mode: C++; c-file-style: "gnu" -*-
2  bodypartformatter.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_INTERFACE_BODYPARTFORMATTER_H__
35 #define __KMAIL_INTERFACE_BODYPARTFORMATTER_H__
36 
37 #include <QObject>
38 
39 namespace MessageViewer {
40 
41  class HtmlWriter;
42 
43 namespace Interface {
44 
45  class BodyPart;
46  class BodyPartURLHandler;
47 
48  class BodyPartFormatter {
49  public:
50  virtual ~BodyPartFormatter() {}
51 
58  enum Result { Ok, NeedContent, AsIcon, Failed };
59 
66  virtual Result format( BodyPart * part, HtmlWriter * writer ) const = 0;
67 
74  virtual Result format( BodyPart * part, HtmlWriter * writer, QObject* asyncResultObserver ) const
75  {
76  Q_UNUSED( asyncResultObserver );
77  return format( part, writer );
78  }
79  };
80 
94  class BodyPartFormatterPlugin {
95  public:
96  virtual ~BodyPartFormatterPlugin() {}
97 
98  virtual const BodyPartFormatter * bodyPartFormatter( int idx ) const = 0;
99  virtual const char * type( int idx ) const = 0;
100  virtual const char * subtype( int idx ) const = 0;
101 
102  virtual const BodyPartURLHandler * urlHandler( int idx ) const = 0;
103  };
104 
105 } // namespace Interface
106 
107 }
108 #endif // __KMAIL_INTERFACE_BODYPARTFORMATTER_H__
MessageViewer::Interface::BodyPartFormatterPlugin
interface for BodyPartFormatter plugins
Definition: interfaces/bodypartformatter.h:94
MessageViewer::Interface::BodyPartFormatter
Definition: interfaces/bodypartformatter.h:48
MessageViewer::Interface::BodyPart
interface of message body parts.
Definition: bodypart.h:83
MessageViewer::Interface::BodyPartFormatter::NeedContent
Definition: interfaces/bodypartformatter.h:58
MessageViewer::Interface::BodyPartFormatterPlugin::subtype
virtual const char * subtype(int idx) const =0
MessageViewer::Interface::BodyPartFormatterPlugin::type
virtual const char * type(int idx) const =0
MessageViewer::Interface::BodyPartFormatter::Failed
Definition: interfaces/bodypartformatter.h:58
MessageViewer::Interface::BodyPartFormatter::~BodyPartFormatter
virtual ~BodyPartFormatter()
Definition: interfaces/bodypartformatter.h:50
MessageViewer::Interface::BodyPartFormatter::Ok
Definition: interfaces/bodypartformatter.h:58
MessageViewer::Interface::BodyPartFormatterPlugin::urlHandler
virtual const BodyPartURLHandler * urlHandler(int idx) const =0
MessageViewer::Interface::BodyPartFormatterPlugin::bodyPartFormatter
virtual const BodyPartFormatter * bodyPartFormatter(int idx) const =0
MessageViewer::Interface::BodyPartFormatter::format
virtual Result format(BodyPart *part, HtmlWriter *writer, QObject *asyncResultObserver) const
Variant of format that allows implementors to hook notifications up to a listener interested in the r...
Definition: interfaces/bodypartformatter.h:74
QObject
MessageViewer::Interface::BodyPartURLHandler
An interface to body part reader link handlers.
Definition: bodyparturlhandler.h:71
MessageViewer::Interface::BodyPartFormatter::Result
Result
Definition: interfaces/bodypartformatter.h:58
MessageViewer::Interface::BodyPartFormatterPlugin::~BodyPartFormatterPlugin
virtual ~BodyPartFormatterPlugin()
Definition: interfaces/bodypartformatter.h:96
MessageViewer::Interface::BodyPartFormatter::AsIcon
Definition: interfaces/bodypartformatter.h:58
MessageViewer::Interface::BodyPartFormatter::format
virtual Result format(BodyPart *part, HtmlWriter *writer) const =0
Format body part part by generating some HTML and writing that to writer.
MessageViewer::Interface::HtmlWriter
Definition: htmlwriter.h:46
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