KMIME Library
kmime_headers.cpp
Go to the documentation of this file.
106subclass::subclass( Content *parent, const QByteArray &s ) : baseclass( new subclass##Private, parent ) \
241Unstructured::Unstructured( Content *p, const QByteArray &s ) : Base( new UnstructuredPrivate, p )
246Unstructured::Unstructured( Content *p, const QString &s, const QByteArray &cs ) : Base( new UnstructuredPrivate, p )
309Structured::Structured( Content *p, const QString &s, const QByteArray &cs ) : Base( new StructuredPrivate, p )
355Address::Address( Content *p, const QString &s, const QByteArray &cs ) : Structured( new AddressPrivate, p )
Content * parent() const
Returns the parent content object, or 0 if the content doesn't have a parent.
Definition: kmime_content.cpp:974
virtual const char * type() const
Returns the type of this header (e.g.
Definition: kmime_headers.cpp:202
virtual QByteArray as7BitString(bool withHeaderType=true) const =0
Returns the encoded header.
virtual void fromUnicodeString(const QString &s, const QByteArray &b)=0
Parses the given string and set the charset.
virtual void from7BitString(const QByteArray &s)=0
Parses the given string.
void setRFC2047Charset(const QByteArray &cs)
Sets the charset for RFC2047-encoding.
Definition: kmime_headers.cpp:187
QByteArray rfc2047Charset() const
Returns the charset that is used for RFC2047-encoding.
Definition: kmime_headers.cpp:178
bool forceDefaultCharset() const
Returns if the default charset is mandatory.
Definition: kmime_headers.cpp:192
QByteArray typeIntro() const
Helper method, returns the header prefix including ":".
Definition: kmime_headers.cpp:222
Base(KMime::Content *parent=0)
Creates an empty header with a parent-content.
Definition: kmime_headers.cpp:148
void setParent(KMime::Content *parent)
Sets the parent for this header to parent.
Definition: kmime_headers.cpp:173
Represents a "Content-Description" header.
Definition: kmime_headers.h:1287
Represents a "Content-Disposition" header.
Definition: kmime_headers.h:1183
bool parse(const char *&scursor, const char *const send, bool isCRLF=false)
This method parses the raw header and needs to be implemented in every sub-class.
Definition: kmime_headers.cpp:2211
void setDisposition(contentDisposition disp)
Sets the content disposition.
Definition: kmime_headers.cpp:2195
contentDisposition disposition() const
Returns the content disposition.
Definition: kmime_headers.cpp:2190
virtual bool isEmpty() const
Checks if this header contains any data.
Definition: kmime_headers.cpp:2178
QString filename() const
Returns the suggested filename for the associated MIME part.
Definition: kmime_headers.cpp:2201
void setFilename(const QString &filename)
Sets the suggested filename for the associated MIME part.
Definition: kmime_headers.cpp:2206
Represents a "Content-Location" header.
Definition: kmime_headers.h:1296
Represents a "Content-Transfer-Encoding" header.
Definition: kmime_headers.h:891
bool needToEncode() const
Returns whether the Content containing this header needs to be encoded (i.e., if decoded() is true an...
Definition: kmime_headers.cpp:2117
void setDecoded(bool decoded=true)
Set whether the Content containing this header is already decoded.
Definition: kmime_headers.cpp:2111
virtual bool parse(const char *&scursor, const char *const send, bool isCRLF=false)
This method parses the raw header and needs to be implemented in every sub-class.
Definition: kmime_headers.cpp:2123
bool decoded() const
Returns whether the Content containing this header is already decoded.
Definition: kmime_headers.cpp:2106
contentEncoding encoding() const
Returns the encoding specified in this header.
Definition: kmime_headers.cpp:2088
QByteArray mediaType() const
Returns the media type (first part of the mimetype).
Definition: kmime_headers.cpp:1749
void setName(const QString &s, const QByteArray &cs)
Sets the name to s using charset cs.
Definition: kmime_headers.cpp:1864
bool isImage() const
Returns true if the associated MIME entity is an image.
Definition: kmime_headers.cpp:1819
bool isMediatype(const char *mediatype) const
Tests if the media type equals mediatype.
Definition: kmime_headers.cpp:1784
int partialCount() const
Returns the total number of parts in a multi-part set.
Definition: kmime_headers.cpp:1891
bool isSubtype(const char *subtype) const
Tests if the mime sub-type equals subtype.
Definition: kmime_headers.cpp:1792
QByteArray charset() const
Returns the charset for the associated MIME entity.
Definition: kmime_headers.cpp:1834
QByteArray subType() const
Returns the mime sub-type (second part of the mimetype).
Definition: kmime_headers.cpp:1760
bool isPlainText() const
Returns true if the associated MIME entity is a plain text.
Definition: kmime_headers.cpp:1809
int partialNumber() const
Returns the position of this part in a multi-part set.
Definition: kmime_headers.cpp:1881
bool isText() const
Returns true if the associated MIME entity is a text.
Definition: kmime_headers.cpp:1804
bool isHTMLText() const
Returns true if the associated MIME entity is a HTML file.
Definition: kmime_headers.cpp:1814
QString name() const
Returns the name of the associated MIME entity.
Definition: kmime_headers.cpp:1859
void setPartialParams(int total, int number)
Sets parameters of a partial MIME entity.
Definition: kmime_headers.cpp:1912
bool isMultipart() const
Returns true if the associated MIME entity is a mulitpart container.
Definition: kmime_headers.cpp:1824
void setMimeType(const QByteArray &mimeType)
Sets the mimetype and clears already existing parameters.
Definition: kmime_headers.cpp:1771
QByteArray id() const
Returns the identifier of the associated MIME entity.
Definition: kmime_headers.cpp:1871
bool isPartial() const
Returns true if the associated MIME entity contains partial data.
Definition: kmime_headers.cpp:1829
virtual bool isEmpty() const
Checks if this header contains any data.
Definition: kmime_headers.cpp:1711
virtual QByteArray as7BitString(bool withHeaderType=true) const
Returns the encoded header.
Definition: kmime_headers.cpp:1724
bool parse(const char *&scursor, const char *const send, bool isCRLF=false)
This method parses the raw header and needs to be implemented in every sub-class.
Definition: kmime_headers.cpp:1918
QByteArray boundary() const
Returns the boundary (for mulitpart containers).
Definition: kmime_headers.cpp:1849
void setBoundary(const QByteArray &s)
Sets the mulitpart container boundary.
Definition: kmime_headers.cpp:1854
void setCancel(const QByteArray &msgid)
Changes this header into a cancel control message for the given message-id.
Definition: kmime_headers.cpp:1362
virtual bool isEmpty() const
Checks if this header contains any data.
Definition: kmime_headers.cpp:1342
bool parse(const char *&scursor, const char *const send, bool isCRLF=false)
This method parses the raw header and needs to be implemented in every sub-class.
Definition: kmime_headers.cpp:1369
bool isCancel() const
Returns true if this is a cancel control message.
Definition: kmime_headers.cpp:1357
QByteArray parameter() const
Returns the control message parameter.
Definition: kmime_headers.cpp:1352
KDateTime dateTime() const
Returns the date contained in this header.
Definition: kmime_headers.cpp:1522
virtual bool isEmpty() const
Checks if this header contains any data.
Definition: kmime_headers.cpp:1517
bool parse(const char *&scursor, const char *const send, bool isCRLF=false)
This method parses the raw header and needs to be implemented in every sub-class.
Definition: kmime_headers.cpp:1539
Represents an arbitrary header, that can contain any header-field.
Definition: kmime_headers.h:1240
virtual const char * type() const
Returns the type of this header (e.g.
Definition: kmime_headers.cpp:1276
virtual bool isEmpty() const
Checks if this header contains any data.
Definition: kmime_headers.cpp:1271
Base class for headers that deal with (possibly multiple) addresses, allowing groups.
Definition: kmime_headers.h:481
QStringList prettyAddresses() const
Returns a list of assembled display name / address strings of the following form: "Display Name <addr...
Definition: kmime_headers.cpp:626
Base class for all address related headers.
Definition: kmime_headers.h:367
Base class for headers containing a dot atom.
Definition: kmime_headers.h:677
bool parse(const char *&scursor, const char *const send, bool isCRLF=false)
This method parses the raw header and needs to be implemented in every sub-class.
Definition: kmime_headers.cpp:856
virtual bool isEmpty() const
Checks if this header contains any data.
Definition: kmime_headers.cpp:851
virtual QString asUnicodeString() const
Returns the decoded content of the header without the header-type.
Definition: kmime_headers.cpp:840
Base class for headers which deal with a list of msg-id's.
Definition: kmime_headers.h:546
QList< QByteArray > identifiers() const
Returns the list of identifiers contained in this header.
Definition: kmime_headers.cpp:1056
virtual bool isEmpty() const
Checks if this header contains any data.
Definition: kmime_headers.cpp:1007
bool parse(const char *&scursor, const char *const send, bool isCRLF=false)
This method parses the raw header and needs to be implemented in every sub-class.
Definition: kmime_headers.cpp:1012
void appendIdentifier(const QByteArray &id)
Appends a new identifier to this header.
Definition: kmime_headers.cpp:1070
Base class for headers that deal with (possibly multiple) addresses, but don't allow groups.
Definition: kmime_headers.h:390
QStringList prettyAddresses() const
Returns a list of assembled display name / address strings of the following form: "Display Name <addr...
Definition: kmime_headers.cpp:466
Base class for headers containing a parameter list such as "Content-Type".
Definition: kmime_headers.h:700
virtual bool isEmpty() const
Checks if this header contains any data.
Definition: kmime_headers.cpp:940
QString parameter(const QString &key) const
Returns the value of the specified parameter.
Definition: kmime_headers.cpp:924
void setParameter(const QString &key, const QString &value)
Sets the parameter key to value.
Definition: kmime_headers.cpp:934
bool hasParameter(const QString &key) const
Definition: kmime_headers.cpp:929
virtual bool parse(const char *&scursor, const char *const send, bool isCRLF=false)
This method parses the raw header and needs to be implemented in every sub-class.
Definition: kmime_headers.cpp:951
Base class for headers containing a list of phrases.
Definition: kmime_headers.h:649
virtual bool isEmpty() const
Checks if this header contains any data.
Definition: kmime_headers.cpp:770
bool parse(const char *&scursor, const char *const send, bool isCRLF=false)
This method parses the raw header and needs to be implemented in every sub-class.
Definition: kmime_headers.cpp:780
QStringList phrases() const
Returns the list of phrases contained in this header.
Definition: kmime_headers.cpp:775
virtual QString asUnicodeString() const
Returns the decoded content of the header without the header-type.
Definition: kmime_headers.cpp:759
Base class for headers which deal with a single msg-id.
Definition: kmime_headers.h:585
bool parse(const char *&scursor, const char *const send, bool isCRLF=false)
This method parses the raw header and needs to be implemented in every sub-class.
Definition: kmime_headers.cpp:1125
Base class for headers that deal with exactly one mailbox (e.g.
Definition: kmime_headers.h:457
Base class for structured header fields.
Definition: kmime_headers.h:330
virtual void from7BitString(const QByteArray &s)
Parses the given string.
Definition: kmime_headers.cpp:320
virtual QString asUnicodeString() const
Returns the decoded content of the header without the header-type.
Definition: kmime_headers.cpp:330
virtual void fromUnicodeString(const QString &s, const QByteArray &b)
Parses the given string and set the charset.
Definition: kmime_headers.cpp:335
virtual bool parse(const char *&scursor, const char *const send, bool isCRLF=false)=0
This method parses the raw header and needs to be implemented in every sub-class.
Base class for headers which deal with a single atom.
Definition: kmime_headers.h:616
bool parse(const char *&scursor, const char *const send, bool isCRLF=false)
This method parses the raw header and needs to be implemented in every sub-class.
Definition: kmime_headers.cpp:703
virtual bool isEmpty() const
Checks if this header contains any data.
Definition: kmime_headers.cpp:687
Abstract base class for unstructured header fields (e.g.
Definition: kmime_headers.h:271
virtual QString asUnicodeString() const
Returns the decoded content of the header without the header-type.
Definition: kmime_headers.cpp:280
virtual void from7BitString(const QByteArray &s)
Parses the given string.
Definition: kmime_headers.cpp:255
virtual void fromUnicodeString(const QString &s, const QByteArray &b)
Parses the given string and set the charset.
Definition: kmime_headers.cpp:273
virtual QString asUnicodeString() const
Returns the decoded content of the header without the header-type.
Definition: kmime_headers.cpp:1661
virtual bool isEmpty() const
Checks if this header contains any data.
Definition: kmime_headers.cpp:1675
void setNumberOfLines(int lines)
Sets the number of lines to lines.
Definition: kmime_headers.cpp:1685
int numberOfLines() const
Returns the number of lines, undefined if isEmpty() returns true.
Definition: kmime_headers.cpp:1680
bool parse(const char *&scursor, const char *const send, bool isCRLF=false)
This method parses the raw header and needs to be implemented in every sub-class.
Definition: kmime_headers.cpp:1691
virtual bool isEmpty() const
Checks if this header contains any data.
Definition: kmime_headers.cpp:1436
virtual bool parse(const char *&scursor, const char *const send, bool isCRLF=false)
This method parses the raw header and needs to be implemented in every sub-class.
Definition: kmime_headers.cpp:1465
virtual QString asUnicodeString() const
Returns the decoded content of the header without the header-type.
Definition: kmime_headers.cpp:1414
bool neverCopy() const
Returns true if a mail copy was explicitly denied.
Definition: kmime_headers.cpp:1453
bool alwaysCopy() const
Returns true if a mail copy was explicitly requested.
Definition: kmime_headers.cpp:1441
virtual QByteArray as7BitString(bool withHeaderType=true) const
Returns the encoded header.
Definition: kmime_headers.cpp:1554
void setGroups(const QList< QByteArray > &groups)
Sets the newsgroup list.
Definition: kmime_headers.cpp:1604
bool isCrossposted() const
Returns true if this message has been cross-posted, i.e.
Definition: kmime_headers.cpp:1610
virtual QString asUnicodeString() const
Returns the decoded content of the header without the header-type.
Definition: kmime_headers.cpp:1583
virtual bool isEmpty() const
Checks if this header contains any data.
Definition: kmime_headers.cpp:1594
bool parse(const char *&scursor, const char *const send, bool isCRLF=false)
This method parses the raw header and needs to be implemented in every sub-class.
Definition: kmime_headers.cpp:1615
virtual void fromUnicodeString(const QString &s, const QByteArray &b)
Parses the given string and set the charset.
Definition: kmime_headers.cpp:1575
bool parse(const char *&scursor, const char *const send, bool isCRLF=false)
This method parses the raw header and needs to be implemented in every sub-class.
Definition: kmime_headers.cpp:1177
virtual bool isEmpty() const
Checks if this header contains any data.
Definition: kmime_headers.cpp:1171
Represents an (email address, display name) pair according RFC 2822, section 3.4.
Definition: kmime_header_parsing.h:70
QString prettyAddress() const
Returns a assembled display name / address string of the following form: "Display Name <address>".
Definition: kmime_header_parsing.cpp:176
QByteArray as7BitString(const QByteArray &encCharset) const
Returns a 7bit transport encoded representation of this mailbox.
Definition: kmime_header_parsing.cpp:208
bool hasName() const
Returns true if this mailbox has a display name.
Definition: kmime_header_parsing.cpp:171
void setAddress(const AddrSpec &addr)
Sets the email address.
Definition: kmime_header_parsing.cpp:136
QByteArray address() const
Returns a string representation of the email address, without the angle brackets.
Definition: kmime_header_parsing.cpp:115
This file is part of the API for handling MIME data and defines the Codec class.
This file is part of the API for handling MIME data and defines the Content class.
This file is part of the API for handling MIME data and defines the HeaderFactory class.
Base * createHeader(const QByteArray &type)
Creates a header based on.
Definition: kmime_headers.cpp:2263
This file is part of the API for handling MIME data and defines the various header classes:
contentEncoding
Various possible values for the "Content-Transfer-Encoding" header.
Definition: kmime_headers.h:74
contentDisposition
Various possible values for the "Content-Disposition" header.
Definition: kmime_headers.h:86
This file is part of the KDE documentation.
Documentation copyright © 1996-2022 The KDE developers.
Generated on Thu Jul 21 2022 00:00:00 by doxygen 1.9.5 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2022 The KDE developers.
Generated on Thu Jul 21 2022 00:00:00 by doxygen 1.9.5 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.