mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1108900 - Part 1: rename MobileMessageDatabaseService. r=echen
--HG-- rename : dom/mobilemessage/interfaces/nsIRilMobileMessageDatabaseService.idl => dom/mobilemessage/interfaces/nsIGonkMobileMessageDatabaseService.idl
This commit is contained in:
parent
ecb1789b0b
commit
552be75f56
@ -35,7 +35,7 @@
|
||||
#include "android/MobileMessageDatabaseService.h"
|
||||
#include "android/SmsService.h"
|
||||
#elif defined(MOZ_WIDGET_GONK) && defined(MOZ_B2G_RIL)
|
||||
#include "nsIRilMobileMessageDatabaseService.h"
|
||||
#include "nsIGonkMobileMessageDatabaseService.h"
|
||||
#include "nsIGonkSmsService.h"
|
||||
#endif
|
||||
#include "nsXULAppAPI.h" // For XRE_GetProcessType()
|
||||
@ -729,7 +729,7 @@ NS_CreateMobileMessageDatabaseService()
|
||||
mobileMessageDBService = new MobileMessageDatabaseService();
|
||||
#elif defined(MOZ_WIDGET_GONK) && defined(MOZ_B2G_RIL)
|
||||
mobileMessageDBService =
|
||||
do_CreateInstance(RIL_MOBILE_MESSAGE_DATABASE_SERVICE_CONTRACTID);
|
||||
do_CreateInstance(GONK_MOBILE_MESSAGE_DATABASE_SERVICE_CONTRACTID);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -144,8 +144,8 @@ XPCOMUtils.defineLazyServiceGetter(this, "gUUIDGenerator",
|
||||
"nsIUUIDGenerator");
|
||||
|
||||
XPCOMUtils.defineLazyServiceGetter(this, "gMobileMessageDatabaseService",
|
||||
"@mozilla.org/mobilemessage/rilmobilemessagedatabaseservice;1",
|
||||
"nsIRilMobileMessageDatabaseService");
|
||||
"@mozilla.org/mobilemessage/gonkmobilemessagedatabaseservice;1",
|
||||
"nsIGonkMobileMessageDatabaseService");
|
||||
|
||||
XPCOMUtils.defineLazyServiceGetter(this, "gMobileMessageService",
|
||||
"@mozilla.org/mobilemessage/mobilemessageservice;1",
|
||||
|
@ -2559,7 +2559,7 @@ MobileMessageDB.prototype = {
|
||||
},
|
||||
|
||||
/**
|
||||
* nsIRilMobileMessageDatabaseService API
|
||||
* nsIGonkMobileMessageDatabaseService API
|
||||
*/
|
||||
|
||||
saveReceivedMessage: function(aMessage, aCallback) {
|
||||
|
@ -12,10 +12,10 @@ Cu.import("resource://gre/modules/Services.jsm");
|
||||
let MMDB = {};
|
||||
Cu.import("resource://gre/modules/MobileMessageDB.jsm", MMDB);
|
||||
|
||||
const RIL_MOBILEMESSAGEDATABASESERVICE_CONTRACTID =
|
||||
"@mozilla.org/mobilemessage/rilmobilemessagedatabaseservice;1";
|
||||
const RIL_MOBILEMESSAGEDATABASESERVICE_CID =
|
||||
Components.ID("{29785f90-6b5b-11e2-9201-3b280170b2ec}");
|
||||
const GONK_MOBILEMESSAGEDATABASESERVICE_CONTRACTID =
|
||||
"@mozilla.org/mobilemessage/gonkmobilemessagedatabaseservice;1";
|
||||
const GONK_MOBILEMESSAGEDATABASESERVICE_CID =
|
||||
Components.ID("{7db05024-8038-11e4-b7fa-a3edb6f1bf0c}");
|
||||
|
||||
const DB_NAME = "sms";
|
||||
|
||||
@ -33,8 +33,8 @@ function MobileMessageDatabaseService() {
|
||||
}
|
||||
MobileMessageDatabaseService.prototype = {
|
||||
|
||||
classID: RIL_MOBILEMESSAGEDATABASESERVICE_CID,
|
||||
QueryInterface: XPCOMUtils.generateQI([Ci.nsIRilMobileMessageDatabaseService,
|
||||
classID: GONK_MOBILEMESSAGEDATABASESERVICE_CID,
|
||||
QueryInterface: XPCOMUtils.generateQI([Ci.nsIGonkMobileMessageDatabaseService,
|
||||
Ci.nsIMobileMessageDatabaseService,
|
||||
Ci.nsIObserver]),
|
||||
|
||||
@ -49,7 +49,7 @@ MobileMessageDatabaseService.prototype = {
|
||||
observe: function() {},
|
||||
|
||||
/**
|
||||
* nsIRilMobileMessageDatabaseService API
|
||||
* nsIGonkMobileMessageDatabaseService API
|
||||
*/
|
||||
|
||||
saveReceivedMessage: function(aMessage, aCallback) {
|
||||
|
@ -1,3 +1,3 @@
|
||||
component {29785f90-6b5b-11e2-9201-3b280170b2ec} MobileMessageDatabaseService.js
|
||||
contract @mozilla.org/mobilemessage/rilmobilemessagedatabaseservice;1 {29785f90-6b5b-11e2-9201-3b280170b2ec}
|
||||
category profile-after-change MobileMessageDatabaseService @mozilla.org/mobilemessage/rilmobilemessagedatabaseservice;1
|
||||
component {7db05024-8038-11e4-b7fa-a3edb6f1bf0c} MobileMessageDatabaseService.js
|
||||
contract @mozilla.org/mobilemessage/gonkmobilemessagedatabaseservice;1 {7db05024-8038-11e4-b7fa-a3edb6f1bf0c}
|
||||
category profile-after-change MobileMessageDatabaseService @mozilla.org/mobilemessage/gonkmobilemessagedatabaseservice;1
|
||||
|
@ -74,8 +74,8 @@ XPCOMUtils.defineLazyServiceGetter(this, "gMobileConnectionService",
|
||||
"nsIMobileConnectionService");
|
||||
|
||||
XPCOMUtils.defineLazyServiceGetter(this, "gMobileMessageDatabaseService",
|
||||
"@mozilla.org/mobilemessage/rilmobilemessagedatabaseservice;1",
|
||||
"nsIRilMobileMessageDatabaseService");
|
||||
"@mozilla.org/mobilemessage/gonkmobilemessagedatabaseservice;1",
|
||||
"nsIGonkMobileMessageDatabaseService");
|
||||
|
||||
XPCOMUtils.defineLazyServiceGetter(this, "gMobileMessageService",
|
||||
"@mozilla.org/mobilemessage/mobilemessageservice;1",
|
||||
|
@ -20,8 +20,8 @@ XPIDL_SOURCES += [
|
||||
|
||||
if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gonk' and CONFIG['MOZ_B2G_RIL']:
|
||||
XPIDL_SOURCES += [
|
||||
'nsIGonkMobileMessageDatabaseService.idl',
|
||||
'nsIGonkSmsService.idl',
|
||||
'nsIRilMobileMessageDatabaseService.idl',
|
||||
'nsISmsMessenger.idl',
|
||||
]
|
||||
|
||||
|
@ -6,8 +6,8 @@
|
||||
#include "nsISupports.idl"
|
||||
#include "nsIMobileMessageDatabaseService.idl"
|
||||
|
||||
[scriptable, function, uuid(92986322-8d56-11e2-8816-73a531c493c2)]
|
||||
interface nsIRilMobileMessageDatabaseCallback : nsISupports
|
||||
[scriptable, function, uuid(2ae081ac-8038-11e4-a472-1ba11eb89d79)]
|
||||
interface nsIGonkMobileMessageDatabaseCallback : nsISupports
|
||||
{
|
||||
/**
|
||||
* |aDomMessage|: the nsIDOMMoz{Mms,Sms}Message
|
||||
@ -15,8 +15,8 @@ interface nsIRilMobileMessageDatabaseCallback : nsISupports
|
||||
void notify(in nsresult aRv, in nsISupports aDomMessage);
|
||||
};
|
||||
|
||||
[scriptable, function, uuid(32b02bbe-60a1-45e0-a748-ad40709b09dd)]
|
||||
interface nsIRilMobileMessageDatabaseRecordCallback : nsISupports
|
||||
[scriptable, function, uuid(2f7a6fde-8038-11e4-9d93-5b9ffba492fb)]
|
||||
interface nsIGonkMobileMessageDatabaseRecordCallback : nsISupports
|
||||
{
|
||||
/**
|
||||
* |aMessageRecord| Object: the mobile-message database record
|
||||
@ -25,8 +25,8 @@ interface nsIRilMobileMessageDatabaseRecordCallback : nsISupports
|
||||
void notify(in nsresult aRv, in jsval aMessageRecord, in nsISupports aDomMessage);
|
||||
};
|
||||
|
||||
[scriptable, function, uuid(1b0ff03c-a2bc-11e3-a443-838d034c9805)]
|
||||
interface nsIRilMobileMessageDatabaseConcatenationCallback : nsISupports
|
||||
[scriptable, function, uuid(36f9732c-8038-11e4-b634-3f7e3df5232a)]
|
||||
interface nsIGonkMobileMessageDatabaseConcatenationCallback : nsISupports
|
||||
{
|
||||
/**
|
||||
* |aCompleteMessage|: jsval: the completely concatenated message. Noted, this value might be null.
|
||||
@ -35,14 +35,14 @@ interface nsIRilMobileMessageDatabaseConcatenationCallback : nsISupports
|
||||
};
|
||||
|
||||
%{C++
|
||||
#define RIL_MOBILE_MESSAGE_DATABASE_SERVICE_CID \
|
||||
{ 0x29785f90, 0x6b5b, 0x11e2, { 0x92, 0x01, 0x3b, 0x28, 0x01, 0x70, 0xb2, 0xec } }
|
||||
#define RIL_MOBILE_MESSAGE_DATABASE_SERVICE_CONTRACTID \
|
||||
"@mozilla.org/mobilemessage/rilmobilemessagedatabaseservice;1"
|
||||
#define GONK_MOBILE_MESSAGE_DATABASE_SERVICE_CID \
|
||||
{ 0x7db05024, 0x8038, 0x11e4, { 0xb7, 0xfa, 0xa3, 0xed, 0xb6, 0xf1, 0xbf, 0x0c } }
|
||||
#define GONK_MOBILE_MESSAGE_DATABASE_SERVICE_CONTRACTID \
|
||||
"@mozilla.org/mobilemessage/gonkmobilemessagedatabaseservice;1"
|
||||
%}
|
||||
|
||||
[scriptable, uuid(0b437a5c-a2bc-11e3-bd1b-dbb173eb35f8)]
|
||||
interface nsIRilMobileMessageDatabaseService : nsIMobileMessageDatabaseService
|
||||
[scriptable, uuid(48a3c28a-8038-11e4-b7b9-0f2df5b53100)]
|
||||
interface nsIGonkMobileMessageDatabaseService : nsIMobileMessageDatabaseService
|
||||
{
|
||||
/**
|
||||
* |aMessage| Object: should contain the following properties for internal use:
|
||||
@ -64,7 +64,7 @@ interface nsIRilMobileMessageDatabaseService : nsIMobileMessageDatabaseService
|
||||
* - |phoneNumber| DOMString: [optional] my own phone number.
|
||||
*/
|
||||
void saveReceivedMessage(in jsval aMessage,
|
||||
[optional] in nsIRilMobileMessageDatabaseCallback aCallback);
|
||||
[optional] in nsIGonkMobileMessageDatabaseCallback aCallback);
|
||||
|
||||
/**
|
||||
* |aMessage| Object: should contain the following properties for internal use:
|
||||
@ -81,7 +81,7 @@ interface nsIRilMobileMessageDatabaseService : nsIMobileMessageDatabaseService
|
||||
* - |receivers| DOMString Array: the phone numbers of receivers
|
||||
*/
|
||||
void saveSendingMessage(in jsval aMessage,
|
||||
[optional] in nsIRilMobileMessageDatabaseCallback aCallback);
|
||||
[optional] in nsIGonkMobileMessageDatabaseCallback aCallback);
|
||||
|
||||
/**
|
||||
* |aMessageId| Number: the message's DB record ID.
|
||||
@ -89,52 +89,52 @@ interface nsIRilMobileMessageDatabaseService : nsIMobileMessageDatabaseService
|
||||
* |aDelivery| DOMString: the new delivery value to update (can be null).
|
||||
* |aDeliveryStatus| DOMString: the new delivery status to update (can be null).
|
||||
* |aEnvelopeId| DOMString: the "message-id" specified in the MMS PDU headers.
|
||||
* |aCallback| nsIRilMobileMessageDatabaseCallback: an optional callback.
|
||||
* |aCallback| nsIGonkMobileMessageDatabaseCallback: an optional callback.
|
||||
*/
|
||||
void setMessageDeliveryByMessageId(in long aMessageId,
|
||||
in DOMString aReceiver,
|
||||
in DOMString aDelivery,
|
||||
in DOMString aDeliveryStatus,
|
||||
in DOMString aEnvelopeId,
|
||||
[optional] in nsIRilMobileMessageDatabaseCallback aCallback);
|
||||
[optional] in nsIGonkMobileMessageDatabaseCallback aCallback);
|
||||
|
||||
/**
|
||||
* |aEnvelopeId| DOMString: the "message-id" specified in the MMS PDU headers.
|
||||
* |aReceiver| DOMString: the phone number of receiver (for MMS; can be null).
|
||||
* |aDeliveryStatus| DOMString: the new delivery status to be updated (can be null).
|
||||
* |aCallback| nsIRilMobileMessageDatabaseCallback: an optional callback.
|
||||
* |aCallback| nsIGonkMobileMessageDatabaseCallback: an optional callback.
|
||||
*/
|
||||
void setMessageDeliveryStatusByEnvelopeId(in DOMString aEnvelopeId,
|
||||
in DOMString aReceiver,
|
||||
in DOMString aDeliveryStatus,
|
||||
[optional] in nsIRilMobileMessageDatabaseCallback aCallback);
|
||||
[optional] in nsIGonkMobileMessageDatabaseCallback aCallback);
|
||||
|
||||
/**
|
||||
* |aEnvelopeId| DOMString: the "message-id" specified in the MMS PDU headers.
|
||||
* |aReceiver| DOMString: the phone number of receiver (for MMS; can be null).
|
||||
* |aReadStatus| DOMString: the new read status to be updated.
|
||||
* |aCallback| nsIRilMobileMessageDatabaseCallback: an optional callback.
|
||||
* |aCallback| nsIGonkMobileMessageDatabaseCallback: an optional callback.
|
||||
*/
|
||||
void setMessageReadStatusByEnvelopeId(in DOMString aEnvelopeId,
|
||||
in DOMString aReceiver,
|
||||
in DOMString aReadStatus,
|
||||
[optional] in nsIRilMobileMessageDatabaseCallback aCallback);
|
||||
[optional] in nsIGonkMobileMessageDatabaseCallback aCallback);
|
||||
|
||||
/**
|
||||
* |aMessageId| Number: the message's DB record ID.
|
||||
* |aCallback| nsIRilMobileMessageDatabaseRecordCallback: a callback which
|
||||
* |aCallback| nsIGonkMobileMessageDatabaseRecordCallback: a callback which
|
||||
* takes result flag, message record and domMessage as parameters.
|
||||
*/
|
||||
void getMessageRecordById(in long aMessageId,
|
||||
in nsIRilMobileMessageDatabaseRecordCallback aCallback);
|
||||
in nsIGonkMobileMessageDatabaseRecordCallback aCallback);
|
||||
|
||||
/**
|
||||
* |aTransactionId| DOMString: the transaction ID of MMS PDU.
|
||||
* |aCallback| nsIRilMobileMessageDatabaseRecordCallback: a callback which
|
||||
* |aCallback| nsIGonkMobileMessageDatabaseRecordCallback: a callback which
|
||||
* takes result flag and message record as parameters.
|
||||
*/
|
||||
void getMessageRecordByTransactionId(in DOMString aTransactionId,
|
||||
in nsIRilMobileMessageDatabaseRecordCallback aCallback);
|
||||
in nsIGonkMobileMessageDatabaseRecordCallback aCallback);
|
||||
|
||||
/**
|
||||
* |aCrError| nsresult: the NS_ERROR defined in Components.results.
|
||||
@ -145,9 +145,9 @@ interface nsIRilMobileMessageDatabaseService : nsIMobileMessageDatabaseService
|
||||
|
||||
/**
|
||||
* |aSmsSegment| jsval: Decoded Single SMS PDU.
|
||||
* |aCallback| nsIRilMobileMessageDatabaseConcatenationCallback: a callback which
|
||||
* |aCallback| nsIGonkMobileMessageDatabaseConcatenationCallback: a callback which
|
||||
* takes result flag, and complete mesage as parameters.
|
||||
*/
|
||||
void saveSmsSegment(in jsval aSmsSegment,
|
||||
in nsIRilMobileMessageDatabaseConcatenationCallback aCallback);
|
||||
in nsIGonkMobileMessageDatabaseConcatenationCallback aCallback);
|
||||
};
|
@ -73,8 +73,8 @@ function closeMobileMessageDB(aMmdb) {
|
||||
|
||||
/**
|
||||
* Utility function for calling MMDB methods that takes either a
|
||||
* nsIRilMobileMessageDatabaseCallback or a
|
||||
* nsIRilMobileMessageDatabaseRecordCallback.
|
||||
* nsIGonkMobileMessageDatabaseCallback or a
|
||||
* nsIGonkMobileMessageDatabaseRecordCallback.
|
||||
*
|
||||
* Resolve when the target method notifies us with a successful result code;
|
||||
* reject otherwise. In either case, the arguments passed are packed into an
|
||||
|
@ -13,8 +13,8 @@ let MMS = {};
|
||||
Cu.import("resource://gre/modules/MmsPduHelper.jsm", MMS);
|
||||
|
||||
let gMobileMessageDatabaseService =
|
||||
Cc["@mozilla.org/mobilemessage/rilmobilemessagedatabaseservice;1"]
|
||||
.getService(Ci.nsIRilMobileMessageDatabaseService);
|
||||
Cc["@mozilla.org/mobilemessage/gonkmobilemessagedatabaseservice;1"]
|
||||
.getService(Ci.nsIGonkMobileMessageDatabaseService);
|
||||
|
||||
let gUuidGenerator =
|
||||
Cc["@mozilla.org/uuid-generator;1"]
|
||||
|
Loading…
Reference in New Issue
Block a user