KMIME Library
kmime_headers.cpp
Go to the documentation of this file.
106 subclass::subclass( Content *parent, const QByteArray &s ) : baseclass( new subclass##Private, parent ) \
241 Unstructured::Unstructured( Content *p, const QByteArray &s ) : Base( new UnstructuredPrivate, p )
246 Unstructured::Unstructured( Content *p, const QString &s, const QByteArray &cs ) : Base( new UnstructuredPrivate, p )
309 Structured::Structured( Content *p, const QString &s, const QByteArray &cs ) : Base( new StructuredPrivate, p )
355 Address::Address( Content *p, const QString &s, const QByteArray &cs ) : Structured( new AddressPrivate, p )
This file is part of the API for handling MIME data and defines the Codec class.
virtual QString asUnicodeString() const
Returns the decoded content of the header without the header-type.
Definition: kmime_headers.cpp:1583
virtual QByteArray as7BitString(bool withHeaderType=true) const =0
Returns the encoded header.
Base class for headers that deal with exactly one mailbox (e.g.
Definition: kmime_headers.h:456
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
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
QStringList phrases() const
Returns the list of phrases contained in this header.
Definition: kmime_headers.cpp:775
Represents a "Content-Disposition" header.
Definition: kmime_headers.h:1182
bool forceDefaultCharset() const
Returns if the default charset is mandatory.
Definition: kmime_headers.cpp:192
Content * parent() const
Returns the parent content object, or 0 if the content doesn't have a parent.
Definition: kmime_content.cpp:974
virtual bool isEmpty() const
Checks if this header contains any data.
Definition: kmime_headers.cpp:770
QString prettyAddress() const
Returns a assembled display name / address string of the following form: "Display Name <address>"...
Definition: kmime_header_parsing.cpp:176
QByteArray typeIntro() const
Helper method, returns the header prefix including ":".
Definition: kmime_headers.cpp:222
This file is part of the API for handling MIME data and defines the Content class.
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
QByteArray parameter() const
Returns the control message parameter.
Definition: kmime_headers.cpp:1352
QStringList displayNames() const
Returns a list of all display names associated with the addresses in this header. ...
Definition: kmime_headers.cpp:457
Represents an (email address, display name) pair according RFC 2822, section 3.4. ...
Definition: kmime_header_parsing.h:69
Base class for headers that deal with (possibly multiple) addresses, but don't allow groups...
Definition: kmime_headers.h:389
void setMimeType(const QByteArray &mimeType)
Sets the mimetype and clears already existing parameters.
Definition: kmime_headers.cpp:1771
bool isImage() const
Returns true if the associated MIME entity is an image.
Definition: kmime_headers.cpp:1819
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
virtual void fromUnicodeString(const QString &s, const QByteArray &b)
Parses the given string and set the charset.
Definition: kmime_headers.cpp:273
virtual bool isEmpty() const
Checks if this header contains any data.
Definition: kmime_headers.cpp:2178
bool isPartial() const
Returns true if the associated MIME entity contains partial data.
Definition: kmime_headers.cpp:1829
QByteArray mediaType() const
Returns the media type (first part of the mimetype).
Definition: kmime_headers.cpp:1749
QByteArray charset() const
Returns the charset for the associated MIME entity.
Definition: kmime_headers.cpp:1834
bool hasParameter(const QString &key) const
Definition: kmime_headers.cpp:929
Definition: boolflags.h:34
QStringList displayNames() const
Returns a list of all display names associated with the addresses in this header. ...
Definition: kmime_headers.cpp:615
QString name() const
Returns the name of the associated MIME entity.
Definition: kmime_headers.cpp:1859
virtual QByteArray as7BitString(bool withHeaderType=true) const
Returns the encoded header.
Definition: kmime_headers.cpp:1554
void setName(const QString &s, const QByteArray &cs)
Sets the name to s using charset cs.
Definition: kmime_headers.cpp:1864
virtual const char * type() const
Returns the type of this header (e.g.
Definition: kmime_headers.cpp:1276
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
void setDisposition(contentDisposition disp)
Sets the content disposition.
Definition: kmime_headers.cpp:2195
Base class for all address related headers.
Definition: kmime_headers.h:366
Definition: kmime_header_parsing.cpp:229
virtual QString asUnicodeString() const
Returns the decoded content of the header without the header-type.
Definition: kmime_headers.cpp:416
QString filename() const
Returns the suggested filename for the associated MIME part.
Definition: kmime_headers.cpp:2201
bool isHTMLText() const
Returns true if the associated MIME entity is a HTML file.
Definition: kmime_headers.cpp:1814
Base class for headers that deal with (possibly multiple) addresses, allowing groups.
Definition: kmime_headers.h:480
Definition: kmime_header_parsing.h:39
Base * createHeader(const QByteArray &type)
Creates a header based on.
Definition: kmime_headers.cpp:2263
QStringList prettyAddresses() const
Returns a list of assembled display name / address strings of the following form: "Display Name <addr...
Definition: kmime_headers.cpp:626
QByteArray boundary() const
Returns the boundary (for mulitpart containers).
Definition: kmime_headers.cpp:1849
virtual bool isEmpty() const
Checks if this header contains any data.
Definition: kmime_headers.cpp:1594
void setCancel(const QByteArray &msgid)
Changes this header into a cancel control message for the given message-id.
Definition: kmime_headers.cpp:1362
Definition: kmime_header_parsing.cpp:49
contentDisposition
Various possible values for the "Content-Disposition" header.
Definition: kmime_headers.h:86
contentEncoding encoding() const
Returns the encoding specified in this header.
Definition: kmime_headers.cpp:2088
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
void setDecoded(bool decoded=true)
Set whether the Content containing this header is already decoded.
Definition: kmime_headers.cpp:2111
Types::Mailbox::List mailboxes() const
Returns a list of mailboxes listed in this header.
Definition: kmime_headers.cpp:637
virtual bool isEmpty() const
Checks if this header contains any data.
Definition: kmime_headers.cpp:1171
bool alwaysCopy() const
Returns true if a mail copy was explicitly requested.
Definition: kmime_headers.cpp:1441
Represents an arbitrary header, that can contain any header-field.
Definition: kmime_headers.h:1239
void setAddress(const AddrSpec &addr)
Sets the email address.
Definition: kmime_header_parsing.cpp:136
bool isText() const
Returns true if the associated MIME entity is a text.
Definition: kmime_headers.cpp:1804
void setGroups(const QList< QByteArray > &groups)
Sets the newsgroup list.
Definition: kmime_headers.cpp:1604
Base class for headers containing a parameter list such as "Content-Type".
Definition: kmime_headers.h:699
Base class for headers containing a dot atom.
Definition: kmime_headers.h:676
virtual bool isEmpty() const
Checks if this header contains any data.
Definition: kmime_headers.cpp:1342
contentDisposition disposition() const
Returns the content disposition.
Definition: kmime_headers.cpp:2190
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
virtual void fromUnicodeString(const QString &s, const QByteArray &b)
Parses the given string and set the charset.
Definition: kmime_headers.cpp:409
bool neverCopy() const
Returns true if a mail copy was explicitly denied.
Definition: kmime_headers.cpp:1453
bool isPlainText() const
Returns true if the associated MIME entity is a plain text.
Definition: kmime_headers.cpp:1809
void appendIdentifier(const QByteArray &id)
Appends a new identifier to this header.
Definition: kmime_headers.cpp:1070
Base class for headers containing a list of phrases.
Definition: kmime_headers.h:648
void setNumberOfLines(int lines)
Sets the number of lines to lines.
Definition: kmime_headers.cpp:1685
void setParent(KMime::Content *parent)
Sets the parent for this header to parent.
Definition: kmime_headers.cpp:173
This file is part of the API for handling MIME data and defines the various header classes: ...
virtual bool isEmpty() const
Checks if this header contains any data.
Definition: kmime_headers.cpp:940
bool isMediatype(const char *mediatype) const
Tests if the media type equals mediatype.
Definition: kmime_headers.cpp:1784
QByteArray subType() const
Returns the mime sub-type (second part of the mimetype).
Definition: kmime_headers.cpp:1760
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:480
QByteArray address() const
Returns a string representation of the email address, without the angle brackets. ...
Definition: kmime_header_parsing.cpp:115
virtual void from7BitString(const QByteArray &s)
Parses the given string.
Definition: kmime_headers.cpp:255
virtual bool isEmpty() const
Checks if this header contains any data.
Definition: kmime_headers.cpp:1675
void setPartialParams(int total, int number)
Sets parameters of a partial MIME entity.
Definition: kmime_headers.cpp:1912
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
QList< QByteArray > groups() const
Returns the list of newsgroups.
Definition: kmime_headers.cpp:1599
virtual QString asUnicodeString() const
Returns the decoded content of the header without the header-type.
Definition: kmime_headers.cpp:1414
int partialNumber() const
Returns the position of this part in a multi-part set.
Definition: kmime_headers.cpp:1881
QByteArray as7BitString(const QByteArray &encCharset) const
Returns a 7bit transport encoded representation of this mailbox.
Definition: kmime_header_parsing.cpp:208
Represents a "Content-Location" header.
Definition: kmime_headers.h:1295
void setBoundary(const QByteArray &s)
Sets the mulitpart container boundary.
Definition: kmime_headers.cpp:1854
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
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
virtual void fromUnicodeString(const QString &s, const QByteArray &b)
Parses the given string and set the charset.
Definition: kmime_headers.cpp:561
virtual bool isEmpty() const
Checks if this header contains any data.
Definition: kmime_headers.cpp:1711
KDateTime dateTime() const
Returns the date contained in this header.
Definition: kmime_headers.cpp:1522
virtual void fromUnicodeString(const QString &s, const QByteArray &b)
Parses the given string and set the charset.
Definition: kmime_headers.cpp:335
bool hasName() const
Returns true if this mailbox has a display name.
Definition: kmime_header_parsing.cpp:171
int numberOfLines() const
Returns the number of lines, undefined if isEmpty() returns true.
Definition: kmime_headers.cpp:1680
Represents a "Content-Description" header.
Definition: kmime_headers.h:1286
bool isCancel() const
Returns true if this is a cancel control message.
Definition: kmime_headers.cpp:1357
void setParameter(const QString &key, const QString &value)
Sets the parameter key to value.
Definition: kmime_headers.cpp:934
QList< QByteArray > addresses() const
Returns a list of all addresses in this header, regardless of groups.
Definition: kmime_headers.cpp:448
virtual void fromUnicodeString(const QString &s, const QByteArray &b)
Parses the given string and set the charset.
Definition: kmime_headers.cpp:1575
virtual void fromUnicodeString(const QString &s, const QByteArray &b)=0
Parses the given string and set the charset.
void addAddress(const Types::Mailbox &mbox)
Adds an address to this header.
Definition: kmime_headers.cpp:584
QList< QByteArray > addresses() const
Returns a list of all addresses in this header, regardless of groups.
Definition: kmime_headers.cpp:604
QStringList prettyAddresses() const
Returns a list of assembled display name / address strings of the following form: "Display Name <addr...
Definition: kmime_headers.cpp:466
bool isMultipart() const
Returns true if the associated MIME entity is a mulitpart container.
Definition: kmime_headers.cpp:1824
QByteArray rfc2047Charset() const
Returns the charset that is used for RFC2047-encoding.
Definition: kmime_headers.cpp:178
Base class for headers which deal with a single msg-id.
Definition: kmime_headers.h:584
QByteArray id() const
Returns the identifier of the associated MIME entity.
Definition: kmime_headers.cpp:1871
bool isSubtype(const char *subtype) const
Tests if the mime sub-type equals subtype.
Definition: kmime_headers.cpp:1792
QString parameter(const QString &key) const
Returns the value of the specified parameter.
Definition: kmime_headers.cpp:924
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
virtual bool isEmpty() const
Checks if this header contains any data.
Definition: kmime_headers.cpp:427
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 QString asUnicodeString() const
Returns the decoded content of the header without the header-type.
Definition: kmime_headers.cpp:840
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:648
virtual void from7BitString(const QByteArray &s)
Parses the given string.
Definition: kmime_headers.cpp:320
int partialCount() const
Returns the total number of parts in a multi-part set.
Definition: kmime_headers.cpp:1891
void setRFC2047Charset(const QByteArray &cs)
Sets the charset for RFC2047-encoding.
Definition: kmime_headers.cpp:187
Abstract base class for unstructured header fields (e.g.
Definition: kmime_headers.h:270
This file is part of the API for handling MIME data and defines the HeaderFactory class...
virtual QString asUnicodeString() const
Returns the decoded content of the header without the header-type.
Definition: kmime_headers.cpp:280
virtual bool isEmpty() const
Checks if this header contains any data.
Definition: kmime_headers.cpp:1436
Base class for headers which deal with a list of msg-id's.
Definition: kmime_headers.h:545
virtual bool isEmpty() const
Checks if this header contains any data.
Definition: kmime_headers.cpp:687
virtual bool isEmpty() const
Checks if this header contains any data.
Definition: kmime_headers.cpp:1271
bool isCrossposted() const
Returns true if this message has been cross-posted, i.e.
Definition: kmime_headers.cpp:1610
Types::Mailbox::List mailboxes() const
Returns a list of mailboxes listed in this header.
Definition: kmime_headers.cpp:475
Represents a "Content-Transfer-Encoding" header.
Definition: kmime_headers.h:890
virtual bool isEmpty() const
Checks if this header contains any data.
Definition: kmime_headers.cpp:1517
virtual bool isEmpty() const
Checks if this header contains any data.
Definition: kmime_headers.cpp:579
virtual QString asUnicodeString() const
Returns the decoded content of the header without the header-type.
Definition: kmime_headers.cpp:1661
Base class for structured header fields.
Definition: kmime_headers.h:329
void addAddress(const Types::Mailbox &mbox)
Adds an address to this header.
Definition: kmime_headers.cpp:432
virtual const char * type() const
Returns the type of this header (e.g.
Definition: kmime_headers.cpp:202
Base class for headers which deal with a single atom.
Definition: kmime_headers.h:615
virtual QString asUnicodeString() const
Returns the decoded content of the header without the header-type.
Definition: kmime_headers.cpp:759
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
QList< QByteArray > identifiers() const
Returns the list of identifiers contained in this header.
Definition: kmime_headers.cpp:1056
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. ...
virtual bool isEmpty() const
Checks if this header contains any data.
Definition: kmime_headers.cpp:1007
virtual void from7BitString(const QByteArray &s)=0
Parses the given string.
bool decoded() const
Returns whether the Content containing this header is already decoded.
Definition: kmime_headers.cpp:2106
virtual QString asUnicodeString() const
Returns the decoded content of the header without the header-type.
Definition: kmime_headers.cpp:568
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:2211
void setFilename(const QString &filename)
Sets the suggested filename for the associated MIME part.
Definition: kmime_headers.cpp:2206
contentEncoding
Various possible values for the "Content-Transfer-Encoding" header.
Definition: kmime_headers.h:74
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 QString asUnicodeString() const
Returns the decoded content of the header without the header-type.
Definition: kmime_headers.cpp:330
virtual bool isEmpty() const
Checks if this header contains any data.
Definition: kmime_headers.cpp:851
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
Base(KMime::Content *parent=0)
Creates an empty header with a parent-content.
Definition: kmime_headers.cpp:148
This file is part of the KDE documentation.
Documentation copyright © 1996-2018 The KDE developers.
Generated on Sun Jun 17 2018 00:29:35 by doxygen 1.8.14 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2018 The KDE developers.
Generated on Sun Jun 17 2018 00:29:35 by doxygen 1.8.14 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.