1. 13 Oct, 2016 1 commit
    • Thomas Haller's avatar
      libnm: move backported symbols from libnm-core to libnm · 0e47b327
      Thomas Haller authored
      Backported symbols only make sense for libnm itself, not for
      libnm-core which is statically linked with NetworkManager and
      nm-ifcace-helper. Declaring the symbols in libnm-core, means
      that NetworkManager binary also contains them, although there
      are not used.
      Move them to libnm.
  2. 03 Oct, 2016 1 commit
  3. 04 Aug, 2016 1 commit
  4. 07 Jul, 2016 1 commit
  5. 29 Mar, 2016 1 commit
  6. 19 Feb, 2016 1 commit
    • Thomas Haller's avatar
      all: cleanup includes and let "nm-default.h" include "config.h" · 8bace23b
      Thomas Haller authored
      - All internal source files (except "examples", which are not internal)
        should include "config.h" first. As also all internal source
        files should include "nm-default.h", let "config.h" be included
        by "nm-default.h" and include "nm-default.h" as first in every
        source file.
        We already wanted to include "nm-default.h" before other headers
        because it might contains some fixes (like "nm-glib.h" compatibility)
        that is required first.
      - After including "nm-default.h", we optinally allow for including the
        corresponding header file for the source file at hand. The idea
        is to ensure that each header file is self contained.
      - Don't include "config.h" or "nm-default.h" in any header file
        (except "nm-sd-adapt.h"). Public headers anyway must not include
        these headers, and internal headers are never included after
        "nm-default.h", as of the first previous point.
      - Include all internal headers with quotes instead of angle brackets.
        In practice it doesn't matter, because in our public headers we must
        include other headers with angle brackets. As we use our public
        headers also to compile our interal source files, effectively the
        result must be the same. Still do it for consistency.
      - Except for <config.h> itself. Include it with angle brackets as suggested by
  7. 04 Dec, 2015 1 commit
  8. 21 Aug, 2015 1 commit
  9. 05 Aug, 2015 1 commit
  10. 24 Jul, 2015 1 commit
    • Dan Winship's avatar
      all: rename nm-glib-compat.h to nm-glib.h, use everywhere · 3452ee2a
      Dan Winship authored
      Rather than randomly including one or more of <glib.h>,
      <glib-object.h>, and <gio/gio.h> everywhere (and forgetting to include
      "nm-glib-compat.h" most of the time), rename nm-glib-compat.h to
      nm-glib.h, include <gio/gio.h> from there, and then change all .c
      files in NM to include "nm-glib.h" rather than including the glib
      headers directly.
      (Public headers files still have to include the real glib headers,
      since nm-glib.h isn't installed...)
      Also, remove glib includes from header files that are already
      including a base object header file (which must itself already include
      the glib headers).
  11. 09 Jun, 2015 1 commit
  12. 19 Mar, 2015 1 commit
  13. 18 Dec, 2014 1 commit
  14. 04 Dec, 2014 1 commit
  15. 13 Nov, 2014 1 commit
    • Dan Winship's avatar
      all: consistently include config.h · 3bfb163a
      Dan Winship authored
      config.h should be included from every .c file, and it should be
      included before any other include. Fix that.
      (As a side effect of how I did this, this also changes us to
      consistently use "config.h" rather than <config.h>. To the extent that
      it matters [which is not much], quotes are more correct anyway, since
      we're talking about a file in our own build tree, not a system
  16. 07 Nov, 2014 2 commits
  17. 28 Oct, 2014 1 commit
    • Dan Winship's avatar
      libnm: change GSList to GPtrArray in libnm methods · 6ae42248
      Dan Winship authored
      libnm mostly used GPtrArrays in its APIs, except that arrays of
      connections were usually GSLists. Fix this and make them GPtrArrays
      too (and rename nm_client_list_connections() to
      nm_client_get_connections() to match everything else).
  18. 22 Oct, 2014 1 commit
    • Dan Winship's avatar
      libnm: consolidate NMClientError and NMObjectError · 388a0c5e
      Dan Winship authored
      Consolidate NMClientError and NMObjectError (such that there is now
      only one libnm-API-specific error domain). In particular, merge
      Also make object_creation_failed() be a plain method rather than a
      signal, since there's no reason for anyone to be connecting to it on
      another object. And remove its GError argument because the subclass
      can just create its own more-specific error.
  19. 10 Oct, 2014 6 commits
  20. 05 Oct, 2014 1 commit
  21. 03 Oct, 2014 1 commit
    • Dan Winship's avatar
      libnm: make use of GParamSpecFlags and GParamSpecEnum · fcfb4b40
      Dan Winship authored
      Make enum- and flags-valued properties use GParamSpecEnum and
      GParamSpecFlags, for better introspectability/bindability.
      This requires no changes outside libnm-core/libnm since the expected
      data size is still the same with g_object_get()/g_object_set(), and
      GLib will internally convert between int/uint and enum/flags GValues
      when using g_object_get_property()/g_object_set_property().
  22. 01 Oct, 2014 1 commit
  23. 30 Sep, 2014 1 commit
  24. 25 Sep, 2014 2 commits
    • Dan Winship's avatar
      libnm: add some missing sync/async method variants · 41eca3ea
      Dan Winship authored
      Add the missing variant in most places in the API where previously
      there was either only a synchronous version or only an asynchronous
      There is not yet a synchronous nm_client_activate_connection(),
      nm_client_add_and_activate_connection(), or
      nm_remote_settings_add_connection(), because the existing async code
      depends on waiting for other asynchronous events, so making them run
      synchronously is slightly more complicated. But these APIs can be
      added later.
    • Dan Winship's avatar
      libnm: make sync/async APIs more GLib-like · 2237ea3d
      Dan Winship authored
      Make synchronous APIs take GCancellables, and make asynchronous APIs
      use GAsyncReadyCallbacks and have names ending in "_async", with
      "_finish" functions to retrieve the results.
      Also, make nm_client_activate_connection_finish(),
      nm_client_add_and_activate_finish(), and
      nm_remote_settings_add_connection_finish() be (transfer full) rather
      than (transfer none), because the refcounting semantics become
      slightly confusing in some edge cases otherwise.
  25. 18 Sep, 2014 3 commits
    • Dan Winship's avatar
      libnm: port to GDBus · 6793a32a
      Dan Winship authored
      Port libnm-core/libnm to GDBus.
      The NetworkManager daemon continues to use dbus-glib; the
      previously-added connection hash/variant conversion methods are now
      moved to NetworkManagerUtils (along with a few other utilities that
      are now only needed by the daemon code).
    • Dan Winship's avatar
      libnm-core: change connection hash tables to variants in API · acf86f68
      Dan Winship authored
      In preparation for porting to GDBus, make nm_connection_to_dbus(),
      etc, represent connections as GVariants of type 'a{sa{sv}}' rather
      than as GHashTables-of-GHashTables-of-GValues.
      This means we're constantly converting back and forth internally, but
      this is just a stepping stone on the way to the full GDBus port, and
      all of that code will go away again later.
    • Dan Winship's avatar
      libnm: let NMObject create all D-Bus proxies · b728d1fb
      Dan Winship authored
      Add _nm_object_class_add_interface(), for declaring that a class
      implements a particular interface, and then have NMObject create the
      corresponding proxies itself. (The subclass can get a copy with
      _nm_object_get_proxy() if it needs it for something).
      (In GDBus, creating a proxy is a heavier operation than in dbus-glib,
      so we'll need to create the proxies asynchronously. Moving the
      creation to NMObject makes that easier since we can do it as part
      of the existing init/init_async.)
  26. 04 Sep, 2014 3 commits
    • Dan Winship's avatar
      libnm: change empty-GPtrArray-return semantics · 3e5b3833
      Dan Winship authored
      libnm functions that return GPtrArrays of objects had a rule that if
      the array was empty, they would return NULL rather than a 0-length
      array. As it turns out, this is just a nuisance to clients, since in
      most places the code for the non-empty case would end up doing the
      right thing for the empty case as well (and where it doesn't, we can
      check "array->len == 0" just as easily as "array == NULL"). So just
      return the 0-length array instead.
    • Dan Winship's avatar
      libnm: drop NM_TYPE_OBJECT_ARRAY, use G_TYPE_PTR_ARRAY · 074c2093
      Dan Winship authored
      Use G_TYPE_PTR_ARRAY for GPtrArray-of-NMObject-valued properties,
      because it has better introspection/bindings support.
      As with the strdict change in libnm-core, we need to manually copy the
      array in get_property() implementations, to preserve the standard
      semantics that get_property() returns a copy, not the internal array.
      (This patch also changes those properties so that they are always
      non-NULL until dispose(); previously some of them could be either NULL
      or 0-length at different times.)
    • Dan Winship's avatar
      libnm-core: rename NMConnection to/from_hash methods · 773d3f0a
      Dan Winship authored
      Rename nm_connection_to_hash() to nm_connection_to_dbus(), and
      nm_connection_new_from_hash() to nm_connection_new_from_dbus(). In
      addition to clarifying that this is specifically the D-Bus
      serialization format, these names will also work better in the
      GDBus-based future where the serialization format is GVariant, not
      Also, move NMSettingHashFlags to nm-connection.h, and rename it
  27. 16 Aug, 2014 1 commit
    • Dan Winship's avatar
      libnm: get rid of redundant NMRemoteConnection properties · 5ed054ac
      Dan Winship authored
      NMRemoteConnection had two DBusGConnection properties
      (NMRemoteConnection:bus and NMRemoteConnection:dbus-connection) and
      two D-Bus path properties (NMConnection:path and
      NMRemoteConnection:dbus-path). The former of each pair were the
      traditional names, and the latter were added for compatibility with
      In libnm, we can just drop NMRemoteConnection:bus, and use the
      NMObject-compatible :dbus-connection name instead.
      For the path properties, we need to rename either NMConnection:path or
      NMObject:dbus-path. Since NMObject already has "nm_object_get_path()"
      rather than "nm_object_get_dbus_path()", and it already mistakenly
      referred to the property as "NMObject:path" in the gtk-docs, it seemed
      to make sense to rename that one rather than the NMConnection one.
      (And then, for consistency, rename "nm_object_get_connection()" to
      "nm_object_get_dbus_connection()" to also match its property.)
  28. 07 Aug, 2014 2 commits
    • Dan Winship's avatar
      libnm: remove redundant NM name watching code · c4a86eba
      Dan Winship authored
      NMClient was watching to see whether NetworkManager was running, but
      its parent class NMObject was already doing that anyway, so NMClient
      doesn't need to do it itself.
      This also requires making NMClient:init_async() wait for NMObject's
      init_async() code to finish before calling GetPermissions, rather than
      running the two in parallel like before (since we don't know if NM is
      running or not until after NMObject's init_async() returns). This is
      probably more correct anyway in terms of inheritance, and it's not as
      much slower than the original code as it sounds, since previously
      we were calling NameHasOwner twice (in serial) anyway.
    • Dan Winship's avatar
      libnm: synchronize NMClient and NMRemoteSettings "is NM running" properties · 8ce06b81
      Dan Winship authored
      Rename NMClient:manager-running and NMRemoteSettings:service-running
      to both be :nm-running.