summaryrefslogtreecommitdiff
path: root/libupower-glib/up-version.h.in
diff options
context:
space:
mode:
authorRichard Hughes <richard@hughsie.com>2010-01-25 15:20:09 +0000
committerRichard Hughes <richard@hughsie.com>2010-01-25 15:20:09 +0000
commit0a2b06f2985147a597e9785286317190004fa9a1 (patch)
treeb9bc72b472f1f654140e59197fcc9290c5e1a0d8 /libupower-glib/up-version.h.in
parentb8a200eb481a42adf26d639dbdc2224a6c99f841 (diff)
downloadupower-0a2b06f2985147a597e9785286317190004fa9a1.tar.gz
Add libupower so applications can switch away from devkit-power-gobject
Diffstat (limited to 'libupower-glib/up-version.h.in')
-rw-r--r--libupower-glib/up-version.h.in39
1 files changed, 39 insertions, 0 deletions
diff --git a/libupower-glib/up-version.h.in b/libupower-glib/up-version.h.in
new file mode 100644
index 0000000..2a89c50
--- /dev/null
+++ b/libupower-glib/up-version.h.in
@@ -0,0 +1,39 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*-
+ *
+ * Copyright (C) 2009-2010 Richard Hughes <richard@hughsie.com>
+ *
+ * Licensed under the GNU General Public License Version 2
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#if !defined (__UPOWER_H_INSIDE__) && !defined (UP_COMPILATION)
+#error "Only <upower.h> can be included directly."
+#endif
+
+#ifndef __UP_VERSION_H
+#define __UP_VERSION_H
+
+/* compile time version
+ */
+#define UP_COMPILE_VERSION (0x@VERSION@)
+
+/* check whether a the version is above the compile time version.
+ */
+#define UP_CHECK_VERSION(ver) \
+ (UP_COMPILE_VERSION > (ver) || \
+ (UP_COMPILE_VERSION == (ver)))
+
+#endif /* __UP_VERSION_H */