UDisks.BlockBcache

g GObject.GInterface GObject.GInterface UDisks.BlockBcache UDisks.BlockBcache GObject.GInterface->UDisks.BlockBcache

Implementations:
 UDisks.BlockBcacheProxy, UDisks.BlockBcacheSkeleton

Methods

class interface_info ()
class override_properties (klass, property_id_begin)
  call_bcache_destroy (arg_options, cancellable, callback, *user_data)
  call_bcache_destroy_finish (res)
  call_bcache_destroy_sync (arg_options, cancellable)
  call_set_mode (arg_mode, arg_options, cancellable, callback, *user_data)
  call_set_mode_finish (res)
  call_set_mode_sync (arg_mode, arg_options, cancellable)
  complete_bcache_destroy (invocation)
  complete_set_mode (invocation)

Virtual Methods

  do_handle_bcache_destroy (invocation, arg_options)
  do_handle_set_mode (invocation, arg_mode, arg_options)

Properties

Name Type Flags Short Description
block-size int r/w BlockSize
bypass-hits int r/w BypassHits
bypass-misses int r/w BypassMisses
cache-size int r/w CacheSize
cache-used int r/w CacheUsed
hits int r/w Hits
misses int r/w Misses
mode str r/w Mode
state str r/w State

Signals

Name Short Description
handle-bcache-destroy Signal emitted when a remote caller is invoking the BcacheDestroy() D-Bus method.
handle-set-mode Signal emitted when a remote caller is invoking the SetMode() D-Bus method.

Fields

None

Class Details

class UDisks.BlockBcache
Bases:GObject.GInterface
Structure:UDisks.BlockBcacheIface

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

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.Block.Bcache 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.BlockBcache interface for a concrete class. The properties are overridden in the order they are defined.

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

Asynchronously invokes the BcacheDestroy() 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.BlockBcache.call_bcache_destroy_finish() to get the result of the operation.

See UDisks.BlockBcache.call_bcache_destroy_sync() for the synchronous, blocking version of this method.

New in version 2.4.0.

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

Finishes an operation started with UDisks.BlockBcache.call_bcache_destroy().

New in version 2.4.0.

call_bcache_destroy_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 BcacheDestroy() D-Bus method on self. The calling thread is blocked until a reply is received.

See UDisks.BlockBcache.call_bcache_destroy() for the asynchronous version of this method.

New in version 2.4.0.

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

Asynchronously invokes the SetMode() 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.BlockBcache.call_set_mode_finish() to get the result of the operation.

See UDisks.BlockBcache.call_set_mode_sync() for the synchronous, blocking version of this method.

New in version 2.4.0.

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

Finishes an operation started with UDisks.BlockBcache.call_set_mode().

New in version 2.4.0.

call_set_mode_sync(arg_mode, 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 SetMode() D-Bus method on self. The calling thread is blocked until a reply is received.

See UDisks.BlockBcache.call_set_mode() for the asynchronous version of this method.

New in version 2.4.0.

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

Helper function used in service implementations to finish handling invocations of the BcacheDestroy() 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.

New in version 2.4.0.

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

Helper function used in service implementations to finish handling invocations of the SetMode() 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.

New in version 2.4.0.

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

bool

do_handle_set_mode(invocation, arg_mode, arg_options) virtual
Parameters:
Return type:

bool

Signal Details

UDisks.BlockBcache.signals.handle_bcache_destroy(block_bcache, invocation, arg_options)
Signal Name:

handle-bcache-destroy

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 BcacheDestroy() 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.BlockBcache.complete_bcache_destroy() 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.

New in version 2.4.0.

UDisks.BlockBcache.signals.handle_set_mode(block_bcache, invocation, arg_mode, arg_options)
Signal Name:

handle-set-mode

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 SetMode() 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.BlockBcache.complete_set_mode() 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.

New in version 2.4.0.

Property Details

UDisks.BlockBcache.props.block_size
Name:block-size
Type:int
Default Value:0
Flags:READABLE, WRITABLE

Represents the D-Bus property “BlockSize”.

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.

UDisks.BlockBcache.props.bypass_hits
Name:bypass-hits
Type:int
Default Value:0
Flags:READABLE, WRITABLE

Represents the D-Bus property “BypassHits”.

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.

UDisks.BlockBcache.props.bypass_misses
Name:bypass-misses
Type:int
Default Value:0
Flags:READABLE, WRITABLE

Represents the D-Bus property “BypassMisses”.

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.

UDisks.BlockBcache.props.cache_size
Name:cache-size
Type:int
Default Value:0
Flags:READABLE, WRITABLE

Represents the D-Bus property “CacheSize”.

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.

UDisks.BlockBcache.props.cache_used
Name:cache-used
Type:int
Default Value:0
Flags:READABLE, WRITABLE

Represents the D-Bus property “CacheUsed”.

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.

UDisks.BlockBcache.props.hits
Name:hits
Type:int
Default Value:0
Flags:READABLE, WRITABLE

Represents the D-Bus property “Hits”.

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.

UDisks.BlockBcache.props.misses
Name:misses
Type:int
Default Value:0
Flags:READABLE, WRITABLE

Represents the D-Bus property “Misses”.

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.

UDisks.BlockBcache.props.mode
Name:mode
Type:str
Default Value:None
Flags:READABLE, WRITABLE

Represents the D-Bus property “Mode”.

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.

UDisks.BlockBcache.props.state
Name:state
Type:str
Default Value:None
Flags:READABLE, WRITABLE

Represents the D-Bus property “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.