![]() |
![]() |
![]() |
Libosinfo Reference Manual | ![]() |
---|---|---|---|---|
Top | Description | Object Hierarchy |
#define OSINFO_MEDIA_ERROR #define OSINFO_MEDIA_PROP_ARCHITECTURE #define OSINFO_MEDIA_PROP_INITRD #define OSINFO_MEDIA_PROP_KERNEL #define OSINFO_MEDIA_PROP_PUBLISHER_ID #define OSINFO_MEDIA_PROP_SYSTEM_ID #define OSINFO_MEDIA_PROP_URL #define OSINFO_MEDIA_PROP_VOLUME_ID struct OsinfoMedia; struct OsinfoMediaClass; enum OsinfoMediaError; OsinfoMedia * osinfo_media_create_from_location (const gchar *location
,GCancellable *cancellable
,GError **error
); void osinfo_media_create_from_location_async (const gchar *location
,gint priority
,GCancellable *cancellable
,GAsyncReadyCallback callback
,gpointer user_data
); OsinfoMedia * osinfo_media_create_from_location_finish (GAsyncResult *res
,GError **error
); GQuark osinfo_media_error_quark (void
); const gchar * osinfo_media_get_architecture (OsinfoMedia *media
); const gchar * osinfo_media_get_initrd_path (OsinfoMedia *media
); const gchar * osinfo_media_get_kernel_path (OsinfoMedia *media
); const gchar * osinfo_media_get_publisher_id (OsinfoMedia *media
); const gchar * osinfo_media_get_system_id (OsinfoMedia *media
); const gchar * osinfo_media_get_url (OsinfoMedia *media
); const gchar * osinfo_media_get_volume_id (OsinfoMedia *media
); OsinfoMedia * osinfo_media_new (const gchar *id
,const gchar *architecture
);
struct OsinfoMediaClass { OsinfoEntityClass parent_class; /* class members */ };
typedef enum { OSINFO_MEDIA_ERROR_NO_DESCRIPTORS, OSINFO_MEDIA_ERROR_NO_PVD, OSINFO_MEDIA_ERROR_NO_SVD, OSINFO_MEDIA_ERROR_INSUFFIENT_METADATA, OSINFO_MEDIA_ERROR_NOT_BOOTABLE } OsinfoMediaError;
GError codes used for errors in the OSINFO_MEDIA_ERROR domain, during reading of data from install media location.
OsinfoMedia * osinfo_media_create_from_location (const gchar *location
,GCancellable *cancellable
,GError **error
);
Creates a new OsinfoMedia for installation media at location
. The location
could be any URI that GIO can handle or a local path.
NOTE: Currently this only works for ISO images/devices.
|
the location of an installation media |
|
a GCancellable, or NULL . [allow-none]
|
|
The location where to store any error, or NULL
|
Returns : |
a new OsinfoMedia , or NULL on error. [transfer full] |
void osinfo_media_create_from_location_async (const gchar *location
,gint priority
,GCancellable *cancellable
,GAsyncReadyCallback callback
,gpointer user_data
);
Asynchronous variant of osinfo_media_create_from_location.
OsinfoMedia * osinfo_media_create_from_location_finish (GAsyncResult *res
,GError **error
);
Finishes an asynchronous media object creation process started with osinfo_media_create_from_location_async.
|
a GAsyncResult |
|
The location where to store any error, or NULL
|
Returns : |
a new OsinfoMedia , or NULL on error. [transfer full] |
const gchar * osinfo_media_get_architecture (OsinfoMedia *media
);
Retrieves the target hardware architecture of the OS media
provides.
|
a OsinfoMedia instance |
Returns : |
the hardware architecture, or NULL. [transfer none] |
const gchar * osinfo_media_get_initrd_path (OsinfoMedia *media
);
Retrieves the path to the initrd image in the install tree.
Note: This only applies to installer medias of 'Linux' OS family.
|
a OsinfoMedia instance |
Returns : |
the path to initrd image, or NULL. [transfer none] |
const gchar * osinfo_media_get_kernel_path (OsinfoMedia *media
);
Retrieves the path to the kernel image in the install tree.
Note: This only applies to installer medias of 'Linux' OS family.
|
a OsinfoMedia instance |
Returns : |
the path to kernel image, or NULL. [transfer none] |
const gchar * osinfo_media_get_publisher_id (OsinfoMedia *media
);
If media
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.
|
a OsinfoMedia instance |
Returns : |
the publisher id, or NULL. [transfer none] |
const gchar * osinfo_media_get_system_id (OsinfoMedia *media
);
If media
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.
|
a OsinfoMedia instance |
Returns : |
the system id, or NULL. [transfer none] |
const gchar * osinfo_media_get_url (OsinfoMedia *media
);
The URL to the media
|
a OsinfoMedia instance |
Returns : |
the URL, or NULL. [transfer none] |
const gchar * osinfo_media_get_volume_id (OsinfoMedia *media
);
If media
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.
|
a OsinfoMedia instance |
Returns : |
the volume id, or NULL. [transfer none] |