Add new Reload D-Bus command to reload NetworkManager configuration.
For now, this is like sending SIGHUP to the process. There are several
advantages here:
- it is guarded via PolicyKit authentication while signals
can only be sent by root.
- the user can wait for the reload to be complete instead of sending
an asynchronous signal. For now, we operation completes after
nm_config_reload() returns, but later we could delay the response
further until specific parts are fully reloaded.
- SIGHUP reloads everything including re-reading configuration from
disk while SIGUSR1 reloads just certain parts such as writing out DNS
configuration anew.
Now, the Reload command has a flags argument which is more granular
in selecting parts which are to be reloaded. For example, via
signals the user can:
1) send SIGUSR1: this writes out the DNS configuration to
resolv.conf and possibly reloads other parts without
re-reading configuration and without restarting the DNS plugin.
2) send SIGHUP: this reloads configuration from disk,
writes out resolv.conf and restarts the DNS plugin.
There is no way, to only restart the DNS plugin without also reloading
everything else.
- Remove list of authors from files that had them; these serve no
purpose except to quickly get out of date (and were only used in
libnm-util and not libnm-glib anyway).
- Just say "Copyright", not "(C) Copyright" or "Copyright (C)"
- Put copyright statement after the license, not before
- Remove "NetworkManager - Network link manager" from the few files
that contained it, and "libnm_glib -- Access network status &
information from glib applications" from the many files that
contained it.
- Remove vim modeline from nm-device-olpc-mesh.[ch], add emacs modeline
to files that were missing it.
We made the UIs consistent last year, but missed the documentation.
Fix the docs to also consistently use "Wi-Fi" rather than "WiFi",
"Wifi", "wifi", or "WiFI"; "Ethernet" rather than "ethernet"; and
"InfiniBand" rather than "Infiniband".
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.
Though the client shouldn't be calling anything when NM isn't running
(because clients have nm_client_get_manager_running()), make sure
that NMClient never calls a NetworkManager method when NM isn't
on the bus.
Next, ensure NMObject doesn't try to refresh properties when NM isn't
running. Creating an NMClient may trigger a property refresh request,
but if NM isn't running, defer that until NM starts, to ensure that
we don't D-Bus autostart NM.
Third, ensure NMRemoteSettings doesn't attempt to list connections
unless NM is running.
This prevents service activation of NetworkManager in lieu of dbus-glib
learning about DBUS_HEADER_FLAG_NO_AUTO_START.
To make the API more consistent, instead of returning an
ActiveConnection object path, return the actual NMActiveConnection
object itself. Suggested by Matthias Clasen.
This policy will allow users to modify their personal connections (ie
maybe VPN connections, etc) distinctly from system-wide connections that
affect more than just their user. It makes sense to be more lenient when
making changes to settings that don't affect other users.
Meaning stays the same, but this will allow us to differentiate
in the future between personal connections (ie, just visible to
one user) and system connections (visible to more than one user).
Moves the system settings permissions checking into the core service's
permissions checking, which at the same time enables 3-way permission
reporting (yes, no, auth) instead of the old yes/no that we had for
system settings permissions before. This allows UI to show a lock
icon or such when the user could authenticate to gain the permission.
It also moves the wifi-create permissions' namespace to the main
namespace (not .settings) since they really should be checked before
starting a shared wifi connection, rather than having anything to do
with the settings service.
Since forever we've used sleep/wake as the way to implement
Networking Enabled. When the state file was introduced to make the
networking and wifi states persistent, we ran into a bug where
a failed suspend (like if the machine ran out of power while
suspended) would result in networking being disabled on reboot
since suspend/resume used the same knob as enable/disable.
This patch adds a distinct call for enable/disable networking
which changes the state file, while sleep/wake no longer change
the state file.
* libnm-glib/nm-client.c
libnm-glib/nm-client.h
- (activate_cb): pass the new active connection to callback; fix
message when no callback is specified
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3518 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
* nm-object.c
- (nm_object_queue_notify): don't notify multiple times for the same
property
* nm-object-private.h
- (handle_ptr_array_return): return NULL if the given array is NULL or
if it has zero elements
* nm-ip4-config.c
- (finalize): use g_ptr_array_foreach() when freeing domains
- (nm_ip4_config_get_domains): use handle_ptr_array_return()
* nm-active-connection.c
- (nm_active_connection_get_devices): use handle_ptr_array_return()
* nm-device-802-11-wireless.c
nm-device-802-11-wireless.h
- (nm_device_802_11_wireless_get_access_points): return const; use
handle_ptr_array_return()
* nm-types.c
- (nm_object_array_demarshal): always create an array, even of length
zero, to distinguish between "NM returned no items" and "haven't
asked NM yet"
* nm-client.c
- (dispose): free active connections too
- (proxy_name_owner_changed): free active connections too when NM goes
away
- (nm_client_get_devices): return const; use handle_ptr_array_return()
- (nm_client_get_active_connections): use handle_ptr_array_return()
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3506 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
Massive fixup of libnm-glib to:
a) have all objects (with the exception of VPN) cache their properties and
update them asynchronously on PropertiesChanged signals from NM
b) return internal const data for most attributes/properties instead of
allocated values that the caller must free
c) cache wrapped objects such that a given D-Bus path will always map to the
same GObject returned by libnm-glib
d) remove a few signals and move them to GObject property notifications
e) match recent NM D-Bus API changes for activation/deactivation
f) remove some private functions from libnm-glib headers
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3491 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
* introspection/nm-manager.xml
introspection/nm-manager-client.xml
- Rename the ActivateDevice method to ActivateConnection to better
reflect it's usage; it's arguments get reordered a bit too
- Convert GetActiveConnections method return from a struct to a dict
* include/NetworkManager.h
- Define the dict keys for return value of GetActiveConnections
* src/nm-manager.c
- impl_manager_activate_device -> impl_manager_activate_connection
- (add_one_connection_element): return a populated hash table, not
a structure
* libnm-glib/nm-client.c
libnm-glib/nm-client.h
- nm_client_activate_device -> nm_client_activate_connection
- nm_client_free_active_connection_element -> nm_client_free_active_connections_element
- (nm_client_get_active_connections): return a GSList of GHashTables,
instead of the custom structures. Each element of the returned list
must be freed with nm_client_free_active_connections_element()
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3482 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
Change manager's StateChange signal to StateChanged for consistency.
* introspection/nm-manager.xml
- Add 'StateChanged' signal
- Move 'StateChange' down to the deprecated section
* src/nm-hal-manager.c
- (nm_hal_manager_new): connect to 'state-changed' instead
* src/NetworkManagerPolicy.c
- (nm_policy_new): connect to 'state-changed' instead
* src/nm-manager.c
src/nm-manager.h
- (nm_manager_update_state): emit both 'state-changed' and 'state-change'
- (nm_manager_class_init): add 'state-changed' and not the deprecation
of 'state-change'
* libnm-glib/nm-client.c
libnm-glib/nm-client.h
- (constructor, nm_client_class_init, client_state_changed_proxy):
track and proxy 'state-changed' instead of 'state-change'
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3393 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
Implement killswitch polling through HAL.
* src/nm-manager.c: Add wireless hardware status property. Add
'properties-changed' signal for changes in wireless and wireless
hardware
state changes.
* src/nm-hal-manager.c: Poll hal for killswitch statuses in
* every 6 seconds
and update NMManager's wireless hardware state when it has
changed.
(nm_hal_manager_new): Don't try to add initial devices here -
(hal_init)
already does that.
* libnm-glib/nm-client.c: Add wireless hardware status property.
* Cache the
values of wireless state and wireless hardware state. Listen for
the
'properties-changed' signals, update the cached values and emit
notify.
* include/NetworkManager.h: Fix a typo in a comment.
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2975 4912f4e0-d625-0410-9fb7-b9a5a253dbdc