[Libosinfo] [v2 1/8] API to query format of device driver

Christophe Fergeau cfergeau at redhat.com
Wed Feb 13 17:04:01 UTC 2013


On Sun, Feb 10, 2013 at 06:41:02PM +0200, Zeeshan Ali (Khattak) wrote:
> diff --git a/osinfo/osinfo_device_driver.h b/osinfo/osinfo_device_driver.h
> index c894fe8..dae3f97 100644
> --- a/osinfo/osinfo_device_driver.h
> +++ b/osinfo/osinfo_device_driver.h
> @@ -55,6 +55,7 @@ typedef struct _OsinfoDeviceDriverPrivate OsinfoDeviceDriverPrivate;
>  #define OSINFO_DEVICE_DRIVER_PROP_PRE_INSTALLABLE "pre-installable"
>  #define OSINFO_DEVICE_DRIVER_PROP_FILE            "file"
>  #define OSINFO_DEVICE_DRIVER_PROP_DEVICE          "device"
> +#define OSINFO_DEVICE_DRIVER_PROP_FORMAT          "format"
>  
>  /* object */
>  struct _OsinfoDeviceDriver
> @@ -76,6 +77,24 @@ struct _OsinfoDeviceDriverClass
>      /* class members */
>  };
>  
> +/**
> + * OsinfoDeviceDriverFormat:
> + * @OSINFO_DEVICE_DRIVER_FORMAT_WINDOWS: Windows specific driver in the form of
> + *                                       .cat, .inf, .sys and (optionally) .dll
> + *                                       files.
> + * @OSINFO_DEVICE_DRIVER_FORMAT_SCRIPT: OS-specific installer script. For
> + *                                      Unix/Linux, this means files with '.sh'
> + *                                      extension with executable permission
> + *                                      bits set. For Windows, this would mean
> + *                                      files with '.cmd' extension.
> + * @OSINFO_DEVICE_DRIVER_FORMAT_PACKAGE: OS-specific installer package (e.g RPM or DEB etc).
> + */
> +typedef enum {
> +    OSINFO_DEVICE_DRIVER_FORMAT_WINDOWS,
> +    OSINFO_DEVICE_DRIVER_FORMAT_SCRIPT,
> +    OSINFO_DEVICE_DRIVER_FORMAT_PACKAGE
> +} OsinfoDeviceDriverFormat;
> +
>  GType osinfo_device_driver_get_type(void);
>  
>  const gchar *osinfo_device_driver_get_architecture(OsinfoDeviceDriver *driver);
> @@ -83,6 +102,7 @@ const gchar *osinfo_device_driver_get_location(OsinfoDeviceDriver *driver);
>  gboolean osinfo_device_driver_get_pre_installable(OsinfoDeviceDriver *driver);
>  GList *osinfo_device_driver_get_files(OsinfoDeviceDriver *driver);
>  OsinfoDeviceList *osinfo_device_driver_get_devices(OsinfoDeviceDriver *driver);
> +OsinfoDeviceDriverFormat osinfo_device_driver_get_format(OsinfoDeviceDriver *driver);

int is preferrable to OsinfoDeviceDriverFormat here from an ABI stability
point of view. Patch looks good apart from this, and the concerns I
mentioned in another email.

Christophe
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libosinfo/attachments/20130213/d5236980/attachment.sig>


More information about the Libosinfo mailing list