changeset 1762:e7ce50fe19a9

Introduce mcabber/api.h Bump API revision to 2
author Myhailo Danylenko <isbear@ukrpost.net>
date Sat, 13 Mar 2010 18:17:10 +0200
parents 61f0482d3993
children 5b497046df40
files mcabber/configure.ac mcabber/include/config.h.in mcabber/mcabber/Makefile.am mcabber/mcabber/api.h mcabber/mcabber/modules.h
diffstat 5 files changed, 15 insertions(+), 13 deletions(-) [+]
line wrap: on
line diff
--- a/mcabber/configure.ac	Sat Mar 13 18:12:47 2010 +0200
+++ b/mcabber/configure.ac	Sat Mar 13 18:17:10 2010 +0200
@@ -259,8 +259,6 @@
 
 # Prepare some config.h variables
 AC_DEFINE([MCABBER_BRANCH], "dev", [Mcabber branch])
-AC_DEFINE([MCABBER_API_VERSION], 1, [Mcabber API version])
-AC_DEFINE([MCABBER_API_MIN], 1, [Minimum supported mcabber API version])
 AC_DEFINE([MCABBER_VERSION], "AC_PACKAGE_VERSION", [Mcabber version string])
 
 # We need _GNU_SOURCE for strptime() and strcasestr()
--- a/mcabber/include/config.h.in	Sat Mar 13 18:12:47 2010 +0200
+++ b/mcabber/include/config.h.in	Sat Mar 13 18:17:10 2010 +0200
@@ -55,12 +55,6 @@
 /* Mcabber branch name (string) */
 #undef MCABBER_BRANCH
 
-/* Api version of mcabber branch */
-#undef MCABBER_API_VERSION
-
-/* XXX */
-#undef MCABBER_API_MIN
-
 /* Mcabber version (string) */
 #undef MCABBER_VERSION
 
--- a/mcabber/mcabber/Makefile.am	Sat Mar 13 18:12:47 2010 +0200
+++ b/mcabber/mcabber/Makefile.am	Sat Mar 13 18:17:10 2010 +0200
@@ -32,7 +32,7 @@
 endif
 
 if INSTALL_HEADERS
-mcabber_SOURCES += modules.c modules.h
+mcabber_SOURCES += modules.c modules.h api.h
 mcabberinclude_HEADERS = main.h roster.h events.h \
 			 commands.h compl.h \
 			 hbuf.h screen.h logprint.h \
@@ -41,7 +41,7 @@
 			 xmpp.h xmpp_helper.h xmpp_defines.h \
 			 xmpp_iq.h xmpp_iqrequest.h \
 			 xmpp_muc.h xmpp_s10n.h \
-			 caps.h fifo.h help.h modules.h \
+			 caps.h fifo.h help.h modules.h api.h \
 			 $(top_srcdir)/include/config.h
 
 if OTR
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mcabber/mcabber/api.h	Sat Mar 13 18:17:10 2010 +0200
@@ -0,0 +1,12 @@
+#ifndef __MCABBER_API_H__
+#define __MCABBER_API_H__ 1
+
+#include <mcabber/config.h> // For MCABBER_BRANCH
+
+#define MCABBER_API_VERSION 2
+#define MCABBER_API_MIN     1
+
+extern const gchar *mcabber_branch;
+extern const guint mcabber_api_version;
+
+#endif
--- a/mcabber/mcabber/modules.h	Sat Mar 13 18:12:47 2010 +0200
+++ b/mcabber/mcabber/modules.h	Sat Mar 13 18:17:10 2010 +0200
@@ -3,7 +3,7 @@
 
 #include <glib.h>
 #include <gmodule.h>
-#include <mcabber/config.h> // MCABBER_BRANCH, MCABBER_API_VERSION
+#include <mcabber/api.h> // MCABBER_BRANCH, MCABBER_API_VERSION
 
 // Module loading process looks like this:
 //   check, if module is loaded
@@ -51,8 +51,6 @@
 
 // Registry of loaded modules
 extern GSList *loaded_modules;
-extern const gchar *mcabber_branch;
-extern const guint mcabber_api_version;
 
 // Should be considered mcabber private and not a part of api