From c050fb7cd2160f0b74ba8a0760e717e3fe329066 Mon Sep 17 00:00:00 2001 From: Dan Winship Date: Wed, 15 Apr 2015 14:53:30 -0400 Subject: [PATCH] devices, active-connection: port to gdbus --- introspection/nm-access-point.xml | 4 + introspection/nm-device-wifi.xml | 4 - introspection/nm-device-wimax.xml | 1 - introspection/nm-device.xml | 4 - src/devices/adsl/Makefile.am | 9 +- src/devices/adsl/nm-device-adsl.c | 5 +- src/devices/bluetooth/Makefile.am | 11 +- src/devices/bluetooth/nm-bluez-manager.c | 1 + src/devices/bluetooth/nm-device-bt.c | 6 +- src/devices/nm-device-bond.c | 8 +- src/devices/nm-device-bridge.c | 8 +- src/devices/nm-device-ethernet.c | 5 +- src/devices/nm-device-generic.c | 5 +- src/devices/nm-device-gre.c | 13 +- src/devices/nm-device-infiniband.c | 5 +- src/devices/nm-device-macvlan.c | 13 +- src/devices/nm-device-tun.c | 5 +- src/devices/nm-device-veth.c | 13 +- src/devices/nm-device-vlan.c | 13 +- src/devices/nm-device-vxlan.c | 13 +- src/devices/nm-device.c | 104 ++++++++-------- src/devices/nm-device.h | 3 +- src/devices/team/Makefile.am | 14 +-- src/devices/team/nm-device-team.c | 9 +- src/devices/wifi/Makefile.am | 15 +-- src/devices/wifi/nm-device-olpc-mesh.c | 14 +-- src/devices/wifi/nm-device-wifi.c | 130 +++++++++----------- src/devices/wifi/nm-wifi-ap.c | 38 +++--- src/devices/wifi/tests/Makefile.am | 4 +- src/devices/wifi/tests/test-wifi-ap-utils.c | 1 - src/devices/wwan/Makefile.am | 19 ++- src/devices/wwan/nm-device-modem.c | 7 +- src/devices/wwan/nm-modem.c | 1 - src/nm-activation-request.c | 2 +- src/nm-active-connection.c | 88 ++++++------- src/vpn-manager/nm-vpn-connection.c | 6 +- 36 files changed, 291 insertions(+), 310 deletions(-) diff --git a/introspection/nm-access-point.xml b/introspection/nm-access-point.xml index ef5af6ab77..16eae04476 100644 --- a/introspection/nm-access-point.xml +++ b/introspection/nm-access-point.xml @@ -12,6 +12,10 @@ Flags describing the access point's capabilities according to the RSN (Robust Secure Network) protocol. + + The Service Set Identifier identifying the access point. diff --git a/introspection/nm-device-wifi.xml b/introspection/nm-device-wifi.xml index d1c5313ed4..1cdcadfd09 100644 --- a/introspection/nm-device-wifi.xml +++ b/introspection/nm-device-wifi.xml @@ -5,7 +5,6 @@ - List of access point object paths. @@ -20,7 +19,6 @@ - List of access point object paths. @@ -33,8 +31,6 @@ - - Options of scan (currently unused argument). diff --git a/introspection/nm-device-wimax.xml b/introspection/nm-device-wimax.xml index b48ffe94ed..3bad624530 100644 --- a/introspection/nm-device-wimax.xml +++ b/introspection/nm-device-wimax.xml @@ -3,7 +3,6 @@ - List of NSP object paths diff --git a/introspection/nm-device.xml b/introspection/nm-device.xml index 239358a1e7..ba1a8fa69b 100644 --- a/introspection/nm-device.xml +++ b/introspection/nm-device.xml @@ -153,16 +153,12 @@ - - Disconnects a device and prevents the device from automatically activating further connections without user intervention. - - Deletes a software device from NetworkManager and removes the interface from the system. The method returns an error when called for a hardware device. diff --git a/src/devices/adsl/Makefile.am b/src/devices/adsl/Makefile.am index 5454f9db5e..1bccf7dc04 100644 --- a/src/devices/adsl/Makefile.am +++ b/src/devices/adsl/Makefile.am @@ -7,13 +7,13 @@ AM_CPPFLAGS = \ -I${top_builddir}/src \ -I${top_srcdir}/src/devices \ -I${top_srcdir}/src/platform \ + -I${top_builddir}/introspection \ -I${top_srcdir}/include \ -I${top_builddir}/libnm-core \ -I${top_srcdir}/libnm-core \ -DG_LOG_DOMAIN=\""NetworkManager-adsl"\" \ -DNETWORKMANAGER_COMPILATION=NM_NETWORKMANAGER_COMPILATION_INSIDE_DAEMON \ -DNM_VERSION_MAX_ALLOWED=NM_VERSION_NEXT_STABLE \ - $(DBUS_CFLAGS) \ $(GUDEV_CFLAGS) GLIB_GENERATED = nm-adsl-enum-types.h nm-adsl-enum-types.c @@ -21,10 +21,7 @@ GLIB_MKENUMS_H_FLAGS = --identifier-prefix NM GLIB_MKENUMS_C_FLAGS = --identifier-prefix NM nm_adsl_enum_types_sources = $(srcdir)/nm-device-adsl.h -nm-device-adsl-glue.h: $(top_srcdir)/introspection/nm-device-adsl.xml - dbus-binding-tool --prefix=nm_device_adsl --mode=glib-server --output=$@ $< - -BUILT_SOURCES = $(GLIB_GENERATED) nm-device-adsl-glue.h +BUILT_SOURCES = $(GLIB_GENERATED) pkglib_LTLIBRARIES = libnm-device-plugin-adsl.la @@ -43,7 +40,7 @@ libnm_device_plugin_adsl_la_LDFLAGS = \ -Wl,--version-script=$(SYMBOL_VIS_FILE) libnm_device_plugin_adsl_la_LIBADD = \ - $(DBUS_LIBS) \ + $(top_builddir)/introspection/libnmdbus.la \ $(GUDEV_LIBS) CLEANFILES = $(BUILT_SOURCES) diff --git a/src/devices/adsl/nm-device-adsl.c b/src/devices/adsl/nm-device-adsl.c index 19b970d791..8dfd0c8541 100644 --- a/src/devices/adsl/nm-device-adsl.c +++ b/src/devices/adsl/nm-device-adsl.c @@ -43,7 +43,7 @@ #include "nm-setting-adsl.h" #include "nm-utils.h" -#include "nm-device-adsl-glue.h" +#include "nmdbus-device-adsl.h" #include "nm-device-logging.h" _LOG_DECLARE_SELF (NMDeviceAdsl); @@ -613,5 +613,6 @@ nm_device_adsl_class_init (NMDeviceAdslClass *klass) parent_class->deactivate = deactivate; nm_exported_object_class_add_interface (NM_EXPORTED_OBJECT_CLASS (klass), - &dbus_glib_nm_device_adsl_object_info); + NMDBUS_TYPE_DEVICE_ADSL_SKELETON, + NULL); } diff --git a/src/devices/bluetooth/Makefile.am b/src/devices/bluetooth/Makefile.am index 3f92aedfe2..760632951d 100644 --- a/src/devices/bluetooth/Makefile.am +++ b/src/devices/bluetooth/Makefile.am @@ -9,23 +9,21 @@ AM_CPPFLAGS = \ -I${top_srcdir}/src/settings \ -I${top_srcdir}/src/platform \ -I${top_srcdir}/src/devices/wwan \ + -I${top_builddir}/introspection \ -I${top_srcdir}/include \ -I${top_builddir}/libnm-core \ -I${top_srcdir}/libnm-core \ -DG_LOG_DOMAIN=\""NetworkManager-bluetooth"\" \ -DNETWORKMANAGER_COMPILATION=NM_NETWORKMANAGER_COMPILATION_INSIDE_DAEMON \ -DNM_VERSION_MAX_ALLOWED=NM_VERSION_NEXT_STABLE \ - $(DBUS_CFLAGS) + $(GLIB_CFLAGS) GLIB_GENERATED = nm-bt-enum-types.h nm-bt-enum-types.c GLIB_MKENUMS_H_FLAGS = --identifier-prefix NM GLIB_MKENUMS_C_FLAGS = --identifier-prefix NM nm_bt_enum_types_sources = $(srcdir)/nm-bt-error.h -nm-device-bt-glue.h: $(top_srcdir)/introspection/nm-device-bt.xml - dbus-binding-tool --prefix=nm_device_bt --mode=glib-server --output=$@ $< - -BUILT_SOURCES = $(GLIB_GENERATED) nm-device-bt-glue.h +BUILT_SOURCES = $(GLIB_GENERATED) pkglib_LTLIBRARIES = libnm-device-plugin-bluetooth.la @@ -56,8 +54,9 @@ libnm_device_plugin_bluetooth_la_LDFLAGS = \ -Wl,--version-script=$(SYMBOL_VIS_FILE) libnm_device_plugin_bluetooth_la_LIBADD = \ + $(top_builddir)/introspection/libnmdbus.la \ $(top_builddir)/src/devices/wwan/libnm-wwan.la \ - $(DBUS_LIBS) \ + $(GLIB_LIBS) \ $(GUDEV_LIBS) if WITH_BLUEZ5_DUN diff --git a/src/devices/bluetooth/nm-bluez-manager.c b/src/devices/bluetooth/nm-bluez-manager.c index 7550d4ed86..bd7c7cab33 100644 --- a/src/devices/bluetooth/nm-bluez-manager.c +++ b/src/devices/bluetooth/nm-bluez-manager.c @@ -37,6 +37,7 @@ #include "nm-device-bt.h" #include "nm-core-internal.h" #include "nm-platform.h" +#include "nm-dbus-compat.h" typedef struct { int bluez_version; diff --git a/src/devices/bluetooth/nm-device-bt.c b/src/devices/bluetooth/nm-device-bt.c index 05b1d4e7fd..408315bca9 100644 --- a/src/devices/bluetooth/nm-device-bt.c +++ b/src/devices/bluetooth/nm-device-bt.c @@ -35,13 +35,14 @@ #include "nm-setting-gsm.h" #include "nm-setting-serial.h" #include "nm-setting-ppp.h" -#include "nm-device-bt-glue.h" #include "NetworkManagerUtils.h" #include "nm-bt-enum-types.h" #include "nm-utils.h" #include "nm-bt-error.h" #include "nm-bt-enum-types.h" +#include "nmdbus-device-bt.h" + #define MM_DBUS_SERVICE "org.freedesktop.ModemManager1" #define MM_DBUS_PATH "/org/freedesktop/ModemManager1" #define MM_DBUS_INTERFACE "org.freedesktop.ModemManager1" @@ -1194,5 +1195,6 @@ nm_device_bt_class_init (NMDeviceBtClass *klass) G_TYPE_UINT, G_TYPE_UINT); nm_exported_object_class_add_interface (NM_EXPORTED_OBJECT_CLASS (klass), - &dbus_glib_nm_device_bt_object_info); + NMDBUS_TYPE_DEVICE_BLUETOOTH_SKELETON, + NULL); } diff --git a/src/devices/nm-device-bond.c b/src/devices/nm-device-bond.c index 3d2795fced..d7a0e9a408 100644 --- a/src/devices/nm-device-bond.c +++ b/src/devices/nm-device-bond.c @@ -28,13 +28,12 @@ #include "NetworkManagerUtils.h" #include "nm-device-private.h" #include "nm-platform.h" -#include "nm-dbus-glib-types.h" #include "nm-enum-types.h" #include "nm-device-factory.h" #include "nm-core-internal.h" #include "nm-ip4-config.h" -#include "nm-device-bond-glue.h" +#include "nmdbus-device-bond.h" #include "nm-device-logging.h" _LOG_DECLARE_SELF(NMDeviceBond); @@ -556,12 +555,13 @@ nm_device_bond_class_init (NMDeviceBondClass *klass) g_object_class_install_property (object_class, PROP_SLAVES, g_param_spec_boxed (NM_DEVICE_BOND_SLAVES, "", "", - DBUS_TYPE_G_ARRAY_OF_OBJECT_PATH, + G_TYPE_STRV, G_PARAM_READABLE | G_PARAM_STATIC_STRINGS)); nm_exported_object_class_add_interface (NM_EXPORTED_OBJECT_CLASS (klass), - &dbus_glib_nm_device_bond_object_info); + NMDBUS_TYPE_DEVICE_BOND_SKELETON, + NULL); } /*************************************************************/ diff --git a/src/devices/nm-device-bridge.c b/src/devices/nm-device-bridge.c index d182d872fe..8d6caa94f4 100644 --- a/src/devices/nm-device-bridge.c +++ b/src/devices/nm-device-bridge.c @@ -26,13 +26,12 @@ #include "nm-device-bridge.h" #include "NetworkManagerUtils.h" #include "nm-device-private.h" -#include "nm-dbus-glib-types.h" #include "nm-enum-types.h" #include "nm-platform.h" #include "nm-device-factory.h" #include "nm-core-internal.h" -#include "nm-device-bridge-glue.h" +#include "nmdbus-device-bridge.h" #include "nm-device-logging.h" _LOG_DECLARE_SELF(NMDeviceBridge); @@ -501,12 +500,13 @@ nm_device_bridge_class_init (NMDeviceBridgeClass *klass) g_object_class_install_property (object_class, PROP_SLAVES, g_param_spec_boxed (NM_DEVICE_BRIDGE_SLAVES, "", "", - DBUS_TYPE_G_ARRAY_OF_OBJECT_PATH, + G_TYPE_STRV, G_PARAM_READABLE | G_PARAM_STATIC_STRINGS)); nm_exported_object_class_add_interface (NM_EXPORTED_OBJECT_CLASS (klass), - &dbus_glib_nm_device_bridge_object_info); + NMDBUS_TYPE_DEVICE_BRIDGE_SKELETON, + NULL); } /*************************************************************/ diff --git a/src/devices/nm-device-ethernet.c b/src/devices/nm-device-ethernet.c index 5f43a10dcf..16ca35e56f 100644 --- a/src/devices/nm-device-ethernet.c +++ b/src/devices/nm-device-ethernet.c @@ -50,7 +50,7 @@ #include "nm-core-internal.h" #include "NetworkManagerUtils.h" -#include "nm-device-ethernet-glue.h" +#include "nmdbus-device-ethernet.h" #include "nm-device-logging.h" _LOG_DECLARE_SELF(NMDeviceEthernet); @@ -1712,7 +1712,8 @@ nm_device_ethernet_class_init (NMDeviceEthernetClass *klass) G_PARAM_STATIC_STRINGS)); nm_exported_object_class_add_interface (NM_EXPORTED_OBJECT_CLASS (klass), - &dbus_glib_nm_device_ethernet_object_info); + NMDBUS_TYPE_DEVICE_ETHERNET_SKELETON, + NULL); } /*************************************************************/ diff --git a/src/devices/nm-device-generic.c b/src/devices/nm-device-generic.c index 5d092b98f7..029a706475 100644 --- a/src/devices/nm-device-generic.c +++ b/src/devices/nm-device-generic.c @@ -26,7 +26,7 @@ #include "nm-platform.h" #include "nm-core-internal.h" -#include "nm-device-generic-glue.h" +#include "nmdbus-device-generic.h" G_DEFINE_TYPE (NMDeviceGeneric, nm_device_generic, NM_TYPE_DEVICE) @@ -202,5 +202,6 @@ nm_device_generic_class_init (NMDeviceGenericClass *klass) G_PARAM_STATIC_STRINGS)); nm_exported_object_class_add_interface (NM_EXPORTED_OBJECT_CLASS (klass), - &dbus_glib_nm_device_generic_object_info); + NMDBUS_TYPE_DEVICE_GENERIC_SKELETON, + NULL); } diff --git a/src/devices/nm-device-gre.c b/src/devices/nm-device-gre.c index c26190ab56..ddd913b586 100644 --- a/src/devices/nm-device-gre.c +++ b/src/devices/nm-device-gre.c @@ -31,7 +31,7 @@ #include "nm-device-factory.h" #include "nm-core-internal.h" -#include "nm-device-gre-glue.h" +#include "nmdbus-device-gre.h" #include "nm-device-logging.h" _LOG_DECLARE_SELF(NMDeviceGre); @@ -187,10 +187,10 @@ nm_device_gre_class_init (NMDeviceGreClass *klass) /* properties */ g_object_class_install_property (object_class, PROP_PARENT, - g_param_spec_boxed (NM_DEVICE_GRE_PARENT, "", "", - DBUS_TYPE_G_OBJECT_PATH, - G_PARAM_READABLE | - G_PARAM_STATIC_STRINGS)); + g_param_spec_string (NM_DEVICE_GRE_PARENT, "", "", + NULL, + G_PARAM_READABLE | + G_PARAM_STATIC_STRINGS)); g_object_class_install_property (object_class, PROP_INPUT_FLAGS, @@ -256,7 +256,8 @@ nm_device_gre_class_init (NMDeviceGreClass *klass) G_PARAM_STATIC_STRINGS)); nm_exported_object_class_add_interface (NM_EXPORTED_OBJECT_CLASS (klass), - &dbus_glib_nm_device_gre_object_info); + NMDBUS_TYPE_DEVICE_GRE_SKELETON, + NULL); } /*************************************************************/ diff --git a/src/devices/nm-device-infiniband.c b/src/devices/nm-device-infiniband.c index f52613b069..c4c21f9d1c 100644 --- a/src/devices/nm-device-infiniband.c +++ b/src/devices/nm-device-infiniband.c @@ -33,7 +33,7 @@ #include "nm-device-factory.h" #include "nm-core-internal.h" -#include "nm-device-infiniband-glue.h" +#include "nmdbus-device-infiniband.h" G_DEFINE_TYPE (NMDeviceInfiniband, nm_device_infiniband, NM_TYPE_DEVICE) @@ -350,7 +350,8 @@ nm_device_infiniband_class_init (NMDeviceInfinibandClass *klass) G_PARAM_STATIC_STRINGS)); nm_exported_object_class_add_interface (NM_EXPORTED_OBJECT_CLASS (klass), - &dbus_glib_nm_device_infiniband_object_info); + NMDBUS_TYPE_DEVICE_INFINIBAND_SKELETON, + NULL); } /*************************************************************/ diff --git a/src/devices/nm-device-macvlan.c b/src/devices/nm-device-macvlan.c index 6f331571ca..743e2db21e 100644 --- a/src/devices/nm-device-macvlan.c +++ b/src/devices/nm-device-macvlan.c @@ -29,7 +29,7 @@ #include "nm-platform.h" #include "nm-device-factory.h" -#include "nm-device-macvlan-glue.h" +#include "nmdbus-device-macvlan.h" #include "nm-device-logging.h" _LOG_DECLARE_SELF(NMDeviceMacvlan); @@ -144,10 +144,10 @@ nm_device_macvlan_class_init (NMDeviceMacvlanClass *klass) /* properties */ g_object_class_install_property (object_class, PROP_PARENT, - g_param_spec_boxed (NM_DEVICE_MACVLAN_PARENT, "", "", - DBUS_TYPE_G_OBJECT_PATH, - G_PARAM_READABLE | - G_PARAM_STATIC_STRINGS)); + g_param_spec_string (NM_DEVICE_MACVLAN_PARENT, "", "", + NULL, + G_PARAM_READABLE | + G_PARAM_STATIC_STRINGS)); g_object_class_install_property (object_class, PROP_MODE, @@ -164,7 +164,8 @@ nm_device_macvlan_class_init (NMDeviceMacvlanClass *klass) G_PARAM_STATIC_STRINGS)); nm_exported_object_class_add_interface (NM_EXPORTED_OBJECT_CLASS (klass), - &dbus_glib_nm_device_macvlan_object_info); + NMDBUS_TYPE_DEVICE_MACVLAN_SKELETON, + NULL); } /*************************************************************/ diff --git a/src/devices/nm-device-tun.c b/src/devices/nm-device-tun.c index 6c6ed52113..e103363361 100644 --- a/src/devices/nm-device-tun.c +++ b/src/devices/nm-device-tun.c @@ -29,7 +29,7 @@ #include "nm-platform.h" #include "nm-device-factory.h" -#include "nm-device-tun-glue.h" +#include "nmdbus-device-tun.h" #include "nm-device-logging.h" _LOG_DECLARE_SELF(NMDeviceTun); @@ -232,7 +232,8 @@ nm_device_tun_class_init (NMDeviceTunClass *klass) G_PARAM_READABLE | G_PARAM_STATIC_STRINGS)); nm_exported_object_class_add_interface (NM_EXPORTED_OBJECT_CLASS (klass), - &dbus_glib_nm_device_tun_object_info); + NMDBUS_TYPE_DEVICE_TUN_SKELETON, + NULL); } diff --git a/src/devices/nm-device-veth.c b/src/devices/nm-device-veth.c index c4666a217e..d80624857e 100644 --- a/src/devices/nm-device-veth.c +++ b/src/devices/nm-device-veth.c @@ -34,7 +34,7 @@ #include "nm-platform.h" #include "nm-device-factory.h" -#include "nm-device-veth-glue.h" +#include "nmdbus-device-veth.h" #include "nm-device-logging.h" _LOG_DECLARE_SELF(NMDeviceVeth); @@ -160,13 +160,14 @@ nm_device_veth_class_init (NMDeviceVethClass *klass) /* properties */ g_object_class_install_property (object_class, PROP_PEER, - g_param_spec_boxed (NM_DEVICE_VETH_PEER, "", "", - DBUS_TYPE_G_OBJECT_PATH, - G_PARAM_READABLE | - G_PARAM_STATIC_STRINGS)); + g_param_spec_string (NM_DEVICE_VETH_PEER, "", "", + NULL, + G_PARAM_READABLE | + G_PARAM_STATIC_STRINGS)); nm_exported_object_class_add_interface (NM_EXPORTED_OBJECT_CLASS (klass), - &dbus_glib_nm_device_veth_object_info); + NMDBUS_TYPE_DEVICE_VETH_SKELETON, + NULL); } /*************************************************************/ diff --git a/src/devices/nm-device-vlan.c b/src/devices/nm-device-vlan.c index 584d844e15..eb3b146e25 100644 --- a/src/devices/nm-device-vlan.c +++ b/src/devices/nm-device-vlan.c @@ -37,7 +37,7 @@ #include "nm-manager.h" #include "nm-core-internal.h" -#include "nm-device-vlan-glue.h" +#include "nmdbus-device-vlan.h" #include "nm-device-logging.h" _LOG_DECLARE_SELF(NMDeviceVlan); @@ -617,10 +617,10 @@ nm_device_vlan_class_init (NMDeviceVlanClass *klass) /* properties */ g_object_class_install_property (object_class, PROP_PARENT, - g_param_spec_boxed (NM_DEVICE_VLAN_PARENT, "", "", - DBUS_TYPE_G_OBJECT_PATH, - G_PARAM_READABLE | - G_PARAM_STATIC_STRINGS)); + g_param_spec_string (NM_DEVICE_VLAN_PARENT, "", "", + NULL, + G_PARAM_READABLE | + G_PARAM_STATIC_STRINGS)); g_object_class_install_property (object_class, PROP_VLAN_ID, g_param_spec_uint (NM_DEVICE_VLAN_ID, "", "", @@ -628,7 +628,8 @@ nm_device_vlan_class_init (NMDeviceVlanClass *klass) G_PARAM_READABLE | G_PARAM_STATIC_STRINGS)); nm_exported_object_class_add_interface (NM_EXPORTED_OBJECT_CLASS (klass), - &dbus_glib_nm_device_vlan_object_info); + NMDBUS_TYPE_DEVICE_VLAN_SKELETON, + NULL); } /*************************************************************/ diff --git a/src/devices/nm-device-vxlan.c b/src/devices/nm-device-vxlan.c index 68dbd952a1..b66f2368fb 100644 --- a/src/devices/nm-device-vxlan.c +++ b/src/devices/nm-device-vxlan.c @@ -30,7 +30,7 @@ #include "nm-utils.h" #include "nm-device-factory.h" -#include "nm-device-vxlan-glue.h" +#include "nmdbus-device-vxlan.h" #include "nm-device-logging.h" _LOG_DECLARE_SELF(NMDeviceVxlan); @@ -234,10 +234,10 @@ nm_device_vxlan_class_init (NMDeviceVxlanClass *klass) /* properties */ g_object_class_install_property (object_class, PROP_PARENT, - g_param_spec_boxed (NM_DEVICE_VXLAN_PARENT, "", "", - DBUS_TYPE_G_OBJECT_PATH, - G_PARAM_READABLE | - G_PARAM_STATIC_STRINGS)); + g_param_spec_string (NM_DEVICE_VXLAN_PARENT, "", "", + NULL, + G_PARAM_READABLE | + G_PARAM_STATIC_STRINGS)); g_object_class_install_property (object_class, PROP_ID, @@ -345,7 +345,8 @@ nm_device_vxlan_class_init (NMDeviceVxlanClass *klass) G_PARAM_STATIC_STRINGS)); nm_exported_object_class_add_interface (NM_EXPORTED_OBJECT_CLASS (klass), - &dbus_glib_nm_device_vxlan_object_info); + NMDBUS_TYPE_DEVICE_VXLAN_SKELETON, + NULL); } /*************************************************************/ diff --git a/src/devices/nm-device.c b/src/devices/nm-device.c index 88f63c1258..50e9a22c9d 100644 --- a/src/devices/nm-device.c +++ b/src/devices/nm-device.c @@ -21,7 +21,6 @@ #include "config.h" -#include #include #include #include @@ -55,7 +54,6 @@ #include "nm-settings-connection.h" #include "nm-connection-provider.h" #include "nm-auth-utils.h" -#include "nm-dbus-glib-types.h" #include "nm-dispatcher.h" #include "nm-config.h" #include "nm-dns-manager.h" @@ -68,13 +66,11 @@ #include "nm-device-logging.h" _LOG_DECLARE_SELF (NMDevice); -static void impl_device_disconnect (NMDevice *self, DBusGMethodInvocation *context); -static void impl_device_delete (NMDevice *self, DBusGMethodInvocation *context); +#include "nmdbus-device.h" + static void nm_device_update_metered (NMDevice *self); static void ip_check_ping_watch_cb (GPid pid, gint status, gpointer user_data); -#include "nm-device-glue.h" - G_DEFINE_ABSTRACT_TYPE (NMDevice, nm_device, NM_TYPE_EXPORTED_OBJECT) #define NM_DEVICE_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), NM_TYPE_DEVICE, NMDevicePrivate)) @@ -6178,7 +6174,7 @@ delete_on_deactivate_check_and_schedule (NMDevice *self, int ifindex) static void disconnect_cb (NMDevice *self, - DBusGMethodInvocation *context, + GDBusMethodInvocation *context, NMAuthSubject *subject, GError *error, gpointer user_data) @@ -6187,7 +6183,7 @@ disconnect_cb (NMDevice *self, GError *local = NULL; if (error) { - dbus_g_method_return_error (context, error); + g_dbus_method_invocation_return_gerror (context, error); nm_audit_log_device_op (NM_AUDIT_OP_DEVICE_DISCONNECT, self, FALSE, subject, error->message); return; } @@ -6197,16 +6193,15 @@ disconnect_cb (NMDevice *self, local = g_error_new_literal (NM_DEVICE_ERROR, NM_DEVICE_ERROR_NOT_ACTIVE, "Device is not active"); - dbus_g_method_return_error (context, local); nm_audit_log_device_op (NM_AUDIT_OP_DEVICE_DISCONNECT, self, FALSE, subject, local->message); - g_error_free (local); + g_dbus_method_invocation_take_error (context, local); } else { nm_device_set_autoconnect (self, FALSE); nm_device_state_changed (self, NM_DEVICE_STATE_DEACTIVATING, NM_DEVICE_STATE_REASON_USER_REQUESTED); - dbus_g_method_return (context); + g_dbus_method_invocation_return_value (context, NULL); nm_audit_log_device_op (NM_AUDIT_OP_DEVICE_DISCONNECT, self, TRUE, subject, NULL); } } @@ -6221,7 +6216,7 @@ _clear_queued_act_request (NMDevicePrivate *priv) } static void -impl_device_disconnect (NMDevice *self, DBusGMethodInvocation *context) +impl_device_disconnect (NMDevice *self, GDBusMethodInvocation *context) { NMConnection *connection; GError *error = NULL; @@ -6230,8 +6225,7 @@ impl_device_disconnect (NMDevice *self, DBusGMethodInvocation *context) error = g_error_new_literal (NM_DEVICE_ERROR, NM_DEVICE_ERROR_NOT_ACTIVE, "This device is not active"); - dbus_g_method_return_error (context, error); - g_error_free (error); + g_dbus_method_invocation_take_error (context, error); return; } @@ -6250,25 +6244,25 @@ impl_device_disconnect (NMDevice *self, DBusGMethodInvocation *context) static void delete_cb (NMDevice *self, - DBusGMethodInvocation *context, + GDBusMethodInvocation *context, NMAuthSubject *subject, GError *error, gpointer user_data) { if (error) { - dbus_g_method_return_error (context, error); + g_dbus_method_invocation_return_gerror (context, error); nm_audit_log_device_op (NM_AUDIT_OP_DEVICE_DELETE, self, FALSE, subject, error->message); return; } /* Authorized */ nm_platform_link_delete (NM_PLATFORM_GET, nm_device_get_ifindex (self)); - dbus_g_method_return (context); + g_dbus_method_invocation_return_value (context, NULL); nm_audit_log_device_op (NM_AUDIT_OP_DEVICE_DELETE, self, TRUE, subject, NULL); } static void -impl_device_delete (NMDevice *self, DBusGMethodInvocation *context) +impl_device_delete (NMDevice *self, GDBusMethodInvocation *context) { GError *error = NULL; @@ -6276,8 +6270,7 @@ impl_device_delete (NMDevice *self, DBusGMethodInvocation *context) error = g_error_new_literal (NM_DEVICE_ERROR, NM_DEVICE_ERROR_NOT_SOFTWARE, "This device is not a software device"); - dbus_g_method_return_error (context, error); - g_error_free (error); + g_dbus_method_invocation_take_error (context, error); return; } @@ -9311,8 +9304,6 @@ set_property (GObject *object, guint prop_id, } } -#define DBUS_TYPE_STATE_REASON_STRUCT (dbus_g_type_get_struct ("GValueArray", G_TYPE_UINT, G_TYPE_UINT, G_TYPE_INVALID)) - static void get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec) @@ -9376,8 +9367,8 @@ get_property (GObject *object, guint prop_id, g_value_set_uint (value, priv->state); break; case PROP_STATE_REASON: - g_value_take_boxed (value, dbus_g_type_specialized_construct (DBUS_TYPE_STATE_REASON_STRUCT)); - dbus_g_type_struct_set (value, 0, priv->state, 1, priv->state_reason, G_MAXUINT); + g_value_take_variant (value, + g_variant_new ("(uu)", priv->state, priv->state_reason)); break; case PROP_ACTIVE_CONNECTION: nm_utils_g_value_set_object_path (value, priv->act_request); @@ -9408,7 +9399,8 @@ get_property (GObject *object, guint prop_id, g_hash_table_iter_init (&iter, priv->available_connections); while (g_hash_table_iter_next (&iter, (gpointer) &connection, NULL)) g_ptr_array_add (array, g_strdup (nm_connection_get_path (connection))); - g_value_take_boxed (value, array); + g_ptr_array_add (array, NULL); + g_value_take_boxed (value, (char **) g_ptr_array_free (array, FALSE)); break; case PROP_PHYSICAL_PORT_ID: g_value_set_string (value, priv->physical_port_id); @@ -9548,31 +9540,31 @@ nm_device_class_init (NMDeviceClass *klass) g_object_class_install_property (object_class, PROP_IP4_CONFIG, - g_param_spec_boxed (NM_DEVICE_IP4_CONFIG, "", "", - DBUS_TYPE_G_OBJECT_PATH, - G_PARAM_READWRITE | - G_PARAM_STATIC_STRINGS)); + g_param_spec_string (NM_DEVICE_IP4_CONFIG, "", "", + NULL, + G_PARAM_READWRITE | + G_PARAM_STATIC_STRINGS)); g_object_class_install_property (object_class, PROP_DHCP4_CONFIG, - g_param_spec_boxed (NM_DEVICE_DHCP4_CONFIG, "", "", - DBUS_TYPE_G_OBJECT_PATH, - G_PARAM_READWRITE | - G_PARAM_STATIC_STRINGS)); + g_param_spec_string (NM_DEVICE_DHCP4_CONFIG, "", "", + NULL, + G_PARAM_READWRITE | + G_PARAM_STATIC_STRINGS)); g_object_class_install_property (object_class, PROP_IP6_CONFIG, - g_param_spec_boxed (NM_DEVICE_IP6_CONFIG, "", "", - DBUS_TYPE_G_OBJECT_PATH, - G_PARAM_READWRITE | - G_PARAM_STATIC_STRINGS)); + g_param_spec_string (NM_DEVICE_IP6_CONFIG, "", "", + NULL, + G_PARAM_READWRITE | + G_PARAM_STATIC_STRINGS)); g_object_class_install_property (object_class, PROP_DHCP6_CONFIG, - g_param_spec_boxed (NM_DEVICE_DHCP6_CONFIG, "", "", - DBUS_TYPE_G_OBJECT_PATH, - G_PARAM_READWRITE | - G_PARAM_STATIC_STRINGS)); + g_param_spec_string (NM_DEVICE_DHCP6_CONFIG, "", "", + NULL, + G_PARAM_READWRITE | + G_PARAM_STATIC_STRINGS)); g_object_class_install_property (object_class, PROP_STATE, @@ -9583,17 +9575,18 @@ nm_device_class_init (NMDeviceClass *klass) g_object_class_install_property (object_class, PROP_STATE_REASON, - g_param_spec_boxed (NM_DEVICE_STATE_REASON, "", "", - DBUS_TYPE_STATE_REASON_STRUCT, - G_PARAM_READABLE | - G_PARAM_STATIC_STRINGS)); + g_param_spec_variant (NM_DEVICE_STATE_REASON, "", "", + G_VARIANT_TYPE ("(uu)"), + NULL, + G_PARAM_READABLE | + G_PARAM_STATIC_STRINGS)); g_object_class_install_property (object_class, PROP_ACTIVE_CONNECTION, - g_param_spec_boxed (NM_DEVICE_ACTIVE_CONNECTION, "", "", - DBUS_TYPE_G_OBJECT_PATH, - G_PARAM_READABLE | - G_PARAM_STATIC_STRINGS)); + g_param_spec_string (NM_DEVICE_ACTIVE_CONNECTION, "", "", + NULL, + G_PARAM_READABLE | + G_PARAM_STATIC_STRINGS)); g_object_class_install_property (object_class, PROP_DEVICE_TYPE, @@ -9656,7 +9649,7 @@ nm_device_class_init (NMDeviceClass *klass) g_object_class_install_property (object_class, PROP_AVAILABLE_CONNECTIONS, g_param_spec_boxed (NM_DEVICE_AVAILABLE_CONNECTIONS, "", "", - DBUS_TYPE_G_ARRAY_OF_OBJECT_PATH, + G_TYPE_STRV, G_PARAM_READABLE | G_PARAM_STATIC_STRINGS)); @@ -9732,8 +9725,8 @@ nm_device_class_init (NMDeviceClass *klass) G_OBJECT_CLASS_TYPE (object_class), G_SIGNAL_RUN_FIRST, 0, NULL, NULL, NULL, - /* dbus-glib context, connection, permission, allow_interaction, callback, user_data */ - G_TYPE_NONE, 6, G_TYPE_POINTER, G_TYPE_POINTER, G_TYPE_STRING, G_TYPE_BOOLEAN, G_TYPE_POINTER, G_TYPE_POINTER); + /* context, connection, permission, allow_interaction, callback, user_data */ + G_TYPE_NONE, 6, G_TYPE_DBUS_METHOD_INVOCATION, NM_TYPE_CONNECTION, G_TYPE_STRING, G_TYPE_BOOLEAN, G_TYPE_POINTER, G_TYPE_POINTER); signals[IP4_CONFIG_CHANGED] = g_signal_new (NM_DEVICE_IP4_CONFIG_CHANGED, @@ -9771,7 +9764,8 @@ nm_device_class_init (NMDeviceClass *klass) G_TYPE_NONE, 0); nm_exported_object_class_add_interface (NM_EXPORTED_OBJECT_CLASS (klass), - &dbus_glib_nm_device_object_info); - - dbus_g_error_domain_register (NM_DEVICE_ERROR, NULL, NM_TYPE_DEVICE_ERROR); + NMDBUS_TYPE_DEVICE_SKELETON, + "Disconnect", impl_device_disconnect, + "Delete", impl_device_delete, + NULL); } diff --git a/src/devices/nm-device.h b/src/devices/nm-device.h index 8c26d161fb..0995377ad2 100644 --- a/src/devices/nm-device.h +++ b/src/devices/nm-device.h @@ -22,7 +22,6 @@ #ifndef __NETWORKMANAGER_DEVICE_H__ #define __NETWORKMANAGER_DEVICE_H__ -#include #include #include "nm-exported-object.h" @@ -310,7 +309,7 @@ typedef struct { } NMDeviceClass; typedef void (*NMDeviceAuthRequestFunc) (NMDevice *device, - DBusGMethodInvocation *context, + GDBusMethodInvocation *context, NMAuthSubject *subject, GError *error, gpointer user_data); diff --git a/src/devices/team/Makefile.am b/src/devices/team/Makefile.am index a30e953d79..b48ea56053 100644 --- a/src/devices/team/Makefile.am +++ b/src/devices/team/Makefile.am @@ -7,13 +7,14 @@ AM_CPPFLAGS = \ -I${top_builddir}/src \ -I${top_srcdir}/src/devices \ -I${top_srcdir}/src/platform \ + -I${top_builddir}/introspection \ -I${top_srcdir}/include \ -I${top_builddir}/libnm-core \ -I${top_srcdir}/libnm-core \ -DG_LOG_DOMAIN=\""NetworkManager-team"\" \ -DNETWORKMANAGER_COMPILATION=NM_NETWORKMANAGER_COMPILATION_INSIDE_DAEMON \ -DNM_VERSION_MAX_ALLOWED=NM_VERSION_NEXT_STABLE \ - $(DBUS_CFLAGS) + $(GLIB_CFLAGS) if WITH_TEAMDCTL AM_CPPFLAGS += ${LIBTEAMDCTL_CFLAGS} @@ -24,13 +25,7 @@ GLIB_MKENUMS_H_FLAGS = --identifier-prefix NM GLIB_MKENUMS_C_FLAGS = --identifier-prefix NM nm_team_enum_types_sources = $(srcdir)/nm-device-team.h -glue_sources = \ - nm-device-team-glue.h - -%-glue.h: $(top_srcdir)/introspection/%.xml - $(AM_V_GEN) dbus-binding-tool --prefix=$(subst -,_,$(subst -glue.h,,$@)) --mode=glib-server --output=$@ $< - -BUILT_SOURCES = $(GLIB_GENERATED) $(glue_sources) +BUILT_SOURCES = $(GLIB_GENERATED) pkglib_LTLIBRARIES = libnm-device-plugin-team.la @@ -49,7 +44,8 @@ libnm_device_plugin_team_la_LDFLAGS = \ -Wl,--version-script=$(SYMBOL_VIS_FILE) libnm_device_plugin_team_la_LIBADD = \ - $(DBUS_LIBS) \ + $(top_builddir)/introspection/libnmdbus.la \ + $(GLIB_LIBS) \ $(GUDEV_LIBS) if WITH_TEAMDCTL diff --git a/src/devices/team/nm-device-team.c b/src/devices/team/nm-device-team.c index 626f808d60..66e77e65c1 100644 --- a/src/devices/team/nm-device-team.c +++ b/src/devices/team/nm-device-team.c @@ -32,12 +32,12 @@ #include "NetworkManagerUtils.h" #include "nm-device-private.h" #include "nm-platform.h" -#include "nm-dbus-glib-types.h" #include "nm-enum-types.h" #include "nm-team-enum-types.h" #include "nm-core-internal.h" +#include "nm-dbus-compat.h" -#include "nm-device-team-glue.h" +#include "nmdbus-device-team.h" #include "nm-device-logging.h" _LOG_DECLARE_SELF(NMDeviceTeam); @@ -809,11 +809,12 @@ nm_device_team_class_init (NMDeviceTeamClass *klass) g_object_class_install_property (object_class, PROP_SLAVES, g_param_spec_boxed (NM_DEVICE_TEAM_SLAVES, "", "", - DBUS_TYPE_G_ARRAY_OF_OBJECT_PATH, + G_TYPE_STRV, G_PARAM_READABLE | G_PARAM_STATIC_STRINGS)); nm_exported_object_class_add_interface (NM_EXPORTED_OBJECT_CLASS (klass), - &dbus_glib_nm_device_team_object_info); + NMDBUS_TYPE_DEVICE_TEAM_SKELETON, + NULL); } diff --git a/src/devices/wifi/Makefile.am b/src/devices/wifi/Makefile.am index cf4bb23a59..9133e312d0 100644 --- a/src/devices/wifi/Makefile.am +++ b/src/devices/wifi/Makefile.am @@ -13,13 +13,14 @@ AM_CPPFLAGS = \ -I${top_srcdir}/src/settings \ -I${top_srcdir}/src/platform \ -I${top_srcdir}/src/supplicant-manager \ + -I${top_builddir}/introspection \ -I${top_srcdir}/include \ -I${top_builddir}/libnm-core \ -I${top_srcdir}/libnm-core \ -DG_LOG_DOMAIN=\""NetworkManager-wifi"\" \ -DNETWORKMANAGER_COMPILATION=NM_NETWORKMANAGER_COMPILATION_INSIDE_DAEMON \ -DNM_VERSION_MAX_ALLOWED=NM_VERSION_NEXT_STABLE \ - $(DBUS_CFLAGS) + $(GLIB_CFLAGS) GLIB_GENERATED = nm-wifi-enum-types.h nm-wifi-enum-types.c GLIB_MKENUMS_H_FLAGS = --identifier-prefix NM @@ -29,14 +30,7 @@ nm_wifi_enum_types_sources = \ $(srcdir)/nm-wifi-ap.h \ $(srcdir)/nm-device-olpc-mesh.h -glue_sources = \ - nm-device-wifi-glue.h \ - nm-device-olpc-mesh-glue.h - -%-glue.h: $(top_srcdir)/introspection/%.xml - $(AM_V_GEN) dbus-binding-tool --prefix=$(subst -,_,$(subst -glue.h,,$@)) --mode=glib-server --output=$@ $< - -BUILT_SOURCES = $(GLIB_GENERATED) $(glue_sources) +BUILT_SOURCES = $(GLIB_GENERATED) pkglib_LTLIBRARIES = libnm-device-plugin-wifi.la @@ -60,7 +54,8 @@ libnm_device_plugin_wifi_la_LDFLAGS = \ -Wl,--version-script=$(SYMBOL_VIS_FILE) libnm_device_plugin_wifi_la_LIBADD = \ - $(DBUS_LIBS) \ + $(top_builddir)/introspection/libnmdbus.la \ + $(GLIB_LIBS) \ $(GUDEV_LIBS) CLEANFILES = $(BUILT_SOURCES) diff --git a/src/devices/wifi/nm-device-olpc-mesh.c b/src/devices/wifi/nm-device-olpc-mesh.c index 2718e20612..c3699da3a4 100644 --- a/src/devices/wifi/nm-device-olpc-mesh.c +++ b/src/devices/wifi/nm-device-olpc-mesh.c @@ -26,7 +26,6 @@ #include "config.h" -#include #include #include #include @@ -54,7 +53,7 @@ /* This is a bug; but we can't really change API now... */ #include "nm-vpn-dbus-interface.h" -#include "nm-device-olpc-mesh-glue.h" +#include "nmdbus-device-olpc-mesh.h" #include "nm-device-logging.h" _LOG_DECLARE_SELF(NMDeviceOlpcMesh); @@ -531,10 +530,10 @@ nm_device_olpc_mesh_class_init (NMDeviceOlpcMeshClass *klass) /* Properties */ g_object_class_install_property (object_class, PROP_COMPANION, - g_param_spec_boxed (NM_DEVICE_OLPC_MESH_COMPANION, "", "", - DBUS_TYPE_G_OBJECT_PATH, - G_PARAM_READABLE | - G_PARAM_STATIC_STRINGS)); + g_param_spec_string (NM_DEVICE_OLPC_MESH_COMPANION, "", "", + NULL, + G_PARAM_READABLE | + G_PARAM_STATIC_STRINGS)); g_object_class_install_property (object_class, PROP_ACTIVE_CHANNEL, @@ -544,6 +543,7 @@ nm_device_olpc_mesh_class_init (NMDeviceOlpcMeshClass *klass) G_PARAM_STATIC_STRINGS)); nm_exported_object_class_add_interface (NM_EXPORTED_OBJECT_CLASS (klass), - &dbus_glib_nm_device_olpc_mesh_object_info); + NMDBUS_TYPE_DEVICE_OLPC_MESH_SKELETON, + NULL); } diff --git a/src/devices/wifi/nm-device-wifi.c b/src/devices/wifi/nm-device-wifi.c index 74ba055038..fb4b5fa40c 100644 --- a/src/devices/wifi/nm-device-wifi.c +++ b/src/devices/wifi/nm-device-wifi.c @@ -21,7 +21,6 @@ #include "config.h" -#include #include #include #include @@ -48,23 +47,10 @@ #include "nm-auth-utils.h" #include "nm-settings-connection.h" #include "nm-enum-types.h" -#include "nm-dbus-glib-types.h" #include "nm-wifi-enum-types.h" #include "nm-connection-provider.h" -static gboolean impl_device_get_access_points (NMDeviceWifi *device, - GPtrArray **aps, - GError **err); - -static gboolean impl_device_get_all_access_points (NMDeviceWifi *device, - GPtrArray **aps, - GError **err); - -static void impl_device_request_scan (NMDeviceWifi *device, - GHashTable *options, - DBusGMethodInvocation *context); - -#include "nm-device-wifi-glue.h" +#include "nmdbus-device-wifi.h" #include "nm-device-logging.h" _LOG_DECLARE_SELF(NMDeviceWifi); @@ -1017,102 +1003,108 @@ get_sorted_ap_list (NMDeviceWifi *self) return g_slist_sort (sorted, (GCompareFunc) ap_id_compare); } -static gboolean -impl_device_get_access_points (NMDeviceWifi *self, - GPtrArray **aps, - GError **err) +static void +impl_device_wifi_get_access_points (NMDeviceWifi *self, + GDBusMethodInvocation *context) { GSList *sorted, *iter; + GPtrArray *paths; - *aps = g_ptr_array_new (); + paths = g_ptr_array_new (); sorted = get_sorted_ap_list (self); for (iter = sorted; iter; iter = iter->next) { NMAccessPoint *ap = NM_AP (iter->data); if (nm_ap_get_ssid (ap)) - g_ptr_array_add (*aps, g_strdup (nm_exported_object_get_path (NM_EXPORTED_OBJECT (ap)))); + g_ptr_array_add (paths, g_strdup (nm_exported_object_get_path (NM_EXPORTED_OBJECT (ap)))); } + g_ptr_array_add (paths, NULL); g_slist_free (sorted); - return TRUE; + + g_dbus_method_invocation_return_value (context, g_variant_new ("(^ao)", (char **) paths->pdata)); + g_ptr_array_unref (paths); } -static gboolean -impl_device_get_all_access_points (NMDeviceWifi *self, - GPtrArray **aps, - GError **err) +static void +impl_device_wifi_get_all_access_points (NMDeviceWifi *self, + GDBusMethodInvocation *context) { GSList *sorted, *iter; + GPtrArray *paths; - *aps = g_ptr_array_new (); + paths = g_ptr_array_new (); sorted = get_sorted_ap_list (self); for (iter = sorted; iter; iter = iter->next) - g_ptr_array_add (*aps, g_strdup (nm_exported_object_get_path (NM_EXPORTED_OBJECT (iter->data)))); + g_ptr_array_add (paths, g_strdup (nm_exported_object_get_path (NM_EXPORTED_OBJECT (iter->data)))); + g_ptr_array_add (paths, NULL); g_slist_free (sorted); - return TRUE; + + g_dbus_method_invocation_return_value (context, g_variant_new ("(^ao)", (char **) paths->pdata)); + g_ptr_array_unref (paths); } static void request_scan_cb (NMDevice *device, - DBusGMethodInvocation *context, + GDBusMethodInvocation *context, NMAuthSubject *subject, GError *error, gpointer user_data) { NMDeviceWifi *self = NM_DEVICE_WIFI (device); - GError *local = NULL; if (error) { - dbus_g_method_return_error (context, error); + g_dbus_method_invocation_return_gerror (context, error); return; } if (!check_scanning_allowed (self)) { - local = g_error_new_literal (NM_DEVICE_ERROR, - NM_DEVICE_ERROR_NOT_ALLOWED, - "Scanning not allowed at this time"); - dbus_g_method_return_error (context, local); - g_error_free (local); + g_dbus_method_invocation_return_error_literal (context, + NM_DEVICE_ERROR, + NM_DEVICE_ERROR_NOT_ALLOWED, + "Scanning not allowed at this time"); return; } cancel_pending_scan (self); request_wireless_scan (self); - dbus_g_method_return (context); + g_dbus_method_invocation_return_value (context, NULL); } static void -impl_device_request_scan (NMDeviceWifi *self, - GHashTable *options, - DBusGMethodInvocation *context) +impl_device_wifi_request_scan (NMDeviceWifi *self, + GDBusMethodInvocation *context, + GVariant *options) { NMDeviceWifiPrivate *priv = NM_DEVICE_WIFI_GET_PRIVATE (self); NMDevice *device = NM_DEVICE (self); gint32 last_scan; - GError *error; if ( !priv->enabled || !priv->sup_iface || nm_device_get_state (device) < NM_DEVICE_STATE_DISCONNECTED || nm_device_is_activating (device)) { - error = g_error_new_literal (NM_DEVICE_ERROR, - NM_DEVICE_ERROR_NOT_ALLOWED, - "Scanning not allowed while unavailable or activating"); - goto error; + g_dbus_method_invocation_return_error_literal (context, + NM_DEVICE_ERROR, + NM_DEVICE_ERROR_NOT_ALLOWED, + "Scanning not allowed while unavailable or activating"); + return; } if (nm_supplicant_interface_get_scanning (priv->sup_iface)) { - error = g_error_new_literal (NM_DEVICE_ERROR, - NM_DEVICE_ERROR_NOT_ALLOWED, - "Scanning not allowed while already scanning"); - goto error; + g_dbus_method_invocation_return_error_literal (context, + NM_DEVICE_ERROR, + NM_DEVICE_ERROR_NOT_ALLOWED, + "Scanning not allowed while already scanning"); + return; } last_scan = nm_supplicant_interface_get_last_scan_time (priv->sup_iface); if (last_scan && (nm_utils_get_monotonic_timestamp_s () - last_scan) < 10) { - error = g_error_new_literal (NM_DEVICE_ERROR, - NM_DEVICE_ERROR_NOT_ALLOWED, - "Scanning not allowed immediately following previous scan"); - goto error; + g_dbus_method_invocation_return_error_literal (context, + NM_DEVICE_ERROR, + NM_DEVICE_ERROR_NOT_ALLOWED, + "Scanning not allowed immediately following previous scan"); + return; } /* Ask the manager to authenticate this request for us */ @@ -1124,11 +1116,6 @@ impl_device_request_scan (NMDeviceWifi *self, TRUE, request_scan_cb, NULL); - return; - -error: - dbus_g_method_return_error (context, error); - g_error_free (error); } static gboolean @@ -2922,11 +2909,12 @@ get_property (GObject *object, guint prop_id, g_value_set_uint (value, priv->capabilities); break; case PROP_ACCESS_POINTS: - array = g_ptr_array_sized_new (g_hash_table_size (priv->aps)); + array = g_ptr_array_sized_new (g_hash_table_size (priv->aps) + 1); g_hash_table_iter_init (&iter, priv->aps); while (g_hash_table_iter_next (&iter, (gpointer) &dbus_path, NULL)) g_ptr_array_add (array, g_strdup (dbus_path)); - g_value_take_boxed (value, array); + g_ptr_array_add (array, NULL); + g_value_take_boxed (value, (char **) g_ptr_array_free (array, FALSE)); break; case PROP_ACTIVE_ACCESS_POINT: nm_utils_g_value_set_object_path (value, priv->current_ap); @@ -3011,16 +2999,16 @@ nm_device_wifi_class_init (NMDeviceWifiClass *klass) g_object_class_install_property (object_class, PROP_ACCESS_POINTS, g_param_spec_boxed (NM_DEVICE_WIFI_ACCESS_POINTS, "", "", - DBUS_TYPE_G_ARRAY_OF_OBJECT_PATH, + G_TYPE_STRV, G_PARAM_READABLE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (object_class, PROP_ACTIVE_ACCESS_POINT, - g_param_spec_boxed (NM_DEVICE_WIFI_ACTIVE_ACCESS_POINT, "", "", - DBUS_TYPE_G_OBJECT_PATH, - G_PARAM_READABLE | - G_PARAM_STATIC_STRINGS)); + g_param_spec_string (NM_DEVICE_WIFI_ACTIVE_ACCESS_POINT, "", "", + NULL, + G_PARAM_READABLE | + G_PARAM_STATIC_STRINGS)); g_object_class_install_property (object_class, PROP_CAPABILITIES, @@ -3044,7 +3032,7 @@ nm_device_wifi_class_init (NMDeviceWifiClass *klass) G_STRUCT_OFFSET (NMDeviceWifiClass, access_point_added), NULL, NULL, NULL, G_TYPE_NONE, 1, - G_TYPE_OBJECT); + NM_TYPE_AP); signals[ACCESS_POINT_REMOVED] = g_signal_new ("access-point-removed", @@ -3053,7 +3041,7 @@ nm_device_wifi_class_init (NMDeviceWifiClass *klass) 0, NULL, NULL, NULL, G_TYPE_NONE, 1, - G_TYPE_OBJECT); + NM_TYPE_AP); signals[SCANNING_ALLOWED] = g_signal_new ("scanning-allowed", @@ -3064,7 +3052,11 @@ nm_device_wifi_class_init (NMDeviceWifiClass *klass) G_TYPE_BOOLEAN, 0); nm_exported_object_class_add_interface (NM_EXPORTED_OBJECT_CLASS (klass), - &dbus_glib_nm_device_wifi_object_info); + NMDBUS_TYPE_DEVICE_WIFI_SKELETON, + "GetAccessPoints", impl_device_wifi_get_access_points, + "GetAllAccessPoints", impl_device_wifi_get_all_access_points, + "RequestScan", impl_device_wifi_request_scan, + NULL); } diff --git a/src/devices/wifi/nm-wifi-ap.c b/src/devices/wifi/nm-wifi-ap.c index 6502e88326..71b17e65c2 100644 --- a/src/devices/wifi/nm-wifi-ap.c +++ b/src/devices/wifi/nm-wifi-ap.c @@ -33,7 +33,7 @@ #include "nm-setting-wireless.h" -#include "nm-access-point-glue.h" +#include "nmdbus-access-point.h" /* * Encapsulates Access Point information @@ -46,7 +46,7 @@ typedef struct GByteArray * ssid; char * address; NM80211Mode mode; - gint8 strength; + guint8 strength; guint32 freq; /* Frequency in MHz; ie 2412 (== 2.412 GHz) */ guint32 max_bitrate;/* Maximum bitrate of the AP in Kbit/s (ie 54000 Kb/s == 54Mbit/s) */ @@ -902,9 +902,7 @@ get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec) { NMAccessPointPrivate *priv = NM_AP_GET_PRIVATE (object); - GArray * ssid; - int len; - int i; + GVariant *ssid; switch (prop_id) { case PROP_FLAGS: @@ -917,12 +915,12 @@ get_property (GObject *object, guint prop_id, g_value_set_uint (value, priv->rsn_flags); break; case PROP_SSID: - len = priv->ssid ? priv->ssid->len : 0; - ssid = g_array_sized_new (FALSE, TRUE, sizeof (unsigned char), len); - for (i = 0; i < len; i++) - g_array_append_val (ssid, priv->ssid->data[i]); - g_value_set_boxed (value, ssid); - g_array_free (ssid, TRUE); + if (priv->ssid) { + ssid = g_variant_new_fixed_array (G_VARIANT_TYPE_BYTE, + priv->ssid->data, priv->ssid->len, 1); + } else + ssid = g_variant_new_array (G_VARIANT_TYPE_BYTE, NULL, 0); + g_value_take_variant (value, ssid); break; case PROP_FREQUENCY: g_value_set_uint (value, priv->freq); @@ -937,7 +935,7 @@ get_property (GObject *object, guint prop_id, g_value_set_uint (value, priv->max_bitrate); break; case PROP_STRENGTH: - g_value_set_schar (value, priv->strength); + g_value_set_uchar (value, priv->strength); break; case PROP_LAST_SEEN: g_value_set_int (value, @@ -1004,9 +1002,10 @@ nm_ap_class_init (NMAccessPointClass *ap_class) g_object_class_install_property (object_class, PROP_SSID, - g_param_spec_boxed (NM_AP_SSID, "", "", - DBUS_TYPE_G_UCHAR_ARRAY, - G_PARAM_READABLE | G_PARAM_STATIC_STRINGS)); + g_param_spec_variant (NM_AP_SSID, "", "", + G_VARIANT_TYPE ("ay"), + NULL, + G_PARAM_READABLE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (object_class, PROP_FREQUENCY, @@ -1034,9 +1033,9 @@ nm_ap_class_init (NMAccessPointClass *ap_class) g_object_class_install_property (object_class, PROP_STRENGTH, - g_param_spec_char (NM_AP_STRENGTH, "", "", - G_MININT8, G_MAXINT8, 0, - G_PARAM_READABLE | G_PARAM_STATIC_STRINGS)); + g_param_spec_uchar (NM_AP_STRENGTH, "", "", + 0, G_MAXINT8, 0, + G_PARAM_READABLE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (object_class, PROP_LAST_SEEN, @@ -1045,6 +1044,7 @@ nm_ap_class_init (NMAccessPointClass *ap_class) G_PARAM_READABLE | G_PARAM_STATIC_STRINGS)); nm_exported_object_class_add_interface (NM_EXPORTED_OBJECT_CLASS (ap_class), - &dbus_glib_nm_access_point_object_info); + NMDBUS_TYPE_ACCESS_POINT_SKELETON, + NULL); } diff --git a/src/devices/wifi/tests/Makefile.am b/src/devices/wifi/tests/Makefile.am index 4cac07e8c0..bc342eaa46 100644 --- a/src/devices/wifi/tests/Makefile.am +++ b/src/devices/wifi/tests/Makefile.am @@ -1,4 +1,5 @@ AM_CPPFLAGS = \ + -I$(top_builddir)/introspection \ -I$(top_srcdir)/include \ -I$(top_srcdir)/libnm-core \ -I$(top_builddir)/libnm-core \ @@ -9,8 +10,7 @@ AM_CPPFLAGS = \ -DG_LOG_DOMAIN=\""NetworkManager-wifi"\" \ -DNETWORKMANAGER_COMPILATION=NM_NETWORKMANAGER_COMPILATION_INSIDE_DAEMON \ -DNM_VERSION_MAX_ALLOWED=NM_VERSION_NEXT_STABLE \ - $(GLIB_CFLAGS) \ - $(DBUS_CFLAGS) + $(GLIB_CFLAGS) noinst_PROGRAMS = test-wifi-ap-utils diff --git a/src/devices/wifi/tests/test-wifi-ap-utils.c b/src/devices/wifi/tests/test-wifi-ap-utils.c index 9b0092c3d9..fa0aec0ed4 100644 --- a/src/devices/wifi/tests/test-wifi-ap-utils.c +++ b/src/devices/wifi/tests/test-wifi-ap-utils.c @@ -24,7 +24,6 @@ #include "nm-default.h" #include "nm-wifi-ap-utils.h" -#include "nm-dbus-glib-types.h" #include "nm-core-internal.h" diff --git a/src/devices/wwan/Makefile.am b/src/devices/wwan/Makefile.am index b382c2efa3..56d4fb6665 100644 --- a/src/devices/wwan/Makefile.am +++ b/src/devices/wwan/Makefile.am @@ -8,13 +8,14 @@ AM_CPPFLAGS = \ -I${top_srcdir}/src/devices \ -I${top_srcdir}/src/settings \ -I${top_srcdir}/src/platform \ + -I${top_builddir}/introspection \ -I${top_srcdir}/include \ -I${top_builddir}/libnm-core \ -I${top_srcdir}/libnm-core \ -DG_LOG_DOMAIN=\""NetworkManager-wwan"\" \ -DNETWORKMANAGER_COMPILATION=NM_NETWORKMANAGER_COMPILATION_INSIDE_DAEMON \ -DNM_VERSION_MAX_ALLOWED=NM_VERSION_NEXT_STABLE \ - $(DBUS_CFLAGS) \ + $(GLIB_CFLAGS) \ $(MM_GLIB_CFLAGS) BUILT_SOURCES = $(null) @@ -45,31 +46,29 @@ WWAN_SYMBOL_VIS_FILE=$(srcdir)/wwan-exports.ver libnm_wwan_la_LDFLAGS = \ -avoid-version \ -Wl,--version-script=$(WWAN_SYMBOL_VIS_FILE) -libnm_wwan_la_LIBADD = $(DBUS_LIBS) $(MM_GLIB_LIBS) +libnm_wwan_la_LIBADD = \ + $(top_builddir)/introspection/libnmdbus.la \ + $(GLIB_LIBS) \ + $(MM_GLIB_LIBS) ########################################################### -nm-device-modem-glue.h: $(top_srcdir)/introspection/nm-device-modem.xml - dbus-binding-tool --prefix=nm_device_modem --mode=glib-server --output=$@ $< - -BUILT_SOURCES += nm-device-modem-glue.h - SYMBOL_VIS_FILE=$(srcdir)/exports.ver libnm_device_plugin_wwan_la_SOURCES = \ nm-wwan-factory.c \ nm-wwan-factory.h \ nm-device-modem.c \ - nm-device-modem.h \ - nm-device-modem-glue.h + nm-device-modem.h libnm_device_plugin_wwan_la_LDFLAGS = \ -module -avoid-version \ -Wl,--version-script=$(SYMBOL_VIS_FILE) libnm_device_plugin_wwan_la_LIBADD = \ + $(top_builddir)/introspection/libnmdbus.la \ libnm-wwan.la \ - $(DBUS_LIBS) + $(GLIB_LIBS) ########################################################### diff --git a/src/devices/wwan/nm-device-modem.c b/src/devices/wwan/nm-device-modem.c index 9fdcef46ea..b875080b4b 100644 --- a/src/devices/wwan/nm-device-modem.c +++ b/src/devices/wwan/nm-device-modem.c @@ -35,12 +35,12 @@ #include "nm-device-logging.h" _LOG_DECLARE_SELF(NMDeviceModem); +#include "nmdbus-device-modem.h" + G_DEFINE_TYPE (NMDeviceModem, nm_device_modem, NM_TYPE_DEVICE) #define NM_DEVICE_MODEM_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), NM_TYPE_DEVICE_MODEM, NMDeviceModemPrivate)) -#include "nm-device-modem-glue.h" - typedef struct { NMModem *modem; NMDeviceModemCapabilities caps; @@ -794,5 +794,6 @@ nm_device_modem_class_init (NMDeviceModemClass *mclass) G_PARAM_STATIC_STRINGS)); nm_exported_object_class_add_interface (NM_EXPORTED_OBJECT_CLASS (mclass), - &dbus_glib_nm_device_modem_object_info); + NMDBUS_TYPE_DEVICE_MODEM_SKELETON, + NULL); } diff --git a/src/devices/wwan/nm-modem.c b/src/devices/wwan/nm-modem.c index be35ffd31f..d6433a085d 100644 --- a/src/devices/wwan/nm-modem.c +++ b/src/devices/wwan/nm-modem.c @@ -28,7 +28,6 @@ #include "nm-default.h" #include "NetworkManagerUtils.h" #include "nm-device-private.h" -#include "nm-dbus-glib-types.h" #include "nm-modem-enum-types.h" #include "nm-route-manager.h" diff --git a/src/nm-activation-request.c b/src/nm-activation-request.c index e10182c823..3ced2a3dcf 100644 --- a/src/nm-activation-request.c +++ b/src/nm-activation-request.c @@ -461,7 +461,7 @@ get_property (GObject *object, guint prop_id, device = nm_active_connection_get_device (NM_ACTIVE_CONNECTION (object)); if (!device) { - g_value_set_boxed (value, "/"); + g_value_set_string (value, "/"); return; } diff --git a/src/nm-active-connection.c b/src/nm-active-connection.c index aeb5bd7835..9a51e2e1fc 100644 --- a/src/nm-active-connection.c +++ b/src/nm-active-connection.c @@ -24,13 +24,13 @@ #include "nm-default.h" #include "nm-active-connection.h" #include "nm-dbus-interface.h" -#include "nm-dbus-glib-types.h" #include "nm-device.h" #include "nm-settings-connection.h" #include "nm-auth-utils.h" #include "nm-auth-subject.h" #include "NetworkManagerUtils.h" -#include "nm-active-connection-glue.h" + +#include "nmdbus-active-connection.h" /* Base class for anything implementing the Connection.Active D-Bus interface */ G_DEFINE_ABSTRACT_TYPE (NMActiveConnection, nm_active_connection, NM_TYPE_EXPORTED_OBJECT) @@ -586,7 +586,7 @@ nm_active_connection_get_assumed (NMActiveConnection *self) static void auth_done (NMAuthChain *chain, GError *error, - DBusGMethodInvocation *unused, + GDBusMethodInvocation *unused, gpointer user_data) { NMActiveConnection *self = NM_ACTIVE_CONNECTION (user_data); @@ -720,10 +720,10 @@ set_property (GObject *object, guint prop_id, nm_active_connection_set_master (NM_ACTIVE_CONNECTION (object), g_value_get_object (value)); break; case PROP_SPECIFIC_OBJECT: - tmp = g_value_get_boxed (value); + tmp = g_value_get_string (value); /* NM uses "/" to mean NULL */ if (g_strcmp0 (tmp, "/") != 0) - priv->specific_object = g_value_dup_boxed (value); + priv->specific_object = g_strdup (tmp); break; case PROP_DEFAULT: priv->is_default = !!g_value_get_boolean (value); @@ -752,7 +752,7 @@ get_property (GObject *object, guint prop_id, switch (prop_id) { case PROP_CONNECTION: - g_value_set_boxed (value, nm_connection_get_path (priv->connection)); + g_value_set_string (value, nm_connection_get_path (priv->connection)); break; case PROP_ID: g_value_set_string (value, nm_connection_get_id (priv->connection)); @@ -764,13 +764,14 @@ get_property (GObject *object, guint prop_id, g_value_set_string (value, nm_connection_get_connection_type (priv->connection)); break; case PROP_SPECIFIC_OBJECT: - g_value_set_boxed (value, priv->specific_object ? priv->specific_object : "/"); + g_value_set_string (value, priv->specific_object ? priv->specific_object : "/"); break; case PROP_DEVICES: - devices = g_ptr_array_sized_new (1); + devices = g_ptr_array_sized_new (2); if (priv->device && priv->state < NM_ACTIVE_CONNECTION_STATE_DEACTIVATED) g_ptr_array_add (devices, g_strdup (nm_exported_object_get_path (NM_EXPORTED_OBJECT (priv->device)))); - g_value_take_boxed (value, devices); + g_ptr_array_add (devices, NULL); + g_value_take_boxed (value, (char **) g_ptr_array_free (devices, FALSE)); break; case PROP_STATE: if (priv->state_set) @@ -787,19 +788,19 @@ get_property (GObject *object, guint prop_id, break; case PROP_IP4_CONFIG: /* The IP and DHCP config properties may be overridden by a subclass */ - g_value_set_boxed (value, "/"); + g_value_set_string (value, "/"); break; case PROP_DHCP4_CONFIG: - g_value_set_boxed (value, "/"); + g_value_set_string (value, "/"); break; case PROP_DEFAULT6: g_value_set_boolean (value, priv->is_default6); break; case PROP_IP6_CONFIG: - g_value_set_boxed (value, "/"); + g_value_set_string (value, "/"); break; case PROP_DHCP6_CONFIG: - g_value_set_boxed (value, "/"); + g_value_set_string (value, "/"); break; case PROP_VPN: g_value_set_boolean (value, priv->vpn); @@ -888,10 +889,10 @@ nm_active_connection_class_init (NMActiveConnectionClass *ac_class) /* D-Bus exported properties */ g_object_class_install_property (object_class, PROP_CONNECTION, - g_param_spec_boxed (NM_ACTIVE_CONNECTION_CONNECTION, "", "", - DBUS_TYPE_G_OBJECT_PATH, - G_PARAM_READABLE | - G_PARAM_STATIC_STRINGS)); + g_param_spec_string (NM_ACTIVE_CONNECTION_CONNECTION, "", "", + NULL, + G_PARAM_READABLE | + G_PARAM_STATIC_STRINGS)); g_object_class_install_property (object_class, PROP_ID, @@ -916,15 +917,15 @@ nm_active_connection_class_init (NMActiveConnectionClass *ac_class) g_object_class_install_property (object_class, PROP_SPECIFIC_OBJECT, - g_param_spec_boxed (NM_ACTIVE_CONNECTION_SPECIFIC_OBJECT, "", "", - DBUS_TYPE_G_OBJECT_PATH, - G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | - G_PARAM_STATIC_STRINGS)); + g_param_spec_string (NM_ACTIVE_CONNECTION_SPECIFIC_OBJECT, "", "", + NULL, + G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | + G_PARAM_STATIC_STRINGS)); g_object_class_install_property (object_class, PROP_DEVICES, g_param_spec_boxed (NM_ACTIVE_CONNECTION_DEVICES, "", "", - DBUS_TYPE_G_ARRAY_OF_OBJECT_PATH, + G_TYPE_STRV, G_PARAM_READABLE | G_PARAM_STATIC_STRINGS)); @@ -946,17 +947,17 @@ nm_active_connection_class_init (NMActiveConnectionClass *ac_class) g_object_class_install_property (object_class, PROP_IP4_CONFIG, - g_param_spec_boxed (NM_ACTIVE_CONNECTION_IP4_CONFIG, "", "", - DBUS_TYPE_G_OBJECT_PATH, - G_PARAM_READABLE | - G_PARAM_STATIC_STRINGS)); + g_param_spec_string (NM_ACTIVE_CONNECTION_IP4_CONFIG, "", "", + NULL, + G_PARAM_READABLE | + G_PARAM_STATIC_STRINGS)); g_object_class_install_property (object_class, PROP_DHCP4_CONFIG, - g_param_spec_boxed (NM_ACTIVE_CONNECTION_DHCP4_CONFIG, "", "", - DBUS_TYPE_G_OBJECT_PATH, - G_PARAM_READABLE | - G_PARAM_STATIC_STRINGS)); + g_param_spec_string (NM_ACTIVE_CONNECTION_DHCP4_CONFIG, "", "", + NULL, + G_PARAM_READABLE | + G_PARAM_STATIC_STRINGS)); g_object_class_install_property (object_class, PROP_DEFAULT6, @@ -967,17 +968,17 @@ nm_active_connection_class_init (NMActiveConnectionClass *ac_class) g_object_class_install_property (object_class, PROP_IP6_CONFIG, - g_param_spec_boxed (NM_ACTIVE_CONNECTION_IP6_CONFIG, "", "", - DBUS_TYPE_G_OBJECT_PATH, - G_PARAM_READABLE | - G_PARAM_STATIC_STRINGS)); + g_param_spec_string (NM_ACTIVE_CONNECTION_IP6_CONFIG, "", "", + NULL, + G_PARAM_READABLE | + G_PARAM_STATIC_STRINGS)); g_object_class_install_property (object_class, PROP_DHCP6_CONFIG, - g_param_spec_boxed (NM_ACTIVE_CONNECTION_DHCP6_CONFIG, "", "", - DBUS_TYPE_G_OBJECT_PATH, - G_PARAM_READABLE | - G_PARAM_STATIC_STRINGS)); + g_param_spec_string (NM_ACTIVE_CONNECTION_DHCP6_CONFIG, "", "", + NULL, + G_PARAM_READABLE | + G_PARAM_STATIC_STRINGS)); g_object_class_install_property (object_class, PROP_VPN, @@ -988,10 +989,10 @@ nm_active_connection_class_init (NMActiveConnectionClass *ac_class) g_object_class_install_property (object_class, PROP_MASTER, - g_param_spec_boxed (NM_ACTIVE_CONNECTION_MASTER, "", "", - DBUS_TYPE_G_OBJECT_PATH, - G_PARAM_READABLE | - G_PARAM_STATIC_STRINGS)); + g_param_spec_string (NM_ACTIVE_CONNECTION_MASTER, "", "", + NULL, + G_PARAM_READABLE | + G_PARAM_STATIC_STRINGS)); /* Internal properties */ g_object_class_install_property @@ -1045,6 +1046,7 @@ nm_active_connection_class_init (NMActiveConnectionClass *ac_class) G_TYPE_NONE, 1, G_TYPE_UINT); nm_exported_object_class_add_interface (NM_EXPORTED_OBJECT_CLASS (ac_class), - &dbus_glib_nm_active_connection_object_info); + NMDBUS_TYPE_ACTIVE_CONNECTION_SKELETON, + NULL); } diff --git a/src/vpn-manager/nm-vpn-connection.c b/src/vpn-manager/nm-vpn-connection.c index 2a1a16a23a..ed3666328a 100644 --- a/src/vpn-manager/nm-vpn-connection.c +++ b/src/vpn-manager/nm-vpn-connection.c @@ -34,7 +34,6 @@ #include "nm-ip6-config.h" #include "nm-platform.h" #include "nm-active-connection.h" -#include "nm-dbus-glib-types.h" #include "NetworkManagerUtils.h" #include "settings/nm-settings-connection.h" #include "nm-dispatcher.h" @@ -44,7 +43,7 @@ #include "nm-route-manager.h" #include "nm-firewall-manager.h" -#include "nm-vpn-connection-glue.h" +#include "nmdbus-vpn-connection.h" G_DEFINE_TYPE (NMVpnConnection, nm_vpn_connection, NM_TYPE_ACTIVE_CONNECTION) @@ -2354,6 +2353,7 @@ nm_vpn_connection_class_init (NMVpnConnectionClass *connection_class) G_TYPE_NONE, 0); nm_exported_object_class_add_interface (NM_EXPORTED_OBJECT_CLASS (connection_class), - &dbus_glib_nm_vpn_connection_object_info); + NMDBUS_TYPE_VPN_CONNECTION_SKELETON, + NULL); }