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 typedef enum { 27 XDP_OPEN_URI_FLAG_NONE = 0, 28 XDP_OPEN_URI_FLAG_ASK = 1 << 0, 29 XDP_OPEN_URI_FLAG_WRITABLE = 1 << 1 30 } XdpOpenUriFlags; 31 32 XDP_PUBLIC 33 void xdp_portal_open_uri (XdpPortal *portal, 34 XdpParent *parent, 35 const char *uri, 36 XdpOpenUriFlags flags, 37 GCancellable *cancellable, 38 GAsyncReadyCallback callback, 39 gpointer data); 40 41 XDP_PUBLIC 42 gboolean xdp_portal_open_uri_finish (XdpPortal *portal, 43 GAsyncResult *result, 44 GError **error); 45 46 XDP_PUBLIC 47 void xdp_portal_open_directory (XdpPortal *portal, 48 XdpParent *parent, 49 const char *uri, 50 XdpOpenUriFlags flags, 51 GCancellable *cancellable, 52 GAsyncReadyCallback callback, 53 gpointer data); 54 55 XDP_PUBLIC 56 gboolean xdp_portal_open_directory_finish (XdpPortal *portal, 57 GAsyncResult *result, 58 GError **error); 59 60 G_END_DECLS 61