Back to index

lightdm  1.3.2
Classes | Defines | Typedefs | Functions
xserver.h File Reference
#include <glib-object.h>
#include "display-server.h"
#include "xauthority.h"
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  XServer
struct  XServerClass

Defines

#define XSERVER_TYPE   (xserver_get_type())
#define XSERVER(obj)   (G_TYPE_CHECK_INSTANCE_CAST ((obj), XSERVER_TYPE, XServer))
#define XSERVER_CLASS(klass)   (G_TYPE_CHECK_CLASS_CAST ((klass), XSERVER_TYPE, XServerClass))
#define XSERVER_GET_CLASS(obj)   (G_TYPE_INSTANCE_GET_CLASS ((obj), XSERVER_TYPE, XServerClass))
#define IS_XSERVER(obj)   (G_TYPE_CHECK_INSTANCE_TYPE ((obj), XSERVER_TYPE))

Typedefs

typedef struct XServerPrivate

Functions

GType xserver_get_type (void)
void xserver_set_hostname (XServer *server, const gchar *hostname)
gchar * xserver_get_hostname (XServer *server)
void xserver_set_display_number (XServer *server, guint number)
guint xserver_get_display_number (XServer *server)
const gchar * xserver_get_address (XServer *server)
const gchar * xserver_get_authentication_name (XServer *server)
const guint8 * xserver_get_authentication_data (XServer *server)
gsize xserver_get_authentication_data_length (XServer *server)
void xserver_set_authority (XServer *server, XAuthority *authority)
XAuthorityxserver_get_authority (XServer *server)

Class Documentation

struct XServer

Definition at line 29 of file xserver.h.

Collaboration diagram for XServer:
Class Members
DisplayServer parent_instance
GObject parent_instance
XServerPrivate * priv

Define Documentation

#define IS_XSERVER (   obj)    (G_TYPE_CHECK_INSTANCE_TYPE ((obj), XSERVER_TYPE))

Definition at line 25 of file xserver.h.

#define XSERVER (   obj)    (G_TYPE_CHECK_INSTANCE_CAST ((obj), XSERVER_TYPE, XServer))

Definition at line 22 of file xserver.h.

#define XSERVER_CLASS (   klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), XSERVER_TYPE, XServerClass))

Definition at line 23 of file xserver.h.

#define XSERVER_GET_CLASS (   obj)    (G_TYPE_INSTANCE_GET_CLASS ((obj), XSERVER_TYPE, XServerClass))

Definition at line 24 of file xserver.h.

#define XSERVER_TYPE   (xserver_get_type())

Definition at line 21 of file xserver.h.


Typedef Documentation

typedef struct XServerPrivate

Definition at line 27 of file xserver.h.


Function Documentation

const gchar* xserver_get_address ( XServer server)

Definition at line 73 of file xserver.c.

{
    g_return_val_if_fail (server != NULL, NULL);

    if (!server->priv->address)
    {
        if (server->priv->hostname)
            server->priv->address = g_strdup_printf("%s:%d", server->priv->hostname, server->priv->number);
        else
            server->priv->address = g_strdup_printf(":%d", server->priv->number);
    }  

    return server->priv->address;
}

Here is the caller graph for this function:

const guint8* xserver_get_authentication_data ( XServer server)
const gchar* xserver_get_authentication_name ( XServer server)

Definition at line 102 of file xserver.c.

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

Here is the caller graph for this function:

guint xserver_get_display_number ( XServer server)

Definition at line 66 of file xserver.c.

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

Here is the caller graph for this function:

gchar* xserver_get_hostname ( XServer server)

Definition at line 50 of file xserver.c.

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

Here is the caller graph for this function:

GType xserver_get_type ( void  )
void xserver_set_authority ( XServer server,
XAuthority authority 
)

Definition at line 89 of file xserver.c.

{
    g_return_if_fail (server != NULL);

    if (server->priv->authority)
        g_object_unref (server->priv->authority);
    if (authority)
        server->priv->authority = g_object_ref (authority);
    else
        server->priv->authority = NULL;
}

Here is the caller graph for this function:

void xserver_set_display_number ( XServer server,
guint  number 
)

Definition at line 57 of file xserver.c.

{
    g_return_if_fail (server != NULL);
    server->priv->number = number;
    g_free (server->priv->address);
    server->priv->address = NULL;
}

Here is the caller graph for this function:

void xserver_set_hostname ( XServer server,
const gchar *  hostname 
)

Definition at line 40 of file xserver.c.

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

Here is the caller graph for this function: