## OsinfoTree OsinfoTree — An installation tree for a (guest) OS |

## Functions

GQuark | osinfo_tree_error_quark ()
OsinfoTree * | osinfo_tree_new ()
OsinfoTree * | osinfo_tree_create_from_location ()
void | osinfo_tree_create_from_location_async ()
OsinfoTree * | osinfo_tree_create_from_location_finish ()
const gchar * | osinfo_tree_get_architecture ()
const gchar * | osinfo_tree_get_url ()
gboolean | osinfo_tree_has_treeinfo ()
const gchar * | osinfo_tree_get_treeinfo_family ()
const gchar * | osinfo_tree_get_treeinfo_variant ()
const gchar * | osinfo_tree_get_treeinfo_version ()
const gchar * | osinfo_tree_get_treeinfo_arch ()
const gchar * | osinfo_tree_get_boot_iso_path ()
const gchar * | osinfo_tree_get_kernel_path ()
const gchar * | osinfo_tree_get_initrd_path ()

## Properties

gchar * | application-id | Read / Write
gchar * | architecture | Read / Write
gchar * | boot-iso-path | Read / Write
gboolean | has-treeinfo | Read / Write
gchar * | initrd-path | Read / Write
gchar * | kernel-path | Read / Write
gchar * | publisher-id | Read / Write
gchar * | system-id | Read / Write
gchar * | url | Read / Write
gchar * | volume-id | Read / Write

## Types and Values

#define | OSINFO_TREE_ERROR
#define | OSINFO_TREE_PROP_ARCHITECTURE
#define | OSINFO_TREE_PROP_URL
#define | OSINFO_TREE_PROP_TREEINFO_FAMILY
#define | OSINFO_TREE_PROP_TREEINFO_VARIANT
#define | OSINFO_TREE_PROP_TREEINFO_VERSION
#define | OSINFO_TREE_PROP_TREEINFO_ARCH
#define | OSINFO_TREE_PROP_BOOT_ISO
#define | OSINFO_TREE_PROP_KERNEL
#define | OSINFO_TREE_PROP_INITRD
#define | OSINFO_TREE_PROP_HAS_TREEINFO

## Object Hierarchy

        GObject
        ╰── OsinfoEntity
            ╰── OsinfoTree

## Description

OsinfoTree is an entity representing an installation tree a (guest) operating system.

## Functions

### osinfo_tree_error_quark ()

    GQuark
    osinfo_tree_error_quark (void);

### osinfo_tree_new ()

    OsinfoTree *
    osinfo_tree_new (const gchar *id,
                     const gchar *architecture);

### osinfo_tree_create_from_location ()

    OsinfoTree *
    osinfo_tree_create_from_location (const gchar *location,
                                      GCancellable *cancellable,
                                      GError **error);

Creates a new OsinfoTree for installation tree at `location` . The `location` could be any URI that GIO can handle or a local path.

NOTE: Currently this only works for trees with a .treeinfo file

#### Parameters

location | the location of an installation tree |
cancellable | a GCancellable, or `NULL`. | [allow-none]
error | The location where to store any error, or `NULL` |

#### Returns

a new OsinfoTree , or NULL on error.

[transfer full]

### osinfo_tree_create_from_location_async ()

    void
    osinfo_tree_create_from_location_async
                                   (const gchar *location,
                                    gint priority,
                                    GCancellable *cancellable,
                                    GAsyncReadyCallback callback,
                                    gpointer user_data);

Asynchronous variant of osinfo_tree_create_from_location.

#### Parameters

location | the location of an installation tree |
priority | the I/O priority of the request |
cancellable | a GCancellable, or `NULL`. | [allow-none]
callback | Function to call when result of this call is ready |
user_data | The user data to pass to `callback` , or `NULL` |

### osinfo_tree_create_from_location_finish ()

    OsinfoTree *
    osinfo_tree_create_from_location_finish
                                   (GAsyncResult *res,
                                    GError **error);

Finishes an asynchronous tree object creation process started with osinfo_tree_create_from_location_async.

#### Parameters

res | a GAsyncResult |
error | The location where to store any error, or `NULL` |

#### Returns

a new OsinfoTree , or NULL on error.

[transfer full]

### osinfo_tree_get_architecture ()

    const gchar *
    osinfo_tree_get_architecture (OsinfoTree *tree);

Retrieves the target hardware architecture of the OS `tree` provides.

#### Parameters

tree | an OsinfoTree instance |

#### Returns

the hardware architecture, or NULL.

[transfer none]

### osinfo_tree_get_url ()

    const gchar *
    osinfo_tree_get_url (OsinfoTree *tree);

The URL to the `tree`

#### Parameters

tree | an OsinfoTree instance |

#### Returns

the URL, or NULL.

[transfer none]

### osinfo_tree_has_treeinfo ()

    gboolean
    osinfo_tree_has_treeinfo (OsinfoTree *tree);

Return whether a tree has treeinfo or not.

#### Parameters

tree | an OsinfoTree instance |

#### Returns

TRUE if the tree has treeinfo. FALSE otherwise.

### osinfo_tree_get_treeinfo_family ()

    const gchar *
    osinfo_tree_get_treeinfo_family (OsinfoTree *tree);

If `tree` is an ISO9660 image/device, this function retrieves the expected volume ID.

Note: In practice, this will usually not be the exact copy of the volume ID string on the ISO image/device but rather a regular expression that matches it.

#### Parameters

tree | an OsinfoTree instance |

#### Returns

the volume id, or NULL.

[transfer none]

### osinfo_tree_get_treeinfo_variant ()

    const gchar *
    osinfo_tree_get_treeinfo_variant (OsinfoTree *tree);

If `tree` is an ISO9660 image/device, this function retrieves the expected publisher ID.

Note: In practice, this will usually not be the exact copy of the publisher ID string on the ISO image/device but rather a regular expression that matches it.

#### Parameters

tree | an OsinfoTree instance |

#### Returns

the publisher id, or NULL.

[transfer none]

### osinfo_tree_get_treeinfo_version ()

    const gchar *
    osinfo_tree_get_treeinfo_version (OsinfoTree *tree);

If `tree` is an ISO9660 image/device, this function retrieves the expected application ID.

Note: In practice, this will usually not be the exact copy of the application ID string on the ISO image/device but rather a regular expression that matches it.

#### Parameters

tree | an OsinfoTree instance |

#### Returns

the application id, or NULL.

[transfer none]

### osinfo_tree_get_treeinfo_arch ()

    const gchar *
    osinfo_tree_get_treeinfo_arch (OsinfoTree *tree);

If `tree` is an ISO9660 image/device, this function retrieves the expected system ID.

Note: In practice, this will usually not be the exact copy of the system ID string on the ISO image/device but rather a regular expression that matches it.

#### Parameters

tree | an OsinfoTree instance |

#### Returns

the system id, or NULL.

[transfer none]

### osinfo_tree_get_boot_iso_path ()

    const gchar *
    osinfo_tree_get_boot_iso_path (OsinfoTree *tree);

Retrieves the path to the boot_iso image in the install tree.

#### Parameters

tree | an OsinfoTree instance |

#### Returns

the path to boot_iso image, or NULL.

[transfer none]

### osinfo_tree_get_kernel_path ()

    const gchar *
    osinfo_tree_get_kernel_path (OsinfoTree *tree);

Retrieves the path to the kernel image in the install tree.

Note: This only applies to installer trees of 'linux' OS family.

#### Parameters

tree | an OsinfoTree instance |

#### Returns

the path to kernel image, or NULL.

[transfer none]

### osinfo_tree_get_initrd_path ()

    const gchar *
    osinfo_tree_get_initrd_path (OsinfoTree *tree);

Retrieves the path to the initrd image in the install tree.

Note: This only applies to installer trees of 'linux' OS family.

#### Parameters

tree | an OsinfoTree instance |

#### Returns

the path to initrd image, or NULL.

[transfer none]

## Types and Values

### OSINFO_TREE_ERROR

    #define OSINFO_TREE_ERROR (osinfo_tree_error_quark ())

### OSINFO_TREE_PROP_ARCHITECTURE

    #define OSINFO_TREE_PROP_ARCHITECTURE     "architecture"

### OSINFO_TREE_PROP_URL

    #define OSINFO_TREE_PROP_URL              "url"

### OSINFO_TREE_PROP_TREEINFO_FAMILY

    #define OSINFO_TREE_PROP_TREEINFO_FAMILY  "treeinfo-family"

### OSINFO_TREE_PROP_TREEINFO_VARIANT

    #define OSINFO_TREE_PROP_TREEINFO_VARIANT "treeinfo-variant"

### OSINFO_TREE_PROP_TREEINFO_VERSION

    #define OSINFO_TREE_PROP_TREEINFO_VERSION "treeinfo-version"

### OSINFO_TREE_PROP_TREEINFO_ARCH

    #define OSINFO_TREE_PROP_TREEINFO_ARCH    "treeinfo-arch"

### OSINFO_TREE_PROP_BOOT_ISO

    #define OSINFO_TREE_PROP_BOOT_ISO         "boot-iso"

### OSINFO_TREE_PROP_KERNEL

    #define OSINFO_TREE_PROP_KERNEL           "kernel"

### OSINFO_TREE_PROP_INITRD

    #define OSINFO_TREE_PROP_INITRD           "initrd"

### OSINFO_TREE_PROP_HAS_TREEINFO

    #define OSINFO_TREE_PROP_HAS_TREEINFO     "has-treeinfo"

## Property Details

### The `“application-id”` property

      “application-id”           gchar *

Expected application ID (regular expression) for ISO9660 image/device.

Flags: Read / Write

Default value: NULL

### The `“architecture”` property

      “architecture”             gchar *

The target hardware architecture of this tree.

Flags: Read / Write

Default value: NULL

### The `“boot-iso-path”` property

      “boot-iso-path”            gchar *

The path to the boot ISO in the install tree

Flags: Read / Write

Default value: NULL

### The `“has-treeinfo”` property

      “has-treeinfo”             gboolean

Whether the tree has treeinfo or not

Flags: Read / Write

Default value: TRUE

### The `“initrd-path”` property

      “initrd-path”              gchar *

The path to the initrd image in the install tree.

Flags: Read / Write

Default value: NULL

### The `“kernel-path”` property

      “kernel-path”              gchar *

The path to the kernel image in the install tree.

Flags: Read / Write

Default value: NULL

### The `“publisher-id”` property

      “publisher-id”             gchar *

Expected publisher ID (regular expression) for ISO9660 image/device.

Flags: Read / Write

Default value: NULL

### The `“system-id”` property

      “system-id”                gchar *

Expected system ID (regular expression) for ISO9660 image/device.

Flags: Read / Write

Default value: NULL

### The `“url”` property

      “url”                      gchar *

The URL to this tree.

Flags: Read / Write

Default value: NULL

### The `“volume-id”` property

      “volume-id”                gchar *

Expected volume ID (regular expression) for ISO9660 image/device.

Flags: Read / Write

Default value: NULL

## See Also

OsinfoOs