BookmarkFile
Object Hierarchy:
Description:
[ Compact ]
[ Version ( since = "2.12" ) ]
[ CCode ( copy_function = "g_bookmark_file_copy" , free_function = "g_bookmark_file_free" , type_id = "G_TYPE_BOOKMARK_FILE" ) ]
public class BookmarkFile
[ Version ( since = "2.12" ) ]
[ CCode ( copy_function = "g_bookmark_file_copy" , free_function = "g_bookmark_file_free" , type_id = "G_TYPE_BOOKMARK_FILE" ) ]
public class BookmarkFile
An opaque data structure representing a set of bookmarks.
Namespace: GLib
Package: glib-2.0
Content:
Creation methods:
- public BookmarkFile ()
Creates a new empty BookmarkFile object.
Methods:
- public void add_application (string uri, string name, string exec)
Adds the application with
name
andexec
to the list of applications that have registered a bookmark foruri
into this. - public void add_group (string uri, string group)
Adds
group
to the list of groups to which the bookmark foruri
belongs to. - public BookmarkFile copy ()
Deeply copies a this BookmarkFile object to a new one.
- public time_t get_added (string uri) throws BookmarkFileError
Gets the time the bookmark for
uri
was added to this - public unowned DateTime get_added_date_time (string uri) throws BookmarkFileError
Gets the time the bookmark for
uri
was added to this - public bool get_app_info (string uri, string name, out string exec, out uint count, out time_t stamp) throws BookmarkFileError
Gets the registration information of
app_name
for the bookmark foruri
. - public bool get_application_info (string uri, string name, out string exec, out uint count, out unowned DateTime? stamp) throws BookmarkFileError
Gets the registration information of
app_name
for the bookmark foruri
. - public string[] get_applications (string uri) throws BookmarkFileError
Retrieves the names of the applications that have registered the bookmark for
uri
. - public string get_description (string uri) throws BookmarkFileError
Retrieves the description of the bookmark for
uri
. - public string[] get_groups (string uri) throws BookmarkFileError
Retrieves the list of group names of the bookmark for
uri
. - public bool get_icon (string uri, out string href, out string mime_type) throws BookmarkFileError
Gets the icon of the bookmark for
uri
. - public bool get_is_private (string uri) throws BookmarkFileError
Gets whether the private flag of the bookmark for
uri
is set. - public string get_mime_type (string uri) throws BookmarkFileError
Retrieves the MIME type of the resource pointed by
uri
. - public time_t get_modified (string uri) throws BookmarkFileError
Gets the time when the bookmark for
uri
was last modified. - public unowned DateTime get_modified_date_time (string uri) throws BookmarkFileError
Gets the time when the bookmark for
uri
was last modified. - public int get_size ()
Gets the number of bookmarks inside this.
- public string get_title (string uri) throws BookmarkFileError
Returns the title of the bookmark for
uri
. - public string[] get_uris ()
Returns all URIs of the bookmarks in the bookmark file this.
- public time_t get_visited (string uri) throws BookmarkFileError
Gets the time the bookmark for
uri
was last visited. - public unowned DateTime get_visited_date_time (string uri) throws BookmarkFileError
Gets the time the bookmark for
uri
was last visited. - public bool has_application (string uri, string name) throws BookmarkFileError
Checks whether the bookmark for
uri
inside this has been registered by applicationname
. - public bool has_group (string uri, string group) throws BookmarkFileError
Checks whether
group
appears in the list of groups to which the bookmark foruri
belongs to. - public bool has_item (string uri)
Looks whether the desktop bookmark has an item with its URI set to
uri
. - 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, FileError
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 infull_path
. - public bool load_from_file (string file) throws BookmarkFileError, FileError
Loads a desktop bookmark file into an empty BookmarkFile structure.
- public bool move_item (string old_uri, string new_uri) throws BookmarkFileError
Changes the URI of a bookmark item from
old_uri
tonew_uri
. - 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 foruri
inside this. - public bool remove_group (string uri, string group) throws BookmarkFileError
Removes
group
from the list of groups to which the bookmark foruri
belongs to. - public bool remove_item (string uri) throws BookmarkFileError
Removes the bookmark for
uri
from the bookmark file this. - public void set_added (string uri, time_t added)
Sets the time the bookmark for
uri
was added into this. - public void set_added_date_time (string uri, DateTime added)
Sets the time the bookmark for
uri
was added into this. - 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 foruri
inside this. - public bool set_application_info (string uri, string name, string exec, int count, DateTime? stamp) throws BookmarkFileError
Sets the meta-data of application
name
inside the list of applications that have registered a bookmark foruri
inside this. - public void set_description (string uri, string description)
Sets
description
as the description of the bookmark foruri
. - public void set_groups (string uri, string[] groups)
Sets a list of group names for the item with URI
uri
. - public void set_icon (string uri, string href, string mime_type)
Sets the icon for 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_mime_type (string uri, string mime_type)
Sets
mime_type
as the MIME type of the bookmark foruri
. - public void set_modified (string uri, time_t modified)
Sets the last time the bookmark for
uri
was last modified. - public void set_modified_date_time (string uri, DateTime modified)
Sets the last time the bookmark for
uri
was last modified. - public void set_title (string uri, string title)
Sets
title
as the title of the bookmark foruri
inside the bookmark file this. - public void set_visited (string uri, time_t visited)
Sets the time the bookmark for
uri
was last visited. - public void set_visited_date_time (string uri, DateTime visited)
Sets the time the bookmark for
uri
was last visited. - 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, FileError
This function outputs this into a file.