/*
 * 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 __LOGIN1_MANAGER_DBUS_H__
#define __LOGIN1_MANAGER_DBUS_H__

#include <gio/gio.h>

G_BEGIN_DECLS


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

#define PHOSH_DBUS_TYPE_LOGIN_MANAGER (phosh_dbus_login_manager_get_type ())
#define PHOSH_DBUS_LOGIN_MANAGER(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), PHOSH_DBUS_TYPE_LOGIN_MANAGER, PhoshDBusLoginManager))
#define PHOSH_DBUS_IS_LOGIN_MANAGER(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), PHOSH_DBUS_TYPE_LOGIN_MANAGER))
#define PHOSH_DBUS_LOGIN_MANAGER_GET_IFACE(o) (G_TYPE_INSTANCE_GET_INTERFACE ((o), PHOSH_DBUS_TYPE_LOGIN_MANAGER, PhoshDBusLoginManagerIface))

struct _PhoshDBusLoginManager;
typedef struct _PhoshDBusLoginManager PhoshDBusLoginManager;
typedef struct _PhoshDBusLoginManagerIface PhoshDBusLoginManagerIface;

struct _PhoshDBusLoginManagerIface
{
  GTypeInterface parent_iface;


  gboolean (*handle_get_session) (
    PhoshDBusLoginManager *object,
    GDBusMethodInvocation *invocation,
    const gchar *arg_session_id);

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

  gboolean (*handle_suspend) (
    PhoshDBusLoginManager *object,
    GDBusMethodInvocation *invocation,
    gboolean arg_unnamed_arg0);

  void (*prepare_for_sleep) (
    PhoshDBusLoginManager *object,
    gboolean arg_suspending);

};

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

GType phosh_dbus_login_manager_get_type (void);

GDBusInterfaceInfo *phosh_dbus_login_manager_interface_info (void);
guint phosh_dbus_login_manager_override_properties (GObjectClass *klass, guint property_id_begin);


/* D-Bus method call completion functions: */
void phosh_dbus_login_manager_complete_get_session (
    PhoshDBusLoginManager *object,
    GDBusMethodInvocation *invocation,
    const gchar *object_path);

void phosh_dbus_login_manager_complete_inhibit (
    PhoshDBusLoginManager *object,
    GDBusMethodInvocation *invocation,
    GUnixFDList *fd_list,
    GVariant *pipe_fd);

void phosh_dbus_login_manager_complete_suspend (
    PhoshDBusLoginManager *object,
    GDBusMethodInvocation *invocation);



/* D-Bus signal emissions functions: */
void phosh_dbus_login_manager_emit_prepare_for_sleep (
    PhoshDBusLoginManager *object,
    gboolean arg_suspending);



/* D-Bus method calls: */
void phosh_dbus_login_manager_call_get_session (
    PhoshDBusLoginManager *proxy,
    const gchar *arg_session_id,
    GCancellable *cancellable,
    GAsyncReadyCallback callback,
    gpointer user_data);

gboolean phosh_dbus_login_manager_call_get_session_finish (
    PhoshDBusLoginManager *proxy,
    gchar ** out_object_path,
    GAsyncResult *res,
    GError **error);

gboolean phosh_dbus_login_manager_call_get_session_sync (
    PhoshDBusLoginManager *proxy,
    const gchar *arg_session_id,
    gchar ** out_object_path,
    GCancellable *cancellable,
    GError **error);

void phosh_dbus_login_manager_call_inhibit (
    PhoshDBusLoginManager *proxy,
    const gchar *arg_what,
    const gchar *arg_who,
    const gchar *arg_why,
    const gchar *arg_mode,
    GUnixFDList *fd_list,
    GCancellable *cancellable,
    GAsyncReadyCallback callback,
    gpointer user_data);

gboolean phosh_dbus_login_manager_call_inhibit_finish (
    PhoshDBusLoginManager *proxy,
    GVariant ** out_pipe_fd,
    GUnixFDList **out_fd_list,
    GAsyncResult *res,
    GError **error);

gboolean phosh_dbus_login_manager_call_inhibit_sync (
    PhoshDBusLoginManager *proxy,
    const gchar *arg_what,
    const gchar *arg_who,
    const gchar *arg_why,
    const gchar *arg_mode,
    GUnixFDList  *fd_list,
    GVariant ** out_pipe_fd,
    GUnixFDList **out_fd_list,
    GCancellable *cancellable,
    GError **error);

void phosh_dbus_login_manager_call_suspend (
    PhoshDBusLoginManager *proxy,
    gboolean arg_unnamed_arg0,
    GCancellable *cancellable,
    GAsyncReadyCallback callback,
    gpointer user_data);

gboolean phosh_dbus_login_manager_call_suspend_finish (
    PhoshDBusLoginManager *proxy,
    GAsyncResult *res,
    GError **error);

gboolean phosh_dbus_login_manager_call_suspend_sync (
    PhoshDBusLoginManager *proxy,
    gboolean arg_unnamed_arg0,
    GCancellable *cancellable,
    GError **error);



/* ---- */

#define PHOSH_DBUS_TYPE_LOGIN_MANAGER_PROXY (phosh_dbus_login_manager_proxy_get_type ())
#define PHOSH_DBUS_LOGIN_MANAGER_PROXY(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), PHOSH_DBUS_TYPE_LOGIN_MANAGER_PROXY, PhoshDBusLoginManagerProxy))
#define PHOSH_DBUS_LOGIN_MANAGER_PROXY_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), PHOSH_DBUS_TYPE_LOGIN_MANAGER_PROXY, PhoshDBusLoginManagerProxyClass))
#define PHOSH_DBUS_LOGIN_MANAGER_PROXY_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), PHOSH_DBUS_TYPE_LOGIN_MANAGER_PROXY, PhoshDBusLoginManagerProxyClass))
#define PHOSH_DBUS_IS_LOGIN_MANAGER_PROXY(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), PHOSH_DBUS_TYPE_LOGIN_MANAGER_PROXY))
#define PHOSH_DBUS_IS_LOGIN_MANAGER_PROXY_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), PHOSH_DBUS_TYPE_LOGIN_MANAGER_PROXY))

typedef struct _PhoshDBusLoginManagerProxy PhoshDBusLoginManagerProxy;
typedef struct _PhoshDBusLoginManagerProxyClass PhoshDBusLoginManagerProxyClass;
typedef struct _PhoshDBusLoginManagerProxyPrivate PhoshDBusLoginManagerProxyPrivate;

struct _PhoshDBusLoginManagerProxy
{
  /*< private >*/
  GDBusProxy parent_instance;
  PhoshDBusLoginManagerProxyPrivate *priv;
};

struct _PhoshDBusLoginManagerProxyClass
{
  GDBusProxyClass parent_class;
};

GType phosh_dbus_login_manager_proxy_get_type (void);

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

void phosh_dbus_login_manager_proxy_new (
    GDBusConnection     *connection,
    GDBusProxyFlags      flags,
    const gchar         *name,
    const gchar         *object_path,
    GCancellable        *cancellable,
    GAsyncReadyCallback  callback,
    gpointer             user_data);
PhoshDBusLoginManager *phosh_dbus_login_manager_proxy_new_finish (
    GAsyncResult        *res,
    GError             **error);
PhoshDBusLoginManager *phosh_dbus_login_manager_proxy_new_sync (
    GDBusConnection     *connection,
    GDBusProxyFlags      flags,
    const gchar         *name,
    const gchar         *object_path,
    GCancellable        *cancellable,
    GError             **error);

void phosh_dbus_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);
PhoshDBusLoginManager *phosh_dbus_login_manager_proxy_new_for_bus_finish (
    GAsyncResult        *res,
    GError             **error);
PhoshDBusLoginManager *phosh_dbus_login_manager_proxy_new_for_bus_sync (
    GBusType             bus_type,
    GDBusProxyFlags      flags,
    const gchar         *name,
    const gchar         *object_path,
    GCancellable        *cancellable,
    GError             **error);


/* ---- */

#define PHOSH_DBUS_TYPE_LOGIN_MANAGER_SKELETON (phosh_dbus_login_manager_skeleton_get_type ())
#define PHOSH_DBUS_LOGIN_MANAGER_SKELETON(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), PHOSH_DBUS_TYPE_LOGIN_MANAGER_SKELETON, PhoshDBusLoginManagerSkeleton))
#define PHOSH_DBUS_LOGIN_MANAGER_SKELETON_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), PHOSH_DBUS_TYPE_LOGIN_MANAGER_SKELETON, PhoshDBusLoginManagerSkeletonClass))
#define PHOSH_DBUS_LOGIN_MANAGER_SKELETON_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), PHOSH_DBUS_TYPE_LOGIN_MANAGER_SKELETON, PhoshDBusLoginManagerSkeletonClass))
#define PHOSH_DBUS_IS_LOGIN_MANAGER_SKELETON(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), PHOSH_DBUS_TYPE_LOGIN_MANAGER_SKELETON))
#define PHOSH_DBUS_IS_LOGIN_MANAGER_SKELETON_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), PHOSH_DBUS_TYPE_LOGIN_MANAGER_SKELETON))

typedef struct _PhoshDBusLoginManagerSkeleton PhoshDBusLoginManagerSkeleton;
typedef struct _PhoshDBusLoginManagerSkeletonClass PhoshDBusLoginManagerSkeletonClass;
typedef struct _PhoshDBusLoginManagerSkeletonPrivate PhoshDBusLoginManagerSkeletonPrivate;

struct _PhoshDBusLoginManagerSkeleton
{
  /*< private >*/
  GDBusInterfaceSkeleton parent_instance;
  PhoshDBusLoginManagerSkeletonPrivate *priv;
};

struct _PhoshDBusLoginManagerSkeletonClass
{
  GDBusInterfaceSkeletonClass parent_class;
};

GType phosh_dbus_login_manager_skeleton_get_type (void);

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

PhoshDBusLoginManager *phosh_dbus_login_manager_skeleton_new (void);


G_END_DECLS

#endif /* __LOGIN1_MANAGER_DBUS_H__ */
