GsdSwapOperation

GsdSwapOperation — Wrapper for sswap.

Functions

Properties

gboolean check-device Read / Write
gchar * device Read / Write

Types and Values

Object Hierarchy

    GObject
    ╰── GsdAsyncOperation
        ╰── GsdSecureDeleteOperation
            ╰── GsdZeroableOperation
                ╰── GsdSwapOperation

Description

Functions

gsd_swap_operation_run ()

gboolean
gsd_swap_operation_run (GsdSwapOperation *self,
                        const gchar *device,
                        GError **error);

Launches a secure wiping of a swap device asynchronously.

Parameters

self

the GsdSwapOperation instance

 

device

 .

the swap device to wipe. It is exactly the same as setting the SwapOperation:device property, just a convenience shortcut.

.

[in][allow-none]

error

location to store the error occuring, or NULL to ignore.

[error-domains GSpawnError GsdAsyncOperationError]

Returns

whether subprocess started successfully.


gsd_swap_operation_run_sync ()

gboolean
gsd_swap_operation_run_sync (GsdSwapOperation *self,
                             const gchar *device,
                             GError **error);

Launches a secure wiping of a swap device synchronously.

Parameters

self

the GsdSwapOperation instance

 

device

 .

the swap device to wipe. It is exactly the same as setting the SwapOperation:device property, just a convenience shortcut.

.

[in][allow-none]

error

location to store the error occuring, or NULL to ignore.

[error-domains GSpawnError GsdAsyncOperationError]

Returns

whether wiping of the swap device succeed.


gsd_swap_operation_new ()

GsdSwapOperation *
gsd_swap_operation_new (void);

gsd_swap_operation_get_device ()

const gchar *
gsd_swap_operation_get_device (GsdSwapOperation *self);

Get and return the current value of the "device" property.

The swap device to wipe.

Parameters

self

the GsdSwapOperation instance to query

 

Returns

the value of the "device" property


gsd_swap_operation_set_device ()

void
gsd_swap_operation_set_device (GsdSwapOperation *self,
                               const gchar *value);

Set the value of the "device" property to value .

The swap device to wipe.

Parameters

self

the GsdSwapOperation instance to modify

 

value

the new value of the "device" property

 

gsd_swap_operation_get_check_device ()

gboolean
gsd_swap_operation_get_check_device (GsdSwapOperation *self);

Get and return the current value of the "check-device" property.

Whether to throw an error if the swap is detected as being currently used.

This may be useful because doing the operation on an in-use swap device may crash the system.

Parameters

self

the GsdSwapOperation instance to query

 

Returns

the value of the "check-device" property


gsd_swap_operation_set_check_device ()

void
gsd_swap_operation_set_check_device (GsdSwapOperation *self,
                                     gboolean value);

Set the value of the "check-device" property to value .

Whether to throw an error if the swap is detected as being currently used.

This may be useful because doing the operation on an in-use swap device may crash the system.

Parameters

self

the GsdSwapOperation instance to modify

 

value

the new value of the "check-device" property

 

Types and Values

GSD_TYPE_SWAP_OPERATION

#define GSD_TYPE_SWAP_OPERATION (gsd_swap_operation_get_type ())

The type for GsdSwapOperation.


struct GsdSwapOperation

struct GsdSwapOperation;

Wrapper for sswap.


struct GsdSwapOperationClass

struct GsdSwapOperationClass {
	GsdZeroableOperationClass parent_class;
};

The class structure for GSD_TYPE_SWAP_OPERATION. All the fields in this structure are private and should never be accessed directly.

Members

Property Details

The “check-device” property

  “check-device”             gboolean

Whether to throw an error if the swap is detected as being currently used.

This may be useful because doing the operation on an in-use swap device may crash the system.

Flags: Read / Write

Default value: TRUE


The “device” property

  “device”                   gchar *

The swap device to wipe.

Flags: Read / Write

Default value: NULL