Bookmarks shared among desktop environments

Christian Neumair chris at gnome-de.org
Mon Apr 18 18:47:21 EEST 2005


I've recently decided to implement a D-Bus-powered bookmarks system,
which aims to provide categorized file and web bookmarks.

Some ideas on the abstraction layer from the top of my head;
I'd like to figure out whether this sounds useful and is able to replace
existing solutions.

Bookmark Groups

- currently, there are two groups, "Web" and "Files".
- they're accessible through "/org/freedesktop/Bookmarks/Web" and
"/org/freedesktop/Bookmarks/Files"
- each category and each bookmark belongs to a group

Bookmark Categories

- they're accessible through "/Bookmarks/Web/Categories/ID" or	
  "/Bookmarks/Files/Categories/ID", where ID is their unique path to the
category with the ID "ID".

- properties
  - id      an unique category ID. It is guaranteed to be unique during
one daemon session and matches the category's path ID (ASCII string)
  - name    the name of this category (UTF-8 string)
  - comment a description of this category, or some extra info you want
to provide (UTF-8 string)
  - icon    an icon name; there are not yet any icon standards, you
should use choose something your client applications will understand
(UTF-8 string)

Bookmarks

- bookmarks are stored in their groups, in one of the two global group
pools ("/org/freedesktop/Bookmarks/(Web|File)/Bookmarks/ID") and in the
category-specific pools.

- properties
  - id      an unique bookmark ID (ASCII string)
  - name    the name of this bookmark, (UTF-8 string)
  - uri     the address this bookmark refers to (ASCII string)
  - comment a description of this bookmark, or some extra info you want
to provide (UTF-8 string)
  - groups  all group IDs this bookmark belongs to (list of ASCII
strings)
  - icon    an icon name; there are not yet any icon standards, you
should use choose something your client applications will understand
(UTF-8 string)

Do you have any comments on this architecture?

Is it possible using D-Bus to access the object
at /org/freedesktop/Web/Categories/2 and store bookmarks
under /org/freedesktop/Web/Categories/2/6 at the same time?

Is it a good idea to reflect the category hierarchy in D-Bus paths, or
should we rather have one global object per group with category/bookmark
getters (get_bookmark_by_id (const char *id, char **name, char
**comment, ...) and such).

We should also decide whether it is a good idea to associate a MIME type
with each bookmark/category, since this could be used to determine which
files should be used to open the linked file.

Sidenote 1: This architecture should be abstract enough to plug
different backends into the bookmark system; it could have XML files
similar to $HOME/.gnome2/epiphany/ephy-bookmarks.xml, or could access a
database of bookmarks on a central server

Sidenote 2: I've not yet considered hierarchical categories. I'd either
propose to specify hierarchies semantically, so that "/" characters
(unless escaped) lead to a hierarchical arrangement, which would have to
be done by the GUI.

Sidenote 3: Group-Bookmarks relation is N:M, just like with Epiphany

-- 
Christian Neumair <chris at gnome-de.org>




More information about the xdg mailing list