ACTION-142, Propose two interfaces Outgoing and Incoming messages for messaging API

Proposal for 2 interfaces:

interface IncomingMessage : MessageProperties {
     const unsigned short SMS_TYPE = 1;
     const unsigned short MMS_TYPE = 2;
     const unsigned short EMAIL_TYPE = 3;
     readonly attribute DOMString      id;
     readonly attribute Date           sent;
     readonly attribute Date           received;
     readonly attribute unsigned short type;
};

interface OutgoingMessage : MessageProperties {
     const unsigned short SMS_TYPE = 1;
     const unsigned short MMS_TYPE = 2;
     const unsigned short EMAIL_TYPE = 3;
     readonly attribute unsigned short type;
     PendingOp send () raises (MessageSendException);
};

Other differences written in prose:

- the bcc field of an incoming message is null
- all the fields inherited from MessageProperties are readonly for 
*both* types.

That last point may be controversial. It depends on whether we consider 
an outgoing message read-only because it's been created by a create 
function (createMMS, createEmail or createSMS)

If, on the contrary, an outgoing message should be considered 
read-write, then do we need create functions?

Max.

Received on Wednesday, 21 April 2010 13:53:57 UTC