1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
4 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
5 <title>Bookmark file parser</title>
6 <meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
7 <link rel="home" href="index.html" title="GLib Reference Manual">
8 <link rel="up" href="glib-utilities.html" title="GLib Utilities">
9 <link rel="prev" href="glib-Key-value-file-parser.html" title="Key-value file parser">
10 <link rel="next" href="glib-Testing.html" title="Testing">
11 <meta name="generator" content="GTK-Doc V1.13 (XML mode)">
12 <link rel="stylesheet" href="style.css" type="text/css">
13 <link rel="chapter" href="glib.html" title="GLib Overview">
14 <link rel="chapter" href="glib-fundamentals.html" title="GLib Fundamentals">
15 <link rel="chapter" href="glib-core.html" title="GLib Core Application Support">
16 <link rel="chapter" href="glib-utilities.html" title="GLib Utilities">
17 <link rel="chapter" href="glib-data-types.html" title="GLib Data Types">
18 <link rel="chapter" href="tools.html" title="GLib Tools">
19 <link rel="index" href="api-index-full.html" title="Index">
20 <link rel="index" href="api-index-deprecated.html" title="Index of deprecated symbols">
21 <link rel="index" href="api-index-2-2.html" title="Index of new symbols in 2.2">
22 <link rel="index" href="api-index-2-4.html" title="Index of new symbols in 2.4">
23 <link rel="index" href="api-index-2-6.html" title="Index of new symbols in 2.6">
24 <link rel="index" href="api-index-2-8.html" title="Index of new symbols in 2.8">
25 <link rel="index" href="api-index-2-10.html" title="Index of new symbols in 2.10">
26 <link rel="index" href="api-index-2-12.html" title="Index of new symbols in 2.12">
27 <link rel="index" href="api-index-2-14.html" title="Index of new symbols in 2.14">
28 <link rel="index" href="api-index-2-16.html" title="Index of new symbols in 2.16">
29 <link rel="index" href="api-index-2-18.html" title="Index of new symbols in 2.18">
30 <link rel="index" href="api-index-2-20.html" title="Index of new symbols in 2.20">
31 <link rel="index" href="api-index-2-22.html" title="Index of new symbols in 2.22">
32 <link rel="index" href="api-index-2-24.html" title="Index of new symbols in 2.24">
34 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
35 <table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
37 <td><a accesskey="p" href="glib-Key-value-file-parser.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
38 <td><a accesskey="u" href="glib-utilities.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
39 <td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
40 <th width="100%" align="center">GLib Reference Manual</th>
41 <td><a accesskey="n" href="glib-Testing.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
43 <tr><td colspan="5" class="shortcuts">
44 <a href="#glib-Bookmark-file-parser.synopsis" class="shortcut">Top</a>
46 <a href="#glib-Bookmark-file-parser.description" class="shortcut">Description</a>
49 <div class="refentry" title="Bookmark file parser">
50 <a name="glib-Bookmark-file-parser"></a><div class="titlepage"></div>
51 <div class="refnamediv"><table width="100%"><tr>
53 <h2><span class="refentrytitle"><a name="glib-Bookmark-file-parser.top_of_page"></a>Bookmark file parser</span></h2>
54 <p>Bookmark file parser — parses files containing bookmarks</p>
56 <td valign="top" align="right"></td>
58 <div class="refsynopsisdiv" title="Synopsis">
59 <a name="glib-Bookmark-file-parser.synopsis"></a><h2>Synopsis</h2>
60 <pre class="synopsis">
61 #include <glib.h>
63 <a class="link" href="glib-Bookmark-file-parser.html#GBookmarkFile" title="GBookmarkFile">GBookmarkFile</a>;
64 #define <a class="link" href="glib-Bookmark-file-parser.html#G-BOOKMARK-FILE-ERROR:CAPS" title="G_BOOKMARK_FILE_ERROR">G_BOOKMARK_FILE_ERROR</a>
65 enum <a class="link" href="glib-Bookmark-file-parser.html#GBookmarkFileError" title="enum GBookmarkFileError">GBookmarkFileError</a>;
66 <a class="link" href="glib-Bookmark-file-parser.html#GBookmarkFile" title="GBookmarkFile"><span class="returnvalue">GBookmarkFile</span></a> * <a class="link" href="glib-Bookmark-file-parser.html#g-bookmark-file-new" title="g_bookmark_file_new ()">g_bookmark_file_new</a> (void);
67 <span class="returnvalue">void</span> <a class="link" href="glib-Bookmark-file-parser.html#g-bookmark-file-free" title="g_bookmark_file_free ()">g_bookmark_file_free</a> (<a class="link" href="glib-Bookmark-file-parser.html#GBookmarkFile" title="GBookmarkFile"><span class="returnvalue">GBookmarkFile</span></a> *bookmark);
68 <a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="glib-Bookmark-file-parser.html#g-bookmark-file-load-from-file" title="g_bookmark_file_load_from_file ()">g_bookmark_file_load_from_file</a> (<a class="link" href="glib-Bookmark-file-parser.html#GBookmarkFile" title="GBookmarkFile"><span class="returnvalue">GBookmarkFile</span></a> *bookmark,
69 const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> *filename,
70 <a class="link" href="glib-Error-Reporting.html#GError" title="GError"><span class="returnvalue">GError</span></a> **error);
71 <a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="glib-Bookmark-file-parser.html#g-bookmark-file-load-from-data" title="g_bookmark_file_load_from_data ()">g_bookmark_file_load_from_data</a> (<a class="link" href="glib-Bookmark-file-parser.html#GBookmarkFile" title="GBookmarkFile"><span class="returnvalue">GBookmarkFile</span></a> *bookmark,
72 const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> *data,
73 <a class="link" href="glib-Basic-Types.html#gsize" title="gsize"><span class="returnvalue">gsize</span></a> length,
74 <a class="link" href="glib-Error-Reporting.html#GError" title="GError"><span class="returnvalue">GError</span></a> **error);
75 <a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="glib-Bookmark-file-parser.html#g-bookmark-file-load-from-data-dirs" title="g_bookmark_file_load_from_data_dirs ()">g_bookmark_file_load_from_data_dirs</a> (<a class="link" href="glib-Bookmark-file-parser.html#GBookmarkFile" title="GBookmarkFile"><span class="returnvalue">GBookmarkFile</span></a> *bookmark,
76 const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> *file,
77 <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> **full_path,
78 <a class="link" href="glib-Error-Reporting.html#GError" title="GError"><span class="returnvalue">GError</span></a> **error);
79 <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> * <a class="link" href="glib-Bookmark-file-parser.html#g-bookmark-file-to-data" title="g_bookmark_file_to_data ()">g_bookmark_file_to_data</a> (<a class="link" href="glib-Bookmark-file-parser.html#GBookmarkFile" title="GBookmarkFile"><span class="returnvalue">GBookmarkFile</span></a> *bookmark,
80 <a class="link" href="glib-Basic-Types.html#gsize" title="gsize"><span class="returnvalue">gsize</span></a> *length,
81 <a class="link" href="glib-Error-Reporting.html#GError" title="GError"><span class="returnvalue">GError</span></a> **error);
82 <a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="glib-Bookmark-file-parser.html#g-bookmark-file-to-file" title="g_bookmark_file_to_file ()">g_bookmark_file_to_file</a> (<a class="link" href="glib-Bookmark-file-parser.html#GBookmarkFile" title="GBookmarkFile"><span class="returnvalue">GBookmarkFile</span></a> *bookmark,
83 const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> *filename,
84 <a class="link" href="glib-Error-Reporting.html#GError" title="GError"><span class="returnvalue">GError</span></a> **error);
85 <a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="glib-Bookmark-file-parser.html#g-bookmark-file-has-item" title="g_bookmark_file_has_item ()">g_bookmark_file_has_item</a> (<a class="link" href="glib-Bookmark-file-parser.html#GBookmarkFile" title="GBookmarkFile"><span class="returnvalue">GBookmarkFile</span></a> *bookmark,
86 const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> *uri);
87 <a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="glib-Bookmark-file-parser.html#g-bookmark-file-has-group" title="g_bookmark_file_has_group ()">g_bookmark_file_has_group</a> (<a class="link" href="glib-Bookmark-file-parser.html#GBookmarkFile" title="GBookmarkFile"><span class="returnvalue">GBookmarkFile</span></a> *bookmark,
88 const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> *uri,
89 const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> *group,
90 <a class="link" href="glib-Error-Reporting.html#GError" title="GError"><span class="returnvalue">GError</span></a> **error);
91 <a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="glib-Bookmark-file-parser.html#g-bookmark-file-has-application" title="g_bookmark_file_has_application ()">g_bookmark_file_has_application</a> (<a class="link" href="glib-Bookmark-file-parser.html#GBookmarkFile" title="GBookmarkFile"><span class="returnvalue">GBookmarkFile</span></a> *bookmark,
92 const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> *uri,
93 const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> *name,
94 <a class="link" href="glib-Error-Reporting.html#GError" title="GError"><span class="returnvalue">GError</span></a> **error);
95 <a class="link" href="glib-Basic-Types.html#gint" title="gint"><span class="returnvalue">gint</span></a> <a class="link" href="glib-Bookmark-file-parser.html#g-bookmark-file-get-size" title="g_bookmark_file_get_size ()">g_bookmark_file_get_size</a> (<a class="link" href="glib-Bookmark-file-parser.html#GBookmarkFile" title="GBookmarkFile"><span class="returnvalue">GBookmarkFile</span></a> *bookmark);
96 <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> ** <a class="link" href="glib-Bookmark-file-parser.html#g-bookmark-file-get-uris" title="g_bookmark_file_get_uris ()">g_bookmark_file_get_uris</a> (<a class="link" href="glib-Bookmark-file-parser.html#GBookmarkFile" title="GBookmarkFile"><span class="returnvalue">GBookmarkFile</span></a> *bookmark,
97 <a class="link" href="glib-Basic-Types.html#gsize" title="gsize"><span class="returnvalue">gsize</span></a> *length);
99 <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> * <a class="link" href="glib-Bookmark-file-parser.html#g-bookmark-file-get-title" title="g_bookmark_file_get_title ()">g_bookmark_file_get_title</a> (<a class="link" href="glib-Bookmark-file-parser.html#GBookmarkFile" title="GBookmarkFile"><span class="returnvalue">GBookmarkFile</span></a> *bookmark,
100 const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> *uri,
101 <a class="link" href="glib-Error-Reporting.html#GError" title="GError"><span class="returnvalue">GError</span></a> **error);
102 <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> * <a class="link" href="glib-Bookmark-file-parser.html#g-bookmark-file-get-description" title="g_bookmark_file_get_description ()">g_bookmark_file_get_description</a> (<a class="link" href="glib-Bookmark-file-parser.html#GBookmarkFile" title="GBookmarkFile"><span class="returnvalue">GBookmarkFile</span></a> *bookmark,
103 const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> *uri,
104 <a class="link" href="glib-Error-Reporting.html#GError" title="GError"><span class="returnvalue">GError</span></a> **error);
105 <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> * <a class="link" href="glib-Bookmark-file-parser.html#g-bookmark-file-get-mime-type" title="g_bookmark_file_get_mime_type ()">g_bookmark_file_get_mime_type</a> (<a class="link" href="glib-Bookmark-file-parser.html#GBookmarkFile" title="GBookmarkFile"><span class="returnvalue">GBookmarkFile</span></a> *bookmark,
106 const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> *uri,
107 <a class="link" href="glib-Error-Reporting.html#GError" title="GError"><span class="returnvalue">GError</span></a> **error);
108 <a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="glib-Bookmark-file-parser.html#g-bookmark-file-get-is-private" title="g_bookmark_file_get_is_private ()">g_bookmark_file_get_is_private</a> (<a class="link" href="glib-Bookmark-file-parser.html#GBookmarkFile" title="GBookmarkFile"><span class="returnvalue">GBookmarkFile</span></a> *bookmark,
109 const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> *uri,
110 <a class="link" href="glib-Error-Reporting.html#GError" title="GError"><span class="returnvalue">GError</span></a> **error);
111 <a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="glib-Bookmark-file-parser.html#g-bookmark-file-get-icon" title="g_bookmark_file_get_icon ()">g_bookmark_file_get_icon</a> (<a class="link" href="glib-Bookmark-file-parser.html#GBookmarkFile" title="GBookmarkFile"><span class="returnvalue">GBookmarkFile</span></a> *bookmark,
112 const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> *uri,
113 <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> **href,
114 <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> **mime_type,
115 <a class="link" href="glib-Error-Reporting.html#GError" title="GError"><span class="returnvalue">GError</span></a> **error);
116 <span class="returnvalue">time_t</span> <a class="link" href="glib-Bookmark-file-parser.html#g-bookmark-file-get-added" title="g_bookmark_file_get_added ()">g_bookmark_file_get_added</a> (<a class="link" href="glib-Bookmark-file-parser.html#GBookmarkFile" title="GBookmarkFile"><span class="returnvalue">GBookmarkFile</span></a> *bookmark,
117 const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> *uri,
118 <a class="link" href="glib-Error-Reporting.html#GError" title="GError"><span class="returnvalue">GError</span></a> **error);
119 <span class="returnvalue">time_t</span> <a class="link" href="glib-Bookmark-file-parser.html#g-bookmark-file-get-modified" title="g_bookmark_file_get_modified ()">g_bookmark_file_get_modified</a> (<a class="link" href="glib-Bookmark-file-parser.html#GBookmarkFile" title="GBookmarkFile"><span class="returnvalue">GBookmarkFile</span></a> *bookmark,
120 const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> *uri,
121 <a class="link" href="glib-Error-Reporting.html#GError" title="GError"><span class="returnvalue">GError</span></a> **error);
122 <span class="returnvalue">time_t</span> <a class="link" href="glib-Bookmark-file-parser.html#g-bookmark-file-get-visited" title="g_bookmark_file_get_visited ()">g_bookmark_file_get_visited</a> (<a class="link" href="glib-Bookmark-file-parser.html#GBookmarkFile" title="GBookmarkFile"><span class="returnvalue">GBookmarkFile</span></a> *bookmark,
123 const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> *uri,
124 <a class="link" href="glib-Error-Reporting.html#GError" title="GError"><span class="returnvalue">GError</span></a> **error);
125 <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> ** <a class="link" href="glib-Bookmark-file-parser.html#g-bookmark-file-get-groups" title="g_bookmark_file_get_groups ()">g_bookmark_file_get_groups</a> (<a class="link" href="glib-Bookmark-file-parser.html#GBookmarkFile" title="GBookmarkFile"><span class="returnvalue">GBookmarkFile</span></a> *bookmark,
126 const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> *uri,
127 <a class="link" href="glib-Basic-Types.html#gsize" title="gsize"><span class="returnvalue">gsize</span></a> *length,
128 <a class="link" href="glib-Error-Reporting.html#GError" title="GError"><span class="returnvalue">GError</span></a> **error);
129 <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> ** <a class="link" href="glib-Bookmark-file-parser.html#g-bookmark-file-get-applications" title="g_bookmark_file_get_applications ()">g_bookmark_file_get_applications</a> (<a class="link" href="glib-Bookmark-file-parser.html#GBookmarkFile" title="GBookmarkFile"><span class="returnvalue">GBookmarkFile</span></a> *bookmark,
130 const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> *uri,
131 <a class="link" href="glib-Basic-Types.html#gsize" title="gsize"><span class="returnvalue">gsize</span></a> *length,
132 <a class="link" href="glib-Error-Reporting.html#GError" title="GError"><span class="returnvalue">GError</span></a> **error);
133 <a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="glib-Bookmark-file-parser.html#g-bookmark-file-get-app-info" title="g_bookmark_file_get_app_info ()">g_bookmark_file_get_app_info</a> (<a class="link" href="glib-Bookmark-file-parser.html#GBookmarkFile" title="GBookmarkFile"><span class="returnvalue">GBookmarkFile</span></a> *bookmark,
134 const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> *uri,
135 const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> *name,
136 <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> **exec,
137 <a class="link" href="glib-Basic-Types.html#guint" title="guint"><span class="returnvalue">guint</span></a> *count,
138 <span class="returnvalue">time_t</span> *stamp,
139 <a class="link" href="glib-Error-Reporting.html#GError" title="GError"><span class="returnvalue">GError</span></a> **error);
141 <span class="returnvalue">void</span> <a class="link" href="glib-Bookmark-file-parser.html#g-bookmark-file-set-title" title="g_bookmark_file_set_title ()">g_bookmark_file_set_title</a> (<a class="link" href="glib-Bookmark-file-parser.html#GBookmarkFile" title="GBookmarkFile"><span class="returnvalue">GBookmarkFile</span></a> *bookmark,
142 const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> *uri,
143 const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> *title);
144 <span class="returnvalue">void</span> <a class="link" href="glib-Bookmark-file-parser.html#g-bookmark-file-set-description" title="g_bookmark_file_set_description ()">g_bookmark_file_set_description</a> (<a class="link" href="glib-Bookmark-file-parser.html#GBookmarkFile" title="GBookmarkFile"><span class="returnvalue">GBookmarkFile</span></a> *bookmark,
145 const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> *uri,
146 const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> *description);
147 <span class="returnvalue">void</span> <a class="link" href="glib-Bookmark-file-parser.html#g-bookmark-file-set-mime-type" title="g_bookmark_file_set_mime_type ()">g_bookmark_file_set_mime_type</a> (<a class="link" href="glib-Bookmark-file-parser.html#GBookmarkFile" title="GBookmarkFile"><span class="returnvalue">GBookmarkFile</span></a> *bookmark,
148 const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> *uri,
149 const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> *mime_type);
150 <span class="returnvalue">void</span> <a class="link" href="glib-Bookmark-file-parser.html#g-bookmark-file-set-is-private" title="g_bookmark_file_set_is_private ()">g_bookmark_file_set_is_private</a> (<a class="link" href="glib-Bookmark-file-parser.html#GBookmarkFile" title="GBookmarkFile"><span class="returnvalue">GBookmarkFile</span></a> *bookmark,
151 const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> *uri,
152 <a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean"><span class="returnvalue">gboolean</span></a> is_private);
153 <span class="returnvalue">void</span> <a class="link" href="glib-Bookmark-file-parser.html#g-bookmark-file-set-icon" title="g_bookmark_file_set_icon ()">g_bookmark_file_set_icon</a> (<a class="link" href="glib-Bookmark-file-parser.html#GBookmarkFile" title="GBookmarkFile"><span class="returnvalue">GBookmarkFile</span></a> *bookmark,
154 const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> *uri,
155 const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> *href,
156 const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> *mime_type);
157 <span class="returnvalue">void</span> <a class="link" href="glib-Bookmark-file-parser.html#g-bookmark-file-set-added" title="g_bookmark_file_set_added ()">g_bookmark_file_set_added</a> (<a class="link" href="glib-Bookmark-file-parser.html#GBookmarkFile" title="GBookmarkFile"><span class="returnvalue">GBookmarkFile</span></a> *bookmark,
158 const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> *uri,
159 <span class="returnvalue">time_t</span> added);
160 <span class="returnvalue">void</span> <a class="link" href="glib-Bookmark-file-parser.html#g-bookmark-file-set-groups" title="g_bookmark_file_set_groups ()">g_bookmark_file_set_groups</a> (<a class="link" href="glib-Bookmark-file-parser.html#GBookmarkFile" title="GBookmarkFile"><span class="returnvalue">GBookmarkFile</span></a> *bookmark,
161 const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> *uri,
162 const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> **groups,
163 <a class="link" href="glib-Basic-Types.html#gsize" title="gsize"><span class="returnvalue">gsize</span></a> length);
164 <span class="returnvalue">void</span> <a class="link" href="glib-Bookmark-file-parser.html#g-bookmark-file-set-modified" title="g_bookmark_file_set_modified ()">g_bookmark_file_set_modified</a> (<a class="link" href="glib-Bookmark-file-parser.html#GBookmarkFile" title="GBookmarkFile"><span class="returnvalue">GBookmarkFile</span></a> *bookmark,
165 const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> *uri,
166 <span class="returnvalue">time_t</span> modified);
167 <span class="returnvalue">void</span> <a class="link" href="glib-Bookmark-file-parser.html#g-bookmark-file-set-visited" title="g_bookmark_file_set_visited ()">g_bookmark_file_set_visited</a> (<a class="link" href="glib-Bookmark-file-parser.html#GBookmarkFile" title="GBookmarkFile"><span class="returnvalue">GBookmarkFile</span></a> *bookmark,
168 const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> *uri,
169 <span class="returnvalue">time_t</span> visited);
170 <a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="glib-Bookmark-file-parser.html#g-bookmark-file-set-app-info" title="g_bookmark_file_set_app_info ()">g_bookmark_file_set_app_info</a> (<a class="link" href="glib-Bookmark-file-parser.html#GBookmarkFile" title="GBookmarkFile"><span class="returnvalue">GBookmarkFile</span></a> *bookmark,
171 const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> *uri,
172 const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> *name,
173 const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> *exec,
174 <a class="link" href="glib-Basic-Types.html#gint" title="gint"><span class="returnvalue">gint</span></a> count,
175 <span class="returnvalue">time_t</span> stamp,
176 <a class="link" href="glib-Error-Reporting.html#GError" title="GError"><span class="returnvalue">GError</span></a> **error);
177 <span class="returnvalue">void</span> <a class="link" href="glib-Bookmark-file-parser.html#g-bookmark-file-add-group" title="g_bookmark_file_add_group ()">g_bookmark_file_add_group</a> (<a class="link" href="glib-Bookmark-file-parser.html#GBookmarkFile" title="GBookmarkFile"><span class="returnvalue">GBookmarkFile</span></a> *bookmark,
178 const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> *uri,
179 const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> *group);
180 <span class="returnvalue">void</span> <a class="link" href="glib-Bookmark-file-parser.html#g-bookmark-file-add-application" title="g_bookmark_file_add_application ()">g_bookmark_file_add_application</a> (<a class="link" href="glib-Bookmark-file-parser.html#GBookmarkFile" title="GBookmarkFile"><span class="returnvalue">GBookmarkFile</span></a> *bookmark,
181 const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> *uri,
182 const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> *name,
183 const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> *exec);
184 <a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="glib-Bookmark-file-parser.html#g-bookmark-file-remove-group" title="g_bookmark_file_remove_group ()">g_bookmark_file_remove_group</a> (<a class="link" href="glib-Bookmark-file-parser.html#GBookmarkFile" title="GBookmarkFile"><span class="returnvalue">GBookmarkFile</span></a> *bookmark,
185 const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> *uri,
186 const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> *group,
187 <a class="link" href="glib-Error-Reporting.html#GError" title="GError"><span class="returnvalue">GError</span></a> **error);
188 <a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="glib-Bookmark-file-parser.html#g-bookmark-file-remove-application" title="g_bookmark_file_remove_application ()">g_bookmark_file_remove_application</a> (<a class="link" href="glib-Bookmark-file-parser.html#GBookmarkFile" title="GBookmarkFile"><span class="returnvalue">GBookmarkFile</span></a> *bookmark,
189 const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> *uri,
190 const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> *name,
191 <a class="link" href="glib-Error-Reporting.html#GError" title="GError"><span class="returnvalue">GError</span></a> **error);
192 <a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="glib-Bookmark-file-parser.html#g-bookmark-file-remove-item" title="g_bookmark_file_remove_item ()">g_bookmark_file_remove_item</a> (<a class="link" href="glib-Bookmark-file-parser.html#GBookmarkFile" title="GBookmarkFile"><span class="returnvalue">GBookmarkFile</span></a> *bookmark,
193 const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> *uri,
194 <a class="link" href="glib-Error-Reporting.html#GError" title="GError"><span class="returnvalue">GError</span></a> **error);
195 <a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="glib-Bookmark-file-parser.html#g-bookmark-file-move-item" title="g_bookmark_file_move_item ()">g_bookmark_file_move_item</a> (<a class="link" href="glib-Bookmark-file-parser.html#GBookmarkFile" title="GBookmarkFile"><span class="returnvalue">GBookmarkFile</span></a> *bookmark,
196 const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> *old_uri,
197 const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> *new_uri,
198 <a class="link" href="glib-Error-Reporting.html#GError" title="GError"><span class="returnvalue">GError</span></a> **error);
201 <div class="refsect1" title="Description">
202 <a name="glib-Bookmark-file-parser.description"></a><h2>Description</h2>
204 <a class="link" href="glib-Bookmark-file-parser.html#GBookmarkFile" title="GBookmarkFile"><span class="type">GBookmarkFile</span></a> lets you parse, edit or create files containing bookmarks
205 to URI, along with some meta-data about the resource pointed by the URI like
206 its MIME type, the application that is registering the bookmark and the
207 icon that should be used to represent the bookmark. The data is stored using
209 <a class="ulink" href="http://www.gnome.org/~ebassi/bookmark-spec" target="_top">Desktop Bookmark
213 The syntax of the bookmark files is described in detail inside the Desktop
214 Bookmark Specification, here is a quick summary: bookmark files use a sub-class
216 <a class="ulink" href="" target="_top">XML Bookmark Exchange Language</a> specification, consisting
217 of valid UTF-8 encoded XML, under the <code class="literal">xbel</code> root element;
218 each bookmark is stored inside a <code class="literal">bookmark</code> element, using
219 its URI: no relative paths can be used inside a bookmark file. The bookmark
220 may have a user defined title and description, to be used instead of the URI.
221 Under the <code class="literal">metadata</code> element, with its <code class="literal">owner</code>
222 attribute set to <code class="literal">http://freedesktop.org</code>, is stored the
223 meta-data about a resource pointed by its URI. The meta-data consists of
224 the resource's MIME type; the applications that have registered a bookmark;
225 the groups to which a bookmark belongs to; a visibility flag, used to set
226 the bookmark as "private" to the applications and groups that has it
227 registered; the URI and MIME type of an icon, to be used when displaying the
228 bookmark inside a GUI.
230 <div class="informalexample"><pre class="programlisting">
232 <?xml version="1.0"?>
233 <!DOCTYPE xbel PUBLIC
234 "+//IDN python.org//DTD XML Bookmark Exchange Language 1.0//EN//XML"
235 "http://www.python.org/topics/xml/dtds/xbel-1.0.dtd">
236 <xbel version="1.0"
237 xmlns:mime="http://www.freedesktop.org/standards/shared-mime-info"
238 xmlns:bookmark="http://www.freedesktop.org/standards/desktop-bookmarks">
239 <bookmark href="file:///home/ebassi/bookmark-spec/bookmark-spec.xml">
240 <title>Desktop Bookmarks Spec</title>
242 <metadata owner="http://freedesktop.org">
243 <mime:mime-type>text/xml</mime:mime-type>
244 <bookmark:applications>
245 <bookmark:application name="GEdit" count="2" exec="gedit %u" timestamp="1115726763"/>
246 <bookmark:application name="GViM" count="7" exec="gvim %f" timestamp="1115726812"/>
247 </bookmark:applications>
248 <bookmark:groups>
249 <bookmark:group>Editors</bookmark:group>
250 </bookmark:groups>
258 A bookmark file might contain more than one bookmark; each bookmark is accessed
262 The important caveat of bookmark files is that when you add a new bookmark you
263 must also add the application that is registering it, using
264 <a class="link" href="glib-Bookmark-file-parser.html#g-bookmark-file-add-application" title="g_bookmark_file_add_application ()"><code class="function">g_bookmark_file_add_application()</code></a> or <a class="link" href="glib-Bookmark-file-parser.html#g-bookmark-file-set-app-info" title="g_bookmark_file_set_app_info ()"><code class="function">g_bookmark_file_set_app_info()</code></a>. If a
265 bookmark has no applications then it won't be dumped when creating the
266 on disk representation, using <a class="link" href="glib-Bookmark-file-parser.html#g-bookmark-file-to-data" title="g_bookmark_file_to_data ()"><code class="function">g_bookmark_file_to_data()</code></a> or
267 <a class="link" href="glib-Bookmark-file-parser.html#g-bookmark-file-to-file" title="g_bookmark_file_to_file ()"><code class="function">g_bookmark_file_to_file()</code></a>.
270 The <a class="link" href="glib-Bookmark-file-parser.html#GBookmarkFile" title="GBookmarkFile"><span class="type">GBookmarkFile</span></a> parser was added in GLib 2.12.
273 <div class="refsect1" title="Details">
274 <a name="glib-Bookmark-file-parser.details"></a><h2>Details</h2>
275 <div class="refsect2" title="GBookmarkFile">
276 <a name="GBookmarkFile"></a><h3>GBookmarkFile</h3>
277 <pre class="programlisting">typedef struct _GBookmarkFile GBookmarkFile;</pre>
279 The <span class="structname">GBookmarkFile</span> struct contains only private data
280 and should not be used directly.
284 <div class="refsect2" title="G_BOOKMARK_FILE_ERROR">
285 <a name="G-BOOKMARK-FILE-ERROR:CAPS"></a><h3>G_BOOKMARK_FILE_ERROR</h3>
286 <pre class="programlisting">#define G_BOOKMARK_FILE_ERROR (g_bookmark_file_error_quark ())
289 Error domain for bookmark file parsing. Errors in this domain will be
290 from the <a class="link" href="glib-Bookmark-file-parser.html#GBookmarkFileError" title="enum GBookmarkFileError"><span class="type">GBookmarkFileError</span></a> enumeration. See <a class="link" href="glib-Error-Reporting.html#GError" title="GError"><span class="type">GError</span></a> for informations
295 <div class="refsect2" title="enum GBookmarkFileError">
296 <a name="GBookmarkFileError"></a><h3>enum GBookmarkFileError</h3>
297 <pre class="programlisting">typedef enum
299 G_BOOKMARK_FILE_ERROR_INVALID_URI,
300 G_BOOKMARK_FILE_ERROR_INVALID_VALUE,
301 G_BOOKMARK_FILE_ERROR_APP_NOT_REGISTERED,
302 G_BOOKMARK_FILE_ERROR_URI_NOT_FOUND,
303 G_BOOKMARK_FILE_ERROR_READ,
304 G_BOOKMARK_FILE_ERROR_UNKNOWN_ENCODING,
305 G_BOOKMARK_FILE_ERROR_WRITE,
306 G_BOOKMARK_FILE_ERROR_FILE_NOT_FOUND
307 } GBookmarkFileError;
310 Error codes returned by bookmark file parsing.
312 <div class="variablelist"><table border="0">
313 <col align="left" valign="top">
316 <td><p><a name="G-BOOKMARK-FILE-ERROR-INVALID-URI:CAPS"></a><span class="term"><code class="literal">G_BOOKMARK_FILE_ERROR_INVALID_URI</code></span></p></td>
317 <td>URI was ill-formed
321 <td><p><a name="G-BOOKMARK-FILE-ERROR-INVALID-VALUE:CAPS"></a><span class="term"><code class="literal">G_BOOKMARK_FILE_ERROR_INVALID_VALUE</code></span></p></td>
322 <td>a requested field was not found
326 <td><p><a name="G-BOOKMARK-FILE-ERROR-APP-NOT-REGISTERED:CAPS"></a><span class="term"><code class="literal">G_BOOKMARK_FILE_ERROR_APP_NOT_REGISTERED</code></span></p></td>
327 <td>a requested application did not
332 <td><p><a name="G-BOOKMARK-FILE-ERROR-URI-NOT-FOUND:CAPS"></a><span class="term"><code class="literal">G_BOOKMARK_FILE_ERROR_URI_NOT_FOUND</code></span></p></td>
333 <td>a requested URI was not found
337 <td><p><a name="G-BOOKMARK-FILE-ERROR-READ:CAPS"></a><span class="term"><code class="literal">G_BOOKMARK_FILE_ERROR_READ</code></span></p></td>
338 <td>document was ill formed
342 <td><p><a name="G-BOOKMARK-FILE-ERROR-UNKNOWN-ENCODING:CAPS"></a><span class="term"><code class="literal">G_BOOKMARK_FILE_ERROR_UNKNOWN_ENCODING</code></span></p></td>
343 <td>the text being parsed was in an
348 <td><p><a name="G-BOOKMARK-FILE-ERROR-WRITE:CAPS"></a><span class="term"><code class="literal">G_BOOKMARK_FILE_ERROR_WRITE</code></span></p></td>
349 <td>an error occurred while writing
353 <td><p><a name="G-BOOKMARK-FILE-ERROR-FILE-NOT-FOUND:CAPS"></a><span class="term"><code class="literal">G_BOOKMARK_FILE_ERROR_FILE_NOT_FOUND</code></span></p></td>
354 <td>requested file was not found
361 <div class="refsect2" title="g_bookmark_file_new ()">
362 <a name="g-bookmark-file-new"></a><h3>g_bookmark_file_new ()</h3>
363 <pre class="programlisting"><a class="link" href="glib-Bookmark-file-parser.html#GBookmarkFile" title="GBookmarkFile"><span class="returnvalue">GBookmarkFile</span></a> * g_bookmark_file_new (void);</pre>
365 Creates a new empty <a class="link" href="glib-Bookmark-file-parser.html#GBookmarkFile" title="GBookmarkFile"><span class="type">GBookmarkFile</span></a> object.
368 Use <a class="link" href="glib-Bookmark-file-parser.html#g-bookmark-file-load-from-file" title="g_bookmark_file_load_from_file ()"><code class="function">g_bookmark_file_load_from_file()</code></a>, <a class="link" href="glib-Bookmark-file-parser.html#g-bookmark-file-load-from-data" title="g_bookmark_file_load_from_data ()"><code class="function">g_bookmark_file_load_from_data()</code></a>
369 or <a class="link" href="glib-Bookmark-file-parser.html#g-bookmark-file-load-from-data-dirs" title="g_bookmark_file_load_from_data_dirs ()"><code class="function">g_bookmark_file_load_from_data_dirs()</code></a> to read an existing bookmark
371 <div class="variablelist"><table border="0">
372 <col align="left" valign="top">
374 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
375 <td> an empty <a class="link" href="glib-Bookmark-file-parser.html#GBookmarkFile" title="GBookmarkFile"><span class="type">GBookmarkFile</span></a>
380 <p class="since">Since 2.12</p>
383 <div class="refsect2" title="g_bookmark_file_free ()">
384 <a name="g-bookmark-file-free"></a><h3>g_bookmark_file_free ()</h3>
385 <pre class="programlisting"><span class="returnvalue">void</span> g_bookmark_file_free (<a class="link" href="glib-Bookmark-file-parser.html#GBookmarkFile" title="GBookmarkFile"><span class="returnvalue">GBookmarkFile</span></a> *bookmark);</pre>
387 Frees a <a class="link" href="glib-Bookmark-file-parser.html#GBookmarkFile" title="GBookmarkFile"><span class="type">GBookmarkFile</span></a>.</p>
388 <div class="variablelist"><table border="0">
389 <col align="left" valign="top">
391 <td><p><span class="term"><em class="parameter"><code>bookmark</code></em> :</span></p></td>
392 <td> a <a class="link" href="glib-Bookmark-file-parser.html#GBookmarkFile" title="GBookmarkFile"><span class="type">GBookmarkFile</span></a>
396 <p class="since">Since 2.12</p>
399 <div class="refsect2" title="g_bookmark_file_load_from_file ()">
400 <a name="g-bookmark-file-load-from-file"></a><h3>g_bookmark_file_load_from_file ()</h3>
401 <pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean"><span class="returnvalue">gboolean</span></a> g_bookmark_file_load_from_file (<a class="link" href="glib-Bookmark-file-parser.html#GBookmarkFile" title="GBookmarkFile"><span class="returnvalue">GBookmarkFile</span></a> *bookmark,
402 const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> *filename,
403 <a class="link" href="glib-Error-Reporting.html#GError" title="GError"><span class="returnvalue">GError</span></a> **error);</pre>
405 Loads a desktop bookmark file into an empty <a class="link" href="glib-Bookmark-file-parser.html#GBookmarkFile" title="GBookmarkFile"><span class="type">GBookmarkFile</span></a> structure.
406 If the file could not be loaded then <em class="parameter"><code>error</code></em> is set to either a <a class="link" href="glib-File-Utilities.html#GFileError" title="enum GFileError"><span class="type">GFileError</span></a>
407 or <a class="link" href="glib-Bookmark-file-parser.html#GBookmarkFileError" title="enum GBookmarkFileError"><span class="type">GBookmarkFileError</span></a>.</p>
408 <div class="variablelist"><table border="0">
409 <col align="left" valign="top">
412 <td><p><span class="term"><em class="parameter"><code>bookmark</code></em> :</span></p></td>
413 <td> an empty <a class="link" href="glib-Bookmark-file-parser.html#GBookmarkFile" title="GBookmarkFile"><span class="type">GBookmarkFile</span></a> struct
417 <td><p><span class="term"><em class="parameter"><code>filename</code></em> :</span></p></td>
418 <td> the path of a filename to load, in the GLib file name encoding
422 <td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
423 <td> return location for a <a class="link" href="glib-Error-Reporting.html#GError" title="GError"><span class="type">GError</span></a>, or <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a>
427 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
428 <td> <a class="link" href="glib-Standard-Macros.html#TRUE:CAPS" title="TRUE"><code class="literal">TRUE</code></a> if a desktop bookmark file could be loaded
434 <p class="since">Since 2.12</p>
437 <div class="refsect2" title="g_bookmark_file_load_from_data ()">
438 <a name="g-bookmark-file-load-from-data"></a><h3>g_bookmark_file_load_from_data ()</h3>
439 <pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean"><span class="returnvalue">gboolean</span></a> g_bookmark_file_load_from_data (<a class="link" href="glib-Bookmark-file-parser.html#GBookmarkFile" title="GBookmarkFile"><span class="returnvalue">GBookmarkFile</span></a> *bookmark,
440 const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> *data,
441 <a class="link" href="glib-Basic-Types.html#gsize" title="gsize"><span class="returnvalue">gsize</span></a> length,
442 <a class="link" href="glib-Error-Reporting.html#GError" title="GError"><span class="returnvalue">GError</span></a> **error);</pre>
444 Loads a bookmark file from memory into an empty <a class="link" href="glib-Bookmark-file-parser.html#GBookmarkFile" title="GBookmarkFile"><span class="type">GBookmarkFile</span></a>
445 structure. If the object cannot be created then <em class="parameter"><code>error</code></em> is set to a
446 <a class="link" href="glib-Bookmark-file-parser.html#GBookmarkFileError" title="enum GBookmarkFileError"><span class="type">GBookmarkFileError</span></a>.</p>
447 <div class="variablelist"><table border="0">
448 <col align="left" valign="top">
451 <td><p><span class="term"><em class="parameter"><code>bookmark</code></em> :</span></p></td>
452 <td> an empty <a class="link" href="glib-Bookmark-file-parser.html#GBookmarkFile" title="GBookmarkFile"><span class="type">GBookmarkFile</span></a> struct
456 <td><p><span class="term"><em class="parameter"><code>data</code></em> :</span></p></td>
457 <td> desktop bookmarks loaded in memory
461 <td><p><span class="term"><em class="parameter"><code>length</code></em> :</span></p></td>
462 <td> the length of <em class="parameter"><code>data</code></em> in bytes
466 <td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
467 <td> return location for a <a class="link" href="glib-Error-Reporting.html#GError" title="GError"><span class="type">GError</span></a>, or <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a>
471 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
472 <td> <a class="link" href="glib-Standard-Macros.html#TRUE:CAPS" title="TRUE"><code class="literal">TRUE</code></a> if a desktop bookmark could be loaded.
478 <p class="since">Since 2.12</p>
481 <div class="refsect2" title="g_bookmark_file_load_from_data_dirs ()">
482 <a name="g-bookmark-file-load-from-data-dirs"></a><h3>g_bookmark_file_load_from_data_dirs ()</h3>
483 <pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean"><span class="returnvalue">gboolean</span></a> g_bookmark_file_load_from_data_dirs (<a class="link" href="glib-Bookmark-file-parser.html#GBookmarkFile" title="GBookmarkFile"><span class="returnvalue">GBookmarkFile</span></a> *bookmark,
484 const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> *file,
485 <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> **full_path,
486 <a class="link" href="glib-Error-Reporting.html#GError" title="GError"><span class="returnvalue">GError</span></a> **error);</pre>
488 This function looks for a desktop bookmark file named <em class="parameter"><code>file</code></em> in the
489 paths returned from <a class="link" href="glib-Miscellaneous-Utility-Functions.html#g-get-user-data-dir" title="g_get_user_data_dir ()"><code class="function">g_get_user_data_dir()</code></a> and <a class="link" href="glib-Miscellaneous-Utility-Functions.html#g-get-system-data-dirs" title="g_get_system_data_dirs ()"><code class="function">g_get_system_data_dirs()</code></a>,
490 loads the file into <em class="parameter"><code>bookmark</code></em> and returns the file's full path in
491 <em class="parameter"><code>full_path</code></em>. If the file could not be loaded then an <code class="literal">error</code> is
492 set to either a <a class="link" href="glib-File-Utilities.html#GFileError" title="enum GFileError"><span class="type">GFileError</span></a> or <a class="link" href="glib-Bookmark-file-parser.html#GBookmarkFileError" title="enum GBookmarkFileError"><span class="type">GBookmarkFileError</span></a>.</p>
493 <div class="variablelist"><table border="0">
494 <col align="left" valign="top">
497 <td><p><span class="term"><em class="parameter"><code>bookmark</code></em> :</span></p></td>
498 <td> a <a class="link" href="glib-Bookmark-file-parser.html#GBookmarkFile" title="GBookmarkFile"><span class="type">GBookmarkFile</span></a>
502 <td><p><span class="term"><em class="parameter"><code>file</code></em> :</span></p></td>
503 <td> a relative path to a filename to open and parse
507 <td><p><span class="term"><em class="parameter"><code>full_path</code></em> :</span></p></td>
508 <td> return location for a string containing the full path
509 of the file, or <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a>
513 <td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
514 <td> return location for a <a class="link" href="glib-Error-Reporting.html#GError" title="GError"><span class="type">GError</span></a>, or <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a>
518 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
519 <td> <a class="link" href="glib-Standard-Macros.html#TRUE:CAPS" title="TRUE"><code class="literal">TRUE</code></a> if a key file could be loaded, <a class="link" href="glib-Standard-Macros.html#FALSE:CAPS" title="FALSE"><code class="literal">FALSE</code></a> othewise
525 <p class="since">Since 2.12</p>
528 <div class="refsect2" title="g_bookmark_file_to_data ()">
529 <a name="g-bookmark-file-to-data"></a><h3>g_bookmark_file_to_data ()</h3>
530 <pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> * g_bookmark_file_to_data (<a class="link" href="glib-Bookmark-file-parser.html#GBookmarkFile" title="GBookmarkFile"><span class="returnvalue">GBookmarkFile</span></a> *bookmark,
531 <a class="link" href="glib-Basic-Types.html#gsize" title="gsize"><span class="returnvalue">gsize</span></a> *length,
532 <a class="link" href="glib-Error-Reporting.html#GError" title="GError"><span class="returnvalue">GError</span></a> **error);</pre>
534 This function outputs <em class="parameter"><code>bookmark</code></em> as a string.</p>
535 <div class="variablelist"><table border="0">
536 <col align="left" valign="top">
539 <td><p><span class="term"><em class="parameter"><code>bookmark</code></em> :</span></p></td>
540 <td> a <a class="link" href="glib-Bookmark-file-parser.html#GBookmarkFile" title="GBookmarkFile"><span class="type">GBookmarkFile</span></a>
544 <td><p><span class="term"><em class="parameter"><code>length</code></em> :</span></p></td>
545 <td> return location for the length of the returned string, or <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a>
549 <td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
550 <td> return location for a <a class="link" href="glib-Error-Reporting.html#GError" title="GError"><span class="type">GError</span></a>, or <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a>
554 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
555 <td> a newly allocated string holding
556 the contents of the <a class="link" href="glib-Bookmark-file-parser.html#GBookmarkFile" title="GBookmarkFile"><span class="type">GBookmarkFile</span></a>
562 <p class="since">Since 2.12</p>
565 <div class="refsect2" title="g_bookmark_file_to_file ()">
566 <a name="g-bookmark-file-to-file"></a><h3>g_bookmark_file_to_file ()</h3>
567 <pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean"><span class="returnvalue">gboolean</span></a> g_bookmark_file_to_file (<a class="link" href="glib-Bookmark-file-parser.html#GBookmarkFile" title="GBookmarkFile"><span class="returnvalue">GBookmarkFile</span></a> *bookmark,
568 const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> *filename,
569 <a class="link" href="glib-Error-Reporting.html#GError" title="GError"><span class="returnvalue">GError</span></a> **error);</pre>
571 This function outputs <em class="parameter"><code>bookmark</code></em> into a file. The write process is
572 guaranteed to be atomic by using <a class="link" href="glib-File-Utilities.html#g-file-set-contents" title="g_file_set_contents ()"><code class="function">g_file_set_contents()</code></a> internally.</p>
573 <div class="variablelist"><table border="0">
574 <col align="left" valign="top">
577 <td><p><span class="term"><em class="parameter"><code>bookmark</code></em> :</span></p></td>
578 <td> a <a class="link" href="glib-Bookmark-file-parser.html#GBookmarkFile" title="GBookmarkFile"><span class="type">GBookmarkFile</span></a>
582 <td><p><span class="term"><em class="parameter"><code>filename</code></em> :</span></p></td>
583 <td> path of the output file
587 <td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
588 <td> return location for a <a class="link" href="glib-Error-Reporting.html#GError" title="GError"><span class="type">GError</span></a>, or <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a>
592 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
593 <td> <a class="link" href="glib-Standard-Macros.html#TRUE:CAPS" title="TRUE"><code class="literal">TRUE</code></a> if the file was successfully written.
599 <p class="since">Since 2.12</p>
602 <div class="refsect2" title="g_bookmark_file_has_item ()">
603 <a name="g-bookmark-file-has-item"></a><h3>g_bookmark_file_has_item ()</h3>
604 <pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean"><span class="returnvalue">gboolean</span></a> g_bookmark_file_has_item (<a class="link" href="glib-Bookmark-file-parser.html#GBookmarkFile" title="GBookmarkFile"><span class="returnvalue">GBookmarkFile</span></a> *bookmark,
605 const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> *uri);</pre>
607 Looks whether the desktop bookmark has an item with its URI set to <em class="parameter"><code>uri</code></em>.</p>
608 <div class="variablelist"><table border="0">
609 <col align="left" valign="top">
612 <td><p><span class="term"><em class="parameter"><code>bookmark</code></em> :</span></p></td>
613 <td> a <a class="link" href="glib-Bookmark-file-parser.html#GBookmarkFile" title="GBookmarkFile"><span class="type">GBookmarkFile</span></a>
617 <td><p><span class="term"><em class="parameter"><code>uri</code></em> :</span></p></td>
622 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
623 <td> <a class="link" href="glib-Standard-Macros.html#TRUE:CAPS" title="TRUE"><code class="literal">TRUE</code></a> if <em class="parameter"><code>uri</code></em> is inside <em class="parameter"><code>bookmark</code></em>, <a class="link" href="glib-Standard-Macros.html#FALSE:CAPS" title="FALSE"><code class="literal">FALSE</code></a> otherwise
629 <p class="since">Since 2.12</p>
632 <div class="refsect2" title="g_bookmark_file_has_group ()">
633 <a name="g-bookmark-file-has-group"></a><h3>g_bookmark_file_has_group ()</h3>
634 <pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean"><span class="returnvalue">gboolean</span></a> g_bookmark_file_has_group (<a class="link" href="glib-Bookmark-file-parser.html#GBookmarkFile" title="GBookmarkFile"><span class="returnvalue">GBookmarkFile</span></a> *bookmark,
635 const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> *uri,
636 const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> *group,
637 <a class="link" href="glib-Error-Reporting.html#GError" title="GError"><span class="returnvalue">GError</span></a> **error);</pre>
639 Checks whether <em class="parameter"><code>group</code></em> appears in the list of groups to which
640 the bookmark for <em class="parameter"><code>uri</code></em> belongs to.
643 In the event the URI cannot be found, <a class="link" href="glib-Standard-Macros.html#FALSE:CAPS" title="FALSE"><code class="literal">FALSE</code></a> is returned and
644 <em class="parameter"><code>error</code></em> is set to <a class="link" href="glib-Bookmark-file-parser.html#G-BOOKMARK-FILE-ERROR-URI-NOT-FOUND:CAPS"><span class="type">G_BOOKMARK_FILE_ERROR_URI_NOT_FOUND</span></a>.</p>
645 <div class="variablelist"><table border="0">
646 <col align="left" valign="top">
649 <td><p><span class="term"><em class="parameter"><code>bookmark</code></em> :</span></p></td>
650 <td> a <a class="link" href="glib-Bookmark-file-parser.html#GBookmarkFile" title="GBookmarkFile"><span class="type">GBookmarkFile</span></a>
654 <td><p><span class="term"><em class="parameter"><code>uri</code></em> :</span></p></td>
659 <td><p><span class="term"><em class="parameter"><code>group</code></em> :</span></p></td>
660 <td> the group name to be searched
664 <td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
665 <td> return location for a <a class="link" href="glib-Error-Reporting.html#GError" title="GError"><span class="type">GError</span></a>, or <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a>
669 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
670 <td> <a class="link" href="glib-Standard-Macros.html#TRUE:CAPS" title="TRUE"><code class="literal">TRUE</code></a> if <em class="parameter"><code>group</code></em> was found.
676 <p class="since">Since 2.12</p>
679 <div class="refsect2" title="g_bookmark_file_has_application ()">
680 <a name="g-bookmark-file-has-application"></a><h3>g_bookmark_file_has_application ()</h3>
681 <pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean"><span class="returnvalue">gboolean</span></a> g_bookmark_file_has_application (<a class="link" href="glib-Bookmark-file-parser.html#GBookmarkFile" title="GBookmarkFile"><span class="returnvalue">GBookmarkFile</span></a> *bookmark,
682 const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> *uri,
683 const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> *name,
684 <a class="link" href="glib-Error-Reporting.html#GError" title="GError"><span class="returnvalue">GError</span></a> **error);</pre>
686 Checks whether the bookmark for <em class="parameter"><code>uri</code></em> inside <em class="parameter"><code>bookmark</code></em> has been
687 registered by application <em class="parameter"><code>name</code></em>.
690 In the event the URI cannot be found, <a class="link" href="glib-Standard-Macros.html#FALSE:CAPS" title="FALSE"><code class="literal">FALSE</code></a> is returned and
691 <em class="parameter"><code>error</code></em> is set to <a class="link" href="glib-Bookmark-file-parser.html#G-BOOKMARK-FILE-ERROR-URI-NOT-FOUND:CAPS"><span class="type">G_BOOKMARK_FILE_ERROR_URI_NOT_FOUND</span></a>.</p>
692 <div class="variablelist"><table border="0">
693 <col align="left" valign="top">
696 <td><p><span class="term"><em class="parameter"><code>bookmark</code></em> :</span></p></td>
697 <td> a <a class="link" href="glib-Bookmark-file-parser.html#GBookmarkFile" title="GBookmarkFile"><span class="type">GBookmarkFile</span></a>
701 <td><p><span class="term"><em class="parameter"><code>uri</code></em> :</span></p></td>
706 <td><p><span class="term"><em class="parameter"><code>name</code></em> :</span></p></td>
707 <td> the name of the application
711 <td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
712 <td> return location for a <a class="link" href="glib-Error-Reporting.html#GError" title="GError"><span class="type">GError</span></a> or <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a>
716 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
717 <td> <a class="link" href="glib-Standard-Macros.html#TRUE:CAPS" title="TRUE"><code class="literal">TRUE</code></a> if the application <em class="parameter"><code>name</code></em> was found
723 <p class="since">Since 2.12</p>
726 <div class="refsect2" title="g_bookmark_file_get_size ()">
727 <a name="g-bookmark-file-get-size"></a><h3>g_bookmark_file_get_size ()</h3>
728 <pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gint" title="gint"><span class="returnvalue">gint</span></a> g_bookmark_file_get_size (<a class="link" href="glib-Bookmark-file-parser.html#GBookmarkFile" title="GBookmarkFile"><span class="returnvalue">GBookmarkFile</span></a> *bookmark);</pre>
730 Gets the number of bookmarks inside <em class="parameter"><code>bookmark</code></em>.</p>
731 <div class="variablelist"><table border="0">
732 <col align="left" valign="top">
735 <td><p><span class="term"><em class="parameter"><code>bookmark</code></em> :</span></p></td>
736 <td> a <a class="link" href="glib-Bookmark-file-parser.html#GBookmarkFile" title="GBookmarkFile"><span class="type">GBookmarkFile</span></a>
740 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
741 <td> the number of bookmarks
747 <p class="since">Since 2.12</p>
750 <div class="refsect2" title="g_bookmark_file_get_uris ()">
751 <a name="g-bookmark-file-get-uris"></a><h3>g_bookmark_file_get_uris ()</h3>
752 <pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> ** g_bookmark_file_get_uris (<a class="link" href="glib-Bookmark-file-parser.html#GBookmarkFile" title="GBookmarkFile"><span class="returnvalue">GBookmarkFile</span></a> *bookmark,
753 <a class="link" href="glib-Basic-Types.html#gsize" title="gsize"><span class="returnvalue">gsize</span></a> *length);</pre>
755 Returns all URIs of the bookmarks in the bookmark file <em class="parameter"><code>bookmark</code></em>.
756 The array of returned URIs will be <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a>-terminated, so <em class="parameter"><code>length</code></em> may
757 optionally be <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a>.</p>
758 <div class="variablelist"><table border="0">
759 <col align="left" valign="top">
762 <td><p><span class="term"><em class="parameter"><code>bookmark</code></em> :</span></p></td>
763 <td> a <a class="link" href="glib-Bookmark-file-parser.html#GBookmarkFile" title="GBookmarkFile"><span class="type">GBookmarkFile</span></a>
767 <td><p><span class="term"><em class="parameter"><code>length</code></em> :</span></p></td>
768 <td> return location for the number of returned URIs, or <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a>
772 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
773 <td> a newly allocated <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a>-terminated array of strings.
774 Use <a class="link" href="glib-String-Utility-Functions.html#g-strfreev" title="g_strfreev ()"><code class="function">g_strfreev()</code></a> to free it.
780 <p class="since">Since 2.12</p>
783 <div class="refsect2" title="g_bookmark_file_get_title ()">
784 <a name="g-bookmark-file-get-title"></a><h3>g_bookmark_file_get_title ()</h3>
785 <pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> * g_bookmark_file_get_title (<a class="link" href="glib-Bookmark-file-parser.html#GBookmarkFile" title="GBookmarkFile"><span class="returnvalue">GBookmarkFile</span></a> *bookmark,
786 const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> *uri,
787 <a class="link" href="glib-Error-Reporting.html#GError" title="GError"><span class="returnvalue">GError</span></a> **error);</pre>
789 Returns the title of the bookmark for <em class="parameter"><code>uri</code></em>.
792 If <em class="parameter"><code>uri</code></em> is <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a>, the title of <em class="parameter"><code>bookmark</code></em> is returned.
795 In the event the URI cannot be found, <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a> is returned and
796 <em class="parameter"><code>error</code></em> is set to <a class="link" href="glib-Bookmark-file-parser.html#G-BOOKMARK-FILE-ERROR-URI-NOT-FOUND:CAPS"><span class="type">G_BOOKMARK_FILE_ERROR_URI_NOT_FOUND</span></a>.</p>
797 <div class="variablelist"><table border="0">
798 <col align="left" valign="top">
801 <td><p><span class="term"><em class="parameter"><code>bookmark</code></em> :</span></p></td>
802 <td> a <a class="link" href="glib-Bookmark-file-parser.html#GBookmarkFile" title="GBookmarkFile"><span class="type">GBookmarkFile</span></a>
806 <td><p><span class="term"><em class="parameter"><code>uri</code></em> :</span></p></td>
807 <td> a valid URI or <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a>
811 <td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
812 <td> return location for a <a class="link" href="glib-Error-Reporting.html#GError" title="GError"><span class="type">GError</span></a>, or <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a>
816 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
817 <td> a newly allocated string or <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a> if the specified
824 <p class="since">Since 2.12</p>
827 <div class="refsect2" title="g_bookmark_file_get_description ()">
828 <a name="g-bookmark-file-get-description"></a><h3>g_bookmark_file_get_description ()</h3>
829 <pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> * g_bookmark_file_get_description (<a class="link" href="glib-Bookmark-file-parser.html#GBookmarkFile" title="GBookmarkFile"><span class="returnvalue">GBookmarkFile</span></a> *bookmark,
830 const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> *uri,
831 <a class="link" href="glib-Error-Reporting.html#GError" title="GError"><span class="returnvalue">GError</span></a> **error);</pre>
833 Retrieves the description of the bookmark for <em class="parameter"><code>uri</code></em>.
836 In the event the URI cannot be found, <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a> is returned and
837 <em class="parameter"><code>error</code></em> is set to <a class="link" href="glib-Bookmark-file-parser.html#G-BOOKMARK-FILE-ERROR-URI-NOT-FOUND:CAPS"><span class="type">G_BOOKMARK_FILE_ERROR_URI_NOT_FOUND</span></a>.</p>
838 <div class="variablelist"><table border="0">
839 <col align="left" valign="top">
842 <td><p><span class="term"><em class="parameter"><code>bookmark</code></em> :</span></p></td>
843 <td> a <a class="link" href="glib-Bookmark-file-parser.html#GBookmarkFile" title="GBookmarkFile"><span class="type">GBookmarkFile</span></a>
847 <td><p><span class="term"><em class="parameter"><code>uri</code></em> :</span></p></td>
852 <td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
853 <td> return location for a <a class="link" href="glib-Error-Reporting.html#GError" title="GError"><span class="type">GError</span></a>, or <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a>
857 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
858 <td> a newly allocated string or <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a> if the specified
865 <p class="since">Since 2.12</p>
868 <div class="refsect2" title="g_bookmark_file_get_mime_type ()">
869 <a name="g-bookmark-file-get-mime-type"></a><h3>g_bookmark_file_get_mime_type ()</h3>
870 <pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> * g_bookmark_file_get_mime_type (<a class="link" href="glib-Bookmark-file-parser.html#GBookmarkFile" title="GBookmarkFile"><span class="returnvalue">GBookmarkFile</span></a> *bookmark,
871 const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> *uri,
872 <a class="link" href="glib-Error-Reporting.html#GError" title="GError"><span class="returnvalue">GError</span></a> **error);</pre>
874 Retrieves the MIME type of the resource pointed by <em class="parameter"><code>uri</code></em>.
877 In the event the URI cannot be found, <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a> is returned and
878 <em class="parameter"><code>error</code></em> is set to <a class="link" href="glib-Bookmark-file-parser.html#G-BOOKMARK-FILE-ERROR-URI-NOT-FOUND:CAPS"><span class="type">G_BOOKMARK_FILE_ERROR_URI_NOT_FOUND</span></a>. In the
879 event that the MIME type cannot be found, <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a> is returned and
880 <em class="parameter"><code>error</code></em> is set to <a class="link" href="glib-Bookmark-file-parser.html#G-BOOKMARK-FILE-ERROR-INVALID-VALUE:CAPS"><span class="type">G_BOOKMARK_FILE_ERROR_INVALID_VALUE</span></a>.</p>
881 <div class="variablelist"><table border="0">
882 <col align="left" valign="top">
885 <td><p><span class="term"><em class="parameter"><code>bookmark</code></em> :</span></p></td>
886 <td> a <a class="link" href="glib-Bookmark-file-parser.html#GBookmarkFile" title="GBookmarkFile"><span class="type">GBookmarkFile</span></a>
890 <td><p><span class="term"><em class="parameter"><code>uri</code></em> :</span></p></td>
895 <td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
896 <td> return location for a <a class="link" href="glib-Error-Reporting.html#GError" title="GError"><span class="type">GError</span></a>, or <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a>
900 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
901 <td> a newly allocated string or <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a> if the specified
908 <p class="since">Since 2.12</p>
911 <div class="refsect2" title="g_bookmark_file_get_is_private ()">
912 <a name="g-bookmark-file-get-is-private"></a><h3>g_bookmark_file_get_is_private ()</h3>
913 <pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean"><span class="returnvalue">gboolean</span></a> g_bookmark_file_get_is_private (<a class="link" href="glib-Bookmark-file-parser.html#GBookmarkFile" title="GBookmarkFile"><span class="returnvalue">GBookmarkFile</span></a> *bookmark,
914 const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> *uri,
915 <a class="link" href="glib-Error-Reporting.html#GError" title="GError"><span class="returnvalue">GError</span></a> **error);</pre>
917 Gets whether the private flag of the bookmark for <em class="parameter"><code>uri</code></em> is set.
920 In the event the URI cannot be found, <a class="link" href="glib-Standard-Macros.html#FALSE:CAPS" title="FALSE"><code class="literal">FALSE</code></a> is returned and
921 <em class="parameter"><code>error</code></em> is set to <a class="link" href="glib-Bookmark-file-parser.html#G-BOOKMARK-FILE-ERROR-URI-NOT-FOUND:CAPS"><span class="type">G_BOOKMARK_FILE_ERROR_URI_NOT_FOUND</span></a>. In the
922 event that the private flag cannot be found, <a class="link" href="glib-Standard-Macros.html#FALSE:CAPS" title="FALSE"><code class="literal">FALSE</code></a> is returned and
923 <em class="parameter"><code>error</code></em> is set to <a class="link" href="glib-Bookmark-file-parser.html#G-BOOKMARK-FILE-ERROR-INVALID-VALUE:CAPS"><span class="type">G_BOOKMARK_FILE_ERROR_INVALID_VALUE</span></a>.</p>
924 <div class="variablelist"><table border="0">
925 <col align="left" valign="top">
928 <td><p><span class="term"><em class="parameter"><code>bookmark</code></em> :</span></p></td>
929 <td> a <a class="link" href="glib-Bookmark-file-parser.html#GBookmarkFile" title="GBookmarkFile"><span class="type">GBookmarkFile</span></a>
933 <td><p><span class="term"><em class="parameter"><code>uri</code></em> :</span></p></td>
938 <td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
939 <td> return location for a <a class="link" href="glib-Error-Reporting.html#GError" title="GError"><span class="type">GError</span></a>, or <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a>
943 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
944 <td> <a class="link" href="glib-Standard-Macros.html#TRUE:CAPS" title="TRUE"><code class="literal">TRUE</code></a> if the private flag is set, <a class="link" href="glib-Standard-Macros.html#FALSE:CAPS" title="FALSE"><code class="literal">FALSE</code></a> otherwise.
950 <p class="since">Since 2.12</p>
953 <div class="refsect2" title="g_bookmark_file_get_icon ()">
954 <a name="g-bookmark-file-get-icon"></a><h3>g_bookmark_file_get_icon ()</h3>
955 <pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean"><span class="returnvalue">gboolean</span></a> g_bookmark_file_get_icon (<a class="link" href="glib-Bookmark-file-parser.html#GBookmarkFile" title="GBookmarkFile"><span class="returnvalue">GBookmarkFile</span></a> *bookmark,
956 const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> *uri,
957 <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> **href,
958 <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> **mime_type,
959 <a class="link" href="glib-Error-Reporting.html#GError" title="GError"><span class="returnvalue">GError</span></a> **error);</pre>
961 Gets the icon of the bookmark for <em class="parameter"><code>uri</code></em>.
964 In the event the URI cannot be found, <a class="link" href="glib-Standard-Macros.html#FALSE:CAPS" title="FALSE"><code class="literal">FALSE</code></a> is returned and
965 <em class="parameter"><code>error</code></em> is set to <a class="link" href="glib-Bookmark-file-parser.html#G-BOOKMARK-FILE-ERROR-URI-NOT-FOUND:CAPS"><span class="type">G_BOOKMARK_FILE_ERROR_URI_NOT_FOUND</span></a>.</p>
966 <div class="variablelist"><table border="0">
967 <col align="left" valign="top">
970 <td><p><span class="term"><em class="parameter"><code>bookmark</code></em> :</span></p></td>
971 <td> a <a class="link" href="glib-Bookmark-file-parser.html#GBookmarkFile" title="GBookmarkFile"><span class="type">GBookmarkFile</span></a>
975 <td><p><span class="term"><em class="parameter"><code>uri</code></em> :</span></p></td>
980 <td><p><span class="term"><em class="parameter"><code>href</code></em> :</span></p></td>
981 <td> return location for the icon's location or <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a>
985 <td><p><span class="term"><em class="parameter"><code>mime_type</code></em> :</span></p></td>
986 <td> return location for the icon's MIME type or <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a>
990 <td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
991 <td> return location for a <a class="link" href="glib-Error-Reporting.html#GError" title="GError"><span class="type">GError</span></a> or <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a>
995 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
996 <td> <a class="link" href="glib-Standard-Macros.html#TRUE:CAPS" title="TRUE"><code class="literal">TRUE</code></a> if the icon for the bookmark for the URI was found.
997 You should free the returned strings.
1003 <p class="since">Since 2.12</p>
1006 <div class="refsect2" title="g_bookmark_file_get_added ()">
1007 <a name="g-bookmark-file-get-added"></a><h3>g_bookmark_file_get_added ()</h3>
1008 <pre class="programlisting"><span class="returnvalue">time_t</span> g_bookmark_file_get_added (<a class="link" href="glib-Bookmark-file-parser.html#GBookmarkFile" title="GBookmarkFile"><span class="returnvalue">GBookmarkFile</span></a> *bookmark,
1009 const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> *uri,
1010 <a class="link" href="glib-Error-Reporting.html#GError" title="GError"><span class="returnvalue">GError</span></a> **error);</pre>
1012 Gets the time the bookmark for <em class="parameter"><code>uri</code></em> was added to <em class="parameter"><code>bookmark</code></em>
1015 In the event the URI cannot be found, -1 is returned and
1016 <em class="parameter"><code>error</code></em> is set to <a class="link" href="glib-Bookmark-file-parser.html#G-BOOKMARK-FILE-ERROR-URI-NOT-FOUND:CAPS"><span class="type">G_BOOKMARK_FILE_ERROR_URI_NOT_FOUND</span></a>.</p>
1017 <div class="variablelist"><table border="0">
1018 <col align="left" valign="top">
1021 <td><p><span class="term"><em class="parameter"><code>bookmark</code></em> :</span></p></td>
1022 <td> a <a class="link" href="glib-Bookmark-file-parser.html#GBookmarkFile" title="GBookmarkFile"><span class="type">GBookmarkFile</span></a>
1026 <td><p><span class="term"><em class="parameter"><code>uri</code></em> :</span></p></td>
1031 <td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
1032 <td> return location for a <a class="link" href="glib-Error-Reporting.html#GError" title="GError"><span class="type">GError</span></a>, or <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a>
1036 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
1043 <p class="since">Since 2.12</p>
1046 <div class="refsect2" title="g_bookmark_file_get_modified ()">
1047 <a name="g-bookmark-file-get-modified"></a><h3>g_bookmark_file_get_modified ()</h3>
1048 <pre class="programlisting"><span class="returnvalue">time_t</span> g_bookmark_file_get_modified (<a class="link" href="glib-Bookmark-file-parser.html#GBookmarkFile" title="GBookmarkFile"><span class="returnvalue">GBookmarkFile</span></a> *bookmark,
1049 const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> *uri,
1050 <a class="link" href="glib-Error-Reporting.html#GError" title="GError"><span class="returnvalue">GError</span></a> **error);</pre>
1052 Gets the time when the bookmark for <em class="parameter"><code>uri</code></em> was last modified.
1055 In the event the URI cannot be found, -1 is returned and
1056 <em class="parameter"><code>error</code></em> is set to <a class="link" href="glib-Bookmark-file-parser.html#G-BOOKMARK-FILE-ERROR-URI-NOT-FOUND:CAPS"><span class="type">G_BOOKMARK_FILE_ERROR_URI_NOT_FOUND</span></a>.</p>
1057 <div class="variablelist"><table border="0">
1058 <col align="left" valign="top">
1061 <td><p><span class="term"><em class="parameter"><code>bookmark</code></em> :</span></p></td>
1062 <td> a <a class="link" href="glib-Bookmark-file-parser.html#GBookmarkFile" title="GBookmarkFile"><span class="type">GBookmarkFile</span></a>
1066 <td><p><span class="term"><em class="parameter"><code>uri</code></em> :</span></p></td>
1071 <td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
1072 <td> return location for a <a class="link" href="glib-Error-Reporting.html#GError" title="GError"><span class="type">GError</span></a>, or <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a>
1076 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
1083 <p class="since">Since 2.12</p>
1086 <div class="refsect2" title="g_bookmark_file_get_visited ()">
1087 <a name="g-bookmark-file-get-visited"></a><h3>g_bookmark_file_get_visited ()</h3>
1088 <pre class="programlisting"><span class="returnvalue">time_t</span> g_bookmark_file_get_visited (<a class="link" href="glib-Bookmark-file-parser.html#GBookmarkFile" title="GBookmarkFile"><span class="returnvalue">GBookmarkFile</span></a> *bookmark,
1089 const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> *uri,
1090 <a class="link" href="glib-Error-Reporting.html#GError" title="GError"><span class="returnvalue">GError</span></a> **error);</pre>
1092 Gets the time the bookmark for <em class="parameter"><code>uri</code></em> was last visited.
1095 In the event the URI cannot be found, -1 is returned and
1096 <em class="parameter"><code>error</code></em> is set to <a class="link" href="glib-Bookmark-file-parser.html#G-BOOKMARK-FILE-ERROR-URI-NOT-FOUND:CAPS"><span class="type">G_BOOKMARK_FILE_ERROR_URI_NOT_FOUND</span></a>.</p>
1097 <div class="variablelist"><table border="0">
1098 <col align="left" valign="top">
1101 <td><p><span class="term"><em class="parameter"><code>bookmark</code></em> :</span></p></td>
1102 <td> a <a class="link" href="glib-Bookmark-file-parser.html#GBookmarkFile" title="GBookmarkFile"><span class="type">GBookmarkFile</span></a>
1106 <td><p><span class="term"><em class="parameter"><code>uri</code></em> :</span></p></td>
1111 <td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
1112 <td> return location for a <a class="link" href="glib-Error-Reporting.html#GError" title="GError"><span class="type">GError</span></a>, or <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a>
1116 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
1123 <p class="since">Since 2.12</p>
1126 <div class="refsect2" title="g_bookmark_file_get_groups ()">
1127 <a name="g-bookmark-file-get-groups"></a><h3>g_bookmark_file_get_groups ()</h3>
1128 <pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> ** g_bookmark_file_get_groups (<a class="link" href="glib-Bookmark-file-parser.html#GBookmarkFile" title="GBookmarkFile"><span class="returnvalue">GBookmarkFile</span></a> *bookmark,
1129 const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> *uri,
1130 <a class="link" href="glib-Basic-Types.html#gsize" title="gsize"><span class="returnvalue">gsize</span></a> *length,
1131 <a class="link" href="glib-Error-Reporting.html#GError" title="GError"><span class="returnvalue">GError</span></a> **error);</pre>
1133 Retrieves the list of group names of the bookmark for <em class="parameter"><code>uri</code></em>.
1136 In the event the URI cannot be found, <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a> is returned and
1137 <em class="parameter"><code>error</code></em> is set to <a class="link" href="glib-Bookmark-file-parser.html#G-BOOKMARK-FILE-ERROR-URI-NOT-FOUND:CAPS"><span class="type">G_BOOKMARK_FILE_ERROR_URI_NOT_FOUND</span></a>.
1140 The returned array is <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a> terminated, so <em class="parameter"><code>length</code></em> may optionally
1141 be <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a>.</p>
1142 <div class="variablelist"><table border="0">
1143 <col align="left" valign="top">
1146 <td><p><span class="term"><em class="parameter"><code>bookmark</code></em> :</span></p></td>
1147 <td> a <a class="link" href="glib-Bookmark-file-parser.html#GBookmarkFile" title="GBookmarkFile"><span class="type">GBookmarkFile</span></a>
1151 <td><p><span class="term"><em class="parameter"><code>uri</code></em> :</span></p></td>
1156 <td><p><span class="term"><em class="parameter"><code>length</code></em> :</span></p></td>
1157 <td> return location for the length of the returned string, or <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a>
1161 <td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
1162 <td> return location for a <a class="link" href="glib-Error-Reporting.html#GError" title="GError"><span class="type">GError</span></a>, or <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a>
1166 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
1167 <td> a newly allocated <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a>-terminated array of group names.
1168 Use <a class="link" href="glib-String-Utility-Functions.html#g-strfreev" title="g_strfreev ()"><code class="function">g_strfreev()</code></a> to free it.
1174 <p class="since">Since 2.12</p>
1177 <div class="refsect2" title="g_bookmark_file_get_applications ()">
1178 <a name="g-bookmark-file-get-applications"></a><h3>g_bookmark_file_get_applications ()</h3>
1179 <pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> ** g_bookmark_file_get_applications (<a class="link" href="glib-Bookmark-file-parser.html#GBookmarkFile" title="GBookmarkFile"><span class="returnvalue">GBookmarkFile</span></a> *bookmark,
1180 const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> *uri,
1181 <a class="link" href="glib-Basic-Types.html#gsize" title="gsize"><span class="returnvalue">gsize</span></a> *length,
1182 <a class="link" href="glib-Error-Reporting.html#GError" title="GError"><span class="returnvalue">GError</span></a> **error);</pre>
1184 Retrieves the names of the applications that have registered the
1185 bookmark for <em class="parameter"><code>uri</code></em>.
1188 In the event the URI cannot be found, <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a> is returned and
1189 <em class="parameter"><code>error</code></em> is set to <a class="link" href="glib-Bookmark-file-parser.html#G-BOOKMARK-FILE-ERROR-URI-NOT-FOUND:CAPS"><span class="type">G_BOOKMARK_FILE_ERROR_URI_NOT_FOUND</span></a>.</p>
1190 <div class="variablelist"><table border="0">
1191 <col align="left" valign="top">
1194 <td><p><span class="term"><em class="parameter"><code>bookmark</code></em> :</span></p></td>
1195 <td> a <a class="link" href="glib-Bookmark-file-parser.html#GBookmarkFile" title="GBookmarkFile"><span class="type">GBookmarkFile</span></a>
1199 <td><p><span class="term"><em class="parameter"><code>uri</code></em> :</span></p></td>
1204 <td><p><span class="term"><em class="parameter"><code>length</code></em> :</span></p></td>
1205 <td> return location of the length of the returned list, or <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a>
1209 <td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
1210 <td> return location for a <a class="link" href="glib-Error-Reporting.html#GError" title="GError"><span class="type">GError</span></a>, or <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a>
1214 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
1215 <td> a newly allocated <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a>-terminated array of strings.
1216 Use <a class="link" href="glib-String-Utility-Functions.html#g-strfreev" title="g_strfreev ()"><code class="function">g_strfreev()</code></a> to free it.
1222 <p class="since">Since 2.12</p>
1225 <div class="refsect2" title="g_bookmark_file_get_app_info ()">
1226 <a name="g-bookmark-file-get-app-info"></a><h3>g_bookmark_file_get_app_info ()</h3>
1227 <pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean"><span class="returnvalue">gboolean</span></a> g_bookmark_file_get_app_info (<a class="link" href="glib-Bookmark-file-parser.html#GBookmarkFile" title="GBookmarkFile"><span class="returnvalue">GBookmarkFile</span></a> *bookmark,
1228 const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> *uri,
1229 const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> *name,
1230 <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> **exec,
1231 <a class="link" href="glib-Basic-Types.html#guint" title="guint"><span class="returnvalue">guint</span></a> *count,
1232 <span class="returnvalue">time_t</span> *stamp,
1233 <a class="link" href="glib-Error-Reporting.html#GError" title="GError"><span class="returnvalue">GError</span></a> **error);</pre>
1235 Gets the registration informations of <em class="parameter"><code>app_name</code></em> for the bookmark for
1236 <em class="parameter"><code>uri</code></em>. See <a class="link" href="glib-Bookmark-file-parser.html#g-bookmark-file-set-app-info" title="g_bookmark_file_set_app_info ()"><code class="function">g_bookmark_file_set_app_info()</code></a> for more informations about
1240 The string returned in <em class="parameter"><code>app_exec</code></em> must be freed.
1243 In the event the URI cannot be found, <a class="link" href="glib-Standard-Macros.html#FALSE:CAPS" title="FALSE"><code class="literal">FALSE</code></a> is returned and
1244 <em class="parameter"><code>error</code></em> is set to <a class="link" href="glib-Bookmark-file-parser.html#G-BOOKMARK-FILE-ERROR-URI-NOT-FOUND:CAPS"><span class="type">G_BOOKMARK_FILE_ERROR_URI_NOT_FOUND</span></a>. In the
1245 event that no application with name <em class="parameter"><code>app_name</code></em> has registered a bookmark
1246 for <em class="parameter"><code>uri</code></em>, <a class="link" href="glib-Standard-Macros.html#FALSE:CAPS" title="FALSE"><code class="literal">FALSE</code></a> is returned and error is set to
1247 <a class="link" href="glib-Bookmark-file-parser.html#G-BOOKMARK-FILE-ERROR-APP-NOT-REGISTERED:CAPS"><span class="type">G_BOOKMARK_FILE_ERROR_APP_NOT_REGISTERED</span></a>. In the event that unquoting
1248 the command line fails, an error of the <a class="link" href="glib-Shell-related-Utilities.html#G-SHELL-ERROR:CAPS" title="G_SHELL_ERROR"><span class="type">G_SHELL_ERROR</span></a> domain is
1249 set and <a class="link" href="glib-Standard-Macros.html#FALSE:CAPS" title="FALSE"><code class="literal">FALSE</code></a> is returned.</p>
1250 <div class="variablelist"><table border="0">
1251 <col align="left" valign="top">
1254 <td><p><span class="term"><em class="parameter"><code>bookmark</code></em> :</span></p></td>
1255 <td> a <a class="link" href="glib-Bookmark-file-parser.html#GBookmarkFile" title="GBookmarkFile"><span class="type">GBookmarkFile</span></a>
1259 <td><p><span class="term"><em class="parameter"><code>uri</code></em> :</span></p></td>
1264 <td><p><span class="term"><em class="parameter"><code>name</code></em> :</span></p></td>
1265 <td> an application's name
1269 <td><p><span class="term"><em class="parameter"><code>exec</code></em> :</span></p></td>
1270 <td> location for the command line of the application, or <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a>
1274 <td><p><span class="term"><em class="parameter"><code>count</code></em> :</span></p></td>
1275 <td> return location for the registration count, or <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a>
1279 <td><p><span class="term"><em class="parameter"><code>stamp</code></em> :</span></p></td>
1280 <td> return location for the last registration time, or <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a>
1284 <td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
1285 <td> return location for a <a class="link" href="glib-Error-Reporting.html#GError" title="GError"><span class="type">GError</span></a>, or <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a>
1289 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
1290 <td> <a class="link" href="glib-Standard-Macros.html#TRUE:CAPS" title="TRUE"><code class="literal">TRUE</code></a> on success.
1296 <p class="since">Since 2.12</p>
1299 <div class="refsect2" title="g_bookmark_file_set_title ()">
1300 <a name="g-bookmark-file-set-title"></a><h3>g_bookmark_file_set_title ()</h3>
1301 <pre class="programlisting"><span class="returnvalue">void</span> g_bookmark_file_set_title (<a class="link" href="glib-Bookmark-file-parser.html#GBookmarkFile" title="GBookmarkFile"><span class="returnvalue">GBookmarkFile</span></a> *bookmark,
1302 const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> *uri,
1303 const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> *title);</pre>
1305 Sets <em class="parameter"><code>title</code></em> as the title of the bookmark for <em class="parameter"><code>uri</code></em> inside the
1306 bookmark file <em class="parameter"><code>bookmark</code></em>.
1309 If <em class="parameter"><code>uri</code></em> is <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a>, the title of <em class="parameter"><code>bookmark</code></em> is set.
1312 If a bookmark for <em class="parameter"><code>uri</code></em> cannot be found then it is created.</p>
1313 <div class="variablelist"><table border="0">
1314 <col align="left" valign="top">
1317 <td><p><span class="term"><em class="parameter"><code>bookmark</code></em> :</span></p></td>
1318 <td> a <a class="link" href="glib-Bookmark-file-parser.html#GBookmarkFile" title="GBookmarkFile"><span class="type">GBookmarkFile</span></a>
1322 <td><p><span class="term"><em class="parameter"><code>uri</code></em> :</span></p></td>
1323 <td> a valid URI or <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a>
1327 <td><p><span class="term"><em class="parameter"><code>title</code></em> :</span></p></td>
1328 <td> a UTF-8 encoded string
1333 <p class="since">Since 2.12</p>
1336 <div class="refsect2" title="g_bookmark_file_set_description ()">
1337 <a name="g-bookmark-file-set-description"></a><h3>g_bookmark_file_set_description ()</h3>
1338 <pre class="programlisting"><span class="returnvalue">void</span> g_bookmark_file_set_description (<a class="link" href="glib-Bookmark-file-parser.html#GBookmarkFile" title="GBookmarkFile"><span class="returnvalue">GBookmarkFile</span></a> *bookmark,
1339 const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> *uri,
1340 const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> *description);</pre>
1342 Sets <em class="parameter"><code>description</code></em> as the description of the bookmark for <em class="parameter"><code>uri</code></em>.
1345 If <em class="parameter"><code>uri</code></em> is <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a>, the description of <em class="parameter"><code>bookmark</code></em> is set.
1348 If a bookmark for <em class="parameter"><code>uri</code></em> cannot be found then it is created.</p>
1349 <div class="variablelist"><table border="0">
1350 <col align="left" valign="top">
1353 <td><p><span class="term"><em class="parameter"><code>bookmark</code></em> :</span></p></td>
1354 <td> a <a class="link" href="glib-Bookmark-file-parser.html#GBookmarkFile" title="GBookmarkFile"><span class="type">GBookmarkFile</span></a>
1358 <td><p><span class="term"><em class="parameter"><code>uri</code></em> :</span></p></td>
1359 <td> a valid URI or <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a>
1363 <td><p><span class="term"><em class="parameter"><code>description</code></em> :</span></p></td>
1369 <p class="since">Since 2.12</p>
1372 <div class="refsect2" title="g_bookmark_file_set_mime_type ()">
1373 <a name="g-bookmark-file-set-mime-type"></a><h3>g_bookmark_file_set_mime_type ()</h3>
1374 <pre class="programlisting"><span class="returnvalue">void</span> g_bookmark_file_set_mime_type (<a class="link" href="glib-Bookmark-file-parser.html#GBookmarkFile" title="GBookmarkFile"><span class="returnvalue">GBookmarkFile</span></a> *bookmark,
1375 const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> *uri,
1376 const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> *mime_type);</pre>
1378 Sets <em class="parameter"><code>mime_type</code></em> as the MIME type of the bookmark for <em class="parameter"><code>uri</code></em>.
1381 If a bookmark for <em class="parameter"><code>uri</code></em> cannot be found then it is created.</p>
1382 <div class="variablelist"><table border="0">
1383 <col align="left" valign="top">
1386 <td><p><span class="term"><em class="parameter"><code>bookmark</code></em> :</span></p></td>
1387 <td> a <a class="link" href="glib-Bookmark-file-parser.html#GBookmarkFile" title="GBookmarkFile"><span class="type">GBookmarkFile</span></a>
1391 <td><p><span class="term"><em class="parameter"><code>uri</code></em> :</span></p></td>
1396 <td><p><span class="term"><em class="parameter"><code>mime_type</code></em> :</span></p></td>
1402 <p class="since">Since 2.12</p>
1405 <div class="refsect2" title="g_bookmark_file_set_is_private ()">
1406 <a name="g-bookmark-file-set-is-private"></a><h3>g_bookmark_file_set_is_private ()</h3>
1407 <pre class="programlisting"><span class="returnvalue">void</span> g_bookmark_file_set_is_private (<a class="link" href="glib-Bookmark-file-parser.html#GBookmarkFile" title="GBookmarkFile"><span class="returnvalue">GBookmarkFile</span></a> *bookmark,
1408 const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> *uri,
1409 <a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean"><span class="returnvalue">gboolean</span></a> is_private);</pre>
1411 Sets the private flag of the bookmark for <em class="parameter"><code>uri</code></em>.
1414 If a bookmark for <em class="parameter"><code>uri</code></em> cannot be found then it is created.</p>
1415 <div class="variablelist"><table border="0">
1416 <col align="left" valign="top">
1419 <td><p><span class="term"><em class="parameter"><code>bookmark</code></em> :</span></p></td>
1420 <td> a <a class="link" href="glib-Bookmark-file-parser.html#GBookmarkFile" title="GBookmarkFile"><span class="type">GBookmarkFile</span></a>
1424 <td><p><span class="term"><em class="parameter"><code>uri</code></em> :</span></p></td>
1429 <td><p><span class="term"><em class="parameter"><code>is_private</code></em> :</span></p></td>
1430 <td> <a class="link" href="glib-Standard-Macros.html#TRUE:CAPS" title="TRUE"><code class="literal">TRUE</code></a> if the bookmark should be marked as private
1435 <p class="since">Since 2.12</p>
1438 <div class="refsect2" title="g_bookmark_file_set_icon ()">
1439 <a name="g-bookmark-file-set-icon"></a><h3>g_bookmark_file_set_icon ()</h3>
1440 <pre class="programlisting"><span class="returnvalue">void</span> g_bookmark_file_set_icon (<a class="link" href="glib-Bookmark-file-parser.html#GBookmarkFile" title="GBookmarkFile"><span class="returnvalue">GBookmarkFile</span></a> *bookmark,
1441 const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> *uri,
1442 const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> *href,
1443 const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> *mime_type);</pre>
1445 Sets the icon for the bookmark for <em class="parameter"><code>uri</code></em>. If <em class="parameter"><code>href</code></em> is <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a>, unsets
1446 the currently set icon. <em class="parameter"><code>href</code></em> can either be a full URL for the icon
1447 file or the icon name following the Icon Naming specification.
1450 If no bookmark for <em class="parameter"><code>uri</code></em> is found one is created.</p>
1451 <div class="variablelist"><table border="0">
1452 <col align="left" valign="top">
1455 <td><p><span class="term"><em class="parameter"><code>bookmark</code></em> :</span></p></td>
1456 <td> a <a class="link" href="glib-Bookmark-file-parser.html#GBookmarkFile" title="GBookmarkFile"><span class="type">GBookmarkFile</span></a>
1460 <td><p><span class="term"><em class="parameter"><code>uri</code></em> :</span></p></td>
1465 <td><p><span class="term"><em class="parameter"><code>href</code></em> :</span></p></td>
1466 <td> the URI of the icon for the bookmark, or <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a>
1470 <td><p><span class="term"><em class="parameter"><code>mime_type</code></em> :</span></p></td>
1471 <td> the MIME type of the icon for the bookmark
1476 <p class="since">Since 2.12</p>
1479 <div class="refsect2" title="g_bookmark_file_set_added ()">
1480 <a name="g-bookmark-file-set-added"></a><h3>g_bookmark_file_set_added ()</h3>
1481 <pre class="programlisting"><span class="returnvalue">void</span> g_bookmark_file_set_added (<a class="link" href="glib-Bookmark-file-parser.html#GBookmarkFile" title="GBookmarkFile"><span class="returnvalue">GBookmarkFile</span></a> *bookmark,
1482 const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> *uri,
1483 <span class="returnvalue">time_t</span> added);</pre>
1485 Sets the time the bookmark for <em class="parameter"><code>uri</code></em> was added into <em class="parameter"><code>bookmark</code></em>.
1488 If no bookmark for <em class="parameter"><code>uri</code></em> is found then it is created.</p>
1489 <div class="variablelist"><table border="0">
1490 <col align="left" valign="top">
1493 <td><p><span class="term"><em class="parameter"><code>bookmark</code></em> :</span></p></td>
1494 <td> a <a class="link" href="glib-Bookmark-file-parser.html#GBookmarkFile" title="GBookmarkFile"><span class="type">GBookmarkFile</span></a>
1498 <td><p><span class="term"><em class="parameter"><code>uri</code></em> :</span></p></td>
1503 <td><p><span class="term"><em class="parameter"><code>added</code></em> :</span></p></td>
1504 <td> a timestamp or -1 to use the current time
1509 <p class="since">Since 2.12</p>
1512 <div class="refsect2" title="g_bookmark_file_set_groups ()">
1513 <a name="g-bookmark-file-set-groups"></a><h3>g_bookmark_file_set_groups ()</h3>
1514 <pre class="programlisting"><span class="returnvalue">void</span> g_bookmark_file_set_groups (<a class="link" href="glib-Bookmark-file-parser.html#GBookmarkFile" title="GBookmarkFile"><span class="returnvalue">GBookmarkFile</span></a> *bookmark,
1515 const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> *uri,
1516 const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> **groups,
1517 <a class="link" href="glib-Basic-Types.html#gsize" title="gsize"><span class="returnvalue">gsize</span></a> length);</pre>
1519 Sets a list of group names for the item with URI <em class="parameter"><code>uri</code></em>. Each previously
1520 set group name list is removed.
1523 If <em class="parameter"><code>uri</code></em> cannot be found then an item for it is created.</p>
1524 <div class="variablelist"><table border="0">
1525 <col align="left" valign="top">
1528 <td><p><span class="term"><em class="parameter"><code>bookmark</code></em> :</span></p></td>
1529 <td> a <a class="link" href="glib-Bookmark-file-parser.html#GBookmarkFile" title="GBookmarkFile"><span class="type">GBookmarkFile</span></a>
1533 <td><p><span class="term"><em class="parameter"><code>uri</code></em> :</span></p></td>
1538 <td><p><span class="term"><em class="parameter"><code>groups</code></em> :</span></p></td>
1539 <td> an array of group names, or <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a> to remove all groups
1543 <td><p><span class="term"><em class="parameter"><code>length</code></em> :</span></p></td>
1544 <td> number of group name values in <em class="parameter"><code>groups</code></em>
1549 <p class="since">Since 2.12</p>
1552 <div class="refsect2" title="g_bookmark_file_set_modified ()">
1553 <a name="g-bookmark-file-set-modified"></a><h3>g_bookmark_file_set_modified ()</h3>
1554 <pre class="programlisting"><span class="returnvalue">void</span> g_bookmark_file_set_modified (<a class="link" href="glib-Bookmark-file-parser.html#GBookmarkFile" title="GBookmarkFile"><span class="returnvalue">GBookmarkFile</span></a> *bookmark,
1555 const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> *uri,
1556 <span class="returnvalue">time_t</span> modified);</pre>
1558 Sets the last time the bookmark for <em class="parameter"><code>uri</code></em> was last modified.
1561 If no bookmark for <em class="parameter"><code>uri</code></em> is found then it is created.
1564 The "modified" time should only be set when the bookmark's meta-data
1565 was actually changed. Every function of <a class="link" href="glib-Bookmark-file-parser.html#GBookmarkFile" title="GBookmarkFile"><span class="type">GBookmarkFile</span></a> that
1566 modifies a bookmark also changes the modification time, except for
1567 <a class="link" href="glib-Bookmark-file-parser.html#g-bookmark-file-set-visited" title="g_bookmark_file_set_visited ()"><code class="function">g_bookmark_file_set_visited()</code></a>.</p>
1568 <div class="variablelist"><table border="0">
1569 <col align="left" valign="top">
1572 <td><p><span class="term"><em class="parameter"><code>bookmark</code></em> :</span></p></td>
1573 <td> a <a class="link" href="glib-Bookmark-file-parser.html#GBookmarkFile" title="GBookmarkFile"><span class="type">GBookmarkFile</span></a>
1577 <td><p><span class="term"><em class="parameter"><code>uri</code></em> :</span></p></td>
1582 <td><p><span class="term"><em class="parameter"><code>modified</code></em> :</span></p></td>
1583 <td> a timestamp or -1 to use the current time
1588 <p class="since">Since 2.12</p>
1591 <div class="refsect2" title="g_bookmark_file_set_visited ()">
1592 <a name="g-bookmark-file-set-visited"></a><h3>g_bookmark_file_set_visited ()</h3>
1593 <pre class="programlisting"><span class="returnvalue">void</span> g_bookmark_file_set_visited (<a class="link" href="glib-Bookmark-file-parser.html#GBookmarkFile" title="GBookmarkFile"><span class="returnvalue">GBookmarkFile</span></a> *bookmark,
1594 const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> *uri,
1595 <span class="returnvalue">time_t</span> visited);</pre>
1597 Sets the time the bookmark for <em class="parameter"><code>uri</code></em> was last visited.
1600 If no bookmark for <em class="parameter"><code>uri</code></em> is found then it is created.
1603 The "visited" time should only be set if the bookmark was launched,
1604 either using the command line retrieved by <a class="link" href="glib-Bookmark-file-parser.html#g-bookmark-file-get-app-info" title="g_bookmark_file_get_app_info ()"><code class="function">g_bookmark_file_get_app_info()</code></a>
1605 or by the default application for the bookmark's MIME type, retrieved
1606 using <a class="link" href="glib-Bookmark-file-parser.html#g-bookmark-file-get-mime-type" title="g_bookmark_file_get_mime_type ()"><code class="function">g_bookmark_file_get_mime_type()</code></a>. Changing the "visited" time
1607 does not affect the "modified" time.</p>
1608 <div class="variablelist"><table border="0">
1609 <col align="left" valign="top">
1612 <td><p><span class="term"><em class="parameter"><code>bookmark</code></em> :</span></p></td>
1613 <td> a <a class="link" href="glib-Bookmark-file-parser.html#GBookmarkFile" title="GBookmarkFile"><span class="type">GBookmarkFile</span></a>
1617 <td><p><span class="term"><em class="parameter"><code>uri</code></em> :</span></p></td>
1622 <td><p><span class="term"><em class="parameter"><code>visited</code></em> :</span></p></td>
1623 <td> a timestamp or -1 to use the current time
1628 <p class="since">Since 2.12</p>
1631 <div class="refsect2" title="g_bookmark_file_set_app_info ()">
1632 <a name="g-bookmark-file-set-app-info"></a><h3>g_bookmark_file_set_app_info ()</h3>
1633 <pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean"><span class="returnvalue">gboolean</span></a> g_bookmark_file_set_app_info (<a class="link" href="glib-Bookmark-file-parser.html#GBookmarkFile" title="GBookmarkFile"><span class="returnvalue">GBookmarkFile</span></a> *bookmark,
1634 const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> *uri,
1635 const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> *name,
1636 const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> *exec,
1637 <a class="link" href="glib-Basic-Types.html#gint" title="gint"><span class="returnvalue">gint</span></a> count,
1638 <span class="returnvalue">time_t</span> stamp,
1639 <a class="link" href="glib-Error-Reporting.html#GError" title="GError"><span class="returnvalue">GError</span></a> **error);</pre>
1641 Sets the meta-data of application <em class="parameter"><code>name</code></em> inside the list of
1642 applications that have registered a bookmark for <em class="parameter"><code>uri</code></em> inside
1643 <em class="parameter"><code>bookmark</code></em>.
1646 You should rarely use this function; use <a class="link" href="glib-Bookmark-file-parser.html#g-bookmark-file-add-application" title="g_bookmark_file_add_application ()"><code class="function">g_bookmark_file_add_application()</code></a>
1647 and <a class="link" href="glib-Bookmark-file-parser.html#g-bookmark-file-remove-application" title="g_bookmark_file_remove_application ()"><code class="function">g_bookmark_file_remove_application()</code></a> instead.
1650 <em class="parameter"><code>name</code></em> can be any UTF-8 encoded string used to identify an
1652 <em class="parameter"><code>exec</code></em> can have one of these two modifiers: "<code class="literal">f</code>", which will
1653 be expanded as the local file name retrieved from the bookmark's
1654 URI; "<code class="literal">u</code>", which will be expanded as the bookmark's URI.
1655 The expansion is done automatically when retrieving the stored
1656 command line using the <a class="link" href="glib-Bookmark-file-parser.html#g-bookmark-file-get-app-info" title="g_bookmark_file_get_app_info ()"><code class="function">g_bookmark_file_get_app_info()</code></a> function.
1657 <em class="parameter"><code>count</code></em> is the number of times the application has registered the
1658 bookmark; if is < 0, the current registration count will be increased
1659 by one, if is 0, the application with <em class="parameter"><code>name</code></em> will be removed from
1660 the list of registered applications.
1661 <em class="parameter"><code>stamp</code></em> is the Unix time of the last registration; if it is -1, the
1662 current time will be used.
1665 If you try to remove an application by setting its registration count to
1666 zero, and no bookmark for <em class="parameter"><code>uri</code></em> is found, <a class="link" href="glib-Standard-Macros.html#FALSE:CAPS" title="FALSE"><code class="literal">FALSE</code></a> is returned and
1667 <em class="parameter"><code>error</code></em> is set to <a class="link" href="glib-Bookmark-file-parser.html#G-BOOKMARK-FILE-ERROR-URI-NOT-FOUND:CAPS"><span class="type">G_BOOKMARK_FILE_ERROR_URI_NOT_FOUND</span></a>; similarly,
1668 in the event that no application <em class="parameter"><code>name</code></em> has registered a bookmark
1669 for <em class="parameter"><code>uri</code></em>, <a class="link" href="glib-Standard-Macros.html#FALSE:CAPS" title="FALSE"><code class="literal">FALSE</code></a> is returned and error is set to
1670 <a class="link" href="glib-Bookmark-file-parser.html#G-BOOKMARK-FILE-ERROR-APP-NOT-REGISTERED:CAPS"><span class="type">G_BOOKMARK_FILE_ERROR_APP_NOT_REGISTERED</span></a>. Otherwise, if no bookmark
1671 for <em class="parameter"><code>uri</code></em> is found, one is created.</p>
1672 <div class="variablelist"><table border="0">
1673 <col align="left" valign="top">
1676 <td><p><span class="term"><em class="parameter"><code>bookmark</code></em> :</span></p></td>
1677 <td> a <a class="link" href="glib-Bookmark-file-parser.html#GBookmarkFile" title="GBookmarkFile"><span class="type">GBookmarkFile</span></a>
1681 <td><p><span class="term"><em class="parameter"><code>uri</code></em> :</span></p></td>
1686 <td><p><span class="term"><em class="parameter"><code>name</code></em> :</span></p></td>
1687 <td> an application's name
1691 <td><p><span class="term"><em class="parameter"><code>exec</code></em> :</span></p></td>
1692 <td> an application's command line
1696 <td><p><span class="term"><em class="parameter"><code>count</code></em> :</span></p></td>
1697 <td> the number of registrations done for this application
1701 <td><p><span class="term"><em class="parameter"><code>stamp</code></em> :</span></p></td>
1702 <td> the time of the last registration for this application
1706 <td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
1707 <td> return location for a <a class="link" href="glib-Error-Reporting.html#GError" title="GError"><span class="type">GError</span></a> or <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a>
1711 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
1712 <td> <a class="link" href="glib-Standard-Macros.html#TRUE:CAPS" title="TRUE"><code class="literal">TRUE</code></a> if the application's meta-data was successfully
1719 <p class="since">Since 2.12</p>
1722 <div class="refsect2" title="g_bookmark_file_add_group ()">
1723 <a name="g-bookmark-file-add-group"></a><h3>g_bookmark_file_add_group ()</h3>
1724 <pre class="programlisting"><span class="returnvalue">void</span> g_bookmark_file_add_group (<a class="link" href="glib-Bookmark-file-parser.html#GBookmarkFile" title="GBookmarkFile"><span class="returnvalue">GBookmarkFile</span></a> *bookmark,
1725 const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> *uri,
1726 const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> *group);</pre>
1728 Adds <em class="parameter"><code>group</code></em> to the list of groups to which the bookmark for <em class="parameter"><code>uri</code></em>
1732 If no bookmark for <em class="parameter"><code>uri</code></em> is found then it is created.</p>
1733 <div class="variablelist"><table border="0">
1734 <col align="left" valign="top">
1737 <td><p><span class="term"><em class="parameter"><code>bookmark</code></em> :</span></p></td>
1738 <td> a <a class="link" href="glib-Bookmark-file-parser.html#GBookmarkFile" title="GBookmarkFile"><span class="type">GBookmarkFile</span></a>
1742 <td><p><span class="term"><em class="parameter"><code>uri</code></em> :</span></p></td>
1747 <td><p><span class="term"><em class="parameter"><code>group</code></em> :</span></p></td>
1748 <td> the group name to be added
1753 <p class="since">Since 2.12</p>
1756 <div class="refsect2" title="g_bookmark_file_add_application ()">
1757 <a name="g-bookmark-file-add-application"></a><h3>g_bookmark_file_add_application ()</h3>
1758 <pre class="programlisting"><span class="returnvalue">void</span> g_bookmark_file_add_application (<a class="link" href="glib-Bookmark-file-parser.html#GBookmarkFile" title="GBookmarkFile"><span class="returnvalue">GBookmarkFile</span></a> *bookmark,
1759 const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> *uri,
1760 const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> *name,
1761 const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> *exec);</pre>
1763 Adds the application with <em class="parameter"><code>name</code></em> and <em class="parameter"><code>exec</code></em> to the list of
1764 applications that have registered a bookmark for <em class="parameter"><code>uri</code></em> into
1765 <em class="parameter"><code>bookmark</code></em>.
1768 Every bookmark inside a <a class="link" href="glib-Bookmark-file-parser.html#GBookmarkFile" title="GBookmarkFile"><span class="type">GBookmarkFile</span></a> must have at least an
1769 application registered. Each application must provide a name, a
1770 command line useful for launching the bookmark, the number of times
1771 the bookmark has been registered by the application and the last
1772 time the application registered this bookmark.
1775 If <em class="parameter"><code>name</code></em> is <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a>, the name of the application will be the
1776 same returned by <a class="link" href="glib-Miscellaneous-Utility-Functions.html#g-get-application-name" title="g_get_application_name ()"><code class="function">g_get_application_name()</code></a>; if <em class="parameter"><code>exec</code></em> is <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a>, the
1777 command line will be a composition of the program name as
1778 returned by <a class="link" href="glib-Miscellaneous-Utility-Functions.html#g-get-prgname" title="g_get_prgname ()"><code class="function">g_get_prgname()</code></a> and the "<code class="literal">u</code>" modifier, which will be
1779 expanded to the bookmark's URI.
1782 This function will automatically take care of updating the
1783 registrations count and timestamping in case an application
1784 with the same <em class="parameter"><code>name</code></em> had already registered a bookmark for
1785 <em class="parameter"><code>uri</code></em> inside <em class="parameter"><code>bookmark</code></em>.
1788 If no bookmark for <em class="parameter"><code>uri</code></em> is found, one is created.</p>
1789 <div class="variablelist"><table border="0">
1790 <col align="left" valign="top">
1793 <td><p><span class="term"><em class="parameter"><code>bookmark</code></em> :</span></p></td>
1794 <td> a <a class="link" href="glib-Bookmark-file-parser.html#GBookmarkFile" title="GBookmarkFile"><span class="type">GBookmarkFile</span></a>
1798 <td><p><span class="term"><em class="parameter"><code>uri</code></em> :</span></p></td>
1803 <td><p><span class="term"><em class="parameter"><code>name</code></em> :</span></p></td>
1804 <td> the name of the application registering the bookmark
1805 or <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a>
1809 <td><p><span class="term"><em class="parameter"><code>exec</code></em> :</span></p></td>
1810 <td> command line to be used to launch the bookmark or <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a>
1815 <p class="since">Since 2.12</p>
1818 <div class="refsect2" title="g_bookmark_file_remove_group ()">
1819 <a name="g-bookmark-file-remove-group"></a><h3>g_bookmark_file_remove_group ()</h3>
1820 <pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean"><span class="returnvalue">gboolean</span></a> g_bookmark_file_remove_group (<a class="link" href="glib-Bookmark-file-parser.html#GBookmarkFile" title="GBookmarkFile"><span class="returnvalue">GBookmarkFile</span></a> *bookmark,
1821 const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> *uri,
1822 const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> *group,
1823 <a class="link" href="glib-Error-Reporting.html#GError" title="GError"><span class="returnvalue">GError</span></a> **error);</pre>
1825 Removes <em class="parameter"><code>group</code></em> from the list of groups to which the bookmark
1826 for <em class="parameter"><code>uri</code></em> belongs to.
1829 In the event the URI cannot be found, <a class="link" href="glib-Standard-Macros.html#FALSE:CAPS" title="FALSE"><code class="literal">FALSE</code></a> is returned and
1830 <em class="parameter"><code>error</code></em> is set to <a class="link" href="glib-Bookmark-file-parser.html#G-BOOKMARK-FILE-ERROR-URI-NOT-FOUND:CAPS"><span class="type">G_BOOKMARK_FILE_ERROR_URI_NOT_FOUND</span></a>.
1831 In the event no group was defined, <a class="link" href="glib-Standard-Macros.html#FALSE:CAPS" title="FALSE"><code class="literal">FALSE</code></a> is returned and
1832 <em class="parameter"><code>error</code></em> is set to <a class="link" href="glib-Bookmark-file-parser.html#G-BOOKMARK-FILE-ERROR-INVALID-VALUE:CAPS"><span class="type">G_BOOKMARK_FILE_ERROR_INVALID_VALUE</span></a>.</p>
1833 <div class="variablelist"><table border="0">
1834 <col align="left" valign="top">
1837 <td><p><span class="term"><em class="parameter"><code>bookmark</code></em> :</span></p></td>
1838 <td> a <a class="link" href="glib-Bookmark-file-parser.html#GBookmarkFile" title="GBookmarkFile"><span class="type">GBookmarkFile</span></a>
1842 <td><p><span class="term"><em class="parameter"><code>uri</code></em> :</span></p></td>
1847 <td><p><span class="term"><em class="parameter"><code>group</code></em> :</span></p></td>
1848 <td> the group name to be removed
1852 <td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
1853 <td> return location for a <a class="link" href="glib-Error-Reporting.html#GError" title="GError"><span class="type">GError</span></a>, or <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a>
1857 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
1858 <td> <a class="link" href="glib-Standard-Macros.html#TRUE:CAPS" title="TRUE"><code class="literal">TRUE</code></a> if <em class="parameter"><code>group</code></em> was successfully removed.
1864 <p class="since">Since 2.12</p>
1867 <div class="refsect2" title="g_bookmark_file_remove_application ()">
1868 <a name="g-bookmark-file-remove-application"></a><h3>g_bookmark_file_remove_application ()</h3>
1869 <pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean"><span class="returnvalue">gboolean</span></a> g_bookmark_file_remove_application (<a class="link" href="glib-Bookmark-file-parser.html#GBookmarkFile" title="GBookmarkFile"><span class="returnvalue">GBookmarkFile</span></a> *bookmark,
1870 const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> *uri,
1871 const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> *name,
1872 <a class="link" href="glib-Error-Reporting.html#GError" title="GError"><span class="returnvalue">GError</span></a> **error);</pre>
1874 Removes application registered with <em class="parameter"><code>name</code></em> from the list of applications
1875 that have registered a bookmark for <em class="parameter"><code>uri</code></em> inside <em class="parameter"><code>bookmark</code></em>.
1878 In the event the URI cannot be found, <a class="link" href="glib-Standard-Macros.html#FALSE:CAPS" title="FALSE"><code class="literal">FALSE</code></a> is returned and
1879 <em class="parameter"><code>error</code></em> is set to <a class="link" href="glib-Bookmark-file-parser.html#G-BOOKMARK-FILE-ERROR-URI-NOT-FOUND:CAPS"><span class="type">G_BOOKMARK_FILE_ERROR_URI_NOT_FOUND</span></a>.
1880 In the event that no application with name <em class="parameter"><code>app_name</code></em> has registered
1881 a bookmark for <em class="parameter"><code>uri</code></em>, <a class="link" href="glib-Standard-Macros.html#FALSE:CAPS" title="FALSE"><code class="literal">FALSE</code></a> is returned and error is set to
1882 <a class="link" href="glib-Bookmark-file-parser.html#G-BOOKMARK-FILE-ERROR-APP-NOT-REGISTERED:CAPS"><span class="type">G_BOOKMARK_FILE_ERROR_APP_NOT_REGISTERED</span></a>.</p>
1883 <div class="variablelist"><table border="0">
1884 <col align="left" valign="top">
1887 <td><p><span class="term"><em class="parameter"><code>bookmark</code></em> :</span></p></td>
1888 <td> a <a class="link" href="glib-Bookmark-file-parser.html#GBookmarkFile" title="GBookmarkFile"><span class="type">GBookmarkFile</span></a>
1892 <td><p><span class="term"><em class="parameter"><code>uri</code></em> :</span></p></td>
1897 <td><p><span class="term"><em class="parameter"><code>name</code></em> :</span></p></td>
1898 <td> the name of the application
1902 <td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
1903 <td> return location for a <a class="link" href="glib-Error-Reporting.html#GError" title="GError"><span class="type">GError</span></a> or <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a>
1907 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
1908 <td> <a class="link" href="glib-Standard-Macros.html#TRUE:CAPS" title="TRUE"><code class="literal">TRUE</code></a> if the application was successfully removed.
1914 <p class="since">Since 2.12</p>
1917 <div class="refsect2" title="g_bookmark_file_remove_item ()">
1918 <a name="g-bookmark-file-remove-item"></a><h3>g_bookmark_file_remove_item ()</h3>
1919 <pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean"><span class="returnvalue">gboolean</span></a> g_bookmark_file_remove_item (<a class="link" href="glib-Bookmark-file-parser.html#GBookmarkFile" title="GBookmarkFile"><span class="returnvalue">GBookmarkFile</span></a> *bookmark,
1920 const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> *uri,
1921 <a class="link" href="glib-Error-Reporting.html#GError" title="GError"><span class="returnvalue">GError</span></a> **error);</pre>
1923 Removes the bookmark for <em class="parameter"><code>uri</code></em> from the bookmark file <em class="parameter"><code>bookmark</code></em>.</p>
1924 <div class="variablelist"><table border="0">
1925 <col align="left" valign="top">
1928 <td><p><span class="term"><em class="parameter"><code>bookmark</code></em> :</span></p></td>
1929 <td> a <a class="link" href="glib-Bookmark-file-parser.html#GBookmarkFile" title="GBookmarkFile"><span class="type">GBookmarkFile</span></a>
1933 <td><p><span class="term"><em class="parameter"><code>uri</code></em> :</span></p></td>
1938 <td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
1939 <td> return location for a <a class="link" href="glib-Error-Reporting.html#GError" title="GError"><span class="type">GError</span></a>, or <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a>
1943 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
1944 <td> <a class="link" href="glib-Standard-Macros.html#TRUE:CAPS" title="TRUE"><code class="literal">TRUE</code></a> if the bookmark was removed successfully.
1950 <p class="since">Since 2.12</p>
1953 <div class="refsect2" title="g_bookmark_file_move_item ()">
1954 <a name="g-bookmark-file-move-item"></a><h3>g_bookmark_file_move_item ()</h3>
1955 <pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean"><span class="returnvalue">gboolean</span></a> g_bookmark_file_move_item (<a class="link" href="glib-Bookmark-file-parser.html#GBookmarkFile" title="GBookmarkFile"><span class="returnvalue">GBookmarkFile</span></a> *bookmark,
1956 const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> *old_uri,
1957 const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> *new_uri,
1958 <a class="link" href="glib-Error-Reporting.html#GError" title="GError"><span class="returnvalue">GError</span></a> **error);</pre>
1960 Changes the URI of a bookmark item from <em class="parameter"><code>old_uri</code></em> to <em class="parameter"><code>new_uri</code></em>. Any
1961 existing bookmark for <em class="parameter"><code>new_uri</code></em> will be overwritten. If <em class="parameter"><code>new_uri</code></em> is
1962 <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a>, then the bookmark is removed.
1965 In the event the URI cannot be found, <a class="link" href="glib-Standard-Macros.html#FALSE:CAPS" title="FALSE"><code class="literal">FALSE</code></a> is returned and
1966 <em class="parameter"><code>error</code></em> is set to <a class="link" href="glib-Bookmark-file-parser.html#G-BOOKMARK-FILE-ERROR-URI-NOT-FOUND:CAPS"><span class="type">G_BOOKMARK_FILE_ERROR_URI_NOT_FOUND</span></a>.</p>
1967 <div class="variablelist"><table border="0">
1968 <col align="left" valign="top">
1971 <td><p><span class="term"><em class="parameter"><code>bookmark</code></em> :</span></p></td>
1972 <td> a <a class="link" href="glib-Bookmark-file-parser.html#GBookmarkFile" title="GBookmarkFile"><span class="type">GBookmarkFile</span></a>
1976 <td><p><span class="term"><em class="parameter"><code>old_uri</code></em> :</span></p></td>
1981 <td><p><span class="term"><em class="parameter"><code>new_uri</code></em> :</span></p></td>
1982 <td> a valid URI, or <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a>
1986 <td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
1987 <td> return location for a <a class="link" href="glib-Error-Reporting.html#GError" title="GError"><span class="type">GError</span></a> or <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a>
1991 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
1992 <td> <a class="link" href="glib-Standard-Macros.html#TRUE:CAPS" title="TRUE"><code class="literal">TRUE</code></a> if the URI was successfully changed
1998 <p class="since">Since 2.12</p>
2002 <div class="footer">
2004 Generated by GTK-Doc V1.13</div>