Malcontent.Manager

g GObject.Object GObject.Object Malcontent.Manager Malcontent.Manager GObject.Object->Malcontent.Manager

Subclasses:

None

Methods

Inherited:

GObject.Object (37)

Structs:

GObject.ObjectClass (5)

class

new (connection)

get_app_filter (user_id, flags, cancellable)

get_app_filter_async (user_id, flags, cancellable, callback, *user_data)

get_app_filter_finish (result)

get_session_limits (user_id, flags, cancellable)

get_session_limits_async (user_id, flags, cancellable, callback, *user_data)

get_session_limits_finish (result)

set_app_filter (user_id, app_filter, flags, cancellable)

set_app_filter_async (user_id, app_filter, flags, cancellable, callback, *user_data)

set_app_filter_finish (result)

set_session_limits (user_id, session_limits, flags, cancellable)

set_session_limits_async (user_id, session_limits, flags, cancellable, callback, *user_data)

set_session_limits_finish (result)

Virtual Methods

Inherited:

GObject.Object (7)

Properties

Name

Type

Flags

Short Description

connection

Gio.DBusConnection

r/w/co

A connection to the system bus.

Signals

Inherited:

GObject.Object (1)

Name

Short Description

app-filter-changed

Emitted when the app filter stored for a user changes.

Fields

Inherited:

GObject.Object (1)

Class Details

class Malcontent.Manager(**kwargs)
Bases:

GObject.Object

Abstract:

No

Structure:

Malcontent.ManagerClass

Malcontent.Manager is a top-level management object which is used to query and monitor Malcontent.AppFilters for different users.

New in version 0.3.0.

classmethod new(connection)
Parameters:

connection (Gio.DBusConnection) – a Gio.DBusConnection to use

Returns:

a new Malcontent.Manager

Return type:

Malcontent.Manager

Create a new Malcontent.Manager.

New in version 0.3.0.

get_app_filter(user_id, flags, cancellable)
Parameters:
Raises:

GLib.Error

Returns:

app filter for the queried user

Return type:

Malcontent.AppFilter

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:

Asynchronously get a snapshot of the app filter settings for the given user_id.

On failure, an Malcontent.ManagerError, a Gio.DBusError or a GLib.IOError will be returned.

New in version 0.3.0.

get_app_filter_finish(result)
Parameters:

result (Gio.AsyncResult) – a Gio.AsyncResult

Raises:

GLib.Error

Returns:

app filter for the queried user

Return type:

Malcontent.AppFilter

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:
Raises:

GLib.Error

Returns:

session limits for the queried user

Return type:

Malcontent.SessionLimits

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:

Asynchronously get a snapshot of the session limit settings for the given user_id.

On failure, an Malcontent.ManagerError, a Gio.DBusError or a GLib.IOError will be returned via Malcontent.Manager.get_session_limits_finish().

New in version 0.5.0.

get_session_limits_finish(result)
Parameters:

result (Gio.AsyncResult) – a Gio.AsyncResult

Raises:

GLib.Error

Returns:

session limits for the queried user

Return type:

Malcontent.SessionLimits

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:
Raises:

GLib.Error

Returns:

True on success, False otherwise

Return type:

bool

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:

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, a Gio.DBusError or a GLib.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) – a Gio.AsyncResult

Raises:

GLib.Error

Returns:

True on success, False otherwise

Return type:

bool

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:
Raises:

GLib.Error

Returns:

True on success, False otherwise

Return type:

bool

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:

Asynchronously set the session limits settings for the given user_id to the given session_limits instance.

On failure, an Malcontent.ManagerError, a Gio.DBusError or a GLib.IOError will be returned via Malcontent.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) – a Gio.AsyncResult

Raises:

GLib.Error

Returns:

True on success, False otherwise

Return type:

bool

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:

RUN_LAST

Parameters:
  • manager (Malcontent.Manager) – The object which received the signal

  • user_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:

Gio.DBusConnection

Default Value:

None

Flags:

READABLE, WRITABLE, CONSTRUCT_ONLY

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.