|  |  |  | Libvirt-gobject Reference Manual |  | 
|---|---|---|---|---|
| Top | Description | Object Hierarchy | Properties | ||||
struct GVirStorageVol; struct GVirStorageVolClass; struct GVirStorageVolInfo; enum GVirStorageVolResizeFlags; enum GVirStorageVolType; gboolean gvir_storage_vol_delete (GVirStorageVol *vol,guint flags,GError **err); GVirConfigStorageVol * gvir_storage_vol_get_config (GVirStorageVol *vol,guint flags,GError **err); GVirStorageVolInfo * gvir_storage_vol_get_info (GVirStorageVol *vol,GError **err); const gchar * gvir_storage_vol_get_name (GVirStorageVol *vol); const gchar * gvir_storage_vol_get_path (GVirStorageVol *vol,GError **error); gboolean gvir_storage_vol_resize (GVirStorageVol *vol,guint64 capacity,guint flags,GError **err);
"handle" GVirStorageVolHandle* : Read / Write / Construct Only "pool" GVirStoragePool* : Read / Write / Construct Only
struct GVirStorageVolClass {
    GObjectClass parent_class;
    gpointer padding[20];
};
struct GVirStorageVolInfo {
    GVirStorageVolType type; /* Type flags */
    guint64 capacity;        /* Logical size bytes */
    guint64 allocation;      /* Current allocation bytes */
};
typedef enum {
    GVIR_STORAGE_VOL_RESIZE_NONE     = 0,
    GVIR_STORAGE_VOL_RESIZE_ALLOCATE = VIR_STORAGE_VOL_RESIZE_ALLOCATE,
    GVIR_STORAGE_VOL_RESIZE_DELTA    = VIR_STORAGE_VOL_RESIZE_DELTA,
    GVIR_STORAGE_VOL_RESIZE_SHRINK   = VIR_STORAGE_VOL_RESIZE_SHRINK,
} GVirStorageVolResizeFlags;
| No flags | |
| force allocation of new size | |
| size is relative to current | |
| allow decrease in capacity. This combined with GVIR_STORAGE_VOL_RESIZE_DELTA, implies a negative delta. | 
typedef enum {
    GVIR_STORAGE_VOL_STATE_FILE  = 0, /* Regular file based volume */
    GVIR_STORAGE_VOL_STATE_BLOCK = 1, /* Block based volume */
    GVIR_STORAGE_VOL_STATE_DIR   = 2, /* Directory-passthrough based volume */
} GVirStorageVolType;
gboolean gvir_storage_vol_delete (GVirStorageVol *vol,guint flags,GError **err);
Deletes the storage volume vol.
GVirConfigStorageVol * gvir_storage_vol_get_config (GVirStorageVol *vol,guint flags,GError **err);
| 
 | the storage_vol | 
| 
 | the flags Returns: (transfer full): the config | 
GVirStorageVolInfo * gvir_storage_vol_get_info (GVirStorageVol *vol,GError **err);
| 
 | the storage_vol Returns: (transfer full): the info | 
const gchar * gvir_storage_vol_get_path (GVirStorageVol *vol,GError **error);
gboolean gvir_storage_vol_resize (GVirStorageVol *vol,guint64 capacity,guint flags,GError **err);
Changes the capacity of the storage volume vol to capacity.
"handle" property  "handle"                   GVirStorageVolHandle*  : Read / Write / Construct Only
The storage_vol handle.
"pool" property"pool" GVirStoragePool* : Read / Write / Construct Only
The containing storage pool.