W3C home > Mailing lists > Public > public-device-apis@w3.org > April 2010

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

From: Max Froumentin <maxfro@opera.com>
Date: Wed, 21 Apr 2010 15:52:46 +0200
Message-ID: <4BCF032E.9050900@opera.com>
To: "public-device-apis@w3.org" <public-device-apis@w3.org>
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 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 9 May 2012 00:14:07 GMT