nsISupports
Last changed in Gecko 14.0 (Firefox 14.0 / Thunderbird 14.0 / SeaMonkey 2.11)In the past, this interface also offered methods for importing Places data, but those methods are now part of the BookmarkHTMLUtils.jsm JavaScript code module. The interface name has been kept for compatibility reasons for code using the export service.
Implemented by: @mozilla.org/import-export-service;1
as a service:
var placesImportExportService = Components.classes["@mozilla.org/import-export-service;1"]
.getService(Components.interfaces.nsIPlacesImportExportService);
void backupBookmarksFile(); |
void exportHTMLToFile(in nsILocalFile aFile); |
void importHTMLFromFile(in nsILocalFile aFile, in boolean aIsInitialImport); Obsolete since Gecko 14.0 |
void importHTMLFromFileToFolder(in nsILocalFile aFile, in PRInt64 aFolder, in boolean aIsInitialImport); Obsolete since Gecko 14.0 |
void importHTMLFromURI(in nsIURI aURI, in boolean aIsInitialImport); Obsolete since Gecko 14.0 |
Backs up the bookmarks.html file.
void backupBookmarksFile();
None.
Saves the current bookmarks hierarchy to a bookmarks.html
file.
void exportHTMLToFile( in nsILocalFile aFile );
aFile
nsILocalFile
indicating where to save the new bookmarks.html
file.Loads the given bookmarks.html
file and replaces it with the current bookmarks hierarchy (if aIsInitialImport is true
) or appends it (if aIsInitialImport
is false
).
Three nsIObserverService
notifications are fired as a result of the import. "bookmarks-restore-begin" is fired just before the import is started. "bookmarks-restore-success" is fired right after the bookmarks are successfully imported. "bookmarks-restore-failed" is fired right after a failure occurs when importing the bookmarks. Observers will be passed through their data parameters either "html" if aIsInitialImport
is false
or "html-initial" if aIsInitialImport
is true
. The observer subject will be null
.
void importHTMLFromFile( in nsILocalFile aFile, in boolean aIsInitialImport );
aFile
aIsInitialImport
Three nsIObserverService
notifications are fired as a result of the import. "bookmarks-restore-begin" is fired just before the import is started. "bookmarks-restore-success" is fired right after the bookmarks are successfully imported. "bookmarks-restore-failed" is fired right after a failure occurs when importing the bookmarks. Observers will be passed through their data parameters either "html" if aIsInitialImport is false
or "html-initial" if aIsInitialImport
is true
. The observer subject will be an nsISupportsPRInt64
whose value is aFolder.
void importHTMLFromFileToFolder( in nsILocalFile aFile, in PRInt64 aFolder, in boolean aIsInitialImport );
aFile
aFolder
aIsInitialImport
Obsolete since Gecko 14.0 (Firefox 14.0 / Thunderbird 14.0 / SeaMonkey 2.11)
This feature is obsolete. Although it may still work in some browsers, its use is discouraged since it could be removed at any time. Try to avoid using it.
Same thing as importHTMLFromFile()
, but takes a URI instead.
void importHTMLFromURI( in nsIURI aURI, in boolean aIsInitialImport );
aURI
aIsInitialImport