60 lines
2.2 KiB
C
60 lines
2.2 KiB
C
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*-
|
|
*
|
|
* Copyright © 2020 Endless Mobile, Inc.
|
|
*
|
|
* This library is free software; you can redistribute it and/or
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
* License as published by the Free Software Foundation; either
|
|
* version 2.1 of the License, or (at your option) any later version.
|
|
*
|
|
* This library is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
* Lesser General Public License for more details.
|
|
*
|
|
* You should have received a copy of the GNU Lesser General Public
|
|
* License along with this library; if not, write to the Free Software
|
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
|
*
|
|
* Authors:
|
|
* - Philip Withnall <withnall@endlessm.com>
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include <gio/gio.h>
|
|
#include <glib.h>
|
|
#include <glib-object.h>
|
|
|
|
G_BEGIN_DECLS
|
|
|
|
/**
|
|
* MctSessionHistory:
|
|
*
|
|
* TODO
|
|
* #MctSessionLimits is an opaque, immutable structure which contains a snapshot
|
|
* of the session limits settings for a user at a given time. This includes
|
|
* whether session limits are being enforced, and the limit policy — for
|
|
* example, the times of day when a user is allowed to use the computer.
|
|
*
|
|
* Typically, session limits settings can only be changed by the administrator,
|
|
* and are read-only for non-administrative users. The precise policy is set
|
|
* using polkit.
|
|
*
|
|
* Since: 0.5.0
|
|
*/
|
|
typedef struct _MctSessionHistory MctSessionHistory;
|
|
GType mct_session_history_get_type (void);
|
|
#define MCT_TYPE_SESSION_HISTORY mct_session_history_get_type ()
|
|
|
|
MctSessionHistory *mct_session_history_ref (MctSessionHistory *history);
|
|
void mct_session_history_unref (MctSessionHistory *history);
|
|
|
|
G_DEFINE_AUTOPTR_CLEANUP_FUNC (MctSessionHistory, mct_session_history_unref)
|
|
|
|
uid_t mct_session_history_get_user_id (MctSessionHistory *history);
|
|
GDateTime *mct_session_history_get_start (MctSessionHistory *history);
|
|
GDateTime *mct_session_history_get_end (MctSessionHistory *history);
|
|
|
|
G_END_DECLS
|