diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-27 14:30:14 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-27 14:30:14 +0000 |
commit | f38bddc70a6ec7c1ab26d9a8b06eed25d618ae22 (patch) | |
tree | 6437d0de9ba7fb9b0933a7c0eaa610a404d79e4e /daemon/gdm-display-access-file.h | |
parent | Initial commit. (diff) | |
download | gdm3-upstream.tar.xz gdm3-upstream.zip |
Adding upstream version 3.38.2.1.upstream/3.38.2.1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r-- | daemon/gdm-display-access-file.h | 67 |
1 files changed, 67 insertions, 0 deletions
diff --git a/daemon/gdm-display-access-file.h b/daemon/gdm-display-access-file.h new file mode 100644 index 0000000..559d3ed --- /dev/null +++ b/daemon/gdm-display-access-file.h @@ -0,0 +1,67 @@ +/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*- + * + * gdm-display-access-file.h - Abstraction around xauth cookies + * + * Copyright (C) 2007 Ray Strode <rstrode@redhat.com> + * + * Written by Ray Strode <rstrode@redhat.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, 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., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301, USA. + */ +#ifndef __GDM_DISPLAY_ACCESS_FILE_H__ +#define __GDM_DISPLAY_ACCESS_FILE_H__ + +#include <glib.h> +#include <glib-object.h> + +#include "gdm-display.h" + +G_BEGIN_DECLS + +#define GDM_TYPE_DISPLAY_ACCESS_FILE (gdm_display_access_file_get_type ()) +G_DECLARE_FINAL_TYPE (GdmDisplayAccessFile, gdm_display_access_file, GDM, DISPLAY_ACCESS_FILE, GObject) + +#define GDM_DISPLAY_ACCESS_FILE_ERROR (gdm_display_access_file_error_quark ()) + +typedef enum _GdmDisplayAccessFileError GdmDisplayAccessFileError; + +enum _GdmDisplayAccessFileError +{ + GDM_DISPLAY_ACCESS_FILE_ERROR_GENERAL = 0, + GDM_DISPLAY_ACCESS_FILE_ERROR_FINDING_AUTH_ENTRY +}; + +GQuark gdm_display_access_file_error_quark (void); + +GdmDisplayAccessFile *gdm_display_access_file_new (const char *username); +gboolean gdm_display_access_file_open (GdmDisplayAccessFile *file, + GError **error); +gboolean gdm_display_access_file_add_display (GdmDisplayAccessFile *file, + GdmDisplay *display, + char **cookie, + gsize *cookie_size, + GError **error); +gboolean gdm_display_access_file_add_display_with_cookie (GdmDisplayAccessFile *file, + GdmDisplay *display, + const char *cookie, + gsize cookie_size, + GError **error); + +void gdm_display_access_file_close (GdmDisplayAccessFile *file); +char *gdm_display_access_file_get_path (GdmDisplayAccessFile *file); + +G_END_DECLS +#endif /* __GDM_DISPLAY_ACCESS_FILE_H__ */ |