Function
GioAppInfocreate_from_commandline
Declaration [src]
GAppInfo*
g_app_info_create_from_commandline (
const char* commandline,
const char* application_name,
GAppInfoCreateFlags flags,
GError** error
)
Description [src]
Creates a new GAppInfo from the given information.
When constructing commandline, quote any filenames or potentially-
untrusted input using g_shell_quote(), and note that the
quoting rules of the Exec key of the
freedesktop.org Desktop Entry Specification
are applied. For example, if the commandline contains
percent-encoded URIs, the percent-character must be doubled in order to prevent it from
being swallowed by Exec key unquoting. See
the specification
for exact quoting rules.
Parameters
commandline-
Type:
const char*The command line to use.
The data is owned by the caller of the function. The value is a platform-native string, using the preferred OS encoding on Unix and UTF-8 on Windows. application_name-
Type:
const char*The application name, or
NULLto usecommandline.The argument can be NULL.The data is owned by the caller of the function. The value is a NUL terminated UTF-8 string. flags-
Type:
GAppInfoCreateFlagsFlags that can specify details of the created
GAppInfo. 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 aNULLGError*.The argument will be left initialized to NULLby the function 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.