ModemManager.GdbusModemSar

g GObject.GInterface GObject.GInterface ModemManager.GdbusModemSar ModemManager.GdbusModemSar GObject.GInterface->ModemManager.GdbusModemSar

Implementations:

ModemManager.GdbusModemSarProxy, ModemManager.GdbusModemSarSkeleton

Methods

class

interface_info ()

class

override_properties (klass, property_id_begin)

call_enable (arg_enable, cancellable, callback, *user_data)

call_enable_finish (res)

call_enable_sync (arg_enable, cancellable)

call_set_power_level (arg_level, cancellable, callback, *user_data)

call_set_power_level_finish (res)

call_set_power_level_sync (arg_level, cancellable)

complete_enable (invocation)

complete_set_power_level (invocation)

Virtual Methods

do_handle_enable (invocation, arg_enable)

do_handle_set_power_level (invocation, arg_level)

Properties

Name

Type

Flags

Short Description

power-level

int

r/w

PowerLevel

state

bool

r/w

State

Signals

Name

Short Description

handle-enable

Signal emitted when a remote caller is invoking the ‘Enable() [gdbus-method-org-freedesktop-ModemManager1-Modem-Sar.Enable]’ D-Bus method.

handle-set-power-level

Signal emitted when a remote caller is invoking the ‘SetPowerLevel() [gdbus-method-org-freedesktop-ModemManager1-Modem-Sar.SetPowerLevel]’ D-Bus method.

Fields

None

Class Details

class ModemManager.GdbusModemSar
Bases:

GObject.GInterface

Structure:

ModemManager.GdbusModemSarIface

Abstract interface type for the D-Bus interface ‘org.freedesktop.ModemManager1.Modem.Sar [gdbus-interface-org-freedesktop-ModemManager1-Modem-Sar.top_of_page]’.

classmethod interface_info()
Returns:

A Gio.DBusInterfaceInfo. Do not free.

Return type:

Gio.DBusInterfaceInfo

Gets a machine-readable description of the ‘org.freedesktop.ModemManager1.Modem.Sar [gdbus-interface-org-freedesktop-ModemManager1-Modem-Sar.top_of_page]’ D-Bus interface.

classmethod override_properties(klass, property_id_begin)
Parameters:
Returns:

The last property id.

Return type:

int

Overrides all GObject.Object properties in the ModemManager.GdbusModemSar interface for a concrete class. The properties are overridden in the order they are defined.

call_enable(arg_enable, cancellable, callback, *user_data)
Parameters:

Asynchronously invokes the ‘Enable() [gdbus-method-org-freedesktop-ModemManager1-Modem-Sar.Enable]’ D-Bus method on self. When the operation is finished, callback will be invoked in the thread-default main loop of the thread you are calling this method from (see GLib.MainContext.push_thread_default()). You can then call ModemManager.GdbusModemSar.call_enable_finish() to get the result of the operation.

See ModemManager.GdbusModemSar.call_enable_sync() for the synchronous, blocking version of this method.

call_enable_finish(res)
Parameters:

res (Gio.AsyncResult) – The Gio.AsyncResult obtained from the Gio.AsyncReadyCallback passed to ModemManager.GdbusModemSar.call_enable().

Raises:

GLib.Error

Returns:

True if the call succeeded, False if error is set.

Return type:

bool

Finishes an operation started with ModemManager.GdbusModemSar.call_enable().

call_enable_sync(arg_enable, cancellable)
Parameters:
Raises:

GLib.Error

Returns:

True if the call succeeded, False if error is set.

Return type:

bool

Synchronously invokes the ‘Enable() [gdbus-method-org-freedesktop-ModemManager1-Modem-Sar.Enable]’ D-Bus method on self. The calling thread is blocked until a reply is received.

See ModemManager.GdbusModemSar.call_enable() for the asynchronous version of this method.

call_set_power_level(arg_level, cancellable, callback, *user_data)
Parameters:

Asynchronously invokes the ‘SetPowerLevel() [gdbus-method-org-freedesktop-ModemManager1-Modem-Sar.SetPowerLevel]’ D-Bus method on self. When the operation is finished, callback will be invoked in the thread-default main loop of the thread you are calling this method from (see GLib.MainContext.push_thread_default()). You can then call ModemManager.GdbusModemSar.call_set_power_level_finish() to get the result of the operation.

See ModemManager.GdbusModemSar.call_set_power_level_sync() for the synchronous, blocking version of this method.

call_set_power_level_finish(res)
Parameters:

res (Gio.AsyncResult) – The Gio.AsyncResult obtained from the Gio.AsyncReadyCallback passed to ModemManager.GdbusModemSar.call_set_power_level().

Raises:

GLib.Error

Returns:

True if the call succeeded, False if error is set.

Return type:

bool

Finishes an operation started with ModemManager.GdbusModemSar.call_set_power_level().

call_set_power_level_sync(arg_level, cancellable)
Parameters:
Raises:

GLib.Error

Returns:

True if the call succeeded, False if error is set.

Return type:

bool

Synchronously invokes the ‘SetPowerLevel() [gdbus-method-org-freedesktop-ModemManager1-Modem-Sar.SetPowerLevel]’ D-Bus method on self. The calling thread is blocked until a reply is received.

See ModemManager.GdbusModemSar.call_set_power_level() for the asynchronous version of this method.

complete_enable(invocation)
Parameters:

invocation (Gio.DBusMethodInvocation) – A Gio.DBusMethodInvocation.

Helper function used in service implementations to finish handling invocations of the ‘Enable() [gdbus-method-org-freedesktop-ModemManager1-Modem-Sar.Enable]’ D-Bus method. If you instead want to finish handling an invocation by returning an error, use g_dbus_method_invocation_return_error() or similar.

This method will free invocation, you cannot use it afterwards.

complete_set_power_level(invocation)
Parameters:

invocation (Gio.DBusMethodInvocation) – A Gio.DBusMethodInvocation.

Helper function used in service implementations to finish handling invocations of the ‘SetPowerLevel() [gdbus-method-org-freedesktop-ModemManager1-Modem-Sar.SetPowerLevel]’ D-Bus method. If you instead want to finish handling an invocation by returning an error, use g_dbus_method_invocation_return_error() or similar.

This method will free invocation, you cannot use it afterwards.

do_handle_enable(invocation, arg_enable) virtual
Parameters:
Return type:

bool

do_handle_set_power_level(invocation, arg_level) virtual
Parameters:
Return type:

bool

Signal Details

ModemManager.GdbusModemSar.signals.handle_enable(gdbus_modem_sar, invocation, arg_enable)
Signal Name:

handle-enable

Flags:

RUN_LAST

Parameters:
Returns:

Gio.DBUS_METHOD_INVOCATION_HANDLED or True if the invocation was handled, Gio.DBUS_METHOD_INVOCATION_UNHANDLED or False to let other signal handlers run.

Return type:

bool

Signal emitted when a remote caller is invoking the ‘Enable() [gdbus-method-org-freedesktop-ModemManager1-Modem-Sar.Enable]’ D-Bus method.

If a signal handler returns True, it means the signal handler will handle the invocation (e.g. take a reference to invocation and eventually call ModemManager.GdbusModemSar.complete_enable() or e.g. g_dbus_method_invocation_return_error() on it) and no other signal handlers will run. If no signal handler handles the invocation, the Gio.DBusError.UNKNOWN_METHOD error is returned.

ModemManager.GdbusModemSar.signals.handle_set_power_level(gdbus_modem_sar, invocation, arg_level)
Signal Name:

handle-set-power-level

Flags:

RUN_LAST

Parameters:
Returns:

Gio.DBUS_METHOD_INVOCATION_HANDLED or True if the invocation was handled, Gio.DBUS_METHOD_INVOCATION_UNHANDLED or False to let other signal handlers run.

Return type:

bool

Signal emitted when a remote caller is invoking the ‘SetPowerLevel() [gdbus-method-org-freedesktop-ModemManager1-Modem-Sar.SetPowerLevel]’ D-Bus method.

If a signal handler returns True, it means the signal handler will handle the invocation (e.g. take a reference to invocation and eventually call ModemManager.GdbusModemSar.complete_set_power_level() or e.g. g_dbus_method_invocation_return_error() on it) and no other signal handlers will run. If no signal handler handles the invocation, the Gio.DBusError.UNKNOWN_METHOD error is returned.

Property Details

ModemManager.GdbusModemSar.props.power_level
Name:

power-level

Type:

int

Default Value:

0

Flags:

READABLE, WRITABLE

Represents the D-Bus property ‘“PowerLevel” [gdbus-property-org-freedesktop-ModemManager1-Modem-Sar.PowerLevel]’.

Since the D-Bus property for this GObject.Object property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side.

ModemManager.GdbusModemSar.props.state
Name:

state

Type:

bool

Default Value:

False

Flags:

READABLE, WRITABLE

Represents the D-Bus property ‘“State” [gdbus-property-org-freedesktop-ModemManager1-Modem-Sar.State]’.

Since the D-Bus property for this GObject.Object property is readable but not writable, it is meaningful to read from it on both the client- and service-side. It is only meaningful, however, to write to it on the service-side.