|
|
Line 79: |
Line 79: |
| Since Communication Apps share their contacts through Data Store API, Contacts can import all Contacts. | | Since Communication Apps share their contacts through Data Store API, Contacts can import all Contacts. |
|
| |
|
| == Messaging API == | | == Format of Messages == |
| interface Messaging { | | All messages are shared through Data Store API. Messages are SMS, MMS, EMail, and IM messages. |
| readonly attribute SmsManager sms;
| |
| readonly attribute MmsManager mms;
| |
| MessagingRequest findMessages (MessagingFilter filter, FilterOptions options);
| |
| MessagingRequest findConversations (DOMString groupBy, MessagingFilter filter, FilterOptions options);
| |
| MessagingRequest getMessage (DOMString id);
| |
| MessagingRequest deleteMessage (DOMString id);
| |
| MessagingRequest deleteConversation (DOMString id);
| |
| MessagingRequest markMessageRead (DOMString id, boolean value);
| |
| MessagingRequest markConversationRead (DOMString id, boolean value);
| |
| MessagingRequest addArrivedMessage(MmsMessage msg); // IM or Telephony Apps can add a new message as a new arrival.
| |
| };
| |
| | |
| interface Message {
| |
| readonly attribute DOMString id;
| |
| readonly attribute DOMString handler; // the application that can handle the message for replying or sending.
| |
| readonly attribute DOMString receiver; // the account receiving the message.
| |
| readonly attribute DOMString sender;
| |
| readonly attribute Date timestamp;
| |
| readonly attribute boolean read;
| |
| };
| |
| | |
| * '''addArrivedMessage()''' is added to Messaging to let communication Apps add a message for a new arriving message.
| |
| * '''handler''' is added to Message to record the application can handle replying the message.
| |
| * '''receiver''' is the account receiving the message. It is used by the handler to distinguish the user of the service. The message app is not supposed for responding for editing messages. It should wake up the handler of the message for editing. (MUA is an example.)
| |
| | |
| '''type''' and '''serviceID''' can be removed and replaced by |handler| and |receiver| while |receiver| are used to distinguish different SIM.
| |
| | |
| MmsMessage are suggested for more flexible that handler can format the message in HTML to provide a rich representation.
| |
| | |
| Should we provide a way for synchronization between the database of Messaging API and App's local storage?
| |
|
| |
|
| == Reply a Message == | | == Reply a Message == |