michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this file, michael@0: * You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: #include "nsIDOMEventTarget.idl" michael@0: michael@0: interface nsIDOMEventListener; michael@0: interface nsIDOMMozSmsFilter; michael@0: interface nsIDOMMozSmsSegmentInfo; michael@0: interface nsIDOMDOMCursor; michael@0: interface nsIDOMDOMRequest; michael@0: interface nsIDOMBlob; michael@0: michael@0: [scriptable, builtinclass, uuid(8ec8247d-3f5f-41af-9c72-9dc857e3be81)] michael@0: interface nsIDOMMozMobileMessageManager : nsIDOMEventTarget michael@0: { michael@0: nsIDOMDOMRequest getSegmentInfoForText(in DOMString text); michael@0: michael@0: michael@0: /** michael@0: * Function to send SMS. michael@0: * michael@0: * @param number michael@0: * Either a DOMString (only one number) or an array of numbers. michael@0: * @param message michael@0: * The text message to be sent. michael@0: * @param sendParameters michael@0: * An SmsSendParameters object. michael@0: * @param return michael@0: * A DOMRequest object indicating the sending result if one number michael@0: * has been passed; an array of DOMRequest objects otherwise. michael@0: */ michael@0: [implicit_jscontext, optional_argc] michael@0: jsval send(in jsval number, in DOMString message, michael@0: [optional] in jsval sendParameters); michael@0: michael@0: /** michael@0: * Function to send MMS. michael@0: * michael@0: * @param parameters michael@0: * An MmsParameters object. michael@0: * @param sendParameters michael@0: * An MmsSendParameters object. michael@0: * @param return michael@0: * A DOMRequest object indicating the sending result. michael@0: */ michael@0: [implicit_jscontext, optional_argc] michael@0: nsIDOMDOMRequest sendMMS(in jsval parameters, michael@0: [optional] in jsval sendParameters); michael@0: michael@0: [binaryname(GetMessageMoz)] michael@0: nsIDOMDOMRequest getMessage(in long id); michael@0: michael@0: // The parameter can be either a message id or a nsIDOMMoz{Mms,Sms}Message. michael@0: [implicit_jscontext] michael@0: nsIDOMDOMRequest delete(in jsval param); michael@0: michael@0: // Iterates through nsIDOMMoz{Mms,Sms}Message. michael@0: nsIDOMDOMCursor getMessages(in nsIDOMMozSmsFilter filter, in boolean reverse); michael@0: michael@0: nsIDOMDOMRequest markMessageRead(in long id, in boolean value, michael@0: [optional] in boolean aSendReadReport); michael@0: michael@0: // Iterates through nsIDOMMozMobileMessageThread. michael@0: nsIDOMDOMCursor getThreads(); michael@0: michael@0: nsIDOMDOMRequest retrieveMMS(in long id); michael@0: michael@0: [optional_argc] michael@0: nsIDOMDOMRequest getSmscAddress([optional] in unsigned long serviceId); michael@0: michael@0: [implicit_jscontext] attribute jsval onreceived; michael@0: [implicit_jscontext] attribute jsval onretrieving; michael@0: [implicit_jscontext] attribute jsval onsending; michael@0: [implicit_jscontext] attribute jsval onsent; michael@0: [implicit_jscontext] attribute jsval onfailed; michael@0: [implicit_jscontext] attribute jsval ondeliverysuccess; michael@0: [implicit_jscontext] attribute jsval ondeliveryerror; michael@0: [implicit_jscontext] attribute jsval onreadsuccess; michael@0: [implicit_jscontext] attribute jsval onreaderror; michael@0: };