QMailMessageBody Class Reference
|
Constant | Value | Description |
---|---|---|
QMailMessageBody::Encoded | 1 | The body data should be presented in encoded form. |
QMailMessageBody::Decoded | 2 | The body data should be presented in unencoded form. |
This enum type is used to describe the encoding status of body data.
Constant | Value | Description |
---|---|---|
QMailMessageBody::AlreadyEncoded | 1 | The body data is already encoded to the necessary encoding. |
QMailMessageBody::RequiresEncoding | 2 | The body data is unencoded, and thus requires encoding for transmission. |
This enum type is used to describe a type of binary to text encoding. Encoding types used here are documented in RFC 2045 "Format of Internet Message Bodies"
Constant | Value | Description |
---|---|---|
QMailMessageBody::NoEncoding | 0 | The encoding is not specified. |
QMailMessageBody::SevenBit | 1 | The data is not encoded, but contains only 7-bit ASCII data. |
QMailMessageBody::EightBit | 2 | The data is not encoded, but contains data using only 8-bit characters which form a superset of ASCII. |
QMailMessageBody::Base64 | 3 | A 65-character subset of US-ASCII is used, enabling 6 bits to be represented per printable character. |
QMailMessageBody::QuotedPrintable | 4 | A method of encoding that tends to leave text similar to US-ASCII unmodified for readability. |
QMailMessageBody::Binary | 5 | The data is not encoded to any limited subset of octet values. |
See also QMailCodec.
Returns the content type that the body was created with.
Returns the data of the message body as a QByteArray. If format is QMailMessageBody::Encoded, then the data is written in the transfer encoding it was created with; otherwise, it is written in unencoded form.
See also QMailCodec.
This is an overloaded member function, provided for convenience.
Returns the data of the message body as a QString, in unencoded form. Line-endings transmitted as CR/LF pairs are converted to \n on extraction.
The 'charset' parameter of the body's content type is used to locate the appropriate QTextCodec to convert the data from an octet stream to unicode, if necessary.
See also QMailCodec, QMailMessageContentType, and QTextCodec.
Creates a message body from the data contained in input, having the content type type. If status is QMailMessageBody::RequiresEncoding, the data from the file will be encoded to encoding for transmission; otherwise it must already be in that encoding, which will be reported to recipients of the data.
If type is a subtype of "text", the data will be treated as text, and line-ending translation will be employed. Otherwise, the file will be treated as containing binary data.
If encoding is QMailMessageBody::QuotedPrintable, encoding will be performed assuming conformance to RFC 2045.
See also QMailCodec and QMailQuotedPrintableCodec.
This is an overloaded member function, provided for convenience.
Creates a message body from the data contained in input, having the content type type. The data from input will be encoded to encoding for transmission, and line-ending translation will be employed. The unicode text data will be converted to an octet stream using a QTextCodec object identified by the 'charset' parameter of type.
If encoding is QMailMessageBody::QuotedPrintable, encoding will be performed assuming conformance to RFC 2045.
See also QMailCodec, QMailMessageContentType, and QTextCodec.
Creates a message body from the data contained in the file filename, having the content type type. If status is QMailMessageBody::RequiresEncoding, the data from the file will be encoded to encoding for transmission; otherwise it must already be in that encoding, which will be reported to recipients of the data.
If type is a subtype of "text", the data will be treated as text, and line-ending translation will be employed. Otherwise, the file will be treated as containing binary data. If the file contains unicode text data, it will be converted to an octet stream using a QTextCodec object identified by the 'charset' parameter of type.
If encoding is QMailMessageBody::QuotedPrintable, encoding will be performed assuming conformance to RFC 2045.
Note that the data is not actually read from the file until it is requested by another function.
See also QMailCodec, QMailQuotedPrintableCodec, QMailMessageContentType, and QTextCodec.
Creates a message body from the data read from in, having the content type type. If status is QMailMessageBody::RequiresEncoding, the data from the file will be encoded to encoding for transmission; otherwise it must already be in that encoding, which will be reported to recipients of the data.
If type is a subtype of "text", the data will be treated as text, and line-ending translation will be employed. Otherwise, the file will be treated as containing binary data.
If encoding is QMailMessageBody::QuotedPrintable, encoding will be performed assuming conformance to RFC 2045.
See also QMailCodec and QMailQuotedPrintableCodec.
This is an overloaded member function, provided for convenience.
Creates a message body from the data read from in, having the content type type. The data read from in will be encoded to encoding for transmission, and line-ending translation will be employed. The unicode text data will be converted to an octet stream using a QTextCodec object identified by the 'charset' parameter of type.
If encoding is QMailMessageBody::QuotedPrintable, encoding will be performed assuming conformance to RFC 2045.
See also QMailCodec, QMailQuotedPrintableCodec, QMailMessageContentType, and QTextCodec.
Writes the data of the message body to the file named filename. If format is QMailMessageBody::Encoded, then the data is written in the transfer encoding it was created with; otherwise, it is written in unencoded form.
If the body has a content type with a QMailMessageContentType::type() of "text", and the content type parameter 'charset' is not empty, then the unencoded data will be written as unicode text data, using the charset parameter to locate the appropriate QTextCodec.
Returns false if the operation causes an error; otherwise returns true.
See also QMailCodec, QMailMessageContentType, and QTextCodec.
Writes the data of the message body to the stream out. If format is QMailMessageBody::Encoded, then the data is written in the transfer encoding it was created with; otherwise, it is written in unencoded form.
Returns false if the operation causes an error; otherwise returns true.
See also QMailCodec.
This is an overloaded member function, provided for convenience.
Writes the data of the message body to the stream out, in unencoded form. Line-endings transmitted as CR/LF pairs are converted to \n on extraction. Returns false if the operation causes an error; otherwise returns true.
The 'charset' parameter of the body's content type is used to locate the appropriate QTextCodec to convert the data from an octet stream to unicode, if necessary.
See also QMailCodec, QMailMessageContentType, and QTextCodec.
Returns the transfer encoding type that the body was created with.
Cette page est une traduction d'une page de la documentation de Qt, écrite par Nokia Corporation and/or its subsidiary(-ies). Les éventuels problèmes résultant d'une mauvaise traduction ne sont pas imputables à Nokia. | Qt qtextended4.4 | |
Copyright © 2012 Developpez LLC. Tous droits réservés Developpez LLC. Aucune reproduction, même partielle, ne peut être faite de ce site et de l'ensemble de son contenu : textes, documents et images sans l'autorisation expresse de Developpez LLC. Sinon, vous encourez selon la loi jusqu'à 3 ans de prison et jusqu'à 300 000 E de dommages et intérêts. Cette page est déposée à la SACD. | ||
Vous avez déniché une erreur ? Un bug ? Une redirection cassée ? Ou tout autre problème, quel qu'il soit ? Ou bien vous désirez participer à ce projet de traduction ? N'hésitez pas à nous contacter ou par MP ! |
Copyright © 2000-2012 - www.developpez.com