nsISupports
Last changed in Gecko 1.9 (Firefox 3)Implemented by: @mozilla.org/microsummary/service;1
as a service:
var microsummaryService = Components.classes["@mozilla.org/microsummary/service;1"] .getService(Components.interfaces.nsIMicrosummaryService);
void addGenerator(in nsIURI generatorURI); |
nsIMicrosummary createMicrosummary(in nsIURI pageURI, in nsIURI generatorURI); |
nsISimpleEnumerator getBookmarks(); |
nsIMicrosummaryGenerator getGenerator(in nsIURI generatorURI); |
nsIMicrosummarySet getMicrosummaries(in nsIURI pageURI, in long long bookmarkID); |
nsIMicrosummary getMicrosummary(in long long bookmarkID); |
boolean hasMicrosummary(in long long bookmarkID); |
nsIMicrosummaryGenerator installGenerator(in nsIDOMDocument xmlDefinition); |
boolean isMicrosummary(in long long bookmarkID, in nsIMicrosummary microsummary); |
nsIMicrosummary refreshMicrosummary(in long long bookmarkID); |
void removeMicrosummary(in long long bookmarkID); |
void setMicrosummary(in long long bookmarkID, in nsIMicrosummary microsummary); |
Install the microsummary generator from the resource at the supplied URI. Callable by content via nsISidebar.addMicrosummaryGenerator()
.
void addGenerator( in nsIURI generatorURI );
generatorURI
Create a microsummary for a given page URI and generator URI.
nsIMicrosummary createMicrosummary( in nsIURI pageURI, in nsIURI generatorURI );
pageURI
generatorURI
Returns an nsIMicrosummary
for the given page and generator URIs.
Get the set of bookmarks with microsummaries. In the old RDF-based bookmarks datastore, bookmark IDs are nsIRDFResource
objects. In the new Places-based datastore, they are nsIURI
objects.
nsISimpleEnumerator getBookmarks();
None.
Returns an nsISimpleEnumerator
enumeration of bookmark IDs.
Return a microsummary generator for the given URI.
nsIMicrosummaryGenerator getGenerator( in nsIURI generatorURI );
generatorURI
Returns an nsIMicrosummaryGenerator
for the given URI.
Get the set of microsummaries available for a given page. The set might change after this method returns, since this method will trigger an asynchronous load of the page in question (if it isn't already loaded) to see if it references any page-specific microsummaries.
If the caller passes a bookmark ID, and one of the microsummaries is the current one for the bookmark, this method will retrieve content from the datastore for that microsummary, which is useful when callers want to display a list of microsummaries for a page that isn't loaded, and they want to display the actual content of the selected microsummary immediately (rather than after the content is asynchronously loaded).
nsIMicrosummarySet getMicrosummaries(
in nsIURI pageURI,
in long long bookmarkID Optional
);
pageURI
bookmarkID
OptionalReturns an nsIMicrosummarySet
of nsIMicrosummaries
for the given page.
Get the current microsummary for the given bookmark.
nsIMicrosummary getMicrosummary( in long long bookmarkID );
bookmarkID
Returns the current microsummary for the bookmark, or null if the bookmark does not have a current microsummary.
Whether or not the given bookmark has a current microsummary.
boolean hasMicrosummary( in long long bookmarkID );
bookmarkID
Returns a boolean representing whether or not the given bookmark has a current microsummary.
Install the microsummary generator in the given XML definition.
nsIMicrosummaryGenerator installGenerator( in nsIDOMDocument xmlDefinition );
xmlDefinition
nsIDOMDocument
XML document defining the generator.Returns the nsIMicrosummaryGenerator
that was installed.
Reports whether or not the given microsummary is the current microsummary for the given bookmark.
boolean isMicrosummary( in long long bookmarkID, in nsIMicrosummary microsummary );
bookmarkID
microsummary
Returns whether or not the microsummary is the current one for the bookmark.
Refreshes a microsummary, updating its value in the datastore and UI. If this method can refresh the microsummary instantly, it will. Otherwise, it'll asynchronously download the necessary information (the generator and/or page) before refreshing the microsummary.
Callers should check the content
property of the returned microsummary object to distinguish between sync and async refreshes. If its value is null
, then it's an async refresh, and the caller should register itself as an nsIMicrosummaryObserver
via nsIMicrosummary.addObserver()
to find out when the refresh completes.
nsIMicrosummary refreshMicrosummary( in long long bookmarkID );
bookmarkID
Returns the microsummary being refreshed.
Remove the current microsummary for the given bookmark.
void removeMicrosummary( in long long bookmarkID );
bookmarkID
Set the current microsummary for the given bookmark.
void setMicrosummary( in long long bookmarkID, in nsIMicrosummary microsummary );
bookmarkID
microsummary