* libnm-glib/nm-client.c
- (nm_client_init): create VPN connections hash table with key free
function
- (proxy_vpn_connection_added): VPN connections hash table key should
be a duplicated value, not the same memory address as the VPN
connection name. This is because the VPN connection name could
potentially be freed and set to something else during the lifetime
of the NMVPNConnection object.
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2706 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
* libnm-glib/Makefile.am: Use nm-manager-client.xml to produce
* nm-client-bindings.
* introspection/nm-manager-client.xml: Add a horrible horrbile
* hack to work around
an issue with dbus-glib bindings generator. The issue is, the
generated C caller
functions for dbus methods "Sleep(bool)" and "sleep()" both have
the same function
name and different arguments and it won't compile anymore. To
fix this, we now have
two copies of nm-manager.xml file. nm-manager.xml contains the
actual interface,
that is new API + compatibility API and used by the daemon. The
other,
nm-manager-client.xml is only the new API without compatibility
bits and is used
by libnm-glib to make it compile.
* introspection/nm-manager.xml: Define compatibility methods
* (sleep, wake, state).
* src/nm-manager.c (impl_manager_legacy_sleep)
(impl_manager_legacy_wake, impl_manager_legacy_state): Implement
the compatibility
interface functions for 0.6 branch.
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2688 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
* include/NetworkManagerVPN.h
src/vpn-manager/nm-dbus-vpn.c
src/vpn-manager/nm-dbus-vpn.h
src/vpn-manager/nm-vpn-act-request.c
src/vpn-manager/nm-vpn-act-request.h
src/vpn-manager/nm-vpn-service.c
src/vpn-manager/nm-vpn-service.h
libnm-glib/nm-vpn-connection.c
libnm-glib/nm-vpn-connection.h
libnm-glib/nm-client.h
- Rename NM_VPN_STATE_* -> NM_VPN_SERVICE_STATE_* and NMVPNState ->
NMVPNServiceState to clarify what they apply to
- Rename NM_VPN_ACT_STAGE_* -> NM_VPN_CONNECTION_STATE_* and
NMVPNActStage -> NMVPNConnectionState for the same reason
* libnm-glib/nm-client.c
- Constant + type renames from above
- Properly handle NameOwnerChanged/manager_running signals
for NM service; only emit when state really changes
- Use hash tables correctly so that the key (which was previously owned
by the D-Bus message) now has the same lifetime as the value, since
the key is now taken from the the NMVPNConnection itself. This
really fixes the double-VPN names in the applet
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2677 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
* libnm-glib/nm-client.c
- Convert internal VPN connection tracking from a list to a hash table
to easily avoid duplicates
- (nm_client_get_vpn_connections): now returns an allocated GSList that
must be freed by the caller, like nm_client_get_devices()
- (nm_client_remove_vpn_connection): don't let the removal signal
leak through for NMVPNConnection objects that aren't actually
tracked.
- (manager_running): throw away VPN connection list when NM goes away,
like with the device list
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2675 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
* include/NetworkManager.h: added DBus path for connection settings.
* libnm-glib/nm-settings.[ch] (nm_settings_signal_new_connection,
nm_connection_settings_signal_updated,
nm_connection_settings_signal_removed): new functions to wrap the
objects' signals.
(nm_connection_settings_init): register GObject with DBus.
(nm_connection_settings_get_dbus_object_path): new function.
* libnm-glib/Makefile.am: added libnmutil to link flags.
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2672 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
* libnm-glib/libnm-glib.pc.in: Rename to libnm_glib.pc.in.
* libnm-glib/Makefile.am: Add legacy libnm_glib.[ch] to the
* build.
Rename the library from libnm-glib to libnm_glib to maintain the
library API
compatibility with 0.6 branch.
* Makefile.am: Remove gnome/ SUBDIR.
* gnome/libnm_glib/libnm_glib.[ch]: Move to libnm-glib/.
* src/Makefile.am: Remove the WPA_SUPPLICANT_BIN define.
* dispatcher-daemon/Makefile.am: Link the binary with
* libnm_glib.
* configure.in: Remove GNOME checks, NetworkManager does not
* need any of these
anymore.
Remove checks for wpa_supplicant binary, it's used over dbus.
Remove gnome/ directory files form AC_OUTPUT, that directory is
getting moved.
* test/Makefile.am: Remove define WPA_SUPPLICANT_BIN.
Link the binaries with libnm_glib.la.
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2669 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
[Based on patch by Helmut Schaa <hschaa@suse.de>]
* libnm-glib/nm-client.h:
* libnm-glib/nm-object.h:
* libnm-glib/nm-vpn-connection.h:
* libnm-glib/nm-settings.h:
* libnm-glib/nm-device.h:
* libnm-glib/nm-ip4-config.h:
* libnm-glib/nm-access-point.h:
* libnm-glib/nm-device-802-3-ethernet.h:
* libnm-util/nm-setting.h:
* libnm-util/nm-connection.h: Add G_BEGIN_DECLS / G_END_DECLS to
* support C++.
* libnm-glib/nm-object.c (nm_object_get_byte_property):
* Implement.
* libnm-glib/nm-access-point.c: Strength has type char.
* gnome/vpn-properties/Makefile.am: Remove
* GNOME_DISABLE_DEPRECTATED for now
to fix build. GnomeDruid is deprecated in recent libgnomeui.
* introspection/nm-access-point.xml: Strength property is char,
* not int.
* src/NetworkManagerAP.c (set_property): Set strength from char.
(get_property): Handle hidden APs (with empty SSID).
Get strength value from char.
(nm_ap_class_init): Strength property has char type.
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2659 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
* libnm-glib/Makefile.am: Add NMObject to build, remove nm-utils.[ch].
* nm-utils.[ch]: Remove.
* libnm-glib/nm-object.c: Implement a base class for all libnm-glib dbus-aware
objects for easy property access and dbus connection handling.
* libnm-glib/nm-client.c: Derive from NMObject.
* libnm-glib/nm-device.c: Ditto.
* libnm-glib/nm-device-802-3-ethernet.c: Changes for being based on NMObject.
* libnm-glib/nm-device-802-11-wireless.c: Ditto.
* libnm-glib/nm-ip4-config.c: Ditto.
* libnm-glib/nm-access-point.c: Ditto.
* libnm-util/nm-connection.c (nm_connection_compare): Add a stub for connection
comparision. Currently used by the device activation code to determine if the new
activation is the same as the old one.
* src/nm-dbus-nmi.c (nm_dbus_get_user_key_for_network): Don't use the obsolete and
wrong way of getting the dbus path for AP. Fixes the issue where the applet isn't
able to ask password for the AP.
* src/nm-device.c (nm_device_activate): Change the logic here - instead of giving
up if the device is already connected, tear down it's connection (if it isn't the
same as new one) and start the activation.
* src/nm-manager.c: Add the beginnings of NMConnection storage and signals.
* src/NetworkManagerAP.c (nm_ap_init): Set the default values to AP memebers, fixes
the issue where all APs are always listed as encrypted.
* src/NetworkManagerDbus.c (nm_dbus_get_object_path_for_network): Remove. APs have
their own registered paths.
* test/nm-tool.c (detail_device): Don't try to get active network from wireless
device if it's not connected - dbus-glib will happily crash trying to marshal NULL.
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2615 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
Patch from Christian Persch <chpe@gnome.org>
* libnm-glib/Makefile.am:
* dispatcher-daemon/Makefile.am:
Use the correct variables, the correct paths, and correct ordering. (446315)
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2588 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
* libnm-glib/Makefile.am: Link with libnm-util to gain access to
NMConnection.
* libnm-glib/nm-device-802-11-wireless.c:
(nm_device_802_3_ethernet_activate): Remove.
* libnm-glib/nm-device-802-3-ethernet.c
(nm_device_802_3_ethernet_activate): Remove.
* libnm-glib/nm-device.c (nm_device_activate): Implement.
* src/nm-device-802-3-ethernet.c: Implement the new activation using
NMConnection.
* src/nm-device-802-11-wireless.c: Store an activation AP once the
activation has started.
Implement the new activation using NMConnection.
* src/nm-activation-request.c: Store a generic connection object instead
of a wireless-specific AP.
* src/NetworkManagerPolicy.c (create_connection): Implement. Depending
on device type, create a device specific connection object suitable for
device activation.
* src/nm-device.c (nm_device_activate): Re-implement. Call the device
specific check to validate the connection and on success start the
activation.
* src/nm-device-interface.h: Add a activate virtual function to the
interface definition.
* src/nm-device-interface.c (nm_device_interface_activate): Implement.
(impl_device_activate): Implement.
* introspection/nm-device.xml: Add a generic device activation interface
that accepts an abstract NMConnection structure that has device-specific
information in it.
* introspection/nm-device-802-3-ethernet.xml: Remove the wired-specific
activation interface.
* introspection/nm-device-802-11-wireless.xml: Remove the wireless-specific
activation interface.
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2569 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
* libnm-glib/nm-device.c (nm_device_get_description): Implement.
* libnm-glib/nm-client.c (nm_client_manager_is_running): Implement. Also add a
"manager-running" signal that notifies the appearance/disappearance of NM.
(nm_client_sleep): Implement.
* libnm-glib/nm-device.c:
* libnm-glib/nm-device-802-11-wireless.c:
* libnm-glib/nm-device-802-3-ethernet.c:
Don't inherit from DBusGProxy, add a proxy to private
data. The reason is, classes inherited from NMDevice wouldn't get any dbus signals
for anything but their own dbus interface. DBusGProxy objects support only one
interfaces and to work around this, NMDevice has spearate proxy for each dbus
interface. The nice side effect of this change is that we do not create a new
DBusGProxy object for each property access.
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2479 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
* libnm-glib/nm-device-802-11-wireless.c
(nm_device_802_11_wireless_get_capabilities): Implement.
* libnm-glib/nm-device.c (nm_device_get_capabilities): Implement.
* src/nm-device-802-11-wireless.c: Add "WirelessCapabilities" property.
* src/named-manager/nm-named-manager.c (remove_one_zone_from_named): Unref the
reply only if it's not NULL. Not sure why this started happening right now.
* src/nm-manager.c (device_stop_and_free): Remove. No need to have different
code paths for when devices get removed on shutdown or when a device is just
removed.
(finalize): Don't use a g_slist_foreach() when removing devices, the list data
gets freed so any signal from a device (disconnected for instance) would invoke
NMState update which would crash.
(nm_manager_remove_device): Bring the device down when it gets removed.
* src/NetworkManagerPolicy.c (nm_policy_auto_get_best_device): Remove
the unused dev_type.
* src/nm-hal-manager.c (create_device_and_add_to_list): Don't keep the
reference to the added device, NMManager will own it (if it wants).
* test/nm-tool.c: Rewrite using libnm-glib.
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2417 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
* libnm-glib/nm-device-802-11-wireless.c: Cache networks (bssids) list.
We get signalled when it changes.
* libnm-glib/nm-client.c: Cache NMState and device list, we get signalled
when it changes.
* libnm-glib/nm-device.c: Cache the device state property.
* libnm-glib/nm-access-point.c: Cache the strength property.
* src/nm-device-802-11-wireless.c: Fix wireless device scanning scheduler.
The new algorithm is to start from SCAN_INTERVAL_MIN (currently defined as 0)
and add a SCAN_INTERVAL_STEP (currently 20 seconds) with each successful scan
until SCAN_INTERVAL_MAX (currently 120 seconds) is reached. Do not scan while
the device is down, activating, or activated (in case of A/B/G cards).
Remove some old dead ifdef'ed out code that used to configure wireless devices,
it's all done through supplicant now.
* src/supplicant-manager/nm-supplicant-interface.c: Fix the reference
counting issues with pending calls which caused leaks and crashes when
interface was removed (now that the interface actually gets removed).
* src/nm-call-store.c: Make a copy of data before running a foreach
with user callback on it - The most common usage pattern is to cancel
(and thus remove) all pending calls with foreach which would modify
the hash table we're iterating over.
* src/nm-manager.c: When a device is added, make sure it is "up". When
it's removed or disabled due to disabling wireless or networking, bring
it down.
* include/NetworkManager.h: Add new device state NM_DEVICE_STATE_DOWN.
* src/nm-device-802-11-wireless.c:
* src/nm-device-802-3-ethernet.c:
* src/nm-device.c:
- Remove "init" virtual function, all gobjects have a place for that
already (constructor).
- Replace "start" virtual function with "bring_up", devices can be
brought up and down more than just on startup now.
- Add "is_up" virtual function.
- Implement one way to bring a device down instead of previous 4 different
ways, each of witch did something different.
* src/NetworkManagerUtils.c (nm_dev_sock_open): This doesn't need an NMDevice,
all it needs is the device interface.
Get rid of NMData.dev_list (3 members to go).
Get rif of NMData in a lot of places.
* gnome/libnm_glib/libnm_glib.c: Make it compile again.
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2395 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
* libnm-glib/nm-device-802-11-wireless.c: Add "network-added" and
"network-removed" signals.
* libnm-glib/libnm-glib.pc.in: Require NetworkManager >= 0.7.0.
* libnm-glib/nm-access-point.c: Add "strength-changed" signal, emit it
when receiving the signal from dbus.
* src/nm-device-802-11-wireless.c (get_property): Fix PROP_ACTIVE_NETWORK
property.
* src/NetworkManagerPolicy.c (state_changed): Fix a typo to make the
deactivation of the previously activated device working again.
* src/nm-activation-request.c: Remove NMActStage property and it's getter
and setter.
* src/nm-device.c (nm_device_is_activated): Remove.
state == NM_DEVICE_STATE_ACTIVATED is just as easy to use.
* include/NetworkManager.h: Remove NM_DBUS_NO_DEVICES_ERROR,
NM_DBUS_NO_DIALUP_ERROR, NM_DBUS_NO_NETWORKS_ERROR,
NM_DBUS_NO_ACTIVE_DEVICE_ERROR, NM_DBUS_NO_ACTIVE_NET_ERROR errors and
NM_DBUS_SIGNAL_STATE_CHANGE signal.
Remove NMNetworkStatus and NMActStage enums.
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2345 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
* src/vpn-manager/nm-vpn-manager.c: Handle the DBUS state changes itself.
Handle device state changes and disconnect VPN if it's device deactivates.
* src/nm-dbus-nm.c:
* src/nm-dbus-nm.h:
* src/nm-dbus-device.c:
* src/nm-dbus-device.c:
* src/nm-dbus-net.c:
* src/nm-dbus-net.h: Remove. All of it is implemented byt the new dbus API.
* src/NetworkManagerMain.h: Get rid of all but 3 properties of NMData.
* src/nm-device.c (nm_device_get_by_udi):
(nm_device_get_by_iface): Remove. This doesn't belong here and is already
implemented in the correct location (NMManager).
Rip out all the test_device stuff.
* src/NetworkManagerPolicy.c: Remove the leftover activation success and
failure handlers, it's all done by NMDevice already.
* src/NetworkManager.c: Move the signal handling here from nm-logging.c
Remove the iochannel hack to route the unix signals to the main thread since
we're not threaded anymore.
* src/NetworkManagerAP.c: Implement HWAddress property.
* src/NetworkManagerDbus.c: Remove the dbus signal sending code, it happens
automatically with dbus-glib.
* src/nm-netlink-monitor.c:
* src/nm-netlink-monitor.h:
- Move it low in the class hierarchy, don't reference any NM types.
- Remove private data from the header.
- Use type safe checks in public API methods.
- Make it a singleton so we don't have to pass the single reference around.
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2339 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
* introspection/nm-ip4-config.xml: Implement.
* libnm-glib/libnm-glib-test.c: Use new DBUS API in tests.
* libnm-glib/nm-ip4-config.c:
* libnm-glib/nm-ip4-config.c: Implement.
* src/nm-ap-security[-*]: Remove circular dependencies between APs and AP
securities. APs reference security.
* src/nm-device-802-11-wireless.c: Implement missing properties that need to
be exported over DBUS.
* src/nm-device-802-3-ethernet.c: Ditto.
* src/NetworkManagerAP.c:
* src/NetworkManagerAP.h:
- Convert to GObject, export over DBUS.
* src/nm-ip4-config.h:
* src/nm-ip4-config.h:
- Convert to GObject, export over DBUS.
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2322 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
Totally break NetworkManager. Please use 0.6 branch until futher notice.
* src/:
- Remove old low-level dbus interface implementations and replace them
with dbus-glib one.
* configure.in:
- Require dbus-glib >= 0.72.
- Plug in new sources to build.
* libnm-glib/:
- Implement GObject wrappers on top of DBUS glib auto-generated bindings
to make it more convenient to use from GObject based programs.
* introspection/:
- Implement DBUS XML introspection files, used by both NM and libnm-glib.
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2309 4912f4e0-d625-0410-9fb7-b9a5a253dbdc