- From: Suresh Chitturi <schitturi@rim.com>
- Date: Fri, 30 Apr 2010 16:07:07 -0500
- To: <public-device-apis@w3.org>
- Message-ID: <D37CC1B151BD57489F4F89609F168FE8054CBC3A@XCH01DFW.rim.net>
Hi all, Here is the proposal to update the current Messaging API, based on our discussion that occurred during this week's call. The key changes include: 1) Separation of interfaces based on message type. 2) New attributes such as 'status', 'priority', 'folder'. 3) Addition of 'accountID' attribute to distinguish different email accounts. Note: some missing aspects include 1) Search/Find/Filter capabilities 2) Folder management (e.g. Copy, Move) - Max had a simple proposal on this which can be added I assume. Thanks, Suresh =============================================== interface MessagingManager { const unsigned short FOLDER_INBOX = 0; const unsigned short FOLDER_SENT = 1; const unsigned short FOLDER_DRAFT = 2; const unsigned short FOLDER_OUTBOX = 3; const unsigned short FOLDER_DELETED = 4; const unsigned short FOLDER_OTHER = 5; const unsigned short STATUS_SAVED = 0; const unsigned short STATUS_DRAFT= 1; const unsigned short STATUS_SENT = 2; //Create messages SMSMessage createSMS (in SMSProperties smsProperties); MMSMessage createMMS (in MMSProperties mmsProperties); EmailMessage createEmail (in EmailProperties emailProperties); //Subscribe int subscribeOnSMS (in OnIncomingSMS messageEventCB); int subscribeOnMMS (in OnIncomingMMS messageEventCB); int subscribeOnEmail (in OnIncomingEmail messageEventCB); //Unsubscribe to incoming messages void unsubscribe (in int subscriptionHandle); }; ============== SMS interfaces ============== interface SMSMessage : SMSProperties { readonly attribute DOMString id; readonly attribute Date timestamp; //determined by the folder (inbox=received time, sent="sent time", draft="created time") PendingOp send () raises (SMSException); PendingOp remove(); PendingOp save(); }; interface SMSProperties { attribute DOMString[] to; attribute DOMString body; readonly attribute DOMString from; readonly attribute unsigned short folder; //one of FOLDER_* constants determined by the system. readonly attribute unsigned short status: //one of STATUS_* constants determined by the system. }; interface OnIncomingSMS { void onEvent (in SMSMessage message); }; ============== MMS interfaces ============== interface MMSMessage : MMSProperties { readonly attribute DOMString id; readonly attribute Date timestamp; //determined by the folder (inbox=received time, sent="sent time", draft="created time") PendingOp send () raises (MMSException); }; interface MMSProperties { attribute DOMString[] to; attribute DOMString[] cc; attribute DOMString[] bcc; attribute DOMString subject; attribute DOMString body; readonly attribute DOMString from; readonly attribute unsigned short folder; //one of FOLDER_* constants determined by the system. readonly attribute unsigned short status: //one of STATUS_* constants determined by the system. attribute File[] attachments; }; interface OnIncomingMMS { void onEvent (in MMSMessage message); }; ================ Email interfaces ================ interface EmailMessage : EmailProperties { readonly attribute DOMString id; readonly attribute Date timestamp; //determined by the folder (inbox=received time, sent="sent time", draft="created time") PendingOp send () raises (EmailException); PendingOp remove(); PendingOp save(); }; interface EmailProperties { const unsigned short PRIORITY_HIGH = 0; const unsigned short PRIORITY_MEDIUM= 1; const unsigned short PRIORITY_LOW = 2; attribute DOMString[] to; attribute DOMString[] cc; attribute DOMString[] bcc; attribute DOMString subject; attribute DOMString body; attribute DOMString accountId; //Indicates the email account Id/name associated with this message attribute unsigned short priority; //default = 1 readonly attribute unsigned short folder; //one of FOLDER_* constants determined by the system. readonly attribute unsigned short status: //one of STATUS_* constants determined by the system. readonly attribute DOMString from; attribute File[] attachments; }; interface OnIncomingEmail { void onEvent (in EmailMessage message); }; --------------------------------------------------------------------- This transmission (including any attachments) may contain confidential information, privileged material (including material protected by the solicitor-client or other applicable privileges), or constitute non-public information. Any use of this information by anyone other than the intended recipient is prohibited. If you have received this transmission in error, please immediately reply to the sender and delete this information from your system. Use, dissemination, distribution, or reproduction of this transmission by unintended recipients is not authorized and may be unlawful.
Received on Friday, 30 April 2010 21:08:01 UTC