summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* TMPth/libnm-vpn-plugin-bgo749877Thomas Haller2015-07-291-0/+3
|
* libnm/vpn: add annotations for new NMVpnServicePlugin APIThomas Haller2015-07-292-2/+42
|
* libnm/vpn: deprecated NMVpnPluginOldThomas Haller2015-07-292-7/+43
| | | | | | | In hindsight, the NMVpnPluginOld should never have made public for nm-1-0 as there are no users and we don't want to support this API. For now, just deprecate it.
* libnm/vpn: add new NMVpnServicePlugin classThomas Haller2015-07-296-249/+250
| | | | | | | | | | | | | | 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
* libnm/vpn: copy 'nm-vpn-plugin-old' files to 'nm-vpn-service-plugin'Thomas Haller2015-07-292-0/+1335
| | | | | | | Files are yet unchanged, only copy them to get a nicer history. /bin/cp libnm/nm-vpn-plugin-old.c libnm/nm-vpn-service-plugin.c /bin/cp libnm/nm-vpn-plugin-old.h libnm/nm-vpn-service-plugin.h
* tui: use NMVpnPluginInfo in vpn-helper.cThomas Haller2015-07-292-132/+28
| | | | | | vpn-helper.c is currently not yet used. It was added for future VPN support for nmtui. Refactor it to make use of the new vpn helper functions in libnm.
* vpn: refactor vpn-manager to use NMVpnPluginInfoThomas Haller2015-07-293-177/+155
| | | | | | | | | | Use NMVpnPluginInfo to load the plugins in NMVpnManager. This has the advantage of reusing the code from libnm to use the same approach to read the plugin config files. Another advantage is that we now check the file permissions of the config file.
* libnm: add load method to NMVpnPluginInfoThomas Haller2015-07-293-0/+135
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=749877
* libnm: add nm_vpn_editor_plugin_load_from_file() functionThomas Haller2015-07-294-0/+159
|
* libnm: add _nm_utils_check_module_file()Thomas Haller2015-07-292-0/+90
|
* libnm: move NMVpnEditorPlugin to libnm-core/Thomas Haller2015-07-297-98/+166
| | | | | | | | | | | | | | | | | Split the content of libnm/nm-vpn-editor-plugin.h and move NMVpnEditorPlugin to libnm-core/nm-vpn-editor-plugin.h. VPN plugins allow us to extend functionality about VPNs. This can be also useful for NetworkManager core, hence move that part to libnm-core. The name NMVpnEditorPlugin is slightly misleading but not completely wrong. The "editor" part stands no longer for bringing nm-applet functionality (alone), but enable general VPN functionality in the client. Especially because we already have NMVpnPluginOld with a different meaning (i.e. a base class of the plugin server implementation).
* libnm: add NMVpnPluginInfo classThomas Haller2015-07-299-2/+1044
| | | | | | | | | | | | | | | | | | NMVpnPluginInfo is little more then a wrapper around the GKeyFile that describes the VPN plugin settings, i.e. the name files under "/etc/NetworkManager/VPN/". Add this class to make the VPN API more explicit. Clients now can use NMVpnPluginInfo instead of concerning themselves with loading the keyfile and the meaning of its properties. Also add support for a new VPN plugins directory "/usr/lib/NetworkManager/VPN", which should replace "/etc/NetworkManager/VPN" in the future. But we have to consider both locations for backward compatibility. The content of the VPN directory is not user configuration, hence it should not be under "/etc". See related bug 738853.
* libnm: add _nm_utils_check_file() utilThomas Haller2015-07-293-0/+82
|
* libnm: add NMUtilsStrStrDictKey utilityThomas Haller2015-07-293-0/+158
| | | | | | | | | | | | | | | | | | | | | | When having a hash-of-hashes where each hash is indexed by a name, (such as GKeyFile), you can either implement it as a hash-of-hashes or define your own version of indexes that pack both levels of names into one key. This is an implementation of such a key. Use it as: GHashTable *hash = g_hash_table_new_full (_nm_utils_strstrdictkey_hash, _nm_utils_strstrdictkey_equal, g_free, _destroy_value); and create keys via: NMUtilsStrStrDictKey *k = _nm_utils_strstrdictkey_create (s1, s2); For lookup you can use static strings (note that the static string might increase the size of the binary): g_hash_table_contains (hash, _nm_utils_strstrdictkey_static ("outer", "inner"))
* libnm: NMVpnPluginOld fixesJiří Klimeš2015-07-291-21/+32
| | | | | | Change a{ss} to a{sv} because not all values are strings and never were. https://bugzilla.gnome.org/show_bug.cgi?id=749686
* wwan: trivial: fix typos in error stringsBeniamino Galvani2015-07-291-2/+2
| | | | Reported-by: m.manico@gmx.at
* libnm-glib: add libnm compat defines to nm-vpn-plugin-ui-interface.hDan Winship2015-07-252-0/+50
| | | | | | | | Add a bunch of compat defines to nm-vpn-plugin-ui-interface.h, to make it easier to compile the same code against libnm-glib's NMVpnPluginUiInterface and libnm's NMVpnEditorPlugin. https://bugzilla.gnome.org/show_bug.cgi?id=752500
* all: merge branch 'pre-gdbus-bgo622927'Dan Winship2015-07-24396-2407/+1998
|\ | | | | | | | | | | Misc pre-gdbus-port stuff https://bugzilla.gnome.org/show_bug.cgi?id=622927
| * core: rename NMDBusManager to NMBusManagerDan Winship2015-07-2417-327/+319
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Our gdbus generated types use the same names as their corresponding "real" types, but with "NM" changed to "NMDBus". Unfortunately, that means that introspection/nmdbus-manager.c (the generated type for src/nm-manager.c) uses the same type name as the entirely unrelated src/nm-dbus-manager.c. Fix this by removing the "d" from src/nm-dbus-manager.c. (We could rename the generated type instead, but then it becomes inconsistent with all the other generated types, and we're already using it as "NMDBusManager" in libnm/nm-manager.c.)
| * settings: fix/reorganize NMSettingConnection secrets codeDan Winship2015-07-241-36/+71
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | NMSettingConnection's for_each_secret() function works in a slightly-too-GHashTable-specific way. Reorganize the code now to make the change to GVariants easier later. Also, fix a few bugs: - In the (unlikely) case of a non-secret being stored in vpn.secrets, we were treating it as though it was a secret with flags NONE. - The code was comparing against NONE when it meant !AGENT_OWNED in a few places. (With the current set of NMSettingSecretFlags values, this worked, but in the future it might not.) - In some cases we never called for_each_secret() with the @remove_non_secrets flag, meaning we might have ended up passing non-secrets to other code.
| * settings: rework NMSecretAgent disconnection detectionDan Winship2015-07-243-41/+69
| | | | | | | | | | | | Have NMSecretAgent emit "disconnected" when it detects that it has been disconnected, rather than having both the agent and the agent manager monitor it separately.
| * bluetooth, vpn-manager: use GDBusProxies to monitor servicesDan Winship2015-07-243-106/+81
| | | | | | | | | | | | Create a GDBusProxy for the service to be monitored and use that to tell whether it is running, rather than using NMDBusManager and the global NameOwnerChanged signal.
| * core: port NMDhcp4Config/NMDhcp6Config to GVariantDan Winship2015-07-246-182/+94
| | | | | | | | | | | | | | | | | | | | | | | | | | | | In the gdbus port, the :options properties will be GVariant-valued (and thus immutable), so having APIs that let you repeatedly modify them would make things complicated. Since we actually only ever set all the options at once, just change the APIs to do that, rather than setting the options one-by-one. Since nm-dispatcher already works in terms of GVariant, it makes things simpler there if NMDhcp[46]Config can return its options as a GVariant. And since we'll need it to be a GVariant internally later anyway, just port everything to GVariant now, and convert it to a GHashTable for dbus-glib only in get_property().
| * core: move D-Bus export/unexport into NMExportedObjectDan Winship2015-07-2441-349/+304
| | | | | | | | | | | | | | | | | | | | | | Move D-Bus export/unexport handling into NMExportedObject and remove type-specific export/get_path methods (export paths are now specified at the class level, and NMExportedObject handles the counters for all exported types automatically). Since all exportable objects now use the same get_path() method, we can also add some helper methods to simplify get_property() implementations for object-path and object-path-array properties.
| * core: add an NMExportedObject base classDan Winship2015-07-2456-515/+399
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add NMExportedObject, make it the base class of all D-Bus-exported types, and move the nm-properties-changed-signal logic into it. (Also, make NMSettings use the same properties-changed code as everything else, which it was not previously doing, presumably for historical reasons). (This is mostly just shuffling code around at this point, but NMExportedObject will be more important in the gdbus port, since gdbus-codegen doesn't do a very good job of supporting objects that export multiple interfaces [as each NMDevice subclass does, for example], so we will need more glue/helper code in NMExportedObject then.)
| * core: add missing g_dbus_error_strip_remote_error() callsDan Winship2015-07-249-10/+34
| |
| * libnm-glib: drop private bus supportDan Winship2015-07-247-210/+106
| | | | | | | | | | Anything that actually *needs* private bus support will be built against libnm these days anyway.
| * all: rename nm-glib-compat.h to nm-glib.h, use everywhereDan Winship2015-07-24370-562/+374
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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).
| * include: add nm-dbus-compat.hDan Winship2015-07-2414-40/+107
| | | | | | | | | | | | | | | | | | Add a file containing the defines like DBUS_INTERFACE_DBUS from dbus-shared.h, and use it from the gdbus-using files. Also, convert a bunch of other places that were previously hardcoding the string values to use the defines instead, and fix the ifcfg-rh plugin to properly namespace its own D-Bus-related defines.
| * ppp-manager: trivial: move class_init functionDan Winship2015-07-241-62/+62
| |
| * introspection: trivial fixesDan Winship2015-07-244-0/+11
|/ | | | | | Add some missing files to libnmdbus.la. Add missing name-fixing annotations to the XML to make all generated NMDBus types match the names of their corresponding NM types.
* core: move NM_DEFINE_SINGLETON macros to src/NetworkManagerUtils.hThomas Haller2015-07-247-58/+65
| | | | | NM_DEFINE_SINGLETON is used only by core and makes use of nm-logging. It does not belong to "include/nm-macros-internal.h". Move it to "src/".
* Revert "core: move NM_DEFINE_SINGLETON macros to src/NetworkManagerUtils.h"Thomas Haller2015-07-242-60/+58
| | | | | | This reverts commit 1bca45986561ab6fa6ca3e624ef9ac84d98cdce9. I accidentely pushed that commit. Revert.
* libnm-core: fix return value in nm_utils_enum_to_str()Thomas Haller2015-07-241-2/+2
| | | | Fixes: 8be981479366f8caeb494471742e5c801a52cfa2
* core: move NM_DEFINE_SINGLETON macros to src/NetworkManagerUtils.hThomas Haller2015-07-242-58/+60
| | | | | NM_DEFINE_SINGLETON is used only by core and makes use of nm-logging. It does not belong to "include/nm-macros-internal.h". Move it to "src/".
* merge: ethernet: add Wake-on-LAN supportBeniamino Galvani2015-07-2419-3/+824
|\ | | | | | | | | | | | | Add support for configuring Wake-on-LAN options for Ethernet connections. https://bugzilla.redhat.com/show_bug.cgi?id=1141417
| * core: configure Wake-on-LAN parameters for Ethernet devicesBeniamino Galvani2015-07-243-0/+79
| |
| * cli: add support for Wake-on-LAN settingsBeniamino Galvani2015-07-241-1/+62
| |
| * ifcfg-rh: add support for Wake-on-LAN ethtool optionsBeniamino Galvani2015-07-245-1/+255
| | | | | | | | Based on branch danw/wip/ethtool by Dan Winship <danw@redhat.com>
| * libnm-core: add Wake-on-LAN properties to NMSettingWiredBeniamino Galvani2015-07-245-0/+164
| |
| * libnm-core: add enum conversion utilitiesBeniamino Galvani2015-07-247-1/+264
|/ | | | | | | 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.
* po: update Swedish (sv) translation (bgo #752725)Josef Andersson2015-07-241-1689/+2360
| | | | https://bugzilla.gnome.org/show_bug.cgi?id=752725
* keyfile: merge branch 'th/keyfile-write-connection-bgo740738'Thomas Haller2015-07-2410-39/+85
|\ | | | | | | https://bugzilla.gnome.org/show_bug.cgi?id=740738
| * keyfile: rename keyfile when user changes connection idThomas Haller2015-07-2410-11/+39
| | | | | | | | | | | | | | | | | | | | | | | | Originally, if you change the ID of a connection, the existing keyfile will not be renamed. That means after renaming a connection, it's keyfile name will mismatch. Now, when th user modifies a connection via D-Bus and changes the connection it, rename the file. https://bugzilla.gnome.org/show_bug.cgi?id=740738
| * keyfile: cleanup error messages in _internal_write_connection()Thomas Haller2015-07-241-5/+8
| | | | | | | | | | | | | | A GError should contain a nice, human readable error message. The file:line prefix looks ugly. Also, the error messages are already systemwide unique. So a user can easily grep for them and locate the origin.
| * keyfile: refactor return paths in _internal_write_connection()Thomas Haller2015-07-241-24/+19
| |
| * keyfile: add info logging when updating connectionThomas Haller2015-07-241-2/+20
| |
| * keyfile: fix memleak of path in commit_changes()Thomas Haller2015-07-241-1/+3
|/
* core: fix handling route-metric for nm_ip4_config_merge()Thomas Haller2015-07-222-2/+2
| | | | Fixes: bc75cd53a8c5ba525016bfddc1644be59a45ed41
* libnm: backport symbols for metered connections support to 1.0.6Beniamino Galvani2015-07-223-0/+14
| | | | | | | Backport to 1.0.6 the following symbols: - nm_device_get_metered - nm_metered_get_type - nm_setting_connection_get_metered