[gdm/wip/slave-connection: 30/30] libgdmgreeter: rename to libgdm and generate implementation
- From: Ray Strode <halfline src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gdm/wip/slave-connection: 30/30] libgdmgreeter: rename to libgdm and generate implementation
- Date: Mon, 9 Jul 2012 07:53:39 +0000 (UTC)
commit d131e6a03b0ec4d7c1832a627c989aeaea91b8ea
Author: Ray Strode <rstrode redhat com>
Date: Sun May 20 01:13:00 2012 +0200
libgdmgreeter: rename to libgdm and generate implementation
GdmGreeterClient is the interface greeters use to communicate
with their respective slaves. It will eventually, also be
useful as an interface for screensavers to do authentication.
The actual GdmGreeterClient code is a just a thin wrapper around
some libdbus calls. Something very similar can be automatically
generated using gdbus-codegen.
This commit:
- renames libgdmgreeter to libgdm to reflect the fact it
won't be just for greeters
- updates the library to use the most up to date dbus
interfaces provided by the daemon
- replaces the hand rolled dbus code with generated code,
leaving just a stub "client" object to get at the generated
objects.
Based on work by Giovanni Campagna <gcampagna src gnome org>
https://bugzilla.gnome.org/show_bug.cgi?id=676381
.gitignore | 4 +
configure.ac | 13 +-
gui/Makefile.am | 4 +-
gui/libgdm/Makefile.am | 113 ++
gui/libgdm/gdm-client.c | 304 +++++
gui/libgdm/gdm-client.h | 80 ++
.../gdm-sessions.c} | 14 +-
.../gdm-sessions.h} | 6 +-
gui/libgdm/gdm.pc.in | 10 +
gui/libgdmgreeter/Makefile.am | 78 --
gui/libgdmgreeter/gdm-greeter-client.c | 1243 --------------------
gui/libgdmgreeter/gdm-greeter-client.h | 126 --
gui/libgdmgreeter/gdmgreeter.pc.in | 10 -
13 files changed, 528 insertions(+), 1477 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index b2e253a..653e30e 100644
--- a/.gitignore
+++ b/.gitignore
@@ -126,6 +126,10 @@ docs/gdm-oc.omf
docs/gdm-ru.omf
docs/gdm-sv.omf
docs/gdm-uk.omf
+gui/libgdmgreeter/gdm-client-glue.h
+gui/libgdmgreeter/gdm-client-glue.c
+gui/libgdmgreeter/gdm-manager-glue.h
+gui/libgdmgreeter/gdm-manager-glue.c
gui/simple-chooser/gdm-host-chooser
gui/simple-chooser/gdm-simple-chooser
gui/simple-greeter/gdm-simple-greeter
diff --git a/configure.ac b/configure.ac
index bee9437..1d8a10d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -182,13 +182,10 @@ PKG_CHECK_MODULES(CHECK,
have_check=no)
AM_CONDITIONAL([HAVE_CHECK],[test "x$CHECK_CFLAGS" != "x"])
-LIBGDMGREETER_LIBS="$SIMPLE_GREETER_LIBS"
-AC_SUBST(LIBGDMGREETER_LIBS)
-LIBGDMGREETER_CFLAGS="$SIMPLE_GREETER_CFLAGS"
-AC_SUBST(LIBGDMGREETER_CFLAGS)
+PKG_CHECK_MODULES(LIBGDM, glib-2.0 gio-2.0 gio-unix-2.0);
GOBJECT_INTROSPECTION_CHECK([0.9.12])
-LIBGDMGREETER_GIR_INCLUDES="GLib-2.0 GObject-2.0 DBusGLib-1.0"
-AC_SUBST(LIBGDMGREETER_GIR_INCLUDES)
+LIBGDM_GIR_INCLUDES="GLib-2.0 GObject-2.0 Gio-2.0"
+AC_SUBST(LIBGDM_GIR_INCLUDES)
dnl ---------------------------------------------------------------------------
dnl - Configuration file stuff
@@ -1489,8 +1486,8 @@ Makefile
daemon/Makefile
docs/Makefile
gui/Makefile
-gui/libgdmgreeter/Makefile
-gui/libgdmgreeter/gdmgreeter.pc
+gui/libgdm/Makefile
+gui/libgdm/gdm.pc
gui/simple-greeter/Makefile
gui/simple-greeter/libgdmsimplegreeter/Makefile
gui/simple-greeter/libgdmsimplegreeter/gdmsimplegreeter.pc
diff --git a/gui/Makefile.am b/gui/Makefile.am
index ff8a039..ce90055 100644
--- a/gui/Makefile.am
+++ b/gui/Makefile.am
@@ -1,7 +1,7 @@
NULL =
SUBDIRS = \
- libgdmgreeter \
+ libgdm \
simple-greeter \
$(NULL)
@@ -10,7 +10,7 @@ SUBDIRS += simple-chooser
endif
DIST_SUBDIRS = \
- libgdmgreeter \
+ libgdm \
simple-chooser \
simple-greeter \
$(NULL)
diff --git a/gui/libgdm/Makefile.am b/gui/libgdm/Makefile.am
new file mode 100644
index 0000000..8763c79
--- /dev/null
+++ b/gui/libgdm/Makefile.am
@@ -0,0 +1,113 @@
+END_OF_LIST =
+
+BUILT_SOURCES = gdm-manager-glue.h gdm-client-glue.h
+CLEANFILES = \
+ $(BUILT_SOURCES) \
+ gdm-manager-glue.c \
+ gdm-client-glue.c \
+ $(END_OF_LIST)
+
+gdm-manager-glue.c gdm-manager-glue.h : $(top_srcdir)/daemon/gdm-manager.xml Makefile.am
+ $(AM_V_GEN)gdbus-codegen \
+ --c-namespace Gdm \
+ --interface-prefix=org.gnome.DisplayManager \
+ --generate-c-code=gdm-manager-glue \
+ --annotate "org.gnome.DisplayManager.Manager" \
+ "org.gtk.GDBus.C.Name" Manager \
+ $(top_srcdir)/daemon/gdm-manager.xml
+
+gdm-client-glue.c gdm-client-glue.h : $(top_srcdir)/daemon/gdm-session.xml Makefile.am
+ $(AM_V_GEN)gdbus-codegen \
+ --c-namespace Gdm \
+ --interface-prefix=org.gnome.DisplayManager \
+ --generate-c-code=gdm-client-glue \
+ --annotate "org.gnome.DisplayManager.UserVerifier" \
+ "org.gtk.GDBus.C.Name" UserVerifier \
+ --annotate "org.gnome.DisplayManager.GreeterSession" \
+ "org.gtk.GDBus.C.Name" GreeterSession \
+ --annotate "org.gnome.DisplayManager.ChooserSession" \
+ "org.gtk.GDBus.C.Name" ChooserSession \
+ $(top_srcdir)/daemon/gdm-session.xml
+
+AM_CPPFLAGS = \
+ -I. \
+ -I.. \
+ -I$(srcdir) \
+ -DG_LOG_DOMAIN=\"Gdm\" \
+ -DDMCONFDIR=\""$(dmconfdir)"\" \
+ -DDATADIR=\""$(datadir)"\" \
+ $(END_OF_LIST)
+
+lib_LTLIBRARIES = \
+ libgdm.la \
+ $(END_OF_LIST)
+
+libgdmdir = $(includedir)/gdm
+libgdm_HEADERS = \
+ gdm-client.h \
+ gdm-sessions.h \
+ $(END_OF_LIST)
+
+libgdm_la_CFLAGS = \
+ $(LIBGDM_CFLAGS) \
+ $(END_OF_LIST)
+libgdm_la_LDFLAGS = \
+ -export-symbols-regex '^[^_].*' \
+ -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) \
+ -no-undefined \
+ $(END_OF_LIST)
+
+libgdm_la_LIBADD = \
+ $(LIBGDM_LIBS) \
+ $(END_OF_LIST)
+
+libgdm_la_SOURCES = \
+ $(libgdm_HEADERS) \
+ gdm-client.c \
+ gdm-sessions.c \
+ $(END_OF_LIST)
+
+nodist_libgdm_la_SOURCES = \
+ gdm-client-glue.c \
+ gdm-client-glue.h \
+ gdm-manager-glue.c \
+ gdm-manager-glue.h \
+ $(END_OF_LIST)
+
+pkgconfigdir = $(libdir)/pkgconfig
+dist_pkgconfig_DATA = gdm.pc
+
+-include $(INTROSPECTION_MAKEFILE)
+
+if HAVE_INTROSPECTION
+girdir = $(datadir)/gir-1.0
+gir_DATA = Gdm-1.0.gir
+typelibsdir = $(libdir)/girepository-1.0
+typelibs_DATA = $(gir_DATA:.gir=.typelib)
+INTROSPECTION_GIRS = $(gir_DATA)
+
+Gdm-1.0.gir: \
+ $(INTROSPECTION_SCANNER) \
+ libgdm.la \
+ Makefile \
+ $(END_OF_LIST)
+
+Gdm_1_0_gir_SCANNERFLAGS = \
+ --warn-all \
+ --namespace=Gdm \
+ --identifier-prefix Gdm \
+ $(AM_CPPFLAGS) \
+ $(libgdm_la_CFLAGS) \
+ $(END_OF_LIST)
+
+Gdm_1_0_gir_INCLUDES = $(LIBGDM_GIR_INCLUDES)
+Gdm_1_0_gir_LIBS = libgdm.la
+Gdm_1_0_gir_FILES = \
+ $(filter-out %-private.h, $(libgdm_la_SOURCES)) \
+ $(filter-out %-private.h, $(nodist_libgdm_la_SOURCES)) \
+ $(END_OF_LIST)
+
+CLEANFILES += $(gir_DATA) $(typelibs_DATA)
+endif
+
+MAINTAINERCLEANFILES = Makefile.in
diff --git a/gui/libgdm/gdm-client.c b/gui/libgdm/gdm-client.c
new file mode 100644
index 0000000..03c1e78
--- /dev/null
+++ b/gui/libgdm/gdm-client.c
@@ -0,0 +1,304 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*-
+ *
+ * Copyright (C) 2012 Red Hat, Inc.
+ * Copyright (C) 2012 Giovanni Campagna <scampa giovanni gmail com>
+ *
+ * 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.
+ *
+ */
+
+#include "config.h"
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <unistd.h>
+#include <string.h>
+
+#include <glib.h>
+#include <glib/gi18n.h>
+#include <glib-object.h>
+
+#include "gdm-client.h"
+#include "gdm-client-glue.h"
+#include "gdm-manager-glue.h"
+
+#define GDM_CLIENT_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), GDM_TYPE_CLIENT, GdmClientPrivate))
+
+#define MANAGER_DBUS_PATH "/org/gnome/DisplayManager/Manager"
+#define MANAGER_DBUS_INTERFACE "org.gnome.DisplayManager.Manager"
+
+#define SESSION_DBUS_PATH "/org/gnome/Displaymanager/Session"
+
+#define GDM_DBUS_NAME "org.gnome.DisplayManager"
+#define GDM_DBUS_USER_VERIFIER_INTERFACE "org.gnome.DisplayManager.UserVerifier"
+#define GDM_DBUS_GREETER_SESSION_INTERFACE "org.gnome.DisplayManager.GreeterSession"
+
+struct GdmClientPrivate
+{
+ GdmManager *manager;
+ GdmUserVerifier *user_verifier;
+ GdmGreeterSession *greeter_session;
+ GdmChooserSession *chooser_session;
+ GDBusConnection *connection;
+ char *address;
+};
+
+static void gdm_client_class_init (GdmClientClass *klass);
+static void gdm_client_init (GdmClient *greeter_client);
+static void gdm_client_finalize (GObject *object);
+
+G_DEFINE_TYPE (GdmClient, gdm_client, G_TYPE_OBJECT);
+
+static gpointer client_object = NULL;
+
+GQuark
+gdm_client_error_quark (void)
+{
+ static GQuark error_quark = 0;
+
+ if (error_quark == 0)
+ error_quark = g_quark_from_static_string ("gdm-greeter-client");
+
+ return error_quark;
+}
+
+/**
+ * gdm_client_open_connection_sync:
+ * @client: a #GdmClient
+ * @cancellable: a #GCancellable
+ * @error: a #GError
+ *
+ * Initiates a connection to GDM daemon "slave" process.
+ *
+ * This function should be called before doing other calls.
+ *
+ * Returns: %TRUE if connected, or %FALSE if unavailable
+ */
+gboolean
+gdm_client_open_connection_sync (GdmClient *client,
+ GCancellable *cancellable,
+ GError **error)
+{
+ gboolean ret;
+
+ g_return_val_if_fail (GDM_IS_CLIENT (client), FALSE);
+
+ client->priv->manager = gdm_manager_proxy_new_for_bus_sync (G_BUS_TYPE_SYSTEM,
+ G_DBUS_PROXY_FLAGS_NONE,
+ "org.gnome.DisplayManager",
+ "/org/gnome/DisplayManager/Manager",
+ cancellable,
+ error);
+
+ if (client->priv->manager == NULL) {
+ goto out;
+ }
+
+ ret = gdm_manager_call_open_session_sync (client->priv->manager,
+ &client->priv->address,
+ cancellable,
+ error);
+
+ if (!ret) {
+ g_clear_object (&client->priv->manager);
+ goto out;
+ }
+
+ g_debug ("GdmClient: connecting to address: %s", client->priv->address);
+
+ client->priv->connection = g_dbus_connection_new_for_address_sync (client->priv->address,
+ G_DBUS_CONNECTION_FLAGS_AUTHENTICATION_CLIENT,
+ NULL,
+ cancellable,
+ error);
+
+ if (client->priv->connection == NULL) {
+ g_clear_object (&client->priv->manager);
+ g_clear_pointer (&client->priv->address, g_free);
+ goto out;
+ }
+
+ out:
+ return client->priv->connection != NULL;
+}
+/**
+ * gdm_client_close_connection_sync:
+ * @client: a #GdmClient
+ * @cancellable: a #GCancellable
+ * @error: a #GError
+ *
+ * Closes a connection to the GDM daemon "slave" process.
+ *
+ * Returns: %TRUE if disconnected, or %FALSE if failed
+ */
+gboolean
+gdm_client_close_connection_sync (GdmClient *client,
+ GCancellable *cancellable,
+ GError **error)
+{
+ g_return_val_if_fail (GDM_IS_CLIENT (client), FALSE);
+
+ g_clear_object (&client->priv->user_verifier);
+ g_clear_object (&client->priv->greeter_session);
+ g_clear_object (&client->priv->chooser_session);
+ g_clear_object (&client->priv->manager);
+ g_clear_object (&client->priv->connection);
+
+ return TRUE;
+}
+
+/**
+ * gdm_client_get_user_verifier_sync:
+ * @client: a #GdmClient
+ * @cancellable: a #GCancellable
+ * @error: a #GError
+ *
+ * Gets a #GdmUserVerifier object that can be used to
+ * verify a user's local account.
+ *
+ * Returns: (transfer full): #GdmUserVerifier or %NULL if not connected
+ */
+GdmUserVerifier *
+gdm_client_get_user_verifier_sync (GdmClient *client,
+ GCancellable *cancellable,
+ GError **error)
+{
+ if (client->priv->user_verifier != NULL) {
+ return g_object_ref (client->priv->user_verifier);
+ }
+
+ client->priv->user_verifier = gdm_user_verifier_proxy_new_sync (client->priv->connection,
+ G_DBUS_PROXY_FLAGS_NONE,
+ NULL,
+ SESSION_DBUS_PATH,
+ cancellable,
+ error);
+
+ return g_object_ref (client->priv->user_verifier);
+}
+
+/**
+ * gdm_client_get_greeter_session_sync:
+ * @client: a #GdmClient
+ * @cancellable: a #GCancellable
+ * @error: a #GError
+ *
+ * Gets a #GdmGreeterSession object that can be used
+ * to do do various login screen related tasks, such
+ * as selecting a users session, and starting that
+ * session.
+ *
+ * Returns: (transfer full): #GdmGreeterSession or %NULL if caller is not a greeter
+ */
+GdmGreeterSession *
+gdm_client_get_greeter_session_sync (GdmClient *client,
+ GCancellable *cancellable,
+ GError **error)
+{
+ if (client->priv->greeter_session != NULL) {
+ return g_object_ref (client->priv->greeter_session);
+ }
+
+ client->priv->greeter_session = gdm_greeter_session_proxy_new_sync (client->priv->connection,
+ G_DBUS_PROXY_FLAGS_NONE,
+ NULL,
+ SESSION_DBUS_PATH,
+ cancellable,
+ error);
+
+ return g_object_ref (client->priv->greeter_session);
+}
+
+/**
+ * gdm_client_get_chooser_session_sync:
+ * @client: a #GdmClient
+ * @cancellable: a #GCancellable
+ * @error: a #GError
+ *
+ * Gets a #GdmChooserSession object that can be used
+ * to do do various XDMCP chooser related tasks, such
+ * as selecting a host or disconnecting.
+ *
+ * Returns: (transfer full): #GdmChooserSession or %NULL if caller is not a chooser
+ */
+GdmChooserSession *
+gdm_client_get_chooser_session_sync (GdmClient *client,
+ GCancellable *cancellable,
+ GError **error)
+{
+
+ if (client->priv->chooser_session != NULL) {
+ return g_object_ref (client->priv->chooser_session);
+ }
+
+ client->priv->chooser_session = gdm_chooser_session_proxy_new_sync (client->priv->connection,
+ G_DBUS_PROXY_FLAGS_NONE,
+ NULL,
+ SESSION_DBUS_PATH,
+ cancellable,
+ error);
+
+ return g_object_ref (client->priv->chooser_session);
+}
+
+static void
+gdm_client_class_init (GdmClientClass *klass)
+{
+ GObjectClass *object_class = G_OBJECT_CLASS (klass);
+
+ object_class->finalize = gdm_client_finalize;
+
+ g_type_class_add_private (klass, sizeof (GdmClientPrivate));
+
+}
+
+static void
+gdm_client_init (GdmClient *client)
+{
+
+ client->priv = GDM_CLIENT_GET_PRIVATE (client);
+}
+
+static void
+gdm_client_finalize (GObject *object)
+{
+ GdmClient *client;
+
+ g_return_if_fail (object != NULL);
+ g_return_if_fail (GDM_IS_CLIENT (object));
+
+ client = GDM_CLIENT (object);
+
+ g_return_if_fail (client->priv != NULL);
+
+ g_clear_object (&client->priv->manager);
+ g_free (client->priv->address);
+
+ G_OBJECT_CLASS (gdm_client_parent_class)->finalize (object);
+}
+
+GdmClient *
+gdm_client_new (void)
+{
+ if (client_object != NULL) {
+ g_object_ref (client_object);
+ } else {
+ client_object = g_object_new (GDM_TYPE_CLIENT, NULL);
+ g_object_add_weak_pointer (client_object,
+ (gpointer *) &client_object);
+ }
+
+ return GDM_CLIENT (client_object);
+}
diff --git a/gui/libgdm/gdm-client.h b/gui/libgdm/gdm-client.h
new file mode 100644
index 0000000..a0972b1
--- /dev/null
+++ b/gui/libgdm/gdm-client.h
@@ -0,0 +1,80 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*-
+ *
+ * Copyright (C) 2012 Red Hat, Inc.
+ * Copyright (C) 2012 Giovanni Campagna <scampa giovanni gmail com>
+ *
+ * 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_CLIENT_H
+#define __GDM_CLIENT_H
+
+#include <glib-object.h>
+#include "gdm-client-glue.h"
+
+G_BEGIN_DECLS
+
+#define GDM_TYPE_CLIENT (gdm_client_get_type ())
+#define GDM_CLIENT(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GDM_TYPE_CLIENT, GdmClient))
+#define GDM_CLIENT_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), GDM_TYPE_CLIENT, GdmClientClass))
+#define GDM_IS_CLIENT(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GDM_TYPE_CLIENT))
+#define GDM_IS_CLIENT_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GDM_TYPE_CLIENT))
+#define GDM_CLIENT_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GDM_TYPE_CLIENT, GdmClientClass))
+
+typedef struct GdmClientPrivate GdmClientPrivate;
+
+typedef struct
+{
+ GObject parent;
+ GdmClientPrivate *priv;
+} GdmClient;
+
+typedef struct
+{
+ GObjectClass parent_class;
+
+} GdmClientClass;
+
+#define GDM_CLIENT_ERROR (gdm_client_error_quark ())
+
+typedef enum _GdmClientError {
+ GDM_CLIENT_ERROR_GENERIC = 0,
+} GdmClientError;
+
+GType gdm_client_get_type (void);
+GQuark gdm_client_error_quark (void);
+
+GdmClient * gdm_client_new (void);
+
+gboolean gdm_client_open_connection_sync (GdmClient *client,
+ GCancellable *cancellable,
+ GError **error);
+gboolean gdm_client_close_connection_sync (GdmClient *client,
+ GCancellable *cancellable,
+ GError **error);
+GdmUserVerifier *gdm_client_get_user_verifier_sync (GdmClient *client,
+ GCancellable *cancellable,
+ GError **error);
+GdmGreeterSession *gdm_client_get_greeter_session_sync (GdmClient *client,
+ GCancellable *cancellable,
+ GError **error);
+GdmChooserSession *gdm_client_get_chooser_session_sync (GdmClient *client,
+ GCancellable *cancellable,
+ GError **error);
+
+G_END_DECLS
+
+#endif /* __GDM_CLIENT_H */
diff --git a/gui/libgdmgreeter/gdm-greeter-sessions.c b/gui/libgdm/gdm-sessions.c
similarity index 95%
rename from gui/libgdmgreeter/gdm-greeter-sessions.c
rename to gui/libgdm/gdm-sessions.c
index fe34293..945453e 100644
--- a/gui/libgdmgreeter/gdm-greeter-sessions.c
+++ b/gui/libgdm/gdm-sessions.c
@@ -35,7 +35,7 @@
#include <glib/gi18n.h>
#include <glib/gstdio.h>
-#include "gdm-greeter-sessions.h"
+#include "gdm-sessions.h"
typedef struct _GdmSessionFile {
char *id;
@@ -207,7 +207,7 @@ collect_sessions (void)
}
/**
- * gdm_greeter_get_session_ids:
+ * gdm_get_session_ids:
*
* Reads /usr/share/xsessions and other relevant places for possible sessions
* to log into and returns the complete list.
@@ -215,7 +215,7 @@ collect_sessions (void)
* Returns: (transfer full): a %NULL terminated list of session ids
*/
char **
-gdm_greeter_get_session_ids (void)
+gdm_get_session_ids (void)
{
GHashTableIter iter;
gpointer key, value;
@@ -242,8 +242,8 @@ gdm_greeter_get_session_ids (void)
}
/**
- * gdm_greeter_get_session_name_and_description:
- * @id: an id from gdm_greeter_get_session_ids()
+ * gdm_get_session_name_and_description:
+ * @id: an id from gdm_get_session_ids()
* @description: (out): optional returned session description
*
* Takes an xsession id and returns the name and comment about it.
@@ -251,8 +251,8 @@ gdm_greeter_get_session_ids (void)
* Returns: The session name if found, or %NULL otherwise
*/
char *
-gdm_greeter_get_session_name_and_description (const char *id,
- char **description)
+gdm_get_session_name_and_description (const char *id,
+ char **description)
{
GdmSessionFile *session;
char *name;
diff --git a/gui/libgdmgreeter/gdm-greeter-sessions.h b/gui/libgdm/gdm-sessions.h
similarity index 81%
rename from gui/libgdmgreeter/gdm-greeter-sessions.h
rename to gui/libgdm/gdm-sessions.h
index ab78a98..c456974 100644
--- a/gui/libgdmgreeter/gdm-greeter-sessions.h
+++ b/gui/libgdm/gdm-sessions.h
@@ -28,9 +28,9 @@
G_BEGIN_DECLS
-char ** gdm_greeter_get_session_ids (void);
-char * gdm_greeter_get_session_name_and_description (const char *id,
- char **description);
+char ** gdm_get_session_ids (void);
+char * gdm_get_session_name_and_description (const char *id,
+ char **description);
G_END_DECLS
diff --git a/gui/libgdm/gdm.pc.in b/gui/libgdm/gdm.pc.in
new file mode 100644
index 0000000..9570d8c
--- /dev/null
+++ b/gui/libgdm/gdm.pc.in
@@ -0,0 +1,10 @@
+prefix= prefix@
+exec_prefix= exec_prefix@
+libdir= libdir@
+includedir= includedir@
+
+Name: GDM Client Library
+Description: Client Library for communicating with GDM daemon
+Version: @VERSION@
+Libs: -L${libdir} -lgdm
+Cflags: -I${includedir}/gdm
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]