Interface nsINavHistoryResultObserverType

Allows clients to observe what is happening to a result as it updates itself according to history and bookmark system events. Register this observer on a result using nsINavHistoryResult::addObserver.

Hierarchy

Properties

result: nsINavHistoryResult

Called by the result when this observer is added.

skipHistoryDetailsNotifications: boolean

Whether the observer is interested into history details changes. Those include visits additions and removals. If the observer doesn't provide this attribute, it will default to false. In practice, the observer won't receive nodeHistoryDetailsChanged. Note: this is only read when the observer is added, it cannot be changed dynamically.

Methods

  • Increases the reference count for this interface. The associated instance will not be deleted unless the reference count is returned to zero.

    Returns

    The resulting reference count.

    Returns number

  • Parameters

    • aIID: object
    • Optional aInstancePtr: object

    Returns any

  • A run time mechanism for interface discovery.

    Returns

    NS_OK if the interface is supported by the associated instance, NS_NOINTERFACE if it is not.

    aInstancePtr must not be null.

    Parameters

    • aIID: object

      [in] A requested interface IID

    • aInstancePtr: object

      [out] A pointer to an interface pointer to receive the result.

    Returns void

  • Decreases the reference count for this interface. Generally, if the reference count returns to zero, the associated instance is deleted.

    Returns

    The resulting reference count.

    Returns number

  • This is called to indicate that a batch operation is about to start or end. The observer could want to disable some events or updates during batches, since multiple operations are packed in a short time. For example treeviews could temporarily suppress select notifications.

    Parameters

    • aToggleMode: boolean

      true if a batch is starting, false if it's ending.

    Returns void

  • Called after a container changes state.

    Parameters

    • aContainerNode: nsINavHistoryContainerResultNode

      The container that has changed state.

    • aOldState: number

      The state that aContainerNode has transitioned out of.

    • aNewState: number

      The state that aContainerNode has transitioned into.

    Returns void

  • Called when something significant has happened within the container. The contents of the container should be re-built.

    Parameters

    • aContainerNode: nsINavHistoryContainerResultNode

      the container node to invalidate

    Returns void

  • Called right after aNode's dateAdded property has changed.

    Parameters

    • aNode: nsINavHistoryResultNode

      a result node

    • aNewValue: number

      the new value of the dateAdded property

    Returns void

  • Called right after aNode's time property or accessCount property, or both, have changed.

    Parameters

    • aNode: nsINavHistoryResultNode

      a uri result node

    • aOldVisitDate: number

      the old visit date

    • aOldAccessCount: number

      the old access-count

    Returns void

  • Called right after aNode's icon property has changed.

    Parameters

    • aNode: nsINavHistoryResultNode

      a result node

      @note: The new icon is accessible through aNode.icon.

    Returns void

  • Called when 'aItem' is inserted into 'aParent' at index 'aNewIndex'. The item previously at index (if any) and everything below it will have been shifted down by one. The item may be a container or a leaf.

    Parameters

    • aParent: nsINavHistoryContainerResultNode
    • aNode: nsINavHistoryResultNode
    • aNewIndex: number

    Returns void

  • Called right after the aNode's keyword property has changed.

    Parameters

    • aNode: nsINavHistoryResultNode

      a uri result node

    • aNewKeyword: string

      the new keyword

    Returns void

  • Called right after aNode's dateModified property has changed.

    Parameters

    • aNode: nsINavHistoryResultNode

      a result node

    • aNewValue: number

      the new value of the dateModified property

    Returns void

  • Called whan 'aItem' is moved from 'aOldParent' at 'aOldIndex' to aNewParent at aNewIndex. The item may be a container or a leaf.

    XXX: at the moment, this method is called only when an item is moved within the same container. When an item is moved between containers, a new node is created for the item, and the itemRemoved/itemAdded methods are used.

    Parameters

    • aNode: nsINavHistoryResultNode
    • aOldParent: nsINavHistoryContainerResultNode
    • aOldIndex: number
    • aNewParent: nsINavHistoryContainerResultNode
    • aNewIndex: number

    Returns void

  • Called whan 'aItem' is removed from 'aParent' at 'aOldIndex'. The item may be a container or a leaf. This function will be called after the item has been removed from its parent list, but before anything else (including NULLing out the item's parent) has happened.

    Parameters

    • aParent: nsINavHistoryContainerResultNode
    • aItem: nsINavHistoryResultNode
    • aOldIndex: number

    Returns void

  • Called when the tags set on the uri represented by aNode have changed.

    Parameters

    • aNode: nsINavHistoryResultNode

      a uri result node

      @note: The new tags list is accessible through aNode.tags.

    Returns void

  • Called right after aNode's title has changed.

    Parameters

    • aNode: nsINavHistoryResultNode

      a result node

    • aNewTitle: string

      the new title

    Returns void

  • Called right after aNode's uri property has changed.

    Parameters

    • aNode: nsINavHistoryResultNode

      a result node

    • aOldURI: string

    Returns void

  • This is called to indicate to the UI that the sort has changed to the given mode. For trees, for example, this would update the column headers to reflect the sorting. For many other types of views, this won't be applicable.

    Parameters

    • sortingMode: number

      One of nsINavHistoryQueryOptions.SORT_BY_* that indicates the new sorting mode.

      This only is expected to update the sorting UI. invalidateAll() will also get called if the sorting changes to update everything.

    Returns void

Generated using TypeDoc