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]

[src]

Cast this nsIDownloadHistory to one of its base interfaces.

impl nsIDownloadHistory
[src]

[src]

/**
   * 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);

[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>

[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 nsIDownloadHistory
[src]

IID: nsIID = nsID(1305307666, 41105, 20280, [131, 96, 2, 41, 41, 99, 87, 70])

[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]

[src]

Increment the reference count.

[src]

Decrement the reference count, potentially freeing backing memory.

impl Deref for nsIDownloadHistory
[src]

The resulting type after dereferencing.

[src]

Dereferences the value.