1
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*-
3
* Copyright (C) 2007 William Jon McCann <mccann@jhu.edu>
5
* This program is free software; you can redistribute it and/or modify
6
* it under the terms of the GNU General Public License as published by
7
* the Free Software Foundation; either version 2 of the License, or
8
* (at your option) any later version.
10
* This program is distributed in the hope that it will be useful,
11
* but WITHOUT ANY WARRANTY; without even the implied warranty of
12
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
* GNU General Public License for more details.
15
* You should have received a copy of the GNU General Public License
16
* along with this program; if not, write to the Free Software
17
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
22
#ifndef __GDM_DISPLAY_H
23
#define __GDM_DISPLAY_H
25
#include <glib-object.h>
26
#include <dbus/dbus-glib.h>
30
#define GDM_TYPE_DISPLAY (gdm_display_get_type ())
31
#define GDM_DISPLAY(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GDM_TYPE_DISPLAY, GdmDisplay))
32
#define GDM_DISPLAY_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), GDM_TYPE_DISPLAY, GdmDisplayClass))
33
#define GDM_IS_DISPLAY(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GDM_TYPE_DISPLAY))
34
#define GDM_IS_DISPLAY_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GDM_TYPE_DISPLAY))
35
#define GDM_DISPLAY_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GDM_TYPE_DISPLAY, GdmDisplayClass))
37
typedef struct GdmDisplayPrivate GdmDisplayPrivate;
40
GDM_DISPLAY_UNMANAGED = 0,
50
GdmDisplayPrivate *priv;
55
GObjectClass parent_class;
58
gboolean (*create_authority) (GdmDisplay *display);
59
gboolean (*add_user_authorization) (GdmDisplay *display,
63
gboolean (*remove_user_authorization) (GdmDisplay *display,
66
gboolean (*set_slave_bus_name) (GdmDisplay *display,
69
gboolean (*prepare) (GdmDisplay *display);
70
gboolean (*manage) (GdmDisplay *display);
71
gboolean (*finish) (GdmDisplay *display);
72
gboolean (*unmanage) (GdmDisplay *display);
73
void (*get_timed_login_details) (GdmDisplay *display,
81
GDM_DISPLAY_ERROR_GENERAL,
82
GDM_DISPLAY_ERROR_GETTING_USER_INFO
85
#define GDM_DISPLAY_ERROR gdm_display_error_quark ()
87
GQuark gdm_display_error_quark (void);
88
GType gdm_display_get_type (void);
90
int gdm_display_get_status (GdmDisplay *display);
91
time_t gdm_display_get_creation_time (GdmDisplay *display);
92
char * gdm_display_get_user_auth (GdmDisplay *display);
94
gboolean gdm_display_create_authority (GdmDisplay *display);
95
gboolean gdm_display_prepare (GdmDisplay *display);
96
gboolean gdm_display_manage (GdmDisplay *display);
97
gboolean gdm_display_finish (GdmDisplay *display);
98
gboolean gdm_display_unmanage (GdmDisplay *display);
101
/* exported to bus */
102
gboolean gdm_display_get_id (GdmDisplay *display,
105
gboolean gdm_display_get_remote_hostname (GdmDisplay *display,
108
gboolean gdm_display_get_x11_display_number (GdmDisplay *display,
111
gboolean gdm_display_get_x11_display_name (GdmDisplay *display,
114
gboolean gdm_display_get_seat_id (GdmDisplay *display,
117
gboolean gdm_display_is_local (GdmDisplay *display,
120
gboolean gdm_display_get_timed_login_details (GdmDisplay *display,
126
/* exported but protected */
127
gboolean gdm_display_get_x11_cookie (GdmDisplay *display,
130
gboolean gdm_display_get_x11_authority_file (GdmDisplay *display,
133
gboolean gdm_display_add_user_authorization (GdmDisplay *display,
134
const char *username,
137
gboolean gdm_display_remove_user_authorization (GdmDisplay *display,
138
const char *username,
140
gboolean gdm_display_set_slave_bus_name (GdmDisplay *display,
147
#endif /* __GDM_DISPLAY_H */