diff options
author | Richard Hughes <richard@hughsie.com> | 2010-01-25 16:26:47 +0000 |
---|---|---|
committer | Richard Hughes <richard@hughsie.com> | 2010-01-25 16:54:17 +0000 |
commit | 27fada20be7feba6783abc5b6cad91ee274ad3df (patch) | |
tree | ee0cbd3518a6f73762979ce9ff2f2d5a81de2335 /libupower-glib/up-version.h.in | |
parent | 69c06340a80420b20c53a08ce4c54a5f4df7f983 (diff) | |
download | upower-27fada20be7feba6783abc5b6cad91ee274ad3df.tar.gz |
trivial: add some gtk-doc markup into libupower-glib and hook it up to the build system
Diffstat (limited to 'libupower-glib/up-version.h.in')
-rw-r--r-- | libupower-glib/up-version.h.in | 42 |
1 files changed, 36 insertions, 6 deletions
diff --git a/libupower-glib/up-version.h.in b/libupower-glib/up-version.h.in index 2a89c50..149703e 100644 --- a/libupower-glib/up-version.h.in +++ b/libupower-glib/up-version.h.in @@ -19,6 +19,16 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ +/** + * SECTION:up-version + * @short_description: Obtains the version for the installed UPower + * + * These compile time macros allow the user to enable parts of client code + * depending on the version of libupower-glib installed. + * + * See also: #UpClient, #UpDevice + */ + #if !defined (__UPOWER_H_INSIDE__) && !defined (UP_COMPILATION) #error "Only <upower.h> can be included directly." #endif @@ -26,14 +36,34 @@ #ifndef __UP_VERSION_H #define __UP_VERSION_H -/* compile time version +/** + * UP_CHECK_VERSION: + * + * The compile-time major version + */ +#define UP_MAJOR_VERSION (@UP_MAJOR_VERSION@) + +/** + * UP_CHECK_MINOR: + * + * The compile-time minor version + */ +#define UP_MINOR_VERSION (@UP_MINOR_VERSION@) + +/** + * UP_MICRO_VERSION: + * + * The compile-time micro version */ -#define UP_COMPILE_VERSION (0x@VERSION@) +#define UP_MICRO_VERSION (@UP_MICRO_VERSION@) -/* check whether a the version is above the compile time version. +/* check whether a UPower version equal to or greater than + * major.minor.micro. */ -#define UP_CHECK_VERSION(ver) \ - (UP_COMPILE_VERSION > (ver) || \ - (UP_COMPILE_VERSION == (ver))) +#define UP_CHECK_VERSION(major,minor,micro) \ + (UP_MAJOR_VERSION > (major) || \ + (UP_MAJOR_VERSION == (major) && UP_MINOR_VERSION > (minor)) || \ + (UP_MAJOR_VERSION == (major) && UP_MINOR_VERSION == (minor) && \ + UP_MICRO_VERSION >= (micro))) #endif /* __UP_VERSION_H */ |