Struct xpcom::interfaces::nsINavBookmarkObserver [] [src]

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

interface nsINavBookmarkObserver : nsISupports

/**
 * Observer for bookmarks changes.
 */

Methods

impl nsINavBookmarkObserver
[src]

[src]

Cast this nsINavBookmarkObserver to one of its base interfaces.

impl nsINavBookmarkObserver
[src]

[src]

readonly attribute boolean skipTags;

[src]

readonly attribute boolean skipDescendantsOnItemRemoval;

[src]

/**
   * Notifies that a batch transaction has started.
   * Other notifications will be sent during the batch, but the observer is
   * guaranteed that onEndUpdateBatch() will be called at its completion.
   * During a batch the observer should do its best to reduce the work done to
   * handle notifications, since multiple changes are going to happen in a short
   * timeframe.
   */

void onBeginUpdateBatch ();

[src]

/**
   * Notifies that a batch transaction has ended.
   */

void onEndUpdateBatch ();

[src]

/**
   * Notifies that an item (any type) was added.  Called after the actual
   * addition took place.
   * When a new item is created, all the items following it in the same folder
   * will have their index shifted down, but no additional notifications will
   * be sent.
   *
   * @param aItemId
   *        The id of the item that was added.
   * @param aParentId
   *        The id of the folder to which the item was added.
   * @param aIndex
   *        The item's index in the folder.
   * @param aItemType
   *        The type of the added item (see TYPE_* constants below).
   * @param aURI
   *        The URI of the added item if it was TYPE_BOOKMARK, null otherwise.
   * @param aTitle
   *        The title of the added item.
   * @param aDateAdded
   *        The stored date added value, in microseconds from the epoch.
   * @param aGuid
   *        The unique ID associated with the item.
   * @param aParentGuid
   *        The unique ID associated with the item's parent.
   * @param aSource
   *        A change source constant from nsINavBookmarksService::SOURCE_*,
   *        passed to the method that notifies the observer.
   */

void onItemAdded (in long long aItemId, in long long aParentId, in long aIndex, in unsigned short aItemType, in nsIURI aURI, in AUTF8String aTitle, in PRTime aDateAdded, in ACString aGuid, in ACString aParentGuid, in unsigned short aSource);

[src]

/**
   * Notifies that an item was removed.  Called after the actual remove took
   * place.
   * When an item is removed, all the items following it in the same folder
   * will have their index shifted down, but no additional notifications will
   * be sent.
   *
   * @param aItemId
   *        The id of the item that was removed.
   * @param aParentId
   *        The id of the folder from which the item was removed.
   * @param aIndex
   *        The bookmark's index in the folder.
   * @param aItemType
   *        The type of the item to be removed (see TYPE_* constants below).
   * @param aURI
   *        The URI of the added item if it was TYPE_BOOKMARK, null otherwise.
   * @param aGuid
   *        The unique ID associated with the item.
   * @param aParentGuid
   *        The unique ID associated with the item's parent.
   * @param aSource
   *        A change source constant from nsINavBookmarksService::SOURCE_*,
   *        passed to the method that notifies the observer.
   */

void onItemRemoved (in long long aItemId, in long long aParentId, in long aIndex, in unsigned short aItemType, in nsIURI aURI, in ACString aGuid, in ACString aParentGuid, in unsigned short aSource);

[src]

/**
   * Notifies that an item's information has changed.  This will be called
   * whenever any attributes like "title" are changed.
   *
   * @param aItemId
   *        The id of the item that was changed.
   * @param aProperty
   *        The property which changed.  Can be null for the removal of all of
   *        the annotations, in this case aIsAnnotationProperty is true.
   * @param aIsAnnotationProperty
   *        Whether or not aProperty is the name of an annotation.  If true
   *        aNewValue is always an empty string.
   * @param aNewValue
   *        For certain properties, this is set to the new value of the
   *        property (see the list below).
   * @param aLastModified
   *        The updated last-modified value.
   * @param aItemType
   *        The type of the item to be removed (see TYPE_* constants below).
   * @param aParentId
   *        The id of the folder containing the item.
   * @param aGuid
   *        The unique ID associated with the item.
   * @param aParentGuid
   *        The unique ID associated with the item's parent.
   * @param aOldValue
   *        For certain properties, this is set to the new value of the
   *        property (see the list below).
   * @param aSource
   *        A change source constant from nsINavBookmarksService::SOURCE_*,
   *        passed to the method that notifies the observer.
   *
   * @note List of values that may be associated with properties:
   *       aProperty     | aNewValue
   *       =====================================================================
   *       guid          | The new bookmark guid.
   *       cleartime     | Empty string (all visits to this item were removed).
   *       title         | The new title.
   *       favicon       | The "moz-anno" URL of the new favicon.
   *       uri           | new URL.
   *       tags          | Empty string (tags for this item changed)
   *       dateAdded     | PRTime (as string) when the item was first added.
   *       lastModified  | PRTime (as string) when the item was last modified.
   *
   *       aProperty     | aOldValue
   *       =====================================================================
   *       guid          | The old bookmark guid.
   *       cleartime     | Empty string (currently unused).
   *       title         | Empty string (currently unused).
   *       favicon       | Empty string (currently unused).
   *       uri           | old URL.
   *       tags          | Empty string (currently unused).
   *       dateAdded     | Empty string (currently unused).
   *       lastModified  | Empty string (currently unused).
   */

void onItemChanged (in long long aItemId, in ACString aProperty, in boolean aIsAnnotationProperty, in AUTF8String aNewValue, in PRTime aLastModified, in unsigned short aItemType, in long long aParentId, in ACString aGuid, in ACString aParentGuid, in AUTF8String aOldValue, in unsigned short aSource);

[src]

/**
   * Notifies that the item was visited.  Can be invoked only for TYPE_BOOKMARK
   * items.
   *
   * @param aItemId
   *        The id of the bookmark that was visited.
   * @param aVisitId
   *        The id of the visit.
   * @param aTime
   *        The time of the visit.
   * @param aTransitionType
   *        The transition for the visit.  See nsINavHistoryService::TRANSITION_*
   *        constants for a list of possible values.
   * @param aURI
   *        The nsIURI for this bookmark.
   * @param aParentId
   *        The id of the folder containing the item.
   * @param aGuid
   *        The unique ID associated with the item.
   * @param aParentGuid
   *        The unique ID associated with the item's parent.
   *
   * @see onItemChanged with property = "cleartime" for when all visits to an
   *      item are removed.
   *
   * @note The reported time is the time of the visit that was added, which may
   *       be well in the past since the visit time can be specified.  This
   *       means that the visit the observer is told about may not be the most
   *       recent visit for that page.
   */

void onItemVisited (in long long aItemId, in long long aVisitId, in PRTime aTime, in unsigned long aTransitionType, in nsIURI aURI, in long long aParentId, in ACString aGuid, in ACString aParentGuid);

[src]

/**
   * Notifies that an item has been moved.
   *
   * @param aItemId
   *        The id of the item that was moved.
   * @param aOldParentId
   *        The id of the old parent.
   * @param aOldIndex
   *        The old index inside the old parent.
   * @param aNewParentId
   *        The id of the new parent.
   * @param aNewIndex
   *        The index inside the new parent.
   * @param aItemType
   *        The type of the item to be removed (see TYPE_* constants below).
   * @param aGuid
   *        The unique ID associated with the item.
   * @param aOldParentGuid
   *        The unique ID associated with the old item's parent.
   * @param aNewParentGuid
   *        The unique ID associated with the new item's parent.
   * @param aSource
   *        A change source constant from nsINavBookmarksService::SOURCE_*,
   *        passed to the method that notifies the observer.
   */

void onItemMoved (in long long aItemId, in long long aOldParentId, in long aOldIndex, in long long aNewParentId, in long aNewIndex, in unsigned short aItemType, in ACString aGuid, in ACString aOldParentGuid, in ACString aNewParentGuid, in unsigned short aSource);

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

IID: nsIID = nsID(1291895329, 11338, 18347, [166, 23, 171, 179, 36, 17, 4, 146])

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

[src]

Increment the reference count.

[src]

Decrement the reference count, potentially freeing backing memory.

impl Deref for nsINavBookmarkObserver
[src]

The resulting type after dereferencing.

[src]

Dereferences the value.