add applyImcoming to store base class

This commit is contained in:
Dan Mills 2008-12-12 13:55:26 -08:00
parent 3c88a35efd
commit 59d28a8a5c

View File

@ -84,6 +84,20 @@ Store.prototype = {
this._log = Log4Moz.repository.getLogger("Store." + this._logName);
},
applyIncoming: function BStore_applyIncoming(onComplete, record) {
let fn = function(rec) {
let self = yield;
if (!record.cleartext)
this.remove(record);
else if (!this.itemExists(record.id))
this.create(record);
else
this.update(record);
};
fn.async(this, onComplete, record);
},
// FIXME unused now
_applyCommands: function Store__applyCommands(commandList) {
let self = yield;