1. 04 Oct, 2016 1 commit
    • Thomas Haller's avatar
      core: refactor private data in "src" · 4d37f7a1
      Thomas Haller authored
      - use _NM_GET_PRIVATE() and _NM_GET_PRIVATE_PTR() everywhere.
      
      - reorder statements, to have GObject related functions (init, dispose,
        constructed) at the bottom of each file and in a consistent order w.r.t.
        each other.
      
      - unify whitespaces in signal and properties declarations.
      
      - use NM_GOBJECT_PROPERTIES_DEFINE() and _notify()
      
      - drop unused signal slots in class structures
      
      - drop unused header files for device factories
      4d37f7a1
  2. 24 Jul, 2015 4 commits
    • Dan Winship's avatar
      core: port NMDhcp4Config/NMDhcp6Config to GVariant · 94078a13
      Dan Winship authored
      In the gdbus port, the :options properties will be GVariant-valued
      (and thus immutable), so having APIs that let you repeatedly modify
      them would make things complicated. Since we actually only ever set
      all the options at once, just change the APIs to do that, rather than
      setting the options one-by-one.
      
      Since nm-dispatcher already works in terms of GVariant, it makes
      things simpler there if NMDhcp[46]Config can return its options as a
      GVariant. And since we'll need it to be a GVariant internally later
      anyway, just port everything to GVariant now, and convert it to a
      GHashTable for dbus-glib only in get_property().
      94078a13
    • Dan Winship's avatar
      core: move D-Bus export/unexport into NMExportedObject · c1dd3b6e
      Dan Winship authored
      Move D-Bus export/unexport handling into NMExportedObject and remove
      type-specific export/get_path methods (export paths are now specified
      at the class level, and NMExportedObject handles the counters for all
      exported types automatically).
      
      Since all exportable objects now use the same get_path() method, we
      can also add some helper methods to simplify get_property()
      implementations for object-path and object-path-array properties.
      c1dd3b6e
    • Dan Winship's avatar
      core: add an NMExportedObject base class · 6fcc1dee
      Dan Winship authored
      Add NMExportedObject, make it the base class of all D-Bus-exported
      types, and move the nm-properties-changed-signal logic into it. (Also,
      make NMSettings use the same properties-changed code as everything
      else, which it was not previously doing, presumably for historical
      reasons).
      
      (This is mostly just shuffling code around at this point, but
      NMExportedObject will be more important in the gdbus port, since
      gdbus-codegen doesn't do a very good job of supporting objects that
      export multiple interfaces [as each NMDevice subclass does, for
      example], so we will need more glue/helper code in NMExportedObject
      then.)
      6fcc1dee
    • 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).
      3452ee2a
  3. 16 Aug, 2014 1 commit
    • Dan Winship's avatar
      all: fix up multiple-include-guard defines · c81fb49a
      Dan Winship authored
      Previously, src/nm-ip4-config.h, libnm/nm-ip4-config.h, and
      libnm-glib/nm-ip4-config.h all used "NM_IP4_CONFIG_H" as an include
      guard, which meant that nm-test-utils.h could not tell which of them
      was being included (and so, eg, if you tried to include
      nm-ip4-config.h in a libnm test, it would fail to compile because
      nm-test-utils.h was referring to symbols in src/nm-ip4-config.h).
      
      Fix this by changing the include guards in the non-API-stable parts of
      the tree:
      
        - libnm-glib/nm-ip4-config.h remains   NM_IP4_CONFIG_H
        - libnm/nm-ip4-config.h now uses     __NM_IP4_CONFIG_H__
        - src/nm-ip4-config.h now uses       __NETWORKMANAGER_IP4_CONFIG_H__
      
      And likewise for all other headers.
      
      The two non-"nm"-prefixed headers, libnm/NetworkManager.h and
      src/NetworkManagerUtils.h are now __NETWORKMANAGER_H__ and
      __NETWORKMANAGER_UTILS_H__ respectively, which, while not entirely
      consistent with the general scheme, do still mostly make sense in
      isolation.
      c81fb49a
  4. 01 Aug, 2014 1 commit
    • Dan Winship's avatar
      libnm, core, cli, tui: fix the capitalization of various types · 3ac0f528
      Dan Winship authored
      GLib/Gtk have mostly settled on the convention that two-letter
      acronyms in type names remain all-caps (eg, "IO"), but longer acronyms
      become initial-caps-only (eg, "Tcp").
      
      NM was inconsistent, with most long acronyms using initial caps only
      (Adsl, Cdma, Dcb, Gsm, Olpc, Vlan), but others using all caps (DHCP,
      PPP, PPPOE, VPN). Fix libnm and src/ to use initial-caps only for all
      three-or-more-letter-long acronyms (and update nmcli and nmtui for the
      libnm changes).
      3ac0f528
  5. 23 Jul, 2014 1 commit
    • Dan Winship's avatar
      core: fill in nm-types.h, clean out other headers · b28f6526
      Dan Winship authored
      Clean up some of the cross-includes between headers (which made it so
      that, eg, if you included NetworkManagerUtils.h in a test program, you
      would need to build the test with -I$(top_srcdir)/src/platform, and if
      you included nm-device.h you'd need $(POLKIT_CFLAGS)) by moving all
      GObject struct definitions for src/ and src/settings/ into nm-types.h
      (which already existed to solve the NMDevice/NMActRequest circular
      references).
      
      Update various .c files to explicitly include the headers they used to
      get implicitly, and remove some now-unnecessary -I options from
      Makefiles.
      b28f6526
  6. 20 May, 2013 1 commit
    • Dan Winship's avatar
      core: make nm-properties-changed-signal always export the right properties · 5a223b90
      Dan Winship authored
      Change the way that nm-properties-changed-signal works, and parse the
      dbus-binding-tool-generated info to get the exact list of properties
      that it's expected to export.
      
      This makes NM_PROPERTY_PARAM_NO_EXPORT unnecessary, and also fixes the
      problem of properties like NMDevice:hw-address being exported on
      classes where it shouldn't be.
      5a223b90
  7. 27 Jul, 2012 1 commit
  8. 11 May, 2011 1 commit
  9. 14 Jan, 2010 1 commit
  10. 19 Jan, 2009 1 commit
  11. 03 Nov, 2008 1 commit
  12. 07 Aug, 2008 1 commit
    • Dan Williams's avatar
      2008-08-07 Dan Williams <dcbw@redhat.com> · 881370ab
      Dan Williams authored
      	* include/NetworkManager.h
      		- Add the DHCP4Config D-Bus interface
      
      	* libnm-glib/Makefile.am
      	  libnm-glib/nm-dhcp4-config.c
      	  libnm-glib/nm-dhcp4-config.h
      		- Handle DHCP4 config objects exported by NM over D-Bus
      
      	* libnm-glib/nm-device.c
      	  libnm-glib/nm-device.h
      		- Add a 'dhcp4-config' property
      
      	* libnm-glib/libnm-glib-test.c
      		- Print out DHCP4 config for devices
      		- Fix some crashes when no connections are active
      
      	* src/nm-device-interface.c
      	  src/nm-device.c
      	  src/nm-dhcp4-config.c
      	  src/nm-dhcp4-config.h
      		- Treat dhcp4-config object as an object path at the D-Bus interface so
      			that when it doesn't exist we can proxy it as "/" which dbus-glib
      			doesn't let us do when the property type is G_TYPE_OBJECT
      
      
      
      git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3905 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
      881370ab
  13. 20 Jul, 2008 1 commit
  14. 17 Jul, 2008 1 commit
    • Dan Williams's avatar
      2008-07-17 Dan Williams <dcbw@redhat.com> · edda4463
      Dan Williams authored
      	* introspection/Makefile.am
      	  introspection/nm-device.xml
      	  introspection/nm-dhcp4-config.xml
      		- Add bits for the DHCP4Config property of the device, and the DHCP4Config
      			itself
      	* src/nm-device-interface.c
      	  src/nm-device-interface.h
      		- Add the DHCP4Config property
      
      	* src/nm-device.c
      		- Keep track of DHCP4 options via a new DHCP4Config property and notify
      			D-Bus clients when it changes
      
      	* src/nm-dhcp4-config.c
      	  src/nm-dhcp4-config.h
      		- Simple object to store DHCP4 options, export them over D-Bus, and
      			notify when they change
      
      	* src/dhcp-manager/nm-dhcp-manager.c
      	  src/dhcp-manager/nm-dhcp-manager.h
      		- (nm_dhcp_manager_set_dhcp4_config, copy_dhcp4_config_option): copy and
      			filter server-returned DHCP options into an NMDHCP4Config object
      
      
      
      git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3829 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
      edda4463