| Libvirt-sandbox Reference Manual | ||||
|---|---|---|---|---|
| Top | Description | Object Hierarchy | Properties | ||||
#include <libvirt-sandbox/libvirt-sandbox.h> #define GVIR_SANDBOX_TYPE_CONTEXT_HANDLE struct GVirSandboxContext; struct GVirSandboxContextClass; gboolean gvir_sandbox_context_attach (GVirSandboxContext *ctxt,GError **error); GVirSandboxCleaner * gvir_sandbox_context_get_cleaner (GVirSandboxContext *ctxt); GVirSandboxConfig * gvir_sandbox_context_get_config (GVirSandboxContext *ctxt); GVirConnection * gvir_sandbox_context_get_connection (GVirSandboxContext *ctxt); GVirDomain * gvir_sandbox_context_get_domain (GVirSandboxContext *ctxt,GError **error); GVirSandboxConsole * gvir_sandbox_context_get_log_console (GVirSandboxContext *ctxt,GError **error); GVirSandboxConsole * gvir_sandbox_context_get_shell_console (GVirSandboxContext *ctxt,GError **error); gboolean gvir_sandbox_context_start (GVirSandboxContext *ctxt,GError **error); gboolean gvir_sandbox_context_stop (GVirSandboxContext *ctxt,GError **error);
GObject
+----GVirSandboxContext
+----GVirSandboxContextGraphical
+----GVirSandboxContextInteractive
+----GVirSandboxContextService
"config" GVirSandboxConfig* : Read / Write / Construct Only "connection" GVirConnection* : Read / Write / Construct Only "domain" GVirDomain* : Read
Provides a base class for implementing console based application sandboxes
The GVirSandboxContext object takes a GVirSandboxConfig instance, passing it to GVirSandboxBuilder instance to create a virtual machine, and then provides access to a GVirSandboxConsole instance for interacting with the sandboxed application's stdio.
#define GVIR_SANDBOX_TYPE_CONTEXT_HANDLE (gvir_sandbox_context_handle_get_type ())
struct GVirSandboxContextClass {
GObjectClass parent_class;
gboolean (*prestart)(GVirSandboxContext *ctxt,
const gchar *configdir,
GError **error);
/* XXX padding */
};
gboolean gvir_sandbox_context_attach (GVirSandboxContext *ctxt,GError **error);
GVirSandboxCleaner * gvir_sandbox_context_get_cleaner (GVirSandboxContext *ctxt);
Retrieves the sandbox cleaner
|
the sandbox context. [transfer none] |
Returns : |
the current cleaner. [transfer full] |
GVirSandboxConfig * gvir_sandbox_context_get_config (GVirSandboxContext *ctxt);
Retrieves the sandbox configuration
|
the sandbox context. [transfer none] |
Returns : |
the current configuration. [transfer full] |
GVirConnection * gvir_sandbox_context_get_connection (GVirSandboxContext *ctxt);
Retrieves the sandbox connection
|
the sandbox context. [transfer none] |
Returns : |
the current connection or NULL. [transfer full] |
GVirDomain * gvir_sandbox_context_get_domain (GVirSandboxContext *ctxt,GError **error);
Retrieves the sandbox domain (if running)
|
the sandbox context. [transfer none] |
Returns : |
the current domain or NULL. [transfer full] |
GVirSandboxConsole * gvir_sandbox_context_get_log_console (GVirSandboxContext *ctxt,GError **error);
|
the sandbox context. [transfer none] |
Returns : |
the sandbox console (or NULL). [transfer full][allow-none] |
GVirSandboxConsole * gvir_sandbox_context_get_shell_console (GVirSandboxContext *ctxt,GError **error);
|
the sandbox context. [transfer none] |
Returns : |
the sandbox console (or NULL). [transfer full][allow-none] |
gboolean gvir_sandbox_context_start (GVirSandboxContext *ctxt,GError **error);
gboolean gvir_sandbox_context_stop (GVirSandboxContext *ctxt,GError **error);
"config" property"config" GVirSandboxConfig* : Read / Write / Construct Only
The sandbox configuration.
"connection" property"connection" GVirConnection* : Read / Write / Construct Only
The sandbox connection.