[Libosinfo] [PATCH 1/4] Add release status info to OS entries
Christophe Fergeau
cfergeau at redhat.com
Tue Nov 26 16:11:30 UTC 2013
On Tue, Nov 26, 2013 at 04:00:37PM +0000, Zeeshan Ali (Khattak) wrote:
> diff --git a/osinfo/osinfo_os.h b/osinfo/osinfo_os.h
> index d667e3b..433c511 100644
> --- a/osinfo/osinfo_os.h
> +++ b/osinfo/osinfo_os.h
> @@ -55,8 +55,9 @@ typedef struct _OsinfoOsClass OsinfoOsClass;
>
> typedef struct _OsinfoOsPrivate OsinfoOsPrivate;
>
> -#define OSINFO_OS_PROP_FAMILY "family"
> -#define OSINFO_OS_PROP_DISTRO "distro"
> +#define OSINFO_OS_PROP_FAMILY "family"
> +#define OSINFO_OS_PROP_DISTRO "distro"
> +#define OSINFO_OS_PROP_RELEASE_STATUS "release-status"
>
> /* object */
> struct _OsinfoOs
> @@ -78,6 +79,21 @@ struct _OsinfoOsClass
> /* class members */
> };
>
> +/**
> + * OsinfoReleaseStatus:
> + * @OSINFO_RELEASE_STATUS_RELEASED: A released OS.
> + * @OSINFO_RELEASE_STATUS_SNAPSHOT: A continuous integration snapshot and not
> + * an actual released product yet. For example, gnome-continuous images for
> + * development snapshots of GNOME and nightly build ISOs of Fedora etc.
> + * @OSINFO_RELEASE_STATUS_PRERELEASE: A pre-release. For example, alpha and
> + * beta pre-releases of Fedora etc.
> + */
> +typedef enum {
> + OSINFO_RELEASE_STATUS_RELEASED,
> + OSINFO_RELEASE_STATUS_SNAPSHOT,
> + OSINFO_RELEASE_STATUS_PRERELEASE
> +} OsinfoReleaseStatus;
> +
> GType osinfo_os_get_type(void);
>
> OsinfoOs *osinfo_os_new(const gchar *id);
> @@ -93,6 +109,7 @@ OsinfoDeviceLinkList *osinfo_os_get_device_links(OsinfoOs *os, OsinfoFilter *fil
> OsinfoDeviceLink *osinfo_os_add_device(OsinfoOs *os, OsinfoDevice *dev);
> const gchar *osinfo_os_get_family(OsinfoOs *os);
> const gchar *osinfo_os_get_distro(OsinfoOs *os);
> +OsinfoReleaseStatus osinfo_os_get_release_status(OsinfoOs *os);
We should avoid enums in public methods as their size could change, which
would break ABI too.
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/20131126/64634b11/attachment.sig>
More information about the Libosinfo
mailing list