StoragedEncrypted

StoragedEncrypted — Generated C code for the org.storaged.Storaged.Encrypted D-Bus interface

Functions

Properties

GVariant * child-configuration Read / Write

Signals

gboolean handle-change-passphrase Run Last
gboolean handle-lock Run Last
gboolean handle-unlock Run Last

Types and Values

Object Hierarchy

    GInterface
    ╰── StoragedEncrypted
    GObject
    ├── GDBusInterfaceSkeleton
       ╰── StoragedEncryptedSkeleton
           ╰── StoragedLinuxEncrypted
    ╰── GDBusProxy
        ╰── StoragedEncryptedProxy

Prerequisites

StoragedEncrypted requires GObject.

Implemented Interfaces

StoragedEncryptedProxy implements GDBusInterface, GInitable, GAsyncInitable and StoragedEncrypted.

StoragedEncryptedSkeleton implements GDBusInterface and StoragedEncrypted.

Known Implementations

StoragedEncrypted is implemented by StoragedEncryptedProxy, StoragedEncryptedSkeleton and StoragedLinuxEncrypted.

Description

This section contains code for working with the org.storaged.Storaged.Encrypted D-Bus interface in C.

Functions

storaged_encrypted_interface_info ()

GDBusInterfaceInfo *
storaged_encrypted_interface_info (void);

Gets a machine-readable description of the org.storaged.Storaged.Encrypted D-Bus interface.

Returns

A GDBusInterfaceInfo. Do not free.

[transfer none]


storaged_encrypted_override_properties ()

guint
storaged_encrypted_override_properties
                               (GObjectClass *klass,
                                guint property_id_begin);

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

Parameters

klass

The class structure for a GObject-derived class.

 

property_id_begin

The property id to assign to the first overridden property.

 

Returns

The last property id.


storaged_encrypted_call_unlock ()

void
storaged_encrypted_call_unlock (StoragedEncrypted *proxy,
                                const gchar *arg_passphrase,
                                GVariant *arg_options,
                                GCancellable *cancellable,
                                GAsyncReadyCallback callback,
                                gpointer user_data);

Asynchronously invokes the Unlock() 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. You can then call storaged_encrypted_call_unlock_finish() to get the result of the operation.

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

Parameters

proxy

A StoragedEncryptedProxy.

 

arg_passphrase

Argument to pass with the method invocation.

 

arg_options

Argument to pass with the method invocation.

 

cancellable

A GCancellable or NULL.

[allow-none]

callback

A GAsyncReadyCallback to call when the request is satisfied or NULL.

 

user_data

User data to pass to callback .

 

storaged_encrypted_call_unlock_finish ()

gboolean
storaged_encrypted_call_unlock_finish (StoragedEncrypted *proxy,
                                       gchar **out_cleartext_device,
                                       GAsyncResult *res,
                                       GError **error);

Finishes an operation started with storaged_encrypted_call_unlock().

Parameters

proxy

A StoragedEncryptedProxy.

 

out_cleartext_device

Return location for return parameter or NULL to ignore.

[out]

res

The GAsyncResult obtained from the GAsyncReadyCallback passed to storaged_encrypted_call_unlock().

 

error

Return location for error or NULL.

 

Returns

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

[skip]


storaged_encrypted_call_unlock_sync ()

gboolean
storaged_encrypted_call_unlock_sync (StoragedEncrypted *proxy,
                                     const gchar *arg_passphrase,
                                     GVariant *arg_options,
                                     gchar **out_cleartext_device,
                                     GCancellable *cancellable,
                                     GError **error);

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

See storaged_encrypted_call_unlock() for the asynchronous version of this method.

Parameters

proxy

A StoragedEncryptedProxy.

 

arg_passphrase

Argument to pass with the method invocation.

 

arg_options

Argument to pass with the method invocation.

 

out_cleartext_device

Return location for return parameter or NULL to ignore.

[out]

cancellable

A GCancellable or NULL.

[allow-none]

error

Return location for error or NULL.

 

Returns

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

[skip]


storaged_encrypted_complete_unlock ()

void
storaged_encrypted_complete_unlock (StoragedEncrypted *object,
                                    GDBusMethodInvocation *invocation,
                                    const gchar *cleartext_device);

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

 

invocation

A GDBusMethodInvocation.

[transfer full]

cleartext_device

Parameter to return.

 

storaged_encrypted_call_lock ()

void
storaged_encrypted_call_lock (StoragedEncrypted *proxy,
                              GVariant *arg_options,
                              GCancellable *cancellable,
                              GAsyncReadyCallback callback,
                              gpointer user_data);

Asynchronously invokes the Lock() 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. You can then call storaged_encrypted_call_lock_finish() to get the result of the operation.

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

Parameters

proxy

A StoragedEncryptedProxy.

 

arg_options

Argument to pass with the method invocation.

 

cancellable

A GCancellable or NULL.

[allow-none]

callback

A GAsyncReadyCallback to call when the request is satisfied or NULL.

 

user_data

User data to pass to callback .

 

storaged_encrypted_call_lock_finish ()

gboolean
storaged_encrypted_call_lock_finish (StoragedEncrypted *proxy,
                                     GAsyncResult *res,
                                     GError **error);

Finishes an operation started with storaged_encrypted_call_lock().

Parameters

proxy

A StoragedEncryptedProxy.

 

res

The GAsyncResult obtained from the GAsyncReadyCallback passed to storaged_encrypted_call_lock().

 

error

Return location for error or NULL.

 

Returns

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

[skip]


storaged_encrypted_call_lock_sync ()

gboolean
storaged_encrypted_call_lock_sync (StoragedEncrypted *proxy,
                                   GVariant *arg_options,
                                   GCancellable *cancellable,
                                   GError **error);

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

See storaged_encrypted_call_lock() for the asynchronous version of this method.

Parameters

proxy

A StoragedEncryptedProxy.

 

arg_options

Argument to pass with the method invocation.

 

cancellable

A GCancellable or NULL.

[allow-none]

error

Return location for error or NULL.

 

Returns

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

[skip]


storaged_encrypted_complete_lock ()

void
storaged_encrypted_complete_lock (StoragedEncrypted *object,
                                  GDBusMethodInvocation *invocation);

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

 

invocation

A GDBusMethodInvocation.

[transfer full]

storaged_encrypted_call_change_passphrase ()

void
storaged_encrypted_call_change_passphrase
                               (StoragedEncrypted *proxy,
                                const gchar *arg_passphrase,
                                const gchar *arg_new_passphrase,
                                GVariant *arg_options,
                                GCancellable *cancellable,
                                GAsyncReadyCallback callback,
                                gpointer user_data);

Asynchronously invokes the ChangePassphrase() 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. You can then call storaged_encrypted_call_change_passphrase_finish() to get the result of the operation.

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

Parameters

proxy

A StoragedEncryptedProxy.

 

arg_passphrase

Argument to pass with the method invocation.

 

arg_new_passphrase

Argument to pass with the method invocation.

 

arg_options

Argument to pass with the method invocation.

 

cancellable

A GCancellable or NULL.

[allow-none]

callback

A GAsyncReadyCallback to call when the request is satisfied or NULL.

 

user_data

User data to pass to callback .

 

storaged_encrypted_call_change_passphrase_finish ()

gboolean
storaged_encrypted_call_change_passphrase_finish
                               (StoragedEncrypted *proxy,
                                GAsyncResult *res,
                                GError **error);

Finishes an operation started with storaged_encrypted_call_change_passphrase().

Parameters

proxy

A StoragedEncryptedProxy.

 

res

The GAsyncResult obtained from the GAsyncReadyCallback passed to storaged_encrypted_call_change_passphrase().

 

error

Return location for error or NULL.

 

Returns

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

[skip]


storaged_encrypted_call_change_passphrase_sync ()

gboolean
storaged_encrypted_call_change_passphrase_sync
                               (StoragedEncrypted *proxy,
                                const gchar *arg_passphrase,
                                const gchar *arg_new_passphrase,
                                GVariant *arg_options,
                                GCancellable *cancellable,
                                GError **error);

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

See storaged_encrypted_call_change_passphrase() for the asynchronous version of this method.

Parameters

proxy

A StoragedEncryptedProxy.

 

arg_passphrase

Argument to pass with the method invocation.

 

arg_new_passphrase

Argument to pass with the method invocation.

 

arg_options

Argument to pass with the method invocation.

 

cancellable

A GCancellable or NULL.

[allow-none]

error

Return location for error or NULL.

 

Returns

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

[skip]


storaged_encrypted_complete_change_passphrase ()

void
storaged_encrypted_complete_change_passphrase
                               (StoragedEncrypted *object,
                                GDBusMethodInvocation *invocation);

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

 

invocation

A GDBusMethodInvocation.

[transfer full]

storaged_encrypted_proxy_new ()

void
storaged_encrypted_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.storaged.Storaged.Encrypted. 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. You can then call storaged_encrypted_proxy_new_finish() to get the result of the operation.

See storaged_encrypted_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.

[allow-none]

object_path

An object path.

 

cancellable

A GCancellable or NULL.

[allow-none]

callback

A GAsyncReadyCallback to call when the request is satisfied.

 

user_data

User data to pass to callback .

 

storaged_encrypted_proxy_new_finish ()

StoragedEncrypted *
storaged_encrypted_proxy_new_finish (GAsyncResult *res,
                                     GError **error);

Finishes an operation started with storaged_encrypted_proxy_new().

Parameters

res

The GAsyncResult obtained from the GAsyncReadyCallback passed to storaged_encrypted_proxy_new().

 

error

Return location for error or NULL

 

Returns

The constructed proxy object or NULL if error is set.

[transfer full][type StoragedEncryptedProxy]


storaged_encrypted_proxy_new_sync ()

StoragedEncrypted *
storaged_encrypted_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.storaged.Storaged.Encrypted. See g_dbus_proxy_new_sync() for more details.

The calling thread is blocked until a reply is received.

See storaged_encrypted_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.

[allow-none]

object_path

An object path.

 

cancellable

A GCancellable or NULL.

[allow-none]

error

Return location for error or NULL

 

Returns

The constructed proxy object or NULL if error is set.

[transfer full][type StoragedEncryptedProxy]


storaged_encrypted_proxy_new_for_bus ()

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

Like storaged_encrypted_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. You can then call storaged_encrypted_proxy_new_for_bus_finish() to get the result of the operation.

See storaged_encrypted_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.

[allow-none]

callback

A GAsyncReadyCallback to call when the request is satisfied.

 

user_data

User data to pass to callback .

 

storaged_encrypted_proxy_new_for_bus_finish ()

StoragedEncrypted *
storaged_encrypted_proxy_new_for_bus_finish
                               (GAsyncResult *res,
                                GError **error);

Finishes an operation started with storaged_encrypted_proxy_new_for_bus().

Parameters

res

The GAsyncResult obtained from the GAsyncReadyCallback passed to storaged_encrypted_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 StoragedEncryptedProxy]


storaged_encrypted_proxy_new_for_bus_sync ()

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

Like storaged_encrypted_proxy_new_sync() but takes a GBusType instead of a GDBusConnection.

The calling thread is blocked until a reply is received.

See storaged_encrypted_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.

[allow-none]

error

Return location for error or NULL

 

Returns

The constructed proxy object or NULL if error is set.

[transfer full][type StoragedEncryptedProxy]


storaged_encrypted_skeleton_new ()

StoragedEncrypted *
storaged_encrypted_skeleton_new (void);

Creates a skeleton object for the D-Bus interface org.storaged.Storaged.Encrypted.

Returns

The skeleton object.

[transfer full][type StoragedEncryptedSkeleton]

Types and Values

StoragedEncrypted

typedef struct _StoragedEncrypted StoragedEncrypted;

Abstract interface type for the D-Bus interface org.storaged.Storaged.Encrypted.


struct StoragedEncryptedIface

struct StoragedEncryptedIface {
  GTypeInterface parent_iface;


  gboolean (*handle_change_passphrase) (
    StoragedEncrypted *object,
    GDBusMethodInvocation *invocation,
    const gchar *arg_passphrase,
    const gchar *arg_new_passphrase,
    GVariant *arg_options);

  gboolean (*handle_lock) (
    StoragedEncrypted *object,
    GDBusMethodInvocation *invocation,
    GVariant *arg_options);

  gboolean (*handle_unlock) (
    StoragedEncrypted *object,
    GDBusMethodInvocation *invocation,
    const gchar *arg_passphrase,
    GVariant *arg_options);

  GVariant * (*get_child_configuration) (StoragedEncrypted *object);
};

Virtual table for the D-Bus interface org.storaged.Storaged.Encrypted.

Members

GTypeInterface parent_iface;

The parent interface.

 

handle_change_passphrase ()

Handler for the “handle-change-passphrase” signal.

 

handle_lock ()

Handler for the “handle-lock” signal.

 

handle_unlock ()

Handler for the “handle-unlock” signal.

 

get_child_configuration ()

Getter for the “child-configuration” property.

 

struct StoragedEncryptedProxy

struct StoragedEncryptedProxy;

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


struct StoragedEncryptedProxyClass

struct StoragedEncryptedProxyClass {
  GDBusProxyClass parent_class;
};

Class structure for StoragedEncryptedProxy.

Members


struct StoragedEncryptedSkeleton

struct StoragedEncryptedSkeleton;

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


struct StoragedEncryptedSkeletonClass

struct StoragedEncryptedSkeletonClass {
  GDBusInterfaceSkeletonClass parent_class;
};

Class structure for StoragedEncryptedSkeleton.

Members

Property Details

The “child-configuration” property

  “child-configuration”      GVariant *

Represents the D-Bus property "ChildConfiguration".

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.

Flags: Read / Write

Allowed values: GVariant<a(sa{sv})>

Default value: NULL

Signal Details

The “handle-change-passphrase” signal

gboolean
user_function (StoragedEncrypted     *object,
               GDBusMethodInvocation *invocation,
               gchar                 *arg_passphrase,
               gchar                 *arg_new_passphrase,
               GVariant              *arg_options,
               gpointer               user_data)

Signal emitted when a remote caller is invoking the ChangePassphrase() 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 storaged_encrypted_complete_change_passphrase() 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 StoragedEncrypted.

 

invocation

A GDBusMethodInvocation.

 

arg_passphrase

Argument passed by remote caller.

 

arg_new_passphrase

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


The “handle-lock” signal

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

Signal emitted when a remote caller is invoking the Lock() 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 storaged_encrypted_complete_lock() 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 StoragedEncrypted.

 

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


The “handle-unlock” signal

gboolean
user_function (StoragedEncrypted     *object,
               GDBusMethodInvocation *invocation,
               gchar                 *arg_passphrase,
               GVariant              *arg_options,
               gpointer               user_data)

Signal emitted when a remote caller is invoking the Unlock() 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 storaged_encrypted_complete_unlock() 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 StoragedEncrypted.

 

invocation

A GDBusMethodInvocation.

 

arg_passphrase

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