Indy 9
Hierarchy, Properties, Methods, See Also, Unit: IdMessage
Represents MIME boundary markers from RFC message headers.
TIdMIMEBoundary = class
TIdMIMEBoundary is a Class used to detect and handle MIME boundary markers in message headerd for an RFC 822-compliant message. In essence, TIdMIMEBoundary is used as a Stack-based container for MIME boundary markers detected in a "Content-Type" header.

New boundary markers are "added to the the top of the stack, using the Push method, when they are detected during header processing. Like any stack container, TIdMIMEBoundary also has mechanisms to Pop and Clear accumulated values in the boundary marker list.

TIdMIMEBoundary also provides a class function to locate a boundary marker in a given string, FindBoundary, without requiring a realized instance of the class.

An instance of TIdMIMEBoundary is used to represent the MIMEBoundary property in TIdMessage.

Indicates the most recent MIME boundary marker in the list.
property Boundary: string;
Boundary is a read-only String property that identifies the most recent MIME boundary marker in the list. Boundary can be used to read the last boundary marker encountered during message header processing.

TIdMIMEBoundary, See Also
Indicates if the boundary marker was added to the list in Push.
property NewBoundary: Boolean;
NewBoundary is a Boolean property that indicates if the boundary marker added to the internal list of boundary markers is a new marker, or another occurrance of the most recent boundary marker.

NewBoundary is updated in the Push method. NewBoundary will contain True when the boundary list is not empty, and the current marker has the same value as the boundary marker on the top of the stack. Check NewBoundary after using Push to determine if the marker was added to the list.

TIdMIMEBoundary, See Also
Removes boundary markers from the internal list.
procedure Clear;
Clear is a procedure removes all boundary markers in the in internal list accumulated by the TIdMIMEBoundary instance. Clear is called when a TIdMessage instance uses the TIdMessage.Clear or TIdMessage.ClearHeader methods.

TIdMIMEBoundary, See Also
Constructor for the class instance.
constructor Create;
Create is the constructor for the class instance, ancd initializes the internal list used to accumulate boundary markers during message header processing.

TIdMIMEBoundary, See Also
Frees the class instance.
destructor Destroy; override;
Destroy is the destructor for the class instance, and is responsible for freeing resources allocated in the constructor. Destroy Clears the internal list of boundary markers prior top calling the inherited Destroy method.

TIdMIMEBoundary, See Also
Detects a boundary marker in a message header.
class function FindBoundary(AContentType: string): string;
AContentType: string
Content type header to be checked for a boundary marker parameter.
Return Value
String - Boundary marker detected or ''.
FindBoundary is a String class function that examines the "content-Type" header specified in AContentType to detect the presence of a boundary marker parameter. If a boundary marker is present, it is removed from AContentType and used as the return value for the method. If a boundary marker is not detected, the return value for the method will be an empty string ('').

During message header processing, FindBoundary is used to retrieve the boundary marker that will be added to the marker list using Push.

TIdMIMEBoundary, See Also
Removes the boundary marker on the top of the stack.
procedure Pop;
Pop is a procedure used to remove the boundary marker at the top of the internal marker list. Calling Pop when not marker values have been Pushed onto the list can result in an "index out of range" exception. Use Clear to remove all boundary marker in the internal list.

TIdMIMEBoundary, See Also
Add a new boundary marker to the top of the boundary marker stack.
procedure Push(ABoundary: string);
ABoundary: string
Boundary marker to be added to the internal list.
Push is a procedure used to add the boundary marker in ABoundary using a stack-like mechanism, where the new value is added to the top of the internal. Push checks that ABoundary does not already exist in the list, and sets NewBoundary to True when the value already exists. If it does not exist, ABOundary is inserted into the internal list at element 0 (zero), and NewBoundary is set to False.

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