OsinfoPlatform

OsinfoPlatform — An virtualization platform

Synopsis

struct              OsinfoPlatform;
struct              OsinfoPlatformClass;
OsinfoDeviceLink *  osinfo_platform_add_device          (OsinfoPlatform *platform,
                                                         OsinfoDevice *dev);
OsinfoDeviceLinkList * osinfo_platform_get_device_links (OsinfoPlatform *platform,
                                                         OsinfoFilter *filter);
OsinfoDeviceList *  osinfo_platform_get_devices         (OsinfoPlatform *platform,
                                                         OsinfoFilter *filter);
OsinfoPlatform *    osinfo_platform_new                 (const gchar *id);

Object Hierarchy

  GObject
   +----OsinfoEntity
         +----OsinfoProduct
               +----OsinfoPlatform

Description

OsinfoPlatform is an entity representing an virtualization platform. Platforms have a list of supported devices

Details

struct OsinfoPlatform

struct OsinfoPlatform;

struct OsinfoPlatformClass

struct OsinfoPlatformClass {
    OsinfoProductClass parent_class;

    /* class members */
};

osinfo_platform_add_device ()

OsinfoDeviceLink *  osinfo_platform_add_device          (OsinfoPlatform *platform,
                                                         OsinfoDevice *dev);

Associate a device with a platform. The returned OsinfoDeviceLink can be used to record extra metadata against the link

platform :

a platform entity

dev :

the device to associate. [transfer none]

Returns :

the device association. [transfer none]

osinfo_platform_get_device_links ()

OsinfoDeviceLinkList * osinfo_platform_get_device_links (OsinfoPlatform *platform,
                                                         OsinfoFilter *filter);

Retrieve all the associated devices matching the filter. The filter matches against the link, not the device.

platform :

a platform entity

filter :

an optional filter. [transfer none][allow-none]

Returns :

a list of OsinfoDevice entities. [transfer full]

osinfo_platform_get_devices ()

OsinfoDeviceList *  osinfo_platform_get_devices         (OsinfoPlatform *platform,
                                                         OsinfoFilter *filter);

Retrieve all the associated devices matching the filter. The filter matches against the device, not the link.

platform :

a platform entity

filter :

an optional filter. [transfer none][allow-none]

Returns :

a list of OsinfoDevice entities. [transfer full]

osinfo_platform_new ()

OsinfoPlatform *    osinfo_platform_new                 (const gchar *id);

Create a new platform entity

id :

a unique identifier

Returns :

A platform entity. [transfer full]

See Also

OsinfoOs, OsinfoPlatform