• Dan Winship's avatar
    libnm-core, libnm, core: make NMConnection an interface · e1ba13a4
    Dan Winship authored
    The fact that NMRemoteConnection has to be an NMConnection and
    therefore can't be an NMObject means that it needs to reimplement bits
    of NMObject functionality (and likewise NMObject needs some special
    magic to deal with it). Likewise, we will need a daemon-side
    equivalent of NMObject as part of the gdbus port, and we would want
    NMSettingsConnection to be able to inherit from this as well.
    Solve this problem by making NMConnection into an interface, and
    having NMRemoteConnection and NMSettingsConnection implement it. (We
    use some hacks to keep the GHashTable of NMSettings objects inside
    nm-connection.c rather than having to be implemented by the
    Since NMConnection is no longer an instantiable type, this adds
    NMSimpleConnection to replace the various non-D-Bus-based uses of
    NMConnection throughout the code. nm_connection_new() becomes
    nm_simple_connection_new(), nm_connection_new_from_hash() becomes
    nm_simple_connection_new_from_hash(), and nm_connection_duplicate()
    becomes nm_simple_connection_new_clone().
Makefile.libnm-core 2.65 KB