Commit graph

5 commits

Author SHA1 Message Date
Dan Winship fcfb4b40ba libnm: make use of GParamSpecFlags and GParamSpecEnum
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().
2014-10-03 09:36:28 -04:00
Dan Winship 40bb402898 libnm-core: simplify _nm_register_setting(), register error types too
Simplify the use of _nm_register_setting() by having it splice
together various symbol names itself rather than requiring them to be
specified explicitly, and extend it to also ensure that the type's
corresponding error type is registered (allowing one to find it via
g_type_from_name() if necessary).
2014-09-04 09:18:44 -04:00
Thomas Haller 25aa0a0705 libnm-core: fix crash in NMSettingAdsl:verify()
Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-08-19 00:13:11 +02:00
Dan Winship d0b05b34d5 libnm: add NetworkManager.h, disallow including individual headers
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.)
2014-08-01 14:34:40 -04:00
Dan Winship d595f7843e libnm: add libnm/libnm-core (part 1)
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/

]
2014-08-01 14:34:04 -04:00