1
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
4
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
5
<title>Bookmark file parser</title>
6
<meta name="generator" content="DocBook XSL Stylesheets V1.72.0">
7
<link rel="start" 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-Windows-Compatibility-Functions.html" title="Windows Compatibility Functions">
11
<meta name="generator" content="GTK-Doc V1.7 (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="ix01.html" title="Index">
20
<link rel="index" href="ix02.html" title="Index of deprecated symbols">
21
<link rel="index" href="ix03.html" title="Index of new symbols in 2.2">
22
<link rel="index" href="ix04.html" title="Index of new symbols in 2.4">
23
<link rel="index" href="ix05.html" title="Index of new symbols in 2.6">
24
<link rel="index" href="ix06.html" title="Index of new symbols in 2.8">
25
<link rel="index" href="ix07.html" title="Index of new symbols in 2.10">
26
<link rel="index" href="ix08.html" title="Index of new symbols in 2.12">
28
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
29
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
31
<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>
32
<td><a accesskey="u" href="glib-utilities.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
33
<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
34
<th width="100%" align="center">GLib Reference Manual</th>
35
<td><a accesskey="n" href="glib-Windows-Compatibility-Functions.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
37
<tr><td colspan="5" class="shortcuts"><nobr><a href="#id3014271" class="shortcut">Top</a>
39
<a href="#id3015942" class="shortcut">Description</a></nobr></td></tr>
41
<div class="refentry" lang="en">
42
<a name="glib-Bookmark-file-parser"></a><div class="titlepage"></div>
43
<div class="refnamediv"><table width="100%"><tr>
46
<a name="id3014271"></a><span class="refentrytitle">Bookmark file parser</span>
48
<p>Bookmark file parser — parses files containing bookmarks</p>
50
<td valign="top" align="right"></td>
52
<div class="refsynopsisdiv">
54
<pre class="synopsis">
56
#include <glib.h>
59
<a href="glib-Bookmark-file-parser.html#GBookmarkFile">GBookmarkFile</a>;
60
#define <a href="glib-Bookmark-file-parser.html#G-BOOKMARK-FILE-ERROR:CAPS">G_BOOKMARK_FILE_ERROR</a>
61
enum <a href="glib-Bookmark-file-parser.html#GBookmarkFileError">GBookmarkFileError</a>;
62
<a href="glib-Bookmark-file-parser.html#GBookmarkFile">GBookmarkFile</a>* <a href="glib-Bookmark-file-parser.html#g-bookmark-file-new">g_bookmark_file_new</a> (void);
63
void <a href="glib-Bookmark-file-parser.html#g-bookmark-file-free">g_bookmark_file_free</a> (<a href="glib-Bookmark-file-parser.html#GBookmarkFile">GBookmarkFile</a> *bookmark);
64
<a href="glib-Basic-Types.html#gboolean">gboolean</a> <a href="glib-Bookmark-file-parser.html#g-bookmark-file-load-from-file">g_bookmark_file_load_from_file</a> (<a href="glib-Bookmark-file-parser.html#GBookmarkFile">GBookmarkFile</a> *bookmark,
65
const <a href="glib-Basic-Types.html#gchar">gchar</a> *filename,
66
<a href="glib-Error-Reporting.html#GError">GError</a> **error);
67
<a href="glib-Basic-Types.html#gboolean">gboolean</a> <a href="glib-Bookmark-file-parser.html#g-bookmark-file-load-from-data">g_bookmark_file_load_from_data</a> (<a href="glib-Bookmark-file-parser.html#GBookmarkFile">GBookmarkFile</a> *bookmark,
68
const <a href="glib-Basic-Types.html#gchar">gchar</a> *data,
69
<a href="glib-Basic-Types.html#gsize">gsize</a> length,
70
<a href="glib-Error-Reporting.html#GError">GError</a> **error);
71
<a href="glib-Basic-Types.html#gboolean">gboolean</a> <a href="glib-Bookmark-file-parser.html#g-bookmark-file-load-from-data-dirs">g_bookmark_file_load_from_data_dirs</a> (<a href="glib-Bookmark-file-parser.html#GBookmarkFile">GBookmarkFile</a> *bookmark,
72
const <a href="glib-Basic-Types.html#gchar">gchar</a> *file,
73
<a href="glib-Basic-Types.html#gchar">gchar</a> **full_path,
74
<a href="glib-Error-Reporting.html#GError">GError</a> **error);
75
<a href="glib-Basic-Types.html#gchar">gchar</a>* <a href="glib-Bookmark-file-parser.html#g-bookmark-file-to-data">g_bookmark_file_to_data</a> (<a href="glib-Bookmark-file-parser.html#GBookmarkFile">GBookmarkFile</a> *bookmark,
76
<a href="glib-Basic-Types.html#gsize">gsize</a> *length,
77
<a href="glib-Error-Reporting.html#GError">GError</a> **error);
78
<a href="glib-Basic-Types.html#gboolean">gboolean</a> <a href="glib-Bookmark-file-parser.html#g-bookmark-file-to-file">g_bookmark_file_to_file</a> (<a href="glib-Bookmark-file-parser.html#GBookmarkFile">GBookmarkFile</a> *bookmark,
79
const <a href="glib-Basic-Types.html#gchar">gchar</a> *filename,
80
<a href="glib-Error-Reporting.html#GError">GError</a> **error);
81
<a href="glib-Basic-Types.html#gboolean">gboolean</a> <a href="glib-Bookmark-file-parser.html#g-bookmark-file-has-item">g_bookmark_file_has_item</a> (<a href="glib-Bookmark-file-parser.html#GBookmarkFile">GBookmarkFile</a> *bookmark,
82
const <a href="glib-Basic-Types.html#gchar">gchar</a> *uri);
83
<a href="glib-Basic-Types.html#gboolean">gboolean</a> <a href="glib-Bookmark-file-parser.html#g-bookmark-file-has-group">g_bookmark_file_has_group</a> (<a href="glib-Bookmark-file-parser.html#GBookmarkFile">GBookmarkFile</a> *bookmark,
84
const <a href="glib-Basic-Types.html#gchar">gchar</a> *uri,
85
const <a href="glib-Basic-Types.html#gchar">gchar</a> *group,
86
<a href="glib-Error-Reporting.html#GError">GError</a> **error);
87
<a href="glib-Basic-Types.html#gboolean">gboolean</a> <a href="glib-Bookmark-file-parser.html#g-bookmark-file-has-application">g_bookmark_file_has_application</a> (<a href="glib-Bookmark-file-parser.html#GBookmarkFile">GBookmarkFile</a> *bookmark,
88
const <a href="glib-Basic-Types.html#gchar">gchar</a> *uri,
89
const <a href="glib-Basic-Types.html#gchar">gchar</a> *name,
90
<a href="glib-Error-Reporting.html#GError">GError</a> **error);
91
<a href="glib-Basic-Types.html#gint">gint</a> <a href="glib-Bookmark-file-parser.html#g-bookmark-file-get-size">g_bookmark_file_get_size</a> (<a href="glib-Bookmark-file-parser.html#GBookmarkFile">GBookmarkFile</a> *bookmark);
92
<a href="glib-Basic-Types.html#gchar">gchar</a>** <a href="glib-Bookmark-file-parser.html#g-bookmark-file-get-uris">g_bookmark_file_get_uris</a> (<a href="glib-Bookmark-file-parser.html#GBookmarkFile">GBookmarkFile</a> *bookmark,
93
<a href="glib-Basic-Types.html#gsize">gsize</a> *length);
95
<a href="glib-Basic-Types.html#gchar">gchar</a>* <a href="glib-Bookmark-file-parser.html#g-bookmark-file-get-title">g_bookmark_file_get_title</a> (<a href="glib-Bookmark-file-parser.html#GBookmarkFile">GBookmarkFile</a> *bookmark,
96
const <a href="glib-Basic-Types.html#gchar">gchar</a> *uri,
97
<a href="glib-Error-Reporting.html#GError">GError</a> **error);
98
<a href="glib-Basic-Types.html#gchar">gchar</a>* <a href="glib-Bookmark-file-parser.html#g-bookmark-file-get-description">g_bookmark_file_get_description</a> (<a href="glib-Bookmark-file-parser.html#GBookmarkFile">GBookmarkFile</a> *bookmark,
99
const <a href="glib-Basic-Types.html#gchar">gchar</a> *uri,
100
<a href="glib-Error-Reporting.html#GError">GError</a> **error);
101
<a href="glib-Basic-Types.html#gchar">gchar</a>* <a href="glib-Bookmark-file-parser.html#g-bookmark-file-get-mime-type">g_bookmark_file_get_mime_type</a> (<a href="glib-Bookmark-file-parser.html#GBookmarkFile">GBookmarkFile</a> *bookmark,
102
const <a href="glib-Basic-Types.html#gchar">gchar</a> *uri,
103
<a href="glib-Error-Reporting.html#GError">GError</a> **error);
104
<a href="glib-Basic-Types.html#gboolean">gboolean</a> <a href="glib-Bookmark-file-parser.html#g-bookmark-file-get-is-private">g_bookmark_file_get_is_private</a> (<a href="glib-Bookmark-file-parser.html#GBookmarkFile">GBookmarkFile</a> *bookmark,
105
const <a href="glib-Basic-Types.html#gchar">gchar</a> *uri,
106
<a href="glib-Error-Reporting.html#GError">GError</a> **error);
107
<a href="glib-Basic-Types.html#gboolean">gboolean</a> <a href="glib-Bookmark-file-parser.html#g-bookmark-file-get-icon">g_bookmark_file_get_icon</a> (<a href="glib-Bookmark-file-parser.html#GBookmarkFile">GBookmarkFile</a> *bookmark,
108
const <a href="glib-Basic-Types.html#gchar">gchar</a> *uri,
109
<a href="glib-Basic-Types.html#gchar">gchar</a> **href,
110
<a href="glib-Basic-Types.html#gchar">gchar</a> **mime_type,
111
<a href="glib-Error-Reporting.html#GError">GError</a> **error);
112
time_t <a href="glib-Bookmark-file-parser.html#g-bookmark-file-get-added">g_bookmark_file_get_added</a> (<a href="glib-Bookmark-file-parser.html#GBookmarkFile">GBookmarkFile</a> *bookmark,
113
const <a href="glib-Basic-Types.html#gchar">gchar</a> *uri,
114
<a href="glib-Error-Reporting.html#GError">GError</a> **error);
115
time_t <a href="glib-Bookmark-file-parser.html#g-bookmark-file-get-modified">g_bookmark_file_get_modified</a> (<a href="glib-Bookmark-file-parser.html#GBookmarkFile">GBookmarkFile</a> *bookmark,
116
const <a href="glib-Basic-Types.html#gchar">gchar</a> *uri,
117
<a href="glib-Error-Reporting.html#GError">GError</a> **error);
118
time_t <a href="glib-Bookmark-file-parser.html#g-bookmark-file-get-visited">g_bookmark_file_get_visited</a> (<a href="glib-Bookmark-file-parser.html#GBookmarkFile">GBookmarkFile</a> *bookmark,
119
const <a href="glib-Basic-Types.html#gchar">gchar</a> *uri,
120
<a href="glib-Error-Reporting.html#GError">GError</a> **error);
121
<a href="glib-Basic-Types.html#gchar">gchar</a>** <a href="glib-Bookmark-file-parser.html#g-bookmark-file-get-groups">g_bookmark_file_get_groups</a> (<a href="glib-Bookmark-file-parser.html#GBookmarkFile">GBookmarkFile</a> *bookmark,
122
const <a href="glib-Basic-Types.html#gchar">gchar</a> *uri,
123
<a href="glib-Basic-Types.html#gsize">gsize</a> *length,
124
<a href="glib-Error-Reporting.html#GError">GError</a> **error);
125
<a href="glib-Basic-Types.html#gchar">gchar</a>** <a href="glib-Bookmark-file-parser.html#g-bookmark-file-get-applications">g_bookmark_file_get_applications</a> (<a href="glib-Bookmark-file-parser.html#GBookmarkFile">GBookmarkFile</a> *bookmark,
126
const <a href="glib-Basic-Types.html#gchar">gchar</a> *uri,
127
<a href="glib-Basic-Types.html#gsize">gsize</a> *length,
128
<a href="glib-Error-Reporting.html#GError">GError</a> **error);
129
<a href="glib-Basic-Types.html#gboolean">gboolean</a> <a href="glib-Bookmark-file-parser.html#g-bookmark-file-get-app-info">g_bookmark_file_get_app_info</a> (<a href="glib-Bookmark-file-parser.html#GBookmarkFile">GBookmarkFile</a> *bookmark,
130
const <a href="glib-Basic-Types.html#gchar">gchar</a> *uri,
131
const <a href="glib-Basic-Types.html#gchar">gchar</a> *name,
132
<a href="glib-Basic-Types.html#gchar">gchar</a> **exec,
133
<a href="glib-Basic-Types.html#guint">guint</a> *count,
135
<a href="glib-Error-Reporting.html#GError">GError</a> **error);
137
void <a href="glib-Bookmark-file-parser.html#g-bookmark-file-set-title">g_bookmark_file_set_title</a> (<a href="glib-Bookmark-file-parser.html#GBookmarkFile">GBookmarkFile</a> *bookmark,
138
const <a href="glib-Basic-Types.html#gchar">gchar</a> *uri,
139
const <a href="glib-Basic-Types.html#gchar">gchar</a> *title);
140
void <a href="glib-Bookmark-file-parser.html#g-bookmark-file-set-description">g_bookmark_file_set_description</a> (<a href="glib-Bookmark-file-parser.html#GBookmarkFile">GBookmarkFile</a> *bookmark,
141
const <a href="glib-Basic-Types.html#gchar">gchar</a> *uri,
142
const <a href="glib-Basic-Types.html#gchar">gchar</a> *description);
143
void <a href="glib-Bookmark-file-parser.html#g-bookmark-file-set-mime-type">g_bookmark_file_set_mime_type</a> (<a href="glib-Bookmark-file-parser.html#GBookmarkFile">GBookmarkFile</a> *bookmark,
144
const <a href="glib-Basic-Types.html#gchar">gchar</a> *uri,
145
const <a href="glib-Basic-Types.html#gchar">gchar</a> *mime_type);
146
void <a href="glib-Bookmark-file-parser.html#g-bookmark-file-set-is-private">g_bookmark_file_set_is_private</a> (<a href="glib-Bookmark-file-parser.html#GBookmarkFile">GBookmarkFile</a> *bookmark,
147
const <a href="glib-Basic-Types.html#gchar">gchar</a> *uri,
148
<a href="glib-Basic-Types.html#gboolean">gboolean</a> is_private);
149
void <a href="glib-Bookmark-file-parser.html#g-bookmark-file-set-icon">g_bookmark_file_set_icon</a> (<a href="glib-Bookmark-file-parser.html#GBookmarkFile">GBookmarkFile</a> *bookmark,
150
const <a href="glib-Basic-Types.html#gchar">gchar</a> *uri,
151
const <a href="glib-Basic-Types.html#gchar">gchar</a> *href,
152
const <a href="glib-Basic-Types.html#gchar">gchar</a> *mime_type);
153
void <a href="glib-Bookmark-file-parser.html#g-bookmark-file-set-added">g_bookmark_file_set_added</a> (<a href="glib-Bookmark-file-parser.html#GBookmarkFile">GBookmarkFile</a> *bookmark,
154
const <a href="glib-Basic-Types.html#gchar">gchar</a> *uri,
156
void <a href="glib-Bookmark-file-parser.html#g-bookmark-file-set-groups">g_bookmark_file_set_groups</a> (<a href="glib-Bookmark-file-parser.html#GBookmarkFile">GBookmarkFile</a> *bookmark,
157
const <a href="glib-Basic-Types.html#gchar">gchar</a> *uri,
158
const <a href="glib-Basic-Types.html#gchar">gchar</a> **groups,
159
<a href="glib-Basic-Types.html#gsize">gsize</a> length);
160
void <a href="glib-Bookmark-file-parser.html#g-bookmark-file-set-modified">g_bookmark_file_set_modified</a> (<a href="glib-Bookmark-file-parser.html#GBookmarkFile">GBookmarkFile</a> *bookmark,
161
const <a href="glib-Basic-Types.html#gchar">gchar</a> *uri,
163
void <a href="glib-Bookmark-file-parser.html#g-bookmark-file-set-visited">g_bookmark_file_set_visited</a> (<a href="glib-Bookmark-file-parser.html#GBookmarkFile">GBookmarkFile</a> *bookmark,
164
const <a href="glib-Basic-Types.html#gchar">gchar</a> *uri,
166
<a href="glib-Basic-Types.html#gboolean">gboolean</a> <a href="glib-Bookmark-file-parser.html#g-bookmark-file-set-app-info">g_bookmark_file_set_app_info</a> (<a href="glib-Bookmark-file-parser.html#GBookmarkFile">GBookmarkFile</a> *bookmark,
167
const <a href="glib-Basic-Types.html#gchar">gchar</a> *uri,
168
const <a href="glib-Basic-Types.html#gchar">gchar</a> *name,
169
const <a href="glib-Basic-Types.html#gchar">gchar</a> *exec,
170
<a href="glib-Basic-Types.html#gint">gint</a> count,
172
<a href="glib-Error-Reporting.html#GError">GError</a> **error);
173
void <a href="glib-Bookmark-file-parser.html#g-bookmark-file-add-group">g_bookmark_file_add_group</a> (<a href="glib-Bookmark-file-parser.html#GBookmarkFile">GBookmarkFile</a> *bookmark,
174
const <a href="glib-Basic-Types.html#gchar">gchar</a> *uri,
175
const <a href="glib-Basic-Types.html#gchar">gchar</a> *group);
176
void <a href="glib-Bookmark-file-parser.html#g-bookmark-file-add-application">g_bookmark_file_add_application</a> (<a href="glib-Bookmark-file-parser.html#GBookmarkFile">GBookmarkFile</a> *bookmark,
177
const <a href="glib-Basic-Types.html#gchar">gchar</a> *uri,
178
const <a href="glib-Basic-Types.html#gchar">gchar</a> *name,
179
const <a href="glib-Basic-Types.html#gchar">gchar</a> *exec);
180
<a href="glib-Basic-Types.html#gboolean">gboolean</a> <a href="glib-Bookmark-file-parser.html#g-bookmark-file-remove-group">g_bookmark_file_remove_group</a> (<a href="glib-Bookmark-file-parser.html#GBookmarkFile">GBookmarkFile</a> *bookmark,
181
const <a href="glib-Basic-Types.html#gchar">gchar</a> *uri,
182
const <a href="glib-Basic-Types.html#gchar">gchar</a> *group,
183
<a href="glib-Error-Reporting.html#GError">GError</a> **error);
184
<a href="glib-Basic-Types.html#gboolean">gboolean</a> <a href="glib-Bookmark-file-parser.html#g-bookmark-file-remove-application">g_bookmark_file_remove_application</a> (<a href="glib-Bookmark-file-parser.html#GBookmarkFile">GBookmarkFile</a> *bookmark,
185
const <a href="glib-Basic-Types.html#gchar">gchar</a> *uri,
186
const <a href="glib-Basic-Types.html#gchar">gchar</a> *name,
187
<a href="glib-Error-Reporting.html#GError">GError</a> **error);
188
<a href="glib-Basic-Types.html#gboolean">gboolean</a> <a href="glib-Bookmark-file-parser.html#g-bookmark-file-remove-item">g_bookmark_file_remove_item</a> (<a href="glib-Bookmark-file-parser.html#GBookmarkFile">GBookmarkFile</a> *bookmark,
189
const <a href="glib-Basic-Types.html#gchar">gchar</a> *uri,
190
<a href="glib-Error-Reporting.html#GError">GError</a> **error);
191
<a href="glib-Basic-Types.html#gboolean">gboolean</a> <a href="glib-Bookmark-file-parser.html#g-bookmark-file-move-item">g_bookmark_file_move_item</a> (<a href="glib-Bookmark-file-parser.html#GBookmarkFile">GBookmarkFile</a> *bookmark,
192
const <a href="glib-Basic-Types.html#gchar">gchar</a> *old_uri,
193
const <a href="glib-Basic-Types.html#gchar">gchar</a> *new_uri,
194
<a href="glib-Error-Reporting.html#GError">GError</a> **error);
198
<div class="refsect1" lang="en">
199
<a name="id3015942"></a><h2>Description</h2>
201
<a href="glib-Bookmark-file-parser.html#GBookmarkFile"><span class="type">GBookmarkFile</span></a> lets you parse, edit or create files containing bookmarks
202
to URI, along with some meta-data about the resource pointed by the URI like
203
its MIME type, the application that is registering the bookmark and the
204
icon that should be used to represent the bookmark. The data is stored using
206
<a href="http://www.gnome.org/~ebassi/bookmark-spec" target="_top">Desktop Bookmark
210
The syntax of the bookmark files is described in detail inside the Desktop
211
Bookmark Specification, here is a quick summary: bookmark files use a sub-class
213
<a href="" target="_top">XML Bookmark Exchange Language</a> specification, consisting
214
of valid UTF-8 encoded XML, under the <code class="literal">xbel</code> root element;
215
each bookmark is stored inside a <code class="literal">bookmark</code> element, using
216
its URI: no relative paths can be used inside a bookmark file. The bookmark
217
may have a user defined title and description, to be used instead of the URI.
218
Under the <code class="literal">metadata</code> element, with its <code class="literal">owner</code>
219
attribute set to <code class="literal">http://freedesktop.org</code>, is stored the
220
meta-data about a resource pointed by its URI. The meta-data consists of
221
the resource's MIME type; the applications that have registered a bookmark;
222
the groups to which a bookmark belongs to; a visibility flag, used to set
223
the bookmark as "private" to the applications and groups that has it
224
registered; the URI and MIME type of an icon, to be used when displaying the
225
bookmark inside a GUI.
227
<div class="informalexample"><pre class="programlisting">
229
<?xml version="1.0"?>
230
<!DOCTYPE xbel PUBLIC
231
"+//IDN python.org//DTD XML Bookmark Exchange Language 1.0//EN//XML"
232
"http://www.python.org/topics/xml/dtds/xbel-1.0.dtd">
233
<xbel version="1.0"
234
xmlns:mime="http://www.freedesktop.org/standards/shared-mime-info"
235
xmlns:bookmark="http://www.freedesktop.org/standards/desktop-bookmarks">
236
<bookmark href="file:///home/ebassi/bookmark-spec/bookmark-spec.xml">
237
<title>Desktop Bookmarks Spec</title>
239
<metadata owner="http://freedesktop.org">
240
<mime:mime-type>text/xml</mime:mime-type>
241
<bookmark:applications>
242
<bookmark:application name="GEdit" count="2" exec="gedit %u" timestamp="1115726763"/>
243
<bookmark:application name="GViM" count="7" exec="gvim %f" timestamp="1115726812"/>
244
</bookmark:applications>
245
<bookmark:groups>
246
<bookmark:group>Editors</bookmark:group>
247
</bookmark:groups>
255
A bookmark file might contain more than one bookmark; each bookmark is accessed
259
The important caveat of bookmark files is that when you add a new bookmark you
260
must also add the application that is registering it, using
261
<a href="glib-Bookmark-file-parser.html#g-bookmark-file-add-application"><code class="function">g_bookmark_file_add_application()</code></a> or <a href="glib-Bookmark-file-parser.html#g-bookmark-file-set-app-info"><code class="function">g_bookmark_file_set_app_info()</code></a>. If a
262
bookmark has no applications then it won't be dumped when creating the
263
on disk representation, using <a href="glib-Bookmark-file-parser.html#g-bookmark-file-to-data"><code class="function">g_bookmark_file_to_data()</code></a> or
264
<a href="glib-Bookmark-file-parser.html#g-bookmark-file-to-file"><code class="function">g_bookmark_file_to_file()</code></a>.
267
The <a href="glib-Bookmark-file-parser.html#GBookmarkFile"><span class="type">GBookmarkFile</span></a> parser was added in GLib 2.12.
270
<div class="refsect1" lang="en">
271
<a name="id3014228"></a><h2>Details</h2>
272
<div class="refsect2" lang="en">
273
<a name="id3014239"></a><h3>
274
<a name="GBookmarkFile"></a>GBookmarkFile</h3>
275
<a class="indexterm" name="id3014252"></a><pre class="programlisting">typedef struct _GBookmarkFile GBookmarkFile;</pre>
277
The <span class="structname">GBookmarkFile</span> struct contains only private data
278
and should not be used directly.
282
<div class="refsect2" lang="en">
283
<a name="id3016319"></a><h3>
284
<a name="G-BOOKMARK-FILE-ERROR:CAPS"></a>G_BOOKMARK_FILE_ERROR</h3>
285
<a class="indexterm" name="id3016332"></a><pre class="programlisting">#define G_BOOKMARK_FILE_ERROR (g_bookmark_file_error_quark ())
288
Error domain for bookmark file parsing. Errors in this domain will be
289
from the <a href="glib-Bookmark-file-parser.html#GBookmarkFileError"><span class="type">GBookmarkFileError</span></a> enumeration. See <a href="glib-Error-Reporting.html#GError"><span class="type">GError</span></a> for informations
294
<div class="refsect2" lang="en">
295
<a name="id3016367"></a><h3>
296
<a name="GBookmarkFileError"></a>enum GBookmarkFileError</h3>
297
<a class="indexterm" name="id3016380"></a><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><span class="term"><a name="G-BOOKMARK-FILE-ERROR-INVALID-URI:CAPS"></a><code class="literal">G_BOOKMARK_FILE_ERROR_INVALID_URI</code></span></td>
317
<td>URI was ill-formed
321
<td><span class="term"><a name="G-BOOKMARK-FILE-ERROR-INVALID-VALUE:CAPS"></a><code class="literal">G_BOOKMARK_FILE_ERROR_INVALID_VALUE</code></span></td>
322
<td>a requested field was not found
326
<td><span class="term"><a name="G-BOOKMARK-FILE-ERROR-APP-NOT-REGISTERED:CAPS"></a><code class="literal">G_BOOKMARK_FILE_ERROR_APP_NOT_REGISTERED</code></span></td>
327
<td>a requested application did not
332
<td><span class="term"><a name="G-BOOKMARK-FILE-ERROR-URI-NOT-FOUND:CAPS"></a><code class="literal">G_BOOKMARK_FILE_ERROR_URI_NOT_FOUND</code></span></td>
333
<td>a requested URI was not found
337
<td><span class="term"><a name="G-BOOKMARK-FILE-ERROR-READ:CAPS"></a><code class="literal">G_BOOKMARK_FILE_ERROR_READ</code></span></td>
338
<td>document was ill formed
342
<td><span class="term"><a name="G-BOOKMARK-FILE-ERROR-UNKNOWN-ENCODING:CAPS"></a><code class="literal">G_BOOKMARK_FILE_ERROR_UNKNOWN_ENCODING</code></span></td>
343
<td>the text being parsed was in an
348
<td><span class="term"><a name="G-BOOKMARK-FILE-ERROR-WRITE:CAPS"></a><code class="literal">G_BOOKMARK_FILE_ERROR_WRITE</code></span></td>
349
<td>an error occurred while writing
353
<td><span class="term"><a name="G-BOOKMARK-FILE-ERROR-FILE-NOT-FOUND:CAPS"></a><code class="literal">G_BOOKMARK_FILE_ERROR_FILE_NOT_FOUND</code></span></td>
354
<td>requested file was not found
362
<div class="refsect2" lang="en">
363
<a name="id3016593"></a><h3>
364
<a name="g-bookmark-file-new"></a>g_bookmark_file_new ()</h3>
365
<a class="indexterm" name="id3016608"></a><pre class="programlisting"><a href="glib-Bookmark-file-parser.html#GBookmarkFile">GBookmarkFile</a>* g_bookmark_file_new (void);</pre>
367
Creates a new empty <a href="glib-Bookmark-file-parser.html#GBookmarkFile"><span class="type">GBookmarkFile</span></a> object.
370
Use <a href="glib-Bookmark-file-parser.html#g-bookmark-file-load-from-file"><code class="function">g_bookmark_file_load_from_file()</code></a>, <a href="glib-Bookmark-file-parser.html#g-bookmark-file-load-from-data"><code class="function">g_bookmark_file_load_from_data()</code></a>
371
or <a href="glib-Bookmark-file-parser.html#g-bookmark-file-load-from-data-dirs"><code class="function">g_bookmark_file_load_from_data_dirs()</code></a> to read an existing bookmark
376
<div class="variablelist"><table border="0">
377
<col align="left" valign="top">
379
<td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
380
<td> an empty <a href="glib-Bookmark-file-parser.html#GBookmarkFile"><span class="type">GBookmarkFile</span></a>
385
<p class="since">Since 2.12
389
<div class="refsect2" lang="en">
390
<a name="id3016709"></a><h3>
391
<a name="g-bookmark-file-free"></a>g_bookmark_file_free ()</h3>
392
<a class="indexterm" name="id3016725"></a><pre class="programlisting">void g_bookmark_file_free (<a href="glib-Bookmark-file-parser.html#GBookmarkFile">GBookmarkFile</a> *bookmark);</pre>
394
Frees a <a href="glib-Bookmark-file-parser.html#GBookmarkFile"><span class="type">GBookmarkFile</span></a>.</p>
398
<div class="variablelist"><table border="0">
399
<col align="left" valign="top">
401
<td><span class="term"><em class="parameter"><code>bookmark</code></em> :</span></td>
402
<td> a <a href="glib-Bookmark-file-parser.html#GBookmarkFile"><span class="type">GBookmarkFile</span></a>
406
<p class="since">Since 2.12
410
<div class="refsect2" lang="en">
411
<a name="id3016799"></a><h3>
412
<a name="g-bookmark-file-load-from-file"></a>g_bookmark_file_load_from_file ()</h3>
413
<a class="indexterm" name="id3016814"></a><pre class="programlisting"><a href="glib-Basic-Types.html#gboolean">gboolean</a> g_bookmark_file_load_from_file (<a href="glib-Bookmark-file-parser.html#GBookmarkFile">GBookmarkFile</a> *bookmark,
414
const <a href="glib-Basic-Types.html#gchar">gchar</a> *filename,
415
<a href="glib-Error-Reporting.html#GError">GError</a> **error);</pre>
417
Loads a desktop bookmark file into an empty <a href="glib-Bookmark-file-parser.html#GBookmarkFile"><span class="type">GBookmarkFile</span></a> structure.
418
If the file could not be loaded then <em class="parameter"><code>error</code></em> is set to either a <a href="glib-File-Utilities.html#GFileError"><span class="type">GFileError</span></a>
419
or <a href="glib-Bookmark-file-parser.html#GBookmarkFileError"><span class="type">GBookmarkFileError</span></a>.</p>
423
<div class="variablelist"><table border="0">
424
<col align="left" valign="top">
427
<td><span class="term"><em class="parameter"><code>bookmark</code></em> :</span></td>
428
<td> an empty <a href="glib-Bookmark-file-parser.html#GBookmarkFile"><span class="type">GBookmarkFile</span></a> struct
432
<td><span class="term"><em class="parameter"><code>filename</code></em> :</span></td>
433
<td> the path of a filename to load, in the GLib file name encoding
437
<td><span class="term"><em class="parameter"><code>error</code></em> :</span></td>
438
<td> return location for a <a href="glib-Error-Reporting.html#GError"><span class="type">GError</span></a>, or <a href="glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>
442
<td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
443
<td> <a href="glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if a desktop bookmark file could be loaded
449
<p class="since">Since 2.12
453
<div class="refsect2" lang="en">
454
<a name="id3016996"></a><h3>
455
<a name="g-bookmark-file-load-from-data"></a>g_bookmark_file_load_from_data ()</h3>
456
<a class="indexterm" name="id3017011"></a><pre class="programlisting"><a href="glib-Basic-Types.html#gboolean">gboolean</a> g_bookmark_file_load_from_data (<a href="glib-Bookmark-file-parser.html#GBookmarkFile">GBookmarkFile</a> *bookmark,
457
const <a href="glib-Basic-Types.html#gchar">gchar</a> *data,
458
<a href="glib-Basic-Types.html#gsize">gsize</a> length,
459
<a href="glib-Error-Reporting.html#GError">GError</a> **error);</pre>
461
Loads a bookmark file from memory into an empty <a href="glib-Bookmark-file-parser.html#GBookmarkFile"><span class="type">GBookmarkFile</span></a>
462
structure. If the object cannot be created then <em class="parameter"><code>error</code></em> is set to a
463
<a href="glib-Bookmark-file-parser.html#GBookmarkFileError"><span class="type">GBookmarkFileError</span></a>.</p>
467
<div class="variablelist"><table border="0">
468
<col align="left" valign="top">
471
<td><span class="term"><em class="parameter"><code>bookmark</code></em> :</span></td>
472
<td> an empty <a href="glib-Bookmark-file-parser.html#GBookmarkFile"><span class="type">GBookmarkFile</span></a> struct
476
<td><span class="term"><em class="parameter"><code>data</code></em> :</span></td>
477
<td> desktop bookmarks loaded in memory
481
<td><span class="term"><em class="parameter"><code>length</code></em> :</span></td>
482
<td> the length of <em class="parameter"><code>data</code></em> in bytes
486
<td><span class="term"><em class="parameter"><code>error</code></em> :</span></td>
487
<td> return location for a <a href="glib-Error-Reporting.html#GError"><span class="type">GError</span></a>, or <a href="glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>
491
<td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
492
<td> <a href="glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if a desktop bookmark could be loaded.
498
<p class="since">Since 2.12
502
<div class="refsect2" lang="en">
503
<a name="id3017212"></a><h3>
504
<a name="g-bookmark-file-load-from-data-dirs"></a>g_bookmark_file_load_from_data_dirs ()</h3>
505
<a class="indexterm" name="id3017228"></a><pre class="programlisting"><a href="glib-Basic-Types.html#gboolean">gboolean</a> g_bookmark_file_load_from_data_dirs (<a href="glib-Bookmark-file-parser.html#GBookmarkFile">GBookmarkFile</a> *bookmark,
506
const <a href="glib-Basic-Types.html#gchar">gchar</a> *file,
507
<a href="glib-Basic-Types.html#gchar">gchar</a> **full_path,
508
<a href="glib-Error-Reporting.html#GError">GError</a> **error);</pre>
510
This function looks for a desktop bookmark file named <em class="parameter"><code>file</code></em> in the
511
paths returned from <a href="glib-Miscellaneous-Utility-Functions.html#g-get-user-data-dir"><code class="function">g_get_user_data_dir()</code></a> and <a href="glib-Miscellaneous-Utility-Functions.html#g-get-system-data-dirs"><code class="function">g_get_system_data_dirs()</code></a>,
512
loads the file into <em class="parameter"><code>bookmark</code></em> and returns the file's full path in
513
<em class="parameter"><code>full_path</code></em>. If the file could not be loaded then an <code class="literal">error</code> is
514
set to either a <a href="glib-File-Utilities.html#GFileError"><span class="type">GFileError</span></a> or <a href="glib-Bookmark-file-parser.html#GBookmarkFileError"><span class="type">GBookmarkFileError</span></a>.</p>
518
<div class="variablelist"><table border="0">
519
<col align="left" valign="top">
522
<td><span class="term"><em class="parameter"><code>bookmark</code></em> :</span></td>
523
<td> a <a href="glib-Bookmark-file-parser.html#GBookmarkFile"><span class="type">GBookmarkFile</span></a>
527
<td><span class="term"><em class="parameter"><code>file</code></em> :</span></td>
528
<td> a relative path to a filename to open and parse
532
<td><span class="term"><em class="parameter"><code>full_path</code></em> :</span></td>
533
<td> return location for a string containing the full path
534
of the file, or <a href="glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>
538
<td><span class="term"><em class="parameter"><code>error</code></em> :</span></td>
539
<td> return location for a <a href="glib-Error-Reporting.html#GError"><span class="type">GError</span></a>, or <a href="glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>
543
<td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
544
<td> <a href="glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if a key file could be loaded, <a href="glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> othewise
550
<p class="since">Since 2.12
554
<div class="refsect2" lang="en">
555
<a name="id3017488"></a><h3>
556
<a name="g-bookmark-file-to-data"></a>g_bookmark_file_to_data ()</h3>
557
<a class="indexterm" name="id3017503"></a><pre class="programlisting"><a href="glib-Basic-Types.html#gchar">gchar</a>* g_bookmark_file_to_data (<a href="glib-Bookmark-file-parser.html#GBookmarkFile">GBookmarkFile</a> *bookmark,
558
<a href="glib-Basic-Types.html#gsize">gsize</a> *length,
559
<a href="glib-Error-Reporting.html#GError">GError</a> **error);</pre>
561
This function outputs <em class="parameter"><code>bookmark</code></em> as a string.</p>
565
<div class="variablelist"><table border="0">
566
<col align="left" valign="top">
569
<td><span class="term"><em class="parameter"><code>bookmark</code></em> :</span></td>
570
<td> a <a href="glib-Bookmark-file-parser.html#GBookmarkFile"><span class="type">GBookmarkFile</span></a>
574
<td><span class="term"><em class="parameter"><code>length</code></em> :</span></td>
575
<td> return location for the length of the returned string, or <a href="glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>
579
<td><span class="term"><em class="parameter"><code>error</code></em> :</span></td>
580
<td> return location for a <a href="glib-Error-Reporting.html#GError"><span class="type">GError</span></a>, or <a href="glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>
584
<td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
585
<td> a newly allocated string holding
586
the contents of the <a href="glib-Bookmark-file-parser.html#GBookmarkFile"><span class="type">GBookmarkFile</span></a>
592
<p class="since">Since 2.12
596
<div class="refsect2" lang="en">
597
<a name="id3017667"></a><h3>
598
<a name="g-bookmark-file-to-file"></a>g_bookmark_file_to_file ()</h3>
599
<a class="indexterm" name="id3017682"></a><pre class="programlisting"><a href="glib-Basic-Types.html#gboolean">gboolean</a> g_bookmark_file_to_file (<a href="glib-Bookmark-file-parser.html#GBookmarkFile">GBookmarkFile</a> *bookmark,
600
const <a href="glib-Basic-Types.html#gchar">gchar</a> *filename,
601
<a href="glib-Error-Reporting.html#GError">GError</a> **error);</pre>
603
This function outputs <em class="parameter"><code>bookmark</code></em> into a file. The write process is
604
guaranteed to be atomic by using <a href="glib-File-Utilities.html#g-file-set-contents"><code class="function">g_file_set_contents()</code></a> internally.</p>
608
<div class="variablelist"><table border="0">
609
<col align="left" valign="top">
612
<td><span class="term"><em class="parameter"><code>bookmark</code></em> :</span></td>
613
<td> a <a href="glib-Bookmark-file-parser.html#GBookmarkFile"><span class="type">GBookmarkFile</span></a>
617
<td><span class="term"><em class="parameter"><code>filename</code></em> :</span></td>
618
<td> path of the output file
622
<td><span class="term"><em class="parameter"><code>error</code></em> :</span></td>
623
<td> return location for a <a href="glib-Error-Reporting.html#GError"><span class="type">GError</span></a>, or <a href="glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>
627
<td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
628
<td> <a href="glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the file was successfully written.
634
<p class="since">Since 2.12
638
<div class="refsect2" lang="en">
639
<a name="id3017849"></a><h3>
640
<a name="g-bookmark-file-has-item"></a>g_bookmark_file_has_item ()</h3>
641
<a class="indexterm" name="id3017864"></a><pre class="programlisting"><a href="glib-Basic-Types.html#gboolean">gboolean</a> g_bookmark_file_has_item (<a href="glib-Bookmark-file-parser.html#GBookmarkFile">GBookmarkFile</a> *bookmark,
642
const <a href="glib-Basic-Types.html#gchar">gchar</a> *uri);</pre>
644
Looks whether the desktop bookmark has an item with its URI set to <em class="parameter"><code>uri</code></em>.</p>
648
<div class="variablelist"><table border="0">
649
<col align="left" valign="top">
652
<td><span class="term"><em class="parameter"><code>bookmark</code></em> :</span></td>
653
<td> a <a href="glib-Bookmark-file-parser.html#GBookmarkFile"><span class="type">GBookmarkFile</span></a>
657
<td><span class="term"><em class="parameter"><code>uri</code></em> :</span></td>
662
<td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
663
<td> <a href="glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if <em class="parameter"><code>uri</code></em> is inside <em class="parameter"><code>bookmark</code></em>, <a href="glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> otherwise
669
<p class="since">Since 2.12
673
<div class="refsect2" lang="en">
674
<a name="id3017999"></a><h3>
675
<a name="g-bookmark-file-has-group"></a>g_bookmark_file_has_group ()</h3>
676
<a class="indexterm" name="id3018016"></a><pre class="programlisting"><a href="glib-Basic-Types.html#gboolean">gboolean</a> g_bookmark_file_has_group (<a href="glib-Bookmark-file-parser.html#GBookmarkFile">GBookmarkFile</a> *bookmark,
677
const <a href="glib-Basic-Types.html#gchar">gchar</a> *uri,
678
const <a href="glib-Basic-Types.html#gchar">gchar</a> *group,
679
<a href="glib-Error-Reporting.html#GError">GError</a> **error);</pre>
681
Checks whether <em class="parameter"><code>group</code></em> appears in the list of groups to which
682
the bookmark for <em class="parameter"><code>uri</code></em> belongs to.
685
In the event the URI cannot be found, <a href="glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> is returned and
686
<em class="parameter"><code>error</code></em> is set to <a 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>
690
<div class="variablelist"><table border="0">
691
<col align="left" valign="top">
694
<td><span class="term"><em class="parameter"><code>bookmark</code></em> :</span></td>
695
<td> a <a href="glib-Bookmark-file-parser.html#GBookmarkFile"><span class="type">GBookmarkFile</span></a>
699
<td><span class="term"><em class="parameter"><code>uri</code></em> :</span></td>
704
<td><span class="term"><em class="parameter"><code>group</code></em> :</span></td>
705
<td> the group name to be searched
709
<td><span class="term"><em class="parameter"><code>error</code></em> :</span></td>
710
<td> return location for a <a href="glib-Error-Reporting.html#GError"><span class="type">GError</span></a>, or <a href="glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>
714
<td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
715
<td> <a href="glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if <em class="parameter"><code>group</code></em> was found.
721
<p class="since">Since 2.12
725
<div class="refsect2" lang="en">
726
<a name="id3018234"></a><h3>
727
<a name="g-bookmark-file-has-application"></a>g_bookmark_file_has_application ()</h3>
728
<a class="indexterm" name="id3018250"></a><pre class="programlisting"><a href="glib-Basic-Types.html#gboolean">gboolean</a> g_bookmark_file_has_application (<a href="glib-Bookmark-file-parser.html#GBookmarkFile">GBookmarkFile</a> *bookmark,
729
const <a href="glib-Basic-Types.html#gchar">gchar</a> *uri,
730
const <a href="glib-Basic-Types.html#gchar">gchar</a> *name,
731
<a href="glib-Error-Reporting.html#GError">GError</a> **error);</pre>
733
Checks whether the bookmark for <em class="parameter"><code>uri</code></em> inside <em class="parameter"><code>bookmark</code></em> has been
734
registered by application <em class="parameter"><code>name</code></em>.
737
In the event the URI cannot be found, <a href="glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> is returned and
738
<em class="parameter"><code>error</code></em> is set to <a 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>
742
<div class="variablelist"><table border="0">
743
<col align="left" valign="top">
746
<td><span class="term"><em class="parameter"><code>bookmark</code></em> :</span></td>
747
<td> a <a href="glib-Bookmark-file-parser.html#GBookmarkFile"><span class="type">GBookmarkFile</span></a>
751
<td><span class="term"><em class="parameter"><code>uri</code></em> :</span></td>
756
<td><span class="term"><em class="parameter"><code>name</code></em> :</span></td>
757
<td> the name of the application
761
<td><span class="term"><em class="parameter"><code>error</code></em> :</span></td>
762
<td> return location for a <a href="glib-Error-Reporting.html#GError"><span class="type">GError</span></a> or <a href="glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>
766
<td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
767
<td> <a href="glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the application <em class="parameter"><code>name</code></em> was found
773
<p class="since">Since 2.12
777
<div class="refsect2" lang="en">
778
<a name="id3018474"></a><h3>
779
<a name="g-bookmark-file-get-size"></a>g_bookmark_file_get_size ()</h3>
780
<a class="indexterm" name="id3018489"></a><pre class="programlisting"><a href="glib-Basic-Types.html#gint">gint</a> g_bookmark_file_get_size (<a href="glib-Bookmark-file-parser.html#GBookmarkFile">GBookmarkFile</a> *bookmark);</pre>
782
Gets the number of bookmarks inside <em class="parameter"><code>bookmark</code></em>.</p>
786
<div class="variablelist"><table border="0">
787
<col align="left" valign="top">
790
<td><span class="term"><em class="parameter"><code>bookmark</code></em> :</span></td>
791
<td> a <a href="glib-Bookmark-file-parser.html#GBookmarkFile"><span class="type">GBookmarkFile</span></a>
795
<td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
796
<td> the number of bookmarks
802
<p class="since">Since 2.12
806
<div class="refsect2" lang="en">
807
<a name="id3018571"></a><h3>
808
<a name="g-bookmark-file-get-uris"></a>g_bookmark_file_get_uris ()</h3>
809
<a class="indexterm" name="id3018587"></a><pre class="programlisting"><a href="glib-Basic-Types.html#gchar">gchar</a>** g_bookmark_file_get_uris (<a href="glib-Bookmark-file-parser.html#GBookmarkFile">GBookmarkFile</a> *bookmark,
810
<a href="glib-Basic-Types.html#gsize">gsize</a> *length);</pre>
812
Returns all URIs of the bookmarks in the bookmark file <em class="parameter"><code>bookmark</code></em>.
813
The array of returned URIs will be <a href="glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>-terminated, so <em class="parameter"><code>length</code></em> may
814
optionally be <a href="glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>.</p>
818
<div class="variablelist"><table border="0">
819
<col align="left" valign="top">
822
<td><span class="term"><em class="parameter"><code>bookmark</code></em> :</span></td>
823
<td> a <a href="glib-Bookmark-file-parser.html#GBookmarkFile"><span class="type">GBookmarkFile</span></a>
827
<td><span class="term"><em class="parameter"><code>length</code></em> :</span></td>
828
<td> return location for the number of returned URIs, or <a href="glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>
832
<td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
833
<td> a newly allocated <a href="glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>-terminated array of strings.
834
Use <a href="glib-String-Utility-Functions.html#g-strfreev"><code class="function">g_strfreev()</code></a> to free it.
840
<p class="since">Since 2.12
844
<div class="refsect2" lang="en">
845
<a name="id3018750"></a><h3>
846
<a name="g-bookmark-file-get-title"></a>g_bookmark_file_get_title ()</h3>
847
<a class="indexterm" name="id3018766"></a><pre class="programlisting"><a href="glib-Basic-Types.html#gchar">gchar</a>* g_bookmark_file_get_title (<a href="glib-Bookmark-file-parser.html#GBookmarkFile">GBookmarkFile</a> *bookmark,
848
const <a href="glib-Basic-Types.html#gchar">gchar</a> *uri,
849
<a href="glib-Error-Reporting.html#GError">GError</a> **error);</pre>
851
Returns the title of the bookmark for <em class="parameter"><code>uri</code></em>.
854
If <em class="parameter"><code>uri</code></em> is <a href="glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>, the title of <em class="parameter"><code>bookmark</code></em> is returned.
857
In the event the URI cannot be found, <a href="glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> is returned and
858
<em class="parameter"><code>error</code></em> is set to <a 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>
862
<div class="variablelist"><table border="0">
863
<col align="left" valign="top">
866
<td><span class="term"><em class="parameter"><code>bookmark</code></em> :</span></td>
867
<td> a <a href="glib-Bookmark-file-parser.html#GBookmarkFile"><span class="type">GBookmarkFile</span></a>
871
<td><span class="term"><em class="parameter"><code>uri</code></em> :</span></td>
872
<td> a valid URI or <a href="glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>
876
<td><span class="term"><em class="parameter"><code>error</code></em> :</span></td>
877
<td> return location for a <a href="glib-Error-Reporting.html#GError"><span class="type">GError</span></a>, or <a href="glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>
881
<td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
882
<td> a newly allocated string or <a href="glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if the specified
889
<p class="since">Since 2.12
893
<div class="refsect2" lang="en">
894
<a name="id3018986"></a><h3>
895
<a name="g-bookmark-file-get-description"></a>g_bookmark_file_get_description ()</h3>
896
<a class="indexterm" name="id3019001"></a><pre class="programlisting"><a href="glib-Basic-Types.html#gchar">gchar</a>* g_bookmark_file_get_description (<a href="glib-Bookmark-file-parser.html#GBookmarkFile">GBookmarkFile</a> *bookmark,
897
const <a href="glib-Basic-Types.html#gchar">gchar</a> *uri,
898
<a href="glib-Error-Reporting.html#GError">GError</a> **error);</pre>
900
Retrieves the description of the bookmark for <em class="parameter"><code>uri</code></em>.
903
In the event the URI cannot be found, <a href="glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> is returned and
904
<em class="parameter"><code>error</code></em> is set to <a 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>
908
<div class="variablelist"><table border="0">
909
<col align="left" valign="top">
912
<td><span class="term"><em class="parameter"><code>bookmark</code></em> :</span></td>
913
<td> a <a href="glib-Bookmark-file-parser.html#GBookmarkFile"><span class="type">GBookmarkFile</span></a>
917
<td><span class="term"><em class="parameter"><code>uri</code></em> :</span></td>
922
<td><span class="term"><em class="parameter"><code>error</code></em> :</span></td>
923
<td> return location for a <a href="glib-Error-Reporting.html#GError"><span class="type">GError</span></a>, or <a href="glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>
927
<td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
928
<td> a newly allocated string or <a href="glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if the specified
935
<p class="since">Since 2.12
939
<div class="refsect2" lang="en">
940
<a name="id3019185"></a><h3>
941
<a name="g-bookmark-file-get-mime-type"></a>g_bookmark_file_get_mime_type ()</h3>
942
<a class="indexterm" name="id3019201"></a><pre class="programlisting"><a href="glib-Basic-Types.html#gchar">gchar</a>* g_bookmark_file_get_mime_type (<a href="glib-Bookmark-file-parser.html#GBookmarkFile">GBookmarkFile</a> *bookmark,
943
const <a href="glib-Basic-Types.html#gchar">gchar</a> *uri,
944
<a href="glib-Error-Reporting.html#GError">GError</a> **error);</pre>
946
Retrieves the MIME type of the resource pointed by <em class="parameter"><code>uri</code></em>.
949
In the event the URI cannot be found, <a href="glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> is returned and
950
<em class="parameter"><code>error</code></em> is set to <a 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
951
event that the MIME type cannot be found, <a href="glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> is returned and
952
<em class="parameter"><code>error</code></em> is set to <a 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>
956
<div class="variablelist"><table border="0">
957
<col align="left" valign="top">
960
<td><span class="term"><em class="parameter"><code>bookmark</code></em> :</span></td>
961
<td> a <a href="glib-Bookmark-file-parser.html#GBookmarkFile"><span class="type">GBookmarkFile</span></a>
965
<td><span class="term"><em class="parameter"><code>uri</code></em> :</span></td>
970
<td><span class="term"><em class="parameter"><code>error</code></em> :</span></td>
971
<td> return location for a <a href="glib-Error-Reporting.html#GError"><span class="type">GError</span></a>, or <a href="glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>
975
<td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
976
<td> a newly allocated string or <a href="glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if the specified
983
<p class="since">Since 2.12
987
<div class="refsect2" lang="en">
988
<a name="id3019413"></a><h3>
989
<a name="g-bookmark-file-get-is-private"></a>g_bookmark_file_get_is_private ()</h3>
990
<a class="indexterm" name="id3019428"></a><pre class="programlisting"><a href="glib-Basic-Types.html#gboolean">gboolean</a> g_bookmark_file_get_is_private (<a href="glib-Bookmark-file-parser.html#GBookmarkFile">GBookmarkFile</a> *bookmark,
991
const <a href="glib-Basic-Types.html#gchar">gchar</a> *uri,
992
<a href="glib-Error-Reporting.html#GError">GError</a> **error);</pre>
994
Gets whether the private flag of the bookmark for <em class="parameter"><code>uri</code></em> is set.
997
In the event the URI cannot be found, <a href="glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> is returned and
998
<em class="parameter"><code>error</code></em> is set to <a 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
999
event that the private flag cannot be found, <a href="glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> is returned and
1000
<em class="parameter"><code>error</code></em> is set to <a 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>
1004
<div class="variablelist"><table border="0">
1005
<col align="left" valign="top">
1008
<td><span class="term"><em class="parameter"><code>bookmark</code></em> :</span></td>
1009
<td> a <a href="glib-Bookmark-file-parser.html#GBookmarkFile"><span class="type">GBookmarkFile</span></a>
1013
<td><span class="term"><em class="parameter"><code>uri</code></em> :</span></td>
1018
<td><span class="term"><em class="parameter"><code>error</code></em> :</span></td>
1019
<td> return location for a <a href="glib-Error-Reporting.html#GError"><span class="type">GError</span></a>, or <a href="glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>
1023
<td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
1024
<td> <a href="glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the private flag is set, <a href="glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> otherwise.
1030
<p class="since">Since 2.12
1034
<div class="refsect2" lang="en">
1035
<a name="id3019650"></a><h3>
1036
<a name="g-bookmark-file-get-icon"></a>g_bookmark_file_get_icon ()</h3>
1037
<a class="indexterm" name="id3019666"></a><pre class="programlisting"><a href="glib-Basic-Types.html#gboolean">gboolean</a> g_bookmark_file_get_icon (<a href="glib-Bookmark-file-parser.html#GBookmarkFile">GBookmarkFile</a> *bookmark,
1038
const <a href="glib-Basic-Types.html#gchar">gchar</a> *uri,
1039
<a href="glib-Basic-Types.html#gchar">gchar</a> **href,
1040
<a href="glib-Basic-Types.html#gchar">gchar</a> **mime_type,
1041
<a href="glib-Error-Reporting.html#GError">GError</a> **error);</pre>
1043
Gets the icon of the bookmark for <em class="parameter"><code>uri</code></em>.
1046
In the event the URI cannot be found, <a href="glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> is returned and
1047
<em class="parameter"><code>error</code></em> is set to <a 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>
1051
<div class="variablelist"><table border="0">
1052
<col align="left" valign="top">
1055
<td><span class="term"><em class="parameter"><code>bookmark</code></em> :</span></td>
1056
<td> a <a href="glib-Bookmark-file-parser.html#GBookmarkFile"><span class="type">GBookmarkFile</span></a>
1060
<td><span class="term"><em class="parameter"><code>uri</code></em> :</span></td>
1065
<td><span class="term"><em class="parameter"><code>href</code></em> :</span></td>
1066
<td> return location for the icon's location or <a href="glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>
1070
<td><span class="term"><em class="parameter"><code>mime_type</code></em> :</span></td>
1071
<td> return location for the icon's MIME type or <a href="glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>
1075
<td><span class="term"><em class="parameter"><code>error</code></em> :</span></td>
1076
<td> return location for a <a href="glib-Error-Reporting.html#GError"><span class="type">GError</span></a> or <a href="glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>
1080
<td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
1081
<td> <a href="glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the icon for the bookmark for the URI was found.
1082
You should free the returned strings.
1088
<p class="since">Since 2.12
1092
<div class="refsect2" lang="en">
1093
<a name="id3019914"></a><h3>
1094
<a name="g-bookmark-file-get-added"></a>g_bookmark_file_get_added ()</h3>
1095
<a class="indexterm" name="id3019930"></a><pre class="programlisting">time_t g_bookmark_file_get_added (<a href="glib-Bookmark-file-parser.html#GBookmarkFile">GBookmarkFile</a> *bookmark,
1096
const <a href="glib-Basic-Types.html#gchar">gchar</a> *uri,
1097
<a href="glib-Error-Reporting.html#GError">GError</a> **error);</pre>
1099
Gets the time the bookmark for <em class="parameter"><code>uri</code></em> was added to <em class="parameter"><code>bookmark</code></em>
1102
In the event the URI cannot be found, -1 is returned and
1103
<em class="parameter"><code>error</code></em> is set to <a 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>
1107
<div class="variablelist"><table border="0">
1108
<col align="left" valign="top">
1111
<td><span class="term"><em class="parameter"><code>bookmark</code></em> :</span></td>
1112
<td> a <a href="glib-Bookmark-file-parser.html#GBookmarkFile"><span class="type">GBookmarkFile</span></a>
1116
<td><span class="term"><em class="parameter"><code>uri</code></em> :</span></td>
1121
<td><span class="term"><em class="parameter"><code>error</code></em> :</span></td>
1122
<td> return location for a <a href="glib-Error-Reporting.html#GError"><span class="type">GError</span></a>, or <a href="glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>
1126
<td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
1133
<p class="since">Since 2.12
1137
<div class="refsect2" lang="en">
1138
<a name="id3020099"></a><h3>
1139
<a name="g-bookmark-file-get-modified"></a>g_bookmark_file_get_modified ()</h3>
1140
<a class="indexterm" name="id3020115"></a><pre class="programlisting">time_t g_bookmark_file_get_modified (<a href="glib-Bookmark-file-parser.html#GBookmarkFile">GBookmarkFile</a> *bookmark,
1141
const <a href="glib-Basic-Types.html#gchar">gchar</a> *uri,
1142
<a href="glib-Error-Reporting.html#GError">GError</a> **error);</pre>
1144
Gets the time when the bookmark for <em class="parameter"><code>uri</code></em> was last modified.
1147
In the event the URI cannot be found, -1 is returned and
1148
<em class="parameter"><code>error</code></em> is set to <a 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>
1152
<div class="variablelist"><table border="0">
1153
<col align="left" valign="top">
1156
<td><span class="term"><em class="parameter"><code>bookmark</code></em> :</span></td>
1157
<td> a <a href="glib-Bookmark-file-parser.html#GBookmarkFile"><span class="type">GBookmarkFile</span></a>
1161
<td><span class="term"><em class="parameter"><code>uri</code></em> :</span></td>
1166
<td><span class="term"><em class="parameter"><code>error</code></em> :</span></td>
1167
<td> return location for a <a href="glib-Error-Reporting.html#GError"><span class="type">GError</span></a>, or <a href="glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>
1171
<td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
1178
<p class="since">Since 2.12
1182
<div class="refsect2" lang="en">
1183
<a name="id3020278"></a><h3>
1184
<a name="g-bookmark-file-get-visited"></a>g_bookmark_file_get_visited ()</h3>
1185
<a class="indexterm" name="id3020294"></a><pre class="programlisting">time_t g_bookmark_file_get_visited (<a href="glib-Bookmark-file-parser.html#GBookmarkFile">GBookmarkFile</a> *bookmark,
1186
const <a href="glib-Basic-Types.html#gchar">gchar</a> *uri,
1187
<a href="glib-Error-Reporting.html#GError">GError</a> **error);</pre>
1189
Gets the time the bookmark for <em class="parameter"><code>uri</code></em> was last visited.
1192
In the event the URI cannot be found, -1 is returned and
1193
<em class="parameter"><code>error</code></em> is set to <a 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>
1197
<div class="variablelist"><table border="0">
1198
<col align="left" valign="top">
1201
<td><span class="term"><em class="parameter"><code>bookmark</code></em> :</span></td>
1202
<td> a <a href="glib-Bookmark-file-parser.html#GBookmarkFile"><span class="type">GBookmarkFile</span></a>
1206
<td><span class="term"><em class="parameter"><code>uri</code></em> :</span></td>
1211
<td><span class="term"><em class="parameter"><code>error</code></em> :</span></td>
1212
<td> return location for a <a href="glib-Error-Reporting.html#GError"><span class="type">GError</span></a>, or <a href="glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>
1216
<td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
1223
<p class="since">Since 2.12
1227
<div class="refsect2" lang="en">
1228
<a name="id3020456"></a><h3>
1229
<a name="g-bookmark-file-get-groups"></a>g_bookmark_file_get_groups ()</h3>
1230
<a class="indexterm" name="id3020472"></a><pre class="programlisting"><a href="glib-Basic-Types.html#gchar">gchar</a>** g_bookmark_file_get_groups (<a href="glib-Bookmark-file-parser.html#GBookmarkFile">GBookmarkFile</a> *bookmark,
1231
const <a href="glib-Basic-Types.html#gchar">gchar</a> *uri,
1232
<a href="glib-Basic-Types.html#gsize">gsize</a> *length,
1233
<a href="glib-Error-Reporting.html#GError">GError</a> **error);</pre>
1235
Retrieves the list of group names of the bookmark for <em class="parameter"><code>uri</code></em>.
1238
In the event the URI cannot be found, <a href="glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> is returned and
1239
<em class="parameter"><code>error</code></em> is set to <a 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>.
1242
The returned array is <a href="glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> terminated, so <em class="parameter"><code>length</code></em> may optionally
1243
be <a href="glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>.</p>
1247
<div class="variablelist"><table border="0">
1248
<col align="left" valign="top">
1251
<td><span class="term"><em class="parameter"><code>bookmark</code></em> :</span></td>
1252
<td> a <a href="glib-Bookmark-file-parser.html#GBookmarkFile"><span class="type">GBookmarkFile</span></a>
1256
<td><span class="term"><em class="parameter"><code>uri</code></em> :</span></td>
1261
<td><span class="term"><em class="parameter"><code>length</code></em> :</span></td>
1262
<td> return location for the length of the returned string, or <a href="glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>
1266
<td><span class="term"><em class="parameter"><code>error</code></em> :</span></td>
1267
<td> return location for a <a href="glib-Error-Reporting.html#GError"><span class="type">GError</span></a>, or <a href="glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>
1271
<td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
1272
<td> a newly allocated <a href="glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>-terminated array of group names.
1273
Use <a href="glib-String-Utility-Functions.html#g-strfreev"><code class="function">g_strfreev()</code></a> to free it.
1279
<p class="since">Since 2.12
1283
<div class="refsect2" lang="en">
1284
<a name="id3020728"></a><h3>
1285
<a name="g-bookmark-file-get-applications"></a>g_bookmark_file_get_applications ()</h3>
1286
<a class="indexterm" name="id3020743"></a><pre class="programlisting"><a href="glib-Basic-Types.html#gchar">gchar</a>** g_bookmark_file_get_applications (<a href="glib-Bookmark-file-parser.html#GBookmarkFile">GBookmarkFile</a> *bookmark,
1287
const <a href="glib-Basic-Types.html#gchar">gchar</a> *uri,
1288
<a href="glib-Basic-Types.html#gsize">gsize</a> *length,
1289
<a href="glib-Error-Reporting.html#GError">GError</a> **error);</pre>
1291
Retrieves the names of the applications that have registered the
1292
bookmark for <em class="parameter"><code>uri</code></em>.
1295
In the event the URI cannot be found, <a href="glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> is returned and
1296
<em class="parameter"><code>error</code></em> is set to <a 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>
1300
<div class="variablelist"><table border="0">
1301
<col align="left" valign="top">
1304
<td><span class="term"><em class="parameter"><code>bookmark</code></em> :</span></td>
1305
<td> a <a href="glib-Bookmark-file-parser.html#GBookmarkFile"><span class="type">GBookmarkFile</span></a>
1309
<td><span class="term"><em class="parameter"><code>uri</code></em> :</span></td>
1314
<td><span class="term"><em class="parameter"><code>length</code></em> :</span></td>
1315
<td> return location of the length of the returned list, or <a href="glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>
1319
<td><span class="term"><em class="parameter"><code>error</code></em> :</span></td>
1320
<td> return location for a <a href="glib-Error-Reporting.html#GError"><span class="type">GError</span></a>, or <a href="glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>
1324
<td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
1325
<td> a newly allocated <a href="glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>-terminated array of strings.
1326
Use <a href="glib-String-Utility-Functions.html#g-strfreev"><code class="function">g_strfreev()</code></a> to free it.
1332
<p class="since">Since 2.12
1336
<div class="refsect2" lang="en">
1337
<a name="id3020971"></a><h3>
1338
<a name="g-bookmark-file-get-app-info"></a>g_bookmark_file_get_app_info ()</h3>
1339
<a class="indexterm" name="id3020986"></a><pre class="programlisting"><a href="glib-Basic-Types.html#gboolean">gboolean</a> g_bookmark_file_get_app_info (<a href="glib-Bookmark-file-parser.html#GBookmarkFile">GBookmarkFile</a> *bookmark,
1340
const <a href="glib-Basic-Types.html#gchar">gchar</a> *uri,
1341
const <a href="glib-Basic-Types.html#gchar">gchar</a> *name,
1342
<a href="glib-Basic-Types.html#gchar">gchar</a> **exec,
1343
<a href="glib-Basic-Types.html#guint">guint</a> *count,
1345
<a href="glib-Error-Reporting.html#GError">GError</a> **error);</pre>
1347
Gets the registration informations of <em class="parameter"><code>app_name</code></em> for the bookmark for
1348
<em class="parameter"><code>uri</code></em>. See <a href="glib-Bookmark-file-parser.html#g-bookmark-file-set-app-info"><code class="function">g_bookmark_file_set_app_info()</code></a> for more informations about
1352
The string returned in <em class="parameter"><code>app_exec</code></em> must be freed.
1355
In the event the URI cannot be found, <a href="glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> is returned and
1356
<em class="parameter"><code>error</code></em> is set to <a 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
1357
event that no application with name <em class="parameter"><code>app_name</code></em> has registered a bookmark
1358
for <em class="parameter"><code>uri</code></em>, <a href="glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> is returned and error is set to
1359
<a 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>
1363
<div class="variablelist"><table border="0">
1364
<col align="left" valign="top">
1367
<td><span class="term"><em class="parameter"><code>bookmark</code></em> :</span></td>
1368
<td> a <a href="glib-Bookmark-file-parser.html#GBookmarkFile"><span class="type">GBookmarkFile</span></a>
1372
<td><span class="term"><em class="parameter"><code>uri</code></em> :</span></td>
1377
<td><span class="term"><em class="parameter"><code>name</code></em> :</span></td>
1378
<td> an application's name
1382
<td><span class="term"><em class="parameter"><code>exec</code></em> :</span></td>
1383
<td> location for the command line of the application, or <a href="glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>
1387
<td><span class="term"><em class="parameter"><code>count</code></em> :</span></td>
1388
<td> return location for the registration count, or <a href="glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>
1392
<td><span class="term"><em class="parameter"><code>stamp</code></em> :</span></td>
1393
<td> return location for the last registration time, or <a href="glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>
1397
<td><span class="term"><em class="parameter"><code>error</code></em> :</span></td>
1398
<td> return location for a <a href="glib-Error-Reporting.html#GError"><span class="type">GError</span></a>, or <a href="glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>
1402
<td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
1403
<td> <a href="glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> on success.
1409
<p class="since">Since 2.12
1413
<div class="refsect2" lang="en">
1414
<a name="id3021351"></a><h3>
1415
<a name="g-bookmark-file-set-title"></a>g_bookmark_file_set_title ()</h3>
1416
<a class="indexterm" name="id3021367"></a><pre class="programlisting">void g_bookmark_file_set_title (<a href="glib-Bookmark-file-parser.html#GBookmarkFile">GBookmarkFile</a> *bookmark,
1417
const <a href="glib-Basic-Types.html#gchar">gchar</a> *uri,
1418
const <a href="glib-Basic-Types.html#gchar">gchar</a> *title);</pre>
1420
Sets <em class="parameter"><code>title</code></em> as the title of the bookmark for <em class="parameter"><code>uri</code></em> inside the
1421
bookmark file <em class="parameter"><code>bookmark</code></em>.
1424
If <em class="parameter"><code>uri</code></em> is <a href="glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>, the title of <em class="parameter"><code>bookmark</code></em> is set.
1427
If a bookmark for <em class="parameter"><code>uri</code></em> cannot be found then it is created.</p>
1431
<div class="variablelist"><table border="0">
1432
<col align="left" valign="top">
1435
<td><span class="term"><em class="parameter"><code>bookmark</code></em> :</span></td>
1436
<td> a <a href="glib-Bookmark-file-parser.html#GBookmarkFile"><span class="type">GBookmarkFile</span></a>
1440
<td><span class="term"><em class="parameter"><code>uri</code></em> :</span></td>
1441
<td> a valid URI or <a href="glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>
1445
<td><span class="term"><em class="parameter"><code>title</code></em> :</span></td>
1446
<td> a UTF-8 encoded string
1451
<p class="since">Since 2.12
1455
<div class="refsect2" lang="en">
1456
<a name="id3021539"></a><h3>
1457
<a name="g-bookmark-file-set-description"></a>g_bookmark_file_set_description ()</h3>
1458
<a class="indexterm" name="id3021555"></a><pre class="programlisting">void g_bookmark_file_set_description (<a href="glib-Bookmark-file-parser.html#GBookmarkFile">GBookmarkFile</a> *bookmark,
1459
const <a href="glib-Basic-Types.html#gchar">gchar</a> *uri,
1460
const <a href="glib-Basic-Types.html#gchar">gchar</a> *description);</pre>
1462
Sets <em class="parameter"><code>description</code></em> as the description of the bookmark for <em class="parameter"><code>uri</code></em>.
1465
If <em class="parameter"><code>uri</code></em> is <a href="glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>, the description of <em class="parameter"><code>bookmark</code></em> is set.
1468
If a bookmark for <em class="parameter"><code>uri</code></em> cannot be found then it is created.</p>
1472
<div class="variablelist"><table border="0">
1473
<col align="left" valign="top">
1476
<td><span class="term"><em class="parameter"><code>bookmark</code></em> :</span></td>
1477
<td> a <a href="glib-Bookmark-file-parser.html#GBookmarkFile"><span class="type">GBookmarkFile</span></a>
1481
<td><span class="term"><em class="parameter"><code>uri</code></em> :</span></td>
1482
<td> a valid URI or <a href="glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>
1486
<td><span class="term"><em class="parameter"><code>description</code></em> :</span></td>
1492
<p class="since">Since 2.12
1496
<div class="refsect2" lang="en">
1497
<a name="id3021722"></a><h3>
1498
<a name="g-bookmark-file-set-mime-type"></a>g_bookmark_file_set_mime_type ()</h3>
1499
<a class="indexterm" name="id3021737"></a><pre class="programlisting">void g_bookmark_file_set_mime_type (<a href="glib-Bookmark-file-parser.html#GBookmarkFile">GBookmarkFile</a> *bookmark,
1500
const <a href="glib-Basic-Types.html#gchar">gchar</a> *uri,
1501
const <a href="glib-Basic-Types.html#gchar">gchar</a> *mime_type);</pre>
1503
Sets <em class="parameter"><code>mime_type</code></em> as the MIME type of the bookmark for <em class="parameter"><code>uri</code></em>.
1506
If a bookmark for <em class="parameter"><code>uri</code></em> cannot be found then it is created.</p>
1510
<div class="variablelist"><table border="0">
1511
<col align="left" valign="top">
1514
<td><span class="term"><em class="parameter"><code>bookmark</code></em> :</span></td>
1515
<td> a <a href="glib-Bookmark-file-parser.html#GBookmarkFile"><span class="type">GBookmarkFile</span></a>
1519
<td><span class="term"><em class="parameter"><code>uri</code></em> :</span></td>
1524
<td><span class="term"><em class="parameter"><code>mime_type</code></em> :</span></td>
1530
<p class="since">Since 2.12
1534
<div class="refsect2" lang="en">
1535
<a name="id3021868"></a><h3>
1536
<a name="g-bookmark-file-set-is-private"></a>g_bookmark_file_set_is_private ()</h3>
1537
<a class="indexterm" name="id3021884"></a><pre class="programlisting">void g_bookmark_file_set_is_private (<a href="glib-Bookmark-file-parser.html#GBookmarkFile">GBookmarkFile</a> *bookmark,
1538
const <a href="glib-Basic-Types.html#gchar">gchar</a> *uri,
1539
<a href="glib-Basic-Types.html#gboolean">gboolean</a> is_private);</pre>
1541
Sets the private flag of the bookmark for <em class="parameter"><code>uri</code></em>.
1544
If a bookmark for <em class="parameter"><code>uri</code></em> cannot be found then it is created.</p>
1548
<div class="variablelist"><table border="0">
1549
<col align="left" valign="top">
1552
<td><span class="term"><em class="parameter"><code>bookmark</code></em> :</span></td>
1553
<td> a <a href="glib-Bookmark-file-parser.html#GBookmarkFile"><span class="type">GBookmarkFile</span></a>
1557
<td><span class="term"><em class="parameter"><code>uri</code></em> :</span></td>
1562
<td><span class="term"><em class="parameter"><code>is_private</code></em> :</span></td>
1563
<td> <a href="glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the bookmark should be marked as private
1568
<p class="since">Since 2.12
1572
<div class="refsect2" lang="en">
1573
<a name="id3022020"></a><h3>
1574
<a name="g-bookmark-file-set-icon"></a>g_bookmark_file_set_icon ()</h3>
1575
<a class="indexterm" name="id3022035"></a><pre class="programlisting">void g_bookmark_file_set_icon (<a href="glib-Bookmark-file-parser.html#GBookmarkFile">GBookmarkFile</a> *bookmark,
1576
const <a href="glib-Basic-Types.html#gchar">gchar</a> *uri,
1577
const <a href="glib-Basic-Types.html#gchar">gchar</a> *href,
1578
const <a href="glib-Basic-Types.html#gchar">gchar</a> *mime_type);</pre>
1580
Sets the icon for the bookmark for <em class="parameter"><code>uri</code></em>. If <em class="parameter"><code>href</code></em> is <a href="glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>, unsets
1581
the currently set icon.
1584
If no bookmark for <em class="parameter"><code>uri</code></em> is found it is created.</p>
1588
<div class="variablelist"><table border="0">
1589
<col align="left" valign="top">
1592
<td><span class="term"><em class="parameter"><code>bookmark</code></em> :</span></td>
1593
<td> a <a href="glib-Bookmark-file-parser.html#GBookmarkFile"><span class="type">GBookmarkFile</span></a>
1597
<td><span class="term"><em class="parameter"><code>uri</code></em> :</span></td>
1602
<td><span class="term"><em class="parameter"><code>href</code></em> :</span></td>
1603
<td> the URI of the icon for the bookmark, or <a href="glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>
1607
<td><span class="term"><em class="parameter"><code>mime_type</code></em> :</span></td>
1608
<td> the MIME type of the icon for the bookmark
1613
<p class="since">Since 2.12
1617
<div class="refsect2" lang="en">
1618
<a name="id3022209"></a><h3>
1619
<a name="g-bookmark-file-set-added"></a>g_bookmark_file_set_added ()</h3>
1620
<a class="indexterm" name="id3022225"></a><pre class="programlisting">void g_bookmark_file_set_added (<a href="glib-Bookmark-file-parser.html#GBookmarkFile">GBookmarkFile</a> *bookmark,
1621
const <a href="glib-Basic-Types.html#gchar">gchar</a> *uri,
1622
time_t added);</pre>
1624
Sets the time the bookmark for <em class="parameter"><code>uri</code></em> was added into <em class="parameter"><code>bookmark</code></em>.
1627
If no bookmark for <em class="parameter"><code>uri</code></em> is found then it is created.</p>
1631
<div class="variablelist"><table border="0">
1632
<col align="left" valign="top">
1635
<td><span class="term"><em class="parameter"><code>bookmark</code></em> :</span></td>
1636
<td> a <a href="glib-Bookmark-file-parser.html#GBookmarkFile"><span class="type">GBookmarkFile</span></a>
1640
<td><span class="term"><em class="parameter"><code>uri</code></em> :</span></td>
1645
<td><span class="term"><em class="parameter"><code>added</code></em> :</span></td>
1646
<td> a timestamp or -1 to use the current time
1651
<p class="since">Since 2.12
1655
<div class="refsect2" lang="en">
1656
<a name="id3022356"></a><h3>
1657
<a name="g-bookmark-file-set-groups"></a>g_bookmark_file_set_groups ()</h3>
1658
<a class="indexterm" name="id3022372"></a><pre class="programlisting">void g_bookmark_file_set_groups (<a href="glib-Bookmark-file-parser.html#GBookmarkFile">GBookmarkFile</a> *bookmark,
1659
const <a href="glib-Basic-Types.html#gchar">gchar</a> *uri,
1660
const <a href="glib-Basic-Types.html#gchar">gchar</a> **groups,
1661
<a href="glib-Basic-Types.html#gsize">gsize</a> length);</pre>
1663
Sets a list of group names for the item with URI <em class="parameter"><code>uri</code></em>. Each previously
1664
set group name list is removed.
1667
If <em class="parameter"><code>uri</code></em> cannot be found then an item for it is created.</p>
1671
<div class="variablelist"><table border="0">
1672
<col align="left" valign="top">
1675
<td><span class="term"><em class="parameter"><code>bookmark</code></em> :</span></td>
1676
<td> a <a href="glib-Bookmark-file-parser.html#GBookmarkFile"><span class="type">GBookmarkFile</span></a>
1680
<td><span class="term"><em class="parameter"><code>uri</code></em> :</span></td>
1685
<td><span class="term"><em class="parameter"><code>groups</code></em> :</span></td>
1686
<td> an array of group names, or <a href="glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> to remove all groups
1690
<td><span class="term"><em class="parameter"><code>length</code></em> :</span></td>
1691
<td> number of group name values in <em class="parameter"><code>groups</code></em>
1696
<p class="since">Since 2.12
1700
<div class="refsect2" lang="en">
1701
<a name="id3022536"></a><h3>
1702
<a name="g-bookmark-file-set-modified"></a>g_bookmark_file_set_modified ()</h3>
1703
<a class="indexterm" name="id3022551"></a><pre class="programlisting">void g_bookmark_file_set_modified (<a href="glib-Bookmark-file-parser.html#GBookmarkFile">GBookmarkFile</a> *bookmark,
1704
const <a href="glib-Basic-Types.html#gchar">gchar</a> *uri,
1705
time_t modified);</pre>
1707
Sets the last time the bookmark for <em class="parameter"><code>uri</code></em> was last modified.
1710
If no bookmark for <em class="parameter"><code>uri</code></em> is found then it is created.
1713
The "modified" time should only be set when the bookmark's meta-data
1714
was actually changed. Every function of <a href="glib-Bookmark-file-parser.html#GBookmarkFile"><span class="type">GBookmarkFile</span></a> that
1715
modifies a bookmark also changes the modification time, except for
1716
<a href="glib-Bookmark-file-parser.html#g-bookmark-file-set-visited"><code class="function">g_bookmark_file_set_visited()</code></a>.</p>
1720
<div class="variablelist"><table border="0">
1721
<col align="left" valign="top">
1724
<td><span class="term"><em class="parameter"><code>bookmark</code></em> :</span></td>
1725
<td> a <a href="glib-Bookmark-file-parser.html#GBookmarkFile"><span class="type">GBookmarkFile</span></a>
1729
<td><span class="term"><em class="parameter"><code>uri</code></em> :</span></td>
1734
<td><span class="term"><em class="parameter"><code>modified</code></em> :</span></td>
1735
<td> a timestamp or -1 to use the current time
1740
<p class="since">Since 2.12
1744
<div class="refsect2" lang="en">
1745
<a name="id3022703"></a><h3>
1746
<a name="g-bookmark-file-set-visited"></a>g_bookmark_file_set_visited ()</h3>
1747
<a class="indexterm" name="id3022719"></a><pre class="programlisting">void g_bookmark_file_set_visited (<a href="glib-Bookmark-file-parser.html#GBookmarkFile">GBookmarkFile</a> *bookmark,
1748
const <a href="glib-Basic-Types.html#gchar">gchar</a> *uri,
1749
time_t visited);</pre>
1751
Sets the time the bookmark for <em class="parameter"><code>uri</code></em> was last visited.
1754
If no bookmark for <em class="parameter"><code>uri</code></em> is found then it is created.
1757
The "visited" time should only be set if the bookmark was launched,
1758
either using the command line retrieved by <a href="glib-Bookmark-file-parser.html#g-bookmark-file-get-app-info"><code class="function">g_bookmark_file_get_app_info()</code></a>
1759
or by the default application for the bookmark's MIME type, retrieved
1760
using <a href="glib-Bookmark-file-parser.html#g-bookmark-file-get-mime-type"><code class="function">g_bookmark_file_get_mime_type()</code></a>. Changing the "visited" time
1761
does not affect the "modified" time.</p>
1765
<div class="variablelist"><table border="0">
1766
<col align="left" valign="top">
1769
<td><span class="term"><em class="parameter"><code>bookmark</code></em> :</span></td>
1770
<td> a <a href="glib-Bookmark-file-parser.html#GBookmarkFile"><span class="type">GBookmarkFile</span></a>
1774
<td><span class="term"><em class="parameter"><code>uri</code></em> :</span></td>
1779
<td><span class="term"><em class="parameter"><code>visited</code></em> :</span></td>
1780
<td> a timestamp or -1 to use the current time
1785
<p class="since">Since 2.12
1789
<div class="refsect2" lang="en">
1790
<a name="id3022874"></a><h3>
1791
<a name="g-bookmark-file-set-app-info"></a>g_bookmark_file_set_app_info ()</h3>
1792
<a class="indexterm" name="id3022889"></a><pre class="programlisting"><a href="glib-Basic-Types.html#gboolean">gboolean</a> g_bookmark_file_set_app_info (<a href="glib-Bookmark-file-parser.html#GBookmarkFile">GBookmarkFile</a> *bookmark,
1793
const <a href="glib-Basic-Types.html#gchar">gchar</a> *uri,
1794
const <a href="glib-Basic-Types.html#gchar">gchar</a> *name,
1795
const <a href="glib-Basic-Types.html#gchar">gchar</a> *exec,
1796
<a href="glib-Basic-Types.html#gint">gint</a> count,
1798
<a href="glib-Error-Reporting.html#GError">GError</a> **error);</pre>
1800
Sets the meta-data of application <em class="parameter"><code>name</code></em> inside the list of
1801
applications that have registered a bookmark for <em class="parameter"><code>uri</code></em> inside
1802
<em class="parameter"><code>bookmark</code></em>.
1805
You should rarely use this function; use <a href="glib-Bookmark-file-parser.html#g-bookmark-file-add-application"><code class="function">g_bookmark_file_add_application()</code></a>
1806
and <a href="glib-Bookmark-file-parser.html#g-bookmark-file-remove-application"><code class="function">g_bookmark_file_remove_application()</code></a> instead.
1809
<em class="parameter"><code>name</code></em> can be any UTF-8 encoded string used to identify an
1811
<em class="parameter"><code>exec</code></em> can have one of these two modifiers: "<code class="literal">f</code>", which will
1812
be expanded as the local file name retrieved from the bookmark's
1813
URI; "<code class="literal">u</code>", which will be expanded as the bookmark's URI.
1814
The expansion is done automatically when retrieving the stored
1815
command line using the <a href="glib-Bookmark-file-parser.html#g-bookmark-file-get-app-info"><code class="function">g_bookmark_file_get_app_info()</code></a> function.
1816
<em class="parameter"><code>count</code></em> is the number of times the application has registered the
1817
bookmark; if is < 0, the current registration count will be increased
1818
by one, if is 0, the application with <em class="parameter"><code>name</code></em> will be removed from
1819
the list of registered applications.
1820
<em class="parameter"><code>stamp</code></em> is the Unix time of the last registration; if it is -1, the
1821
current time will be used.
1824
If you try to remove an application by setting its registration count to
1825
zero, and no bookmark for <em class="parameter"><code>uri</code></em> is found, <a href="glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> is returned and
1826
<em class="parameter"><code>error</code></em> is set to <a 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,
1827
in the event that no application <em class="parameter"><code>name</code></em> has registered a bookmark
1828
for <em class="parameter"><code>uri</code></em>, <a href="glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> is returned and error is set to
1829
<a 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
1830
for <em class="parameter"><code>uri</code></em> is found, one is created.</p>
1834
<div class="variablelist"><table border="0">
1835
<col align="left" valign="top">
1838
<td><span class="term"><em class="parameter"><code>bookmark</code></em> :</span></td>
1839
<td> a <a href="glib-Bookmark-file-parser.html#GBookmarkFile"><span class="type">GBookmarkFile</span></a>
1843
<td><span class="term"><em class="parameter"><code>uri</code></em> :</span></td>
1848
<td><span class="term"><em class="parameter"><code>name</code></em> :</span></td>
1849
<td> an application's name
1853
<td><span class="term"><em class="parameter"><code>exec</code></em> :</span></td>
1854
<td> an application's command line
1858
<td><span class="term"><em class="parameter"><code>count</code></em> :</span></td>
1859
<td> the number of registrations done for this application
1863
<td><span class="term"><em class="parameter"><code>stamp</code></em> :</span></td>
1864
<td> the time of the last registration for this application
1868
<td><span class="term"><em class="parameter"><code>error</code></em> :</span></td>
1869
<td> return location for a <a href="glib-Error-Reporting.html#GError"><span class="type">GError</span></a> or <a href="glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>
1873
<td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
1874
<td> <a href="glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the application's meta-data was successfully
1881
<p class="since">Since 2.12
1885
<div class="refsect2" lang="en">
1886
<a name="id3023330"></a><h3>
1887
<a name="g-bookmark-file-add-group"></a>g_bookmark_file_add_group ()</h3>
1888
<a class="indexterm" name="id3023346"></a><pre class="programlisting">void g_bookmark_file_add_group (<a href="glib-Bookmark-file-parser.html#GBookmarkFile">GBookmarkFile</a> *bookmark,
1889
const <a href="glib-Basic-Types.html#gchar">gchar</a> *uri,
1890
const <a href="glib-Basic-Types.html#gchar">gchar</a> *group);</pre>
1892
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>
1896
If no bookmark for <em class="parameter"><code>uri</code></em> is found then it is created.</p>
1900
<div class="variablelist"><table border="0">
1901
<col align="left" valign="top">
1904
<td><span class="term"><em class="parameter"><code>bookmark</code></em> :</span></td>
1905
<td> a <a href="glib-Bookmark-file-parser.html#GBookmarkFile"><span class="type">GBookmarkFile</span></a>
1909
<td><span class="term"><em class="parameter"><code>uri</code></em> :</span></td>
1914
<td><span class="term"><em class="parameter"><code>group</code></em> :</span></td>
1915
<td> the group name to be added
1920
<p class="since">Since 2.12
1924
<div class="refsect2" lang="en">
1925
<a name="id3023477"></a><h3>
1926
<a name="g-bookmark-file-add-application"></a>g_bookmark_file_add_application ()</h3>
1927
<a class="indexterm" name="id3023493"></a><pre class="programlisting">void g_bookmark_file_add_application (<a href="glib-Bookmark-file-parser.html#GBookmarkFile">GBookmarkFile</a> *bookmark,
1928
const <a href="glib-Basic-Types.html#gchar">gchar</a> *uri,
1929
const <a href="glib-Basic-Types.html#gchar">gchar</a> *name,
1930
const <a href="glib-Basic-Types.html#gchar">gchar</a> *exec);</pre>
1932
Adds the application with <em class="parameter"><code>name</code></em> and <em class="parameter"><code>exec</code></em> to the list of
1933
applications that have registered a bookmark for <em class="parameter"><code>uri</code></em> into
1934
<em class="parameter"><code>bookmark</code></em>.
1937
Every bookmark inside a <a href="glib-Bookmark-file-parser.html#GBookmarkFile"><span class="type">GBookmarkFile</span></a> must have at least an
1938
application registered. Each application must provide a name, a
1939
command line useful for launching the bookmark, the number of times
1940
the bookmark has been registered by the application and the last
1941
time the application registered this bookmark.
1944
If <em class="parameter"><code>name</code></em> is <a href="glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>, the name of the application will be the
1945
same returned by <code class="function">g_get_application()</code>; if <em class="parameter"><code>exec</code></em> is <a href="glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>, the
1946
command line will be a composition of the program name as
1947
returned by <a href="glib-Miscellaneous-Utility-Functions.html#g-get-prgname"><code class="function">g_get_prgname()</code></a> and the "<code class="literal">u</code>" modifier, which will be
1948
expanded to the bookmark's URI.
1951
This function will automatically take care of updating the
1952
registrations count and timestamping in case an application
1953
with the same <em class="parameter"><code>name</code></em> had already registered a bookmark for
1954
<em class="parameter"><code>uri</code></em> inside <em class="parameter"><code>bookmark</code></em>.
1957
If no bookmark for <em class="parameter"><code>uri</code></em> is found, one is created.</p>
1961
<div class="variablelist"><table border="0">
1962
<col align="left" valign="top">
1965
<td><span class="term"><em class="parameter"><code>bookmark</code></em> :</span></td>
1966
<td> a <a href="glib-Bookmark-file-parser.html#GBookmarkFile"><span class="type">GBookmarkFile</span></a>
1970
<td><span class="term"><em class="parameter"><code>uri</code></em> :</span></td>
1975
<td><span class="term"><em class="parameter"><code>name</code></em> :</span></td>
1976
<td> the name of the application registering the bookmark
1977
or <a href="glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>
1981
<td><span class="term"><em class="parameter"><code>exec</code></em> :</span></td>
1982
<td> command line to be used to launch the bookmark or <a href="glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>
1987
<p class="since">Since 2.12
1991
<div class="refsect2" lang="en">
1992
<a name="id3023791"></a><h3>
1993
<a name="g-bookmark-file-remove-group"></a>g_bookmark_file_remove_group ()</h3>
1994
<a class="indexterm" name="id3023806"></a><pre class="programlisting"><a href="glib-Basic-Types.html#gboolean">gboolean</a> g_bookmark_file_remove_group (<a href="glib-Bookmark-file-parser.html#GBookmarkFile">GBookmarkFile</a> *bookmark,
1995
const <a href="glib-Basic-Types.html#gchar">gchar</a> *uri,
1996
const <a href="glib-Basic-Types.html#gchar">gchar</a> *group,
1997
<a href="glib-Error-Reporting.html#GError">GError</a> **error);</pre>
1999
Removes <em class="parameter"><code>group</code></em> from the list of groups to which the bookmark
2000
for <em class="parameter"><code>uri</code></em> belongs to.
2003
In the event the URI cannot be found, <a href="glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> is returned and
2004
<em class="parameter"><code>error</code></em> is set to <a 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>.
2005
In the event no group was defined, <a href="glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> is returned and
2006
<em class="parameter"><code>error</code></em> is set to <a 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>
2010
<div class="variablelist"><table border="0">
2011
<col align="left" valign="top">
2014
<td><span class="term"><em class="parameter"><code>bookmark</code></em> :</span></td>
2015
<td> a <a href="glib-Bookmark-file-parser.html#GBookmarkFile"><span class="type">GBookmarkFile</span></a>
2019
<td><span class="term"><em class="parameter"><code>uri</code></em> :</span></td>
2024
<td><span class="term"><em class="parameter"><code>group</code></em> :</span></td>
2025
<td> the group name to be removed
2029
<td><span class="term"><em class="parameter"><code>error</code></em> :</span></td>
2030
<td> return location for a <a href="glib-Error-Reporting.html#GError"><span class="type">GError</span></a>, or <a href="glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>
2034
<td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
2035
<td> <a href="glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if <em class="parameter"><code>group</code></em> was successfully removed.
2041
<p class="since">Since 2.12
2045
<div class="refsect2" lang="en">
2046
<a name="id3024051"></a><h3>
2047
<a name="g-bookmark-file-remove-application"></a>g_bookmark_file_remove_application ()</h3>
2048
<a class="indexterm" name="id3024067"></a><pre class="programlisting"><a href="glib-Basic-Types.html#gboolean">gboolean</a> g_bookmark_file_remove_application (<a href="glib-Bookmark-file-parser.html#GBookmarkFile">GBookmarkFile</a> *bookmark,
2049
const <a href="glib-Basic-Types.html#gchar">gchar</a> *uri,
2050
const <a href="glib-Basic-Types.html#gchar">gchar</a> *name,
2051
<a href="glib-Error-Reporting.html#GError">GError</a> **error);</pre>
2053
Removes application registered with <em class="parameter"><code>name</code></em> from the list of applications
2054
that have registered a bookmark for <em class="parameter"><code>uri</code></em> inside <em class="parameter"><code>bookmark</code></em>.
2057
In the event the URI cannot be found, <a href="glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> is returned and
2058
<em class="parameter"><code>error</code></em> is set to <a 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>.
2059
In the event that no application with name <em class="parameter"><code>app_name</code></em> has registered
2060
a bookmark for <em class="parameter"><code>uri</code></em>, <a href="glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> is returned and error is set to
2061
<a 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>
2065
<div class="variablelist"><table border="0">
2066
<col align="left" valign="top">
2069
<td><span class="term"><em class="parameter"><code>bookmark</code></em> :</span></td>
2070
<td> a <a href="glib-Bookmark-file-parser.html#GBookmarkFile"><span class="type">GBookmarkFile</span></a>
2074
<td><span class="term"><em class="parameter"><code>uri</code></em> :</span></td>
2079
<td><span class="term"><em class="parameter"><code>name</code></em> :</span></td>
2080
<td> the name of the application
2084
<td><span class="term"><em class="parameter"><code>error</code></em> :</span></td>
2085
<td> return location for a <a href="glib-Error-Reporting.html#GError"><span class="type">GError</span></a> or <a href="glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>
2089
<td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
2090
<td> <a href="glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the application was successfully removed.
2096
<p class="since">Since 2.12
2100
<div class="refsect2" lang="en">
2101
<a name="id3024318"></a><h3>
2102
<a name="g-bookmark-file-remove-item"></a>g_bookmark_file_remove_item ()</h3>
2103
<a class="indexterm" name="id3024334"></a><pre class="programlisting"><a href="glib-Basic-Types.html#gboolean">gboolean</a> g_bookmark_file_remove_item (<a href="glib-Bookmark-file-parser.html#GBookmarkFile">GBookmarkFile</a> *bookmark,
2104
const <a href="glib-Basic-Types.html#gchar">gchar</a> *uri,
2105
<a href="glib-Error-Reporting.html#GError">GError</a> **error);</pre>
2107
Removes the bookmark for <em class="parameter"><code>uri</code></em> from the bookmark file <em class="parameter"><code>bookmark</code></em>.</p>
2111
<div class="variablelist"><table border="0">
2112
<col align="left" valign="top">
2115
<td><span class="term"><em class="parameter"><code>bookmark</code></em> :</span></td>
2116
<td> a <a href="glib-Bookmark-file-parser.html#GBookmarkFile"><span class="type">GBookmarkFile</span></a>
2120
<td><span class="term"><em class="parameter"><code>uri</code></em> :</span></td>
2125
<td><span class="term"><em class="parameter"><code>error</code></em> :</span></td>
2126
<td> return location for a <a href="glib-Error-Reporting.html#GError"><span class="type">GError</span></a>, or <a href="glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>
2130
<td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
2131
<td> <a href="glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the bookmark was removed successfully.
2137
<p class="since">Since 2.12
2141
<div class="refsect2" lang="en">
2142
<a name="id3024493"></a><h3>
2143
<a name="g-bookmark-file-move-item"></a>g_bookmark_file_move_item ()</h3>
2144
<a class="indexterm" name="id3024509"></a><pre class="programlisting"><a href="glib-Basic-Types.html#gboolean">gboolean</a> g_bookmark_file_move_item (<a href="glib-Bookmark-file-parser.html#GBookmarkFile">GBookmarkFile</a> *bookmark,
2145
const <a href="glib-Basic-Types.html#gchar">gchar</a> *old_uri,
2146
const <a href="glib-Basic-Types.html#gchar">gchar</a> *new_uri,
2147
<a href="glib-Error-Reporting.html#GError">GError</a> **error);</pre>
2149
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
2150
existing bookmark for <em class="parameter"><code>new_uri</code></em> will be overwritten. If <em class="parameter"><code>new_uri</code></em> is
2151
<a href="glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>, then the bookmark is removed.
2154
In the event the URI cannot be found, <a href="glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> is returned and
2155
<em class="parameter"><code>error</code></em> is set to <a 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>
2159
<div class="variablelist"><table border="0">
2160
<col align="left" valign="top">
2163
<td><span class="term"><em class="parameter"><code>bookmark</code></em> :</span></td>
2164
<td> a <a href="glib-Bookmark-file-parser.html#GBookmarkFile"><span class="type">GBookmarkFile</span></a>
2168
<td><span class="term"><em class="parameter"><code>old_uri</code></em> :</span></td>
2173
<td><span class="term"><em class="parameter"><code>new_uri</code></em> :</span></td>
2174
<td> a valid URI, or <a href="glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>
2178
<td><span class="term"><em class="parameter"><code>error</code></em> :</span></td>
2179
<td> return location for a <a href="glib-Error-Reporting.html#GError"><span class="type">GError</span></a> or <a href="glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>
2183
<td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
2184
<td> <a href="glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the URI was successfully changed
2190
<p class="since">Since 2.12