From 11fe8c16a2fbbcbce304ef023454206e053d8ae3 Mon Sep 17 00:00:00 2001 From: Dan Winship Date: Tue, 25 Nov 2014 19:23:45 -0500 Subject: Split out nm-iodine-service-defines.h Split nm-iodine-service-defines.h out of nm-iodine-service.h, so that the -defines.h file has no dependency on either libnm or libnm-glib. --- properties/Makefile.am | 1 + properties/nm-iodine.c | 2 +- src/Makefile.am | 4 ++-- src/nm-iodine-service-defines.h | 33 +++++++++++++++++++++++++++++++++ src/nm-iodine-service.h | 11 ++--------- 5 files changed, 39 insertions(+), 12 deletions(-) create mode 100644 src/nm-iodine-service-defines.h diff --git a/properties/Makefile.am b/properties/Makefile.am index 0b72cb7..ab4cd44 100644 --- a/properties/Makefile.am +++ b/properties/Makefile.am @@ -11,6 +11,7 @@ ui_DATA = nm-iodine-dialog.ui libnm_iodine_properties_la_CFLAGS = \ $(GTK_CFLAGS) \ $(NM_CFLAGS) \ + -I$(top_srcdir)/src \ -DICONDIR=\""$(datadir)/pixmaps"\" \ -DUIDIR=\""$(uidir)"\" \ -DG_DISABLE_DEPRECATED \ diff --git a/properties/nm-iodine.c b/properties/nm-iodine.c index 2806e90..61d8d1b 100644 --- a/properties/nm-iodine.c +++ b/properties/nm-iodine.c @@ -38,7 +38,7 @@ #include #include -#include "../src/nm-iodine-service.h" +#include "nm-iodine-service-defines.h" #include "nm-iodine.h" #define IODINE_PLUGIN_NAME _("Iodine DNS Tunnel") diff --git a/src/Makefile.am b/src/Makefile.am index d8a8f3f..8ca103a 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -15,8 +15,8 @@ libexec_PROGRAMS = \ nm_iodine_service_SOURCES = \ nm-iodine-service.c \ - nm-iodine-service.h - + nm-iodine-service.h \ + nm-iodine-service-defines.h nm_iodine_service_LDADD = \ $(NM_LIBS) diff --git a/src/nm-iodine-service-defines.h b/src/nm-iodine-service-defines.h new file mode 100644 index 0000000..2663cbf --- /dev/null +++ b/src/nm-iodine-service-defines.h @@ -0,0 +1,33 @@ +/* -*- Mode: C; tab-width: 5; indent-tabs-mode: t; c-basic-offset: 5 -*- */ +/* NetworkManager -- Network link manager + * + * 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., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Copyright © 2012 Guido Günther + */ + +#ifndef NM_IODINE_SERVICE_DEFINES_H +#define NM_IODINE_SERVICE_DEFINES_H + +#define NM_DBUS_SERVICE_IODINE "org.freedesktop.NetworkManager.iodine" +#define NM_DBUS_INTERFACE_IODINE "org.freedesktop.NetworkManager.iodine" +#define NM_DBUS_PATH_IODINE "/org/freedesktop/NetworkManager/iodine" + +#define NM_IODINE_KEY_TOPDOMAIN "topdomain" +#define NM_IODINE_KEY_NAMESERVER "nameserver" +#define NM_IODINE_KEY_FRAGSIZE "fragsize" +#define NM_IODINE_KEY_PASSWORD "password" + +#endif /* NM_IODINE_SERVICE_DEFINES_H */ diff --git a/src/nm-iodine-service.h b/src/nm-iodine-service.h index 4c12a11..4efb37f 100644 --- a/src/nm-iodine-service.h +++ b/src/nm-iodine-service.h @@ -24,6 +24,8 @@ #include #include +#include "nm-iodine-service-defines.h" + #define NM_TYPE_IODINE_PLUGIN (nm_iodine_plugin_get_type ()) #define NM_IODINE_PLUGIN(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), NM_TYPE_IODINE_PLUGIN, NMIodinePlugin)) #define NM_IODINE_PLUGIN_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), NM_TYPE_IODINE_PLUGIN, NMIodinePluginClass)) @@ -31,15 +33,6 @@ #define NM_IS_IODINE_PLUGIN_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((obj), NM_TYPE_IODINE_PLUGIN)) #define NM_IODINE_PLUGIN_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), NM_TYPE_IODINE_PLUGIN, NMIodinePluginClass)) -#define NM_DBUS_SERVICE_IODINE "org.freedesktop.NetworkManager.iodine" -#define NM_DBUS_INTERFACE_IODINE "org.freedesktop.NetworkManager.iodine" -#define NM_DBUS_PATH_IODINE "/org/freedesktop/NetworkManager/iodine" - -#define NM_IODINE_KEY_TOPDOMAIN "topdomain" -#define NM_IODINE_KEY_NAMESERVER "nameserver" -#define NM_IODINE_KEY_FRAGSIZE "fragsize" -#define NM_IODINE_KEY_PASSWORD "password" - typedef struct { NMVPNPlugin parent; } NMIodinePlugin; -- cgit v1.2.3