GVirDesignerDomain

GVirDesignerDomain

Functions

GVirDesignerDomain * gvir_designer_domain_new ()
OsinfoOs * gvir_designer_domain_get_os ()
OsinfoPlatform * gvir_designer_domain_get_platform ()
GVirConfigCapabilities * gvir_designer_domain_get_capabilities ()
GVirConfigDomain * gvir_designer_domain_get_config ()
gboolean gvir_designer_domain_supports_machine ()
gboolean gvir_designer_domain_supports_machine_full ()
gboolean gvir_designer_domain_supports_container ()
gboolean gvir_designer_domain_supports_container_full ()
gboolean gvir_designer_domain_setup_machine ()
gboolean gvir_designer_domain_setup_machine_full ()
gboolean gvir_designer_domain_setup_container ()
gboolean gvir_designer_domain_setup_container_full ()
GVirConfigDomainDisk * gvir_designer_domain_add_cdrom_file ()
GVirConfigDomainDisk * gvir_designer_domain_add_cdrom_device ()
GVirConfigDomainDisk * gvir_designer_domain_add_disk_file ()
GVirConfigDomainDisk * gvir_designer_domain_add_disk_device ()
GVirConfigDomainDisk * gvir_designer_domain_add_floppy_file ()
GVirConfigDomainDisk * gvir_designer_domain_add_floppy_device ()
GVirConfigDomainInterface * gvir_designer_domain_add_interface_bridge ()
GVirConfigDomainInterface * gvir_designer_domain_add_interface_network ()
GVirConfigDomainInterface * gvir_designer_domain_add_interface_user ()
GVirConfigDomainGraphics * gvir_designer_domain_add_graphics ()
GVirConfigDomainSmartcard * gvir_designer_domain_add_smartcard ()
GVirConfigDomainSound * gvir_designer_domain_add_sound ()
GVirConfigDomainRedirdev * gvir_designer_domain_add_usb_redir ()
GVirConfigDomainVideo * gvir_designer_domain_add_video ()
gboolean gvir_designer_domain_setup_resources ()
gboolean gvir_designer_domain_remove_all_drivers ()
gboolean gvir_designer_domain_add_driver ()

Properties

GVirConfigCapabilities * capabilities Read / Write / Construct Only
GVirConfigDomain * config Read
OsinfoOs * os Read / Write / Construct Only
OsinfoDb * osinfo-db Read / Write / Construct Only
OsinfoPlatform * platform Read / Write / Construct Only

Types and Values

Object Hierarchy

    GObject
    ╰── GVirDesignerDomain

Description

Functions

gvir_designer_domain_new ()

GVirDesignerDomain *
gvir_designer_domain_new (OsinfoDb *osinfo_db,
                          OsinfoOs *os,
                          OsinfoPlatform *platform,
                          GVirConfigCapabilities *caps);

gvir_designer_domain_get_os ()

OsinfoOs *
gvir_designer_domain_get_os (GVirDesignerDomain *design);

Retrieves the operating system object associated with the designer. The object should not be modified by the caller.

Parameters

design

the domain designer instance.

[transfer none]

Returns

the operating system.

[transfer none]


gvir_designer_domain_get_platform ()

OsinfoPlatform *
gvir_designer_domain_get_platform (GVirDesignerDomain *design);

Retrieves the virtualization platform object associated with the designer. The object should not be modified by the caller.

Parameters

design

the domain designer instance.

[transfer none]

Returns

the virtualization platform.

[transfer none]


gvir_designer_domain_get_capabilities ()

GVirConfigCapabilities *
gvir_designer_domain_get_capabilities (GVirDesignerDomain *design);

Retrieves the capabilities object associated with the designer The object should not be modified by the caller.

Parameters

design

the domain designer instance.

[transfer none]

Returns

the capabilities.

[transfer none]


gvir_designer_domain_get_config ()

GVirConfigDomain *
gvir_designer_domain_get_config (GVirDesignerDomain *design);

Retrieves the domain config object associated with the designer The object may be modified by the caller at will, but should not be freed.

Parameters

design

the domain designer instance.

[transfer none]

Returns

the domain config.

[transfer none]


gvir_designer_domain_supports_machine ()

gboolean
gvir_designer_domain_supports_machine (GVirDesignerDomain *design);

gvir_designer_domain_supports_machine_full ()

gboolean
gvir_designer_domain_supports_machine_full
                               (GVirDesignerDomain *design,
                                const char *arch,
                                GVirConfigDomainOsType ostype);

gvir_designer_domain_supports_container ()

gboolean
gvir_designer_domain_supports_container
                               (GVirDesignerDomain *design);

gvir_designer_domain_supports_container_full ()

gboolean
gvir_designer_domain_supports_container_full
                               (GVirDesignerDomain *design,
                                const char *arch);

gvir_designer_domain_setup_machine ()

gboolean
gvir_designer_domain_setup_machine (GVirDesignerDomain *design,
                                    GError **error);

gvir_designer_domain_setup_machine_full ()

gboolean
gvir_designer_domain_setup_machine_full
                               (GVirDesignerDomain *design,
                                const char *arch,
                                GVirConfigDomainOsType ostype,
                                GError **error);

gvir_designer_domain_setup_container ()

gboolean
gvir_designer_domain_setup_container (GVirDesignerDomain *design,
                                      GError **error);

gvir_designer_domain_setup_container_full ()

gboolean
gvir_designer_domain_setup_container_full
                               (GVirDesignerDomain *design,
                                const char *arch,
                                GError **error);

gvir_designer_domain_add_cdrom_file ()

GVirConfigDomainDisk *
gvir_designer_domain_add_cdrom_file (GVirDesignerDomain *design,
                                     const char *filepath,
                                     const char *format,
                                     GError **error);

Add a new disk to the domain.

Parameters

design

the domain designer instance.

[transfer none]

filepath

the path to a file.

[transfer none]

format

file format.

[transfer none]

error

return location for a GError, or NULL

 

Returns

the pointer to new cdrom. If something fails NULL is returned and error is set.

[transfer full]


gvir_designer_domain_add_cdrom_device ()

GVirConfigDomainDisk *
gvir_designer_domain_add_cdrom_device (GVirDesignerDomain *design,
                                       const char *devpath,
                                       GError **error);

Add given device as a new cdrom to the domain designer instance.

Parameters

design

the domain designer instance.

[transfer none]

devpath

path to the device.

[transfer none]

error

return location for a GError, or NULL

 

Returns

the pointer to the new cdrom. If something fails NULL is returned and error is set.

[transfer full]


gvir_designer_domain_add_disk_file ()

GVirConfigDomainDisk *
gvir_designer_domain_add_disk_file (GVirDesignerDomain *design,
                                    const char *filepath,
                                    const char *format,
                                    GError **error);

Add a new disk to the domain.

Parameters

design

the domain designer instance.

[transfer none]

filepath

the path to a file.

[transfer none]

format

disk format.

[transfer none]

error

return location for a GError, or NULL

 

Returns

the pointer to new disk. If something fails NULL is returned and error is set.

[transfer full]


gvir_designer_domain_add_disk_device ()

GVirConfigDomainDisk *
gvir_designer_domain_add_disk_device (GVirDesignerDomain *design,
                                      const char *devpath,
                                      GError **error);

Add given device as a new disk to the domain designer instance.

Parameters

design

the domain designer instance.

[transfer none]

devpath

path to the device.

[transfer none]

error

return location for a GError, or NULL

 

Returns

the pointer to the new disk. If something fails NULL is returned and error is set.

[transfer full]


gvir_designer_domain_add_floppy_file ()

GVirConfigDomainDisk *
gvir_designer_domain_add_floppy_file (GVirDesignerDomain *design,
                                      const char *filepath,
                                      const char *format,
                                      GError **error);

Add a new disk to the domain.

Parameters

design

the domain designer instance.

[transfer none]

filepath

the path to a file.

[transfer none]

format

file format.

[transfer none]

error

return location for a GError, or NULL

 

Returns

the pointer to new floppy. If something fails NULL is returned and error is set.

[transfer full]


gvir_designer_domain_add_floppy_device ()

GVirConfigDomainDisk *
gvir_designer_domain_add_floppy_device
                               (GVirDesignerDomain *design,
                                const char *devpath,
                                GError **error);

Add given device as a new floppy to the domain designer instance.

Parameters

design

the domain designer instance.

[transfer none]

devpath

path to the device.

[transfer none]

error

return location for a GError, or NULL

 

Returns

the pointer to the new floppy. If something fails NULL is returned and error is set.

[transfer full]


gvir_designer_domain_add_interface_bridge ()

GVirConfigDomainInterface *
gvir_designer_domain_add_interface_bridge
                               (GVirDesignerDomain *design,
                                const char *bridge,
                                GError **error);

Add new network interface card into design . The interface is of 'bridge' type and uses bridge as the bridge device

Parameters

design

the domain designer instance.

[transfer none]

bridge

bridge name.

[transfer none]

error

return location for a GError, or NULL

 

Returns

the pointer to the new interface.

[transfer full]


gvir_designer_domain_add_interface_network ()

GVirConfigDomainInterface *
gvir_designer_domain_add_interface_network
                               (GVirDesignerDomain *design,
                                const char *network,
                                GError **error);

Add new network interface card into design . The interface is of 'network' type with network used as the source network.

Parameters

design

the domain designer instance.

[transfer none]

network

network name.

[transfer none]

error

return location for a GError, or NULL

 

Returns

the pointer to the new interface.

[transfer full]


gvir_designer_domain_add_interface_user ()

GVirConfigDomainInterface *
gvir_designer_domain_add_interface_user
                               (GVirDesignerDomain *design,
                                GError **error);

Add new network interface card into design . The interface is of 'user' type.

Parameters

design

the domain designer instance.

[transfer none]

error

return location for a GError, or NULL

 

Returns

the pointer to the new interface.

[transfer full]


gvir_designer_domain_add_graphics ()

GVirConfigDomainGraphics *
gvir_designer_domain_add_graphics (GVirDesignerDomain *design,
                                   GVirDesignerDomainGraphics type,
                                   GError **error);

Add a new graphical framebuffer to design . This allows to see what the VM displays. Remote display protocols will only be listening on localhost, and the port will be automatically allocated when the VM starts (usually starting at 5900). You can manipulate further the returned GVirConfigDomainGraphics if you want a different behaviour. When setting up a SPICE display, the SPICE agent channel will be automatically added to the VM if it's supported and not already present.

Parameters

design

the domain designer instance.

[transfer none]

error

return location for a GError, or NULL

 

Returns

the pointer to the new graphical framebuffer configuration object.

[transfer full]


gvir_designer_domain_add_smartcard ()

GVirConfigDomainSmartcard *
gvir_designer_domain_add_smartcard (GVirDesignerDomain *design,
                                    GError **error);

Add a new virtual smartcard reader to design . This will allow to share a smartcard reader between the guest and the host.

Parameters

design

the domain designer instance.

[transfer none]

error

return location for a GError, or NULL

 

Returns

the pointer to the new smartcard device.

[transfer full]


gvir_designer_domain_add_sound ()

GVirConfigDomainSound *
gvir_designer_domain_add_sound (GVirDesignerDomain *design,
                                GError **error);

Add a new soundcard to the domain.

Parameters

design

the domain designer instance.

[transfer none]

error

return location for a GError, or NULL

 

Returns

the pointer to the new soundcard. If something fails NULL is returned and error is set.

[transfer full]


gvir_designer_domain_add_usb_redir ()

GVirConfigDomainRedirdev *
gvir_designer_domain_add_usb_redir (GVirDesignerDomain *design,
                                    GError **error);

Add a new usb redirection channel into design . This allows to redirect an USB device from the SPICE client to the guest. One USB device can be redirected per redirection channel, this function can be called multiple times if you need to redirect multiple devices simultaneously. An USB2 EHCI controller and USB1 UHCI controllers will be automatically added to design if design does not have USB controllers yet.

Parameters

design

the domain designer instance.

[transfer none]

error

return location for a GError, or NULL

 

Returns

the pointer to the new USB redir channel.

[transfer full]


gvir_designer_domain_add_video ()

GVirConfigDomainVideo *
gvir_designer_domain_add_video (GVirDesignerDomain *design,
                                GError **error);

Add a new video device into design .

Parameters

design

the domain designer instance.

[transfer none]

error

return location for a GError, or NULL

 

Returns

the pointer to the new video device.

[transfer full]


gvir_designer_domain_setup_resources ()

gboolean
gvir_designer_domain_setup_resources (GVirDesignerDomain *design,
                                      GVirDesignerDomainResources req,
                                      GError **error);

Set minimal or recommended resources on design .

Parameters

design

the domain designer instance.

[transfer none]

req

requirements to set.

[transfer none]

error

return location for a GError, or NULL

 

Returns

TRUE when successfully set, FALSE otherwise.

[transfer none]


gvir_designer_domain_remove_all_drivers ()

gboolean
gvir_designer_domain_remove_all_drivers
                               (GVirDesignerDomain *design,
                                GError **error);

Removes all drivers used in design .

Parameters

design

the domain designer instance

 

error

return location for a GError, or NULL

 

Returns

TRUE when successfully set, FALSE otherwise. see_also gvir_designer_domain_add_driver().

[transfer none]


gvir_designer_domain_add_driver ()

gboolean
gvir_designer_domain_add_driver (GVirDesignerDomain *design,
                                 const char *driver_id,
                                 GError **error);

Instructs libvirt-designer to assume that the driver identified by driver_id is installed in the guest OS. This means that design can use the device associated to driver_id if needed.

Parameters

design

the domain designer instance

 

driver_id

OsInfo id of the driver to Add

 

error

return location for a GError, or NULL

 

Returns

TRUE when successfully set, FALSE otherwise.

[transfer none]

Types and Values

enum GVirDesignerDomainResources

Members

GVIR_DESIGNER_DOMAIN_RESOURCES_MINIMAL

   

GVIR_DESIGNER_DOMAIN_RESOURCES_RECOMMENDED

   

enum GVirDesignerDomainGraphics

Members

GVIR_DESIGNER_DOMAIN_GRAPHICS_DESKTOP

   

GVIR_DESIGNER_DOMAIN_GRAPHICS_RDP

   

GVIR_DESIGNER_DOMAIN_GRAPHICS_SPICE

   

GVIR_DESIGNER_DOMAIN_GRAPHICS_VNC

   

struct GVirDesignerDomain

struct GVirDesignerDomain;

struct GVirDesignerDomainClass

struct GVirDesignerDomainClass {
    GObjectClass parent_class;

    gpointer padding[20];
};

GVirDesignerDomainPrivate

typedef struct _GVirDesignerDomainPrivate GVirDesignerDomainPrivate;

Property Details

The “capabilities” property

  “capabilities”             GVirConfigCapabilities *

Capabilities.

Flags: Read / Write / Construct Only


The “config” property

  “config”                   GVirConfigDomain *

Domain config.

Flags: Read


The “os” property

  “os”                       OsinfoOs *

Operating system.

Flags: Read / Write / Construct Only


The “osinfo-db” property

  “osinfo-db”                OsinfoDb *

libosinfo database.

Flags: Read / Write / Construct Only


The “platform” property

  “platform”                 OsinfoPlatform *

Platform.

Flags: Read / Write / Construct Only