UDisks.Swapspace

g GObject.GInterface GObject.GInterface UDisks.Swapspace UDisks.Swapspace GObject.GInterface->UDisks.Swapspace

Implementations:
 UDisks.SwapspaceProxy, UDisks.SwapspaceSkeleton

Methods

class interface_info ()
class override_properties (klass, property_id_begin)
  call_set_label (arg_label, arg_options, cancellable, callback, *user_data)
  call_set_label_finish (res)
  call_set_label_sync (arg_label, arg_options, cancellable)
  call_start (arg_options, cancellable, callback, *user_data)
  call_start_finish (res)
  call_start_sync (arg_options, cancellable)
  call_stop (arg_options, cancellable, callback, *user_data)
  call_stop_finish (res)
  call_stop_sync (arg_options, cancellable)
  complete_set_label (invocation)
  complete_start (invocation)
  complete_stop (invocation)

Virtual Methods

  do_handle_set_label (invocation, arg_label, arg_options)
  do_handle_start (invocation, arg_options)
  do_handle_stop (invocation, arg_options)

Properties

Name Type Flags Short Description
active bool r/w Active

Signals

Name Short Description
handle-set-label Signal emitted when a remote caller is invoking the SetLabel() D-Bus method.
handle-start Signal emitted when a remote caller is invoking the Start() D-Bus method.
handle-stop Signal emitted when a remote caller is invoking the Stop() D-Bus method.

Fields

None

Class Details

class UDisks.Swapspace
Bases:GObject.GInterface
Structure:UDisks.SwapspaceIface

Abstract interface type for the D-Bus interface org.freedesktop.UDisks2.Swapspace.

classmethod interface_info()[source]
Returns:A Gio.DBusInterfaceInfo. Do not free.
Return type:Gio.DBusInterfaceInfo

Gets a machine-readable description of the org.freedesktop.UDisks2.Swapspace D-Bus interface.

classmethod override_properties(klass, property_id_begin)[source]
Parameters:
Returns:

The last property id.

Return type:

int

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

call_set_label(arg_label, arg_options, cancellable, callback, *user_data)[source]
Parameters:

Asynchronously invokes the SetLabel() 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 UDisks.Swapspace.call_set_label_finish() to get the result of the operation.

See UDisks.Swapspace.call_set_label_sync() for the synchronous, blocking version of this method.

call_set_label_finish(res)[source]
Parameters:res (Gio.AsyncResult) – The Gio.AsyncResult obtained from the Gio.AsyncReadyCallback passed to UDisks.Swapspace.call_set_label().
Raises:GLib.Error
Returns:True if the call succeeded, False if error is set.
Return type:bool

Finishes an operation started with UDisks.Swapspace.call_set_label().

call_set_label_sync(arg_label, arg_options, cancellable)[source]
Parameters:
Raises:

GLib.Error

Returns:

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

Return type:

bool

Synchronously invokes the SetLabel() D-Bus method on self. The calling thread is blocked until a reply is received.

See UDisks.Swapspace.call_set_label() for the asynchronous version of this method.

call_start(arg_options, cancellable, callback, *user_data)[source]
Parameters:

Asynchronously invokes the Start() 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 UDisks.Swapspace.call_start_finish() to get the result of the operation.

See UDisks.Swapspace.call_start_sync() for the synchronous, blocking version of this method.

call_start_finish(res)[source]
Parameters:res (Gio.AsyncResult) – The Gio.AsyncResult obtained from the Gio.AsyncReadyCallback passed to UDisks.Swapspace.call_start().
Raises:GLib.Error
Returns:True if the call succeeded, False if error is set.
Return type:bool

Finishes an operation started with UDisks.Swapspace.call_start().

call_start_sync(arg_options, cancellable)[source]
Parameters:
Raises:

GLib.Error

Returns:

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

Return type:

bool

Synchronously invokes the Start() D-Bus method on self. The calling thread is blocked until a reply is received.

See UDisks.Swapspace.call_start() for the asynchronous version of this method.

call_stop(arg_options, cancellable, callback, *user_data)[source]
Parameters:

Asynchronously invokes the Stop() 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 UDisks.Swapspace.call_stop_finish() to get the result of the operation.

See UDisks.Swapspace.call_stop_sync() for the synchronous, blocking version of this method.

call_stop_finish(res)[source]
Parameters:res (Gio.AsyncResult) – The Gio.AsyncResult obtained from the Gio.AsyncReadyCallback passed to UDisks.Swapspace.call_stop().
Raises:GLib.Error
Returns:True if the call succeeded, False if error is set.
Return type:bool

Finishes an operation started with UDisks.Swapspace.call_stop().

call_stop_sync(arg_options, cancellable)[source]
Parameters:
Raises:

GLib.Error

Returns:

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

Return type:

bool

Synchronously invokes the Stop() D-Bus method on self. The calling thread is blocked until a reply is received.

See UDisks.Swapspace.call_stop() for the asynchronous version of this method.

complete_set_label(invocation)[source]
Parameters:invocation (Gio.DBusMethodInvocation) – A Gio.DBusMethodInvocation.

Helper function used in service implementations to finish handling invocations of the SetLabel() 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_start(invocation)[source]
Parameters:invocation (Gio.DBusMethodInvocation) – A Gio.DBusMethodInvocation.

Helper function used in service implementations to finish handling invocations of the Start() 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_stop(invocation)[source]
Parameters:invocation (Gio.DBusMethodInvocation) – A Gio.DBusMethodInvocation.

Helper function used in service implementations to finish handling invocations of the Stop() 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_set_label(invocation, arg_label, arg_options) virtual
Parameters:
Return type:

bool

do_handle_start(invocation, arg_options) virtual
Parameters:
Return type:

bool

do_handle_stop(invocation, arg_options) virtual
Parameters:
Return type:

bool

Signal Details

UDisks.Swapspace.signals.handle_set_label(swapspace, invocation, arg_label, arg_options)
Signal Name:

handle-set-label

Flags:

RUN_LAST

Parameters:
Returns:

True if the invocation was handled, False to let other signal handlers run.

Return type:

bool

Signal emitted when a remote caller is invoking the SetLabel() 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 UDisks.Swapspace.complete_set_label() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the Gio.DBusError.UNKNOWN_METHOD error is returned.

UDisks.Swapspace.signals.handle_start(swapspace, invocation, arg_options)
Signal Name:

handle-start

Flags:

RUN_LAST

Parameters:
Returns:

True if the invocation was handled, False to let other signal handlers run.

Return type:

bool

Signal emitted when a remote caller is invoking the Start() 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 UDisks.Swapspace.complete_start() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the Gio.DBusError.UNKNOWN_METHOD error is returned.

UDisks.Swapspace.signals.handle_stop(swapspace, invocation, arg_options)
Signal Name:

handle-stop

Flags:

RUN_LAST

Parameters:
Returns:

True if the invocation was handled, False to let other signal handlers run.

Return type:

bool

Signal emitted when a remote caller is invoking the Stop() 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 UDisks.Swapspace.complete_stop() or e.g. g_dbus_method_invocation_return_error() on it) and no order signal handlers will run. If no signal handler handles the invocation, the Gio.DBusError.UNKNOWN_METHOD error is returned.

Property Details

UDisks.Swapspace.props.active
Name:active
Type:bool
Default Value:False
Flags:READABLE, WRITABLE

Represents the D-Bus property “Active”.

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.