From 539dfbcc42228185f4f2d490040e1761808f7d01 Mon Sep 17 00:00:00 2001 From: Thomas Haller Date: Mon, 6 May 2019 12:11:23 +0200 Subject: [PATCH] libnm: add "libnm-core/nm-team-utils.h" --- Makefile.am | 25 ++++++++++++++++--------- libnm-core/meson.build | 5 +++-- libnm-core/nm-team-utils.c | 22 ++++++++++++++++++++++ libnm-core/nm-team-utils.h | 27 +++++++++++++++++++++++++++ 4 files changed, 68 insertions(+), 11 deletions(-) create mode 100644 libnm-core/nm-team-utils.c create mode 100644 libnm-core/nm-team-utils.h diff --git a/Makefile.am b/Makefile.am index 8e8e7e86c0..cf2ee34a1f 100644 --- a/Makefile.am +++ b/Makefile.am @@ -791,21 +791,25 @@ libnm_core_lib_h_pub_real = \ libnm-core/nm-version.h \ libnm-core/nm-vpn-dbus-interface.h \ libnm-core/nm-vpn-editor-plugin.h \ - libnm-core/nm-vpn-plugin-info.h + libnm-core/nm-vpn-plugin-info.h \ + $(NULL) libnm_core_lib_h_pub_mkenums = \ - libnm-core/nm-core-enum-types.h + libnm-core/nm-core-enum-types.h \ + $(NULL) libnm_core_lib_h_priv = \ shared/nm-meta-setting.h \ - libnm-core/nm-crypto.h \ - libnm-core/nm-crypto-impl.h \ libnm-core/nm-connection-private.h \ libnm-core/nm-core-internal.h \ libnm-core/nm-core-types-internal.h \ + libnm-core/nm-crypto-impl.h \ + libnm-core/nm-crypto.h \ libnm-core/nm-keyfile-internal.h \ libnm-core/nm-keyfile-utils.h \ libnm-core/nm-property-compare.h \ libnm-core/nm-setting-private.h \ - libnm-core/nm-utils-private.h + libnm-core/nm-team-utils.h \ + libnm-core/nm-utils-private.h \ + $(NULL) libnm_core_lib_c_settings_real = \ libnm-core/nm-setting-6lowpan.c \ libnm-core/nm-setting-8021x.c \ @@ -853,22 +857,25 @@ libnm_core_lib_c_settings_real = \ libnm-core/nm-setting-wireguard.c \ libnm-core/nm-setting-wireless-security.c \ libnm-core/nm-setting-wireless.c \ - libnm-core/nm-setting-wpan.c + libnm-core/nm-setting-wpan.c \ + $(NULL) libnm_core_lib_c_real = \ $(libnm_core_lib_c_settings_real) \ shared/nm-meta-setting.c \ - libnm-core/nm-crypto.c \ libnm-core/nm-connection.c \ + libnm-core/nm-crypto.c \ libnm-core/nm-dbus-utils.c \ libnm-core/nm-errors.c \ - libnm-core/nm-keyfile.c \ libnm-core/nm-keyfile-utils.c \ + libnm-core/nm-keyfile.c \ libnm-core/nm-property-compare.c \ libnm-core/nm-setting.c \ libnm-core/nm-simple-connection.c \ + libnm-core/nm-team-utils.c \ libnm-core/nm-utils.c \ libnm-core/nm-vpn-editor-plugin.c \ - libnm-core/nm-vpn-plugin-info.c + libnm-core/nm-vpn-plugin-info.c \ + $(NULL) if WITH_JSON_VALIDATION libnm_core_lib_h_priv += \ diff --git a/libnm-core/meson.build b/libnm-core/meson.build index 25ed019831..361c82bb91 100644 --- a/libnm-core/meson.build +++ b/libnm-core/meson.build @@ -112,15 +112,16 @@ libnm_core_settings_sources = files( ) libnm_core_sources = libnm_core_settings_sources + files( - 'nm-crypto.c', 'nm-connection.c', + 'nm-crypto.c', 'nm-dbus-utils.c', 'nm-errors.c', - 'nm-keyfile.c', 'nm-keyfile-utils.c', + 'nm-keyfile.c', 'nm-property-compare.c', 'nm-setting.c', 'nm-simple-connection.c', + 'nm-team-utils.c', 'nm-utils.c', 'nm-vpn-editor-plugin.c', 'nm-vpn-plugin-info.c', diff --git a/libnm-core/nm-team-utils.c b/libnm-core/nm-team-utils.c new file mode 100644 index 0000000000..95aa4691d2 --- /dev/null +++ b/libnm-core/nm-team-utils.c @@ -0,0 +1,22 @@ +/* + * 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. + * + * Copyright 2019 Red Hat, Inc. + */ + +#include "nm-default.h" + +#include "nm-team-utils.h" diff --git a/libnm-core/nm-team-utils.h b/libnm-core/nm-team-utils.h new file mode 100644 index 0000000000..6b3550000d --- /dev/null +++ b/libnm-core/nm-team-utils.h @@ -0,0 +1,27 @@ +/* + * 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. + * + * Copyright 2019 Red Hat, Inc. + */ + +#ifndef __NM_TEAM_UITLS_H__ +#define __NM_TEAM_UITLS_H__ + +#if !((NETWORKMANAGER_COMPILATION) & NM_NETWORKMANAGER_COMPILATION_WITH_LIBNM_CORE_PRIVATE) +#error Cannot use this header. +#endif + +#endif /* __NM_TEAM_UITLS_H__ */