Confirmed users
398
edits
No edit summary |
|||
| Line 19: | Line 19: | ||
== Messaging API == | == Messaging API == | ||
interface | interface Messaging { | ||
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(SmsMessage msg); // IM or Telephony Apps can add a new message as a new arrival. | |||
}; | }; | ||
interface | 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 | 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. |type| and |serviceID| can be removed and replaced by |handler| and |receiver| while |receiver| are used to distinguish different SIM. | ||
Should we provide a way for synchronization between the database of Messaging API and App's local storage? | Should we provide a way for synchronization between the database of Messaging API and App's local storage? | ||