Method

GLibBookmarkFileget_application_info

since: 2.66

Declaration [src]

gboolean
g_bookmark_file_get_application_info (
  GBookmarkFile* bookmark,
  const char* uri,
  const char* name,
  char** exec,
  unsigned int* count,
  GDateTime** stamp,
  GError** error
)

Description [src]

Gets the registration information of app_name for the bookmark for uri. See g_bookmark_file_set_application_info() for more information about the returned data.

The string returned in app_exec 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 app_name 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.

Available since: 2.66

Parameters

uri

Type: const char*

A valid URI.

The data is owned by the caller of the method.
The value is a NUL terminated UTF-8 string.
name

Type: const char*

An application’s name.

The data is owned by the caller of the method.
The value is a NUL terminated UTF-8 string.
exec

Type: char**

Return location for the command line of the application, or NULL.

The argument will be set by the function.
The argument can be NULL.
The caller of the method takes ownership of the returned data, and is responsible for freeing it.
The value is a NUL terminated UTF-8 string.
count

Type: unsigned int*

Return location for the registration count, or NULL.

The argument will be set by the function.
The argument can be NULL.
stamp

Type: GDateTime

Return location for the last registration time, or NULL.

The argument will be set by the function.
The argument can be NULL.
The returned data is owned by the instance.
error

Type: GError **

The return location for a recoverable error.

The argument can be NULL.
If the return location is not NULL, then you must initialize it to a NULL GError*.
The argument will be left initialized to NULL by the method if there are no errors.
In case of error, the argument will be set to a newly allocated GError; the caller will take ownership of the data, and be responsible for freeing it.

Return value

Type: gboolean

TRUE on success.