|  |  |  | Libvirt-gobject Reference Manual |  | 
|---|---|---|---|---|
| Top | Description | Object Hierarchy | Properties | Signals | ||||
struct GVirConnection; struct GVirConnectionClass; struct GVirNodeInfo; void gvir_connection_close (GVirConnection *conn); GVirDomain * gvir_connection_create_domain (GVirConnection *conn,GVirConfigDomain *conf,GError **err); GVirStoragePool * gvir_connection_create_storage_pool (GVirConnection *conn,GVirConfigStoragePool *conf,guint flags,GError **err); gboolean gvir_connection_fetch_domains (GVirConnection *conn,GCancellable *cancellable,GError **err); void gvir_connection_fetch_domains_async (GVirConnection *conn,GCancellable *cancellable,GAsyncReadyCallback callback,gpointer user_data); gboolean gvir_connection_fetch_domains_finish (GVirConnection *conn,GAsyncResult *result,GError **err); gboolean gvir_connection_fetch_storage_pools (GVirConnection *conn,GCancellable *cancellable,GError **err); void gvir_connection_fetch_storage_pools_async (GVirConnection *conn,GCancellable *cancellable,GAsyncReadyCallback callback,gpointer user_data); gboolean gvir_connection_fetch_storage_pools_finish (GVirConnection *conn,GAsyncResult *result,GError **err); GVirDomain * gvir_connection_find_domain_by_id (GVirConnection *conn,gint id); GVirDomain * gvir_connection_find_domain_by_name (GVirConnection *conn,const gchar *name); GVirInterface * gvir_connection_find_interface_by_mac (GVirConnection *conn,const gchar *macaddr); GVirNetwork * gvir_connection_find_network_by_name (GVirConnection *conn,const gchar *name); GVirNetworkFilter * gvir_connection_find_network_filter_by_name (GVirConnection *conn,const gchar *name); GVirStoragePool * gvir_connection_find_storage_pool_by_name (GVirConnection *conn,const gchar *name); GVirDomain * gvir_connection_get_domain (GVirConnection *conn,const gchar *uuid); GList * gvir_connection_get_domains (GVirConnection *conn); GVirInterface * gvir_connection_get_interface (GVirConnection *conn,const gchar *name); GList * gvir_connection_get_interfaces (GVirConnection *conn); GVirNetwork * gvir_connection_get_network (GVirConnection *conn,const gchar *uuid); GVirNetworkFilter * gvir_connection_get_network_filter (GVirConnection *conn,const gchar *uuid); GList * gvir_connection_get_network_filters (GVirConnection *conn); GList * gvir_connection_get_networks (GVirConnection *conn); GVirNodeDevice * gvir_connection_get_node_device (GVirConnection *conn,const gchar *name); GList * gvir_connection_get_node_devices (GVirConnection *conn); GVirNodeInfo * gvir_connection_get_node_info (GVirConnection *conn,GError **err); GVirSecret * gvir_connection_get_secret (GVirConnection *conn,const gchar *uuid); GList * gvir_connection_get_secrets (GVirConnection *conn); GVirStoragePool * gvir_connection_get_storage_pool (GVirConnection *conn,const gchar *uuid); GList * gvir_connection_get_storage_pools (GVirConnection *conn); GVirStream * gvir_connection_get_stream (GVirConnection *conn,guint flags); const gchar * gvir_connection_get_uri (GVirConnection *conn); gboolean gvir_connection_is_open (GVirConnection *conn); GVirConnection * gvir_connection_new (const char *uri); gboolean gvir_connection_open (GVirConnection *conn,GCancellable *cancellable,GError **err); void gvir_connection_open_async (GVirConnection *conn,GCancellable *cancellable,GAsyncReadyCallback callback,gpointer user_data); gboolean gvir_connection_open_finish (GVirConnection *conn,GAsyncResult *result,GError **err); GVirDomain * gvir_connection_start_domain (GVirConnection *conn,GVirConfigDomain *conf,guint flags,GError **err);
"handle" GVirConnectionHandle* : Read / Write / Construct Only "uri" gchar* : Read / Write / Construct Only
"connection-closed" :Run First"connection-opened" :Run First"domain-added" :Run First"domain-removed" :Run First
struct GVirConnectionClass {
    GObjectClass parent_class;
    /* signals */
    void (*connection_opened)(GVirConnection *conn);
    void (*connection_closed)(GVirConnection *conn);
    void (*domain_added)(GVirConnection *conn, GVirDomain *dom);
    void (*domain_removed)(GVirConnection *conn, GVirDomain *dom);
    GVirStream *(*stream_new)(GVirConnection *conn, gpointer handle);
    gpointer padding[20];
};
struct GVirNodeInfo {
    gchar model[32]; /* string indicating the CPU model */
    gulong memory;   /* memory size in kilobytes */
    guint cpus;      /* the number of active CPUs */
    guint mhz;       /* expected CPU frequency */
    guint nodes;     /* the number of NUMA cell, 1 for unusual NUMA topologies or uniform memo */
    guint sockets;   /* number of CPU sockets per node if nodes > 1, total number of CPU socke */
    guint cores;     /* number of cores per socket */
    guint threads;   /* number of threads per core */
};
GVirDomain * gvir_connection_create_domain (GVirConnection *conn,GVirConfigDomain *conf,GError **err);
Create the configuration file for a new persistent domain. The returned domain will initially be in the shutoff state.
| 
 | the connection on which to create the domain | 
| 
 | the configuration for the new domain | 
| Returns : | the newly created domain. [transfer full] | 
GVirStoragePool * gvir_connection_create_storage_pool (GVirConnection *conn,GVirConfigStoragePool *conf,guint flags,GError **err);
| 
 | the connection on which to create the pool | 
| 
 | the configuration for the new storage pool | 
| 
 | the flags | 
| 
 | return location for any GError | 
| Returns : | the newly created storage pool. [transfer full] | 
gboolean gvir_connection_fetch_domains (GVirConnection *conn,GCancellable *cancellable,GError **err);
| 
 | the connection | 
| 
 | cancellation object. [allow-none][transfer none] | 
void gvir_connection_fetch_domains_async (GVirConnection *conn,GCancellable *cancellable,GAsyncReadyCallback callback,gpointer user_data);
| 
 | the connection | 
| 
 | cancellation object. [allow-none][transfer none] | 
| 
 | completion callback. [scope async] | 
| 
 | opaque data for callback. [closure] | 
gboolean gvir_connection_fetch_domains_finish (GVirConnection *conn,GAsyncResult *result,GError **err);
| 
 | the connection | 
| 
 | async method result. [transfer none] | 
gboolean gvir_connection_fetch_storage_pools (GVirConnection *conn,GCancellable *cancellable,GError **err);
| 
 | the connection | 
| 
 | cancellation object. [allow-none][transfer none] | 
void gvir_connection_fetch_storage_pools_async (GVirConnection *conn,GCancellable *cancellable,GAsyncReadyCallback callback,gpointer user_data);
| 
 | the connection | 
| 
 | cancellation object. [allow-none][transfer none] | 
| 
 | completion callback. [scope async] | 
| 
 | opaque data for callback. [closure] | 
gboolean gvir_connection_fetch_storage_pools_finish (GVirConnection *conn,GAsyncResult *result,GError **err);
| 
 | the connection | 
| 
 | async method result. [transfer none] | 
GVirDomain * gvir_connection_find_domain_by_id (GVirConnection *conn,gint id);
| 
 | id of the requested domain | 
| Returns : | the GVirDomain, or NULL. [transfer full] | 
GVirDomain * gvir_connection_find_domain_by_name (GVirConnection *conn,const gchar *name);
| 
 | name of the requested domain | 
| Returns : | the GVirDomain, or NULL. [transfer full] | 
GVirInterface * gvir_connection_find_interface_by_mac (GVirConnection *conn,const gchar *macaddr);
GVirNetwork * gvir_connection_find_network_by_name (GVirConnection *conn,const gchar *name);
GVirNetworkFilter * gvir_connection_find_network_filter_by_name (GVirConnection *conn,const gchar *name);
GVirStoragePool * gvir_connection_find_storage_pool_by_name (GVirConnection *conn,const gchar *name);
| 
 | name of the requested storage pool | 
| Returns : | the GVirStoragePool, or NULL. [transfer full] | 
GVirDomain * gvir_connection_get_domain (GVirConnection *conn,const gchar *uuid);
| 
 | uuid string of the requested domain | 
| Returns : | the GVirDomain, or NULL. [transfer full] | 
GList *             gvir_connection_get_domains         (GVirConnection *conn);
| Returns : | List of GVirDomain. [element-type LibvirtGObject.Domain][transfer full] | 
GVirInterface * gvir_connection_get_interface (GVirConnection *conn,const gchar *name);
GVirNetwork * gvir_connection_get_network (GVirConnection *conn,const gchar *uuid);
GVirNetworkFilter * gvir_connection_get_network_filter (GVirConnection *conn,const gchar *uuid);
GList *             gvir_connection_get_network_filters (GVirConnection *conn);
GVirNodeDevice * gvir_connection_get_node_device (GVirConnection *conn,const gchar *name);
GList *             gvir_connection_get_node_devices    (GVirConnection *conn);
GVirNodeInfo * gvir_connection_get_node_info (GVirConnection *conn,GError **err);
| 
 | the connection | 
| 
 | return location for any GError | 
| Returns : | the info. [transfer full] | 
GVirSecret * gvir_connection_get_secret (GVirConnection *conn,const gchar *uuid);
GVirStoragePool * gvir_connection_get_storage_pool (GVirConnection *conn,const gchar *uuid);
| 
 | uuid string of the requested storage pool | 
| Returns : | the GVirStoragePool, or NULL. [transfer full] | 
GList *             gvir_connection_get_storage_pools   (GVirConnection *conn);
| Returns : | List of GVirStoragePool. [element-type LibvirtGObject.StoragePool][transfer full] | 
GVirStream * gvir_connection_get_stream (GVirConnection *conn,guint flags);
| 
 | flags to use for the stream | 
| Returns : | a GVirStream stream, or NULL. [transfer full] | 
gboolean gvir_connection_open (GVirConnection *conn,GCancellable *cancellable,GError **err);
| 
 | the connection | 
| 
 | cancellation object. [allow-none][transfer none] | 
void gvir_connection_open_async (GVirConnection *conn,GCancellable *cancellable,GAsyncReadyCallback callback,gpointer user_data);
| 
 | the connection | 
| 
 | cancellation object. [allow-none][transfer none] | 
| 
 | completion callback. [scope async] | 
| 
 | opaque data for callback. [closure] | 
gboolean gvir_connection_open_finish (GVirConnection *conn,GAsyncResult *result,GError **err);
| 
 | the connection | 
| 
 | async method result. [transfer none] | 
GVirDomain * gvir_connection_start_domain (GVirConnection *conn,GVirConfigDomain *conf,guint flags,GError **err);
Start a new transient domain without persistent configuration. The returned domain will initially be running.
| 
 | the connection on which to create the domain | 
| 
 | the configuration for the new domain | 
| Returns : | the newly created domain. [transfer full] | 
"handle" property  "handle"                   GVirConnectionHandle*  : Read / Write / Construct Only
The connection handle.
"uri" property"uri" gchar* : Read / Write / Construct Only
The connection URI.
Default value: NULL
"connection-closed" signalvoid                user_function                      (GVirConnection *gvirconnection,
                                                        gpointer        user_data)           : Run First
"connection-opened" signalvoid                user_function                      (GVirConnection *gvirconnection,
                                                        gpointer        user_data)           : Run First
"domain-added" signalvoid                user_function                      (GVirConnection *gvirconnection,
                                                        GVirDomain     *arg1,
                                                        gpointer        user_data)           : Run First
"domain-removed" signalvoid                user_function                      (GVirConnection *gvirconnection,
                                                        GVirDomain     *arg1,
                                                        gpointer        user_data)           : Run First