Back to index

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

Go to the source code of this file.

Classes

struct  XDMCPServer
struct  XDMCPServerClass

Defines

#define XDMCP_SERVER_TYPE   (xdmcp_server_get_type())
#define XDMCP_SERVER(obj)   (G_TYPE_CHECK_INSTANCE_CAST ((obj), XDMCP_SERVER_TYPE, XDMCPServer));

Typedefs

typedef struct XDMCPServerPrivate

Functions

GType xdmcp_server_get_type (void)
XDMCPServerxdmcp_server_new (void)
void xdmcp_server_set_port (XDMCPServer *server, guint port)
guint xdmcp_server_get_port (XDMCPServer *server)
void xdmcp_server_set_hostname (XDMCPServer *server, const gchar *hostname)
const gchar * xdmcp_server_get_hostname (XDMCPServer *server)
void xdmcp_server_set_status (XDMCPServer *server, const gchar *status)
const gchar * xdmcp_server_get_status (XDMCPServer *server)
void xdmcp_server_set_key (XDMCPServer *server, const gchar *key)
gboolean xdmcp_server_start (XDMCPServer *server)

Class Documentation

struct XDMCPServer

Definition at line 26 of file xdmcp-server.h.

Collaboration diagram for XDMCPServer:
Class Members
GObject parent_instance
XDMCPServerPrivate * priv

Define Documentation

#define XDMCP_SERVER (   obj)    (G_TYPE_CHECK_INSTANCE_CAST ((obj), XDMCP_SERVER_TYPE, XDMCPServer));

Definition at line 22 of file xdmcp-server.h.

Definition at line 21 of file xdmcp-server.h.


Typedef Documentation

typedef struct XDMCPServerPrivate

Definition at line 24 of file xdmcp-server.h.


Function Documentation

const gchar* xdmcp_server_get_hostname ( XDMCPServer server)

Definition at line 87 of file xdmcp-server.c.

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

Definition at line 71 of file xdmcp-server.c.

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

Here is the caller graph for this function:

const gchar* xdmcp_server_get_status ( XDMCPServer server)

Definition at line 103 of file xdmcp-server.c.

{
    g_return_val_if_fail (server != NULL, NULL);
    return server->priv->status;
}
GType xdmcp_server_get_type ( void  )

Definition at line 58 of file xdmcp-server.c.

{
    return g_object_new (XDMCP_SERVER_TYPE, NULL);
}

Here is the caller graph for this function:

void xdmcp_server_set_hostname ( XDMCPServer server,
const gchar *  hostname 
)

Definition at line 78 of file xdmcp-server.c.

{
    g_return_if_fail (server != NULL);

    g_free (server->priv->hostname);
    server->priv->hostname = g_strdup (hostname);
}
void xdmcp_server_set_key ( XDMCPServer server,
const gchar *  key 
)

Definition at line 110 of file xdmcp-server.c.

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

Here is the caller graph for this function:

void xdmcp_server_set_port ( XDMCPServer server,
guint  port 
)

Definition at line 64 of file xdmcp-server.c.

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

Here is the caller graph for this function:

void xdmcp_server_set_status ( XDMCPServer server,
const gchar *  status 
)

Definition at line 94 of file xdmcp-server.c.

{
    g_return_if_fail (server != NULL);

    g_free (server->priv->status);
    server->priv->status = g_strdup (status);
}
gboolean xdmcp_server_start ( XDMCPServer server)

Definition at line 627 of file xdmcp-server.c.

{
    GSource *source;
    GError *error = NULL;

    g_return_val_if_fail (server != NULL, FALSE);
  
    server->priv->socket = open_udp_socket (G_SOCKET_FAMILY_IPV4, server->priv->port, &error);
    if (error)
        g_warning ("Failed to create IPv4 XDMCP socket: %s", error->message);
    g_clear_error (&error);
  
    if (server->priv->socket)
    {
        source = g_socket_create_source (server->priv->socket, G_IO_IN, NULL);
        g_source_set_callback (source, (GSourceFunc) read_cb, server, NULL);
        g_source_attach (source, NULL);
    }
    
    server->priv->socket6 = open_udp_socket (G_SOCKET_FAMILY_IPV6, server->priv->port, &error);
    if (error)
        g_warning ("Failed to create IPv6 XDMCP socket: %s", error->message);
    g_clear_error (&error);

    if (server->priv->socket6)
    {
        source = g_socket_create_source (server->priv->socket6, G_IO_IN, NULL);
        g_source_set_callback (source, (GSourceFunc) read_cb, server, NULL);
        g_source_attach (source, NULL);
    }

    if (!server->priv->socket && !server->priv->socket6)
        return FALSE;

    return TRUE;
}

Here is the call graph for this function:

Here is the caller graph for this function: