Blame libvirt-gconfig/libvirt-gconfig-storage-pool.h

Packit a07778
/*
Packit a07778
 * libvirt-gconfig-storage-pool.h: libvirt storage pool configuration
Packit a07778
 *
Packit a07778
 * Copyright (C) 2010-2011 Red Hat, Inc.
Packit a07778
 *
Packit a07778
 * This library is free software; you can redistribute it and/or
Packit a07778
 * modify it under the terms of the GNU Lesser General Public
Packit a07778
 * License as published by the Free Software Foundation; either
Packit a07778
 * version 2.1 of the License, or (at your option) any later version.
Packit a07778
 *
Packit a07778
 * This library is distributed in the hope that it will be useful,
Packit a07778
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
Packit a07778
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
Packit a07778
 * Lesser General Public License for more details.
Packit a07778
 *
Packit a07778
 * You should have received a copy of the GNU Lesser General Public
Packit a07778
 * License along with this library. If not, see
Packit a07778
 * <http://www.gnu.org/licenses/>.
Packit a07778
 *
Packit a07778
 * Author: Daniel P. Berrange <berrange@redhat.com>
Packit a07778
 */
Packit a07778
Packit a07778
#if !defined(__LIBVIRT_GCONFIG_H__) && !defined(LIBVIRT_GCONFIG_BUILD)
Packit a07778
#error "Only <libvirt-gconfig/libvirt-gconfig.h> can be included directly."
Packit a07778
#endif
Packit a07778
Packit a07778
#ifndef __LIBVIRT_GCONFIG_STORAGE_POOL_H__
Packit a07778
#define __LIBVIRT_GCONFIG_STORAGE_POOL_H__
Packit a07778
Packit a07778
#include <libvirt-gconfig/libvirt-gconfig-storage-pool-source.h>
Packit a07778
#include <libvirt-gconfig/libvirt-gconfig-storage-pool-target.h>
Packit a07778
Packit a07778
G_BEGIN_DECLS
Packit a07778
Packit a07778
#define GVIR_CONFIG_TYPE_STORAGE_POOL            (gvir_config_storage_pool_get_type ())
Packit a07778
#define GVIR_CONFIG_STORAGE_POOL(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), GVIR_CONFIG_TYPE_STORAGE_POOL, GVirConfigStoragePool))
Packit a07778
#define GVIR_CONFIG_STORAGE_POOL_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), GVIR_CONFIG_TYPE_STORAGE_POOL, GVirConfigStoragePoolClass))
Packit a07778
#define GVIR_CONFIG_IS_STORAGE_POOL(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GVIR_CONFIG_TYPE_STORAGE_POOL))
Packit a07778
#define GVIR_CONFIG_IS_STORAGE_POOL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GVIR_CONFIG_TYPE_STORAGE_POOL))
Packit a07778
#define GVIR_CONFIG_STORAGE_POOL_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj), GVIR_CONFIG_TYPE_STORAGE_POOL, GVirConfigStoragePoolClass))
Packit a07778
Packit a07778
typedef struct _GVirConfigStoragePool GVirConfigStoragePool;
Packit a07778
typedef struct _GVirConfigStoragePoolPrivate GVirConfigStoragePoolPrivate;
Packit a07778
typedef struct _GVirConfigStoragePoolClass GVirConfigStoragePoolClass;
Packit a07778
Packit a07778
struct _GVirConfigStoragePool
Packit a07778
{
Packit a07778
    GVirConfigObject parent;
Packit a07778
Packit a07778
    GVirConfigStoragePoolPrivate *priv;
Packit a07778
Packit a07778
    /* Do not add fields to this struct */
Packit a07778
};
Packit a07778
Packit a07778
struct _GVirConfigStoragePoolClass
Packit a07778
{
Packit a07778
    GVirConfigObjectClass parent_class;
Packit a07778
Packit a07778
    gpointer padding[20];
Packit a07778
};
Packit a07778
Packit a07778
typedef enum {
Packit a07778
    GVIR_CONFIG_STORAGE_POOL_TYPE_DIR,
Packit a07778
    GVIR_CONFIG_STORAGE_POOL_TYPE_FS,
Packit a07778
    GVIR_CONFIG_STORAGE_POOL_TYPE_NETFS,
Packit a07778
    GVIR_CONFIG_STORAGE_POOL_TYPE_LOGICAL,
Packit a07778
    GVIR_CONFIG_STORAGE_POOL_TYPE_DISK,
Packit a07778
    GVIR_CONFIG_STORAGE_POOL_TYPE_ISCSI,
Packit a07778
    GVIR_CONFIG_STORAGE_POOL_TYPE_SCSI,
Packit a07778
    GVIR_CONFIG_STORAGE_POOL_TYPE_MPATH
Packit a07778
} GVirConfigStoragePoolType;
Packit a07778
Packit a07778
GType gvir_config_storage_pool_get_type(void);
Packit a07778
Packit a07778
GVirConfigStoragePool *gvir_config_storage_pool_new(void);
Packit a07778
GVirConfigStoragePool *gvir_config_storage_pool_new_from_xml(const gchar *xml,
Packit a07778
                                                             GError **error);
Packit a07778
Packit a07778
guint64 gvir_config_storage_pool_get_allocation(GVirConfigStoragePool *pool);
Packit a07778
void gvir_config_storage_pool_set_allocation(GVirConfigStoragePool *pool,
Packit a07778
                                             guint64 allocation);
Packit a07778
guint64 gvir_config_storage_pool_get_available(GVirConfigStoragePool *pool);
Packit a07778
void gvir_config_storage_pool_set_available(GVirConfigStoragePool *pool,
Packit a07778
                                            guint64 available);
Packit a07778
guint64 gvir_config_storage_pool_get_capacity(GVirConfigStoragePool *pool);
Packit a07778
void gvir_config_storage_pool_set_capacity(GVirConfigStoragePool *pool,
Packit a07778
                                           guint64 capacity);
Packit a07778
const char *gvir_config_storage_pool_get_name(GVirConfigStoragePool *pool);
Packit a07778
void gvir_config_storage_pool_set_name(GVirConfigStoragePool *pool,
Packit a07778
                                       const char *name);
Packit a07778
GVirConfigStoragePoolType gvir_config_storage_pool_get_pool_type(GVirConfigStoragePool *pool);
Packit a07778
void gvir_config_storage_pool_set_pool_type(GVirConfigStoragePool *pool,
Packit a07778
                                            GVirConfigStoragePoolType type);
Packit a07778
GVirConfigStoragePoolSource *gvir_config_storage_pool_get_source(GVirConfigStoragePool *pool);
Packit a07778
void gvir_config_storage_pool_set_source(GVirConfigStoragePool *pool,
Packit a07778
                                         GVirConfigStoragePoolSource *source);
Packit a07778
GVirConfigStoragePoolTarget *gvir_config_storage_pool_get_target(GVirConfigStoragePool *pool);
Packit a07778
void gvir_config_storage_pool_set_target(GVirConfigStoragePool *pool,
Packit a07778
                                         GVirConfigStoragePoolTarget *target);
Packit a07778
const char *gvir_config_storage_pool_get_uuid(GVirConfigStoragePool *pool);
Packit a07778
void gvir_config_storage_pool_set_uuid(GVirConfigStoragePool *pool,
Packit a07778
                                       const char *uuid);
Packit a07778
Packit a07778
G_END_DECLS
Packit a07778
Packit a07778
#endif /* __LIBVIRT_GCONFIG_STORAGE_POOL_H__ */