## GVirDomainSnapshot

GVirDomainSnapshot

## Functions

const gchar * | gvir_domain_snapshot_get_name ()
GVirConfigDomainSnapshot * | gvir_domain_snapshot_get_config ()
gboolean | gvir_domain_snapshot_delete ()
void | gvir_domain_snapshot_delete_async ()
gboolean | gvir_domain_snapshot_delete_finish ()
gboolean | gvir_domain_snapshot_get_is_current ()
gboolean | gvir_domain_snapshot_revert_to ()
void | gvir_domain_snapshot_revert_to_async ()
gboolean | gvir_domain_snapshot_revert_to_finish ()
gboolean | gvir_domain_snapshot_set_config ()

## Properties

GVirDomainSnapshotHandle * | handle | Read / Write / Construct Only

## Types and Values

enum | GVirDomainSnapshotDeleteFlags
enum | GVirDomainSnapshotRevertFlags

## Object Hierarchy

        GObject
        ╰── GVirDomainSnapshot

## Description

## Functions

### gvir_domain_snapshot_get_name ()

    const gchar *
    gvir_domain_snapshot_get_name (GVirDomainSnapshot *snapshot);

### gvir_domain_snapshot_get_config ()

    GVirConfigDomainSnapshot *
    gvir_domain_snapshot_get_config (GVirDomainSnapshot *snapshot,
                                     guint flags,
                                     GError **err);

#### Parameters

snapshot | the domain_snapshot |
flags | the flags |

#### Returns

the config. The returned object should be unreffed with `g_object_unref()` when no longer needed.

[transfer full]

### gvir_domain_snapshot_delete ()

    gboolean
    gvir_domain_snapshot_delete (GVirDomainSnapshot *snapshot,
                                 guint flags,
                                 GError **error);

#### Parameters

snapshot | The domain snapshot |
flags | Bitwise or of GVirDomainSnapshotDeleteFlags |
error | Place-holder for error or NULL. | [allow-none]

#### Returns

TRUE on success, FALSE otherwise

### gvir_domain_snapshot_delete_async ()

    void
    gvir_domain_snapshot_delete_async (GVirDomainSnapshot *snapshot,
                                       guint flags,
                                       GCancellable *cancellable,
                                       GAsyncReadyCallback callback,
                                       gpointer user_data);

#### Parameters

snapshot | A GVirDomainSnapshot |
flags | Bitwise-OR of GVirDomainSnapshotDeleteFlags |
cancellable | cancellation object. | [allow-none][transfer none]
callback | completion callback. | [scope async]
user_data | opaque data for callback. | [closure]

### gvir_domain_snapshot_delete_finish ()

    gboolean
    gvir_domain_snapshot_delete_finish (GVirDomainSnapshot *snapshot,
                                        GAsyncResult *res,
                                        GError **error);

#### Parameters

snapshot | A GVirDomainSnapshot |
res | async method result. | [transfer none]

#### Returns

`TRUE` on success, `FALSE` otherwise.

### gvir_domain_snapshot_get_is_current ()

    gboolean
    gvir_domain_snapshot_get_is_current (GVirDomainSnapshot *snapshot,
                                         guint flags,
                                         gboolean *is_current,
                                         GError **error);

#### Parameters

snapshot | The domain snapshot |
flags | Currently unused, pass 0 |
is_current | `TRUE` if the given snapshot is the current snapshot of its domain, `FALSE` otherwise. | [out]
error | Place-holder for error or `NULL`. | [allow-none]

#### Returns

`TRUE` on success, `FALSE` otherwise.

### gvir_domain_snapshot_revert_to ()

    gboolean
    gvir_domain_snapshot_revert_to (GVirDomainSnapshot *snapshot,
                                    guint flags,
                                    GError **error);

#### Parameters

snapshot | The domain snapshot |
flags | Bitwise OR of GVirDomainSnapshotRevertFlags |
error | Place-holder for error or NULL. | [allow-none]

#### Returns

TRUE if the snapshot's domain has successfully been reverted to the given snapshot, FALSE otherwise, in which case `error` will be set.

### gvir_domain_snapshot_revert_to_async ()

    void
    gvir_domain_snapshot_revert_to_async (GVirDomainSnapshot *snapshot,
                                          guint flags,
                                          GCancellable *cancellable,
                                          GAsyncReadyCallback callback,
                                          gpointer user_data);

#### Parameters

snapshot | A GVirDomainSnapshot |
flags | Bitwise OR of GVirDomainSnapshotRevertFlags |
cancellable | cancellation object. | [allow-none][transfer none]
callback | The callback. | [scope async]
user_data | Opaque data for callback. | [closure]

### gvir_domain_snapshot_revert_to_finish ()

    gboolean
    gvir_domain_snapshot_revert_to_finish (GVirDomainSnapshot *snapshot,
                                           GAsyncResult *result,
                                           GError **error);

#### Parameters

snapshot | The domain snapshot |
result | The result. | [transfer none]

#### Returns

`TRUE` on success, `FALSE` otherwise.

### gvir_domain_snapshot_set_config ()

    gboolean
    gvir_domain_snapshot_set_config (GVirDomainSnapshot *snapshot,
                                     GVirConfigDomainSnapshot *conf,
                                     GError **error);

Updates the given snapshot's configuration according to the given GVirConfigDomainSnapshot.

#### Parameters

snapshot | The domain snapshot |
conf | The new config object |
error | Place-holder for error or `NULL`. | [allow-none]

#### Returns

`TRUE` if no error was reported, `FALSE` otherwise.

## Types and Values

### enum GVirDomainSnapshotDeleteFlags

#### Members

GVIR_DOMAIN_SNAPSHOT_DELETE_CHILDREN | Also delete children |
GVIR_DOMAIN_SNAPSHOT_DELETE_METADATA_ONLY | Delete just metadata |
GVIR_DOMAIN_SNAPSHOT_DELETE_CHILDREN_ONLY | Delete just children |

### enum GVirDomainSnapshotRevertFlags

#### Members

GVIR_DOMAIN_SNAPSHOT_REVERT_RUNNING | Run after revert |
GVIR_DOMAIN_SNAPSHOT_REVERT_PAUSED | Pause after revert |
GVIR_DOMAIN_SNAPSHOT_REVERT_FORCE | Allow risky reverts |

## Property Details

### The `“handle”` property

      “handle”                   GVirDomainSnapshotHandle *

The domain_snapshot handle.

Owner: GVirDomainSnapshot

Flags: Read / Write / Construct Only