Back to index

lightdm  1.3.2
Classes | Defines | Typedefs | Functions
xserver-local.h File Reference
#include "xserver.h"
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  XServerLocal
struct  XServerLocalClass

Defines

#define XSERVER_LOCAL_TYPE   (xserver_local_get_type())
#define XSERVER_LOCAL(obj)   (G_TYPE_CHECK_INSTANCE_CAST ((obj), XSERVER_LOCAL_TYPE, XServerLocal))
#define IS_XSERVER_LOCAL(obj)   (G_TYPE_CHECK_INSTANCE_TYPE ((obj), XSERVER_LOCAL_TYPE))

Typedefs

typedef struct XServerLocalPrivate

Functions

guint xserver_local_get_unused_display_number (void)
void xserver_local_release_display_number (guint display_number)
GType xserver_local_get_type (void)
XServerLocalxserver_local_new (void)
void xserver_local_set_command (XServerLocal *server, const gchar *command)
void xserver_local_set_config (XServerLocal *server, const gchar *path)
void xserver_local_set_layout (XServerLocal *server, const gchar *layout)
void xserver_local_set_allow_tcp (XServerLocal *server, gboolean allow_tcp)
void xserver_local_set_xdmcp_server (XServerLocal *server, const gchar *hostname)
const gchar * xserver_local_get_xdmcp_server (XServerLocal *server)
void xserver_local_set_xdmcp_port (XServerLocal *server, guint port)
guint xserver_local_get_xdmcp_port (XServerLocal *server)
void xserver_local_set_xdmcp_key (XServerLocal *server, const gchar *key)
gint xserver_local_get_vt (XServerLocal *server)
gchar * xserver_local_get_authority_file_path (XServerLocal *server)

Class Documentation

struct XServerLocal

Definition at line 25 of file xserver-local.h.

Collaboration diagram for XServerLocal:
Class Members
XServer parent_instance
XServerLocalPrivate * priv

Define Documentation

#define IS_XSERVER_LOCAL (   obj)    (G_TYPE_CHECK_INSTANCE_TYPE ((obj), XSERVER_LOCAL_TYPE))

Definition at line 21 of file xserver-local.h.

#define XSERVER_LOCAL (   obj)    (G_TYPE_CHECK_INSTANCE_CAST ((obj), XSERVER_LOCAL_TYPE, XServerLocal))

Definition at line 20 of file xserver-local.h.

Definition at line 19 of file xserver-local.h.


Typedef Documentation

typedef struct XServerLocalPrivate

Definition at line 23 of file xserver-local.h.


Function Documentation

Definition at line 232 of file xserver-local.c.

{
    g_return_val_if_fail (server != NULL, 0);
    if (server->priv->authority_file)
        return g_file_get_path (server->priv->authority_file);
    return NULL;
}

Here is the caller graph for this function:

GType xserver_local_get_type ( void  )

Definition at line 93 of file xserver-local.c.

{
    guint number;

    number = config_get_integer (config_get_instance (), "LightDM", "minimum-display-number");
    while (display_number_in_use (number))
        number++;

    display_numbers = g_list_append (display_numbers, GUINT_TO_POINTER (number));

    return number;
}

Here is the call graph for this function:

Here is the caller graph for this function:

gint xserver_local_get_vt ( XServerLocal server)

Definition at line 225 of file xserver-local.c.

{
    g_return_val_if_fail (server != NULL, 0);
    return server->priv->vt;
}

Here is the caller graph for this function:

Definition at line 210 of file xserver-local.c.

{
    g_return_val_if_fail (server != NULL, 0);
    return server->priv->xdmcp_port;
}
const gchar* xserver_local_get_xdmcp_server ( XServerLocal server)

Definition at line 196 of file xserver-local.c.

{
    g_return_val_if_fail (server != NULL, 0);
    return server->priv->xdmcp_server;
}

Definition at line 122 of file xserver-local.c.

{
    XServerLocal *self = g_object_new (XSERVER_LOCAL_TYPE, NULL);
    gchar *name;

    xserver_set_display_number (XSERVER (self), xserver_local_get_unused_display_number ());

    name = g_strdup_printf ("x-%d", xserver_get_display_number (XSERVER (self)));
    display_server_set_name (DISPLAY_SERVER (self), name);
    g_free (name);

    /* Replace Plymouth if it is running */
    if (plymouth_get_is_active () && plymouth_has_active_vt ())
    {
        gint active_vt = vt_get_active ();
        if (active_vt >= vt_get_min ())
        {
            g_debug ("X server %s will replace Plymouth", xserver_get_address (XSERVER (self)));
            self->priv->replacing_plymouth = TRUE;
            self->priv->vt = active_vt;
            plymouth_deactivate ();
        }
        else
            g_debug ("Plymouth is running on VT %d, but this is less than the configured minimum of %d so not replacing it", active_vt, vt_get_min ());
    }
    if (self->priv->vt < 0)
        self->priv->vt = vt_get_unused ();
    if (self->priv->vt >= 0)
        vt_ref (self->priv->vt);

    return self;
}

Here is the call graph for this function:

Here is the caller graph for this function:

void xserver_local_release_display_number ( guint  display_number)

Definition at line 107 of file xserver-local.c.

{
    GList *link;
    for (link = display_numbers; link; link = link->next)
    {
        guint number = GPOINTER_TO_UINT (link->data);
        if (number == display_number)
        {
            display_numbers = g_list_remove_link (display_numbers, link);
            return;
        }
    }
}

Here is the caller graph for this function:

void xserver_local_set_allow_tcp ( XServerLocal server,
gboolean  allow_tcp 
)

Definition at line 180 of file xserver-local.c.

{
    g_return_if_fail (server != NULL);
    server->priv->allow_tcp = allow_tcp;
}

Here is the caller graph for this function:

void xserver_local_set_command ( XServerLocal server,
const gchar *  command 
)

Definition at line 156 of file xserver-local.c.

{
    g_return_if_fail (server != NULL);
    g_free (server->priv->command);
    server->priv->command = g_strdup (command);
}

Here is the caller graph for this function:

void xserver_local_set_config ( XServerLocal server,
const gchar *  path 
)

Definition at line 164 of file xserver-local.c.

{
    g_return_if_fail (server != NULL);
    g_free (server->priv->config_file);
    server->priv->config_file = g_strdup (path);
}

Here is the caller graph for this function:

void xserver_local_set_layout ( XServerLocal server,
const gchar *  layout 
)

Definition at line 172 of file xserver-local.c.

{
    g_return_if_fail (server != NULL);
    g_free (server->priv->layout);
    server->priv->layout = g_strdup (layout);
}

Here is the caller graph for this function:

void xserver_local_set_xdmcp_key ( XServerLocal server,
const gchar *  key 
)

Definition at line 217 of file xserver-local.c.

{
    g_return_if_fail (server != NULL);
    g_free (server->priv->xdmcp_key);
    server->priv->xdmcp_key = g_strdup (key);
}

Here is the caller graph for this function:

void xserver_local_set_xdmcp_port ( XServerLocal server,
guint  port 
)

Definition at line 203 of file xserver-local.c.

{
    g_return_if_fail (server != NULL);
    server->priv->xdmcp_port = port;
}

Here is the caller graph for this function:

void xserver_local_set_xdmcp_server ( XServerLocal server,
const gchar *  hostname 
)

Definition at line 187 of file xserver-local.c.

{
    g_return_if_fail (server != NULL);
    g_free (server->priv->xdmcp_server);
    server->priv->xdmcp_server = g_strdup (hostname);
    display_server_set_start_local_sessions (DISPLAY_SERVER (server), hostname == NULL);
}

Here is the call graph for this function:

Here is the caller graph for this function: