1 /* 2 * Copyright (C) 2018, Matthias Clasen 3 * 4 * This file is free software; you can redistribute it and/or modify it 5 * under the terms of the GNU Lesser General Public License as 6 * published by the Free Software Foundation, version 3.0 of the 7 * License. 8 * 9 * This file is distributed in the hope that it will be useful, but 10 * WITHOUT ANY WARRANTY; without even the implied warranty of 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 * Lesser General Public License for more details. 13 * 14 * You should have received a copy of the GNU Lesser General Public 15 * License along with this program. If not, see <http://www.gnu.org/licenses/>. 16 * 17 * SPDX-License-Identifier: LGPL-3.0-only 18 */ 19 20 #pragma once 21 22 #include <libportal/types.h> 23 24 G_BEGIN_DECLS 25 26 /** 27 * XdpBackgroundFlags: 28 * @XDP_BACKGROUND_FLAG_NONE: No options 29 * @XDP_BACKGROUND_FLAG_AUTOSTART: Request autostart as well 30 * @XDP_BACKGROUND_FLAG_ACTIVATABLE: Whether the application is D-Bus-activatable 31 * 32 * Options to use when requesting background. 33 */ 34 typedef enum { 35 XDP_BACKGROUND_FLAG_NONE = 0, 36 XDP_BACKGROUND_FLAG_AUTOSTART = 1 << 0, 37 XDP_BACKGROUND_FLAG_ACTIVATABLE = 1 << 1 38 } XdpBackgroundFlags; 39 40 XDP_PUBLIC 41 void xdp_portal_request_background (XdpPortal *portal, 42 XdpParent *parent, 43 char *reason, 44 GPtrArray *commandline, 45 XdpBackgroundFlags flags, 46 GCancellable *cancellable, 47 GAsyncReadyCallback callback, 48 gpointer user_data); 49 50 XDP_PUBLIC 51 gboolean xdp_portal_request_background_finish (XdpPortal *portal, 52 GAsyncResult *result, 53 GError **error); 54 55 56 G_END_DECLS 57