Indy 9
TIdMessageEncoder
Hierarchy, Properties, Methods, Events, See Also, Unit: IdMessageCoder
Implements an encoder for RFC-822 compliant message parts.
TIdMessageEncoder = class(TIdComponent)
Unit
IdMessageCoder
Description
TIdMessageEncoder is a TIdComponent descendant that implements an encoder for RFC-822 compliant message parts. TIdMessageEncoder provides properties and methods used to process RFC message header and body lines using either a file or a TStream descendant. TIdMessageEncoder is a base class that establishes the framework for Indy message encoders.

TIdMessageEncoder descendants, like TIdMessageEncoderMIME, TIdMessageEncoderUUE, and TIdMessageEncoderXXE, further refine the message Encoder framework by implementing support for specific encoding schemes.


TIdMessageEncoder.Filename
TIdMessageEncoder, See Also
Identifies the file name that contains the contents of an RFC-822 message part.
property Filename: string;
Description
Filename is a String property that identifies the file system location that contains the contents of an RFC-822 message part. Filename can be updated to indicate that the RFC message part contents originate from the local file system rather than an inline stream. Use Encode with Filename as the input source to perform encoding from a file.

TIdMessageEncoder.PermissionCode
TIdMessageEncoder, See Also
Identifies the Unix user permissions required to acccess an RFC-822 message part.
property PermissionCode: integer;
Description
PermissionCode is an Integer property that identifies the Unix user permissions required to acccess an RFC-822 message part. PermissionCode is used by TIdMessageEncoder like TIdMessageEncoderUUE and TIdMessageEncoderXXE, which support optional user permissions for encoding operations. PermissionCode is used by these classes to identify, in the encoded contents, the user permissions required for decoding operations only.

PermissionCode is expressed as an Integer, in the form used by the Unix user permission flags. The default value for PermissionCode is 660, as established in the Create contructor.


TIdMessageEncoder.Create
TIdMessageEncoder, See Also
Constructor for the object instance.
constructor Create(AOwner: TComponent); override;
Parameters
AOwner: TComponent
Owner of the object instance.
Description
Create is the Constructor for the object instance, and relies on the inherited Create method. Create also sets PermissionCode to the default value 660.

TIdMessageEncoder.Encode
TIdMessageEncoder, See Also
Constructs the encoded contents of an RFC-822 message part.
procedure Encode(const AFilename: string; ADest: TStream); overload;
procedure Encode(ASrc: TStream; ADest: TStream); virtual; abstract; overload;
Parameters
const AFilename: string
File name used to retrieve the un-encoded contents of the message part.
ADest: TStream
Stream where the encoder message part will be written.
ASrc: TStream
Stream used to retrieve the un-encoded contents of the message part.
Description
Encode is an overloded procedure in TIdMessageEncoder that retrieves the un-encoded values of an RFC-822 message part, and constructs the encoded contents of the message part.

AFilename specifies the file name used to retrieve the un-encoded contents of the message part.

ASrc is a TStream descendant used to retrieve the un-encoded contents of the RFC message part.

ADest is a TStream descendant where the encoded message part will be written.

The file-based variant of Encode reads the contents of the file specified in AFilename, and writes the encoded contents to the stream specified in ADest. This variant of Encode creates a temporary file stream for AFilename, and calls the abstract Encode method using the temporary file stream.

The Stream-based variant of Encode is an abstract virtual procedure, and specifies the interface for using TStreams as bothe the source of the RFC message part and the destination for the Descendant classes, like TIdMessageEncoderMIME, TIdMessageEncoderUUE, and TIdMessageEncoderXXE, must implement the Encode method to provide support for genmerating the encoded message part contents using a specific encoding algorithm.


TIdMessageEncoder.Encode
TIdMessageEncoder, See Also
Constructs the encoded contents of an RFC-822 message part.
procedure Encode(const AFilename: string; ADest: TStream); overload;
procedure Encode(ASrc: TStream; ADest: TStream); virtual; abstract; overload;
Parameters
const AFilename: string
File name used to retrieve the un-encoded contents of the message part.
ADest: TStream
Stream where the encoder message part will be written.
ASrc: TStream
Stream used to retrieve the un-encoded contents of the message part.
Description
Encode is an overloded procedure in TIdMessageEncoder that retrieves the un-encoded values of an RFC-822 message part, and constructs the encoded contents of the message part.

AFilename specifies the file name used to retrieve the un-encoded contents of the message part.

ASrc is a TStream descendant used to retrieve the un-encoded contents of the RFC message part.

ADest is a TStream descendant where the encoded message part will be written.

The file-based variant of Encode reads the contents of the file specified in AFilename, and writes the encoded contents to the stream specified in ADest. This variant of Encode creates a temporary file stream for AFilename, and calls the abstract Encode method using the temporary file stream.

The Stream-based variant of Encode is an abstract virtual procedure, and specifies the interface for using TStreams as bothe the source of the RFC message part and the destination for the Descendant classes, like TIdMessageEncoderMIME, TIdMessageEncoderUUE, and TIdMessageEncoderXXE, must implement the Encode method to provide support for genmerating the encoded message part contents using a specific encoding algorithm.


Created with Doc-O-Matic 2 donated to Project JEDI. Commercial license available from the Doc-O-Matic site.