diff options
author | Thomas Haller <thaller@redhat.com> | 2018-11-20 14:51:22 +0100 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2018-12-09 14:47:31 +0100 |
commit | f95a5263667a03aaf67635d28532c242d3025bd9 (patch) | |
tree | a2602429f91cc2cba1693bdbc5a2e9e1e401fbc2 /src/nm-active-connection.h | |
parent | 9e8c3d2ebf2efd61658e69ef8c3db3df3b0b8f0a (diff) | |
download | NetworkManager-f95a5263667a03aaf67635d28532c242d3025bd9.tar.gz |
keep-alive: use NMKeepAlive API directly instead of via NMActiveConnection
NMKeepAlive is a proper GObject type, with a specific API that on the one
end allows to configure watches/bindings, and on the other end exposes
and is-alive property and the owner instance. That's great, as NMActiveConnection
is not concerned with either end (moving complexity away from
"nm-active-connection.c") and as we later can reuse NMKeepAlive with
NMSettingsConnection.
However, we don't need to wrap this API by NMActiveConnection. Doing so
means, we need to expose all the watch/bind functions also as part of
NMActiveConnection API.
The only ugliness here is, that NMPolicy subscribes to property changed
signal of the keep alive instance, which would fail horribly if
NMActiveConnection ever decides to swap the keep alive instance (in
which case NMPolicy would have to disconnect the signal, and possibly
reconnect it to another NMKeepAlive instance). We avoid that by just not
doing that and documenting it.
Diffstat (limited to 'src/nm-active-connection.h')
-rw-r--r-- | src/nm-active-connection.h | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/src/nm-active-connection.h b/src/nm-active-connection.h index 5b2e421507..2b5a6b59ee 100644 --- a/src/nm-active-connection.h +++ b/src/nm-active-connection.h @@ -59,7 +59,6 @@ #define NM_ACTIVE_CONNECTION_INT_MASTER_READY "int-master-ready" #define NM_ACTIVE_CONNECTION_INT_ACTIVATION_TYPE "int-activation-type" #define NM_ACTIVE_CONNECTION_INT_ACTIVATION_REASON "int-activation-reason" -#define NM_ACTIVE_CONNECTION_INT_KEEP_ALIVE "int-keep-alive" /* Signals */ #define NM_ACTIVE_CONNECTION_STATE_CHANGED "state-changed" @@ -186,12 +185,8 @@ NMActivationType nm_active_connection_get_activation_type (NMActiveConnection *s NMActivationReason nm_active_connection_get_activation_reason (NMActiveConnection *self); -gboolean nm_active_connection_get_keep_alive (NMActiveConnection *self); +NMKeepAlive *nm_active_connection_get_keep_alive (NMActiveConnection *self); void nm_active_connection_clear_secrets (NMActiveConnection *self); -void nm_active_connection_bind_dbus_client (NMActiveConnection *self, - GDBusConnection *dbus_con, - const char *dbus_name); - #endif /* __NETWORKMANAGER_ACTIVE_CONNECTION_H__ */ |