[network-manager-openvpn: 13/14] service: remove "nm-openvpn-service.h" header
- From: Thomas Haller <thaller src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [network-manager-openvpn: 13/14] service: remove "nm-openvpn-service.h" header
- Date: Sun, 12 Feb 2017 12:51:54 +0000 (UTC)
commit 8fe1e9336947ea1960f9692d1c34a5b5bbb14708
Author: Thomas Haller <thaller redhat com>
Date: Sun Feb 12 12:59:36 2017 +0100
service: remove "nm-openvpn-service.h" header
This header is used by nobody except nm-openvpn-service.c. Remove
it and move the content to the source file.
Makefile.am | 3 ---
src/nm-openvpn-service.c | 45 ++++++++++++++++++++++++++++++++++-----------
src/nm-openvpn-service.h | 45 ---------------------------------------------
3 files changed, 34 insertions(+), 59 deletions(-)
---
diff --git a/Makefile.am b/Makefile.am
index 49bc04b..4d39522 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -63,9 +63,6 @@ src_libnm_utils_la_LIBADD = \
libexec_PROGRAMS += src/nm-openvpn-service
-src_nm_openvpn_service_SOURCES = \
- src/nm-openvpn-service.c \
- src/nm-openvpn-service.h
src_nm_openvpn_service_CPPFLAGS = $(src_cppflags)
src_nm_openvpn_service_LDFLAGS = \
-Wl,--version-script="$(srcdir)/linker-script-binary.ver"
diff --git a/src/nm-openvpn-service.c b/src/nm-openvpn-service.c
index 7ad2ce1..2b0f208 100644
--- a/src/nm-openvpn-service.c
+++ b/src/nm-openvpn-service.c
@@ -24,8 +24,6 @@
#include "nm-default.h"
-#include "nm-openvpn-service.h"
-
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
@@ -66,9 +64,35 @@ static struct {
#define NM_OPENVPN_HELPER_PATH LIBEXECDIR"/nm-openvpn-service-openvpn-helper"
-G_DEFINE_TYPE (NMOpenvpnPlugin, nm_openvpn_plugin, NM_TYPE_VPN_SERVICE_PLUGIN)
+/*****************************************************************************/
-#define NM_OPENVPN_PLUGIN_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), NM_TYPE_OPENVPN_PLUGIN,
NMOpenvpnPluginPrivate))
+#define NM_TYPE_OPENVPN_PLUGIN (nm_openvpn_plugin_get_type ())
+#define NM_OPENVPN_PLUGIN(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), NM_TYPE_OPENVPN_PLUGIN,
NMOpenvpnPlugin))
+#define NM_OPENVPN_PLUGIN_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), NM_TYPE_OPENVPN_PLUGIN,
NMOpenvpnPluginClass))
+#define NM_IS_OPENVPN_PLUGIN(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), NM_TYPE_OPENVPN_PLUGIN))
+#define NM_IS_OPENVPN_PLUGIN_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), NM_TYPE_OPENVPN_PLUGIN))
+#define NM_OPENVPN_PLUGIN_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), NM_TYPE_OPENVPN_PLUGIN,
NMOpenvpnPluginClass))
+
+typedef struct {
+ NMVpnServicePlugin parent;
+} NMOpenvpnPlugin;
+
+typedef struct {
+ NMVpnServicePluginClass parent;
+} NMOpenvpnPluginClass;
+
+GType nm_openvpn_plugin_get_type (void);
+
+NMOpenvpnPlugin *nm_openvpn_plugin_new (const char *bus_name);
+
+/*****************************************************************************/
+
+typedef struct {
+ GPid pid;
+ guint watch_id;
+ guint kill_id;
+ NMOpenvpnPlugin *plugin;
+} PidsPendingData;
typedef struct {
char *default_username;
@@ -91,6 +115,12 @@ typedef struct {
char *mgt_path;
} NMOpenvpnPluginPrivate;
+G_DEFINE_TYPE (NMOpenvpnPlugin, nm_openvpn_plugin, NM_TYPE_VPN_SERVICE_PLUGIN)
+
+#define NM_OPENVPN_PLUGIN_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), NM_TYPE_OPENVPN_PLUGIN,
NMOpenvpnPluginPrivate))
+
+/*****************************************************************************/
+
typedef struct {
const char *name;
GType type;
@@ -99,13 +129,6 @@ typedef struct {
gboolean address;
} ValidProperty;
-typedef struct {
- GPid pid;
- guint watch_id;
- guint kill_id;
- NMOpenvpnPlugin *plugin;
-} PidsPendingData;
-
static const ValidProperty valid_properties[] = {
{ NM_OPENVPN_KEY_AUTH, G_TYPE_STRING, 0, 0, FALSE },
{ NM_OPENVPN_KEY_CA, G_TYPE_STRING, 0, 0, FALSE },
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]