nsIMicrosummaryService Interface Reference

import"nsIMicrosummaryService.idl";

Inheritance diagram for nsIMicrosummaryService:
[legend]
Collaboration diagram for nsIMicrosummaryService:
[legend]

Public Member Functions

nsIMicrosummaryGenerator getGenerator (in nsIURI generatorURI)
 
void addGenerator (in nsIURI generatorURI)
 
nsIMicrosummaryGenerator installGenerator (in nsIDOMDocument xmlDefinition)
 
nsISimpleEnumerator getBookmarks ()
 
nsIMicrosummarySet getMicrosummaries (in nsIURI pageURI, in long long bookmarkID)
 
nsIMicrosummary getMicrosummary (in long long bookmarkID)
 
nsIMicrosummary createMicrosummary (in nsIURI pageURI, in nsIURI generatorURI)
 
void setMicrosummary (in long long bookmarkID, in nsIMicrosummary microsummary)
 
void removeMicrosummary (in long long bookmarkID)
 
boolean hasMicrosummary (in long long bookmarkID)
 
boolean isMicrosummary (in long long bookmarkID, in nsIMicrosummary microsummary)
 
nsIMicrosummary refreshMicrosummary (in long long bookmarkID)
 

Detailed Description

Definition at line 212 of file nsIMicrosummaryService.idl.

Member Function Documentation

void nsIMicrosummaryService::addGenerator ( in nsIURI  generatorURI)

Install the microsummary generator from the resource at the supplied URI. Callable by content via the addMicrosummaryGenerator() sidebar method.

Parameters
generatorURIthe URI of the resource providing the generator
nsIMicrosummary nsIMicrosummaryService::createMicrosummary ( in nsIURI  pageURI,
in nsIURI  generatorURI 
)

Create a microsummary for a given page URI and generator URI.

Parameters
pageURIthe URI of the page to be summarized
generatorURIthe URI of the microsummary generator
Returns
an nsIMicrosummary for the given page and generator URIs.
nsISimpleEnumerator nsIMicrosummaryService::getBookmarks ( )

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.

Returns
an nsISimpleEnumerator enumeration of bookmark IDs
nsIMicrosummaryGenerator nsIMicrosummaryService::getGenerator ( in nsIURI  generatorURI)

Return a microsummary generator for the given URI.

Parameters
generatorURIthe URI of the generator
Returns
an nsIMicrosummaryGenerator for the given URI.
nsIMicrosummarySet nsIMicrosummaryService::getMicrosummaries ( in nsIURI  pageURI,
in long long  bookmarkID 
)

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).

Parameters
pageURIthe URI of the page for which to retrieve available microsummaries
bookmarkID(optional) the ID of the bookmark for which this method is being called
Returns
an nsIMicrosummarySet of nsIMicrosummaries for the given page
nsIMicrosummary nsIMicrosummaryService::getMicrosummary ( in long long  bookmarkID)

Get the current microsummary for the given bookmark.

Parameters
bookmarkIDthe bookmark for which to get the current microsummary
Returns
the current microsummary for the bookmark, or null if the bookmark does not have a current microsummary
boolean nsIMicrosummaryService::hasMicrosummary ( in long long  bookmarkID)

Whether or not the given bookmark has a current microsummary.

Parameters
bookmarkIDthe bookmark for which to set the current microsummary
Returns
a boolean representing whether or not the given bookmark has a current microsummary
nsIMicrosummaryGenerator nsIMicrosummaryService::installGenerator ( in nsIDOMDocument  xmlDefinition)

Install the microsummary generator in the given XML definition.

Parameters
xmlDefinitionan nsIDOMDocument XML document defining the generator
Returns
the newly-installed nsIMicrosummaryGenerator object
boolean nsIMicrosummaryService::isMicrosummary ( in long long  bookmarkID,
in nsIMicrosummary  microsummary 
)

Whether or not the given microsummary is the current microsummary for the given bookmark.

Parameters
bookmarkIDthe bookmark to check
microsummarythe microsummary to check
Returns
whether or not the microsummary is the current one for the bookmark
nsIMicrosummary nsIMicrosummaryService::refreshMicrosummary ( in long long  bookmarkID)

Refresh 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.

Parameters
bookmarkIDthe bookmark whose microsummary is being refreshed
Returns
the microsummary being refreshed
void nsIMicrosummaryService::removeMicrosummary ( in long long  bookmarkID)

Remove the current microsummary for the given bookmark.

Parameters
bookmarkIDthe bookmark for which to remove the current microsummary
void nsIMicrosummaryService::setMicrosummary ( in long long  bookmarkID,
in nsIMicrosummary  microsummary 
)

Set the current microsummary for the given bookmark.

Parameters
bookmarkIDthe bookmark for which to set the current microsummary
microsummarythe microsummary to set as the current one

The documentation for this interface was generated from the following file: