From 98237bbabef0a023909c7d8df560c051239eabad Mon Sep 17 00:00:00 2001 From: "benjamin%smedbergs.us" Date: Tue, 18 Jul 2006 17:31:17 +0000 Subject: [PATCH] Bug 318817 r=beng: Import, store, and use bookmark keywords. Original committer: brettw%gmail.com Original revision: 1.20 Original date: 2006/02/16 00:42:46 --- .../places/public/nsINavBookmarksService.idl | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/toolkit/components/places/public/nsINavBookmarksService.idl b/toolkit/components/places/public/nsINavBookmarksService.idl index f9ca1b3cb9a5..ca1387c926b5 100644 --- a/toolkit/components/places/public/nsINavBookmarksService.idl +++ b/toolkit/components/places/public/nsINavBookmarksService.idl @@ -364,6 +364,30 @@ interface nsINavBookmarksService : nsISupports */ PRInt32 indexOfFolder(in PRInt64 parent, in PRInt64 folder); + /** + * Associates the given keyword with the given URI. + * + * Use an empty keyword to clear the keyword associated with the URI. Use an + * empty URI to clear the URI associated with that keyword. In both of these + * cases, succeeds but does nothing if the URL/keyword is not found. + * + * When setting a keyword (both URI and keyword are specified), the URI must + * be bookmarked for the keyword to be persistent. + */ + void setKeywordForURI(in nsIURI uri, in AString keyword); + + /** + * Retrieves the keyword for the given URI. Will be empty if no such + * keyword is found. + */ + AString getKeywordForURI(in nsIURI uri); + + /** + * Returns the URI associated with the given keyword. Empty if no such + * keyword is found. + */ + nsIURI getURIForKeyword(in AString keyword); + /** * Adds a bookmark observer. If ownsWeak is false, the bookmark service will * keep an owning reference to the observer. If ownsWeak is true, then