/*
 * This file is generated by gdbus-codegen, do not modify it.
 *
 * The license of this code is the same as for the D-Bus interface description
 * it was derived from. Note that it links to GLib, so must comply with the
 * LGPL linking clauses.
 */

#ifndef __FLATPAK_PORTAL_DBUS_H__
#define __FLATPAK_PORTAL_DBUS_H__

#include <gio/gio.h>

G_BEGIN_DECLS


/* ------------------------------------------------------------------------ */
/* Declarations for org.freedesktop.portal.Flatpak */

#define PORTAL_TYPE_FLATPAK (portal_flatpak_get_type ())
#define PORTAL_FLATPAK(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), PORTAL_TYPE_FLATPAK, PortalFlatpak))
#define PORTAL_IS_FLATPAK(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), PORTAL_TYPE_FLATPAK))
#define PORTAL_FLATPAK_GET_IFACE(o) (G_TYPE_INSTANCE_GET_INTERFACE ((o), PORTAL_TYPE_FLATPAK, PortalFlatpakIface))

struct _PortalFlatpak;
typedef struct _PortalFlatpak PortalFlatpak;
typedef struct _PortalFlatpakIface PortalFlatpakIface;

struct _PortalFlatpakIface
{
  GTypeInterface parent_iface;



  gboolean (*handle_create_update_monitor) (
    PortalFlatpak *object,
    GDBusMethodInvocation *invocation,
    GVariant *arg_options);

  gboolean (*handle_spawn) (
    PortalFlatpak *object,
    GDBusMethodInvocation *invocation,
    GUnixFDList *fd_list,
    const gchar *arg_cwd_path,
    const gchar *const *arg_argv,
    GVariant *arg_fds,
    GVariant *arg_envs,
    guint arg_flags,
    GVariant *arg_options);

  gboolean (*handle_spawn_signal) (
    PortalFlatpak *object,
    GDBusMethodInvocation *invocation,
    guint arg_pid,
    guint arg_signal,
    gboolean arg_to_process_group);

  guint  (*get_supports) (PortalFlatpak *object);

  guint  (*get_version) (PortalFlatpak *object);

  void (*spawn_exited) (
    PortalFlatpak *object,
    guint arg_pid,
    guint arg_exit_status);

  void (*spawn_started) (
    PortalFlatpak *object,
    guint arg_pid,
    guint arg_relpid);

};

#if GLIB_CHECK_VERSION(2, 44, 0)
G_DEFINE_AUTOPTR_CLEANUP_FUNC (PortalFlatpak, g_object_unref)
#endif

GType portal_flatpak_get_type (void) G_GNUC_CONST;

GDBusInterfaceInfo *portal_flatpak_interface_info (void);
guint portal_flatpak_override_properties (GObjectClass *klass, guint property_id_begin);


/* D-Bus method call completion functions: */
void portal_flatpak_complete_spawn (
    PortalFlatpak *object,
    GDBusMethodInvocation *invocation,
    GUnixFDList *fd_list,
    guint pid);

void portal_flatpak_complete_spawn_signal (
    PortalFlatpak *object,
    GDBusMethodInvocation *invocation);

void portal_flatpak_complete_create_update_monitor (
    PortalFlatpak *object,
    GDBusMethodInvocation *invocation,
    const gchar *handle);



/* D-Bus signal emissions functions: */
void portal_flatpak_emit_spawn_started (
    PortalFlatpak *object,
    guint arg_pid,
    guint arg_relpid);

void portal_flatpak_emit_spawn_exited (
    PortalFlatpak *object,
    guint arg_pid,
    guint arg_exit_status);



/* D-Bus method calls: */
void portal_flatpak_call_spawn (
    PortalFlatpak *proxy,
    const gchar *arg_cwd_path,
    const gchar *const *arg_argv,
    GVariant *arg_fds,
    GVariant *arg_envs,
    guint arg_flags,
    GVariant *arg_options,
    GUnixFDList *fd_list,
    GCancellable *cancellable,
    GAsyncReadyCallback callback,
    gpointer user_data);

gboolean portal_flatpak_call_spawn_finish (
    PortalFlatpak *proxy,
    guint *out_pid,
    GUnixFDList **out_fd_list,
    GAsyncResult *res,
    GError **error);

gboolean portal_flatpak_call_spawn_sync (
    PortalFlatpak *proxy,
    const gchar *arg_cwd_path,
    const gchar *const *arg_argv,
    GVariant *arg_fds,
    GVariant *arg_envs,
    guint arg_flags,
    GVariant *arg_options,
    GUnixFDList  *fd_list,
    guint *out_pid,
    GUnixFDList **out_fd_list,
    GCancellable *cancellable,
    GError **error);

void portal_flatpak_call_spawn_signal (
    PortalFlatpak *proxy,
    guint arg_pid,
    guint arg_signal,
    gboolean arg_to_process_group,
    GCancellable *cancellable,
    GAsyncReadyCallback callback,
    gpointer user_data);

gboolean portal_flatpak_call_spawn_signal_finish (
    PortalFlatpak *proxy,
    GAsyncResult *res,
    GError **error);

gboolean portal_flatpak_call_spawn_signal_sync (
    PortalFlatpak *proxy,
    guint arg_pid,
    guint arg_signal,
    gboolean arg_to_process_group,
    GCancellable *cancellable,
    GError **error);

void portal_flatpak_call_create_update_monitor (
    PortalFlatpak *proxy,
    GVariant *arg_options,
    GCancellable *cancellable,
    GAsyncReadyCallback callback,
    gpointer user_data);

gboolean portal_flatpak_call_create_update_monitor_finish (
    PortalFlatpak *proxy,
    gchar **out_handle,
    GAsyncResult *res,
    GError **error);

gboolean portal_flatpak_call_create_update_monitor_sync (
    PortalFlatpak *proxy,
    GVariant *arg_options,
    gchar **out_handle,
    GCancellable *cancellable,
    GError **error);



/* D-Bus property accessors: */
guint portal_flatpak_get_version (PortalFlatpak *object);
void portal_flatpak_set_version (PortalFlatpak *object, guint value);

guint portal_flatpak_get_supports (PortalFlatpak *object);
void portal_flatpak_set_supports (PortalFlatpak *object, guint value);


/* ---- */

#define PORTAL_TYPE_FLATPAK_PROXY (portal_flatpak_proxy_get_type ())
#define PORTAL_FLATPAK_PROXY(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), PORTAL_TYPE_FLATPAK_PROXY, PortalFlatpakProxy))
#define PORTAL_FLATPAK_PROXY_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), PORTAL_TYPE_FLATPAK_PROXY, PortalFlatpakProxyClass))
#define PORTAL_FLATPAK_PROXY_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), PORTAL_TYPE_FLATPAK_PROXY, PortalFlatpakProxyClass))
#define PORTAL_IS_FLATPAK_PROXY(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), PORTAL_TYPE_FLATPAK_PROXY))
#define PORTAL_IS_FLATPAK_PROXY_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), PORTAL_TYPE_FLATPAK_PROXY))

typedef struct _PortalFlatpakProxy PortalFlatpakProxy;
typedef struct _PortalFlatpakProxyClass PortalFlatpakProxyClass;
typedef struct _PortalFlatpakProxyPrivate PortalFlatpakProxyPrivate;

struct _PortalFlatpakProxy
{
  /*< private >*/
  GDBusProxy parent_instance;
  PortalFlatpakProxyPrivate *priv;
};

struct _PortalFlatpakProxyClass
{
  GDBusProxyClass parent_class;
};

GType portal_flatpak_proxy_get_type (void) G_GNUC_CONST;

#if GLIB_CHECK_VERSION(2, 44, 0)
G_DEFINE_AUTOPTR_CLEANUP_FUNC (PortalFlatpakProxy, g_object_unref)
#endif

void portal_flatpak_proxy_new (
    GDBusConnection     *connection,
    GDBusProxyFlags      flags,
    const gchar         *name,
    const gchar         *object_path,
    GCancellable        *cancellable,
    GAsyncReadyCallback  callback,
    gpointer             user_data);
PortalFlatpak *portal_flatpak_proxy_new_finish (
    GAsyncResult        *res,
    GError             **error);
PortalFlatpak *portal_flatpak_proxy_new_sync (
    GDBusConnection     *connection,
    GDBusProxyFlags      flags,
    const gchar         *name,
    const gchar         *object_path,
    GCancellable        *cancellable,
    GError             **error);

void portal_flatpak_proxy_new_for_bus (
    GBusType             bus_type,
    GDBusProxyFlags      flags,
    const gchar         *name,
    const gchar         *object_path,
    GCancellable        *cancellable,
    GAsyncReadyCallback  callback,
    gpointer             user_data);
PortalFlatpak *portal_flatpak_proxy_new_for_bus_finish (
    GAsyncResult        *res,
    GError             **error);
PortalFlatpak *portal_flatpak_proxy_new_for_bus_sync (
    GBusType             bus_type,
    GDBusProxyFlags      flags,
    const gchar         *name,
    const gchar         *object_path,
    GCancellable        *cancellable,
    GError             **error);


/* ---- */

#define PORTAL_TYPE_FLATPAK_SKELETON (portal_flatpak_skeleton_get_type ())
#define PORTAL_FLATPAK_SKELETON(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), PORTAL_TYPE_FLATPAK_SKELETON, PortalFlatpakSkeleton))
#define PORTAL_FLATPAK_SKELETON_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), PORTAL_TYPE_FLATPAK_SKELETON, PortalFlatpakSkeletonClass))
#define PORTAL_FLATPAK_SKELETON_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), PORTAL_TYPE_FLATPAK_SKELETON, PortalFlatpakSkeletonClass))
#define PORTAL_IS_FLATPAK_SKELETON(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), PORTAL_TYPE_FLATPAK_SKELETON))
#define PORTAL_IS_FLATPAK_SKELETON_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), PORTAL_TYPE_FLATPAK_SKELETON))

typedef struct _PortalFlatpakSkeleton PortalFlatpakSkeleton;
typedef struct _PortalFlatpakSkeletonClass PortalFlatpakSkeletonClass;
typedef struct _PortalFlatpakSkeletonPrivate PortalFlatpakSkeletonPrivate;

struct _PortalFlatpakSkeleton
{
  /*< private >*/
  GDBusInterfaceSkeleton parent_instance;
  PortalFlatpakSkeletonPrivate *priv;
};

struct _PortalFlatpakSkeletonClass
{
  GDBusInterfaceSkeletonClass parent_class;
};

GType portal_flatpak_skeleton_get_type (void) G_GNUC_CONST;

#if GLIB_CHECK_VERSION(2, 44, 0)
G_DEFINE_AUTOPTR_CLEANUP_FUNC (PortalFlatpakSkeleton, g_object_unref)
#endif

PortalFlatpak *portal_flatpak_skeleton_new (void);


/* ------------------------------------------------------------------------ */
/* Declarations for org.freedesktop.portal.Flatpak.UpdateMonitor */

#define PORTAL_TYPE_FLATPAK_UPDATE_MONITOR (portal_flatpak_update_monitor_get_type ())
#define PORTAL_FLATPAK_UPDATE_MONITOR(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), PORTAL_TYPE_FLATPAK_UPDATE_MONITOR, PortalFlatpakUpdateMonitor))
#define PORTAL_IS_FLATPAK_UPDATE_MONITOR(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), PORTAL_TYPE_FLATPAK_UPDATE_MONITOR))
#define PORTAL_FLATPAK_UPDATE_MONITOR_GET_IFACE(o) (G_TYPE_INSTANCE_GET_INTERFACE ((o), PORTAL_TYPE_FLATPAK_UPDATE_MONITOR, PortalFlatpakUpdateMonitorIface))

struct _PortalFlatpakUpdateMonitor;
typedef struct _PortalFlatpakUpdateMonitor PortalFlatpakUpdateMonitor;
typedef struct _PortalFlatpakUpdateMonitorIface PortalFlatpakUpdateMonitorIface;

struct _PortalFlatpakUpdateMonitorIface
{
  GTypeInterface parent_iface;


  gboolean (*handle_close) (
    PortalFlatpakUpdateMonitor *object,
    GDBusMethodInvocation *invocation);

  gboolean (*handle_update) (
    PortalFlatpakUpdateMonitor *object,
    GDBusMethodInvocation *invocation,
    const gchar *arg_parent_window,
    GVariant *arg_options);

  void (*progress) (
    PortalFlatpakUpdateMonitor *object,
    GVariant *arg_info);

  void (*update_available) (
    PortalFlatpakUpdateMonitor *object,
    GVariant *arg_update_info);

};

#if GLIB_CHECK_VERSION(2, 44, 0)
G_DEFINE_AUTOPTR_CLEANUP_FUNC (PortalFlatpakUpdateMonitor, g_object_unref)
#endif

GType portal_flatpak_update_monitor_get_type (void) G_GNUC_CONST;

GDBusInterfaceInfo *portal_flatpak_update_monitor_interface_info (void);
guint portal_flatpak_update_monitor_override_properties (GObjectClass *klass, guint property_id_begin);


/* D-Bus method call completion functions: */
void portal_flatpak_update_monitor_complete_close (
    PortalFlatpakUpdateMonitor *object,
    GDBusMethodInvocation *invocation);

void portal_flatpak_update_monitor_complete_update (
    PortalFlatpakUpdateMonitor *object,
    GDBusMethodInvocation *invocation);



/* D-Bus signal emissions functions: */
void portal_flatpak_update_monitor_emit_update_available (
    PortalFlatpakUpdateMonitor *object,
    GVariant *arg_update_info);

void portal_flatpak_update_monitor_emit_progress (
    PortalFlatpakUpdateMonitor *object,
    GVariant *arg_info);



/* D-Bus method calls: */
void portal_flatpak_update_monitor_call_close (
    PortalFlatpakUpdateMonitor *proxy,
    GCancellable *cancellable,
    GAsyncReadyCallback callback,
    gpointer user_data);

gboolean portal_flatpak_update_monitor_call_close_finish (
    PortalFlatpakUpdateMonitor *proxy,
    GAsyncResult *res,
    GError **error);

gboolean portal_flatpak_update_monitor_call_close_sync (
    PortalFlatpakUpdateMonitor *proxy,
    GCancellable *cancellable,
    GError **error);

void portal_flatpak_update_monitor_call_update (
    PortalFlatpakUpdateMonitor *proxy,
    const gchar *arg_parent_window,
    GVariant *arg_options,
    GCancellable *cancellable,
    GAsyncReadyCallback callback,
    gpointer user_data);

gboolean portal_flatpak_update_monitor_call_update_finish (
    PortalFlatpakUpdateMonitor *proxy,
    GAsyncResult *res,
    GError **error);

gboolean portal_flatpak_update_monitor_call_update_sync (
    PortalFlatpakUpdateMonitor *proxy,
    const gchar *arg_parent_window,
    GVariant *arg_options,
    GCancellable *cancellable,
    GError **error);



/* ---- */

#define PORTAL_TYPE_FLATPAK_UPDATE_MONITOR_PROXY (portal_flatpak_update_monitor_proxy_get_type ())
#define PORTAL_FLATPAK_UPDATE_MONITOR_PROXY(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), PORTAL_TYPE_FLATPAK_UPDATE_MONITOR_PROXY, PortalFlatpakUpdateMonitorProxy))
#define PORTAL_FLATPAK_UPDATE_MONITOR_PROXY_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), PORTAL_TYPE_FLATPAK_UPDATE_MONITOR_PROXY, PortalFlatpakUpdateMonitorProxyClass))
#define PORTAL_FLATPAK_UPDATE_MONITOR_PROXY_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), PORTAL_TYPE_FLATPAK_UPDATE_MONITOR_PROXY, PortalFlatpakUpdateMonitorProxyClass))
#define PORTAL_IS_FLATPAK_UPDATE_MONITOR_PROXY(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), PORTAL_TYPE_FLATPAK_UPDATE_MONITOR_PROXY))
#define PORTAL_IS_FLATPAK_UPDATE_MONITOR_PROXY_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), PORTAL_TYPE_FLATPAK_UPDATE_MONITOR_PROXY))

typedef struct _PortalFlatpakUpdateMonitorProxy PortalFlatpakUpdateMonitorProxy;
typedef struct _PortalFlatpakUpdateMonitorProxyClass PortalFlatpakUpdateMonitorProxyClass;
typedef struct _PortalFlatpakUpdateMonitorProxyPrivate PortalFlatpakUpdateMonitorProxyPrivate;

struct _PortalFlatpakUpdateMonitorProxy
{
  /*< private >*/
  GDBusProxy parent_instance;
  PortalFlatpakUpdateMonitorProxyPrivate *priv;
};

struct _PortalFlatpakUpdateMonitorProxyClass
{
  GDBusProxyClass parent_class;
};

GType portal_flatpak_update_monitor_proxy_get_type (void) G_GNUC_CONST;

#if GLIB_CHECK_VERSION(2, 44, 0)
G_DEFINE_AUTOPTR_CLEANUP_FUNC (PortalFlatpakUpdateMonitorProxy, g_object_unref)
#endif

void portal_flatpak_update_monitor_proxy_new (
    GDBusConnection     *connection,
    GDBusProxyFlags      flags,
    const gchar         *name,
    const gchar         *object_path,
    GCancellable        *cancellable,
    GAsyncReadyCallback  callback,
    gpointer             user_data);
PortalFlatpakUpdateMonitor *portal_flatpak_update_monitor_proxy_new_finish (
    GAsyncResult        *res,
    GError             **error);
PortalFlatpakUpdateMonitor *portal_flatpak_update_monitor_proxy_new_sync (
    GDBusConnection     *connection,
    GDBusProxyFlags      flags,
    const gchar         *name,
    const gchar         *object_path,
    GCancellable        *cancellable,
    GError             **error);

void portal_flatpak_update_monitor_proxy_new_for_bus (
    GBusType             bus_type,
    GDBusProxyFlags      flags,
    const gchar         *name,
    const gchar         *object_path,
    GCancellable        *cancellable,
    GAsyncReadyCallback  callback,
    gpointer             user_data);
PortalFlatpakUpdateMonitor *portal_flatpak_update_monitor_proxy_new_for_bus_finish (
    GAsyncResult        *res,
    GError             **error);
PortalFlatpakUpdateMonitor *portal_flatpak_update_monitor_proxy_new_for_bus_sync (
    GBusType             bus_type,
    GDBusProxyFlags      flags,
    const gchar         *name,
    const gchar         *object_path,
    GCancellable        *cancellable,
    GError             **error);


/* ---- */

#define PORTAL_TYPE_FLATPAK_UPDATE_MONITOR_SKELETON (portal_flatpak_update_monitor_skeleton_get_type ())
#define PORTAL_FLATPAK_UPDATE_MONITOR_SKELETON(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), PORTAL_TYPE_FLATPAK_UPDATE_MONITOR_SKELETON, PortalFlatpakUpdateMonitorSkeleton))
#define PORTAL_FLATPAK_UPDATE_MONITOR_SKELETON_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), PORTAL_TYPE_FLATPAK_UPDATE_MONITOR_SKELETON, PortalFlatpakUpdateMonitorSkeletonClass))
#define PORTAL_FLATPAK_UPDATE_MONITOR_SKELETON_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), PORTAL_TYPE_FLATPAK_UPDATE_MONITOR_SKELETON, PortalFlatpakUpdateMonitorSkeletonClass))
#define PORTAL_IS_FLATPAK_UPDATE_MONITOR_SKELETON(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), PORTAL_TYPE_FLATPAK_UPDATE_MONITOR_SKELETON))
#define PORTAL_IS_FLATPAK_UPDATE_MONITOR_SKELETON_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), PORTAL_TYPE_FLATPAK_UPDATE_MONITOR_SKELETON))

typedef struct _PortalFlatpakUpdateMonitorSkeleton PortalFlatpakUpdateMonitorSkeleton;
typedef struct _PortalFlatpakUpdateMonitorSkeletonClass PortalFlatpakUpdateMonitorSkeletonClass;
typedef struct _PortalFlatpakUpdateMonitorSkeletonPrivate PortalFlatpakUpdateMonitorSkeletonPrivate;

struct _PortalFlatpakUpdateMonitorSkeleton
{
  /*< private >*/
  GDBusInterfaceSkeleton parent_instance;
  PortalFlatpakUpdateMonitorSkeletonPrivate *priv;
};

struct _PortalFlatpakUpdateMonitorSkeletonClass
{
  GDBusInterfaceSkeletonClass parent_class;
};

GType portal_flatpak_update_monitor_skeleton_get_type (void) G_GNUC_CONST;

#if GLIB_CHECK_VERSION(2, 44, 0)
G_DEFINE_AUTOPTR_CLEANUP_FUNC (PortalFlatpakUpdateMonitorSkeleton, g_object_unref)
#endif

PortalFlatpakUpdateMonitor *portal_flatpak_update_monitor_skeleton_new (void);


G_END_DECLS

#endif /* __FLATPAK_PORTAL_DBUS_H__ */
