summaryrefslogtreecommitdiff
path: root/src/dns/nm-dns-systemd-resolved.c
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2019-08-31 09:09:37 +0200
committerThomas Haller <thaller@redhat.com>2019-09-26 08:18:58 +0200
commit807fd682fb2d103b5fc83eb1b96d3eba261aaec8 (patch)
treef02a2632903ada3da90a3d973455e3a2a8d0135f /src/dns/nm-dns-systemd-resolved.c
parent5bf211205695920a9147b3fe24cd294f74ac2d6a (diff)
downloadNetworkManager-807fd682fb2d103b5fc83eb1b96d3eba261aaec8.tar.gz
dns: drop get_name() and is_caching() virtual functions for klass variables
The plugin name and whether a plugin is caching only depends on the type, it does not require a virtual function where types would decided depending on other reasons. Convert the virtual functions into fields of the class.
Diffstat (limited to 'src/dns/nm-dns-systemd-resolved.c')
-rw-r--r--src/dns/nm-dns-systemd-resolved.c20
1 files changed, 3 insertions, 17 deletions
diff --git a/src/dns/nm-dns-systemd-resolved.c b/src/dns/nm-dns-systemd-resolved.c
index 67a6f43301..c9fb773f52 100644
--- a/src/dns/nm-dns-systemd-resolved.c
+++ b/src/dns/nm-dns-systemd-resolved.c
@@ -388,20 +388,6 @@ update (NMDnsPlugin *plugin,
/*****************************************************************************/
-static gboolean
-is_caching (NMDnsPlugin *plugin)
-{
- return TRUE;
-}
-
-static const char *
-get_name (NMDnsPlugin *plugin)
-{
- return "systemd-resolved";
-}
-
-/*****************************************************************************/
-
static void
name_owner_changed (NMDnsSystemdResolved *self,
const char *owner)
@@ -553,7 +539,7 @@ nm_dns_systemd_resolved_class_init (NMDnsSystemdResolvedClass *dns_class)
object_class->dispose = dispose;
- plugin_class->is_caching = is_caching;
- plugin_class->update = update;
- plugin_class->get_name = get_name;
+ plugin_class->plugin_name = "systemd-resolved";
+ plugin_class->is_caching = TRUE;
+ plugin_class->update = update;
}