25 Components.utils.import(
"resource://gre/modules/XPCOMUtils.jsm");
26 Components.utils.import(
"resource://app/jsmodules/sbLocalDatabaseMigrationUtils.jsm");
27 Components.utils.import(
"resource://app/jsmodules/SBJobUtils.jsm");
29 const Cc = Components.classes;
30 const Ci = Components.interfaces;
31 const Cr = Components.results;
37 dump(
"----++++----++++sbLibraryMigration " +
40 "\n----++++----++++\n");
45 SBLocalDatabaseMigrationUtils.BaseMigrationHandler.call(
this);
54 __proto__: SBLocalDatabaseMigrationUtils.BaseMigrationHandler.prototype,
57 classID: Components.ID(
"{073f0b42-b3c1-465a-bcce-9f1f50fbd06d}"),
58 contractID: SBLocalDatabaseMigrationUtils.baseHandlerContractID +
64 migrate:
function sbLibraryMigration_migrate(aLibrary) {
66 this._databaseGUID = aLibrary.databaseGuid;
67 this._databaseLocation = aLibrary.databaseLocation;
70 var query = this.createMigrationQuery(aLibrary);
71 query.addQuery(
"create index idx_resource_properties_property_id_obj_sortable_media_item_id on resource_properties (property_id, obj_sortable, media_item_id)");
72 query.addQuery(
"reindex");
73 query.addQuery(
"analyze");
74 query.addQuery(
"commit");
76 this.migrationQuery = query;
78 var sip =
Cc[
"@mozilla.org/supports-interface-pointer;1"]
79 .createInstance(
Ci.nsISupportsInterfacePointer);
82 this._titleText =
"Library Migration Helper";
83 this._statusText =
"Migrating 1.8 database to 1.9 database...";
85 query.setAsyncQuery(
true);
88 this.startNotificationTimer();
89 SBJobUtils.showProgressDialog(sip.data,
null, 0);
90 this.stopNotificationTimer();
93 dump(
"Exception occured: " + e);
103 return XPCOMUtils.generateModule([
function NSGetModule(compMgr, fileSpec)
sbDeviceFirmwareAutoCheckForUpdate prototype contractID
sbDeviceFirmwareAutoCheckForUpdate prototype classDescription
function sbLibraryMigration()
sbDeviceFirmwareAutoCheckForUpdate prototype classID