nsINavBookmarkObserver
| IID: | f9828ba8-9c70-4d95-b926-60d9e4378d7d |
| Inherits From: | nsISupports |
Observer for bookmark changes.
This interface is implemented by the following components:
Methods
void onBeginUpdateBatch ( )
void onEndUpdateBatch ( )
void onItemAdded ( PRInt64 itemId , PRInt64 folder , PRInt32 index )
void onItemChanged ( PRInt64 bookmarkId , ACString property , PRBool isAnnotationProperty , AUTF8String value )
void onItemMoved ( PRInt64 itemId , PRInt64 oldParent , PRInt32 oldIndex , PRInt64 newParent , PRInt32 newIndex )
void onItemRemoved ( PRInt64 itemId , PRInt64 folder , PRInt32 index )
void onItemVisited ( PRInt64 bookmarkId , PRInt64 visitID , PRTime time )
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 onItemAdded ( PRInt64 itemId , PRInt64 folder , PRInt32 index )
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.
- Arguments:
- itemId: The id of the bookmark that was added.
- folder: The folder that the item was added to.
- index: The item's index in the folder.
void onItemChanged ( PRInt64 bookmarkId , ACString property , PRBool isAnnotationProperty , AUTF8String value )
Notify this observer that an item's information has changed. This will be called whenever any attributes like "title" are changed.
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. isAnnotationProperty = true: value = empty string.
- Arguments:
- bookmarkId
- property: The property which changed.
- isAnnotationProperty: Is property the name of an item annotation
- value
void onItemMoved ( PRInt64 itemId , PRInt64 oldParent , PRInt32 oldIndex , PRInt64 newParent , PRInt32 newIndex )
Notify this observer that an item has been moved.
- Arguments:
- itemId: The id of the item that was moved.
- oldParent: The id of the old parent.
- oldIndex: The old index inside oldParent.
- newParent: The id of the new parent.
- newIndex: The foindex inside newParent.
void onItemRemoved ( PRInt64 itemId , PRInt64 folder , PRInt32 index )
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.
- Arguments:
- itemId: The id of the bookmark that was removed.
- folder: The folder that the item was removed from.
- index: The bookmark's index in the folder.
void onItemVisited ( PRInt64 bookmarkId , PRInt64 visitID , 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.
- Arguments:
- bookmarkId: The id of the bookmark that was visited.
- visitID
- time
References
This interface is passed as an argument to the following methods:
nsINavBookmarksService.addObserver, nsINavBookmarksService.removeObserver
Reference documentation is generated from Mozilla's source.
