GVirStorageVol

GVirStorageVol

Functions

Properties

GVirStorageVolHandle * handle Read / Write / Construct Only
GVirStoragePool * pool Read / Write / Construct Only

Types and Values

Object Hierarchy

    GBoxed
    ╰── GVirStorageVolInfo
    GObject
    ╰── GVirStorageVol

Description

Functions

gvir_storage_vol_get_name ()

const gchar *
gvir_storage_vol_get_name (GVirStorageVol *vol);

gvir_storage_vol_get_path ()

const gchar *
gvir_storage_vol_get_path (GVirStorageVol *vol,
                           GError **error);

gvir_storage_vol_delete ()

gboolean
gvir_storage_vol_delete (GVirStorageVol *vol,
                         guint flags,
                         GError **err);

Deletes the storage volume vol .

Parameters

vol

the storage volume to delete

 

flags

the flags

 

err

Return location for errors, or NULL

 

Returns

TRUE on success, FALSE otherwise


gvir_storage_vol_get_config ()

GVirConfigStorageVol *
gvir_storage_vol_get_config (GVirStorageVol *vol,
                             guint flags,
                             GError **err);

Parameters

vol

the storage_vol

 

flags

the flags

 

err

Place-holder for possible errors

 

Returns

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

[transfer full]


gvir_storage_vol_get_info ()

GVirStorageVolInfo *
gvir_storage_vol_get_info (GVirStorageVol *vol,
                           GError **err);

Parameters

vol

the storage_vol

 

err

Place-holder for possible errors

 

Returns

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

[transfer full]


gvir_storage_vol_resize ()

gboolean
gvir_storage_vol_resize (GVirStorageVol *vol,
                         guint64 capacity,
                         guint flags,
                         GError **err);

Changes the capacity of the storage volume vol to capacity .

Parameters

vol

the storage volume to resize

 

capacity

the new capacity of the volume

 

flags

the flags.

[type GVirStorageVolResizeFlags]

err

Return location for errors, or NULL

 

Returns

TRUE success, FALSE otherwise


gvir_storage_vol_download ()

gboolean
gvir_storage_vol_download (GVirStorageVol *vol,
                           GVirStream *stream,
                           guint64 offset,
                           guint64 length,
                           guint flags,
                           GError **err);

Parameters

vol

the storage volume to download from

 

stream

stream to use as output

 

offset

position in vol to start reading from

 

length

limit on amount of data to download, or 0 for downloading all data

 

flags

extra flags, not used yet, pass 0

 

Returns

TRUE of success, FALSE otherwise


gvir_storage_vol_upload ()

gboolean
gvir_storage_vol_upload (GVirStorageVol *vol,
                         GVirStream *stream,
                         guint64 offset,
                         guint64 length,
                         guint flags,
                         GError **err);

Parameters

vol

the storage volume to upload

 

stream

stream to use as input

 

offset

position in vol to start to write to

 

length

limit on amount of data to upload, or 0 for uploading all data

 

flags

the flags, not set yet, pass 0

 

Returns

TRUE of success, FALSE otherwise

Types and Values

enum GVirStorageVolType

Members

GVIR_STORAGE_VOL_STATE_FILE

   

GVIR_STORAGE_VOL_STATE_BLOCK

   

GVIR_STORAGE_VOL_STATE_DIR

   

enum GVirStorageVolResizeFlags

Members

GVIR_STORAGE_VOL_RESIZE_NONE

No flags

 

GVIR_STORAGE_VOL_RESIZE_ALLOCATE

force allocation of new size

 

GVIR_STORAGE_VOL_RESIZE_DELTA

size is relative to current

 

GVIR_STORAGE_VOL_RESIZE_SHRINK

allow decrease in capacity. This combined with GVIR_STORAGE_VOL_RESIZE_DELTA, implies a negative delta.

 

Property Details

The “handle” property

  “handle”                   GVirStorageVolHandle *

The storage_vol handle.

Flags: Read / Write / Construct Only


The “pool” property

  “pool”                     GVirStoragePool *

The containing storage pool.

Flags: Read / Write / Construct Only