Background

Background — request background permissions

Functions

Description

These functions let the application request background permissions such as enabling autostart.

The underlying portal is org.freedesktop.portal.Background.

Functions

xdp_portal_request_background ()

void
xdp_portal_request_background (XdpPortal *portal,
                               XdpParent *parent,
                               GPtrArray *commandline,
                               char *reason,
                               gboolean autostart,
                               gboolean dbus_activatable,
                               GCancellable *cancellable,
                               GAsyncReadyCallback callback,
                               gpointer user_data);

Requests background permissions.

When the request is done, callback will be called. You can then call xdp_portal_request_background_finish() to get the results.

Parameters

portal

a XdpPortal

 

parent

parent window information.

[nullable]

commandline

command line to autostart.

[element-type utf8][transfer container]

reason

reason to present to user for request.

[nullable]

autostart

if autostart permissions should be requested

 

dbus_activatable

if launched command is dbus activatable.

 

cancellable

optional GCancellable.

[nullable]

callback

a callback to call when the request is done.

[scope async]

user_data

data to pass to callback .

[closure]

xdp_portal_request_background_finish ()

gboolean
xdp_portal_request_background_finish (XdpPortal *portal,
                                      GAsyncResult *result,
                                      GError **error);

Finishes the request, and returns TRUE if successful.

Parameters

portal

a XdpPortal

 

result

a GAsyncResult

 

error

return location for an error

 

Returns

TRUE if successful.

Types and Values