## UDisksBlockZRAM

UDisksBlockZRAM — Generated C code for the org.freedesktop.UDisks2.Block.ZRAM D-Bus interface

## Functions

void | udisks_block_zram_proxy_new ()
UDisksBlockZRAM * | udisks_block_zram_proxy_new_finish ()
void | udisks_block_zram_proxy_new_for_bus ()
UDisksBlockZRAM * | udisks_block_zram_proxy_new_for_bus_finish ()
UDisksBlockZRAM * | udisks_block_zram_proxy_new_for_bus_sync ()
UDisksBlockZRAM * | udisks_block_zram_proxy_new_sync ()
gboolean | udisks_block_zram_get_active ()
void | udisks_block_zram_set_active ()
const gchar * | udisks_block_zram_get_comp_algorithm ()
gchar * | udisks_block_zram_dup_comp_algorithm ()
void | udisks_block_zram_set_comp_algorithm ()
guint64 | udisks_block_zram_get_compr_data_size ()
void | udisks_block_zram_set_compr_data_size ()
guint64 | udisks_block_zram_get_disksize ()
void | udisks_block_zram_set_disksize ()
guint64 | udisks_block_zram_get_invalid_io ()
void | udisks_block_zram_set_invalid_io ()
guint64 | udisks_block_zram_get_max_comp_streams ()
void | udisks_block_zram_set_max_comp_streams ()
guint64 | udisks_block_zram_get_mem_used_total ()
void | udisks_block_zram_set_mem_used_total ()
guint64 | udisks_block_zram_get_num_reads ()
void | udisks_block_zram_set_num_reads ()
guint64 | udisks_block_zram_get_num_writes ()
void | udisks_block_zram_set_num_writes ()
guint64 | udisks_block_zram_get_orig_data_size ()
void | udisks_block_zram_set_orig_data_size ()
guint64 | udisks_block_zram_get_zero_pages ()
void | udisks_block_zram_set_zero_pages ()
void | udisks_block_zram_call_activate ()
gboolean | udisks_block_zram_call_activate_finish ()
gboolean | udisks_block_zram_call_activate_sync ()
void | udisks_block_zram_call_activate_labeled ()
gboolean | udisks_block_zram_call_activate_labeled_finish ()
gboolean | udisks_block_zram_call_activate_labeled_sync ()
void | udisks_block_zram_call_deactivate ()
gboolean | udisks_block_zram_call_deactivate_finish ()
gboolean | udisks_block_zram_call_deactivate_sync ()
void | udisks_block_zram_call_refresh ()
gboolean | udisks_block_zram_call_refresh_finish ()
gboolean | udisks_block_zram_call_refresh_sync ()
UDisksBlockZRAM * | udisks_block_zram_skeleton_new ()
void | udisks_block_zram_complete_activate ()
void | udisks_block_zram_complete_activate_labeled ()
void | udisks_block_zram_complete_deactivate ()
void | udisks_block_zram_complete_refresh ()

## Properties

gboolean | active | Read / Write
gchar * | comp-algorithm | Read / Write
guint64 | compr-data-size | Read / Write
guint64 | disksize | Read / Write
guint64 | invalid-io | Read / Write
guint64 | max-comp-streams | Read / Write
guint64 | mem-used-total | Read / Write
guint64 | num-reads | Read / Write
guint64 | num-writes | Read / Write
guint64 | orig-data-size | Read / Write
guint64 | zero-pages | Read / Write

## Signals

gboolean | handle-activate | Run Last
gboolean | handle-activate-labeled | Run Last
gboolean | handle-deactivate | Run Last
gboolean | handle-refresh | Run Last

## Types and Values

| UDisksBlockZRAM
struct | UDisksBlockZRAMIface
struct | UDisksBlockZRAMProxy
struct | UDisksBlockZRAMProxyClass
struct | UDisksBlockZRAMSkeleton
struct | UDisksBlockZRAMSkeletonClass

## Object Hierarchy

        GInterface
        ╰── UDisksBlockZRAM
        GObject
        ├── GDBusInterfaceSkeleton
        │   ╰── UDisksBlockZRAMSkeleton
        ╰── GDBusProxy
            ╰── UDisksBlockZRAMProxy

## Prerequisites

UDisksBlockZRAM requires GObject.

## Implemented Interfaces

UDisksBlockZRAMProxy implements GDBusInterface, GInitable, GAsyncInitable and UDisksBlockZRAM.

UDisksBlockZRAMSkeleton implements GDBusInterface and UDisksBlockZRAM.

## Known Implementations

UDisksBlockZRAM is implemented by UDisksBlockZRAMProxy and UDisksBlockZRAMSkeleton.

## Description

This section contains code for working with the org.freedesktop.UDisks2.Block.ZRAM D-Bus interface in C.

## Functions

### udisks_block_zram_proxy_new ()

    void
    udisks_block_zram_proxy_new (GDBusConnection *connection,
                                 GDBusProxyFlags flags,
                                 const gchar *name,
                                 const gchar *object_path,
                                 GCancellable *cancellable,
                                 GAsyncReadyCallback callback,
                                 gpointer user_data);

Asynchronously creates a proxy for the D-Bus interface org.freedesktop.UDisks2.Block.ZRAM. See `g_dbus_proxy_new()` for more details.

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 `g_main_context_push_thread_default()`). You can then call `udisks_block_zram_proxy_new_finish()` to get the result of the operation.

See `udisks_block_zram_proxy_new_sync()` for the synchronous, blocking version of this constructor.

#### Parameters

connection | A GDBusConnection. |
flags | Flags from the GDBusProxyFlags enumeration. |
name | A bus name (well-known or unique) or `NULL` if `connection` is not a message bus connection. | [nullable]
object_path | An object path. |
cancellable | A GCancellable or `NULL`. | [nullable]
callback | A GAsyncReadyCallback to call when the request is satisfied. |
user_data | User data to pass to `callback` . |

Since: 2.3.0

### udisks_block_zram_proxy_new_finish ()

    UDisksBlockZRAM *
    udisks_block_zram_proxy_new_finish (GAsyncResult *res,
                                        GError **error);

Finishes an operation started with `udisks_block_zram_proxy_new()`.

#### Parameters

res | The GAsyncResult obtained from the GAsyncReadyCallback passed to `udisks_block_zram_proxy_new()`. |
error | Return location for error or `NULL` |

#### Returns

The constructed proxy object or `NULL` if `error` is set.

[transfer full][type UDisksBlockZRAMProxy]

Since: 2.3.0

### udisks_block_zram_proxy_new_for_bus ()

    void
    udisks_block_zram_proxy_new_for_bus (GBusType bus_type,
                                         GDBusProxyFlags flags,
                                         const gchar *name,
                                         const gchar *object_path,
                                         GCancellable *cancellable,
                                         GAsyncReadyCallback callback,
                                         gpointer user_data);

Like `udisks_block_zram_proxy_new()` but takes a GBusType instead of a GDBusConnection.

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 `g_main_context_push_thread_default()`). You can then call `udisks_block_zram_proxy_new_for_bus_finish()` to get the result of the operation.

See `udisks_block_zram_proxy_new_for_bus_sync()` for the synchronous, blocking version of this constructor.

#### Parameters

bus_type | A GBusType. |
flags | Flags from the GDBusProxyFlags enumeration. |
name | A bus name (well-known or unique). |
object_path | An object path. |
cancellable | A GCancellable or `NULL`. | [nullable]
callback | A GAsyncReadyCallback to call when the request is satisfied. |
user_data | User data to pass to `callback` . |

Since: 2.3.0

### udisks_block_zram_proxy_new_for_bus_finish ()

    UDisksBlockZRAM *
    udisks_block_zram_proxy_new_for_bus_finish
                                   (GAsyncResult *res,
                                    GError **error);

Finishes an operation started with `udisks_block_zram_proxy_new_for_bus()`.

#### Parameters

res | The GAsyncResult obtained from the GAsyncReadyCallback passed to `udisks_block_zram_proxy_new_for_bus()`. |
error | Return location for error or `NULL` |

#### Returns

The constructed proxy object or `NULL` if `error` is set.

[transfer full][type UDisksBlockZRAMProxy]

Since: 2.3.0

### udisks_block_zram_proxy_new_for_bus_sync ()

    UDisksBlockZRAM *
    udisks_block_zram_proxy_new_for_bus_sync
                                   (GBusType bus_type,
                                    GDBusProxyFlags flags,
                                    const gchar *name,
                                    const gchar *object_path,
                                    GCancellable *cancellable,
                                    GError **error);

Like `udisks_block_zram_proxy_new_sync()` but takes a GBusType instead of a GDBusConnection.

The calling thread is blocked until a reply is received.

See `udisks_block_zram_proxy_new_for_bus()` for the asynchronous version of this constructor.

#### Parameters

bus_type | A GBusType. |
flags | Flags from the GDBusProxyFlags enumeration. |
name | A bus name (well-known or unique). |
object_path | An object path. |
cancellable | A GCancellable or `NULL`. | [nullable]
error | Return location for error or `NULL` |

#### Returns

The constructed proxy object or `NULL` if `error` is set.

[transfer full][type UDisksBlockZRAMProxy]

Since: 2.3.0

### udisks_block_zram_proxy_new_sync ()

    UDisksBlockZRAM *
    udisks_block_zram_proxy_new_sync (GDBusConnection *connection,
                                      GDBusProxyFlags flags,
                                      const gchar *name,
                                      const gchar *object_path,
                                      GCancellable *cancellable,
                                      GError **error);

Synchronously creates a proxy for the D-Bus interface org.freedesktop.UDisks2.Block.ZRAM. See `g_dbus_proxy_new_sync()` for more details.

The calling thread is blocked until a reply is received.

See `udisks_block_zram_proxy_new()` for the asynchronous version of this constructor.

#### Parameters

connection | A GDBusConnection. |
flags | Flags from the GDBusProxyFlags enumeration. |
name | A bus name (well-known or unique) or `NULL` if `connection` is not a message bus connection. | [nullable]
object_path | An object path. |
cancellable | A GCancellable or `NULL`. | [nullable]
error | Return location for error or `NULL` |

#### Returns

The constructed proxy object or `NULL` if `error` is set.

[transfer full][type UDisksBlockZRAMProxy]

Since: 2.3.0

### udisks_block_zram_get_active ()

    gboolean
    udisks_block_zram_get_active (UDisksBlockZRAM *object);

Gets the value of the "Active" D-Bus property.

Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.

[skip]

#### Parameters

object | A UDisksBlockZRAM. |

#### Returns

The property value.

Since: 2.3.0

### udisks_block_zram_set_active ()

    void
    udisks_block_zram_set_active (UDisksBlockZRAM *object,
                                  gboolean value);

Sets the "Active" D-Bus property to `value` .

Since this D-Bus property is not writable, it is only meaningful to use this function on the service-side.

[skip]

#### Parameters

object | A UDisksBlockZRAM. |
value | The value to set. |

Since: 2.3.0

### udisks_block_zram_get_comp_algorithm ()

    const gchar *
    udisks_block_zram_get_comp_algorithm (UDisksBlockZRAM *object);

Gets the value of the "CompAlgorithm" D-Bus property.

Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.

The returned value is only valid until the property changes so on the client-side it is only safe to use this function on the thread where `object` was constructed. Use `udisks_block_zram_dup_comp_algorithm()` if on another thread.

[skip]

#### Parameters

object | A UDisksBlockZRAM. |

#### Returns

The property value or `NULL` if the property is not set. Do not free the returned value, it belongs to `object` .

[transfer none][nullable]

Since: 2.3.0

### udisks_block_zram_dup_comp_algorithm ()

    gchar *
    udisks_block_zram_dup_comp_algorithm (UDisksBlockZRAM *object);

Gets a copy of the "CompAlgorithm" D-Bus property.

Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.

[skip]

#### Parameters

object | A UDisksBlockZRAM. |

#### Returns

The property value or `NULL` if the property is not set. The returned value should be freed with `g_free()`.

[transfer full][nullable]

Since: 2.3.0

### udisks_block_zram_set_comp_algorithm ()

    void
    udisks_block_zram_set_comp_algorithm (UDisksBlockZRAM *object,
                                          const gchar *value);

Sets the "CompAlgorithm" D-Bus property to `value` .

Since this D-Bus property is not writable, it is only meaningful to use this function on the service-side.

[skip]

#### Parameters

object | A UDisksBlockZRAM. |
value | The value to set. |

Since: 2.3.0

### udisks_block_zram_get_compr_data_size ()

    guint64
    udisks_block_zram_get_compr_data_size (UDisksBlockZRAM *object);

Gets the value of the "ComprDataSize" D-Bus property.

Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.

[skip]

#### Parameters

object | A UDisksBlockZRAM. |

#### Returns

The property value.

Since: 2.3.0

### udisks_block_zram_set_compr_data_size ()

    void
    udisks_block_zram_set_compr_data_size (UDisksBlockZRAM *object,
                                           guint64 value);

Sets the "ComprDataSize" D-Bus property to `value` .

Since this D-Bus property is not writable, it is only meaningful to use this function on the service-side.

[skip]

#### Parameters

object | A UDisksBlockZRAM. |
value | The value to set. |

Since: 2.3.0

### udisks_block_zram_get_disksize ()

    guint64
    udisks_block_zram_get_disksize (UDisksBlockZRAM *object);

Gets the value of the "Disksize" D-Bus property.

Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.

[skip]

#### Parameters

object | A UDisksBlockZRAM. |

#### Returns

The property value.

Since: 2.3.0

### udisks_block_zram_set_disksize ()

    void
    udisks_block_zram_set_disksize (UDisksBlockZRAM *object,
                                    guint64 value);

Sets the "Disksize" D-Bus property to `value` .

Since this D-Bus property is not writable, it is only meaningful to use this function on the service-side.

[skip]

#### Parameters

object | A UDisksBlockZRAM. |
value | The value to set. |

Since: 2.3.0

### udisks_block_zram_get_invalid_io ()

    guint64
    udisks_block_zram_get_invalid_io (UDisksBlockZRAM *object);

Gets the value of the "InvalidIo" D-Bus property.

Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.

[skip]

#### Parameters

object | A UDisksBlockZRAM. |

#### Returns

The property value.

Since: 2.3.0

### udisks_block_zram_set_invalid_io ()

    void
    udisks_block_zram_set_invalid_io (UDisksBlockZRAM *object,
                                      guint64 value);

Sets the "InvalidIo" D-Bus property to `value` .

Since this D-Bus property is not writable, it is only meaningful to use this function on the service-side.

[skip]

#### Parameters

object | A UDisksBlockZRAM. |
value | The value to set. |

Since: 2.3.0

### udisks_block_zram_get_max_comp_streams ()

    guint64
    udisks_block_zram_get_max_comp_streams
                                   (UDisksBlockZRAM *object);

Gets the value of the "MaxCompStreams" D-Bus property.

Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.

[skip]

#### Parameters

object | A UDisksBlockZRAM. |

#### Returns

The property value.

Since: 2.3.0

### udisks_block_zram_set_max_comp_streams ()

    void
    udisks_block_zram_set_max_comp_streams
                                   (UDisksBlockZRAM *object,
                                    guint64 value);

Sets the "MaxCompStreams" D-Bus property to `value` .

Since this D-Bus property is not writable, it is only meaningful to use this function on the service-side.

[skip]

#### Parameters

object | A UDisksBlockZRAM. |
value | The value to set. |

Since: 2.3.0

### udisks_block_zram_get_mem_used_total ()

    guint64
    udisks_block_zram_get_mem_used_total (UDisksBlockZRAM *object);

Gets the value of the "MemUsedTotal" D-Bus property.

Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.

[skip]

#### Parameters

object | A UDisksBlockZRAM. |

#### Returns

The property value.

Since: 2.3.0

### udisks_block_zram_set_mem_used_total ()

    void
    udisks_block_zram_set_mem_used_total (UDisksBlockZRAM *object,
                                          guint64 value);

Sets the "MemUsedTotal" D-Bus property to `value` .

Since this D-Bus property is not writable, it is only meaningful to use this function on the service-side.

[skip]

#### Parameters

object | A UDisksBlockZRAM. |
value | The value to set. |

Since: 2.3.0

### udisks_block_zram_get_num_reads ()

    guint64
    udisks_block_zram_get_num_reads (UDisksBlockZRAM *object);

Gets the value of the "NumReads" D-Bus property.

Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.

[skip]

#### Parameters

object | A UDisksBlockZRAM. |

#### Returns

The property value.

Since: 2.3.0

### udisks_block_zram_set_num_reads ()

    void
    udisks_block_zram_set_num_reads (UDisksBlockZRAM *object,
                                     guint64 value);

Sets the "NumReads" D-Bus property to `value` .

Since this D-Bus property is not writable, it is only meaningful to use this function on the service-side.

[skip]

#### Parameters

object | A UDisksBlockZRAM. |
value | The value to set. |

Since: 2.3.0

### udisks_block_zram_get_num_writes ()

    guint64
    udisks_block_zram_get_num_writes (UDisksBlockZRAM *object);

Gets the value of the "NumWrites" D-Bus property.

Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.

[skip]

#### Parameters

object | A UDisksBlockZRAM. |

#### Returns

The property value.

Since: 2.3.0

### udisks_block_zram_set_num_writes ()

    void
    udisks_block_zram_set_num_writes (UDisksBlockZRAM *object,
                                      guint64 value);

Sets the "NumWrites" D-Bus property to `value` .

Since this D-Bus property is not writable, it is only meaningful to use this function on the service-side.

[skip]

#### Parameters

object | A UDisksBlockZRAM. |
value | The value to set. |

Since: 2.3.0

### udisks_block_zram_get_orig_data_size ()

    guint64
    udisks_block_zram_get_orig_data_size (UDisksBlockZRAM *object);

Gets the value of the "OrigDataSize" D-Bus property.

Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.

[skip]

#### Parameters

object | A UDisksBlockZRAM. |

#### Returns

The property value.

Since: 2.3.0

### udisks_block_zram_set_orig_data_size ()

    void
    udisks_block_zram_set_orig_data_size (UDisksBlockZRAM *object,
                                          guint64 value);

Sets the "OrigDataSize" D-Bus property to `value` .

Since this D-Bus property is not writable, it is only meaningful to use this function on the service-side.

[skip]

#### Parameters

object | A UDisksBlockZRAM. |
value | The value to set. |

Since: 2.3.0

### udisks_block_zram_get_zero_pages ()

    guint64
    udisks_block_zram_get_zero_pages (UDisksBlockZRAM *object);

Gets the value of the "ZeroPages" D-Bus property.

Since this D-Bus property is readable, it is meaningful to use this function on both the client- and service-side.

[skip]

#### Parameters

object | A UDisksBlockZRAM. |

#### Returns

The property value.

Since: 2.3.0

### udisks_block_zram_set_zero_pages ()

    void
    udisks_block_zram_set_zero_pages (UDisksBlockZRAM *object,
                                      guint64 value);

Sets the "ZeroPages" D-Bus property to `value` .

Since this D-Bus property is not writable, it is only meaningful to use this function on the service-side.

[skip]

#### Parameters

object | A UDisksBlockZRAM. |
value | The value to set. |

Since: 2.3.0

### udisks_block_zram_call_activate ()

    void
    udisks_block_zram_call_activate (UDisksBlockZRAM *proxy,
                                     gint arg_priority,
                                     GVariant *arg_options,
                                     GCancellable *cancellable,
                                     GAsyncReadyCallback callback,
                                     gpointer user_data);

Asynchronously invokes the `Activate()` D-Bus method on `proxy` . 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 `g_main_context_push_thread_default()`). You can then call `udisks_block_zram_call_activate_finish()` to get the result of the operation.

See `udisks_block_zram_call_activate_sync()` for the synchronous, blocking version of this method.

#### Parameters

proxy | A UDisksBlockZRAMProxy. |
arg_priority | Argument to pass with the method invocation. |
arg_options | Argument to pass with the method invocation. |
cancellable | A GCancellable or `NULL`. | [nullable]
callback | A GAsyncReadyCallback to call when the request is satisfied or `NULL`. |
user_data | User data to pass to `callback` . |

Since: 2.3.0

### udisks_block_zram_call_activate_finish ()

    gboolean
    udisks_block_zram_call_activate_finish
                                   (UDisksBlockZRAM *proxy,
                                    GAsyncResult *res,
                                    GError **error);

Finishes an operation started with `udisks_block_zram_call_activate()`.

#### Parameters

proxy | A UDisksBlockZRAMProxy. |
res | The GAsyncResult obtained from the GAsyncReadyCallback passed to `udisks_block_zram_call_activate()`. |
error | Return location for error or `NULL`. |

#### Returns

`TRUE` if the call succeded, `FALSE` if `error` is set.

[skip]

Since: 2.3.0

### udisks_block_zram_call_activate_sync ()

    gboolean
    udisks_block_zram_call_activate_sync (UDisksBlockZRAM *proxy,
                                          gint arg_priority,
                                          GVariant *arg_options,
                                          GCancellable *cancellable,
                                          GError **error);

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

See `udisks_block_zram_call_activate()` for the asynchronous version of this method.

#### Parameters

proxy | A UDisksBlockZRAMProxy. |
arg_priority | Argument to pass with the method invocation. |
arg_options | Argument to pass with the method invocation. |
cancellable | A GCancellable or `NULL`. | [nullable]
error | Return location for error or `NULL`. |

#### Returns

`TRUE` if the call succeded, `FALSE` if `error` is set.

[skip]

Since: 2.3.0

### udisks_block_zram_call_activate_labeled ()

    void
    udisks_block_zram_call_activate_labeled
                                   (UDisksBlockZRAM *proxy,
                                    gint arg_priority,
                                    const gchar *arg_label,
                                    GVariant *arg_options,
                                    GCancellable *cancellable,
                                    GAsyncReadyCallback callback,
                                    gpointer user_data);

Asynchronously invokes the `ActivateLabeled()` D-Bus method on `proxy` . 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 `g_main_context_push_thread_default()`). You can then call `udisks_block_zram_call_activate_labeled_finish()` to get the result of the operation.

See `udisks_block_zram_call_activate_labeled_sync()` for the synchronous, blocking version of this method.

#### Parameters

proxy | A UDisksBlockZRAMProxy. |
arg_priority | Argument to pass with the method invocation. |
arg_label | Argument to pass with the method invocation. |
arg_options | Argument to pass with the method invocation. |
cancellable | A GCancellable or `NULL`. | [nullable]
callback | A GAsyncReadyCallback to call when the request is satisfied or `NULL`. |
user_data | User data to pass to `callback` . |

Since: 2.3.0

### udisks_block_zram_call_activate_labeled_finish ()

    gboolean
    udisks_block_zram_call_activate_labeled_finish
                                   (UDisksBlockZRAM *proxy,
                                    GAsyncResult *res,
                                    GError **error);

Finishes an operation started with `udisks_block_zram_call_activate_labeled()`.

#### Parameters

proxy | A UDisksBlockZRAMProxy. |
res | The GAsyncResult obtained from the GAsyncReadyCallback passed to `udisks_block_zram_call_activate_labeled()`. |
error | Return location for error or `NULL`. |

#### Returns

`TRUE` if the call succeded, `FALSE` if `error` is set.

[skip]

Since: 2.3.0

### udisks_block_zram_call_activate_labeled_sync ()

    gboolean
    udisks_block_zram_call_activate_labeled_sync
                                   (UDisksBlockZRAM *proxy,
                                    gint arg_priority,
                                    const gchar *arg_label,
                                    GVariant *arg_options,
                                    GCancellable *cancellable,
                                    GError **error);

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

See `udisks_block_zram_call_activate_labeled()` for the asynchronous version of this method.

#### Parameters

proxy | A UDisksBlockZRAMProxy. |
arg_priority | Argument to pass with the method invocation. |
arg_label | Argument to pass with the method invocation. |
arg_options | Argument to pass with the method invocation. |
cancellable | A GCancellable or `NULL`. | [nullable]
error | Return location for error or `NULL`. |

#### Returns

`TRUE` if the call succeded, `FALSE` if `error` is set.

[skip]

Since: 2.3.0

### udisks_block_zram_call_deactivate ()

    void
    udisks_block_zram_call_deactivate (UDisksBlockZRAM *proxy,
                                       GVariant *arg_options,
                                       GCancellable *cancellable,
                                       GAsyncReadyCallback callback,
                                       gpointer user_data);

Asynchronously invokes the `Deactivate()` D-Bus method on `proxy` . 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 `g_main_context_push_thread_default()`). You can then call `udisks_block_zram_call_deactivate_finish()` to get the result of the operation.

See `udisks_block_zram_call_deactivate_sync()` for the synchronous, blocking version of this method.

#### Parameters

proxy | A UDisksBlockZRAMProxy. |
arg_options | Argument to pass with the method invocation. |
cancellable | A GCancellable or `NULL`. | [nullable]
callback | A GAsyncReadyCallback to call when the request is satisfied or `NULL`. |
user_data | User data to pass to `callback` . |

Since: 2.3.0

### udisks_block_zram_call_deactivate_finish ()

    gboolean
    udisks_block_zram_call_deactivate_finish
                                   (UDisksBlockZRAM *proxy,
                                    GAsyncResult *res,
                                    GError **error);

Finishes an operation started with `udisks_block_zram_call_deactivate()`.

#### Parameters

proxy | A UDisksBlockZRAMProxy. |
res | The GAsyncResult obtained from the GAsyncReadyCallback passed to `udisks_block_zram_call_deactivate()`. |
error | Return location for error or `NULL`. |

#### Returns

`TRUE` if the call succeded, `FALSE` if `error` is set.

[skip]

Since: 2.3.0

### udisks_block_zram_call_deactivate_sync ()

    gboolean
    udisks_block_zram_call_deactivate_sync
                                   (UDisksBlockZRAM *proxy,
                                    GVariant *arg_options,
                                    GCancellable *cancellable,
                                    GError **error);

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

See `udisks_block_zram_call_deactivate()` for the asynchronous version of this method.

#### Parameters

proxy | A UDisksBlockZRAMProxy. |
arg_options | Argument to pass with the method invocation. |
cancellable | A GCancellable or `NULL`. | [nullable]
error | Return location for error or `NULL`. |

#### Returns

`TRUE` if the call succeded, `FALSE` if `error` is set.

[skip]

Since: 2.3.0

### udisks_block_zram_call_refresh ()

    void
    udisks_block_zram_call_refresh (UDisksBlockZRAM *proxy,
                                    GVariant *arg_options,
                                    GCancellable *cancellable,
                                    GAsyncReadyCallback callback,
                                    gpointer user_data);

Asynchronously invokes the `Refresh()` D-Bus method on `proxy` . 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 `g_main_context_push_thread_default()`). You can then call `udisks_block_zram_call_refresh_finish()` to get the result of the operation.

See `udisks_block_zram_call_refresh_sync()` for the synchronous, blocking version of this method.

#### Parameters

proxy | A UDisksBlockZRAMProxy. |
arg_options | Argument to pass with the method invocation. |
cancellable | A GCancellable or `NULL`. | [nullable]
callback | A GAsyncReadyCallback to call when the request is satisfied or `NULL`. |
user_data | User data to pass to `callback` . |

Since: 2.3.0

### udisks_block_zram_call_refresh_finish ()

    gboolean
    udisks_block_zram_call_refresh_finish (UDisksBlockZRAM *proxy,
                                           GAsyncResult *res,
                                           GError **error);

Finishes an operation started with `udisks_block_zram_call_refresh()`.

#### Parameters

proxy | A UDisksBlockZRAMProxy. |
res | The GAsyncResult obtained from the GAsyncReadyCallback passed to `udisks_block_zram_call_refresh()`. |
error | Return location for error or `NULL`. |

#### Returns

`TRUE` if the call succeded, `FALSE` if `error` is set.

[skip]

Since: 2.3.0

### udisks_block_zram_call_refresh_sync ()

    gboolean
    udisks_block_zram_call_refresh_sync (UDisksBlockZRAM *proxy,
                                         GVariant *arg_options,
                                         GCancellable *cancellable,
                                         GError **error);

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

See `udisks_block_zram_call_refresh()` for the asynchronous version of this method.

#### Parameters

proxy | A UDisksBlockZRAMProxy. |
arg_options | Argument to pass with the method invocation. |
cancellable | A GCancellable or `NULL`. | [nullable]
error | Return location for error or `NULL`. |

#### Returns

`TRUE` if the call succeded, `FALSE` if `error` is set.

[skip]

Since: 2.3.0

### udisks_block_zram_skeleton_new ()

    UDisksBlockZRAM *
    udisks_block_zram_skeleton_new (void);

Creates a skeleton object for the D-Bus interface org.freedesktop.UDisks2.Block.ZRAM.

#### Returns

The skeleton object.

[transfer full][type UDisksBlockZRAMSkeleton]

Since: 2.3.0

### udisks_block_zram_complete_activate ()

    void
    udisks_block_zram_complete_activate (UDisksBlockZRAM *object,
                                         GDBusMethodInvocation *invocation);

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

#### Parameters

object | A UDisksBlockZRAM. |
invocation | A GDBusMethodInvocation. | [transfer full]

Since: 2.3.0

### udisks_block_zram_complete_activate_labeled ()

    void
    udisks_block_zram_complete_activate_labeled
                                   (UDisksBlockZRAM *object,
                                    GDBusMethodInvocation *invocation);

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

#### Parameters

object | A UDisksBlockZRAM. |
invocation | A GDBusMethodInvocation. | [transfer full]

Since: 2.3.0

### udisks_block_zram_complete_deactivate ()

    void
    udisks_block_zram_complete_deactivate (UDisksBlockZRAM *object,
                                           GDBusMethodInvocation *invocation);

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

#### Parameters

object | A UDisksBlockZRAM. |
invocation | A GDBusMethodInvocation. | [transfer full]

Since: 2.3.0

### udisks_block_zram_complete_refresh ()

    void
    udisks_block_zram_complete_refresh (UDisksBlockZRAM *object,
                                        GDBusMethodInvocation *invocation);

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

#### Parameters

object | A UDisksBlockZRAM. |
invocation | A GDBusMethodInvocation. | [transfer full]

Since: 2.3.0

## Types and Values

### UDisksBlockZRAM

    typedef struct _UDisksBlockZRAM UDisksBlockZRAM;

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

Since: 2.3.0

### struct UDisksBlockZRAMIface

    struct UDisksBlockZRAMIface {
      GTypeInterface parent_iface;

      gboolean (*handle_activate) (
        UDisksBlockZRAM *object,
        GDBusMethodInvocation *invocation,
        gint arg_priority,
        GVariant *arg_options);

      gboolean (*handle_activate_labeled) (
        UDisksBlockZRAM *object,
        GDBusMethodInvocation *invocation,
        gint arg_priority,
        const gchar *arg_label,
        GVariant *arg_options);

      gboolean (*handle_deactivate) (
        UDisksBlockZRAM *object,
        GDBusMethodInvocation *invocation,
        GVariant *arg_options);

      gboolean (*handle_refresh) (
        UDisksBlockZRAM *object,
        GDBusMethodInvocation *invocation,
        GVariant *arg_options);

      gboolean  (*get_active) (UDisksBlockZRAM *object);

      const gchar * (*get_comp_algorithm) (UDisksBlockZRAM *object);

      guint64  (*get_compr_data_size) (UDisksBlockZRAM *object);

      guint64  (*get_disksize) (UDisksBlockZRAM *object);

      guint64  (*get_invalid_io) (UDisksBlockZRAM *object);

      guint64  (*get_max_comp_streams) (UDisksBlockZRAM *object);

      guint64  (*get_mem_used_total) (UDisksBlockZRAM *object);

      guint64  (*get_num_reads) (UDisksBlockZRAM *object);

      guint64  (*get_num_writes) (UDisksBlockZRAM *object);

      guint64  (*get_orig_data_size) (UDisksBlockZRAM *object);

      guint64  (*get_zero_pages) (UDisksBlockZRAM *object);
    };

Virtual table for the D-Bus interface org.freedesktop.UDisks2.Block.ZRAM.

#### Members

GTypeInterface `parent_iface`; | The parent interface. |
`handle_activate` () | Handler for the “handle-activate” signal. |
`handle_activate_labeled` () | Handler for the “handle-activate-labeled” signal. |
`handle_deactivate` () | Handler for the “handle-deactivate” signal. |
`handle_refresh` () | Handler for the “handle-refresh” signal. |
`get_active` () | Getter for the “active” property. |
`get_comp_algorithm` () | Getter for the “comp-algorithm” property. |
`get_compr_data_size` () | Getter for the “compr-data-size” property. |
`get_disksize` () | Getter for the “disksize” property. |
`get_invalid_io` () | Getter for the “invalid-io” property. |
`get_max_comp_streams` () | Getter for the “max-comp-streams” property. |
`get_mem_used_total` () | Getter for the “mem-used-total” property. |
`get_num_reads` () | Getter for the “num-reads” property. |
`get_num_writes` () | Getter for the “num-writes” property. |
`get_orig_data_size` () | Getter for the “orig-data-size” property. |
`get_zero_pages` () | Getter for the “zero-pages” property. |

Since: 2.3.0

### struct UDisksBlockZRAMProxy

    struct UDisksBlockZRAMProxy;

The UDisksBlockZRAMProxy structure contains only private data and should only be accessed using the provided API.

Since: 2.3.0

### struct UDisksBlockZRAMProxyClass

    struct UDisksBlockZRAMProxyClass {
      GDBusProxyClass parent_class;
    };

Class structure for UDisksBlockZRAMProxy.

#### Members

Since: 2.3.0

### struct UDisksBlockZRAMSkeleton

    struct UDisksBlockZRAMSkeleton;

The UDisksBlockZRAMSkeleton structure contains only private data and should only be accessed using the provided API.

Since: 2.3.0

### struct UDisksBlockZRAMSkeletonClass

    struct UDisksBlockZRAMSkeletonClass {
      GDBusInterfaceSkeletonClass parent_class;
    };

Class structure for UDisksBlockZRAMSkeleton.

#### Members

Since: 2.3.0

## Property Details

### The `“active”` property

      “active”                   gboolean

Represents the D-Bus property "Active".

Since the D-Bus property for this GObject 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.

Owner: UDisksBlockZRAM

Flags: Read / Write

Default value: FALSE

Since: 2.3.0

### The `“comp-algorithm”` property

      “comp-algorithm”           gchar *

Represents the D-Bus property "CompAlgorithm".

Since the D-Bus property for this GObject 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.

Owner: UDisksBlockZRAM

Flags: Read / Write

Default value: NULL

Since: 2.3.0

### The `“compr-data-size”` property

      “compr-data-size”          guint64

Represents the D-Bus property "ComprDataSize".

Since the D-Bus property for this GObject 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.

Owner: UDisksBlockZRAM

Flags: Read / Write

Default value: 0

Since: 2.3.0

### The `“disksize”` property

      “disksize”                 guint64

Represents the D-Bus property "Disksize".

Since the D-Bus property for this GObject 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.

Owner: UDisksBlockZRAM

Flags: Read / Write

Default value: 0

Since: 2.3.0

### The `“invalid-io”` property

      “invalid-io”               guint64

Represents the D-Bus property "InvalidIo".

Since the D-Bus property for this GObject 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.

Owner: UDisksBlockZRAM

Flags: Read / Write

Default value: 0

Since: 2.3.0

### The `“max-comp-streams”` property

      “max-comp-streams”         guint64

Represents the D-Bus property "MaxCompStreams".

Since the D-Bus property for this GObject 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.

Owner: UDisksBlockZRAM

Flags: Read / Write

Default value: 0

Since: 2.3.0

### The `“mem-used-total”` property

      “mem-used-total”           guint64

Represents the D-Bus property "MemUsedTotal".

Since the D-Bus property for this GObject 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.

Owner: UDisksBlockZRAM

Flags: Read / Write

Default value: 0

Since: 2.3.0

### The `“num-reads”` property

      “num-reads”                guint64

Represents the D-Bus property "NumReads".

Since the D-Bus property for this GObject 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.

Owner: UDisksBlockZRAM

Flags: Read / Write

Default value: 0

Since: 2.3.0

### The `“num-writes”` property

      “num-writes”               guint64

Represents the D-Bus property "NumWrites".

Since the D-Bus property for this GObject 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.

Owner: UDisksBlockZRAM

Flags: Read / Write

Default value: 0

Since: 2.3.0

### The `“orig-data-size”` property

      “orig-data-size”           guint64

Represents the D-Bus property "OrigDataSize".

Since the D-Bus property for this GObject 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.

Owner: UDisksBlockZRAM

Flags: Read / Write

Default value: 0

Since: 2.3.0

### The `“zero-pages”` property

      “zero-pages”               guint64

Represents the D-Bus property "ZeroPages".

Since the D-Bus property for this GObject 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.

Owner: UDisksBlockZRAM

Flags: Read / Write

Default value: 0

Since: 2.3.0

## Signal Details

### The `“handle-activate”` signal

    gboolean
    user_function (UDisksBlockZRAM       *object,
                   GDBusMethodInvocation *invocation,
                   gint                   arg_priority,
                   GVariant              *arg_options,
                   gpointer               user_data)

Signal emitted when a remote caller is invoking the `Activate()` 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_block_zram_complete_activate()` 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 `G_DBUS_ERROR_UNKNOWN_METHOD` error is returned.

#### Parameters

object | A UDisksBlockZRAM. |
invocation | A GDBusMethodInvocation. |
arg_priority | Argument passed by remote caller. |
arg_options | Argument passed by remote caller. |
user_data | user data set when the signal handler was connected. |

#### Returns

`TRUE` if the invocation was handled, `FALSE` to let other signal handlers run.

Flags: Run Last

Since: 2.3.0

### The `“handle-activate-labeled”` signal

    gboolean
    user_function (UDisksBlockZRAM       *object,
                   GDBusMethodInvocation *invocation,
                   gint                   arg_priority,
                   gchar                 *arg_label,
                   GVariant              *arg_options,
                   gpointer               user_data)

Signal emitted when a remote caller is invoking the `ActivateLabeled()` 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_block_zram_complete_activate_labeled()` 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 `G_DBUS_ERROR_UNKNOWN_METHOD` error is returned.

#### Parameters

object | A UDisksBlockZRAM. |
invocation | A GDBusMethodInvocation. |
arg_priority | Argument passed by remote caller. |
arg_label | Argument passed by remote caller. |
arg_options | Argument passed by remote caller. |
user_data | user data set when the signal handler was connected. |

#### Returns

`TRUE` if the invocation was handled, `FALSE` to let other signal handlers run.

Flags: Run Last

Since: 2.3.0

### The `“handle-deactivate”` signal

    gboolean
    user_function (UDisksBlockZRAM       *object,
                   GDBusMethodInvocation *invocation,
                   GVariant              *arg_options,
                   gpointer               user_data)

Signal emitted when a remote caller is invoking the `Deactivate()` 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_block_zram_complete_deactivate()` 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 `G_DBUS_ERROR_UNKNOWN_METHOD` error is returned.

#### Parameters

object | A UDisksBlockZRAM. |
invocation | A GDBusMethodInvocation. |
arg_options | Argument passed by remote caller. |
user_data | user data set when the signal handler was connected. |

#### Returns

`TRUE` if the invocation was handled, `FALSE` to let other signal handlers run.

Flags: Run Last

Since: 2.3.0

### The `“handle-refresh”` signal

    gboolean
    user_function (UDisksBlockZRAM       *object,
                   GDBusMethodInvocation *invocation,
                   GVariant              *arg_options,
                   gpointer               user_data)

Signal emitted when a remote caller is invoking the `Refresh()` 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_block_zram_complete_refresh()` 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 `G_DBUS_ERROR_UNKNOWN_METHOD` error is returned.

#### Parameters

object | A UDisksBlockZRAM. |
invocation | A GDBusMethodInvocation. |
arg_options | Argument passed by remote caller. |
user_data | user data set when the signal handler was connected. |

#### Returns

`TRUE` if the invocation was handled, `FALSE` to let other signal handlers run.

Flags: Run Last

Since: 2.3.0