Commit graph

138 commits

Author SHA1 Message Date
Thomas Haller d61875c960 libnm: add internal header file "nm-core-types-internal.h"
This shall contain type definitions, with similar use
to "nm-core-internal.h".

However, it should contain a minimal set, so that we can include this
header in other headers under "src/", without including the whole
"nm-core-internal.h" in headers.
2015-11-02 13:57:02 +01:00
Thomas Haller 7bf10a75db build: extract version macros from "nm-version.h" to new header file "nm-version-macros.h"
For libnm library, "nm-dbus-interface.h" contains defines like the D-Bus
paths of NetworkManager. It is desirable to have this header usable without
having a dependency on "glib.h", for example for a QT application. For that,
commit c0852964a8 removed that dependancy.

For libnm-glib library, the analog to "nm-dbus-interface.h" is
"NetworkManager.h", and the same applies there. Commit
159e827a72 removed that include.
However, that broke build on PackageKit [1] which expected to get the
version macros by including "NetworkManager.h". So at least for libnm-glib,
we need to preserve old behavior so that a user including
"NetworkManager.h" gets the version macros, but not "glib.h".

Extract the version macros to a new header file "nm-version-macros.h".
This header doesn't include "glib.h" and can be included from
"NetworkManager.h". This gives as previous behavior and a glib-free
include.

For libnm we still don't include "nm-version-macros.h" to "nm-dbus-interface.h".
Very few users will actually need the version macros, but not using
libnm.
Users that use libnm, should just include (libnm's) "NetworkManager.h" to
get all headers.
As a special case, a user who doesn't want to use glib/libnm, but still
needs both "nm-dbus-interface.h" and "nm-version-macros.h", can include
them both separately.

[1] https://github.com/hughsie/PackageKit/issues/85

Fixes: 4545a7fe96
2015-09-30 23:10:29 +02:00
Dan Winship 753e81d21f build: make libnm-util/libnm-glib optional
Add --without-libnm-glib, for people who don't want to build the
legacy client libraries. When building with this option, dbus-glib and
libdbus are not required.
2015-08-10 09:41:26 -04:00
Thomas Haller 867227dd4a libnm/vpn: add new NMVpnServicePlugin class
After copying "nm-vpn-plugin-old.*" to "nm-vpn-service-plugin.*",
rename the class and add it to the Makefile.

This will become the new VPN Service API for libnm 1.2. No changes
done yet except renaming of the classes and functions.

Rename the previous classes NMVpnPlugin(Old) to NMVpnServicePlugin
to have a distinct name from NMVpnEditorPlugin. Buth are plugins, but
with a different use.

https://bugzilla.gnome.org/show_bug.cgi?id=749951
2015-07-29 22:34:35 +02:00
Beniamino Galvani 8be9814793 libnm-core: add enum conversion utilities
Add functions nm_utils_enum_to_str() and nm_utils_enum_from_str()
which can be used to perform conversions between enum values and
strings, passing the GType automatically generated for every enum by
glib-mkenums.
2015-07-24 14:02:59 +02:00
Dan Winship 721e917cb6 wimax: drop WiMAX support (bgo #747846)
Even Fedora is no longer shipping the WiMAX SDK, so it's likely we'll
eventually accidentally break some of the code in src/devices/wimax/
(if we haven't already). Discussion on the list showed a consensus for
dropping support for WiMAX.

So, remove the SDK checks from configure.ac, remove the WiMAX device
plugin and associated manager support, and deprecate all the APIs.

For compatibility reasons, it is still possible to create and save
WiMAX connections, to toggle the software WiMAX rfkill state, and to
change the "WIMAX" log level, although none of these have any effect,
since no NMDeviceWimax will ever be created.

nmcli was only compiling in support for most WiMAX operations when NM
as a whole was built with WiMAX support, so that code has been removed
now as well. (It is still possible to use nmcli to create and edit
WiMAX connections, but those connections will never be activatable.)
2015-04-17 12:42:23 -04:00
You-Sheng Yang 738649c1d5 docs: fix out-of-tree build
When compiling NetworkManager with --enable-gtk-doc outside the
source tree, the generated documents are slightly different from
those generated in tree. This patch fixes that missed COPYING file in
$(top_builddir) and adds $(top_builddir)/libnm-util to DOC_SOURCE_DIR.

https://bugzilla.gnome.org/show_bug.cgi?id=742139

Signed-off-by: You-Sheng Yang <vicamo@gmail.com>
2015-01-03 13:12:44 +01:00
Dan Winship 2d29c0527e docs: misc small fixes
Cleans up all of the warnings that aren't overly annoying to clean up.
2014-12-18 13:47:03 -05:00
Dan Winship 71b4c05fca libnm: rename NMSecretAgent to NMSecretAgentOld
As with NMVpnPluginOld, rename NMSecretAgent to NMSecretAgentOld, to
leave the name "NMSecretAgent" open for a new-and-improved version in
NM 1.2.
2014-11-21 12:17:41 -05:00
Dan Winship c7341c982d man, docs: add the secret flags notes non-hackishly
Since libnm-core secret-flags properties are now enum-typed rather
than just being uints, we can now actually recognize them when
generating docs, rather than just assuming that every property whose
name ends in '-flags', but isn't in NMSettingDcb, is a secret-flags
property.
2014-11-19 09:24:10 -05:00
Dan Winship c14486984e libnm, libnm-util: move settings doc generation to libnm-core
Move the settings/plugins doc generation from libnm-util to
libnm-core, since libnm-util isn't being updated for all new
properties.

With this commit, the keyfile and ifcfg-rh documentation is basically
unchanged, except that deprecated properties are now gone, and new
properties have been added, and the sections are in a different order.
(generate-plugin-docs.pl just outputs the settings in Makefile order,
and they were unsorted in libnm-util, but are sorted in libnm-core).

The settings documentation used for nm-settings.5, the D-Bus API docs,
and the nmcli help is changed a bit more at this point, and mostly for
the worse, since the libnm-core setting properties don't match up with
the D-Bus API as well as the libnm-util ones do. To be fixed...

(I also removed the "plugins docs" line in each plugin docs comment
block while moving them, since those blocks will be used for more than
just plugins soon, and it's sort of obvious anyway.)
2014-11-19 09:24:09 -05:00
Dan Winship 16a9fc49dd docs: make the settings docs work from tarball builds
docs/api/settings-spec.xml was accidentally not getting disted,
because gtk-doc.make explicitly removes all DISTCLEANFILES from
distdir. However, it doesn't actually make sense for the settings docs
files to be in DISTCLEANFILES anyway; they were put there rather than
CLEANFILES (IIRC) so that "make clean" in a tarball build wouldn't
delete them and break things. But the right fix is to just make them
only be in CLEANFILES when BUILD_SETTING_DOCS is true, and not ever
get deleted otherwise.

Also adjust the build rules to ensure that the generated docs don't
get rebuilt in tarball builds, since that can cause problems when
building from a read-only source tree, etc.

Meanwhile, in an unrelated but also fatal bug, configure.ac's check
for if the generated docs were already present never got updated for
the cli/src -> clients/cli move, and so even if we had been disting
settings-spec.xml, configure would still think that the tarball didn't
have all of the generated docs in it, so SETTING_DOCS_AVAILABLE would
be set false and none of the generated docs would get used.

https://bugzilla.gnome.org/show_bug.cgi?id=740035
2014-11-14 17:14:18 -05:00
Dan Winship 2728b57240 docs: fix libnm docs out-of-tree build 2014-11-07 15:46:46 -05:00
Dan Winship cbabd13581 libnm, docs: docs fixes
Update the docs build to include and exclude the correct files.

Fill in some missing documentation, and fix problems in the existing
docs. (In particular, "<" can't appear as a literal in documentation,
so change it to "&lt;". Also, "PKCS#12" has to be written as
"PKCS#<!-- -->12", or gtk-doc will think "#12" is a reference to a
type named "12".)
2014-11-07 13:16:54 -05:00
Dan Winship ca18b2d442 libnm: create NMDhcpConfig as parent of NMDhcp4Config and NMDhcp6Config
As with NMIP4Config and NMIP6Config, merge the two DHCP config classes
into one in the public API.
2014-11-07 07:49:40 -05:00
Dan Winship d34910b128 libnm: create NMIPConfig as parent of NMIP4Config and NMIP6Config
Create NMIPConfig as the parent of NMIP4Config and NMIP6Config, and
remove the two subclasses from the public API; while it's convenient
to still have both internally, they are now identical to the outside
world.
2014-11-07 07:49:40 -05:00
Dan Winship 21c8a6b20e libnm-core, all: merge IPv4 and IPv6 address/route types
Merge NMIP4Address and NMIP6Address into NMIPAddress, and NMIP4Route
and NMIP6Route into NMIPRoute. The new types represent IP addresses as
strings, rather than in binary, and so are address-family agnostic.
2014-11-07 07:49:40 -05:00
Thomas Haller b0e29b5bd3 doc: fix IGNORE_HFILES in libnm-glib
nm-dbus-helpers-private.h is a private header file to libnm-glib/.

nm-settings-connection-glue.h and nm-settings-glue.h are not part
of libnm-glib/, they are inside src/.

Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-10-31 18:59:33 +01:00
Thomas Haller 8b64b8012b doc: fix IGNORE_HFILES referencing non-existing *-bindings.h files
Fixes: 8ad3ff24ad
Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-10-31 18:59:33 +01:00
Dan Winship f452606020 libnm: rename NMVpnPlugin to NMVpnPluginOld
Rename libnm's NMVpnPlugin to NMVpnPluginOld, in preparation for
having a new-and-improved NMVpnPlugin in NM 1.2. Also remove it from
NM-1.0.gir.

Make nm-vpn-plugin-old.h be separately includable, since it's not
included from NetworkManager.h, and we probably don't want it to be.

Remove NMVpnPlugin, NMVpnPluginUiInterface, and nm-vpn-plugin-utils
from the docs, since they're basically undocumented anyway.
2014-10-28 14:50:27 -04:00
Dan Winship 6f3d1f9526 libnm: merge NMRemoteSettings into NMClient
Make NMRemoteSettings internal and have NMClient wrap all of its APIs,
just like it does with NMManager.
2014-10-10 12:40:19 -04:00
Dan Winship 6793a32a8c libnm: port to GDBus
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).
2014-09-18 11:51:09 -04:00
Dan Winship acf86f68b3 libnm-core: change connection hash tables to variants in API
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.
2014-09-18 11:51:09 -04:00
Dan Winship 280b1e5067 libnm: merge libnm-vpn into libnm
There's not much point in keeping them separate: all existing
libnm-glib-vpn users also link against libnm-glib, and the amount of
extra code added to libnm by merging in libnm-vpn is negligible.

Additionally, nm-vpn-plugin will later need access to some
libnm-internal APIs.

So, merge them together.
2014-09-18 11:51:07 -04:00
Dan Winship 98959d5432 libnm: fix NMIP4Config/NMIP6Config addresses/routes properties
The docs for NMIP4Config:addresses and NMIP4Config:routes claimed that
they were GPtrArrays of NMIP4Address/NMIP4Route, but get_property()
was actually trying to set them the D-Bus representation type, and it
was failing anyway because it used g_value_set_boxed() on a parameter
that was declared GParamSpecPointer. Fix it to use a GPtrArray-valued
property, and set it to the right thing.

NMIP6Config did the right thing with its :addresses and :routes
properties, but was using custom types (NM_TYPE_IP6_ADDRESS_OBJECT_ARRAY and
NM_TYPE_IP6_ROUTE_OBJECT_ARRAY). Make it use G_TYPE_PTR_ARRAY instead.

nm-types.c, nm-types.h, and nm-types-private.h are now empty, and so
can be dropped.
2014-09-04 09:21:05 -04:00
Thomas Haller ef32da01fa all: add nm-core-internal.h header
Add a header file to expose private utility functions from libnm-core
that can be used by NetworkManager (core) and libnm.so. The header
is also used to give privileged access to libnm-core. Since NM links
statically, these functions are not exported and not part of public ABI.

This also removes the NM_UTILS_PRIVATE_CALL() macro and libnm.so no
longer exports nm_utils_get_private().

Before, this functionality was partly declared in nm-utils-private.h.
This was wrong because nm-utils-private.h is for functionality
entirely private to libnm-core.

Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-08-22 15:22:16 +02:00
Dan Winship c5daa4c4df docs: add libnm documentation
Add docs infrastructure
2014-08-01 14:34:05 -04:00
Dan Winship 7eb0288aa0 libnm-util: move NetworkManager.h, etc, from include/ to here
NetworkManager.h, NetworkManagerVPN.h, and nm-version.h are part of
the libnm-util API, so move them to libnm-util.

include/ still contains headers that are strictly NM-internal (eg,
nm-glib-compat.h).
2014-07-15 09:44:54 -04:00
Dan Williams ca2e2a7ec8 docs: ignore a private header 2014-07-01 15:47:59 -05:00
Dan Winship 377f72a66f build: fix nm-setting-docs build in various configurations
Certain build configurations (like --enable-gtk-doc
--disable-introspection) were broken with respect to nm-setting-docs.
Fix this. Also, we don't require just gobject-introspection, we need
pygobject specifically as well.
2014-06-27 17:24:57 -04:00
Dan Winship cceb773510 docs: generate settings-spec.xml from libnm-util/nm-setting-docs.xml
Generate docs/api/settings-spec.xml via an XSLT stylesheet applied to
libnm-util/nm-setting-docs.xml.
2014-06-19 17:45:02 -04:00
Dan Williams 454cc0a168 docs: ignore private nm-test-utils.h header 2014-05-13 13:49:50 -05:00
Dan Winship 9c4d86ee80 libnm-util, libnm-glib: add versioned deprecation/availability macros
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.)

Add NM_VERSION_MIN_REQUIRED and NM_VERSION_MAX_ALLOWED macros which
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
NM_VERSION_MAX_ALLOWED to NM_VERSION_NEXT_STABLE to ensure that it is
always allowed to use all APIs.
2014-02-13 11:24:37 -05:00
William Jon McCann 74372f9f11 docs: update documentation links
Various GNOME services moved around so links need updating.
2013-12-17 12:07:51 -06:00
Dan Williams 6a3672ec9a docs: update for Team and Generic devices 2013-11-07 16:58:29 -06:00
Dan Williams 77e50740a8 libnm-util: add Data Center Bridging (DCB) setting
Includes various fixes & cleanups from Thomas Haller.
2013-10-31 13:28:42 -05:00
Yuri Chornoivan 61de24ba35 Fix typos
https://bugzilla.gnome.org/show_bug.cgi?id=710505
2013-10-19 11:49:18 -04:00
Dan Williams a9b9330bed build: fix builddir != srcdir when building D-Bus API spec HTML 2013-08-29 13:43:03 -05:00
Dan Williams 3a5bf0517c build: always generate docs at dist time (bgo #700093)
dist tarballs shouldn't ever be released without the documentation,
and this allows us to build the tarballs with pre-generated docs
that get installed on the end system, but don't need to be built
there.  So the end system doesn't need gtk-doc installed, only
the dist system does.

https://bugzilla.gnome.org/show_bug.cgi?id=700093
2013-05-14 10:53:46 -05:00
Jiří Klimeš 76b5e24ac9 build: fix build with --enable-doc (docs/api/Makefile.am)
"./autogen.sh --enable-doc && make" produced this error:
warning: failed to load external entity "../settings-spec.xml"
../network-manager-docs.xml:57: element include: XInclude error : could not load ../settings-spec.xml, and no fallback was found

Removing settings-spec.xml from $(content_files) made the file non-DISTed but it
also removed the file as a dependency for html-build.stamp that also runs
cd html && gtkdoc-mkhtml $$mkhtml_options $(MKHTML_OPTIONS) $(DOC_MODULE) ../$(DOC_MAIN_SGML_FILE)
and $(DOC_MAIN_SGML_FILE) includes settings-spec.xml.

Fix that by making $(DOC_MAIN_SGML_FILE) dependent on setting-spec.xml.
2013-02-12 17:25:20 +01:00
Dan Williams a78d66bb38 build: fix distcheck when building settings specification XML
The generated settings-spec.xml should not be DIST-ed because it's
regenerated every time libnm-util changes.  That meants it gets
rebuilt during 'make' even from a dist tarball.  Thus, it shouldn't
be part of the dist tarball itself.

In addition, settings-spec.html shouldn't be included in
$(content_files) becuase this is added to EXTRA_DIST by gtk-doc.make.

Since generate-settings-spec.c the move from docs/api/ to tools/,
this started breaking distcheck even though the original Makefile
rules were wrong too.
2013-02-05 15:26:05 -06:00
Jiří Klimeš 2981953e47 tools: move generate-settings-spec to tools 2013-02-05 18:25:03 +01:00
Jiří Klimeš 029e613288 docs: generate refentry xml in addition to Docbook book xml for settings-spec
The refentry xml is used to generate manual page with settings description.

The invocation is:
generate-settings-spec <type> <output file> [<type> <output file>]
where <type> is  "book" or "refentry"
2013-02-05 18:22:33 +01:00
Jiří Klimeš c43772a854 docs: add ADSL setting to API specs 2013-01-15 12:10:10 +01:00
Thomas Graf cfff5a63d9 bridge: add bridge device type
This adds a new device type 'bridge'. Kernel devices are created
on demand.
2012-11-30 13:21:51 -06:00
Dan Williams d723457ac7 libnm-util: add NMSettingBridgePort 2012-11-30 13:21:50 -06:00
Dan Williams 8ecded9a9b libnm-util: add NMSettingBridge 2012-11-30 13:21:50 -06:00
Pavel Šimerda 1b0b943663 build: clean all files on 'make distclean' 2012-11-13 23:13:25 +01:00
Pavel Šimerda 04297230e6 build: fix gtk-doc srcdir != builddir issues 2012-11-13 22:39:53 +01:00
Pavel Šimerda e6d1fc8755 build: fix more srcdir != builddir issues 2012-11-13 22:00:28 +01:00