Method

GioDesktopAppInfolaunch_uris_as_manager

Declaration

gboolean
g_desktop_app_info_launch_uris_as_manager (
  GDesktopAppInfo* appinfo,
  GList* uris,
  GAppLaunchContext* launch_context,
  GSpawnFlags spawn_flags,
  GSpawnChildSetupFunc user_setup,
  gpointer user_setup_data,
  GDesktopAppLaunchCallback pid_callback,
  gpointer pid_callback_data,
  GError** error
)

Description

This function performs the equivalent of g_app_info_launch_uris(), but is intended primarily for operating system components that launch applications. Ordinary applications should use g_app_info_launch_uris().

If the application is launched via GSpawn, then spawn_flags, user_setup and user_setup_data are used for the call to g_spawn_async(). Additionally, pid_callback (with pid_callback_data) will be called to inform about the PID of the created process. See g_spawn_async_with_pipes() for information on certain parameter conditions that can enable an optimized posix_spawn() codepath to be used.

If application launching occurs via some other mechanism (eg: D-Bus activation) then spawn_flags, user_setup, user_setup_data, pid_callback and pid_callback_data are ignored.

Parameters

uris

Type: A list of utf8

List of URIs.

The data is owned by the caller of the function.
Each element is a NUL terminated UTF-8 string.
launch_context

Type: GAppLaunchContext

A GAppLaunchContext.

The argument can be NULL.
The data is owned by the caller of the function.
spawn_flags

Type: GSpawnFlags

GSpawnFlags, used for each process.

user_setup

Type: GSpawnChildSetupFunc

A GSpawnChildSetupFunc, used once for each process.

The argument can be NULL.
user_setup_data

Type: gpointer

User data for user_setup.

The argument can be NULL.
The data is owned by the caller of the function.
pid_callback

Type: GDesktopAppLaunchCallback

Callback for child processes.

The argument can be NULL.
pid_callback_data

Type: gpointer

User data for callback.

The argument can be NULL.
The data is owned by the caller of the function.
error

Type: GError **

The return location for an error.

The argument can be NULL.
The argument will be set to NULL by the function if there are no errors.
In case of error, the argument will be set and the caller will take ownership of the data, and be responsible for freeing it.

Return value

Type: gboolean

TRUE on successful launch, FALSE otherwise.