1. 08 Jan, 2018 1 commit
    • Thomas Haller's avatar
      build: refine the NETWORKMANAGER_COMPILATION define · 22ef6a50
      Thomas Haller authored
      Note that:
       - we compile some source files multiple times. Most notably those
         under "shared/".
       - we include a default header "shared/nm-default.h" in every source
         file. This header is supposed to setup a common environment by defining
         and including parts that are commonly used. As we always include the
         same header, the header must behave differently depending
         one whether the compilation is for libnm-core, NetworkManager or
         libnm-glib. E.g. it must include <glib/gi18n.h> or <glib/gi18n-lib.h>
         depending on whether we compile a library or an application.
      For that, the source files need the NETWORKMANAGER_COMPILATION #define
      to behave accordingly.
      Extend the define to be composed of flags. These flags are all named
      NM_NETWORKMANAGER_COMPILATION_WITH_*, they indicate which part of the
      build are available. E.g. when building libnm-core.la itself, then
      are available. When building NetworkManager, WITH_LIBNM_CORE_PRIVATE
      is not available but the internal parts are still accessible. When
      building nmcli, only WITH_LIBNM_CORE (the public part) is available.
      This granularily controls the build.
  2. 09 Mar, 2017 1 commit
    • Thomas Haller's avatar
      include: use double-quotes to include our own headers · 831286df
      Thomas Haller authored
      In practice, this should only matter when there are multiple
      header files with the same name. That is something we try
      to avoid already, by giving headers a distinct name.
      When building NetworkManager itself, we clearly want to use
      double-quotes for including our own headers.
      But we also want to do that in our public headers. For example:
          #include <stdio.h>
          #include <nm-1.h>
          void main() {
              printf ("INCLUDED %s/nm-2.h\n", SYMB);
          #include <nm-2.h>
          #define SYMB "1"
          #define SYMB "2"
      $ cc -I./2 -I./1 ./a.c
      $ ./a.out
      INCLUDED 2/nm-2.h
      Exceptions to this are
        - headers in "shared/nm-utils" that include <NetworkManager.h>. These
          headers are copied into projects and hence used like headers owned by
          those projects.
        - examples/C
  3. 05 May, 2016 1 commit
  4. 07 Nov, 2014 1 commit
  5. 10 Oct, 2014 1 commit
  6. 18 Sep, 2014 1 commit
    • 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).
  7. 04 Sep, 2014 2 commits
  8. 03 Sep, 2014 1 commit
  9. 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
  10. 01 Aug, 2014 5 commits
    • Dan Winship's avatar
      libnm: add NetworkManager.h, disallow including individual headers · d0b05b34
      Dan Winship authored
      Add NetworkManager.h, which includes all of the other NM header, and
      require all external users of libnm to use that rather than the
      individual headers.
      (An exception is made for nm-dbus-interface.h,
      nm-vpn-dbus-interface.h, and nm-version.h, which can be included
    • Dan Winship's avatar
      libnm: remove _new functions from NMObject subclasses · a0e9a4bd
      Dan Winship authored
      Most NMObjects should not be manually created, they should only be
      received from NMClient or NMRemoteSettings.
    • Dan Winship's avatar
      libnm: fix up class struct reserved slots · 2fc55941
      Dan Winship authored
      Add reserved slots to those classes that were missing them (or had run
      out), and sync up the number of slots across classes:
        - 8 slots for "important" classes, abstract base classes, and
          classes we expect we might need to add new virtual methods or
          signals to later.
        - 4 for everything else
      Also, rearrange the class elements in a few places into standard order
      (signals first, then methods).
    • Dan Winship's avatar
      libnm: remove Since tags and NM_AVAILABLE_IN_* attributes · b4ae6eae
      Dan Winship authored
      Everything currently in libnm has always been there.
    • Dan Winship's avatar
      libnm: add libnm/libnm-core (part 1) · d595f784
      Dan Winship authored
      This commit begins creating the new "libnm", which will replace
      libnm-util and libnm-glib.
      The main reason for the libnm-util/libnm-glib split is that the daemon
      needs to link to libnm-util (to get NMSettings, NMConnection, etc),
      but can't link to libnm-glib (because it uses many of the same type
      names as the NetworkManager daemon. eg, NMDevice). So the daemon links
      to only libnm-util, but basically all clients link to both.
      With libnm, there will be only a single client-visible library, and
      NetworkManager will internally link against a private "libnm-core"
      containing the parts that used to be in libnm-util.
      (The "libnm-core" parts still need to be in their own directory so
      that the daemon can see those header files without also seeing the
      ones in libnm/ that conflict with its own headers.)
      [This commit just copies the source code from libnm-util/ to
      libnm-core/, and libnm-glib/ to libnm/:
        mkdir -p libnm-core/tests/
        mkdir -p libnm/tests/
        cp libnm-util/*.[ch] libnm-util/nm-version.h.in libnm-core/
        rm -f libnm-core/nm-version.h libnm-core/nm-setting-template.[ch] libnm-core/nm-utils-enum-types.[ch]
        cp libnm-util/tests/*.[ch] libnm-core/tests/
        cp libnm-glib/*.[ch] libnm/
        rm -f libnm/libnm_glib.[ch] libnm/libnm-glib-test.c libnm/nm-glib-enum-types.[ch]
        cp libnm-glib/tests/*.[ch] libnm/tests/
  11. 15 Jul, 2014 1 commit
    • Dan Winship's avatar
      libnm-util, libnm-glib: standardize copyright/license headers · cb7e1893
      Dan Winship authored
      - Remove list of authors from files that had them; these serve no
        purpose except to quickly get out of date (and were only used in
        libnm-util and not libnm-glib anyway).
      - Just say "Copyright", not "(C) Copyright" or "Copyright (C)"
      - Put copyright statement after the license, not before
      - Remove "NetworkManager - Network link manager" from the few files
        that contained it, and "libnm_glib -- Access network status &
        information from glib applications" from the many files that
        contained it.
      - Remove vim modeline from nm-device-olpc-mesh.[ch], add emacs modeline
        to files that were missing it.
  12. 13 Feb, 2014 1 commit
    • Dan Winship's avatar
      libnm-util, libnm-glib: add versioned deprecation/availability macros · 9c4d86ee
      Dan Winship authored
      Add versioned NM_DEPRECATED_IN_* and NM_AVAILABLE_IN_* macros, and tag
      new/deprecated functions accordingly. (All currently-deprecated
      functions are assumed to have been deprecated in 0.9.10.)
      can be set to determine which versions will cause warnings.
      With the current settings, external consumers of the
      libnm-util/libnm-glib APIs will have MIN_REQUIRED and MAX_ALLOWED both
      set to NM_VERSION_0_9_8 by default, meaning they will get warnings
      about functions added in 0.9.10. NM internally sets
      always allowed to use all APIs.
  13. 25 Sep, 2013 1 commit
  14. 27 Jul, 2012 1 commit
  15. 10 Mar, 2011 1 commit
  16. 30 Sep, 2009 1 commit
  17. 19 Jan, 2009 1 commit
  18. 20 Dec, 2008 1 commit
  19. 19 Dec, 2008 1 commit
    • Dan Williams's avatar
      Re-add WINS support to the IPv4 config · a020ed21
      Dan Williams authored
      Don't do anything with WINS servers (dispatcher scripts installed with
      samba could certainly update samba's idea of WINS servers), but at least
      provide them so that the VPNs that can get upstream WINS servers can
      at least make other stuff aware of them.
  20. 14 Nov, 2008 1 commit
  21. 07 Aug, 2008 1 commit
    • Dan Williams's avatar
      2008-08-07 Dan Williams <dcbw@redhat.com> · bcae3129
      Dan Williams authored
      	* introspection/nm-ip4-config.xml
      		- Remove NIS logic; should be done from dispatcher scripts instead
      git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3909 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
  22. 06 Aug, 2008 1 commit
    • Dan Williams's avatar
      2008-08-06 Dan Williams <dcbw@redhat.com> · 2c31b549
      Dan Williams authored
      	* libnm-glib/nm-ip4-config.c
      		- Add 'routes' property
      	* libnm-util/nm-setting-vpn.c
      		- Remove 'routes' property
      	* libnm-util/nm-setting-ip4-config.c
      		- 'ignore-dhcp-dns' renamed to 'ignore-auto-dns'
      		- Add 'ignore-auto-routes' property
      		- 'routes' exposed over D-Bus is now an array of array of uint (4) to 
      			accomodate route metrics
      		- 'routes' exposed in C is now a list of NMSettingIP4Route structures
      	* libnm-util/nm-utils.c
      		- Add helpers for marshalling IP4 routes
      	* src/NetworkManagerUtils.c
      		- (nm_utils_merge_ip4_config): handle property renames and new route
      	* src/NetworkManagerSystem.c
      		- (nm_system_device_set_ip4_route, nm_system_device_set_from_ip4_config,
      		   nm_system_vpn_device_set_from_ip4_config): respect route metrics
      	* src/dhcp-manager/nm-dhcp-manager.c
      		- (nm_dhcp_manager_get_ip4_config): handle new route structure
      	* system-settings/plugins/ifcfg-fedora/reader.c
      		- Handle routes separately from addresses now that routes have a different
      	* introspection/nm-ip4-config.xml
      		- Rename internal routing functions
      		- 'static-routes' renamed to 'routes'
      git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3898 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
  23. 06 May, 2008 1 commit
    • Dan Williams's avatar
      2008-05-06 Dan Williams <dcbw@redhat.com> · 51503b2d
      Dan Williams authored
      	* src/dhcp-manager/nm-dhcp-manager.c
      		- (nm_dhcp_manager_get_ip4_config): clean up; update for changes to
      			NMIP4Config to support multiple IP addresses
      	* src/NetworkManagerUtils.c
      		- (nm_utils_merge_ip4_config): update for multiple IP addresses
      	* src/nm-ip4-config.c
      		- Store a list of IPv4 address/netmask/gateway tuples
      		- (nm_ip4_config_get_gateway, nm_ip4_config_set_gateway,
      		   nm_ip4_config_get_netmask, nm_ip4_config_set_netmask,
      		   nm_ip4_config_get_broadcast, nm_ip4_config_set_broadcast,
      		   nm_ip4_config_set_address): remove
      		- (nm_ip4_config_take_address, nm_ip4_config_add_address,
      		   nm_ip4_config_replace_address, nm_ip4_config_get_num_addresses):
      			new functions; handle multiple IPv4 addresses
      	* src/nm-device.c
      		- update for changes to NMIP4Config for multiple IPv4 addresses
      	* src/NetworkManagerSystem.c
      		- (nm_system_device_set_ip4_route): don't add the route if any address
      			is on the same subnet as the destination
      		- (check_one_address): ignore the exact match, just match family and
      			interface index
      		- (add_ip4_addresses): add all IPv4 addresses in an NMIP4Config to
      			an interface
      		- (nm_system_device_set_from_ip4_config): use add_ip4_addresses()
      		- (nm_system_vpn_device_set_from_ip4_config): use add_ip4_addresses()
      	* introspection/nm-ip4-config.xml
      		- Remove 'address', 'gateway', 'netmask', and 'broadcast' properties
      		- Add 'addresses' property which is an array of (uuu) tuples of
      	* libnm-util/nm-setting-ip4-config.c
      		- (set_property): use ip-address <-> GValue converters from nm-utils.c
      	* libnm-glib/nm-ip4-config.c
      		- Handle D-Bus interface changes to support multiple IP addresses
      git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3637 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
  24. 24 Mar, 2008 1 commit
    • Dan Williams's avatar
      2008-03-24 Dan Williams <dcbw@redhat.com> · 00735165
      Dan Williams authored
      	Massive fixup of libnm-glib to:
      	a) have all objects (with the exception of VPN) cache their properties and
      		update them asynchronously on PropertiesChanged signals from NM
      	b) return internal const data for most attributes/properties instead of
      		allocated values that the caller must free
      	c) cache wrapped objects such that a given D-Bus path will always map to the
      		same GObject returned by libnm-glib
      	d) remove a few signals and move them to GObject property notifications
      	e) match recent NM D-Bus API changes for activation/deactivation
      	f) remove some private functions from libnm-glib headers
      git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3491 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
  25. 09 Aug, 2007 1 commit
    • Tambet Ingo's avatar
      2007-08-09 Tambet Ingo <tambet@gmail.com> · 6a68d79c
      Tambet Ingo authored
              [Based on patch by Helmut Schaa <hschaa@suse.de>]
              * libnm-glib/nm-client.h:
              * libnm-glib/nm-object.h:
              * libnm-glib/nm-vpn-connection.h:
              * libnm-glib/nm-settings.h:
              * libnm-glib/nm-device.h:
              * libnm-glib/nm-ip4-config.h:
              * libnm-glib/nm-access-point.h:
              * libnm-glib/nm-device-802-3-ethernet.h:
              * libnm-util/nm-setting.h: 
              * libnm-util/nm-connection.h: Add G_BEGIN_DECLS / G_END_DECLS to
              * support C++.
              * libnm-glib/nm-object.c (nm_object_get_byte_property):
              * Implement.
              * libnm-glib/nm-access-point.c: Strength has type char.
              * gnome/vpn-properties/Makefile.am: Remove
              * GNOME_DISABLE_DEPRECTATED for now
              to fix build. GnomeDruid is deprecated in recent libgnomeui.
              * introspection/nm-access-point.xml: Strength property is char,
              * not int.
              * src/NetworkManagerAP.c (set_property): Set strength from char.
              (get_property): Handle hidden APs (with empty SSID).
              Get strength value from char.
              (nm_ap_class_init): Strength property has char type.
      git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2659 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
  26. 22 Jun, 2007 1 commit
    • Tambet Ingo's avatar
      2007-06-21 Tambet Ingo <tambet@ximian.com> · 636b1140
      Tambet Ingo authored
      	* libnm-glib/Makefile.am: Add NMObject to build, remove nm-utils.[ch].
      	* nm-utils.[ch]: Remove.
      	* libnm-glib/nm-object.c: Implement a base class for all libnm-glib dbus-aware
      	objects for easy property access and dbus connection handling.
      	* libnm-glib/nm-client.c: Derive from NMObject.
      	* libnm-glib/nm-device.c: Ditto.
      	* libnm-glib/nm-device-802-3-ethernet.c: Changes for being based on NMObject.
      	* libnm-glib/nm-device-802-11-wireless.c: Ditto.
      	* libnm-glib/nm-ip4-config.c: Ditto.
      	* libnm-glib/nm-access-point.c: Ditto.
      	* libnm-util/nm-connection.c (nm_connection_compare): Add a stub for connection
      	comparision. Currently used by the device activation code to determine if the new
      	activation is the same as the old one.
      	* src/nm-dbus-nmi.c (nm_dbus_get_user_key_for_network): Don't use the obsolete and
      	wrong way of getting the dbus path for AP. Fixes the issue where the applet isn't
      	able to ask password for the AP.
      	* src/nm-device.c (nm_device_activate): Change the logic here - instead of giving
      	up if the device is already connected, tear down it's connection (if it isn't the
      	same as new one) and start the activation.
      	* src/nm-manager.c: Add the beginnings of NMConnection storage and signals.
      	* src/NetworkManagerAP.c (nm_ap_init): Set the default values to AP memebers, fixes
      	the issue where all APs are always listed as encrypted.
      	* src/NetworkManagerDbus.c (nm_dbus_get_object_path_for_network): Remove. APs have
      	their own registered paths.
      	* test/nm-tool.c (detail_device): Don't try to get active network from wireless
      	device if it's not connected - dbus-glib will happily crash trying to marshal NULL.
      git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2615 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
  27. 16 Feb, 2007 1 commit
    • Tambet Ingo's avatar
      2007-02-16 Tambet Ingo <tambet@ximian.com> · c4005138
      Tambet Ingo authored
      	* introspection/nm-ip4-config.xml: Implement.
      	* libnm-glib/libnm-glib-test.c: Use new DBUS API in tests.
      	* libnm-glib/nm-ip4-config.c:
      	* libnm-glib/nm-ip4-config.c: Implement.
      	* src/nm-ap-security[-*]: Remove circular dependencies between APs and AP
      	securities. APs reference security.
      	* src/nm-device-802-11-wireless.c: Implement missing properties that need to
      	be exported over DBUS.
      	* src/nm-device-802-3-ethernet.c: Ditto.
      	* src/NetworkManagerAP.c:
      	* src/NetworkManagerAP.h:
      		- Convert to GObject, export over DBUS.
      	* src/nm-ip4-config.h:
      	* src/nm-ip4-config.h:
      		- Convert to GObject, export over DBUS.
      git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2322 4912f4e0-d625-0410-9fb7-b9a5a253dbdc