source: proiecte/PPPP/gdm/daemon/gdm-display.h @ 134

Last change on this file since 134 was 134, checked in by (none), 14 years ago

gdm sources with the modifications for webcam

File size: 7.5 KB
Line 
1/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*-
2 *
3 * Copyright (C) 2007 William Jon McCann <mccann@jhu.edu>
4 *
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.
9 *
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.
14 *
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.
18 *
19 */
20
21
22#ifndef __GDM_DISPLAY_H
23#define __GDM_DISPLAY_H
24
25#include <glib-object.h>
26#include <dbus/dbus-glib.h>
27
28G_BEGIN_DECLS
29
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))
36
37typedef struct GdmDisplayPrivate GdmDisplayPrivate;
38
39typedef enum {
40        GDM_DISPLAY_UNMANAGED = 0,
41        GDM_DISPLAY_PREPARED,
42        GDM_DISPLAY_MANAGED,
43        GDM_DISPLAY_FINISHED,
44        GDM_DISPLAY_FAILED,
45} GdmDisplayStatus;
46
47typedef struct
48{
49        GObject            parent;
50        GdmDisplayPrivate *priv;
51} GdmDisplay;
52
53typedef struct
54{
55        GObjectClass   parent_class;
56
57        /* methods */
58        gboolean (*create_authority)          (GdmDisplay *display);
59        gboolean (*add_user_authorization)    (GdmDisplay *display,
60                                               const char *username,
61                                               char      **filename,
62                                               GError    **error);
63        gboolean (*remove_user_authorization) (GdmDisplay *display,
64                                               const char *username,
65                                               GError    **error);
66        gboolean (*set_slave_bus_name)        (GdmDisplay *display,
67                                               const char *name,
68                                               GError    **error);
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,
74                                               gboolean   *enabled,
75                                               char      **username,
76                                               int        *delay);
77} GdmDisplayClass;
78
79typedef enum
80{
81         GDM_DISPLAY_ERROR_GENERAL,
82         GDM_DISPLAY_ERROR_GETTING_USER_INFO
83} GdmDisplayError;
84
85#define GDM_DISPLAY_ERROR gdm_display_error_quark ()
86
87GQuark              gdm_display_error_quark                    (void);
88GType               gdm_display_get_type                       (void);
89
90int                 gdm_display_get_status                     (GdmDisplay *display);
91time_t              gdm_display_get_creation_time              (GdmDisplay *display);
92char *              gdm_display_get_user_auth                  (GdmDisplay *display);
93
94gboolean            gdm_display_create_authority               (GdmDisplay *display);
95gboolean            gdm_display_prepare                        (GdmDisplay *display);
96gboolean            gdm_display_manage                         (GdmDisplay *display);
97gboolean            gdm_display_finish                         (GdmDisplay *display);
98gboolean            gdm_display_unmanage                       (GdmDisplay *display);
99
100
101/* exported to bus */
102gboolean            gdm_display_get_id                         (GdmDisplay *display,
103                                                                char      **id,
104                                                                GError    **error);
105gboolean            gdm_display_get_remote_hostname            (GdmDisplay *display,
106                                                                char      **hostname,
107                                                                GError    **error);
108gboolean            gdm_display_get_x11_display_number         (GdmDisplay *display,
109                                                                int        *number,
110                                                                GError    **error);
111gboolean            gdm_display_get_x11_display_name           (GdmDisplay *display,
112                                                                char      **x11_display,
113                                                                GError    **error);
114gboolean            gdm_display_get_seat_id                    (GdmDisplay *display,
115                                                                char      **seat_id,
116                                                                GError    **error);
117gboolean            gdm_display_is_local                       (GdmDisplay *display,
118                                                                gboolean   *local,
119                                                                GError    **error);
120gboolean            gdm_display_get_timed_login_details        (GdmDisplay *display,
121                                                                gboolean   *enabled,
122                                                                char      **username,
123                                                                int        *delay,
124                                                                GError    **error);
125
126/* exported but protected */
127gboolean            gdm_display_get_x11_cookie                 (GdmDisplay *display,
128                                                                GArray     **x11_cookie,
129                                                                GError    **error);
130gboolean            gdm_display_get_x11_authority_file         (GdmDisplay *display,
131                                                                char      **filename,
132                                                                GError    **error);
133gboolean            gdm_display_add_user_authorization         (GdmDisplay *display,
134                                                                const char *username,
135                                                                char      **filename,
136                                                                GError    **error);
137gboolean            gdm_display_remove_user_authorization      (GdmDisplay *display,
138                                                                const char *username,
139                                                                GError    **error);
140gboolean            gdm_display_set_slave_bus_name             (GdmDisplay *display,
141                                                                const char *name,
142                                                                GError    **error);
143
144
145G_END_DECLS
146
147#endif /* __GDM_DISPLAY_H */
Note: See TracBrowser for help on using the repository browser.