Back to index

lightdm  1.3.2
x-authority.h
Go to the documentation of this file.
00001 #ifndef _X_AUTHORITY_H_
00002 #define _X_AUTHORITY_H_
00003 
00004 #include <glib-object.h>
00005 #include <gio/gio.h>
00006 
00007 G_BEGIN_DECLS
00008 
00009 enum
00010 {
00011     XAUTH_FAMILY_INTERNET = 0,
00012     XAUTH_FAMILY_DECNET = 1,
00013     XAUTH_FAMILY_CHAOS = 2,
00014     XAUTH_FAMILY_SERVER_INTERPRETED = 5,
00015     XAUTH_FAMILY_INTERNET6 = 6,
00016     XAUTH_FAMILY_LOCALHOST = 252,
00017     XAUTH_FAMILY_KRB5_PRINCIPAL = 253,
00018     XAUTH_FAMILY_NETNAME = 254,
00019     XAUTH_FAMILY_LOCAL = 256,
00020     XAUTH_FAMILY_WILD = 65535
00021 };
00022 
00023 typedef struct XAuthorityPrivate XAuthorityPrivate;
00024 
00025 typedef struct
00026 {
00027     GObjectClass parent_instance;
00028     XAuthorityPrivate *priv;
00029 } XAuthority;
00030 
00031 typedef struct
00032 {
00033     GObjectClass parent_class;
00034 } XAuthorityClass;
00035 
00036 typedef struct XAuthorityRecordPrivate XAuthorityRecordPrivate;
00037 
00038 typedef struct
00039 {
00040     GObjectClass parent_instance;
00041     XAuthorityRecordPrivate *priv;
00042 } XAuthorityRecord;
00043 
00044 typedef struct
00045 {
00046     GObjectClass parent_class;
00047 } XAuthorityRecordClass;
00048 
00049 GType x_authority_get_type (void);
00050 
00051 GType x_authority_record_get_type (void);
00052 
00053 XAuthority *x_authority_new (void);
00054 
00055 gboolean x_authority_load (XAuthority *authority, const gchar *filename, GError **error);
00056 
00057 XAuthorityRecord *x_authority_match_local (XAuthority *authority, const gchar *authorization_name);
00058 
00059 XAuthorityRecord *x_authority_match_localhost (XAuthority *authority, const gchar *authorization_name);
00060 
00061 XAuthorityRecord *x_authority_match_inet (XAuthority *authority, GInetAddress *address, const gchar *authorization_name);
00062 
00063 guint16 x_authority_record_get_authorization_data_length (XAuthorityRecord *record);
00064 
00065 const guint8 *x_authority_record_get_authorization_data (XAuthorityRecord *record);
00066 
00067 gboolean x_authority_record_check_cookie (XAuthorityRecord *record, const guint8 *cookie_data, guint16 cookie_data_length);
00068 
00069 G_END_DECLS
00070 
00071 #endif /* _X_AUTHORITY_H_ */