/*
 * 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.
 */

#pragma once

#include <gio/gio.h>

G_BEGIN_DECLS


/* ------------------------------------------------------------------------ */
/* Declarations for org.freedesktop.login1.Manager */

#define FREEDESKTOP_LOGIN_TYPE_MANAGER (freedesktop_login_manager_get_type ())
#define FREEDESKTOP_LOGIN_MANAGER(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), FREEDESKTOP_LOGIN_TYPE_MANAGER, FreedesktopLoginManager))
#define FREEDESKTOP_LOGIN_IS_MANAGER(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), FREEDESKTOP_LOGIN_TYPE_MANAGER))
#define FREEDESKTOP_LOGIN_MANAGER_GET_IFACE(o) (G_TYPE_INSTANCE_GET_INTERFACE ((o), FREEDESKTOP_LOGIN_TYPE_MANAGER, FreedesktopLoginManagerIface))

struct _FreedesktopLoginManager;
typedef struct _FreedesktopLoginManager FreedesktopLoginManager;
typedef struct _FreedesktopLoginManagerIface FreedesktopLoginManagerIface;

struct _FreedesktopLoginManagerIface
{
  GTypeInterface parent_iface;


  gboolean (*handle_inhibit) (
    FreedesktopLoginManager *object,
    GDBusMethodInvocation *invocation,
    GUnixFDList *fd_list,
    const gchar *arg_what,
    const gchar *arg_who,
    const gchar *arg_why,
    const gchar *arg_mode);

  void (*prepare_for_sleep) (
    FreedesktopLoginManager *object,
    gboolean arg_start);

};

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

GType freedesktop_login_manager_get_type (void) G_GNUC_CONST;

GDBusInterfaceInfo *freedesktop_login_manager_interface_info (void);
guint freedesktop_login_manager_override_properties (GObjectClass *klass, guint property_id_begin);


/* D-Bus method call completion functions: */
void freedesktop_login_manager_complete_inhibit (
    FreedesktopLoginManager *object,
    GDBusMethodInvocation *invocation,
    GUnixFDList *fd_list,
    GVariant *pipe_fd);



/* D-Bus signal emissions functions: */
void freedesktop_login_manager_emit_prepare_for_sleep (
    FreedesktopLoginManager *object,
    gboolean arg_start);



/* D-Bus method calls: */
void freedesktop_login_manager_call_inhibit (
    FreedesktopLoginManager *proxy,
    const gchar *arg_what,
    const gchar *arg_who,
    const gchar *arg_why,
    const gchar *arg_mode,
    GDBusCallFlags call_flags,
    gint timeout_msec,
    GUnixFDList *fd_list,
    GCancellable *cancellable,
    GAsyncReadyCallback callback,
    gpointer user_data);

gboolean freedesktop_login_manager_call_inhibit_finish (
    FreedesktopLoginManager *proxy,
    GVariant ** out_pipe_fd,
    GUnixFDList **out_fd_list,
    GAsyncResult *res,
    GError **error);

gboolean freedesktop_login_manager_call_inhibit_sync (
    FreedesktopLoginManager *proxy,
    const gchar *arg_what,
    const gchar *arg_who,
    const gchar *arg_why,
    const gchar *arg_mode,
    GDBusCallFlags call_flags,
    gint timeout_msec,
    GUnixFDList  *fd_list,
    GVariant ** out_pipe_fd,
    GUnixFDList **out_fd_list,
    GCancellable *cancellable,
    GError **error);



/* ---- */

#define FREEDESKTOP_LOGIN_TYPE_MANAGER_PROXY (freedesktop_login_manager_proxy_get_type ())
#define FREEDESKTOP_LOGIN_MANAGER_PROXY(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), FREEDESKTOP_LOGIN_TYPE_MANAGER_PROXY, FreedesktopLoginManagerProxy))
#define FREEDESKTOP_LOGIN_MANAGER_PROXY_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), FREEDESKTOP_LOGIN_TYPE_MANAGER_PROXY, FreedesktopLoginManagerProxyClass))
#define FREEDESKTOP_LOGIN_MANAGER_PROXY_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), FREEDESKTOP_LOGIN_TYPE_MANAGER_PROXY, FreedesktopLoginManagerProxyClass))
#define FREEDESKTOP_LOGIN_IS_MANAGER_PROXY(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), FREEDESKTOP_LOGIN_TYPE_MANAGER_PROXY))
#define FREEDESKTOP_LOGIN_IS_MANAGER_PROXY_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), FREEDESKTOP_LOGIN_TYPE_MANAGER_PROXY))

typedef struct _FreedesktopLoginManagerProxy FreedesktopLoginManagerProxy;
typedef struct _FreedesktopLoginManagerProxyClass FreedesktopLoginManagerProxyClass;
typedef struct _FreedesktopLoginManagerProxyPrivate FreedesktopLoginManagerProxyPrivate;

struct _FreedesktopLoginManagerProxy
{
  /*< private >*/
  GDBusProxy parent_instance;
  FreedesktopLoginManagerProxyPrivate *priv;
};

struct _FreedesktopLoginManagerProxyClass
{
  GDBusProxyClass parent_class;
};

GType freedesktop_login_manager_proxy_get_type (void) G_GNUC_CONST;

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

void freedesktop_login_manager_proxy_new (
    GDBusConnection     *connection,
    GDBusProxyFlags      flags,
    const gchar         *name,
    const gchar         *object_path,
    GCancellable        *cancellable,
    GAsyncReadyCallback  callback,
    gpointer             user_data);
FreedesktopLoginManager *freedesktop_login_manager_proxy_new_finish (
    GAsyncResult        *res,
    GError             **error);
FreedesktopLoginManager *freedesktop_login_manager_proxy_new_sync (
    GDBusConnection     *connection,
    GDBusProxyFlags      flags,
    const gchar         *name,
    const gchar         *object_path,
    GCancellable        *cancellable,
    GError             **error);

void freedesktop_login_manager_proxy_new_for_bus (
    GBusType             bus_type,
    GDBusProxyFlags      flags,
    const gchar         *name,
    const gchar         *object_path,
    GCancellable        *cancellable,
    GAsyncReadyCallback  callback,
    gpointer             user_data);
FreedesktopLoginManager *freedesktop_login_manager_proxy_new_for_bus_finish (
    GAsyncResult        *res,
    GError             **error);
FreedesktopLoginManager *freedesktop_login_manager_proxy_new_for_bus_sync (
    GBusType             bus_type,
    GDBusProxyFlags      flags,
    const gchar         *name,
    const gchar         *object_path,
    GCancellable        *cancellable,
    GError             **error);


/* ---- */

#define FREEDESKTOP_LOGIN_TYPE_MANAGER_SKELETON (freedesktop_login_manager_skeleton_get_type ())
#define FREEDESKTOP_LOGIN_MANAGER_SKELETON(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), FREEDESKTOP_LOGIN_TYPE_MANAGER_SKELETON, FreedesktopLoginManagerSkeleton))
#define FREEDESKTOP_LOGIN_MANAGER_SKELETON_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), FREEDESKTOP_LOGIN_TYPE_MANAGER_SKELETON, FreedesktopLoginManagerSkeletonClass))
#define FREEDESKTOP_LOGIN_MANAGER_SKELETON_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), FREEDESKTOP_LOGIN_TYPE_MANAGER_SKELETON, FreedesktopLoginManagerSkeletonClass))
#define FREEDESKTOP_LOGIN_IS_MANAGER_SKELETON(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), FREEDESKTOP_LOGIN_TYPE_MANAGER_SKELETON))
#define FREEDESKTOP_LOGIN_IS_MANAGER_SKELETON_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), FREEDESKTOP_LOGIN_TYPE_MANAGER_SKELETON))

typedef struct _FreedesktopLoginManagerSkeleton FreedesktopLoginManagerSkeleton;
typedef struct _FreedesktopLoginManagerSkeletonClass FreedesktopLoginManagerSkeletonClass;
typedef struct _FreedesktopLoginManagerSkeletonPrivate FreedesktopLoginManagerSkeletonPrivate;

struct _FreedesktopLoginManagerSkeleton
{
  /*< private >*/
  GDBusInterfaceSkeleton parent_instance;
  FreedesktopLoginManagerSkeletonPrivate *priv;
};

struct _FreedesktopLoginManagerSkeletonClass
{
  GDBusInterfaceSkeletonClass parent_class;
};

GType freedesktop_login_manager_skeleton_get_type (void) G_GNUC_CONST;

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

FreedesktopLoginManager *freedesktop_login_manager_skeleton_new (void);


G_END_DECLS
