GVirSandboxBuilder

GVirSandboxBuilder — Sandbox construction base class

Synopsis

#include <libvirt-sandbox/libvirt-sandbox.h>

#define             GVIR_SANDBOX_TYPE_BUILDER_HANDLE
struct              GVirSandboxBuilder;
struct              GVirSandboxBuilderClass;
GVirSandboxBuilder * gvir_sandbox_builder_for_connection
                                                        (GVirConnection *connection,
                                                         GError **error);
GVirConnection *    gvir_sandbox_builder_get_connection (GVirSandboxBuilder *builder);
GVirConfigDomain *  gvir_sandbox_builder_construct      (GVirSandboxBuilder *builder,
                                                         GVirSandboxConfig *config,
                                                         const gchar *statedir,
                                                         GError **error);
gboolean            gvir_sandbox_builder_clean_post_start
                                                        (GVirSandboxBuilder *builder,
                                                         GVirSandboxConfig *config,
                                                         const gchar *statedir,
                                                         GError **error);
gboolean            gvir_sandbox_builder_clean_post_stop
                                                        (GVirSandboxBuilder *builder,
                                                         GVirSandboxConfig *config,
                                                         const gchar *statedir,
                                                         GError **error);

Object Hierarchy

  GObject
   +----GVirSandboxBuilder
         +----GVirSandboxBuilderContainer
         +----GVirSandboxBuilderMachine

Properties

  "connection"               GVirConnection*       : Read / Write / Construct Only

Description

Provides a base class for constructing sandboxes

The GVirSandboxBuilder objects provides the basic framework for creating GVirDomain instances from GVirSandboxConfig instances.

Details

GVIR_SANDBOX_TYPE_BUILDER_HANDLE

#define GVIR_SANDBOX_TYPE_BUILDER_HANDLE      (gvir_sandbox_builder_handle_get_type ())

struct GVirSandboxBuilder

struct GVirSandboxBuilder;

struct GVirSandboxBuilderClass

struct GVirSandboxBuilderClass {
    GObjectClass parent_class;

    gboolean (*construct_basic)(GVirSandboxBuilder *builder,
                                GVirSandboxConfig *config,
                                const gchar *statedir,
                                GVirConfigDomain *domain,
                                GError **error);
    gboolean (*construct_os)(GVirSandboxBuilder *builder,
                             GVirSandboxConfig *config,
                             const gchar *statedir,
                             GVirConfigDomain *domain,
                             GError **error);
    gboolean (*construct_features)(GVirSandboxBuilder *builder,
                                   GVirSandboxConfig *config,
                                   const gchar *statedir,
                                   GVirConfigDomain *domain,
                                   GError **error);
    gboolean (*construct_devices)(GVirSandboxBuilder *builder,
                                  GVirSandboxConfig *config,
                                  const gchar *statedir,
                                  GVirConfigDomain *domain,
                                  GError **error);
    gboolean (*construct_security)(GVirSandboxBuilder *builder,
                                   GVirSandboxConfig *config,
                                   const gchar *statedir,
                                   GVirConfigDomain *domain,
                                   GError **error);
    gboolean (*construct_domain)(GVirSandboxBuilder *builder,
                                 GVirSandboxConfig *config,
                                 const gchar *statedir,
                                 GVirConfigDomain *domain,
                                 GError **error);

    gboolean (*clean_post_start)(GVirSandboxBuilder *builder,
                                 GVirSandboxConfig *config,
                                 const gchar *statedir,
                                 GError **error);
    gboolean (*clean_post_stop)(GVirSandboxBuilder *builder,
                                GVirSandboxConfig *config,
                                const gchar *statedir,
                                GError **error);

    gpointer padding[LIBVIRT_SANDBOX_CLASS_PADDING];
};

gvir_sandbox_builder_for_connection ()

GVirSandboxBuilder * gvir_sandbox_builder_for_connection
                                                        (GVirConnection *connection,
                                                         GError **error);

Find and instantiate a suitable builder for sandboxes to be hosted under the connection.

connection :

the connection to host the sandbox. [transfer none]

error :

the error. [out]

Returns :

a new builder or NULL. [transfer full]

gvir_sandbox_builder_get_connection ()

GVirConnection *    gvir_sandbox_builder_get_connection (GVirSandboxBuilder *builder);

Retrieves the sandbox connection

builder :

the sandbox builder. [transfer none]

Returns :

the current connection. [transfer full]

gvir_sandbox_builder_construct ()

GVirConfigDomain *  gvir_sandbox_builder_construct      (GVirSandboxBuilder *builder,
                                                         GVirSandboxConfig *config,
                                                         const gchar *statedir,
                                                         GError **error);

Create a domain configuration from the sandbox configuration

builder :

the sandbox builder. [transfer none]

config :

the sandbox configuration. [transfer none]

error :

the error location. [out]

Returns :

the newly built domain configuration. [transfer full]

gvir_sandbox_builder_clean_post_start ()

gboolean            gvir_sandbox_builder_clean_post_start
                                                        (GVirSandboxBuilder *builder,
                                                         GVirSandboxConfig *config,
                                                         const gchar *statedir,
                                                         GError **error);

Cleanup temporary files which are not required once the sandbox has been started.

builder :

the sandbox builder. [transfer none]

config :

the sandbox configuration. [transfer none]

error :

the error location. [out]

Returns :

TRUE on success, FALSE on error

gvir_sandbox_builder_clean_post_stop ()

gboolean            gvir_sandbox_builder_clean_post_stop
                                                        (GVirSandboxBuilder *builder,
                                                         GVirSandboxConfig *config,
                                                         const gchar *statedir,
                                                         GError **error);

Cleanup temporary files which are not required once the sandbox has been started.

builder :

the sandbox builder. [transfer none]

config :

the sandbox configuration. [transfer none]

error :

the error location. [out]

Returns :

TRUE on success, FALSE on error

Property Details

The "connection" property

  "connection"               GVirConnection*       : Read / Write / Construct Only

The sandbox connection.

See Also

GVirSandboxBuilderContainerGVirSandboxBuilderMachine