1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/dom/mobilemessage/interfaces/nsIDOMMobileMessageManager.idl Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,81 @@ 1.4 +/* This Source Code Form is subject to the terms of the Mozilla Public 1.5 + * License, v. 2.0. If a copy of the MPL was not distributed with this file, 1.6 + * You can obtain one at http://mozilla.org/MPL/2.0/. */ 1.7 + 1.8 +#include "nsIDOMEventTarget.idl" 1.9 + 1.10 +interface nsIDOMEventListener; 1.11 +interface nsIDOMMozSmsFilter; 1.12 +interface nsIDOMMozSmsSegmentInfo; 1.13 +interface nsIDOMDOMCursor; 1.14 +interface nsIDOMDOMRequest; 1.15 +interface nsIDOMBlob; 1.16 + 1.17 +[scriptable, builtinclass, uuid(8ec8247d-3f5f-41af-9c72-9dc857e3be81)] 1.18 +interface nsIDOMMozMobileMessageManager : nsIDOMEventTarget 1.19 +{ 1.20 + nsIDOMDOMRequest getSegmentInfoForText(in DOMString text); 1.21 + 1.22 + 1.23 + /** 1.24 + * Function to send SMS. 1.25 + * 1.26 + * @param number 1.27 + * Either a DOMString (only one number) or an array of numbers. 1.28 + * @param message 1.29 + * The text message to be sent. 1.30 + * @param sendParameters 1.31 + * An SmsSendParameters object. 1.32 + * @param return 1.33 + * A DOMRequest object indicating the sending result if one number 1.34 + * has been passed; an array of DOMRequest objects otherwise. 1.35 + */ 1.36 + [implicit_jscontext, optional_argc] 1.37 + jsval send(in jsval number, in DOMString message, 1.38 + [optional] in jsval sendParameters); 1.39 + 1.40 + /** 1.41 + * Function to send MMS. 1.42 + * 1.43 + * @param parameters 1.44 + * An MmsParameters object. 1.45 + * @param sendParameters 1.46 + * An MmsSendParameters object. 1.47 + * @param return 1.48 + * A DOMRequest object indicating the sending result. 1.49 + */ 1.50 + [implicit_jscontext, optional_argc] 1.51 + nsIDOMDOMRequest sendMMS(in jsval parameters, 1.52 + [optional] in jsval sendParameters); 1.53 + 1.54 + [binaryname(GetMessageMoz)] 1.55 + nsIDOMDOMRequest getMessage(in long id); 1.56 + 1.57 + // The parameter can be either a message id or a nsIDOMMoz{Mms,Sms}Message. 1.58 + [implicit_jscontext] 1.59 + nsIDOMDOMRequest delete(in jsval param); 1.60 + 1.61 + // Iterates through nsIDOMMoz{Mms,Sms}Message. 1.62 + nsIDOMDOMCursor getMessages(in nsIDOMMozSmsFilter filter, in boolean reverse); 1.63 + 1.64 + nsIDOMDOMRequest markMessageRead(in long id, in boolean value, 1.65 + [optional] in boolean aSendReadReport); 1.66 + 1.67 + // Iterates through nsIDOMMozMobileMessageThread. 1.68 + nsIDOMDOMCursor getThreads(); 1.69 + 1.70 + nsIDOMDOMRequest retrieveMMS(in long id); 1.71 + 1.72 + [optional_argc] 1.73 + nsIDOMDOMRequest getSmscAddress([optional] in unsigned long serviceId); 1.74 + 1.75 + [implicit_jscontext] attribute jsval onreceived; 1.76 + [implicit_jscontext] attribute jsval onretrieving; 1.77 + [implicit_jscontext] attribute jsval onsending; 1.78 + [implicit_jscontext] attribute jsval onsent; 1.79 + [implicit_jscontext] attribute jsval onfailed; 1.80 + [implicit_jscontext] attribute jsval ondeliverysuccess; 1.81 + [implicit_jscontext] attribute jsval ondeliveryerror; 1.82 + [implicit_jscontext] attribute jsval onreadsuccess; 1.83 + [implicit_jscontext] attribute jsval onreaderror; 1.84 +};