📄 glib-bookmark-file-parser.html
字号:
<a name="g-bookmark-file-get-size"></a>g_bookmark_file_get_size ()</h3><a class="indexterm" name="id3200553"></a><pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gint">gint</a> g_bookmark_file_get_size (<a class="link" href="glib-Bookmark-file-parser.html#GBookmarkFile">GBookmarkFile</a> *bookmark);</pre><p>Gets the number of bookmarks inside <em class="parameter"><code>bookmark</code></em>.</p><p></p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><p><span class="term"><em class="parameter"><code>bookmark</code></em> :</span></p></td><td> a <a class="link" href="glib-Bookmark-file-parser.html#GBookmarkFile"><span class="type">GBookmarkFile</span></a></td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td> the number of bookmarks</td></tr></tbody></table></div><p class="since">Since 2.12</p></div><hr><div class="refsect2" lang="en"><a name="id3200634"></a><h3><a name="g-bookmark-file-get-uris"></a>g_bookmark_file_get_uris ()</h3><a class="indexterm" name="id3200650"></a><pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gchar">gchar</a>** g_bookmark_file_get_uris (<a class="link" href="glib-Bookmark-file-parser.html#GBookmarkFile">GBookmarkFile</a> *bookmark, <a class="link" href="glib-Basic-Types.html#gsize">gsize</a> *length);</pre><p>Returns all URIs of the bookmarks in the bookmark file <em class="parameter"><code>bookmark</code></em>.The array of returned URIs will be <a class="link" href="glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>-terminated, so <em class="parameter"><code>length</code></em> mayoptionally be <a class="link" href="glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>.</p><p></p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><p><span class="term"><em class="parameter"><code>bookmark</code></em> :</span></p></td><td> a <a class="link" href="glib-Bookmark-file-parser.html#GBookmarkFile"><span class="type">GBookmarkFile</span></a></td></tr><tr><td><p><span class="term"><em class="parameter"><code>length</code></em> :</span></p></td><td> return location for the number of returned URIs, or <a class="link" href="glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a></td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td> a newly allocated <a class="link" href="glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>-terminated array of strings. Use <a class="link" href="glib-String-Utility-Functions.html#g-strfreev"><code class="function">g_strfreev()</code></a> to free it.</td></tr></tbody></table></div><p class="since">Since 2.12</p></div><hr><div class="refsect2" lang="en"><a name="id3200813"></a><h3><a name="g-bookmark-file-get-title"></a>g_bookmark_file_get_title ()</h3><a class="indexterm" name="id3200830"></a><pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gchar">gchar</a>* g_bookmark_file_get_title (<a class="link" href="glib-Bookmark-file-parser.html#GBookmarkFile">GBookmarkFile</a> *bookmark, const <a class="link" href="glib-Basic-Types.html#gchar">gchar</a> *uri, <a class="link" href="glib-Error-Reporting.html#GError">GError</a> **error);</pre><p>Returns the title of the bookmark for <em class="parameter"><code>uri</code></em>.</p><p>If <em class="parameter"><code>uri</code></em> is <a class="link" 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.</p><p>In the event the URI cannot be found, <a class="link" href="glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> is returned and<em class="parameter"><code>error</code></em> is set to <a class="link" href="glib-Bookmark-file-parser.html#G-BOOKMARK-FILE-ERROR-URI-NOT-FOUND:CAPS"><span class="type">G_BOOKMARK_FILE_ERROR_URI_NOT_FOUND</span></a>.</p><p></p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><p><span class="term"><em class="parameter"><code>bookmark</code></em> :</span></p></td><td> a <a class="link" href="glib-Bookmark-file-parser.html#GBookmarkFile"><span class="type">GBookmarkFile</span></a></td></tr><tr><td><p><span class="term"><em class="parameter"><code>uri</code></em> :</span></p></td><td> a valid URI or <a class="link" href="glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a></td></tr><tr><td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td><td> return location for a <a class="link" href="glib-Error-Reporting.html#GError"><span class="type">GError</span></a>, or <a class="link" href="glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a></td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td> a newly allocated string or <a class="link" href="glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if the specified URI cannot be found.</td></tr></tbody></table></div><p class="since">Since 2.12</p></div><hr><div class="refsect2" lang="en"><a name="id3201049"></a><h3><a name="g-bookmark-file-get-description"></a>g_bookmark_file_get_description ()</h3><a class="indexterm" name="id3201064"></a><pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gchar">gchar</a>* g_bookmark_file_get_description (<a class="link" href="glib-Bookmark-file-parser.html#GBookmarkFile">GBookmarkFile</a> *bookmark, const <a class="link" href="glib-Basic-Types.html#gchar">gchar</a> *uri, <a class="link" href="glib-Error-Reporting.html#GError">GError</a> **error);</pre><p>Retrieves the description of the bookmark for <em class="parameter"><code>uri</code></em>.</p><p>In the event the URI cannot be found, <a class="link" href="glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> is returned and<em class="parameter"><code>error</code></em> is set to <a class="link" href="glib-Bookmark-file-parser.html#G-BOOKMARK-FILE-ERROR-URI-NOT-FOUND:CAPS"><span class="type">G_BOOKMARK_FILE_ERROR_URI_NOT_FOUND</span></a>.</p><p></p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><p><span class="term"><em class="parameter"><code>bookmark</code></em> :</span></p></td><td> a <a class="link" href="glib-Bookmark-file-parser.html#GBookmarkFile"><span class="type">GBookmarkFile</span></a></td></tr><tr><td><p><span class="term"><em class="parameter"><code>uri</code></em> :</span></p></td><td> a valid URI</td></tr><tr><td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td><td> return location for a <a class="link" href="glib-Error-Reporting.html#GError"><span class="type">GError</span></a>, or <a class="link" href="glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a></td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td> a newly allocated string or <a class="link" href="glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if the specified URI cannot be found.</td></tr></tbody></table></div><p class="since">Since 2.12</p></div><hr><div class="refsect2" lang="en"><a name="id3201249"></a><h3><a name="g-bookmark-file-get-mime-type"></a>g_bookmark_file_get_mime_type ()</h3><a class="indexterm" name="id3201264"></a><pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gchar">gchar</a>* g_bookmark_file_get_mime_type (<a class="link" href="glib-Bookmark-file-parser.html#GBookmarkFile">GBookmarkFile</a> *bookmark, const <a class="link" href="glib-Basic-Types.html#gchar">gchar</a> *uri, <a class="link" href="glib-Error-Reporting.html#GError">GError</a> **error);</pre><p>Retrieves the MIME type of the resource pointed by <em class="parameter"><code>uri</code></em>.</p><p>In the event the URI cannot be found, <a class="link" href="glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> is returned and<em class="parameter"><code>error</code></em> is set to <a class="link" href="glib-Bookmark-file-parser.html#G-BOOKMARK-FILE-ERROR-URI-NOT-FOUND:CAPS"><span class="type">G_BOOKMARK_FILE_ERROR_URI_NOT_FOUND</span></a>. In theevent that the MIME type cannot be found, <a class="link" href="glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> is returned and<em class="parameter"><code>error</code></em> is set to <a class="link" href="glib-Bookmark-file-parser.html#G-BOOKMARK-FILE-ERROR-INVALID-VALUE:CAPS"><span class="type">G_BOOKMARK_FILE_ERROR_INVALID_VALUE</span></a>.</p><p></p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><p><span class="term"><em class="parameter"><code>bookmark</code></em> :</span></p></td><td> a <a class="link" href="glib-Bookmark-file-parser.html#GBookmarkFile"><span class="type">GBookmarkFile</span></a></td></tr><tr><td><p><span class="term"><em class="parameter"><code>uri</code></em> :</span></p></td><td> a valid URI</td></tr><tr><td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td><td> return location for a <a class="link" href="glib
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -