827 lines
21 KiB
HTML
827 lines
21 KiB
HTML
|
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
|
<HTML><HEAD><TITLE>Man page of Glib::BookmarkFile</TITLE>
|
|
</HEAD><BODY>
|
|
<H1>Glib::BookmarkFile</H1>
|
|
Section: User Contributed Perl Documentation (3pm)<BR>Updated: 2020-02-18<BR><A HREF="#index">Index</A>
|
|
<A HREF="/cgi-bin/man/man2html">Return to Main Contents</A><HR>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<A NAME="lbAB"> </A>
|
|
<H2>NAME</H2>
|
|
|
|
Glib::BookmarkFile - Parser for bookmark files
|
|
<A NAME="lbAC"> </A>
|
|
<H2>SYNOPSIS</H2>
|
|
|
|
|
|
|
|
|
|
|
|
<PRE>
|
|
use Glib;
|
|
|
|
$date .= $_ while (<DATA>);
|
|
|
|
$b = Glib::BookmarkFile->new;
|
|
$b->load_from_data($data);
|
|
$uri = '<A HREF="file:///some/path/to/a/file.txt';">file:///some/path/to/a/file.txt';</A>
|
|
if ($b->has_item($uri)) {
|
|
$title = $b->get_title($uri);
|
|
$desc = $b->get_description($uri);
|
|
|
|
print "Bookmark for `$uri' ($title):\n";
|
|
print " $desc\n";
|
|
}
|
|
0;
|
|
|
|
__DATA__
|
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
<xbel version="1.0"
|
|
xmlns:bookmark="<A HREF="http://www.freedesktop.org/standards/desktop-bookmarks">http://www.freedesktop.org/standards/desktop-bookmarks</A>"
|
|
xmlns:mime="<A HREF="http://www.freedesktop.org/standards/shared-mime-info">http://www.freedesktop.org/standards/shared-mime-info</A>">
|
|
<bookmark href="<A HREF="file:///tmp/test-file.txt">file:///tmp/test-file.txt</A>" added="2006-03-22T18:54:00Z" modified="2006-03-22T18:54:00Z" visited="2006-03-22T18:54:00Z">
|
|
<title>Test File</title>
|
|
<desc>Some test file</desc>
|
|
<info>
|
|
<metadata owner="<A HREF="http://freedesktop.org">http://freedesktop.org</A>">
|
|
<mime:mime-type type="text/plain"/>
|
|
<bookmark:applications>
|
|
<bookmark:application name="Gedit" exec="gedit %u" timestamp="1143053640" count="1"/>
|
|
</bookmark:applications>
|
|
</metadata>
|
|
</info>
|
|
</bookmark>
|
|
</xbel>
|
|
|
|
</PRE>
|
|
|
|
|
|
<A NAME="lbAD"> </A>
|
|
<H2>DESCRIPTION</H2>
|
|
|
|
|
|
|
|
<B>Glib::BookmarkFile</B> lets you parse, edit or create files containing lists
|
|
of bookmarks to resources pointed to by URIs, with some meta-data bound to
|
|
them, following the Desktop Bookmark Specification. The recent files support
|
|
inside <FONT SIZE="-1">GTK+</FONT> uses this type of files to store the list of recently used
|
|
files.
|
|
<P>
|
|
|
|
The syntax of bookmark files is described in detail in the Desktop Bookmarks
|
|
Specification, here is a quick summary: bookmark files use a subclass of the
|
|
<FONT SIZE="-1">XML</FONT> Bookmark Exchange Language (<FONT SIZE="-1">XBEL</FONT>) document format, defining meta-data
|
|
such as the <FONT SIZE="-1">MIME</FONT> type of the resource pointed by a bookmark, the list of
|
|
applications that have registered the same <FONT SIZE="-1">URI</FONT> and the visibility of the
|
|
bookmark.
|
|
<A NAME="lbAE"> </A>
|
|
<H2>METHODS</H2>
|
|
|
|
|
|
|
|
<A NAME="lbAF"> </A>
|
|
<H3>bookmarkfile = Glib::BookmarkFile-><B>new</B></H3>
|
|
|
|
|
|
|
|
<A NAME="lbAG"> </A>
|
|
<H3>$bookmark_file-><B>add_application</B> ($uri, $name, $exec)</H3>
|
|
|
|
|
|
|
|
|
|
|
|
<DL COMPACT>
|
|
<DT id="1">•<DD>
|
|
<TT>$uri</TT> (string)
|
|
<DT id="2">•<DD>
|
|
<TT>$name</TT> (string or undef)
|
|
<DT id="3">•<DD>
|
|
<TT>$exec</TT> (string or undef)
|
|
</DL>
|
|
<P>
|
|
|
|
Adds the application with <TT>$name</TT> and <TT>$exec</TT> to the list of
|
|
applications that have registered a bookmark for <TT>$uri</TT> into
|
|
<TT>$bookmark_file</TT>.
|
|
<P>
|
|
|
|
Every bookmark inside a <TT>"Glib::BookmarkFile"</TT> must have at least an
|
|
application registered. Each application must provide a name, a
|
|
command line useful for launching the bookmark, the number of times
|
|
the bookmark has been registered by the application and the last
|
|
time the application registered this bookmark.
|
|
<P>
|
|
|
|
If <TT>$name</TT> is undef, the name of the application will be the
|
|
same returned by <B>Glib::get_application_name()</B>; if <TT>$exec</TT> is undef,
|
|
the command line will be a composition of the program name as
|
|
returned by <B>Glib::get_prgname()</B> and the ``%u'' modifier, which will
|
|
be expanded to the bookmark's <FONT SIZE="-1">URI.</FONT>
|
|
<P>
|
|
|
|
This function will automatically take care of updating the
|
|
registrations count and timestamping in case an application
|
|
with the same <TT>$name</TT> had already registered a bookmark for
|
|
<TT>$uri</TT> inside the bookmark file. If no bookmark for <TT>$uri</TT> is found
|
|
one is created.
|
|
<A NAME="lbAH"> </A>
|
|
<H3>$bookmark_file-><B>add_group</B> ($uri, $group)</H3>
|
|
|
|
|
|
|
|
|
|
|
|
<DL COMPACT>
|
|
<DT id="4">•<DD>
|
|
<TT>$uri</TT> (string)
|
|
<DT id="5">•<DD>
|
|
<TT>$group</TT> (string)
|
|
</DL>
|
|
<P>
|
|
|
|
Adds <TT>$group</TT> to the list of groups to which the bookmark for <TT>$uri</TT>
|
|
belongs to. If no bookmark for <TT>$uri</TT> is found one is created.
|
|
<A NAME="lbAI"> </A>
|
|
<H3>unix timestamp = $bookmark_file-><B>get_added</B> ($uri)</H3>
|
|
|
|
|
|
|
|
|
|
|
|
<DL COMPACT>
|
|
<DT id="6">•<DD>
|
|
<TT>$uri</TT> (string)
|
|
</DL>
|
|
<A NAME="lbAJ"> </A>
|
|
<H3>$bookmark_file-><B>set_added</B> ($uri, $value)</H3>
|
|
|
|
|
|
|
|
|
|
|
|
<DL COMPACT>
|
|
<DT id="7">•<DD>
|
|
<TT>$uri</TT> (string)
|
|
<DT id="8">•<DD>
|
|
<TT>$value</TT> (unix timestamp)
|
|
</DL>
|
|
<P>
|
|
|
|
Sets the time the bookmark for <TT>$uri</TT> was added.
|
|
If no bookmark for <TT>$uri</TT> is found one is created.
|
|
<A NAME="lbAK"> </A>
|
|
<H3>($exec, $count, $stamp) = $bookmark_file-><B>get_app_info</B> ($uri, $name)</H3>
|
|
|
|
|
|
|
|
|
|
|
|
<DL COMPACT>
|
|
<DT id="9">•<DD>
|
|
<TT>$uri</TT> (string)
|
|
<DT id="10">•<DD>
|
|
<TT>$name</TT> (string)
|
|
</DL>
|
|
<P>
|
|
|
|
Gets the registration information of <TT>$name</TT> for the bookmark for
|
|
<TT>$uri</TT>. See <B>Glib::BookmarkFile::set_app_info()</B> for more information about
|
|
the returned data.
|
|
<P>
|
|
|
|
May croak with a Glib::Error in $@ on failure.
|
|
<A NAME="lbAL"> </A>
|
|
<H3>$bookmark_file-><B>set_app_info</B> ($uri, $name, $exec, $count, $stamp)</H3>
|
|
|
|
|
|
|
|
|
|
|
|
<DL COMPACT>
|
|
<DT id="11">•<DD>
|
|
<TT>$uri</TT> (string)
|
|
<DT id="12">•<DD>
|
|
<TT>$name</TT> (string)
|
|
<DT id="13">•<DD>
|
|
<TT>$exec</TT> (string)
|
|
<DT id="14">•<DD>
|
|
<TT>$count</TT> (integer)
|
|
<DT id="15">•<DD>
|
|
<TT>$stamp</TT> (unix timestamp)
|
|
</DL>
|
|
<P>
|
|
|
|
Sets the meta-data of application <TT>$name</TT> inside the list of
|
|
applications that have registered a bookmark for <TT>$uri</TT> inside
|
|
<TT>$bookmark_file</TT>.
|
|
<P>
|
|
|
|
You should rarely use this method; use <B>Glib::BookmarkFile::add_application()</B>
|
|
and <B>Glib::BookmarkFile::remove_application()</B> instead.
|
|
<P>
|
|
|
|
<TT>$name</TT> can be any <FONT SIZE="-1">UTF-8</FONT> encoded string used to identify an application.
|
|
<TT>$exec</TT> can have one of these two modifiers: ``%f'', which will be expanded
|
|
as the local file name retrieved from the bookmark's <FONT SIZE="-1">URI</FONT>; ``%u'', which
|
|
will be expanded as the bookmark's <FONT SIZE="-1">URI.</FONT> The expansion is done automatically
|
|
when retrieving the stored command line using the
|
|
<B>Glib::BookmarkFile::get_app_info()</B> method.
|
|
<TT>$count</TT> is the number of times the application has registered the
|
|
bookmark; if it is < 0, the current registration count will be increased
|
|
by one, if it is 0, the application with <TT>$name</TT> will be removed from
|
|
the list of registered applications.
|
|
<TT>$stamp</TT> is the Unix time of the last registration, as returned by <B>time()</B>; if
|
|
it is -1, the current time will be used.
|
|
<P>
|
|
|
|
If you try to remove an application by setting its registration count to
|
|
zero, and no bookmark for <TT>$uri</TT> is found, <TT>%FALSE</TT> is returned and an
|
|
exception is fired.
|
|
<P>
|
|
|
|
May croak with a Glib::Error in $@ on failure.
|
|
<A NAME="lbAM"> </A>
|
|
<H3>list = $bookmark_file-><B>get_applications</B> ($uri)</H3>
|
|
|
|
|
|
|
|
|
|
|
|
<DL COMPACT>
|
|
<DT id="16">•<DD>
|
|
<TT>$uri</TT> (string)
|
|
</DL>
|
|
<P>
|
|
|
|
Retrieves the names of the applications that have registered the
|
|
bookmark for <TT>$uri</TT>.
|
|
<P>
|
|
|
|
May croak with a Glib::Error in $@ on failure.
|
|
<A NAME="lbAN"> </A>
|
|
<H3>$bookmark_file-><B>get_description</B> ($uri)</H3>
|
|
|
|
|
|
|
|
|
|
|
|
<DL COMPACT>
|
|
<DT id="17">•<DD>
|
|
<TT>$uri</TT> (string)
|
|
</DL>
|
|
<P>
|
|
|
|
Gets the description of the bookmark for <TT>$uri</TT>.
|
|
<P>
|
|
|
|
May croak with a Glib::Error in $@ on failure.
|
|
<A NAME="lbAO"> </A>
|
|
<H3>$bookmark_file-><B>set_description</B> ($uri, $description)</H3>
|
|
|
|
|
|
|
|
|
|
|
|
<DL COMPACT>
|
|
<DT id="18">•<DD>
|
|
<TT>$uri</TT> (string)
|
|
<DT id="19">•<DD>
|
|
<TT>$description</TT> (string)
|
|
</DL>
|
|
<P>
|
|
|
|
Sets the description of the bookmark for <TT>$uri</TT>. If no bookmark for <TT>$uri</TT>
|
|
is found one is created.
|
|
<A NAME="lbAP"> </A>
|
|
<H3>list = $bookmark_file-><B>get_groups</B> ($uri)</H3>
|
|
|
|
|
|
|
|
|
|
|
|
<DL COMPACT>
|
|
<DT id="20">•<DD>
|
|
<TT>$uri</TT> (string)
|
|
</DL>
|
|
<P>
|
|
|
|
Retrieves the list of group names of the bookmark for <TT>$uri</TT>.
|
|
<P>
|
|
|
|
May croak with a Glib::Error in $@ on failure.
|
|
<A NAME="lbAQ"> </A>
|
|
<H3>$bookmark_file-><B>set_groups</B> ($uri, ...)</H3>
|
|
|
|
|
|
|
|
|
|
|
|
<DL COMPACT>
|
|
<DT id="21">•<DD>
|
|
<TT>$uri</TT> (string)
|
|
<DT id="22">•<DD>
|
|
... (list) one or more group names
|
|
</DL>
|
|
<P>
|
|
|
|
Sets a list of group names for the item with <FONT SIZE="-1">URI</FONT> <TT>$uri</TT>. Each previously
|
|
set group name list is removed. If no bookmark for <TT>$uri</TT> is found one
|
|
is created.
|
|
<A NAME="lbAR"> </A>
|
|
<H3>boolean = $bookmark_file-><B>has_application</B> ($uri, $name)</H3>
|
|
|
|
|
|
|
|
|
|
|
|
<DL COMPACT>
|
|
<DT id="23">•<DD>
|
|
<TT>$uri</TT> (string)
|
|
<DT id="24">•<DD>
|
|
<TT>$name</TT> (string)
|
|
</DL>
|
|
<P>
|
|
|
|
Checks whether the bookmark for <TT>$uri</TT> inside <TT>$bookmark_file</TT> has
|
|
been registered by application <TT>$name</TT>.
|
|
<P>
|
|
|
|
May croak with a Glib::Error in $@ on failure.
|
|
<A NAME="lbAS"> </A>
|
|
<H3>boolean = $bookmark_file-><B>has_group</B> ($uri, $group)</H3>
|
|
|
|
|
|
|
|
|
|
|
|
<DL COMPACT>
|
|
<DT id="25">•<DD>
|
|
<TT>$uri</TT> (string)
|
|
<DT id="26">•<DD>
|
|
<TT>$group</TT> (string)
|
|
</DL>
|
|
<P>
|
|
|
|
Checks whether <TT>$group</TT> appears in the list of groups to which
|
|
the bookmark for <TT>$uri</TT> belongs to.
|
|
<P>
|
|
|
|
May croak with a Glib::Error in $@ on failure.
|
|
<A NAME="lbAT"> </A>
|
|
<H3>boolean = $bookmark_file-><B>has_item</B> ($uri)</H3>
|
|
|
|
|
|
|
|
|
|
|
|
<DL COMPACT>
|
|
<DT id="27">•<DD>
|
|
<TT>$uri</TT> (string)
|
|
</DL>
|
|
<P>
|
|
|
|
Looks whether the bookmark file has a bookmark for <TT>$uri</TT>.
|
|
<A NAME="lbAU"> </A>
|
|
<H3>($href, $mime_type) = $bookmark_file-><B>get_icon</B> ($uri)</H3>
|
|
|
|
|
|
|
|
|
|
|
|
<DL COMPACT>
|
|
<DT id="28">•<DD>
|
|
<TT>$uri</TT> (string)
|
|
</DL>
|
|
<P>
|
|
|
|
Gets the icon of the bookmark for <TT>$uri</TT>.
|
|
<P>
|
|
|
|
May croak with a Glib::Error in $@ on failure.
|
|
<A NAME="lbAV"> </A>
|
|
<H3>$bookmark_file-><B>set_icon</B> ($uri, $href, $mime_type)</H3>
|
|
|
|
|
|
|
|
|
|
|
|
<DL COMPACT>
|
|
<DT id="29">•<DD>
|
|
<TT>$uri</TT> (string)
|
|
<DT id="30">•<DD>
|
|
<TT>$href</TT> (string or undef)
|
|
<DT id="31">•<DD>
|
|
<TT>$mime_type</TT> (string or undef)
|
|
</DL>
|
|
<P>
|
|
|
|
Sets the icon for the bookmark for <TT>$uri</TT>. If <TT>$href</TT> is undef, unsets
|
|
the currently set icon.
|
|
<A NAME="lbAW"> </A>
|
|
<H3>boolean = $bookmark_file-><B>get_is_private</B> ($uri)</H3>
|
|
|
|
|
|
|
|
|
|
|
|
<DL COMPACT>
|
|
<DT id="32">•<DD>
|
|
<TT>$uri</TT> (string)
|
|
</DL>
|
|
<P>
|
|
|
|
May croak with a Glib::Error in $@ on failure.
|
|
<A NAME="lbAX"> </A>
|
|
<H3>$bookmark_file-><B>set_is_private</B> ($uri, $is_private)</H3>
|
|
|
|
|
|
|
|
|
|
|
|
<DL COMPACT>
|
|
<DT id="33">•<DD>
|
|
<TT>$uri</TT> (string)
|
|
<DT id="34">•<DD>
|
|
<TT>$is_private</TT> (boolean)
|
|
</DL>
|
|
<A NAME="lbAY"> </A>
|
|
<H3>$bookmark_file-><B>load_from_data</B> ($buf)</H3>
|
|
|
|
|
|
|
|
|
|
|
|
<DL COMPACT>
|
|
<DT id="35">•<DD>
|
|
<TT>$buf</TT> (scalar)
|
|
</DL>
|
|
<P>
|
|
|
|
Parses a string containing a bookmark file structure.
|
|
<P>
|
|
|
|
May croak with a Glib::Error in $@ on failure.
|
|
<A NAME="lbAZ"> </A>
|
|
<H3>($full_path) = $bookmark_file-><B>load_from_data_dirs</B> ($file)</H3>
|
|
|
|
|
|
|
|
|
|
|
|
<DL COMPACT>
|
|
<DT id="36">•<DD>
|
|
<TT>$file</TT> (localized file name)
|
|
</DL>
|
|
<P>
|
|
|
|
Parses a bookmark file, searching for it inside the data directories.
|
|
If a file is found, it returns the full path.
|
|
<P>
|
|
|
|
May croak with a Glib::Error in $@ on failure.
|
|
<A NAME="lbBA"> </A>
|
|
<H3>$bookmark_file-><B>load_from_file</B> ($file)</H3>
|
|
|
|
|
|
|
|
|
|
|
|
<DL COMPACT>
|
|
<DT id="37">•<DD>
|
|
<TT>$file</TT> (localized file name)
|
|
</DL>
|
|
<P>
|
|
|
|
Parses a bookmark file.
|
|
<P>
|
|
|
|
May croak with a Glib::Error in $@ on failure.
|
|
<A NAME="lbBB"> </A>
|
|
<H3>string = $bookmark_file-><B>get_mime_type</B> ($uri)</H3>
|
|
|
|
|
|
|
|
|
|
|
|
<DL COMPACT>
|
|
<DT id="38">•<DD>
|
|
<TT>$uri</TT> (string)
|
|
</DL>
|
|
<P>
|
|
|
|
Gets the <FONT SIZE="-1">MIME</FONT> type of the bookmark for <TT>$uri</TT>.
|
|
<P>
|
|
|
|
May croak with a Glib::Error in $@ on failure.
|
|
<A NAME="lbBC"> </A>
|
|
<H3>$bookmark_file-><B>set_mime_type</B> ($uri, $mime_type)</H3>
|
|
|
|
|
|
|
|
|
|
|
|
<DL COMPACT>
|
|
<DT id="39">•<DD>
|
|
<TT>$uri</TT> (string)
|
|
<DT id="40">•<DD>
|
|
<TT>$mime_type</TT> (string)
|
|
</DL>
|
|
<P>
|
|
|
|
Sets the <FONT SIZE="-1">MIME</FONT> type of the bookmark for <TT>$uri</TT>. If no bookmark for <TT>$uri</TT>
|
|
is found one is created.
|
|
<A NAME="lbBD"> </A>
|
|
<H3>unix timestamp = $bookmark_file-><B>get_modified</B> ($uri)</H3>
|
|
|
|
|
|
|
|
|
|
|
|
<DL COMPACT>
|
|
<DT id="41">•<DD>
|
|
<TT>$uri</TT> (string)
|
|
</DL>
|
|
<A NAME="lbBE"> </A>
|
|
<H3>$bookmark_file-><B>set_modified</B> ($uri, $value)</H3>
|
|
|
|
|
|
|
|
|
|
|
|
<DL COMPACT>
|
|
<DT id="42">•<DD>
|
|
<TT>$uri</TT> (string)
|
|
<DT id="43">•<DD>
|
|
<TT>$value</TT> (unix timestamp)
|
|
</DL>
|
|
<P>
|
|
|
|
Sets the time the bookmark for <TT>$uri</TT> was last modified.
|
|
If no bookmark for <TT>$uri</TT> is found one is created.
|
|
<A NAME="lbBF"> </A>
|
|
<H3>$bookmark_file-><B>move_item</B> ($old_uri, $new_uri)</H3>
|
|
|
|
|
|
|
|
|
|
|
|
<DL COMPACT>
|
|
<DT id="44">•<DD>
|
|
<TT>$old_uri</TT> (string)
|
|
<DT id="45">•<DD>
|
|
<TT>$new_uri</TT> (string or undef)
|
|
</DL>
|
|
<P>
|
|
|
|
Changes the <FONT SIZE="-1">URI</FONT> of a bookmark item from <TT>$old_uri</TT> to <TT>$new_uri</TT>. Any
|
|
existing bookmark for <TT>$new_uri</TT> will be overwritten. If <TT>$new_uri</TT> is
|
|
undef, then the bookmark is removed.
|
|
<P>
|
|
|
|
May croak with a Glib::Error in $@ on failure.
|
|
<A NAME="lbBG"> </A>
|
|
<H3>$bookmark_file-><B>remove_application</B> ($uri, $name)</H3>
|
|
|
|
|
|
|
|
|
|
|
|
<DL COMPACT>
|
|
<DT id="46">•<DD>
|
|
<TT>$uri</TT> (string)
|
|
<DT id="47">•<DD>
|
|
<TT>$name</TT> (string)
|
|
</DL>
|
|
<P>
|
|
|
|
Removes application registered with <TT>$name</TT> from the list of applications
|
|
that have registered a bookmark for <TT>$uri</TT> inside <TT>$bookmark_file</TT>.
|
|
<P>
|
|
|
|
May croak with a Glib::Error in $@ on failure.
|
|
<A NAME="lbBH"> </A>
|
|
<H3>$bookmark_file-><B>remove_group</B> ($uri, $group)</H3>
|
|
|
|
|
|
|
|
|
|
|
|
<DL COMPACT>
|
|
<DT id="48">•<DD>
|
|
<TT>$uri</TT> (string)
|
|
<DT id="49">•<DD>
|
|
<TT>$group</TT> (string)
|
|
</DL>
|
|
<P>
|
|
|
|
Removes <TT>$group</TT> from the list of groups to which the bookmark
|
|
for <TT>$uri</TT> belongs to.
|
|
<P>
|
|
|
|
May croak with a Glib::Error in $@ on failure.
|
|
<A NAME="lbBI"> </A>
|
|
<H3>$bookmark_file-><B>remove_item</B> ($uri)</H3>
|
|
|
|
|
|
|
|
|
|
|
|
<DL COMPACT>
|
|
<DT id="50">•<DD>
|
|
<TT>$uri</TT> (string)
|
|
</DL>
|
|
<P>
|
|
|
|
Removes the bookmark for <TT>$uri</TT> from the bookmark file.
|
|
<P>
|
|
|
|
May croak with a Glib::Error in $@ on failure.
|
|
<A NAME="lbBJ"> </A>
|
|
<H3>integer = $bookmark_file-><B>get_size</B></H3>
|
|
|
|
|
|
|
|
|
|
|
|
Gets the number of bookmarks inside the bookmark file.
|
|
<A NAME="lbBK"> </A>
|
|
<H3>$bookmark_file-><B>get_title</B> ($uri, $title)</H3>
|
|
|
|
|
|
|
|
|
|
|
|
<DL COMPACT>
|
|
<DT id="51">•<DD>
|
|
<TT>$uri</TT> (string)
|
|
</DL>
|
|
<P>
|
|
|
|
Gets the title of the bookmark for <TT>$uri</TT>.
|
|
<P>
|
|
|
|
May croak with a Glib::Error in $@ on failure.
|
|
<A NAME="lbBL"> </A>
|
|
<H3>$bookmark_file-><B>set_title</B> ($uri, $title)</H3>
|
|
|
|
|
|
|
|
|
|
|
|
<DL COMPACT>
|
|
<DT id="52">•<DD>
|
|
<TT>$uri</TT> (string)
|
|
<DT id="53">•<DD>
|
|
<TT>$title</TT> (string)
|
|
</DL>
|
|
<P>
|
|
|
|
Sets the title of the bookmark for <TT>$uri</TT>. If no bookmark for <TT>$uri</TT> is found
|
|
one is created.
|
|
<A NAME="lbBM"> </A>
|
|
<H3>string = $bookmark_file-><B>to_data</B></H3>
|
|
|
|
|
|
|
|
|
|
|
|
Returns the bookmark file as a string.
|
|
<P>
|
|
|
|
May croak with a Glib::Error in $@ on failure.
|
|
<A NAME="lbBN"> </A>
|
|
<H3>$bookmark_file-><B>to_file</B> ($file)</H3>
|
|
|
|
|
|
|
|
|
|
|
|
<DL COMPACT>
|
|
<DT id="54">•<DD>
|
|
<TT>$file</TT> (localized file name)
|
|
</DL>
|
|
<P>
|
|
|
|
Saves the contents of a bookmark file into a file. The write operation
|
|
is guaranteed to be atomic by writing the contents of the bookmark file
|
|
to a temporary file and then moving the file to the target file.
|
|
<P>
|
|
|
|
May croak with a Glib::Error in $@ on failure.
|
|
<A NAME="lbBO"> </A>
|
|
<H3>list = $bookmark_file-><B>get_uris</B></H3>
|
|
|
|
|
|
|
|
|
|
|
|
Returns the <FONT SIZE="-1">URI</FONT> of all the bookmarks in the bookmark file.
|
|
<A NAME="lbBP"> </A>
|
|
<H3>unix timestamp = $bookmark_file-><B>get_visited</B> ($uri)</H3>
|
|
|
|
|
|
|
|
|
|
|
|
<DL COMPACT>
|
|
<DT id="55">•<DD>
|
|
<TT>$uri</TT> (string)
|
|
</DL>
|
|
<A NAME="lbBQ"> </A>
|
|
<H3>$bookmark_file-><B>set_visited</B> ($uri, $value)</H3>
|
|
|
|
|
|
|
|
|
|
|
|
<DL COMPACT>
|
|
<DT id="56">•<DD>
|
|
<TT>$uri</TT> (string)
|
|
<DT id="57">•<DD>
|
|
<TT>$value</TT> (unix timestamp)
|
|
</DL>
|
|
<P>
|
|
|
|
Sets the time the bookmark for <TT>$uri</TT> was last visited.
|
|
If no bookmark for <TT>$uri</TT> is found one is created.
|
|
<A NAME="lbBR"> </A>
|
|
<H2>SEE ALSO</H2>
|
|
|
|
|
|
|
|
Glib
|
|
<A NAME="lbBS"> </A>
|
|
<H2>COPYRIGHT</H2>
|
|
|
|
|
|
|
|
Copyright (C) 2003-2011 by the gtk2-perl team.
|
|
<P>
|
|
|
|
This software is licensed under the <FONT SIZE="-1">LGPL.</FONT> See Glib for a full notice.
|
|
<P>
|
|
|
|
<HR>
|
|
<A NAME="index"> </A><H2>Index</H2>
|
|
<DL>
|
|
<DT id="58"><A HREF="#lbAB">NAME</A><DD>
|
|
<DT id="59"><A HREF="#lbAC">SYNOPSIS</A><DD>
|
|
<DT id="60"><A HREF="#lbAD">DESCRIPTION</A><DD>
|
|
<DT id="61"><A HREF="#lbAE">METHODS</A><DD>
|
|
<DL>
|
|
<DT id="62"><A HREF="#lbAF">bookmarkfile = Glib::BookmarkFile-><B>new</B></A><DD>
|
|
<DT id="63"><A HREF="#lbAG">$bookmark_file-><B>add_application</B> ($uri, $name, $exec)</A><DD>
|
|
<DT id="64"><A HREF="#lbAH">$bookmark_file-><B>add_group</B> ($uri, $group)</A><DD>
|
|
<DT id="65"><A HREF="#lbAI">unix timestamp = $bookmark_file-><B>get_added</B> ($uri)</A><DD>
|
|
<DT id="66"><A HREF="#lbAJ">$bookmark_file-><B>set_added</B> ($uri, $value)</A><DD>
|
|
<DT id="67"><A HREF="#lbAK">($exec, $count, $stamp) = $bookmark_file-><B>get_app_info</B> ($uri, $name)</A><DD>
|
|
<DT id="68"><A HREF="#lbAL">$bookmark_file-><B>set_app_info</B> ($uri, $name, $exec, $count, $stamp)</A><DD>
|
|
<DT id="69"><A HREF="#lbAM">list = $bookmark_file-><B>get_applications</B> ($uri)</A><DD>
|
|
<DT id="70"><A HREF="#lbAN">$bookmark_file-><B>get_description</B> ($uri)</A><DD>
|
|
<DT id="71"><A HREF="#lbAO">$bookmark_file-><B>set_description</B> ($uri, $description)</A><DD>
|
|
<DT id="72"><A HREF="#lbAP">list = $bookmark_file-><B>get_groups</B> ($uri)</A><DD>
|
|
<DT id="73"><A HREF="#lbAQ">$bookmark_file-><B>set_groups</B> ($uri, ...)</A><DD>
|
|
<DT id="74"><A HREF="#lbAR">boolean = $bookmark_file-><B>has_application</B> ($uri, $name)</A><DD>
|
|
<DT id="75"><A HREF="#lbAS">boolean = $bookmark_file-><B>has_group</B> ($uri, $group)</A><DD>
|
|
<DT id="76"><A HREF="#lbAT">boolean = $bookmark_file-><B>has_item</B> ($uri)</A><DD>
|
|
<DT id="77"><A HREF="#lbAU">($href, $mime_type) = $bookmark_file-><B>get_icon</B> ($uri)</A><DD>
|
|
<DT id="78"><A HREF="#lbAV">$bookmark_file-><B>set_icon</B> ($uri, $href, $mime_type)</A><DD>
|
|
<DT id="79"><A HREF="#lbAW">boolean = $bookmark_file-><B>get_is_private</B> ($uri)</A><DD>
|
|
<DT id="80"><A HREF="#lbAX">$bookmark_file-><B>set_is_private</B> ($uri, $is_private)</A><DD>
|
|
<DT id="81"><A HREF="#lbAY">$bookmark_file-><B>load_from_data</B> ($buf)</A><DD>
|
|
<DT id="82"><A HREF="#lbAZ">($full_path) = $bookmark_file-><B>load_from_data_dirs</B> ($file)</A><DD>
|
|
<DT id="83"><A HREF="#lbBA">$bookmark_file-><B>load_from_file</B> ($file)</A><DD>
|
|
<DT id="84"><A HREF="#lbBB">string = $bookmark_file-><B>get_mime_type</B> ($uri)</A><DD>
|
|
<DT id="85"><A HREF="#lbBC">$bookmark_file-><B>set_mime_type</B> ($uri, $mime_type)</A><DD>
|
|
<DT id="86"><A HREF="#lbBD">unix timestamp = $bookmark_file-><B>get_modified</B> ($uri)</A><DD>
|
|
<DT id="87"><A HREF="#lbBE">$bookmark_file-><B>set_modified</B> ($uri, $value)</A><DD>
|
|
<DT id="88"><A HREF="#lbBF">$bookmark_file-><B>move_item</B> ($old_uri, $new_uri)</A><DD>
|
|
<DT id="89"><A HREF="#lbBG">$bookmark_file-><B>remove_application</B> ($uri, $name)</A><DD>
|
|
<DT id="90"><A HREF="#lbBH">$bookmark_file-><B>remove_group</B> ($uri, $group)</A><DD>
|
|
<DT id="91"><A HREF="#lbBI">$bookmark_file-><B>remove_item</B> ($uri)</A><DD>
|
|
<DT id="92"><A HREF="#lbBJ">integer = $bookmark_file-><B>get_size</B></A><DD>
|
|
<DT id="93"><A HREF="#lbBK">$bookmark_file-><B>get_title</B> ($uri, $title)</A><DD>
|
|
<DT id="94"><A HREF="#lbBL">$bookmark_file-><B>set_title</B> ($uri, $title)</A><DD>
|
|
<DT id="95"><A HREF="#lbBM">string = $bookmark_file-><B>to_data</B></A><DD>
|
|
<DT id="96"><A HREF="#lbBN">$bookmark_file-><B>to_file</B> ($file)</A><DD>
|
|
<DT id="97"><A HREF="#lbBO">list = $bookmark_file-><B>get_uris</B></A><DD>
|
|
<DT id="98"><A HREF="#lbBP">unix timestamp = $bookmark_file-><B>get_visited</B> ($uri)</A><DD>
|
|
<DT id="99"><A HREF="#lbBQ">$bookmark_file-><B>set_visited</B> ($uri, $value)</A><DD>
|
|
</DL>
|
|
<DT id="100"><A HREF="#lbBR">SEE ALSO</A><DD>
|
|
<DT id="101"><A HREF="#lbBS">COPYRIGHT</A><DD>
|
|
</DL>
|
|
<HR>
|
|
This document was created by
|
|
<A HREF="/cgi-bin/man/man2html">man2html</A>,
|
|
using the manual pages.<BR>
|
|
Time: 00:05:44 GMT, March 31, 2021
|
|
</BODY>
|
|
</HTML>
|