dom/mobilemessage/interfaces/nsIDOMMobileMessageManager.idl

changeset 0
6474c204b198
equal deleted inserted replaced
-1:000000000000 0:ff11655782a0
1 /* This Source Code Form is subject to the terms of the Mozilla Public
2 * License, v. 2.0. If a copy of the MPL was not distributed with this file,
3 * You can obtain one at http://mozilla.org/MPL/2.0/. */
4
5 #include "nsIDOMEventTarget.idl"
6
7 interface nsIDOMEventListener;
8 interface nsIDOMMozSmsFilter;
9 interface nsIDOMMozSmsSegmentInfo;
10 interface nsIDOMDOMCursor;
11 interface nsIDOMDOMRequest;
12 interface nsIDOMBlob;
13
14 [scriptable, builtinclass, uuid(8ec8247d-3f5f-41af-9c72-9dc857e3be81)]
15 interface nsIDOMMozMobileMessageManager : nsIDOMEventTarget
16 {
17 nsIDOMDOMRequest getSegmentInfoForText(in DOMString text);
18
19
20 /**
21 * Function to send SMS.
22 *
23 * @param number
24 * Either a DOMString (only one number) or an array of numbers.
25 * @param message
26 * The text message to be sent.
27 * @param sendParameters
28 * An SmsSendParameters object.
29 * @param return
30 * A DOMRequest object indicating the sending result if one number
31 * has been passed; an array of DOMRequest objects otherwise.
32 */
33 [implicit_jscontext, optional_argc]
34 jsval send(in jsval number, in DOMString message,
35 [optional] in jsval sendParameters);
36
37 /**
38 * Function to send MMS.
39 *
40 * @param parameters
41 * An MmsParameters object.
42 * @param sendParameters
43 * An MmsSendParameters object.
44 * @param return
45 * A DOMRequest object indicating the sending result.
46 */
47 [implicit_jscontext, optional_argc]
48 nsIDOMDOMRequest sendMMS(in jsval parameters,
49 [optional] in jsval sendParameters);
50
51 [binaryname(GetMessageMoz)]
52 nsIDOMDOMRequest getMessage(in long id);
53
54 // The parameter can be either a message id or a nsIDOMMoz{Mms,Sms}Message.
55 [implicit_jscontext]
56 nsIDOMDOMRequest delete(in jsval param);
57
58 // Iterates through nsIDOMMoz{Mms,Sms}Message.
59 nsIDOMDOMCursor getMessages(in nsIDOMMozSmsFilter filter, in boolean reverse);
60
61 nsIDOMDOMRequest markMessageRead(in long id, in boolean value,
62 [optional] in boolean aSendReadReport);
63
64 // Iterates through nsIDOMMozMobileMessageThread.
65 nsIDOMDOMCursor getThreads();
66
67 nsIDOMDOMRequest retrieveMMS(in long id);
68
69 [optional_argc]
70 nsIDOMDOMRequest getSmscAddress([optional] in unsigned long serviceId);
71
72 [implicit_jscontext] attribute jsval onreceived;
73 [implicit_jscontext] attribute jsval onretrieving;
74 [implicit_jscontext] attribute jsval onsending;
75 [implicit_jscontext] attribute jsval onsent;
76 [implicit_jscontext] attribute jsval onfailed;
77 [implicit_jscontext] attribute jsval ondeliverysuccess;
78 [implicit_jscontext] attribute jsval ondeliveryerror;
79 [implicit_jscontext] attribute jsval onreadsuccess;
80 [implicit_jscontext] attribute jsval onreaderror;
81 };

mercurial