about summary refs log tree commit diff
path: root/src/libnm-client-impl
diff options
context:
space:
mode:
Diffstat (limited to 'src/libnm-client-impl')
-rw-r--r--src/libnm-client-impl/libnm.ver15
-rw-r--r--src/libnm-client-impl/meson.build1
-rw-r--r--src/libnm-client-impl/nm-active-connection.c13
-rw-r--r--src/libnm-client-impl/nm-client.c88
-rw-r--r--src/libnm-client-impl/nm-conn-utils.c16
-rw-r--r--src/libnm-client-impl/nm-device-bond.c2
-rw-r--r--src/libnm-client-impl/nm-device-bridge.c2
-rw-r--r--src/libnm-client-impl/nm-device-ovs-bridge.c2
-rw-r--r--src/libnm-client-impl/nm-device-ovs-port.c2
-rw-r--r--src/libnm-client-impl/nm-device-team.c2
-rw-r--r--src/libnm-client-impl/nm-device-wifi-p2p.c2
-rw-r--r--src/libnm-client-impl/nm-device.c13
-rw-r--r--src/libnm-client-impl/nm-remote-connection.c50
13 files changed, 134 insertions, 74 deletions
diff --git a/src/libnm-client-impl/libnm.ver b/src/libnm-client-impl/libnm.ver
index 3fbd701d..919ffc74 100644
--- a/src/libnm-client-impl/libnm.ver
+++ b/src/libnm-client-impl/libnm.ver
@@ -1901,7 +1901,6 @@ global:
 	nm_range_unref;
 	nm_setting_ip_config_get_auto_route_ext_gw;
 	nm_setting_ip_config_get_dhcp_iaid;
-	nm_setting_ip_config_get_dhcp_iaid;
 	nm_setting_ip_tunnel_get_fwmark;
 	nm_setting_loopback_get_mtu;
 	nm_setting_loopback_get_type;
@@ -1930,3 +1929,17 @@ global:
 	nm_active_connection_get_controller;
 	nm_setting_ip_config_get_replace_local_rule;
 } libnm_1_42_0;
+
+libnm_1_44_0 {
+global:
+	nm_remote_connection_get_version_id;
+	nm_setting_gsm_get_initial_eps_apn;
+	nm_setting_gsm_get_initial_eps_config;
+	nm_setting_ip6_config_get_dhcp_pd_hint;
+	nm_setting_link_get_gro_max_size;
+	nm_setting_link_get_gso_max_segments;
+	nm_setting_link_get_gso_max_size;
+	nm_setting_link_get_tx_queue_length;
+	nm_setting_link_get_type;
+	nm_setting_link_new;
+} libnm_1_42_0;
diff --git a/src/libnm-client-impl/meson.build b/src/libnm-client-impl/meson.build
index 143126c5..fb879dca 100644
--- a/src/libnm-client-impl/meson.build
+++ b/src/libnm-client-impl/meson.build
@@ -142,6 +142,7 @@ if enable_introspection
       src_inc,
       top_inc,
     ],
+    header: 'NetworkManager.h',
     dependencies: [
       declare_dependency(
         compile_args: [
diff --git a/src/libnm-client-impl/nm-active-connection.c b/src/libnm-client-impl/nm-active-connection.c
index ca6b18f9..6a138f3e 100644
--- a/src/libnm-client-impl/nm-active-connection.c
+++ b/src/libnm-client-impl/nm-active-connection.c
@@ -383,9 +383,9 @@ nm_active_connection_get_vpn(NMActiveConnection *connection)
  *
  * Gets the master #NMDevice of the connection.
  *
- * This is replaced by nm_active_connection_get_controller() since 1.44 and 1.42.2.
- *
  * Returns: (transfer none): the master #NMDevice of the #NMActiveConnection.
+ *
+ * Deprecated: 1.44: Use nm_active_connection_get_controller() instead.
  **/
 NMDevice *
 nm_active_connection_get_master(NMActiveConnection *connection)
@@ -402,7 +402,7 @@ nm_active_connection_get_master(NMActiveConnection *connection)
  *
  * Returns: (transfer none): the controller #NMDevice of the #NMActiveConnection.
  *
- * Since: 1.44, 1.42.2
+ * Since: 1.44
  **/
 NMDevice *
 nm_active_connection_get_controller(NMActiveConnection *connection)
@@ -880,8 +880,9 @@ nm_active_connection_class_init(NMActiveConnectionClass *klass)
     /**
      * NMActiveConnection:master:
      *
-     * The master device if one exists. Replaced by the "controller" property
-     * since 1.44 and 1.42.2.
+     * The master device if one exists. Replaced by the "controller" property.
+     *
+     * Deprecated: 1.44
      **/
     obj_properties[PROP_MASTER] = g_param_spec_object(NM_ACTIVE_CONNECTION_MASTER,
                                                       "",
@@ -895,7 +896,7 @@ nm_active_connection_class_init(NMActiveConnectionClass *klass)
      * The controller device if one exists. This replaces the deprecated
      * "master" property.
      *
-     * Since: 1.44, 1.42.2
+     * Since: 1.44
      **/
     obj_properties[PROP_CONTROLLER] =
         g_param_spec_object(NM_ACTIVE_CONNECTION_CONTROLLER,
diff --git a/src/libnm-client-impl/nm-client.c b/src/libnm-client-impl/nm-client.c
index 3ad4b9d6..f3ab6d69 100644
--- a/src/libnm-client-impl/nm-client.c
+++ b/src/libnm-client-impl/nm-client.c
@@ -378,7 +378,7 @@ static void name_owner_changed_cb(GDBusConnection *connection,
 
 static void name_owner_get_call(NMClient *self);
 
-static void _set_nm_running(NMClient *self);
+static void _set_nm_running(NMClient *self, gboolean queue_notify);
 
 /*****************************************************************************/
 
@@ -2724,6 +2724,7 @@ _obj_handle_dbus_changes(NMClient *self, NMLDBusObject *dbobj)
             if (dbobj->dbus_path == _dbus_path_nm) {
                 nm_assert(!priv->dbobj_nm);
                 priv->dbobj_nm = dbobj;
+                _set_nm_running(self, TRUE);
             } else if (dbobj->dbus_path == _dbus_path_settings) {
                 nm_assert(!priv->dbobj_settings);
                 priv->dbobj_settings = dbobj;
@@ -2783,6 +2784,7 @@ _obj_handle_dbus_changes(NMClient *self, NMLDBusObject *dbobj)
             if (dbobj->dbus_path == _dbus_path_nm) {
                 nm_assert(priv->dbobj_nm == dbobj);
                 priv->dbobj_nm = NULL;
+                _set_nm_running(self, TRUE);
                 nml_dbus_property_o_clear_many(priv->nm.property_o,
                                                G_N_ELEMENTS(priv->nm.property_o),
                                                self);
@@ -2936,7 +2938,7 @@ _dbus_handle_changes_commit(NMClient *self, gboolean allow_init_start_check_comp
 
     _nm_client_notify_event_emit(self);
 
-    _set_nm_running(self);
+    _set_nm_running(self, FALSE);
 
     if (allow_init_start_check_complete)
         _init_start_check_complete(self);
@@ -3079,11 +3081,10 @@ _dbus_handle_interface_added(NMClient   *self,
                              const char *object_path,
                              GVariant   *ifaces)
 {
-    gboolean       changed = FALSE;
-    const char    *interface_name;
-    GVariant      *changed_properties;
-    GVariantIter   iter_ifaces;
-    NMLDBusObject *dbobj = NULL;
+    gboolean     changed = FALSE;
+    const char  *interface_name;
+    GVariant    *changed_properties;
+    GVariantIter iter_ifaces;
 
     nm_assert(g_variant_is_of_type(ifaces, G_VARIANT_TYPE("a{sa{sv}}")));
 
@@ -3097,7 +3098,7 @@ _dbus_handle_interface_added(NMClient   *self,
                                             interface_name,
                                             TRUE,
                                             changed_properties,
-                                            &dbobj))
+                                            NULL))
             changed = TRUE;
     }
 
@@ -4084,15 +4085,18 @@ nm_client_get_startup(NMClient *client)
 }
 
 static void
-_set_nm_running(NMClient *self)
+_set_nm_running(NMClient *self, gboolean queue_notify)
 {
     NMClientPrivate *priv = NM_CLIENT_GET_PRIVATE(self);
     gboolean         nm_running;
 
-    nm_running = priv->name_owner && !priv->get_managed_objects_cancellable;
+    nm_running = priv->dbobj_nm && priv->name_owner && !priv->get_managed_objects_cancellable;
     if (priv->nm_running != nm_running) {
         priv->nm_running = nm_running;
-        _notify(self, PROP_NM_RUNNING);
+        if (queue_notify) {
+            _nm_client_queue_notify_object(self, self, obj_properties[PROP_NM_RUNNING]);
+        } else
+            _notify(self, PROP_NM_RUNNING);
     }
 }
 
@@ -4167,7 +4171,7 @@ nm_client_networking_get_enabled(NMClient *client)
  * nm_client_networking_set_enabled:
  * @client: a #NMClient
  * @enabled: %TRUE to set networking enabled, %FALSE to set networking disabled
- * @error: (allow-none): return location for a #GError, or %NULL
+ * @error: return location for a #GError, or %NULL
  *
  * Enables or disables networking.  When networking is disabled, all controlled
  * interfaces are disconnected and deactivated.  When networking is enabled,
@@ -4461,10 +4465,10 @@ nm_client_connectivity_check_get_uri(NMClient *client)
 /**
  * nm_client_get_logging:
  * @client: a #NMClient
- * @level: (allow-none): return location for logging level string
- * @domains: (allow-none): return location for log domains string. The string is
+ * @level: (out) (optional) (nullable): return location for logging level string
+ * @domains: (out) (optional) (nullable): return location for log domains string. The string is
  *   a list of domains separated by ","
- * @error: (allow-none): return location for a #GError, or %NULL
+ * @error: return location for a #GError, or %NULL
  *
  * Gets NetworkManager current logging level and domains.
  *
@@ -4505,10 +4509,10 @@ nm_client_get_logging(NMClient *client, char **level, char **domains, GError **e
 /**
  * nm_client_set_logging:
  * @client: a #NMClient
- * @level: (allow-none): logging level to set (%NULL or an empty string for no change)
- * @domains: (allow-none): logging domains to set. The string should be a list of log
+ * @level: (nullable): logging level to set (%NULL or an empty string for no change)
+ * @domains: (nullable): logging domains to set. The string should be a list of log
  *   domains separated by ",". (%NULL or an empty string for no change)
- * @error: (allow-none): return location for a #GError, or %NULL
+ * @error: return location for a #GError, or %NULL
  *
  * Sets NetworkManager logging level and/or domains.
  *
@@ -4729,7 +4733,7 @@ nm_client_check_connectivity_finish(NMClient *client, GAsyncResult *result, GErr
 /**
  * nm_client_save_hostname:
  * @client: the %NMClient
- * @hostname: (allow-none): the new persistent hostname to set, or %NULL to
+ * @hostname: (nullable): the new persistent hostname to set, or %NULL to
  *   clear any existing persistent hostname
  * @cancellable: a #GCancellable, or %NULL
  * @error: return location for #GError
@@ -4765,7 +4769,7 @@ nm_client_save_hostname(NMClient     *client,
 /**
  * nm_client_save_hostname_async:
  * @client: the %NMClient
- * @hostname: (allow-none): the new persistent hostname to set, or %NULL to
+ * @hostname: (nullable): the new persistent hostname to set, or %NULL to
  *   clear any existing persistent hostname
  * @cancellable: a #GCancellable, or %NULL
  * @callback: (scope async): callback to be called when the operation completes
@@ -5022,9 +5026,9 @@ activate_connection_cb(GObject *object, GAsyncResult *result, gpointer user_data
 /**
  * nm_client_activate_connection_async:
  * @client: a #NMClient
- * @connection: (allow-none): an #NMConnection
- * @device: (allow-none): the #NMDevice
- * @specific_object: (allow-none): the object path of a connection-type-specific
+ * @connection: (nullable): an #NMConnection
+ * @device: (nullable): the #NMDevice
+ * @specific_object: (nullable): the object path of a connection-type-specific
  *   object this activation should use. This parameter is currently ignored for
  *   wired and mobile broadband connections, and the value of %NULL should be used
  *   (ie, no specific object).  For Wi-Fi or WiMAX connections, pass the object
@@ -5258,11 +5262,11 @@ _add_and_activate_connection(NMClient           *self,
 /**
  * nm_client_add_and_activate_connection_async:
  * @client: a #NMClient
- * @partial: (allow-none): an #NMConnection to add; the connection may be
+ * @partial: (nullable): an #NMConnection to add; the connection may be
  *   partially filled (or even %NULL) and will be completed by NetworkManager
  *   using the given @device and @specific_object before being added
- * @device: (allow-none): the #NMDevice
- * @specific_object: (allow-none): the object path of a connection-type-specific
+ * @device: (nullable): the #NMDevice
+ * @specific_object: (nullable): the object path of a connection-type-specific
  *   object this activation should use. This parameter is currently ignored for
  *   wired and mobile broadband connections, and the value of %NULL should be used
  *   (ie, no specific object).  For Wi-Fi or WiMAX connections, pass the object
@@ -5332,11 +5336,11 @@ nm_client_add_and_activate_connection_finish(NMClient *client, GAsyncResult *res
 /**
  * nm_client_add_and_activate_connection2:
  * @client: a #NMClient
- * @partial: (allow-none): an #NMConnection to add; the connection may be
+ * @partial: (nullable): an #NMConnection to add; the connection may be
  *   partially filled (or even %NULL) and will be completed by NetworkManager
  *   using the given @device and @specific_object before being added
- * @device: (allow-none): the #NMDevice
- * @specific_object: (allow-none): the object path of a connection-type-specific
+ * @device: (nullable): the #NMDevice
+ * @specific_object: (nullable): the object path of a connection-type-specific
  *   object this activation should use. This parameter is currently ignored for
  *   wired and mobile broadband connections, and the value of %NULL should be used
  *   (i.e., no specific object).  For Wi-Fi or WiMAX connections, pass the object
@@ -5398,7 +5402,7 @@ nm_client_add_and_activate_connection2(NMClient           *client,
  * @client: an #NMClient
  * @result: the result passed to the #GAsyncReadyCallback
  * @error: location for a #GError, or %NULL
- * @out_result: (allow-none) (transfer full) (out): the output result
+ * @out_result: (out) (optional) (nullable) (transfer full): the output result
  *   of type "a{sv}" returned by D-Bus' AddAndActivate2 call. Currently, no
  *   output is implemented yet.
  *
@@ -5829,7 +5833,7 @@ nm_client_add_connection_finish(NMClient *client, GAsyncResult *result, GError *
  * @client: the %NMClient
  * @settings: the "a{sa{sv}}" #GVariant with the content of the setting.
  * @flags: the %NMSettingsAddConnection2Flags argument.
- * @args: (allow-none): the "a{sv}" #GVariant with extra argument or %NULL
+ * @args: (nullable): the "a{sv}" #GVariant with extra argument or %NULL
  *   for no extra arguments.
  * @ignore_out_result: this function wraps AddConnection2(), which has an
  *   additional result "a{sv}" output parameter. By setting this to %TRUE,
@@ -5871,11 +5875,11 @@ nm_client_add_connection2(NMClient                     *client,
  * nm_client_add_connection2_finish:
  * @client: the #NMClient
  * @result: the #GAsyncResult
- * @out_result: (allow-none) (transfer full) (out): the output #GVariant
- *   from AddConnection2().
+ * @out_result: (out) (optional) (nullable) (transfer full): the output
+ *   #GVariant from AddConnection2().
  *   If you care about the output result, then the "ignore_out_result"
  *   parameter of nm_client_add_connection2() must not be set to %TRUE.
- * @error: (allow-none): the error argument.
+ * @error: the error argument.
  *
  * Returns: (transfer full): on success, a pointer to the added
  *   #NMRemoteConnection.
@@ -6048,7 +6052,7 @@ nm_client_load_connections_finish(NMClient     *client,
  * files from disk, adding, updating, and removing connections until
  * the in-memory state matches the on-disk state.
  *
- * Return value: %TRUE on success, %FALSE on failure
+ * Returns: %TRUE on success, %FALSE on failure
  *
  * Deprecated: 1.22: Use nm_client_reload_connections_async() or GDBusConnection.
  **/
@@ -6121,7 +6125,7 @@ nm_client_reload_connections_async(NMClient           *client,
  *
  * Gets the result of an nm_client_reload_connections_async() call.
  *
- * Return value: %TRUE on success, %FALSE on failure
+ * Returns: %TRUE on success, %FALSE on failure
  **/
 gboolean
 nm_client_reload_connections_finish(NMClient *client, GAsyncResult *result, GError **error)
@@ -6147,7 +6151,7 @@ nm_client_reload_connections_finish(NMClient *client, GAsyncResult *result, GErr
  *
  * Gets the current DNS processing mode.
  *
- * Return value: the DNS processing mode, or %NULL in case the
+ * Returns: the DNS processing mode, or %NULL in case the
  *   value is not available.
  *
  * Since: 1.6
@@ -6166,7 +6170,7 @@ nm_client_get_dns_mode(NMClient *client)
  *
  * Gets the current DNS resolv.conf manager.
  *
- * Return value: the resolv.conf manager or %NULL in case the
+ * Returns: the resolv.conf manager or %NULL in case the
  *   value is not available.
  *
  * Since: 1.6
@@ -6279,7 +6283,7 @@ _notify_update_prop_dns_manager_configuration(NMClient               *self,
 /**
  * nm_client_get_capabilities:
  * @client: the #NMClient instance
- * @length: (out) (allow-none): the number of returned capabilities.
+ * @length: (out) (optional): the number of returned capabilities.
  *
  * Returns: (transfer none) (array length=length): the
  *   list of capabilities reported by the server or %NULL
@@ -7172,7 +7176,7 @@ name_owner_changed(NMClient *self, const char *name_owner)
     if (changed && priv->name_owner)
         _init_fetch_all(self);
 
-    _set_nm_running(self);
+    _set_nm_running(self, FALSE);
 
     if (priv->init_data) {
         nm_auto_pop_gmaincontext GMainContext *main_context = NULL;
@@ -9059,8 +9063,8 @@ _wait_shutdown_cancelled_cb(GCancellable *cancellable, gpointer user_data)
  *   that the client's maincontext gets iterated so that it can complete.
  *   By integrating the maincontext in the current thread default, you
  *   may instead only iterate the latter.
- * @cancellable: (allow-none): the #GCancellable to abort the shutdown.
- * @callback: (nullable): a #GAsyncReadyCallback to call when the request
+ * @cancellable: the #GCancellable to abort the shutdown.
+ * @callback: a #GAsyncReadyCallback to call when the request
  *   is satisfied or %NULL if you don't care about the result of the
  *   method invocation.
  * @user_data: the data to pass to @callback
diff --git a/src/libnm-client-impl/nm-conn-utils.c b/src/libnm-client-impl/nm-conn-utils.c
index 223c18e6..08f8403c 100644
--- a/src/libnm-client-impl/nm-conn-utils.c
+++ b/src/libnm-client-impl/nm-conn-utils.c
@@ -170,7 +170,7 @@ nm_conn_wireguard_import(const char *filename, GError **error)
                                    NM_UTILS_ERROR_UNKNOWN,
                                    _("The name of the WireGuard config must be a valid interface "
                                      "name followed by \".conf\""));
-        return FALSE;
+        return NULL;
     }
 
     if (!nm_utils_file_get_contents(-1,
@@ -250,7 +250,7 @@ nm_conn_wireguard_import(const char *filename, GError **error)
                                    current_peer_start_line_nr,
                                    filename,
                                    error))
-                return FALSE;
+                return NULL;
             line_context = LINE_CONTEXT_INTERFACE;
             continue;
         }
@@ -261,7 +261,7 @@ nm_conn_wireguard_import(const char *filename, GError **error)
                                    current_peer_start_line_nr,
                                    filename,
                                    error))
-                return FALSE;
+                return NULL;
             current_peer_start_line_nr = line_nr;
             current_peer               = nm_wireguard_peer_new();
             line_context               = LINE_CONTEXT_PEER;
@@ -454,7 +454,7 @@ fail_invalid_line:
                            _("unrecognized line at %s:%zu"),
                            filename,
                            line_nr);
-        return FALSE;
+        return NULL;
 fail_invalid_value:
         nm_utils_error_set(error,
                            NM_UTILS_ERROR_INVALID_ARGUMENT,
@@ -462,7 +462,7 @@ fail_invalid_value:
                            matched_key,
                            filename,
                            line_nr);
-        return FALSE;
+        return NULL;
 fail_invalid_secret:
         nm_utils_error_set(error,
                            NM_UTILS_ERROR_INVALID_ARGUMENT,
@@ -470,7 +470,7 @@ fail_invalid_secret:
                            matched_key,
                            filename,
                            line_nr);
-        return FALSE;
+        return NULL;
     }
 
     if (!_wg_complete_peer(&data_peers,
@@ -478,7 +478,7 @@ fail_invalid_secret:
                            current_peer_start_line_nr,
                            filename,
                            error))
-        return FALSE;
+        return NULL;
 
     connection = nm_simple_connection_new();
     s_con      = NM_SETTING_CONNECTION(nm_setting_connection_new());
@@ -592,7 +592,7 @@ fail_invalid_secret:
                            NM_UTILS_ERROR_INVALID_ARGUMENT,
                            _("Failed to create WireGuard connection: %s"),
                            local->message);
-        return FALSE;
+        return NULL;
     }
 
     return g_steal_pointer(&connection);
diff --git a/src/libnm-client-impl/nm-device-bond.c b/src/libnm-client-impl/nm-device-bond.c
index e8b3e3eb..affcb993 100644
--- a/src/libnm-client-impl/nm-device-bond.c
+++ b/src/libnm-client-impl/nm-device-bond.c
@@ -82,7 +82,7 @@ nm_device_bond_get_carrier(NMDeviceBond *device)
  * #NMDevices that are slaves of @device. This is the internal
  * copy used by the device, and must not be modified.
  *
- * Deprecated: 1.34 Use nm_device_get_ports() instead.
+ * Deprecated: 1.34: Use nm_device_get_ports() instead.
  **/
 const GPtrArray *
 nm_device_bond_get_slaves(NMDeviceBond *device)
diff --git a/src/libnm-client-impl/nm-device-bridge.c b/src/libnm-client-impl/nm-device-bridge.c
index 6d5d6f95..abb78ced 100644
--- a/src/libnm-client-impl/nm-device-bridge.c
+++ b/src/libnm-client-impl/nm-device-bridge.c
@@ -82,7 +82,7 @@ nm_device_bridge_get_carrier(NMDeviceBridge *device)
  * #NMDevices that are slaves of @device. This is the internal
  * copy used by the device, and must not be modified.
  *
- * Deprecated: 1.34 Use nm_device_get_ports() instead.
+ * Deprecated: 1.34: Use nm_device_get_ports() instead.
  **/
 const GPtrArray *
 nm_device_bridge_get_slaves(NMDeviceBridge *device)
diff --git a/src/libnm-client-impl/nm-device-ovs-bridge.c b/src/libnm-client-impl/nm-device-ovs-bridge.c
index 8c30fc3f..ef134798 100644
--- a/src/libnm-client-impl/nm-device-ovs-bridge.c
+++ b/src/libnm-client-impl/nm-device-ovs-bridge.c
@@ -44,7 +44,7 @@ G_DEFINE_TYPE(NMDeviceOvsBridge, nm_device_ovs_bridge, NM_TYPE_DEVICE)
  *
  * Since: 1.14
  *
- * Deprecated: 1.34 Use nm_device_get_ports() instead.
+ * Deprecated: 1.34: Use nm_device_get_ports() instead.
  **/
 const GPtrArray *
 nm_device_ovs_bridge_get_slaves(NMDeviceOvsBridge *device)
diff --git a/src/libnm-client-impl/nm-device-ovs-port.c b/src/libnm-client-impl/nm-device-ovs-port.c
index 9e20e5b8..5bcef73c 100644
--- a/src/libnm-client-impl/nm-device-ovs-port.c
+++ b/src/libnm-client-impl/nm-device-ovs-port.c
@@ -44,7 +44,7 @@ G_DEFINE_TYPE(NMDeviceOvsPort, nm_device_ovs_port, NM_TYPE_DEVICE)
  *
  * Since: 1.14
  *
- * Deprecated: 1.34 Use nm_device_get_ports() instead.
+ * Deprecated: 1.34: Use nm_device_get_ports() instead.
  **/
 const GPtrArray *
 nm_device_ovs_port_get_slaves(NMDeviceOvsPort *device)
diff --git a/src/libnm-client-impl/nm-device-team.c b/src/libnm-client-impl/nm-device-team.c
index 0a42089a..e0b21e8e 100644
--- a/src/libnm-client-impl/nm-device-team.c
+++ b/src/libnm-client-impl/nm-device-team.c
@@ -83,7 +83,7 @@ nm_device_team_get_carrier(NMDeviceTeam *device)
  * #NMDevices that are slaves of @device. This is the internal
  * copy used by the device, and must not be modified.
  *
- * Deprecated: 1.34 Use nm_device_get_ports() instead.
+ * Deprecated: 1.34: Use nm_device_get_ports() instead.
  **/
 const GPtrArray *
 nm_device_team_get_slaves(NMDeviceTeam *device)
diff --git a/src/libnm-client-impl/nm-device-wifi-p2p.c b/src/libnm-client-impl/nm-device-wifi-p2p.c
index 2b3b82f8..535482ad 100644
--- a/src/libnm-client-impl/nm-device-wifi-p2p.c
+++ b/src/libnm-client-impl/nm-device-wifi-p2p.c
@@ -130,7 +130,7 @@ nm_device_wifi_p2p_get_peer_by_path(NMDeviceWifiP2P *device, const char *path)
 /**
  * nm_device_wifi_p2p_start_find:
  * @device: a #NMDeviceWifiP2P
- * @options: (allow-none): optional options passed to StartFind.
+ * @options: (nullable): optional options passed to StartFind.
  * @cancellable: a #GCancellable, or %NULL
  * @callback: a #GAsyncReadyCallback, or %NULL
  * @user_data: user_data for @callback
diff --git a/src/libnm-client-impl/nm-device.c b/src/libnm-client-impl/nm-device.c
index d5ecee48..e3e6ca6e 100644
--- a/src/libnm-client-impl/nm-device.c
+++ b/src/libnm-client-impl/nm-device.c
@@ -2366,7 +2366,7 @@ nm_device_is_software(NMDevice *device)
 /**
  * nm_device_reapply:
  * @device: a #NMDevice
- * @connection: (allow-none): the #NMConnection to replace the applied
+ * @connection: (nullable): the #NMConnection to replace the applied
  *   settings with or %NULL to reuse existing
  * @version_id: zero or the expected version id of the applied connection.
  *   If specified and the version id mismatches, the call fails without
@@ -2420,7 +2420,7 @@ nm_device_reapply(NMDevice     *device,
 /**
  * nm_device_reapply_async:
  * @device: a #NMDevice
- * @connection: (allow-none): the #NMConnection to replace the applied
+ * @connection: (nullable): the #NMConnection to replace the applied
  *   settings with or %NULL to reuse existing
  * @version_id: zero or the expected version id of the applied
  *   connection. If specified and the version id mismatches, the call
@@ -2500,7 +2500,7 @@ nm_device_reapply_finish(NMDevice *device, GAsyncResult *result, GError **error)
  * nm_device_get_applied_connection:
  * @device: a #NMDevice
  * @flags: the flags argument. See #NMDeviceReapplyFlags.
- * @version_id: (out) (allow-none): returns the current version id of
+ * @version_id: (out) (optional): returns the current version id of
  *   the applied connection
  * @cancellable: a #GCancellable, or %NULL
  * @error: location for a #GError, or %NULL
@@ -2601,7 +2601,7 @@ nm_device_get_applied_connection_async(NMDevice           *device,
  * nm_device_get_applied_connection_finish:
  * @device: a #NMDevice
  * @result: the result passed to the #GAsyncReadyCallback
- * @version_id: (out) (allow-none): the current version id of the applied
+ * @version_id: (out) (optional): the current version id of the applied
  *   connection.
  * @error: location for a #GError, or %NULL
  *
@@ -3108,7 +3108,8 @@ nm_lldp_neighbor_get_attr_names(NMLldpNeighbor *neighbor)
  * nm_lldp_neighbor_get_attr_string_value:
  * @neighbor: the #NMLldpNeighbor
  * @name: the attribute name
- * @out_value: (out) (allow-none) (transfer none): on return, the attribute value
+ * @out_value: (out) (optional) (nullable) (transfer none): on return, the
+ *   attribute value
  *
  * Gets the string value of attribute with name @name on @neighbor
  *
@@ -3135,7 +3136,7 @@ nm_lldp_neighbor_get_attr_string_value(NMLldpNeighbor *neighbor,
  * nm_lldp_neighbor_get_attr_uint_value:
  * @neighbor: the #NMLldpNeighbor
  * @name: the attribute name
- * @out_value: (out) (allow-none): on return, the attribute value
+ * @out_value: (out) (optional): on return, the attribute value
  *
  * Gets the uint32 value of attribute with name @name on @neighbor
  *
diff --git a/src/libnm-client-impl/nm-remote-connection.c b/src/libnm-client-impl/nm-remote-connection.c
index fe7e0712..607c21a1 100644
--- a/src/libnm-client-impl/nm-remote-connection.c
+++ b/src/libnm-client-impl/nm-remote-connection.c
@@ -31,12 +31,14 @@ NM_GOBJECT_PROPERTIES_DEFINE(NMRemoteConnection,
                              PROP_UNSAVED,
                              PROP_FLAGS,
                              PROP_FILENAME,
+                             PROP_VERSION_ID,
                              PROP_VISIBLE, );
 
 typedef struct {
     GCancellable *get_settings_cancellable;
 
     char   *filename;
+    guint64 version_id;
     guint32 flags;
     bool    unsaved;
 
@@ -69,9 +71,9 @@ G_DEFINE_TYPE_WITH_CODE(NMRemoteConnection,
 /**
  * nm_remote_connection_update2:
  * @connection: the #NMRemoteConnection
- * @settings: (allow-none): optional connection to update the settings.
+ * @settings: (nullable): optional connection to update the settings.
  * @flags: update-flags
- * @args: (allow-none): optional arguments.
+ * @args: (nullable): optional arguments.
  * @cancellable: a #GCancellable, or %NULL
  * @callback: callback to be called when the commit operation completes
  * @user_data: caller-specific data passed to @callback
@@ -602,6 +604,23 @@ nm_remote_connection_get_filename(NMRemoteConnection *connection)
 }
 
 /**
+ * nm_remote_connection_get_version_id:
+ * @connection: the #NMRemoteConnection
+ *
+ * Returns: the version-id of the profile. This ID is incremented
+ *   whenever the profile is modified.
+ *
+ * Since: 1.44
+ */
+guint64
+nm_remote_connection_get_version_id(NMRemoteConnection *connection)
+{
+    g_return_val_if_fail(NM_IS_REMOTE_CONNECTION(connection), 0);
+
+    return NM_REMOTE_CONNECTION_GET_PRIVATE(connection)->version_id;
+}
+
+/**
  * nm_remote_connection_get_visible:
  * @connection: the #NMRemoteConnection
  *
@@ -724,6 +743,9 @@ get_property(GObject *object, guint prop_id, GValue *value, GParamSpec *pspec)
     case PROP_FILENAME:
         g_value_set_string(value, NM_REMOTE_CONNECTION_GET_PRIVATE(object)->filename);
         break;
+    case PROP_VERSION_ID:
+        g_value_set_uint64(value, NM_REMOTE_CONNECTION_GET_PRIVATE(object)->version_id);
+        break;
     case PROP_VISIBLE:
         g_value_set_boolean(value, NM_REMOTE_CONNECTION_GET_PRIVATE(object)->visible);
         break;
@@ -759,10 +781,11 @@ const NMLDBusMetaIface _nml_dbus_meta_iface_nm_settings_connection = NML_DBUS_ME
                                       NMRemoteConnection,
                                       _priv.filename),
         NML_DBUS_META_PROPERTY_INIT_U("Flags", PROP_FLAGS, NMRemoteConnection, _priv.flags),
-        NML_DBUS_META_PROPERTY_INIT_B("Unsaved",
-                                      PROP_UNSAVED,
+        NML_DBUS_META_PROPERTY_INIT_B("Unsaved", PROP_UNSAVED, NMRemoteConnection, _priv.unsaved),
+        NML_DBUS_META_PROPERTY_INIT_T("VersionId",
+                                      PROP_VERSION_ID,
                                       NMRemoteConnection,
-                                      _priv.unsaved), ), );
+                                      _priv.version_id), ), );
 
 static void
 nm_remote_connection_class_init(NMRemoteConnectionClass *klass)
@@ -820,6 +843,23 @@ nm_remote_connection_class_init(NMRemoteConnectionClass *klass)
                                                         G_PARAM_READABLE | G_PARAM_STATIC_STRINGS);
 
     /**
+     * NMRemoteConnection:version-id:
+     *
+     * The version ID of the profile that is incremented when the profile gets modified.
+     * This can be used to track concurrent modifications of the profile.
+     *
+     * Since: 1.44
+     **/
+    obj_properties[PROP_VERSION_ID] =
+        g_param_spec_uint64(NM_REMOTE_CONNECTION_VERSION_ID,
+                            "",
+                            "",
+                            0,
+                            G_MAXUINT64,
+                            0,
+                            G_PARAM_READABLE | G_PARAM_STATIC_STRINGS);
+
+    /**
      * NMRemoteConnection:visible:
      *
      * %TRUE if the remote connection is visible to the current user, %FALSE if