Back to index

lightdm  1.3.2
xserver.h
Go to the documentation of this file.
00001 /*
00002  * Copyright (C) 2010-2011 Robert Ancell.
00003  * Author: Robert Ancell <robert.ancell@canonical.com>
00004  * 
00005  * This program is free software: you can redistribute it and/or modify it under
00006  * the terms of the GNU General Public License as published by the Free Software
00007  * Foundation, either version 3 of the License, or (at your option) any later
00008  * version. See http://www.gnu.org/copyleft/gpl.html the full text of the
00009  * license.
00010  */
00011 
00012 #ifndef _XSERVER_H_
00013 #define _XSERVER_H_
00014 
00015 #include <glib-object.h>
00016 #include "display-server.h"
00017 #include "xauthority.h"
00018 
00019 G_BEGIN_DECLS
00020 
00021 #define XSERVER_TYPE (xserver_get_type())
00022 #define XSERVER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), XSERVER_TYPE, XServer))
00023 #define XSERVER_CLASS(klass)   (G_TYPE_CHECK_CLASS_CAST ((klass), XSERVER_TYPE, XServerClass))
00024 #define XSERVER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), XSERVER_TYPE, XServerClass))
00025 #define IS_XSERVER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), XSERVER_TYPE))
00026 
00027 typedef struct XServerPrivate XServerPrivate;
00028 
00029 typedef struct
00030 {
00031     DisplayServer   parent_instance;
00032     XServerPrivate *priv;
00033 } XServer;
00034 
00035 typedef struct
00036 {
00037     DisplayServerClass parent_class;
00038 } XServerClass;
00039 
00040 GType xserver_get_type (void);
00041 
00042 void xserver_set_hostname (XServer *server, const gchar *hostname);
00043 
00044 gchar *xserver_get_hostname (XServer *server);
00045 
00046 void xserver_set_display_number (XServer *server, guint number);
00047 
00048 guint xserver_get_display_number (XServer *server);
00049 
00050 const gchar *xserver_get_address (XServer *server);
00051 
00052 const gchar *xserver_get_authentication_name (XServer *server);
00053 
00054 const guint8 *xserver_get_authentication_data (XServer *server);
00055 
00056 gsize xserver_get_authentication_data_length (XServer *server);
00057 
00058 void xserver_set_authority (XServer *server, XAuthority *authority);
00059 
00060 XAuthority *xserver_get_authority (XServer *server);
00061 
00062 G_END_DECLS
00063 
00064 #endif /* _XSERVER_H_ */