Struct xpcom::interfaces::nsIFaviconDataCallback
[−]
[src]
#[repr(C)]pub struct nsIFaviconDataCallback { /* fields omitted */ }
interface nsIFaviconDataCallback : nsISupports
Methods
impl nsIFaviconDataCallback
[src]
pub fn coerce<T: nsIFaviconDataCallbackCoerce>(&self) -> &T
[src]
Cast this nsIFaviconDataCallback
to one of its base interfaces.
impl nsIFaviconDataCallback
[src]
pub unsafe fn OnComplete(
&self,
aFaviconURI: *const nsIURI,
aDataLen: uint32_t,
aData: *const uint8_t,
aMimeType: &nsACString,
aWidth: uint16_t
) -> nsresult
[src]
&self,
aFaviconURI: *const nsIURI,
aDataLen: uint32_t,
aData: *const uint8_t,
aMimeType: &nsACString,
aWidth: uint16_t
) -> nsresult
/**
* Called when the required favicon's information is available.
*
* It's up to the invoking method to state if the callback is always invoked,
* or called on success only. Check the method documentation to ensure that.
*
* The caller will receive the most information we can gather on the icon,
* but it's not guaranteed that all of them will be set. For some method
* we could not know the favicon's data (it could just be too expensive to
* get it, or the method does not require we actually have any data).
* It's up to the caller to check aDataLen > 0 before using any data-related
* information like mime-type or data itself.
*
* @param aFaviconURI
* Receives the "favicon URI" (not the "favicon link URI") associated
* to the requested page. This can be null if there is no associated
* favicon URI, or the callback is notifying a failure.
* @param aDataLen
* Size of the icon data in bytes. Notice that a value of 0 does not
* necessarily mean that we don't have an icon.
* @param aData
* Icon data, or an empty array if aDataLen is 0.
* @param aMimeType
* Mime type of the icon, or an empty string if aDataLen is 0.
* @param aWidth
* Width of the icon. 0 if the width is unknown or if the icon is
* vectorial.
*
* @note If you want to open a network channel to access the favicon, it's
* recommended that you call the getFaviconLinkForIcon method to convert
* the "favicon URI" into a "favicon link URI".
*/
void onComplete (in nsIURI aFaviconURI, in unsigned long aDataLen, [array, size_is (aDataLen), const] in octet aData, in AUTF8String aMimeType, in unsigned short aWidth);
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 nsIFaviconDataCallback
[src]
const IID: nsIID
IID: nsIID = nsID(3361627266, 46863, 17953, [149, 40, 190, 178, 170, 71, 251, 68])
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 nsIFaviconDataCallback
[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 nsIFaviconDataCallback
[src]
type Target = nsISupports
The resulting type after dereferencing.
fn deref(&self) -> &nsISupports
[src]
Dereferences the value.