libmalcontent: Add a SessionLimits interface for time-limited sessions
This is another extension interface on accountsservice which stores information about time and usage limits on the user session. Currently, only a ‘daily schedule’ limit (or no limit) is supported, but additional types and combinations of limits can be supported in future. The daily schedule limit allows using the computer between a certain start time and end time each day (the same each day). The user will be kicked out of their session when the end time is reached, if they haven’t already logged out. This includes the getters for the new data, polkit rules for accessing it, and some documentation. Changes to `malcontent-client` to support session limits, setters, and unit tests will all follow. Signed-off-by: Philip Withnall <withnall@endlessm.com>
This commit is contained in:
parent
9dcaa10253
commit
5e49cb7831
11 changed files with 678 additions and 8 deletions
|
@ -97,6 +97,7 @@ GQuark mct_manager_error_quark (void);
|
|||
#define MCT_MANAGER_ERROR mct_manager_error_quark ()
|
||||
|
||||
#include <libmalcontent/app-filter.h>
|
||||
#include <libmalcontent/session-limits.h>
|
||||
|
||||
#define MCT_TYPE_MANAGER mct_manager_get_type ()
|
||||
G_DECLARE_FINAL_TYPE (MctManager, mct_manager, MCT, MANAGER, GObject)
|
||||
|
@ -135,4 +136,19 @@ gboolean mct_manager_set_app_filter_finish (MctManager *self,
|
|||
GAsyncResult *result,
|
||||
GError **error);
|
||||
|
||||
MctSessionLimits *mct_manager_get_session_limits (MctManager *self,
|
||||
uid_t user_id,
|
||||
MctManagerGetValueFlags flags,
|
||||
GCancellable *cancellable,
|
||||
GError **error);
|
||||
void mct_manager_get_session_limits_async (MctManager *self,
|
||||
uid_t user_id,
|
||||
MctManagerGetValueFlags flags,
|
||||
GCancellable *cancellable,
|
||||
GAsyncReadyCallback callback,
|
||||
gpointer user_data);
|
||||
MctSessionLimits *mct_manager_get_session_limits_finish (MctManager *self,
|
||||
GAsyncResult *result,
|
||||
GError **error);
|
||||
|
||||
G_END_DECLS
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue