Struct xpcom::interfaces::nsIFaviconService [] [src]

#[repr(C)]
pub struct nsIFaviconService { /* fields omitted */ }

interface nsIFaviconService : nsISupports

Methods

impl nsIFaviconService
[src]

[src]

Cast this nsIFaviconService to one of its base interfaces.

impl nsIFaviconService
[src]

FAVICON_LOAD_PRIVATE: i64 = 1

FAVICON_LOAD_NON_PRIVATE: i64 = 2

MAX_FAVICON_BUFFER_SIZE: i64 = 65536
/**
   * The limit in bytes of the size of favicons in memory and passed via the
   * favicon protocol.
   */

[src]

/**
   * For a given icon URI, this will return a URI that will result in the image.
   * In most cases, this is an annotation URI.  For chrome URIs, this will do
   * nothing but returning the input URI.
   *
   * No validity checking is done. If you pass an icon URI that we've never
   * seen, you'll get back a URI that references an invalid icon. The moz-anno
   * protocol handler's special case for "favicon" annotations will resolve
   * invalid icons to the default icon, although without caching.
   * For invalid chrome URIs, you'll get a broken image.
   *
   * @param aFaviconURI
   *        The URI of an icon in the favicon service.
   * @return A URI that will give you the icon image.  This is NOT the URI of
   *         the icon as set on the page, but a URI that will give you the
   *         data out of the favicon service.  For a normal page with a
   *         favicon we've stored, this will be an annotation URI which will
   *         then cause the corresponding favicon data to be loaded async from
   *         this service.  For pages where we don't have a favicon, this will
   *         be a chrome URI of the default icon. For chrome URIs, the
   *         output will be the same as the input.
   */

nsIURI getFaviconLinkForIcon (in nsIURI aFaviconURI);

[src]

/**
   * Expire all known favicons from the database.
   *
   * @note This is an async method.
   *       On successful completion a "places-favicons-expired" notification is
   *       dispatched through observer's service.
   */

void expireAllFavicons ();

[src]

/**
   * Sets the default size returned by preferredSizeFromURI when the uri doesn't
   * specify a size ref. If this is not invoked first, or 0 is passed to it,
   * preferredSizeFromURI() will return UINT16_MAX, that matches the biggest
   * icon available.
   */

void setDefaultIconURIPreferredSize (in unsigned short aDefaultSize);

[src]

/**
   * Tries to extract the preferred size from an icon uri ref fragment.
   *
   * @param aURI
   *        The URI to parse.
   * @return The preferred size, or a default size set through
   *         setDefaultIconURIPreferredSize, or UINT16_MAX if neither are set.
   */

unsigned short preferredSizeFromURI (in nsIURI aURI);

[src]

/**
   * Adds a given favicon's URI to the failed favicon cache.
   *
   * The lifespan of the favicon cache is up to the caching system.  This cache
   * will also be written when setAndLoadFaviconForPage hits an error while
   * fetching an icon.
   *
   * @param aFaviconURI
   *        The URI of an icon in the favicon service.
   */

void addFailedFavicon (in nsIURI aFaviconURI);

[src]

/**
   * Removes the given favicon from the failed favicon cache.  If the icon is
   * not in the cache, it will silently succeed.
   *
   * @param aFaviconURI
   *        The URI of an icon in the favicon service.
   */

void removeFailedFavicon (in nsIURI aFaviconURI);

[src]

/**
   * Checks to see if a favicon is in the failed favicon cache.
   * A positive return value means the icon is in the failed cache and you
   * probably shouldn't try to load it.  A false return value means that it's
   * worth trying to load it.
   * This allows you to avoid trying to load "foo.com/favicon.ico" for every
   * page on a site that doesn't have a favicon.
   *
   * @param aFaviconURI
   *        The URI of an icon in the favicon service.
   */

boolean isFailedFavicon (in nsIURI aFaviconURI);

[src]

/**
   * The default favicon URI
   */

readonly attribute nsIURI defaultFavicon;

[src]

/**
   * The default favicon mimeType
   */

readonly attribute AUTF8String defaultFaviconMimeType;

Methods from Deref<Target = nsISupports>

[src]

Cast this nsISupports to one of its base interfaces.

[src]

void QueryInterface (in nsIIDRef uuid, [iid_is (uuid), retval] out nsQIResult result);

[src]

[noscript,notxpcom] nsrefcnt AddRef ();

[src]

[noscript,notxpcom] nsrefcnt Release ();

Trait Implementations

impl XpCom for nsIFaviconService
[src]

IID: nsIID = nsID(3894283020, 47601, 19502, [143, 60, 184, 9, 147, 60, 247, 60])

[src]

Perform a QueryInterface call on this object, attempting to dynamically cast it to the requested interface type. Returns Some(RefPtr) if the cast succeeded, and None otherwise. Read more

impl RefCounted for nsIFaviconService
[src]

[src]

Increment the reference count.

[src]

Decrement the reference count, potentially freeing backing memory.

impl Deref for nsIFaviconService
[src]

The resulting type after dereferencing.

[src]

Dereferences the value.