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

messageviewer

  • MessageViewer
  • PartNodeBodyPart
Public Member Functions | List of all members
MessageViewer::PartNodeBodyPart Class Reference

#include <partnodebodypart.h>

Inheritance diagram for MessageViewer::PartNodeBodyPart:
Inheritance graph
[legend]

Public Member Functions

 PartNodeBodyPart (KMime::Content *topLevelContent, KMime::Content *content, NodeHelper *nodeHelper, const QTextCodec *codec=0)
 
QByteArray asBinary () const
 
QString asText () const
 
KMime::Content * content () const
 
QString contentDescription () const
 
QString contentDispositionParameter (const char *param) const
 
QString contentTypeParameter (const char *param) const
 
BodyPart::Display defaultDisplay () const
 
bool hasCompleteBody () const
 
QString makeLink (const QString &path) const
 
Interface::BodyPartMemento * memento () const
 
NodeHelper * nodeHelper () const
 
void setBodyPartMemento (Interface::BodyPartMemento *memento)
 
void setDefaultDisplay (BodyPart::Display)
 
KMime::Content * topLevelContent () const
 
- Public Member Functions inherited from MessageViewer::Interface::BodyPart
virtual ~BodyPart ()
 

Additional Inherited Members

- Public Types inherited from MessageViewer::Interface::BodyPart
enum  Display { None, AsIcon, Inline }
 

Detailed Description

an implementation of the BodyPart interface using KMime::Content's

Definition at line 55 of file partnodebodypart.h.

Constructor & Destructor Documentation

PartNodeBodyPart::PartNodeBodyPart ( KMime::Content *  topLevelContent,
KMime::Content *  content,
NodeHelper *  nodeHelper,
const QTextCodec *  codec = 0 
)
explicit

Definition at line 52 of file partnodebodypart.cpp.

Member Function Documentation

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

Implements MessageViewer::Interface::BodyPart.

Definition at line 71 of file partnodebodypart.cpp.

QString PartNodeBodyPart::asText ( ) const
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".

Implements MessageViewer::Interface::BodyPart.

Definition at line 65 of file partnodebodypart.cpp.

KMime::Content* MessageViewer::PartNodeBodyPart::content ( ) const
inlinevirtual

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.

Implements MessageViewer::Interface::BodyPart.

Definition at line 73 of file partnodebodypart.h.

QString PartNodeBodyPart::contentDescription ( ) const
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.

Implements MessageViewer::Interface::BodyPart.

Definition at line 79 of file partnodebodypart.cpp.

QString PartNodeBodyPart::contentDispositionParameter ( const char *  parameter) const
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.

Implements MessageViewer::Interface::BodyPart.

Definition at line 83 of file partnodebodypart.cpp.

QString PartNodeBodyPart::contentTypeParameter ( const char *  parameter) const
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.

Implements MessageViewer::Interface::BodyPart.

Definition at line 75 of file partnodebodypart.cpp.

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

Implements MessageViewer::Interface::BodyPart.

Definition at line 105 of file partnodebodypart.cpp.

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

Implements MessageViewer::Interface::BodyPart.

Definition at line 87 of file partnodebodypart.cpp.

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

Implements MessageViewer::Interface::BodyPart.

Definition at line 58 of file partnodebodypart.cpp.

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

Implements MessageViewer::Interface::BodyPart.

Definition at line 92 of file partnodebodypart.cpp.

NodeHelper* MessageViewer::PartNodeBodyPart::nodeHelper ( ) const
inlinevirtual

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.

Implements MessageViewer::Interface::BodyPart.

Definition at line 75 of file partnodebodypart.h.

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

Implements MessageViewer::Interface::BodyPart.

Definition at line 99 of file partnodebodypart.cpp.

void PartNodeBodyPart::setDefaultDisplay ( BodyPart::Display  )

Definition at line 109 of file partnodebodypart.cpp.

KMime::Content* MessageViewer::PartNodeBodyPart::topLevelContent ( ) const
inlinevirtual

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()

Implements MessageViewer::Interface::BodyPart.

Definition at line 74 of file partnodebodypart.h.


The documentation for this class was generated from the following files:
  • partnodebodypart.h
  • partnodebodypart.cpp
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:55:58 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

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