Copyright | Will Thompson, Iñaki García Etxebarria and Jonas Platte |
---|---|
License | LGPL-2.1 |
Maintainer | Iñaki García Etxebarria (garetxe@gmail.com) |
Safe Haskell | None |
Language | Haskell2010 |
- Exported types
- Methods
- addApplication
- addGroup
- errorQuark
- free
- getAdded
- getAppInfo
- getApplications
- getDescription
- getGroups
- getIcon
- getIsPrivate
- getMimeType
- getModified
- getSize
- getTitle
- getUris
- getVisited
- hasApplication
- hasGroup
- hasItem
- loadFromData
- loadFromDataDirs
- loadFromFile
- moveItem
- removeApplication
- removeGroup
- removeItem
- setAdded
- setAppInfo
- setDescription
- setGroups
- setIcon
- setIsPrivate
- setMimeType
- setModified
- setTitle
- setVisited
- toData
- toFile
The GBookmarkFile
structure contains only
private data and should not be directly accessed.
- newtype BookmarkFile = BookmarkFile (ManagedPtr BookmarkFile)
- noBookmarkFile :: Maybe BookmarkFile
- data BookmarkFileAddApplicationMethodInfo
- bookmarkFileAddApplication :: (HasCallStack, MonadIO m) => BookmarkFile -> Text -> Maybe Text -> Maybe Text -> m ()
- data BookmarkFileAddGroupMethodInfo
- bookmarkFileAddGroup :: (HasCallStack, MonadIO m) => BookmarkFile -> Text -> Text -> m ()
- bookmarkFileErrorQuark :: (HasCallStack, MonadIO m) => m Word32
- data BookmarkFileFreeMethodInfo
- bookmarkFileFree :: (HasCallStack, MonadIO m) => BookmarkFile -> m ()
- data BookmarkFileGetAddedMethodInfo
- bookmarkFileGetAdded :: (HasCallStack, MonadIO m) => BookmarkFile -> Text -> m CLong
- data BookmarkFileGetAppInfoMethodInfo
- bookmarkFileGetAppInfo :: (HasCallStack, MonadIO m) => BookmarkFile -> Text -> Text -> m (Text, Word32, CLong)
- data BookmarkFileGetApplicationsMethodInfo
- bookmarkFileGetApplications :: (HasCallStack, MonadIO m) => BookmarkFile -> Text -> m [Text]
- data BookmarkFileGetDescriptionMethodInfo
- bookmarkFileGetDescription :: (HasCallStack, MonadIO m) => BookmarkFile -> Text -> m Text
- data BookmarkFileGetGroupsMethodInfo
- bookmarkFileGetGroups :: (HasCallStack, MonadIO m) => BookmarkFile -> Text -> m [Text]
- data BookmarkFileGetIconMethodInfo
- bookmarkFileGetIcon :: (HasCallStack, MonadIO m) => BookmarkFile -> Text -> m (Text, Text)
- data BookmarkFileGetIsPrivateMethodInfo
- bookmarkFileGetIsPrivate :: (HasCallStack, MonadIO m) => BookmarkFile -> Text -> m ()
- data BookmarkFileGetMimeTypeMethodInfo
- bookmarkFileGetMimeType :: (HasCallStack, MonadIO m) => BookmarkFile -> Text -> m Text
- data BookmarkFileGetModifiedMethodInfo
- bookmarkFileGetModified :: (HasCallStack, MonadIO m) => BookmarkFile -> Text -> m CLong
- data BookmarkFileGetSizeMethodInfo
- bookmarkFileGetSize :: (HasCallStack, MonadIO m) => BookmarkFile -> m Int32
- data BookmarkFileGetTitleMethodInfo
- bookmarkFileGetTitle :: (HasCallStack, MonadIO m) => BookmarkFile -> Maybe Text -> m Text
- data BookmarkFileGetUrisMethodInfo
- bookmarkFileGetUris :: (HasCallStack, MonadIO m) => BookmarkFile -> m [Text]
- data BookmarkFileGetVisitedMethodInfo
- bookmarkFileGetVisited :: (HasCallStack, MonadIO m) => BookmarkFile -> Text -> m CLong
- data BookmarkFileHasApplicationMethodInfo
- bookmarkFileHasApplication :: (HasCallStack, MonadIO m) => BookmarkFile -> Text -> Text -> m ()
- data BookmarkFileHasGroupMethodInfo
- bookmarkFileHasGroup :: (HasCallStack, MonadIO m) => BookmarkFile -> Text -> Text -> m ()
- data BookmarkFileHasItemMethodInfo
- bookmarkFileHasItem :: (HasCallStack, MonadIO m) => BookmarkFile -> Text -> m Bool
- data BookmarkFileLoadFromDataMethodInfo
- bookmarkFileLoadFromData :: (HasCallStack, MonadIO m) => BookmarkFile -> Text -> Word64 -> m ()
- data BookmarkFileLoadFromDataDirsMethodInfo
- bookmarkFileLoadFromDataDirs :: (HasCallStack, MonadIO m) => BookmarkFile -> [Char] -> Maybe [Char] -> m ()
- data BookmarkFileLoadFromFileMethodInfo
- bookmarkFileLoadFromFile :: (HasCallStack, MonadIO m) => BookmarkFile -> [Char] -> m ()
- data BookmarkFileMoveItemMethodInfo
- bookmarkFileMoveItem :: (HasCallStack, MonadIO m) => BookmarkFile -> Text -> Maybe Text -> m ()
- data BookmarkFileRemoveApplicationMethodInfo
- bookmarkFileRemoveApplication :: (HasCallStack, MonadIO m) => BookmarkFile -> Text -> Text -> m ()
- data BookmarkFileRemoveGroupMethodInfo
- bookmarkFileRemoveGroup :: (HasCallStack, MonadIO m) => BookmarkFile -> Text -> Text -> m ()
- data BookmarkFileRemoveItemMethodInfo
- bookmarkFileRemoveItem :: (HasCallStack, MonadIO m) => BookmarkFile -> Text -> m ()
- data BookmarkFileSetAddedMethodInfo
- bookmarkFileSetAdded :: (HasCallStack, MonadIO m) => BookmarkFile -> Text -> CLong -> m ()
- data BookmarkFileSetAppInfoMethodInfo
- bookmarkFileSetAppInfo :: (HasCallStack, MonadIO m) => BookmarkFile -> Text -> Text -> Text -> Int32 -> CLong -> m ()
- data BookmarkFileSetDescriptionMethodInfo
- bookmarkFileSetDescription :: (HasCallStack, MonadIO m) => BookmarkFile -> Maybe Text -> Text -> m ()
- data BookmarkFileSetGroupsMethodInfo
- bookmarkFileSetGroups :: (HasCallStack, MonadIO m) => BookmarkFile -> Text -> Maybe Text -> Word64 -> m ()
- data BookmarkFileSetIconMethodInfo
- bookmarkFileSetIcon :: (HasCallStack, MonadIO m) => BookmarkFile -> Text -> Maybe Text -> Text -> m ()
- data BookmarkFileSetIsPrivateMethodInfo
- bookmarkFileSetIsPrivate :: (HasCallStack, MonadIO m) => BookmarkFile -> Text -> Bool -> m ()
- data BookmarkFileSetMimeTypeMethodInfo
- bookmarkFileSetMimeType :: (HasCallStack, MonadIO m) => BookmarkFile -> Text -> Text -> m ()
- data BookmarkFileSetModifiedMethodInfo
- bookmarkFileSetModified :: (HasCallStack, MonadIO m) => BookmarkFile -> Text -> CLong -> m ()
- data BookmarkFileSetTitleMethodInfo
- bookmarkFileSetTitle :: (HasCallStack, MonadIO m) => BookmarkFile -> Maybe Text -> Text -> m ()
- data BookmarkFileSetVisitedMethodInfo
- bookmarkFileSetVisited :: (HasCallStack, MonadIO m) => BookmarkFile -> Text -> CLong -> m ()
- data BookmarkFileToDataMethodInfo
- bookmarkFileToData :: (HasCallStack, MonadIO m) => BookmarkFile -> m (Text, Word64)
- data BookmarkFileToFileMethodInfo
- bookmarkFileToFile :: (HasCallStack, MonadIO m) => BookmarkFile -> [Char] -> m ()
Exported types
newtype BookmarkFile Source #
Methods
addApplication
data BookmarkFileAddApplicationMethodInfo Source #
((~) * signature (Text -> Maybe Text -> Maybe Text -> m ()), MonadIO m) => MethodInfo * BookmarkFileAddApplicationMethodInfo BookmarkFile signature Source # | |
bookmarkFileAddApplication Source #
:: (HasCallStack, MonadIO m) | |
=> BookmarkFile |
|
-> Text |
|
-> Maybe Text |
|
-> Maybe Text |
|
-> m () |
Adds the application with name
and exec
to the list of
applications that have registered a bookmark for uri
into
bookmark
.
Every bookmark inside a BookmarkFile
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.
If name
is Nothing
, the name of the application will be the
same returned by getApplicationName
; if exec
is Nothing
, the
command line will be a composition of the program name as
returned by getPrgname
and the "%u" modifier, which will be
expanded to the bookmark's URI.
This function will automatically take care of updating the
registrations count and timestamping in case an application
with the same name
had already registered a bookmark for
uri
inside bookmark
.
If no bookmark for uri
is found, one is created.
Since: 2.12
addGroup
data BookmarkFileAddGroupMethodInfo Source #
((~) * signature (Text -> Text -> m ()), MonadIO m) => MethodInfo * BookmarkFileAddGroupMethodInfo BookmarkFile signature Source # | |
:: (HasCallStack, MonadIO m) | |
=> BookmarkFile |
|
-> Text |
|
-> Text |
|
-> m () |
Adds group
to the list of groups to which the bookmark for uri
belongs to.
If no bookmark for uri
is found then it is created.
Since: 2.12
errorQuark
bookmarkFileErrorQuark :: (HasCallStack, MonadIO m) => m Word32 Source #
No description available in the introspection data.
free
data BookmarkFileFreeMethodInfo Source #
((~) * signature (m ()), MonadIO m) => MethodInfo * BookmarkFileFreeMethodInfo BookmarkFile signature Source # | |
:: (HasCallStack, MonadIO m) | |
=> BookmarkFile |
|
-> m () |
Frees a BookmarkFile
.
Since: 2.12
getAdded
data BookmarkFileGetAddedMethodInfo Source #
((~) * signature (Text -> m CLong), MonadIO m) => MethodInfo * BookmarkFileGetAddedMethodInfo BookmarkFile signature Source # | |
:: (HasCallStack, MonadIO m) | |
=> BookmarkFile |
|
-> Text |
|
-> m CLong | Returns: a timestamp (Can throw |
Gets the time the bookmark for uri
was added to bookmark
In the event the URI cannot be found, -1 is returned and
error
is set to G_BOOKMARK_FILE_ERROR_URI_NOT_FOUND
.
Since: 2.12
getAppInfo
data BookmarkFileGetAppInfoMethodInfo Source #
((~) * signature (Text -> Text -> m (Text, Word32, CLong)), MonadIO m) => MethodInfo * BookmarkFileGetAppInfoMethodInfo BookmarkFile signature Source # | |
bookmarkFileGetAppInfo Source #
:: (HasCallStack, MonadIO m) | |
=> BookmarkFile |
|
-> Text |
|
-> Text |
|
-> m (Text, Word32, CLong) | (Can throw |
Gets the registration informations of appName
for the bookmark for
uri
. See bookmarkFileSetAppInfo
for more informations about
the returned data.
The string returned in appExec
must be freed.
In the event the URI cannot be found, False
is returned and
error
is set to G_BOOKMARK_FILE_ERROR_URI_NOT_FOUND
. In the
event that no application with name appName
has registered a bookmark
for uri
, False
is returned and error is set to
G_BOOKMARK_FILE_ERROR_APP_NOT_REGISTERED
. In the event that unquoting
the command line fails, an error of the G_SHELL_ERROR
domain is
set and False
is returned.
Since: 2.12
getApplications
data BookmarkFileGetApplicationsMethodInfo Source #
((~) * signature (Text -> m [Text]), MonadIO m) => MethodInfo * BookmarkFileGetApplicationsMethodInfo BookmarkFile signature Source # | |
bookmarkFileGetApplications Source #
:: (HasCallStack, MonadIO m) | |
=> BookmarkFile |
|
-> Text |
|
-> m [Text] | Returns: a newly allocated |
Retrieves the names of the applications that have registered the
bookmark for uri
.
In the event the URI cannot be found, Nothing
is returned and
error
is set to G_BOOKMARK_FILE_ERROR_URI_NOT_FOUND
.
Since: 2.12
getDescription
data BookmarkFileGetDescriptionMethodInfo Source #
((~) * signature (Text -> m Text), MonadIO m) => MethodInfo * BookmarkFileGetDescriptionMethodInfo BookmarkFile signature Source # | |
bookmarkFileGetDescription Source #
:: (HasCallStack, MonadIO m) | |
=> BookmarkFile |
|
-> Text |
|
-> m Text | Returns: a newly allocated string or |
Retrieves the description of the bookmark for uri
.
In the event the URI cannot be found, Nothing
is returned and
error
is set to G_BOOKMARK_FILE_ERROR_URI_NOT_FOUND
.
Since: 2.12
getGroups
data BookmarkFileGetGroupsMethodInfo Source #
((~) * signature (Text -> m [Text]), MonadIO m) => MethodInfo * BookmarkFileGetGroupsMethodInfo BookmarkFile signature Source # | |
bookmarkFileGetGroups Source #
:: (HasCallStack, MonadIO m) | |
=> BookmarkFile |
|
-> Text |
|
-> m [Text] | Returns: a newly allocated |
getIcon
data BookmarkFileGetIconMethodInfo Source #
((~) * signature (Text -> m (Text, Text)), MonadIO m) => MethodInfo * BookmarkFileGetIconMethodInfo BookmarkFile signature Source # | |
:: (HasCallStack, MonadIO m) | |
=> BookmarkFile |
|
-> Text |
|
-> m (Text, Text) | (Can throw |
Gets the icon of the bookmark for uri
.
In the event the URI cannot be found, False
is returned and
error
is set to G_BOOKMARK_FILE_ERROR_URI_NOT_FOUND
.
Since: 2.12
getIsPrivate
data BookmarkFileGetIsPrivateMethodInfo Source #
((~) * signature (Text -> m ()), MonadIO m) => MethodInfo * BookmarkFileGetIsPrivateMethodInfo BookmarkFile signature Source # | |
bookmarkFileGetIsPrivate Source #
:: (HasCallStack, MonadIO m) | |
=> BookmarkFile |
|
-> Text |
|
-> m () | (Can throw |
Gets whether the private flag of the bookmark for uri
is set.
In the event the URI cannot be found, False
is returned and
error
is set to G_BOOKMARK_FILE_ERROR_URI_NOT_FOUND
. In the
event that the private flag cannot be found, False
is returned and
error
is set to G_BOOKMARK_FILE_ERROR_INVALID_VALUE
.
Since: 2.12
getMimeType
data BookmarkFileGetMimeTypeMethodInfo Source #
((~) * signature (Text -> m Text), MonadIO m) => MethodInfo * BookmarkFileGetMimeTypeMethodInfo BookmarkFile signature Source # | |
bookmarkFileGetMimeType Source #
:: (HasCallStack, MonadIO m) | |
=> BookmarkFile |
|
-> Text |
|
-> m Text | Returns: a newly allocated string or |
Retrieves the MIME type of the resource pointed by uri
.
In the event the URI cannot be found, Nothing
is returned and
error
is set to G_BOOKMARK_FILE_ERROR_URI_NOT_FOUND
. In the
event that the MIME type cannot be found, Nothing
is returned and
error
is set to G_BOOKMARK_FILE_ERROR_INVALID_VALUE
.
Since: 2.12
getModified
data BookmarkFileGetModifiedMethodInfo Source #
((~) * signature (Text -> m CLong), MonadIO m) => MethodInfo * BookmarkFileGetModifiedMethodInfo BookmarkFile signature Source # | |
bookmarkFileGetModified Source #
:: (HasCallStack, MonadIO m) | |
=> BookmarkFile |
|
-> Text |
|
-> m CLong | Returns: a timestamp (Can throw |
Gets the time when the bookmark for uri
was last modified.
In the event the URI cannot be found, -1 is returned and
error
is set to G_BOOKMARK_FILE_ERROR_URI_NOT_FOUND
.
Since: 2.12
getSize
data BookmarkFileGetSizeMethodInfo Source #
((~) * signature (m Int32), MonadIO m) => MethodInfo * BookmarkFileGetSizeMethodInfo BookmarkFile signature Source # | |
:: (HasCallStack, MonadIO m) | |
=> BookmarkFile |
|
-> m Int32 | Returns: the number of bookmarks |
Gets the number of bookmarks inside bookmark
.
Since: 2.12
getTitle
data BookmarkFileGetTitleMethodInfo Source #
((~) * signature (Maybe Text -> m Text), MonadIO m) => MethodInfo * BookmarkFileGetTitleMethodInfo BookmarkFile signature Source # | |
:: (HasCallStack, MonadIO m) | |
=> BookmarkFile |
|
-> Maybe Text |
|
-> m Text | Returns: a newly allocated string or |
getUris
data BookmarkFileGetUrisMethodInfo Source #
((~) * signature (m [Text]), MonadIO m) => MethodInfo * BookmarkFileGetUrisMethodInfo BookmarkFile signature Source # | |
:: (HasCallStack, MonadIO m) | |
=> BookmarkFile |
|
-> m [Text] | Returns: a newly allocated |
getVisited
data BookmarkFileGetVisitedMethodInfo Source #
((~) * signature (Text -> m CLong), MonadIO m) => MethodInfo * BookmarkFileGetVisitedMethodInfo BookmarkFile signature Source # | |
bookmarkFileGetVisited Source #
:: (HasCallStack, MonadIO m) | |
=> BookmarkFile |
|
-> Text |
|
-> m CLong | Returns: a timestamp. (Can throw |
Gets the time the bookmark for uri
was last visited.
In the event the URI cannot be found, -1 is returned and
error
is set to G_BOOKMARK_FILE_ERROR_URI_NOT_FOUND
.
Since: 2.12
hasApplication
data BookmarkFileHasApplicationMethodInfo Source #
((~) * signature (Text -> Text -> m ()), MonadIO m) => MethodInfo * BookmarkFileHasApplicationMethodInfo BookmarkFile signature Source # | |
bookmarkFileHasApplication Source #
:: (HasCallStack, MonadIO m) | |
=> BookmarkFile |
|
-> Text |
|
-> Text |
|
-> m () | (Can throw |
Checks whether the bookmark for uri
inside bookmark
has been
registered by application name
.
In the event the URI cannot be found, False
is returned and
error
is set to G_BOOKMARK_FILE_ERROR_URI_NOT_FOUND
.
Since: 2.12
hasGroup
data BookmarkFileHasGroupMethodInfo Source #
((~) * signature (Text -> Text -> m ()), MonadIO m) => MethodInfo * BookmarkFileHasGroupMethodInfo BookmarkFile signature Source # | |
:: (HasCallStack, MonadIO m) | |
=> BookmarkFile |
|
-> Text |
|
-> Text |
|
-> m () | (Can throw |
Checks whether group
appears in the list of groups to which
the bookmark for uri
belongs to.
In the event the URI cannot be found, False
is returned and
error
is set to G_BOOKMARK_FILE_ERROR_URI_NOT_FOUND
.
Since: 2.12
hasItem
data BookmarkFileHasItemMethodInfo Source #
((~) * signature (Text -> m Bool), MonadIO m) => MethodInfo * BookmarkFileHasItemMethodInfo BookmarkFile signature Source # | |
:: (HasCallStack, MonadIO m) | |
=> BookmarkFile |
|
-> Text |
|
-> m Bool |
Looks whether the desktop bookmark has an item with its URI set to uri
.
Since: 2.12
loadFromData
data BookmarkFileLoadFromDataMethodInfo Source #
((~) * signature (Text -> Word64 -> m ()), MonadIO m) => MethodInfo * BookmarkFileLoadFromDataMethodInfo BookmarkFile signature Source # | |
bookmarkFileLoadFromData Source #
:: (HasCallStack, MonadIO m) | |
=> BookmarkFile |
|
-> Text |
|
-> Word64 |
|
-> m () | (Can throw |
Loads a bookmark file from memory into an empty BookmarkFile
structure. If the object cannot be created then error
is set to a
BookmarkFileError
.
Since: 2.12
loadFromDataDirs
data BookmarkFileLoadFromDataDirsMethodInfo Source #
((~) * signature ([Char] -> Maybe [Char] -> m ()), MonadIO m) => MethodInfo * BookmarkFileLoadFromDataDirsMethodInfo BookmarkFile signature Source # | |
bookmarkFileLoadFromDataDirs Source #
:: (HasCallStack, MonadIO m) | |
=> BookmarkFile |
|
-> [Char] |
|
-> Maybe [Char] |
|
-> m () | (Can throw |
This function looks for a desktop bookmark file named file
in the
paths returned from getUserDataDir
and getSystemDataDirs
,
loads the file into bookmark
and returns the file's full path in
fullPath
. If the file could not be loaded then an error
is
set to either a FileError
or BookmarkFileError
.
Since: 2.12
loadFromFile
data BookmarkFileLoadFromFileMethodInfo Source #
((~) * signature ([Char] -> m ()), MonadIO m) => MethodInfo * BookmarkFileLoadFromFileMethodInfo BookmarkFile signature Source # | |
bookmarkFileLoadFromFile Source #
:: (HasCallStack, MonadIO m) | |
=> BookmarkFile |
|
-> [Char] |
|
-> m () | (Can throw |
Loads a desktop bookmark file into an empty BookmarkFile
structure.
If the file could not be loaded then error
is set to either a FileError
or BookmarkFileError
.
Since: 2.12
moveItem
data BookmarkFileMoveItemMethodInfo Source #
((~) * signature (Text -> Maybe Text -> m ()), MonadIO m) => MethodInfo * BookmarkFileMoveItemMethodInfo BookmarkFile signature Source # | |
:: (HasCallStack, MonadIO m) | |
=> BookmarkFile |
|
-> Text |
|
-> Maybe Text |
|
-> m () | (Can throw |
removeApplication
data BookmarkFileRemoveApplicationMethodInfo Source #
((~) * signature (Text -> Text -> m ()), MonadIO m) => MethodInfo * BookmarkFileRemoveApplicationMethodInfo BookmarkFile signature Source # | |
bookmarkFileRemoveApplication Source #
:: (HasCallStack, MonadIO m) | |
=> BookmarkFile |
|
-> Text |
|
-> Text |
|
-> m () | (Can throw |
Removes application registered with name
from the list of applications
that have registered a bookmark for uri
inside bookmark
.
In the event the URI cannot be found, False
is returned and
error
is set to G_BOOKMARK_FILE_ERROR_URI_NOT_FOUND
.
In the event that no application with name appName
has registered
a bookmark for uri
, False
is returned and error is set to
G_BOOKMARK_FILE_ERROR_APP_NOT_REGISTERED
.
Since: 2.12
removeGroup
data BookmarkFileRemoveGroupMethodInfo Source #
((~) * signature (Text -> Text -> m ()), MonadIO m) => MethodInfo * BookmarkFileRemoveGroupMethodInfo BookmarkFile signature Source # | |
bookmarkFileRemoveGroup Source #
:: (HasCallStack, MonadIO m) | |
=> BookmarkFile |
|
-> Text |
|
-> Text |
|
-> m () | (Can throw |
Removes group
from the list of groups to which the bookmark
for uri
belongs to.
In the event the URI cannot be found, False
is returned and
error
is set to G_BOOKMARK_FILE_ERROR_URI_NOT_FOUND
.
In the event no group was defined, False
is returned and
error
is set to G_BOOKMARK_FILE_ERROR_INVALID_VALUE
.
Since: 2.12
removeItem
data BookmarkFileRemoveItemMethodInfo Source #
((~) * signature (Text -> m ()), MonadIO m) => MethodInfo * BookmarkFileRemoveItemMethodInfo BookmarkFile signature Source # | |
bookmarkFileRemoveItem Source #
:: (HasCallStack, MonadIO m) | |
=> BookmarkFile |
|
-> Text |
|
-> m () | (Can throw |
Removes the bookmark for uri
from the bookmark file bookmark
.
Since: 2.12
setAdded
data BookmarkFileSetAddedMethodInfo Source #
((~) * signature (Text -> CLong -> m ()), MonadIO m) => MethodInfo * BookmarkFileSetAddedMethodInfo BookmarkFile signature Source # | |
:: (HasCallStack, MonadIO m) | |
=> BookmarkFile |
|
-> Text |
|
-> CLong |
|
-> m () |
Sets the time the bookmark for uri
was added into bookmark
.
If no bookmark for uri
is found then it is created.
Since: 2.12
setAppInfo
data BookmarkFileSetAppInfoMethodInfo Source #
((~) * signature (Text -> Text -> Text -> Int32 -> CLong -> m ()), MonadIO m) => MethodInfo * BookmarkFileSetAppInfoMethodInfo BookmarkFile signature Source # | |
bookmarkFileSetAppInfo Source #
:: (HasCallStack, MonadIO m) | |
=> BookmarkFile |
|
-> Text |
|
-> Text |
|
-> Text |
|
-> Int32 |
|
-> CLong |
|
-> m () | (Can throw |
Sets the meta-data of application name
inside the list of
applications that have registered a bookmark for uri
inside
bookmark
.
You should rarely use this function; use bookmarkFileAddApplication
and bookmarkFileRemoveApplication
instead.
name
can be any UTF-8 encoded string used to identify an
application.
exec
can have one of these two modifiers: "%f", which will
be expanded as the local file name retrieved from the bookmark's
URI; "%u", which will be expanded as the bookmark's URI.
The expansion is done automatically when retrieving the stored
command line using the bookmarkFileGetAppInfo
function.
count
is the number of times the application has registered the
bookmark; if is < 0, the current registration count will be increased
by one, if is 0, the application with name
will be removed from
the list of registered applications.
stamp
is the Unix time of the last registration; if it is -1, the
current time will be used.
If you try to remove an application by setting its registration count to
zero, and no bookmark for uri
is found, False
is returned and
error
is set to G_BOOKMARK_FILE_ERROR_URI_NOT_FOUND
; similarly,
in the event that no application name
has registered a bookmark
for uri
, False
is returned and error is set to
G_BOOKMARK_FILE_ERROR_APP_NOT_REGISTERED
. Otherwise, if no bookmark
for uri
is found, one is created.
Since: 2.12
setDescription
data BookmarkFileSetDescriptionMethodInfo Source #
((~) * signature (Maybe Text -> Text -> m ()), MonadIO m) => MethodInfo * BookmarkFileSetDescriptionMethodInfo BookmarkFile signature Source # | |
bookmarkFileSetDescription Source #
:: (HasCallStack, MonadIO m) | |
=> BookmarkFile |
|
-> Maybe Text |
|
-> Text |
|
-> m () |
Sets description
as the description of the bookmark for uri
.
If uri
is Nothing
, the description of bookmark
is set.
If a bookmark for uri
cannot be found then it is created.
Since: 2.12
setGroups
data BookmarkFileSetGroupsMethodInfo Source #
((~) * signature (Text -> Maybe Text -> Word64 -> m ()), MonadIO m) => MethodInfo * BookmarkFileSetGroupsMethodInfo BookmarkFile signature Source # | |
bookmarkFileSetGroups Source #
:: (HasCallStack, MonadIO m) | |
=> BookmarkFile |
|
-> Text |
|
-> Maybe Text |
|
-> Word64 |
|
-> m () |
Sets a list of group names for the item with URI uri
. Each previously
set group name list is removed.
If uri
cannot be found then an item for it is created.
Since: 2.12
setIcon
data BookmarkFileSetIconMethodInfo Source #
((~) * signature (Text -> Maybe Text -> Text -> m ()), MonadIO m) => MethodInfo * BookmarkFileSetIconMethodInfo BookmarkFile signature Source # | |
:: (HasCallStack, MonadIO m) | |
=> BookmarkFile |
|
-> Text |
|
-> Maybe Text |
|
-> Text |
|
-> m () |
Sets the icon for the bookmark for uri
. If href
is Nothing
, unsets
the currently set icon. href
can either be a full URL for the icon
file or the icon name following the Icon Naming specification.
If no bookmark for uri
is found one is created.
Since: 2.12
setIsPrivate
data BookmarkFileSetIsPrivateMethodInfo Source #
((~) * signature (Text -> Bool -> m ()), MonadIO m) => MethodInfo * BookmarkFileSetIsPrivateMethodInfo BookmarkFile signature Source # | |
bookmarkFileSetIsPrivate Source #
:: (HasCallStack, MonadIO m) | |
=> BookmarkFile |
|
-> Text |
|
-> Bool |
|
-> m () |
Sets the private flag of the bookmark for uri
.
If a bookmark for uri
cannot be found then it is created.
Since: 2.12
setMimeType
data BookmarkFileSetMimeTypeMethodInfo Source #
((~) * signature (Text -> Text -> m ()), MonadIO m) => MethodInfo * BookmarkFileSetMimeTypeMethodInfo BookmarkFile signature Source # | |
bookmarkFileSetMimeType Source #
:: (HasCallStack, MonadIO m) | |
=> BookmarkFile |
|
-> Text |
|
-> Text |
|
-> m () |
Sets mimeType
as the MIME type of the bookmark for uri
.
If a bookmark for uri
cannot be found then it is created.
Since: 2.12
setModified
data BookmarkFileSetModifiedMethodInfo Source #
((~) * signature (Text -> CLong -> m ()), MonadIO m) => MethodInfo * BookmarkFileSetModifiedMethodInfo BookmarkFile signature Source # | |
bookmarkFileSetModified Source #
:: (HasCallStack, MonadIO m) | |
=> BookmarkFile |
|
-> Text |
|
-> CLong |
|
-> m () |
Sets the last time the bookmark for uri
was last modified.
If no bookmark for uri
is found then it is created.
The "modified" time should only be set when the bookmark's meta-data
was actually changed. Every function of BookmarkFile
that
modifies a bookmark also changes the modification time, except for
bookmarkFileSetVisited
.
Since: 2.12
setTitle
data BookmarkFileSetTitleMethodInfo Source #
((~) * signature (Maybe Text -> Text -> m ()), MonadIO m) => MethodInfo * BookmarkFileSetTitleMethodInfo BookmarkFile signature Source # | |
:: (HasCallStack, MonadIO m) | |
=> BookmarkFile |
|
-> Maybe Text |
|
-> Text |
|
-> m () |
Sets title
as the title of the bookmark for uri
inside the
bookmark file bookmark
.
If uri
is Nothing
, the title of bookmark
is set.
If a bookmark for uri
cannot be found then it is created.
Since: 2.12
setVisited
data BookmarkFileSetVisitedMethodInfo Source #
((~) * signature (Text -> CLong -> m ()), MonadIO m) => MethodInfo * BookmarkFileSetVisitedMethodInfo BookmarkFile signature Source # | |
bookmarkFileSetVisited Source #
:: (HasCallStack, MonadIO m) | |
=> BookmarkFile |
|
-> Text |
|
-> CLong |
|
-> m () |
Sets the time the bookmark for uri
was last visited.
If no bookmark for uri
is found then it is created.
The "visited" time should only be set if the bookmark was launched,
either using the command line retrieved by bookmarkFileGetAppInfo
or by the default application for the bookmark's MIME type, retrieved
using bookmarkFileGetMimeType
. Changing the "visited" time
does not affect the "modified" time.
Since: 2.12
toData
data BookmarkFileToDataMethodInfo Source #
((~) * signature (m (Text, Word64)), MonadIO m) => MethodInfo * BookmarkFileToDataMethodInfo BookmarkFile signature Source # | |
:: (HasCallStack, MonadIO m) | |
=> BookmarkFile |
|
-> m (Text, Word64) | Returns: a newly allocated string holding
the contents of the |
This function outputs bookmark
as a string.
Since: 2.12
toFile
data BookmarkFileToFileMethodInfo Source #
((~) * signature ([Char] -> m ()), MonadIO m) => MethodInfo * BookmarkFileToFileMethodInfo BookmarkFile signature Source # | |
:: (HasCallStack, MonadIO m) | |
=> BookmarkFile |
|
-> [Char] |
|
-> m () | (Can throw |
This function outputs bookmark
into a file. The write process is
guaranteed to be atomic by using fileSetContents
internally.
Since: 2.12