[network-manager-applet/th/proxy-bgo621767: 1/6] shared: add "nm-libnm-compat.h"
- From: Thomas Haller <thaller src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [network-manager-applet/th/proxy-bgo621767: 1/6] shared: add "nm-libnm-compat.h"
- Date: Tue, 6 Dec 2016 13:57:56 +0000 (UTC)
commit 2b9a64349c250617e68886f5e41aee65ced7f235
Author: Thomas Haller <thaller redhat com>
Date: Tue Oct 4 14:48:23 2016 +0200
shared: add "nm-libnm-compat.h"
In the past, when applet used a new API from libnm, we would just
bump the required libnm version. As we anyway released new versions
of the applet with every NetworkManager release, that was ok.
But that means, that 'master' of nm-applet only works with the latest
NetworkManager API. At the same time it means, that a user who is
restricted to an older NetworkManager API cannot use the master build.
Such a user had to rely on important fixes to be backported from master
to the stable branch that was suitable for the NetworkManager API that
he had. That means, upstream there are multiple versions of the applet,
whereas most people would like to have the newest version (or at least
the features and improvements from there).
Now we don't want to branch anymore simply because we require a newer
libnm API. This is somewhat more effort to maintain a master that works
with different libnm APIs, but on the other hand, it saves work by
having to maintain only one upstream branch.
Preferably, we perform runtime detection of the present API. Otherwise,
we do compile-time detection.
"nm-libnm-compat.h" is to privide utilities to access new API or provide
workarounds.
shared/Makefile.am | 1 +
shared/nm-default.h | 2 ++
shared/nm-libnm-compat.h | 25 +++++++++++++++++++++++++
3 files changed, 28 insertions(+), 0 deletions(-)
---
diff --git a/shared/Makefile.am b/shared/Makefile.am
index 6cc2ad8..2e45201 100644
--- a/shared/Makefile.am
+++ b/shared/Makefile.am
@@ -7,4 +7,5 @@ EXTRA_DIST = \
nm-utils/nm-test-utils.h \
nm-utils/nm-vpn-editor-plugin-call.h \
nm-default.h \
+ nm-libnm-compat.h \
$(NULL)
diff --git a/shared/nm-default.h b/shared/nm-default.h
index 5b3a8d3..56c03dc 100644
--- a/shared/nm-default.h
+++ b/shared/nm-default.h
@@ -75,6 +75,8 @@
#include <NetworkManager.h>
#endif /* NM_NETWORKMANAGER_COMPILATION_LIB_LEGACY */
+#include "nm-libnm-compat.h"
+
/*****************************************************************************/
#endif /* __NM_DEFAULT_H__ */
diff --git a/shared/nm-libnm-compat.h b/shared/nm-libnm-compat.h
new file mode 100644
index 0000000..7023cb3
--- /dev/null
+++ b/shared/nm-libnm-compat.h
@@ -0,0 +1,25 @@
+/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
+/* NetworkManager -- Network link manager
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301 USA.
+ *
+ * (C) Copyright 2016 Red Hat, Inc.
+ */
+
+#ifndef __NM_LIBNM_COMPAT_H__
+#define __NM_LIBNM_COMPAT_H__
+
+#endif /* __NM_LIBNM_COMPAT_H__ */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]