Bug 1801574 - fix nsIDBChangeAnnouncer idl naming conventions. r=benc

Differential Revision: https://phabricator.services.mozilla.com/D162524

--HG--
extra : rebase_source : 23f32227c684f5e9af2617373ad222d8573d66c8
This commit is contained in:
Magnus Melin 2022-11-21 13:58:49 +11:00
Родитель 3f18c464cf
Коммит a63f8c692a
6 изменённых файлов: 34 добавлений и 24 удалений

Просмотреть файл

@ -824,7 +824,7 @@ Enigmail.hdrView = {
let newFlags = oldFlags | Ci.nsMsgMessageFlags.HasRe;
msgHdr.flags = newFlags;
if (tree && tree.view) {
tree.view.db.NotifyHdrChangeAll(msgHdr, oldFlags, newFlags, {});
tree.view.db.notifyHdrChangeAll(msgHdr, oldFlags, newFlags, {});
}
} else if (tree && tree.view && tree.view.selection) {
tree.invalidateRow(tree.view.selection.currentIndex);

Просмотреть файл

@ -142,7 +142,7 @@ var classifyListener = {
},
};
// nsIDBChangeListener implementation.
/** @implements {nsIDBChangeListener} */
function DBListener() {}
DBListener.prototype = {
@ -159,7 +159,7 @@ DBListener.prototype = {
onAnnouncerGoingAway(instigator) {
if (gInboxListener) {
try {
POP3Pump.inbox.msgDatabase.RemoveListener(gInboxListener);
POP3Pump.inbox.msgDatabase.removeListener(gInboxListener);
} catch (e) {
dump("listener not found\n");
}

Просмотреть файл

@ -655,11 +655,11 @@ var GlodaMsgIndexer = {
}
// we get an nsIMsgDatabase out of this (unsurprisingly) which
// explicitly inherits from nsIDBChangeAnnouncer, which has the
// AddListener call we want.
// addListener call we want.
if (this._indexingDatabase == null) {
this._indexingDatabase = this._indexingFolder.msgDatabase;
}
this._indexingDatabase.AddListener(this._databaseAnnouncerListener);
this._indexingDatabase.addListener(this._databaseAnnouncerListener);
} catch (ex) {
this._log.error(
"Problem entering folder: " +
@ -693,7 +693,7 @@ var GlodaMsgIndexer = {
*/
_indexerCompletePendingFolderEntry() {
this._indexingDatabase = this._indexingFolder.msgDatabase;
this._indexingDatabase.AddListener(this._databaseAnnouncerListener);
this._indexingDatabase.addListener(this._databaseAnnouncerListener);
this._log.debug("...Folder Loaded!");
// the load is no longer pending; we certainly don't want more notifications
@ -909,7 +909,7 @@ var GlodaMsgIndexer = {
if (this._indexingDatabase) {
this._indexingDatabase.commit(Ci.nsMsgDBCommitType.kLargeCommit);
// remove our listener!
this._indexingDatabase.RemoveListener(this._databaseAnnouncerListener);
this._indexingDatabase.removeListener(this._databaseAnnouncerListener);
}
// let the gloda folder know we are done indexing
this._indexingGlodaFolder.indexing = false;
@ -2984,7 +2984,7 @@ var GlodaMsgIndexer = {
*
* This is an nsIDBChangeListener listening to an nsIDBChangeAnnouncer. To
* add ourselves, we get us a nice nsMsgDatabase, query it to the announcer,
* then call AddListener.
* then call addListener.
*/
_databaseAnnouncerListener: {
indexer: null,

Просмотреть файл

@ -10,24 +10,34 @@ interface nsIDBChangeListener;
interface nsIMsgDBHdr;
[scriptable, uuid(22baf00b-939d-42c3-ac51-21d99dfa1f05)]
interface nsIDBChangeAnnouncer : nsISupports {
/* these 2 calls return NS_OK on success, NS_COMFALSE on failure */
void AddListener(in nsIDBChangeListener listener);
void RemoveListener(in nsIDBChangeListener listener);
void addListener(in nsIDBChangeListener listener);
void removeListener(in nsIDBChangeListener listener);
void NotifyHdrChangeAll(in nsIMsgDBHdr aHdrChanged, in unsigned long aOldFlags, in unsigned long aNewFlags,
in nsIDBChangeListener instigator);
void NotifyHdrAddedAll(in nsIMsgDBHdr aHdrAdded, in nsMsgKey parentKey, in long flags,
in nsIDBChangeListener instigator);
void NotifyHdrDeletedAll(in nsIMsgDBHdr aHdrDeleted, in nsMsgKey parentKey, in long flags,
in nsIDBChangeListener instigator);
void NotifyParentChangedAll(in nsMsgKey keyReparented, in nsMsgKey oldParent, in nsMsgKey newParent, in nsIDBChangeListener instigator);
void notifyHdrChangeAll(in nsIMsgDBHdr aHdrChanged,
in unsigned long aOldFlags,
in unsigned long aNewFlags,
in nsIDBChangeListener instigator);
void NotifyReadChanged(in nsIDBChangeListener instigator);
void notifyHdrAddedAll(in nsIMsgDBHdr aHdrAdded,
in nsMsgKey parentKey,
in long flags,
in nsIDBChangeListener instigator);
void NotifyJunkScoreChanged(in nsIDBChangeListener aInstigator);
void notifyHdrDeletedAll(in nsIMsgDBHdr aHdrDeleted,
in nsMsgKey parentKey,
in long flags,
in nsIDBChangeListener instigator);
void NotifyAnnouncerGoingAway();
void notifyParentChangedAll(in nsMsgKey keyReparented,
in nsMsgKey oldParent,
in nsMsgKey newParent,
in nsIDBChangeListener instigator);
void notifyReadChanged(in nsIDBChangeListener instigator);
void notifyJunkScoreChanged(in nsIDBChangeListener aInstigator);
void notifyAnnouncerGoingAway();
};

Просмотреть файл

@ -493,7 +493,7 @@ DBListener.prototype = {
onAnnouncerGoingAway(instigator) {
if (gInboxListener) {
try {
IMAPPump.inbox.msgDatabase.RemoveListener(gInboxListener);
IMAPPump.inbox.msgDatabase.removeListener(gInboxListener);
} catch (e) {
dump(" listener not found\n");
}

Просмотреть файл

@ -297,7 +297,7 @@ DBListener.prototype = {
onAnnouncerGoingAway(instigator) {
if (gInboxListener) {
try {
IMAPPump.inbox.msgDatabase.RemoveListener(gInboxListener);
IMAPPump.inbox.msgDatabase.removeListener(gInboxListener);
} catch (e) {
dump(" listener not found\n");
}