1
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*-
3
* gdm-display-access-file.h - Abstraction around xauth cookies
5
* Copyright (C) 2007 Ray Strode <rstrode@redhat.com>
7
* Written by Ray Strode <rstrode@redhat.com>
9
* This program is free software; you can redistribute it and/or modify
10
* it under the terms of the GNU General Public License as published by
11
* the Free Software Foundation; either version 2, or (at your option)
14
* This program is distributed in the hope that it will be useful,
15
* but WITHOUT ANY WARRANTY; without even the implied warranty of
16
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17
* GNU General Public License for more details.
19
* You should have received a copy of the GNU General Public License
20
* along with this program; if not, write to the Free Software
21
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
24
#ifndef __GDM_DISPLAY_ACCESS_FILE_H__
25
#define __GDM_DISPLAY_ACCESS_FILE_H__
28
#include <glib-object.h>
30
#include "gdm-display.h"
33
#define GDM_TYPE_DISPLAY_ACCESS_FILE (gdm_display_access_file_get_type ())
34
#define GDM_DISPLAY_ACCESS_FILE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GDM_TYPE_DISPLAY_ACCESS_FILE, GdmDisplayAccessFile))
35
#define GDM_DISPLAY_ACCESS_FILE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GDM_TYPE_DISPLAY_ACCESS_FILE, GdmDisplayAccessFileClass))
36
#define GDM_IS_DISPLAY_ACCESS_FILE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GDM_TYPE_DISPLAY_ACCESS_FILE))
37
#define GDM_IS_DISPLAY_ACCESS_FILE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GDM_TYPE_DISPLAY_ACCESS_FILE))
38
#define GDM_DISPLAY_ACCESS_FILE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), GDM_TYPE_DISPLAY_ACCESS_FILE, GdmDisplayAccessFileClass))
39
#define GDM_DISPLAY_ACCESS_FILE_ERROR (gdm_display_access_file_error_quark ())
41
typedef struct _GdmDisplayAccessFile GdmDisplayAccessFile;
42
typedef struct _GdmDisplayAccessFileClass GdmDisplayAccessFileClass;
43
typedef struct _GdmDisplayAccessFilePrivate GdmDisplayAccessFilePrivate;
44
typedef enum _GdmDisplayAccessFileError GdmDisplayAccessFileError;
46
struct _GdmDisplayAccessFile
50
GdmDisplayAccessFilePrivate *priv;
53
struct _GdmDisplayAccessFileClass
55
GObjectClass parent_class;
58
enum _GdmDisplayAccessFileError
60
GDM_DISPLAY_ACCESS_FILE_ERROR_GENERAL = 0,
61
GDM_DISPLAY_ACCESS_FILE_ERROR_FINDING_AUTH_ENTRY
64
GQuark gdm_display_access_file_error_quark (void);
65
GType gdm_display_access_file_get_type (void);
67
GdmDisplayAccessFile *gdm_display_access_file_new (const char *username);
68
gboolean gdm_display_access_file_open (GdmDisplayAccessFile *file,
70
gboolean gdm_display_access_file_add_display (GdmDisplayAccessFile *file,
75
gboolean gdm_display_access_file_add_display_with_cookie (GdmDisplayAccessFile *file,
80
gboolean gdm_display_access_file_remove_display (GdmDisplayAccessFile *file,
84
void gdm_display_access_file_close (GdmDisplayAccessFile *file);
85
char *gdm_display_access_file_get_path (GdmDisplayAccessFile *file);
88
#endif /* __GDM_DISPLAY_ACCESS_FILE_H__ */