- public bool load_from_file (string file) throws BookmarkFileError
Loads a desktop bookmark file into an empty
BookmarkFile structure.
- public bool load_from_data (string data, size_t length) throws BookmarkFileError
Loads a bookmark file from memory into an empty
BookmarkFile structure.
- public bool load_from_data_dirs (string file, out string full_path) throws BookmarkFileError
This function looks for a desktop bookmark file named file
in the paths returned from get_user_data_dir and
get_system_data_dirs, loads the file into
this and returns the file's full path in full_path
.
- public string to_data (out size_t length) throws BookmarkFileError
This function outputs this as a
string.
- public bool to_file (string filename) throws BookmarkFileError
This function outputs this into a
file.
- public bool has_item (string uri)
Looks whether the desktop bookmark has an item with its URI set to
uri
.
- public bool has_group (string uri, string group) throws BookmarkFileError
Checks whether group
appears in the list of groups to
which the bookmark for uri
belongs to.
- public bool has_application (string uri, string name) throws BookmarkFileError
Checks whether the bookmark for uri
inside
this has been registered by application name
.
- public int get_size ()
Gets the number of bookmarks inside this
.
- public string[] get_uris ()
Returns all URIs of the bookmarks in the bookmark file
this.
- public string get_title (string uri) throws BookmarkFileError
Returns the title of the bookmark for uri
.
- public string get_description (string uri) throws BookmarkFileError
Retrieves the description of the bookmark for uri
.
- public string get_mime_type (string uri) throws BookmarkFileError
Retrieves the MIME type of the resource pointed by uri
.
- public bool get_is_private (string uri) throws BookmarkFileError
Gets whether the private flag of the bookmark for uri
is
set.
- public bool get_icon (string uri, out string href, out string mime_type) throws BookmarkFileError
Gets the icon of the bookmark for uri
.
- public time_t get_added (string uri) throws BookmarkFileError
Gets the time the bookmark for uri
was added to
this
- public time_t get_modified (string uri) throws BookmarkFileError
Gets the time when the bookmark for uri
was last
modified.
- public time_t get_visited (string uri) throws BookmarkFileError
Gets the time the bookmark for uri
was last visited.
- public string[] get_groups (string uri) throws BookmarkFileError
Retrieves the list of group names of the bookmark for uri
.
- public string[] get_applications (string uri) throws BookmarkFileError
Retrieves the names of the applications that have registered the
bookmark for uri
.
- public bool get_app_info (string uri, string name, out string exec, out uint count, out time_t stamp) throws BookmarkFileError
Gets the registration informations of app_name
for the
bookmark for uri
.
- public void set_title (string uri, string title)
Sets title
as the title of the bookmark for uri
inside the bookmark file this.
- public void set_description (string uri, string description)
Sets description
as the description of the bookmark for
uri
.
- public void set_mime_type (string uri, string mime_type)
Sets mime_type
as the MIME type of the bookmark for
uri
.
- public void set_is_private (string uri, bool is_private)
Sets the private flag of the bookmark for uri
.
- public void set_icon (string uri, string href, string mime_type)
Sets the icon for the bookmark for uri
.
- public void set_added (string uri, time_t added)
Sets the time the bookmark for uri
was added into
this.
- public void set_groups (string uri, string[] groups)
Sets a list of group names for the item with URI uri
.
- public void set_modified (string uri, time_t modified)
Sets the last time the bookmark for uri
was last
modified.
- public void set_visited (string uri, time_t visited)
Sets the time the bookmark for uri
was last visited.
- public bool set_app_info (string uri, string name, string exec, int count, time_t stamp) throws BookmarkFileError
Sets the meta-data of application name
inside the list of
applications that have registered a bookmark for uri
inside this.
- public void add_group (string uri, string group)
Adds group
to the list of groups to which the bookmark
for uri
belongs to.
- public void add_application (string uri, string name, string exec)
Adds the application with name
and exec
to
the list of applications that have registered a bookmark for uri
into this.
- public bool remove_group (string uri, string group) throws BookmarkFileError
Removes group
from the list of groups to which the
bookmark for uri
belongs to.
- public bool remove_application (string uri, string name) throws BookmarkFileError
Removes application registered with name
from the list of
applications that have registered a bookmark for uri
inside this.
- public bool remove_item (string uri) throws BookmarkFileError
Removes the bookmark for uri
from the bookmark file
this.
- public bool move_item (string old_uri, string new_uri) throws BookmarkFileError
Changes the URI of a bookmark item from old_uri
to
new_uri
.