diff options
author | Thomas Haller <thaller@redhat.com> | 2017-04-23 14:20:37 +0200 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2017-05-12 17:29:33 +0200 |
commit | 54f5407abf938af436f3cf65687bc9004259416d (patch) | |
tree | c59c612bbc87669bc3da760fe53253471fe8afe8 /src/nm-hostname-manager.h | |
parent | 5bfb7c3c89afe4da5b1ac2395391e9a986c722f0 (diff) | |
download | NetworkManager-54f5407abf938af436f3cf65687bc9004259416d.tar.gz |
hostname: cache hostname-manager's hostname property
A property preferably only emits a notify-changed signal when
the value actually changes and it caches the value (so that
between property-changed signals the value is guaranteed not to change).
NMSettings and NMManager both already cache the hostname, because
NMHostnameManager didn't guarantee this basic concept.
Implement it and rely on it from NMSettings and NMPolicy.
And remove the copy of the property from NMManager.
Move the call for nm_dispatcher_call_hostname() from NMHostnameManager
to NMManager. Note that NMPolicy also has a call to the dispatcher
when set-transient-hostname returns. This should be cleaned up later.
Diffstat (limited to 'src/nm-hostname-manager.h')
-rw-r--r-- | src/nm-hostname-manager.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/nm-hostname-manager.h b/src/nm-hostname-manager.h index 92702bbc1b..a837e9b92d 100644 --- a/src/nm-hostname-manager.h +++ b/src/nm-hostname-manager.h @@ -44,7 +44,9 @@ GType nm_hostname_manager_get_type (void); NMHostnameManager *nm_hostname_manager_get (void); -char *nm_hostname_manager_get_hostname (NMHostnameManager *self); +const char *nm_hostname_manager_get_hostname (NMHostnameManager *self); + +char *nm_hostname_manager_read_hostname (NMHostnameManager *self); gboolean nm_hostname_manager_write_hostname (NMHostnameManager *self, const char *hostname); |