1. 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
  2. 01 Aug, 2014 4 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
      separately.)
      d0b05b34
    • 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).
      2fc55941
    • 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
    • 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/
      
      ]
      d595f784
  3. 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.
      cb7e1893
  4. 03 Apr, 2013 1 commit
  5. 27 Jul, 2012 1 commit
  6. 12 Mar, 2012 1 commit
    • Dan Winship's avatar
      Fix names of error enum values · 54ef8f32
      Dan Winship authored
      When NM was registering all of its enum types by hand, it was using
      NamesLikeThis rather than the default names-like-this for the "nick"
      values. When we switched to using glib-mkenums, this resulted in
      dbus-glib using different strings for the D-Bus error names, causing
      compatibility problems.
      
      Fix this by using glib-mkenums annotations to manually fix all the
      enum values back to what they were before. (This can't be done in a
      more automated way, because the old names aren't 100% consistent. Eg,
      "UNKNOWN" frequently becomes "UnknownError" rather than just
      "Unknown".)
      54ef8f32
  7. 15 Feb, 2012 1 commit
    • Dan Winship's avatar
      Use glib-mkenums to generate enum types · 839eab55
      Dan Winship authored
      Rather than generating enum classes by hand (and complaining in each
      file that "this should really be standard"), use glib-mkenums.
      
      Unfortunately, we need a very new version of glib-mkenums in order to
      deal with NM's naming conventions and to fix a few other bugs, so just
      import that into the source tree temporarily.
      
      Also, to simplify the use of glib-mkenums, import Makefile.glib from
      https://bugzilla.gnome.org/654395.
      
      To avoid having to run glib-mkenums for every subdirectory of src/,
      add a new "generated" directory, and put the generated enums files
      there.
      
      Finally, use Makefile.glib for marshallers too, and generate separate
      ones for libnm-glib and NetworkManager.
      839eab55
  8. 05 Jan, 2012 1 commit
  9. 19 Jul, 2011 2 commits
  10. 22 Feb, 2011 1 commit
  11. 31 Jan, 2011 1 commit
  12. 29 Jan, 2011 1 commit
    • Dan Williams's avatar
      libnm-util: add secret flags for each secret describing how the secret is stored · 5a7cf39a
      Dan Williams authored
      This allows the necessary flexibility when handling secrets; otherwise
      it wouldn't be known when NM should save secrets returned from agents
      to backing storage, or when the agents should store the secrets. We
      can't simply use lack of a secret in persistent storage as the indicator
      of this, as (for example) when creating a new connection without
      secrets the storage method would be abmiguous.
      
      At the same time, fold in "always ask" functionality for OTP tokens
      so user agents don't have to store that attribute themselves out-of-band.
      5a7cf39a
  13. 21 Jan, 2011 1 commit
  14. 30 Sep, 2009 1 commit
  15. 29 Oct, 2008 1 commit
    • Tambet Ingo's avatar
      2008-10-29 Tambet Ingo <tambet@gmail.com> · 8f6eb995
      Tambet Ingo authored
      	Half of it by Dan Williams <dcbw@redhat.com>
      
      	* libnm-util/libnm-util.ver
      	libnm-util/nm-setting-vpn.c
      	libnm-util/nm-setting-vpn.h
      		- Make properties private and add accessor functions.
      
      	* src/vpn-manager/nm-vpn-connection.c
      	src/vpn-manager/nm-vpn-manager.c
      	system-settings/plugins/keyfile/reader.c
      	vpn-daemons/openvpn/properties/auth-helpers.c
      	vpn-daemons/openvpn/properties/import-export.c
      	vpn-daemons/openvpn/properties/nm-openvpn.c
      	vpn-daemons/openvpn/src/nm-openvpn-service.c
      	vpn-daemons/pptp/auth-dialog/main.c
      	vpn-daemons/pptp/properties/advanced-dialog.c
      	vpn-daemons/pptp/properties/nm-pptp.c
      	vpn-daemons/pptp/src/nm-pptp-service.c
      	vpn-daemons/vpnc/properties/nm-vpnc.c
      	vpn-daemons/vpnc/src/nm-vpnc-service.c
      		- Use VPN setting accessors.
      
      git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@4232 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
      8f6eb995
  16. 04 Sep, 2008 1 commit
    • Dan Williams's avatar
      2008-09-04 Dan Williams <dcbw@redhat.com> · ba15ee5f
      Dan Williams authored
      	* libnm-util/nm-setting-vpn.c
      	  libnm-util/nm-setting-vpn.h
      		- Split VPN secrets from VPN data so that settings services can actually
      			figure out that they are secrets and store them accordingly
      
      	* system-settings/plugins/keyfile/nm-keyfile-connection.c
      	  system-settings/plugins/keyfile/reader.c
      	  system-settings/plugins/keyfile/reader.h
      	  system-settings/plugins/keyfile/writer.c
      		- Store VPN secrets separately from VPN data so that they can be fetched
      			on demand
      		- Implement the get_secrets() call so that (a) secrets don't leak out
      			to unprivileged callers, and (b) secrets can be sent to privileged
      			callers when needed
      
      	* vpn-daemons/vpnc/src/nm-vpnc-service.c
      		- Handle split VPN secrets
      
      
      
      git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@4031 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
      ba15ee5f
  17. 11 Aug, 2008 1 commit
  18. 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
      	  libnm-glib/nm-ip4-config.h
      		- Add 'routes' property
      
      	* libnm-util/nm-setting-vpn.c
      	  libnm-util/nm-setting-vpn.h
      		- Remove 'routes' property
      
      	* libnm-util/nm-setting-ip4-config.c
      	  libnm-util/nm-setting-ip4-config.h
      		- '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
      	  libnm-util/nm-utils.h
      		- Add helpers for marshalling IP4 routes
      
      	* src/NetworkManagerUtils.c
      		- (nm_utils_merge_ip4_config): handle property renames and new route
      			structure
      
      	* 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
      	  system-settings/plugins/ifcfg-fedora/writer.c
      		- Handle routes separately from addresses now that routes have a different
      			format
      
      	* introspection/nm-ip4-config.xml
      	  src/nm-ip4-config.c
      	  src/nm-ip4-config.h
      		- 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
      2c31b549
  19. 27 Jul, 2008 1 commit
  20. 12 Jun, 2008 1 commit
  21. 07 Nov, 2007 1 commit
    • Tambet Ingo's avatar
      2007-11-07 Tambet Ingo <tambet@gmail.com> · 6b79d40a
      Tambet Ingo authored
              Rework NMSetting structures: Move each setting to it's own file.
              Convert to GObject. Remove home grown setting types and use
      GTypes.
              Use GObject property introspection for hash conversion,
      enumerating
              properties, etc.
      
              * libnm-util/nm-setting-connection.[ch]
              * libnm-util/nm-setting-ip4-config.[ch]
              * libnm-util/nm-setting-ppp.[ch]
              * libnm-util/nm-setting-vpn.[ch]
              * libnm-util/nm-setting-vpn-properties.[ch]
              * libnm-util/nm-setting-wired.[ch]
              * libnm-util/nm-setting-wireless.[ch]
              * libnm-util/nm-setting-wireless-security.[ch]
      
              New files, each containing a setting.
      
              * libnm-util/nm-setting-template.[ch]: A template for creating
              * new
              settings. To use it, just replace 'template' with the new
      setting
              name, and you're half-way done.
      
              * libnm-util/nm-setting.c: Convert to GObject and use GObject
              introspection instead of internal types and tables.
      
              * libnm-util/nm-connection.c: Adapt the new NMSetting work.
      
              * libnm-util/nm-param-spec-specialized.[ch]: Implement. Handles
              GValue types defined by dbus-glib for composed types like
      collections,
              structures and maps.
      
              * src/*: The API of NMSetting and NMConnection changed a bit:
              * Getting
              a setting from connection takes the setting type now. Also,
      since
              the settings are in multiple files, include relevant settings.
      
      
      
      git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3068 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
      6b79d40a