![]() ![]() ![]()
|
BREW C++ Class Library & GUI Framework & XML Middleware : SophiaFramework 4.1 |
The SFXMailUtility class provides functions for parsing the header of the mail message based on RFC2822 (Internet Message Format) and the functions for processing about Base64, QuotedPrintable, MD5 etc.
To parse the entire mail message, use the SFXMailMessage class. While to parse the mail message in the MIME encode defined in RFC2047 (MIME Part Three : Message Header Extensions for Non-ASCII Text), use the SFXMailField class.
| Public Functions | |
|---|---|
| static SFCError |
DecodeBase64(
ACharConstPtr in
, UInt32 size
, SFXBufferPtr out
) DecodeBase64( SFXAnsiStringConstRef in , SFXAnsiStringPtr out ) DecodeBase64( SFXBufferConstRef in , SFXBufferPtr out ) Decode the data encoded in the Base64 format.
|
| static SFCError |
DecodeQuotedPrintable(
ACharConstPtr in
, UInt32 size
, SFXBufferPtr out
, Bool text = true
) DecodeQuotedPrintable( SFXAnsiStringConstRef in , SFXAnsiStringPtr out , Bool text = true ) DecodeQuotedPrintable( SFXBufferConstRef in , SFXBufferPtr out , Bool text = true ) Decode the data encoded in the Quoted-Printable format.
|
| static SFCError |
EncodeBase64(
ACharConstPtr in
, UInt32 size
, SFXBufferPtr out
, UInt32 chars = 64
, SFXAnsiStringConstRef delimiter = "\r\n"
) EncodeBase64( SFXAnsiStringConstRef in , SFXAnsiStringPtr out , UInt32 chars = 64 , SFXAnsiStringConstRef delimiter = "\r\n" ) EncodeBase64( SFXBufferConstRef in , SFXBufferPtr out , UInt32 chars = 64 , SFXAnsiStringConstRef delimiter = "\r\n" ) Encode the data in the Base64 format.
|
| static SFCError |
EncodeQuotedPrintable(
ACharConstPtr in
, UInt32 size
, SFXBufferPtr out
, UInt32 chars = 64
, Bool text = true
) EncodeQuotedPrintable( SFXAnsiStringConstRef in , SFXAnsiStringPtr out , UInt32 chars = 64 , Bool text = true ) EncodeQuotedPrintable( SFXBufferConstRef in , SFXBufferPtr out , UInt32 chars = 64 , Bool text = true ) Encode the data in the Quoted-Printable format.
|
| static Bool |
FindNextBoundary(
ACharConstPtr start
, ACharConstPtr end
, SFXAnsiStringConstRef boundary
, ACharConstHandle found
, ACharConstHandle next
) Find the next "boundary" string in the MIME document.
|
| static UInt32 |
GetEncodedSizeBase64(
UInt32 size
, UInt32 chars
, UInt32 delimiter
) Get the size of the data when encoded in the Base64 format.
|
| static UInt32 |
GetEncodedSizeQuotedPrintable(
ACharConstPtr in
, UInt32 size
, UInt32 chars
, Bool text
) Get the size of the data when encoded in the Quoted-Printable format.
|
| static SFCError |
GetHMACMD5(
VoidConstPtr in
, UInt32 size
, SFXBufferConstRef key
, SFXBufferPtr out
, Bool isXdigit
) GetHMACMD5( SFXAnsiStringConstRef in , SFXAnsiStringConstRef key , SFXAnsiStringPtr out , Bool isXdigit ) GetHMACMD5( SFXBufferConstRef in , SFXBufferConstRef key , SFXBufferPtr out , Bool isXdigit ) Get the HMAC-MD5.
|
| static SFCError |
GetKeyedMD5(
VoidConstPtr datagram
, UInt32 size
, SFXBufferConstRef key
, AChar keyfill
, SFXBufferPtr out
, Bool isXdigit
) GetKeyedMD5( SFXAnsiStringConstRef datagram , SFXAnsiStringConstRef key , AChar keyfill , SFXAnsiStringPtr out , Bool isXdigit ) GetKeyedMD5( SFXBufferConstRef datagram , SFXBufferConstRef key , AChar keyfill , SFXBufferPtr out , Bool isXdigit ) Get the Keyed-MD5.
|
| static SFCError |
GetMD5(
VoidConstPtr in
, UInt32 size
, SFXBufferPtr out
, Bool isXdigit
) GetMD5( SFXAnsiStringConstRef in , SFXAnsiStringPtr out , Bool isXdigit ) GetMD5( SFXBufferConstRef in , SFXBufferPtr out , Bool isXdigit ) Get the MD5.
|
| static SInt16 |
HexToByte(
AChar c1
, AChar c2
) Convert two hexadecimal digits into the integer value.
|
| static SInt16 |
HexToNibble(
AChar c
) Convert one hexadecimal digit into the integer value.
|
| static Bool |
IsAtext(
AChar c
) Check whether a specified character is atext or not.
|
| static Bool |
IsCTL(
AChar c
) Check whether a specified character is control or not.
|
| static Bool |
IsTokenChar(
AChar c
) Check whether a specified character character is for token or not.
|
| static Bool |
IsTspecials(
AChar c
) Check whether a specified character character is TSPECIAL or not.
|
| static Bool |
IsValidFieldName(
ACharConstPtr start
, ACharConstPtr end = null
) Check whether a specified field of the mail header is valid or not.
|
| static Bool |
IsWSP(
AChar c
) Check whether a specified character is white space or not.
|
| static SFCError |
JISToShiftJIS(
SFXAnsiStringConstRef in
, SFXAnsiStringPtr out
, AChar unconvChar = '\0'
) Convert string in JIS code (iso-2022-jp) into Shift_JIS code.
|
| static AChar |
NibbleToHex(
Byte nibble
) Convert an integer value into a hexadecimal digit.
|
| static SFCError |
ParseAddrSpec(
ACharConstPtr start
, ACharConstPtr end
, ACharConstHandle next
, SFXAnsiStringPtr value
) Get a specified string as mail address (addr-spec).
|
| static SFCError |
ParseAtom(
ACharConstPtr start
, ACharConstPtr end
, ACharConstHandle next
, SFXAnsiStringPtr value
) Get a specified string as atom.
|
| static SFCError |
ParseContentType(
SFXAnsiStringConstRef fieldValue
, SFXAnsiStringPtr mainType
, SFXAnsiStringPtr subType
, SFXPropertyPtr paramList
) Get a specified string as data of the Content-Type field.
|
| static SFCError |
ParseDate(
ACharConstPtr start
, ACharConstPtr end
, ACharConstHandle next
, SFXDatePtr date
, SInt16Ptr zone
) ParseDate( SFXAnsiStringConstRef str , SFXDatePtr date , SInt16Ptr zone ) Get a specified string as date.
|
| static SFCError |
ParseDotAtom(
ACharConstPtr start
, ACharConstPtr end
, ACharConstHandle next
, SFXAnsiStringPtr value
) Get a specified string as dot-atom.
|
| static SFCError |
ParseDotAtomText(
ACharConstPtr start
, ACharConstPtr end
, ACharConstHandle next
, SFXAnsiStringPtr value
) Get a specified string as dot-atom-text.
|
| static SFCError |
ParseHeaderLine(
ACharConstPtr start
, ACharConstPtr end
, ACharConstHandle next
, SFXAnsiStringPtr value1
, SFXAnsiStringPtr value2
) Get one line of the mail header.
|
| static SFCError |
ParseMailbox(
ACharConstPtr start
, ACharConstPtr end
, ACharConstHandle next
, SFXAnsiStringPtr name
, SFXAnsiStringPtr addr
) ParseMailbox( SFXAnsiStringConstRef str , SFXAnsiStringPtr name , SFXAnsiStringPtr addr ) Get a specified string as mail address (mail box).
|
| static SFCError |
ParseMailboxList(
ACharConstPtr start
, ACharConstPtr end
, ACharConstHandle next
, MailboxHandle mailboxes
, SInt32Ptr mbxCount
) ParseMailboxList( SFXAnsiStringConstRef str , MailboxHandle mailboxes , SInt32Ptr mbxCount ) Get a specified string as list of mail addresses (mailbox).
|
| static SFCError |
ParseParameter(
ACharConstPtr start
, ACharConstPtr end
, ACharConstHandle next
, SFXAnsiStringPtr name
, SFXAnsiStringPtr value
) Get a specified string as parameter.
|
| static SFCError |
ParseParameterList(
ACharConstPtr start
, ACharConstPtr end
, SFXPropertyPtr paramList
) Get a specified string as list of parameters.
|
| static SFCError |
ParsePhrase(
ACharConstPtr start
, ACharConstPtr end
, ACharConstHandle next
, SFXAnsiStringPtr value
) Get a specified string as phrase.
|
| static SFCError |
ParseQuotedString(
ACharConstPtr start
, ACharConstPtr end
, ACharConstHandle next
, SFXAnsiStringPtr value
) Get a specified string as quoted-string.
|
| static SFCError |
ParseToken(
ACharConstPtr start
, ACharConstPtr end
, ACharConstHandle next
, SFXAnsiStringPtr value
) Get a specified string as token.
|
| static SFCError |
ParseWord(
ACharConstPtr start
, ACharConstPtr end
, ACharConstHandle next
, SFXAnsiStringPtr value
) Get a specified string as word.
|
| static SFCError |
ShiftJISToJIS(
SFXAnsiStringConstRef in
, SFXAnsiStringPtr out
, AChar unconvChar = '\0'
) Convert a specified string in Shift_JIS code into JIS code (iso-2022-jp).
|
| static Void |
SkipUntilCRLF(
ACharConstHandle start
) Get the position of the next CRLF or '\0' chararacter.
|
| Types |
|---|
|
Mailbox Structure that represents a mail address.
|
[ public, static ] SFCError DecodeBase64( ACharConstPtr in // pointer to the data encoded in the Base64 format UInt32 size // size of the data encoded in the Base64 format SFXBufferPtr out // pointer to the output buffer );
[ public, static ] SFCError DecodeBase64( SFXBufferConstRef in // reference to the data encoded in the Base64 format SFXBufferPtr out // pointer to the output buffer );
[ public, static ] SFCError DecodeBase64( SFXAnsiStringConstRef in // reference to the data encoded in the Base64 format SFXAnsiStringPtr out // pointer to the output buffer );
The SFXMailUtility::DecodeBase64 function decodes the data encoded in the Base64 format defined in RFC2045 (MIME Part One: Format of Internet Message Bodies).
The SFXMailUtility::DecodeBase64 function differs from the SFBWebUtil::DecodeBase64 function in that this function processes the line feed and carriage return characters.
[ public, static ] SFCError DecodeQuotedPrintable( ACharConstPtr in // pointer to the data encoded in the Quoted-Printable format UInt32 size // size of the data encoded in the Quoted-Printable format SFXBufferPtr out // pointer to the output buffer Bool text = true // text mode );
[ public, static ] SFCError DecodeQuotedPrintable( SFXBufferConstRef in // reference to the data encoded in the Quoted-Printable format SFXBufferPtr out // pointer to the output buffer Bool text = true // text mode );
[ public, static ] SFCError DecodeQuotedPrintable( SFXAnsiStringConstRef in // reference to the data encoded in the Quoted-Printable format SFXAnsiStringPtr out // pointer to the output buffer Bool text = true // text mode );
The SFXMailUtility::DecodeQuotedPrintable function decodes the data encoded in the Quoted-Printable format defined in RFC2045 (MIME Part One: Format of Internet Message Bodies).
Invalid characters are ignored when decoding.
![]() |
Caution |
|---|---|
If there are invalid characters, decoding ends normally though the return value is SFERR_INVALID_FORMAT. | |
[ public, static ] SFCError EncodeBase64( ACharConstPtr in // pointer to the data to be encoded UInt32 size // data size SFXBufferPtr out // pointer to the output buffer UInt32 chars = 64 // number of characters per line SFXAnsiStringConstRef delimiter = "\r\n" // line feed and carriage return characters );
[ public, static ] SFCError EncodeBase64( SFXBufferConstRef in // reference to the data to be encoded SFXBufferPtr out // pointer to the output buffer UInt32 chars = 64 // number of characters per line SFXAnsiStringConstRef delimiter = "\r\n" // line feed and carriage return characters );
[ public, static ] SFCError EncodeBase64( SFXAnsiStringConstRef in // reference to the data to be encoded SFXAnsiStringPtr out // pointer to the output buffer UInt32 chars = 64 // number of characters per line SFXAnsiStringConstRef delimiter = "\r\n" // line feed and carriage return characters );
The SFXMailUtility::EncodeBase64 function encodes the data in the Base64 format defined in RFC2045 (MIME Part One: Format of Internet Message Bodies).
The SFXMailUtility::EncodeBase64 function differs from the SFBWebUtil::EncodeBase64 function in that this function processes the line feed and carriage return characters.
[ public, static ] SFCError EncodeQuotedPrintable( ACharConstPtr in // pointer to the data to be encoded in the Quoted-Printable format UInt32 size // data size SFXBufferPtr out // pointer to the output buffer UInt32 chars = 64 // number of characters per line Bool text = true // text mode or not? );
[ public, static ] SFCError EncodeQuotedPrintable( SFXBufferConstRef in // reference to the data to be encoded in the Quoted-Printable format SFXBufferPtr out // pointer to the output buffer UInt32 chars = 64 // number of characters of first line Bool text = true // whether text mode or not? );
[ public, static ] SFCError EncodeQuotedPrintable( SFXAnsiStringConstRef in // reference to the data to be encoded in the Quoted-Printable format SFXAnsiStringPtr out // pointer to the output buffer UInt32 chars = 64 // number of characters of first line Bool text = true // whether text mode or not );
The SFXMailUtility::EncodeQuotedPrintable function encodes the data in the Quoted-Printable format defined in RFC2045 (MIME Part One: Format of Internet Message Bodies).
[ public, static ] Bool FindNextBoundary( ACharConstPtr start // pointer to the starting position to search for the "boundary" string ACharConstPtr end // pointer to the end position to search for the "boundary" string SFXAnsiStringConstRef boundary // "boundary" string ACharConstHandle found // handle to store the pointer to the position of the "boundary" string to be found ACharConstHandle next // handle to store the pointer to the next position of the "boundary" string to be found );
Pointer to the head of the MIME document to be searched for.
Pointer to the end of the MIME document to be searched for. The character pointed by this pointer will not be searched for.
The "boundary" string to be searched for.
Handle to store the pointer to the CR character of the CRLF immediately before the "boundary" string to be found. Specify null if unnecessary.
Handle to store the pointer to the next character of the CRLF immediately after the "boundary" string to be found or the end position to search for the "boundary" string. Specify null if unnecessary.
Return true if the non-end-boundary is found.(end-boundary: string composed of '--' and "boundary" and '--')
Return false if the end-boundary is found.
Return false if the end-boundary is not found until the end of the MIME document to be searched for. In this case, the value of the "end" argument will be set to both the "found" and "next" argument.
About boundary: RFC2049 (MIME Part Five : Conformance Criteria and Examples. Appendix A -- A Complex Multipart Example)
[ public, static ] UInt32 GetEncodedSizeBase64( UInt32 size // size of the data when encoded in the Base64 format UInt32 chars // number of characters per line UInt32 delimiter // length of the line feed and carriage return characters );
[ public, static ] UInt32 GetEncodedSizeQuotedPrintable( ACharConstPtr in // data to be encoded in the Quoted-Printable format UInt32 size // size of the data when encoded in the Quoted-Printable format UInt32 chars // number of characters per line Bool text // whether text mode or not );
[ public, static ] SFCError GetHMACMD5( VoidConstPtr in // input data UInt32 size // size of input data SFXBufferConstRef key // reference to the key SFXBufferPtr out // pointer to the output buffer Bool isXdigit // whether or not to output the HMAC-MD5 as hexadecimal digits );
[ public, static ] SFCError GetHMACMD5( SFXBufferConstRef in // input data SFXBufferConstRef key // reference to the key SFXBufferPtr out // pointer to the output buffer Bool isXdigit // whether or not to output the HMAC-MD5 as hexadecimal digits );
[ public, static ] SFCError GetHMACMD5( SFXAnsiStringConstRef in // input data SFXAnsiStringConstRef key // reference to the key SFXAnsiStringPtr out // pointer to the output string Bool isXdigit // whether or not to output the HMAC-MD5 as hexadecimal digits );
[ public, static ] SFCError GetKeyedMD5( VoidConstPtr datagram // input data UInt32 size // size of input data SFXBufferConstRef key // reference to the key AChar keyfill // pad SFXBufferPtr out // pointer to the output buffer Bool isXdigit // whether or not to output the Keyed-MD5 as hexadecimal digits );
[ public, static ] SFCError GetKeyedMD5( SFXBufferConstRef datagram // input data SFXBufferConstRef key // reference to the key AChar keyfill // pad SFXBufferPtr out // pointer to the output buffer Bool isXdigit // whether or not to output the Keyed-MD5 as hexadecimal digits );
[ public, static ] SFCError GetKeyedMD5( SFXAnsiStringConstRef datagram // input data SFXAnsiStringConstRef key // key AChar keyfill // pad SFXAnsiStringPtr out // pointer to the output string Bool isXdigit // whether or not to output the Keyed-MD5 as hexadecimal digits );
[ public, static ] SFCError GetMD5( VoidConstPtr in // input data UInt32 size // size of input data SFXBufferPtr out // pointer to the output buffer Bool isXdigit // whether or not to output the MD5 as hexadecimal digits );
[ public, static ] SFCError GetMD5( SFXBufferConstRef in // input data SFXBufferPtr out // pointer to the output buffer Bool isXdigit // whether or not to output the MD5 as hexadecimal digits );
[ public, static ] SFCError GetMD5( SFXAnsiStringConstRef in // input data SFXAnsiStringPtr out // pointer to the output string Bool isXdigit // whether or not to output the MD5 as hexadecimal digits );
The SFXMailUtility::GetMD5 function is a wrapper function of the SFBHash class.
SFXMailUtility::GetKeyedMD5 | SFXMailUtility::GetHMACMD5 | SFBHash
[ public, static ] SInt16 HexToByte( AChar c1 // upper character of two hexadecimal digits to be converted AChar c2 // lower character of two hexadecimal digits to be converted );
For example, 1B (c1 = '1', c2 = 'B') is converted into 27.
For example, '1' is converted into 1, and 'f' is converted into 15.
Specify the character to be checked.
Check whether or not a specified character is atext defined in RFC2822 (Internet Message Format) .
An atext character is an alphanumeric for atom, or a symbol such as "!", "#", "$", "%"
![]() |
About atext |
|---|---|
Refer to RFC2822 (Internet Message Format) . | |
SFXMailUtility::IsCTL | SFXMailUtility::IsTokenChar | SFXMailUtility::IsTspecials | SFXMailUtility::IsWSP
Specify the character to be checked.
The code of control character is between "0x00" and "0x19", or "0x7f".
SFXMailUtility::IsAtext | SFXMailUtility::IsTokenChar | SFXMailUtility::IsTspecials | SFXMailUtility::IsWSP
Specify the character to be checked.
The SFXMailUtility::IsTokenChar function checks whether or not a specified character is for token defined in RFC2045 (MIME Part One : Format of Internet Message Bodies).
A character for token is any character except SPACE, CTLs, or TSPECIALs.
![]() |
About a character for token |
|---|---|
Refer to RFC2045 (MIME Part One : Format of Internet Message Bodies). | |
SFXMailUtility::IsAtext | SFXMailUtility::IsCTL | SFXMailUtility::IsTspecials | SFXMailUtility::IsWSP
Specify the character to be checked.
The SFXMailUtility::IsTspecials function checks whether or not a specified character is TSPECIAL defined in RFC2045 ( MIME Part One : Format of Internet Message Bodies ).
A TSPECIAL character is a symbol that needs to be quoted (") if the header field is treated as data.
![]() |
About TSPECIAL |
|---|---|
Refer to RFC2045 (MIME Part One : Format of Internet Message Bodies). | |
SFXMailUtility::IsAtext | SFXMailUtility::IsCTL | SFXMailUtility::IsTokenChar | SFXMailUtility::IsWSP
[ public, static ] Bool IsValidFieldName( ACharConstPtr start // pointer to the starting character of the field ACharConstPtr end = null // pointer to the end character of the field );
Specify the head of the field.
Specify the end of the field. '\0' is regarded as the end character if null is specified.
Specify the character to be checked.
The SFXMailUtility::IsWSP function checks whether or not a specified character is white space defined in RFC2822 ( Internet Message Format ).
![]() |
About white space character |
|---|---|
Refer to RFC2822 (Internet Message Format). | |
SFXMailUtility::IsAtext | SFXMailUtility::IsCTL | SFXMailUtility::IsTokenChar | SFXMailUtility::IsTspecials
[ public, static ] SFCError JISToShiftJIS( SFXAnsiStringConstRef in // reference to the string to be converted SFXAnsiStringPtr out // pointer to the converted string AChar unconvChar = '\0' // alternative character for the character that cannot be converted );
Specify a string to be converted in JIS code (iso-2022-jp).
The pointer to the converted string will be returned.
Specify an alternative character for the character that cannot be converted. The default value of this argument is '\0', which means that this sub-function is invalid.
If the "unconvChar" argument is specified, characters that cannot be converted will be substituted with the value of the "unconvChar" argument and the return value will be SFERR_NO_ERROR.
The half-width kana is supported.
For example, 1 is converted into '1', and '11' is converted into 'B'.
[ public, static ] SFCError ParseAddrSpec( ACharConstPtr start // pointer to the head of string to be parsed ACharConstPtr end // pointer to the end of string to be parsed ACharConstHandle next // handle of the pointer to the end position to be parsed SFXAnsiStringPtr value // pointer to the parsing result: mail address (addr-spec) );
Specify a pointer to the head of string to be parsed.
Specify a pointer to the end of string to be parsed. The character pointed by this pointer will not be parsed.
Specify a handle to store the pointer to the next character after the parsed string of mail address(addr-spec). Specify null if unnecessary.
Specify a pointer to the variable to store the parsed string of mail address(addr-spec). Specify null if unnecessary.
The SFXMailUtility::ParseAddrSpec function parses a specified string and get the parsed mail address, which is defined in RFC2822 (Internet Message Format).
The SFXMailUtility::ParseMailbox and SFXMailUtility::ParseMailboxList functions needs to be used when parsing the mail addresses of the "From:" and the "To:" fields.
SFXMailUtility::ParseAtom | SFXMailUtility::ParseContentType | SFXMailUtility::ParseDate | SFXMailUtility::ParseDotAtom | SFXMailUtility::ParseDotAtomText | SFXMailUtility::ParseMailbox | SFXMailUtility::ParseMailboxList | SFXMailUtility::ParseParameter | SFXMailUtility::ParseParameterList | SFXMailUtility::ParsePhrase | SFXMailUtility::ParseQuotedString | SFXMailUtility::ParseToken | SFXMailUtility::ParseWord
[ public, static ] SFCError ParseAtom( ACharConstPtr start // pointer to the head of string to be parsed ACharConstPtr end // pointer to the end of string to be parsed ACharConstHandle next // handle of the pointer to the end position to be parsed SFXAnsiStringPtr value // pointer to parsing result's atom );
Specify a pointer to the head of string to be parsed.
Specify a pointer to the end of string to be parsed. The character pointed by this address is not parsed.
Specify a handle to store the pointer to the next character after the parsed string of atom. Specify null if unnecessary.
Specify a pointer to the variable to store the parsed string of atom. Specify null if unnecessary.
The SFXMailUtility::ParseAtom function parses a specified string and get the parsed atom, which is defined in RFC2822 (Internet Message Format).
SFXMailUtility::ParseAddrSpec | SFXMailUtility::ParseContentType | SFXMailUtility::ParseDate | SFXMailUtility::ParseDotAtom | SFXMailUtility::ParseDotAtomText | SFXMailUtility::ParseMailbox | SFXMailUtility::ParseMailboxList | SFXMailUtility::ParseParameter | SFXMailUtility::ParseParameterList | SFXMailUtility::ParsePhrase | SFXMailUtility::ParseQuotedString | SFXMailUtility::ParseToken | SFXMailUtility::ParseWord
[ public, static ] SFCError ParseContentType( SFXAnsiStringConstRef fieldValue // string to be parsed SFXAnsiStringPtr mainType // type SFXAnsiStringPtr subType // subtype SFXPropertyPtr paramList // parameter );
Specify a string to be parsed.
Specify a pointer to the variable to store the parsed string of Content-Type. Specify null if unnecessary.
Specify a pointer to the variable to store the parsed string of Content-Subtype. Specify null if unnecessary.
Specify a pointer to the variable to store the parsed list of parameters. Specify null if unnecessary.
The SFXMailUtility::ParseContentType function parses a specified string and get the parsed data of the Content-Type field, which is defined in RFC2045 (MIME Part One : Format of Internet Message Bodies).
SFXMailUtility::ParseAddrSpec | SFXMailUtility::ParseAtom | SFXMailUtility::ParseDate | SFXMailUtility::ParseDotAtom | SFXMailUtility::ParseDotAtomText | SFXMailUtility::ParseMailbox | SFXMailUtility::ParseMailboxList | SFXMailUtility::ParseParameter | SFXMailUtility::ParseParameterList | SFXMailUtility::ParsePhrase | SFXMailUtility::ParseQuotedString | SFXMailUtility::ParseToken | SFXMailUtility::ParseWord
[ public, static ] SFCError ParseDate( ACharConstPtr start // pointer to the head of string to be parsed ACharConstPtr end // pointer to the end of string to be parsed ACharConstHandle next // handle of the pointer to the end position to be parsed SFXDatePtr date // pointer to the date SInt16Ptr zone // pointer to the timezone );
[ public, static ] SFCError ParseDate( SFXAnsiStringConstRef str // string to be parsed SFXDatePtr date // pointer to the date SInt16Ptr zone // pointer to the timezon );
Specify a pointer to the head of string to be parsed.
Specify a pointer to the end of string to be parsed. The character pointed by this pointer will not be parsed.
Specify a handle to store the pointer to the next character after the parsed date. Specify null if unnecessary.
Specify a pointer to the variable to store the parsed date. Specify null if unnecessary.
Specify a pointer to the variable to store the parsed timezone, which is different from the UTC. Specify null if unnecessary.
Specify a string to be parsed.
The SFXMailUtility::ParseDate function parses a specified string and get the parsed date, which is defined in RFC2822 (Internet Message Format).
SFXMailUtility::ParseAddrSpec | SFXMailUtility::ParseAtom | SFXMailUtility::ParseContentType | SFXMailUtility::ParseDotAtom | SFXMailUtility::ParseDotAtomText | SFXMailUtility::ParseMailbox | SFXMailUtility::ParseMailboxList | SFXMailUtility::ParseParameter | SFXMailUtility::ParseParameterList | SFXMailUtility::ParsePhrase | SFXMailUtility::ParseQuotedString | SFXMailUtility::ParseToken | SFXMailUtility::ParseWord
[ public, static ] SFCError ParseDotAtom( ACharConstPtr start // pointer to the head of string to be parsed ACharConstPtr end // pointer to the end of string to be parsed ACharConstHandle next // handle of the pointer to the end position to be parsed SFXAnsiStringPtr value // pointer to the parsing result: dot-atom );
Specify a pointer to the head of string to be parsed.
Specify a pointer to the end of string to be parsed. The character pointed by this pointer will not be parsed.
Specify a handle to store the pointer to the next character after the parsed dot-atom. Specify null if unnecessary.
Specify a pointer to the variable to store the parsed dot-atom. Specify null if unnecessary.
The SFXMailUtility::ParseDotAtom function parses a specified string and get the parsed dot-atom, which is defined in RFC2822 ( Internet Message Format ).
The dot-atom differs from the dot-atom-text only in that there may be the white space characters in the beginning or end of the dot-atom.
The SFXMailUtility::ParseDotAtom function skips the biginning white space characters of a specified string.
SFXMailUtility::ParseAddrSpec | SFXMailUtility::ParseAtom | SFXMailUtility::ParseContentType | SFXMailUtility::ParseDate | SFXMailUtility::ParseDotAtomText | SFXMailUtility::ParseMailbox | SFXMailUtility::ParseMailboxList | SFXMailUtility::ParseParameter | SFXMailUtility::ParseParameterList | SFXMailUtility::ParsePhrase | SFXMailUtility::ParseQuotedString | SFXMailUtility::ParseToken | SFXMailUtility::ParseWord
[ public, static ] SFCError ParseDotAtomText( ACharConstPtr start // pointer to the head of string to be parsed ACharConstPtr end // pointer to the end of string to be parsed ACharConstHandle next // handle of the pointer to the end position to be parsed SFXAnsiStringPtr value // pointer to the parsing result: dot-atom-text );
Specify a pointer to the head of string to be parsed.
Specify a pointer to the end of string to be parsed. The character pointed by this pointer will not be parsed.
Specify a handle to store the pointer to the next character after the parsed dot-atom-text. Specify null if unnecessary.
Specify a pointer to the variable to store the parsed dot-atom-text. Specify null if unnecessary.
The SFXMailUtility::ParseDotAtomText function parses a specified string and get the parsed dot-atom-text, which is defined in RFC2822 ( Internet Message Format ).
The dot-atom-text is a string that consists of atext and period '.'. In the dot-atom-text, a period cannot be put at the beginning or end and two successive periods cannot be permitted .
The SFXMailUtility::ParseDotAtomText function does not skip the biginning white space characters of a specified string.
If the first character of a specified string is white space, SFERR_INVALID_FORMAT will be returned.
SFXMailUtility::ParseAddrSpec | SFXMailUtility::ParseAtom | SFXMailUtility::ParseContentType | SFXMailUtility::ParseDate | SFXMailUtility::ParseDotAtom | SFXMailUtility::ParseMailbox | SFXMailUtility::ParseMailboxList | SFXMailUtility::ParseParameter | SFXMailUtility::ParseParameterList | SFXMailUtility::ParsePhrase | SFXMailUtility::ParseQuotedString | SFXMailUtility::ParseToken | SFXMailUtility::ParseWord
[ public, static ] SFCError ParseHeaderLine( ACharConstPtr start // pointer to the head of string to be parsed ACharConstPtr end // pointer to the end of string to be parsed ACharConstHandle next // handle of the pointer to the end position to be parsed SFXAnsiStringPtr value1 // pointer to the parsing result: field name SFXAnsiStringPtr value2 // pointer to the parsing result: field value );
Specify a pointer to the head of string to be parsed.
Specify a pointer to the end of string to be parsed. The character pointed by this pointer will not be parsed.
Specify a handle to store the pointer to the next line. Specify null if unnecessary.
Specify a pointer to the variable to store the parsed field name. Specify null if unnecessary.
Specify a pointer to the variable to store the parsed field value. Specify null if unnecessary.
The SFXMailUtility::ParseHeaderLine function parses and gets one line of the mail header. A line can be also obtained correctly even if the mail header is divided into multiple lines (from line 2, it starts from WSP).
[ public, static ] SFCError ParseMailbox( ACharConstPtr start // pointer to the head of string to be parsed ACharConstPtr end // pointer to the end of string to be parsed ACharConstHandle next // handle of the pointer to the end position to be parsed SFXAnsiStringPtr name // pointer to the parsing result name SFXAnsiStringPtr addr // pointer to the parsing result's mail address (maibox) );
[ public, static ] SFCError ParseMailbox( SFXAnsiStringConstRef str // string to be parsed SFXAnsiStringPtr name // pointer to the parsed name SFXAnsiStringPtr addr // pointer to the parsing result: mail address (maibox) );
Specify a pointer to the head of string to be parsed.
Specify a pointer to the end of string to be parsed. The character pointed by this pointer will not be parsed.
Specify a handle to store the pointer to the next character after the parsed mail address. Specify null if unnecessary.
Specify a pointer to the variable to store the parsed name. Specify null if unnecessary.
Specify a pointer to the variable to store the parsed mail address. Specify null if unnecessary.
Specify a string to be parsed.
The SFXMailUtility::ParseMailbox function parses a specified string and get the parsed mail address(mailbox), which is defined in RFC2822 (Internet Message Format).
The SFXMailUtility::ParseMailbox function can parse the "addr-spec" format of (1) and (2), and the "name-addr" format of (3).
my@example.com
my@example.com (My Name)
My Name <my@example.com>
In case of (2) and (3), dispaly name (My Name) can also be obtained. The SFXMailUtility::ParseMailbox function can parse only one mailbox.
To parse the list of mailboxes, use the SFXMailUtility::ParseMailboxList function.
SFXMailUtility::ParseAddrSpec | SFXMailUtility::ParseAtom | SFXMailUtility::ParseContentType | SFXMailUtility::ParseDate | SFXMailUtility::ParseDotAtom | SFXMailUtility::ParseDotAtomText | SFXMailUtility::ParseMailboxList | SFXMailUtility::ParseParameter | SFXMailUtility::ParseParameterList | SFXMailUtility::ParsePhrase | SFXMailUtility::ParseQuotedString | SFXMailUtility::ParseToken | SFXMailUtility::ParseWord
[ public, static ] SFCError ParseMailboxList( ACharConstPtr start // pointer to the head of string to be parsed ACharConstPtr end // pointer to the end of string to be parsed ACharConstHandle next // handle of the pointer to the end position to be parsed MailboxHandle mailboxes // list of mail address SInt32Ptr mbxCount // number of mail addresses );
[ public, static ] SFCError ParseMailboxList( SFXAnsiStringConstRef str // character string to be parsed MailboxHandle mailboxes // list of mail address SInt32Ptr mbxCount // number of mail addresses );
Specify a pointer to the head of string to be parsed.
Specify a pointer to the end of string to be parsed. The character pointed by this pointer will not be parsed.
Specify a handle to store the pointer to the next character after the parsed mail addresses. Specify null if unnecessary.
Specify a handle to store the pointer to the parsed list of mail addresses. The SFXMailUtility::Mailbox array will be passed.
This array must be released using the "delete[]" operator by the caller. Specify null if unnecessary.
Specify a pointer to the variable to store the parsed number of mail addresses. The parsed will be returned. Specify null if unnecessary.
Specify a string to be parsed.
The SFXMailUtility::ParseMailboxList function parses a specified string and get the parsed list of mail addresses (mailbox), which is defined in RFC2822 (Internet Message Format).
SFXMailUtility::ParseAddrSpec | SFXMailUtility::ParseAtom | SFXMailUtility::ParseContentType | SFXMailUtility::ParseDate | SFXMailUtility::ParseDotAtom | SFXMailUtility::ParseDotAtomText | SFXMailUtility::ParseMailbox | SFXMailUtility::ParseParameter | SFXMailUtility::ParseParameterList | SFXMailUtility::ParsePhrase | SFXMailUtility::ParseQuotedString | SFXMailUtility::ParseToken | SFXMailUtility::ParseWord
[ public, static ] SFCError ParseParameter( ACharConstPtr start // pointer to the head of string to be parsed ACharConstPtr end // pointer to the end of string to be parsed ACharConstHandle next // handle of the pointer to the end position to be parsed SFXAnsiStringPtr name // pointer to the parsed name of parameter SFXAnsiStringPtr value // pointer to the parsed value of parameter );
Specify a pointer to the head of string to be parsed.
Specify a pointer to the end of string to be parsed. The character pointed by this pointer will not be parsed.
Specify a handle to store the pointer to the next character after the parsed parameter. Specify null if unnecessary.
Specify a pointer to the variable to store the parsed name of parameter. Specify null if unnecessary.
Specify a pointer to the variable to store the parsed value of parameter. Specify null if unnecessary.
The SFXMailUtility::ParseParameter function parses a specified string and get the parameter like "attribute = value", which is defined in RFC2045 (MIME Part One: Format of Internet Message Bodies) .
The SFXMailUtility::ParseParameter function can parse only one parameter.
To parse the list of parameters, use the SFXMailUtility::ParseParameterList function.