Struct xpcom::interfaces::nsINavHistoryObserver [] [src]

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

interface nsINavHistoryObserver : nsISupports

/**
 * Similar to nsIRDFObserver for history. Note that we don't pass the data
 * source since that is always the global history.
 *
 * DANGER! If you are in the middle of a batch transaction, there may be a
 * database transaction active. You can still access the DB, but be careful.
 */

Methods

impl nsINavHistoryObserver
[src]

[src]

Cast this nsINavHistoryObserver to one of its base interfaces.

impl nsINavHistoryObserver
[src]

REASON_DELETED: i64 = 0
/**
   * Removed by the user.
   */

REASON_EXPIRED: i64 = 1
/**
   * Removed by automatic expiration.
   */

ATTRIBUTE_FAVICON: i64 = 3
/**
   * onPageChanged attribute indicating that favicon has been updated.
   * aNewValue parameter will be set to the new favicon URI string.
   */

[src]

/**
   * Notifies you that a bunch of things are about to change, don't do any
   * heavy-duty processing until onEndUpdateBatch is called.
   */

void onBeginUpdateBatch ();

[src]

/**
   * Notifies you that we are done doing a bunch of things and you should go
   * ahead and update UI, etc.
   */

void onEndUpdateBatch ();

[src]

/**
   * Called everytime a URI is visited.
   *
   * @note TRANSITION_EMBED visits (corresponding to images in a page, for
   *       example) are not displayed in history results. Most observers can
   *       ignore TRANSITION_EMBED visit notifications (which will comprise the
   *       majority of visit notifications) to save work.
   *
   * @param aVisitId
   *        Id of the visit that was just created.
   * @param aTime
   *        Time of the visit.
   * @param aSessionId
   *        No longer supported and always set to 0.
   * @param aReferrerVisitId
   *        The id of the visit the user came from, defaults to 0 for no referrer.
   * @param aTransitionType
   *        One of nsINavHistory.TRANSITION_*
   * @param aGuid
   *        The unique id associated with the page.
   * @param aHidden
   *        Whether the visited page is marked as hidden.
   * @param aVisitCount
   *        Number of visits (included this one) for this URI.
   * @param aTyped
   *        Whether the URI has been typed or not.
   *        TODO (Bug 1271801): This will become a count, rather than a boolean.
   *        For future compatibility, always compare it with "> 0".
   * @param aLastKnownTitle
   *        The last known title of the page. Might not be from the current visit,
   *        and might be null if it is not known.
   */

void onVisit (in nsIURI aURI, in long long aVisitId, in PRTime aTime, in long long aSessionId, in long long aReferrerVisitId, in unsigned long aTransitionType, in ACString aGuid, in boolean aHidden, in unsigned long aVisitCount, in unsigned long aTyped, in AString aLastKnownTitle);

[src]

/**
   * Called whenever either the "real" title or the custom title of the page
   * changed. BOTH TITLES ARE ALWAYS INCLUDED in this notification, even though
   * only one will change at a time. Often, consumers will want to display the
   * user title if it is available, and fall back to the page title (the one
   * specified in the <title> tag of the page).
   *
   * Note that there is a difference between an empty title and a NULL title.
   * An empty string means that somebody specifically set the title to be
   * nothing. NULL means nobody set it. From C++: use IsVoid() and SetIsVoid()
   * to see whether an empty string is "null" or not (it will always be an
   * empty string in either case).
   *
   * @param aURI
   *        The URI of the page.
   * @param aPageTitle
   *        The new title of the page.
   * @param aGUID
   *        The unique ID associated with the page.
   */

void onTitleChanged (in nsIURI aURI, in AString aPageTitle, in ACString aGUID);

[src]

/**
   * Called when an individual page's frecency has changed.
   *
   * This is not called for pages whose frecencies change as the result of some
   * large operation where some large or unknown number of frecencies change at
   * once.  Use onManyFrecenciesChanged to detect such changes.
   *
   * @param aURI
   *        The page's URI.
   * @param aNewFrecency
   *        The page's new frecency.
   * @param aGUID
   *        The page's GUID.
   * @param aHidden
   *        True if the page is marked as hidden.
   * @param aVisitDate
   *        The page's last visit date.
   */

void onFrecencyChanged (in nsIURI aURI, in long aNewFrecency, in ACString aGUID, in boolean aHidden, in PRTime aVisitDate);

[src]

/**
   * Called when the frecencies of many pages have changed at once.
   *
   * onFrecencyChanged is not called for each of those pages.
   */

void onManyFrecenciesChanged ();

[src]

/**
   * This page and all of its visits are being deleted. Note: the page may not
   * necessarily have actually existed for this function to be called.
   *
   * Delete notifications are only 99.99% accurate. Batch delete operations
   * must be done in two steps, so first come notifications, then a bulk
   * delete. If there is some error in the middle (for example, out of memory)
   * then you'll get a notification and it won't get deleted. There's no easy
   * way around this.
   *
   * @param aURI
   *        The URI that was deleted.
   * @param aGUID
   *        The unique ID associated with the page.
   * @param aReason
   *        Indicates the reason for the removal.  see REASON_* constants.
   */

void onDeleteURI (in nsIURI aURI, in ACString aGUID, in unsigned short aReason);

[src]

/**
   * Notification that all of history is being deleted.
   */

void onClearHistory ();

[src]

/**
   * An attribute of this page changed.
   *
   * @param aURI
   *        The URI of the page on which an attribute changed.
   * @param aChangedAttribute
   *        The attribute whose value changed.  See ATTRIBUTE_* constants.
   * @param aNewValue
   *        The attribute's new value.
   * @param aGUID
   *        The unique ID associated with the page.
   */

void onPageChanged (in nsIURI aURI, in unsigned long aChangedAttribute, in AString aNewValue, in ACString aGUID);

[src]

/**
   * Called when some visits of an history entry are expired.
   *
   * @param aURI
   *        The page whose visits have been expired.
   * @param aVisitTime
   *        The largest visit time in microseconds that has been expired.  We
   *        guarantee that we don't have any visit older than this date.
   * @param aGUID
   *        The unique ID associated with the page.
   *
   * @note: when all visits for a page are expired and also the full page entry
   *        is expired, you will only get an onDeleteURI notification.  If a
   *        page entry is removed, then you can be sure that we don't have
   *        anymore visits for it.
   * @param aReason
   *        Indicates the reason for the removal.  see REASON_* constants.
   * @param aTransitionType
   *        If it's a valid TRANSITION_* value, all visits of the specified type
   *        have been removed.
   */

void onDeleteVisits (in nsIURI aURI, in PRTime aVisitTime, in ACString aGUID, in unsigned short aReason, in unsigned long aTransitionType);

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

IID: nsIID = nsID(252659120, 5025, 17582, [160, 171, 198, 4, 110, 198, 212, 218])

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

[src]

Increment the reference count.

[src]

Decrement the reference count, potentially freeing backing memory.

impl Deref for nsINavHistoryObserver
[src]

The resulting type after dereferencing.

[src]

Dereferences the value.