ElectronicMailService |
|
|
TracksMessageDelivery |
Define Class ElectronicMailService; mixes in with Object; // PostOffice protocol operation CanConnectNow(ticket: TransferTicket): Boolean, noMethod; operation SameConnection(ticket: TransferTicket; previousMessage: TransferTicket): Boolean, noMethod; operation InitiateConnection(ticket: TransferTicket), noMethod; operation Transfer(ticket: TransferTicket), noMethod; operation TransferAnother(ticket: TransferTicket; previousTicket: TransferTicket), noMethod; operation Receive(ticket: TransferTicket), noMethod; operation CompleteTransfer(ticket: TransferTicket), noMethod; operation TerminateConnection(ticket: TransferTicket), noMethod; operation AbortTransfer(ticket: TransferTicket), noMethod; // creating tickets for sending, collecting & mail summaries operation MakeCardTransferTickets(card: Card; serviceChoice: ServiceChoice): TransferTicket; operation MakeCollectionTransferTicket(serviceChoice: ServiceChoice): TransferTicket; operation MakeSummaryTransferTicket(serviceChoice: ServiceChoice): TransferTicket; // collecting choices for sending, collecting & mail summaries // (returns # of choices collected in this call; can pass nilObject for // the choiceList if only want a count) operation CollectServiceChoicesForSendingMail(choiceList: ObjectList): Unsigned; operation CollectServiceChoicesForCollectingMail(choiceList: ObjectList): Unsigned; operation CollectServiceChoicesForMailSummary(choiceList: ObjectList): Unsigned; // DeliveryChoices for Telecards operation CanAcceptAddressLabel(addressLabel: AddressInfo; serviceChoice: ServiceChoice): Boolean; operation IsNativeAddressLabel(addressLabel: AddressInfo): Boolean; operation CollectDeliveryChoices(recipient: SimpleContact; serviceChoice: ServiceChoice; card: Card; choiceList: ObjectList); // recipient must never be a full contact operation CollectPossibleLabels(serviceChoice: ServiceChoice; choiceList: ObjectList); intrinsic DeliveryChoiceFromAddressInfo(addressInfo: AddressInfo; recipient: Contact; serviceChoice: ServiceChoice; nearThis: Object): DeliveryChoice; // mail summary support operation GoToSummaryScene(mailbox: ServiceChoice); // does nothing; override to go to service's mail summary scene // Delivery report stuff operation UpdateReportFromDelivery(ticket: TransferTicket; message: Object; condition: Unsigned); // override if your service supports delivery reports to add // delivery reports to the given report. This method will get // called when the message is sent to the mail service. // condition is meant to represent other states for which you // might want to generate different delivery // reports. Currently, it is not used. The default behavior // is to report that the message has been sent and no further // reports will be given. Don't call inherited for this // behavior! attribute TracksMessageDelivery: Boolean, readOnly; // returns false; override to return true if you override UpdateReportFromDelivery // directory info operation RequestDirectoryInfo(aboutEntity: Object); // forced delivery connections (e.g., beaming) // (note: this might be done better with Listen on the stream in the future) operation HandleForcedConnection(stream: Stream; data: Object); // Power down prompt operation WarnServiceWithPowerDownPrompt() : Boolean; // Ask the service whether to display the power down prompt which gives user the choice to // continue on-going mail communication or to shut down. // Override if you do not want to display this prompt. end class;