• Thomas Haller's avatar
    shared: add "nm-utils/nm-vpn-plugin-utils.h" · 5d55492b
    Thomas Haller authored
    This file is only used by plugins and copied between them.
    It's purpose is to contain general utility functions that are
    only relevant for implementing NetworkManager's VPN plugins.
    In principle the utility functions could be part of libnm, however,
    there are a few problems with that:
      - if they are part of libnm, adding and using a new utility function
        requires the plugin to bump the required libnm version. Since you
        usally can work around/reimplement utility functions, this results
        in not using the API from libnm, not adding the API to libnm,
        and reimplementing it over and over in the plugin.
      - plugins compile both against libnm and libnm-glib. Thus, either
        the utility function would also be needed in libnm-glib, or again,
        it is not usable by the plugin.
    We must avoid that the utility functions diverge and no local
    modifications to these files should be made in the plugin.
    Instead, one special location of the utility functions shall be
    extended and re-imported (copied) to the plugin as needed.
    Add the files to NetworkManager's repository. Although they are not
    needed for NetworkManager itself, they are a different API provided
    by NetworkManager. An API that is reused and shared by copying the files
nm-vpn-plugin-utils.h 1.86 KB