summaryrefslogtreecommitdiff
path: root/src/nm-connection-provider.c
Commit message (Collapse)AuthorAgeFilesLines
* core: fix interface type namesDan Winship2015-09-101-29/+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: consistently include config.hDan Winship2014-11-131-0/+2
| | | | | | | | | | | config.h should be included from every .c file, and it should be included before any other include. Fix that. (As a side effect of how I did this, this also changes us to consistently use "config.h" rather than <config.h>. To the extent that it matters [which is not much], quotes are more correct anyway, since we're talking about a file in our own build tree, not a system include.)
* 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/+20
|
* settings: clarify ownership of objects returned from plugin's ↵Dan Williams2013-10-171-0/+14
| | | | | | | | | add_connection() hook Plugin owns the object and callers must reference it if they wish to use it outside of the function they called "add" from. Likewise, callers of the ConnectionProvider's add_connection method must also reference the returned object if they wish to continue using it.
* core: add add_connection method to NMConnectionProviderThomas Haller2013-09-251-0/+12
| | | | | | | 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/+9
| | | | | | | 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/+112