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

messageviewer

  • MessageViewer
  • Interface
  • BodyPart
Public Types | Public Member Functions | List of all members
MessageViewer::Interface::BodyPart Class Referenceabstract

#include <bodypart.h>

Inheritance diagram for MessageViewer::Interface::BodyPart:
Inheritance graph
[legend]

Public Types

enum  Display { None, AsIcon, Inline }
 

Public Member Functions

virtual ~BodyPart ()
 
virtual QByteArray asBinary () const =0
 
virtual QString asText () const =0
 
virtual KMime::Content * content () const =0
 
virtual QString contentDescription () const =0
 
virtual QString contentDispositionParameter (const char *parameter) const =0
 
virtual QString contentTypeParameter (const char *parameter) const =0
 
virtual Display defaultDisplay () const =0
 
virtual bool hasCompleteBody () const =0
 
virtual QString makeLink (const QString &path) const =0
 
virtual BodyPartMemento * memento () const =0
 
virtual MessageViewer::NodeHelper * nodeHelper () const =0
 
virtual void setBodyPartMemento (BodyPartMemento *)=0
 
virtual KMime::Content * topLevelContent () const =0
 

Detailed Description

interface of message body parts.

Definition at line 83 of file bodypart.h.

Member Enumeration Documentation

enum MessageViewer::Interface::BodyPart::Display
Enumerator
None 
AsIcon 
Inline 

Definition at line 161 of file bodypart.h.

Constructor & Destructor Documentation

virtual MessageViewer::Interface::BodyPart::~BodyPart ( )
inlinevirtual

Definition at line 85 of file bodypart.h.

Member Function Documentation

virtual QByteArray MessageViewer::Interface::BodyPart::asBinary ( ) const
pure virtual
Returns
the decoded (CTE undone) content of the body part, or a null array if this body part instance is of type text.

Implemented in MessageViewer::PartNodeBodyPart.

virtual QString MessageViewer::Interface::BodyPart::asText ( ) const
pure virtual
Returns
the decoded (CTE, canonicalisation, and charset encoding undone) text contained in the body part, or QString(), it the body part is not of type "text".

Implemented in MessageViewer::PartNodeBodyPart.

virtual KMime::Content* MessageViewer::Interface::BodyPart::content ( ) const
pure virtual

Returns the KMime::Content node represented here.

Makes most of the above obsolete and probably should be used in the interfaces in the first place.

Implemented in MessageViewer::PartNodeBodyPart.

virtual QString MessageViewer::Interface::BodyPart::contentDescription ( ) const
pure virtual
Returns
the content of the content-description header field, or QString() if that header is not present in this body part. RFC 2047 encoding is decoded first.

Implemented in MessageViewer::PartNodeBodyPart.

virtual QString MessageViewer::Interface::BodyPart::contentDispositionParameter ( const char *  parameter) const
pure virtual
Returns
the value of the content-disposition header field parameter with name parameter, or QString() if that parameter is not present in the body's content-disposition header field. RFC 2231 encoding is removed first.

The notes made for contentTypeParameter() above apply here as well.

Implemented in MessageViewer::PartNodeBodyPart.

virtual QString MessageViewer::Interface::BodyPart::contentTypeParameter ( const char *  parameter) const
pure virtual
Returns
the value of the content-type header field parameter with name parameter, or QString(), if that that parameter is not present in the body's content-type header field. RFC 2231 encoding is removed first.

Note that this method will suppress queries to certain standard parameters (most notably "charset") to keep plugins decent.

Note2 that this method preserves the case of the parameter value returned. So, if the parameter you want to use defines the value to be case-insensitive (such as the smime-type parameter), you need to make sure you do the casemap yourself before comparing to a reference value.

Implemented in MessageViewer::PartNodeBodyPart.

virtual Display MessageViewer::Interface::BodyPart::defaultDisplay ( ) const
pure virtual
Returns
whether this body part should be displayed iconic or inline

Implemented in MessageViewer::PartNodeBodyPart.

virtual bool MessageViewer::Interface::BodyPart::hasCompleteBody ( ) const
pure virtual
Returns
whether this part already has it's complete body fetched e.g. from an IMAP server.

Implemented in MessageViewer::PartNodeBodyPart.

virtual QString MessageViewer::Interface::BodyPart::makeLink ( const QString &  path) const
pure virtual
Returns
a string respresentation of an URL that can be used to invoke a BodyPartURLHandler for this body part.

Implemented in MessageViewer::PartNodeBodyPart.

virtual BodyPartMemento* MessageViewer::Interface::BodyPart::memento ( ) const
pure virtual
Returns
the BodyPartMemento set for this part, or null, if none is set.

Implemented in MessageViewer::PartNodeBodyPart.

virtual MessageViewer::NodeHelper* MessageViewer::Interface::BodyPart::nodeHelper ( ) const
pure virtual

Ok, this is ugly, exposing the node helper here, but there is too much useful stuff in there for real-world plugins.

Still, there should be a nicer way for this.

Implemented in MessageViewer::PartNodeBodyPart.

virtual void MessageViewer::Interface::BodyPart::setBodyPartMemento ( BodyPartMemento *  )
pure virtual
Returns
register an implementation of the BodyPartMemento interface as a status object with this part.

Implemented in MessageViewer::PartNodeBodyPart.

virtual KMime::Content* MessageViewer::Interface::BodyPart::topLevelContent ( ) const
pure virtual

Returns the top-level content.

Note that this is not necessarily the same as content()->topLevel(), for example the later will not work for "extra nodes", i.e. nodes in encrypted parts of the mail. topLevelContent() will return the correct result in this case. Also note that topLevelContent()

Implemented in MessageViewer::PartNodeBodyPart.


The documentation for this class was generated from the following file:
  • bodypart.h
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:32:46 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