summaryrefslogtreecommitdiff
path: root/src/nm-connection-provider.h
Commit message (Collapse)AuthorAgeFilesLines
* core: fix interface type namesDan Winship2015-09-101-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | A GObject interface, like a class, has two different C types associated with it; the type of the "class" struct (eg, GObjectClass, GFileIface), and the type of instances of that class/interface (eg, GObject, GFile). NetworkManager was doing this wrong though, and using the same C type to point to both the interface's class struct and to instances of the interface. This ends up not actually breaking anything, since for interface types, the instance type is a non-dereferenceable dummy type anyway. But it's wrong, since if, eg, NMDeviceFactory is a struct type containing members "start", "device_added", etc, then you should not be using an NMDeviceFactory* to point to an object that does not contain those members. Fix this by splitting NMDeviceFactory into NMDeviceFactoryInterface and NMDeviceFactory; by splitting NMConnectionProvider into NMConnectionProviderInterface and NMConnectionProvider; and by splitting NMSettingsPlugin into NMSettingsPluginInterface and NMSettingsPlugin; and then use the right types in the right places. As a bonus, this also lets us now use G_DEFINE_INTERFACE.
* all: make use of new header file "nm-default.h"Thomas Haller2015-08-051-2/+1
|
* all: rename nm-glib-compat.h to nm-glib.h, use everywhereDan Winship2015-07-241-1/+1
| | | | | | | | | | | | | | | | 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).
* all: fix up multiple-include-guard definesDan Winship2014-08-161-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | 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.
* core: fill in nm-types.h, clean out other headersDan Winship2014-07-231-2/+2
| | | | | | | | | | | | | | 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.
* core: add nm_connection_provider_get()Dan Williams2014-03-031-0/+7
| | | | | | | | In reality the connection provider (NMSettings) is always the same object, and some device plugins need access to it. Instead of cluttering up the device plugin API by passing the provider into every plugin regardless of whether the plugin needs it, create a getter function.
* core: remove useless NMSettings::connections-loaded signalDan Winship2014-01-231-17/+0
| | | | | | | | NMSettings (and NMConnectionProvider) had a signal to indicate when it had loaded the connections, but in reality this always happened before nm_settings_new() returned (as a side effect of calling unmanaged_specs_changed()) and so no one else would ever actually see the signal. So just kill it.
* core: add nm_connection_provider_get_connection_by_uuid()Dan Williams2013-11-081-0/+6
|
* core: add add_connection method to NMConnectionProviderThomas Haller2013-09-251-0/+20
| | | | | | | This exposes the functionality of nm_settings_add_connection to the users of NMConnectionProvider. Signed-off-by: Thomas Haller <thaller@redhat.com>
* core: add has_connections_loaded method to NMConnectionProviderThomas Haller2013-09-251-0/+14
| | | | | | | This method returns true, if the connections are already loaded (and the connection_loaded signal already emited). Signed-off-by: Thomas Haller <thaller@redhat.com>
* core: move connection provider interface to src/Dan Williams2012-05-171-0/+106