dom/mobilemessage/interfaces/nsIRilMobileMessageDatabaseService.idl

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

michael@0 1 /* This Source Code Form is subject to the terms of the Mozilla Public
michael@0 2 * License, v. 2.0. If a copy of the MPL was not distributed with this file,
michael@0 3 * You can obtain one at http://mozilla.org/MPL/2.0/. */
michael@0 4
michael@0 5 #include "domstubs.idl"
michael@0 6 #include "nsISupports.idl"
michael@0 7 #include "nsIMobileMessageDatabaseService.idl"
michael@0 8
michael@0 9 [scriptable, function, uuid(92986322-8d56-11e2-8816-73a531c493c2)]
michael@0 10 interface nsIRilMobileMessageDatabaseCallback : nsISupports
michael@0 11 {
michael@0 12 /**
michael@0 13 * |aDomMessage|: the nsIDOMMoz{Mms,Sms}Message
michael@0 14 */
michael@0 15 void notify(in nsresult aRv, in nsISupports aDomMessage);
michael@0 16 };
michael@0 17
michael@0 18 [scriptable, function, uuid(32b02bbe-60a1-45e0-a748-ad40709b09dd)]
michael@0 19 interface nsIRilMobileMessageDatabaseRecordCallback : nsISupports
michael@0 20 {
michael@0 21 /**
michael@0 22 * |aMessageRecord| Object: the mobile-message database record
michael@0 23 * |aDomMessage|: the nsIDOMMoz{Mms,Sms}Message. Noted, this value might be null.
michael@0 24 */
michael@0 25 void notify(in nsresult aRv, in jsval aMessageRecord, in nsISupports aDomMessage);
michael@0 26 };
michael@0 27
michael@0 28 [scriptable, function, uuid(1b0ff03c-a2bc-11e3-a443-838d034c9805)]
michael@0 29 interface nsIRilMobileMessageDatabaseConcatenationCallback : nsISupports
michael@0 30 {
michael@0 31 /**
michael@0 32 * |aCompleteMessage|: jsval: the completely concatenated message. Noted, this value might be null.
michael@0 33 */
michael@0 34 void notify(in nsresult aRv, in jsval aCompleteMessage);
michael@0 35 };
michael@0 36
michael@0 37 [scriptable, uuid(0b437a5c-a2bc-11e3-bd1b-dbb173eb35f8)]
michael@0 38 interface nsIRilMobileMessageDatabaseService : nsIMobileMessageDatabaseService
michael@0 39 {
michael@0 40 /**
michael@0 41 * |aMessage| Object: should contain the following properties for internal use:
michael@0 42 * - |type| DOMString: "sms" or "mms"
michael@0 43 * - |timestamp| Number: the timestamp of received message
michael@0 44 * - |iccId| DOMString: [optional] the ICC ID of the SIM for receiving
michael@0 45 * message if available.
michael@0 46 *
michael@0 47 * - If |type| == "sms", we also need:
michael@0 48 * - |messageClass| DOMString: the message class of received message
michael@0 49 * - |receiver| DOMString: the phone number of receiver
michael@0 50 * - |pid| Number: the TP-PID field of the SMS TPDU, default 0.
michael@0 51 * - |sender| DOMString: the phone number of sender
michael@0 52 *
michael@0 53 * - If |type| == "mms", we also need:
michael@0 54 * - |delivery| DOMString: the delivery state of received message
michael@0 55 * - |deliveryStatus| DOMString: the delivery status of received message
michael@0 56 * - |receivers| DOMString Array: the phone numbers of receivers
michael@0 57 * - |phoneNumber| DOMString: [optional] my own phone number.
michael@0 58 */
michael@0 59 void saveReceivedMessage(in jsval aMessage,
michael@0 60 [optional] in nsIRilMobileMessageDatabaseCallback aCallback);
michael@0 61
michael@0 62 /**
michael@0 63 * |aMessage| Object: should contain the following properties for internal use:
michael@0 64 * - |type| DOMString: "sms" or "mms"
michael@0 65 * - |sender| DOMString: the phone number of sender
michael@0 66 * - |timestamp| Number: the timestamp of sending message
michael@0 67 * - |deliveryStatusRequested| Bool: true when the delivery report is requested.
michael@0 68 * - |iccId| DOMString: the ICC ID of the SIM for sending message
michael@0 69 *
michael@0 70 * - If |type| == "sms", we also need:
michael@0 71 * - |receiver| DOMString: the phone number of receiver
michael@0 72 *
michael@0 73 * - If |type| == "mms", we also need:
michael@0 74 * - |receivers| DOMString Array: the phone numbers of receivers
michael@0 75 */
michael@0 76 void saveSendingMessage(in jsval aMessage,
michael@0 77 [optional] in nsIRilMobileMessageDatabaseCallback aCallback);
michael@0 78
michael@0 79 /**
michael@0 80 * |aMessageId| Number: the message's DB record ID.
michael@0 81 * |aReceiver| DOMString: the phone number of receiver (for MMS; can be null).
michael@0 82 * |aDelivery| DOMString: the new delivery value to update (can be null).
michael@0 83 * |aDeliveryStatus| DOMString: the new delivery status to update (can be null).
michael@0 84 * |aEnvelopeId| DOMString: the "message-id" specified in the MMS PDU headers.
michael@0 85 * |aCallback| nsIRilMobileMessageDatabaseCallback: an optional callback.
michael@0 86 */
michael@0 87 void setMessageDeliveryByMessageId(in long aMessageId,
michael@0 88 in DOMString aReceiver,
michael@0 89 in DOMString aDelivery,
michael@0 90 in DOMString aDeliveryStatus,
michael@0 91 in DOMString aEnvelopeId,
michael@0 92 [optional] in nsIRilMobileMessageDatabaseCallback aCallback);
michael@0 93
michael@0 94 /**
michael@0 95 * |aEnvelopeId| DOMString: the "message-id" specified in the MMS PDU headers.
michael@0 96 * |aReceiver| DOMString: the phone number of receiver (for MMS; can be null).
michael@0 97 * |aDeliveryStatus| DOMString: the new delivery status to be updated (can be null).
michael@0 98 * |aCallback| nsIRilMobileMessageDatabaseCallback: an optional callback.
michael@0 99 */
michael@0 100 void setMessageDeliveryStatusByEnvelopeId(in DOMString aEnvelopeId,
michael@0 101 in DOMString aReceiver,
michael@0 102 in DOMString aDeliveryStatus,
michael@0 103 [optional] in nsIRilMobileMessageDatabaseCallback aCallback);
michael@0 104
michael@0 105 /**
michael@0 106 * |aEnvelopeId| DOMString: the "message-id" specified in the MMS PDU headers.
michael@0 107 * |aReceiver| DOMString: the phone number of receiver (for MMS; can be null).
michael@0 108 * |aReadStatus| DOMString: the new read status to be updated.
michael@0 109 * |aCallback| nsIRilMobileMessageDatabaseCallback: an optional callback.
michael@0 110 */
michael@0 111 void setMessageReadStatusByEnvelopeId(in DOMString aEnvelopeId,
michael@0 112 in DOMString aReceiver,
michael@0 113 in DOMString aReadStatus,
michael@0 114 [optional] in nsIRilMobileMessageDatabaseCallback aCallback);
michael@0 115
michael@0 116 /**
michael@0 117 * |aMessageId| Number: the message's DB record ID.
michael@0 118 * |aCallback| nsIRilMobileMessageDatabaseRecordCallback: a callback which
michael@0 119 * takes result flag, message record and domMessage as parameters.
michael@0 120 */
michael@0 121 void getMessageRecordById(in long aMessageId,
michael@0 122 in nsIRilMobileMessageDatabaseRecordCallback aCallback);
michael@0 123
michael@0 124 /**
michael@0 125 * |aTransactionId| DOMString: the transaction ID of MMS PDU.
michael@0 126 * |aCallback| nsIRilMobileMessageDatabaseRecordCallback: a callback which
michael@0 127 * takes result flag and message record as parameters.
michael@0 128 */
michael@0 129 void getMessageRecordByTransactionId(in DOMString aTransactionId,
michael@0 130 in nsIRilMobileMessageDatabaseRecordCallback aCallback);
michael@0 131
michael@0 132 /**
michael@0 133 * |aCrError| nsresult: the NS_ERROR defined in Components.results.
michael@0 134 *
michael@0 135 * @returns the error code defined in nsIMobileMessageCallback
michael@0 136 */
michael@0 137 jsval translateCrErrorToMessageCallbackError(in nsresult aCrError);
michael@0 138
michael@0 139 /**
michael@0 140 * |aSmsSegment| jsval: Decoded Single SMS PDU.
michael@0 141 * |aCallback| nsIRilMobileMessageDatabaseConcatenationCallback: a callback which
michael@0 142 * takes result flag, and complete mesage as parameters.
michael@0 143 */
michael@0 144 void saveSmsSegment(in jsval aSmsSegment,
michael@0 145 in nsIRilMobileMessageDatabaseConcatenationCallback aCallback);
michael@0 146 };

mercurial