MessageCore::AttachmentPart

Search for usage in LXR

MessageCore::AttachmentPart Class Reference

#include <attachmentpart.h>

Public Types

using List = QList<Ptr>
 
using Ptr = QSharedPointer<AttachmentPart>
 

Public Member Functions

 AttachmentPart ()
 
 ~AttachmentPart ()
 
QByteArray charset () const
 
QByteArray data () const
 
QString description () const
 
KMime::Headers::contentEncoding encoding () const
 
QString fileName () const
 
bool isAutoEncoding () const
 
bool isCompressed () const
 
bool isEncrypted () const
 
bool isInline () const
 
bool isMessageOrMessageCollection () const
 
bool isSigned () const
 
QByteArray mimeType () const
 
QString name () const
 
void setAutoEncoding (bool enabled)
 
void setCharset (const QByteArray &charset)
 
void setCompressed (bool compressed)
 
void setData (const QByteArray &data)
 
void setDescription (const QString &description)
 
void setEncoding (KMime::Headers::contentEncoding encoding)
 
void setEncrypted (bool encrypted)
 
void setFileName (const QString &name)
 
void setInline (bool value)
 
void setMimeType (const QByteArray &mimeType)
 
void setName (const QString &name)
 
void setSigned (bool sign)
 
void setUrl (const QUrl &url)
 
qint64 size () const
 
QUrl url () const
 

Detailed Description

A class that encapsulates an attachment.

Author
Constantin Berzan exit3.nosp@m.219@.nosp@m.gmail.nosp@m..com

Definition at line 25 of file attachmentpart.h.

Member Typedef Documentation

◆ List

Defines a list of pointers to attachment objects.

Definition at line 36 of file attachmentpart.h.

◆ Ptr

Defines a pointer to an attachment object.

Definition at line 31 of file attachmentpart.h.

Constructor & Destructor Documentation

◆ AttachmentPart()

AttachmentPart::AttachmentPart ( )

Creates a new attachment part.

Definition at line 65 of file attachmentpart.cpp.

◆ ~AttachmentPart()

AttachmentPart::~AttachmentPart ( )

Destroys the attachment part.

Definition at line 70 of file attachmentpart.cpp.

Member Function Documentation

◆ charset()

QByteArray AttachmentPart::charset ( ) const
nodiscard

Returns the charset that will be used for the attachment.

Definition at line 143 of file attachmentpart.cpp.

◆ data()

QByteArray AttachmentPart::data ( ) const
nodiscard

Returns the payload data of the attachment.

Definition at line 193 of file attachmentpart.cpp.

◆ description()

QString AttachmentPart::description ( ) const
nodiscard

Returns the description of the attachment.

Definition at line 95 of file attachmentpart.cpp.

◆ encoding()

KMime::Headers::contentEncoding AttachmentPart::encoding ( ) const
nodiscard

Returns the encoding that will be used for the attachment.

Definition at line 131 of file attachmentpart.cpp.

◆ fileName()

QString AttachmentPart::fileName ( ) const
nodiscard

Returns the file name of the attachment.

Definition at line 85 of file attachmentpart.cpp.

◆ isAutoEncoding()

bool AttachmentPart::isAutoEncoding ( ) const
nodiscard

Returns whether encoding of the attachment will be determined automatically.

Definition at line 115 of file attachmentpart.cpp.

◆ isCompressed()

bool AttachmentPart::isCompressed ( ) const
nodiscard

Returns whether the attachment is compressed.

Definition at line 163 of file attachmentpart.cpp.

◆ isEncrypted()

bool AttachmentPart::isEncrypted ( ) const
nodiscard

Returns whether the attachment is encrypted.

Definition at line 173 of file attachmentpart.cpp.

◆ isInline()

bool AttachmentPart::isInline ( ) const
nodiscard

Returns whether the attachment will be displayed inline the message.

Definition at line 105 of file attachmentpart.cpp.

◆ isMessageOrMessageCollection()

bool AttachmentPart::isMessageOrMessageCollection ( ) const
nodiscard

Returns whether the specified attachment part is an encapsulated message (message/rfc822) or a collection of encapsulated messages (multipart/digest)

Definition at line 214 of file attachmentpart.cpp.

◆ isSigned()

bool AttachmentPart::isSigned ( ) const
nodiscard

Returns whether the attachment is signed.

Definition at line 183 of file attachmentpart.cpp.

◆ mimeType()

QByteArray AttachmentPart::mimeType ( ) const
nodiscard

Returns the mime type of the attachment.

Definition at line 153 of file attachmentpart.cpp.

◆ name()

QString AttachmentPart::name ( ) const
nodiscard

Returns the name of the attachment.

Definition at line 75 of file attachmentpart.cpp.

◆ setAutoEncoding()

void AttachmentPart::setAutoEncoding ( bool enabled)

Sets whether encoding of the attachment will be determined automatically.

Definition at line 120 of file attachmentpart.cpp.

◆ setCharset()

void AttachmentPart::setCharset ( const QByteArray & charset)

Sets the charset that will be used for the attachment.

Definition at line 148 of file attachmentpart.cpp.

◆ setCompressed()

void AttachmentPart::setCompressed ( bool compressed)

Sets whether the attachment is compressed.

Definition at line 168 of file attachmentpart.cpp.

◆ setData()

void AttachmentPart::setData ( const QByteArray & data)

Sets the payload data of the attachment.

Definition at line 198 of file attachmentpart.cpp.

◆ setDescription()

void AttachmentPart::setDescription ( const QString & description)

Sets the description of the attachment.

Definition at line 100 of file attachmentpart.cpp.

◆ setEncoding()

void AttachmentPart::setEncoding ( KMime::Headers::contentEncoding encoding)

Sets the encoding that will be used for the attachment.

Note
only applies if isAutoEncoding is false

Definition at line 136 of file attachmentpart.cpp.

◆ setEncrypted()

void AttachmentPart::setEncrypted ( bool encrypted)

Sets whether the attachment is encrypted.

Definition at line 178 of file attachmentpart.cpp.

◆ setFileName()

void AttachmentPart::setFileName ( const QString & name)

Sets the file name of the attachment.

The name will be used in the 'filename=' part of the Content-Disposition header.

Definition at line 90 of file attachmentpart.cpp.

◆ setInline()

void AttachmentPart::setInline ( bool value)

Sets whether the attachment will be displayed inline the message.

Definition at line 110 of file attachmentpart.cpp.

◆ setMimeType()

void AttachmentPart::setMimeType ( const QByteArray & mimeType)

Sets the mimeType of the attachment.

Definition at line 158 of file attachmentpart.cpp.

◆ setName()

void AttachmentPart::setName ( const QString & name)

Sets the name of the attachment.

The name will be used in the 'name=' part of the Content-Type header.

Definition at line 80 of file attachmentpart.cpp.

◆ setSigned()

void AttachmentPart::setSigned ( bool sign)

Sets whether the attachment is signed.

Definition at line 188 of file attachmentpart.cpp.

◆ setUrl()

void AttachmentPart::setUrl ( const QUrl & url)

Definition at line 219 of file attachmentpart.cpp.

◆ size()

qint64 AttachmentPart::size ( ) const
nodiscard

Returns the size of the attachment.

Definition at line 209 of file attachmentpart.cpp.

◆ url()

QUrl AttachmentPart::url ( ) const
nodiscard

Definition at line 224 of file attachmentpart.cpp.


The documentation for this class was generated from the following files:
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Jul 26 2024 11:54:19 by doxygen 1.11.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.