nsINavBookmarkObserver Interface Reference

import "nsINavBookmarksService.idl";

List of all members.

Public Member Functions

void onBeginUpdateBatch ()
void onEndUpdateBatch ()
void onItemAdded (in long long aItemId, in long long aFolder, in long aIndex)
void onItemRemoved (in long long aItemId, in long long aFolder, in long aIndex)
void onItemChanged (in long long aBookmarkId, in ACString aProperty, in boolean aIsAnnotationProperty, in AUTF8String aValue)
void onItemVisited (in long long aBookmarkId, in long long aVisitID, in PRTime time)
void onItemMoved (in long long aItemId, in long long aOldParent, in long aOldIndex, in long long aNewParent, in long aNewIndex)


Detailed Description

Observer for bookmark changes.

Definition at line 61 of file nsINavBookmarksService.idl.


Member Function Documentation

void nsINavBookmarkObserver::onBeginUpdateBatch (  ) 

Notify this observer that a batch transaction has started. Other notifications will be sent during the batch change, but the observer is guaranteed that onEndUpdateBatch() will be called at the completion of changes.

void nsINavBookmarkObserver::onEndUpdateBatch (  ) 

Notify this observer that a batch transaction has ended.

void nsINavBookmarkObserver::onItemAdded ( in long long  aItemId,
in long long  aFolder,
in long  aIndex 
)

Notify this observer that an item was added. Called after the actual add took place. The items following the index will be shifted down, but no additional notifications will be sent.

Parameters:
aItemId The id of the bookmark that was added.
aFolder The folder that the item was added to.
aIndex The item's index in the folder.

void nsINavBookmarkObserver::onItemChanged ( in long long  aBookmarkId,
in ACString  aProperty,
in boolean  aIsAnnotationProperty,
in AUTF8String  aValue 
)

Notify this observer that an item's information has changed. This will be called whenever any attributes like "title" are changed.

Parameters:
aItemId The id of the item that was changed.
aProperty The property which changed.
aIsAnnotationProperty Is aProperty the name of an item annotation
property = "cleartime": (history was deleted, there is no last visit date): value = empty string. property = "title": value = new title. property = "favicon": value = new "moz-anno" URL of favicon image property = "uri": value = new uri spec. property = "tags: (tags set for the bookmarked uri have changed) value = empty string. property = "dateAdded": value = PRTime when the item was first added property = "lastModified": value = PRTime when the item was last modified aIsAnnotationProperty = true: value = empty string.

void nsINavBookmarkObserver::onItemMoved ( in long long  aItemId,
in long long  aOldParent,
in long  aOldIndex,
in long long  aNewParent,
in long  aNewIndex 
)

Notify this observer that an item has been moved.

Parameters:
aItemId The id of the item that was moved.
aOldParent The id of the old parent.
aOldIndex The old index inside aOldParent.
aNewParent The id of the new parent.
aNewIndex The foindex inside aNewParent.

void nsINavBookmarkObserver::onItemRemoved ( in long long  aItemId,
in long long  aFolder,
in long  aIndex 
)

Notify this observer that an item was removed. Called after the actual remove took place. The items following the index will be shifted up, but no additional notifications will be sent.

Parameters:
aItemId The id of the bookmark that was removed.
aFolder The folder that the item was removed from.
aIndex The bookmark's index in the folder.

void nsINavBookmarkObserver::onItemVisited ( in long long  aBookmarkId,
in long long  aVisitID,
in PRTime  time 
)

Notify that the item was visited. Normally in bookmarks we use the last visit date, and normally the time will be a new visit that will be more recent, but this is not guaranteed. You should check to see if it's actually more recent before using this new time.

Parameters:
aBookmarkId The id of the bookmark that was visited.
See also:
onItemChanged property = "cleartime" for when all visit dates are deleted for the URI.


The documentation for this interface was generated from the following file:

Generated on Fri Jan 16 21:13:02 2009 for Places by  doxygen 1.5.8