VMime
charsetConverter_idna Class Reference
Inheritance diagram for charsetConverter_idna:
Collaboration diagram for charsetConverter_idna:

Public Member Functions

 charsetConverter_idna (const charset &source, const charset &dest, const charsetConverterOptions &opts=charsetConverterOptions())
 
 ~charsetConverter_idna ()
 
void convert (const string &in, string &out, status *st=NULL)
 
void convert (utility::inputStream &in, utility::outputStream &out, status *st=NULL)
 
shared_ptr
< utility::charsetFilteredOutputStream
getFilteredOutputStream (utility::outputStream &os, const charsetConverterOptions &opts=charsetConverterOptions())
 

Additional Inherited Members

- Static Public Member Functions inherited from charsetConverter
static shared_ptr
< charsetConverter
create (const charset &source, const charset &dest, const charsetConverterOptions &opts=charsetConverterOptions())
 
- Protected Member Functions inherited from object
 object ()
 
 object (const object &)
 
objectoperator= (const object &)
 
virtual ~object ()
 

Detailed Description

A charset converter which can convert to and from Punycode (for IDNA).

Constructor & Destructor Documentation

charsetConverter_idna ( const charset source,
const charset dest,
const charsetConverterOptions opts = charsetConverterOptions() 
)

Construct and initialize an IDNA charset converter.

Parameters
sourceinput charset
destoutput charset
optsconversion options

Member Function Documentation

void convert ( const string in,
string out,
status st = NULL 
)
virtual

Convert a string buffer from one charset to another charset (in-memory conversion)

Deprecated:
Use the new convert() method, which takes an outputStream parameter.
Parameters
ininput buffer
outoutput buffer
stwill receive some extra infos when conversion is finished or stopped by an error (can be NULL)
Exceptions
exceptions::illegal_byte_sequence_for_charsetif an illegal byte sequence was found in the input bytes, and the 'silentlyReplaceInvalidSequences' flag is set to false in the charsetConverterOptions
exceptions::charset_conv_errorif an unexpected error occured during the conversion

Implements charsetConverter.

References charset::convert(), vmime::end(), charsetConverter::status::inputBytesRead, stringUtils::is7bit(), charsetConverter::status::outputBytesWritten, and vmime::charsets::UTF_8.

Referenced by charsetConverter_idna::convert().

void convert ( utility::inputStream in,
utility::outputStream out,
status st = NULL 
)
virtual

Convert the contents of an input stream in a specified charset to another charset and write the result to an output stream.

Parameters
ininput stream to read data from
outoutput stream to write the converted data
stwill receive some extra infos when conversion is finished or stopped by an error (can be NULL)
Exceptions
exceptions::illegal_byte_sequence_for_charsetif an illegal byte sequence was found in the input bytes, and the 'silentlyReplaceInvalidSequences' flag is set to false in the charsetConverterOptions
exceptions::charset_conv_errorif an unexpected error occured during the conversion

Implements charsetConverter.

References vmime::utility::bufferedStreamCopy(), and charsetConverter_idna::convert().

shared_ptr< utility::charsetFilteredOutputStream > getFilteredOutputStream ( utility::outputStream os,
const charsetConverterOptions opts = charsetConverterOptions() 
)
virtual

Returns a filtered output stream which applies a charset conversion to input bytes.

Please note that it may not be supported by the converter.

Parameters
osstream into which filtered data will be written
optsconversion options
Returns
a filtered output stream, or NULL if not supported

Implements charsetConverter.


The documentation for this class was generated from the following files: