sysapps / messaging

The messaging API
4 stars 7 forks source link

separate storage interface #89

Open zolkis opened 10 years ago

zolkis commented 10 years ago

For modularity and being more future-proof I propose to change the specification in the following way:

  1. Messaging should be MessagingManager
  2. separate storage interface
MessagingManager implements MessagingStorage;
interface MessagingManager {
    readonly    attribute SmsManager sms;
    readonly    attribute MmsManager mms;
};

Then,

interface MessagingStorage {
    Promise findMessages (MessagingFilter filter, FilterOptions options);
    Promise findConversations (DOMString groupBy, MessagingFilter filter, FilterOptions options);
    Promise getMessage (DOMString messageID);
    Promise deleteMessage (DOMString messageID);
    Promise deleteConversation (DOMString conversationID);
    Promise markMessageRead (DOMString messageID, boolean value, optional boolean sendReadReport = false);
    Promise markConversationRead (DOMString conversationID, boolean value, optional boolean sendReadReport = false);
}
zolkis commented 10 years ago

@efullea if you think this is OK, I can do the editing, once I update the Telephony spec.