Struct xpcom::interfaces::nsIDownloadHistory
[−]
[src]
#[repr(C)]pub struct nsIDownloadHistory { /* fields omitted */ }
interface nsIDownloadHistory : nsISupports
/**
* This interface can be used to add a download to history. There is a separate
* interface specifically for downloads in case embedders choose to track
* downloads differently from other types of history.
*/
Methods
impl nsIDownloadHistory
[src]
pub fn coerce<T: nsIDownloadHistoryCoerce>(&self) -> &T
[src]
Cast this nsIDownloadHistory
to one of its base interfaces.
impl nsIDownloadHistory
[src]
pub unsafe fn AddDownload(
&self,
aSource: *const nsIURI,
aReferrer: *const nsIURI,
aStartTime: PRTime,
aDestination: *const nsIURI
) -> nsresult
[src]
&self,
aSource: *const nsIURI,
aReferrer: *const nsIURI,
aStartTime: PRTime,
aDestination: *const nsIURI
) -> nsresult
/**
* Adds a download to history. This will also notify observers that the
* URI aSource is visited with the topic NS_LINK_VISITED_EVENT_TOPIC if
* aSource has not yet been visited.
*
* @param aSource
* The source of the download we are adding to history. This cannot be
* null.
* @param aReferrer
* [optional] The referrer of source URI.
* @param aStartTime
* [optional] The time the download was started. If the start time
* is not given, the current time is used.
* @param aDestination
* [optional] The target where the download is to be saved on the local
* filesystem.
* @throws NS_ERROR_NOT_AVAILABLE
* In a situation where a history implementation is not available,
* where 'history implementation' refers to something like
* nsIGlobalHistory and friends.
* @note This addition is not guaranteed to be synchronous, since it delegates
* the actual addition to the underlying history implementation. If you
* need to observe the completion of the addition, use the underlying
* history implementation's notifications system (e.g. nsINavHistoryObserver
* for toolkit's implementation of this interface).
*/
void addDownload (in nsIURI aSource, [optional] in nsIURI aReferrer, [optional] in PRTime aStartTime, [optional] in nsIURI aDestination);
pub unsafe fn RemoveAllDownloads(&self) -> nsresult
[src]
/**
* Remove all downloads from history.
*
* @note This removal is not guaranteed to be synchronous, since it delegates
* the actual removal to the underlying history implementation. If you
* need to observe the completion of the removal, use the underlying
* history implementation's notifications system (e.g. nsINavHistoryObserver
* for toolkit's implementation of this interface).
*/
void removeAllDownloads ();
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 nsIDownloadHistory
[src]
const IID: nsIID
IID: nsIID = nsID(1305307666, 41105, 20280, [131, 96, 2, 41, 41, 99, 87, 70])
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 nsIDownloadHistory
[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 nsIDownloadHistory
[src]
type Target = nsISupports
The resulting type after dereferencing.
fn deref(&self) -> &nsISupports
[src]
Dereferences the value.