Back to index

lightdm  1.3.2
xserver-remote.c
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 #include <config.h>
00013 
00014 #include "xserver-remote.h"
00015 
00016 G_DEFINE_TYPE (XServerRemote, xserver_remote, XSERVER_TYPE);
00017 
00018 XServerRemote *
00019 xserver_remote_new (const gchar *hostname, guint number, XAuthority *authority)
00020 {
00021     XServerRemote *self = g_object_new (XSERVER_REMOTE_TYPE, NULL);
00022     gchar *name;
00023 
00024     xserver_set_hostname (XSERVER (self), hostname);
00025     xserver_set_display_number (XSERVER (self), number);
00026     xserver_set_authority (XSERVER (self), authority);
00027 
00028     name = g_strdup_printf ("x-%s-%d", hostname, number);
00029     display_server_set_name (DISPLAY_SERVER (self), name);
00030     g_free (name);
00031 
00032     return self;
00033 }
00034 
00035 static void
00036 xserver_remote_init (XServerRemote *server)
00037 {
00038 }
00039 
00040 static void
00041 xserver_remote_class_init (XServerRemoteClass *klass)
00042 {
00043 }