1
0
mirror of https://gitlab.gnome.org/GNOME/nautilus synced 2024-06-30 23:46:35 +00:00
nautilus/xdp-gnome/request.h
António Fernandes be9297ca9f general: Copy code from xdg-desktop-portal-gnome
This is code copied from xdg-desktop-portal-gnome repository today[0].

We need it to implement the FileChooser portal ourselves.

It's not included in the build yet, as it needs modifications first.

[0] b92a8cc5f6
2024-06-23 00:04:05 +01:00

55 lines
1.5 KiB
C

/*
* Copyright © 2016 Red Hat, Inc
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
*
* Authors:
* Alexander Larsson <alexl@redhat.com>
* Matthias Clasen <mclasen@redhat.com>
*/
#pragma once
#include "xdg-desktop-portal-dbus.h"
typedef struct _Request Request;
typedef struct _RequestClass RequestClass;
struct _Request
{
XdpImplRequestSkeleton parent_instance;
gboolean exported;
char *sender;
char *app_id;
char *id;
};
struct _RequestClass
{
XdpImplRequestSkeletonClass parent_class;
};
GType request_get_type (void) G_GNUC_CONST;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (Request, g_object_unref)
Request *request_new (const char *sender,
const char *app_id,
const char *id);
void request_export (Request *request,
GDBusConnection *connection);
void request_unexport (Request *request);