nsIMimeConverter 编辑
The nsIMimeConverter
service allows you to convert headers into and out of MIME format.
Inherits from: nsISupports
Implemented by: @mozilla.org/messenger/mimeconverter;1.
Method overview
string encodeMIMEPartIIStr(in string header, in boolean structured, in string mailCharset, in long fieldnamelen, in long encodedwordsize); |
string encodeMIMEPartIIStr_UTF8(in AUTF8String header, in boolean structured, in string mailCharset, in long fieldnamelen, in long encodedwordsize); |
string decodeMimeHeaderToCharPtr(in string header, in string default_charset, in boolean override_charset, in boolean eatContinuations); |
AString decodeMimeHeader( in string header, in string default_charset, in boolean override_charset, in boolean eatContinuations); |
MimeEncoderData *B64EncoderInit(in MimeConverterOutputCallback output_fn, in void *closure); |
MimeEncoderData *QPEncoderInit (in MimeConverterOutputCallback output_fn, in void *closure); |
void EncoderDestroy(in MimeEncoderData *data, in boolean abort_p); |
long EncoderWrite(in MimeEncoderData *data, in string buffer, in long size); |
Methods
encodeMimePartIIStr()
An variant of encodeMimePartIIStr_UTF8()
which treats the header as written in the given charset. This should only be used by native code, as xpconnect translation causes it to not work properly.
string encodeMimePartIIStr(in string header, in boolean structured, in string mailCharset, in long fieldnamelen, in long encodedWordSize);
Parameters
propertyName
- The name of the property to retrieve.
Return Value
The value of the property.
encodeMimePartIIStr_UTF8()
Encodes a string into a MIME-encoded form according to RFC 2047.
string encodeMimePartIIStr_UTF8(in AUTF8String header, in boolean structured, in string mailCharset, in long fieldnamelen, in long encodedWordSize);
Parameters
header
- The string to encode into the MIME-encoded form.
structured
- Whether or not this string may contain <> blocks which should not be encoded (e.g., the From and To headers).
mailCharset
- The charset to encode into.
fieldnamelen
- The length of the header field including the colon and space (": ").
encodedWordSize
- The maximum line length of the encoded string.
decodeMimeHeaderToCharPtr()
void setStringProperty(in string propertyName, in string propertyValue);
Parameters
propertyName
- The name of the property to set.
propertyValue
- The value of the property.
decodeMimeHeader()
string getStringProperty(in string propertyName);
Parameters
propertyName
- The name of the property to retrieve.
Return Value
The value of the property.
B64EncoderInit()
Get an integer property. Usually you would use this to store you own properties.
unsigned long getUint32Property(in string propertyName);
Parameters
propertyName
- The name of the property to retrieve. Thunderbird stored Uint32 properties (not a complete list):
indexed
- Used for Spotlight integration on OSX.
notAPhishMessage
- Indicates whether phisihing filters have been run on a message yet.
Return Value
The value of the property.
QPEncoderInit()
void setUint32Property(in string propertyName, in unsigned long propertyVal);
Parameters
propertyName
- The name of the property to set.
propertyVal
- The value of the property.
EncoderDestroy()
Marks this header as read. Thunderbird provides a utility function which performs this for the currently selected message: MarkCurrentMessageAsRead().
void markRead(in boolean read);
Parameters
read
- If
true
, mark as read. Iffalse
mark as undread.
EncoderWrite()
void markFlagged(in boolean flagged);
Parameters
flagged
- If
true
, mark as flagged. Iffalse
remove flag.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论