2007-08-28 Dan Williams <dcbw@redhat.com>

* src/NetworkManagerSystem.h
	  src/nm-device.c
	  src/nm-device.h
	  src/nm-hal-manager.c
	  src/NetworkManager.c
	  src/nm-device-802-11-wireless.c
	  src/nm-hal-manager.h
	  src/nm-device-802-3-ethernet.c
	  src/vpn-manager/nm-vpn-service.h
	  src/vpn-manager/nm-vpn-manager.c
	  src/vpn-manager/nm-vpn-manager.h
	  src/vpn-manager/nm-vpn-service.c
	  src/nm-device-802-11-wireless.h
	  src/NetworkManagerMain.h
	  src/nm-device-802-3-ethernet.h
	  src/backends/NetworkManagerGentoo.c
	  src/backends/NetworkManagerPaldo.c
	  src/backends/NetworkManagerFrugalware.c
	  src/backends/NetworkManagerRedHat.c
	  src/backends/NetworkManagerSlackware.c
	  src/backends/NetworkManagerGeneric.c
	  src/backends/NetworkManagerArch.c
	  src/backends/NetworkManagerSuSE.c
	  src/backends/NetworkManagerGeneric.h
	  src/backends/NetworkManagerDebian.c
		- Kill NMData



git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2742 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
This commit is contained in:
Dan Williams
2007-08-28 15:54:55 +00:00
parent 0f1310cda0
commit 55c2fef46e
26 changed files with 68 additions and 142 deletions

View File

@@ -1,3 +1,32 @@
2007-08-28 Dan Williams <dcbw@redhat.com>
* src/NetworkManagerSystem.h
src/nm-device.c
src/nm-device.h
src/nm-hal-manager.c
src/NetworkManager.c
src/nm-device-802-11-wireless.c
src/nm-hal-manager.h
src/nm-device-802-3-ethernet.c
src/vpn-manager/nm-vpn-service.h
src/vpn-manager/nm-vpn-manager.c
src/vpn-manager/nm-vpn-manager.h
src/vpn-manager/nm-vpn-service.c
src/nm-device-802-11-wireless.h
src/NetworkManagerMain.h
src/nm-device-802-3-ethernet.h
src/backends/NetworkManagerGentoo.c
src/backends/NetworkManagerPaldo.c
src/backends/NetworkManagerFrugalware.c
src/backends/NetworkManagerRedHat.c
src/backends/NetworkManagerSlackware.c
src/backends/NetworkManagerGeneric.c
src/backends/NetworkManagerArch.c
src/backends/NetworkManagerSuSE.c
src/backends/NetworkManagerGeneric.h
src/backends/NetworkManagerDebian.c
- Kill NMData
2007-08-28 Dan Williams <dcbw@redhat.com>
* src/NetworkManagerMain.h

View File

@@ -65,9 +65,6 @@
*/
static NMManager *manager = NULL;
static GMainLoop *main_loop = NULL;
static NMData *nm_data = NULL;
static void nm_data_free (NMData *data);
static void
nm_error_monitoring_device_link_state (NMNetlinkMonitor *monitor,
@@ -108,35 +105,6 @@ nm_monitor_setup (void)
return TRUE;
}
/*
* nm_data_new
*
* Create data structure used in callbacks from libhal.
*
*/
static NMData *nm_data_new (void)
{
NMData * data;
data = g_slice_new0 (NMData);
return data;
}
/*
* nm_data_free
*
* Free data structure used in callbacks.
*
*/
static void nm_data_free (NMData *data)
{
g_return_if_fail (data != NULL);
g_slice_free (NMData, data);
}
static void
nm_name_owner_changed_handler (NMDBusManager *mgr,
const char *name,
@@ -144,7 +112,6 @@ nm_name_owner_changed_handler (NMDBusManager *mgr,
const char *new,
gpointer user_data)
{
NMData * data = (NMData *) user_data;
gboolean old_owner_good = (old && (strlen (old) > 0));
gboolean new_owner_good = (new && (strlen (new) > 0));
@@ -286,11 +253,11 @@ main (int argc, char *argv[])
gboolean show_usage = FALSE;
char * pidfile = NULL;
char * user_pidfile = NULL;
NMPolicy *policy;
NMPolicy *policy = NULL;
NMHalManager *hal_manager = NULL;
NMVPNManager *vpn_manager = NULL;
NMNamedManager *named_mgr = NULL;
NMDBusManager * dbus_mgr;
NMDBusManager * dbus_mgr = NULL;
DBusConnection *dbus_connection;
NMSupplicantManager * sup_mgr = NULL;
int exit_status = EXIT_FAILURE;
@@ -362,13 +329,6 @@ main (int argc, char *argv[])
nm_system_init ();
main_loop = g_main_loop_new (NULL, FALSE);
/* Initialize our instance data */
nm_data = nm_data_new ();
if (!nm_data) {
nm_error ("Failed to initialize.");
goto pidfile;
}
/* Create watch functions that monitor cards for link status. */
if (!nm_monitor_setup ())
goto done;
@@ -387,11 +347,19 @@ main (int argc, char *argv[])
g_signal_connect (dbus_mgr,
"name-owner-changed",
G_CALLBACK (nm_name_owner_changed_handler),
nm_data);
NULL);
manager = nm_manager_new ();
g_object_set_data (G_OBJECT (manager), "NM_DATA_HACK", nm_data);
if (manager == NULL) {
nm_error ("Failed to initialize the network manager.");
goto done;
}
policy = nm_policy_new (manager);
if (policy == NULL) {
nm_error ("Failed to initialize the policy.");
goto done;
}
nm_dbus_manager_register_signal_handler (dbus_mgr,
NMI_DBUS_INTERFACE,
@@ -406,7 +374,7 @@ main (int argc, char *argv[])
goto done;
}
vpn_manager = nm_vpn_manager_new (manager, nm_data);
vpn_manager = nm_vpn_manager_new (manager);
if (!vpn_manager) {
nm_warning ("Failed to start the VPN manager.");
goto done;
@@ -424,7 +392,7 @@ main (int argc, char *argv[])
goto done;
}
hal_manager = nm_hal_manager_new (manager, nm_data);
hal_manager = nm_hal_manager_new (manager);
if (!hal_manager)
goto done;
@@ -454,8 +422,6 @@ done:
if (manager)
g_object_unref (manager);
nm_data_free (nm_data);
if (sup_mgr)
g_object_unref (sup_mgr);
@@ -465,7 +431,6 @@ done:
g_object_unref (dbus_mgr);
nm_logging_shutdown ();
pidfile:
if (pidfile)
unlink (pidfile);
g_free (pidfile);

View File

@@ -32,8 +32,4 @@
typedef struct NMVPNActRequest NMVPNActRequest;
typedef struct NMVPNManager NMVPNManager;
typedef struct NMData
{
} NMData;
#endif

View File

@@ -27,8 +27,6 @@
#include "nm-ip4-config.h"
#include "nm-named-manager.h"
struct NMData;
/* Prototypes for system/distribution dependent functions,
* implemented in the backend files in backends/ directory
*/
@@ -56,7 +54,7 @@ void nm_system_update_dns (void);
void nm_system_restart_mdns_responder (void);
void nm_system_device_add_ip6_link_address (NMDevice *dev);
void * nm_system_device_get_system_config (NMDevice *dev, struct NMData *data);
void * nm_system_device_get_system_config (NMDevice *dev);
void nm_system_device_free_system_config (NMDevice *dev, void *system_config_data);
NMIP4Config * nm_system_device_new_ip4_system_config (NMDevice *dev);

View File

@@ -527,7 +527,7 @@ typedef struct ArchSystemConfigData
* info before setting stuff too.
*
*/
void* nm_system_device_get_system_config (NMDevice * dev, NMData *app_data)
void* nm_system_device_get_system_config (NMDevice * dev)
{
GHashTable* ifh;

View File

@@ -247,7 +247,7 @@ typedef struct DebSystemConfigData
* info before setting stuff too.
*
*/
void* nm_system_device_get_system_config (NMDevice *dev, NMData *app_data)
void* nm_system_device_get_system_config (NMDevice *dev)
{
DebSystemConfigData * sys_data = NULL;
if_block *curr_device;

View File

@@ -433,7 +433,7 @@ guint32 nm_system_get_mtu (NMDevice *dev)
* Read in the config file for a device.
*
*/
void *nm_system_device_get_system_config (NMDevice *dev, NMData *app_data)
void *nm_system_device_get_system_config (NMDevice *dev)
{
fwnet_profile_t *profile;
fwnet_interface_t *interface;

View File

@@ -364,7 +364,7 @@ out:
* info before setting stuff too.
*
*/
void* nm_generic_device_get_system_config (NMDevice *dev, NMData *app_data)
void* nm_generic_device_get_system_config (NMDevice *dev)
{
return NULL;
}

View File

@@ -29,8 +29,6 @@
#include "nm-ip4-config.h"
#include "nm-named-manager.h"
struct NMData;
/* Prototypes for system/distribution dependent functions,
* implemented in the backend files in backends/ directory
*/
@@ -59,7 +57,7 @@ void nm_generic_restart_mdns_responder (void);
void nm_generic_device_add_ip6_link_address (NMDevice *dev);
void nm_generic_set_ip4_config_from_resolv_conf (const char *filename, NMIP4Config *ip4_config);
void * nm_generic_device_get_system_config (NMDevice *dev, struct NMData *data);
void * nm_generic_device_get_system_config (NMDevice *dev);
void nm_generic_device_free_system_config (NMDevice *dev, void *system_config_data);
NMIP4Config * nm_generic_device_new_ip4_system_config (NMDevice *dev);

View File

@@ -258,7 +258,7 @@ typedef struct GentooSystemConfigData
* info before setting stuff too.
*
*/
void *nm_system_device_get_system_config (NMDevice *dev, NMData *app_data)
void *nm_system_device_get_system_config (NMDevice *dev)
{
char *cfg_file_path = NULL;
FILE *file = NULL;

View File

@@ -406,7 +406,7 @@ static NMIP4Config *netdevice_file_get_ip4_config (GKeyFile *file)
* Read in the config file for a device.
*
*/
void *nm_system_device_get_system_config (NMDevice *dev, NMData *app_data)
void *nm_system_device_get_system_config (NMDevice *dev)
{
PaldoSystemConfigData *sys_data = NULL;
GKeyFile *file;

View File

@@ -314,7 +314,7 @@ static char *get_current_profile_name (void)
* Read in the config file for a device.
*
*/
void *nm_system_device_get_system_config (NMDevice *dev, NMData *app_data)
void *nm_system_device_get_system_config (NMDevice *dev)
{
char * cfg_file_path = NULL;
shvarFile * file;

View File

@@ -118,7 +118,7 @@ gboolean nm_system_device_setup_static_ip4_config (NMDevice *dev)
* info before setting stuff too.
*
*/
void *nm_system_device_get_system_config (NMDevice *dev, NMData *app_data)
void *nm_system_device_get_system_config (NMDevice *dev)
{
return NULL;
}

View File

@@ -286,7 +286,7 @@ typedef struct SuSEDeviceConfigData
* SuSE stores this information in /etc/sysconfig/network/ifcfg-*-<MAC address>
*
*/
void *nm_system_device_get_system_config (NMDevice *dev, NMData *app_data)
void *nm_system_device_get_system_config (NMDevice *dev)
{
char *cfg_file_path = NULL;
char mac[18];

View File

@@ -411,7 +411,6 @@ constructor (GType type,
GObject *object;
NMDevice80211Wireless *self;
NMDevice80211WirelessPrivate *priv;
NMData *app_data;
const char *iface;
NMSock *sk;
@@ -424,7 +423,6 @@ constructor (GType type,
self = NM_DEVICE_802_11_WIRELESS (object);
priv = NM_DEVICE_802_11_WIRELESS_GET_PRIVATE (self);
app_data = nm_device_get_app_data (NM_DEVICE (self));
iface = nm_device_get_iface (NM_DEVICE (self));
if ((sk = nm_dev_sock_open (iface, DEV_WIRELESS, __FUNCTION__, NULL))) {
@@ -804,13 +802,9 @@ nm_device_802_11_wireless_get_best_ap (NMDevice80211Wireless *self)
NMAccessPoint * cur_ap = NULL;
NMActRequest * req = NULL;
GTimeVal best_timestamp = {0, 0};
NMData * app_data;
g_return_val_if_fail (self != NULL, NULL);
app_data = nm_device_get_app_data (NM_DEVICE (self));
g_assert (app_data);
if (!(ap_list = nm_device_802_11_wireless_ap_list_get (self)))
return NULL;
@@ -887,12 +881,8 @@ nm_device_802_11_wireless_set_activation_ap (NMDevice80211Wireless *self,
{
NMDevice80211WirelessPrivate *priv = NM_DEVICE_802_11_WIRELESS_GET_PRIVATE (self);
NMAccessPoint *ap = NULL;
NMData * app_data;
NMAccessPointList * dev_ap_list;
app_data = nm_device_get_app_data (NM_DEVICE (self));
g_assert (app_data);
nm_debug ("Forcing AP '%s'", nm_utils_escape_ssid (ssid->data, ssid->len));
/* Find the AP in our card's scan list first.
@@ -1978,15 +1968,11 @@ supplicant_iface_scanned_ap_cb (NMSupplicantInterface * iface,
NMDevice80211Wireless * self)
{
NMAccessPoint *ap;
NMData *app_data;
g_return_if_fail (self != NULL);
g_return_if_fail (properties != NULL);
g_return_if_fail (iface != NULL);
if (!(app_data = nm_device_get_app_data (NM_DEVICE (self))))
return;
ap = nm_ap_new_from_properties (properties);
if (!ap)
return;
@@ -2838,14 +2824,10 @@ activation_success_handler (NMDevice *dev)
static void
activation_failure_handler (NMDevice *dev)
{
NMData * app_data;
NMDevice80211Wireless * self = NM_DEVICE_802_11_WIRELESS (dev);
NMAccessPoint * ap;
const GByteArray * ssid;
app_data = nm_device_get_app_data (dev);
g_assert (app_data);
if ((ap = nm_device_802_11_wireless_get_activation_ap (self)))
{
if (nm_ap_get_artificial (ap))
@@ -3090,21 +3072,18 @@ NMDevice80211Wireless *
nm_device_802_11_wireless_new (int index,
const char *udi,
const char *driver,
gboolean test_dev,
NMData *app_data)
gboolean test_dev)
{
GObject *obj;
g_return_val_if_fail (index >= 0, NULL);
g_return_val_if_fail (udi != NULL, NULL);
g_return_val_if_fail (driver != NULL, NULL);
g_return_val_if_fail (app_data != NULL, NULL);
obj = g_object_new (NM_TYPE_DEVICE_802_11_WIRELESS,
NM_DEVICE_INTERFACE_UDI, udi,
NM_DEVICE_INTERFACE_INDEX, index,
NM_DEVICE_INTERFACE_DRIVER, driver,
NM_DEVICE_INTERFACE_APP_DATA, app_data,
NULL);
if (obj == NULL)
return NULL;

View File

@@ -80,8 +80,7 @@ GType nm_device_802_11_wireless_get_type (void);
NMDevice80211Wireless *nm_device_802_11_wireless_new (int index,
const char *udi,
const char *driver,
gboolean test_dev,
NMData *app_data);
gboolean test_dev);
void nm_device_802_11_wireless_set_ssid (NMDevice80211Wireless *self,
const GByteArray * ssid);

View File

@@ -244,21 +244,18 @@ NMDevice8023Ethernet *
nm_device_802_3_ethernet_new (int index,
const char *udi,
const char *driver,
gboolean test_dev,
NMData *app_data)
gboolean test_dev)
{
GObject *obj;
g_return_val_if_fail (index >= 0, NULL);
g_return_val_if_fail (udi != NULL, NULL);
g_return_val_if_fail (driver != NULL, NULL);
g_return_val_if_fail (app_data != NULL, NULL);
obj = g_object_new (NM_TYPE_DEVICE_802_3_ETHERNET,
NM_DEVICE_INTERFACE_UDI, udi,
NM_DEVICE_INTERFACE_INDEX, index,
NM_DEVICE_INTERFACE_DRIVER, driver,
NM_DEVICE_INTERFACE_APP_DATA, app_data,
NULL);
if (obj == NULL)
return NULL;

View File

@@ -55,8 +55,7 @@ GType nm_device_802_3_ethernet_get_type (void);
NMDevice8023Ethernet *nm_device_802_3_ethernet_new (int index,
const char *udi,
const char *driver,
gboolean test_dev,
NMData *app_data);
gboolean test_dev);
void nm_device_802_3_ethernet_get_address (NMDevice8023Ethernet *dev,
struct ether_addr *addr);

View File

@@ -68,7 +68,6 @@ struct _NMDevicePrivate
gboolean link_active;
guint32 ip4_address;
struct in6_addr ip6_address;
NMData * app_data;
NMActRequest * act_request;
guint act_source_id;
@@ -121,7 +120,6 @@ nm_device_init (NMDevice * self)
self->priv->link_active = FALSE;
self->priv->ip4_address = 0;
memset (&self->priv->ip6_address, 0, sizeof (struct in6_addr));
self->priv->app_data = NULL;
self->priv->act_source_id = 0;
@@ -171,7 +169,7 @@ constructor (GType type,
}
/* Grab IP config data for this device from the system configuration files */
priv->system_config_data = nm_system_device_get_system_config (dev, priv->app_data);
priv->system_config_data = nm_system_device_get_system_config (dev);
/* Allow distributions to flag devices as disabled */
if (nm_system_device_get_disabled (dev)) {
@@ -341,19 +339,6 @@ real_get_type_capabilities (NMDevice *self)
}
/*
* nm_device_get_app_data
*
*/
struct NMData *
nm_device_get_app_data (NMDevice *self)
{
g_return_val_if_fail (self != NULL, FALSE);
return self->priv->app_data;
}
/*
* nm_device_get_act_request
*
@@ -1481,9 +1466,6 @@ set_property (GObject *object, guint prop_id,
case NM_DEVICE_INTERFACE_PROP_DRIVER:
priv->driver = g_strdup (g_value_get_string (value));
break;
case NM_DEVICE_INTERFACE_PROP_APP_DATA:
priv->app_data = g_value_get_pointer (value);
break;
case NM_DEVICE_INTERFACE_PROP_CAPABILITIES:
priv->capabilities = g_value_get_uint (value);
break;
@@ -1515,9 +1497,6 @@ get_property (GObject *object, guint prop_id,
case NM_DEVICE_INTERFACE_PROP_DRIVER:
g_value_set_string (value, priv->driver);
break;
case NM_DEVICE_INTERFACE_PROP_APP_DATA:
g_value_set_pointer (value, priv->app_data);
break;
case NM_DEVICE_INTERFACE_PROP_CAPABILITIES:
g_value_set_uint (value, priv->capabilities);
break;
@@ -1598,10 +1577,6 @@ nm_device_class_init (NMDeviceClass *klass)
NM_DEVICE_INTERFACE_PROP_STATE,
NM_DEVICE_INTERFACE_STATE);
g_object_class_override_property (object_class,
NM_DEVICE_INTERFACE_PROP_APP_DATA,
NM_DEVICE_INTERFACE_APP_DATA);
g_object_class_override_property (object_class,
NM_DEVICE_INTERFACE_PROP_DEVICE_TYPE,
NM_DEVICE_INTERFACE_DEVICE_TYPE);

View File

@@ -120,8 +120,6 @@ NMDeviceType nm_device_get_device_type (NMDevice *dev);
guint32 nm_device_get_capabilities (NMDevice *dev);
guint32 nm_device_get_type_capabilities (NMDevice *dev);
struct NMData * nm_device_get_app_data (NMDevice *dev);
gboolean nm_device_has_active_link (NMDevice *dev);
guint32 nm_device_get_ip4_address (NMDevice *dev);
void nm_device_update_ip4_address (NMDevice *dev);

View File

@@ -11,7 +11,6 @@ struct _NMHalManager {
LibHalContext *hal_ctx;
NMDBusManager *dbus_mgr;
NMManager *nm_manager;
NMData *nm_data;
GSList *device_creators;
gboolean nm_sleeping;
@@ -118,7 +117,7 @@ wired_device_creator (NMHalManager *manager, const char *udi)
}
driver = nm_get_device_driver_name (manager->hal_ctx, udi);
device = (NMDevice *) nm_device_802_3_ethernet_new (idx, udi, driver, FALSE, manager->nm_data);
device = (NMDevice *) nm_device_802_3_ethernet_new (idx, udi, driver, FALSE);
g_free (driver);
return device;
@@ -159,7 +158,7 @@ wireless_device_creator (NMHalManager *manager, const char *udi)
}
driver = nm_get_device_driver_name (manager->hal_ctx, udi);
device = (NMDevice *) nm_device_802_11_wireless_new (idx, udi, driver, FALSE, manager->nm_data);
device = (NMDevice *) nm_device_802_11_wireless_new (idx, udi, driver, FALSE);
g_free (driver);
return device;
@@ -429,7 +428,7 @@ nm_manager_state_changed (NMManager *nm_manager, NMState state, gpointer user_da
}
NMHalManager *
nm_hal_manager_new (NMManager *nm_manager, NMData *nm_data)
nm_hal_manager_new (NMManager *nm_manager)
{
NMHalManager *manager;
NMDBusManager *dbus_mgr;
@@ -445,7 +444,6 @@ nm_hal_manager_new (NMManager *nm_manager, NMData *nm_data)
manager = g_slice_new0 (NMHalManager);
manager->nm_manager = g_object_ref (nm_manager);
manager->dbus_mgr = dbus_mgr;
manager->nm_data = nm_data;
register_built_in_creators (manager);

View File

@@ -6,7 +6,7 @@
typedef struct _NMHalManager NMHalManager;
NMHalManager *nm_hal_manager_new (NMManager *nm_manager, NMData *nm_data);
NMHalManager *nm_hal_manager_new (NMManager *nm_manager);
void nm_hal_manager_destroy (NMHalManager *manager);
#endif /* NM_HAL_MANAGER_H */

View File

@@ -40,7 +40,6 @@
struct NMVPNManager
{
NMManager * nm_manager;
NMData * app_data;
GHashTable * service_table;
GSList * connections;
@@ -103,17 +102,15 @@ nm_dbus_nmi_vpn_signal_handler (DBusConnection *connection,
* Create a new VPN manager instance.
*
*/
NMVPNManager *nm_vpn_manager_new (NMManager *nm_manager, NMData *app_data)
NMVPNManager *nm_vpn_manager_new (NMManager *nm_manager)
{
NMVPNManager * manager;
NMDBusManager * dbus_mgr;
g_return_val_if_fail (NM_IS_MANAGER (nm_manager), NULL);
g_return_val_if_fail (app_data != NULL, NULL);
manager = g_slice_new0 (NMVPNManager);
manager->nm_manager = g_object_ref (nm_manager);
manager->app_data = app_data;
manager->service_table = g_hash_table_new_full (g_str_hash,
g_str_equal,
@@ -680,7 +677,7 @@ load_services (NMVPNManager *manager, GHashTable *table)
if (!lines)
goto free_file_path;
service = nm_vpn_service_new (manager, manager->app_data);
service = nm_vpn_service_new (manager);
success = set_service_from_contents (lines, service, &err);
g_strfreev (lines);

View File

@@ -27,7 +27,7 @@
#include "nm-vpn-service.h"
NMVPNManager * nm_vpn_manager_new (NMManager *nm_manager, NMData *app_data);
NMVPNManager * nm_vpn_manager_new (NMManager *nm_manager);
NMVPNConnection * nm_vpn_manager_add_connection (NMVPNManager *manager, const char *name, const char *service_name, const char *user_name);
void nm_vpn_manager_remove_connection (NMVPNManager *manager, NMVPNConnection *vpn);
char ** nm_vpn_manager_get_connection_names (NMVPNManager *manager);

View File

@@ -44,7 +44,6 @@ struct NMVPNService
{
int refcount;
NMVPNManager * manager;
NMData * app_data;
GPid pid;
guint32 sig_handler_id;
gulong watch_id;
@@ -95,13 +94,12 @@ static void print_vpn_config (NMIP4Config *config,
* Create a new VPNService object
*
*/
NMVPNService *nm_vpn_service_new (NMVPNManager *manager, NMData *app_data)
NMVPNService *nm_vpn_service_new (NMVPNManager *manager)
{
NMVPNService *service = g_malloc0 (sizeof (NMVPNService));
service->refcount = 1;
service->state = NM_VPN_SERVICE_STATE_SHUTDOWN;
service->app_data = app_data;
service->manager = manager;
service->dbus_mgr = nm_dbus_manager_get ();

View File

@@ -32,7 +32,7 @@
typedef struct NMVPNService NMVPNService;
NMVPNService * nm_vpn_service_new (NMVPNManager *manager, NMData *app_data);
NMVPNService * nm_vpn_service_new (NMVPNManager *manager);
void nm_vpn_service_ref (NMVPNService *service);
void nm_vpn_service_unref (NMVPNService *service);