~lightdm-team/lightdm/1.4

« back to all changes in this revision

Viewing changes to src/guest-manager.c

  • Committer: Robert Ancell
  • Date: 2011-06-03 03:57:48 UTC
  • Revision ID: robert.ancell@canonical.com-20110603035748-c1cg3zst82wpf2mm
Start laying foundations for guest accounts

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * Copyright (C) 2010-2011 Robert Ancell.
 
3
 * Author: Robert Ancell <robert.ancell@canonical.com>
 
4
 * 
 
5
 * This program is free software: you can redistribute it and/or modify it under
 
6
 * the terms of the GNU General Public License as published by the Free Software
 
7
 * Foundation, either version 3 of the License, or (at your option) any later
 
8
 * version. See http://www.gnu.org/copyleft/gpl.html the full text of the
 
9
 * license.
 
10
 */
 
11
 
 
12
#include "guest-manager.h"
 
13
 
 
14
struct GuestManagerPrivate
 
15
{
 
16
    /* Configuration */
 
17
    GKeyFile *config;
 
18
};
 
19
 
 
20
G_DEFINE_TYPE (GuestManager, guest_manager, G_TYPE_OBJECT);
 
21
 
 
22
GuestManager *
 
23
guest_manager_new (GKeyFile *config)
 
24
{
 
25
    GuestManager *self = g_object_new (GUEST_MANAGER_TYPE, NULL);
 
26
 
 
27
    self->priv->config = config;
 
28
 
 
29
    return self;
 
30
}
 
31
 
 
32
gboolean
 
33
guest_manager_get_is_enabled (GuestManager *manager)
 
34
{
 
35
    return FALSE;
 
36
}
 
37
 
 
38
gchar *
 
39
guest_manager_add_account (GuestManager *manager)
 
40
{
 
41
    return NULL;
 
42
}
 
43
 
 
44
void
 
45
guest_manager_remove_account (GuestManager *manager, const gchar *username)
 
46
{
 
47
}
 
48
 
 
49
static void
 
50
guest_manager_init (GuestManager *manager)
 
51
{
 
52
    manager->priv = G_TYPE_INSTANCE_GET_PRIVATE (manager, GUEST_MANAGER_TYPE, GuestManagerPrivate);  
 
53
}
 
54
 
 
55
static void
 
56
guest_manager_finalize (GObject *object)
 
57
{
 
58
    GuestManager *self = GUEST_MANAGER (object);
 
59
 
 
60
    G_OBJECT_CLASS (guest_manager_parent_class)->finalize (object);
 
61
}
 
62
 
 
63
static void
 
64
guest_manager_class_init (GuestManagerClass *klass)
 
65
{
 
66
    GObjectClass *object_class = G_OBJECT_CLASS (klass);
 
67
 
 
68
    object_class->finalize = guest_manager_finalize;
 
69
 
 
70
    g_type_class_add_private (klass, sizeof (GuestManagerPrivate));
 
71
}