Malcontent.Manager¶
- Subclasses:
None
Methods¶
- Inherited:
- Structs:
class |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Virtual Methods¶
- Inherited:
Properties¶
Name |
Type |
Flags |
Short Description |
---|---|---|---|
r/w/co |
A connection to the system bus. |
Signals¶
- Inherited:
Name |
Short Description |
---|---|
Emitted when the app filter stored for a user changes. |
Fields¶
- Inherited:
Class Details¶
- class Malcontent.Manager(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
Malcontent.Manager
is a top-level management object which is used to query and monitorMalcontent.AppFilters
for different users.New in version 0.3.0.
- classmethod new(connection)¶
- Parameters:
connection (
Gio.DBusConnection
) – aGio.DBusConnection
to use- Returns:
a new
Malcontent.Manager
- Return type:
Create a new
Malcontent.Manager
.New in version 0.3.0.
- get_app_filter(user_id, flags, cancellable)¶
- Parameters:
user_id (
int
) – ID of the user to query, typically coming from getuid()flags (
Malcontent.ManagerGetValueFlags
) – flags to affect the behaviour of the callcancellable (
Gio.Cancellable
orNone
) – aGio.Cancellable
, orNone
- Raises:
- Returns:
app filter for the queried user
- Return type:
Synchronous version of
Malcontent.Manager.get_app_filter_async
().New in version 0.3.0.
- get_app_filter_async(user_id, flags, cancellable, callback, *user_data)¶
- Parameters:
user_id (
int
) – ID of the user to query, typically coming from getuid()flags (
Malcontent.ManagerGetValueFlags
) – flags to affect the behaviour of the callcancellable (
Gio.Cancellable
orNone
) – aGio.Cancellable
, orNone
callback (
Gio.AsyncReadyCallback
orNone
) – aGio.AsyncReadyCallback
Asynchronously get a snapshot of the app filter settings for the given user_id.
On failure, an
Malcontent.ManagerError
, aGio.DBusError
or aGLib.IOError
will be returned.New in version 0.3.0.
- get_app_filter_finish(result)¶
- Parameters:
result (
Gio.AsyncResult
) – aGio.AsyncResult
- Raises:
- Returns:
app filter for the queried user
- Return type:
Finish an asynchronous operation to get the app filter for a user, started with
Malcontent.Manager.get_app_filter_async
().New in version 0.3.0.
- get_session_limits(user_id, flags, cancellable)¶
- Parameters:
user_id (
int
) – ID of the user to query, typically coming from getuid()flags (
Malcontent.ManagerGetValueFlags
) – flags to affect the behaviour of the callcancellable (
Gio.Cancellable
orNone
) – aGio.Cancellable
, orNone
- Raises:
- Returns:
session limits for the queried user
- Return type:
Synchronous version of
Malcontent.Manager.get_session_limits_async
().New in version 0.5.0.
- get_session_limits_async(user_id, flags, cancellable, callback, *user_data)¶
- Parameters:
user_id (
int
) – ID of the user to query, typically coming from getuid()flags (
Malcontent.ManagerGetValueFlags
) – flags to affect the behaviour of the callcancellable (
Gio.Cancellable
orNone
) – aGio.Cancellable
, orNone
callback (
Gio.AsyncReadyCallback
orNone
) – aGio.AsyncReadyCallback
Asynchronously get a snapshot of the session limit settings for the given user_id.
On failure, an
Malcontent.ManagerError
, aGio.DBusError
or aGLib.IOError
will be returned viaMalcontent.Manager.get_session_limits_finish
().New in version 0.5.0.
- get_session_limits_finish(result)¶
- Parameters:
result (
Gio.AsyncResult
) – aGio.AsyncResult
- Raises:
- Returns:
session limits for the queried user
- Return type:
Finish an asynchronous operation to get the session limits for a user, started with
Malcontent.Manager.get_session_limits_async
().New in version 0.5.0.
- set_app_filter(user_id, app_filter, flags, cancellable)¶
- Parameters:
user_id (
int
) – ID of the user to set the filter for, typically coming from getuid()app_filter (
Malcontent.AppFilter
) – the app filter to set for the userflags (
Malcontent.ManagerSetValueFlags
) – flags to affect the behaviour of the callcancellable (
Gio.Cancellable
orNone
) – aGio.Cancellable
, orNone
- Raises:
- Returns:
- Return type:
Synchronous version of
Malcontent.Manager.set_app_filter_async
().New in version 0.3.0.
- set_app_filter_async(user_id, app_filter, flags, cancellable, callback, *user_data)¶
- Parameters:
user_id (
int
) – ID of the user to set the filter for, typically coming from getuid()app_filter (
Malcontent.AppFilter
) – the app filter to set for the userflags (
Malcontent.ManagerSetValueFlags
) – flags to affect the behaviour of the callcancellable (
Gio.Cancellable
orNone
) – aGio.Cancellable
, orNone
callback (
Gio.AsyncReadyCallback
orNone
) – aGio.AsyncReadyCallback
Asynchronously set the app filter settings for the given user_id to the given app_filter instance. This will set all fields of the app filter.
On failure, an
Malcontent.ManagerError
, aGio.DBusError
or aGLib.IOError
will be returned. The user’s app filter settings will be left in an undefined state.New in version 0.3.0.
- set_app_filter_finish(result)¶
- Parameters:
result (
Gio.AsyncResult
) – aGio.AsyncResult
- Raises:
- Returns:
- Return type:
Finish an asynchronous operation to set the app filter for a user, started with
Malcontent.Manager.set_app_filter_async
().New in version 0.3.0.
- set_session_limits(user_id, session_limits, flags, cancellable)¶
- Parameters:
user_id (
int
) – ID of the user to set the limits for, typically coming from getuid()session_limits (
Malcontent.SessionLimits
) – the session limits to set for the userflags (
Malcontent.ManagerSetValueFlags
) – flags to affect the behaviour of the callcancellable (
Gio.Cancellable
orNone
) – aGio.Cancellable
, orNone
- Raises:
- Returns:
- Return type:
Synchronous version of
Malcontent.Manager.set_session_limits_async
().New in version 0.5.0.
- set_session_limits_async(user_id, session_limits, flags, cancellable, callback, *user_data)¶
- Parameters:
user_id (
int
) – ID of the user to set the limits for, typically coming from getuid()session_limits (
Malcontent.SessionLimits
) – the session limits to set for the userflags (
Malcontent.ManagerSetValueFlags
) – flags to affect the behaviour of the callcancellable (
Gio.Cancellable
orNone
) – aGio.Cancellable
, orNone
callback (
Gio.AsyncReadyCallback
orNone
) – aGio.AsyncReadyCallback
Asynchronously set the session limits settings for the given user_id to the given session_limits instance.
On failure, an
Malcontent.ManagerError
, aGio.DBusError
or aGLib.IOError
will be returned viaMalcontent.Manager.set_session_limits_finish
(). The user’s session limits settings will be left in an undefined state.New in version 0.5.0.
- set_session_limits_finish(result)¶
- Parameters:
result (
Gio.AsyncResult
) – aGio.AsyncResult
- Raises:
- Returns:
- Return type:
Finish an asynchronous operation to set the session limits for a user, started with
Malcontent.Manager.set_session_limits_async
().New in version 0.5.0.
Signal Details¶
- Malcontent.Manager.signals.app_filter_changed(manager, user_id)¶
- Signal Name:
app-filter-changed
- Flags:
- Parameters:
manager (
Malcontent.Manager
) – The object which received the signaluser_id (
int
) – UID of the user whose app filter has changed
Emitted when the app filter stored for a user changes. The new app filter for the user should be requested again from the
Malcontent.Manager
instance.New in version 0.3.0.
Property Details¶
- Malcontent.Manager.props.connection¶
- Name:
connection
- Type:
- Default Value:
- Flags:
A connection to the system bus, where accounts-service runs. It’s provided mostly for testing purposes, or to allow an existing connection to be re-used.
New in version 0.3.0.