Replace GdmUser with AccountsService

The GdmUser copy+paste code has been superseded by AccountsService,
so kill the former and use the latter.

https://bugzilla.gnome.org/show_bug.cgi?id=650893
This commit is contained in:
Florian Müllner
2011-05-10 16:13:05 +02:00
parent 0751a90bd9
commit fa786fd3ef
12 changed files with 21 additions and 4453 deletions

View File

@ -1,35 +0,0 @@
gdmuser_cflags = \
-I$(top_srcdir)/src \
-DPREFIX=\""$(prefix)"\" \
-DLIBDIR=\""$(libdir)"\" \
-DDATADIR=\""$(datadir)"\" \
-DG_DISABLE_DEPRECATED \
-DG_LOG_DOMAIN=\"GdmUser\" \
-DGDM_CACHE_DIR=\""$(localstatedir)/cache/gdm"\" \
$(GDMUSER_CFLAGS) \
$(NULL)
# please, keep this sorted alphabetically
gdmuser_source_h = \
gdmuser/gdm-user.h \
gdmuser/gdm-user-private.h \
gdmuser/gdm-user-manager.h \
$(NULL)
# please, keep this sorted alphabetically
gdmuser_source_c = \
gdmuser/gdm-user.c \
gdmuser/gdm-user-manager.c \
$(NULL)
noinst_LTLIBRARIES += libgdmuser-1.0.la
libgdmuser_1_0_la_LIBADD = $(GDMUSER_LIBS)
libgdmuser_1_0_la_SOURCES = \
$(gdmuser_source_c) \
$(gdmuser_source_h) \
$(NULL)
libgdmuser_1_0_la_CPPFLAGS = $(gdmuser_cflags)
libgdmuser_1_0_la_LDFLAGS = $(LDADD)

View File

@ -68,7 +68,6 @@ gnome-shell-extension-tool: gnome-shell-extension-tool.in Makefile
CLEANFILES += gnome-shell $(bin_SCRIPTS)
include Makefile-gdmuser.am
include Makefile-st.am
include Makefile-tray.am
include Makefile-gvc.am
@ -263,7 +262,6 @@ libgnome_shell_la_LIBADD = \
$(GNOME_SHELL_LIBS) \
$(BLUETOOTH_LIBS) \
libst-1.0.la \
libgdmuser-1.0.la \
libtray.la \
libgvc.la \
$(NULL)
@ -288,12 +286,3 @@ St_1_0_gir_FILES = $(filter-out %-private.h $(st_non_gir_sources), $(addprefix $
$(addprefix $(srcdir)/,$(st_source_c))
INTROSPECTION_GIRS += St-1.0.gir
CLEANFILES += St-1.0.gir
Gdm-1.0.gir: libgdmuser-1.0.la
Gdm_1_0_gir_INCLUDES = GObject-2.0 GdkPixbuf-2.0
Gdm_1_0_gir_CFLAGS = $(gdmuser_cflags)
Gdm_1_0_gir_LIBS = libgdmuser-1.0.la
Gdm_1_0_gir_FILES = $(filter-out %-private.h, $(addprefix $(srcdir)/,$(gdmuser_source_h))) \
$(addprefix $(srcdir)/,$(gdmuser_source_c))
INTROSPECTION_GIRS += Gdm-1.0.gir
CLEANFILES += Gdm-1.0.gir

File diff suppressed because it is too large Load Diff

View File

@ -1,91 +0,0 @@
/* -*- 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 */

View File

@ -1,49 +0,0 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*-
*
* Copyright (C) 2004-2005 James M. Cape <jcape@ignore-your.tv>.
*
* 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
*/
/*
* Private interfaces to the GdmUser object
*/
#ifndef __GDM_USER_PRIVATE_H_
#define __GDM_USER_PRIVATE_H_
#include <pwd.h>
#include "gdm-user.h"
G_BEGIN_DECLS
void _gdm_user_update_from_object_path (GdmUser *user,
const char *object_path);
void _gdm_user_update_from_pwent (GdmUser *user,
const struct passwd *pwent);
void _gdm_user_update_login_frequency (GdmUser *user,
guint64 login_frequency);
void _gdm_user_add_session (GdmUser *user,
const char *session_id);
void _gdm_user_remove_session (GdmUser *user,
const char *session_id);
G_END_DECLS
#endif /* !__GDM_USER_PRIVATE__ */

File diff suppressed because it is too large Load Diff

View File

@ -1,64 +0,0 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*-
*
* Copyright (C) 2004-2005 James M. Cape <jcape@ignore-your.tv>.
* Copyright (C) 2007-2008 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
*/
/*
* Facade object for user data, owned by GdmUserManager
*/
#ifndef __GDM_USER_H__
#define __GDM_USER_H__
#include <sys/types.h>
#include <gtk/gtk.h>
#include <gdk-pixbuf/gdk-pixbuf.h>
G_BEGIN_DECLS
#define GDM_TYPE_USER (gdm_user_get_type ())
#define GDM_USER(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), GDM_TYPE_USER, GdmUser))
#define GDM_IS_USER(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), GDM_TYPE_USER))
typedef struct _GdmUser GdmUser;
typedef struct _GdmUserClass GdmUserClass;
GType gdm_user_get_type (void) G_GNUC_CONST;
GdmUser *gdm_user_new_from_object_path (const char *path);
const char *gdm_user_get_object_path (GdmUser *user);
gulong gdm_user_get_uid (GdmUser *user);
const char *gdm_user_get_user_name (GdmUser *user);
const char *gdm_user_get_real_name (GdmUser *user);
guint gdm_user_get_num_sessions (GdmUser *user);
gboolean gdm_user_is_logged_in (GdmUser *user);
gulong gdm_user_get_login_frequency (GdmUser *user);
const char *gdm_user_get_icon_file (GdmUser *user);
const char *gdm_user_get_primary_session_id (GdmUser *user);
GdkPixbuf *gdm_user_render_icon (GdmUser *user,
gint icon_size);
gint gdm_user_collate (GdmUser *user1,
GdmUser *user2);
gboolean gdm_user_is_loaded (GdmUser *user);
G_END_DECLS
#endif

View File

@ -534,7 +534,7 @@ main (int argc, char **argv)
/* Disable debug spew from various libraries */
g_log_set_handler ("Gvc", G_LOG_LEVEL_DEBUG,
muted_log_handler, NULL);
g_log_set_handler ("GdmUser", G_LOG_LEVEL_DEBUG,
g_log_set_handler ("AccountsService", G_LOG_LEVEL_DEBUG,
muted_log_handler, NULL);
g_log_set_handler ("Bluetooth", G_LOG_LEVEL_DEBUG | G_LOG_LEVEL_MESSAGE,
muted_log_handler, NULL);