7ce5ea4142
The GDM code upstream talks to the account service now, has better introspection annotations, and is more asynchronous. This commit updates the shell's copy to the latest upstream. Note, the API changed somewhat and so the callers will need to be fixed up subsequently. https://bugzilla.gnome.org/show_bug.cgi?id=631888
92 lines
3.8 KiB
C
92 lines
3.8 KiB
C
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*-
|
|
*
|
|
* Copyright (C) 2007 William Jon McCann <mccann@jhu.edu>
|
|
*
|
|
* This program is free software; you can redistribute it and/or modify
|
|
* it under the terms of the GNU General Public License as published by
|
|
* the Free Software Foundation; either version 2 of the License, or
|
|
* (at your option) any later version.
|
|
*
|
|
* This program 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 General Public License for more details.
|
|
*
|
|
* You should have received a copy of the GNU General Public License
|
|
* along with this program; if not, write to the Free Software
|
|
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
*
|
|
*/
|
|
|
|
#ifndef __GDM_USER_MANAGER_H__
|
|
#define __GDM_USER_MANAGER_H__
|
|
|
|
#include <glib-object.h>
|
|
|
|
#include "gdm-user.h"
|
|
|
|
G_BEGIN_DECLS
|
|
|
|
#define GDM_TYPE_USER_MANAGER (gdm_user_manager_get_type ())
|
|
#define GDM_USER_MANAGER(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GDM_TYPE_USER_MANAGER, GdmUserManager))
|
|
#define GDM_USER_MANAGER_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), GDM_TYPE_USER_MANAGER, GdmUserManagerClass))
|
|
#define GDM_IS_USER_MANAGER(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GDM_TYPE_USER_MANAGER))
|
|
#define GDM_IS_USER_MANAGER_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GDM_TYPE_USER_MANAGER))
|
|
#define GDM_USER_MANAGER_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GDM_TYPE_USER_MANAGER, GdmUserManagerClass))
|
|
|
|
typedef struct GdmUserManagerPrivate GdmUserManagerPrivate;
|
|
typedef struct GdmUserManager GdmUserManager;
|
|
typedef struct GdmUserManagerClass GdmUserManagerClass;
|
|
typedef enum GdmUserManagerError GdmUserManagerError;
|
|
|
|
struct GdmUserManager
|
|
{
|
|
GObject parent;
|
|
GdmUserManagerPrivate *priv;
|
|
};
|
|
|
|
struct GdmUserManagerClass
|
|
{
|
|
GObjectClass parent_class;
|
|
|
|
void (* user_added) (GdmUserManager *user_manager,
|
|
GdmUser *user);
|
|
void (* user_removed) (GdmUserManager *user_manager,
|
|
GdmUser *user);
|
|
void (* user_is_logged_in_changed) (GdmUserManager *user_manager,
|
|
GdmUser *user);
|
|
void (* user_changed) (GdmUserManager *user_manager,
|
|
GdmUser *user);
|
|
};
|
|
|
|
enum GdmUserManagerError
|
|
{
|
|
GDM_USER_MANAGER_ERROR_GENERAL,
|
|
GDM_USER_MANAGER_ERROR_KEY_NOT_FOUND
|
|
};
|
|
|
|
#define GDM_USER_MANAGER_ERROR gdm_user_manager_error_quark ()
|
|
|
|
GQuark gdm_user_manager_error_quark (void);
|
|
GType gdm_user_manager_get_type (void);
|
|
|
|
GdmUserManager * gdm_user_manager_ref_default (void);
|
|
|
|
void gdm_user_manager_queue_load (GdmUserManager *manager);
|
|
GSList * gdm_user_manager_list_users (GdmUserManager *manager);
|
|
GdmUser * gdm_user_manager_get_user (GdmUserManager *manager,
|
|
const char *username);
|
|
GdmUser * gdm_user_manager_get_user_by_uid (GdmUserManager *manager,
|
|
gulong uid);
|
|
|
|
gboolean gdm_user_manager_activate_user_session (GdmUserManager *manager,
|
|
GdmUser *user);
|
|
|
|
gboolean gdm_user_manager_can_switch (GdmUserManager *manager);
|
|
|
|
gboolean gdm_user_manager_goto_login_session (GdmUserManager *manager);
|
|
|
|
G_END_DECLS
|
|
|
|
#endif /* __GDM_USER_MANAGER_H */
|