1 /* vi: set et sw=4 ts=4 cino=t0,(0: */
2 /* -*- Mode: C; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
4 * This file is part of tlm (Tiny Login Manager)
6 * Copyright (C) 2013-2014 Intel Corporation.
8 * Contact: Amarnath Valluri <amarnath.valluri@linux.intel.com>
9 * Jussi Laako <jussi.laako@linux.intel.com>
11 * This library is free software; you can redistribute it and/or
12 * modify it under the terms of the GNU Lesser General Public
13 * License as published by the Free Software Foundation; either
14 * version 2.1 of the License, or (at your option) any later version.
16 * This library is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19 * Lesser General Public License for more details.
21 * You should have received a copy of the GNU Lesser General Public
22 * License along with this library; if not, write to the Free Software
23 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
30 #include <glib-object.h>
31 #include <tlm-config.h>
32 #include "tlm-types.h"
36 #define TLM_TYPE_SEAT (tlm_seat_get_type())
37 #define TLM_SEAT(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), \
38 TLM_TYPE_SEAT, TlmSeat))
39 #define TLM_IS_SEAT(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), \
41 #define TLM_SEAT_CLASS(kls) (G_TYPE_CHECK_CLASS_CAST((kls), \
43 #define TLM_SEAT_IS_CLASS(kls) (G_TYPE_CHECK_CLASS_TYPE((kls), \
46 typedef struct _TlmSeatPrivate TlmSeatPrivate;
57 GObjectClass parent_class;
60 GType tlm_seat_get_type(void);
63 tlm_seat_new (TlmConfig *config,
68 tlm_seat_get_id (TlmSeat *seat);
70 /** Get the username who occupies the seat
71 * @return The name of the user who holds the seat (to be freed)
72 * @return NULL if nobody occupies the seat
75 tlm_seat_get_occupying_username (TlmSeat* seat);
78 tlm_seat_switch_user (TlmSeat *seat,
80 const gchar *username,
81 const gchar *password,
82 GHashTable *environment);
85 tlm_seat_create_session (TlmSeat *seat,
87 const gchar *username,
88 const gchar *password,
89 GHashTable *environment);
92 tlm_seat_terminate_session (TlmSeat *seat, gboolean stop);
96 #endif /* _TLM_SEAT_H */