~lightdm-team/lightdm/1.4

« back to all changes in this revision

Viewing changes to libldmgreeter/session.c

  • Committer: robert.ancell at gmail
  • Date: 2010-06-27 05:16:48 UTC
  • Revision ID: robert.ancell@gmail.com-20100627051648-c1b2bq4fqeenclyw
Fix up documentation and tweak UI

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
    PROP_COMMENT
19
19
};
20
20
 
21
 
struct LdmSessionPrivate
 
21
struct _LdmSessionPrivate
22
22
{
23
23
    gchar *key;
24
24
    gchar *name;
27
27
 
28
28
G_DEFINE_TYPE (LdmSession, ldm_session, G_TYPE_OBJECT);
29
29
 
 
30
/**
 
31
 * ldm_session_new:
 
32
 * 
 
33
 * Create a new session.
 
34
 * @key: The unique key for this session
 
35
 * @name: The name of this session
 
36
 * @comment: The comment for this session
 
37
 * 
 
38
 * Return value: the new #LdmSession
 
39
 **/
30
40
LdmSession *
31
41
ldm_session_new (const gchar *key, const gchar *name, const gchar *comment)
32
42
{
33
43
    return g_object_new (LDM_TYPE_SESSION, "key", key, "name", name, "comment", comment, NULL);
34
44
}
35
45
 
36
 
const gchar *
37
 
ldm_session_get_key (LdmSession *user)
38
 
{
39
 
    return user->priv->key;
40
 
}
41
 
 
42
 
const gchar *
43
 
ldm_session_get_name (LdmSession *user)
44
 
{
45
 
    return user->priv->name;
46
 
}
47
 
 
48
 
const gchar *
49
 
ldm_session_get_comment (LdmSession *user)
50
 
{
51
 
    return user->priv->comment;
 
46
/**
 
47
 * ldm_session_get_key
 
48
 * @session: A #LdmSession
 
49
 * 
 
50
 * Get the key for a session
 
51
 * 
 
52
 * Return value: The session key
 
53
 **/
 
54
const gchar *
 
55
ldm_session_get_key (LdmSession *session)
 
56
{
 
57
    return session->priv->key;
 
58
}
 
59
 
 
60
/**
 
61
 * ldm_session_get_name
 
62
 * @session: A #LdmSession
 
63
 * 
 
64
 * Get the name for a session
 
65
 * 
 
66
 * Return value: The session name
 
67
 **/
 
68
const gchar *
 
69
ldm_session_get_name (LdmSession *session)
 
70
{
 
71
    return session->priv->name;
 
72
}
 
73
 
 
74
/**
 
75
 * ldm_session_get_comment
 
76
 * @session: A #LdmSession
 
77
 * 
 
78
 * Get the comment for a session
 
79
 * 
 
80
 * Return value: The session comment
 
81
 **/
 
82
const gchar *
 
83
ldm_session_get_comment (LdmSession *session)
 
84
{
 
85
    return session->priv->comment;
52
86
}
53
87
 
54
88
static void
55
 
ldm_session_init (LdmSession *user)
 
89
ldm_session_init (LdmSession *session)
56
90
{
57
 
    user->priv = G_TYPE_INSTANCE_GET_PRIVATE (user, LDM_TYPE_SESSION, LdmSessionPrivate);
 
91
    session->priv = G_TYPE_INSTANCE_GET_PRIVATE (session, LDM_TYPE_SESSION, LdmSessionPrivate);
58
92
}
59
93
 
60
94
static void