mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-05-06 17:18:02 +02:00
core: merge branch 'th/dbus-property-changed-source-iface-bgo770629-v2'
https://bugzilla.gnome.org/show_bug.cgi?id=770629 https://bugzilla.redhat.com/show_bug.cgi?id=1371920 (cherry picked from commit673282ece6) (cherry picked from commitc87b89bf8f)
This commit is contained in:
commit
7b2d17c1bf
32 changed files with 160 additions and 28 deletions
10
NEWS
10
NEWS
|
|
@ -1,3 +1,13 @@
|
||||||
|
==============================================
|
||||||
|
NetworkManager-1.2.6
|
||||||
|
Overview of changes since NetworkManager-1.2.4
|
||||||
|
==============================================
|
||||||
|
|
||||||
|
This is a new stable release of NetworkManager. Notable changes include:
|
||||||
|
|
||||||
|
* Fix emission of NM-style PropertiesChanged signals and deprecate them
|
||||||
|
for PropertiesChanged on "org.freedesktop.DBus.Properties" interface.
|
||||||
|
|
||||||
==============================================
|
==============================================
|
||||||
NetworkManager-1.2.4
|
NetworkManager-1.2.4
|
||||||
Overview of changes since NetworkManager-1.2.2
|
Overview of changes since NetworkManager-1.2.2
|
||||||
|
|
|
||||||
|
|
@ -93,6 +93,8 @@
|
||||||
<!--
|
<!--
|
||||||
PropertiesChanged:
|
PropertiesChanged:
|
||||||
@properties: A dictionary mapping property names to variant boxed values
|
@properties: A dictionary mapping property names to variant boxed values
|
||||||
|
|
||||||
|
DEPRECATED. Use the standard "PropertiesChanged" signal from "org.freedesktop.DBus.Properties" instead which exists since version NetworkManager 1.2.0.
|
||||||
-->
|
-->
|
||||||
<signal name="PropertiesChanged">
|
<signal name="PropertiesChanged">
|
||||||
<arg name="properties" type="a{sv}"/>
|
<arg name="properties" type="a{sv}"/>
|
||||||
|
|
|
||||||
|
|
@ -148,6 +148,8 @@
|
||||||
<!--
|
<!--
|
||||||
PropertiesChanged:
|
PropertiesChanged:
|
||||||
@properties: A dictionary mapping property names to variant boxed values
|
@properties: A dictionary mapping property names to variant boxed values
|
||||||
|
|
||||||
|
DEPRECATED. Use the standard "PropertiesChanged" signal from "org.freedesktop.DBus.Properties" instead which exists since version NetworkManager 1.2.0.
|
||||||
-->
|
-->
|
||||||
<signal name="PropertiesChanged">
|
<signal name="PropertiesChanged">
|
||||||
<arg name="properties" type="a{sv}"/>
|
<arg name="properties" type="a{sv}"/>
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,8 @@
|
||||||
<!--
|
<!--
|
||||||
PropertiesChanged:
|
PropertiesChanged:
|
||||||
@properties: A dictionary mapping property names to variant boxed values
|
@properties: A dictionary mapping property names to variant boxed values
|
||||||
|
|
||||||
|
DEPRECATED. Use the standard "PropertiesChanged" signal from "org.freedesktop.DBus.Properties" instead which exists since version NetworkManager 1.2.0.
|
||||||
-->
|
-->
|
||||||
<signal name="PropertiesChanged">
|
<signal name="PropertiesChanged">
|
||||||
<arg name="properties" type="a{sv}"/>
|
<arg name="properties" type="a{sv}"/>
|
||||||
|
|
|
||||||
|
|
@ -28,6 +28,8 @@
|
||||||
<!--
|
<!--
|
||||||
PropertiesChanged:
|
PropertiesChanged:
|
||||||
@properties: A dictionary mapping property names to variant boxed values
|
@properties: A dictionary mapping property names to variant boxed values
|
||||||
|
|
||||||
|
DEPRECATED. Use the standard "PropertiesChanged" signal from "org.freedesktop.DBus.Properties" instead which exists since version NetworkManager 1.2.0.
|
||||||
-->
|
-->
|
||||||
<signal name="PropertiesChanged">
|
<signal name="PropertiesChanged">
|
||||||
<arg name="properties" type="a{sv}"/>
|
<arg name="properties" type="a{sv}"/>
|
||||||
|
|
|
||||||
|
|
@ -28,6 +28,8 @@
|
||||||
<!--
|
<!--
|
||||||
PropertiesChanged:
|
PropertiesChanged:
|
||||||
@properties: A dictionary mapping property names to variant boxed values
|
@properties: A dictionary mapping property names to variant boxed values
|
||||||
|
|
||||||
|
DEPRECATED. Use the standard "PropertiesChanged" signal from "org.freedesktop.DBus.Properties" instead which exists since version NetworkManager 1.2.0.
|
||||||
-->
|
-->
|
||||||
<signal name="PropertiesChanged">
|
<signal name="PropertiesChanged">
|
||||||
<arg name="properties" type="a{sv}"/>
|
<arg name="properties" type="a{sv}"/>
|
||||||
|
|
|
||||||
|
|
@ -28,6 +28,8 @@
|
||||||
<!--
|
<!--
|
||||||
PropertiesChanged:
|
PropertiesChanged:
|
||||||
@properties: A dictionary mapping property names to variant boxed values
|
@properties: A dictionary mapping property names to variant boxed values
|
||||||
|
|
||||||
|
DEPRECATED. Use the standard "PropertiesChanged" signal from "org.freedesktop.DBus.Properties" instead which exists since version NetworkManager 1.2.0.
|
||||||
-->
|
-->
|
||||||
<signal name="PropertiesChanged">
|
<signal name="PropertiesChanged">
|
||||||
<arg name="properties" type="a{sv}"/>
|
<arg name="properties" type="a{sv}"/>
|
||||||
|
|
|
||||||
|
|
@ -42,6 +42,8 @@
|
||||||
<!--
|
<!--
|
||||||
PropertiesChanged:
|
PropertiesChanged:
|
||||||
@properties: A dictionary mapping property names to variant boxed values
|
@properties: A dictionary mapping property names to variant boxed values
|
||||||
|
|
||||||
|
DEPRECATED. Use the standard "PropertiesChanged" signal from "org.freedesktop.DBus.Properties" instead which exists since version NetworkManager 1.2.0.
|
||||||
-->
|
-->
|
||||||
<signal name="PropertiesChanged">
|
<signal name="PropertiesChanged">
|
||||||
<arg name="properties" type="a{sv}"/>
|
<arg name="properties" type="a{sv}"/>
|
||||||
|
|
|
||||||
|
|
@ -19,6 +19,8 @@
|
||||||
<!--
|
<!--
|
||||||
PropertiesChanged:
|
PropertiesChanged:
|
||||||
@properties: A dictionary mapping property names to variant boxed values
|
@properties: A dictionary mapping property names to variant boxed values
|
||||||
|
|
||||||
|
DEPRECATED. Use the standard "PropertiesChanged" signal from "org.freedesktop.DBus.Properties" instead which exists since version NetworkManager 1.2.0.
|
||||||
-->
|
-->
|
||||||
<signal name="PropertiesChanged">
|
<signal name="PropertiesChanged">
|
||||||
<arg name="properties" type="a{sv}"/>
|
<arg name="properties" type="a{sv}"/>
|
||||||
|
|
|
||||||
|
|
@ -20,6 +20,8 @@
|
||||||
<!--
|
<!--
|
||||||
PropertiesChanged:
|
PropertiesChanged:
|
||||||
@properties: A dictionary mapping property names to variant boxed values
|
@properties: A dictionary mapping property names to variant boxed values
|
||||||
|
|
||||||
|
DEPRECATED. Use the standard "PropertiesChanged" signal from "org.freedesktop.DBus.Properties" instead which exists since version NetworkManager 1.2.0.
|
||||||
-->
|
-->
|
||||||
<signal name="PropertiesChanged">
|
<signal name="PropertiesChanged">
|
||||||
<arg name="properties" type="a{sv}"/>
|
<arg name="properties" type="a{sv}"/>
|
||||||
|
|
|
||||||
|
|
@ -86,6 +86,8 @@
|
||||||
<!--
|
<!--
|
||||||
PropertiesChanged:
|
PropertiesChanged:
|
||||||
@properties: A dictionary mapping property names to variant boxed values
|
@properties: A dictionary mapping property names to variant boxed values
|
||||||
|
|
||||||
|
DEPRECATED. Use the standard "PropertiesChanged" signal from "org.freedesktop.DBus.Properties" instead which exists since version NetworkManager 1.2.0.
|
||||||
-->
|
-->
|
||||||
<signal name="PropertiesChanged">
|
<signal name="PropertiesChanged">
|
||||||
<arg name="properties" type="a{sv}"/>
|
<arg name="properties" type="a{sv}"/>
|
||||||
|
|
|
||||||
|
|
@ -33,6 +33,8 @@
|
||||||
<!--
|
<!--
|
||||||
PropertiesChanged:
|
PropertiesChanged:
|
||||||
@properties: A dictionary mapping property names to variant boxed values
|
@properties: A dictionary mapping property names to variant boxed values
|
||||||
|
|
||||||
|
DEPRECATED. Use the standard "PropertiesChanged" signal from "org.freedesktop.DBus.Properties" instead which exists since version NetworkManager 1.2.0.
|
||||||
-->
|
-->
|
||||||
<signal name="PropertiesChanged">
|
<signal name="PropertiesChanged">
|
||||||
<arg name="properties" type="a{sv}"/>
|
<arg name="properties" type="a{sv}"/>
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,8 @@
|
||||||
<!--
|
<!--
|
||||||
PropertiesChanged:
|
PropertiesChanged:
|
||||||
@properties: A dictionary mapping property names to variant boxed values
|
@properties: A dictionary mapping property names to variant boxed values
|
||||||
|
|
||||||
|
DEPRECATED. Use the standard "PropertiesChanged" signal from "org.freedesktop.DBus.Properties" instead which exists since version NetworkManager 1.2.0.
|
||||||
-->
|
-->
|
||||||
<signal name="PropertiesChanged">
|
<signal name="PropertiesChanged">
|
||||||
<arg name="properties" type="a{sv}"/>
|
<arg name="properties" type="a{sv}"/>
|
||||||
|
|
|
||||||
|
|
@ -27,7 +27,7 @@
|
||||||
PropertiesChanged:
|
PropertiesChanged:
|
||||||
@properties: A dictionary containing the FIXME: check changed parameters.
|
@properties: A dictionary containing the FIXME: check changed parameters.
|
||||||
|
|
||||||
Emitted when the wireless device's properties changed.
|
DEPRECATED. Use the standard "PropertiesChanged" signal from "org.freedesktop.DBus.Properties" instead which exists since version NetworkManager 1.2.0.
|
||||||
-->
|
-->
|
||||||
<signal name="PropertiesChanged">
|
<signal name="PropertiesChanged">
|
||||||
<arg name="properties" type="a{sv}"/>
|
<arg name="properties" type="a{sv}"/>
|
||||||
|
|
|
||||||
|
|
@ -28,6 +28,8 @@
|
||||||
<!--
|
<!--
|
||||||
PropertiesChanged:
|
PropertiesChanged:
|
||||||
@properties: A dictionary mapping property names to variant boxed values
|
@properties: A dictionary mapping property names to variant boxed values
|
||||||
|
|
||||||
|
DEPRECATED. Use the standard "PropertiesChanged" signal from "org.freedesktop.DBus.Properties" instead which exists since version NetworkManager 1.2.0.
|
||||||
-->
|
-->
|
||||||
<signal name="PropertiesChanged">
|
<signal name="PropertiesChanged">
|
||||||
<arg name="properties" type="a{sv}"/>
|
<arg name="properties" type="a{sv}"/>
|
||||||
|
|
|
||||||
|
|
@ -57,6 +57,8 @@
|
||||||
<!--
|
<!--
|
||||||
PropertiesChanged:
|
PropertiesChanged:
|
||||||
@properties: A dictionary mapping property names to variant boxed values
|
@properties: A dictionary mapping property names to variant boxed values
|
||||||
|
|
||||||
|
DEPRECATED. Use the standard "PropertiesChanged" signal from "org.freedesktop.DBus.Properties" instead which exists since version NetworkManager 1.2.0.
|
||||||
-->
|
-->
|
||||||
<signal name="PropertiesChanged">
|
<signal name="PropertiesChanged">
|
||||||
<arg name="properties" type="a{sv}"/>
|
<arg name="properties" type="a{sv}"/>
|
||||||
|
|
|
||||||
|
|
@ -12,6 +12,8 @@
|
||||||
<!--
|
<!--
|
||||||
PropertiesChanged:
|
PropertiesChanged:
|
||||||
@properties: A dictionary mapping property names to variant boxed values
|
@properties: A dictionary mapping property names to variant boxed values
|
||||||
|
|
||||||
|
DEPRECATED. Use the standard "PropertiesChanged" signal from "org.freedesktop.DBus.Properties" instead which exists since version NetworkManager 1.2.0.
|
||||||
-->
|
-->
|
||||||
<signal name="PropertiesChanged">
|
<signal name="PropertiesChanged">
|
||||||
<arg name="properties" type="a{sv}"/>
|
<arg name="properties" type="a{sv}"/>
|
||||||
|
|
|
||||||
|
|
@ -34,6 +34,8 @@
|
||||||
<!--
|
<!--
|
||||||
PropertiesChanged:
|
PropertiesChanged:
|
||||||
@properties: A dictionary mapping property names to variant boxed values
|
@properties: A dictionary mapping property names to variant boxed values
|
||||||
|
|
||||||
|
DEPRECATED. Use the standard "PropertiesChanged" signal from "org.freedesktop.DBus.Properties" instead which exists since version NetworkManager 1.2.0.
|
||||||
-->
|
-->
|
||||||
<signal name="PropertiesChanged">
|
<signal name="PropertiesChanged">
|
||||||
<arg name="properties" type="a{sv}"/>
|
<arg name="properties" type="a{sv}"/>
|
||||||
|
|
|
||||||
|
|
@ -131,6 +131,8 @@
|
||||||
<!--
|
<!--
|
||||||
PropertiesChanged:
|
PropertiesChanged:
|
||||||
@properties: A dictionary mapping property names to variant boxed values
|
@properties: A dictionary mapping property names to variant boxed values
|
||||||
|
|
||||||
|
DEPRECATED. Use the standard "PropertiesChanged" signal from "org.freedesktop.DBus.Properties" instead which exists since version NetworkManager 1.2.0.
|
||||||
-->
|
-->
|
||||||
<signal name="PropertiesChanged">
|
<signal name="PropertiesChanged">
|
||||||
<arg name="properties" type="a{sv}"/>
|
<arg name="properties" type="a{sv}"/>
|
||||||
|
|
|
||||||
|
|
@ -93,9 +93,9 @@
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
PropertiesChanged:
|
PropertiesChanged:
|
||||||
@properties: A dictionary containing the FIXME: check changed parameters.
|
@properties: A dictionary containing the changed parameters.
|
||||||
|
|
||||||
Emitted when the wireless device's properties changed.
|
DEPRECATED. Use the standard "PropertiesChanged" signal from "org.freedesktop.DBus.Properties" instead which exists since version NetworkManager 1.2.0.
|
||||||
-->
|
-->
|
||||||
<signal name="PropertiesChanged">
|
<signal name="PropertiesChanged">
|
||||||
<arg name="properties" type="a{sv}"/>
|
<arg name="properties" type="a{sv}"/>
|
||||||
|
|
|
||||||
|
|
@ -83,7 +83,7 @@
|
||||||
PropertiesChanged:
|
PropertiesChanged:
|
||||||
@properties: A dictionary mapping property names to variant boxed values.
|
@properties: A dictionary mapping property names to variant boxed values.
|
||||||
|
|
||||||
Emitted when the WiMax device's properties changed.
|
DEPRECATED. Use the standard "PropertiesChanged" signal from "org.freedesktop.DBus.Properties" instead which exists since version NetworkManager 1.2.0.
|
||||||
-->
|
-->
|
||||||
<signal name="PropertiesChanged">
|
<signal name="PropertiesChanged">
|
||||||
<arg name="properties" type="a{sv}"/>
|
<arg name="properties" type="a{sv}"/>
|
||||||
|
|
|
||||||
|
|
@ -19,6 +19,8 @@
|
||||||
<!--
|
<!--
|
||||||
PropertiesChanged:
|
PropertiesChanged:
|
||||||
@properties: A dictionary mapping property names to variant boxed values
|
@properties: A dictionary mapping property names to variant boxed values
|
||||||
|
|
||||||
|
DEPRECATED. Use the standard "PropertiesChanged" signal from "org.freedesktop.DBus.Properties" instead which exists since version NetworkManager 1.2.0.
|
||||||
-->
|
-->
|
||||||
<signal name="PropertiesChanged">
|
<signal name="PropertiesChanged">
|
||||||
<arg name="properties" type="a{sv}"/>
|
<arg name="properties" type="a{sv}"/>
|
||||||
|
|
|
||||||
|
|
@ -19,6 +19,8 @@
|
||||||
<!--
|
<!--
|
||||||
PropertiesChanged:
|
PropertiesChanged:
|
||||||
@properties: A dictionary mapping property names to variant boxed values
|
@properties: A dictionary mapping property names to variant boxed values
|
||||||
|
|
||||||
|
DEPRECATED. Use the standard "PropertiesChanged" signal from "org.freedesktop.DBus.Properties" instead which exists since version NetworkManager 1.2.0.
|
||||||
-->
|
-->
|
||||||
<signal name="PropertiesChanged">
|
<signal name="PropertiesChanged">
|
||||||
<arg name="properties" type="a{sv}"/>
|
<arg name="properties" type="a{sv}"/>
|
||||||
|
|
|
||||||
|
|
@ -94,6 +94,8 @@
|
||||||
<!--
|
<!--
|
||||||
PropertiesChanged:
|
PropertiesChanged:
|
||||||
@properties: A dictionary mapping property names to variant boxed values
|
@properties: A dictionary mapping property names to variant boxed values
|
||||||
|
|
||||||
|
DEPRECATED. Use the standard "PropertiesChanged" signal from "org.freedesktop.DBus.Properties" instead which exists since version NetworkManager 1.2.0.
|
||||||
-->
|
-->
|
||||||
<signal name="PropertiesChanged">
|
<signal name="PropertiesChanged">
|
||||||
<arg name="properties" type="a{sv}"/>
|
<arg name="properties" type="a{sv}"/>
|
||||||
|
|
|
||||||
|
|
@ -86,6 +86,8 @@
|
||||||
<!--
|
<!--
|
||||||
PropertiesChanged:
|
PropertiesChanged:
|
||||||
@properties: A dictionary mapping property names to variant boxed values
|
@properties: A dictionary mapping property names to variant boxed values
|
||||||
|
|
||||||
|
DEPRECATED. Use the standard "PropertiesChanged" signal from "org.freedesktop.DBus.Properties" instead which exists since version NetworkManager 1.2.0.
|
||||||
-->
|
-->
|
||||||
<signal name="PropertiesChanged">
|
<signal name="PropertiesChanged">
|
||||||
<arg name="properties" type="a{sv}"/>
|
<arg name="properties" type="a{sv}"/>
|
||||||
|
|
|
||||||
|
|
@ -384,7 +384,7 @@
|
||||||
PropertiesChanged:
|
PropertiesChanged:
|
||||||
@properties: The changed properties.
|
@properties: The changed properties.
|
||||||
|
|
||||||
NetworkManager's properties changed.
|
DEPRECATED. Use the standard "PropertiesChanged" signal from "org.freedesktop.DBus.Properties" instead which exists since version NetworkManager 1.2.0.
|
||||||
-->
|
-->
|
||||||
<signal name="PropertiesChanged">
|
<signal name="PropertiesChanged">
|
||||||
<arg name="properties" type="a{sv}"/>
|
<arg name="properties" type="a{sv}"/>
|
||||||
|
|
|
||||||
|
|
@ -123,6 +123,8 @@
|
||||||
<!--
|
<!--
|
||||||
PropertiesChanged:
|
PropertiesChanged:
|
||||||
@properties: A dictionary mapping property names to variant boxed values.
|
@properties: A dictionary mapping property names to variant boxed values.
|
||||||
|
|
||||||
|
DEPRECATED. Use the standard "PropertiesChanged" signal from "org.freedesktop.DBus.Properties" instead which exists since version NetworkManager 1.2.0.
|
||||||
-->
|
-->
|
||||||
<signal name="PropertiesChanged">
|
<signal name="PropertiesChanged">
|
||||||
<arg name="properties" type="a{sv}"/>
|
<arg name="properties" type="a{sv}"/>
|
||||||
|
|
|
||||||
|
|
@ -131,6 +131,8 @@
|
||||||
<!--
|
<!--
|
||||||
PropertiesChanged:
|
PropertiesChanged:
|
||||||
@properties: A dictionary mapping property names to variant boxed values
|
@properties: A dictionary mapping property names to variant boxed values
|
||||||
|
|
||||||
|
DEPRECATED. Use the standard "PropertiesChanged" signal from "org.freedesktop.DBus.Properties" instead which exists since version NetworkManager 1.2.0.
|
||||||
-->
|
-->
|
||||||
<signal name="PropertiesChanged">
|
<signal name="PropertiesChanged">
|
||||||
<arg name="properties" type="a{sv}"/>
|
<arg name="properties" type="a{sv}"/>
|
||||||
|
|
|
||||||
|
|
@ -12,6 +12,8 @@
|
||||||
<!--
|
<!--
|
||||||
PropertiesChanged:
|
PropertiesChanged:
|
||||||
@properties: A dictionary mapping property names to variant boxed values
|
@properties: A dictionary mapping property names to variant boxed values
|
||||||
|
|
||||||
|
DEPRECATED. Use the standard "PropertiesChanged" signal from "org.freedesktop.DBus.Properties" instead which exists since version NetworkManager 1.2.0.
|
||||||
-->
|
-->
|
||||||
<signal name="PropertiesChanged">
|
<signal name="PropertiesChanged">
|
||||||
<arg name="properties" type="a{sv}"/>
|
<arg name="properties" type="a{sv}"/>
|
||||||
|
|
|
||||||
|
|
@ -28,6 +28,8 @@
|
||||||
<!--
|
<!--
|
||||||
PropertiesChanged:
|
PropertiesChanged:
|
||||||
@properties: A dictionary mapping property names to variant boxed values.
|
@properties: A dictionary mapping property names to variant boxed values.
|
||||||
|
|
||||||
|
DEPRECATED. Use the standard "PropertiesChanged" signal from "org.freedesktop.DBus.Properties" instead which exists since version NetworkManager 1.2.0.
|
||||||
-->
|
-->
|
||||||
<signal name="PropertiesChanged">
|
<signal name="PropertiesChanged">
|
||||||
<arg name="properties" type="a{sv}"/>
|
<arg name="properties" type="a{sv}"/>
|
||||||
|
|
|
||||||
|
|
@ -27,6 +27,9 @@
|
||||||
|
|
||||||
#include "nm-bus-manager.h"
|
#include "nm-bus-manager.h"
|
||||||
|
|
||||||
|
#include "nm-device.h"
|
||||||
|
#include "nm-active-connection.h"
|
||||||
|
|
||||||
#if NM_MORE_ASSERTS >= 2
|
#if NM_MORE_ASSERTS >= 2
|
||||||
#define _ASSERT_NO_EARLY_EXPORT
|
#define _ASSERT_NO_EARLY_EXPORT
|
||||||
#endif
|
#endif
|
||||||
|
|
@ -72,11 +75,20 @@ G_DEFINE_QUARK (NMExportedObjectClassInfo, nm_exported_object_class_info)
|
||||||
#define _NMLOG_DOMAIN LOGD_CORE
|
#define _NMLOG_DOMAIN LOGD_CORE
|
||||||
|
|
||||||
#define _NMLOG(level, ...) \
|
#define _NMLOG(level, ...) \
|
||||||
nm_log (level, _NMLOG_DOMAIN, \
|
nm_log ((level), _NMLOG_DOMAIN, \
|
||||||
"%s[%p]: " _NM_UTILS_MACRO_FIRST (__VA_ARGS__), \
|
"%s[%p]: " _NM_UTILS_MACRO_FIRST (__VA_ARGS__), \
|
||||||
_NMLOG_PREFIX_NAME, (self) \
|
_NMLOG_PREFIX_NAME, (self) \
|
||||||
_NM_UTILS_MACRO_REST (__VA_ARGS__))
|
_NM_UTILS_MACRO_REST (__VA_ARGS__))
|
||||||
|
|
||||||
|
#define _NMLOG2_PREFIX_NAME "properties-changed"
|
||||||
|
#define _NMLOG2_DOMAIN LOGD_DBUS_PROPS
|
||||||
|
|
||||||
|
#define _NMLOG2(level, ...) \
|
||||||
|
nm_log ((level), _NMLOG2_DOMAIN, \
|
||||||
|
"%s[%p]: " _NM_UTILS_MACRO_FIRST (__VA_ARGS__), \
|
||||||
|
_NMLOG2_PREFIX_NAME, (self) \
|
||||||
|
_NM_UTILS_MACRO_REST (__VA_ARGS__))
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
/* "AddConnectionUnsaved" -> "handle-add-connection-unsaved" */
|
/* "AddConnectionUnsaved" -> "handle-add-connection-unsaved" */
|
||||||
|
|
@ -263,8 +275,8 @@ nm_exported_object_class_add_interface (NMExportedObjectClass *object_class,
|
||||||
g_type_set_qdata (G_TYPE_FROM_CLASS (object_class),
|
g_type_set_qdata (G_TYPE_FROM_CLASS (object_class),
|
||||||
nm_exported_object_class_info_quark (), classinfo);
|
nm_exported_object_class_info_quark (), classinfo);
|
||||||
|
|
||||||
classinfo->skeleton_types = g_slist_append (classinfo->skeleton_types,
|
classinfo->skeleton_types = g_slist_prepend (classinfo->skeleton_types,
|
||||||
GSIZE_TO_POINTER (dbus_skeleton_type));
|
GSIZE_TO_POINTER (dbus_skeleton_type));
|
||||||
|
|
||||||
/* Ensure @dbus_skeleton_type's class_init has run, so its signals/properties
|
/* Ensure @dbus_skeleton_type's class_init has run, so its signals/properties
|
||||||
* will be defined.
|
* will be defined.
|
||||||
|
|
@ -497,6 +509,9 @@ nm_exported_object_create_skeletons (NMExportedObject *self,
|
||||||
}
|
}
|
||||||
nm_assert (i == 0);
|
nm_assert (i == 0);
|
||||||
|
|
||||||
|
/* The list of interfaces priv->interfaces is to be sorted from parent-class to derived-class.
|
||||||
|
* On the other hand, if one class defines multiple interfaces, the interfaces are sorted in
|
||||||
|
* the order of calls to nm_exported_object_class_add_interface(). */
|
||||||
if (priv->num_interfaces > 0) {
|
if (priv->num_interfaces > 0) {
|
||||||
memcpy (&interfaces[num_interfaces], priv->interfaces, sizeof (InterfaceData) * priv->num_interfaces);
|
memcpy (&interfaces[num_interfaces], priv->interfaces, sizeof (InterfaceData) * priv->num_interfaces);
|
||||||
g_slice_free1 (sizeof (InterfaceData) * priv->num_interfaces, priv->interfaces);
|
g_slice_free1 (sizeof (InterfaceData) * priv->num_interfaces, priv->interfaces);
|
||||||
|
|
@ -797,12 +812,11 @@ idle_emit_properties_changed (gpointer self)
|
||||||
if (n == 0)
|
if (n == 0)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (!ifdata->property_changed_signal_id)
|
nm_assert (ifdata->property_changed_signal_id);
|
||||||
goto next;
|
|
||||||
|
|
||||||
/* We use here alloca in a loop, something that is usually avoided.
|
/* We use here alloca in a loop, something that is usually avoided.
|
||||||
* But the number of interfaces "priv->num_interfaces" is small (determined by
|
* But the number of interfaces "priv->num_interfaces" is small (determined by
|
||||||
* the depth of the type inheritence) and the number of possible pending_notifies
|
* the depth of the type inheritance) and the number of possible pending_notifies
|
||||||
* "n" is small (determined by the number of GObject properties). */
|
* "n" is small (determined by the number of GObject properties). */
|
||||||
values = g_alloca (sizeof (values[0]) * n);
|
values = g_alloca (sizeof (values[0]) * n);
|
||||||
|
|
||||||
|
|
@ -820,17 +834,16 @@ idle_emit_properties_changed (gpointer self)
|
||||||
variant = g_variant_ref_sink (g_variant_builder_end (¬ifies));
|
variant = g_variant_ref_sink (g_variant_builder_end (¬ifies));
|
||||||
|
|
||||||
|
|
||||||
if (nm_logging_enabled (LOGL_DEBUG, LOGD_DBUS_PROPS)) {
|
if (_LOG2D_ENABLED ()) {
|
||||||
gs_free char *notification = g_variant_print (variant, TRUE);
|
gs_free char *notification = g_variant_print (variant, TRUE);
|
||||||
|
|
||||||
nm_log_dbg (LOGD_DBUS_PROPS, "properties-changed[%p]: type %s, iface %s: %s",
|
_LOG2D ("type %s, iface %s: %s",
|
||||||
self, G_OBJECT_TYPE_NAME (self), G_OBJECT_TYPE_NAME (ifdata->interface),
|
G_OBJECT_TYPE_NAME (self), G_OBJECT_TYPE_NAME (ifdata->interface),
|
||||||
notification);
|
notification);
|
||||||
}
|
}
|
||||||
|
|
||||||
g_signal_emit (ifdata->interface, ifdata->property_changed_signal_id, 0, variant);
|
g_signal_emit (ifdata->interface, ifdata->property_changed_signal_id, 0, variant);
|
||||||
|
|
||||||
next:
|
|
||||||
g_hash_table_remove_all (ifdata->pending_notifies);
|
g_hash_table_remove_all (ifdata->pending_notifies);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -840,19 +853,25 @@ next:
|
||||||
static void
|
static void
|
||||||
nm_exported_object_notify (GObject *object, GParamSpec *pspec)
|
nm_exported_object_notify (GObject *object, GParamSpec *pspec)
|
||||||
{
|
{
|
||||||
NMExportedObjectPrivate *priv = NM_EXPORTED_OBJECT_GET_PRIVATE (object);
|
NMExportedObject *self = (NMExportedObject *) object;
|
||||||
|
NMExportedObjectPrivate *priv = NM_EXPORTED_OBJECT_GET_PRIVATE (self);
|
||||||
NMExportedObjectClassInfo *classinfo;
|
NMExportedObjectClassInfo *classinfo;
|
||||||
GType type;
|
GType type;
|
||||||
const char *dbus_property_name = NULL;
|
const char *dbus_property_name = NULL;
|
||||||
GValue value = G_VALUE_INIT;
|
GValue value = G_VALUE_INIT;
|
||||||
|
GVariant *value_variant;
|
||||||
InterfaceData *ifdata = NULL;
|
InterfaceData *ifdata = NULL;
|
||||||
const GVariantType *vtype;
|
const GVariantType *vtype;
|
||||||
guint i, j;
|
guint i, j;
|
||||||
|
|
||||||
|
/* Hook to emit deprecated "PropertiesChanged" signal on NetworkManager interfaces.
|
||||||
|
* This is to preserve deprecated D-Bus API, nowadays we use instead
|
||||||
|
* the "PropertiesChanged" signal of "org.freedesktop.DBus.Properties". */
|
||||||
|
|
||||||
if (priv->num_interfaces == 0)
|
if (priv->num_interfaces == 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
for (type = G_OBJECT_TYPE (object); type; type = g_type_parent (type)) {
|
for (type = G_OBJECT_TYPE (self); type; type = g_type_parent (type)) {
|
||||||
classinfo = g_type_get_qdata (type, nm_exported_object_class_info_quark ());
|
classinfo = g_type_get_qdata (type, nm_exported_object_class_info_quark ());
|
||||||
if (!classinfo)
|
if (!classinfo)
|
||||||
continue;
|
continue;
|
||||||
|
|
@ -862,8 +881,8 @@ nm_exported_object_notify (GObject *object, GParamSpec *pspec)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (!dbus_property_name) {
|
if (!dbus_property_name) {
|
||||||
nm_log_trace (LOGD_DBUS_PROPS, "properties-changed[%p]: ignoring notification for prop %s on type %s",
|
_LOG2T ("ignoring notification for prop %s on type %s",
|
||||||
object, pspec->name, G_OBJECT_TYPE_NAME (object));
|
pspec->name, G_OBJECT_TYPE_NAME (self));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -883,17 +902,56 @@ nm_exported_object_notify (GObject *object, GParamSpec *pspec)
|
||||||
|
|
||||||
vtype_found:
|
vtype_found:
|
||||||
g_value_init (&value, pspec->value_type);
|
g_value_init (&value, pspec->value_type);
|
||||||
g_object_get_property (G_OBJECT (object), pspec->name, &value);
|
g_object_get_property ((GObject *) self, pspec->name, &value);
|
||||||
|
value_variant = g_dbus_gvalue_to_gvariant (&value, vtype);
|
||||||
/* @dbus_property_name is inside classinfo and never freed, thus we don't clone it.
|
|
||||||
* Also, we do a pointer, not string comparison. */
|
|
||||||
g_hash_table_insert (ifdata->pending_notifies,
|
|
||||||
(gpointer) dbus_property_name,
|
|
||||||
g_dbus_gvalue_to_gvariant (&value, vtype));
|
|
||||||
g_value_unset (&value);
|
g_value_unset (&value);
|
||||||
|
|
||||||
|
if ( NM_IS_DEVICE (self)
|
||||||
|
|| NM_IS_ACTIVE_CONNECTION (self)) {
|
||||||
|
/* This PropertiesChanged signal is nodaways deprecated in favor
|
||||||
|
* of "org.freedesktop.DBus.Properties"'s PropertiesChanged signal.
|
||||||
|
* This function solely exists to raise the NM version of PropertiesChanged.
|
||||||
|
*
|
||||||
|
* With types exported on D-Bus that are implemented as derived
|
||||||
|
* types in glib (NMDevice and NMActiveConnection), multiple types
|
||||||
|
* in the inheritance tree define a "PropertiesChanged" signal.
|
||||||
|
*
|
||||||
|
* In 1.0.0 and earlier, the signal was emitted once for every interface
|
||||||
|
* that had a "PropertiesChanged" signal. For example:
|
||||||
|
* - NMDeviceEthernet.HwAddress was emitted on "fdo.NM.Device.Ethernet"
|
||||||
|
* and "fdo.NM.Device.Veth" (if the device was of type NMDeviceVeth).
|
||||||
|
* - NMVpnConnection.VpnState was emitted on "fdo.NM.Connecion.Active"
|
||||||
|
* and "fdo.NM.VPN.Connection".
|
||||||
|
*
|
||||||
|
* NMDevice is special in that it didn't have a "PropertiesChanged" signal.
|
||||||
|
* Thus, a change to "NMDevice.StateReason" would be emitted on "fdo.NM.Device.Ethernet"
|
||||||
|
* and also on "fdo.NM.Device.Veth" (in case of a device of type NMDeviceVeth).
|
||||||
|
*
|
||||||
|
* The releases of 1.2.0 and 1.4.0 failed to realize above and broke this behavior.
|
||||||
|
* This special handling here is to bring back the 1.0.0 behavior.
|
||||||
|
*/
|
||||||
|
for (i = 0, j = 0; i < priv->num_interfaces; i++) {
|
||||||
|
ifdata = &priv->interfaces[i];
|
||||||
|
if (ifdata->property_changed_signal_id) {
|
||||||
|
j++;
|
||||||
|
g_hash_table_insert (ifdata->pending_notifies,
|
||||||
|
(gpointer) dbus_property_name,
|
||||||
|
g_variant_ref (value_variant));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
nm_assert (j > 0);
|
||||||
|
g_variant_unref (value_variant);
|
||||||
|
} else if (ifdata->property_changed_signal_id) {
|
||||||
|
/* @dbus_property_name is inside classinfo and never freed, thus we don't clone it.
|
||||||
|
* Also, we do a pointer, not string comparison. */
|
||||||
|
g_hash_table_insert (ifdata->pending_notifies,
|
||||||
|
(gpointer) dbus_property_name,
|
||||||
|
value_variant);
|
||||||
|
} else
|
||||||
|
nm_assert_not_reached ();
|
||||||
|
|
||||||
if (!priv->notify_idle_id)
|
if (!priv->notify_idle_id)
|
||||||
priv->notify_idle_id = g_idle_add (idle_emit_properties_changed, object);
|
priv->notify_idle_id = g_idle_add (idle_emit_properties_changed, self);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
|
||||||
|
|
@ -527,6 +527,8 @@ gboolean nm_config_get_configure_and_quit (gpointer unused);
|
||||||
gconstpointer nm_bus_manager_get (void);
|
gconstpointer nm_bus_manager_get (void);
|
||||||
void nm_bus_manager_register_object (gpointer unused, gpointer object);
|
void nm_bus_manager_register_object (gpointer unused, gpointer object);
|
||||||
void nm_bus_manager_unregister_object (gpointer unused, gpointer object);
|
void nm_bus_manager_unregister_object (gpointer unused, gpointer object);
|
||||||
|
GType nm_device_get_type (void);
|
||||||
|
GType nm_active_connection_get_type (void);
|
||||||
|
|
||||||
gconstpointer
|
gconstpointer
|
||||||
nm_config_get (void)
|
nm_config_get (void)
|
||||||
|
|
@ -562,3 +564,15 @@ nm_bus_manager_unregister_object (gpointer unused, gpointer object)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
GType
|
||||||
|
nm_device_get_type (void)
|
||||||
|
{
|
||||||
|
g_return_val_if_reached (0);
|
||||||
|
}
|
||||||
|
|
||||||
|
GType
|
||||||
|
nm_active_connection_get_type (void)
|
||||||
|
{
|
||||||
|
g_return_val_if_reached (0);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue