]> rtime.felk.cvut.cz Git - sojka/lightdm.git/blob - src/x-server-remote.c
Use a sorting function to choose which XDMCP addresses to connect back on. Improve...
[sojka/lightdm.git] / src / x-server-remote.c
1 /*
2  * Copyright (C) 2010-2011 Robert Ancell.
3  * Author: Robert Ancell <robert.ancell@canonical.com>
4  *
5  * This program is free software: you can redistribute it and/or modify it under
6  * the terms of the GNU General Public License as published by the Free Software
7  * Foundation, either version 3 of the License, or (at your option) any later
8  * version. See http://www.gnu.org/copyleft/gpl.html the full text of the
9  * license.
10  */
11
12 #include <config.h>
13
14 #include "x-server-remote.h"
15
16 G_DEFINE_TYPE (XServerRemote, x_server_remote, X_SERVER_TYPE);
17
18 XServerRemote *
19 x_server_remote_new (const gchar *hostname, guint number, XAuthority *authority)
20 {
21     XServerRemote *self = g_object_new (X_SERVER_REMOTE_TYPE, NULL);
22     gchar *name;
23
24     x_server_set_hostname (X_SERVER (self), hostname);
25     x_server_set_display_number (X_SERVER (self), number);
26     x_server_set_authority (X_SERVER (self), authority);
27
28     name = g_strdup_printf ("x-%s-%d", hostname, number);
29     display_server_set_name (DISPLAY_SERVER (self), name);
30     g_free (name);
31
32     return self;
33 }
34
35 static void
36 x_server_remote_init (XServerRemote *server)
37 {
38 }
39
40 static void
41 x_server_remote_class_init (XServerRemoteClass *klass)
42 {
43 }