Back to index

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

Go to the source code of this file.

Classes

struct  LightDMUser
struct  LightDMUserClass
struct  LightDMUserList
struct  LightDMUserListClass

Defines

#define LIGHTDM_TYPE_USER_LIST   (lightdm_user_list_get_type())
#define LIGHTDM_USER_LIST(obj)   (G_TYPE_CHECK_INSTANCE_CAST ((obj), LIGHTDM_TYPE_USER_LIST, LightDMUserList));
#define LIGHTDM_USER_LIST_CLASS(klass)   (G_TYPE_CHECK_CLASS_CAST ((klass), LIGHTDM_TYPE_USER_LIST, LightDMUserListClass))
#define LIGHTDM_IS_USER_LIST(obj)   (G_TYPE_CHECK_INSTANCE_TYPE ((obj), LIGHTDM_TYPE_USER_LIST))
#define LIGHTDM_IS_USER_LIST_CLASS(klass)   (G_TYPE_CHECK_CLASS_TYPE ((klass), LIGHTDM_TYPE_USER_LIST))
#define LIGHTDM_USER_LIST_GET_CLASS(obj)   (G_TYPE_INSTANCE_GET_CLASS ((obj), LIGHTDM_TYPE_USER_LIST, LightDMUserListClass))
#define LIGHTDM_TYPE_USER   (lightdm_user_get_type())
#define LIGHTDM_USER(obj)   (G_TYPE_CHECK_INSTANCE_CAST ((obj), LIGHTDM_TYPE_USER, LightDMUser));
#define LIGHTDM_USER_CLASS(klass)   (G_TYPE_CHECK_CLASS_CAST ((klass), LIGHTDM_TYPE_USER, LightDMUserClass))
#define LIGHTDM_IS_USER(obj)   (G_TYPE_CHECK_INSTANCE_TYPE ((obj), LIGHTDM_TYPE_USER))
#define LIGHTDM_IS_USER_CLASS(klass)   (G_TYPE_CHECK_CLASS_TYPE ((klass), LIGHTDM_TYPE_USER))
#define LIGHTDM_USER_GET_CLASS(obj)   (G_TYPE_INSTANCE_GET_CLASS ((obj), LIGHTDM_TYPE_USER, LightDMUserClass))

Functions

GType lightdm_user_list_get_type (void)
GType lightdm_user_get_type (void)
LightDMUserListlightdm_user_list_get_instance (void)
 lightdm_user_list_get_instance:
gint lightdm_user_list_get_length (LightDMUserList *user_list)
 lightdm_user_list_get_length: : a LightDMUserList
LightDMUserlightdm_user_list_get_user_by_name (LightDMUserList *user_list, const gchar *username)
 lightdm_user_list_get_user_by_name: : A LightDMUserList : Name of user to get.
GList * lightdm_user_list_get_users (LightDMUserList *user_list)
 lightdm_user_list_get_users: : A LightDMUserList
const gchar * lightdm_user_get_name (LightDMUser *user)
 lightdm_user_get_name: : A LightDMUser
const gchar * lightdm_user_get_real_name (LightDMUser *user)
 lightdm_user_get_real_name: : A LightDMUser
const gchar * lightdm_user_get_display_name (LightDMUser *user)
 lightdm_user_get_display_name: : A LightDMUser
const gchar * lightdm_user_get_home_directory (LightDMUser *user)
 lightdm_user_get_home_directory: : A LightDMUser
const gchar * lightdm_user_get_image (LightDMUser *user)
 lightdm_user_get_image: : A LightDMUser
const gchar * lightdm_user_get_background (LightDMUser *user)
 lightdm_user_get_background: : A LightDMUser
const gchar * lightdm_user_get_language (LightDMUser *user)
 lightdm_user_get_language: : A LightDMUser
const gchar * lightdm_user_get_layout (LightDMUser *user)
 lightdm_user_get_layout: : A LightDMUser
const gchar *const * lightdm_user_get_layouts (LightDMUser *user)
 lightdm_user_get_layouts: : A LightDMUser
const gchar * lightdm_user_get_session (LightDMUser *user)
 lightdm_user_get_session: : A LightDMUser
gboolean lightdm_user_get_logged_in (LightDMUser *user)
 lightdm_user_get_logged_in: : A LightDMUser
gboolean lightdm_user_get_has_messages (LightDMUser *user)
 lightdm_user_get_has_messages: : A LightDMUser

Class Documentation

struct LightDMUser

Definition at line 33 of file user.h.

Class Members
GObject parent_instance
struct LightDMUserList

Definition at line 52 of file user.h.

Class Members
GObject parent_instance

Define Documentation

#define LIGHTDM_IS_USER (   obj)    (G_TYPE_CHECK_INSTANCE_TYPE ((obj), LIGHTDM_TYPE_USER))

Definition at line 29 of file user.h.

#define LIGHTDM_IS_USER_CLASS (   klass)    (G_TYPE_CHECK_CLASS_TYPE ((klass), LIGHTDM_TYPE_USER))

Definition at line 30 of file user.h.

#define LIGHTDM_IS_USER_LIST (   obj)    (G_TYPE_CHECK_INSTANCE_TYPE ((obj), LIGHTDM_TYPE_USER_LIST))

Definition at line 22 of file user.h.

#define LIGHTDM_IS_USER_LIST_CLASS (   klass)    (G_TYPE_CHECK_CLASS_TYPE ((klass), LIGHTDM_TYPE_USER_LIST))

Definition at line 23 of file user.h.

Definition at line 26 of file user.h.

Definition at line 19 of file user.h.

#define LIGHTDM_USER (   obj)    (G_TYPE_CHECK_INSTANCE_CAST ((obj), LIGHTDM_TYPE_USER, LightDMUser));

Definition at line 27 of file user.h.

#define LIGHTDM_USER_CLASS (   klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), LIGHTDM_TYPE_USER, LightDMUserClass))

Definition at line 28 of file user.h.

#define LIGHTDM_USER_GET_CLASS (   obj)    (G_TYPE_INSTANCE_GET_CLASS ((obj), LIGHTDM_TYPE_USER, LightDMUserClass))

Definition at line 31 of file user.h.

#define LIGHTDM_USER_LIST (   obj)    (G_TYPE_CHECK_INSTANCE_CAST ((obj), LIGHTDM_TYPE_USER_LIST, LightDMUserList));

Definition at line 20 of file user.h.

#define LIGHTDM_USER_LIST_CLASS (   klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), LIGHTDM_TYPE_USER_LIST, LightDMUserListClass))

Definition at line 21 of file user.h.

#define LIGHTDM_USER_LIST_GET_CLASS (   obj)    (G_TYPE_INSTANCE_GET_CLASS ((obj), LIGHTDM_TYPE_USER_LIST, LightDMUserListClass))

Definition at line 24 of file user.h.


Function Documentation

const gchar* lightdm_user_get_background ( LightDMUser user)

lightdm_user_get_background: : A LightDMUser

Get the background file path for a user.

Return value: The background file path for the given user or #NULL if no path

Definition at line 1110 of file user.c.

{
    g_return_val_if_fail (LIGHTDM_IS_USER (user), NULL);
    return GET_USER_PRIVATE (user)->background;
}

Here is the caller graph for this function:

const gchar* lightdm_user_get_display_name ( LightDMUser user)

lightdm_user_get_display_name: : A LightDMUser

Get the display name of a user.

Return value: The display name of the given user

Definition at line 1058 of file user.c.

{
    LightDMUserPrivate *priv;

    g_return_val_if_fail (LIGHTDM_IS_USER (user), NULL);

    priv = GET_USER_PRIVATE (user);
    if (strcmp (priv->real_name, ""))
        return priv->real_name;
    else
        return priv->name;
}

Here is the caller graph for this function:

lightdm_user_get_has_messages: : A LightDMUser

Check if a user has waiting messages.

Return value: #TRUE if the user has waiting messages.

Definition at line 1425 of file user.c.

{
    g_return_val_if_fail (LIGHTDM_IS_USER (user), FALSE);
    load_user_values (user);
    return GET_USER_PRIVATE (user)->has_messages;
}

Here is the call graph for this function:

Here is the caller graph for this function:

const gchar* lightdm_user_get_home_directory ( LightDMUser user)

lightdm_user_get_home_directory: : A LightDMUser

Get the home directory for a user.

Return value: The users home directory

Definition at line 1080 of file user.c.

{
    g_return_val_if_fail (LIGHTDM_IS_USER (user), NULL);
    return GET_USER_PRIVATE (user)->home_directory;
}

Here is the caller graph for this function:

const gchar* lightdm_user_get_image ( LightDMUser user)

lightdm_user_get_image: : A LightDMUser

Get the image URI for a user.

Return value: The image URI for the given user or #NULL if no URI

Definition at line 1095 of file user.c.

{
    g_return_val_if_fail (LIGHTDM_IS_USER (user), NULL);
    return GET_USER_PRIVATE (user)->image;
}

Here is the caller graph for this function:

const gchar* lightdm_user_get_language ( LightDMUser user)

lightdm_user_get_language: : A LightDMUser

Get the language for a user.

Return value: The language for the given user or #NULL if using system defaults.

Definition at line 1334 of file user.c.

{
    g_return_val_if_fail (LIGHTDM_IS_USER (user), NULL);
    load_user_values (user);
    return GET_USER_PRIVATE (user)->language;
}

Here is the call graph for this function:

Here is the caller graph for this function:

const gchar* lightdm_user_get_layout ( LightDMUser user)

lightdm_user_get_layout: : A LightDMUser

Get the keyboard layout for a user.

Return value: The keyboard layout for the given user or #NULL if using system defaults. Copy the value if you want to use it long term.

Definition at line 1350 of file user.c.

{
    g_return_val_if_fail (LIGHTDM_IS_USER (user), NULL);
    load_user_values (user);
    return GET_USER_PRIVATE (user)->layouts[0];
}

Here is the call graph for this function:

Here is the caller graph for this function:

const gchar* const* lightdm_user_get_layouts ( LightDMUser user)

lightdm_user_get_layouts: : A LightDMUser

Get the configured keyboard layouts for a user.

Return value: (transfer none): A NULL-terminated array of keyboard layouts for the given user. Copy the values if you want to use them long term.

Definition at line 1366 of file user.c.

{
    g_return_val_if_fail (LIGHTDM_IS_USER (user), NULL);
    load_user_values (user);
    return (const gchar * const *) GET_USER_PRIVATE (user)->layouts;
}

Here is the call graph for this function:

Here is the caller graph for this function:

lightdm_user_get_logged_in: : A LightDMUser

Check if a user is logged in.

Return value: #TRUE if the user is currently logged in.

Definition at line 1398 of file user.c.

{
    LightDMUserPrivate *priv = GET_USER_PRIVATE (user);
    LightDMUserListPrivate *list_priv = GET_LIST_PRIVATE (priv->user_list);
    GList *link;

    g_return_val_if_fail (LIGHTDM_IS_USER (user), FALSE);

    for (link = list_priv->sessions; link; link = link->next)
    {
        Session *session = link->data;
        if (strcmp (session->username, priv->name) == 0)
            return TRUE;
    }

    return FALSE;
}

Here is the caller graph for this function:

const gchar* lightdm_user_get_name ( LightDMUser user)

lightdm_user_get_name: : A LightDMUser

Get the name of a user.

Return value: The name of the given user

Definition at line 1028 of file user.c.

{
    g_return_val_if_fail (LIGHTDM_IS_USER (user), NULL);
    return GET_USER_PRIVATE (user)->name;
}

Here is the caller graph for this function:

const gchar* lightdm_user_get_real_name ( LightDMUser user)

lightdm_user_get_real_name: : A LightDMUser

Get the real name of a user.

Return value: The real name of the given user

Definition at line 1043 of file user.c.

{
    g_return_val_if_fail (LIGHTDM_IS_USER (user), NULL);
    return GET_USER_PRIVATE (user)->real_name;
}

Here is the caller graph for this function:

const gchar* lightdm_user_get_session ( LightDMUser user)

lightdm_user_get_session: : A LightDMUser

Get the session for a user.

Return value: The session for the given user or #NULL if using system defaults.

Definition at line 1382 of file user.c.

{
    g_return_val_if_fail (LIGHTDM_IS_USER (user), NULL);
    load_user_values (user);
    return GET_USER_PRIVATE (user)->session; 
}

Here is the call graph for this function:

Here is the caller graph for this function:

GType lightdm_user_get_type ( void  )

lightdm_user_list_get_instance:

Get the user list.

Return value: (transfer none): the LightDMUserList

Definition at line 142 of file user.c.

{
    if (!singleton)
        singleton = g_object_new (LIGHTDM_TYPE_USER_LIST, NULL);
    return singleton;
}

Here is the caller graph for this function:

lightdm_user_list_get_length: : a LightDMUserList

Return value: The number of users able to log in

Definition at line 856 of file user.c.

{
    g_return_val_if_fail (LIGHTDM_IS_USER_LIST (user_list), 0);
    update_users (user_list);
    return g_list_length (GET_LIST_PRIVATE (user_list)->users);
}

Here is the call graph for this function:

Here is the caller graph for this function:

GType lightdm_user_list_get_type ( void  )
LightDMUser* lightdm_user_list_get_user_by_name ( LightDMUserList user_list,
const gchar *  username 
)

lightdm_user_list_get_user_by_name: : A LightDMUserList : Name of user to get.

Get infomation about a given user or #NULL if this user doesn't exist.

Return value: (transfer none): A LightDMUser entry for the given user.

Definition at line 890 of file user.c.

{
    g_return_val_if_fail (LIGHTDM_IS_USER_LIST (user_list), NULL);
    g_return_val_if_fail (username != NULL, NULL);

    update_users (user_list);

    return get_user_by_name (user_list, username);
}

Here is the call graph for this function:

Here is the caller graph for this function:

lightdm_user_list_get_users: : A LightDMUserList

Get a list of users to present to the user. This list may be a subset of the available users and may be empty depending on the server configuration.

Return value: (element-type LightDMUser) (transfer none): A list of LightDMUser that should be presented to the user.

Definition at line 873 of file user.c.

{
    g_return_val_if_fail (LIGHTDM_IS_USER_LIST (user_list), NULL);
    update_users (user_list);
    return GET_LIST_PRIVATE (user_list)->users;
}

Here is the call graph for this function:

Here is the caller graph for this function: