Struct xpcom::interfaces::nsIFaviconService
[−]
[src]
#[repr(C)]pub struct nsIFaviconService { /* fields omitted */ }
interface nsIFaviconService : nsISupports
Methods
impl nsIFaviconService
[src]
pub fn coerce<T: nsIFaviconServiceCoerce>(&self) -> &T
[src]
Cast this nsIFaviconService
to one of its base interfaces.
impl nsIFaviconService
[src]
pub const FAVICON_LOAD_PRIVATE: i64
FAVICON_LOAD_PRIVATE: i64 = 1
pub const FAVICON_LOAD_NON_PRIVATE: i64
FAVICON_LOAD_NON_PRIVATE: i64 = 2
pub const MAX_FAVICON_BUFFER_SIZE: i64
MAX_FAVICON_BUFFER_SIZE: i64 = 65536
/**
* The limit in bytes of the size of favicons in memory and passed via the
* favicon protocol.
*/
pub unsafe fn GetFaviconLinkForIcon(
&self,
aFaviconURI: *const nsIURI,
_retval: *mut *const nsIURI
) -> nsresult
[src]
&self,
aFaviconURI: *const nsIURI,
_retval: *mut *const nsIURI
) -> nsresult
/**
* 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);
pub unsafe fn ExpireAllFavicons(&self) -> nsresult
[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 ();
pub unsafe fn SetDefaultIconURIPreferredSize(
&self,
aDefaultSize: uint16_t
) -> nsresult
[src]
&self,
aDefaultSize: uint16_t
) -> nsresult
/**
* 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);
pub unsafe fn PreferredSizeFromURI(
&self,
aURI: *const nsIURI,
_retval: *mut uint16_t
) -> nsresult
[src]
&self,
aURI: *const nsIURI,
_retval: *mut uint16_t
) -> nsresult
/**
* 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);
pub unsafe fn AddFailedFavicon(&self, aFaviconURI: *const nsIURI) -> nsresult
[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);
pub unsafe fn RemoveFailedFavicon(&self, aFaviconURI: *const nsIURI) -> nsresult
[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);
pub unsafe fn IsFailedFavicon(
&self,
aFaviconURI: *const nsIURI,
_retval: *mut bool
) -> nsresult
[src]
&self,
aFaviconURI: *const nsIURI,
_retval: *mut bool
) -> nsresult
/**
* 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);
pub unsafe fn GetDefaultFavicon(
&self,
aDefaultFavicon: *mut *const nsIURI
) -> nsresult
[src]
&self,
aDefaultFavicon: *mut *const nsIURI
) -> nsresult
/**
* The default favicon URI
*/
readonly attribute nsIURI defaultFavicon;
pub unsafe fn GetDefaultFaviconMimeType(
&self,
aDefaultFaviconMimeType: &mut nsACString
) -> nsresult
[src]
&self,
aDefaultFaviconMimeType: &mut nsACString
) -> nsresult
/**
* The default favicon mimeType
*/
readonly attribute AUTF8String defaultFaviconMimeType;
Methods from Deref<Target = nsISupports>
pub fn coerce<T: nsISupportsCoerce>(&self) -> &T
[src]
Cast this nsISupports
to one of its base interfaces.
pub unsafe fn QueryInterface(
&self,
uuid: &nsIID,
result: *mut *mut c_void
) -> nsresult
[src]
&self,
uuid: &nsIID,
result: *mut *mut c_void
) -> nsresult
void QueryInterface (in nsIIDRef uuid, [iid_is (uuid), retval] out nsQIResult result);
pub unsafe fn AddRef(&self) -> nsrefcnt
[src]
[noscript,notxpcom] nsrefcnt AddRef ();
pub unsafe fn Release(&self) -> nsrefcnt
[src]
[noscript,notxpcom] nsrefcnt Release ();
Trait Implementations
impl XpCom for nsIFaviconService
[src]
const IID: nsIID
IID: nsIID = nsID(3894283020, 47601, 19502, [143, 60, 184, 9, 147, 60, 247, 60])
fn query_interface<T: XpCom>(&self) -> Option<RefPtr<T>>
[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]
unsafe fn addref(&self)
[src]
Increment the reference count.
unsafe fn release(&self)
[src]
Decrement the reference count, potentially freeing backing memory.
impl Deref for nsIFaviconService
[src]
type Target = nsISupports
The resulting type after dereferencing.
fn deref(&self) -> &nsISupports
[src]
Dereferences the value.