[operations] [attributes] [fields] [template] [definition]
[implementation] [documentation]
To use the search tool you need to use a browser which supports JAVA (c)

[next] [prev] [superclass] [next peer] [prev peer] [subclass] [index] [hierarchy]

MailDecoder

mixes in with Object

MailDecoder



Operations

Get list of all operations

AddPart
ApplyPartsToMessage
ClearParts
CreateTelecardFromDetails
DeliverMessageToInBox
PartAt
ReadAndAddOnePart
ReadAndAddParts
ReadEntireMessage
RemovePartAt


Attributes

Get list of all attributes

HasMissingParts
MessageDetails
PartCount


Fields

Field Type
MailDecoder: contentTypeLabels: ObjectList
parts: ObjectList
messageDetails: ContentTypeLabel
transferTicket: TransferTicket
hasMissingParts: Boolean


Instance template

Class MailDecoder cannot be instantiated.


Class definition

Define Class MailDecoder;
    mixes in with Object;

    field contentTypeLabels:    ObjectList;
    field parts:                ObjectList;
    field messageDetails:       ContentTypeLabel, getter;
    field transferTicket:       TransferTicket, weak;
    field hasMissingParts:      Boolean, getter, setter;
        // if true when ApplyPartsToMessage is called, a puzzle-piece stamp will
        // be added to the telecard

    attribute MessageDetails:   ContentTypeLabel, readOnly;
    attribute HasMissingParts:  Boolean;

    operation AddPart(part: Object; contentLabel: ContentTypeLabel);
        // add this part to the list of parts belonging to to the message
        // currently being decoded.

    operation RemovePartAt(index: Unsigned);
        // remove a part from the list of parts for this message. Should be
        // called after a part is applied to the destination telecard.

    attribute PartCount: Unsigned, readOnly;
        // count of the number of parts.

    operation PartAt(index: Unsigned; var contentLabel: ContentTypeLabel): Object;
        // returns the object based on a index. Used for iterating over all
        // the parts. Pass nil for the contentLabel parameter if you do
        // don't want a copy of the content label for that part created
        // and returned.

    operation ReadEntireMessage(source: Stream; ticket: TransferTicket; nearThis: Object): Telecard;
        // call for each message that needs to be collected.

    operation ClearParts();
        // call to clear out all remaining parts. Called by ReadEntireMessage().

    operation ReadAndAddParts(source: Stream; nearThis: Object), noMethod;
        // called by ReadEntireMessage. Override to collect all the message parts from
        // the mail source and add them using AddPart().

    operation ReadAndAddOnePart(source: Stream; contentLabel: ContentTypeLabel; nearThis: Object);
        // utility routine to properly decode a part, given a source stream and
        // a ContentTypeLabel.

    operation CreateTelecardFromDetails(extras: MagicCapMailExtras; nearThis: Object): Telecard;
        // called from ReadEntireMessage() to create a Telecard and set its details
        // from the contentTypeLabel in messageDetails.

    operation ApplyPartsToMessage(card: Telecard);
        // called from ReadEntireMessage() to take the contents of all the parts and apply
        // them to the correct portion of a telecard.

    operation DeliverMessageToInBox(message: Telecard);
        // call to take the message and put it in the inbox.
end class;