summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author(no author) <(no author)>2005-08-18 18:47:20 +0000
committer(no author) <(no author)@4912f4e0-d625-0410-9fb7-b9a5a253dbdc>2005-08-18 18:47:20 +0000
commit7d370a0e9e6a41f99c4cee62a723f937aef356d5 (patch)
tree66cb81f5e20faf14ed2ba1180125cbd0b01650aa
parenteb1a9774f1a082fa51776a034351fc0b130d623d (diff)
This commit was manufactured by cvs2svn to create tagNETWORK_MANAGER_VPNC_0_3
'NETWORK_MANAGER_VPNC_0_3'. git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/tags/NETWORK_MANAGER_VPNC_0_3@878 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
-rw-r--r--.cvsignore30
-rw-r--r--AUTHORS2
-rw-r--r--CONTRIBUTING17
-rw-r--r--ChangeLog5747
-rw-r--r--Makefile.am19
-rw-r--r--NEWS78
-rw-r--r--NetworkManager.h225
-rw-r--r--NetworkManager.pc.in10
-rw-r--r--README64
-rw-r--r--TODO19
-rwxr-xr-xautogen.sh23
-rw-r--r--configure.in301
-rw-r--r--dispatcher-daemon/.cvsignore3
-rw-r--r--dispatcher-daemon/Makefile.am22
-rw-r--r--dispatcher-daemon/NetworkManagerDispatcher.c355
-rw-r--r--docs/NetworkManager DBUS API.txt190
-rw-r--r--examples/python/.cvsignore1
-rwxr-xr-xexamples/python/NMTester.py44
-rwxr-xr-xexamples/python/NetworkManager.py214
-rw-r--r--examples/python/README21
-rw-r--r--examples/python/systray/.cvsignore4
-rw-r--r--examples/python/systray/Makefile34
-rw-r--r--examples/python/systray/eggtrayicon.c473
-rw-r--r--examples/python/systray/eggtrayicon.h77
-rwxr-xr-xexamples/python/systray/network_tray.py327
-rw-r--r--examples/python/systray/trayicon.override29
-rw-r--r--examples/python/systray/trayiconmodule.c25
-rw-r--r--gnome/.cvsignore2
-rw-r--r--gnome/Makefile.am2
-rw-r--r--gnome/applet/.cvsignore3
-rw-r--r--gnome/applet/Makefile.am89
-rw-r--r--gnome/applet/applet-dbus-devices.c1425
-rw-r--r--gnome/applet/applet-dbus-devices.h51
-rw-r--r--gnome/applet/applet-dbus-info.c1173
-rw-r--r--gnome/applet/applet-dbus-info.h41
-rw-r--r--gnome/applet/applet-dbus-vpn.c519
-rw-r--r--gnome/applet/applet-dbus-vpn.h39
-rw-r--r--gnome/applet/applet-dbus.c805
-rw-r--r--gnome/applet/applet-dbus.h63
-rw-r--r--gnome/applet/applet.c2610
-rw-r--r--gnome/applet/applet.h172
-rw-r--r--gnome/applet/eggtrayicon.c468
-rw-r--r--gnome/applet/eggtrayicon.h77
-rw-r--r--gnome/applet/icons/.cvsignore2
-rw-r--r--gnome/applet/icons/Makefile.am46
-rw-r--r--gnome/applet/icons/nm-adhoc.pngbin748 -> 0 bytes
-rw-r--r--gnome/applet/icons/nm-connecting01.pngbin1168 -> 0 bytes
-rw-r--r--gnome/applet/icons/nm-connecting02.pngbin1188 -> 0 bytes
-rw-r--r--gnome/applet/icons/nm-connecting03.pngbin1206 -> 0 bytes
-rw-r--r--gnome/applet/icons/nm-connecting04.pngbin1220 -> 0 bytes
-rw-r--r--gnome/applet/icons/nm-connecting05.pngbin1200 -> 0 bytes
-rw-r--r--gnome/applet/icons/nm-connecting06.pngbin1144 -> 0 bytes
-rw-r--r--gnome/applet/icons/nm-connecting07.pngbin1139 -> 0 bytes
-rw-r--r--gnome/applet/icons/nm-connecting08.pngbin1092 -> 0 bytes
-rw-r--r--gnome/applet/icons/nm-connecting09.pngbin1157 -> 0 bytes
-rw-r--r--gnome/applet/icons/nm-connecting10.pngbin1205 -> 0 bytes
-rw-r--r--gnome/applet/icons/nm-connecting11.pngbin1152 -> 0 bytes
-rw-r--r--gnome/applet/icons/nm-detect01.pngbin658 -> 0 bytes
-rw-r--r--gnome/applet/icons/nm-detect02.pngbin743 -> 0 bytes
-rw-r--r--gnome/applet/icons/nm-detect03.pngbin760 -> 0 bytes
-rw-r--r--gnome/applet/icons/nm-detect04.pngbin746 -> 0 bytes
-rw-r--r--gnome/applet/icons/nm-detect05.pngbin627 -> 0 bytes
-rw-r--r--gnome/applet/icons/nm-detect06.pngbin800 -> 0 bytes
-rw-r--r--gnome/applet/icons/nm-detect07.pngbin751 -> 0 bytes
-rw-r--r--gnome/applet/icons/nm-detect08.pngbin802 -> 0 bytes
-rw-r--r--gnome/applet/icons/nm-detect09.pngbin780 -> 0 bytes
-rw-r--r--gnome/applet/icons/nm-detect10.pngbin827 -> 0 bytes
-rw-r--r--gnome/applet/icons/nm-detect11.pngbin774 -> 0 bytes
-rw-r--r--gnome/applet/icons/nm-detect12.pngbin812 -> 0 bytes
-rw-r--r--gnome/applet/icons/nm-detect13.pngbin806 -> 0 bytes
-rw-r--r--gnome/applet/icons/nm-detect14.pngbin794 -> 0 bytes
-rw-r--r--gnome/applet/icons/nm-detect15.pngbin923 -> 0 bytes
-rw-r--r--gnome/applet/icons/nm-detect16.pngbin787 -> 0 bytes
-rw-r--r--gnome/applet/icons/nm-device-wired.pngbin878 -> 0 bytes
-rw-r--r--gnome/applet/icons/nm-device-wireless.pngbin1752 -> 0 bytes
-rw-r--r--gnome/applet/icons/nm-no-connection.pngbin1146 -> 0 bytes
-rw-r--r--gnome/applet/icons/nm-progress01.pngbin174 -> 0 bytes
-rw-r--r--gnome/applet/icons/nm-progress02.pngbin183 -> 0 bytes
-rw-r--r--gnome/applet/icons/nm-progress03.pngbin191 -> 0 bytes
-rw-r--r--gnome/applet/icons/nm-progress04.pngbin213 -> 0 bytes
-rw-r--r--gnome/applet/icons/nm-progress05.pngbin235 -> 0 bytes
-rw-r--r--gnome/applet/icons/nm-progress06.pngbin245 -> 0 bytes
-rw-r--r--gnome/applet/icons/nm-progress07.pngbin247 -> 0 bytes
-rw-r--r--gnome/applet/icons/nm-progress08.pngbin253 -> 0 bytes
-rw-r--r--gnome/applet/icons/nm-progress09.pngbin259 -> 0 bytes
-rw-r--r--gnome/applet/icons/nm-progress10.pngbin256 -> 0 bytes
-rw-r--r--gnome/applet/icons/nm-progress11.pngbin252 -> 0 bytes
-rw-r--r--gnome/applet/icons/nm-progress12.pngbin244 -> 0 bytes
-rw-r--r--gnome/applet/icons/nm-signal-00.pngbin490 -> 0 bytes
-rw-r--r--gnome/applet/icons/nm-signal-100.pngbin409 -> 0 bytes
-rw-r--r--gnome/applet/icons/nm-signal-25.pngbin496 -> 0 bytes
-rw-r--r--gnome/applet/icons/nm-signal-50.pngbin492 -> 0 bytes
-rw-r--r--gnome/applet/icons/nm-signal-75.pngbin470 -> 0 bytes
-rw-r--r--gnome/applet/icons/nm-vpn-lock.pngbin409 -> 0 bytes
-rw-r--r--gnome/applet/keyring.pngbin3130 -> 0 bytes
-rw-r--r--gnome/applet/main.c74
-rw-r--r--gnome/applet/menu-items.c321
-rw-r--r--gnome/applet/menu-items.h50
-rw-r--r--gnome/applet/nm-applet.conf24
-rw-r--r--gnome/applet/nm-device.c578
-rw-r--r--gnome/applet/nm-device.h88
-rw-r--r--gnome/applet/other-network-dialog.c392
-rw-r--r--gnome/applet/other-network-dialog.h30
-rw-r--r--gnome/applet/passphrase-dialog.c460
-rw-r--r--gnome/applet/passphrase-dialog.h37
-rw-r--r--gnome/applet/vpn-connection.c137
-rw-r--r--gnome/applet/vpn-connection.h39
-rw-r--r--gnome/applet/vpn-password-dialog.c235
-rw-r--r--gnome/applet/vpn-password-dialog.h32
-rw-r--r--gnome/applet/wireless-applet.glade1562
-rw-r--r--gnome/applet/wireless-network.c195
-rw-r--r--gnome/applet/wireless-network.h47
-rw-r--r--gnome/libnm_glib/.cvsignore3
-rw-r--r--gnome/libnm_glib/Makefile.am31
-rw-r--r--gnome/libnm_glib/libnm_glib.c542
-rw-r--r--gnome/libnm_glib/libnm_glib.h58
-rw-r--r--gnome/libnm_glib/libnm_glib.pc.in13
-rw-r--r--gnome/vpn-properties/.cvsignore3
-rw-r--r--gnome/vpn-properties/Makefile.am46
-rw-r--r--gnome/vpn-properties/nm-vpn-properties.c1158
-rw-r--r--gnome/vpn-properties/nm-vpn-properties.glade417
-rw-r--r--gnome/vpn-properties/nm-vpn-ui-interface.h84
-rw-r--r--initscript/.cvsignore3
-rw-r--r--initscript/Debian/.cvsignore2
-rw-r--r--initscript/Debian/Makefile.am4
-rwxr-xr-xinitscript/Debian/NetworkManager72
-rw-r--r--initscript/Gentoo/.cvsignore2
-rw-r--r--initscript/Gentoo/Makefile.am4
-rwxr-xr-xinitscript/Gentoo/NetworkManager49
-rw-r--r--initscript/Makefile.am16
-rw-r--r--initscript/RedHat/.cvsignore2
-rw-r--r--initscript/RedHat/Makefile.am5
-rwxr-xr-xinitscript/RedHat/NetworkManager79
-rwxr-xr-xinitscript/RedHat/NetworkManagerDispatcher74
-rw-r--r--initscript/SUSE/.cvsignore2
-rw-r--r--initscript/SUSE/Makefile.am4
-rw-r--r--initscript/SUSE/networkmanager49
-rw-r--r--initscript/Slackware/.cvsignore2
-rw-r--r--initscript/Slackware/Makefile.am5
-rwxr-xr-xinitscript/Slackware/rc.networkmanager66
-rw-r--r--po/.cvsignore14
-rw-r--r--po/ChangeLog902
-rw-r--r--po/POTFILES.in14
-rw-r--r--po/POTFILES.skip9
-rw-r--r--po/bs.po193
-rw-r--r--po/cs.po822
-rw-r--r--po/da.po191
-rw-r--r--po/de.po791
-rw-r--r--po/el.po347
-rw-r--r--po/en_CA.po760
-rw-r--r--po/en_GB.po418
-rw-r--r--po/es.po779
-rw-r--r--po/fr.po266
-rw-r--r--po/gu.po190
-rw-r--r--po/hr.po220
-rw-r--r--po/hu.po783
-rw-r--r--po/it.po281
-rw-r--r--po/ja.po219
-rw-r--r--po/mk.po219
-rw-r--r--po/nb.po761
-rw-r--r--po/ne.po397
-rw-r--r--po/nl.po865
-rw-r--r--po/no.po761
-rw-r--r--po/pa.po268
-rw-r--r--po/pt_BR.po188
-rw-r--r--po/rw.po398
-rw-r--r--po/sk.po775
-rw-r--r--po/sq.po184
-rw-r--r--po/sr.po437
-rw-r--r--po/sr@Latn.po437
-rw-r--r--po/sv.po961
-rw-r--r--po/uk.po787
-rw-r--r--po/wa.po193
-rw-r--r--po/zh_CN.po191
-rw-r--r--po/zh_TW.po708
-rw-r--r--src/.cvsignore3
-rw-r--r--src/Makefile.am88
-rwxr-xr-xsrc/NMLoadModules61
-rw-r--r--src/NetworkManager.c989
-rw-r--r--src/NetworkManager.conf21
-rw-r--r--src/NetworkManagerAP.c615
-rw-r--r--src/NetworkManagerAP.h94
-rw-r--r--src/NetworkManagerAPList.c803
-rw-r--r--src/NetworkManagerAPList.h67
-rw-r--r--src/NetworkManagerDbus.c1404
-rw-r--r--src/NetworkManagerDbus.h89
-rw-r--r--src/NetworkManagerDbusUtils.c100
-rw-r--r--src/NetworkManagerDbusUtils.h52
-rw-r--r--src/NetworkManagerDevice.c4264
-rw-r--r--src/NetworkManagerDevice.h135
-rw-r--r--src/NetworkManagerDevicePrivate.h109
-rw-r--r--src/NetworkManagerDialup.h10
-rw-r--r--src/NetworkManagerMain.h108
-rw-r--r--src/NetworkManagerPolicy.c677
-rw-r--r--src/NetworkManagerPolicy.h40
-rw-r--r--src/NetworkManagerSystem.c821
-rw-r--r--src/NetworkManagerSystem.h80
-rw-r--r--src/NetworkManagerUtils.c804
-rw-r--r--src/NetworkManagerUtils.h105
-rw-r--r--src/NetworkManagerWireless.c234
-rw-r--r--src/NetworkManagerWireless.h39
-rw-r--r--src/autoip.c350
-rw-r--r--src/autoip.h3
-rw-r--r--src/backends/.cvsignore3
-rw-r--r--src/backends/Makefile.am46
-rw-r--r--src/backends/NetworkManagerDebian.c729
-rw-r--r--src/backends/NetworkManagerGentoo.c537
-rw-r--r--src/backends/NetworkManagerRedHat.c674
-rw-r--r--src/backends/NetworkManagerSlackware.c233
-rw-r--r--src/backends/NetworkManagerSuSE.c822
-rw-r--r--src/backends/interface_parser.c192
-rw-r--r--src/backends/interface_parser.h52
-rw-r--r--src/backends/shvar.c398
-rw-r--r--src/backends/shvar.h103
-rw-r--r--src/dhcp-manager/.cvsignore2
-rw-r--r--src/dhcp-manager/Makefile.am21
-rw-r--r--src/dhcp-manager/nm-dhcp-manager.c665
-rw-r--r--src/dhcp-manager/nm-dhcp-manager.h42
-rw-r--r--src/gnome-keyring-md5.c291
-rw-r--r--src/gnome-keyring-md5.h22
-rw-r--r--src/named-manager/.cvsignore2
-rw-r--r--src/named-manager/Makefile.am14
-rw-r--r--src/named-manager/named.conf15
-rw-r--r--src/named-manager/nm-named-manager.c827
-rw-r--r--src/named-manager/nm-named-manager.h93
-rw-r--r--src/nm-activation-request.c242
-rw-r--r--src/nm-activation-request.h59
-rw-r--r--src/nm-dbus-device.c463
-rw-r--r--src/nm-dbus-device.h29
-rw-r--r--src/nm-dbus-net.c291
-rw-r--r--src/nm-dbus-net.h29
-rw-r--r--src/nm-dbus-nm.c583
-rw-r--r--src/nm-dbus-nm.h30
-rw-r--r--src/nm-dbus-nmi.c0
-rw-r--r--src/nm-dbus-nmi.h0
-rw-r--r--src/nm-ip4-config.c307
-rw-r--r--src/nm-ip4-config.h59
-rw-r--r--src/nm-netlink-monitor.c751
-rw-r--r--src/nm-netlink-monitor.h95
-rw-r--r--src/vpn-manager/.cvsignore2
-rw-r--r--src/vpn-manager/Makefile.am26
-rw-r--r--src/vpn-manager/nm-dbus-vpn.c763
-rw-r--r--src/vpn-manager/nm-dbus-vpn.h42
-rw-r--r--src/vpn-manager/nm-vpn-connection.c101
-rw-r--r--src/vpn-manager/nm-vpn-connection.h36
-rw-r--r--src/vpn-manager/nm-vpn-manager.c885
-rw-r--r--src/vpn-manager/nm-vpn-manager.h45
-rw-r--r--src/vpn-manager/nm-vpn-service.c174
-rw-r--r--src/vpn-manager/nm-vpn-service.h51
-rw-r--r--test/.cvsignore7
-rw-r--r--test/Makefile.am30
-rw-r--r--test/libnm_glib_test.c82
-rw-r--r--test/nm-dhcp-opt-test.c270
-rw-r--r--test/nminfotest.c326
-rw-r--r--test/nmnetlinktest.c76
-rw-r--r--test/nmtest.c425
-rw-r--r--test/nmtestdevices.c284
-rw-r--r--utils/.cvsignore2
-rw-r--r--utils/Makefile.am19
-rw-r--r--utils/nm-utils.c132
-rw-r--r--utils/nm-utils.h131
-rw-r--r--vpn-daemons/.cvsignore2
-rw-r--r--vpn-daemons/README156
263 files changed, 0 insertions, 63719 deletions
diff --git a/.cvsignore b/.cvsignore
deleted file mode 100644
index 82b30a68a5..0000000000
--- a/.cvsignore
+++ /dev/null
@@ -1,30 +0,0 @@
-configure
-config.log
-config.status
-config.h
-config.h.in
-Makefile
-Makefile.in
-[Nn]etwork[Mm]anager-*.tar.gz
-NetworkManager.pc
-autom4te.cache
-aclocal.m4
-mkinstalldirs
-stamp-h1
-libtool
-COPYING
-INSTALL
-NetworkManager-0*
-compile
-config.guess
-config.sub
-depcomp
-install-sh
-ltmain.sh
-missing
-intltool-extract
-intltool-merge
-intltool-update
-intltool-extract.in
-intltool-merge.in
-intltool-update.in
diff --git a/AUTHORS b/AUTHORS
deleted file mode 100644
index ec90c0413f..0000000000
--- a/AUTHORS
+++ /dev/null
@@ -1,2 +0,0 @@
-Dan Williams <dcbw@redhat.com>
-
diff --git a/CONTRIBUTING b/CONTRIBUTING
deleted file mode 100644
index 11cf6ec817..0000000000
--- a/CONTRIBUTING
+++ /dev/null
@@ -1,17 +0,0 @@
-Guidelines for Contributing:
-
-1) Platform-specific functionality (for example, location of binaries that NetworkManager calls) should be done in a platform-independent manner. If code currently in NetworkManager does not accomodate that, then the code in NetworkManager needs to be changed to provide that. For example, if another platform does not use "dhclient" to get DHCP information, a separate function should be created to return a command-line string to call rather than inserting huge if/#ifdef blocks into the current function.
-
-2) Coding standards are more-or-less GNOME coding standards, with these exceptions:
- a) 5 space tabs (no 8-space tabs allowed)
- b) REAL tabs
- c) Braces are moved to the next line, like:
- if (foobar)
- {
- ...
- }
- rather than:
- if (foobar) {
- ...
- }
- d) Limiting line width to 80 characters is frowned upon
diff --git a/ChangeLog b/ChangeLog
deleted file mode 100644
index 97ec26df79..0000000000
--- a/ChangeLog
+++ /dev/null
@@ -1,5747 +0,0 @@
-2005-08-18 Dan Williams <dcbw@redhat.com>
-
- * gnome/applet/main.c
- - Revert previous change for --no-session since
- --sm-disable does the same thing
-
-2005-08-18 Dan Williams <dcbw@redhat.com>
-
- * gnome/applet/applet-dbus-info.c
- - (nmi_dbus_create_error_message): new function
- - (nmi_dbus_get_key_for_network): correctly use dbus error creation
- functions. Also don't check for both device _and_ network before
- asking for a user's key, because we may not have gotten all our
- networks back from NM quite yet (due to the dbus pending calls
- coming in later). Fixes a hang in NM/nm-applet.
-
- * src/NetworkManagerDbus.c
- - (nm_dbus_get_user_key_for_network_cb): handle error conditions in a
- slightly more sane manner, even though we are still broken for
- certain other error conditions.
- - (nm_dbus_get_user_key_for_network): need to pass the network's essid
- to the info-daemon too
-
- * src/NetworkManagerDevice.c
- - Fix some debug messages to be info messages instead
-
-2005-08-18 Dan Williams <dcbw@redhat.com>
-
- * gnome/applet/main.c
- - Add new "--no-session" parameter that disables applet
- session management, ie for testing
-
-2005-08-18 Christopher Aillon <caillon@redhat.com>
-
- * gnome/applet/other-network-dialog.c:
- * gnome/applet/wireless-applet.glade: More mnemonics
-
-2005-08-17 Robert Love <rml@novell.com>
-
- * initscript/SUSE/networkmanager: update
-
-2005-08-17 Dan Williams <dcbw@redhat.com>
-
- * Tag NM_0_4_1_RELEASE
-
-2005-08-17 Christopher Aillon <caillon@redhat.com>
-
- * gnome/applet/applet.c: More translatable string cleanup
-
-
-2005-08-17 Dan Williams <dcbw@redhat.com>
-
- * gnome/applet/applet-dbus-info.c
- - (nmi_dbus_get_key_for_network): Grab new "new_key" parameter
- from the dbus message, which tells us to unconditionally
- ask the user for a new key. Otherwise, we pull the key from
- the keyring and return it. If we fail to get the key from the
- keyring, we ask the user for a new key.
- - (nmi_dbus_get_network_key): new function to grab the key for
- an essid from the keyring.
- - (nmi_dbus_get_network_properties): don't access the keyring here.
- Also, don't return any key in the dbus message.
-
- * src/NetworkManagerDbus.[ch]
- - (nm_dbus_get_user_key_for_network): Add "new_key" parameter to
- indicate that we unconditionally want a new key. This function
- is now also used to get keys from the info-daemon which are
- pre-stored, not just for asking the user for a new key. The
- "new_key" parameter indicates whether or not we wish to ask the
- user for a new key.
- - (nm_dbus_get_network_data_cb): we no longer get a key from the
- info-daemon in the return message, so use NULL instead. The
- key will be filled in at connect time by calling
- nm_dbus_get_user_key_for_network()
-
- * src/NetworkManagerDevice.c
- - (nm_device_wireless_configure): update for "new_key" param to
- nm_dbus_get_user_key_for_network(). We initially set new_key
- to FALSE to see if we have a stored key in the info-daemon, but
- if the connection is unsuccessful at this stage we request a
- new one
-
-2005-08-17 Dan Williams <dcbw@redhat.com>
-
- * gnome/applet/icons/nm-no-connection.png
- gnome/applet/icons/nm-device-wired.png
- - Use Diana's new RJ45 connector icons
-
-2005-08-17 Dan Williams <dcbw@redhat.com>
-
- * src/NetworkManagerPolicy.c
- - (nm_policy_device_change_check): clarify switching rules if
- both new and old devices are valid; mainly, don't switch
- away from user-requested wireless connection back to a wired
- one
-
-2005-08-17 Dan Williams <dcbw@redhat.com>
-
- * gnome/applet/Makefile.am
- - Relocate the applet to /usr/bin since it is no longer
- executed by anything, but directly by the user
-
-2005-08-17 Dan Williams <dcbw@redhat.com>
-
- Patch from Bill Moss <bmoss@clemson.edu>
-
- * gnome/applet/applet-dbus-info.[ch]
- - (nmi_save_network_info): save timestamp for network if it
- was a change requested by the user
- - (nmi_dbus_update_network_info): get user_requested from dbus
- message and pass to nmi_save_network_info()
-
- * gnome/applet/applet.c
- - (nmwa_update_network_timestamp): remove
- - (nmwa_menu_item_activate): don't set timestamp on networks
- here, only after a successful connect in nmi_save_network_info()
-
- * src/NetworkManagerDbus.[ch]
- - (nm_dbus_update_network_info): pass user_requested into the
- dbus message
-
- * src/NetworkManagerPolicy.c
- - (nm_policy_activation_finish): pass user_requested to
- nm_dbus_update_network_info()
-
-2005-08-16 Robert Love <rml@novell.com>
-
- * gnome/applet/applet.c: Better "Dial Up" menu item.
-
-2005-08-16 Robert Love <rml@novell.com>
-
- * gnome/applet/applet.c: use GTK_STOCK_INFO not PROPERTIES for the
- "Connection Information" menu item.
-
-2005-08-16 Dan Williams <dcbw@redhat.com>
-
- Patch from j@bootlab.org
- * vpn-daemons/vpnc/Makefile.am: Fix for autoreconf
-
- * configure.in: allow specifying the path to dhcdbd
-
-2005-08-16 Robert Love <rml@novell.com>
-
- Patch from j@bootlab.org
- * src/backends/NetworkManagerDebian.c, src/backends/interface_parser.c,
- src/backends/interface_parser.h: Debian dialup support.
-
-2005-08-16 Christopher Aillon <caillon@redhat.com>
-
- * vpn-daemons/vpnc/properties/nm-vpnc-dialog.glade:
- * gnome/applet/applet.c: Add some mnemonics for VPNC
-
- * vpn-daemons/.cvsignore: fix this up a little bit
-
-2005-08-16 Robert Love <rml@novell.com>
-
- * src/backends/NetworkManagerSuSE.c: improve the SUSE-backend dial up
- support.
-
-2005-08-16 Christopher Aillon <caillon@redhat.com>
-
- * gnome/applet/applet.c: Split markup out of translatable strings
- and clean up logic a little bit. (fixes #309012)
-
-2005-08-15 Christopher Aillon <caillon@redhat.com>
-
- * gnome/vpn-properties/nm-vpn-properties.c:
- * gnome/vpn-properties/nm-vpn-ui-interface.h:
- * vpn-daemons/vpnc/properties/nm-vpnc.c:
- Makeshift fix to remove newlines from translatable strings.
- Note that we now return an allocated string, so callers of
- get_confirmation_details () must now call g_free () on the
- result. (fixes #309033).
-
-2005-08-12 Robert Love <rml@novell.com>
-
- * gnome/applet/applet-dbus.c: remove newlines from translatable
- strings--not needed here anyway. (fix b.g.o #309011)
- * src/nm-netlink.monitor.c: don't translate "%s" (fix b.g.o #172391)
-
-2005-08-11 Robert Love <rml@novell.com>
-
- * gnome/applet/applet.c: mark string as translatable.
-
-2005-08-11 Robert Love <rml@novell.com>
-
- * initscript/SUSE/networkmanager: update.
-
-2005-08-11 Dan Williams <dcbw@redhat.com>
-
- * src/nm-dhcp-manager.c
- - (nm_dhcp_manager_get_ip4_config): if for some reason we don't get
- an gateway returned from DHCP, try to use the address of the DHCP
- server as the gateway instead. Found by Ralf Ertzinger.
-
-2005-08-10 Robert Love <rml@novell.com>
-
- * gnome/applet/applet.c: Make applet->dbus_thread joinable so we can
- wait for it on exit; call exit() in nmwa_destroy() to jump ship.
-
-2005-08-10 Dan Williams <dcbw@redhat.com>
-
- Patch from Bill Moss <bmoss@clemson.edu>
- * Consolidate writes of access point information updates to the info daemon
- so that we only do it when the connection to the access point was
- successful. Also consolidates updates to GConf in the Gnome applet.
-
- * src/nm-netlink-monitor.c
- - Silence compile warning when calling g_object_new()
-
-2005-08-08 Dan Williams <dcbw@redhat.com>
-
- Patch from Steev <steev@steev.net>:
- * src/backends/NetworkManagerGentoo.c
- - Stub new dialup backend functions
-
-2005-08-08 Dan Williams <dcbw@redhat.com>
-
- Patch from Colin Slater:
- * src/backends/NetworkManagerGentoo.c
- - (nm_system_update_dns): Fix exit status check for restarting
- nscd
-
-2005-08-05 Robert Love <rml@novell.com>
-
- * NetworkManager.h,
- gnome/applet/applet-dbus-devices.c,
- gnome/applet/applet-dbus-devices.h,
- gnome/applet/applet-dbus.c,
- gnome/applet/applet.c,
- gnome/applet/applet.h,
- src/NetworkManager.c,
- src/NetworkManagerMain.h,
- src/NetworkManagerSystem.h,
- src/backends/NetworkManagerRedHat.c,
- src/backends/NetworkManagerSuSE.c,
- src/nm-dbus-nm.c: basic dialup support using distro infrastructure
-
-2005-08-05 Robert Love <rml@novell.com>
-
- * gnome/applet/other-network-dialog.c: default the adhoc network to the
- machine's hostname to make adhoc creation idiot-proof.
-
-2005-08-04 Robert Love <rml@novell.com>
-
- * gnome/applet/other-network-dialog.c: fix leak. "label" needs to be
- freed.
-
-2005-08-04 Dan Williams <dcbw@redhat.com>
-
- * gnome/applet/applet-dbus-info.c
- gnome/applet/applet-dbus-info.h
- - (nmi_dbus_update_network_auth_method->nmi_save_network_info): generalize
- to store key, key type, and auth method rather than just auth method
- - (nmi_dbus_update_network_info): new function
- - (nmi_dbus_info_message_handler): updateNetworkAuthMethod -> updateNetworkInfo
-
- * gnome/applet/passphrase-dialog.c
- - (nmi_passphrase_dialog_ok_clicked): call nmi_save_network_info() instead
- of saving the info ourselves
-
- * gnome/libnm_glib/libnm_glib.c
- - Remove the stupid version check for dbus
-
- * src/NetworkManagerAP.c
- src/NetworkManagerAP.h
- - (nm_ap_get_enc_key_source): return 'const char *' rather than 'char *'
-
- * src/NetworkManagerDbus.c
- src/NetworkManagerDbus.h
- - (nm_dbus_update_network_auth_method -> nm_dbus_update_network_info): Update
- more than just the auth method
-
- * src/NetworkManagerDevice.c
- - Update network info at the appropriate times
-
-2005-07-29 Ray Strode <rstrode@redhat.com>
-
- * src/NetworkManager.c (nm_info_handler): don't use input as format
- string (Spotted by Ian Jackson).
-
-2005-07-27 Dan Williams <dcbw@redhat.com>
-
- * src/nm-dbus-nm.c
- src/nm-dbus-net.c
- - Random cleanups of spacing
-
- * gnome/applet/applet.h
- gnome/applet/other-network-dialog.c
- gnome/applet/passphrase-dialog.c
- - Conslidate usage of NMWAEncryptionKeyTypes enum
-
- Patch from Bill Moss:
- - Make Other Wireless Networks work again with encryption keys
-
-2005-07-26 Dan Williams <dcbw@redhat.com>
-
- Patch from Steev <steev@steev.net>:
- * src/backends/NetworkManagerGentoo.c
- src/backends/Makefile.am
- - Fix up Gentoo backend
-
-2005-07-26 Robert Love <rml@novell.com>
-
- * src/backends/NetworkManagerSuSE.c: misc. cleanup
-
-2005-07-25 Robert Love <rml@novell.com>
-
- * gnome/applet/applet.c: make the "Wired" menu item a radio button,
- in the same group as the wireless networks, since they are all
- mutually exclusive.
-
-2005-07-24 Ray Strode <rstrode@redhat.com>
-
- * src/nm-netlink-monitor.c (nm_netlink_monitor_new):
- remove unneeded NULL arg from g_object_new(). Any
- warnings caused by not having the extra NULL are just a
- result of a bug in glib 2.7.0 - 2.7.2.
-
-2005-07-22 Robert Love <rml@novell.com>
-
- * gnome/libnm_glib/libnm_glib.c: support D-BUS version 0.35, too
-
-2005-07-22 Robert Love <rml@novell.com>
-
- * src/nm-netlink-monitor.c: g_object_new() needs at least three
- parameters (gcc 4.0.2 warning fix).
-
-2005-07-18 Robert Love <rml@novell.com>
-
- Suggested by Aaron Bockover (abockover@novell.com)
- * gnome/applet/other-network-dialog.c: ASCII is an acronym, thus
- s/Ascii/ASCII
- * gnome/applet/passphrase-dialog.c: ditto
- * gnome/applet/wireless-applet.glade: ditto
-
-2005-07-13 Dan Williams <dcbw@redhat.com>
-
- Patch from Ray Strode <halfline@gmail.com>
- * vpn-daemons/vpnc/nm-vpnc-service.c
- - Don't let vpnc daemonize, fixes some races with PID file reading
-
-2005-07-13 Dan Williams <dcbw@redhat.com>
-
- Patch from Ray Strode <halfline@gmail.com>
- * Random cleanups for strict CFLAGS
-
-2005-07-07 Dan Williams <dcbw@redhat.com>
-
- Patch from Derek Atkins <warlord@MIT.EDU>
- * src/nm-dbus-net.c:
- - (nm_dbus_get_ap_from_object_path): differentiate similar ESSIDs
-
-2005-07-07 Dan Williams <dcbw@redhat.com>
-
- Patch from Jos Dehaes <jos_dehaes@fastmail.fm>
- * src/backends/NetworkManagerGentoo.c
- - Gentoo backend Static IP nameserver fixes
- - General Gentoo backend goodness
-
-2005-07-07 Dan Williams <dcbw@redhat.com>
-
- Patch from Bastien Nocera:
- * gnome/applet/applet.c
- - Fix up error reporting when icons or glade files are missing
-
-2005-07-07 Robert Love <rml@novell.com>
-
- * gnome/applet/applet.c: do not draw the VPN menu's seperator if there
- are not any VPN connections above it.
-
-2005-07-07 Robert Love <rml@novell.com>
-
- * gnome/applet/applet.c: whoops, left some "dog" debugging code in.
-
-2005-07-05 Robert Love <rml@novell.com>
-
- * src/NetworkManagerSystem.c: bail out if asked to set a gateway of
- zero.
-
-2005-07-05 Robert Love <rml@novell.com>
-
- * src/NetworkManagerDevice.c: use link-local (autoip) on DHCP failure
- on wired or unencrypted wireless.
-
-2005-07-01 Robert Love <rml@novell.com>
-
- * src/NetworkManagerSystem.c: Print the error via strerror().
-
-2005-06-30 Robert Love <rml@novell.com>
-
- * gnome/vpn-properties/nm-vpn-properties.c: display an error dialog and
- then exit if the glade file is not found. currently the application
- just hangs.
-
-2005-06-30 Robert Love <rml@novell.com>
-
- * src/nm-dbus-nm.c: Patch by Bill Moss <bmoss@clemson.edu> to
- explicitly up all interfaces on wake from sleep.
-
-2005-06-30 Robert Love <rml@novell.com>
-
- * gnome/applet/applet.c: Add right-click menu item "Connection Info"
- with information about the currently active connection.
- * gnome/applet/applet.h: (ditto)
- * gnome/applet/wireless-applet.glade: (ditto), new file
-
-2005-06-30 Robert Love <rml@novell.com>
-
- * src/NetworkManagerDevice.c: g_malloc0 cannot fail.
- * src/nm-dbus-nm.c: print when we sleep and wake up.
- * gnome/applet/menu-items.c: whitespace, misc. cleanup.
- * configure.in: look in "/usr/sbin" for dhcdbd, too. (it shouldn't be
- in /sbin unless D-BUS is, folks).
- * README: update to reflect nm-applet replacing NetworkManagerInfo.
-
-2005-06-27 Robert Love <rml@novell.com>
-
- * src/nm-dbus-nm.c: fix "setWirelessEnabled" call for the enabling
- case.
-
-2005-06-27 Robert Love <rml@novell.com>
-
- * gnome/applet/applet.c: make the 'Wireless Network Discovery' menu
- items radios.
-
-2005-06-26 Robert Love <rml@novell.com>
-
- * src/NetworkManagerDevice.c: be specific about which device in
- nm_info() message.
-
-2005-06-23 Adam Weinberger <adamw@gnome.org>
-
- * src/nm-netlink-monitor.c: correct spelling error.
-
-2005-06-23 Robert Love <rml@novell.com>
-
- * gnome/applet/applet-dbus-info.c: gnome keyring support!
- * gnome/applet/passphrase-dialog.c: more of that keyring!
-
-2005-06-23 Robert Love <rml@novell.com>
-
- * configure.in: remove extraneous GNOMEKEYRING directives.
- * gnome/applet/Makefile.am: s/GNOMEKEYRING/GNOME_KEYRING/.
- * gnome/applet/applet.c: nmwa_icons_init: make style local.
- * gnome/applet/passphrase-dialog.c: whitespace.
-
-2005-06-23 Robert Love <rml@novell.com>
-
- * src/NetworkManagerDevice.c: division in assignment was flipped.
-
-2005-06-23 David Zeuthen <david@fubar.dk>
-
- * gnome/applet/vpn-password-dialog.c (child_stdout_data_cb): Send a
- signal to the child to indicate that we got what we wanted when we
- see two new-lines right after each other.
- (nmwa_vpn_request_password): Pass a structure with several members
- instead of just the passwords
-
-2005-06-23 Dan Williams <dcbw@redhat.com>
-
- * src/NetworkManager.c
- src/NetworkManagerMain.h
- - (nm_get_hal_ctx): new function, move Hal initialization code here
- - (nm_hal_init): new function, init libhal context then add devices
- - (nm_hal_deinit): new function, clean up libhal context
- - (nm_data_free): Move Hal cleanup here
- - (main): check whether Hal is running, and if so, get a list of
- network devices from it
-
- * src/NetworkManagerDbus.c
- - (nm_dbus_signal_filter): trap NameOwnerChanged signals for Hal,
- and when it appears, get a list of network devices from it. If
- Hal goes away, clean up the libhal context
-
-2005-06-22 Robert Love <rml@novell.com>
-
- * dispatcher-daemon/NetworkManagerDispatcher.c: fix FIXME: check
- permissions of scripts before executing.
-
-2005-06-21 Robert Love <rml@novell.com>
-
- * initscript/SUSE/networkmanager: update.
- * src/backends/NetworkManagerSuSE.c: cleanup.
-
-2005-06-21 Robert Love <rml@novell.com>
-
- * gnome/applet/applet.c: use menu mnemonics.
- * gnome/applet/menu-items.c: (ditto)
-
-2005-06-21 Robert Love <rml@novell.com>
-
- * applet/applet-dbus-devices.c: mark non-static functions static.
- * applet/applet-dbus-vpn.c: (ditto)
- * applet/applet.c: (ditto)
- * applet/nm-device.h: (ditto)
- * applet/other-network-dialog.c: (ditto)
- * applet/passphrase-dialog.c: (ditto)
- * NetworkManager.c: (ditto)
- * NetworkManagerDbus.c: (ditto)
- * NetworkManagerDevice.c: (ditto)
- * NetworkManagerPolicy.c: (ditto)
- * NetworkManagerUtils.c: (ditto)
- * NetworkManagerWireless.c: (ditto)
- * NetworkManagerWireless.h: (ditto)
- * nm-netlink-monitor.c: (ditto)
- * applet/applet-dbus-info.c: (ditto), add FIXME's.
- * vpn-manager/nm-dbus-vpn.c: (ditto), remove shadowed variable.
- * autoip.c: include autoip.h.
- * autoip.h: new file. define get_autoip().
- * nm-netlink-monitor.h: define nm_netlink_close_connection().
- * NetworkManagerDbus.h: remove duplicate definitions.
-
-2005-06-20 Robert Love <rml@novell.com>
-
- * Makefile.am: Add missing intltool-foo.in generated files to
- EXTRA_DIST so that 'distcheck' works. Also add DISTCLEANFILES
- with the start of stuff to cleanup on 'distclea'.
- * configure.in: add AC_PROG_INTLTOOL macro so that we do the intltool
- stuff right and 'distcheck' works.
- * po/POTFILES.in: Remove examples/python/systray/eggtrayicon.c. If
- we keep it, we need to add all of examples/* to EXTRA_DIST and do
- Makefile.am for each. And systray/Makefile needs to be redone.
-
-2005-06-19 Dan Williams <dcbw@redhat.com>
-
- * src/NetworkManagerDevice.c
- - (nm_device_wireless_process_scan_results): scan every 20s when
- disconnected and scanning is ALWAYS_SCAN or WHEN_UNASSOCIATED
-
-2005-06-19 Dan Williams <dcbw@redhat.com>
-
- * WEXT_DEBUG->IOCTL_DEBUG, extend checking to all ioctl() calls
-
-2005-06-18 Ray Strode <rstrode@redhat.com>
-
- * src/nm-netlink-monitor.c
- (nm_netlink_monitor_event_handler): check for the presence
- of either error condition not both.
-
- (nm_netlink_monitor_error_handler): emit error signal if
- error occurs.
-
- (nm_netlink_monitor_event_handler),
- (nm_netlink_monitor_error_handler),
- (nm_netlink_monitor_disconnect_handler): if an
- assertion fails disconnect the event handler to prevent
- infinite loops.
-
- * src/nm-netlink-monitor.h: add new error condition
- NM_NETLINK_MONITOR_ERROR_WAITING_FOR_SOCKET_DATA
-
-2005-06-18 Ray Strode <rstrode@redhat.com>
-
- * src/nm-netlink-monitor.c
- (nm_netlink_monitor_event_handler): remove bogus < 0
- check on unsigned value and return early if the kernel
- didn't send any bytes.
-
-2005-06-17 Robert Love <rml@novell.com>
-
- * initscript/SUSE/networkmanager: Change the Provides and default
- run levels
-
-2005-06-16 Dan Williams <dcbw@redhat.com>
-
- Patch from Robert Love:
- * gnome/applet/applet.c
- - Beautify some applet menu item names
-
-2005-06-17 David Zeuthen <davidz@redhat.com>
-
- * gnome/vpn-properties/nm-vpn-ui-interface.h: Require users of this
- API to define NM_VPN_API_SUBJECT_TO_CHANGE to acknowledge API churn.
- Also add new methods can_export, import_file and export.
-
- * gnome/vpn-properties/nm-vpn-properties.glade: Add an Export button
- to the main UI
-
- * gnome/vpn-properties/nm-vpn-properties.c:
- Define NM_VPN_API_SUBJECT_TO_CHANGE so we can actually include
- nm-vpn-ui-interface.h.
- (update_edit_del_sensitivity): Also update "Export" sensitivity
- (add_vpn_connection): Also add new SVC_NAME column
- (import_settings): New function
- (retrieve_data_from_selected_connection): New function
- (edit_cb): Use retrieve_data_from_selected_connection to simplify
- this function
- (export_cb): New function
- (init_app): Also setup the "export" widget
- (main): Support the --import-service and --import-file commandline
- arguments
-
- * gnome/libnm_glib/libnm_glib.c (libnm_glib_dbus_filter): Also support
- D-BUS 0.34
-
-2005-06-16 Dan Williams <dcbw@redhat.com>
-
- Patch from Robert Love:
- * gnome/applet/menu-items.c
- - (network_menu_item_new): pass -1 as wireless network
- menu items height size request rather than ascent / 2
-
-2005-06-16 Dan Williams <dcbw@redhat.com>
-
- * Clean up wording in Wireless Scan Methods menu items and constants
-
-2005-06-16 Robert Love <rml@novell.com>
-
- * po/POTFILES.in
- - remove gtkcell* files
-
-2005-06-15 Dan Williams <dcbw@redhat.com>
-
- Patch from Robert Love: make the applet stetic
-
- * gnome/applet/Makefile.am
- - Don't compile the gtkcellview and gtkcellrendererprogress files
-
- * gnome/applet/gtkcellview.h
- gnome/applet/gtkcellview.c
- gnome/applet/gtkcellrendererprogress.h
- gnome/applet/gtkcellrendererprogress.c
- - Removed
-
- * gnome/applet/menu-items.c
- - Progress bars are 5:1 size ratio
- - Use GTK progress bars rather than internal ones
-
-2005-06-15 Dan Williams <dcbw@redhat.com>
-
- Patch from Robert Love:
- * initscript/SUSE/networkmanager
- - Fix typo
-
-2005-06-15 Dan Williams <dcbw@redhat.com>
-
- * src/backends/NetworkManagerSuSE.c
- src/backends/NetworkManagerRedHat.c
- src/backends/NetworkManagerDebian.c
- - (set_ip4_config_from_resolv_conf): Fix typo I made, '==' -> '='
-
-2005-06-15 Dan Williams <dcbw@redhat.com>
-
- * src/backends/NetworkManagerDebian.c
- - Add nm_system_device_get_use_dhcp() to debian backend
-
- Patch from Kay Sievers:
- * src/backends/NetworkManagerSuSE.c
- - Update debian backend for static IP nameservers
-
- * src/NetworkManagerDevice.c
- - Actually set the device to use static IP or DHCP rather
- than always DHCP
-
-2005-06-15 Dan Williams <dcbw@redhat.com>
-
- Patch from Thom May:
- * src/backends/NetworkManagerDebian.c
- - Update debian backend for static IP nameservers
-
-2005-06-15 Dan Williams <dcbw@redhat.com>
-
- Patches from Robert Love:
- * gnome/applet/wireless-applet.glade
- - Tighten up wording
-
- * src/NetworkManagerDevice.c
- - Remove misplaced ';'
-
- * configure.in
- initscript/Makefile.am
- initscript/SUSE/Makefile.am
- initscript/SUSE/networkmanager
- - Add SUSE initscript
-
-2005-06-12 David Zeuthen <davidz@redhat.com>
-
- * gnome/vpn-properties/nm-vpn-ui-interface.h: New file
-
- * gnome/vpn-properties/nm-vpn-properties.glade: New file
-
- * gnome/vpn-properties/nm-vpn-properties.c: New file
-
- * gnome/vpn-properties/Makefile.am: New file
-
- * src/vpn-manager/nm-vpn-manager.h: Rework prototypes to take an
- array of passwords
-
- * src/vpn-manager/nm-vpn-manager.c
- (nm_vpn_manager_activate_vpn_connection): Take an array of passwords
- instead of just a single one
-
- * src/vpn-manager/nm-dbus-vpn.c:
- (nm_dbus_vpn_get_vpn_connection_properties): Also append service_name
- here
- (nm_dbus_vpn_activate_connection): Rework to take an array of passwords
-
- * gnome/applet/vpn-password-dialog.h (nmwa_vpn_request_password):
- Change the interface here to give a list of passwords. Also, don't
- require username, but do require service
-
- * gnome/applet/vpn-password-dialog.c: Look up the VPN .name files for
- the binary for the auth-dialog and use that instead of putting up a
- dialog asking for a single password
-
- * gnome/applet/vpn-connection.[ch]: Don't remember the user_name,
- however do remember the service
-
- * gnome/applet/main.c (main): Setup i18n
-
- * gnome/applet/applet.c (nmwa_update_state): Add a line "VPN
- connection to '%s'" to the tooltip if we are connected using VPN
- (nmwa_menu_vpn_item_activate): Check last_attempt_success gconf
- key to determine whether we the auth-dialog needs to
- reprompt. Also cope with the fact that the auth-dialog now returns
- an array of passwords.
- (nmwa_menu_configure_vpn_item_activate): New handler for
- "Configure VPN..." menu item
- (nmwa_menu_add_vpn_menu): Add the "Configure VPN..." menu item
- (is_vpn_available): New function to determine if we got any
- NM-compatible VPN software installed
- (nmwa_menu_add_devices): Use is_vpn_available to add VPN menu
- items only if we have NM-compatible VPN software installed
- (nmwa_gconf_vpn_connections_notify_callback): Slightly rework the
- logic for detecting when VPN connections are removed
-
- * gnome/applet/applet-dbus.h: Removed the prototypes for
- nmwa_dbus_vpn_activate_connection, nmwa_dbus_vpn_deactivate_connection
- since these are defined elsewhere
-
- * gnome/applet/applet-dbus.c (set_vpn_last_attempt_status): New
- function used to keep track of whether the last attempt succeded
- (nmwa_dbus_filter): Update last_attempt according to whether the
- VPN connection could be established or not
-
- * gnome/applet/applet-dbus-vpn.h (nmwa_dbus_vpn_deactivate_connection):
- Change prototype to take an array of passwords, not just a single
- password
-
- * gnome/applet/applet-dbus-vpn.c (nmwa_dbus_vpn_properties_cb): Only
- update service, not user
- (nmwa_dbus_vpn_remove_one_vpn_connection): Check that applet->
- dbus_active_vpn_name is not NULL before using it
- (nmwa_dbus_vpn_activate_connection): Send the passwords as a
- string array instead of assuming a single password
-
- * gnome/applet/applet-dbus-info.c:
- (nmi_dbus_get_vpn_connection_properties): Use the logged in user for
- user name; don't read from gconf
-
- * gnome/applet/Makefile.am: Also export SYSCONFDIR and
- VPN_NAME_FILES_DIR
-
- * gnome/Makefile.am (SUBDIRS): Add vpn-properties
-
- * configure.in: Add checks for gmodule-2.0.
- Generate gnome/vpn-properties/Makefile. Don't generate any Makefile's
- in vpn-daemons nor vpn-daemons/vpnc. We have separate autotooled
- projects under vpn-daemons now. See vpn-daemons/vpnc/Changelog
- for details
-
- * vpn-daemons/Makefile.am: Removed
-
- * vpn-daemons/README: New file to describe extensions points for VPN
- software
-
-2005-06-10 Dan Williams <dcbw@redhat.com>
-
- * src/backends/NetworkManagerRedHat.c
- - (get_current_profile_name): new function, grab current network profile name from
- /etc/sysconfig/network
- - (set_ip4_config_from_resolv_conf): new function, parse a resolv.conf and
- update an IP4 Config structure's settings from it
- - (nm_system_device_get_system_config): if we're using static IP on this device,
- get DNS info from current network profile
-
-2005-06-09 Dan Williams <dcbw@redhat.com>
-
- Patch from Robert Love:
- * src/NetworkManagerDevice.c
- src/NetworkManagerUtils.c
- - 64-bit build fixes
-
-2005-06-09 Dan Williams <dcbw@redhat.com>
-
- Patch from Kay Sievers and Robert Love:
- * configure.in
- src/backends/Makefile.am
- src/backends/NetworkManagerSuSE.c
- - Add SuSE support
-
-2005-06-09 Dan Williams <dcbw@redhat.com>
-
- * NetworkManager.h
- - Add NMWirelessScanMethod enum for scan methods
-
- * gnome/applet/applet-dbus-devices.c
- - (nmwa_dbus_update_scanning_enabled_cb): remove
- - (nmwa_dbus_update_scanning_enabled): remove
- - (nmwa_dbus_update_devices): don't call nmwa_dbus_update_scanning_enabled() anymore
- since it got removed
- - (nmwa_dbus_enable_scanning): remove
-
- * gnome/applet/applet-dbus-info.c
- - (nmi_dbus_signal_update_scan_method): new function, signal NetworkManager to
- update the wireless scanning method from NMI
- - (nmi_dbus_get_wireless_scan_method): new function, return wireless scanning
- method value to NetworkManager
- - (nmi_dbus_info_message_handler): respond to the "getWirelessScanMethod" method call
-
- * gnome/applet/applet-dbus-info.h
- - Add prototype for nmi_dbus_signal_update_scan_method
-
- * gnome/applet/applet.c
- - (scanning_menu_update): new function, update one GtkCheckMenuItem from the
- Wireless Scanning menu based on current wireless scan method
- - (nmwa_menu_scanning_item_activate): new function, callback for GTK "activate"
- signal for Wireless Scanning menu items, tell NetworkManager the new method
- and update our menu items to make sure the right one is checked
- - (nmwa_set_scanning_enabled_cb): remove
- - (nmwa_context_menu_update): remove references to pause_scanning_item
- - (nmwa_context_menu_create): remove pause_scanning_item, and add new Wireless
- Scanning menu item
- - (nmwa_gconf_get_wireless_scan_method): new method, pull wireless scanning method
- from GConf
- - nmwa_gconf_networks_notify_callback -> nmwa_gconf_info_notify_callback: generalize
- so we get notified of preference values too
- - (nmwa_get_instance): monitor GCONF_PATH_WIRELESS rather than GCONF_PATH_WIRELESS_NETWORKS
-
- * gnome/applet/applet.h
- - GCONF_PATH_WIRELESS added, one level below GCONF_PATH_WIRELESS_NETWORKS
- - Add wireless scan method member to applet data
- - Remove pause_scanning_item, add Wireless Scanning submenu
-
- * src/NetworkManager.c
- - (nm_data_new): default to NM_SCAN_METHOD_ON
- - (main): grab scanning method from NMI if we can
-
- * src/NetworkManagerDbus.c
- - (nm_dbus_update_wireless_scan_method_cb): new function, callback from
- nm_dbus_update_wireless_scan_method()
- - (nm_dbus_update_wireless_scan_method): new function to grab scanning method
- from NMI
- - (nm_dbus_nmi_is_running): redundant function, removed
- - (nm_dbus_signal_filter): trap "WirelessScanMethodUpdate" signal, grab scanning method
- when NMI comes back
-
- * src/NetworkManagerDevice.c
- - (nm_device_is_activated): return TRUE if the device is activated
- - (nm_device_wireless_scan): don't scan if the scan method is OFF, or if its AUTO
- and we are activated
-
- * src/nm-dbus-nm.c
- - (nm_dbus_nm_set_scanning_enabled): removed
- - nm_dbus_nm_get_scanning_enabled -> nm_dbus_nm_get_wireless_scan_method
- - (nm_dbus_nm_methods_setup): remove [get | set] ScanningEnabled and add "getWirelessScanMethod"
-
-2005-06-09 Dan Williams <dcbw@redhat.com>
-
- * NetworkManager.h
- src/vpn-manager/nm-vpn-service.c
- - NM_VPN_STATE_ERROR -> NM_VPN_STATE_UNKNOWN (more consistent with other enums)
-
-2005-05-27 Dan Williams <dcbw@redhat.com>
-
- * vpn-daemons/vpnc/nm-vpnc-service.c
- - (vpnc_watch_cb): wait a bit before trying to read vpnc's pidfile.
- Should fix the bug where the VPN connection terminates the first time.
-
-2005-05-20 Dan Williams <dcbw@redhat.com>
-
- * NetworkManager.h
- - Differentiate VPN config signals between bad VPN config options
- and bad IP config
-
- * gnome/applet/applet-dbus-info.h
- - Add prototypes for wireless network and vpn connection update functions
-
- * gnome/applet/applet-dbus.c
- - (nmwa_dbus_filter): trap new VPN config error signals from NetworkManager
-
- * gnome/applet/applet.c
- - (nmwa_schedule_vpn_failure_dialog): new dialog text for new VPN config
- error signals
- - (nmwa_gconf_networks_notify_cb): re-enable wireless network change notify
- propogation to NetworkManager
- - (nmwa_gconf_vpn_connections_notify_cb): re-enable vpn connection change
- notify propogation to NetworkManager
-
- * src/NetworkManagerDbus.c
- - (nm_dbus_update_one_allowed_network): make sure to specify which AP list we
- are updating so a network can be removed from it if necessary
-
- * src/vpn-manager/nm-vpn-manager.c
- - (nm_vpn_manager_process_signal): trap new vpn config error signals
-
- * vpn-daemons/vpnc/nm-vpnc-service.c
- - (nm_vpnc_dbus_signal_failure): generalize function for all VPN error signals
- - (nm_vpnc_dbus_signal_launch_failed): remove
- - (nm_vpnc_dbus_signal_connect_failed): remove
- - (nm_vpnc_helper_timer_cb): update for new generalized error signal function
- - (nm_vpnc_schedule_helper_timer): increase timeout to 10s
- - (vpnc_watch_cb): don't whine about exit code if vpnc exited cleanly, update
- for new generalized error signal function, remove config file stuff
- - (nm_vpnc_start_vpnc_binary): grab a stdin pipe to vpnc after spawning it so
- we can write configuration options to it
- - (nm_vpnc_config_file_generate): removed
- - (nm_vpnc_config_write): write configuration options to the vpnc stdin pipe
- - (nm_vpnc_config_options_validate): validate the config options we receive
- from NetworkManager to block potential exploits
- - (nm_vpnc_dbus_handle_start_vpn): call option validation function before
- starting vpnc
- - (nm_vpnc_dbus_process_helper_config_error): actually propogate config error
- to NetworkManager
-
-2005-05-16 Dan Williams <dcbw@redhat.com>
-
- * vpn-daemons/vpnc/nm-vpnc-service-vpnc-helper.c
- - (main): Work correctly with vpnc 0.3.3 by exiting if the "reason" code
- is not "connect"
-
-2005-05-16 Dan Williams <dcbw@redhat.com>
-
- Patch from Tomislav Vujec <tvujec@redhat.com>
- * gnome/applet/applet-dbus-info.c
- - (nmi_dbus_get_vpn_connection_routes): new function, pull routes out of
- GConf and pass them to NetworkManager. New key is 'routes' under
- the VPN connection, and should be a string list
-
- * src/NetworkManagerSystem.c
- - (nm_system_vpn_device_set_from_ip4_config): if user-defined routes exist,
- set them on the device when we set the rest of the VPN config. Ensure
- they are in the correct format since they are passed directly to the
- command line.
-
- * src/backends/NetworkManagerRedHat.c
- src/backends/NetworkManagerDebian.c
- - (nm_system_device_add_route_via_device_with_iface): new function
-
- * src/vpn-manager/nm-dbus-vpn.c
- - (nm_dbus_vpn_get_routes): grab VPN routes from NetworkManagerInfo
-
- * src/vpn-manager/nm-vpn-manager.c
- - (nm_vpn_manager_handle_ip4_config_signal): grab routes from NMI and pass
- them into the IP4 config functions
-
-2005-05-15 Dan Williams <dcbw@redhat.com>
-
- From Filip Miletic:
- * po/sr.po
- po/sr@Latn.po
- configure.in
- - Serbian translation added
-
-2005-05-15 Dan Williams <dcbw@redhat.com>
-
- * dispatcher-daemon/NetworkManagerDispatcher.c
- - (main): sync arguments with NetworkManager and the applet, now use
- "--no-daemon" rather than "daemon=no"
- - (nmd_print_usage): Fix script path in usage message
-
-2005-05-15 Dan Williams <dcbw@redhat.com>
-
- * src/NetworkManagerDevice.[ch]
- src/NetworkManagerPolicy.c
- src/NetworkManager.c
- src/nm-dbus-nm.c
- - Remove the "just_added" parameter from nm_device_deactivate(). We no
- longer send the DeviceNoLongerActive signal unconditionally, but only
- when the device is actually active.
-
- * dispatcher-daemon/NetworkManagerDispatcher.c
- - (nmd_execute_scripts): convert to GLib directory functions from opendir(),
- and simplify the logic
- - (nmd_get_device_name): copy value from dbus reply so we don't segfault when
- we free it later on
-
- * initscript/RedHat/Makefile.am
- initscript/RedHat/NetworkManagerDispatcher
- - Add initscript for NetworkManagerDispatcher
-
-
- Patch from Bill Moss:
- * dispatcher-daemon/NetworkManagerDispatcher.c
- - Remove IP4AddressChange signal code including nmd_get_device_ip4_address()
-
- * src/NetworkManagerDbus.c
- - (nm_dbus_signal_device_ip4_address_change): remove. If the device goes up,
- and DeviceNowActive gets signaled, then the device has a new IP address
- anyway. There's no need for a separate signal.
-
- * src/NetworkManagerDevice.c
- - (nm_device_update_ip4_address): Don't send IP4AddressChange signal
-
- * src/NetworkManagerPolicy.c
- - (nm_policy_activation_finish): Send DeviceNowActive signal when the device
- activates successfully. This kind of went missing when I reworked the
- activation code.
-
-2005-05-15 Dan Williams <dcbw@redhat.com>
-
- * configure.in
- - Check for dhcdbd and error if its not found
-
- * src/dhcp-manager/Makefile.am
- src/dhcp-manager/nm-dhcp-manager.c
- - Use path to dhcdbd that configure found
-
-2005-05-14 Dan Williams <dcbw@redhat.com>
-
- * gnome/applet/nm-device.c
- - (network_device_sort_wireless_networks, sort_networks_function): New functions to
- sort wireless networks alphabetically
-
- * gnome/applet/applet-dbus-devices.c
- - (mwa_dbus_devices_lock_and_copy): Sort network device's wireless network lists
- before copying them over to the GUI
-
-2005-05-14 Dan Williams <dcbw@redhat.com>
-
- * src/NetworkManager.c
- - (device_stop_and_free): Deactivate VPN connections before deactivating devices,
- fixes a deadlock on shutdown with a VPN connection active. This function locks
- the device list, as does nm_get_active_device() which is called from
- nm_vpn_manager_deactivate_vpn_connection().
-
-2005-05-14 Dan Williams <dcbw@redhat.com>
-
- * NetworkManager.h
- - Add signals for VPN Launch and Connect failures
-
- * gnome/applet/applet-dbus.c
- - (nmwa_dbus_filter): Trap new VPN launch & connect failure signals
-
- * gnome/applet/applet.c
- - (nmwa_show_vpn_failure_dialog): generalize old nmwa_show_vpn_login_failure_dialog()
- function to handle all VPN failure messages
- - (nmwa_schedule_vpn_failure_dialog): generalize old nmwa_schedule_vpn_login_failure_dialog()
- function to hanlde all VPN failure messages
- - (show_warning_dialog): work around focus-stealing prevention
-
- * gnome/applet/other-network-dialog.c
- gnome/applet/passphrase-dialog.c
- - (update_button_cb): Make sure the OK button is enabled when it should be, fixes
- problem where it never enabled for ASCII Key and Hex Key types
-
- * gnome/applet/wireless-applet.glade
- - Add window title to Other Wireless Network Dialog
-
- * src/vpn-manager/nm-dbus-vpn.c
- - (nm_dbus_vpn_signal_vpn_failed): generalize old nm_dbus_vpn_signal_vpn_login_failed()
- function to handle all VPN failure messages
-
- * src/vpn-manager/nm-vpn-manager.c
- - (nm_vpn_manager_process_signal): trap and proxy VPN launch & connect failure signals too
-
- * vpn-daemons/vpnc/nm-vpnc-service.c
- - (nm_vpnc_dbus_signal_launch_failed): new function
- - (nm_vpnc_dbus_signal_connect_failed): new function
- - (nm_vpnc_helper_timer_cb): signal connect failure on timeout
- - (vpnc_watch_cb): signal connection failure when vpnc exits with connection failure
- - (nm_vpnc_start_vpnc_binary): search a number of locations for vpnc
- - (nm_vpnc_dbus_handle_start): send launch failure signal when we fail to launch vpnc
-
-2005-05-11 Dan Williams <dcbw@redhat.com>
-
- * vpn-daemons/vpnc/nm-vpnc-service.c
- - (nm_vpnc_start_vpnc_binary): NULL-ify GError before using it
- - (nm_vpnc_config_file_generate): Attempt to ensure that the path for the config
- file exists before trying to write it out.
-
-2005-05-10 Dan Williams <dcbw@redhat.com>
-
- * gnome/applet/applet-dbus-device.c
- - (nmwa_dbus_set_device): remove check for valid key and key type, which
- prevented just entering ESSID and leaving key and key type up to
- NetworkManager (which should have them already cached)
-
-2005-05-08 Dan Williams <dcbw@redhat.com>
-
- * src/NetworkManagerPolicy.c
- - (nm_policy_activation_finish): Don't set NM_ACT_STAGE_ACTIVATED here, instead...
- - (nm_policy_schedule_activation_finish): Set NM_ACT_STAGE_ACTIVATED here to
- fix a situation where NM is told to terminate and the device stops activation,
- but the main thread isn't aware of that because it would never have run
- nm_policy_activation_finish() to set the ACTIVATED flag, because the main loop
- had already quit.
-
- * src/NetworkManagerDevice.c
- - (nm_device_probe_wired_link_state): cosmetic fixes
- - (nm_device_activate_stage5_ip_config_commit): Don't check link state if
- we've failed to activate or been canceled.
- - (nm_ac_test): nm_debug -> nm_info for "waiting for device to cancel" message
-
-2005-05-08 Dan Williams <dcbw@redhat.com>
-
- * src/NetworkManagerWireless.c
- - (nm_wireless_qual_to_percent): Fix #if -> #ifdef, print out the "updated"
- value of WEXT quality structures, and add a debug message when we cannot
- determine any quality % at all
-
-2005-05-08 Dan Williams <dcbw@redhat.com>
-
- * src/dhcp-manager/nm-dhcp-manager.c
- - (nm_dhcp_manager_begin_transaction): Tell dhclient to release leases when
- it goes down.
-
-2005-05-06 Dan Williams <dcbw@redhat.com>
-
- * gnome/applet/applet-dbus-device.c
- gnome/applet/applet-dbus-info.c
- gnome/applet/applet-dbus.c
- gnome/applet/applet.c
- gnome/applet/applet.h
- - (nmwa_get_device_for_nm_device) -> (nmwa_get_device_for_nm_path)
-
- * gnome/applet/applet-dbus.c
- - (nmwa_dbus_filter): trap DeviceCarrierOn/DeviceCarrierOff signals
- so we notice when wired device's carriers come back on. Should
- fix issue with wired devices being grayed out even if the cable
- is in, for devices that support carrier detection.
-
- * gnome/applet/applet.c
- - (nmwa_driver_notify): bash focus-stealing prevention in the face
- - (nmwa_act_stage_to_pixbuf): Clarify wireless ACT_STAGE_DEVICE_CONFIG
- tooltip message
- - (nmwa_menu_item_activate, nmwa_menu_add_device_item, nmwa_menu_item_data_free):
- Fix situation where applet wouldn't respond to menu selections
-
- * src/NetworkManager.c
- src/NetworkManagerDevice.c
- src/NetworkManagerDbus.c
- src/NetworkManagerDbus.h
- - (nm_dbus_signal_device_status_change) -> (nm_dbus_schedule_device_status_change_signal)
-
- * src/NetworkManagerDbus.c
- - (nm_dbus_send_network_not_found, nm_dbus_schedule_network_not_found_signal):
- Remove, no longer used or relevant
- - (nm_dbus_signal_device_status_change): Better signal enum->string matching
- - (nm_dbus_schedule_device_status_change_signal): add
-
- * src/NetworkManagerDevice.c
- - (nm_device_worker_thread_stop): don't try to join a NULL worker thread
- - (nm_device_set_link_active): Fix up switching for non-carrier-detect devices,
- ie don't deactivate them unless explicitly told to by the user. Also send
- CARRIER_OFF / CARRIER_ON signals when link changes
- - (nm_device_set_essid, nm_device_set_enc_key, nm_device_is_up, nm_device_set_mode):
- Don't print error message when device is no longer around
- - (nm_device_deactivate): kill any current DHCP process attached to this device,
- not just during activation
-
- * src/NetworkManagerPolicy.c
- - (nm_policy_auto_get_best_device): Ignore semi-supported devices completely from
- auto-device-selection.
- - (nm_policy_device_change_check): Don't interrupt semi-supported devices
-
- * src/NetworkManagerSystem.c
- - (nm_system_device_set_up_down_with_iface): Quiet first warning message when device
- is no longer present (Bill Moss)
-
- * src/backends/shvar.c
- - (svOpenFile): Open read-only to make SELinux happy
-
- * src/backends/NetworkManagerRedHat.c
- - (nm_system_device_get_system_config): Use SYSCONFDIR rather than hardcoding
- the path to the ifcfg-* files
-
-2005-05-05 Dan Williams <dcbw@redhat.com>
-
- * Expose activation stages to NetworkManager clients, like the applet
- * Add Diana's progress icons to the applet, cued off NM activation stage
- * Use more descriptive tooltips, cued off NM activation stage
-
-2005-05-05 Ray Strode <rstrode@redhat.com>
-
- * src/nm-netlink-monitor.c:
- - Use clear_event_source instead of g_nullify_pointer() again.
-
-2005-05-05 Dan Williams <dcbw@redhat.com>
-
- * gnome/applet/main.c
- - Fix session management so the applet is actually managed now
-
- * gnome/applet/passphrase-dialog.c
- - (nmi_passphrase_dialog_show): bash focus-stealing prevention in the face
-
-2005-05-05 Dan Williams <dcbw@redhat.com>
-
- Patch from Bill Moss:
- * gnome/libnm_glib/libnm_glib.c
- - Fix for dbus-0.33
-
-2005-05-05 Dan Williams <dcbw@redhat.com>
-
- Suggestion from Bill Moss:
- * src/NetworkManagerSystem.c
- - (nm_system_device_set_up_down_with_iface): ignore ENODEV
-
-
- * src/NetworkManager.c
- - (nm_data_free): move destruction of the various managers after
- release of device list, because deactivating and freeing a device
- requires at least the named manager
- - (nm_poll_and_update_wireless_link_state):
- (nm_device_link_activated):
- (nm_device_link_deactivated):
- don't grab the device list lock when actually updating device
- link status or strength, since nm_device_set_link_active()
- needs to call nm_get_active_device(), which also locks the device list.
-
- * src/NetworkManagerDevice.c
- - (nm_device_set_link_active): if a device's link switches from off->on,
- and it's wired, and the active device is wireless (or there is no
- active device), activate the new device whose link just came on
- - (link_to_specific_ap): try to smooth over intermittency in wireless links
- my only calling the link to the current ap "failed" when more than 2
- consecutive link checks have failed
-
-2005-05-04 Dan Williams <dcbw@redhat.com>
-
- * src/NetworkManagerDevice.c
- - (nm_device_probe_wireless_link_state): don't lock the scan mutex here
- but let link_to_specific_ap() do the locking where it needs
-
- Patch from Bill Moss:
- * src/NetworkManagerSystem.c
- - Set MTU of VPN devices to 1412
-
-2005-05-04 Dan Williams <dcbw@redhat.com>
-
- * Remove NM_STATE_SCANNING from NetworkManager.h and applet code
-
- * Fix some holes in device activation and retaining the currently connected
- access point
-
-2005-05-03 Dan Williams <dcbw@redhat.com>
-
- * Kill dhcpcd. We now use "dhcdbd", a dbus daemon that controls dhclient.
- This means that NetworkManager shouldn't have DHCP issues anymore. It also
- means you need dhcdbd, which you can get here (get the latest one):
-
- http://people.redhat.com/jvdias/dhcdbd/
-
- Technically NetworkManager can use any DHCP daemon that uses the same DBUS
- interface as dhcdbd.
-
- * Rewrite device activation to facilitate the new DHCP infrastructure and
- future improvements. Its now "activation request" based, ie there is a single
- activation request composed of the device, access point, and other info which
- follows the entire activation process. There are 5 stages of the activation
- process which correspond to:
-
- 1) Device preparation
- 2) Device configuration (bring it up, set ESSID/Key/etc)
- 3) IP Config Start (fire off DHCP if we're using it)
- 4) IP Config Get (grab config from DHCP or static config files)
- 5) IP Config Commit (set device's IP address, DNS, etc)
-
- Note that there is no longer a "scanning" step, since the access point must
- be known _before_ activation starts. If the access point drops out or does
- not exist for some reason, the entire activation process fails and must be
- restarted for a different access point or device.
-
- Patch from Bill Moss:
- * gnome/applet/applet.c
- - Fix type of vpn_failure dialog -> vpn_banner dialog
-
-2005-04-27 Dan Williams <dcbw@redhat.com>
-
- * gnome/applet/applet-dbus-vpn.c
- gnome/applet/applet.c
- gnome/applet/applet.h
- - Fix up active VPN handling so that we reliably know when a VPN
- connection has been deactivated
-
- * src/vpn-manager/nm-vpn-manager.c
- - Remove duplicate VPNConnectionChange signal
-
-2005-04-27 Dan Williams <dcbw@redhat.com>
-
- Patch from Peter Jones:
- * Remove usage of varargs to fix crashes on PPC (RH #154336)
-
- Patch from Bill Moss:
- * src/NetworkManagerSystem.c
- - Fix checking of return value from ioctl()
-
-2005-04-27 Dan Williams <dcbw@redhat.com>
-
- * Fix choosing of wireless networks and "Other wireless network..." from the applet
- * Warn and exit if icons cannot be found
-
-2005-04-27 Dan Williams <dcbw@redhat.com>
-
- Patch from Tom Parker:
- * Update debian backend
-
-2005-04-27 Dan Williams <dcbw@redhat.com>
-
- * Merge the applet and the info-daemon, and move the converged
- applet under gnome/applet
- * Move libnm_glib to gnome/libnm_glib
- * Convert most dbus calls between the applet, info-daemon, and NM
- into async calls
- * Fix a few things valgrind noticed
- * Make NM broadcast state more reliably
-
-2005-04-22 Pawan chitrakar <pawan@nplinux.org>
-
- * configure.in: Added ne in ALL_LINGUAS
-
-2005-04-15 Dan Williams <dcbw@redhat.com>
-
- * libnm_glib/libnm_glib: Fix up for dbus-0.32, and remove
- code for dbus 0.2x versions
-
-2005-04-15 Dan Williams <dcbw@redhat.com>
-
- Patches from Tom Parker:
- - Fix memleaks
- - Join with worker thread rather than polling for its exit
-
- Patch from Bill Moss:
- - Cull duplicate ESSIDs from the scan list, taking highest strength AP
-
-2005-04-15 Dan Williams <dcbw@redhat.com>
-
- - Fixes to pass 'make distcheck'
-
-2005-04-15 Dan Williams <dcbw@redhat.com>
-
- Initial VPN Support
- - supports 'vpnc'
- - reworks device IP configuration, backend files have changed and will need
- to be updated for all distributions. I will try to do what I can for
- them, but I cannot test them.
-
- - Move named directory to src/named-manager
- - Make backends directory self-contained
-
-2005-04-06 Dan Williams <dcbw@redhat.com>
-
- Add debug code for socket/file descriptor leaks. We register every socket
- that we open (except for stuff in dhcpcd/) for tracking, and print out the
- list of sockets that we forgot to close on shutdown. This also consolidates
- about 4 places where we opened sockets into 1 function in NetworkManagerUtils.c
-
-2005-04-06 Dan Williams <dcbw@redhat.com>
-
- * dhcpcd/dhcpcd.c
- - (dhcp_interface_free): fix a file descriptor leak that may have
- caused network drivers to not unload due to refcounts > 0
-
-2005-04-04 Dan Williams <dcbw@redhat.com>
-
- * panel-applet/NMWirelessAppletDbus.c
- - (nmwa_dbus_call_nm_method): remove some commented code
-
- * src/NetworkManagerAPList.[ch]
- - (nm_ap_list_remove_ap_by_essid): new function
-
- * src/NetworkManagerDevice.c
- - (nm_device_wireless_force_use): remove access points from the ignore list
- when the user forces them
-
- * src/nm-dbus-device.c
- - (nm_dbus_device_get_active_network): fix up escaping of object paths
-
-2005-04-04 Dan Williams <dcbw@redhat.com>
-
- Patch from Tom Parker: include "nm-utils.h" for backend files that need it
-
-2005-04-04 Dan Williams <dcbw@redhat.com>
-
- * src/NetworkManagerDevice.c:
- - (nm_completion_scan_has_results): restore pre-completion-patch behavior
- of only erroring after the second consecutive scan times out. Also
- don't exit when the card requires more time than we can give it, just
- log the event and continue.
-
-2005-04-01 Steve Murphy <murf@e-tools.com>
-
- * configure.in: Added "rw" to ALL_LINGUAS.
-
-2005-04-01 Dan Williams <dcbw@redhat.com>
-
- Perform scans during device activation, if needed. Both activation
- and scans run in the same GMainContext. Therefore, if an access point
- is not found by the time the device starts activation, it will not
- be available until after activation. We now try to scan during
- activation (in nm_wa_test) every 15s so that all available access
- points are more likely to be found and available for the activation
- procedure.
-
- Also change nm_wireless_link_state_handle() to only update the "best"
- AP if we are not forcing a device and if we are not about to change
- state. This attempts to work around a race when forcing a device,
- where the forced AP would get cleared out too soon by the link state
- checking timeout in the main thread, and the activation attempt with
- that AP would fail.
-
-2005-04-01 Dan Williams <dcbw@redhat.com>
-
- * po/POTFILES.in
- - Update with new translatables
-
-2005-03-31 Dan Williams <dcbw@redhat.com>
-
- * panel-applet/NMWirelessAppletDbus.c
- - Fix device names now that hal has changed device parenting for
- network devices.
-
-2005-03-31 Dan Williams <dcbw@redhat.com>
-
- Tighten up handling of wireless devices that don't support wireless
- scanning (ie, Orinoco). Due to restructuring of code, these devices
- hadn't been doing pseudo-scanning for a while either and would just
- spin waiting for an access point. They are now manual devices where
- the user must choose the access point from the menu every time. All
- "allowed" access points are listed in the applet's menu regardless
- of whether or not they can be seen by the card, since it can't scan
- anyway.
-
- * src/NetworkManager.c
- - (nm_wireless_link_state_handle): new function, but only update
- the "best" ap for non-scanning devices when its not activating,
- and when no device is being forced on the card
- - (nm_link_state_monitor): split wireless link state handling out
- into separate function
-
- * src/NetworkManagerDevice.c
- - (nm_device_copy_allowed_to_dev_list): new function
- - (nm_device_new): populate non-scanning cards' AP lists with
- access points from the "allowed" list
- - (nm_device_new): don't start a scanning timeout for devices that
- can't scan
- - (nm_device_activation_schedule_finish): new parameter, should be
- the AP that failed to be connected to, pass it on to the
- activation finish function in NetworkManagerPolicy.c
- - (nm_device_activate_wireless): don't ever try to get a new AP
- for non-scanning devices, just fail. The user must choose
- a new access point manually.
- - (nm_device_activate): grab the AP that failed connection and
- pass it on
- - (nm_device_update_best_ap): Clear the best AP if we don't have
- a link to it, user must manually choose a new one
- - (nm_device_do_pseudo_scan): remove function
- - (nm_device_wireless_process_scan_results): remove bits for non-
- scanning cards since they never get here
- - (nm_device_wireless_scan): remove bits for non-scanning devices,
- and fake the scan list for test devices a bit earlier
-
- * src/NetworkManagerPolicy.c
- - (nm_policy_activation_finish): use the failed_ap that we get
- passed rather than getting the best_ap from the card, which
- may have changed since we were scheduled
- - (nm_policy_allowed_ap_list_update): for non-scanning devices,
- update their scan list directly from the allowed list when
- we get updates to the allowed list from NetworkManagerInfo
-
- * src/NetworkManagerPolicy.h
- - New member for failed access point in NMActivationResult
-
- -------------------------------------
-
- Driver Notification patch: notifies the user when their driver
- sucks. Gives them the option to ignore further insertions
- of the card that has the sucky driver.
-
- * NetworkManager.h
- - Remove the SEMI_SUPPORTED member from the NMDriverSupportLevel
- enum and replace it with NO_CARRIER_DETECT and
- NO_WIRELESS_SCAN
-
- * panel-applet/NMWirelessApplet.[ch]
- - Merge essid.glade -> wireless-applet.glade
- - Implement the "Your driver sucks" notification dialog
-
- * panel-applet/NMWirelessAppletDbus.c
- - Change stuff from getSupportsCarrierDetect->getDriverSupportLevel
- - Grab hardware address for each device from NM too
- - Check whether the driver for each device sucks or not whenever
- a new device is noticed
-
- * panel-applet/NMWirelessAppletOtherNetworkDialog.c
- - Deal with stuff being in wireless-applet.glade now rather than essid.glade
-
- * src/NetworkManager.c
- - Fix a double-unref on device removal
-
- * src/NetworkManagerUtils.c
- - Set appropriate driver support level on a device that doesn't
- support scanning or carrier detection
-
- * src/nm-dbus-device.c
- - New "getHWAddress" dbus method on devices
- - getSupportsCarrierDetect -> getDriverSupportLevel
-
-2005-03-31 Dan Williams <dcbw@redhat.com>
-
- * src/NetworkManagerDevice.c
- - (nm_device_wireless_scan): Fix leak of scan results in some
- instances
-
-2005-03-29 Dan Williams <dcbw@redhat.com>
-
- * src/NetworkManager.c
- - (nm_poll_and_update_wireless_link_state): make code less indented
-
- Patch from Bill Moss:
- * src/NetworkManager.c
- - (nm_device_update_link_state): Update signal strength on wireless
- devices every time we update link state too.
-
-2005-03-29 Dan Williams <dcbw@redhat.com>
-
- * src/NetworkManagerDevice.c
- - (nm_device_set_essid): Work around Orinoco cards which need
- extra time after setting the ESSID
-
-2005-03-29 Dan Williams <dcbw@redhat.com>
-
- * src/NetworkManagerDevice.c
- - Merge one more bit of Peter Jones' completion patch
-
-2005-03-29 Dan Williams <dcbw@redhat.com>
-
- * src/NetworkManagerDevice.c
- - (nm_device_force_use): Fix possible segfault
-
-2005-03-29 Dan Williams <dcbw@redhat.com>
-
- * src/NetworkManagerDevice.c
- - Use iw_get_ext() where we should rather than iw_set_ext()
-
-2005-03-29 Dan Williams <dcbw@redhat.com>
-
- * src/NetworkManagerDevice.c
- - (nm_device_set_up_down): remove check for unsupported devices
- that caused NM to not bring devices up when they were
- added to the device list.
-
-2005-03-28 Dan Williams <dcbw@redhat.com>
-
- * src/NetworkManagerDevice.c
- - (mdio_read): Fix two bugs that caused all devices to fail
- the MII carrier detection support checks
-
-2005-03-26 Dan Williams <dcbw@redhat.com>
-
- * src/NetworkManagerDevice.c
- - (nm_device_wireless_scan): Remove duplicated scanning code
-
-2005-03-25 Dan Williams <dcbw@redhat.com>
-
- * panel-applet/NMWirelessApplet.c
- - (nmwa_about_cb): Add some more contributors
- - (nmwa_update_state): show the applet when there's no connection
- - Enable the "Stop/Resume all wireless devices" option in the
- context menu
- - New "no connection" icon
-
- * src/NetworkManager.c
- - (nm_poll_and_update_wireless_link_state): don't do anything if
- wireless is disabled or we're asleep
-
- * src/NetworkManagerDHCP.c
- - Remove trailing "\n" on debug messages
-
- * src/NetworkManagerDbus.c
- - (nm_dbus_network_status_from_data): new state "asleep"
-
- * src/NetworkManagerDevice.c
- - Merge most of Peter Jones' "completion" patch that greatly reduces
- latency and wait times for most operations
- - (nm_device_wireless_scan): Don't scan when asleep
-
- * src/NetworkManagerPolicy.c
- - (nm_policy_get_best_device): return no device when asleep
- - (nm_policy_allowed_ap_list_update): From Bill Moss: merge properties
- for all wireless devices on update, not just active device
-
- * src/NetworkManagerUtils.c
- - Merge Peter Jones' "completion" patch
-
- * src/nm-dbus-nm.c
- - (nm_dbus_nm_set_wireless_enabled): bring down wireless devices when
- we're told to disable them
- - (nm_dbus_nm_sleep, nm_dbus_nm_wake): new functions for sleep/wake
-
- * utils/nm-utils.h
- - New variants of the warn/info/error/debug print functions that can take
- variables rather than static strings
-
-2005-03-24 Dan Williams <dcbw@redhat.com>
-
- * src/NetworkManagerUtils.c
- - (nm_get_device_driver_name): driver names are now on the parents of
- "Network Interface" objects, so look for them there
-
-2005-03-24 Dan Williams <dcbw@redhat.com>
-
- * test/nmtest.c
- - Escape some forgotten object paths before we shove them through dbus
-
-2005-03-24 Dan Williams <dcbw@redhat.com>
-
- * dhcpcd/dhcpcd.[ch]
- src/NetworkManagerDHCP.c
- - Switch names from "*_record_*" -> "*_element_*" to clarify things a bit
- (ie, dhcp_option_record_len -> dhcp_option_element_len)
-
- * src/NetworkManagerDbus.c
- - spacing cleanups
-
- * src/nm-dbus-dhcp.c
- - Make the API suck less. There is now only 1 type of each function,
- ie only "getInteger" and no longer also "getIntegerv". All types
- are returned encapsulated in a DBUS_TYPE_ARRAY, even for options
- that will never have more than 1 element. This should simplify
- things greatly.
-
- * test/nm-dhcp-opt-test.c
- - Make the tool not segfault
- - adapt to new DHCP Options API
-
-2005-03-22 Dan Williams <dcbw@redhat.com>
-
- * src/NetworkManager.c
- - (nm_wired_link_deactivated): actually ignore netlink events from
- wireless devices.
-
-2005-03-22 Dan Williams <dcbw@redhat.com>
-
- * src/NetworkManager.c
- - (nm_wired_link_activated): actually ignore netlink events from
- wireless devices.
-
-2005-03-17 Dan Williams <dcbw@redhat.com>
-
- Patch from Tom Parker:
- * src/nm-netlink-monitor.c
- - Include unistd.h
- * info-daemon/NetworkManagerInfoDbus.c
- - (nmi_dbus_update_network_auth_method): free GConf values
-
- Patch from Nathaniel McCallum <npmccallum@gentoo.org>:
- * src/NetworkManagerDevice.c
- - (nm_device_set_wireless_config): wait for successful
- association longer for some cards (Atheros a/b/g)
-
-2005-03-15 Ray Strode <rstrode@redhat.com>
-
- * src/NetworkManager.c:
- (sigterm_pipe_handler):
- remove bogus FIXME
-
-2005-03-15 Ray Strode <rstrode@redhat.com>
-
- * src/NetworkManagerDbus.c:
- Fix some sign weirdness that gcc4 doesn't like,
- and add a header file so PPC can hopefully find
- SIGTRAP
-
-2005-03-14 Ray Strode <rstrode@redhat.com>
-
- Fourth (probably working) cut at porting to
- dbus 0.30 api and new hal. This cut adds
- some new logging macros to make debugging
- easier.
-
- * dispatcher-daemon/NetworkManagerDispatcher.c:
- * info-daemon/NetworkmanagerInfo.c:
- * info-daemon/NetworkManagerInfoPassphraseDialog.c:
- * info-daemon/NetworkManagerInfoVPN.c:
- * src/NetworkManager.c:
- * src/NetworkManagerAP.c:
- * src/NetworkManagerAPList.c:
- * src/NetworkManagerDHCP.c:
- * src/NetworkManagerDbus.c:
- * src/NetworkManagerDevice.c:
- * src/NetworkManagerPolicy.c:
- * src/NetworkManagerSystem.c:
- * src/NetworkManagerUtils.c:
- * src/NetworkManagerWireless.c:
- * src/autoip.c:
- * src/nm-dbus-nm.c:
- * src/backends/NetworkManagerDebian.c:
- * src/backends/NetworkManagerGentoo.c:
- * src/backends/NetworkManagerRedHat.c:
- * src/backends/NetworkManagerSlackware.c:
- use new logging macros.
-
- * dispatcher-daemon/NetworkManagerDispatcher.c:
- (nmd_dbus_filter): s/dbus_free/g_free/
-
- * info-daemon/Makefile.am: link in utils library.
- * info-daemon/NetworkmanagerInfo.c: use new logging
- macros.
- (nmi_dbus_get_network): don't assume enumerations
- are 32-bit.
- (nmi_dbus_nmi_message_handler): don't free what
- doesn't belong to us.
-
- * libnm_glib/libnm_glib.c:
- (libnm_glib_get_nm_status):
- (libnm_glib_init): don't free what doesn't
- belong to us.
- (libnm_glib_dbus): strdup result, so it doesn't get
- lost when message is unref'd.
-
- * panel-applet/NMWirelessAppletDbus.c:
- (nmwa_dbus_update_devices): s/dbus_free/g_free/
-
- * src/NetworkManager.c:
- (nm_monitor_wired_link_state): request initial status
- dump of all cards when we start up, instead of relying
- on /sys/.../carrier.
- (nm_info_handler), (nm_set_up_log_handlers):
- log handlers to specify what syslog priorites
- the logging macros default to.
-
- * src/NetworkManagerAPList.c:
- (nm_ap_list_populate_from_nmi):
- s/dbus_free_string_array/g_strfreev/
-
- * src/NetworkManagerDbus.c:
- (nm_dbus_get_network_object):
- validate d-bus message argument types.
- Advance message iterator after reading argument,
- prepend instead of append to GSList.
-
- * src/NetworkManagerDevice.c:
- (nm_device_probe_wired_link_status):
- remove redundant /sys in /sys path. remove wrong
- contents == NULL means has carrier assumption.
-
- * src/nm-netlink-monitor.c
- (nm_netlink_monitor_request_status): implement
- function to ask kernel to dump interface link
- status over netlink socket.
-
- * test/*.c: s/dbus_free/g_free/
-
- * utils/nm-utils.h:
- (nm_print_backtrace): new macro to print backtrace.
- (nm_get_timestamp): new macro to get sub-second precise
- unix timestamp.
- (nm_info), (nm_debug), (nm_warning), (nm_error):
- new logging functions. nm_info just prints,
- nm_debug includes timestamp and function,
- nm_warning includes function, nm_error includes
- backtrace and sigtrap.
-
-2005-03-11 Ray Strode <rstrode@redhat.com>
-
- Third (unfinished, partially working) cut at porting to
- dbus 0.30 api and new hal.
-
- * info-daemon/NetworkManagerInfoDbus.c:
- don't free null arrays.
-
- * panel-applet/NMWirelessAppletDbus.c:
- * src/nm-dbus-device.c:
- * src/nm-dbus-net.c:
- * src/NetworkManagerDbus.c: more
- STRING -> OBJECT_PATH fun
- * src/NetworkManagerDevice.c:
- * src/NetworkManagerDevice.h:
- (rename nm_device_get_link_active): rename to
- nm_device_has_active_link
- (nm_device_wireless_link_active): rename to
- nm_device_probe_wireless_link_state
- (nm_device_wired_link_active): rename to
- nm_device_probe_wired_link_state. Rewrite to
- use carrier file since hal doesn't maintain
- link state anymore.
- (nm_device_update_link_active): rename to
- nm_device_update_link_state
- * src/NetworkManagerPolicy.c
- (nm_policy_activation_finish): check for NULL
- MAC address.
-
- * src/Makefile.am:
- * src/NetworkManagerMain.h:
- * src/NetworkManager.c:
- * src/nm-netlink-monitor.c:
- * src/nm-netlink-monitor.h: New class to support
- monitoring wired ethernet link status, since HAL
- doesn't export that information anymore.
-
-2005-03-09 Ray Strode <rstrode@redhat.com>
-
- Second (unfinished, unworking) cut at porting to
- dbus 0.30 api.
-
- * dispatcher-daemon/NetworkManagerDispatcher.c:
- * info-daemon/NetworkManagerInfoDbus.c:
- * panel-applet/NMWirelessAppletDbus.c:
- * src/NetworkManagerDbusUtils.c:
- * src/NetworkManagerDbusUtils.h:
- * src/nm-dbus-device.c:
- * src/nm-dbus-nm.c:
- * test/nmtest.c: support dbus "object path" type
-
- * configure.in:
- * Makefile.am:
- * info-daemon/Makefile.am:
- * libnm_glib/Makefile.am:
- * panel-applet/Makefile.am:
- * dispatcher-daemon/Makefile.am
- * src/Makefile.am:
- * test/Makefile.am:
- * utils/Makefile.am:
- * utils/nm-utils.c:
- * utils/nm-utils.h: new utils static lib
-
-2005-03-07 Ray Strode <rstrode@redhat.com>
-
- * info-daemon/NetworkManagerInfoDbus.c:
- * libnm_glib/libnm_glib.c:
- * panel-applet/NMWirelessAppletDbus.c:
- * src/NetworkManager.c:
- * src/NetworkManagerDbus.c:
- * src/NetworkManagerDevice.c:
- * src/NetworkManagerUtils.c:
- * src/nm-dbus-device.c:
- * src/nm-dbus-dhcp.c:
- * src/nm-dbus-net.c:
- * src/nm-dbus-nm.c:
- * test/nminfotest.c:
- First (unfinished, unworking) cut at porting to dbus 0.30 api.
-
-2005-03-04 Dan Williams <dcbw@redhat.com>
-
- * configure.in
- - Mark HEAD as 0.4
-
-2005-03-04 Dan Williams <dcbw@redhat.com>
-
- Patch from Peter Jones:
- - Make stuff work with gcc 4.0
-
-2005-02-28 Maxim Dziumanenko <mvd@mylinux.com.ua>
-
- * uk.po: Added "uk" (Ukrainian) to ALL_LINGUAS.
-
-2005-02-27 Jim Huang <jserv@kaffe.org>
-
- * configure.in: Added "zh_TW" (Traditional Chinese) to ALL_LINGUAS.
-
-2005-02-27 Dan Williams <dcbw@redhat.com>
-
- Patch from Bill Moss:
- * panel-applet/NMWirelessAppletDbus.c
- - Make sure strength for current access point is up-to-date when we
- update the gui data model
-
-2005-02-27 Alessio Frusciante <algol@firenze.linux.it>
-
- * configure.in: Added "it" (Italian) to ALL_LINGUAS.
-
-2005-02-27 Dan Williams <dcbw@redhat.com>
-
- * src/backends/NetworkManagerRedHat.c
- - (nm_system_init): Kill any dhclient processes lying around as well
- as stopping 'nifd' if its already been started. NetworkManager
- subsumes the functions of nifd (kicking mDNSResponder, autoip)
-
-2005-02-27 Dan Williams <dcbw@redhat.com>
-
- * panel-applet/NMWirelessApplet.c
- - (nmwa_destroy): Really mean to destroy GUI data model first, then
- dbus data model, not the GUI data model twice.
-
-2005-02-27 Dan Williams <dcbw@redhat.com>
-
- * panel-applet/NMWirelessApplet.[ch]
- panel-applet/NMWirelessAppletDbus.[ch]
- - Move to incremental network updates. Instead of blowing away our list
- of devices every time we get a signal from NetworkManager, we now
- incrementally add/remove networks when NetworkManager notifies us that
- a new network has appeared or disappered. Strength updates now happen
- on-the-fly for each access point as well. There are now two copies of
- data from NetworkManager: one for the dbus side, and one for the gui side.
- When the dbus side data is modified, it is copied over to the gui side
- so we don't have to hold the data_mutex for long periods of time (and
- therefore block animation of the applet's icon).
- - Clean up some memleaks too
-
- * panel-applet/NMWirelessAppletOtherNetworkDialog.c
- - Minor code beautification
-
- * src/NetworkManagerAPList.c
- - (nm_ap_list_merge_scanned_ap): return whether or not the access point is
- completely new and whether or not an existing one's strength was updated.
- Try to fix multiple access points and signal strength by using the highest
- signal strength in each scan for any given ESSID.
-
- * src/NetworkManagerDbus.[ch]
- - (nm_dbus_signal_wireless_network_change): consolidate signals that deal with
- wireless networks; now we have only WirelessNetworkUpdate which includes
- a UINT32 for Appeared, Disappeared, or StrengthChanged (see NetworkManager.h).
- - Kill usage of DbusMessageIter
-
- * src/NetworkManagerDevice.c
- - (nm_device_wireless_process_scan_results): Use the same timestamp for all APs
- in the same scan result list. Copy ESSIDs-by-address earlier on, for each
- AP rather than all-at-once. Also don't ever remove the AP a card is
- currently associated with from the network list.
- - Update for new signals during scan, send out Appeared, Disappeared, or
- StrengthChanged when necessary.
-
-2005-02-25 Dan Williams <dcbw@redhat.com>
-
- * README
- - Line break the README
-
-2005-02-25 Dan Williams <dcbw@redhat.com>
-
- * panel-applet/NMWirelessAppletOtherNetworkDialog.c
- - Remove usage of gtk_window_set_default_size()
-
- * panel-applet/essid.glade
- - Stick default size here
- - Add in random crap that current glade wants to add in now
-
-2005-02-25 Dan Williams <dcbw@redhat.com>
-
- * src/backends/NetworkManagerRedHat.c
- - For non-caching-nameserver/non-named case, ensure that nscd is running
- and that we actually tell nscd to reload the hosts cache when it changes
-
-2005-02-25 Dan Williams <dcbw@redhat.com>
-
- * info-daemon/NetworkManagerInfoDbus.c
- - (nmi_dbus_get_network_properties): whack usage of DbusMessageIter
-
- * test/nminfotest.c
- - Whack usage of DbusMessageIter
- - Clean up DbusError and DbusMessage handling and freeing
- - Remove unused unregister handler
-
- * test/nmtest.c
- - Whack usage of DbusMessageIter
-
- * test/nmtestdevices.c
- - Whack usage of DbusMessageIter
-
-2005-02-25 Dan Williams <dcbw@redhat.com>
-
- * NetworkManager.h
- - New signal type NMNetworkStatus in preparation for the "WirelessNetworkUpdate"
- signal
-
-2005-02-25 Dan Williams <dcbw@redhat.com>
-
- * named/nm-named-manager.c
- - Ensure that pid and watch variables for child named process get cleared out
- when the child goes away.
-
-2005-02-22 Dan Williams <dcbw@redhat.com>
-
- * src/NetworkManagerPolicy.c
- - (nm_policy_activation_finish): Deactivate a device if its activation fails,
- and NULL out data->active_device so that we have to choose another one.
- This may make NetworkManager keep attempting to connect to a wired network
- if it fails, but if it keeps failing the wired network has more problems than
- just NetworkManager.
-
- * src/backends/NetworkManagerRedHat.c
- - (nm_system_update_dns): fix to actually run nscd -i hosts when nscd
- is already running
-
- * named/nm-named-manager.c
- - (rewrite_resolv_conf): Call nm_system_update_dns() when not using
- named so that the distro can flush whatever name service caching
- daemon it uses
-
-2005-02-21 Dan Williams <dcbw@redhat.com>
-
- * src/NetworkManagerDHCP.[ch]
- - (nm_device_dhcp_remove_timeouts): new function
-
- * src/NetworkManagerDevice.c
- - Use nm_device_dhcp_remove_timeouts() everywhere that we need to
- remove the DHCP timeouts.
-
-2005-02-21 Dan Williams <dcbw@redhat.com>
-
- * panel-applet/NMWirelessApplet.[ch]
- panel-applet/menu-info.[ch]
- - Give the panel applet some major love: menu items are no longer
- subclasses of GtkCheckMenuItem, they are actual GtkCheckMenuItems.
- This allows the applet to actually reflect theme changes correctly,
- since themeing of subclassed items in GTK _sucks_.
-
-2005-02-18 Dan Williams <dcbw@redhat.com>
-
- * libnm_glib/libnm_glib.[ch]
- test/libnm_glib_test.c
- - Clean up libnm_glib API a bit, callback is now passed a libnm_glib_ctx
- and its data, and doesn't have to free the callback data anymore
-
-2005-02-18 Dan Williams <dcbw@redhat.com>
-
- * panel-applet/NMWirelessApplet.c
- - Revert 2005-02-18 William Jon McCann fix for standard
- copyright string until it passes 'make distcheck'.
- With standard copyright string, xgettext complains
- about "Non-ASCII string at ...".
-
-2005-02-18 Dan Williams <dcbw@redhat.com>
-
- * panel-applet/essid.glade
- panel-applet/NMWirelessAppletOtherNetworksDialog.c
- - Correct spelling of "adaptor"->"adapter"
-
-2005-02-18 William Jon McCann <mccann@jhu.edu>
-
- * panel-applet/NMWirelessApplet.c: Use GTK_CHECK_VERSION() macro.
- (nmwa_about_cb): Use standard copyright string. Update comment
- text to reflect that it is a notification area applet. Remove
- leading newline in authors list.
- (nmwa_menu_show_cb, nmwa_setup_widgets): Populate menu on show
- instead of on parent menu item activation. Fixes #167550.
-
-2005-02-18 William Jon McCann <mccann@jhu.edu>
-
- * panel-applet/essid.glade: Capitalize items as per HIG.
- Fixes #167632
-
-2005-02-16 William Jon McCann <mccann@jhu.edu>
-
- * panel-applet/gtkcellrendererprogress.[ch]: Only compile these
- files for GTK 2.4 or lower, since now public in GTK 2.6.
-
- * panel-applet/essid.glade: Don't specify window size.
-
-2005-02-17 Dan Williams <dcbw@redhat.com>
-
- Caught by Bill Moss:
- * dhcpcd/client.c
- - Time remaining for DHCP transaction calculation was incorrectly
- inside a #ifdef DEBUG
-
-2005-02-15 Christophe Merlet <redfox@redfoxcenter.org>
-
- * configure.in: Added fr (French) to ALL_LINGUAS.
-
-2005-02-14 Dan Williams <dcbw@redhat.com>
-
- * src/NetworkManagerDHCP.c
- - (set_domain_searches): Fix free of invalid pointer
-
-2005-02-14 Dan Williams <dcbw@redhat.com>
-
- Patch from Peter Jones:
- * dhcpcd/client.c
- - Ensure we return RET_DHCP_CEASED everywhere we should
- * dhcpcd/udpipgen.c
- - Use faster TOS for IP packets
- - Don't set ip_id since we're UDP
-
- Patch from Tomislav Vujec:
- * src/nm-dbus-dhcp.c
- test/nm-dhcp-opt-test.c
- - Clean up warnings to enable cvs tree compilation.
-
-2005-02-14 Tomislav Vujec <tvujec@redhat.com>
-
- * configure.in
- po/hr.po
- - Add the Croatian locale.
-
-2005-02-14 Colin Walters <walters@verbum.org>
-
- * src/NetworkManagerDHCP.c (set_domain_searches): Handle space-separated
- list of domains to search.
-
- * src/NetworkManagerMain.h (NMData): Handle multiple domain searches.
-
-2005-02-13 Dan Williams <dcbw@redhat.com>
-
- * dhcpcd/client.c
- - Debug output cleanups of DHCP option printing and parsing.
-
-2005-02-13 Dan Williams <dcbw@redhat.com>
-
- Patch from Dan Reed: DHCP options D-BUS API
- Exposes the DHCP options that a device receives to clients over D-BUS.
-
- * configure.in
- - A few cleanups
-
- * dhcpcd/client.h
- - Correct names, option length, and types for DHCP options
-
- * dhcpcd/dhcpcd.[ch]
- - Clarify function names that access DHCP options & data
-
- * src/NetworkManagerDHCP.c
- - Use new DHCP data access functions
-
- * src/NetworkManagerDbus.c
- - Message handler for DHCP functions
-
- * src/nm-dbus-dhcp.[ch] (new)
- - DHCP dbus methods
-
- * test/nm-dhcp-opt-test.c
- - Test DHCP D-BUS API and return all present DHCP options
-
-2005-02-12 Dan Williams <dcbw@redhat.com>
-
- * test/Makefile.am
- test/nmclienttest.c
- test/nmtest.c
- - Move nmclienttest.c -> nmtest.c
-
-2005-02-12 Dan Williams <dcbw@redhat.com>
-
- * dhcpcd/buildmsg.c
- - Pad DHCP packets until they are at least 300 bytes in size.
-
-2005-02-11 Dan Williams <dcbw@redhat.com>
-
- * dhcpcd/client.c
- - (dhcp_init): only print out client ID and class ID if they are specified
-
- * src/NetworkManagerDbus.[ch]
- src/nm-dbus-nm.[ch]
- src/nm-dbus-device.[ch]
- src/nm-dbus-net.[ch]
- - Move NM, Device, and Net functions to separate files and use the
- dbus method list stuff in NetworkManagerDbusUtils.c to do
- method dispatching
-
- * src/NetworkManagerDbusUtils.c
- - Add new validate_method called before each dispatch (if present)
- that can validate the method call
-
- * src/NetworkManagerWireless.c
- - (nm_wireless_qual_to_percent): Fix misplaced "!" that caused signal
- levels never to be evaluated
-
- Patch from j@bootlab.org
- * src/NetworkManagerDevice.c
- - Add typedef for "u64"
-
- * src/backends/NetworkManagerDebian.c
- - Copy in Dave Woodhouse's fixes for IPv6
-
-2005-02-11 Dan Williams <dcbw@redhat.com>
-
- Patch from Dave Woodhouse for IPv6:
- * src/NetworkManagerUtils.c
- - (nm_ethernet_address_is_valid): Check for prism54 dummy MAC address
- and multicast addresses
-
- * src/NetworkManagerDevice.c
- - (nm_device_set_up_down): make sure our cached MAC address is up-to-date
- after bringing up a card.
-
-2005-02-10 Dan Williams <dcbw@redhat.com>
-
- Patch from Dave Woodhouse:
- * src/NetworkManagerSystem.h
- src/backends/NetworkManagerDebian.c
- src/backends/NetworkManagerGentoo.c
- src/backends/NetworkManagerSlackware.c
- - New nm_system_device_add_ip6_link_address() function to add link-local
- address on an interface. Stubbed in Debian, Gentoo, and Slackware.
-
- * src/backends/NetworkManagerRedHat.c
- - (nm_system_device_add_ip6_link_address): implement
- - (nm_system_device_flush_addresses): revert to previous behavior of
- flushing all addresses
-
-2005-02-10 Dan Williams <dcbw@redhat.com>
-
- Patch from Tom Parker:
- * src/NetworkManagerDevice.c
- - Remove the "#include <pci/types.h>" since both the ethtool.h and
- mii.h headers are broken, and instead use our own typedefs
-
-2005-02-10 Dan Williams <dcbw@redhat.com>
-
- * dhcpcd/buildmsg.c
- - (fill_host_and_class_id): only fill in client and class IDs if
- they are set by callers.
-
- * dhcpcd/client.c
- - (class_id_setup): don't autogenerate a class ID, only use one
- we're given, if any.
- - (client_id_setup): don't autogenerate a client ID, only use one
- we're given, if any.
-
- * dhcpcd/dhcpcd.c
- - (dhcp_interface_init): ensure that client options are correctly
- NULL terminated
-
- * src/NetworkManagerDHCP.c
- - (nm_device_dhcp_request): pass hostname to dhcp library
-
-2005-02-10 Dan Williams <dcbw@redhat.com>
-
- * dhcpcd/client.c
- - #rh147661# Don't send kernel version in DHCP requests
-
- * src/NetworkManagerSystem.h
- src/backends/NetworkManagerDebian.c
- src/backends/NetworkManagerGentoo.c
- src/backends/NetworkManagerRedHat.c
- src/backends/NetworkManagerSlackware.c
- - Remove the nm_system_device_run_dhcp() and nm_system_device_stop_dhcp()
- functions, they are no longer used anyway
-
- * src/backends/NetworkManagerRedHat.c
- - (nm_system_device_flush_addresses): only flush "scope global" and "scope site"
- addresses in an attempt to keep IPv6 local-scope addresses around
-
-2005-02-10 Dan Williams <dcbw@redhat.com>
-
- * src/NetworkManager.c
- - (nm_create_device_and_add_to_list): change the add message slightly
-
- * src/NetworkManagerUtils.c
- - (nm_get_wireless_driver_support_level, nm_get_wired_driver_support_level):
- Return driver name to calling function
- - (nm_get_driver_support_level): print out the driver a device is using
- during the support check
-
- Patch from Dave Woodhouse:
- * dhcpcd/udpipgen.c
- - (in_cksum): copy last byte of odd-sized packets into a
- 'u_short' rather than a 'u_char', should fix wrong checksums
- on big-endian platforms
-
-2005-02-09 Dan Williams <dcbw@redhat.com>
-
- * Clean up usage of GSList objects and looping through their members
- * Clean up DHCP rebind/renew timeouts, hopefully they will work correctly
- now.
- * Fix problem where even if scanning was turned off, card would still
- cycle through frequencies.
-
-2005-02-08 Dan Williams <dcbw@redhat.com>
-
- * panel-applet/NMWirelessApplet.c
- - Fix for gtk 2.4
-
-2005-02-08 Dan Williams <dcbw@redhat.com>
-
- Patch from Bill Moss
- * panel-applet/NMWirelessApplet.c
- - Restore correct ESSID in tooltips
-
-2005-02-07 Dan Williams <dcbw@redhat.com>
-
- * panel-applet/NMWirelessApplet.[ch]
- - Add a context menu that contains:
- Pause/Resume Wireless Scanning
- Stop/Start All Wireless Devices
- About...
- - Grab active device strength off active device,
- not its network
-
- * panel-applet/NMWirelessAppletDbus.[ch]
- - Add DBUS accessors for "getSupportsCarrierDetect", "setScanningEnabled",
- "getScanningEnabled", "setWirelessEnabled", and "getWirelessEnabled"
- - Update active device strength every 2 seconds, not every 1 second
-
- * panel-applet/menu-info.c
- - Only disable wired devices in the menu when they support carrier detection,
- and don't currently have a link. Non-carrier-detect devices will always
- remain choosable
-
- * src/Makefile.am
- src/NetworkManagerDbusUtils.[ch]
- - Add new new dbus utils sources
-
- * src/NetworkManager.c
- - Fixes for new link detection, we no longer need to call nm_device_update_link_active()
- with the boolean parameter
- - Set scanning_enabled & wireless_enabled to TRUE
-
- * src/NetworkManagerDbus.c
- - Use new dbus util method dispatcher functions for org.freedesktop.NetworkManager methods
- - Implement scanning & wireless enable/disable calls
- - Remove the dbus vtable unregister handlers, weren't doing anything with them anyway
-
- * src/NetworkManagerDevice.c
- - New link detection stuff again...
- o Create device's mainloop earlier (but don't run it earlier)
- o Hook up new carrier-detect support stuff
- o Add in the ethtool & mii support detection code
- - Don't scan if scanning is disabled
-
- * src/NetworkManagerPolicy.c
- - Never automatically choose a device that doesn't support carrier detection
- - Don't automatically choose a wireless device if wireless is disabled
-
-2005-02-07 Dan Williams <dcbw@redhat.com>
-
- * libnm_glib/libnm_glib.c
- - Small cleanup in element list iteration
-
-2005-02-07 Dan Williams <dcbw@redhat.com>
-
- * src/NetworkManagerWireless.c
- - (nm_wireless_qual_to_percent): Fix up wireless quality calculations
- to be in line with the WEXT quality specification
-
-2005-02-02 Dan Williams <dcbw@redhat.com>
-
- Patch from Nathan Fredrickson <nathan@silverorange.com>
- * Fix up compile for deprecation of libgnomeui
- - Switch to <glib/gi18n.h> from <libintl.h>
- - Remove <libgnomeui/libgnomeui.h> includes
- - Use gtk_window_set_default_icon_from_file() rather than
- gnome_window_set_default_icon_from_file()
-
- * named/nm-named-manager.c
- - (generate_named_conf): Fix return-nothing in non-void
- function
-
-2005-02-02 Dan Williams <dcbw@redhat.com>
-
- * Clean up unused variables and the like
-
-2005-02-02 Dan Williams <dcbw@redhat.com>
-
- * src/NetworkManagerAPList.c
- - (nm_ap_list_merge_scanned_ap): merge strength too
-
- * src/NetworkManagerUtils.c
- - (nm_lock_mutex, nm_register_mutex_desc): new calls to facilitate debugging
- of locking issues by printing out prettier information than g_mutex_lock
- - Print out names of mutexes registered with nm_register_mutex_desc()
- - (nm_try_lock_mutex): don't do the waiting thing when trying to lock, causes
- us to seemingly block here for too long
-
- * src/NetworkManager.c
- src/NetworkManagerAPList.c
- src/NetworkManagerDevice.c
- - Convert to using nm_lock_mutex/nm_unlock_mutex rather than the glib variants
- so we get better debug information printed
-
- * src/NetworkManagerDbus.c
- - (nm_dbus_devices_handle_request): reduce usage of nm_device_need_ap_switch()
- since it sometimes has locking side effects
- - (nm_device_get_association_pause_value): Reduce 802.11a card pause value to 8s
- from 10s
- - (nm_device_need_ap_switch): If we can't acquire the scan lock, return saying
- we don't need a switch. This gets called often enough that we can't block
- until the scan mutex is acquired, because we'll block on device activation
- and a few other things, which hangs main thread for too long.
-
- * src/NetworkManagerPolicy.c
- - (nm_policy_auto_get_best_device): reduce the possiblity that
- nm_device_need_ap_switch() will be called
-
-2005-02-02 Dan Williams <dcbw@redhat.com>
-
- * panel-applet/NMWirelessApplet.c
- - Display name of wireless network we are connecting to or connected to
- in the tooltip of the applet
-
-2005-02-02 Dan Williams <dcbw@redhat.com>
-
- * src/NetworkManagerDHCP.c
- - Hopefully fix double-default-route problem by cleaning up the default
- route added by DHCP code right before the DHCP transaction begins
-
-2005-02-02 Dan Williams <dcbw@redhat.com>
-
- * named/nm-named-manager.c
- - Write out valid resolv.conf when we exit
-
-2005-02-01 Dan Williams <dcbw@redhat.com>
-
- Patch from Colin Walters:
- * named/nm-named-manager.c
- - Make multi-domain search options work
-
-2005-01-31 Dan Williams <dcbw@redhat.com>
-
- * info-daemon/NetworkManagerInfoDbus.c
- - (nmi_dbus_nmi_message_handler): make sure 'dialog' exists before using it
-
- * src/NetworkManagerDevice.c
- - (nm_device_new): Don't store the entire range struct, use only what we need
- (which is currently avg_quality, max_quality, and frequencies). Also
- zero device structure when we've free'd it to maybe expose errors down
- the line.
- - (nm_device_update_signal_strength): grab the scan mutex before getting
- quality data from the card since quality will be useless during a scan.
- Call updated wireless qual-to-percent function with values stored in
- nm_device_new() earlier.
- - Remove some unused functions (nm_device_get_max_quality(), nm_device_get_noise(),
- nm_device_get_bad_crypt_packets())
- - (nm_device_activate_wireless_adhoc): use new frequency values we go in
- nm_device_new()
- - (get_initial_auth_method): always use the Auth method that's in the allowed
- list if available. Problem was this: when the WEP key is wrong, NM will
- try OS then SK modes, and then get stuck in SK mode after that. This
- should reset it.
- - (nm_device_wireless_process_scan_results): work with new qual-to-percent
- function
-
- * src/NetworkManagerWireless.c
- - (nm_wireless_qual_to_percent): try to make this function actually work and
- mimic iwlib behavior. Use card's idea of quality divided by max_qual
- if that's all present, otherwise fall back to signal-to-noise ratios.
-
-2005-01-29 Dan Williams <dcbw@redhat.com>
-
- * initscript/RedHat/NetworkManager
- - Don't spit out sysctl stuff to console
-
- * libnm_glib/libnm_glib.c
- - (libnm_glib_init): call dbus_g_thread_init()
-
- * panel-applet/NMWirelessAppletDbus.c
- - (nmwa_dbus_worker): call dbus_g_thread_init()
-
- * src/NetworkManager.c
- - (main): call dbus_g_thread_init()
-
- * src/NetworkManagerAPList.c
- - (nm_ap_list_print_members): use LOG_ERR instead of LOG_DEBUG
- so we can actually see what's there in a normal syslog
-
- * src/NetworkManagerDevice.c
- - (nm_device_activate_wireless): print out the "waiting for access point"
- message only once, then say what access point we actually got after
- the wait.
- - (nm_device_need_ap_switch): If a scan is in progress when we're in this
- function, wait until the scan is done. Scans may change the ESSID of
- the card, making this function think we need to switch access points
- - (nm_device_wireless_process_scan_results): for artificial access points
- don't check against the card's ESSID, but the best_ap's ESSID. This
- prevents collisions with the scanning code, which may change the card's
- ESSID and cause the access point to get dropped from the device's AP
- list. Also increase the keep-around time to 2m from 60s since the max
- scan interval could be 60s in some cases.
-
- * src/NetworkManagerPolicy.c
- - (nm_policy_activation_finish): Don't add invalid MAC addresses to GConf
- - (nm_policy_allowed_ap_list_update): When we update, make sure we copy over
- the new properties and ESSIDs to the device's AP list. Fixes some races
- between NM and NMI.
-
-2005-01-27 Dan Williams <dcbw@redhat.com>
-
- * info-daemon/NetworkManagerInfoDbus.c
- - (nmi_dbus_add_network_address): if the network doesn't yet exist in
- GConf, make a minimal entry for it (essid & timestamp)
-
- * src/NetworkManagerAPList.c
- - (nm_ap_list_populate_from_nmi): Don't try to grab network data if
- NetworkManagerInfo isn't running
-
- * src/NetworkManagerDbus.[ch]
- - (nm_dbus_nmi_is_running): new function
-
- * src/NetworkManagerDevice.c
- - (nm_device_wireless_force_use): Don't set the created AP's MAC
- address to garbage.
-
- * src/NetworkManagerPolicy.c
- - (nm_policy_activation_finish): On successful activation, make sure
- the "best" AP has a MAC address, and don't tell NMI to add the
- current AP's MAC address to GConf if the AP is an Ad-hoc AP.
- - (nm_policy_allowed_ap_list_update): Update a wireless card's "best"
- access point after refreshing our allowed list if it doesn't already
- have a "best" access point.
-
-2005-01-25 Dan Williams <dcbw@redhat.com>
-
- * panel-applet/NMWirelessAppletDbus.c
- - (nmwa_dbus_filter): Fix dbus 0.23 ServiceOwnerChanged checks
- so we check for NM_DBUS_SERVICE rather than not for it
-
- * libnm_glib/libnm_glib.c
- - (libnm_glib_dbus_filter): Fix for dbus 0.23, trapping
- ServiceOwnerChanged signal
-
-2005-01-25 Dan Williams <dcbw@redhat.com>
-
- * configure.in
- - Check DBUS version in configure, and set the C macros
- DBUS_VERSION_[MAJOR,MINOR,MICRO]
-
- * info-daemon/NetworkManagerInfoDbus.c
- - Remove #if 0-d section of code that quit NMI if NM went away.
-
- * panel-applet/NMWirelessAppletDbus.c
- - Trap the "ServiceOwnerChanged" signal that's new in dbus-0.23
-
- * src/NetworkManager.c
- src/NetworkManagerMain.h
- src/NetworkManagerDbus.c
- - Trap the "ServiceOwnerChanged" signal that's new in dbus-0.23
- - Make updating of our Allowed Wireless Network lists from NMI
- an idle function in the main thread now, with a high priority.
-
-2005-01-24 Dan Williams <dcbw@redhat.com>
-
- * panel-applet/gtkcellview.[ch]
- panel-applet/menu-info.c
- - Fix GTK version checks to be <= rather than <
-
- * test/Makefile.am
- - Include the libtool archive of libnm_glib rather than
- trying to pull in the .so
-
-2005-01-24 Dan Williams <dcbw@redhat.com>
-
- * src/NetworkManagerDevice.c
- src/NetworkManagerDevicePrivate.h
- - Block nm_device_new() until our device's worker thread has had a
- chance to start up. Fixes a race between main thread and worker
- thread starting that caused activation requests to get lost.
-
-2005-01-24 Dan Williams <dcbw@redhat.com>
-
- * initscript/RedHat/NetworkManager
- - Remove the ### BEGIN INIT INFO section, which caused chkconfig
- to add the NM startup script at priority 50, which was
- way too early
-
-2005-01-24 Colin Walters <walters@redhat.com>
-
- * named/named.conf: Use any port for query source instead of
- restricting to port 53.
-
-2005-01-24 Dan Williams <dcbw@redhat.com>
-
- * initscript/RedHat/NetworkManager
- - Remove the ### BEGIN INIT INFO section, which caused chkconfig
- to add the NM startup script at priority 50, which was
- way too early
-
-2005-01-24 Dan Williams <dcbw@redhat.com>
-
- Patch from Tom Parker <palfrey@tevp.net>
- * Fix up compile warnings & errors in the wireless applet
-
-2005-01-24 Dan Williams <dcbw@redhat.com>
-
- * panel-applet/NMWirelessApplet.c
- - Convert 24x24 icons back to 22x22 and use the 22x22 ones
-
-2005-01-24 Dan Williams <dcbw@redhat.com>
-
- * panel-applet/gtkcellview.[ch]
- - Only compile these files for GTK 2.4 or lower, since
- GtkCellView is now public in GTK 2.6. Fixes crasher
- when choosing "Other Wireless Networks" from the panel
- applet menu
-
-2005-01-21 Dan Williams <dcbw@redhat.com>
-
- * src/NetworkManager.c
- - Daemonize earlier so that glib doesn't get confused (?)
-
-2005-01-21 Dan Williams <dcbw@redhat.com>
-
- * panel-applet/NMWirelessApplet.[ch]
- panel-applet/NMWirelessAppletDbus.c
- panel-applet/menu-info.c
- src/NetworkManagerDevice.c
- - Disable wired devices in the menu when they have no link.
-
-2005-01-21 Dan Williams <dcbw@redhat.com>
-
- * Cache last-known-good wireless authentication method in
- NetworkManagerInfo, and use that method first during
- wireless device activation. Should speed up devices that
- need Shared Key authentication method since Open System is
- now the default.
-
- * Remove the hack to not do full activation on wired connections
- that are active when we launch, it causes too many problems
- with name resolution and was a hack in the first place.
-
- * Re-work wireless device activation again somewhat to have a
- clearer chain of events and to use last-known-good
- authentication method of the access point. Also provide
- better status throughout activation to ensure the applet
- can tell the user exactly what's going on.
-
- * Remove the "find wireless network" code and now simply attempt
- to activate with that access point. This reduces the delay
- between selecting "Other wireless Network" and actually
- connecting to that network.
-
- * Correctly stop the device's worker thread when its removed.
-
-2005-01-21 Dan Williams <dcbw@redhat.com>
-
- * dhcpcd/client.c
- - Clean up some of the debug messages
-
-2005-01-21 Dan Williams <dcbw@redhat.com>
-
- * Add new icons, more frames of animation
- * Remove some hacks to get the panel applet to display correct
- status, an NM update will soon follow that will fix the
- real issue.
-
-2005-01-19 Kjartan Maraas <kmaraas@gnome.org>
-
- * panel-applet/NMWirelessApplet.c: #include <config.h> must be
- the first include for working i18n. Also, don't include it in .h files
- * panel-applet/NMWirelessApplet.h: Same
- * panel-applet/NMWirelessAppletOtherNetworkDialog.c: Same
- * panel-applet/menu-info.c: Same
-
-2005-01-18 Dan Williams <dcbw@redhat.com>
-
- * dhcpcd/client.c
- - Remove some debug messages
- - Wrap others in #ifdef DEBUG/#endif
-
- * src/NetworkManager.c
- - Remove some debug messages
- - Clarify some debug messages
- - Remove code related to old single-thread wireless scanning
-
- * src/NetworkManagerAP.[ch]
- - New AP property "last_seen" to track how recently an AP was
- found in a scan
- - Start using 'const' more in function arguments
-
- * src/NetworkManagerAPList.[ch]
- - (nm_ap_list_merge_scanned_ap): new, selectively update attributes
- of an AP found in an AP list from a source AP, or if not found
- in the list add the source AP
- - (nm_ap_list_combine): remove, no longer needed
-
- * src/NetworkManagerDevice.c
- - Each device now has a "worker" thread from start to end of its life.
- Scanning for wireless devices now happens in that thread,
- not in a single "wireless scanning thread" for all devices as
- previously. Activation consists of adding an idle handler to the
- thread's main loop/context, which gets run at the next available
- opportunity.
- - Wireless scanning is also simplified, there is now only one list of
- access points per wireless device, and APs older than 60s are
- removed from the list. Previously, we kept results for the last
- 3 scans and merged whole lists, which was complicated.
- - Cleaned up activation debug messages.
- - Wireless activation and access-point search routines now use Open System
- authentication before trying Shared Key.
- - Removed some code in nm_device_update_best_ap() that could cause cards
- to loose their link to the access point.
- - Scanning now uses a backoff algorithm, where the inverval becomes
- progressively longer between scans when the list of scanned access
- points doesn't change. A change will revert to the shortest scan
- interval (20s).
-
- * src/NetworkManagerWireless.[ch]
- - Remove code related to old single-thread wireless scanning
-
-2005-01-18 Colin Walters <walters@redhat.com>
-
- * src/NetworkManagerDHCP.c (set_nameservers): Free and clear list
- of older nameservers.
-
-2005-01-18 Colin Walters <walters@redhat.com>
-
- * named/nm-named-manager.c (generate_named_conf): Many fixes
- to config file generation.
- (safer_kill): Remove, was too much trouble for little gain.
- (nm_named_manager_start): Run named as NM_NAMED_USER.
-
- * configure.in: Add option --with-named-user.
-
-2005-01-14 Colin Walters <walters@redhat.com>
-
- Patch from ed@catmur.co.uk (Ed Catmur)
-
- * named/nm-named-manager.c: Add "context" property.
- Use it to add child watch source in specific GMainContext.
-
- * src/NetworkManager.c (nm_data_new): Initialize
- named with correct main context. Start named only
- after forking.
-
-2005-01-14 Colin Walters <walters@redhat.com>
-
- * named/nm-named-manager.c (generate_named_conf): Write config
- and pid files into NM_NAMED_DATA_DIR; this allows things to
- work better with FC3 named SELinux policy. Also fix up silly
- format error.
-
- * configure.in: Add --with-named-dir option.
-
-2005-01-14 Colin Walters <walters@redhat.com>
-
- * configure.in: Make named support require passing --with-named.
-
- * named/nm-named-manager.c: Support writing resolv.conf directly
- without running named.
-
-2005-01-13 Dan Williams <dcbw@redhat.com>
-
- * named/nm-named-manager.c
- - Use syslog(LOG_WARNING) rather than g_warning() (gnome.org #163961)
-
- * src/NetworkManagerDevice.c
- - Rework wireless link detection code to be more reliable
-
-2005-01-12 Dan Williams <dcbw@redhat.com>
-
- * initscripts/RedHat/NetworkManager
- - Change initial level to "-" rather than "345" so that
- we don't activate ourselves by default on install
-
-2005-01-12 Dan Williams <dcbw@redhat.com>
-
- * libnm_glib/
- - Client library for applications using glib
-
- * configure.in
- various Makefiles
- - Split NM_CFLAGS and NM_LIBS into separate variables
- like DBUS_*, HAL_* and GLIB_*
-
- * src/NetworkManager.c
- src/NetworkManagerMain.h
- - (nm_schedule_status_signal_broadcast): at the earliest convenience,
- broadcast a status changed signal over DBUS from the main thread.
- Still unused anywhere for the moment.
-
- Patch from j@bootlab.org
- * panel_applet/NMWirelessAppletDbus.c
- src/NetworkManagerDbus.c
- - Correct INT32->UINT32 mistmatch between NM and the panel applet
- for the "getMode" method call
-
-2005-01-10 Dan Williams <dcbw@redhat.com>
-
- * src/NetworkManagerDevice.c
- - Minor fixups & corrections to "auto" frequency mode, make it
- less chatty with syslog
-
-2005-01-10 Dan Williams <dcbw@redhat.com>
-
- * src/NetworkManagerDevice.c
- - Implement "auto" frequency/channel support, since cards like Atheros
- can't use other frequencies at all when you've told it to use a
- specific one, even for scanning.
- - Grab the scan mutex around places where we can't tolerate wireless
- settings changing underneath us, like nm_device_wireless_network_exists()
- and nm_device_activate_wireless()
-
- * src/NetworkManagerWireless.c
- - Back scan interval off to 20s instead of 14s
-
-2005-01-09 Dan Williams <dcbw@redhat.com>
-
- * src/NetworkManagerDevice.c
- - Don't set mode/freq/bitrate if that mode/freq/bitrate is
- already set. Stops some drivers like Atmel from continually
- reloading the firmware, which they do upon every configuration
- change.
-
-2005-01-09 Dan Williams <dcbw@redhat.com>
-
- * dhcpcd/client.c
- - Use correct timeout value
-
- * info-daemon/NetworkManagerInfoDbus.c
- src/NetworkManagerDbus.c
- - Consolidate communication between NM and NMI by doing only 1 dbus
- method call to get Wireless Network info from NMI instead of 6
-
- * src/NetworkManager.c
- - Make sure to cancel activation when we receive a SIGTERM, otherwise
- when we didn't have an AP to use, we'd wait for one forever without
- quitting
-
- * src/NetworkManagerDevice.c
- - nm_device_activation_cancel(): Fix a race between dhcp and quitting
- activation, dhcp might not have started yet but we don't quit activation
- before starting it, so the quit signal gets lost
-
-2005-01-07 Dan Williams <dcbw@redhat.com>
-
- * dhcpcd/client.c
- - Rework the DHCP client code to be much less chatty when
- it receives non-DHCP UDP packets during the DHCP run
- (reported by and preliminary patches from Bill Moss)
-
- * Move wireless scanning to a separate thread. This thread forwards the
- results to the main thread when done where they are integrated into
- the device's access point lists. This keeps the main thread (which
- does all the DBUS communication) from being blocked for long periods
- of time by wireless scanning.
-
- * Make state modification an idle routine in the main loop, and trigger
- state changes rather than polling for them.
-
- * src/backends/NetworkManagerGentoo.c
- - Fix up invalid C90 code (reported by Christoph Ruessler)
-
- * src/NetworkManagerDevice.c
- - Revert IPv6 patch for wired devices from 2004-12-22 for
- router advertisements, causing problems and infinite loop
- during "best" device determination due to link going up/down
- (reported by Bill Moss)
-
- Apply patch from Peter Jones
- * src/NetworkManagerDevice.c
- - Shortcut for link-checking for ipw2x00 cards
- - Split out association check into separate routine
-
-2004-01-05 Colin Walters <walters@redhat.com>
-
- * named/named.conf: Add PID_FILE.
-
- * named/nm-named-manager.c: Always generate a pid
- file, since older BIND versions don't support
- "pid-file none".
-
-2005-01-01 Satoru SATOH <ss@gnome.gr.jp>
-
- * configure.in (ALL_LINGUAS): Added ja (Japanese).
-
-2004-12-22 Dan Williams <dcbw@redhat.com>
-
- * src/NetworkManagerDevice.c
- - Silently fail when setting bitrate doesn't work
-
-
- Patches from j@bootlab.org:
- * src/backends/NetworkManagerDebian
- - Update backend to match functionality in RedHat backend
- * src/NetworkManagerDevice.c
- - Take down then bring up wired devices after connection so
- they send out ipv6 router advertisements
-
-2004-12-21 Colin Walters <walters@verbum.org>
-
- * panel-applet/NMWirelessAppletDbus.c (nmwa_dbus_update_devices): Correctly
- test for NETWORK_MODE_ADHOC; spotted by: Greg <gonufer@gmail.com>.
-
-2004-12-21 Colin Walters <walters@redhat.com>
-
- * configure.in: Correct named detection.
-
-2004-12-21 Colin Walters <walters@redhat.com>
-
- * src/NetworkManager.c (nm_data_new): Initialize named.
- Also, set up a signal handler for SIGINT/SIGTERM, and exit
- the mainloop when these signals are received.
- (nm_data_free): Unref named.
- (sigterm_handler, sigterm_pipe_handler): New functions for
- exiting mainloop.
-
- * src/NetworkManagerMain.h (NMData): Add signal handling and
- nameserver bits.
-
- * src/NetworkManager.c (nm_device_unref): Quit device mainloop on
- unref.
-
- * src/NetworkManagerDHCP.c (set_nameservers): New function;
- set nameservers from DHCP response data.
- (set_domain_search): Set domain search from DHCP response.
- (nm_device_dhcp_configure): Invoke them.
-
- * src/NetworkManagerSystem.c
- (nm_system_device_update_resolv_conf): Delete. Deleting
- code is totally sweet.
-
- * src/Makefile.am (NetworkManager_LDADD): Add libnamed.
-
- * named/nm-named-manager.h, named/nm-named-manager.c: New files;
- implements an object which controls a nameserver. Currently
- uses bind 9.
-
- * configure.in: Check for named.
-
- * Makefile.am (SUBDIRS): Add named dir.
-
- * named/named.conf: New template config file.
-
-2004-12-20 Colin Walters <walters@redhat.com>
-
- * src/NetworkManagerPolicy.c (nm_policy_get_best_device): Fix usage of '=='
- instead of '='.
-
-2004-12-17 Dan Williams <dcbw@redhat.com>
-
- * Ad Ad-Hoc networking mode support. In Ad-Hoc mode, we only try to get
- link-local addresses instead of doing DHCP.
-
- * In the panel applet, there's a new "Create new Wireless Network..." item
-
- * The panel applet also sticks around now even if NetworkManager dies, but
- it doesn't hide its icon when NM isn't around. Not hiding the icon is
- a bug, I'll fix that later.
-
- * We also don't use 'nscd' anymore in the RH backend, it was impeding name
- lookups after a switch rather than actually doing them.
-
- * Clean up some of those warnings in nm_ap_list_* functions
-
- * Delay between scans changed to 15s instead of 10s
-
-2004-12-15 Dan Williams <dcbw@redhat.com>
-
- Patch from Tom Parker
- * Add autoip/Link Local Addressing support when we fail to get a DHCP
- address
-
- * Longer pause after setting ESSID on cards that support a larger number
- of channels to give the card time to find the right channel
-
- * Add system hook to restart mDNSResponder (or whatever the local implementation
- of Multicast DNS is) when we activate interfaces
-
-2004-12-15 Dan Williams <dcbw@redhat.com>
-
- * Rework the DHCP code again to revert to sending full ethernet frames
- rather then relying on the kernel to do the right thing with our
- packets.
-
-2004-12-06 Dan Williams <dcbw@redhat.com>
-
- * dhcpcd/client.c
- - Fix some minor errors in dhcp_handle_transaction() that caused
- unexpected early timeouts of DHCP transactions
-
- * dhcpcd/client.h
- - DHCP retransmit time from 4s -> 5s
-
-2004-12-05 Dan Williams <dcbw@redhat.com>
-
- * Major rework of the DHCP code, taking some cues from pump. We don't
- write raw Ethernet packets anymore, which simplifies the code quite
- a bit. The new code should be more robust, not hang in recvfrom()
- as much, and generally work better. This also means that we need
- to force HAL/dbus to use a created GMainContext rather than the
- default context, since having the DHCP renew/rebind thread using
- its own GMainContext seemed to give dbus a fit. There is also more
- debugging information printed from the DHCP loop to help with future
- problems.
-
- * Also, if the DHCP server doesn't give us the "routersOnSubnet" option,
- assume that the default gateway should be the DHCP server.
-
- Patch from Matthew Schick <matt oss-institute org>
- * src/backends/NetworkManagerGentoo.c
- - Fix compilation error due to missing "ip4_broadcast"
-
-2004-12-03 Dan Williams <dcbw@redhat.com>
-
- * initscript/Makefile.am
- * initscript/Debian/NetworkManager
- * initscript/Gentoo/NetworkManager
- * initscript/RedHat/NetworkManager
- * initscript/NMLaunchHelper.c
- - Remove NMLaunchHelper, if you need to wait until the network
- comes up, use the dead code from CVS.
-
-2004-12-01 Colin Walters <walters@redhat.com>
-
- * configure.in: Suck in gcc warnings code from Rhythmbox,
- but use fewer default flags, and in particular add -Wno-unused,
- since the codebase has a lot of unused variables.
-
- * test/nmtestdevices.c (create_device):
- * test/nminfotest.c (get_network_string_property)
- (get_networks_of_type):
- * test/nmclienttest.c (main):
- * src/NetworkManagerDbus.c (nm_dbus_create_error_message):
- * initscript/NMLaunchHelper.c (get_nm_status):
- * info-daemon/NetworkManagerInfoPassphraseDialog.c (update_button_cb):
- * info-daemon/NetworkManagerInfoDbus.c (nmi_dbus_create_error_message):
- Fix declarations after statements.
-
-2004-12-01 Colin Walters <walters@redhat.com>
-
- * info-daemon/NetworkManagerInfoDbus.c (nmi_dbus_return_vpn_password): New method.
- (nmi_dbus_get_vpn_userpass): New method.
- (nmi_dbus_nmi_message_handler): Invoke it.
-
- * info-daemon/NetworkManagerInfoDbus.h (nmi_dbus_return_vpn_password): Prototype.
-
- * info-daemon/NetworkManagerInfoVPN.h,
- info-daemon/NetworkManagerInfoVPN.c: New files; responds
- to requests for VPN passwords.
-
- * configure.in (GNOME_KEYRING_LIBS): Check for gnome-keyring.
-
-2004-12-01 Colin Walters <walters@redhat.com>
-
- * test/nmtestdevices.c, test/nmclienttest.c: Add missing
- includes.
-
-2004-12-01 Colin Walters <walters@redhat.com>
-
- * panel-applet/NMWirelessAppletDbus.c
- (nmwa_dbus_update_active_device_strength): Fix missing
- return value.
-
-2004-12-01 Colin Walters <walters@redhat.com>
-
- * panel-applet/NMWirelessApplet.c: Add missing include.
-
-2004-12-01 Colin Walters <walters@redhat.com>
-
- * src/NetworkManagerWireless.c (nm_wireless_qual_to_percent):
- Remove useless CLAMP (); the value is unsigned, and the case tests
- qual->qual < 100, so the value must always be between 0 and 100.
-
-2004-12-01 Colin Walters <walters@redhat.com>
-
- * dhcpcd/buildmsg.c, dhcpcd/dhcp_test.c: Add missing includes.
-
-2004-11-22 Colin Walters <walters@verbum.org>
-
- * src/backends/NetworkManagerRedHat.c (nm_system_update_dns): Run
- "nscd -i hosts" to invalidate the host cache instead of restarting nscd,
- which is essentially a noop since nscd caches hosts on disk too.
-
-2004-11-22 Colin Walters <walters@redhat.com>
-
- * src/Makefile.am (NetworkManager_SOURCES): Add
- NetworkManagerDevicePrivate.h.
-
-2004-11-22 Dan Williams <dcbw@redhat.com>
-
- * src/NetworkManagerDevicePrivate.h
- - Split out the NMDevice struct to a different file so that stuff like
- NetworkManagerDHCP.c and NetworkManagerSystem.c can use it
-
- * dhcpcd/client.c
- - fprintf->syslog
- - (dhcpSendAndRecv): do non-blocking sends and receives, and check to see if we
- need to cancel the dhcp request during the send and recv
-
- * dhcpcd/client.h
- - Move the DHCP option enum to dhcpcd.h
-
- * src/NetworkManagerDHCP.c
- - Split out the actual IP/netmask/etc setting code
- - New Renew/Rebind functions
- - New timer setup function for renew/rebind operations
-
- * src/NetworkManagerDevice.c
- - For device activation, if we are using DHCP then keep the activation thread
- alive until device deactivation. We need to renew/rebind the DHCP address
- after the T1 (renew) and T2 (rebind) times have expired.
- - Increase some timeouts after bringing wireless cards up/down
-
-2004-11-17 Dan Williams <dcbw@redhat.com>
-
- * Cache access point MAC addresses in NetworkManagerInfo after you've explicitly
- connected to them. Then, after a scan, match up non-ESSID-broadcasting access
- points with any cached MAC addresses from NetworkManagerInfo. Allows us to
- show known access points that don't broadcast their ESSID in the menus without
- any user intervention whatsoever.
-
- * info-daemon/NetworkManagerInfoDbus.c
- - (nmi_dbus_get_network_addresses, nmi_dbus_add_network_address): new functions
- for dbus method calls "getNetworkAddresses" and "addNetworkAddress"
-
- * src/NetworkManagerAP.[ch]
- - Add a "user_addresses" data member to the NMAccessPoint structure
- - (nm_ap_get_user_addresses, nm_ap_set_user_addresses): new functions for accessing
- the user_addresses data member
-
- * src/NetworkManagerAPList.c
- - (nm_ap_list_get_ap_by_address): check user_addresses list too, instead of just
- the AP's reported address
- - (nm_ap_list_update_network): grab the user_addresses list from NetworkManagerInfo
-
- * src/NetworkManagerDHCP.c
- - Increase DHCP timeout from 25s -> 30s
-
- * src/NetworkManagerDbus.[ch]
- - (nm_dbus_get_network_addresses, nm_dbus_add_network_address): have NMI get/set
- user addresses
-
- * src/NetworkManagerDevice.c
- - (nm_device_set_wireless_config): bring down the interface, wait 4s, bring it up,
- wait 2s, then configure it. Sometimes Prism54 cards will freeze up with
- "mgnt tx queue full", seemingly in response to NM controlling the card too much.
- So, we take the card down to clear it out.
- - (nm_device_do_normal_scan): Copy over AP ESSIDs from the allowed access point list
- too, since that's where the user_addresses are
-
- * src/NetworkManagerPolicy.c
- - (nm_state_modification_monitor): Tell NMI to add an AP's hardware address to
- that wireless networks' user_addresses list upon successful activation
-
-2004-11-16 Dan Williams <dcbw@redhat.com>
-
- * src/NetworkManagerDevice.[ch]
- - (nm_device_clear_activation_fail): new function
-
- * src/NetworkManagerPolicy.c
- - (nm_state_modification_monitor): clear the activation_failed flag on devices
- when we've dealt with the failure so the user doesn't get failure-dialog-spammed
-
-2004-11-16 Dan Williams <dcbw@redhat.com>
-
- * src/NetworkManagerDevice.c
- - (nm_device_activate_wireless): Unref best_ap upon success so we don't
- leak the structure, better updating of now_scanning status
- - (nm_device_wireless_network_exists): Rewrite for better/faster checking
-
-2004-11-15 Dan Williams <dcbw@redhat.com>
-
- Major rework of link detection code. We now use DHCP
- as part of the link detection which proves to be much more robust,
- and also supports Open System authentication for wireless networks.
-
- We no longer use external DHCP client programs. Instead, we use
- our own DHCP client, based on substantially reworked bits of 'dhcpcd'
- which was written by:
- Yoichi Hariguchi <yoichi@fore.com>
- Sergei Viznyuk <sv@phystech.com>
- http://www.phystech.com/download/
- It resides in the "dhcpcd" directory and was refactored into a general
- purpose DHCP client library by me.
-
- Also misc fixes (CPPFLAGS->AM_CPPFLAGS, move some stuff around),
- move src/backends/NetworkManagerSystem.h -> src/NetworkManagerSystem.h
-
-2004-11-15 Dan Williams <dcbw@redhat.com>
-
- Patch from Tom Parker <palfrey@tevp.net>:
-
- * src/NetworkManagerDevice.c
- - Less output to console when no access
- points are found during a scan
-
-2004-11-15 Dan Williams <dcbw@redhat.com>
-
- Patch from Tom Parker <palfrey@tevp.net>:
-
- * src/backends/interface_parser.c
- - Use g_strdup ()
- - Check for inp == NULL
- - use syslog ()
-
-2004-11-13 Colin Walters <walters@redhat.com>
-
- Patch from Tom Parker <palfrey@tevp.net>:
-
- * src/Makefile.am (CPPFLAGS): Switch to AM_CPPFLAGS.
-
- * src/backends/NetworkManagerRedHat.c: Switch to
- including shvar.h instead of shvar.c.
-
- * src/backends/NetworkManagerDebian.c: Don't include
- interface_parser.c in source file.
-
- (libnmbackend_la_SOURCES): Don't include shvar.[ch]
- and interface_parser.[ch].
- * src/Makefile.am (libnmbackend_la_SOURCES) <TARGET_REDHAT>:
- Include shvar.c and shvar.h here.
- (libnmbackend_la_SOURCES) <TARGET_DEBIAN>: Include
- interface_parser.c and interface_parser.h here.
-
-2004-11-12 Colin Walters <walters@redhat.com>
-
- * configure.in: Strip out TARGET_DISTRO and
- SYSTEM_BACKEND_FILE variables. Switch to Automake
- conditionals.
-
- * src/Makefile.am (noinst_LTLIBRARIES): Add libnmbackend.la.
- (libnmbackend_la_SOURCES): Use Automake conditionals
- to add distro-specific files.
-
- * initscript/Makefile.am (SUBDIRS): Update to
- use conditionals.
-
-2004-11-12 Colin Walters <walters@redhat.com>
-
- Patches from j bootlab org
-
- * src/Makefile.am (EXTRA_NetworkManager_SOURCES):
- Add interface_parser.[ch].
-
- * src/backends/NetworkManagerDebian.c (nm_system_device_run_dhcp): Invoke
- dhclient with "-lf /var/lib/dhcp/dhclient-%s.leases".
-
-2004-11-12 Colin Walters <walters@redhat.com>
-
- * info-daemon/NetworkManagerInfoDbus.c (nmi_dbus_service_init): Delete
- call to nmi_dbus_is_running too, not necessary anymore.
- * info-daemon/NetworkManagerInfoDbus.c: Include stdlib.h to
- pick up exit().
-
-2004-11-11 Colin Walters <walters@verbum.org>
-
- * info-daemon/NetworkManagerInfoDbus.c (nmi_dbus_is_running):
- Delete.
- (nmi_dbus_service_init): Call dbus_bus_acquire_service with
- the DBUS_SERVICE_FLAG_PROHIBIT_REPLACEMENT flag, and
- then check the result for DBUS_SERVICE_REPLY_SERVICE_EXISTS.
- This avoids a race condition that made it pretty easily
- possible to get two NetworkManagerInfo daemons running.
-
-2004-11-11 Colin Walters <walters@verbum.org>
-
- * src/NetworkManager.c (main): Use daemon(3).
-
- * info-daemon/NetworkManagerInfo.c (main): Ditto.
-
- * dispatcher-daemon/NetworkManagerDispatcher.c (main): Ditto.
-
-2004-11-10 Dan Williams <dcbw@redhat.com>
-
- Patches from j bootlab org
- * src/NetworkManagerDevice.c
- - (nm_device_activate_wireless): wait 5 seconds before attempting to detect
- whether the card has a link or not, some cards are slow
- - (nm_device_activation_configure_ip): make ipv6 work a bit better
-
- * info-daemon/NetworkManagerInfoPassphraseDialog.c
- - Disable the "Login" button on the passphrase dialog until the user
- enters a valid passphrase or key
-
- Patches from Tom Parker <palfrey tevp net>
- * src/backends/NetworkManagerDebian.c
- - Add static IP support to the debian backend
-
- * src/backends/interface_parser.[ch]
- - Parse debian interface config files
-
-2004-11-08 Dan Williams <dcbw@redhat.com>
-
- * src/NetworkManagerDevice.c
- - Some random fprintf->syslog conversions
- - (nm_device_wireless_network_exists): double-check for network
- - (nm_device_find_and_use_essid): Copy over encryption key no matter what
-
- * src/NetworkManagerWireless.[ch]
- - (nm_wireless_[128|64]bit_ascii_to_hex): make "ascii" argument unsigned again
- so that the binary->ascii conversion works (if unsigned, the bitshift
- will fill with zeros, which is what's required). Also mask bitshift
- result with 0xF for futher assurance.
-
-2004-11-06 Dan Williams <dcbw@redhat.com>
-
- * src/NetworkManagerUtils.c
- - (nm_get_wireless_driver_support_level): default to
- FULLY_SUPPORTED rather than UNSUPPORTED, forgot to
- flip this when changing from whitelist->blacklist of
- wireless drivers
-
-2004-11-05 Dan Williams <dcbw@redhat.com>
-
- Patch from Robert Paskowitz:
- * src/backends/NetworkManagerGentoo.c
- - Update static IP config code
-
-2004-11-05 Dan Williams <dcbw@redhat.com>
-
- * info-daemon/NetworkManagerInfoDbus.c
- src/NetworkManagerDbus.[ch]
- src/NetworkManagerDevice.c
- - Keep track of the # of attempts to get the WEP key
- from the user and pass that along to the info daemon
-
-2004-11-05 Dan Williams <dcbw@redhat.com>
-
- * src/NetworkManagerUtils.c
- - Blacklist wireless cards rather than whitelisting them.
- - Grab driver name from HAL rather than trying to find it
- ourselves.
-
-2004-11-03 Dan Williams <dcbw@redhat.com>
-
- * panel-applet/NMWirelessAppletOtherNetworkDialog.c,
- - Disable OK button until valid data is entered
- for encryption stuff too
-
- * panel-applet/NMWirelessApplet.c
- - Report card strength for current AP if the card
- doesn't report strength data for scanned access
- points
-
- * src/NetworkManagerDevice.c
- - Smooth out cards reported quality, Atmel card was
- intermittently reporting no quality data but soon
- recovers
-
- * src/NetworkManagerWireless.c
- - Better quality data percentage calculation. Atmel
- cards (mine at least) seem to report the quality
- in percentage format already, so honor that
-
- Patch from <j@bootlab.org>
- * NetworkManager.h
- info-daemon/NetworkManagerInfoPassphraseDialog.c
- info-daemon/passphrase.glade
- panel-applet/NMWirelessAppletOtherNetworkDialog.c
- panel-applet/essid.glade
- src/NetworkManagerAP.c
- src/NetworkManagerDevice.c
- src/NetworkManagerWireless.[ch]
- - Support ASCII WEP keys, in both 40/64 bit and 104/128 bit
-
-2004-11-03 Dan Williams <dcbw@redhat.com>
-
- * src/NetworkManagerDevice.[ch]
- - (nm_device_set_enc_key): Add parameter to set Authentication
- Mode (Open System, Shared Key, or None). We're still using
- Shared Key for now though.
-
-2004-11-02 Bryan Clark <clarkbw@cvs.gnome.org>
-
- * panel-applet/menu-info.c: change from bold text to light
- colored, may cause problems with some themes, i've tested a lot
- and they seem fine.
-
- * panel-applet/NMWirelessApplet.c: fix strength tooltip
-
-2004-11-01 Colin Walters <walters@verbum.org>
-
- * src/NetworkManagerWireless.h, src/NetworkManagerWireless.c
- (nm_wireless_128bit_key_from_passphrase): Add const.
-
- * src/NetworkManagerAP.h, src/NetworkManagerAP.c
- (nm_ap_set_enc_key_source): Add const.
-
-2004-11-01 Colin Walters <walters@verbum.org>
-
- * .cvsignore: Update.
-
-2004-10-29 Dan Williams <dcbw@redhat.com>
-
- * src/NetworkManagerDevice.c
- - (nm_device_wireless_network_exists): Actually use the encryption
- key we got from the applet when attempting to find a wireless network
- - Don't bring devices down so much since on some cards it triggers
- firmware hotplugs each time
-
- * src/NetworkManagerDbus.c
- - (nm_dbus_nm_set_active_device): free the passphrase we may have gotten
- from the caller
-
-2004-10-29 Dan Williams <dcbw@redhat.com>
-
- * src/NetworkManager.c
- - (nm_hal_device_property_modified): unlock a locked active
- wireless device when a wired connection gets a link.
- (Means you'll switch to wired whenever you plug in no
- matter what).
-
-2004-10-29 Dan Williams <dcbw@redhat.com>
-
- * panel-applet/NMWirelessAppletOtherNetworksDialog.[ch]
- - New files, implement the "Other wireless network" dialog
-
- * panel-applet/NMWirelessApplet.c
- - Move "other wireless network" dialog to separate file
-
- * panel-applet/NMWirelessAppletDbus.[ch]
- - Take key and key_type paramaters for the set_device function
-
- * panel-applet/essid.glade
- - Add UI bits for encryption settings
-
- * src/NetworkManagerDbus.c
- - Retrieve key and key_type params for "setActiveDevice" method call
- and pass them on
- - unref AP returned from nm_device_get_best_ap() when needed
-
- * src/NetworkManagerDevice.c
- - (nm_device_get_best_ap): ref the ap before returning it
- - unref AP returned from nm_device_get_best_ap() when needed
- - (nm_device_activate_wireless): add "ap" parameter so we don't
- need to call nm_device_get_best_ap() here, it was pretty much
- redundant anyway
- - (AP_NEED_KEY): break second link check condition out into separate
- function, and fix segfault when ap->enc_key_source was NULL
- - (nm_device_find_and_use_essid): take key and key_type parameters and
- pass them along to nm_device_wireless_network_exists(). If the
- network does exist, set the passed-in key+key_type on the AP
-
- * src/NetworkManagerPolicy.c
- - unref AP returned from nm_device_get_best_ap() when needed
-
-2004-10-28 Dan Williams <dcbw@redhat.com>
-
- * src/NetworkManagerUtils.c
- - (nm_spawn_process): Fix a potential dereference of NULL
-
- Patches from Peter Jones:
-
- * src/NetworkManagerDevice.c
- - (nm_device_test_wireless_extensions): Better check for
- wireless devices
-
- * src/NetworkManagerUtils.c
- - (nm_spawn_process): Pass in valid stdout and stderr so
- executed programs don't randomly SIGPIPE and fail
- - (nm_get_wired_driver_support_level): quash hal warning
- when checking for USB ethernet device
-
-2004-10-27 Dan Williams <dcbw@redhat.com>
-
- * info-daemon/NetworkManagerInfo.c
- info-daemon/NetworkManagerInfoDbus.c
- info-daemon/NetworkManagerInfoPassphraseDialog.c
- panel-applet/NMWirelessApplet.c
- - Properly escape gconf keys
-
- * src/NetworkManager.c
- - remove unused variables
-
- * src/NetworkManagerAP.c
- - (nm_ap_new_from_ap): Don't redundantly set new APs
- refcount since it got set in nm_ap_new()
-
- * src/NetworkManagerAPList.c
- - (nm_ap_list_combine): Give up ownership of newly created
- access points to the ap list, fixes memleak
-
- * src/NetworkManagerDevice.c
- - Remove cached_ap_list4 member since its not really needed
- - (nm_device_wireless_network_exists): Try to get correct
- encryption status of a found AP if its already in our
- device list
- - (nm_device_do_normal_scan): Clean up scanning a bit, make
- memory allocs/deallocs a bit clearer and shorter-lived
-
-2004-10-26 Ray Strode <rstrode@redhat.com>
-
- * panel-applet/NMWirelessApplet.c:
- (custom_essid_item_selected): kill some compiler
- warnings
-
-2004-10-26 John (J5) Palmieri <johnp@redhat.com>
-
- * info-daemon/NetworkManagerInfoDbus.c
- - (nmi_dbus_is_running): New function for determining if nmi is already running
- - (nmi_dbus_service_init): exit if another instance of nmi is already running
-
-2004-10-23 Dan Williams <dcbw@redhat.com>
-
- * info-daemon/NetworkManagerInfoDbus.c
- - Trap the "DeviceActivationFailed" signal
-
- * docs/NetworkManager DBUS API.txt
- - Add "DeviceActivationFailed" signal
-
- * panel-applet/NMWirelessAppletDbus.c
- - Quash the "NetworkManager service not available" message
-
- * src/NetworkManagerDbus.[ch]
- - Add the "DeviceActivationFailed" signal
-
- * src/NetworkManagerDevice.c
- - Add support for activation_failed flag
- - Fix deadlock where activation thread didn't clean itself up, making
- main thread still believe it was alive forever (didn't reset activation
- flags like activating, just_activated, etc when IP configuration
- failed)
-
- * src/NetworkManagerPolicy.c
- - Implement logic for DeviceActivationFailed signal, and when activation fails
- for wireless networks, try to fall back to some other access point
-
-2004-10-23 Dan Williams <dcbw@redhat.com>
-
- * panel-applet/NMWirelessApplet.[ch]
- - Place the GtkMenuBar inside a GtkEventBox, and add the Event Box
- to the applet object, so we can get tooltips
- - Add tooltips (RH #136866)
-
- * src/NetworkManagerDevice.c
- - When trying to find a wireless network, try to connect with encryption
- turned on first, so that we can more accurately detect whether or not
- we need to use encryption for the actual association later on
-
-2004-10-21 Dan Williams <dcbw@redhat.com>
-
- * Add some support for telling NetworkManagerInfo to tell the user
- that they are using a device that's not fully supported
-
- * Fix some assertions in debug messages due to null access point args
-
-2004-10-21 Dan Williams <dcbw@redhat.com>
-
- * src/NetworkManagerDevice.c
- - Don't try to activate/bring up/down unsupported
- devices
-
- * src/NetworkManagerUtils.c
- - Fix case of PCI ID checks for driver support levels
-
-2004-10-21 Dan Williams <dcbw@redhat.com>
-
- * NetworkManager.h
- - New file, now contains commonly used structures and bits
- for the dbus API of NetworkManager
-
- * Makefile.am
- - Deliver NetworkManager.h to ${includedir}/NetworkManager
-
- * src/NetworkManager.h
- - Rename -> src/NetworkManagerMain.c
-
- * Various fixups all around to use NetworkManager.h and new
- src/NetworkManagerMain.h, remove redundant bits that got
- moved into NetworkManager.h
-
- * src/NetworkManagerDevice.[ch]
- src/NetworkManagerUtils.[ch]
- src/NetworkManagerPolicy.c
- src/NetworkManagerDbus.c
- - Whitelist wireless drivers, and blacklist some wired
- drivers. Also blacklist cipsec and ethernet-over-usb
- devices at this time (RH #135722, RH #135648)
- - Don't leak unsupported devices out over dbus, or allow
- them to be set as the active device. Skip over them
- during automatic device picking
-
- * test/nmclienttest.c
- - Clean up the dbus code a lot
-
-Tue Oct 19 14:20:29 2004 Jonathan Blandford <jrb@redhat.com>
-
- * configure.in: post release bump.
-
-Tue Oct 19 14:19:24 2004 Jonathan Blandford <jrb@redhat.com>
-
- * configure.in:
- * NEWS: Released NetworkManager-0.3.1
-
-2004-10-18 Dan Williams <dcbw@redhat.com>
-
- Patches from Thom May:
- * test/nmtestdevices.c
- - Include <string.h>
- * src/backends/NetworkManagerDebian.c:
- - (nm_system_device_run_dhcp, nm_system_device_stop_dhcp)
- (nm_system_device_flush_routes, nm_system_device_flush_addresses)
- Move to using g_strdup_printf rather than arbitrary buffers
- - (nm_system_device_setup_static_ip4_config) Implement function.
- - (nm_system_kill_all_dhcp_daemons) Use killall -q rather than killall
-
-2004-10-17 Dan Williams <dcbw@redhat.com>
-
- * info-daemon/NetworkManagerInfoDbus.c
- - Display name of network in the "network not found" dialog
-
- * panel-applet/NMWirelessAppletDbus.c
- - (nmwa_dbus_call_nm_method): new function replaces all other
- nmwa_dbus_get_[string|string_array|int|boolean] methods
- - nmwa_dbus_get_network_name() and nmwa_dbus_get_device_name()
- consolidated into nmwa_dbus_get_object_name()
-
-2004-10-15 Dan Williams <dcbw@redhat.com>
-
- * src/NetworkManagerDbus.c
- info-daemon/NetworkManagerInfoDbus.c
- - Display an error dialog when the user tries to use an
- "Other wireless network" that's not found.
-
-2004-10-15 Dan Williams <dcbw@redhat.com>
-
- * panel-applet/NMWirelessApplet.[ch]
- - Fix up corner cases in applet state, making it
- look more responsive. Change state to "connecting" when
- the user is forcing a device too.
-
-2004-10-15 Dan Williams <dcbw@redhat.com>
-
- * src/NetworkManagerAPList.c
- - (nm_ap_list_update_network): Disown AP after the list takes ownership
-
- * src/NetworkManagerDbus.c
- - (nm_dbus_nm_set_active_device): Simplify the device setting logic
-
- * src/NetworkManagerDevice.c
- - Disown APs after the device's AP list takes ownership
-
-2004-10-15 Dan Williams <dcbw@redhat.com>
-
- * panel-applet/NMWirelessApplet.c
- - Update our applet state from the GUI thread
-
- * panel-applet/NMWirelessAppletDbus.c
- - Greatly simplify the locking to make the GUI thread
- smoother. Update a private copy of the device list
- and active device and only when done talking to
- NetworkManager turn it over to the GUI thread.
-
-2004-10-15 Dan Williams <dcbw@redhat.com>
-
- * src/NetworkManagerAP.[ch]
- - Add "artificial" get/set functions, set for APs that
- aren't discovered as part of a scan but instead
- discovered by force-setting the ESSID
-
- * src/NetworkManagerDevice.[ch]
- - (nm_device_wireless_network_exists): pass back whether
- or not the discovered AP was encrypted. Also, try
- falling back to encrypted mode on the card if unencrypted
- association doesn't work
- - (nm_device_find_and_use_essid): If the network requested
- did in fact exists, but it wasn't in our scan list, add
- an "artificial" entry for it. Some Cisco cards don't
- see non-ESSID-broadcasting APs in their scan but can still
- associate with them if you know the ESSID, this works around
- that behavior
- - (nm_device_do_normal_scan): Carry "artificial" APs over from scan
- to scan if the card is currently associated with that AP
-
-2004-10-15 Dan Williams <dcbw@redhat.com>
-
- ---- We have a website ----
- http://people.redhat.com/dcbw/NetworkManager
-
- Patch from Robert Paskowitz:
- * src/NetworkManager.c
- - (main): Make sure we are run as root
- * src/NetworkManagerDevice.c
- - Fix type in ad-hoc setting function
-
- Patch from Thom May:
- * src/backends/NetworkManagerDebian.c
- - Make Debian backend compile again
-
-2004-10-14 Dan Williams <dcbw@redhat.com>
-
- * Tagged NetworkManager-0_3
-
-2004-10-14 Dan Williams <dcbw@redhat.com>
-
- Patch from Robert Paskowitz:
- * NEWS
- src/NetworkManagerDevice.[ch]
- src/backends/NetworkManagerDebian.c
- src/backends/NetworkManagerGentoo.c
- src/backends/NetworkManagerRedHat.c
- src/backends/NetworkManagerSlackware.c
- - Add support for grabbing and using a broadcast address
- from system config files
- - Some Gentoo backend fixes for grabbing network config
- - Fix LOG_WARN->LOG_WARNING
-
-2004-10-14 Dan Williams <dcbw@redhat.com>
-
- * NEWS: a few small fixes in the credits
-
-Thu Oct 14 19:12:58 2004 Jonathan Blandford <jrb@redhat.com>
-
- * NEWS: prep for release.
-
-Thu Oct 14 16:47:12 2004 Jonathan Blandford <jrb@redhat.com>
-
- * panel-applet/NMWirelessAppletDbus.c
- (nmwa_dbus_update_device_wireless_networks): remove warnings.
-
-Thu Oct 14 16:40:39 2004 Jonathan Blandford <jrb@redhat.com>
-
- * panel-applet/NMWirelessApplet.c (animation_timeout): Make
- applet->state == APPLET_STATE_NO_NM animation.
-
- * panel-applet/NMWirelessApplet.c (custom_essid_item_selected):
- set the text correctly.
-
-2004-10-14 Dan Williams <dcbw@redhat.com>
-
- * src/NetworkManager.c
- - Only accept and manager 802.3 and 802.11 devices
-
- * src/NetworkManagerDbus.[ch]
- - (nm_dbus_nm_set_active_device): move most of the actual activation
- logic into NetworkManagerDevice.c
- - (nm_dbus_network_status_from_data): new function
- - (nm_dbus_signal_network_status_change): new function, unused for now
- - (nm_dbus_nm_message_handler): use nm_dbus_network_status_from_data () now
-
- * src/NetworkManagerDevice.[ch]
- - (nm_device_find_and_use_essid): new function. Search for, and if found use,
- a random ESSID.
-
-2004-10-14 John (J5) Palmieri <johnp@redhat.com>
-
- * info-daemon/NetworkManagerInfo.c
- - (main): Added session management
-
-2004-10-14 Dan Williams <dcbw@redhat.com>
-
- * panel-applet/NMWirelessAppletDbus.[ch]
- - Expose network_device_[un]ref()
- - Expose wireless_network_[un]ref()
- - (wireless_network_new_with_essid): new function, create and return
- a wireless network with a particular essid
-
- * panel-applet/NMWirelessApplet.c
- - Hook up the "other network" dialog to do something
-
-Wed Oct 13 19:31:53 2004 Jonathan Blandford <jrb@redhat.com>
-
- * panel-applet/NMWirelessApplet.c: Add an essid dialog. It
- doesn't work yet, but it looks okay.
-
- * panel-applet/icons/*png: Resize to 22x22 and install in the
- right place.
-
-2004-10-13 Dan Williams <dcbw@redhat.com>
-
- * panel-applet/NMWirelessApplet.c
- - Add function to print out applet_state in a readable
- manner
-
- * src/NetworkManager.c
- - (main): Don't segfault when nm_dbus_init() fails, we had
- a left-over call to hal_shutdown() into which we passed NULL
-
- * src/NetworkManagerAP.c
- - (nm_ap_set_essid): Allow NULL essids
-
- * src/NetworkManagerAPList.[ch]
- - More use of nm_ap_list_[un]lock ()
- - (nm_ap_list_get_ap_by_essid): don't warn when looking for a NULL
- network/essid, just return nothing. Also skip over NULL
- essid access points in the list when searching
- - (nm_ap_list_get_ap_by_address): new function
- - (nm_ap_list_update_network): set the access point's key source to
- NULL when the key returned from NetworkManagerInfo is NULL or
- of 0 length
- - nm_ap_list_update_keys() -> nm_ap_list_update_properties(), and
- copy timestamp over too
- - (nm_ap_list_copy_essids_by_address): new function, attempt to
- find the correct ESSID for a blank-essid access point by searching
- through another list and matching access point MAC addresses
- - (nm_ap_list_diff): exclude blank-essid access points from the diffs
-
- * src/NetworkManagerDbus.c
- - (nm_dbus_nm_set_active_device): deal with random networks the user
- may specify. This is mainly for access points that don't
- broadcast their essid. So if the user tells us to associate with
- some random ESSID that's not in our access point list, we find
- out if the access point does in fact exist (by attempting association
- and then matching that access point's MAC address with the essid the
- user gave us) and then we switch to it.
- - (nm_dbus_devices_handle_request): don't add blank-essid access points
- to the returned list of networks for the "getNetworks" method
-
- * src/NetworkManagerDevice.[ch]
- - Extra debugging info for link detection
- - (nm_device_ap_list_get_ap_by_address): new function, return an AP
- based on MAC address
- - (nm_device_get_path_for_ap): ignore blank-essid access points
- - (nm_device_wireless_network_exists): new function, find out whether
- a random ESSID exists by attempting to associate with it
- - (nm_device_do_normal_scan): allow blank-essid access points in our
- device list as long as they have an AP MAC address we can use.
- Also send WirelessNetwork[Dis]Appeared signals for non-active
- devices too. Lets the applet update more frequently.
-
- * src/backends/NetworkManagerGentoo.c
- - Patch from: Robert Paskowitz
- - Update backend code for Gentoo
- - Implement nm_system_device_update_config_info ()
-
- * test/nmclienttest.c
- - (set_network_device): new function, takes a command-line argument
- and tells NetworkManager to use that wireless network
-
-Wed Oct 13 John (J5) Palmieri <johnp@redhat.com>
-
- * info-daemon/NetworkManagerInfo.c (nmi_spawn_notification_icon): Stop respawning
- if the notification icon crashes 5 times within 5 seconds of each respawn
-
-Tue Oct 12 22:53:04 2004 Jonathan Blandford <jrb@redhat.com>
-
- * panel-applet/NMWirelessApplet.c (nmwa_update_state): remove
- g_print.
-
-Tue Oct 12 22:44:15 2004 Jonathan Blandford <jrb@redhat.com>
-
- * panel-applet/NMWirelessApplet.h: Change the name of the icons.
-
- * panel-applet/NMWirelessApplet.c: (animation_timeout),
- (nmwa_update_state), (nmwa_destroy), (nmwa_setup_widgets),
- (nmwa_icons_free), (nmwa_icons_load_from_disk), (nmwa_icons_init):
- Change the name of the icons.
-
- * panel-applet/menu-info.c: (nm_menu_wired_class_init),
- (nm_menu_wired_expose_event), (nm_menu_network_class_init),
- (nm_menu_wireless_class_init), (nm_menu_wireless_new),
- (nm_menu_wireless_expose_event): Really bad hack to get the style
- to draw in the right color.
-
-Tue Oct 12 John (J5) Palmieri <johnp@redhat.com>
-
- * info-daemon/NetworkManagerInfo.c (main): Add child watch to respawn
- Notification if it crashes
-
-Fri Oct 8 07:19:55 2004 Jonathan Blandford <jrb@redhat.com>
-
- * panel-applet/NMWirelessAppletDbus.c (nmwa_dbus_get_double):
- (nmwa_dbus_get_string): remove unused functions
-
- * panel-applet/NMWirelessApplet.c (nmwa_about_cb):
- (nmwa_cancel_timeout), (nmwa_get_menu_pos), (nmwa_factory):
- remove unused functions
-
- * panel-applet/NMWirelessApplet.c: Rewrite icon code.
-
-2004-10-12 Dan Williams <dcbw@redhat.com>
-
- * panel-applet/NMWirelessAppletDbus.c
- - New functions:
- wireless_network_new
- wireless_network_copy
- network_device_new
- network_device_copy
-
- * src/NetworkManagerDevice.[ch]
- - New functions:
- nm_device_set_mode_managed
- nm_device_set_mode_adhoc
- - Use these functions where appropriate
- - When creating a new wireless device, force the card
- to managed/Infrastructure mode as soon as possible
-
-2004-10-12 Dan Williams <dcbw@redhat.com>
-
- * src/NetworkManagerDevice.c
- - Force wireless cards into Infrastructure mode before we use them
-
-2004-10-12 Dan Williams <dcbw@redhat.com>
-
- * TODO
- - Remove bit about static IP address support
-
- * src/NetworkManagerUtils.c
- - (nm_spawn_process): Add some error reporting
-
- * src/NetworkManagerDevice.c
- - (nm_device_activation_configure_ip): hook up to the static config
- routines in the backends
-
- * src/backends/NetworkManagerRedHat.c
- - (nm_system_device_update_config_info): use shvar.c routines to
- parse the config file iformation, not our own
- - (nm_system_device_setup_static_ip4_config): new function, based
- heavily on 'ifup' script and 'ipcalc' tool code. Set up a device
- with a static IP address and gateway
-
- * src/backends/shvar.[ch]
- - Parser (filched from initscripts package) for ifcfg-* files
-
- * src/backends/NetworkManagerSystem.h
- src/backends/NetworkManagerGentoo.c
- src/backends/NetworkManagerDebian.c
- src/backends/NetworkManagerSlackware.c
- - Stub nm_system_device_update_config_info() and nm_system_device_setup_static_ip4_config()
-
-2004-10-11 Dan Williams <dcbw@redhat.com>
-
- * TODO
- - Remove bit about more robust AP diffing since I just implemented it
-
-2004-10-11 Dan Williams <dcbw@redhat.com>
-
- * src/NetworkManagerAP.c
- - (nm_ap_new, nm_ap_new_from_ap): Don't crash when we don't have
- enough RAM to allocate new AP structures, but return NULL instead
-
- * src/NetworkManagerAPList.[ch]
- - (nm_ap_list_is_empty): new function
- - (nm_ap_list_combine): new function, combine two access point lists
- - (nm_ap_list_copy_keys): new function, copy keys from one list
- into another
-
- * src/NetworkManagerDevice.[ch]
- - Rename some functions to be clearer:
- nm_device_get_best_ap_frozen -> nm_device_is_best_ap_frozen
- nm_device_just_activated -> nm_device_is_just_activated
- nm_device_activating -> nm_device_is_activating
- nm_device_now_scanning -> nm_device_is_scanning
- - Cache the last 4 scans so that the access point list is more stable.
- We combine the lastest two scans and use that as the AP list,
- and diff that combined list against the combination of the earliest
- two cached scans for the WirelessNetworkAppeared/Dissappeared signals
-
-2004-10-08 John (J5) Palmieri <johnp@redhat.com>
-
- * info-daemon/NWManagerInfo.h
- - (struct NetworkManagerInfo): add shutdown_timeout GSource
-
- * info-daemon/NWManagerInfoDbus.c
- - (shutdown_callback): new function
- - (nmi_dbus_filter): Create a 30 second timeout until shutdown
- if NetworkManager goes away. Kill the timeout
- if NetworkManager restarts before the 30 seconds
- are up.
- - (nmi_dbus_service_init):
- - call gtk_main_quit if NetworkManager is not running
- - add filters to monitor dbus service creations and
- deletions
-
-2004-10-08 John (J5) Palmieri <johnp@redhat.com>
-
- * panel-applet/NMWirelessApplet.c
- - (nmwa_update_state): Hide notification icon if we are only
- showing one wired card and no wireless interfaces
- (Red Hat Bug #134895)
-
- * panel-applet/NMWirelessAppletDbus.c
- - (nmwa_dbus_filter): changed exit to gtk_main_quit ()
-
- * info-daemon/NWManagerInfo.c
- - (main): Terminated the notification_icon_cmd array with a NULL
-
-2004-10-08 Hendrik Brandt <hebra@cvs.gnome.org>
-
- * configure.in (ALL_LINGUAS): Added de (German).
-
-2004-10-08 Dan Williams <dcbw@redaht.com>
-
- * src/NetworkManagerDevice.c
- - Be a bit more robust about link checking, ie make sure that
- the WEP key we were given actually has some data in it
-
-2004-10-08 Dan Williams <dcbw@redhat.com>
-
- * info-daemon/NetworkManagerInfo.c (main):
- - Initialize GError object to NULL
-
-2004-10-08 Dan Williams <dcbw@redhat.com>
-
- * panel-applet/NMWirelessAppletDbus.c
- - Die if NetworkManagerInfo dies, since it manages our lifetime
-
-2004-10-08 Dan Williams <dcbw@redhat.com>
-
- * info-daemon/NetworkManagerInfo.[ch]
- info-dameon/NetworkManagerInfoDbus.[ch]
- info-daemon/NetworkManagerInfoPassphraseDialog.[ch]
- - Preserve original label text in the passphrase dialog so that
- it actually gets updated with the new network name the next
- time around. Previously, we were overwriting it so you'd get
- the wrong network name to enter a key for
- - Add a "Key Type" combo to the passphrase dialog, user selects
- encryption key type now, type is stored in GConf too
- - Adjust NM<->NMI DBUS protocol to pass the key type back to NM too
-
- * src/NetworkManagerAP.[ch]
- - Remove all the encyption method magic. It's now set by the user
- and NetworkManager retrieves the type of encryption key from
- NetworkManagerInfo
-
- * src/NetworkManagerAPList.[ch]
- src/NetworkManagerDbus.[ch]
- - Adjust to new way of setting encryption key and method
- - Pull encryption method down from NMI along with key
-
- * src/NetworkManagerDevice.[ch]
- - Removed encryption method fallback magic as the method is now
- determined by the user. This greatly simplifies the connection
- logic.
- - More robust connection/link logic. Besides removing the encryption
- method fallback magic, check whether or not the card is receiving
- invalidly encrypted packets, which usually indicates that we have
- a bad WEP key set.
- - Don't blindly forge ahead when DHCP fails (still not completely fixed)
-
- * test/nminfotest.c
- - Test out new "Key Type" stuff in the NMI passphrase dialog
-
-2004-10-07 Dan Williams <dcbw@redhat.com>
-
- * info-daemon/NetworkManagerInfo.conf
- - Allow root user to run NMI too
-
-2004-10-06 Dan Williams <dcbw@redhat.com>
-
- * src/NetworkManagerDevice.[ch]
- src/NetworkManagerDbus.c
- doc/NetworkManager DBUS API.txt
- - Add a new status tag "scanning", which is set when there
- is no active network connection, but NetworkManager is
- looking for an access point to associate with
-
- * panel-applet/main.c
- - Cast the applet appropriately for gtk_widget_show_all ()
-
-Mon Oct 4 12:55:41 2004 Jonathan Blandford <jrb@redhat.com>
-
- * panel-applet/eggtrayicon.[ch]:
- * panel-applet/main.c: Add missing file
-
-2004-10-04 Dan Williams <dcbw@redhat.com>
-
- * src/NetworkManagerDevice.[ch]
- - Add a slightly more robust method of determining if the WEP key
- is correct or not, by checking the WEP-discarded packet count
- on the card
-
- * info-daemon/NetworkManagerInfo.c
- - (nmi_gconf_notify_callback): Fix GConf essid escaping, should
- un-escape values we pull out rather than escaping them
-
-2004-10-03 Marcel Telka <marcel@telka.sk>
-
- * configure.in (ALL_LINGUAS): Added sk.
-
-Fri Oct 1 18:26:03 2004 Jonathan Blandford <jrb@redhat.com>
-
- * panel-applet/menu-info.c (nm_menu_wired_class_init): update look
- and feel. We should be back to working, and have a good, clean
- look.
-
-2004-09-30 Dan Williams <dcbw@redhat.com>
-
- * info-daemon/NetworkManagerInfo.c
- info-daemon/NetworkManagerInfoDbus.c
- test/nminfotest.c
- - Escape ESSIDs in gconf
-
- * src/NetworkManagerDevice.c
- - Fix pseudo-scanning to use netowrk list from info daemon
-
-Wed Sep 29 18:18:24 2004 Jonathan Blandford <jrb@redhat.com>
-
- * configure.in: Add a temporary --enable-notification-icon. This
- will prolly go away.
-
- * info-daemon/Makefile.am:
- * info-daemon/NetworkManagerInfo.c:
- * info-daemon/NetworkManagerInfo.h: Use a notification icon.
-
- * panel-applet/Makefile.am:
- * panel-applet/NMWirelessApplet.c: Turn into a notification icon
- * panel-applet/NMWirelessApplet.h:
-
-Tue Sep 28 16:35:20 2004 Jonathan Blandford <jrb@redhat.com>
-
- * panel-applet/NMWirelessApplet.c: Fix deadlock. Add a separator
- before 'select custom ESSID'.
-
- * panel-applet/menu-info.c: Start rewrite for better headers. Not
- fully complete, but syncing in prep for merge.
-
- * panel-applet/icons/*png: New images
-
-2004-09-28 Dan Williams <dcbw@redhat.com>
-
- * src/NetworkManager.c
- src/NetworkManagerDevice.c
- src/NetworkManagerPolicy.c
- - Don't blow away an active wired connection on startup
-
-2004-09-28 Bryan Clark <clarkbw@cvs.gnome.org>
-
- Changes from J5
-
- * info-daemon/NetworkManagerInfo.conf: fixed own permissions
-
- * info-daemon/NetworkManagerInfoDbus.c: added service name to
- syslog output
-
-Wed Sep 22 14:19:48 2004 Jonathan Blandford <jrb@redhat.com>
-
- * panel-applet/NMWirelessApplet.c: Only add essid's if we actually
- have a wireless card.
-
-Wed Sep 22 14:05:48 2004 Jonathan Blandford <jrb@redhat.com>
-
- * panel-applet/NMWirelessApplet.c: move the custom essid item.
- Also, get the right device strings.
-
-Wed Sep 22 13:51:45 2004 Jonathan Blandford <jrb@redhat.com>
-
- * panel-applet/menu-info.c (nm_menu_network_draw_indicator): Flip
- the logic to make this right.
-
- * panel-applet/NMWirelessApplet.c (sort_networks_function): sort
- devices so that wired networks are always first.
-
-2004-09-22 <clarkbw@cvs.gnome.org>
-
- * initscript/Debian/.cvsignore:
- * initscript/Slackware/.cvsignore:
- Added new cvsignores for Makefile, Makefile.in
-
- * test/.cvsignore:
- Added nmtestdevices
-
- * src/NetworkManagerDevice.c:
- * src/NetworkManager.c:
- Updated the wireless/wired HAL device strings from net.ethernet to
- net.80203 or net.80211 depending on wired or wireless respectively
-
- * examples/python/NetworkManager.py:
- s/Quality/Strength/
-
- * examples/python/systray/network_tray.py:
- Lots of little changes and fixes. been rotting for a while so I
- figured I'd finally sync them all with CVS
-
-Tue Sep 21 18:05:34 2004 Jonathan Blandford <jrb@redhat.com>
-
- * configure.in: Add graphics
-
- * panel-applet/Makefile.am: Add graphics
-
- * panel-applet/icons/*: Add graphics
-
- * panel-applet/NMWirelessApplet.c: Use new menu times to display
- the icons fully lined up.
-
- * panel-applet/menu-info.c:
- * panel-applet/menu-info.h: Add another menu type.
-
-Fri Sep 17 14:04:34 2004 Jonathan Blandford <jrb@redhat.com>
-
- * panel-applet/NMWirelessApplet.c: Redo the menu item code.
-
- * panel-applet/menu-item.[ch]: Wireless menu item.
-
-2004-09-15 John (J5) Palmieri <johnp@redhat.com>
-
- * info-daemon/NetworkManagerInfo.conf
- - Created a more robust security policy for the DBus service
- - everything is denied by default
- - root can own and send to the service
- - users logged in at the console can send to the service
-
-2004-09-13 Dan Williams <dcbw@redhat.com>
-
- * src/NetworkManagerDevice.c
- - (nm_device_get_essid): use iw_get_basic_config() rather than
- iw_get_ext (SIOCGIWESSID) since prism54 cards don't like
- the latter
-
-2004-09-13 Dan Williams <dcbw@redhat.com>
-
- * TODO: fix typo
-
- * docs/NetworkManager DBUS API.txt
- - Update for new signal strength changes
-
- * panel-applet/NMWirelessApplet.c
- - Make panel icon show strength of the current connection
- - Cleanups and memleak fixes
-
- * panel-applet/NMWirelessApplet.h
- - Add data members for signal strength on devices and networks
-
- * panel-applet/NMWirelessAppletDbus.c
- - Free more DBusErrors
- - Update for new signal strength changes
- - Make devices and networks more like real objects, use ref/unref methods
- - Actually unlock the mutex when updating the active device
-
- * src/NetworkManagerAP.c
- - Change AP functions and data members from "quality"->"strength"
-
- * src/NetworkManagerDbus.c
- - Kill "getMaxQuality" and "getQuality" methods
- - Add "getStrength" methods for Networks and Devices
-
- * src/NetworkManagerDevice.[ch]
- - Add accessors for device strength
- - Add functions to update strength for a device. Note that not all drivers
- actually support signal strength for scanned access points (Atmel drivers
- being one)
- - Calculate signal strength for each AP during scan
-
- * src/NetworkManagerWireless.[ch]
- - Add function to return signal strength % from a device and a raw quality struct
-
- * test/nmclienttest.c
- - Update for new signal strength changes
-
-2004-09-11 Dan Williams <dcbw@redhat.com>
-
- * src/NetworkManager.c
- - Fix race condition between initscripts and NM on card insertion
- which could cause a card to keep an IP address and routes around
- even when it was not the active device
-
- * src/NetworkManagerDbus.c
- - Fix compile errors, free more DBusErrors
-
-2004-09-11 Dan Williams <dcbw@redhat.com>
-
- * docs/NetworkManager DBUS API.txt
- - Add an explanation of NM's API
-
- * src/NetworkManagerDbus.c
- - Free some more DBusErrors if needed
-
-2004-09-11 Dan Williams <dcbw@redhat.com>
-
- * panel-applet/NMWirelessApplet.c
- panel-applet/NMWirelessAppletDbus.c
- - Start using NetworkDevice/WirelessNetwork structures in more places
- - Update for unified device/network forcing in NetworkManager
-
- * src/NetworkManager.c
- - some code consolidation
-
- * src/NetworkManagerDbus.c
- - (nm_dbus_nm_set_active_device): "setActiveDevice" now takes either one
- or two arguments: the first is the NM ID of the device to switch to,
- and the second (optional) argument is the ESSID of a wireless network
- to use as well.
- - Get rid of "setNetwork" method due to above change
-
- * src/NetworkManagerDevice.c
- - (nm_device_new): perform scan and update best AP on device creation
- - nm_device_activation_cancel_if_needed()->nm_device_activation_should_cancel()
- - nm_device_activation_signal_cancel()->nm_device_activation_cancel(), and
- spin waiting for cancellation to finish before returning
-
- * src/NetworkManagerPolicy.c
- - Changes here clarify the situations in which a device switch occurs, and
- make sure to keep using a forced device and network if the user gives
- us one
- - Remove old unused code
-
-2004-09-11 Martin Willemoes Hansen <mwh@sysrq.dk>
-
- * configure.in: Added Danish (da) to ALL_LINGUAS.
-
-2004-09-09 Dan Williams <dcbw@redhat.com>
-
- * panel-applet/NMWirelessAppletDbus.c
- - Pull fresh devices and networks from NM when wireless networks
- change. Provides faster feedback of a forced wireless network
-
- * src/NetworkManagerDbus.c
- - Return error when "getMaxQuality" is called on a wired device
- - Make best_ap freezing actually work again, and signal cancellation
- of activation if there's already a device activation when the user
- freezes the best_ap
-
- * src/NetworkManagerDevice.c
- - Don't clear out the best_ap for wireless devices when the link goes
- down, that's done elsewhere
- - Kill any dhcp daemons when cancelling device activation since they
- may be stuck waiting for a DHCP address, and since we're cancelling
- activation we don't care about that anymore
-
- * src/NetworkManagerPolicy.c
- - Make sure to unref the device we ref earlier (we refed it to make sure
- it stuck around during device activation and such)
- - If we were going to change the best device, but its activating currently
- (and therefore the change didn't occur due to the check earlier)
- we mark the state changed to we come back to it later when device
- activation has canceled and its no longer activating
-
- * src/backends/NetworkManagerRedHat.c
- - SIGKILL dhcp daemons rather than SIGTERM-ing them
-
-2004-09-09 Bryan Clark <clarkbw@cvs.gnome.org>
-
- * info-daemon/passphrase.glade:
- set passphrase input to activates_default : True
-
- * examples/python/systray/network_tray.py
- (network_tray.sort_networks):
-
- Added support for having wireless always scanning
-
-2004-09-09 Dan Williams <dcbw@redhat.com>
-
- NOTE: this commit changes the behavior of wireless devices in
- NetworkManager. They are now up all the time, scanning all
- the time. Only the active device has an IP address and routing
- information set up however. Also, NetworkManager will no longer
- opportunistically switch wireless networks when a better one
- comes in range, it will remain associated with one wireless network
- until that one drops out.
-
- * panel-applet/NMWirelessApplet.c
- panel-applet/NMWirelessAppletDbus.c
- - List all wireless cards and their respective networks
-
- * src/NMLoadModules
- - Use full path to /sbin/ip
-
- * src/NetworkManager.c
- - Keep wireless devices up all the time so they can scan
-
- * src/NetworkManagerDbus.c
- - On a WirelessNetworkUpdate signal from NMI, don't update
- the "best" AP
-
- * src/NetworkManagerDevice.c
- - (nm_device_set_link_active): clear out the best ap for
- wireless devices when the link is set to FALSE
- - Scan on all wireless cards, all the time
- - (nm_device_activation_worker): split out the wireless card
- link-waiting code to a separate function
- - Keep wireless cards up even if device activation fails
- - Don't update the "best" ap as much
-
- * src/NetworkManagerPolicy.c
- - Don't update the best ap when checking if its frozen,
- let link checking clear out a frozen best ap for us
-
- * src/NetworkManagerWireless.c
- - Scan on all wireless cards, all the time
-
-2004-09-09 Francisco Javier F. Serrador <serrador@cvs.gnome.org>
-
- * configure.in: Added 'es' (Spanish) to ALL_LINGUAS.
-
-2004-09-09 Ankit Patel <ankit@redhat.com>
-
- * configure.in: Added 'gu' (Gujarati) to ALL_LINGUAS.
-
-2004-09-09 Pablo Saratxaga <pablo@mandrakesoft.com>
-
- * configure.in: Added Walloon (wa) to ALL_LINGUAS.
-
-2004-09-08 Bryan Clark <clarkbw@cvs.gnome.org>
-
- * examples/python/NetworkManager.py:
- added CONNECTED, CONNECTING, and DISCONNECTED states
- added methods to return number of devices of a single type
-
- * examples/python/systray/network_tray.py:
- did some tweaks to get the menu looking near what it is supposed
- to look like. Also did a Airo card hack to make it show the
- correct AP quality
-
-2004-09-08 Dan Williams <dcbw@redhat.com>
-
- * panel-applet/no-networkmanager.png
- panel-applet/Makefile.am
- panel-applet/NMWirelessApplet.c
- - Add a "NetworkManager not running" icon and use it
- - Use new consolidated GConf keys rather than Preferred/Trusted
-
- * TODO: update
-
- * info-daemon/NetworkManagerInfo.c
- info-daemon/NetworkManagerInfoDbus.[ch]
- info-daemon/NetworkManagerInfoPassphraseDialog.c
- - There are now no longer two separate lists of wireless networks,
- but one list where each network is "trusted" or not trusted
- - Add a "getNetworkTrusted" dbus method
- - "WirelessNetworkUpdate" signal now sent rather than
- "PreferredNetworkUpdate/TrustedNetworkUpdate" signals
- - Start freeing some dbus errors (not completed yet)
-
- * info-daemon/passphrase.glade
- - Remove the "don't show" hints for pager and taskbar
- - Add a title since its going to be in the taskbar
-
- * src/NetworkManager.[ch]
- src/NetworkManagerAPList.[ch]
- - There are now no longer two separate lists of wireless networks,
- but one list where each network is "trusted" or not trusted
-
- * src/NetworkManagerAP.[ch]
- - Add get/set "trusted" accessors and data bit
-
- * src/NetworkManagerDbus.[ch]
- - Add function to get "trusted" status of a network from NetworkManagerInfo
- - Trap new WirelessNetworkUpdate signal rather than old separate signals
-
- * src/NetworkManagerDevice.[ch]
- - Add per-device config data (ip4 addr, gateway, netmask) and accessors
- - (nm_device_new): Get device config from backend when initializing devices
- - (nm_device_activation_worker): Split out device configuration on
- activation to deal with static/dynamic IP differences, and try encryption
- fallbacks on a device if the encryption method for the best AP is not good
- - (nm_device_update_best_ap): convert to new consolidated access point lists from
- NetworkManagerInfo, and copy over latest NMI info to best_ap when setting it
-
- * src/NetworkManagerWireless.c
- - libgcrypt code wasn't converting the MD5 digest to an ascii string, fix it
-
- * src/backends/NetworkManagerRedHat.c
- src/backends/NetworkManagerSystem.h
- - (nm_system_device_update_config_info): Add function to get device configuration
- from system data in ifcfg-* files
-
- * src/backends/NetworkManagerDebian.c
- src/backends/NetworkManagerGentoo.c
- src/backends/NetworkManagerSlackware.c
- - Add stub functions for getting device configuration
-
-2004-09-07 Dan Williams <dcbw@redhat.com>
-
- * src/backends/NetworkManagerRedhat.c
- src/backends/NetworkManagerSlackware.c
- - Use full path to /sbin/ip everywhere
-
-2004-09-07 Dan Williams <dcbw@redhat.com>
-
- Patch from: Narayan Newton <narayan_newton@yahoo.com>
-
- * configure.in
- initscript/Makefile.am
- initscript/Slackware/Makfile.am
- initscript/Slackware/rc.networkmanager
- src/Makefile.am
- src/backends/NetworkManagerSlackware.c
- - Add Slackware support
-
-2004-09-07 Dan Williams <dcbw@redhat.com>
-
- Patches below from:
- <j@bootlab.org>
- Mark Roach <mrroach@okmaybe.com>
- Thom May <thom@debian.org>
-
- * configure.in
- initscript/Debian/NetworkManager
- initscript/Debian/Makefile.am
- - Initscript for Debian
-
- * src/backends/NetworkManagerDebian.c
- - Add missing system init function to allow compilation
- on Debian
-
-2004-09-03 Raphael Higino <raphaelh@cvs.gnome.org>
-
- * configure.in: Added 'pt_BR' to ALL_LINGUAS.
-
-2004-09-03 Akagic Amila <bono@linux.org.ba>
-
- * configure.in: Added 'bs' to ALL_LINGUAS.
-
-2004-09-02 Colin Walters <walters@verbum.org>
-
- * src/backends/NetworkManagerRedHat.c (nm_system_device_run_dhcp)
- (nm_system_device_stop_dhcp, nm_system_device_flush_routes): Use
- g_strdup_printf instead of arbitrarily sized buffers.
-
-2004-09-01 Colin Walters <walters@verbum.org>
-
- * NetworkManager.pc.in: New file.
-
- * Makefile.am, .cvsignore, configure.in: Add NetworkManager.pc.
-
-2004-09-01 Amanpreet Singh Alam <aalam@redhat.com>
-
- * configure.in: Punjabi(pa) is added to po/.
-
-2004-08-31 Dan Williams <dcbw@redhat.com>
-
- * Remove 'debug' extern global from all files since we now
- use syslog()
-
- * src/NetworkManager.[ch]
- - Break out routine that get the net.interface property from HAL,
- removing that logic from nm_create_device_and_add_to_list()
- - (nm_create_device_and_add_to_list): make this a bit more general so
- it doesn't do the talking to HAL. Also add arguments to facilitate
- the create of test devices.
- - (nm_data_mark_state_changed): rename from nm_data_set_state_modified()
- - (nm_data_new, main, nm_print_usage): add new argument "--enable-test-devices"
- which makes NetworkManager listen for dbus commands to create test
- devices, which have no backing hardware. Use when you're on a plane
- for example, and/or forgot your wireless card at home. Test devices
- _cannot_ be created unless NM is started with --enable-test-devices.
-
- * src/NetworkManagerDbus.[ch]
- - New "getLinkActive" method for devices
- - New "setLinkActive" method for devices (only works on test devices)
- - New "createTestDevice" method on NetworkManager object to create a test
- device of a specified type (ie wired, wireless). UDI is created from
- scratch, as is the interface name. Only works when NM is started with
- --enable-test-devices switch.
- - New "removeTestDevice" method on NetworkManager object which removes a
- test device. Only works when NM is started with --enable-test-devices
-
- * src/NetworkManagerDevice.[ch]
- - Logic to facilitate test devices. Add variables to NMDevice struct to indicate
- whether a device is a test device or not, and what its link status is.
- - Deal with test devices in most functions. For those that work directly on hardware
- special-case test devices.
- - (nm_device_new): don't create a test device if test devices weren't enabled on the
- command-line.
- - (nm_device_update_link_active): split out logic for wired and wireless device link
- checking to separate functions to facilitate test device link checking.
- - (nm_device_set_enc_key): Since some drivers for wireless cards are daft and
- don't make a distinction between System Authentication and Encryption
- (namely Cisco aironet), we use Open System auth when setting a WEP key
- on the card. We don't deal with Shared Key auth yet.
- - (nm_device_activation_worker): split the activation cancel check logic out into
- a separate routine nm_device_activation_cancel_if_needed()
- - (nm_device_activation_signal_cancel): rename from nm_device_activation_cancel()
- - (nm_device_fake_ap_list): Test wireless devices obviously cannot scan, so create
- a list of fake access points that they can "see"
- - (nm_device_is_test_device): return whether or not a device is a test device
-
- * src/NetworkManagerPolicy.c
- - (nm_policy_get_best_device): attempt to deal with wireless network selection,
- previously if you "locked"/forced NM to use a wireless device but then
- selected a wireless network for NM to use, it would switch to a wired device.
- So, if the active device is wireless and it has a "forced" best AP, use it
- if the "forced" best AP is still valid
- - (nm_state_modification_monitor): deal with NULL best devices, for example
- there were no usable network devices, or the last one was removed
-
- * src/backends/NetworkManager*.c
- - Deal with test devices, mostly just return success for operations like getting
- a DHCP address
-
- * test/nmtestdevices.c
- - Test tool to create/remove/link-switch test devices
-
-2004-08-30 Bryan Clark <clarkbw@cvs.gnome.org>
-
- * examples/python/NetworkManager.py:
- added convience functions has_wired_device and has_wireless_device
-
- * examples/python/systray/network_tray.py:
- cleaned up a bunch of cruft, added support for listing wireless
- networks just like the real applet. This is probably all I'm
- going to work on this applet from now on.
- TODO: add support for actually changing networks and devices
-
- * examples/python/NetworkManager.py (NetworkManager.get_device):
- changed "nm.networks" into a dict from a list so I can store all
- the cool information about networks in there
-
- * examples/python/systray/network_tray.py:
- Added nice message when you try to run without running make first
-
- * examples/python/NetworkManager.py:
- Bug fixes to the code so we get all the device information
- that we need in get_device()
-
- * examples/python/NMTester.py:
- Fixed _print_device_list to print_device_list
-
-2004-08-29 Seth Nickell <seth@gnome.org>
-
- * configure.in:
-
- Actually properly setup the Debian backend in configure.
-
-2004-08-29 Colin Walters <walters@verbum.org>
-
- * test/nminfotest.c: Include string.h and stdlib.h.
- (get_network_string_property, get_networks_of_type): Return NULL.
-
- * test/nmclienttest.c (get_device_name, get_active_device): Return
- NULL.
-
- * src/backends/NetworkManagerRedHat.c (nm_system_device_stop_dhcp): Just
- use strlen, fgets always NULL-terminates the string.
-
- * src/NetworkManagerDbus.c (nm_dbus_nmi_filter,
- dbus_message_get_member): Remove /* in comment.
-
- * src/NetworkManagerUtils.c (LOCKING_DEBUG): Ditto.
-
- * src/NetworkManager.c (quit): Unused, delete.
- (nm_data_free): Cast arg to GFunc.
-
- * panel-applet/NMWirelessAppletDbus.c: Need to include
- string.h, and dbus-glib-lowlevel.h (the latter is needed
- for dbus_connection_setup_with_g_main at present).
- (nmwa_dbus_update_wireless_network_list): Parenthesize
- assignment in conditional.
- (nmwa_dbus_worker): Return NULL.
-
- * panel-applet/NMWirelessApplet.c (nmwa_redraw)
- (nmwa_get_menu_pos, nmwa_toplevel_menu_activate)
- (nmwa_menu_add_text_item, nmwa_setup_widgets): Kill unused variables.
- (nmwa_populate_menu): Return NULL on failure, instead of just
- return;
-
- * initscript/NMLaunchHelper.c (g_timeout_add): Cast arg to GSourceFunc.
-
- * info-daemon/NetworkManagerInfoNetworksDialog.c (nmi_networks_dialog_init): Kill unused
- variables.
-
- * info-daemon/NetworkManagerInfo.c (nmi_print_usage): Unused,
- delete.
-
-2004-08-29 Colin Walters <walters@verbum.org>
-
- * src/NetworkManagerDbus.c (nm_dbus_get_network_timestamp): Return
- a GTimeVal instead of time_t. This is easier to work with,
- since time_t may be a long or double, we don't know.
-
- * src/NetworkManagerDbus.h: Update prototype.
-
- * src/NetworkManagerAP.c (struct NMAccessPoint): Store a GTimeVal
- instead of time_t.
- (nm_ap_get_timestamp): Update to return GTimeVal.
- (nm_ap_set_timestamp): Update to take GTimeVal.
-
- * src/NetworkManagerDevice.c (nm_device_update_best_ap): Update
- to handle GTimeVal.
-
- * src/NetworkManagerAPList.c (nm_ap_list_update_network): Handle
- GTimeVal change.
- (nm_ap_list_print_members): Fix warnings in printf format.
-
-2004-08-29 Colin Walters <walters@verbum.org>
-
- * panel-applet/NMWirelessApplet.c: Include config.h.
-
-2004-08-29 Colin Walters <walters@verbum.org>
-
- * configure.in: Generate config.h.
-
- * configure.in: Dump dependency on OpenSSL; we can't
- use it since this package is GPL:
- http://www.gnome.org/~markmc/openssl-and-the-gpl.html
- Instead, check for libgcrypt, use it if available,
- otherwise use included MD5 code.
-
- * src/gnome-keyring-md5.h, src/gnome-keyring-md5.c:
- Suck in from gnome-keyring, munge a bit.
-
- * src/Makefile.am (NetworkManager_SOURCES) <!WITH_GCRYPT>: Include
- gnome-keyring-md5.h gnome-keyring-md5.c.
- (NetworkManager_LDADD) <WITH_GCRYPT>: Add dep on LIBGCRYPT_LIBS.
-
- * src/NetworkManagerWireless.c (nm_md5): New function, uses
- libgcrypt or included gnome-keyring md5 bits.
- (nm_wireless_128bit_key_from_passphrase): Use nm_md5.
-
-2004-08-28 Kjartan Maraas <kmaraas@gnome.org>
-
- * configure.in: Add «nb» and «no» to ALL_LINGUAS.
-
-2004-08-27 Bryan Clark <bclark@redhat.com>
-
- * examples/python/systray/Makefile:
-
- Updated the clean section
-
- * examples/python/systray/trayiconmodule.c:
- * examples/python/systray/trayicon.override:
- * examples/python/systray/network_tray.py:
- * examples/python/systray/eggtrayicon.h:
- * examples/python/systray/eggtrayicon.c:
- * examples/python/systray/Makefile:
- * examples/python/README:
- * examples/python/NetworkManager.py:
- * examples/python/NMTester.py:
-
- Initial commit of these python example files
-
-Fri Aug 28 2004 Dan Williams <dcbw@redhat.com>
-
- * panel-applet/NMWirelessApplet.c
- - Make current device bold
- - Show more user-friendly device name if we got one from hal
-
- * panel-applet/NMWirelessAppletDbus.c
- - Grab "info.product" key from hal for network devices
- - Cache the current active device
-
-2004-08-27 Adam Weinberger <adamw@gnome.org>
-
- * configure.in: Added en_CA to ALL_LINGUAS.
-
-2004-08-27 Christian Rose <menthos@menthos.com>
-
- * configure.in: Added "sv" to ALL_LINGUAS.
-
-Thu Aug 26 2004 Dan Williams <dcbw@redhat.com>
-
- * Tag NetworkManager-0.2
-
-Thu Aug 26 17:23:16 2004 Jonathan Blandford <jrb@redhat.com>
-
- * initscripts/Makefile.am
- * configure.in: Make pass distcheck
-
- * po/ChangeLog: added
-
-Thu Aug 26 2004 Dan Williams <dcbw@redhat.com>
-
- * panel-applet/NMWirelessApplet.c
- - Remove debugging code
- - Enable device switching from menus
-
- * panel-applet/NMWirelessAppletDbus.[ch]
- - Method for asking NM to switch devices
-
- * src/NetworkManagerDevice.c
- - Set dev->activating earlier, avoids race between
- the dbus signal of "DeviceActivating" and setting
- dev->activating (which is what NM's "status" method call
- looks at)
-
-Thu Aug 26 2004 Dan Williams <dcbw@redhat.com>
-
- * panel-applet/NMWirelessApplet.[ch]
- - Rework menu code to add devices to menu, and to show
- signal strength for each access point. Code cleanups
- too.
-
- * panel-applet/NMWirelessAppletDbus.c
- - Grab network devices from NetworkManager too
- - Grab quality information from NM for wireless networks
-
- * src/NetworkManagerDbus.[ch]
- - Add dbus methods for getting the HAL UDI from a device and
- for getting its base quality, if its wireless
- - Consolidate some functions (wireless network notifications,
- device notifications)
- - Add method for requesting NM to use a particular device
-
- * src/NetworkManager.c
- - Change for function consolidations from NetworkManagerDbus.c
- - Implement active device locking and user-requested devices
- (ie, tell NM to use a particular device instead of the one
- it autochose)
-
- * src/NetworkManagerDevice.c
- - Add method for getting the base quality of a device, if its
- wireless
- - Grab device base quailty info from iwlib during scans
-
- * src/NetworkManagerPolicy.c
- - Use a user-requested device rather than the auto-chosen device
- if we are told to
-
-Thu Aug 26 15:12:36 2004 Jonathan Blandford <jrb@redhat.com>
-
- * Makefile.am: add po as a supdir
-
- * autogen.sh: use gnome-autogen.sh
-
- * initscript/Gentoo/.cvsignore:
- * initscript/RedHat/.cvsignore: Shut up cvs
-
- * panel-applet/Makefile.am: Define GNOMELOCALEDIR for bonobo.
-
- * panel-applet/NMWirelessApplet.c: (nmwa_populate_menu),
- (nmwa_fill): Use gettext.
-
- * configure.in: add gettext support
- * po/.cvsignore:
- * po/NetworkManager.pot:
- * po/POTFILES.in:
-
-2004-08-26 Seth Nickell <seth@gnome.org>
-
- * panel-applet/NMWirelessApplet.c: (nmwa_destroy),
- (nmwa_menu_item_activate), (nmwa_toplevel_menu_activate),
- (nmwa_add_menu_item), (nmwa_menu_item_data_free),
- (nmwa_dispose_menu_items), (nmwa_populate_menu),
- (nmwa_setup_widgets), (do_not_eat_button_press), (nmwa_new):
- * panel-applet/NMWirelessApplet.h:
-
- Use a menu bar instead of a button for the main clickable
- thingy.
-
-2004-08-25 Dan Williams <dcbw@redhat.com>
-
- * src/NetworkManagerDevice.c
- - (nm_device_set_enc_key): always set device to "open" mode instead of
- turning encryption off, because the Cisco driver doesn't associate
- with WEP-enabled access points unless we are in "open"
-
-2004-08-25 Dan Williams <dcbw@redhat.com>
-
- * src/NetworkManagerWireless.c
- - Don't try to defererence blank passphrases
-
-2004-08-25 Dan Williams <dcbw@redhat.com>
-
- * panel-applet/NMWirelessApplet.c
- - Rebuild the menu whenever a user clicks
-
-2004-08-25 Dan Williams <dcbw@redhat.com>
-
- * panel-applet/NMWirelessApplet.c
- - (nmwa_udpate_state): Set panel icon to "wired" (for lack of better ones)
- when NM isn't around or when its not connected
-
- * src/NetworkManagerDevice.c
- - (nm_device_activation_worker): Make sure to reset dev->activating if we get
- canceled.
-
-2004-08-25 Dan Williams <dcbw@redhat.com>
-
- * panel-applet/NMWirelessAppletDbus.c
- - (nmwa_dbus_get_bool, nmwa_dbus_get_network_encrypted): correct method name
- for getting encryption, and don't stop on "val" once we've gotten it
- from NetworkManager. Short form: encryption should now show up.
-
-2004-08-25 Dan Williams <dcbw@redhat.com>
-
- * panel-applet/NMWirelessApplet.c
- - Set ESSID on a gconf trusted network too when force-setting the wireless
- network to associate with
-
-2004-08-25 Dan Williams <dcbw@redhat.com>
-
- * panel-applet/*
- - Rework the panel applet to do all DBUS communication in a separate
- thread
-
-2004-08-25 Dan Williams <dcbw@redhat.com>
-
- * info-daemon/NetworkManagerInfo.[ch]
- - Remove "get_next_priority" function
-
- * info-daemon/NetworkManagerInfoDbus.[ch]
- - Convert "priority" functions to "timestamp"
-
-2004-08-25 Dan Williams <dcbw@redhat.com>
-
- * src/NetworkManagerAP.[ch]
- - Add a "enc_method_good" member and accessors to an Access Point
- to signal when we've found the correct encryption method
- for an access point
- - Add a "timestamp" member and accessors, remove "priority" member
- and accessors (use timestamps instead)
- - Rename "wep_key"->"enc_key"
- - (nm_ap_get_enc_key_hashed): new, return the correct mangled key
- for a specified encryption method using the access points
- source encryption key/passphrase
-
- * src/NetworkManagerAPList.c
- - When updating a network with dbus, grab timestamp now instead of
- priority
-
- * src/NetworkManagerDBus.[ch]
- - Add signal for "DeviceActivating"
- - Switch priority->timestamp
-
- * src/NetworkManagerDevice.c
- - Change references of "wep_key" -> "enc_key" or "key"
- - Signal DeviceActivating when starting activation
- - When activating a wireless device, if the access point we are connecting
- to is encrypted, and we have a source key, try to generate a mangled
- key and use that (ie, generate real WEP key from a passphrase)
- - Rework device activation to fallback to other encryption methods if
- a previous one didn't work (ie, try mangling a key as a 104-bit passphrase
- first, then if that doesn't work fall back to direct hex key).
- - (nm_device_update_best_ap): fix a deadlock, and use timestamps instead of
- priority. We now prefer the latest access point used, rather than using
- a priority scheme
- - (nm_device_do_normal_scan): make the encryption method "unknown" on access
- points we've just discovered, and merge in correct info from the global
- access point lists
-
-2004-08-25 Seth Nickell <seth@gnome.org>
-
- Patch from Matthew Garrett <mjg59@srcf.ucam.org> for adding
- Debian support.
-
- * src/Makefile.am:
- * src/backends/NetworkManagerDebian.c: (nm_system_device_run_dhcp),
- (nm_system_device_stop_dhcp), (nm_system_device_flush_routes),
- (nm_system_device_flush_addresses), (nm_system_enable_loopback),
- (nm_system_delete_default_route),
- (nm_system_kill_all_dhcp_daemons), (nm_system_update_dns),
- (nm_system_load_device_modules):
-
-2004-08-24 Dan Willemsen <dan@willemsen.us>
-
- * src/NetworkManager.c
- src/backends/NetworkManagerGentoo.c
- src/backends/NetworkManagerRedHat.c
- src/backends/NetworkManagerSystem.h
- - Implement preliminary Gentoo support, adding a
- nm_system_init function to the backend specification
-
- * configure.in
- - Distribution auto-detection, lowercase any user-fed
- distribution names
-
- * initscript/.cvsignore
- initscript/Makefile.am
- initscript/RedHat/Makefile.am
- initscript/RedHat/NetworkManager
- initscript/Gentoo/Makefile.am
- initscript/Gentoo/NetworkManager
- - Refactored initscript code separately for each
- distribution
-
-2004-08-23 Dan Williams <dcbw@redhat.com>
-
- * configure.in
- src/Makefile.am
- src/NetworkManagerDevice.c
- src/NetworkManager.c
- src/NetworkManagerUtils.[ch]
- src/backends/NetworkManagerSystem.h
- src/backends/NetworkManagerRedHat.c
- src/backends/NetworkManagerGentoo.c
- - Refactor system-specific code into separate backends for
- each distribution
-
-2004-08-23 Dan Willemsen <dan@willemsen.us>
-
- * dispatcher-daemon/NetworkManagerDispatcher.c
- info-daemon/NetworkManagerInfo.[ch]
- info-daemon/NetworkManagerInfoDbus.c
- info-daemon/NetworkManagerInfoPassphraseDialog.c
- src/NetworkManager.c
- src/NetworkManagerAP.c
- src/NetworkManagerAPList.c
- src/NetworkManagerDbus.c
- src/NetworkManagerDevice.c
- src/NetworkManagerPolicy.c
- src/NetworkManagerUtils.[ch]
- src/NetworkManagerWireless.c
- - Used syslog functions for logging instead of NM_DEBUG_DISPLAY & fprintf
-
- * src/NetworkManager.c
- - Fixed usage wording for --no-daemon
-
-2004-08-23 Dan Williams <dcbw@redhat.com>
-
- * panel-applet/NMWirelessApplet.c
- - Update our state every second to get more responsive panel icon
- - (nmwa_update_state): remove bogus applet->pix_state = PIX_WIRED that
- was causing our marching ants status blips to never move when
- looking for a wireless network
-
- * src/NetworkManagerDevice.c
- - (nm_device_activation_begin): return if activation has already begun
- - (nm_device_do_normal_scan): merge WEP key and priority from the
- trusted/preferred network into the device's access point when the
- scan list is processed
-
-2004-08-23 Dan Williams <dcbw@redhat.com>
-
- * initscript/NetworkManager
- - Use NMLaunchHelper rather than sleeping
-
- * initscript/NMLaunchHelper.c
- Makefile.am
- - Add helper program that exits only when NM activates a device,
- or 10 seconds have passed, whichever happens first. This
- stops the boot processes until we have a network connection,
- which NM can't do because it daemonizes and brings the connection
- up in the background. Allows stuff like NFS to not die.
-
-2004-08-20 Dan Williams <dcbw@redhat.com>
-
- * info-daemon/NetworkManagerInfoPassphraseDialog.c
- - (nmi_passphrase_dialog_ok_clicked): when updating the wep key
- for a network, set the essid as well since it may not exist yet
- - (nmi_passphrase_dialog_init): don't star out the passphrase field,
- since WEP keys/passphrases are long and prone to entry-error
-
- * panel-applet/Makefile.am
- panel-applet/wired.png
- - Add (pulled from system-config-network temporarily)
-
- * panel-applet/NMWirelessApplet.[ch]
- - Show wired picture when a wired connection is used
- - Rename wireless icon enums, adding WIRELESS
-
- * src/NetworkManagerDevice.c
- - (nm_device_activate_wireless): unset encryption before bringing
- down the card and setting the essid
- - (nm_device_activatin_worker): request a key from the user if the
- AP we are connecting to is encrypted but we don't have a key
- for it yet
- - (nm_device_set_user_key_for_network): fix missing '== 0' for a
- strcmp() that prevented a user-entered key from actually getting
- used
-
-2004-08-16 Dan Williams <dcbw@redhat.com>
-
- * initscript/NetworkManager
- - Check for /sbin/ip
- - Do sysctl magic that network service does
- - sleep 4s after start to allow network time to come up [hack]
-
- * src/Makefile.am
- src/NMLoadModules
- - Load all network device kernel modules (hal doesn't know devices
- are ethernet until the module is loaded, and therefore we don't know)
-
- * src/NetworkManager.c
- - (main): daemonize later, launch NMLoadModules to alert HAL of our
- network devices, and bring up the loopback device explicitly
-
- * src/NetworkManagerUtils.[ch]
- - (nm_enable_loopback): new function
-
-2004-08-13 Dan Williams <dcbw@redhat.com>
-
- * configure.in
- panel-applet/Makefile.am
- - Fix up cleanfiles and server_DATA/server_in_files
-
- * README
- - Update with some comments on theory of operation
-
- * CONTRIBUTING
- Makefile.am
- - Add CONTRIBUTING
-
-2004-08-12 Dan Williams <dcbw@redhat.com>
-
- * info-daemon/passphrase.glade
- - Set window title to " "
-
- * panel-applet/Makefile.am
- panel-applet/keyring.png
- - Deliver to correct place
-
- * panel-applet/NMWirelessApplet.[ch]
- - Add comments
- - Remove applet->have_active_device as its no longer used
- - (nmwa_load_theme): load keyring.png too
- - (error_dialog): remove
- - (show_warning_dialog): subsume functionality of error dialog too
- - (nmwa_destroy, nmwa_new): create and dispose of an application-wide GConfClient
- - (nmwa_handle_network_choice): add to deal with user clicking on an item from
- the networks menu
- - (nmwa_menu_item_activated): GtkMenuItem "activate" signal handler
- - (nmwa_button_clicked, nmwa_setup_widgets): create and populate the menu on startup
- and when we get broadcasts of changed wireless access points only, not when the
- user clicks on the button to display the menu (too long of a wait)
- - (nmwa_add_menu_item): Make active network bold, and place a keyring icon beside
- networks that are encrypted
- - (nmwa_dispose_menu, nmwa_menu_item_data_free): dispose of the data we place on each
- menu item with g_object_set_data()
-
- * panel-applet/NMWirelessAppletDbus.[ch]
- - (nmwa_dbus_get_bool): add method to return boolean value from dbus message
- - (nmwa_dbus_get_active_network): add (nmwa_dbus_get_string() wrapper to get active network)
- - (nmwa_dbus_add_networks_to_menu): clean up, only show one instance of each ESSID in the menu
- - (nmwa_dbus_set_network): force NetworkManager to use a particular network for wireless cards
- - (nmwa_dbus_init, nmwa_dbus_filter): Trap network appear/disappear and device
- activation/deactivation signals and rebuild the menu when they happen
-
- * src/NetworkManager.c
- - (main): use new nm_spawn_process() rather than system()
-
- * src/NetworkManagerDbus.c
- - (nm_dbus_devices_handle_request): don't compare AP structure addresses directly, but essids
- instead. Since we can now force best_aps to stick around, the AP structure to which
- dev->options.wireless.best_ap points to won't necessarily be in the device's device list
- if a scan has happened since the best_ap was frozen. Also add "setNetwork" method
- to freeze the best_ap.
-
- * src/NetworkManagerDevice.[ch]
- - (nm_device_activation_worker): Use new nm_spawn_process() call rather than system()
- - (nm_device_*_best_ap): add freeze/unfreeze/get_frozen functions, and don't really update
- the best_ap in nm_device_update_best_ap() if the best_ap is frozen AND in the device's
- ap list
-
- * src/NetworkManagerUtils.[ch]
- - (nm_spawn_process): add replacement for system() usage
-
-2004-08-11 Dan Williams <dcbw@redhat.com>
-
- * panel-applet/NMWirelessApplet.[ch]
- - Fix up copyright and credits to include Bastien and Eskil,
- who created the gnome-applets wireless applet, from whose
- skeleton this one was created
- - Rework nmwa_update_state()/nmwa_draw() so that state and which
- pixmap to draw is computed during nmwa_update_state()
- - Applet now shows itself all the time due to panel packing issues
- which caused the applet to previously never come back after hiding.
- When a wired device is the active device, the applet shows "not connected"
-
- * panel-applet/NMWirelessAppletDbus.[ch]
- - Clean up error messages and show what function they are from
- - nmwa_dbus_get_active_wireless_device()->nmwa_dbus_get_active_device()
- - Add new device type getters, and a status getter
-
- * src/NetworkManagerDbus.c
- - (nm_dbus_devices_handle_request): Don't return an active network unless that
- network is actually in the device's ap list
- - (nm_dbus_nm_message_handler): Fix silly mistake returning status
-
- * src/NetworkManagerDevice.c
- - (nm_device_update_best_ap): If the best AP is NULL, clear out the ESSID of the
- card
-
- * test/nmclienttest.c
- - Report status of NetworkManager too
-
-2004-08-11 Dan Williams <dcbw@redhat.com>
-
- * info-daemon/NetworkManagerInfo.c:
- - (main): clean up Seth's code style
-
- * info-daemon/NetworkManagerInfoDbus.c:
- - Use the more aptly-named path/service/interface constants from NetworkManager
- - Don't return empty strings ("") as object paths ever, instead return errors
-
- * panel-applet/NMWirelessApplet.c:
- - Clean up Seth's code style
-
- * src/NetworkManager.[ch]
- - (nm_remove_device_from_list): remove anything having to do with pending_device
- - (main, nm_print_usage): change --daemon=[yes|no] -> --no-daemon
-
- * src/NetworkManagerAPList.[ch]
- - Move Iter struct right above the iter functions to preserve opacity
- - (nm_ap_list_remove_ap): implement
- - (nm_ap_list_update_network): deal with errors returned from nm_dbus_get_network_priority(),
- remove AP if NetworkManagerInfo doesn't know anything about it
- - (nm_ap_list_diff): user NMAPList iterators
- - (nm_ap_list_print_members): implement debugging function
-
- * src/NetworkManagerDbus.[ch]
- - (nm_dbus_nm_get_active_device): remove anything to do with pending_device
- - (nm_dbus_get_user_key_for_network): remove DBusPendingCall stuff (unused),
- and move the actual key setting stuff into NetworkManagerDevice.c
- - (nm_dbus_get_network_priority): return -1 now on errors
- - (nm_dbus_nmi_filter): fix strcmp() error that caused PreferredNetworkUpdate signals to
- get lost, and force the active device to update its "best" ap when AP lists change
- - (nm_dbus_nm_message_handler): Update conditions for returning "connecting" for a "status"
- method call due to pending_device member removal
-
- * src/NetworkManagerDevice.[ch]
- - Move NMDevice structure to the top
- - Add a wireless scan mutex and a best_ap mutex to the Wireless Options structure
- - Remove Pending Action stuff from everywhere
- - (nm_device_activation_*): We now "begin" activation and start a thread to do the
- activation for us. This thread blocks until all conditions for activation have
- been met (ie for wireless devices, we need a valid WEP key and a "best" ap), and
- then setup up the interface and runs dhclient. We have to do this because there
- is no guaruntee how long dhclient takes, and while we are blocking on it, we cannot
- run our main loop and respond to dbus method calls or HAL device removals/inserts
- - (nm_device_set_user_key_for_network): Move logic here from NetworkManagerDbus.c so we
- can tell nm_device_activation_worker() that we've got a key
- - (nm_device_*_best_ap): lock access to best_ap member of Wireless Options structure
- - (nm_device_get_path_for_ap): dumb it down so the list doesn't lock against itself when
- diffing (AP appear/disappear signal functions make sure the AP is actually in the device's list)
- - (nm_device_update_best_ap): move logic from nm_wireless_is_ap_better() here
-
- * src/NetworkManagerPolicy.c
- - Remove anything to do with pending_device
- - Adjust device activation to deal with activation-in-worker-thread
-
- * src/NetworkManagerUtils.c
- - Clean up locking debugging a bit
-
- * src/NetworkManagerWireless.[ch]
- - (nm_wireless_is_ap_better): remove, stick logic in nm_device_update_best_ap(). This function
- was badly named and is better as a device function
-
- * panel-applet/.cvsignore: add
-
-2004-08-09 Seth Nickell <seth@gnome.org>
-
- * panel-applet/NMWirelessApplet.c: (nmwa_timeout_handler),
- (nmwa_button_clicked), (nmwa_populate_menu), (nmwa_setup_widgets),
- (nmwa_new):
- * src/NetworkManagerDbus.c: (nm_dbus_nmi_filter):
-
- Don't load the menus until clicked on (also removes a call outside
- normal code paths at first load).
-
- Hide applet when NM is not present.
-
- Improve printf debugging stuff.
-
-2004-08-09 Dan Williams <dcbw@redhat.com>
-
- * dispatcher-daemon/NetworkManagerDispatcher.c:
- - Covert uses of dbus_message_iter_* over to dbus_message_get_args
- - Use constants for NetworkManager interface, service, and path
-
-2004-08-09 Dan Williams <dcbw@redhat.com>
-
- * src/NetworkManagerDbus.c:
- - (nm_dbus_nm_get_active_device, nm_dbus_nm_get_devices): Never return an empty object path,
- instead return an error message
- - (nm_dbus_devices_handle_request): Return error when getActiveNetwork/getNetworks is called
- on a wired device. Also never return an empty object path, instead return an error message
-
-2004-08-06 Seth Nickell <seth@gnome.org>
-
- * panel-applet/NMWirelessApplet.c: (nmwa_new):
-
- Check the error code when getting a connection.
-
- * panel-applet/NMWirelessAppletDbus.c: (nmwa_dbus_init):
-
- Check if the NM service exists when initializing (rather than
- assuming it does not).
-
- * src/NetworkManagerDbus.c: (nm_dbus_init):
-
- Don't acquire the well-known service name until we have
- registered object/path handlers and can actually receive
- calls.
-
-2004-08-06 Dan Williams <dcbw@redhat.com>
-
- * panel-applet/*
- - Add panel applet
-
- * src/NetworkManagerPolicy.c
- src/NetworkManager.c
- - Get access point lists from NetworkManagerInfo on-demand,
- and look for ServiceCreate/ServiceDeleted signals to see when
- we should query NMI for lists
- * src/NetworkManagerAPList.c
- - Make sure to init the list's mutex
- - Convert traversals of the list over to the list iter functions
-
- * src/NetworkManagerDbus.[ch]
- - Use more aptly-named path/service/interface constants
- - Treat both active and pending devices the same for "getActiveDevice"
- - Add a "status" method returning "connected", "connecting", or "disconnected"
-
- * src/NetworkManagerDevice.c
- - Honor "ignored" network list when picking best ap to use
-
-2004-08-06 Seth Nickell <seth@gnome.org>
-
- * aclocal.m4:
-
- Autogenerated, remove from CVS.
-
- * autogen.sh:
-
- Don't hardcode automake version.
-
- * configure.in:
- * info-daemon/Makefile.am:
- * info-daemon/NetworkManagerInfo.c: (main):
-
- Use GnomeProgram et al. for doing session management.
- Use popt stuff for argument parsing rather than doing
- it manugally.
-
-2004-08-05 Dan Williams <dcbw@redhat.com>
-
- * test/nminfotest.c
- - Update to new NMI dbus API, check different network types
-
- * info-daemon/NetworkManagerInfoDbus.c
- - Update to new NM dbus API, ie network type sent in query message
-
-2004-08-05 Dan Williams <dcbw@redhat.com>
-
- * An assload of changes
-
-2004-08-02 Dan Williams <dcbw@redhat.com>
-
- * TODO
- - new task: proper logging support
-
- * info-daemon/NetworkManagerInfo.c
- - Correct spelling of "canceled"
- - Correct casting of objects for g_signal_connect()
-
- * info-daemon/NetworkManagerInfoDbus.c
- - Add defines for NetworkManager namespace and object path, and use them
- - Add filter function to trap new signals from NetworkManager:
- WirelessNetworkAppeared, WirelessNetworkDisappeared
-
- * info-daemon/passphrase.glade
- - Change name of "ok" button to "Login to Network..."
- - Mark invisible
-
- * src/NetworkManager.c
- - Code and debug message cleanups
- - Rename "nm_add_current_devices"->"nm_add_initial_devices"
- - (nm_add_initial_devices) Check returned string array of devices
- and don't try to add devices if array is NULL
- - (main) Initialize libhal a bit later, make code a bit clearer
-
- * src/NetworkManagerAP.[ch]
- - New accessor and data member "matched": used to speed up AP list
- diffing
- - New accessor and data member "enc_method": will be used during key
- fallback to cache which passphrase->key conversion actually works
- so we don't have to do it every time
-
- * src/NetworkManagerAPList.[ch]
- - (nm_ap_list_find_ap_in_list) New: find an AP by essid in an AP list
- - (nm_ap_list_diff) New: given two lists of access points, find the differences
- between them, and send WirelessNetworkAppeared/Disappeared signals over
- dbus in response to those differences
-
- * src/NetworkManagerDbus.[ch]
- - (nm_dbus_get_object_path_from_ap) New: given a device and an access point,
- make an object path for that access point (NOTE that we don't yet check to
- make sure that access point is actually in the device's AP list yet)
- - (nm_dbus_get_ap_from_object_path) Renamed from nm_dbus_get_network_from_object_path
- - (nm_dbus_signal_wireless_network_appeared, nm_dbus_signal_wireless_network_disappeared)
- New: signal appearance/disappearance of wireless networks
- - (nm_dbus_set_user_key_for_network) Mark the network/ap as invalid if the user cancelled
- key entry
-
- * src/NetworkManagerDevice.[ch]
- - (nm_device_ap_list_clear) Use nm_ap_list_free rather than doing it ourselves
- - (nm_device_ap_list_get) New: return the AP list (static function)
- - (nm_device_do_normal_scan) Destroy old AP list later, so that we can diff the
- new one resulting from the scan with the old one
-
- * src/NetworkManagerWireless.c
- - (nm_wireless_is_most_prefered_ap) "invalid" access points cannot be "best" access points
-
- * test/nminfotest.c
- - #define object paths and namespaces and use the #defines rather than static strings
- - Test out user-key functionality of NetworkManagerInfo too
-
-2004-07-29 Dan Williams <dcbw@redhat.com>
-
- * info-daemon/NetworkManagerInfoDbus.c
- src/NetworkManagerDbus.c
- - Update to current DBus (ie don't use decomposed paths when registering
- object paths/fallbacks)
-
-2004-07-27 Dan Williams <dcbw@redhat.com>
-
- * Remove various Makefile.in files
-
- * TODO
- - Add some more items
-
- * configure.in
- - Add checks for OpenSSL/md5 headers and libs
-
- * src/Makefile.am
- - Use OpenSSL CFLAGS
-
- * src/NetworkManagerAP.[ch]
- - Remove 'stamp' functions, replace with 'invalid' functions
- to support user cancelling WEP key entry
-
- * src/NetworkManagerDbus.c
- - Remove 'stamp' return functions
- - Treat returned user key as a passphrase and convert to a WEP key,
- but don't actually use the WEP key yet. We use the returned user
- key as a hexadecimal WEP key until we can figure out a UI for
- passphrase-vs-hex key
-
- * src/NetworkManagerWireless.[ch]
- - Add passphrase-to-128bit-key function
-
-2004-07-27 Dan Williams <dcbw@redhat.com>
-
- * TODO
- - Add a couple of items
-
-2004-07-27 Dan Williams <dcbw@redhat.com>
-
- * info-daemon/NetworkManagerInfo.c
- - Update allowed network's GConf key when user enters a WEP key explicitly
-
- * info-daemon/NetworkManagerDbus.c
- - Fix some comments
- - nmi_dbus_get_allowed_networks(): kill warning
-
-2004-07-27 Dan Williams <dcbw@redhat.com>
-
- * initscript/Makefile.in
- - Remove
-
- * initscript/Makefile.am
- - Add correct rules to install the init.d initscript
-
- * info-daemon/NetworkManagerInfoDbus.c
- - Remove debug fprintf
-
- * src/NetworkManagerDbus.[ch]
- - Remove debug fprintfs
- - Add macros for NetworkManagerInfo object path/namespace
- - Use said macros instead of constant strings
-
-2004-07-27 Dan Williams <dcbw@redhat.com>
-
- * initscript/.cvsignore
- - Add
-
- * info-daemon/Makefile.am
- - Install .glade files and keyring.png
- - Fix stupid omission of a \ that caused half the flags not to be
- passed to gcc
-
- * info-daemon/NetworkManagerInfo.c
- - gtk_signal_connect->g_signal_connect
- - Alert NetworkManagerInfo to new glade file location
-
-2004-07-27 Dan Williams <dcbw@redhat.com>
-
- * test/nmclienttest.c
- test/nminfotest.c
- - Add missing <dbus/dbus.h> headers
- - Add GPL message at top
-
-2004-07-27 Dan Williams <dcbw@redhat.com>
-
- * src/NetworkManagerAPList.[ch]
- src/Makefile.am
- - Add. Deal with allowed network list additions, deletions, and updates
-
- * dispatcher-daemon/NetworkManagerDispatcher.c
- - Add missing <dbus/dbus.h> header
-
- * info-daemon/NetworkManagerInfo.[ch]
- - Add missing <dbus/dbus.h> header
- - Implement the GConf notify callback to signal NetworkManager of an allowed
- network change
- - Better error checking
-
- * info-daemon/NetworkManagerInfoDbus.[ch]
- - Add missing <dbus/dbus.h> header
- - Convert to using dbus_message_append_args/dbus_message_get_args
- - Implement nmi_dbus_signal_update_allowed_network() to signal NetworkManager
- that an allowed network changed. We don't want to signal on individual
- keys _inside_ an allowed network really, just want NM to query the info
- daemon for updated info on all keys.
- - Better error checking
-
- * src/NetworkManager.[ch]
- - Add missing <dbus/dbus.h> header
- - Move allowed_ap_list free functions to NetworkManagerAPList.[ch]
- - Zero out NMData structure on free
- - No longer use a thread for allowed_ap_list updating, instead its now done
- through dbus queries against NetworkManagerInfo
- - Populate allowed_ap_list initially before adding existing network devices
- to the device list, so wireless devices can get their "best" AP
-
- * src/NetworkManagerDbus.[ch]
- - Convert to using dbus_message_append_args/dbus_message_get_args
- - Better error checking
- - Implement Allowed Network info functions to request allowed network
- info from NetworkManagerInfo
- - Implement the filter function to process signals from NetworkManagerInfo
- about changing allowed networks
-
- * src/NetworkManagerDevice.c
- - Fix file descriptor leak in nm_device_update_ip4_address()
-
-2004-07-27 Dan Williams <dcbw@redhat.com>
-
- * .cvsignore
- src/.cvsignore
- test/.cvsignore
- dispatcher-daemon/.cvsignore
- info-daemon/.cvsignore
- - Add .cvsignore files to reduce noise when diffing
-
-2004-07-24 Dan Williams <dcbw@redhat.com>
-
- * src/NetworkManager.[ch]
- src/NetworkManagerDbus.[ch]
- src/NetworkManagerDevice.[ch]
- src/NetworkManagerPolicy.c
- src/NetworkManagerWireless.[ch]
- - Add many more g_return_if_fail()/g_return_val_if_fail() checks
- - Pass the NMData application data structure through all calls
- that need it so we can get rid of nm_get_global_data()
- - Change deallocation of the allowed_ap_list GSList in preparation
- for not completely clearing it every time we get an update,
- but instead getting incremental updates via GConf/dbus
-
-2004-07-22 Dan Williams <dcbw@redhat.com>
-
- * configure.in
- - Add checks for GConf libs & headers & flags
-
- * info-daemon/Makefile.am
- - Add GConf flags & libs to compile/link stages of NetworkManagerInfo
-
- * info-daemon/NetworkManagerInfo.[ch]
- - Don't use gquarks for data storage, just use normal data storage
- - Add gconf bits to watch /system/networking/wireless/allowed_networks
-
- * info-daemon/NetworkManagerDbus.[ch]
- - Add method call for getting allowed networks
- - Add method calls for getting an allowed network's essid, priority, and key
- - Hook the method calls up to GConf
- - Split user key dialog code into separate function (nmi_dbus_get_key_for_network)
- - nmi_dbus_nmi_message_handler(): make sure to unref the reply message after sending
-
- * src/NetworkManagerDbus.[ch]
- - Switch for enumeration of networks to using essid instead
-
- * test/Makefile.am
- test/nminfotest.c
- - Add test program for NetworkManagerInfo
-
-2004-07-19 Dan Williams <dcbw@redhat.com>
-
- * src/NetworkManagerDbus.c
- - Switch from indexed device paths to names. Less code, more efficient.
- ie "/org/freedesktop/NetworkManager/0" -> "/org/freedesktop/NetworkManager/eth0"
-
-2004-07-19 Dan Williams <dcbw@redhat.com>
-
- * dispatcher-daemon/NetworkManagerDispatcher.c
- - (nm_dbus_filter): Remove obsolete response to NeedKeyForNetwork signal
-
-2004-07-19 Dan Williams <dcbw@redhat.com>
-
- * Makefile.am
- - Add info-daemon directory
-
- * configure.in
- - Check for glade libs and headers
- - Add info-daemon directory
-
- * src/NetworkManagerAP.c
- - nm_ap_new_from_ap(): Fix bug that resulted in an APs encryption status not getting
- copied over to the new AP.
-
- * src/NetworkManagerDbus.c
- src/NetworkManagerDbus.h
- - Deal with nm_device_ap_list_get_ap()->nm_device_ap_list_get_ap_by_index() change
- - Remove nm_dbus_signal_need_key_for_network()
- - Add disabled code for asynchronous user wep key callbacks
- - Add functions for getting, setting, and cancelling user key operations
- - Remove "setKeyForNetwork" device dbus method call, its on NetworkManager object instead
- - Add "setKeyForNetwork" dbus method call on NetworkManager object
-
- * src/NetworkManagerDevice.c
- src/NetworkManagerDevice.h
- - nm_device_update_link_active(): revert changes for wireless link detection, the WEP-key-is-wrong
- logic is in device activation now
- - nm_device_activate(): for wireless devices, if we can't associate with access point (perhaps
- key is wrong) trigger get-user-key pending action
- - Implement get-user-key pending action stuff, tie to dbus messages
- - Rename nm_device_ap_list_get_ap() -> nm_device_ap_list_get_ap_by_index()
- - Add nm_device_ap_list_get_ap_by_essid()
- - Instead of copying "best" access points, ref them instead so that the key we set
- sticks around
-
- * src/NetworkManagerPolicy.c
- - Deal with wrong WEP key, but right access point (and if so, return link_active = TRUE)
- - Don't cancel pending actions on a device if its the same device as last iteration
- - Only promote pending_device->active_device if activation was successfull
-
- * src/Makefile.am
- - Rename nmclienttest->nmtest
-
- * info-daemon/Makefile.am
- info-daemon/NetworkManagerInfo.c
- info-daemon/NetworkManagerInfo.h
- info-daemon/NetworkManagerInfoDbus.c
- info-daemon/NetworkManagerInfoDbus.h
- info-daemon/passphrase.glade
- info-daemon/NetworkManagerInfo.conf
- info-daemon/keyring.png
- - Import sources for info-daemon, which pops up dialog for passphrase/key when
- NetworkManager asks for it, and also will (soon) provide "allowed" access point
- lists to NetworkManager by proxying user's GConf
-
-
-2004-07-15 Dan Williams <dcbw@redhat.com>
-
- * src/Makefile.am
- - Turn on warnings
-
- * src/NetworkManager.c
- - nm_create_device_and_add_to_list(): call nm_device_deactivate() rather
- that doing the deactivation ourselves
- - Cancel an pending actions on a device if its being removed
- - Break up link state checking a bit, make non-active wireless cards
- deactivated to save power
- - Remove unused variables
-
- * src/NetworkManager.h
- - Add support for "pending" device
-
- * src/NetworkManagerAP.h
- src/NetworkManagerAP.c
- - Add support for determining whether and AP has encryption enabled or not
- - AP address is now "struct ether_addr" rather than a string
-
- * src/NetworkManagerDbus.h
- src/NetworkManagerDbus.c
- - Add signal NeedKeyForNetwork, method SetKeyForNetwork (testing only)
- - Changes for AP address from struct ether_addr->string
-
- * src/NetworkManagerDevice.h
- src/NetworkManagerDevice.c
- - Remove unused variables, fix warnings
- - Add support for Pending Actions (things that block a device from being "active"
- until they are completed).
- - First pending action: Get a WEP key from the user
- - Add nm_device_is_wire[d|less](), rename nm_device_is_wireless()
- - Clean up explicit testing of dev->iface_type to use nm_device_is_wireless()
- - Update wireless link checking to try to determine if the AP we are associated
- with is correct, but the WEP key we are using is just wrong. If its wrong,
- trigger the GetUserKey pending action on the device
- - If dhclient can't get an IP address, it brings the device down. Bring it back
- up in that case, otherwise we can't scan or link-check on it
- - Add IP address change notifications at appropriate points (still needs some work)
- - Add nm_device_need_ap_switch(), checks whether we need to switch access points or not
-
- * src/NetworkManagerPolicy.h
- src/NetworkManagerPolicy.c
- - Split out "best" access point determiniation into separate function
- - Make device activation 2-stage: first the device is pending, then
- in the next iteration through it becomes "active" unless it has
- pending actions
-
- * src/NetworkManagerUtils.h
- src/NetworkManagerUtils.c
- - Clean up unused variables and warnings
- - Wrap our debug macros in {} to prevent possible confusion
-
- * src/NetworkManagerWireless.c
- - Forgot to return current best priority, which lead to last available AP always
- being chosen no matter what its priority was. Corrected.
-
-2004-07-15 Dan Williams <dcbw@redhat.com>
-
- * dispatcher-daemon/Makefile.am
- - Turn on warnings
-
- * dispatcher-daemon/NetworkManagerDispatcher.c
- - Remove unused variables due to warnings
- - Fix some comments
- - Print message on receipt of NeedKeyForNetwork signal (testing only)
-
-2004-07-06 Dan Williams <dcbw@redhat.com>
-
- * src/NetworkManager.c
- - Add IPv4 address update for active device during link state check
- - Don't allow wireless cards to be powered up when they are not the
- active device
-
- * src/NetworkManagerDbus.c
- src/NetworkManagerDbus.h
- - Add DBUS IPv4 address change signal
- - Add DBUS IPv4 address get method for devices
-
- * src/NetworkManagerDevice.c
- - Make setting the WEP key actually work
- - Move IP address get/set/update stuff here, per-device
- - Power down/bring down wireless device when deactivated
- - For scanning wireless devices, if first scan returned ENODATA, try again
-
- * src/NetworkManagerPolicy.c
- - Only set the WEP key for an allowed access point if there is one.
- We were setting it to be blank if one wasn't specified.
-
- * src/NetworkManagerUtils.h
- src/NetworkManagerUtils.c
- - Move the IP address stuff to NetworkManagerDevice.c
-
- * dispatcher-daemon/NetworkManagerDispatcher.c
- - Add device IPv4 address change notification stuff
-
-2004-07-05 Dan Williams <dcbw@redhat.com>
-
- * dispatcher-daemon/NetworkManagerDispatcher.c
- - A bit more descriptive state message
- - Don't segfault when reading directory
-
- * src/NetworkManager.h
- - Remove NMData desired_ap member, its now
- per-device rather than global
-
- * src/NetworkManager.c
- - Remove references to desired_ap
- - Move the allowed AP list refresh stuff into a thread
-
- * src/NetworkManagerDevice.c
- src/NetworkManagerDevice.h
- - Each wireless device now has a "best ap"
- - Make device activate/deactivate functions per-device
- - Make wireless scanning per-device
- - Add IPv4 address discover functions, stub IPv6 ones
- - Move ethernet address validation functions to NetworkManagerUtils.c
- - Add wireless access point accessor function
- - Get/Set functions for "best ap"
-
- * src/NetworkManagerPolicy.c
- - Move activate/deactivate stuff into NetworkManagerDevice.c, per-device
- - Deal with per-device "best ap" rather than data->desired_apa
- - Implement allowed access point worker thread
- - Add nm_policy_essid_is_allowed() function
-
- * src/NetworkManagerUtils.c
- src/NetworkManagerUtils.h
- - Add nm_ethernet_address_is_valid() function
- - Add IPv4/IPv6 address get functions
-
- * src/NetworkManagerWireless.c
- src/NetworkManagerWireless.h
- - Move scanning stuff into NetworkManagerDevice.c, per-device
-
-2004-06-29 Dan Williams <dcbw@redhat.com>
-
- * dispatcher-daemon/NetworkManagerDispatcher.c
- - Implement script callout functionality
-
-2004-06-24 Dan Williams <dcbw@redhat.com>
-
- * NetworkManager.c
- - Spacing cleanups
- - Flush device routes and ip addresses when added to the device list
-
- * NetworkManagerDbus.c
- - Spacing cleanups
- - Add missing returns in the two signal functions
-
- * NetworkManagerPolicy.c
- - Spacing and variable cleanups
-
-2004-06-24 Dan Williams <dcbw@redhat.com>
-
- * Makefile.am
- Makefile.in
- configure.in
- dispatcher-daemon/Makefile.am
- dispatcher-daemon/Makefile.in
- dispatcher-daemon/NetworkManagerDispatcher.c
- - Add a daemon that receives signals from NetworkManager
- and will (eventually) call scripts in /etc/somewhere
- when devices go up or down.
-
- * NetworkManager.c
- - Spacing cleanups
- - Flush device routes and ip addresses when added to the device list
-
- * NetworkManagerDbus.c
- - Spacing cleanups
- - Add missing returns in the two signal functions
-
- * NetworkManagerPolicy.c
- - Spacing and variable cleanups
- - Rename nm_policy_switch_interface->nm_policy_switch_device
- - nm_policy_switch_device():
- Use kill (pid) instead of system ("kill <pid>")
- - nm_state_modification_monitor():
- Add wireless essid to output of debug statements
- Correct typo in device compare to switch or not (should be !=)
- Don't sleep after sending "no longer active" signal, was useless
-
-2004-06-24 Dan Williams <dcbw@redhat.com>
-
- * Initial import
diff --git a/Makefile.am b/Makefile.am
deleted file mode 100644
index 02504ed123..0000000000
--- a/Makefile.am
+++ /dev/null
@@ -1,19 +0,0 @@
-SUBDIRS = utils src dispatcher-daemon gnome initscript test po
-
-EXTRA_DIST = \
- CONTRIBUTING \
- NetworkManager.pc.in \
- NetworkManager.h \
- intltool-extract.in \
- intltool-merge.in \
- intltool-update.in
-
-DISTCLEANFILES = intltool-extract intltool-merge intltool-update
-
-pkgconfigdir = $(libdir)/pkgconfig
-
-pkgconfig_DATA = NetworkManager.pc
-
-NetworkManagerincludedir=$(includedir)/NetworkManager
-
-NetworkManagerinclude_HEADERS = NetworkManager.h
diff --git a/NEWS b/NEWS
deleted file mode 100644
index f1107eb8f2..0000000000
--- a/NEWS
+++ /dev/null
@@ -1,78 +0,0 @@
-============================================
-NetworkManager-0.3.1
-Overview of changes since NetworkManager-0.3
-============================================
-
-NetworkManager:
-
- * Debian backend fixes, Thom May
- * Build fixes, Thom May
- * Better handling of encrypted devices, Dan Williams
- * Better handling of user-selected access points, Dan Williams
-
-NetworkManagerNotification:
-
- * Simplified D-Bus code, Dan Williams
- * Better error handling and feedback, Dan Williams
- * Greatly simplify the locking to UI smoother, Dan Williams
-
-============================================
-NetworkManager-0.3.0
-Overview of changes since NetworkManager-0.2
-============================================
-
-NetworkManager:
-
- * Lots of fixes, Dan Williams
- * Support static IP addresses, Dan Williams
- - Get broadcast address from config files, Robert Paskowitz
- * Support for non-ESSID-broadcasting base stations, Dan Williams
- * Only accept and manager 802.3 and 802.11 devices, Dan Williams
- * Don't blow away an active wired connection on startup, Dan Williams
- * Improve strength calculation, Dan Williams
- * Constantly scanning behavior, Dan Williams
- * add .pc file, Colin Walters
- * move to syslog, Dan Willemsen
- * Improve MD5 hashing of 128-bit passphrases, Colin Walters
- * DBUS API docs, Dan Williams
- * Cleanups, Colin Walters
- * Trusted networks, Dan Williams
- * New Backends:
- - Debian, Thom May and Mark Roach
- - Slackware, Narayan Newton
- * Fixes and functionality improvements in Gentoo backend, Robert Paskowitz
-
-Python:
-
- * Example python code, Bryan Clark.
- * python test framework, Bryan Clark
-
-NetworkManagerInfo:
-
- * Trusted networks, Dan Williams
- * Escape ESSIDs in gconf, Dan Williams
- * Lifecycle improvements, John Palmieri
-
-Translations:
-
- * New/Improved translations: da de sv en_CA nb no pa bs pt_BR wa gu es
- - Thanks to:
- Kjartan Maraas
- Christian Rose
- Adam Weinberger
- Amanpreet Singh Alam
- Akagic Amila
- Raphael Higino
- Pablo Saratxaga
- Ankit Patel
- Francisco Javier F. Serrador
- Martin Willemoes Hansen
- Hendrik Brandt
-
-NetworkManagerNotification:
-
- * Complete rewrite, Jonathan Blandford and John Palmieri
- - Now a Notification area
- - Simpler menu
- - Hook up the "other network" dialog to do something
- * New icons, Diana Fong
diff --git a/NetworkManager.h b/NetworkManager.h
deleted file mode 100644
index f54c7a4a3d..0000000000
--- a/NetworkManager.h
+++ /dev/null
@@ -1,225 +0,0 @@
-/* NetworkManager -- Network link manager
- *
- * Dan Williams <dcbw@redhat.com>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- *
- * (C) Copyright 2004 Red Hat, Inc.
- */
-
-#ifndef NETWORK_MANAGER_H
-#define NETWORK_MANAGER_H
-
-/*
- * dbus services details
- */
-#define NM_DBUS_SERVICE "org.freedesktop.NetworkManager"
-
-#define NM_DBUS_PATH "/org/freedesktop/NetworkManager"
-#define NM_DBUS_INTERFACE "org.freedesktop.NetworkManager"
-#define NM_DBUS_PATH_DEVICES "/org/freedesktop/NetworkManager/Devices"
-#define NM_DBUS_INTERFACE_DEVICES "org.freedesktop.NetworkManager.Devices"
-#define NM_DBUS_PATH_DHCP "/org/freedesktop/NetworkManager/DhcpOptions"
-#define NM_DBUS_INTERFACE_DHCP "org.freedesktop.NetworkManager.DhcpOptions"
-#define NM_DBUS_PATH_VPN "/org/freedesktop/NetworkManager/VPNConnections"
-#define NM_DBUS_INTERFACE_VPN "org.freedesktop.NetworkManager.VPNConnections"
-
-#define NMI_DBUS_SERVICE "org.freedesktop.NetworkManagerInfo"
-#define NMI_DBUS_PATH "/org/freedesktop/NetworkManagerInfo"
-#define NMI_DBUS_INTERFACE "org.freedesktop.NetworkManagerInfo"
-
-
-/*
- * Some common errors
- */
-#define NM_DBUS_NO_DEVICES_ERROR "org.freedesktop.NetworkManager.NoDevices"
-#define NM_DBUS_NO_DIALUP_ERROR "org.freedesktop.NetworkManager.NoDialup"
-#define NM_DBUS_NO_NETWORKS_ERROR "org.freedesktop.NetworkManager.NoNetworks"
-#define NM_DBUS_NO_ACTIVE_DEVICE_ERROR "org.freedesktop.NetworkManager.NoActiveDevice"
-#define NM_DBUS_NO_ACTIVE_NET_ERROR "org.freedesktop.NetworkManager.NoActiveNetwork"
-
-#define NM_DBUS_NO_ACTIVE_VPN_CONNECTION "org.freedesktop.NetworkManager.VPNConnections.NoActiveVPNConnection"
-#define NM_DBUS_NO_VPN_CONNECTIONS "org.freedesktop.NetworkManager.VPNConnections.NoVPNConnections"
-#define NM_DBUS_INVALID_VPN_CONNECTION "org.freedesktop.NetworkManager.VPNConnections.InvalidVPNConnection"
-
-#define NM_DBUS_VPN_STARTING_IN_PROGRESS "StartingInProgress"
-#define NM_DBUS_VPN_ALREADY_STARTED "AlreadyStarted"
-#define NM_DBUS_VPN_STOPPING_IN_PROGRESS "StoppingInProgress"
-#define NM_DBUS_VPN_ALREADY_STOPPED "AlreadyStopped"
-#define NM_DBUS_VPN_WRONG_STATE "WrongState"
-#define NM_DBUS_VPN_BAD_ARGUMENTS "BadArguments"
-
-
-/*
- * VPN daemon signals
- */
-#define NM_DBUS_VPN_SIGNAL_LOGIN_BANNER "LoginBanner"
-#define NM_DBUS_VPN_SIGNAL_LOGIN_FAILED "LoginFailed"
-#define NM_DBUS_VPN_SIGNAL_LAUNCH_FAILED "LaunchFailed"
-#define NM_DBUS_VPN_SIGNAL_CONNECT_FAILED "ConnectFailed"
-#define NM_DBUS_VPN_SIGNAL_VPN_CONFIG_BAD "VPNConfigBad"
-#define NM_DBUS_VPN_SIGNAL_IP_CONFIG_BAD "IPConfigBad"
-#define NM_DBUS_VPN_SIGNAL_STATE_CHANGE "StateChange"
-#define NM_DBUS_VPN_SIGNAL_IP4_CONFIG "IP4Config"
-
-
-/*
- * NetworkManager signals
- */
-#define NM_DBUS_SIGNAL_STATE_CHANGE "StateChange"
-
-
-/*
- * Types of NetworkManager devices
- */
-typedef enum NMState
-{
- NM_STATE_UNKNOWN = 0,
- NM_STATE_ASLEEP,
- NM_STATE_CONNECTING,
- NM_STATE_CONNECTED,
- NM_STATE_DISCONNECTED
-} NMState;
-
-
-/*
- * Types of NetworkManager devices
- */
-typedef enum NMDeviceType
-{
- DEVICE_TYPE_DONT_KNOW = 0,
- DEVICE_TYPE_WIRED_ETHERNET,
- DEVICE_TYPE_WIRELESS_ETHERNET
-} NMDeviceType;
-
-
-/*
- * Encryption key types
- */
-typedef enum NMEncKeyType
-{
- NM_ENC_TYPE_UNKNOWN = 0,
- NM_ENC_TYPE_NONE,
- NM_ENC_TYPE_HEX_KEY,
- NM_ENC_TYPE_ASCII_KEY,
- NM_ENC_TYPE_128_BIT_PASSPHRASE
- /* FIXME: WPA and 802.1x support */
-} NMEncKeyType;
-
-
-/*
- * Driver support levels
- */
-typedef enum NMDriverSupportLevel
-{
- NM_DRIVER_UNSUPPORTED = 0,
- NM_DRIVER_NO_CARRIER_DETECT,
- NM_DRIVER_NO_WIRELESS_SCAN,
- NM_DRIVER_FULLY_SUPPORTED
-} NMDriverSupportLevel;
-
-
-/*
- * Wireless network modes
- */
-typedef enum NMNetworkMode
-{
- NETWORK_MODE_UNKNOWN = 0,
- NETWORK_MODE_INFRA,
- NETWORK_MODE_ADHOC
-} NMNetworkMode;
-
-
-/*
- * Wireless network update types
- */
-typedef enum
-{
- NETWORK_STATUS_DISAPPEARED = 0,
- NETWORK_STATUS_APPEARED,
- NETWORK_STATUS_STRENGTH_CHANGED
-} NMNetworkStatus;
-
-
-/*
- * Wireless network types
- */
-typedef enum NMNetworkType
-{
- NETWORK_TYPE_UNKNOWN = 0,
- NETWORK_TYPE_ALLOWED,
- NETWORK_TYPE_INVALID,
- NETWORK_TYPE_DEVICE
-} NMNetworkType;
-
-
-/*
- * Authentication modes
- */
-typedef enum NMDeviceAuthMethod
-{
- NM_DEVICE_AUTH_METHOD_UNKNOWN = 0,
- NM_DEVICE_AUTH_METHOD_NONE,
- NM_DEVICE_AUTH_METHOD_OPEN_SYSTEM,
- NM_DEVICE_AUTH_METHOD_SHARED_KEY
-} NMDeviceAuthMethod;
-
-
-/*
- * VPN daemon states
- */
-typedef enum NMVPNState
-{
- NM_VPN_STATE_UNKNOWN = 0,
- NM_VPN_STATE_INIT,
- NM_VPN_STATE_SHUTDOWN,
- NM_VPN_STATE_STARTING,
- NM_VPN_STATE_STARTED,
- NM_VPN_STATE_STOPPING,
- NM_VPN_STATE_STOPPED
-} NMVPNState;
-
-
-/*
- * Device activation stages
- */
-typedef enum NMActStage
-{
- NM_ACT_STAGE_UNKNOWN = 0,
- NM_ACT_STAGE_DEVICE_PREPARE,
- NM_ACT_STAGE_DEVICE_CONFIG,
- NM_ACT_STAGE_NEED_USER_KEY,
- NM_ACT_STAGE_IP_CONFIG_START,
- NM_ACT_STAGE_IP_CONFIG_GET,
- NM_ACT_STAGE_IP_CONFIG_COMMIT,
- NM_ACT_STAGE_ACTIVATED,
- NM_ACT_STAGE_FAILED,
- NM_ACT_STAGE_CANCELLED
-} NMActStage;
-
-
-/*
- * Wireless scanning methods
- *
- */
-typedef enum NMWirelessScanMethod
-{
- NM_SCAN_METHOD_UNKNOWN = 0,
- NM_SCAN_METHOD_ALWAYS,
- NM_SCAN_METHOD_WHEN_UNASSOCIATED,
- NM_SCAN_METHOD_NEVER
-} NMWirelessScanMethod;
-
-#endif
diff --git a/NetworkManager.pc.in b/NetworkManager.pc.in
deleted file mode 100644
index 3ffcc5389c..0000000000
--- a/NetworkManager.pc.in
+++ /dev/null
@@ -1,10 +0,0 @@
-prefix=@prefix@
-exec_prefix=@exec_prefix@
-libdir=@libdir@
-includedir=@includedir@
-libgnome_serverdir=@libexecdir@
-
-Name: NetworkManager
-Description: System for maintaining active network connection
-Requires: dbus-1
-Version: @VERSION@
diff --git a/README b/README
deleted file mode 100644
index 17e6c7bab8..0000000000
--- a/README
+++ /dev/null
@@ -1,64 +0,0 @@
-THEORY OF OPERATION:
-
-NetworkManager attempts to keep an active network connection available at all
-times. It is intended only for the desktop use-case, and is not intended for
-usage on servers. At this time, it does not support static IP addresses on
-network interfaces, and requires DHCP to be used instead. The point of
-NetworkManager is to make networking configuration and setup as painless and
-automatic as possible. If using DHCP, NetworkManager is _intended_ to replace
-default routes, obtain IP addresses from a DHCP server, and change nameservers
-whenever it sees fit. If you have special needs, we'd like to hear about them,
-but understand that NetworkManager is not intended to serve the needs of all
-users.
-
-
-From a list of all adapters currently installed on the system, NetworkManager
-will first try a wired and then a wireless adapter. Wireless adapters that
-support wireless scanning are preferred over ones that cannot. NetworkManager
-does not try to keep a connection up as long as possible, meaning that plugging
-into a wired network will switch the connection to the wired network away from
-the wireless one.
-
-For wireless networking support, NetworkManager keeps two lists of wireless
-networks: a Trusted list, and a Preferred list. The Trusted list contains
-networks the user specifically adds to it, while the preferred list contains
-networks the user forces NetworkManager to connect to. For example, while the
-company's wireless network and WEP/WPA key would be preloaded into the Trusted
-Networks list, if the user wished to use the wireless network in a Starbucks,
-the user would explicitly tell NetworkManager to associate with that network.
-NetworkManager does not try to use _any_ available network in the area (a
-possible security risk), but will associate with any Trusted Network first, and
-Preferred Networks later. Preferred Networks are ones the user has explicitly
-made NetworkManager associate with at some previous time. So if the user walks
-into a Starbucks and explicitly asks NetworkManager to associate with that
-Starbucks network, NetworkManager will remember the Starbucks network
-information from that point on. Upon returning to that Starbucks,
-NetworkManager will attempt to associate _automatically_ with the Starbucks
-network since it is now in the Preferred Networks list. The point of this is to
-ensure that only the user can determine which wireless networks to associate
-with, and that the user is aware which networks are security risks and which
-are not.
-
-STRUCTURE:
-
-NetworkManager runs as a root-user system level daemon, since it must manipulate
-hardware directly. It communicates over DBUS with a desktop-level per-user
-process, nm-applet. Since Trusted and Preferred Networks are user-specific,
-there must be some mechanism of getting this information per-user.
-NetworkManager cannot store that information as it is user-specific, and
-therefore communicates over DBUS to the user daemon which provides those lists.
-NetworkManager also provides an API over DBUS for any DBUS-aware application to
-determine the current state of the network, including available wireless
-networks the computer is aware of and specific details about those networks.
-This API also provides the means for forcing NetworkManager to associate with a
-specific wireless network. Use of DBUS allows separation of NetworkManager,
-which requires no user-interface, and the parts of the user interface which
-might be desktop environment specific.
-
-The nm-applet provides a DBUS service called NetworkManagerInfo, which should
-provide to NetworkManager the Trusted and Preferred Networks lists upon request.
-It also should be able to display a dialog to retrieve a WEP/WPA key or
-passphrase from the user when NetworkManager requests it. The GNOME version of
-NetworkManagerInfo, for example, stores Trusted and Preferred Networks in GConf,
-and proxies that information to NetworkManager upon request.
-
diff --git a/TODO b/TODO
deleted file mode 100644
index 2cba8b2dc2..0000000000
--- a/TODO
+++ /dev/null
@@ -1,19 +0,0 @@
-TODO items for NetworkManager
------------------------------
-
-Any of these items are of course fair game for anyone, patches are greatly welcome. It also serves as a "what still needs to be done" list.
-
-- Access Point link checking thresholds
-
-Wireless link checking could be enhanced to check the signal strength of an access point and switch if the current access point a wireless card is associated with has dropped below say, 20%.
-
-
-- Gracefully recover from dbus and hal dropouts
-
-There is currently no logic to gracefully recover from a crashed/killed dbus or hal. There are dbus functions for notification when services come up and go away which could be used here. Remeber that when dbus dies, hal also dies at the moment.
-
-
-- Support 40/64 bit passphrases
-
-Allow user to enter passphrases and convert them to 40/64 bit WEP keys on the fly. Unfortunately, the algorithm for 40/64 bit passphrases is kind of messy.
-
diff --git a/autogen.sh b/autogen.sh
deleted file mode 100755
index c81b479ee9..0000000000
--- a/autogen.sh
+++ /dev/null
@@ -1,23 +0,0 @@
-#!/bin/sh
-# Run this to generate all the initial makefiles, etc.
-
-srcdir=`dirname $0`
-test -z "$srcdir" && srcdir=.
-REQUIRED_AUTOMAKE_VERSION=1.7
-PKG_NAME=NetworkManager
-
-(test -f $srcdir/configure.in \
- && test -f $srcdir/src/NetworkManagerMain.h) || {
- echo -n "**Error**: Directory "\`$srcdir\'" does not look like the"
- echo " top-level $PKG_NAME directory"
- exit 1
-}
-
-
-which gnome-autogen.sh || {
- echo "You need to install gnome-common from the GNOME CVS"
- exit 1
-}
-USE_GNOME2_MACROS=1 . gnome-autogen.sh
-
-
diff --git a/configure.in b/configure.in
deleted file mode 100644
index 1f147e56d5..0000000000
--- a/configure.in
+++ /dev/null
@@ -1,301 +0,0 @@
-AC_PREREQ(2.52)
-
-AC_INIT(NetworkManager, 0.4.1, dcbw@redhat.com, NetworkManager)
-AM_INIT_AUTOMAKE([subdir-objects])
-AM_MAINTAINER_MODE
-
-AM_CONFIG_HEADER(config.h)
-
-dnl
-dnl Require programs
-dnl
-AC_PROG_CC
-AM_PROG_CC_C_O
-AC_PROG_INSTALL
-AC_PROG_LIBTOOL
-
-dnl
-dnl Required headers
-dnl
-AC_HEADER_STDC
-AC_CHECK_HEADERS(fcntl.h paths.h sys/ioctl.h sys/time.h syslog.h unistd.h)
-
-dnl
-dnl Checks for typedefs, structures, and compiler characteristics.
-dnl
-AC_TYPE_MODE_T
-AC_TYPE_PID_T
-AC_HEADER_TIME
-
-dnl
-dnl Checks for library functions.
-dnl
-AC_PROG_GCC_TRADITIONAL
-AC_FUNC_MEMCMP
-AC_CHECK_FUNCS(select socket uname)
-
-dnl
-dnl translation support
-dnl
-GETTEXT_PACKAGE=NetworkManager
-AC_SUBST(GETTEXT_PACKAGE)
-AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE", [Gettext package])
-ALL_LINGUAS="bs cs da de el en_CA es fr gu hr hu it ja nb ne nl no pa pt_BR rw sk sq sr sr@Latn sv uk wa zh_CN zh_TW"
-AC_PROG_INTLTOOL([0.27.2])
-AM_GLIB_GNU_GETTEXT
-
-AC_ARG_WITH(distro, AC_HELP_STRING([--with-distro=DISTRO], [Specify the Linux distribution to target: One of redhat, suse, gentoo, debian, or slackware]))
-if test "z$with_distro" = "z"; then
- AC_CHECK_FILE(/etc/redhat-release,with_distro="redhat")
- AC_CHECK_FILE(/etc/SuSE-release,with_distro="suse")
- AC_CHECK_FILE(/etc/fedora-release,with_distro="redhat")
- AC_CHECK_FILE(/etc/gentoo-release,with_distro="gentoo")
- AC_CHECK_FILE(/etc/debian_version,with_distro="debian")
- AC_CHECK_FILE(/etc/slackware-version,with_distro="slackware")
-fi
-with_distro=`echo ${with_distro} | tr '[[:upper:]]' '[[:lower:]]' `
-
-if test "z$with_distro" = "z"; then
- echo "Linux distribution autodetection failed, you must specify the distribution to target using --with-distro=DISTRO"
- exit 1
-else
- case $with_distro in
- redhat|suse|gentoo|debian|slackware) ;;
- *)
- echo "Your distribution (${with_distro}) is not yet supported! (patches welcome)"
- exit 1
- ;;
- esac
-fi
-AM_CONDITIONAL(TARGET_REDHAT, test x"$with_distro" = xredhat)
-AM_CONDITIONAL(TARGET_SUSE, test x"$with_distro" = xsuse)
-AM_CONDITIONAL(TARGET_GENTOO, test x"$with_distro" = xgentoo)
-AM_CONDITIONAL(TARGET_DEBIAN, test x"$with_distro" = xdebian)
-AM_CONDITIONAL(TARGET_SLACKWARE, test x"$with_distro" = xslackware)
-
-AC_CHECK_HEADER(iwlib.h, [],
- [AC_MSG_ERROR(iwlib.h not found. Install wireless-tools.)], [])
-AC_CHECK_LIB(iw, iw_scan, [ IWLIB=-liw ],
- [AC_MSG_ERROR(wireless-tools 27.pre23 not installed or not functional)], [])
-AC_SUBST(IWLIB)
-
-PKG_CHECK_MODULES(DBUS, dbus-glib-1 >= 0.22)
-
-##### Find out the version of DBUS we're using
-dbus_version=`pkg-config --modversion dbus-1`
-DBUS_VERSION_MAJOR=`echo $dbus_version | awk -F. '{print $1}'`
-DBUS_VERSION_MINOR=`echo $dbus_version | awk -F. '{print $2}'`
-DBUS_VERSION_MICRO=`echo $dbus_version | awk -F. '{print $3}'`
-if test "z$DBUS_VERSION_MAJOR" = "z"; then
- DBUS_VERSION_MAJOR="0"
-fi
-if test "z$DBUS_VERSION_MINOR" = "z"; then
- DBUS_VERSION_MINOR="0"
-fi
-if test "z$DBUS_VERSION_MICRO" = "z"; then
- DBUS_VERSION_MICRO="0"
-fi
-
-if test "z$DBUS_VERSION_MAJOR" = "z0" -a "z$DBUS_VERSION_MINOR" = "z0" -a "z$DBUS_VERSION_MICRO" = "z0"; then
- echo "Error: Couldn't determine the version of your DBUS package."
- echo " This is probably an error in this script, please report it"
- echo " along with the following information:"
- echo " Base DBUS version ='$dbus_version'"
- echo " DBUS_VERSION_MAJOR='$DBUS_VERSION_MAJOR'"
- echo " DBUS_VERSION_MINOR='$DBUS_VERSION_MINOR'"
- echo " DBUS_VERSION_MICRO='$DBUS_VERSION_MICRO'"
- exit 1
-else
-
- echo "Your dbus version is $DBUS_VERSION_MAJOR,$DBUS_VERSION_MINOR,$DBUS_VERSION_MICRO."
- DBUS_CFLAGS="$DBUS_CFLAGS -DDBUS_VERSION_MAJOR=$DBUS_VERSION_MAJOR"
- DBUS_CFLAGS="$DBUS_CFLAGS -DDBUS_VERSION_MINOR=$DBUS_VERSION_MINOR"
- DBUS_CFLAGS="$DBUS_CFLAGS -DDBUS_VERSION_MICRO=$DBUS_VERSION_MICRO"
-fi
-AC_SUBST(DBUS_CFLAGS)
-AC_SUBST(DBUS_LIBS)
-
-PKG_CHECK_MODULES(GTHREAD, gthread-2.0)
-AC_SUBST(GTHREAD_CFLAGS)
-AC_SUBST(GTHREAD_LIBS)
-
-PKG_CHECK_MODULES(GMODULE, gmodule-2.0)
-AC_SUBST(GMODULE_CFLAGS)
-AC_SUBST(GMODULE_LIBS)
-
-PKG_CHECK_MODULES(HAL, hal >= 0.2.91)
-AC_SUBST(HAL_CFLAGS)
-AC_SUBST(HAL_LIBS)
-
-PKG_CHECK_MODULES(GTK, gtk+-2.0)
-AC_SUBST(GTK_CFLAGS)
-AC_SUBST(GTK_LIBS)
-
-PKG_CHECK_MODULES(GDK_PIXBUF, gdk-pixbuf-2.0)
-AC_SUBST(GDK_PIXBUF_CFLAGS)
-AC_SUBST(GDK_PIXBUF_LIBS)
-
-PKG_CHECK_MODULES(GLADE, libglade-2.0)
-AC_SUBST(GLADE_CFLAGS)
-AC_SUBST(GLADE_LIBS)
-
-PKG_CHECK_MODULES(GCONF, gconf-2.0)
-AC_SUBST(GCONF_CFLAGS)
-AC_SUBST(GCONF_LIBS)
-
-PKG_CHECK_MODULES(GNOME_KEYRING, gnome-keyring-1)
-AC_SUBST(GNOME_KEYRING_CFLAGS)
-AC_SUBST(GNOME_KEYRING_LIBS)
-
-AC_ARG_WITH(gcrypt, AC_HELP_STRING([--with-gcrypt], [Use gcrypt library]), ac_gcrypt=$withval, ac_gcrypt=auto)
-if test x"$ac_gcrypt" != xno; then
- AC_PATH_PROG(LIBGCRYPT_CONFIG, libgcrypt-config, no)
-else
- LIBGCRYPT_CONFIG=no
-fi
-if test x"$LIBGCRYPT_CONFIG" = xno; then
- if test x"$ac_gcrypt" = xyes; then
- AC_MSG_ERROR([gcrypt explicitly requested but not found on system])
- fi
- ac_gcrypt=no
-else
- if test x"$ac_gcrypt" != xno; then
- AC_DEFINE(HAVE_GCRYPT, 1, [Define if you have libgcrypt])
- LIBGCRYPT_CFLAGS=`$LIBGCRYPT_CONFIG --cflags`
- LIBGCRYPT_LIBS=`$LIBGCRYPT_CONFIG --libs`
- AC_SUBST(LIBGCRYPT_CFLAGS)
- AC_SUBST(LIBGCRYPT_LIBS)
- fi
-fi
-AM_CONDITIONAL(WITH_GCRYPT, test x"$ac_gcrypt" != xno)
-
-PKG_CHECK_MODULES(PANEL_APPLET, libpanelapplet-2.0)
-AC_SUBST(PANEL_APPLET_CFLAGS)
-AC_SUBST(PANEL_APPLET_LIBS)
-
-PKG_CHECK_MODULES(LIBGNOMEUI, libgnomeui-2.0)
-AC_SUBST(LIBGNOMEUI_CFLAGS) # is this even needed? it was typed incorrectly before
-AC_SUBST(LIBGNOMEUI_LIBS)
-
-AC_ARG_WITH(dbus-sys, AC_HELP_STRING([--with-dbus-sys=DIR], [where D-BUS system.d directory is]))
-
-if ! test -z "$with_dbus_sys" ; then
- DBUS_SYS_DIR="$with_dbus_sys"
-else
- DBUS_SYS_DIR="${sysconfdir}/dbus-1/system.d"
-fi
-AC_SUBST(DBUS_SYS_DIR)
-AC_DEFINE_UNQUOTED(DBUS_SYSTEMD_DIR, "$DBUS_SYS_DIR", [Where system.d dir for DBUS is])
-
-AC_ARG_WITH(named, AC_HELP_STRING([--with-named=PATH], [path to the named binary]))
-AC_ARG_WITH(named_dir, AC_HELP_STRING([--with-named-dir=PATH], [path to the named data directory]))
-AC_ARG_WITH(named_user, AC_HELP_STRING([--with-named-user=USERNAME], [named username]))
-if test "x${with_named}" = x; then
- AC_DEFINE(NM_NO_NAMED,,[Define if you want to disable named support])
-fi
-AC_DEFINE_UNQUOTED(NM_NAMED_BINARY_PATH, "$with_named", [Define to path of named binary])
-AC_DEFINE_UNQUOTED(NM_NAMED_DATA_DIR, "$with_named_dir", [Define to path of named data directory])
-AC_DEFINE_UNQUOTED(NM_NAMED_USER, "$with_named_user", [Define to named username])
-
-AC_ARG_WITH(DHCDBD_BINARY_PATH, AC_HELP_STRING([--with-dhcdbd=/path/to/dhcdbd], [path to dhcdbd]))
-if test "x${DHCDBD_BINARY_PATH}" = x; then
- AC_PATH_PROG(DHCDBD_BINARY_PATH, dhcdbd, [], $PATH:/sbin:/usr/sbin)
- if ! test -x "$DHCDBD_BINARY_PATH"; then
- AC_MSG_ERROR(dhcdbd was not installed. See http://people.redhat.com/jvdias/dhcdbd)
- fi
-fi
-AC_SUBST(DHCDBD_BINARY_PATH)
-
-#### find the actual value for $prefix that we'll end up with
-## (I know this is broken and should be done in the Makefile, but
-## that's a major pain and almost nobody actually seems to care)
-REAL_PREFIX=
-if test "x$prefix" = "xNONE"; then
- REAL_PREFIX=$ac_default_prefix
-else
- REAL_PREFIX=$prefix
-fi
-
-## temporarily change prefix and exec_prefix
-old_prefix=$prefix
-prefix=$REAL_PREFIX
-
-if test "x$exec_prefix" = xNONE ; then
- REAL_EXEC_PREFIX=$REAL_PREFIX
-else
- REAL_EXEC_PREFIX=$exec_prefix
-fi
-old_exec_prefix=$exec_prefix
-exec_prefix=$REAL_EXEC_PREFIX
-
-BINDIR_TMP="$bindir"
-EXPANDED_BINDIR=`eval echo $BINDIR_TMP`
-AC_SUBST(EXPANDED_BINDIR)
-AC_DEFINE_UNQUOTED(EXPANDED_BINDIR, "$EXPANDED_BINDIR", [Where the executables are installed])
-
-## put prefix and exec_prefix back
-prefix=$old_prefix
-exec_prefix=$old_exec_prefix
-
-AC_ARG_ENABLE(more-warnings,
-AC_HELP_STRING([--enable-more-warnings], [Maximum compiler warnings]),
-set_more_warnings="$enableval",[
-if test -d "$srcdir/{arch}" || test -d "$srcdir/CVS"; then
- set_more_warnings=yes
-else
- set_more_warnings=no
-fi
-])
-AC_MSG_CHECKING(for more warnings, including -Werror)
-if test "$GCC" = "yes" -a "$set_more_warnings" != "no"; then
- AC_MSG_RESULT(yes)
- CFLAGS="-Wall -Werror -std=gnu89 $CFLAGS"
-
- for option in -Wno-unused -Wno-strict-aliasing -Wno-sign-compare -Wdeclaration-after-statement -Wno-pointer-sign ; do
- SAVE_CFLAGS="$CFLAGS"
- CFLAGS="$CFLAGS $option"
- AC_MSG_CHECKING([whether gcc understands $option])
- AC_TRY_COMPILE([], [],
- has_option=yes,
- has_option=no,)
- if test $has_option = no; then
- CFLAGS="$SAVE_CFLAGS"
- fi
- AC_MSG_RESULT($has_option)
- unset has_option
- unset SAVE_CFLAGS
- done
- unset option
-else
- AC_MSG_RESULT(no)
-fi
-
-AC_OUTPUT([
-Makefile
-utils/Makefile
-src/Makefile
-src/named-manager/Makefile
-src/vpn-manager/Makefile
-src/dhcp-manager/Makefile
-src/backends/Makefile
-dispatcher-daemon/Makefile
-gnome/Makefile
-gnome/applet/Makefile
-gnome/applet/icons/Makefile
-gnome/libnm_glib/libnm_glib.pc
-gnome/libnm_glib/Makefile
-gnome/vpn-properties/Makefile
-test/Makefile
-initscript/Makefile
-initscript/RedHat/Makefile
-initscript/Gentoo/Makefile
-initscript/Debian/Makefile
-initscript/Slackware/Makefile
-initscript/SUSE/Makefile
-po/Makefile.in
-NetworkManager.pc
-])
-
-echo
-echo Distribution targeting: ${with_distro}
-echo 'if this is not correct, please specifiy your distro with --with-distro=DISTRO'
diff --git a/dispatcher-daemon/.cvsignore b/dispatcher-daemon/.cvsignore
deleted file mode 100644
index 08dd975ef3..0000000000
--- a/dispatcher-daemon/.cvsignore
+++ /dev/null
@@ -1,3 +0,0 @@
-Makefile
-Makefile.in
-NetworkManagerDispatcher
diff --git a/dispatcher-daemon/Makefile.am b/dispatcher-daemon/Makefile.am
deleted file mode 100644
index 6278ca41f8..0000000000
--- a/dispatcher-daemon/Makefile.am
+++ /dev/null
@@ -1,22 +0,0 @@
-INCLUDES = -I${top_srcdir} -I${top_srcdir}/utils
-NULL=
-
-bin_PROGRAMS = NetworkManagerDispatcher
-
-NetworkManagerDispatcher_CPPFLAGS = \
- $(DBUS_CFLAGS) \
- $(GTHREAD_CFLAGS) \
- -Wall \
- -DDBUS_API_SUBJECT_TO_CHANGE \
- -DBINDIR=\"$(bindir)\" \
- -DDATADIR=\"$(datadir)\" \
- $(NULL)
-
-NetworkManagerDispatcher_SOURCES = NetworkManagerDispatcher.c
-
-NetworkManagerDispatcher_LDADD = \
- $(DBUS_LIBS) \
- $(GTHREAD_LIBS) \
- $(top_builddir)/utils/libnmutils.la
-
-
diff --git a/dispatcher-daemon/NetworkManagerDispatcher.c b/dispatcher-daemon/NetworkManagerDispatcher.c
deleted file mode 100644
index 32325c5b39..0000000000
--- a/dispatcher-daemon/NetworkManagerDispatcher.c
+++ /dev/null
@@ -1,355 +0,0 @@
-/* NetworkManagerDispatcher -- Dispatches messages from NetworkManager
- *
- * Dan Williams <dcbw@redhat.com>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- *
- * (C) Copyright 2004 Red Hat, Inc.
- */
-
-#include <glib.h>
-#include <dbus/dbus.h>
-#include <dbus/dbus-glib-lowlevel.h>
-#include <dbus/dbus-glib.h>
-#include <getopt.h>
-#include <errno.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <syslog.h>
-#include <unistd.h>
-#include <fcntl.h>
-#include <sys/stat.h>
-#include <sys/types.h>
-#include <dirent.h>
-#include <string.h>
-
-#include "NetworkManager.h"
-#include "nm-utils.h"
-
-
-enum NMDAction
-{
- NMD_DEVICE_DONT_KNOW,
- NMD_DEVICE_NOW_INACTIVE,
- NMD_DEVICE_NOW_ACTIVE,
-};
-typedef enum NMDAction NMDAction;
-
-
-#define NM_SCRIPT_DIR "/etc/NetworkManager/dispatcher.d"
-
-
-/*
- * nmd_permission_check
- *
- * Verify that the given script has the permissions we want. Specifically,
- * very that the file is
- * - A regular file.
- * - Owned by root.
- * - Not writable by the group or by other.
- * - Not setuid.
- * - Executable by the owner.
- *
- */
-static inline gboolean nmd_permission_check (struct stat *s)
-{
- if (!S_ISREG (s->st_mode))
- return FALSE;
- if (s->st_uid != 0)
- return FALSE;
- if (s->st_mode & (S_IWGRP|S_IWOTH|S_ISUID))
- return FALSE;
- if (!(s->st_mode & S_IXUSR))
- return FALSE;
- return TRUE;
-}
-
-
-/*
- * nmd_execute_scripts
- *
- * Call scripts in /etc/NetworkManager.d when devices go down or up
- *
- */
-static void nmd_execute_scripts (NMDAction action, char *iface_name)
-{
- GDir * dir;
- const char * file_name;
- const char * char_act;
-
- if (action == NMD_DEVICE_NOW_ACTIVE)
- char_act = "up";
- else if (action == NMD_DEVICE_NOW_INACTIVE)
- char_act = "down";
- else
- return;
-
- if (!(dir = g_dir_open (NM_SCRIPT_DIR, 0, NULL)))
- {
- nm_warning ("nmd_execute_scripts(): opendir() could not open '" NM_SCRIPT_DIR "'. errno = %d", errno);
- return;
- }
-
- while ((file_name = g_dir_read_name (dir)))
- {
- char * file_path = g_strdup_printf (NM_SCRIPT_DIR"/%s", file_name);
- struct stat s;
-
- if ((file_name[0] != '.') && (stat (file_path, &s) == 0))
- {
- if (nmd_permission_check (&s))
- {
- char *cmd;
- int ret;
-
- cmd = g_strdup_printf ("%s %s %s", file_path, iface_name, char_act);
- ret = system (cmd);
- if (ret == -1)
- nm_warning ("nmd_execute_scripts(): system() failed with errno = %d", errno);
- g_free (cmd);
- }
- }
-
- g_free (file_path);
- }
-
- g_dir_close (dir);
-}
-
-
-/*
- * nmd_get_device_name
- *
- * Queries NetworkManager for the name of a device, specified by a device path
- */
-static char * nmd_get_device_name (DBusConnection *connection, char *path)
-{
- DBusMessage * message;
- DBusMessage * reply;
- DBusError error;
- char * dbus_dev_name = NULL;
- char * dev_name = NULL;
-
- if (!(message = dbus_message_new_method_call (NM_DBUS_SERVICE, path, NM_DBUS_INTERFACE, "getName")))
- {
- nm_warning ("Couldn't allocate the dbus message");
- return NULL;
- }
-
- dbus_error_init (&error);
- reply = dbus_connection_send_with_reply_and_block (connection, message, -1, &error);
- dbus_message_unref (message);
- if (dbus_error_is_set (&error))
- {
- nm_warning ("%s raised: %s", error.name, error.message);
- dbus_error_free (&error);
- return NULL;
- }
-
- /* now analyze reply */
- if (!dbus_message_get_args (reply, NULL, DBUS_TYPE_STRING, &dbus_dev_name, DBUS_TYPE_INVALID))
- {
- nm_warning ("There was an error getting the device name from NetworkManager." );
- dev_name = NULL;
- }
- else
- dev_name = g_strdup (dbus_dev_name);
-
- dbus_message_unref (reply);
-
- return dev_name;
-}
-
-
-/*
- * nmd_dbus_filter
- *
- * Handles dbus messages from NetworkManager, dispatches device active/not-active messages
- */
-static DBusHandlerResult nmd_dbus_filter (DBusConnection *connection, DBusMessage *message, void *user_data)
-{
- const char *object_path;
- DBusError error;
- char *dev_object_path = NULL;
- gboolean handled = FALSE;
- NMDAction action = NMD_DEVICE_DONT_KNOW;
-
- dbus_error_init (&error);
- object_path = dbus_message_get_path (message);
-
- if (dbus_message_is_signal (message, NM_DBUS_INTERFACE, "DeviceNoLongerActive"))
- action = NMD_DEVICE_NOW_INACTIVE;
- else if (dbus_message_is_signal (message, NM_DBUS_INTERFACE, "DeviceNowActive"))
- action = NMD_DEVICE_NOW_ACTIVE;
-
- if (action != NMD_DEVICE_DONT_KNOW)
- {
- if (dbus_message_get_args (message, &error, DBUS_TYPE_OBJECT_PATH, &dev_object_path, DBUS_TYPE_INVALID))
- {
- char * dev_iface_name = NULL;
-
- dev_object_path = nm_dbus_unescape_object_path (dev_object_path);
- if (dev_object_path)
- dev_iface_name = nmd_get_device_name (connection, dev_object_path);
-
- if (dev_object_path && dev_iface_name)
- {
- nm_info ("Device %s (%s) is now %s.", dev_object_path, dev_iface_name,
- (action == NMD_DEVICE_NOW_INACTIVE ? "down" :
- (action == NMD_DEVICE_NOW_ACTIVE ? "up" : "error")));
-
- nmd_execute_scripts (action, dev_iface_name);
- }
-
- g_free (dev_object_path);
- g_free (dev_iface_name);
-
- handled = TRUE;
- }
- }
-
- return (handled ? DBUS_HANDLER_RESULT_HANDLED : DBUS_HANDLER_RESULT_NOT_YET_HANDLED);
-}
-
-
-/*
- * nmd_dbus_init
- *
- * Initialize a connection to NetworkManager
- */
-static DBusConnection *nmd_dbus_init (void)
-{
- DBusConnection *connection = NULL;
- DBusError error;
-
- /* connect to NetworkManager service on the system bus */
- dbus_error_init (&error);
- connection = dbus_bus_get (DBUS_BUS_SYSTEM, &error);
- if (connection == NULL)
- {
- nm_warning ("nmd_dbus_init(): could not connect to the message bus. dbus says: '%s'", error.message);
- dbus_error_free (&error);
- return (NULL);
- }
-
- dbus_connection_setup_with_g_main (connection, NULL);
-
- if (!dbus_connection_add_filter (connection, nmd_dbus_filter, NULL, NULL))
- return (NULL);
-
- dbus_bus_add_match (connection,
- "type='signal',"
- "interface='" NM_DBUS_INTERFACE "',"
- "sender='" NM_DBUS_SERVICE "',"
- "path='" NM_DBUS_PATH "'", &error);
- if (dbus_error_is_set (&error))
- return (NULL);
-
- return (connection);
-}
-
-/*
- * nmd_print_usage
- *
- * Prints program usage.
- *
- */
-static void nmd_print_usage (void)
-{
- fprintf (stderr, "\n" "usage : NetworkManagerDispatcher [--no-daemon] [--help]\n");
- fprintf (stderr,
- "\n"
- " --no-daemon Become a daemon\n"
- " --help Show this information and exit\n"
- "\n"
- "NetworkManagerDispatcher listens for device messages from NetworkManager\n"
- "and runs scripts in " NM_SCRIPT_DIR "\n"
- "\n");
-}
-
-
-/*
- * main
- *
- */
-int main (int argc, char *argv[])
-{
- gboolean become_daemon = TRUE;
- GMainLoop *loop = NULL;
- DBusConnection *connection = NULL;
-
- /* Parse options */
- while (1)
- {
- int c;
- int option_index = 0;
- const char *opt;
-
- static struct option options[] = {
- {"no-daemon", 0, NULL, 0},
- {"help", 0, NULL, 0},
- {NULL, 0, NULL, 0}
- };
-
- c = getopt_long (argc, argv, "", options, &option_index);
- if (c == -1)
- break;
-
- switch (c)
- {
- case 0:
- opt = options[option_index].name;
- if (strcmp (opt, "help") == 0)
- {
- nmd_print_usage ();
- return 0;
- }
- else if (strcmp (opt, "no-daemon") == 0)
- become_daemon = FALSE;
- else
- {
- nmd_print_usage ();
- return 1;
- }
- break;
-
- default:
- nmd_print_usage ();
- return 1;
- break;
- }
- }
-
- openlog("NetworkManagerDispatcher", (become_daemon) ? LOG_CONS : LOG_CONS | LOG_PERROR, (become_daemon) ? LOG_DAEMON : LOG_USER);
-
- if (become_daemon && daemon (FALSE, FALSE) < 0)
- {
- nm_warning ("NetworkManagerDispatcher could not daemonize. errno = %d", errno );
- exit (1);
- }
-
- g_type_init ();
- if (!g_thread_supported ())
- g_thread_init (NULL);
-
- /* Connect to the NetworkManager dbus service and run the main loop */
- if ((connection = nmd_dbus_init ()))
- {
- loop = g_main_loop_new (NULL, FALSE);
- g_main_loop_run (loop);
- }
-
- return 0;
-}
diff --git a/docs/NetworkManager DBUS API.txt b/docs/NetworkManager DBUS API.txt
deleted file mode 100644
index 7a7c9e8d6b..0000000000
--- a/docs/NetworkManager DBUS API.txt
+++ /dev/null
@@ -1,190 +0,0 @@
-NetworkManager DBUS API (unstable)
-----------------------------------
-
-NetworkManager (NM) exposes a DBUS service and API for two purposes: for programs to obtain information about the network state and network devices, and for programs or users to alter the network state in limited ways. This API is currently unstable and is likely to change in the future. Any methods or objects NOT described in this document are not part of the official API, are not meant for general use, and are not supported in any way.
-
-There are three types of "objects" that NM allows other programs to interact with: the NetworkManager object, Device objects, and Network objects. There is only one NetworkManager object as it performs system-wide networking functions and controls each Device. There can be a arbitrary number of Devices, including no Devices at all, each of which represent a network device present in the system. A Network is the representation of a wireless network, of which each Device object may have an arbitrary number (as long as it is a wireless device).
-
-
-Object structure:
- NetworkManager
- / \
- Device Device
- / \ (no networks)
- Network Network
-
-
-The NetworkManager object
--------------------------
-
-The following constants are used to uniquely refer to the NetworkManager object when making DBUS method calls against NetworkManager:
-
-DBUS Service: "org.freedesktop.NetworkManager"
-DBUS Object Path: "/org/freedesktop/NetworkManager"
-DBUS Interface: "org.freedesktop.NetworkManager"
-
-Methods:
-
- Name: getDevices Get the list of network devices NM knows about
- Args: (none)
- Returns: DBUS String Array Each item in the array is the NM identifier of a Device object
-
-
- Name: getActiveDevice Return the currently active network device
- Args: (none)
- Returns: DBUS_TYPE_STRING The NM identifier of a Device object
-
-
- Name: setActiveDevice Force NM to use a particular network device
- Args: 1) Device object (DBUS_TYPE_STRING) - Network device to switch to
- 2) Wireless Network ESSID (DBUS_TYPE_STRING, optional) - ESSID of the wireless network to switch to
- Returns: (nothing)
-
-
- Name: status Retrieve status information about the network state
- Args: (none)
- Returns: DBUS_TYPE_STRING "connecting" - there is a pending network connection (waiting for a
- DHCP request to complete, waiting for an encryption
- key/passphrase, waiting for a wireless network, etc)
- "connected" - there is an active network connection
- "scanning" - there is no active network connection, but NetworkManager
- is looking for an access point to associate with
- "disconnected" - there is no network connection
-
-Signals:
-
- Name: DeviceNoLongerActive Signals that a network device is no longer active
- Args: 1) Device object (DBUS_TYPE_STRING) - The deactivated network device
-
- Name: DeviceNowActive Signals that a network device is newly activated
- Args: 1) Device object (DBUS_TYPE_STRING) - The newly activated network device
-
- Name: DeviceActivating Signals that a network device is about to become active
- Args: 1) Device object (DBUS_TYPE_STRING) - The device about to become active
-
- Name: DevicesChanged Signals that a device was either added or removed from the system
- Args: 1) Device object (DBUS_TYPE_STRING) - The device which was added or removed
-
- Name: DeviceActivationFailed Signals that activation for a device could not complete (dhcp failed or so)
- Args: 1) Device object (DBUS_TYPE_STRING) - The device for which activation failed
- 2) Network name (DBUS_TYPE_STRING, optional) - ESSID of failed wireless network
-
-NOTE: the following 3 Signals are likely to change in the near future
-
- Name: DeviceIP4AddressChange Signals that a device's IPv4 address was changed
- Args: 1) Device object (DBUS_TYPE_STRING) - The device whose IPv4 address changed
-
- Name: WirelessNetworkAppeared Signals that a device found a new wireless network
- Args: 1) Device object (DBUS_TYPE_STRING) - The device which noticed the wireless network
- 2) Network object (DBUS_TYPE_STRING) - The new wireless network's identifier
-
- Name: WirelessNetworkDisappeared Signals that a device lost a new wireless network
- Args: 1) Device object (DBUS_TYPE_STRING) - The device which lost the wireless network
- 2) Network object (DBUS_TYPE_STRING) - The no-longer-visible wireless network's identifier
-
-
-
-
-The Device object
------------------
-
-The Device object is the NM representation of a network device. To refer to a NM Device, you must use the following constants when creating your DBUS message:
-
-DBUS Service: "org.freedesktop.NetworkManager"
-DBUS Interface: "org.freedesktop.NetworkManager.Devices"
-
-Note that there is no DBUS Object Path listed above, the object path will always the the NM Device identfier returned from such methods as "getActiveDevice" and "getDevices".
-
-Methods:
-
- Name: getName Returns the system device name of the Device object (i.e. eth0)
- Args: (none)
- Returns: DBUS_TYPE_STRING The system device name
-
-
- Name: getType Returns the type of the device (ie wired, wireless, isdn, bluetooth, etc)
- Args: (none)
- Returns: DBUS_TYPE_INT32 0 - unknown type
- 1 - Wired ethernet
- 2 - Wireless (802.11a/b/g)
-
-
- Name: getHalUdi Returns the HAL UDI of the device
- Args: (none)
- Returns: DBUS_TYPE_STRING
-
-
- Name: getIP4Address Returns the IPv4 address of the device
- Args: (none)
- Returns: DBUS_TYPE_UINT32 The IPv4 address in network byte order
-
-
- Name: getLinkActive Returns the link state of the device
- Args: (none)
- Returns: DBUS_TYPE_BOOLEAN TRUE - the device has a valid network link
- Wired: cable is plugged in
- Wireless: good link to a base station
- FALSE - the device has no network link
- Wired: no cable plugged in
- Wireless: no base station, or bad encryption key
-
- Name: getStrength (Wireless only) Return the strength percentage of the current wireless network
- Args: (none)
- Returns: DBUS_TYPE_INT32 The strength percentage of the current wireless network
-
-
- Name: getActiveNetwork (Wireless only) Returns the Network object indentifier of the wireless network
- this device is currently associated with, if any
- Args: (none)
- Returns: DBUS_TYPE_STRING
-
-
- Name: getNetworks (Wireless only) Returns a list of Network objects this device knows about
- Args: (none)
- Returns: DBUS String Array Each item in the array is a Network object identifier
-
-
-
-The Network object
-------------------
-
-Each Device object that is of type 2 (Wireless device) keeps a list of Network objects that it knows about. Use the following constants to specify a Network object when creating DBUS method calls:
-
-DBUS Service: "org.freedesktop.NetworkManager"
-DBUS Interface: "org.freedesktop.NetworkManager.Devices"
-
-Again, note that there is no DBUS Object Path above, since the object path used for the method call will be the Network object indentifier returned from a Device object's "getActiveNetwork" or "getNetworks" methods.
-
-Methods:
-
- Name: getName Return the name of the network (ESSID)
- Args: (none)
- Returns: DBUS_TYPE_STRING
-
-
- Name: getAddress Returns the hardware address of the base station this wireless network belongs to.
- NOTE: this may change in the near future to an array of addresses.
- Args: (none)
- Returns: DBUS_TYPE_STRING
-
-
- Name: getStrength Return the strength percentage of the current wireless network
- Args: (none)
- Returns: DBUS_TYPE_INT32 The strength percentage of the current wireless network
-
-
- Name: getFrequency Returns the frequency/channel this wireless network
- Args: (none)
- Returns: DBUS_TYPE_DOUBLE A frequency in GHz (i.e. 2.417)
-
-
- Name: getRate Returns the max data rate this wireless network supports
- Args: (none)
- Returns: DBUS_TYPE_INT32 The max data rate in Mbps (i.e. 11)
-
-
- Name: getEncrypted Returns whether or not this wireless network requires encryption
- Args: (none)
- Returns: DBUS_TYPE_BOOLEAN
-
-
diff --git a/examples/python/.cvsignore b/examples/python/.cvsignore
deleted file mode 100644
index ac29597dec..0000000000
--- a/examples/python/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-NetworkManager.pyc
diff --git a/examples/python/NMTester.py b/examples/python/NMTester.py
deleted file mode 100755
index 3eb54dfcf9..0000000000
--- a/examples/python/NMTester.py
+++ /dev/null
@@ -1,44 +0,0 @@
-#!/usr/bin/python
-
-from NetworkManager import NetworkManager
-import gtk
-
-class NMTester(NetworkManager):
-
- def __init__(self):
- NetworkManager.__init__(self)
-
- for signal in self.NM_SIGNALS:
- self.nm_object.connect_to_signal(signal,
- self.nm_signal_handler)
- for signal in self.NMI_SIGNALS:
- self.nmi_object.connect_to_signal(signal,
- self.nmi_signal_handler)
- self.print_device_list()
-
- def print_device_list(self):
- d_list = self.get_devices()
- print
- print "========================================================="
- print
- for d in d_list:
- for k,v in d.iteritems():
- print "%s: %s" % (k,v)
- print
- print "========================================================="
- print
-
- def nm_signal_handler(self, interface, signal_name,
- service, path, message):
- self.print_device_list()
-
- def nmi_signal_handler(self, interface, signal_name,
- service, path, message):
- print ("Received signal '%s.%s' from object '%s%s' with message %s"
- % (interface, signal_name, service, path, message))
-
-if __name__ == "__main__":
- nmt = NMTester()
- gtk.main()
-
-
diff --git a/examples/python/NetworkManager.py b/examples/python/NetworkManager.py
deleted file mode 100755
index be26c5c4a0..0000000000
--- a/examples/python/NetworkManager.py
+++ /dev/null
@@ -1,214 +0,0 @@
-#!/usr/bin/python
-
-import dbus
-from dbus_bindings import DBusException
-
-NM_SERVICE="org.freedesktop.NetworkManager"
-NM_PATH="/org/freedesktop/NetworkManager"
-NM_INTERFACE=NM_SERVICE
-
-# i can append device names like eth0 to this path to get more info
-NM_PATH_DEVICES="/org/freedesktop/NetworkManager/Devices"
-NM_INTERFACE_DEVICES="org.freedesktop.NetworkManager.Devices"
-
-NMI_SERVICE="org.freedesktop.NetworkManagerInfo"
-NMI_PATH="/org/freedesktop/NetworkManagerInfo"
-NMI_INTERFACE=NMI_SERVICE
-
-HAL_SERVICE="org.freedesktop.Hal"
-HAL_PATH="/org/freedesktop/Hal/Manager"
-HAL_INTERFACE="org.freedesktop.Hal.Manager"
-HAL_INTERFACE_DEVICE="org.freedesktop.Hal.Device"
-
-class NetworkManager:
- WIRED_DEVICE = 1
- WIRELESS_DEVICE = 2
-
- CONNECTED = "connected"
- CONNECTING = "connecting"
- DISCONNECTED = "disconnected"
-
- NM_SIGNALS = [ "DeviceNoLongerActive",
- "DeviceNowActive",
- "DeviceActivating",
- "DevicesChanged",
- "DeviceIP4AddressChange",
- "WirelessNetworkDisappeared",
- "WirelessNetworkAppeared"
- ]
-
- NMI_SIGNALS = [ "TrustedNetworkUpdate",
- "PreferredNetworkUpdate"
- ]
-
- def __init__(self):
- self.__init_dbus__()
-
- # dictionary of devices
- self.__devices = {}
-
- def __init_dbus__(self):
- try:
- self._bus = dbus.SystemBus()
- try:
- self._nm_service = self._bus.get_service(NM_SERVICE)
- self.nm_object = self._nm_service.get_object(NM_PATH,
- NM_INTERFACE)
- except Exception, e:
- print "Counldn't get the %s service" % NM_SERVICE
- print e
-
- try:
- self._nmi_service = self._bus.get_service(NMI_SERVICE)
- self.nmi_object = self._nmi_service.get_object(NMI_PATH,
- NMI_INTERFACE)
- except Exception, e:
- print "Counldn't get the %s service" % NMI_SERVICE
- print e
-
- try:
- self._hal_service = self._bus.get_service(HAL_SERVICE)
- self._hal_manager = self._hal_service.get_object(HAL_PATH,
- HAL_INTERFACE)
- except Exception, e:
- print "Counldn't get the %s service" % HAL_SERVICE
- print e
-
- except Exception, e:
- print e
-
- """
- returns dictionary of the active device information
- if device does not exist returns get_device failure method
- """
- def get_active_device(self):
- active_device = self.nm_object.getActiveDevice()
- return self.get_device(active_device)
-
- """
- pass device string /org/freedesktop/NetworkManager/Device/eth0
- returns dictionary of device information
- if device does not exist returns None
- """
- def get_device(self, device):
- try:
- nm_dev_obj = self._nm_service.get_object(device,
- NM_INTERFACE_DEVICES)
- d = {}
- d["nm.device"] = device
- d["nm.name"] = nm_dev_obj.getName(device)
- d["nm.type"] = nm_dev_obj.getType(device)
- d["nm.udi"] = nm_dev_obj.getHalUdi(device)
- d["nm.ip4"] = nm_dev_obj.getIP4Address(device)
- d["nm.link_active"] = nm_dev_obj.getLinkActive(device)
-
- try:
- d["nm.active_network"] = nm_dev_obj.getActiveNetwork(device)
- d["nm.strength"] = nm_dev_obj.getStrength(device)
- except DBusException, e:
- pass
-
- try:
- d["nm.networks"] = {}
- networks = nm_dev_obj.getNetworks(device)
- for network in networks:
- nm_network_object = self._nm_service.get_object(network,
- NM_INTERFACE_DEVICES)
- n = {}
- n["network"] = network
- n["name"] = nm_network_object.getName()
- n["address"] = nm_network_object.getAddress()
- n["strength"] = nm_network_object.getStrength()
- n["frequency"] = nm_network_object.getFrequency()
- n["rate"] = nm_network_object.getRate()
- n["encrypted"] = nm_network_object.getEncrypted()
-
- d["nm.networks"][network] = n
-
- except DBusException, e:
- pass
-
- active_device = self.nm_object.getActiveDevice()
-
- if device == active_device:
- d["nm.status"] = self.nm_object.status()
- else:
- d["nm.status"] = self.DISCONNECTED
-
- # we already have this device cached, so just update the status
- if device in self.__devices:
- for k,v in d.iteritems():
- self.__devices[device][k] = v
- # it's a new device so get the info from HAL
- else:
- hal = self._get_hal_info(d["nm.udi"])
- for k,v in hal.iteritems():
- d[k] = v
- self.__devices[device] = d
-
- return self.__devices[device]
-
- except Exception, e:
- print e
- return None
-
- """
- Returns list of dictionary objects of all active devices
- Returns empty list if no active devices
- """
- def get_devices(self):
-
- active_devices = self.nm_object.getDevices()
- devices = []
-
- for device in active_devices:
- devices.append(self.get_device(device))
-
- return devices
-
- """
- Returns list of dictionary objects of all devices active or not
- Returns empty list if no active devices
- """
- def get_all_devices(self):
- return self.__devices.values()
-
- def has_type_device (self, type):
- for device in self.get_devices():
- if device["nm.type"] == type:
- return True
- return False
-
- def number_device_types(self, type):
- count = 0
- for device in self.get_devices():
- if device["nm.type"] == type:
- count = count + 1
- return count
-
- def number_wired_devices(self):
- return self.number_device_types(self.WIRED_DEVICE)
-
- def number_wireless_devices(self):
- return self.number_device_types(self.WIRELESS_DEVICE)
-
- def has_wired_device(self):
- return self.has_type_device(self.WIRED_DEVICE)
-
- def has_wireless_device(self):
- return self.has_type_device(self.WIRELESS_DEVICE)
-
- def _get_hal_info(self, udi):
- hal_devices = self._hal_manager.FindDeviceStringMatch("info.udi",
- udi)
- for hal_device in hal_devices:
- device_dbus_obj = self._hal_service.get_object(hal_device,
- HAL_INTERFACE_DEVICE)
- properties = device_dbus_obj.GetAllProperties()
- return properties
-
-if __name__ == "__main__":
- nm = NetworkManager()
-
-
-
diff --git a/examples/python/README b/examples/python/README
deleted file mode 100644
index 7ab5478f96..0000000000
--- a/examples/python/README
+++ /dev/null
@@ -1,21 +0,0 @@
-Python Examples
-
-You'll need equivalent versions of these packages in order to run most of these examples.
-
-hal-0.2.97.cvs20040823
-dbus-0.22-4
-pygtk2-2.3.96-2
-python-2.3.4-8
-gnome-python2-2.0.2-1
-
-
-NMTester.py
-===============================================================================
-
-This is a simple command line program that sub classes the NetworkManager class. The tester prints out the network devices objects that are returned from the NetworkManager class. The code hangs in the gtk.main() loop once run and will listen for any events from the NetworkManager
-
-
-NetworkManager.py
-===============================================================================
-This object hooks into the NetworkManger and HAL service through D-BUS. The get_device_list code will return a python list [] of dictionary objects representing the devices that the NetworkManger services is aware of.
-
diff --git a/examples/python/systray/.cvsignore b/examples/python/systray/.cvsignore
deleted file mode 100644
index 4f2f17a1ff..0000000000
--- a/examples/python/systray/.cvsignore
+++ /dev/null
@@ -1,4 +0,0 @@
-NetworkManager.pyc
-config.h
-trayicon.c
-trayicon.defs
diff --git a/examples/python/systray/Makefile b/examples/python/systray/Makefile
deleted file mode 100644
index c7d31cf3a3..0000000000
--- a/examples/python/systray/Makefile
+++ /dev/null
@@ -1,34 +0,0 @@
-# Set the C flags to include the GTK+ and Python libraries
-CFLAGS = `pkg-config --cflags gtk+-2.0 pygtk-2.0` -I/usr/include/python2.3/ -I.
-LDFLAGS = `pkg-config --libs gtk+-2.0 pygtk-2.0`
-
-# Build the shared object
-trayicon.so: trayicon.o eggtrayicon.o trayiconmodule.o
- $(CC) $(LDFLAGS) -shared $^ -o $@
-
-
-# The path to the GTK+ python types
-DEFS=`pkg-config --variable=defsdir pygtk-2.0`
-
-# Generate the C wrapper from the defs and our override file
-trayicon.c: trayicon.defs trayicon.override
- pygtk-codegen-2.0 --prefix trayicon \
- --register $(DEFS)/gdk-types.defs \
- --register $(DEFS)/gtk-types.defs \
- --override trayicon.override \
- trayicon.defs > $@
-
-trayicon.defs: eggtrayicon.h config.h
- python \
- /usr/share/pygtk/2.0/codegen/h2def.py \
- eggtrayicon.h > trayicon.defs
-
-config.h:
- touch config.h
- ln -s ../NetworkManager.py .
-
-# A rule to clean the generated files
-clean:
- rm -f trayicon.so *.o trayicon.c trayicon.defs *~ config.h NetworkManager.py*
-
-.PHONY: clean
diff --git a/examples/python/systray/eggtrayicon.c b/examples/python/systray/eggtrayicon.c
deleted file mode 100644
index ddc47d4a33..0000000000
--- a/examples/python/systray/eggtrayicon.c
+++ /dev/null
@@ -1,473 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* eggtrayicon.c
- * Copyright (C) 2002 Anders Carlsson <andersca@gnu.org>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-#include <config.h>
-#include <string.h>
-#include <libintl.h>
-
-#include "eggtrayicon.h"
-
-#include <gdk/gdkx.h>
-#include <X11/Xatom.h>
-
-#define _(x) x
-#define N_(x) x
-
-#define SYSTEM_TRAY_REQUEST_DOCK 0
-#define SYSTEM_TRAY_BEGIN_MESSAGE 1
-#define SYSTEM_TRAY_CANCEL_MESSAGE 2
-
-#define SYSTEM_TRAY_ORIENTATION_HORZ 0
-#define SYSTEM_TRAY_ORIENTATION_VERT 1
-
-enum {
- PROP_0,
- PROP_ORIENTATION
-};
-
-static GtkPlugClass *parent_class = NULL;
-
-static void egg_tray_icon_init (EggTrayIcon *icon);
-static void egg_tray_icon_class_init (EggTrayIconClass *klass);
-
-static void egg_tray_icon_get_property (GObject *object,
- guint prop_id,
- GValue *value,
- GParamSpec *pspec);
-
-static void egg_tray_icon_realize (GtkWidget *widget);
-static void egg_tray_icon_unrealize (GtkWidget *widget);
-
-static void egg_tray_icon_update_manager_window (EggTrayIcon *icon);
-
-GType
-egg_tray_icon_get_type (void)
-{
- static GType our_type = 0;
-
- if (our_type == 0)
- {
- static const GTypeInfo our_info =
- {
- sizeof (EggTrayIconClass),
- (GBaseInitFunc) NULL,
- (GBaseFinalizeFunc) NULL,
- (GClassInitFunc) egg_tray_icon_class_init,
- NULL, /* class_finalize */
- NULL, /* class_data */
- sizeof (EggTrayIcon),
- 0, /* n_preallocs */
- (GInstanceInitFunc) egg_tray_icon_init
- };
-
- our_type = g_type_register_static (GTK_TYPE_PLUG, "EggTrayIcon", &our_info, 0);
- }
-
- return our_type;
-}
-
-static void
-egg_tray_icon_init (EggTrayIcon *icon)
-{
- icon->stamp = 1;
- icon->orientation = GTK_ORIENTATION_HORIZONTAL;
-
- gtk_widget_add_events (GTK_WIDGET (icon), GDK_PROPERTY_CHANGE_MASK);
-}
-
-static void
-egg_tray_icon_class_init (EggTrayIconClass *klass)
-{
- GObjectClass *gobject_class = (GObjectClass *)klass;
- GtkWidgetClass *widget_class = (GtkWidgetClass *)klass;
-
- parent_class = g_type_class_peek_parent (klass);
-
- gobject_class->get_property = egg_tray_icon_get_property;
-
- widget_class->realize = egg_tray_icon_realize;
- widget_class->unrealize = egg_tray_icon_unrealize;
-
- g_object_class_install_property (gobject_class,
- PROP_ORIENTATION,
- g_param_spec_enum ("orientation",
- _("Orientation"),
- _("The orientation of the tray."),
- GTK_TYPE_ORIENTATION,
- GTK_ORIENTATION_HORIZONTAL,
- G_PARAM_READABLE));
-}
-
-static void
-egg_tray_icon_get_property (GObject *object,
- guint prop_id,
- GValue *value,
- GParamSpec *pspec)
-{
- EggTrayIcon *icon = EGG_TRAY_ICON (object);
-
- switch (prop_id)
- {
- case PROP_ORIENTATION:
- g_value_set_enum (value, icon->orientation);
- break;
- default:
- G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
- break;
- }
-}
-
-static void
-egg_tray_icon_get_orientation_property (EggTrayIcon *icon)
-{
- Display *xdisplay;
- Atom type;
- int format;
- union {
- gulong *prop;
- guchar *prop_ch;
- } prop = { NULL };
- gulong nitems;
- gulong bytes_after;
- int error, result;
-
- g_assert (icon->manager_window != None);
-
- xdisplay = GDK_DISPLAY_XDISPLAY (gtk_widget_get_display (GTK_WIDGET (icon)));
-
- gdk_error_trap_push ();
- type = None;
- result = XGetWindowProperty (xdisplay,
- icon->manager_window,
- icon->orientation_atom,
- 0, G_MAXLONG, FALSE,
- XA_CARDINAL,
- &type, &format, &nitems,
- &bytes_after, &(prop.prop_ch));
- error = gdk_error_trap_pop ();
-
- if (error || result != Success)
- return;
-
- if (type == XA_CARDINAL)
- {
- GtkOrientation orientation;
-
- orientation = (prop.prop [0] == SYSTEM_TRAY_ORIENTATION_HORZ) ?
- GTK_ORIENTATION_HORIZONTAL :
- GTK_ORIENTATION_VERTICAL;
-
- if (icon->orientation != orientation)
- {
- icon->orientation = orientation;
-
- g_object_notify (G_OBJECT (icon), "orientation");
- }
- }
-
- if (prop.prop)
- XFree (prop.prop);
-}
-
-static GdkFilterReturn
-egg_tray_icon_manager_filter (GdkXEvent *xevent, GdkEvent *event, gpointer user_data)
-{
- EggTrayIcon *icon = user_data;
- XEvent *xev = (XEvent *)xevent;
-
- if (xev->xany.type == ClientMessage &&
- xev->xclient.message_type == icon->manager_atom &&
- xev->xclient.data.l[1] == icon->selection_atom)
- {
- egg_tray_icon_update_manager_window (icon);
- }
- else if (xev->xany.window == icon->manager_window)
- {
- if (xev->xany.type == PropertyNotify &&
- xev->xproperty.atom == icon->orientation_atom)
- {
- egg_tray_icon_get_orientation_property (icon);
- }
- if (xev->xany.type == DestroyNotify)
- {
- egg_tray_icon_update_manager_window (icon);
- }
- }
-
- return GDK_FILTER_CONTINUE;
-}
-
-static void
-egg_tray_icon_unrealize (GtkWidget *widget)
-{
- EggTrayIcon *icon = EGG_TRAY_ICON (widget);
- GdkWindow *root_window;
-
- if (icon->manager_window != None)
- {
- GdkWindow *gdkwin;
-
- gdkwin = gdk_window_lookup_for_display (gtk_widget_get_display (widget),
- icon->manager_window);
-
- gdk_window_remove_filter (gdkwin, egg_tray_icon_manager_filter, icon);
- }
-
- root_window = gdk_screen_get_root_window (gtk_widget_get_screen (widget));
-
- gdk_window_remove_filter (root_window, egg_tray_icon_manager_filter, icon);
-
- if (GTK_WIDGET_CLASS (parent_class)->unrealize)
- (* GTK_WIDGET_CLASS (parent_class)->unrealize) (widget);
-}
-
-static void
-egg_tray_icon_send_manager_message (EggTrayIcon *icon,
- long message,
- Window window,
- long data1,
- long data2,
- long data3)
-{
- XClientMessageEvent ev;
- Display *display;
-
- ev.type = ClientMessage;
- ev.window = window;
- ev.message_type = icon->system_tray_opcode_atom;
- ev.format = 32;
- ev.data.l[0] = gdk_x11_get_server_time (GTK_WIDGET (icon)->window);
- ev.data.l[1] = message;
- ev.data.l[2] = data1;
- ev.data.l[3] = data2;
- ev.data.l[4] = data3;
-
- display = GDK_DISPLAY_XDISPLAY (gtk_widget_get_display (GTK_WIDGET (icon)));
-
- gdk_error_trap_push ();
- XSendEvent (display,
- icon->manager_window, False, NoEventMask, (XEvent *)&ev);
- XSync (display, False);
- gdk_error_trap_pop ();
-}
-
-static void
-egg_tray_icon_send_dock_request (EggTrayIcon *icon)
-{
- egg_tray_icon_send_manager_message (icon,
- SYSTEM_TRAY_REQUEST_DOCK,
- icon->manager_window,
- gtk_plug_get_id (GTK_PLUG (icon)),
- 0, 0);
-}
-
-static void
-egg_tray_icon_update_manager_window (EggTrayIcon *icon)
-{
- Display *xdisplay;
-
- xdisplay = GDK_DISPLAY_XDISPLAY (gtk_widget_get_display (GTK_WIDGET (icon)));
-
- if (icon->manager_window != None)
- {
- GdkWindow *gdkwin;
-
- gdkwin = gdk_window_lookup_for_display (gtk_widget_get_display (GTK_WIDGET (icon)),
- icon->manager_window);
-
- gdk_window_remove_filter (gdkwin, egg_tray_icon_manager_filter, icon);
- }
-
- XGrabServer (xdisplay);
-
- icon->manager_window = XGetSelectionOwner (xdisplay,
- icon->selection_atom);
-
- if (icon->manager_window != None)
- XSelectInput (xdisplay,
- icon->manager_window, StructureNotifyMask|PropertyChangeMask);
-
- XUngrabServer (xdisplay);
- XFlush (xdisplay);
-
- if (icon->manager_window != None)
- {
- GdkWindow *gdkwin;
-
- gdkwin = gdk_window_lookup_for_display (gtk_widget_get_display (GTK_WIDGET (icon)),
- icon->manager_window);
-
- gdk_window_add_filter (gdkwin, egg_tray_icon_manager_filter, icon);
-
- /* Send a request that we'd like to dock */
- egg_tray_icon_send_dock_request (icon);
-
- egg_tray_icon_get_orientation_property (icon);
- }
-}
-
-static void
-egg_tray_icon_realize (GtkWidget *widget)
-{
- EggTrayIcon *icon = EGG_TRAY_ICON (widget);
- GdkScreen *screen;
- GdkDisplay *display;
- Display *xdisplay;
- char buffer[256];
- GdkWindow *root_window;
-
- if (GTK_WIDGET_CLASS (parent_class)->realize)
- GTK_WIDGET_CLASS (parent_class)->realize (widget);
-
- screen = gtk_widget_get_screen (widget);
- display = gdk_screen_get_display (screen);
- xdisplay = gdk_x11_display_get_xdisplay (display);
-
- /* Now see if there's a manager window around */
- g_snprintf (buffer, sizeof (buffer),
- "_NET_SYSTEM_TRAY_S%d",
- gdk_screen_get_number (screen));
-
- icon->selection_atom = XInternAtom (xdisplay, buffer, False);
-
- icon->manager_atom = XInternAtom (xdisplay, "MANAGER", False);
-
- icon->system_tray_opcode_atom = XInternAtom (xdisplay,
- "_NET_SYSTEM_TRAY_OPCODE",
- False);
-
- icon->orientation_atom = XInternAtom (xdisplay,
- "_NET_SYSTEM_TRAY_ORIENTATION",
- False);
-
- egg_tray_icon_update_manager_window (icon);
-
- root_window = gdk_screen_get_root_window (screen);
-
- /* Add a root window filter so that we get changes on MANAGER */
- gdk_window_add_filter (root_window,
- egg_tray_icon_manager_filter, icon);
-}
-
-EggTrayIcon *
-egg_tray_icon_new_for_xscreen (Screen *xscreen, const char *name)
-{
- GdkDisplay *display;
- GdkScreen *screen;
-
- display = gdk_x11_lookup_xdisplay (DisplayOfScreen (xscreen));
- screen = gdk_display_get_screen (display, XScreenNumberOfScreen (xscreen));
-
- return egg_tray_icon_new_for_screen (screen, name);
-}
-
-EggTrayIcon *
-egg_tray_icon_new_for_screen (GdkScreen *screen, const char *name)
-{
- g_return_val_if_fail (GDK_IS_SCREEN (screen), NULL);
-
- return g_object_new (EGG_TYPE_TRAY_ICON, "screen", screen, "title", name, NULL);
-}
-
-EggTrayIcon*
-egg_tray_icon_new (const gchar *name)
-{
- return g_object_new (EGG_TYPE_TRAY_ICON, "title", name, NULL);
-}
-
-guint
-egg_tray_icon_send_message (EggTrayIcon *icon,
- gint timeout,
- const gchar *message,
- gint len)
-{
- guint stamp;
-
- g_return_val_if_fail (EGG_IS_TRAY_ICON (icon), 0);
- g_return_val_if_fail (timeout >= 0, 0);
- g_return_val_if_fail (message != NULL, 0);
-
- if (icon->manager_window == None)
- return 0;
-
- if (len < 0)
- len = strlen (message);
-
- stamp = icon->stamp++;
-
- /* Get ready to send the message */
- egg_tray_icon_send_manager_message (icon, SYSTEM_TRAY_BEGIN_MESSAGE,
- (Window)gtk_plug_get_id (GTK_PLUG (icon)),
- timeout, len, stamp);
-
- /* Now to send the actual message */
- gdk_error_trap_push ();
- while (len > 0)
- {
- XClientMessageEvent ev;
- Display *xdisplay;
-
- xdisplay = GDK_DISPLAY_XDISPLAY (gtk_widget_get_display (GTK_WIDGET (icon)));
-
- ev.type = ClientMessage;
- ev.window = (Window)gtk_plug_get_id (GTK_PLUG (icon));
- ev.format = 8;
- ev.message_type = XInternAtom (xdisplay,
- "_NET_SYSTEM_TRAY_MESSAGE_DATA", False);
- if (len > 20)
- {
- memcpy (&ev.data, message, 20);
- len -= 20;
- message += 20;
- }
- else
- {
- memcpy (&ev.data, message, len);
- len = 0;
- }
-
- XSendEvent (xdisplay,
- icon->manager_window, False, StructureNotifyMask, (XEvent *)&ev);
- XSync (xdisplay, False);
- }
- gdk_error_trap_pop ();
-
- return stamp;
-}
-
-void
-egg_tray_icon_cancel_message (EggTrayIcon *icon,
- guint id)
-{
- g_return_if_fail (EGG_IS_TRAY_ICON (icon));
- g_return_if_fail (id > 0);
-
- egg_tray_icon_send_manager_message (icon, SYSTEM_TRAY_CANCEL_MESSAGE,
- (Window)gtk_plug_get_id (GTK_PLUG (icon)),
- id, 0, 0);
-}
-
-GtkOrientation
-egg_tray_icon_get_orientation (EggTrayIcon *icon)
-{
- g_return_val_if_fail (EGG_IS_TRAY_ICON (icon), GTK_ORIENTATION_HORIZONTAL);
-
- return icon->orientation;
-}
diff --git a/examples/python/systray/eggtrayicon.h b/examples/python/systray/eggtrayicon.h
deleted file mode 100644
index 007f4c18e9..0000000000
--- a/examples/python/systray/eggtrayicon.h
+++ /dev/null
@@ -1,77 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* eggtrayicon.h
- * Copyright (C) 2002 Anders Carlsson <andersca@gnu.org>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-#ifndef __EGG_TRAY_ICON_H__
-#define __EGG_TRAY_ICON_H__
-
-#include <gtk/gtkplug.h>
-#include <gdk/gdkx.h>
-
-G_BEGIN_DECLS
-
-#define EGG_TYPE_TRAY_ICON (egg_tray_icon_get_type ())
-#define EGG_TRAY_ICON(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), EGG_TYPE_TRAY_ICON, EggTrayIcon))
-#define EGG_TRAY_ICON_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), EGG_TYPE_TRAY_ICON, EggTrayIconClass))
-#define EGG_IS_TRAY_ICON(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), EGG_TYPE_TRAY_ICON))
-#define EGG_IS_TRAY_ICON_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), EGG_TYPE_TRAY_ICON))
-#define EGG_TRAY_ICON_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), EGG_TYPE_TRAY_ICON, EggTrayIconClass))
-
-typedef struct _EggTrayIcon EggTrayIcon;
-typedef struct _EggTrayIconClass EggTrayIconClass;
-
-struct _EggTrayIcon
-{
- GtkPlug parent_instance;
-
- guint stamp;
-
- Atom selection_atom;
- Atom manager_atom;
- Atom system_tray_opcode_atom;
- Atom orientation_atom;
- Window manager_window;
-
- GtkOrientation orientation;
-};
-
-struct _EggTrayIconClass
-{
- GtkPlugClass parent_class;
-};
-
-GType egg_tray_icon_get_type (void);
-
-EggTrayIcon *egg_tray_icon_new_for_screen (GdkScreen *screen,
- const gchar *name);
-
-EggTrayIcon *egg_tray_icon_new (const gchar *name);
-
-guint egg_tray_icon_send_message (EggTrayIcon *icon,
- gint timeout,
- const char *message,
- gint len);
-void egg_tray_icon_cancel_message (EggTrayIcon *icon,
- guint id);
-
-GtkOrientation egg_tray_icon_get_orientation (EggTrayIcon *icon);
-
-G_END_DECLS
-
-#endif /* __EGG_TRAY_ICON_H__ */
diff --git a/examples/python/systray/network_tray.py b/examples/python/systray/network_tray.py
deleted file mode 100755
index 946e2ffcd9..0000000000
--- a/examples/python/systray/network_tray.py
+++ /dev/null
@@ -1,327 +0,0 @@
-#! /usr/bin/python
-import pygtk; pygtk.require("2.0")
-import gtk
-import gtk.gdk
-
-try:
- import trayicon
- from NetworkManager import NetworkManager
-except ImportError, e:
- print e
- print "type 'make' make the necessary modules to run this example"
- import sys
- sys.exit(1)
-
-
-class network_tray:
-
- def __init__(self):
- self._make_menu()
- self._make_tray()
-
- self._nm = NetworkManager()
- for signal in self._nm.NM_SIGNALS:
- self._nm.nm_object.connect_to_signal(signal,
- self._network_event)
-
- self._network_event(None, None, None,None,None)
-
- def _wired_network_cb(self, menuitem, event, device_name):
- return
- print menuitem, event, device_name
- try:
- self._nm.nm_object.setActiveDevice(device_name)
- except Exception, e:
- print e
-
- def _wireless_network_cb(self, menuitem, event, device_name, network_name):
- return
- print menuitem, event, device_name, network_name
- try:
- self._nm.nm_object.setActiveDevice(device_name, network_name)
- except Exception, e:
- print e
-
- def _add_separator_item(self):
- sep = gtk.SeparatorMenuItem()
- sep.show()
- self._menu.append(sep)
-
- def _add_label_item(self, label):
- menuitem = gtk.MenuItem()
- menuitem.set_sensitive(gtk.FALSE)
- gtklabel = gtk.Label()
-
- gtklabel.set_markup("<span size=\"small\" foreground=\"#aaaaaa\" weight=\"ultralight\">%s</span>" % label)
- gtklabel.set_selectable(gtk.FALSE)
- hbox = gtk.HBox(homogeneous=gtk.TRUE, spacing=6)
- hbox.pack_end(gtklabel,expand=gtk.TRUE, fill=gtk.TRUE, padding=0)
- menuitem.add(hbox)
- self._menu.append(menuitem)
- menuitem.show_all()
-
- def _add_other_wireless_item(self):
- menuitem = gtk.MenuItem()
- menuitem.set_sensitive(gtk.TRUE)
- gtklabel = gtk.Label()
- gtklabel.set_alignment(0,0)
- gtklabel.set_label("Other Wireless Networks...")
- hbox = gtk.HBox(homogeneous=gtk.TRUE, spacing=6)
- hbox.pack_end(gtklabel,expand=gtk.TRUE, fill=gtk.TRUE, padding=6)
- menuitem.add(hbox)
- tt = "Add a wireless network that does not appear on the list"
- self._tooltips.set_tip(menuitem,tt)
- self._menu.append(menuitem)
- menuitem.show_all()
-
- def _add_wired_device_menu_item(self, device):
- menuitem = gtk.RadioMenuItem(group=self.__radio_group)
- if self._is_active(device):
- menuitem.set_active(1)
-
- menuitem.connect("button-press-event",self._wired_network_cb,
- device["nm.device"])
-
- hbox = gtk.HBox(homogeneous=gtk.FALSE, spacing=6)
- hbox.pack_start(self._get_icon(device), expand=gtk.FALSE, fill=gtk.FALSE, padding=6)
- label = gtk.Label()
- label.set_justify(gtk.JUSTIFY_LEFT)
- label.set_text(self._get_device_name(device))
- hbox.pack_start(label, expand=gtk.FALSE, fill=gtk.FALSE, padding=6)
- menuitem.add(hbox)
- hbox.show()
- self._menu.append(menuitem)
- try:
- tt = "IP: %d\nProduct Name: %s\nVendor: %s\nDevice Name: %s" % (device["nm.ip4"], device["pci.product"], device["info.vendor"], device["nm.name"] )
- self._tooltips.set_tip(menuitem,tt)
- except:
- pass
- menuitem.show_all()
-
- def _add_wireless_device_menu_item(self, device, generic=gtk.FALSE):
- menuitem = gtk.MenuItem()
-
- hbox = gtk.HBox(homogeneous=gtk.FALSE, spacing=6)
- hbox.pack_start(self._get_icon(device), expand=gtk.FALSE, fill=gtk.FALSE, padding=6)
- label = gtk.Label()
- label.set_justify(gtk.JUSTIFY_LEFT)
- label.set_markup("<span foreground=\"#aaaaaa\">%s</span>" % self._get_device_name(device))
- label.set_selectable(gtk.FALSE)
- hbox.pack_start(label, expand=gtk.FALSE, fill=gtk.FALSE, padding=6)
- menuitem.add(hbox)
- hbox.show()
- self._menu.append(menuitem)
- try:
- tt = "IP: %d\nProduct Name: %s\nVendor: %s\nDevice Name: %s" % (device["nm.ip4"], device["pci.product"], device["info.vendor"], device["nm.name"] )
- self._tooltips.set_tip(menuitem,tt)
- except:
- pass
- menuitem.show_all()
-
- def _add_vpn_menu_item(self):
- menuitem = gtk.CheckMenuItem()
-
- hbox = gtk.HBox(homogeneous=gtk.FALSE, spacing=6)
- hbox.pack_start(self._get_vpn_icon(), expand=gtk.FALSE, fill=gtk.FALSE, padding=6)
- label = gtk.Label()
- label.set_justify(gtk.JUSTIFY_LEFT)
- label.set_text("Virtual Private Network")
- hbox.pack_start(label, expand=gtk.FALSE, fill=gtk.FALSE, padding=6)
- menuitem.add(hbox)
- hbox.show()
- self._menu.append(menuitem)
- tt = "Use a Virtual Private Network to securely connect to your companies internal system"
- self._tooltips.set_tip(menuitem,tt)
- menuitem.show_all()
-
- def _add_network_menu_item(self, device, network, active_network):
- menuitem = gtk.RadioMenuItem(group=self.__radio_group)
- menuitem.set_right_justified(gtk.FALSE)
- if active_network == gtk.TRUE:
- menuitem.set_active(1)
-
- hbox = gtk.HBox(homogeneous=gtk.FALSE, spacing=6)
- menuitem.add(hbox)
- label = gtk.Label(network["name"])
- label.set_alignment(0.1,0.5)
- label.show()
- hbox.pack_start(label,expand=gtk.TRUE, fill=gtk.TRUE)
- progress = gtk.ProgressBar()
- progress.set_orientation(gtk.PROGRESS_LEFT_TO_RIGHT)
- strength = float(network["strength"] * .01)
- progress.set_fraction(strength)
-# progress.set_text("%s%%" % int(strength*100))
- progress.show()
- hbox.pack_start(progress, expand=gtk.FALSE, fill=gtk.FALSE)
- icon = self._get_encrypted_icon()
- if network["encrypted"] == 1:
- icon.hide()
- hbox.pack_start(icon,expand=gtk.FALSE, fill=gtk.FALSE)
- else:
- icon.show()
-
- hbox.show()
- self._menu.append(menuitem)
- tt = "Name: %s\nEncrypted: %d\nRate: %d\nFrequency: %f\nAddress: %s\nStrength: %1.2f" % (network['name'], network['encrypted'], network['rate'],network['frequency'], network['address'], strength)
- self._tooltips.set_tip(menuitem,tt)
- menuitem.connect("button-press-event", self._wireless_network_cb,
- device["nm.device"], network["network"])
- menuitem.show()
-
- def _get_device_name(self, device):
-
- if self._is_wireless(device):
- try:
- if self._nm.number_wireless_devices() > 1:
- return device["pci.subsys_vendor"]
- else:
- return "Wireless Network"
- except:
- return "Wireless PCMCIA Card"
- else:
- try:
- if self._nm.number_wired_devices() > 1:
- return device["info.product"]
- except:
- pass
- return "Wired Network"
-
- def _is_wireless(self,dev):
- if dev["nm.type"] == self._nm.WIRELESS_DEVICE:
- return gtk.TRUE
- return gtk.FALSE
-
- def _is_active(self, dev):
- try:
- if dev["nm.link_active"] == 1:
- return gtk.TRUE
- except:
- return gtk.FALSE
-
- def _network_event(self, interface, signal_name,
- service, path, message):
-
- for child in self._menu.get_children():
- self._menu.remove(child)
-
- devices = self._nm.get_devices()
- active_device = self._nm.get_active_device()
-
- def sort_devs(x, y):
- if x["nm.type"] > y["nm.type"]:
- return 1
- elif x["nm.type"] < y["nm.type"]:
- return -1
- elif x["nm.link_active"] > y["nm.link_active"]:
- return 1
- elif x["nm.link_active"] < y["nm.link_active"]:
- return -1
- return 0
-
- def sort_networks(x, y):
- if x.lower() < y.lower():
- return 1
- return -1
-
- type = 0
- devices.sort(sort_devs)
- for device in devices:
-
- if self._is_wireless(device):
- type = device["nm.type"]
- if self._nm.number_wireless_devices() > 1:
- self._add_wireless_device_menu_item(device)
- else:
- self._add_wireless_device_menu_item(device, gtk.FALSE)
-
- device["nm.networks"].keys().sort(sort_networks)
- for name, network in device["nm.networks"].iteritems():
- try:
- if device["nm.active_network"] == name:
- active_network = gtk.TRUE
- else:
- active_network = gtk.FALSE
- except:
- active_network = gtk.FALSE
- self._add_network_menu_item(device,network,active_network)
-
- else:
- if type == self._nm.WIRELESS_DEVICE:
- self._add_separator_item()
- self._add_wired_device_menu_item(device)
-
-
- self._add_other_wireless_item()
-# self._add_vpn_menu_item()
-
- self._current_icon = self._get_icon(active_device)
-
- self._current_icon.show()
- self._top_level_menu.show()
-
- def _get_encrypted_icon(self):
- pb = gtk.gdk.pixbuf_new_from_file("/usr/share/icons/hicolor/16x16/stock/generic/stock_keyring.png")
- pb = pb.scale_simple(16,16,gtk.gdk.INTERP_NEAREST)
- _keyring = gtk.Image()
- _keyring.set_from_pixbuf(pb)
- return _keyring
-
- def _get_vpn_icon(self):
- return self._get_encrypted_icon()
-
- def _get_icon(self, active_device):
-
- if active_device:
- if active_device["nm.type"] == self._nm.WIRED_DEVICE:
- pb = gtk.gdk.pixbuf_new_from_file("../../../panel-applet/icons/nm-device-wired.png")
- pb = pb.scale_simple(16,16,gtk.gdk.INTERP_NEAREST)
- _wired_icon = gtk.Image()
- _wired_icon.set_from_pixbuf(pb)
- return _wired_icon
- elif active_device["nm.type"] == self._nm.WIRELESS_DEVICE:
- pb = gtk.gdk.pixbuf_new_from_file("../../../panel-applet/icons/nm-device-wireless.png")
- pb = pb.scale_simple(16,16,gtk.gdk.INTERP_NEAREST)
- _wireless_icon = gtk.Image()
- _wireless_icon.set_from_pixbuf(pb)
- return _wireless_icon
- else:
- pb = gtk.gdk.pixbuf_new_from_file("../../../panel-applet/icons/nm-device-wireless.png")
- pb = pb.scale_simple(16,16,gtk.gdk.INTERP_NEAREST)
- _nothing_icon = gtk.Image()
- _nothing_icon.set_from_pixbuf(pb)
- return _nothing_icon
-
-
- def _make_tray(self):
- self._tray = trayicon.TrayIcon("NetworkManager")
-
- self._tooltips = gtk.Tooltips()
- tooltip = "Getting Network Information"
- self._tooltips.set_tip(self._menu,tooltip)
-
- self._tray.add(self._menu_bar)
- self._tray.show()
-
- def _make_menu(self):
- self._menu_bar = gtk.MenuBar()
-
- self._top_level_menu = gtk.MenuItem()
- self._menu_bar.append(self._top_level_menu)
-
- self._menu = gtk.Menu()
- self._top_level_menu.set_submenu(self._menu)
-
- self._current_icon = self._get_icon(None)
- self._current_icon.show()
-
- self._top_level_menu.add(self._current_icon)
- self._menu_bar.show()
- self._top_level_menu.show()
- self._menu.show()
-
- self.__radio_group = gtk.RadioMenuItem()
-
-
-if __name__ == "__main__":
- nt = network_tray()
- gtk.main()
diff --git a/examples/python/systray/trayicon.override b/examples/python/systray/trayicon.override
deleted file mode 100644
index 6752c2850a..0000000000
--- a/examples/python/systray/trayicon.override
+++ /dev/null
@@ -1,29 +0,0 @@
-/* -*- Mode: C; c-basic-offset: 4 -*- */
-%%
-headers
-#include <Python.h>
-
-#include "pygobject.h"
-#include "eggtrayicon.h"
-%%
-modulename trayicon
-%%
-import gtk.Plug as PyGtkPlug_Type
-import gtk.gdk.Screen as PyGdkScreen_Type
-%%
-ignore-glob
- *_get_type
-%%
-override egg_tray_icon_send_message kwargs
-static PyObject*
-_wrap_egg_tray_icon_send_message(PyGObject *self, PyObject *args, PyObject *kwargs)
-{
- static char *kwlist[] = {"timeout", "message", NULL};
- int timeout, len, ret;
- char *message;
-
- if (!PyArg_ParseTupleAndKeywords(args, kwargs, "is#:TrayIcon.send_message", kwlist, &timeout, &message, &len))
- return NULL;
- ret = egg_tray_icon_send_message(EGG_TRAY_ICON(self->obj), timeout, message, len);
- return PyInt_FromLong(ret);
-}
diff --git a/examples/python/systray/trayiconmodule.c b/examples/python/systray/trayiconmodule.c
deleted file mode 100644
index c2959a4854..0000000000
--- a/examples/python/systray/trayiconmodule.c
+++ /dev/null
@@ -1,25 +0,0 @@
-/* -*- Mode: C; c-basic-offset: 4 -*- */
-
-/* include this first, before NO_IMPORT_PYGOBJECT is defined */
-#include <pygobject.h>
-
-void trayicon_register_classes (PyObject *d);
-
-extern PyMethodDef trayicon_functions[];
-
-DL_EXPORT(void)
-inittrayicon(void)
-{
- PyObject *m, *d;
-
- init_pygobject ();
-
- m = Py_InitModule ("trayicon", trayicon_functions);
- d = PyModule_GetDict (m);
-
- trayicon_register_classes (d);
-
- if (PyErr_Occurred ()) {
- Py_FatalError ("can't initialise module trayicon :(");
- }
-}
diff --git a/gnome/.cvsignore b/gnome/.cvsignore
deleted file mode 100644
index 282522db03..0000000000
--- a/gnome/.cvsignore
+++ /dev/null
@@ -1,2 +0,0 @@
-Makefile
-Makefile.in
diff --git a/gnome/Makefile.am b/gnome/Makefile.am
deleted file mode 100644
index 285bd24848..0000000000
--- a/gnome/Makefile.am
+++ /dev/null
@@ -1,2 +0,0 @@
-SUBDIRS = applet libnm_glib vpn-properties
-
diff --git a/gnome/applet/.cvsignore b/gnome/applet/.cvsignore
deleted file mode 100644
index 83b686c591..0000000000
--- a/gnome/applet/.cvsignore
+++ /dev/null
@@ -1,3 +0,0 @@
-Makefile
-Makefile.in
-nm-applet
diff --git a/gnome/applet/Makefile.am b/gnome/applet/Makefile.am
deleted file mode 100644
index a01b02f19a..0000000000
--- a/gnome/applet/Makefile.am
+++ /dev/null
@@ -1,89 +0,0 @@
-SUBDIRS=icons
-
-NULL=
-
-INCLUDES = -I${top_srcdir} -I${top_srcdir}/utils
-
-bin_PROGRAMS = nm-applet
-
-nm_applet_CPPFLAGS = \
- $(DBUS_CFLAGS) \
- $(GTHREAD_CFLAGS) \
- $(HAL_CFLAGS) \
- $(DBUS_GLIB_CFLAGS) \
- $(GLADE_CFLAGS) \
- $(GTK_CFLAGS) \
- $(GCONF_CFLAGS) \
- $(LIBGNOMEUI_CFLAGS) \
- $(PANEL_APPLET_CFLAGS) \
- $(GNOME_KEYRING_CFLAGS) \
- -DICONDIR=\""$(datadir)/pixmaps"\" \
- -DGLADEDIR=\""$(gladedir)"\" \
- -DBINDIR=\""$(bindir)"\" \
- -DSYSCONFDIR=\""$(sysconfdir)"\" \
- -DVPN_NAME_FILES_DIR=\""$(sysconfdir)/NetworkManager/VPN"\" \
- -DDBUS_API_SUBJECT_TO_CHANGE \
- -DG_DISABLE_DEPRECATED \
- -DGDK_DISABLE_DEPRECATED \
- -DGNOME_DISABLE_DEPRECATED \
- -DGNOMELOCALEDIR=\""$(prefix)/$(DATADIRNAME)/locale"\" \
- -DVERSION=\"$(VERSION)\" \
- $(NULL)
-
-nm_applet_SOURCES = \
- main.c \
- applet.c \
- applet.h \
- applet-dbus.c \
- applet-dbus.h \
- applet-dbus-devices.c \
- applet-dbus-devices.h \
- applet-dbus-vpn.c \
- applet-dbus-vpn.h \
- applet-dbus-info.c \
- applet-dbus-info.h \
- wireless-network.c \
- wireless-network.h \
- nm-device.c \
- nm-device.h \
- other-network-dialog.c \
- other-network-dialog.h \
- passphrase-dialog.c \
- passphrase-dialog.h \
- menu-items.c \
- menu-items.h \
- eggtrayicon.c \
- eggtrayicon.h \
- vpn-password-dialog.c \
- vpn-password-dialog.h \
- vpn-connection.c \
- vpn-connection.h \
- $(NULL)
-
-nm_applet_LDADD = \
- $(DBUS_LIBS) \
- $(HAL_LIBS) \
- $(GTHREAD_LIBS) \
- $(GLADE_LIBS) \
- $(DBUS_GLIB_LIBS) \
- $(PANEL_APPLET_LIBS) \
- $(GTK_LIBS) \
- $(GCONF_LIBS) \
- $(LIBGNOMEUI_LIBS) \
- $(GNOME_KEYRING_LIBS) \
- $(top_builddir)/utils/libnmutils.la \
- $(NULL)
-
-
-gladedir = $(datadir)/nm-applet
-glade_DATA = wireless-applet.glade keyring.png
-
-dbusservicedir = $(DBUS_SYS_DIR)
-dbusservice_DATA = nm-applet.conf
-
-CLEANFILES = $(server_DATA) *.bak *.gladep
-
-EXTRA_DIST = \
- $(dbusservice_DATA) \
- $(glade_DATA) \
- $(NULL)
diff --git a/gnome/applet/applet-dbus-devices.c b/gnome/applet/applet-dbus-devices.c
deleted file mode 100644
index db10297f89..0000000000
--- a/gnome/applet/applet-dbus-devices.c
+++ /dev/null
@@ -1,1425 +0,0 @@
-/* -*- Mode: C; tab-width: 5; indent-tabs-mode: t; c-basic-offset: 5 -*- */
-/* NetworkManager Wireless Applet -- Display wireless access points and allow user control
- *
- * Dan Williams <dcbw@redhat.com>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- *
- * (C) Copyright 2004-2005 Red Hat, Inc.
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <glib/gi18n.h>
-#include <stdio.h>
-#include <string.h>
-#include <dbus/dbus.h>
-#include <dbus/dbus-glib-lowlevel.h>
-#include "applet-dbus-devices.h"
-#include "applet-dbus.h"
-#include "applet.h"
-#include "vpn-connection.h"
-#include "nm-utils.h"
-
-void nmwa_dbus_devices_schedule_copy (NMWirelessApplet *applet);
-
-
-/*
- * nmwa_dbus_nm_state_cb
- *
- * Callback from nmwa_dbus_update_nm_state
- *
- */
-static void nmwa_dbus_nm_state_cb (DBusPendingCall *pcall, void *user_data)
-{
- DBusMessage * reply;
- NMWirelessApplet * applet = (NMWirelessApplet *) user_data;
- NMState nm_state;
-
- g_return_if_fail (pcall != NULL);
- g_return_if_fail (applet != NULL);
-
- dbus_pending_call_ref (pcall);
-
- if (!dbus_pending_call_get_completed (pcall))
- goto out;
-
- if (!(reply = dbus_pending_call_steal_reply (pcall)))
- goto out;
-
- if (message_is_error (reply))
- {
- dbus_message_unref (reply);
- goto out;
- }
-
- if (dbus_message_get_args (reply, NULL, DBUS_TYPE_UINT32, &nm_state, DBUS_TYPE_INVALID))
- {
- applet->dbus_nm_state = nm_state;
- applet->gui_nm_state = nm_state;
- }
- dbus_message_unref (reply);
-
-out:
- applet->dev_pending_call_list = g_slist_remove (applet->dev_pending_call_list, pcall);
- nmwa_dbus_devices_schedule_copy (applet);
-
- dbus_pending_call_unref (pcall);
-}
-
-
-/*
- * nmwa_dbus_update_nm_state
- *
- * Update internal applet state from NetworkManager state
- *
- */
-void nmwa_dbus_update_nm_state (NMWirelessApplet *applet)
-{
- DBusMessage * message;
- DBusPendingCall * pcall = NULL;
-
- g_return_if_fail (applet != NULL);
-
- if ((message = dbus_message_new_method_call (NM_DBUS_SERVICE, NM_DBUS_PATH, NM_DBUS_INTERFACE, "state")))
- {
- dbus_connection_send_with_reply (applet->connection, message, &pcall, -1);
- dbus_message_unref (message);
- if (pcall)
- {
- dbus_pending_call_set_notify (pcall, nmwa_dbus_nm_state_cb, applet, NULL);
- applet->dev_pending_call_list = g_slist_append (applet->dev_pending_call_list, pcall);
- }
- }
-}
-
-
-/*
- * nmwa_dbus_update_wireless_enabled_cb
- *
- * Callback from nmwa_dbus_update_wireless_enabled
- *
- */
-static void nmwa_dbus_update_wireless_enabled_cb (DBusPendingCall *pcall, void *user_data)
-{
- DBusMessage * reply;
- NMWirelessApplet * applet = (NMWirelessApplet *) user_data;
- gboolean wireless_enabled;
-
- g_return_if_fail (pcall != NULL);
- g_return_if_fail (applet != NULL);
-
- dbus_pending_call_ref (pcall);
-
- if (!dbus_pending_call_get_completed (pcall))
- goto out;
-
- if (!(reply = dbus_pending_call_steal_reply (pcall)))
- goto out;
-
- if (message_is_error (reply))
- {
- dbus_message_unref (reply);
- goto out;
- }
-
- if (dbus_message_get_args (reply, NULL, DBUS_TYPE_BOOLEAN, &wireless_enabled, DBUS_TYPE_INVALID))
- applet->wireless_enabled = wireless_enabled;
- dbus_message_unref (reply);
-
-out:
- dbus_pending_call_unref (pcall);
-}
-
-
-/*
- * nmwa_dbus_update_wireless_enabled
- *
- * Get the wireless_enabled value from NetworkManager
- *
- */
-static void nmwa_dbus_update_wireless_enabled (NMWirelessApplet *applet)
-{
- DBusMessage * message;
- DBusPendingCall * pcall = NULL;
-
- g_return_if_fail (applet != NULL);
-
- if ((message = dbus_message_new_method_call (NM_DBUS_SERVICE, NM_DBUS_PATH, NM_DBUS_INTERFACE, "getWirelessEnabled")))
- {
- dbus_connection_send_with_reply (applet->connection, message, &pcall, -1);
- dbus_message_unref (message);
- if (pcall)
- dbus_pending_call_set_notify (pcall, nmwa_dbus_update_wireless_enabled_cb, applet, NULL);
- }
-}
-
-
-/*
- * nmwa_dbus_get_hal_device_string_property
- *
- * Get a string property from a device
- *
- */
-static char *nmwa_dbus_get_hal_device_string_property (DBusConnection *connection, const char *udi, const char *property_name)
-{
- DBusError error;
- DBusMessage *message;
- DBusMessage *reply;
- char *dbus_property = NULL;
- char *property = NULL;
-
- g_return_val_if_fail (connection != NULL, NULL);
- g_return_val_if_fail (udi != NULL, NULL);
-
- if (!(message = dbus_message_new_method_call ("org.freedesktop.Hal", udi, "org.freedesktop.Hal.Device", "GetPropertyString")))
- return (NULL);
-
- dbus_error_init (&error);
- dbus_message_append_args (message, DBUS_TYPE_STRING, &property_name, DBUS_TYPE_INVALID);
- reply = dbus_connection_send_with_reply_and_block (connection, message, -1, &error);
- dbus_message_unref (message);
- if (dbus_error_is_set (&error))
- {
- nm_warning ("nmwa_dbus_get_hal_device_string_property(): %s raised:\n %s\n\n", error.name, error.message);
- dbus_error_free (&error);
- return (NULL);
- }
- if (reply == NULL)
- {
- nm_warning ("nmwa_dbus_get_hal_device_string_property(): dbus reply message was NULL\n" );
- return (NULL);
- }
-
- dbus_error_init (&error);
- if (!dbus_message_get_args (reply, &error, DBUS_TYPE_STRING, &dbus_property, DBUS_TYPE_INVALID))
- {
- if (dbus_error_is_set (&error))
- dbus_error_free (&error);
- }
- else
- property = g_strdup (dbus_property);
-
- dbus_message_unref (reply);
- return (property);
-}
-
-
-typedef struct HalInfoCBData
-{
- NMWirelessApplet * applet;
- NetworkDevice * dev;
- char * parent_op;
- char * vendor;
-} HalInfoCBData;
-
-static void free_hal_info_cb_data (HalInfoCBData *cb_data)
-{
- if (cb_data)
- {
- network_device_unref (cb_data->dev);
- g_free (cb_data->parent_op);
- g_free (cb_data->vendor);
- memset (cb_data, 0, sizeof (HalInfoCBData));
- g_free (cb_data);
- }
-}
-
-
-/*
- * hal_info_product_cb
- *
- * hal_info_vendor callback
- *
- */
-static void hal_info_product_cb (DBusPendingCall *pcall, void *user_data)
-{
- DBusMessage * reply;
- HalInfoCBData * cb_data = (HalInfoCBData *) user_data;
- char * info_product;
-
- g_return_if_fail (pcall != NULL);
- g_return_if_fail (cb_data != NULL);
- g_return_if_fail (cb_data->applet != NULL);
- g_return_if_fail (cb_data->dev != NULL);
- g_return_if_fail (cb_data->parent_op != NULL);
- g_return_if_fail (cb_data->vendor != NULL);
-
- dbus_pending_call_ref (pcall);
-
- if (!dbus_pending_call_get_completed (pcall))
- goto out;
-
- if (!(reply = dbus_pending_call_steal_reply (pcall)))
- goto out;
-
- if (message_is_error (reply))
- {
- dbus_message_unref (reply);
- goto out;
- }
-
- if (dbus_message_get_args (reply, NULL, DBUS_TYPE_STRING, &info_product, DBUS_TYPE_INVALID))
- {
- char *desc = g_strdup_printf ("%s %s", cb_data->vendor, info_product);
-
- network_device_set_desc (cb_data->dev, desc);
- }
- dbus_message_unref (reply);
-
-out:
- cb_data->applet->dev_pending_call_list = g_slist_remove (cb_data->applet->dev_pending_call_list, pcall);
- nmwa_dbus_devices_schedule_copy (cb_data->applet);
-
- dbus_pending_call_unref (pcall);
-}
-
-
-/*
- * hal_info_vendor_cb
- *
- * hal_info_parent callback
- *
- */
-static void hal_info_vendor_cb (DBusPendingCall *pcall, void *user_data)
-{
- DBusMessage * reply;
- HalInfoCBData * cb_data = (HalInfoCBData *) user_data;
- char * info_vendor;
-
- g_return_if_fail (pcall != NULL);
- g_return_if_fail (cb_data != NULL);
- g_return_if_fail (cb_data->applet != NULL);
- g_return_if_fail (cb_data->dev != NULL);
- g_return_if_fail (cb_data->parent_op != NULL);
-
- dbus_pending_call_ref (pcall);
-
- if (!dbus_pending_call_get_completed (pcall))
- goto out;
-
- if (!(reply = dbus_pending_call_steal_reply (pcall)))
- goto out;
-
- if (message_is_error (reply))
- {
- dbus_message_unref (reply);
- goto out;
- }
-
- if (dbus_message_get_args (reply, NULL, DBUS_TYPE_STRING, &info_vendor, DBUS_TYPE_INVALID))
- {
- DBusMessage * message;
- DBusPendingCall * product_pcall = NULL;
-
- if ((message = dbus_message_new_method_call ("org.freedesktop.Hal", cb_data->parent_op,
- "org.freedesktop.Hal.Device", "GetPropertyString")))
- {
- const char * prop = "info.product";
-
- dbus_message_append_args (message, DBUS_TYPE_STRING, &prop, DBUS_TYPE_INVALID);
- dbus_connection_send_with_reply (cb_data->applet->connection, message, &product_pcall, -1);
- dbus_message_unref (message);
- if (product_pcall)
- {
- HalInfoCBData * product_cb_data = g_malloc0 (sizeof (HalInfoCBData));
-
- product_cb_data->applet = cb_data->applet;
- network_device_ref (cb_data->dev);
- product_cb_data->dev = cb_data->dev;
- product_cb_data->parent_op = g_strdup (cb_data->parent_op);
- product_cb_data->vendor = g_strdup (info_vendor);
- dbus_pending_call_set_notify (product_pcall, hal_info_product_cb, product_cb_data, (DBusFreeFunction) free_hal_info_cb_data);
- cb_data->applet->dev_pending_call_list = g_slist_append (cb_data->applet->dev_pending_call_list, product_pcall);
- }
- }
- }
- dbus_message_unref (reply);
-
-out:
- cb_data->applet->dev_pending_call_list = g_slist_remove (cb_data->applet->dev_pending_call_list, pcall);
- nmwa_dbus_devices_schedule_copy (cb_data->applet);
-
- dbus_pending_call_unref (pcall);
-}
-
-
-/*
- * hal_info_parent_cb
- *
- * nmwa_dbus_update_device_info_from_hal callback
- *
- */
-static void hal_info_parent_cb (DBusPendingCall *pcall, void *user_data)
-{
- DBusMessage * reply;
- HalInfoCBData * cb_data = (HalInfoCBData *) user_data;
- char * op;
-
- g_return_if_fail (pcall != NULL);
- g_return_if_fail (cb_data != NULL);
- g_return_if_fail (cb_data->applet != NULL);
- g_return_if_fail (cb_data->dev != NULL);
-
- dbus_pending_call_ref (pcall);
-
- if (!dbus_pending_call_get_completed (pcall))
- goto out;
-
- if (!(reply = dbus_pending_call_steal_reply (pcall)))
- goto out;
-
- if (message_is_error (reply))
- {
- dbus_message_unref (reply);
- goto out;
- }
-
- /* Grab the object path of the parent item of this "Network Interface" */
- if (dbus_message_get_args (reply, NULL, DBUS_TYPE_STRING, &op, DBUS_TYPE_INVALID))
- {
- DBusMessage * message;
- DBusPendingCall * vendor_pcall = NULL;
-
- if ((message = dbus_message_new_method_call ("org.freedesktop.Hal", op,
- "org.freedesktop.Hal.Device", "GetPropertyString")))
- {
- const char * prop = "info.vendor";
-
- dbus_message_append_args (message, DBUS_TYPE_STRING, &prop, DBUS_TYPE_INVALID);
- dbus_connection_send_with_reply (cb_data->applet->connection, message, &vendor_pcall, -1);
- dbus_message_unref (message);
- if (vendor_pcall)
- {
- HalInfoCBData * vendor_cb_data = g_malloc0 (sizeof (HalInfoCBData));
-
- vendor_cb_data->applet = cb_data->applet;
- network_device_ref (cb_data->dev);
- vendor_cb_data->dev = cb_data->dev;
- vendor_cb_data->parent_op = g_strdup (op);
- dbus_pending_call_set_notify (vendor_pcall, hal_info_vendor_cb, vendor_cb_data, (DBusFreeFunction) free_hal_info_cb_data);
- cb_data->applet->dev_pending_call_list = g_slist_append (cb_data->applet->dev_pending_call_list, vendor_pcall);
- }
- }
- }
- dbus_message_unref (reply);
-
-out:
- cb_data->applet->dev_pending_call_list = g_slist_remove (cb_data->applet->dev_pending_call_list, pcall);
- nmwa_dbus_devices_schedule_copy (cb_data->applet);
-
- dbus_pending_call_unref (pcall);
-}
-
-
-/*
- * nmwa_dbus_update_device_info_from_hal
- *
- * Grab the info.product tag from hal for a specific UDI
- *
- */
-static void nmwa_dbus_update_device_info_from_hal (NetworkDevice *dev, NMWirelessApplet *applet)
-{
- DBusMessage * message;
- DBusPendingCall * pcall = NULL;
-
- g_return_if_fail (applet != NULL);
- g_return_if_fail (applet->connection != NULL);
- g_return_if_fail (dev != NULL);
-
- if ((message = dbus_message_new_method_call ("org.freedesktop.Hal", network_device_get_hal_udi (dev),
- "org.freedesktop.Hal.Device", "GetPropertyString")))
- {
- const char * prop = "info.parent";
-
- dbus_message_append_args (message, DBUS_TYPE_STRING, &prop, DBUS_TYPE_INVALID);
- dbus_connection_send_with_reply (applet->connection, message, &pcall, -1);
- dbus_message_unref (message);
- if (pcall)
- {
- HalInfoCBData * cb_data = g_malloc0 (sizeof (HalInfoCBData));
-
- cb_data->applet = applet;
- network_device_ref (dev);
- cb_data->dev = dev;
- dbus_pending_call_set_notify (pcall, hal_info_parent_cb, cb_data, (DBusFreeFunction) free_hal_info_cb_data);
- applet->dev_pending_call_list = g_slist_append (applet->dev_pending_call_list, pcall);
- }
- }
-}
-
-
-void nmwa_free_gui_data_model (NMWirelessApplet *applet)
-{
- g_return_if_fail (applet != NULL);
-
- if (applet->gui_device_list)
- {
- g_slist_foreach (applet->gui_device_list, (GFunc) network_device_unref, NULL);
- g_slist_free (applet->gui_device_list);
- applet->gui_device_list = NULL;
- }
-}
-
-
-void nmwa_free_dbus_data_model (NMWirelessApplet *applet)
-{
- GSList *elt;
-
- g_return_if_fail (applet != NULL);
-
- if (applet->dbus_device_list)
- {
- g_slist_foreach (applet->dbus_device_list, (GFunc) network_device_unref, NULL);
- g_slist_free (applet->dbus_device_list);
- applet->dbus_device_list = NULL;
- }
-}
-
-
-/*
- * nmwa_copy_data_model
- *
- * Copy the dbus data model over to the gui data model
- *
- */
-static void nmwa_copy_data_model (NMWirelessApplet *applet)
-{
- GSList *elt;
- NetworkDevice *act_dev = NULL;
-
- g_return_if_fail (applet != NULL);
-
- /* Free the existing GUI data model. */
- nmwa_free_gui_data_model (applet);
-
- /* Deep-copy network devices to GUI data model */
- for (elt = applet->dbus_device_list; elt; elt = g_slist_next (elt))
- {
- NetworkDevice *src = (NetworkDevice *)(elt->data);
- NetworkDevice *dst = network_device_copy (src);
-
- if (dst)
- applet->gui_device_list = g_slist_append (applet->gui_device_list, dst);
- }
-
- applet->gui_nm_state = applet->dbus_nm_state;
-}
-
-
-/*
- * nmwa_dbus_schedule_driver_notification
- *
- * Schedule the driver notification routine to run in the main loop.
- *
- */
-static void nmwa_dbus_schedule_driver_notification (NMWirelessApplet *applet, NetworkDevice *dev)
-{
- DriverNotifyCBData *cb_data;
-
- g_return_if_fail (applet != NULL);
- g_return_if_fail (dev != NULL);
-
- cb_data = g_malloc0 (sizeof (DriverNotifyCBData));
- cb_data->applet = applet;
- network_device_ref (dev);
- cb_data->dev = dev;
-
- g_idle_add (nmwa_driver_notify, (gpointer)cb_data);
-}
-
-
-/*
- * nmwa_dbus_check_drivers
- *
- * If a device got added, we notify the user if the device's driver
- * has any problems (no carrier detect, no wireless scanning, etc).
- *
- */
-static void nmwa_dbus_check_drivers (NMWirelessApplet *applet)
-{
- GSList *elt;
-
- g_return_if_fail (applet != NULL);
-
- /* For every device that's in the dbus data model but not in
- * the gui data model, signal the user.
- */
- for (elt = applet->dbus_device_list; elt; elt = g_slist_next (elt))
- {
- NetworkDevice *dbus_dev = (NetworkDevice *)(elt->data);
- GSList *elt2;
- gboolean found = FALSE;
-
- for (elt2 = applet->gui_device_list; elt2; elt2 = g_slist_next (elt2))
- {
- NetworkDevice *gui_dev = (NetworkDevice *)(elt2->data);
-
- if ( !nm_null_safe_strcmp (network_device_get_iface (dbus_dev), network_device_get_iface (gui_dev))
- && !nm_null_safe_strcmp (network_device_get_address (dbus_dev), network_device_get_address (gui_dev))
- && !nm_null_safe_strcmp (network_device_get_hal_udi (dbus_dev), network_device_get_hal_udi (gui_dev)))
- {
- found = TRUE;
- break;
- }
- }
-
- if ( !found
- && ( (network_device_get_driver_support_level (dbus_dev) == NM_DRIVER_NO_CARRIER_DETECT)
- || (network_device_get_driver_support_level (dbus_dev) == NM_DRIVER_NO_WIRELESS_SCAN)))
- nmwa_dbus_schedule_driver_notification (applet, dbus_dev);
- }
-}
-
-
-typedef struct NetPropCBData
-{
- char * dev_op;
- char * act_net;
- NMWirelessApplet * applet;
-} NetPropCBData;
-
-static void free_net_prop_cb_data (NetPropCBData *data)
-{
- if (data)
- {
- g_free (data->dev_op);
- g_free (data->act_net);
- }
- g_free (data);
-}
-
-
-/*
- * nmwa_dbus_net_properties_cb
- *
- * Callback for each network we called "getProperties" on in nmwa_dbus_device_properties_cb().
- *
- */
-static void nmwa_dbus_net_properties_cb (DBusPendingCall *pcall, void *user_data)
-{
- DBusMessage * reply;
- NetPropCBData * cb_data = (NetPropCBData *) user_data;
- NMWirelessApplet * applet;
- const char * op = NULL;
- const char * essid = NULL;
- const char * hw_addr = NULL;
- dbus_int32_t strength = -1;
- double freq = 0;
- dbus_int32_t rate = 0;
- dbus_bool_t enc = FALSE;
- dbus_uint32_t mode = 0;
-
- g_return_if_fail (pcall != NULL);
- g_return_if_fail (cb_data != NULL);
- g_return_if_fail (cb_data->applet != NULL);
- g_return_if_fail (cb_data->dev_op != NULL);
-
- applet = cb_data->applet;
-
- dbus_pending_call_ref (pcall);
-
- if (!dbus_pending_call_get_completed (pcall))
- goto out;
-
- if (!(reply = dbus_pending_call_steal_reply (pcall)))
- goto out;
-
- if (dbus_message_is_error (reply, NM_DBUS_NO_NETWORKS_ERROR))
- {
- dbus_message_unref (reply);
- goto out;
- }
-
- if (dbus_message_get_args (reply, NULL, DBUS_TYPE_OBJECT_PATH, &op,
- DBUS_TYPE_STRING, &essid,
- DBUS_TYPE_STRING, &hw_addr,
- DBUS_TYPE_INT32, &strength,
- DBUS_TYPE_DOUBLE, &freq,
- DBUS_TYPE_INT32, &rate,
- DBUS_TYPE_BOOLEAN,&enc,
- DBUS_TYPE_UINT32, &mode,
- DBUS_TYPE_INVALID))
- {
- NetworkDevice * dev;
-
- if ((dev = nmwa_get_device_for_nm_path (applet->dbus_device_list, cb_data->dev_op)))
- {
- WirelessNetwork * net = wireless_network_new (essid, op);
- WirelessNetwork * tmp_net;
- char * act_net = cb_data->act_net ? g_strdup (cb_data->act_net) : NULL;
-
- /* Remove any existing wireless network with this object path */
- if ((tmp_net = network_device_get_wireless_network_by_nm_path (dev, op)))
- {
- if (!act_net && wireless_network_get_active (tmp_net))
- act_net = g_strdup (wireless_network_get_nm_path (tmp_net));
- network_device_remove_wireless_network (dev, tmp_net);
- }
-
- wireless_network_set_encrypted (net, enc);
- wireless_network_set_strength (net, strength);
- if (act_net && strlen (act_net) && (strcmp (act_net, op) == 0))
- wireless_network_set_active (net, TRUE);
-
- network_device_add_wireless_network (dev, net);
- g_free (act_net);
- }
- }
- dbus_message_unref (reply);
-
-out:
- applet->dev_pending_call_list = g_slist_remove (applet->dev_pending_call_list, pcall);
- nmwa_dbus_devices_schedule_copy (applet);
-
- dbus_pending_call_unref (pcall);
-}
-
-
-/*
- * nmwa_dbus_device_update_one_network
- *
- * Get properties on just one wireless network.
- *
- */
-void nmwa_dbus_device_update_one_network (NMWirelessApplet *applet, const char *dev_path, const char *net_path, const char *active_net_path)
-{
- DBusMessage * message;
- DBusPendingCall * pcall = NULL;
-
- g_return_if_fail (applet != NULL);
- g_return_if_fail (dev_path != NULL);
- g_return_if_fail (net_path != NULL);
-
- if ((message = dbus_message_new_method_call (NM_DBUS_SERVICE, net_path, NM_DBUS_INTERFACE_DEVICES, "getProperties")))
- {
- dbus_connection_send_with_reply (applet->connection, message, &pcall, -1);
- dbus_message_unref (message);
- if (pcall)
- {
- NetPropCBData * cb_data = g_malloc0 (sizeof (NetPropCBData));
-
- cb_data->dev_op = g_strdup (dev_path);
- cb_data->act_net = (active_net_path && strlen (active_net_path)) ? g_strdup (active_net_path) : NULL;
- cb_data->applet = applet;
- dbus_pending_call_set_notify (pcall, nmwa_dbus_net_properties_cb, cb_data, (DBusFreeFunction) free_net_prop_cb_data);
- applet->dev_pending_call_list = g_slist_append (applet->dev_pending_call_list, pcall);
- }
- }
-}
-
-
-/*
- * nmwa_dbus_device_remove_one_network
- *
- * Remove a wireless network from a device.
- *
- */
-void nmwa_dbus_device_remove_one_network (NMWirelessApplet *applet, const char *dev_path, const char *net_path)
-{
- NetworkDevice * dev;
-
- g_return_if_fail (applet != NULL);
- g_return_if_fail (dev_path != NULL);
- g_return_if_fail (net_path != NULL);
-
- if ((dev = nmwa_get_device_for_nm_path (applet->dbus_device_list, dev_path)))
- {
- WirelessNetwork * net;
-
- if ((net = network_device_get_wireless_network_by_nm_path (dev, net_path)))
- {
- network_device_remove_wireless_network (dev, net);
- nmwa_dbus_devices_schedule_copy (applet);
- }
- }
-}
-
-
-/*
- * nmwa_dbus_device_properties_cb
- *
- * Callback for each device we called "getProperties" on in nmwa_dbus_update_devices_cb().
- *
- */
-static void nmwa_dbus_device_properties_cb (DBusPendingCall *pcall, void *user_data)
-{
- DBusMessage * reply;
- NMWirelessApplet * applet = (NMWirelessApplet *) user_data;
- char * op = NULL;
- const char * iface = NULL;
- dbus_uint32_t type = 0;
- const char * udi = NULL;
- dbus_bool_t active = FALSE;
- dbus_uint32_t ip4_address = 0;
- const char * hw_addr = NULL;
- dbus_uint32_t mode = 0;
- dbus_int32_t strength = -1;
- char * active_network_path = NULL;
- dbus_bool_t link_active = FALSE;
- dbus_uint32_t driver_support_level = 0;
- char ** networks = NULL;
- int num_networks = 0;
- NMActStage act_stage = NM_ACT_STAGE_UNKNOWN;
-
- g_return_if_fail (pcall != NULL);
- g_return_if_fail (applet != NULL);
-
- dbus_pending_call_ref (pcall);
-
- if (!dbus_pending_call_get_completed (pcall))
- goto out;
-
- if (!(reply = dbus_pending_call_steal_reply (pcall)))
- goto out;
-
- if (dbus_message_get_type (reply) == DBUS_MESSAGE_TYPE_ERROR)
- {
- dbus_message_unref (reply);
- goto out;
- }
-
- if (dbus_message_get_args (reply, NULL, DBUS_TYPE_OBJECT_PATH, &op,
- DBUS_TYPE_STRING, &iface,
- DBUS_TYPE_UINT32, &type,
- DBUS_TYPE_STRING, &udi,
- DBUS_TYPE_BOOLEAN,&active,
- DBUS_TYPE_UINT32, &act_stage,
- DBUS_TYPE_UINT32, &ip4_address,
- DBUS_TYPE_STRING, &hw_addr,
- DBUS_TYPE_UINT32, &mode,
- DBUS_TYPE_INT32, &strength,
- DBUS_TYPE_BOOLEAN,&link_active,
- DBUS_TYPE_UINT32, &driver_support_level,
- DBUS_TYPE_STRING, &active_network_path,
- DBUS_TYPE_ARRAY, DBUS_TYPE_STRING, &networks, &num_networks,
- DBUS_TYPE_INVALID))
- {
- NetworkDevice *dev = network_device_new (iface, type, op);
- NetworkDevice *tmp_dev = nmwa_get_device_for_nm_path (applet->dbus_device_list, op);
-
- network_device_set_hal_udi (dev, udi);
- network_device_set_address (dev, hw_addr);
- network_device_set_active (dev, active);
- network_device_set_link (dev, link_active);
- network_device_set_driver_support_level (dev, driver_support_level);
- network_device_set_act_stage (dev, act_stage);
-
- /* If the device already exists in our list for some reason, remove it so we
- * can add the new one with updated data.
- */
- if (tmp_dev)
- {
- applet->dbus_device_list = g_slist_remove (applet->dbus_device_list, tmp_dev);
- network_device_unref (tmp_dev);
- }
-
- applet->dbus_device_list = g_slist_append (applet->dbus_device_list, dev);
-
- nmwa_dbus_update_device_info_from_hal (dev, applet);
-
- if (type == DEVICE_TYPE_WIRELESS_ETHERNET)
- {
- network_device_set_strength (dev, strength);
-
- /* Call the "getProperties" method on each wireless network the device may have. */
- if (num_networks > 0)
- {
- char ** item;
-
- for (item = networks; *item; item++)
- nmwa_dbus_device_update_one_network (applet, op, *item, active_network_path);
- }
- }
-
- dbus_free_string_array (networks);
- }
- dbus_message_unref (reply);
-
-out:
- applet->dev_pending_call_list = g_slist_remove (applet->dev_pending_call_list, pcall);
- nmwa_dbus_devices_schedule_copy (applet);
-
- dbus_pending_call_unref (pcall);
-}
-
-
-/*
- * nmwa_dbus_device_update_one_device
- *
- * Get properties on just one device.
- *
- */
-void nmwa_dbus_device_update_one_device (NMWirelessApplet *applet, const char *dev_path)
-{
- DBusMessage * message;
- DBusPendingCall * pcall = NULL;
-
- g_return_if_fail (applet != NULL);
- g_return_if_fail (dev_path != NULL);
-
- if ((message = dbus_message_new_method_call (NM_DBUS_SERVICE, dev_path, NM_DBUS_INTERFACE_DEVICES, "getProperties")))
- {
- dbus_connection_send_with_reply (applet->connection, message, &pcall, -1);
- dbus_message_unref (message);
- if (pcall)
- {
- dbus_pending_call_set_notify (pcall, nmwa_dbus_device_properties_cb, applet, NULL);
- applet->dev_pending_call_list = g_slist_append (applet->dev_pending_call_list, pcall);
- }
- }
-}
-
-
-/*
- * nmwa_dbus_update_devices_cb
- *
- * nmwa_dbus_update_devices callback.
- *
- */
-static void nmwa_dbus_update_devices_cb (DBusPendingCall *pcall, void *user_data)
-{
- DBusMessage * reply;
- NMWirelessApplet * applet = (NMWirelessApplet *) user_data;
- char ** devices;
- int num_devices;
-
- g_return_if_fail (pcall != NULL);
- g_return_if_fail (applet != NULL);
-
- dbus_pending_call_ref (pcall);
-
- if (!dbus_pending_call_get_completed (pcall))
- goto out;
-
- if (!(reply = dbus_pending_call_steal_reply (pcall)))
- goto out;
-
- if (dbus_message_is_error (reply, NM_DBUS_NO_DEVICES_ERROR))
- {
- dbus_message_unref (reply);
- goto out;
- }
-
- if (dbus_message_get_args (reply, NULL, DBUS_TYPE_ARRAY, DBUS_TYPE_OBJECT_PATH, &devices, &num_devices, DBUS_TYPE_INVALID))
- {
- char ** item;
-
- /* For each device, fire off a "getProperties" call */
- for (item = devices; *item; item++)
- nmwa_dbus_device_update_one_device (applet, *item);
-
- dbus_free_string_array (devices);
- }
- dbus_message_unref (reply);
-
-out:
- dbus_pending_call_unref (pcall);
-}
-
-
-/*
- * nmwa_dbus_update_dialup_cb
- *
- * nmwa_dbus_update_dialup DBUS callback.
- *
- */
-static void nmwa_dbus_update_dialup_cb (DBusPendingCall *pcall, void *user_data)
-{
- DBusMessage *reply;
- NMWirelessApplet *applet = (NMWirelessApplet *) user_data;
- char **dialup_devices;
- int num_devices;
-
- g_return_if_fail (pcall != NULL);
- g_return_if_fail (applet != NULL);
-
- dbus_pending_call_ref (pcall);
-
- if (!dbus_pending_call_get_completed (pcall))
- goto out;
-
- if (!(reply = dbus_pending_call_steal_reply (pcall)))
- goto out;
-
- if (dbus_message_is_error (reply, NM_DBUS_NO_DIALUP_ERROR))
- {
- dbus_message_unref (reply);
- goto out;
- }
-
- if (dbus_message_get_args (reply, NULL, DBUS_TYPE_ARRAY, DBUS_TYPE_STRING, &dialup_devices, &num_devices, DBUS_TYPE_INVALID))
- {
- char **item;
- GSList *elt;
-
- for (elt = applet->dialup_list; elt; elt = g_slist_next (elt))
- g_free (elt->data);
- if (applet->dialup_list)
- {
- g_slist_free (applet->dialup_list);
- applet->dialup_list = NULL;
- }
-
- for (item = dialup_devices; *item; item++)
- applet->dialup_list = g_slist_append (applet->dialup_list, g_strdup (*item));
-
- dbus_free_string_array (dialup_devices);
- }
- dbus_message_unref (reply);
-
-out:
- dbus_pending_call_unref (pcall);
-}
-
-
-/*
- * nmwa_dbus_dialup_activate_connection
- *
- * Tell NetworkManager to activate a particular dialup connection.
- *
- */
-void nmwa_dbus_dialup_activate_connection (NMWirelessApplet *applet, const char *name)
-{
- DBusMessage *message;
- DBusMessageIter iter;
- DBusMessageIter iter_array;
-
- g_return_if_fail (name != NULL);
-
- if ((message = dbus_message_new_method_call (NM_DBUS_SERVICE, NM_DBUS_PATH, NM_DBUS_INTERFACE, "activateDialup")))
- {
- nm_info ("Activating dialup connection '%s'.", name);
-#if 0
- dbus_message_iter_init_append (message, &iter);
- dbus_message_iter_append_basic (&iter, DBUS_TYPE_STRING, &name);
- dbus_message_iter_open_container (&iter, DBUS_TYPE_ARRAY, DBUS_TYPE_STRING_AS_STRING, &iter_array);
-
- for (i = passwords; i != NULL; i = g_slist_next (i)) {
- dbus_message_iter_append_basic (&iter_array, DBUS_TYPE_STRING, &(i->data));
- }
- dbus_message_iter_close_container (&iter, &iter_array);
-#endif
- dbus_message_append_args (message, DBUS_TYPE_STRING, &name, DBUS_TYPE_INVALID);
- if (!dbus_connection_send (applet->connection, message, NULL))
- nm_warning ("nmwa_dbus_activate_dialup_connection(): Could not send activateDialup message!");
- }
- else
- nm_warning ("nmwa_dbus_activate_dialup_connection(): Couldn't allocate the dbus message!");
-}
-
-
-/*
- * nmwa_dbus_update_devices
- *
- * Do a full update of network devices, wireless networks, and dial up devices.
- *
- */
-void nmwa_dbus_update_devices (NMWirelessApplet *applet)
-{
- DBusMessage * message;
- DBusPendingCall * pcall;
-
- g_return_if_fail (applet->data_mutex != NULL);
-
- nmwa_free_dbus_data_model (applet);
-
- if ((message = dbus_message_new_method_call (NM_DBUS_SERVICE, NM_DBUS_PATH, NM_DBUS_INTERFACE, "getDevices")))
- {
- dbus_connection_send_with_reply (applet->connection, message, &pcall, -1);
- dbus_message_unref (message);
- if (pcall)
- dbus_pending_call_set_notify (pcall, nmwa_dbus_update_devices_cb, applet, NULL);
- }
- nmwa_dbus_update_wireless_enabled (applet);
-}
-
-
-/*
- * nmwa_dbus_update_dialup
- *
- * Do an update of dial up devices.
- *
- */
-void nmwa_dbus_update_dialup (NMWirelessApplet *applet)
-{
- DBusMessage *message;
- DBusPendingCall *pcall;
-
- g_return_if_fail (applet->data_mutex != NULL);
-
- nmwa_free_dbus_data_model (applet);
-
- if ((message = dbus_message_new_method_call (NM_DBUS_SERVICE, NM_DBUS_PATH, NM_DBUS_INTERFACE, "getDialup")))
- {
- dbus_connection_send_with_reply (applet->connection, message, &pcall, -1);
- dbus_message_unref (message);
- if (pcall)
- dbus_pending_call_set_notify (pcall, nmwa_dbus_update_dialup_cb, applet, NULL);
- }
-}
-
-
-/*
- * nmwa_dbus_device_remove_one_device
- *
- * Remove a device from our list.
- *
- */
-void nmwa_dbus_device_remove_one_device (NMWirelessApplet *applet, const char *dev_path)
-{
- NetworkDevice * dev;
-
- g_return_if_fail (applet != NULL);
-
- if ((dev = nmwa_get_device_for_nm_path (applet->dbus_device_list, dev_path)))
- {
- applet->dbus_device_list = g_slist_remove (applet->dbus_device_list, dev);
- network_device_unref (dev);
- nmwa_dbus_devices_schedule_copy (applet);
- }
-}
-
-
-/*
- * nmwa_dbus_set_device
- *
- * Tell NetworkManager to use a specific network device that the user picked, and
- * possibly a specific wireless network too.
- *
- */
-void nmwa_dbus_set_device (DBusConnection *connection, NetworkDevice *dev, const char *essid,
- const NMEncKeyType key_type, const char *passphrase)
-{
- DBusMessage *message;
-
- g_return_if_fail (connection != NULL);
- g_return_if_fail (dev != NULL);
-
- if ((message = dbus_message_new_method_call (NM_DBUS_SERVICE, NM_DBUS_PATH, NM_DBUS_INTERFACE, "setActiveDevice")))
- {
- const char *dev_path = network_device_get_nm_path (dev);
-
- if (network_device_is_wireless (dev) && essid)
- {
- int tmp_key_type = (int)key_type;
-
- if (passphrase == NULL)
- passphrase = "";
-
- dbus_message_append_args (message, DBUS_TYPE_OBJECT_PATH, &dev_path,
- DBUS_TYPE_STRING, &essid,
- DBUS_TYPE_STRING, &passphrase,
- DBUS_TYPE_INT32, &tmp_key_type,
- DBUS_TYPE_INVALID);
- }
- else
- {
- nm_info ("Forcing device '%s'\n", network_device_get_nm_path (dev));
- dbus_message_append_args (message, DBUS_TYPE_OBJECT_PATH, &dev_path, DBUS_TYPE_INVALID);
- }
- dbus_connection_send (connection, message, NULL);
- }
- else
- nm_warning ("nmwa_dbus_set_device(): Couldn't allocate the dbus message\n");
-}
-
-
-/*
- * nmwa_dbus_create_network
- *
- * Tell NetworkManager to create an Ad-Hoc wireless network
- *
- */
-void nmwa_dbus_create_network (DBusConnection *connection, NetworkDevice *dev, const char *essid,
- NMEncKeyType key_type, const char *passphrase)
-{
- DBusMessage *message;
-
- g_return_if_fail (connection != NULL);
- g_return_if_fail (dev != NULL);
- g_return_if_fail (essid != NULL);
- g_return_if_fail (network_device_is_wireless (dev));
-
- if ((message = dbus_message_new_method_call (NM_DBUS_SERVICE, NM_DBUS_PATH, NM_DBUS_INTERFACE, "createWirelessNetwork")))
- {
- const char *dev_path = network_device_get_nm_path (dev);
-
- if (dev_path)
- {
- nm_info ("Creating network '%s' %s passphrase on device '%s'.\n", essid, passphrase ? "with" : "without", dev_path);
- if (passphrase == NULL)
- passphrase = "";
- dbus_message_append_args (message, DBUS_TYPE_OBJECT_PATH, &dev_path,
- DBUS_TYPE_STRING, &essid,
- DBUS_TYPE_STRING, &passphrase,
- DBUS_TYPE_INT32, &key_type,
- DBUS_TYPE_INVALID);
- dbus_connection_send (connection, message, NULL);
- }
- }
- else
- nm_warning ("nmwa_dbus_set_device(): Couldn't allocate the dbus message\n");
-}
-
-
-/*
- * nmwa_dbus_enable_wireless
- *
- * Tell NetworkManager to enabled or disable all wireless devices.
- *
- */
-void nmwa_dbus_enable_wireless (NMWirelessApplet *applet, gboolean enabled)
-{
- DBusMessage *message;
-
- g_return_if_fail (applet != NULL);
- g_return_if_fail (applet->connection != NULL);
-
- if ((message = dbus_message_new_method_call (NM_DBUS_SERVICE, NM_DBUS_PATH, NM_DBUS_INTERFACE, "setWirelessEnabled")))
- {
- dbus_message_append_args (message, DBUS_TYPE_BOOLEAN, &enabled, DBUS_TYPE_INVALID);
- dbus_connection_send (applet->connection, message, NULL);
- nmwa_dbus_update_wireless_enabled (applet);
- }
-}
-
-
-typedef struct StrengthCBData
-{
- NMWirelessApplet * applet;
- char * dev_path;
-} StrengthCBData;
-
-
-static void free_strength_cb_data (StrengthCBData *data)
-{
- if (data)
- g_free (data->dev_path);
- g_free (data);
-}
-
-
-/*
- * nmwa_dbus_update_device_strength_cb
- *
- * nmwa_dbus_update_device_strength callback.
- *
- */
-static void nmwa_dbus_update_device_strength_cb (DBusPendingCall *pcall, void *user_data)
-{
- DBusMessage * reply;
- StrengthCBData * cb_data = user_data;
- NMWirelessApplet * applet;
- int strength;
-
- g_return_if_fail (pcall != NULL);
- g_return_if_fail (cb_data != NULL);
-
- applet = cb_data->applet;
- g_return_if_fail (applet != NULL);
-
- dbus_pending_call_ref (pcall);
-
- if (!dbus_pending_call_get_completed (pcall))
- goto out;
-
- if (!(reply = dbus_pending_call_steal_reply (pcall)))
- goto out;
-
- if (message_is_error (reply))
- {
- dbus_message_unref (reply);
- goto out;
- }
-
- if (dbus_message_get_args (reply, NULL, DBUS_TYPE_INT32, &strength, DBUS_TYPE_INVALID))
- {
- NetworkDevice *dev;
-
- /* Update strength on dbus active device */
- if ((dev = nmwa_get_device_for_nm_path (applet->dbus_device_list, cb_data->dev_path)))
- network_device_set_strength (dev, strength);
-
- /* Update strength on gui active device too */
- if ((dev = nmwa_get_device_for_nm_path (applet->gui_device_list, cb_data->dev_path)))
- network_device_set_strength (dev, strength);
- }
- dbus_message_unref (reply);
-
-out:
- dbus_pending_call_unref (pcall);
-}
-
-
-static void get_each_device_strength (NetworkDevice *dev, NMWirelessApplet *applet)
-{
- g_return_if_fail (dev != NULL);
-
- if (network_device_get_active (dev))
- {
- DBusMessage * message;
- DBusPendingCall * pcall;
-
- if ((message = dbus_message_new_method_call (NM_DBUS_SERVICE, network_device_get_nm_path (dev), NM_DBUS_INTERFACE_DEVICES, "getStrength")))
- {
- dbus_connection_send_with_reply (applet->connection, message, &pcall, -1);
- dbus_message_unref (message);
- if (pcall)
- {
- StrengthCBData * cb_data = g_malloc0 (sizeof (StrengthCBData));
-
- cb_data->applet = applet;
- cb_data->dev_path = g_strdup (network_device_get_nm_path (dev));
- dbus_pending_call_set_notify (pcall, nmwa_dbus_update_device_strength_cb, cb_data, (DBusFreeFunction) free_strength_cb_data);
- }
- }
- }
-}
-
-/*
- * nmwa_dbus_update_device_strength
- *
- * Update each active device's strength.
- *
- */
-gboolean nmwa_dbus_update_device_strength (NMWirelessApplet *applet)
-{
- NetworkDevice * dev;
- DBusMessage * message;
- DBusPendingCall * pcall;
-
- g_return_val_if_fail (applet != NULL, TRUE);
-
- g_slist_foreach (applet->dbus_device_list, (GFunc) get_each_device_strength, applet);
-
- return TRUE;
-}
-
-
-/*
- * sort_devices_function
- *
- * Sort the devices for display... Wired devices at the top.
- *
- */
-static int
-sort_devices_function (gconstpointer a, gconstpointer b)
-{
- NetworkDevice *dev_a = (NetworkDevice *) a;
- NetworkDevice *dev_b = (NetworkDevice *) b;
- const char *name_a;
- const char *name_b;
-
- if (network_device_get_desc (dev_a))
- name_a = network_device_get_desc (dev_a);
- else if (network_device_get_nm_path (dev_a))
- name_a = network_device_get_nm_path (dev_a);
- else
- name_a = "";
-
- if (network_device_get_desc (dev_b))
- name_b = network_device_get_desc (dev_b);
- else if (network_device_get_nm_path (dev_b))
- name_b = network_device_get_nm_path (dev_b);
- else
- name_b = "";
-
- if (network_device_get_type (dev_a) == network_device_get_type (dev_b))
- {
- return strcmp (name_a, name_b);
- }
- if (network_device_is_wired (dev_a))
- return -1;
- if (network_device_is_wired (dev_b))
- return 1;
- if (network_device_is_wireless (dev_a))
- return -1;
- if (network_device_is_wireless (dev_b))
- return 1;
-
- /* Unknown device types. Sort by name only at this point. */
- return strcmp (name_a, name_b);
-}
-
-
-static int devices_copy_idle_id = 0;
-
-/*
- * nmwa_dbus_devices_lock_and_copy
- *
- * Copy our network model over to the GUI thread.
- *
- */
-static gboolean nmwa_dbus_devices_lock_and_copy (NMWirelessApplet *applet)
-{
- devices_copy_idle_id = 0;
-
- g_return_val_if_fail (applet != NULL, FALSE);
-
- /* Only copy over if we have a complete data model */
- if (g_slist_length (applet->dev_pending_call_list) == 0)
- {
- GSList *elt;
-
- nmwa_dbus_check_drivers (applet);
-
- /* Sort the devices for display */
- applet->dbus_device_list = g_slist_sort (applet->dbus_device_list, sort_devices_function);
-
- /* Sort the wireless networks of each device */
- for (elt = applet->dbus_device_list; elt; elt = g_slist_next (elt))
- {
- NetworkDevice *dev = (NetworkDevice *)(elt->data);
-
- if (dev && network_device_is_wireless (dev))
- network_device_sort_wireless_networks (dev);
- }
-
- /* Now copy the data over to the GUI side */
- g_mutex_lock (applet->data_mutex);
- nmwa_copy_data_model (applet);
- g_mutex_unlock (applet->data_mutex);
-
- nmwa_dbus_update_device_strength (applet);
- }
-
- return FALSE;
-}
-
-/*
- * nmwa_dbus_devices_schedule_copy
- *
- * Schedule a copy of our model over to the gui thread, batching copy requests.
- *
- */
-void nmwa_dbus_devices_schedule_copy (NMWirelessApplet *applet)
-{
- g_return_if_fail (applet != NULL);
-
- if (devices_copy_idle_id == 0)
- {
- GSource *source = g_idle_source_new ();
-
- /* We want this idle source to run before any other idle source */
- g_source_set_priority (source, G_PRIORITY_HIGH_IDLE);
- g_source_set_callback (source, (GSourceFunc) nmwa_dbus_devices_lock_and_copy, applet, NULL);
- devices_copy_idle_id = g_source_attach (source, applet->thread_context);
- g_source_unref (source);
- }
-}
-
diff --git a/gnome/applet/applet-dbus-devices.h b/gnome/applet/applet-dbus-devices.h
deleted file mode 100644
index 16195db32a..0000000000
--- a/gnome/applet/applet-dbus-devices.h
+++ /dev/null
@@ -1,51 +0,0 @@
-/* -*- Mode: C; tab-width: 5; indent-tabs-mode: t; c-basic-offset: 5 -*- */
-/* NetworkManager Wireless Applet -- Display wireless access points and allow user control
- *
- * Dan Williams <dcbw@redhat.com>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- *
- * (C) Copyright 2004-2005 Red Hat, Inc.
- */
-
-#ifndef APPLET_DBUS_DEVICES_H
-#define APPLET_DBUS_DEVICES_H
-
-#include <glib.h>
-#include <dbus/dbus.h>
-#include "NetworkManager.h"
-#include "applet.h"
-#include "nm-device.h"
-#include "wireless-network.h"
-
-void nmwa_dbus_update_one_vpn_connection (DBusConnection *connection, const char *name, NMWirelessApplet *applet, gboolean is_active);
-void nmwa_dbus_update_vpn_connections (NMWirelessApplet *applet);
-gboolean nmwa_dbus_update_device_strength (NMWirelessApplet *applet);
-
-void nmwa_dbus_update_nm_state (NMWirelessApplet *applet);
-
-void nmwa_dbus_update_devices (NMWirelessApplet *applet);
-void nmwa_dbus_update_dialup (NMWirelessApplet *applet);
-void nmwa_dbus_dialup_activate_connection (NMWirelessApplet *applet, const char *name);
-void nmwa_dbus_device_update_one_device (NMWirelessApplet *applet, const char *dev_path);
-void nmwa_dbus_device_remove_one_device (NMWirelessApplet *applet, const char *dev_path);
-
-void nmwa_dbus_device_update_one_network (NMWirelessApplet *applet, const char *dev_path, const char *net_path, const char *active_net_path);
-void nmwa_dbus_device_remove_one_network (NMWirelessApplet *applet, const char *dev_path, const char *net_path);
-
-void nmwa_dbus_set_device (DBusConnection *connection, NetworkDevice *dev, const char *essid, NMEncKeyType key_type, const char *passphrase);
-void nmwa_dbus_create_network (DBusConnection *connection, NetworkDevice *dev, const char *essid, NMEncKeyType key_type, const char *passphrase);
-
-#endif
diff --git a/gnome/applet/applet-dbus-info.c b/gnome/applet/applet-dbus-info.c
deleted file mode 100644
index 1c9de7149d..0000000000
--- a/gnome/applet/applet-dbus-info.c
+++ /dev/null
@@ -1,1173 +0,0 @@
-/* -*- Mode: C; tab-width: 5; indent-tabs-mode: t; c-basic-offset: 5 -*- */
-/* NetworkManager Wireless Applet -- Display wireless access points and allow user control
- *
- * Dan Williams <dcbw@redhat.com>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- *
- * (C) Copyright 2004-2005 Red Hat, Inc.
- */
-
-
-#include <string.h>
-#include <stdio.h>
-#include <time.h>
-#include <glib.h>
-#include <glib/gi18n.h>
-#include <dbus/dbus.h>
-#include <gtk/gtk.h>
-#include <glade/glade.h>
-#include <gnome-keyring.h>
-
-#include "NetworkManager.h"
-#include "applet.h"
-#include "applet-dbus.h"
-#include "applet-dbus-info.h"
-#include "passphrase-dialog.h"
-#include "nm-utils.h"
-
-
-/*
- * nmi_network_type_valid
- *
- * Helper to validate network types NMI can deal with
- *
- */
-static inline gboolean nmi_network_type_valid (NMNetworkType type)
-{
- return ((type == NETWORK_TYPE_ALLOWED));
-}
-
-
-/*
- * nmi_dbus_create_error_message
- *
- * Make a DBus error message
- *
- */
-DBusMessage *nmi_dbus_create_error_message (DBusMessage *message, const char *exception_namespace,
- const char *exception, const char *format, ...)
-{
- char * exception_text;
- DBusMessage * reply_message;
- va_list args;
- char error_text[512];
-
- va_start (args, format);
- vsnprintf (error_text, 512, format, args);
- va_end (args);
-
- exception_text = g_strdup_printf ("%s.%s", exception_namespace, exception);
- reply_message = dbus_message_new_error (message, exception_text, error_text);
- g_free (exception_text);
-
- return (reply_message);
-}
-
-
-/*
- * nmi_dbus_get_network_key
- *
- * Grab the network's key from the keyring.
- *
- */
-static char *nmi_dbus_get_network_key (NMWirelessApplet *applet, const char *essid)
-{
- GnomeKeyringResult ret;
- GList * found_list = NULL;
- char * key = NULL;
-
- g_return_val_if_fail (applet != NULL, NULL);
- g_return_val_if_fail (essid != NULL, NULL);
-
- /* Get the essid key, if any, from the keyring */
- ret = gnome_keyring_find_itemsv_sync (GNOME_KEYRING_ITEM_GENERIC_SECRET,
- &found_list,
- "essid",
- GNOME_KEYRING_ATTRIBUTE_TYPE_STRING,
- essid,
- NULL);
- if (ret == GNOME_KEYRING_RESULT_OK)
- {
- GnomeKeyringFound *found = found_list->data;
- key = g_strdup (found->secret);
- gnome_keyring_found_list_free (found_list);
- }
-
- return key;
-}
-
-
-/*
- * nmi_dbus_get_key_for_network
- *
- * Throw up the user key dialog
- *
- */
-static DBusMessage * nmi_dbus_get_key_for_network (NMWirelessApplet *applet, DBusMessage *message)
-{
- char * dev_path = NULL;
- char * net_path = NULL;
- char * essid = NULL;
- int attempt = 0;
- gboolean new_key = FALSE;
- gboolean success = FALSE;
-
- if (dbus_message_get_args (message, NULL,
- DBUS_TYPE_OBJECT_PATH, &dev_path,
- DBUS_TYPE_OBJECT_PATH, &net_path,
- DBUS_TYPE_STRING, &essid,
- DBUS_TYPE_INT32, &attempt,
- DBUS_TYPE_BOOLEAN, &new_key,
- DBUS_TYPE_INVALID))
- {
- NetworkDevice *dev = NULL;
-
- if ((dev = nmwa_get_device_for_nm_path (applet->dbus_device_list, dev_path)))
- {
- WirelessNetwork *net = NULL;
-
- /* Try to get the key from the keyring. If we fail, ask for a new key. */
- if (!new_key)
- {
- char *key;
-
- if ((key = nmi_dbus_get_network_key (applet, essid)))
- {
- char * gconf_key;
- char * escaped_network;
- GConfValue * value;
- NMEncKeyType key_type = -1;
-
- /* Grab key type from GConf since we need it for return message */
- escaped_network = gconf_escape_key (essid, strlen (essid));
- gconf_key = g_strdup_printf ("%s/%s/key_type", GCONF_PATH_WIRELESS_NETWORKS, escaped_network);
- g_free (escaped_network);
- if ((value = gconf_client_get (applet->gconf_client, gconf_key, NULL)))
- {
- key_type = gconf_value_get_int (value);
- gconf_value_free (value);
- }
- g_free (gconf_key);
-
- nmi_dbus_return_user_key (applet->connection, message, key, key_type);
- g_free (key);
- success = TRUE;
- }
- else
- new_key = TRUE;
- }
-
- /* We only ask the user for a new key when we know about the network from NM,
- * since throwing up a dialog with a random essid from somewhere is a security issue.
- */
- if (new_key && (net = network_device_get_wireless_network_by_nm_path (dev, net_path)))
- success = nmi_passphrase_dialog_schedule_show (dev, net, message, applet);
- }
- }
-
- if (!success)
- return nmi_dbus_create_error_message (message, NMI_DBUS_INTERFACE, "GetKeyError", "Could not get user key for network.");
-
- return NULL;
-}
-
-
-/*
- * nmi_dbus_dbus_return_user_key
- *
- * Alert NetworkManager of the new user key
- *
- */
-void nmi_dbus_return_user_key (DBusConnection *connection, DBusMessage *message, const char *passphrase, const NMEncKeyType key_type)
-{
- DBusMessage * reply;
- const char * dev_path;
- const char * net_path;
- const int tmp_key_type = (int)key_type;
-
- g_return_if_fail (connection != NULL);
- g_return_if_fail (passphrase != NULL);
-
- if (!(reply = dbus_message_new_method_return (message)))
- {
- nm_warning ("nmi_dbus_return_user_key(): Couldn't allocate the dbus message");
- return;
- }
-
- dbus_message_append_args (reply, DBUS_TYPE_STRING, &passphrase, DBUS_TYPE_INT32, &tmp_key_type, DBUS_TYPE_INVALID);
- dbus_connection_send (connection, reply, NULL);
- dbus_message_unref (reply);
-}
-
-
-/*
- * nmi_dbus_signal_update_scan_method
- *
- * Signal NetworkManager that it needs to update its wireless scanning method
- *
- */
-void nmi_dbus_signal_update_scan_method (DBusConnection *connection)
-{
- DBusMessage *message;
-
- g_return_if_fail (connection != NULL);
-
- message = dbus_message_new_signal (NMI_DBUS_PATH, NMI_DBUS_INTERFACE, "WirelessScanMethodUpdate");
- if (!message)
- {
- nm_warning ("nmi_dbus_signal_update_scan_method(): Not enough memory for new dbus message!");
- return;
- }
-
- if (!dbus_connection_send (connection, message, NULL))
- nm_warning ("nmi_dbus_signal_update_scan_method(): Could not raise the 'WirelessScanMethodUpdate' signal!");
-
- dbus_message_unref (message);
-}
-
-
-/*
- * nmi_dbus_get_wireless_scan_method
- *
- * Tell NetworkManager what wireless scanning method it should use
- *
- */
-static DBusMessage *nmi_dbus_get_wireless_scan_method (NMWirelessApplet *applet, DBusMessage *message)
-{
- DBusMessage * reply = NULL;
- NMWirelessScanMethod method = NM_SCAN_METHOD_ALWAYS;
- GConfEntry * entry;
-
- g_return_val_if_fail (applet != NULL, NULL);
- g_return_val_if_fail (message != NULL, NULL);
-
- method = nmwa_gconf_get_wireless_scan_method (applet);
- reply = dbus_message_new_method_return (message);
- dbus_message_append_args (reply, DBUS_TYPE_UINT32, &method, DBUS_TYPE_INVALID);
-
- return (reply);
-}
-
-
-/*
- * nmi_dbus_signal_update_network
- *
- * Signal NetworkManager that it needs to update info associated with a particular
- * allowed/ignored network.
- *
- */
-void nmi_dbus_signal_update_network (DBusConnection *connection, const char *network, NMNetworkType type)
-{
- DBusMessage *message;
-
- g_return_if_fail (connection != NULL);
- g_return_if_fail (network != NULL);
-
- if (type != NETWORK_TYPE_ALLOWED)
- return;
-
- message = dbus_message_new_signal (NMI_DBUS_PATH, NMI_DBUS_INTERFACE, "WirelessNetworkUpdate");
- if (!message)
- {
- nm_warning ("nmi_dbus_signal_update_network(): Not enough memory for new dbus message!");
- return;
- }
-
- dbus_message_append_args (message, DBUS_TYPE_STRING, &network, DBUS_TYPE_INVALID);
- if (!dbus_connection_send (connection, message, NULL))
- nm_warning ("nmi_dbus_signal_update_network(): Could not raise the 'WirelessNetworkUpdate' signal!");
-
- dbus_message_unref (message);
-}
-
-
-/*
- * nmi_dbus_get_networks
- *
- * Grab a list of access points from GConf and return it in the form
- * of a string array in a dbus message.
- *
- */
-static DBusMessage *nmi_dbus_get_networks (NMWirelessApplet *applet, DBusMessage *message)
-{
- GSList *dir_list = NULL;
- GSList *element = NULL;
- DBusError error;
- DBusMessage *reply_message = NULL;
- DBusMessageIter iter;
- DBusMessageIter iter_array;
- NMNetworkType type;
-
- g_return_val_if_fail (applet != NULL, NULL);
- g_return_val_if_fail (message != NULL, NULL);
-
- dbus_error_init (&error);
- if ( !dbus_message_get_args (message, &error, DBUS_TYPE_INT32, &type, DBUS_TYPE_INVALID)
- || !nmi_network_type_valid (type))
- {
- reply_message = nmwa_dbus_create_error_message (message, NMI_DBUS_INTERFACE, "InvalidArguments",
- "NetworkManagerInfo::getNetworks called with invalid arguments.");
- return (reply_message);
- }
-
- /* List all allowed access points that gconf knows about */
- element = dir_list = gconf_client_all_dirs (applet->gconf_client, GCONF_PATH_WIRELESS_NETWORKS, NULL);
- if (!dir_list)
- {
- reply_message = nmwa_dbus_create_error_message (message, NMI_DBUS_INTERFACE, "NoNetworks",
- "There were are no wireless networks stored.");
- }
- else
- {
- gboolean value_added = FALSE;
-
- reply_message = dbus_message_new_method_return (message);
- dbus_message_iter_init_append (reply_message, &iter);
- dbus_message_iter_open_container (&iter, DBUS_TYPE_ARRAY, DBUS_TYPE_STRING_AS_STRING, &iter_array);
-
- /* Append the essid of every allowed or ignored access point we know of
- * to a string array in the dbus message.
- */
- while (element)
- {
- char key[100];
- GConfValue *value;
-
- g_snprintf (&key[0], 99, "%s/essid", (char *)(element->data));
- value = gconf_client_get (applet->gconf_client, key, NULL);
- if (value && gconf_value_get_string (value))
- {
- const gchar *essid;
- essid = gconf_value_get_string (value);
- dbus_message_iter_append_basic (&iter_array, DBUS_TYPE_STRING, &essid);
- value_added = TRUE;
- gconf_value_free (value);
- }
-
- g_free (element->data);
- element = element->next;
- }
- g_slist_free (dir_list);
-
- dbus_message_iter_close_container (&iter, &iter_array);
-
- if (!value_added)
- {
- dbus_message_unref (reply_message);
- reply_message = nmwa_dbus_create_error_message (message, NMI_DBUS_INTERFACE, "NoNetworks",
- "There were are no wireless networks stored.");
- }
- }
-
- return (reply_message);
-}
-
-
-/*
- * nmi_dbus_get_network_properties
- *
- * Returns the properties of a specific wireless network from gconf
- *
- */
-static DBusMessage *nmi_dbus_get_network_properties (NMWirelessApplet *applet, DBusMessage *message)
-{
- DBusMessage *reply = NULL;
- gchar *gconf_key = NULL;
- char *network = NULL;
- GConfValue *value;
- GConfValue *ap_addrs_value;
- DBusError error;
- NMNetworkType type;
- char *escaped_network;
- char *essid = NULL;
- gint timestamp = -1;
- gint32 i;
- NMEncKeyType key_type = -1;
- gboolean trusted = FALSE;
- NMDeviceAuthMethod auth_method = NM_DEVICE_AUTH_METHOD_UNKNOWN;
-
- g_return_val_if_fail (applet != NULL, NULL);
- g_return_val_if_fail (message != NULL, NULL);
-
- dbus_error_init (&error);
- if ( !dbus_message_get_args (message, &error, DBUS_TYPE_STRING, &network, DBUS_TYPE_INT32, &type, DBUS_TYPE_INVALID)
- || !nmi_network_type_valid (type)
- || (strlen (network) <= 0))
- {
- reply = nmwa_dbus_create_error_message (message, NMI_DBUS_INTERFACE, "InvalidArguments",
- "NetworkManagerInfo::getNetworkProperties called with invalid arguments.");
- return (reply);
- }
-
- escaped_network = gconf_escape_key (network, strlen (network));
-
- /* Grab essid key for our access point from GConf */
- gconf_key = g_strdup_printf ("%s/%s/essid", GCONF_PATH_WIRELESS_NETWORKS, escaped_network);
- if ((value = gconf_client_get (applet->gconf_client, gconf_key, NULL)))
- {
- essid = g_strdup (gconf_value_get_string (value));
- gconf_value_free (value);
- }
- g_free (gconf_key);
-
- /* Grab timestamp key for our access point from GConf */
- gconf_key = g_strdup_printf ("%s/%s/timestamp", GCONF_PATH_WIRELESS_NETWORKS, escaped_network);
- if ((value = gconf_client_get (applet->gconf_client, gconf_key, NULL)))
- {
- timestamp = gconf_value_get_int (value);
- gconf_value_free (value);
- }
- g_free (gconf_key);
-
- gconf_key = g_strdup_printf ("%s/%s/key_type", GCONF_PATH_WIRELESS_NETWORKS, escaped_network);
- if ((value = gconf_client_get (applet->gconf_client, gconf_key, NULL)))
- {
- key_type = gconf_value_get_int (value);
- gconf_value_free (value);
- }
- g_free (gconf_key);
-
- /* Grab the network's last authentication mode, if known */
- gconf_key = g_strdup_printf ("%s/%s/auth_method", GCONF_PATH_WIRELESS_NETWORKS, escaped_network);
- if ((value = gconf_client_get (applet->gconf_client, gconf_key, NULL)))
- {
- auth_method = gconf_value_get_int (value);
- gconf_value_free (value);
- }
- g_free (gconf_key);
-
- /* Grab the network's trusted status */
- gconf_key = g_strdup_printf ("%s/%s/trusted", GCONF_PATH_WIRELESS_NETWORKS, escaped_network);
- if ((value = gconf_client_get (applet->gconf_client, gconf_key, NULL)))
- {
- trusted = gconf_value_get_bool (value);
- gconf_value_free (value);
- }
- g_free (gconf_key);
-
- /* Grab the list of stored AP MAC addresses */
- gconf_key = g_strdup_printf ("%s/%s/addresses", GCONF_PATH_WIRELESS_NETWORKS, escaped_network);
- ap_addrs_value = gconf_client_get (applet->gconf_client, gconf_key, NULL);
- g_free (gconf_key);
-
- /* FIXME: key_type is always nonnegative as it is unsigned */
- if (!essid || (timestamp < 0) || (key_type < 0))
- {
- if (!essid)
- {
- reply = nmwa_dbus_create_error_message (message, NMI_DBUS_INTERFACE, "BadNetworkData",
- "NetworkManagerInfo::getNetworkProperties could not access essid for network '%s'", network);
- }
- else if (timestamp < 0)
- {
- reply = nmwa_dbus_create_error_message (message, NMI_DBUS_INTERFACE, "BadNetworkData",
- "NetworkManagerInfo::getNetworkProperties could not access timestamp for network '%s'", network);
- }
- /* FIXME: key_type is always nonnegative as it is unsigned */
- else if (key_type < 0)
- {
- reply = nmwa_dbus_create_error_message (message, NMI_DBUS_INTERFACE, "BadNetworkData",
- "NetworkManagerInfo::getNetworkProperties could not access key_type for network '%s'", network);
- }
- }
- else
- {
- DBusMessageIter iter, array_iter;
-
- reply = dbus_message_new_method_return (message);
-
- dbus_message_iter_init_append (reply, &iter);
-
- dbus_message_iter_append_basic (&iter, DBUS_TYPE_STRING, &essid);
- i = (gint32) timestamp;
- dbus_message_iter_append_basic (&iter, DBUS_TYPE_INT32, &i);
- i = (gint32) key_type;
- dbus_message_iter_append_basic (&iter, DBUS_TYPE_INT32, &i);
- i = (gint32) auth_method;
- dbus_message_iter_append_basic (&iter, DBUS_TYPE_INT32, &i);
- dbus_message_iter_append_basic (&iter, DBUS_TYPE_BOOLEAN, &trusted);
-
- dbus_message_iter_open_container (&iter, DBUS_TYPE_ARRAY, DBUS_TYPE_STRING_AS_STRING, &array_iter);
-
- /* Add a string array of access point MAC addresses if the array is valid */
- if ( ap_addrs_value
- && (ap_addrs_value->type == GCONF_VALUE_LIST)
- && (gconf_value_get_list_type (ap_addrs_value) == GCONF_VALUE_STRING))
- {
- GSList *list = gconf_value_get_list (ap_addrs_value);
- GSList *elt;
-
- for (elt = list; elt; elt = g_slist_next (elt))
- {
- const char *string;
- if ((string = gconf_value_get_string ((GConfValue *)elt->data)))
- dbus_message_iter_append_basic (&array_iter, DBUS_TYPE_STRING, &string);
- }
- }
-
- dbus_message_iter_close_container (&iter, &array_iter);
- }
-
- if (ap_addrs_value != NULL)
- gconf_value_free (ap_addrs_value);
-
- g_free (essid);
- g_free (escaped_network);
-
- return reply;
-}
-
-
-/*
- * nmi_dbus_signal_update_vpn_connection
- *
- * Signal NetworkManager that it needs to update info associated with a particular
- * VPN connection.
- *
- */
-void nmi_dbus_signal_update_vpn_connection (DBusConnection *connection, const char *name)
-{
- DBusMessage *message;
-
- g_return_if_fail (connection != NULL);
- g_return_if_fail (name != NULL);
-
- if (!(message = dbus_message_new_signal (NMI_DBUS_PATH, NMI_DBUS_INTERFACE, "VPNConnectionUpdate")))
- {
- nm_warning ("nmi_dbus_signal_update_vpn_connection(): Not enough memory for new dbus message!");
- return;
- }
-
- dbus_message_append_args (message, DBUS_TYPE_STRING, &name, DBUS_TYPE_INVALID);
- if (!dbus_connection_send (connection, message, NULL))
- nm_warning ("nmi_dbus_signal_update_vpn_connection(): Could not raise the 'VPNConnectionUpdate' signal!");
-
- dbus_message_unref (message);
-}
-
-
-/*
- * nmi_dbus_get_vpn_connections
- *
- * Grab a list of VPN connections from GConf and return it in the form
- * of a string array in a dbus message.
- *
- */
-static DBusMessage *nmi_dbus_get_vpn_connections (NMWirelessApplet *applet, DBusMessage *message)
-{
- GSList *dir_list = NULL;
- GSList *element = NULL;
- DBusError error;
- DBusMessage *reply = NULL;
- DBusMessageIter iter;
- DBusMessageIter iter_array;
-
- g_return_val_if_fail (applet != NULL, NULL);
- g_return_val_if_fail (message != NULL, NULL);
-
- dbus_error_init (&error);
-
- /*g_debug ("entering nmi_dbus_get_vpn_connections");*/
-
- /* List all VPN connections that gconf knows about */
- element = dir_list = gconf_client_all_dirs (applet->gconf_client, GCONF_PATH_VPN_CONNECTIONS, NULL);
- if (!dir_list)
- {
- reply = nmwa_dbus_create_error_message (message, NMI_DBUS_INTERFACE, "NoVPNConnections",
- "There are no VPN connections stored.");
- }
- else
- {
- gboolean value_added = FALSE;
-
- reply = dbus_message_new_method_return (message);
- dbus_message_iter_init_append (reply, &iter);
- dbus_message_iter_open_container (&iter, DBUS_TYPE_ARRAY, DBUS_TYPE_STRING_AS_STRING, &iter_array);
-
- /* Append the essid of every allowed or ignored access point we know of
- * to a string array in the dbus message.
- */
- while (element)
- {
- char key[100];
- GConfValue *value;
-
- g_snprintf (&key[0], 99, "%s/name", (char *)(element->data));
- value = gconf_client_get (applet->gconf_client, key, NULL);
- if (value && gconf_value_get_string (value))
- {
- const gchar *essid;
- essid = gconf_value_get_string (value);
- dbus_message_iter_append_basic (&iter_array, DBUS_TYPE_STRING, &essid);
- /*g_debug ("vpnid = '%s'", essid);*/
- value_added = TRUE;
- gconf_value_free (value);
- }
-
-
- g_free (element->data);
- element = element->next;
- }
- g_slist_free (dir_list);
-
- dbus_message_iter_close_container (&iter, &iter_array);
-
- if (!value_added)
- {
- dbus_message_unref (reply);
- reply = nmwa_dbus_create_error_message (message, NMI_DBUS_INTERFACE, "NoVPNConnections",
- "There are no VPN connections stored.");
- }
- }
-
- return (reply);
-}
-
-
-/*
- * nmi_dbus_get_vpn_connection_properties
- *
- * Returns the properties of a specific VPN connection from gconf
- *
- */
-static DBusMessage *nmi_dbus_get_vpn_connection_properties (NMWirelessApplet *applet, DBusMessage *message)
-{
- DBusMessage *reply = NULL;
- gchar *gconf_key = NULL;
- char *vpn_connection = NULL;
- GConfValue *value;
- DBusError error;
- char *escaped_name;
- char *name = NULL;
- char *service_name = NULL;
- const char *user_name = NULL;
-
- g_return_val_if_fail (applet != NULL, NULL);
- g_return_val_if_fail (message != NULL, NULL);
-
- dbus_error_init (&error);
- if ( !dbus_message_get_args (message, &error, DBUS_TYPE_STRING, &vpn_connection, DBUS_TYPE_INVALID)
- || (strlen (vpn_connection) <= 0))
- {
- reply = nmwa_dbus_create_error_message (message, NMI_DBUS_INTERFACE, "InvalidArguments",
- "NetworkManagerInfo::getVPNConnectionProperties called with invalid arguments.");
- return (reply);
- }
-
- escaped_name = gconf_escape_key (vpn_connection, strlen (vpn_connection));
-
- /*g_debug ("entering nmi_dbus_get_vpn_connection_properties for '%s'", escaped_name);*/
-
- /* User-visible name of connection */
- gconf_key = g_strdup_printf ("%s/%s/name", GCONF_PATH_VPN_CONNECTIONS, escaped_name);
- if ((value = gconf_client_get (applet->gconf_client, gconf_key, NULL)))
- {
- name = g_strdup (gconf_value_get_string (value));
- gconf_value_free (value);
- /*g_debug ("name '%s'", name);*/
- }
- g_free (gconf_key);
-
- /* Service name of connection */
- gconf_key = g_strdup_printf ("%s/%s/service_name", GCONF_PATH_VPN_CONNECTIONS, escaped_name);
- if ((value = gconf_client_get (applet->gconf_client, gconf_key, NULL)))
- {
- service_name = g_strdup (gconf_value_get_string (value));
- gconf_value_free (value);
- /*g_debug ("service '%s'", service_name);*/
- }
- g_free (gconf_key);
-
- /* User name of connection - use the logged in user */
- user_name = g_get_user_name ();
-
- if (!name)
- {
- reply = nmwa_dbus_create_error_message (message, NMI_DBUS_INTERFACE, "BadVPNConnectionData",
- "NetworkManagerInfo::getVPNConnectionProperties could not access the name for connection '%s'", vpn_connection);
- /*g_warning ("BadVPNConnectionData for '%s'", escaped_name);*/
- }
- else if (!service_name)
- {
- reply = nmwa_dbus_create_error_message (message, NMI_DBUS_INTERFACE, "BadVPNConnectionData",
- "NetworkManagerInfo::getVPNConnectionProperties could not access the service name for connection '%s'", vpn_connection);
- /*g_warning ("BadVPNConnectionData for '%s'", escaped_name);*/
- }
- else
- {
- DBusMessageIter iter, array_iter;
-
- reply = dbus_message_new_method_return (message);
- dbus_message_iter_init_append (reply, &iter);
- dbus_message_iter_append_basic (&iter, DBUS_TYPE_STRING, &name);
- dbus_message_iter_append_basic (&iter, DBUS_TYPE_STRING, &service_name);
- dbus_message_iter_append_basic (&iter, DBUS_TYPE_STRING, &user_name);
- }
-
- g_free (service_name);
- g_free (name);
- g_free (escaped_name);
-
- return (reply);
-}
-
-
-/*
- * nmi_dbus_get_vpn_connection_vpn_data
- *
- * Returns vpn-daemon specific properties for a particular VPN connection.
- *
- */
-static DBusMessage *nmi_dbus_get_vpn_connection_vpn_data (NMWirelessApplet *applet, DBusMessage *message)
-{
- DBusMessage *reply = NULL;
- gchar *gconf_key = NULL;
- char *name = NULL;
- GConfValue *vpn_data_value = NULL;
- GConfValue *value = NULL;
- DBusError error;
- char *escaped_name;
- DBusMessageIter iter, array_iter;
- GSList *elt;
-
- g_return_val_if_fail (applet != NULL, NULL);
- g_return_val_if_fail (message != NULL, NULL);
-
- dbus_error_init (&error);
- if ( !dbus_message_get_args (message, &error, DBUS_TYPE_STRING, &name, DBUS_TYPE_INVALID)
- || (strlen (name) <= 0))
- {
- reply = nmwa_dbus_create_error_message (message, NMI_DBUS_INTERFACE, "InvalidArguments",
- "NetworkManagerInfo::getVPNConnectionVPNData called with invalid arguments.");
- return reply;
- }
-
- escaped_name = gconf_escape_key (name, strlen (name));
-
- /* User-visible name of connection */
- gconf_key = g_strdup_printf ("%s/%s/name", GCONF_PATH_VPN_CONNECTIONS, escaped_name);
- if (!(value = gconf_client_get (applet->gconf_client, gconf_key, NULL)))
- {
- reply = nmwa_dbus_create_error_message (message, NMI_DBUS_INTERFACE, "BadVPNConnectionData",
- "NetworkManagerInfo::getVPNConnectionVPNData could not access the name for connection '%s'", name);
- return reply;
- }
- gconf_value_free (value);
- g_free (gconf_key);
-
- /* Grab vpn-daemon specific data */
- gconf_key = g_strdup_printf ("%s/%s/vpn_data", GCONF_PATH_VPN_CONNECTIONS, escaped_name);
- if (!(vpn_data_value = gconf_client_get (applet->gconf_client, gconf_key, NULL))
- || !(vpn_data_value->type == GCONF_VALUE_LIST)
- || !(gconf_value_get_list_type (vpn_data_value) == GCONF_VALUE_STRING))
- {
- reply = nmwa_dbus_create_error_message (message, NMI_DBUS_INTERFACE, "BadVPNConnectionData",
- "NetworkManagerInfo::getVPNConnectionVPNData could not access the VPN data for connection '%s'", name);
- if (vpn_data_value)
- gconf_value_free (vpn_data_value);
- return reply;
- }
- g_free (gconf_key);
-
- reply = dbus_message_new_method_return (message);
- dbus_message_iter_init_append (reply, &iter);
- dbus_message_iter_open_container (&iter, DBUS_TYPE_ARRAY, DBUS_TYPE_STRING_AS_STRING, &array_iter);
-
- for (elt = gconf_value_get_list (vpn_data_value); elt; elt = g_slist_next (elt))
- {
- const char *string = gconf_value_get_string ((GConfValue *)elt->data);
- if (string)
- dbus_message_iter_append_basic (&array_iter, DBUS_TYPE_STRING, &string);
- }
-
- dbus_message_iter_close_container (&iter, &array_iter);
-
- gconf_value_free (vpn_data_value);
- g_free (escaped_name);
-
- return (reply);
-}
-
-/*
- * nmi_dbus_get_vpn_connection_routes
- *
- * Returns routes for a particular VPN connection.
- *
- */
-static DBusMessage *nmi_dbus_get_vpn_connection_routes (NMWirelessApplet *applet, DBusMessage *message)
-{
- DBusMessage *reply = NULL;
- gchar *gconf_key = NULL;
- char *name = NULL;
- GConfValue *routes_value = NULL;
- GConfValue *value = NULL;
- DBusError error;
- char *escaped_name;
- DBusMessageIter iter, array_iter;
- GSList *elt;
-
- g_return_val_if_fail (applet != NULL, NULL);
- g_return_val_if_fail (message != NULL, NULL);
-
- dbus_error_init (&error);
- if ( !dbus_message_get_args (message, &error, DBUS_TYPE_STRING, &name, DBUS_TYPE_INVALID)
- || (strlen (name) <= 0))
- {
- reply = nmwa_dbus_create_error_message (message, NMI_DBUS_INTERFACE, "InvalidArguments",
- "NetworkManagerInfo::getVPNConnectionRoutes called with invalid arguments.");
- return reply;
- }
-
- escaped_name = gconf_escape_key (name, strlen (name));
-
- /* User-visible name of connection */
- gconf_key = g_strdup_printf ("%s/%s/name", GCONF_PATH_VPN_CONNECTIONS, escaped_name);
- if (!(value = gconf_client_get (applet->gconf_client, gconf_key, NULL)))
- {
- reply = nmwa_dbus_create_error_message (message, NMI_DBUS_INTERFACE, "BadVPNConnectionData",
- "NetworkManagerInfo::getVPNConnectionRoutes could not access the name for connection '%s'", name);
- return reply;
- }
- gconf_value_free (value);
- g_free (gconf_key);
-
- /* Grab vpn-daemon specific data */
- gconf_key = g_strdup_printf ("%s/%s/routes", GCONF_PATH_VPN_CONNECTIONS, escaped_name);
- if (!(routes_value = gconf_client_get (applet->gconf_client, gconf_key, NULL))
- || !(routes_value->type == GCONF_VALUE_LIST)
- || !(gconf_value_get_list_type (routes_value) == GCONF_VALUE_STRING))
- {
- reply = nmwa_dbus_create_error_message (message, NMI_DBUS_INTERFACE, "BadVPNConnectionData",
- "NetworkManagerInfo::getVPNConnectionRoutes could not access the routes for connection '%s'", name);
- if (routes_value)
- gconf_value_free (routes_value);
- return reply;
- }
- g_free (gconf_key);
-
- reply = dbus_message_new_method_return (message);
- dbus_message_iter_init_append (reply, &iter);
- dbus_message_iter_open_container (&iter, DBUS_TYPE_ARRAY, DBUS_TYPE_STRING_AS_STRING, &array_iter);
-
- for (elt = gconf_value_get_list (routes_value); elt; elt = g_slist_next (elt))
- {
- const char *string = gconf_value_get_string ((GConfValue *)elt->data);
- if (string)
- dbus_message_iter_append_basic (&array_iter, DBUS_TYPE_STRING, &string);
- }
-
- dbus_message_iter_close_container (&iter, &array_iter);
-
- gconf_value_free (routes_value);
- g_free (escaped_name);
-
- return (reply);
-}
-
-
-/*
- * nmi_save_network_info
- *
- * Save information about a wireless network in gconf and the gnome keyring.
- *
- */
-static void nmi_save_network_info (NMWirelessApplet *applet, const char *essid, const char *enc_key_source,
- const NMEncKeyType enc_key_type, const NMDeviceAuthMethod auth_method,
- gboolean user_requested)
-{
- char * key;
- GConfEntry * gconf_entry;
- char * escaped_network;
-
- g_return_if_fail (applet != NULL);
- g_return_if_fail (essid != NULL);
-
- escaped_network = gconf_escape_key (essid, strlen (essid));
- key = g_strdup_printf ("%s/%s", GCONF_PATH_WIRELESS_NETWORKS, escaped_network);
- gconf_entry = gconf_client_get_entry (applet->gconf_client, key, NULL, TRUE, NULL);
- g_free (key);
-
- if (gconf_entry)
- {
- GnomeKeyringAttributeList *attributes;
- GnomeKeyringAttribute attr;
- GnomeKeyringResult ret;
- const char *name;
- guint32 item_id;
-
- if (enc_key_source && strlen (enc_key_source)
- && (enc_key_type != NM_ENC_TYPE_UNKNOWN) && (enc_key_type != NM_ENC_TYPE_NONE))
- {
- /* Setup a request to the keyring to save the network passphrase */
- name = g_strdup_printf (_("Passphrase for wireless network %s"), essid);
- attributes = gnome_keyring_attribute_list_new ();
- attr.name = g_strdup ("essid"); /* FIXME: Do we need to free this ? */
- attr.type = GNOME_KEYRING_ATTRIBUTE_TYPE_STRING;
- attr.value.string = g_strdup (essid);
- g_array_append_val (attributes, attr);
-
- ret = gnome_keyring_item_create_sync (NULL,
- GNOME_KEYRING_ITEM_GENERIC_SECRET,
- name,
- attributes,
- enc_key_source,
- TRUE,
- &item_id);
- if (ret != GNOME_KEYRING_RESULT_OK)
- g_warning ("Error saving passphrase in keyring. Ret=%d", ret);
- else
- gnome_keyring_attribute_list_free (attributes);
- }
-
- gconf_entry_unref (gconf_entry);
-
- key = g_strdup_printf ("%s/%s/essid", GCONF_PATH_WIRELESS_NETWORKS, escaped_network);
- gconf_client_set_string (applet->gconf_client, key, essid, NULL);
- g_free (key);
-
- key = g_strdup_printf ("%s/%s/key_type", GCONF_PATH_WIRELESS_NETWORKS, escaped_network);
- gconf_client_set_int (applet->gconf_client, key, (int)enc_key_type, NULL);
- g_free (key);
-
- /* We only update the timestamp if the user requested a particular network, not if
- * NetworkManager decided to switch access points by itself.
- */
- if (user_requested)
- {
- key = g_strdup_printf ("%s/%s/timestamp", GCONF_PATH_WIRELESS_NETWORKS, escaped_network);
- gconf_client_set_int (applet->gconf_client, key, time (NULL), NULL);
- g_free (key);
- }
-
- if (auth_method != NM_DEVICE_AUTH_METHOD_UNKNOWN)
- {
- key = g_strdup_printf ("%s/%s/auth_method", GCONF_PATH_WIRELESS_NETWORKS, escaped_network);
- gconf_client_set_int (applet->gconf_client, key, auth_method, NULL);
- g_free (key);
- }
- }
- g_free (escaped_network);
-}
-
-
-
-/*
- * nmi_dbus_update_network_info
- *
- * Update a network's authentication method and encryption key in gconf & the keyring
- *
- */
-static void nmi_dbus_update_network_info (NMWirelessApplet *applet, DBusMessage *message)
-{
- DBusMessage * reply_message = NULL;
- char * network = NULL;
- NMDeviceAuthMethod auth_method = NM_DEVICE_AUTH_METHOD_UNKNOWN;
- char * enc_key_source = NULL;
- int enc_key_type = -1;
- char * key;
- gboolean user_requested;
- GConfValue * value;
- DBusError error;
- char * escaped_network;
- dbus_bool_t args_good;
-
- g_return_if_fail (applet != NULL);
- g_return_if_fail (message != NULL);
-
- dbus_error_init (&error);
- args_good = dbus_message_get_args (message, &error, DBUS_TYPE_STRING, &network,
- DBUS_TYPE_STRING, &enc_key_source,
- DBUS_TYPE_INT32, &enc_key_type,
- DBUS_TYPE_INT32, &auth_method,
- DBUS_TYPE_BOOLEAN, &user_requested,
- DBUS_TYPE_INVALID);
- if (!args_good || (strlen (network) <= 0) || (auth_method == NM_DEVICE_AUTH_METHOD_UNKNOWN))
- return;
- if (enc_key_source && strlen (enc_key_source) && ((enc_key_type == NM_ENC_TYPE_UNKNOWN) || (enc_key_type == NM_ENC_TYPE_NONE)))
- return;
-
- nmi_save_network_info (applet, network, enc_key_source, (NMEncKeyType) enc_key_type, auth_method, user_requested);
-}
-
-
-/*
- * nmi_dbus_add_network_address
- *
- * Add an AP's MAC address to a wireless network entry in gconf
- *
- */
-static DBusMessage *nmi_dbus_add_network_address (NMWirelessApplet *applet, DBusMessage *message)
-{
- DBusMessage *reply_message = NULL;
- char *network = NULL;
- NMNetworkType type;
- char *addr;
- char *key;
- GConfValue *value;
- DBusError error;
- char *escaped_network;
- GSList *new_mac_list = NULL;
- gboolean found = FALSE;
-
- g_return_val_if_fail (applet != NULL, NULL);
- g_return_val_if_fail (message != NULL, NULL);
-
- dbus_error_init (&error);
- if ( !dbus_message_get_args (message, &error, DBUS_TYPE_STRING, &network, DBUS_TYPE_INT32, &type, DBUS_TYPE_STRING, &addr, DBUS_TYPE_INVALID)
- || !nmi_network_type_valid (type)
- || (strlen (network) <= 0)
- || !addr
- || (strlen (addr) < 11))
- {
- reply_message = nmwa_dbus_create_error_message (message, NMI_DBUS_INTERFACE, "InvalidArguments",
- "NetworkManagerInfo::addNetworkAddress called with invalid arguments.");
- return (reply_message);
- }
-
- /* Force-set the essid too so that we have a semi-complete network entry */
- escaped_network = gconf_escape_key (network, strlen (network));
- key = g_strdup_printf ("%s/%s/essid", GCONF_PATH_WIRELESS_NETWORKS, escaped_network);
- value = gconf_client_get (applet->gconf_client, key, NULL);
-
- /* If the network doesn't already exist in GConf, add it and set its timestamp to now. */
- if (!value || (!value && (value->type == GCONF_VALUE_STRING)))
- {
- /* Set the essid of the network. */
- gconf_client_set_string (applet->gconf_client, key, network, NULL);
- g_free (key);
-
- /* Update timestamp on network */
- key = g_strdup_printf ("%s/%s/timestamp", GCONF_PATH_WIRELESS_NETWORKS, escaped_network);
- gconf_client_set_int (applet->gconf_client, key, time (NULL), NULL);
- }
- g_free (key);
-
- /* Get current list of access point MAC addresses for this AP from GConf */
- key = g_strdup_printf ("%s/%s/addresses", GCONF_PATH_WIRELESS_NETWORKS, escaped_network);
- value = gconf_client_get (applet->gconf_client, key, NULL);
- g_free (escaped_network);
-
- if (value && (value->type == GCONF_VALUE_LIST) && (gconf_value_get_list_type (value) == GCONF_VALUE_STRING))
- {
- GSList *elem;
-
- new_mac_list = gconf_client_get_list (applet->gconf_client, key, GCONF_VALUE_STRING, NULL);
- gconf_value_free (value);
-
- /* Ensure that the MAC isn't already in the list */
- elem = new_mac_list;
- while (elem)
- {
- if (elem->data && !strcmp (addr, elem->data))
- {
- found = TRUE;
- break;
- }
- elem = g_slist_next (elem);
- }
- }
-
- /* Add the new MAC address to the end of the list */
- if (!found)
- {
- new_mac_list = g_slist_append (new_mac_list, g_strdup (addr));
- gconf_client_set_list (applet->gconf_client, key, GCONF_VALUE_STRING, new_mac_list, NULL);
- }
-
- /* Free the list, since gconf_client_set_list deep-copies it */
- g_slist_foreach (new_mac_list, (GFunc)g_free, NULL);
- g_slist_free (new_mac_list);
-
- g_free (key);
-
- return (NULL);
-}
-
-
-/*
- * nmi_dbus_info_message_handler
- *
- * Respond to requests against the NetworkManagerInfo object
- *
- */
-DBusHandlerResult nmi_dbus_info_message_handler (DBusConnection *connection, DBusMessage *message, void *user_data)
-{
- const char * method;
- const char * path;
- NMWirelessApplet * applet = (NMWirelessApplet *)user_data;
- DBusMessage * reply = NULL;
-
- g_return_val_if_fail (applet != NULL, DBUS_HANDLER_RESULT_HANDLED);
-
- method = dbus_message_get_member (message);
- path = dbus_message_get_path (message);
-
-/* nm_warning ("nmi_dbus_nmi_message_handler() got method %s for path %s", method, path); */
-
- if (strcmp ("getKeyForNetwork", method) == 0)
- reply = nmi_dbus_get_key_for_network (applet, message);
- else if (strcmp ("cancelGetKeyForNetwork", method) == 0)
- nmi_passphrase_dialog_schedule_cancel (applet);
-#if 0 /* Not used at this time */
- else if (strcmp ("networkNotFound", method) == 0)
- {
- const char * network;
- DBusError error;
-
- dbus_error_init (&error);
- if (dbus_message_get_args (message, &error, DBUS_TYPE_STRING, &network, DBUS_TYPE_INVALID))
- {
- GtkDialog *dialog;
- char *text;
-
- dbus_error_free (&error);
- text = g_strdup_printf (_("The requested wireless network '%s' does not appear to be in range. "
- "A different wireless network will be used if any are available."), network);
-
- dialog = GTK_DIALOG (gtk_message_dialog_new (NULL, 0, GTK_MESSAGE_ERROR, GTK_BUTTONS_OK, text, NULL));
- gtk_dialog_run (dialog);
- gtk_widget_destroy (GTK_WIDGET (dialog));
- }
- }
-#endif
- else if (strcmp ("getWirelessScanMethod", method) == 0)
- reply = nmi_dbus_get_wireless_scan_method (applet, message);
- else if (strcmp ("getNetworks", method) == 0)
- reply = nmi_dbus_get_networks (applet, message);
- else if (strcmp ("getNetworkProperties", method) == 0)
- reply = nmi_dbus_get_network_properties (applet, message);
- else if (strcmp ("updateNetworkInfo", method) == 0)
- nmi_dbus_update_network_info (applet, message);
- else if (strcmp ("addNetworkAddress", method) == 0)
- nmi_dbus_add_network_address (applet, message);
- else if (strcmp ("getVPNConnections", method) == 0)
- reply = nmi_dbus_get_vpn_connections (applet, message);
- else if (strcmp ("getVPNConnectionProperties", method) == 0)
- reply = nmi_dbus_get_vpn_connection_properties (applet, message);
- else if (strcmp ("getVPNConnectionVPNData", method) == 0)
- reply = nmi_dbus_get_vpn_connection_vpn_data (applet, message);
- else if (strcmp ("getVPNConnectionRoutes", method) == 0)
- reply = nmi_dbus_get_vpn_connection_routes (applet, message);
-
- if (reply)
- {
- dbus_connection_send (connection, reply, NULL);
- dbus_message_unref (reply);
- }
-
- return (DBUS_HANDLER_RESULT_HANDLED);
-}
-
diff --git a/gnome/applet/applet-dbus-info.h b/gnome/applet/applet-dbus-info.h
deleted file mode 100644
index f5114241c8..0000000000
--- a/gnome/applet/applet-dbus-info.h
+++ /dev/null
@@ -1,41 +0,0 @@
-/* -*- Mode: C; tab-width: 5; indent-tabs-mode: t; c-basic-offset: 5 -*- */
-/* NetworkManager Wireless Applet -- Display wireless access points and allow user control
- *
- * Dan Williams <dcbw@redhat.com>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- *
- * (C) Copyright 2004-2005 Red Hat, Inc.
- */
-
-#ifndef APPLET_DBUS_INFO_H
-#define APPLET_DBUS_INFO_H
-
-#include <dbus/dbus.h>
-#include "nm-device.h"
-#include "wireless-network.h"
-#include "NetworkManager.h"
-
-DBusHandlerResult nmi_dbus_info_message_handler (DBusConnection *connection, DBusMessage *message, void *user_data);
-
-void nmi_dbus_return_user_key (DBusConnection *connection, DBusMessage *message, const char *passphrase, const NMEncKeyType key_type);
-
-void nmi_dbus_signal_update_scan_method (DBusConnection *connection);
-
-void nmi_dbus_signal_update_network (DBusConnection *connection, const char *network, NMNetworkType type);
-
-void nmi_dbus_signal_update_vpn_connection (DBusConnection *connection, const char *name);
-
-#endif
diff --git a/gnome/applet/applet-dbus-vpn.c b/gnome/applet/applet-dbus-vpn.c
deleted file mode 100644
index 727cf0eaba..0000000000
--- a/gnome/applet/applet-dbus-vpn.c
+++ /dev/null
@@ -1,519 +0,0 @@
-/* -*- Mode: C; tab-width: 5; indent-tabs-mode: t; c-basic-offset: 5 -*- */
-/* NetworkManager Wireless Applet -- Display wireless access points and allow user control
- *
- * Dan Williams <dcbw@redhat.com>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- *
- * (C) Copyright 2004-2005 Red Hat, Inc.
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <glib/gi18n.h>
-#include <stdio.h>
-#include <string.h>
-#include <dbus/dbus.h>
-#include "applet-dbus-vpn.h"
-#include "applet-dbus.h"
-#include "applet.h"
-#include "vpn-connection.h"
-#include "nm-utils.h"
-
-static void nmwa_free_gui_vpn_connections (NMWirelessApplet *applet);
-static void nmwa_free_dbus_vpn_connections (NMWirelessApplet *applet);
-static void nmwa_dbus_vpn_schedule_copy (NMWirelessApplet *applet);
-
-/*
- * nmwa_dbus_vpn_get_active_vpn_connection_cb
- *
- * Callback from nmwa_dbus_vpn_get_active_vpn_connection
- *
- */
-static void nmwa_dbus_vpn_get_active_vpn_connection_cb (DBusPendingCall *pcall, void *user_data)
-{
- DBusMessage * reply;
- NMWirelessApplet * applet = (NMWirelessApplet *) user_data;
- const char * act_vpn;
-
- g_return_if_fail (pcall != NULL);
- g_return_if_fail (applet != NULL);
-
- dbus_pending_call_ref (pcall);
-
- if (!dbus_pending_call_get_completed (pcall))
- goto out;
-
- if (!(reply = dbus_pending_call_steal_reply (pcall)))
- goto out;
-
- if ( dbus_message_is_error (reply, NM_DBUS_NO_ACTIVE_VPN_CONNECTION)
- || dbus_message_is_error (reply, NM_DBUS_NO_VPN_CONNECTIONS))
- {
- /* Remove the active VPN connection if one exists */
- if (applet->dbus_active_vpn_name)
- {
- g_free (applet->dbus_active_vpn_name);
- applet->dbus_active_vpn_name = NULL;
- }
-
- dbus_message_unref (reply);
- goto out;
- }
-
- if (dbus_message_get_args (reply, NULL, DBUS_TYPE_STRING, &act_vpn, DBUS_TYPE_INVALID))
- {
- g_free (applet->dbus_active_vpn_name);
- if (strlen (act_vpn))
- applet->dbus_active_vpn_name = g_strdup (act_vpn);
- else
- applet->dbus_active_vpn_name = NULL;
- }
- dbus_message_unref (reply);
-
-out:
- applet->vpn_pending_call_list = g_slist_remove (applet->vpn_pending_call_list, pcall);
- nmwa_dbus_vpn_schedule_copy (applet);
-
- dbus_pending_call_unref (pcall);
-}
-
-
-/*
- * nmwa_dbus_vpn_get_active_vpn_connection
- *
- * Get the active VPN connection from NetworkManager
- *
- */
-void nmwa_dbus_vpn_get_active_vpn_connection (NMWirelessApplet *applet)
-{
- DBusMessage * message;
- DBusPendingCall * pcall = NULL;
-
- g_return_if_fail (applet != NULL);
-
- if ((message = dbus_message_new_method_call (NM_DBUS_SERVICE, NM_DBUS_PATH_VPN, NM_DBUS_INTERFACE_VPN, "getActiveVPNConnection")))
- {
- dbus_connection_send_with_reply (applet->connection, message, &pcall, -1);
- dbus_message_unref (message);
- if (pcall)
- {
- dbus_pending_call_set_notify (pcall, nmwa_dbus_vpn_get_active_vpn_connection_cb, applet, NULL);
- applet->vpn_pending_call_list = g_slist_append (applet->vpn_pending_call_list, pcall);
- }
- }
-}
-
-
-typedef struct VpnPropsCBData
-{
- NMWirelessApplet * applet;
- char * name;
-} VpnPropsCBData;
-
-static void free_vpn_props_cb_data (VpnPropsCBData *data)
-{
- if (data)
- {
- g_free (data->name);
- memset (data, 0, sizeof (VpnPropsCBData));
- g_free (data);
- }
-}
-
-/*
- * nmwa_dbus_vpn_properties_cb
- *
- * Callback for each VPN connection we called "getVPNConnectionProperties" on.
- *
- */
-static void nmwa_dbus_vpn_properties_cb (DBusPendingCall *pcall, void *user_data)
-{
- DBusMessage * reply;
- VpnPropsCBData * cb_data = user_data;
- NMWirelessApplet * applet;
- const char * name;
- const char * user_name;
- const char * service;
-
- g_return_if_fail (pcall != NULL);
- g_return_if_fail (cb_data != NULL);
- g_return_if_fail (cb_data->applet != NULL);
- g_return_if_fail (cb_data->name != NULL);
-
- dbus_pending_call_ref (pcall);
-
- applet = cb_data->applet;
-
- if (!dbus_pending_call_get_completed (pcall))
- goto out;
-
- if (!(reply = dbus_pending_call_steal_reply (pcall)))
- goto out;
-
- if (dbus_message_get_type (reply) == DBUS_MESSAGE_TYPE_ERROR)
- {
- if (dbus_message_is_error (reply, NM_DBUS_INVALID_VPN_CONNECTION))
- {
- VPNConnection * vpn;
-
- if (applet->dbus_active_vpn_name && cb_data->name && !strcmp (applet->dbus_active_vpn_name, cb_data->name))
- {
- g_free (applet->dbus_active_vpn_name);
- applet->dbus_active_vpn_name = NULL;
- }
- }
-
- dbus_message_unref (reply);
- goto out;
- }
-
- if (dbus_message_get_args (reply, NULL, DBUS_TYPE_STRING, &name, DBUS_TYPE_STRING, &user_name, DBUS_TYPE_STRING, &service, DBUS_TYPE_INVALID))
- {
- VPNConnection * vpn;
-
- /* If its already there, update the service, otherwise add it to the list */
- if ((vpn = nmwa_vpn_connection_find_by_name (applet->dbus_vpn_connections, name)))
- {
- nmwa_vpn_connection_set_service (vpn, service);
- }
- else
- {
- vpn = nmwa_vpn_connection_new (name);
- nmwa_vpn_connection_set_service (vpn, service);
- applet->dbus_vpn_connections = g_slist_append (applet->dbus_vpn_connections, vpn);
- }
- }
- dbus_message_unref (reply);
-
-out:
- applet->vpn_pending_call_list = g_slist_remove (applet->vpn_pending_call_list, pcall);
- nmwa_dbus_vpn_schedule_copy (applet);
-
- dbus_pending_call_unref (pcall);
-}
-
-
-/*
- * nmwa_dbus_vpn_update_one_vpn_connection
- *
- * Get properties on one VPN connection
- *
- */
-void nmwa_dbus_vpn_update_one_vpn_connection (NMWirelessApplet *applet, const char *vpn_name)
-{
- DBusMessage * message;
- DBusPendingCall * pcall = NULL;
-
- g_return_if_fail (applet != NULL);
- g_return_if_fail (vpn_name != NULL);
-
- nmwa_dbus_vpn_get_active_vpn_connection (applet);
-
- if ((message = dbus_message_new_method_call (NM_DBUS_SERVICE, NM_DBUS_PATH_VPN, NM_DBUS_INTERFACE_VPN, "getVPNConnectionProperties")))
- {
- dbus_message_append_args (message, DBUS_TYPE_STRING, &vpn_name, DBUS_TYPE_INVALID);
- dbus_connection_send_with_reply (applet->connection, message, &pcall, -1);
- dbus_message_unref (message);
- if (pcall)
- {
- VpnPropsCBData * cb_data = g_malloc0 (sizeof (VpnPropsCBData));
-
- cb_data->applet = applet;
- cb_data->name = g_strdup (vpn_name);
- dbus_pending_call_set_notify (pcall, nmwa_dbus_vpn_properties_cb, cb_data, (DBusFreeFunction) free_vpn_props_cb_data);
- applet->vpn_pending_call_list = g_slist_append (applet->vpn_pending_call_list, pcall);
- }
- }
-}
-
-
-/*
- * nmwa_dbus_vpn_update_vpn_connections_cb
- *
- * nmwa_dbus_vpn_update_vpn_connections callback.
- *
- */
-static void nmwa_dbus_vpn_update_vpn_connections_cb (DBusPendingCall *pcall, void *user_data)
-{
- DBusMessage * reply;
- NMWirelessApplet * applet = (NMWirelessApplet *) user_data;
- char ** vpn_names;
- int num_vpn_names;
-
- g_return_if_fail (pcall != NULL);
- g_return_if_fail (applet != NULL);
-
- dbus_pending_call_ref (pcall);
-
- if (!dbus_pending_call_get_completed (pcall))
- goto out;
-
- if (!(reply = dbus_pending_call_steal_reply (pcall)))
- goto out;
-
- if (dbus_message_is_error (reply, NM_DBUS_NO_VPN_CONNECTIONS))
- {
- dbus_message_unref (reply);
- goto out;
- }
-
- if (dbus_message_get_args (reply, NULL, DBUS_TYPE_ARRAY, DBUS_TYPE_STRING, &vpn_names, &num_vpn_names, DBUS_TYPE_INVALID))
- {
- char ** item;
-
- /* For each connection, fire off a "getVPNConnectionProperties" call */
- for (item = vpn_names; *item; item++)
- nmwa_dbus_vpn_update_one_vpn_connection (applet, *item);
-
- dbus_free_string_array (vpn_names);
- }
- dbus_message_unref (reply);
-
-out:
- applet->vpn_pending_call_list = g_slist_remove (applet->vpn_pending_call_list, pcall);
- nmwa_dbus_vpn_schedule_copy (applet);
-
- dbus_pending_call_unref (pcall);
-}
-
-
-/*
- * nmwa_dbus_vpn_update_vpn_connections
- *
- * Do a full update of vpn connections from NetworkManager
- *
- */
-void nmwa_dbus_vpn_update_vpn_connections (NMWirelessApplet *applet)
-{
- DBusMessage * message;
- DBusPendingCall * pcall;
-
- nmwa_free_dbus_vpn_connections (applet);
-
- nmwa_dbus_vpn_get_active_vpn_connection (applet);
-
- if ((message = dbus_message_new_method_call (NM_DBUS_SERVICE, NM_DBUS_PATH_VPN, NM_DBUS_INTERFACE_VPN, "getVPNConnections")))
- {
- dbus_connection_send_with_reply (applet->connection, message, &pcall, -1);
- dbus_message_unref (message);
- if (pcall)
- {
- dbus_pending_call_set_notify (pcall, nmwa_dbus_vpn_update_vpn_connections_cb, applet, NULL);
- applet->vpn_pending_call_list = g_slist_append (applet->vpn_pending_call_list, pcall);
- }
- }
-}
-
-
-/*
- * nmwa_dbus_vpn_remove_one_vpn_connection
- *
- * Remove one vpn connection from the list
- *
- */
-void nmwa_dbus_vpn_remove_one_vpn_connection (NMWirelessApplet *applet, const char *vpn_name)
-{
- VPNConnection * vpn;
-
- g_return_if_fail (applet != NULL);
- g_return_if_fail (vpn_name != NULL);
-
- if ((vpn = nmwa_vpn_connection_find_by_name (applet->dbus_vpn_connections, vpn_name)))
- {
- applet->dbus_vpn_connections = g_slist_remove (applet->dbus_vpn_connections, vpn);
- if (applet->dbus_active_vpn_name != NULL &&
- !strcmp (applet->dbus_active_vpn_name, nmwa_vpn_connection_get_name (vpn)))
- {
- g_free (applet->dbus_active_vpn_name);
- applet->dbus_active_vpn_name = NULL;
- }
- nmwa_vpn_connection_unref (vpn);
- nmwa_dbus_vpn_schedule_copy (applet);
- }
-}
-
-
-static int vpn_copy_idle_id = 0;
-
-/*
- * nmwa_dbus_vpn_connections_lock_and_copy
- *
- * Copy VPN connections over to gui side.
- *
- */
-static gboolean nmwa_dbus_vpn_connections_lock_and_copy (NMWirelessApplet *applet)
-{
- vpn_copy_idle_id = 0;
-
- g_return_val_if_fail (applet != NULL, FALSE);
-
- /* Only copy over if we have a complete data model */
- if (g_slist_length (applet->vpn_pending_call_list) == 0)
- {
- VPNConnection * act_vpn = NULL;
- GSList * elt;
-
- /* Match up the active vpn with a device in the list */
- if (applet->dbus_active_vpn_name)
- act_vpn = nmwa_vpn_connection_find_by_name (applet->dbus_vpn_connections, applet->dbus_active_vpn_name);
-
- /* Now copy the data over to the GUI side */
- g_mutex_lock (applet->data_mutex);
-
- nmwa_free_gui_vpn_connections (applet);
-
- /* Deep-copy VPN connections to GUI data model */
- for (elt = applet->dbus_vpn_connections; elt; elt = g_slist_next (elt))
- {
- VPNConnection *src_vpn = elt->data;
- VPNConnection *new_vpn;
-
- new_vpn = nmwa_vpn_connection_copy (src_vpn);
- if (new_vpn)
- {
- applet->gui_vpn_connections = g_slist_append (applet->gui_vpn_connections, new_vpn);
- if (src_vpn == act_vpn)
- {
- nmwa_vpn_connection_ref (new_vpn);
- applet->gui_active_vpn = new_vpn;
- }
- }
- }
-
- g_mutex_unlock (applet->data_mutex);
- }
-
- return FALSE;
-}
-
-/*
- * nmwa_dbus_vpn_schedule_copy
- *
- * Schedule a copy VPN connections over to gui side, batching requests.
- *
- */
-static void nmwa_dbus_vpn_schedule_copy (NMWirelessApplet *applet)
-{
- g_return_if_fail (applet != NULL);
-
- if (vpn_copy_idle_id == 0)
- {
- GSource *source = g_idle_source_new ();
-
- /* We want this idle source to run before any other idle source */
- g_source_set_priority (source, G_PRIORITY_HIGH_IDLE);
- g_source_set_callback (source, (GSourceFunc) nmwa_dbus_vpn_connections_lock_and_copy, applet, NULL);
- vpn_copy_idle_id = g_source_attach (source, applet->thread_context);
- g_source_unref (source);
- }
-}
-
-
-static void nmwa_free_gui_vpn_connections (NMWirelessApplet *applet)
-{
- g_return_if_fail (applet != NULL);
-
- if (applet->gui_active_vpn)
- nmwa_vpn_connection_unref (applet->gui_active_vpn);
- applet->gui_active_vpn = NULL;
-
- if (applet->gui_vpn_connections)
- {
- g_slist_foreach (applet->gui_vpn_connections, (GFunc) nmwa_vpn_connection_unref, NULL);
- g_slist_free (applet->gui_vpn_connections);
- applet->gui_vpn_connections = NULL;
- }
-}
-
-
-static void nmwa_free_dbus_vpn_connections (NMWirelessApplet *applet)
-{
- GSList *elt;
-
- g_return_if_fail (applet != NULL);
-
- g_free (applet->dbus_active_vpn_name);
- applet->dbus_active_vpn_name = NULL;
-
- if (applet->dbus_vpn_connections)
- {
- g_slist_foreach (applet->dbus_vpn_connections, (GFunc) nmwa_vpn_connection_unref, NULL);
- g_slist_free (applet->dbus_vpn_connections);
- applet->dbus_vpn_connections = NULL;
- }
-}
-
-
-/*
- * nmwa_dbus_vpn_activate_connection
- *
- * Tell NetworkManager to activate a particular VPN connection.
- *
- */
-void nmwa_dbus_vpn_activate_connection (DBusConnection *connection, const char *name, GSList *passwords)
-{
- DBusMessage *message;
- DBusMessageIter iter;
- DBusMessageIter iter_array;
-
- g_return_if_fail (connection != NULL);
- g_return_if_fail (name != NULL);
- g_return_if_fail (passwords != NULL);
-
- if ((message = dbus_message_new_method_call (NM_DBUS_SERVICE, NM_DBUS_PATH_VPN, NM_DBUS_INTERFACE_VPN, "activateVPNConnection")))
- {
- GSList *i;
-
- nm_info ("Activating VPN connection '%s'.\n", name);
- dbus_message_iter_init_append (message, &iter);
- dbus_message_iter_append_basic (&iter, DBUS_TYPE_STRING, &name);
- dbus_message_iter_open_container (&iter, DBUS_TYPE_ARRAY, DBUS_TYPE_STRING_AS_STRING, &iter_array);
-
- for (i = passwords; i != NULL; i = g_slist_next (i)) {
- dbus_message_iter_append_basic (&iter_array, DBUS_TYPE_STRING, &(i->data));
- }
- dbus_message_iter_close_container (&iter, &iter_array);
- dbus_connection_send (connection, message, NULL);
- }
- else
- nm_warning ("nmwa_dbus_activate_vpn_connection(): Couldn't allocate the dbus message\n");
-}
-
-
-/*
- * nmwa_dbus_deactivate_vpn_connection
- *
- * Tell NetworkManager to deactivate the currently active VPN connection.
- *
- */
-void nmwa_dbus_vpn_deactivate_connection (DBusConnection *connection)
-{
- DBusMessage *message;
-
- g_return_if_fail (connection != NULL);
-
- if ((message = dbus_message_new_method_call (NM_DBUS_SERVICE, NM_DBUS_PATH_VPN, NM_DBUS_INTERFACE_VPN, "deactivateVPNConnection")))
- {
- nm_info ("Deactivating the current VPN connection.\n");
- dbus_connection_send (connection, message, NULL);
- }
- else
- nm_warning ("nmwa_dbus_activate_vpn_connection(): Couldn't allocate the dbus message\n");
-}
-
-
diff --git a/gnome/applet/applet-dbus-vpn.h b/gnome/applet/applet-dbus-vpn.h
deleted file mode 100644
index b12efa103e..0000000000
--- a/gnome/applet/applet-dbus-vpn.h
+++ /dev/null
@@ -1,39 +0,0 @@
-/* -*- Mode: C; tab-width: 5; indent-tabs-mode: t; c-basic-offset: 5 -*- */
-/* NetworkManager Wireless Applet -- Display wireless access points and allow user control
- *
- * Dan Williams <dcbw@redhat.com>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- *
- * (C) Copyright 2004-2005 Red Hat, Inc.
- */
-
-#ifndef APPLET_DBUS_VPN_H
-#define APPLET_DBUS_VPN_H
-
-#include <glib.h>
-#include <dbus/dbus.h>
-#include "vpn-connection.h"
-
-void nmwa_dbus_vpn_update_one_vpn_connection (NMWirelessApplet *applet, const char *vpn_name);
-void nmwa_dbus_vpn_update_vpn_connections (NMWirelessApplet *applet);
-void nmwa_dbus_vpn_remove_one_vpn_connection (NMWirelessApplet *applet, const char *vpn_name);
-void nmwa_dbus_vpn_get_active_vpn_connection (NMWirelessApplet *applet);
-
-void nmwa_dbus_vpn_activate_connection (DBusConnection *connection, const char *name, GSList *passwords);
-void nmwa_dbus_vpn_deactivate_connection (DBusConnection *connection);
-
-
-#endif
diff --git a/gnome/applet/applet-dbus.c b/gnome/applet/applet-dbus.c
deleted file mode 100644
index 9deb511eb8..0000000000
--- a/gnome/applet/applet-dbus.c
+++ /dev/null
@@ -1,805 +0,0 @@
-/* NetworkManager Wireless Applet -- Display wireless access points and allow user control
- *
- * Dan Williams <dcbw@redhat.com>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- *
- * (C) Copyright 2004 Red Hat, Inc.
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <glib.h>
-#include <glib/gi18n.h>
-#include <stdio.h>
-#include <string.h>
-#include <stdarg.h>
-#include <dbus/dbus.h>
-#include <dbus/dbus-glib-lowlevel.h>
-#include "applet.h"
-#include "applet-dbus.h"
-#include "applet-dbus-devices.h"
-#include "applet-dbus-vpn.h"
-#include "applet-dbus-info.h"
-#include "vpn-connection.h"
-#include "passphrase-dialog.h"
-#include "nm-utils.h"
-
-#define DBUS_NO_SERVICE_ERROR "org.freedesktop.DBus.Error.ServiceDoesNotExist"
-
-
-/*
- * nmi_dbus_create_error_message
- *
- * Convenience function to make a DBus error message
- *
- */
-DBusMessage *nmwa_dbus_create_error_message (DBusMessage *message, const char *exception_namespace, const char *exception, const char *format, ...)
-{
- char * exception_text;
- DBusMessage * reply_message;
- va_list args;
- char error_text[512];
-
-
- va_start (args, format);
- vsnprintf (error_text, 512, format, args);
- va_end (args);
-
- exception_text = g_strdup_printf ("%s.%s", exception_namespace, exception);
- reply_message = dbus_message_new_error (message, exception_text, error_text);
- g_free (exception_text);
-
- return (reply_message);
-}
-
-
-/*
- * deal_with_dbus_error
- *
- * Ignore some common dbus errors
- *
- */
-static int deal_with_dbus_error (const char *function, const char *method, DBusError *error)
-{
- int ret = RETURN_FAILURE;
-
- if (!strcmp (error->name, DBUS_NO_SERVICE_ERROR))
- ret = RETURN_NO_NM;
- else if (!strcmp (error->name, NM_DBUS_NO_ACTIVE_NET_ERROR))
- ret = RETURN_SUCCESS;
- else if (!strcmp (error->name, NM_DBUS_NO_ACTIVE_DEVICE_ERROR))
- ret = RETURN_SUCCESS;
- else if (!strcmp (error->name, NM_DBUS_NO_NETWORKS_ERROR))
- ret = RETURN_SUCCESS;
- else if (!strcmp (error->name, NM_DBUS_NO_ACTIVE_VPN_CONNECTION))
- ret = RETURN_SUCCESS;
- else if (!strcmp (error->name, NM_DBUS_NO_VPN_CONNECTIONS))
- ret = RETURN_SUCCESS;
-
- if ((ret != RETURN_SUCCESS) && (ret != RETURN_NO_NM))
- nm_warning ("%s(): %s raised on method '%s':\n %s\n\n", function, error->name, method, error->message);
-
- return ret;
-}
-
-/*
- * nmwa_dbus_call_method_string
- *
- * Do a method call on NetworkManager that returns a string.
- *
- * Returns: RETURN_SUCCESS on success
- * RETURN_FAILURE on failure
- * RETURN_NO_NM if NetworkManager service no longer exists
- */
-int nmwa_dbus_call_method_string (DBusConnection *con, const char *path, const char *interface, const char *method, gboolean is_obj_path, char **string)
-{
- DBusMessage * message;
- DBusMessage * reply;
- DBusError error;
- char * dbus_string = NULL;
-
- g_return_val_if_fail (con != NULL, RETURN_FAILURE);
- g_return_val_if_fail (path != NULL, RETURN_FAILURE);
- g_return_val_if_fail (method != NULL, RETURN_FAILURE);
- g_return_val_if_fail (string != NULL, RETURN_FAILURE);
- g_return_val_if_fail (*string == NULL, RETURN_FAILURE);
-
- if (!(message = dbus_message_new_method_call (NM_DBUS_SERVICE, path, interface, method)))
- {
- nm_warning ("nmwa_dbus_call_method_string(): Couldn't allocate the dbus message\n");
- return (RETURN_FAILURE);
- }
-
- dbus_error_init (&error);
- reply = dbus_connection_send_with_reply_and_block (con, message, -1, &error);
- dbus_message_unref (message);
- if (dbus_error_is_set (&error))
- {
- int ret = deal_with_dbus_error (__FUNCTION__, method, &error);
- dbus_error_free (&error);
- return (ret);
- }
-
- if (reply == NULL)
- {
- nm_warning ("nmwa_dbus_call_method_string(): dbus reply message was NULL\n" );
- return (RETURN_FAILURE);
- }
-
- dbus_error_init (&error);
- dbus_message_get_args (reply, &error, is_obj_path ? DBUS_TYPE_OBJECT_PATH : DBUS_TYPE_STRING, &dbus_string, DBUS_TYPE_INVALID);
- if (dbus_error_is_set (&error))
- {
- nm_warning ("nmwa_dbus_call_method_string(): error while getting args: name='%s' message='%s'\n", error.name, error.message);
- if (dbus_error_is_set (&error))
- dbus_error_free (&error);
- dbus_message_unref (reply);
- return (RETURN_FAILURE);
- }
-
- *string = g_strdup (dbus_string);
-
- dbus_message_unref (reply);
- return (RETURN_SUCCESS);
-}
-
-/*
- * nmwa_dbus_call_method_uint32
- *
- * Do a method call on NetworkManager that returns a DBUS_TYPE_UINT32.
- *
- * Returns: RETURN_SUCCESS on success
- * RETURN_FAILURE on failure
- * RETURN_NO_NM if NetworkManager service no longer exists
- */
-int nmwa_dbus_call_method_uint32 (DBusConnection *con, const char *path, const char *interface, const char *method, guint32 *num)
-{
- DBusMessage * message;
- DBusMessage * reply;
- DBusError error;
-
- g_return_val_if_fail (con != NULL, RETURN_FAILURE);
- g_return_val_if_fail (path != NULL, RETURN_FAILURE);
- g_return_val_if_fail (method != NULL, RETURN_FAILURE);
- g_return_val_if_fail (num != NULL, RETURN_FAILURE);
-
- if (!(message = dbus_message_new_method_call (NM_DBUS_SERVICE, path, interface, method)))
- {
- nm_warning ("nmwa_dbus_call_method_uint32(): Couldn't allocate the dbus message\n");
- return (RETURN_FAILURE);
- }
-
- dbus_error_init (&error);
- reply = dbus_connection_send_with_reply_and_block (con, message, -1, &error);
- dbus_message_unref (message);
- if (dbus_error_is_set (&error))
- {
- int ret = deal_with_dbus_error (__FUNCTION__, method, &error);
- dbus_error_free (&error);
- return (ret);
- }
-
- if (reply == NULL)
- {
- nm_warning ("nmwa_dbus_call_method_uint32(): dbus reply message was NULL\n" );
- return (RETURN_FAILURE);
- }
-
- dbus_error_init (&error);
- dbus_message_get_args (reply, &error, DBUS_TYPE_UINT32, num, DBUS_TYPE_INVALID);
- dbus_message_unref (reply);
- if (dbus_error_is_set (&error))
- {
- nm_warning ("nnmwa_dbus_call_method_uint32(): error while getting args: name='%s' message='%s'\n", error.name, error.message);
- if (dbus_error_is_set (&error))
- dbus_error_free (&error);
- return (RETURN_FAILURE);
- }
-
- return (RETURN_SUCCESS);
-}
-
-/*
- * nmwa_dbus_call_method_int32
- *
- * Do a method call on NetworkManager that returns a DBUS_TYPE_INT32.
- *
- * Returns: RETURN_SUCCESS on success
- * RETURN_FAILURE on failure
- * RETURN_NO_NM if NetworkManager service no longer exists
- */
-int nmwa_dbus_call_method_int32 (DBusConnection *con, const char *path, const char *interface, const char *method, gint32 *num)
-{
- DBusMessage * message;
- DBusMessage * reply;
- DBusError error;
-
- g_return_val_if_fail (con != NULL, RETURN_FAILURE);
- g_return_val_if_fail (path != NULL, RETURN_FAILURE);
- g_return_val_if_fail (method != NULL, RETURN_FAILURE);
- g_return_val_if_fail (num != NULL, RETURN_FAILURE);
-
- if (!(message = dbus_message_new_method_call (NM_DBUS_SERVICE, path, interface, method)))
- {
- nm_warning ("nmwa_dbus_call_method_int32(): Couldn't allocate the dbus message\n");
- return (RETURN_FAILURE);
- }
-
- dbus_error_init (&error);
- reply = dbus_connection_send_with_reply_and_block (con, message, -1, &error);
- dbus_message_unref (message);
- if (dbus_error_is_set (&error))
- {
- int ret = deal_with_dbus_error (__FUNCTION__, method, &error);
- dbus_error_free (&error);
- return (ret);
- }
-
- if (reply == NULL)
- {
- nm_warning ("nmwa_dbus_call_method_int32(): dbus reply message was NULL\n" );
- return (RETURN_FAILURE);
- }
-
- dbus_error_init (&error);
- dbus_message_get_args (reply, &error, DBUS_TYPE_INT32, num, DBUS_TYPE_INVALID);
- dbus_message_unref (reply);
- if (dbus_error_is_set (&error))
- {
- nm_warning ("nnmwa_dbus_call_method_int32(): error while getting args: name='%s' message='%s'\n", error.name, error.message);
- if (dbus_error_is_set (&error))
- dbus_error_free (&error);
- return (RETURN_FAILURE);
- }
-
- return (RETURN_SUCCESS);
-}
-
-
-/*
- * nmwa_dbus_call_method_boolean
- *
- * Do a method call on NetworkManager that returns a DBUS_TYPE_BOOLEAN.
- *
- * Returns: RETURN_SUCCESS on success
- * RETURN_FAILURE on failure
- * RETURN_NO_NM if NetworkManager service no longer exists
- */
-int nmwa_dbus_call_method_boolean (DBusConnection *con, const char *path, const char *interface, const char *method, gboolean *num)
-{
- DBusMessage * message;
- DBusMessage * reply;
- DBusError error;
-
- g_return_val_if_fail (con != NULL, RETURN_FAILURE);
- g_return_val_if_fail (path != NULL, RETURN_FAILURE);
- g_return_val_if_fail (method != NULL, RETURN_FAILURE);
- g_return_val_if_fail (num != NULL, RETURN_FAILURE);
-
- if (!(message = dbus_message_new_method_call (NM_DBUS_SERVICE, path, interface, method)))
- {
- nm_warning ("nmwa_dbus_call_method_boolean(): Couldn't allocate the dbus message\n");
- return (RETURN_FAILURE);
- }
-
- dbus_error_init (&error);
- reply = dbus_connection_send_with_reply_and_block (con, message, -1, &error);
- dbus_message_unref (message);
- if (dbus_error_is_set (&error))
- {
- int ret = deal_with_dbus_error (__FUNCTION__, method, &error);
- dbus_error_free (&error);
- return (ret);
- }
-
- if (reply == NULL)
- {
- nm_warning ("nmwa_dbus_call_method_boolean(): dbus reply message was NULL\n" );
- return (RETURN_FAILURE);
- }
-
- dbus_error_init (&error);
- dbus_message_get_args (reply, &error, DBUS_TYPE_BOOLEAN, num, DBUS_TYPE_INVALID);
- dbus_message_unref (reply);
- if (dbus_error_is_set (&error))
- {
- nm_warning ("nnmwa_dbus_call_method_boolean(): error while getting args: name='%s' message='%s'\n", error.name, error.message);
- if (dbus_error_is_set (&error))
- dbus_error_free (&error);
- return (RETURN_FAILURE);
- }
-
- return (RETURN_SUCCESS);
-}
-
-
-/*
- * nmwa_dbus_call_method_string_array
- *
- * Do a method call on NetworkManager that returns a string array.
- *
- * Returns: RETURN_SUCCESS on success
- * RETURN_FAILURE on failure
- * RETURN_NO_NM if NetworkManager service no longer exists
- */
-int nmwa_dbus_call_method_string_array (DBusConnection *con, const char *path, const char *interface, const char *method,
- gboolean is_obj_path, char ***array, guint32 *array_len)
-{
- DBusMessage * message;
- DBusMessage * reply;
- DBusError error;
- char ** dbus_array;
- int dbus_array_len;
-
- g_return_val_if_fail (con != NULL, RETURN_FAILURE);
- g_return_val_if_fail (path != NULL, RETURN_FAILURE);
- g_return_val_if_fail (method != NULL, RETURN_FAILURE);
- g_return_val_if_fail (array != NULL, RETURN_FAILURE);
- g_return_val_if_fail (*array == NULL, RETURN_FAILURE);
- g_return_val_if_fail (array_len != NULL, RETURN_FAILURE);
-
- if (!(message = dbus_message_new_method_call (NM_DBUS_SERVICE, path, interface, method)))
- {
- nm_warning ("nmwa_dbus_call_method_string_array(): Couldn't allocate the dbus message\n");
- return (RETURN_FAILURE);
- }
-
- dbus_error_init (&error);
- reply = dbus_connection_send_with_reply_and_block (con, message, -1, &error);
- dbus_message_unref (message);
- if (dbus_error_is_set (&error))
- {
- int ret = deal_with_dbus_error (__FUNCTION__, method, &error);
- dbus_error_free (&error);
- return (ret);
- }
-
- if (reply == NULL)
- {
- nm_warning ("nmwa_dbus_call_method_string_array(): dbus reply message was NULL\n" );
- return (RETURN_FAILURE);
- }
-
- dbus_error_init (&error);
- dbus_message_get_args (reply, &error, DBUS_TYPE_ARRAY, is_obj_path ? DBUS_TYPE_OBJECT_PATH : DBUS_TYPE_STRING, &dbus_array, &dbus_array_len, DBUS_TYPE_INVALID);
- if (dbus_error_is_set (&error))
- {
- nm_warning ("nnmwa_dbus_call_method_string_array(): error while getting args: name='%s' message='%s'\n", error.name, error.message);
- dbus_message_unref (reply);
- if (dbus_error_is_set (&error))
- dbus_error_free (&error);
- return (RETURN_FAILURE);
- }
-
- *array = g_strdupv (dbus_array);
- *array_len = dbus_array_len;
- dbus_free_string_array (dbus_array);
-
- dbus_message_unref (reply);
- return (RETURN_SUCCESS);
-}
-
-
-static void
-set_vpn_last_attempt_status (NMWirelessApplet *applet, const char *vpn_name, gboolean last_attempt_success)
-{
- char *gconf_key;
- char *escaped_name;
-
- escaped_name = gconf_escape_key (vpn_name, strlen (vpn_name));
-
- gconf_key = g_strdup_printf ("%s/%s/last_attempt_success", GCONF_PATH_VPN_CONNECTIONS, escaped_name);
- gconf_client_set_bool (applet->gconf_client, gconf_key, last_attempt_success, NULL);
-
- g_free (gconf_key);
- g_free (escaped_name);
-}
-
-/*
- * nmwa_dbus_filter
- *
- */
-static DBusHandlerResult nmwa_dbus_filter (DBusConnection *connection, DBusMessage *message, void *user_data)
-{
- NMWirelessApplet *applet = (NMWirelessApplet *)user_data;
- gboolean handled = TRUE;
-
- const char * object_path;
- const char * member;
- const char * interface;
-
- g_return_val_if_fail (applet != NULL, DBUS_HANDLER_RESULT_NOT_YET_HANDLED);
- g_return_val_if_fail (connection != NULL, DBUS_HANDLER_RESULT_NOT_YET_HANDLED);
- g_return_val_if_fail (message != NULL, DBUS_HANDLER_RESULT_NOT_YET_HANDLED);
-
- if (!(object_path = dbus_message_get_path (message)))
- return FALSE;
- if (!(member = dbus_message_get_member (message)))
- return FALSE;
- if (!(interface = dbus_message_get_interface (message)))
- return FALSE;
-
- /* nm_info ("signal(): got signal op='%s' member='%s' interface='%s'", object_path, member, interface); */
-
- if (dbus_message_is_signal (message, DBUS_INTERFACE_DBUS, "NameOwnerChanged"))
- {
- char *service;
- char *old_owner;
- char *new_owner;
-
- if (dbus_message_get_args (message, NULL,
- DBUS_TYPE_STRING, &service,
- DBUS_TYPE_STRING, &old_owner,
- DBUS_TYPE_STRING, &new_owner,
- DBUS_TYPE_INVALID))
- {
- if (strcmp (service, NM_DBUS_SERVICE) == 0)
- {
- gboolean old_owner_good = (old_owner && (strlen (old_owner) > 0));
- gboolean new_owner_good = (new_owner && (strlen (new_owner) > 0));
-
- if (!old_owner_good && new_owner_good && !applet->nm_running)
- {
- /* NetworkManager started up */
- applet->nm_running = TRUE;
- applet->gui_nm_state = NM_STATE_DISCONNECTED;
- applet->dbus_nm_state = NM_STATE_DISCONNECTED;
- nmwa_dbus_update_nm_state (applet);
- nmwa_dbus_update_devices (applet);
- nmwa_dbus_update_dialup (applet);
- nmwa_dbus_vpn_update_vpn_connections (applet);
- }
- else if (old_owner_good && !new_owner_good)
- {
- applet->nm_running = FALSE;
- nmi_passphrase_dialog_schedule_cancel (applet);
- }
- }
- }
- }
- else if (dbus_message_is_signal (message, NM_DBUS_INTERFACE, NM_DBUS_SIGNAL_STATE_CHANGE))
- {
- NMState state = NM_STATE_UNKNOWN;
-
- if (dbus_message_get_args (message, NULL, DBUS_TYPE_UINT32, &state, DBUS_TYPE_INVALID))
- {
- NetworkDevice *act_dev = nmwa_get_first_active_device (applet->dbus_device_list);
-
- /* If we've switched to connecting, update the active device to ensure that we have
- * valid wireless network information for it.
- */
- if ( (state == NM_STATE_CONNECTING)
- && act_dev
- && network_device_is_wireless (act_dev))
- {
- nmwa_dbus_device_update_one_device (applet, network_device_get_nm_path (act_dev));
- }
- applet->dbus_nm_state = state;
- applet->gui_nm_state = state;
- }
- }
- else if ( dbus_message_is_signal (message, NM_DBUS_INTERFACE, "DeviceAdded")
- || dbus_message_is_signal (message, NM_DBUS_INTERFACE, "DeviceNowActive")
- || dbus_message_is_signal (message, NM_DBUS_INTERFACE, "DeviceNoLongerActive")
- || dbus_message_is_signal (message, NM_DBUS_INTERFACE, "DeviceActivating")
- || dbus_message_is_signal (message, NM_DBUS_INTERFACE, "DeviceCarrierOn")
- || dbus_message_is_signal (message, NM_DBUS_INTERFACE, "DeviceCarrierOff"))
- {
- char *path = NULL;
-
- if (dbus_message_get_args (message, NULL, DBUS_TYPE_OBJECT_PATH, &path, DBUS_TYPE_INVALID))
- nmwa_dbus_device_update_one_device (applet, path);
- }
- else if (dbus_message_is_signal (message, NM_DBUS_INTERFACE, "DeviceRemoved"))
- {
- char *path = NULL;
-
- if (dbus_message_get_args (message, NULL, DBUS_TYPE_OBJECT_PATH, &path, DBUS_TYPE_INVALID))
- nmwa_dbus_device_remove_one_device (applet, path);
- }
- else if ( dbus_message_is_signal (message, NM_DBUS_INTERFACE_VPN, "VPNConnectionAdded")
- || dbus_message_is_signal (message, NM_DBUS_INTERFACE_VPN, "VPNConnectionUpdate")) /* VPN connection properties changed */
- {
- char *name = NULL;
-
- if (dbus_message_get_args (message, NULL, DBUS_TYPE_STRING, &name, DBUS_TYPE_INVALID))
- nmwa_dbus_vpn_update_one_vpn_connection (applet, name);
- }
- else if (dbus_message_is_signal (message, NM_DBUS_INTERFACE_VPN, "VPNConnectionChange")) /* Active VPN connection changed */
- {
- nmwa_dbus_vpn_get_active_vpn_connection (applet);
- }
- else if (dbus_message_is_signal (message, NM_DBUS_INTERFACE_VPN, "VPNConnectionRemoved"))
- {
- char *name = NULL;
-
- if (dbus_message_get_args (message, NULL, DBUS_TYPE_STRING, &name, DBUS_TYPE_INVALID))
- nmwa_dbus_vpn_remove_one_vpn_connection (applet, name);
- }
- else if (dbus_message_is_signal (message, NM_DBUS_INTERFACE, "WirelessNetworkAppeared"))
- {
- char *dev_path = NULL;
- char *net_path = NULL;
-
- if (dbus_message_get_args (message, NULL, DBUS_TYPE_OBJECT_PATH, &dev_path, DBUS_TYPE_OBJECT_PATH, &net_path, DBUS_TYPE_INVALID))
- nmwa_dbus_device_update_one_network (applet, dev_path, net_path, NULL);
- }
- else if (dbus_message_is_signal (message, NM_DBUS_INTERFACE, "WirelessNetworkDisappeared"))
- {
- char *dev_path = NULL;
- char *net_path = NULL;
-
- if (dbus_message_get_args (message, NULL, DBUS_TYPE_OBJECT_PATH, &dev_path, DBUS_TYPE_OBJECT_PATH, &net_path, DBUS_TYPE_INVALID))
- nmwa_dbus_device_remove_one_network (applet, dev_path, net_path);
- }
- else if (dbus_message_is_signal (message, NM_DBUS_INTERFACE, "WirelessNetworkStrengthChanged"))
- {
- char * dev_path = NULL;
- char * net_path = NULL;
- int strength = -1;
-
- if (dbus_message_get_args (message, NULL, DBUS_TYPE_OBJECT_PATH, &dev_path, DBUS_TYPE_OBJECT_PATH, &net_path, DBUS_TYPE_INT32, &strength, DBUS_TYPE_INVALID))
- {
- /* FIXME actually use strength rather than querying all network properties */
- nmwa_dbus_device_update_one_network (applet, dev_path, net_path, NULL);
- }
- }
- else if ( dbus_message_is_signal (message, NM_DBUS_INTERFACE_VPN, NM_DBUS_VPN_SIGNAL_LOGIN_FAILED)
- || dbus_message_is_signal (message, NM_DBUS_INTERFACE_VPN, NM_DBUS_VPN_SIGNAL_LAUNCH_FAILED)
- || dbus_message_is_signal (message, NM_DBUS_INTERFACE_VPN, NM_DBUS_VPN_SIGNAL_CONNECT_FAILED)
- || dbus_message_is_signal (message, NM_DBUS_INTERFACE_VPN, NM_DBUS_VPN_SIGNAL_VPN_CONFIG_BAD)
- || dbus_message_is_signal (message, NM_DBUS_INTERFACE_VPN, NM_DBUS_VPN_SIGNAL_IP_CONFIG_BAD))
- {
- char *vpn_name;
- char *error_msg;
-
- if (dbus_message_get_args (message, NULL, DBUS_TYPE_STRING, &vpn_name, DBUS_TYPE_STRING, &error_msg, DBUS_TYPE_INVALID)) {
- nmwa_schedule_vpn_failure_dialog (applet, member, vpn_name, error_msg);
- /* clear the 'last_attempt_success' key in gconf so we prompt for password next time */
- set_vpn_last_attempt_status (applet, vpn_name, FALSE);
- }
- }
- else if (dbus_message_is_signal (message, NM_DBUS_INTERFACE_VPN, NM_DBUS_VPN_SIGNAL_LOGIN_BANNER))
- {
- char *vpn_name;
- char *banner;
-
- if (dbus_message_get_args (message, NULL, DBUS_TYPE_STRING, &vpn_name, DBUS_TYPE_STRING, &banner, DBUS_TYPE_INVALID)) {
- nmwa_schedule_vpn_login_banner_dialog (applet, vpn_name, banner);
- /* set the 'last_attempt_success' key in gconf so we DON'T prompt for password next time */
- set_vpn_last_attempt_status (applet, vpn_name, TRUE);
- }
- }
- else if (dbus_message_is_signal (message, NM_DBUS_INTERFACE, "DeviceActivationFailed"))
- {
- char *dev = NULL;
- char *net = NULL;
-
- if (!dbus_message_get_args (message, NULL, DBUS_TYPE_STRING, &dev, DBUS_TYPE_STRING, &net, DBUS_TYPE_INVALID))
- dbus_message_get_args (message, NULL, DBUS_TYPE_STRING, &dev, DBUS_TYPE_INVALID);
-
- if (dev && net)
- {
- char *string = g_strdup_printf (_("Connection to the wireless network '%s' failed."), net);
- nmwa_schedule_warning_dialog (applet, string);
- g_free (string);
- }
- else if (dev)
- nmwa_schedule_warning_dialog (applet, _("Connection to the wired network failed."));
- }
- else if (dbus_message_is_signal (message, NM_DBUS_INTERFACE, "DeviceActivationStage"))
- {
- char * dev_path = NULL;
- NMActStage stage;
-
- if (dbus_message_get_args (message, NULL, DBUS_TYPE_OBJECT_PATH, &dev_path, DBUS_TYPE_UINT32, &stage, DBUS_TYPE_INVALID))
- {
- NetworkDevice *dev;
-
- if ((dev = nmwa_get_device_for_nm_path (applet->dbus_device_list, dev_path)))
- network_device_set_act_stage (dev, stage);
-
- if ((dev = nmwa_get_device_for_nm_path (applet->gui_device_list, dev_path)))
- network_device_set_act_stage (dev, stage);
- }
- }
- else
- handled = FALSE;
-
- return (handled ? DBUS_HANDLER_RESULT_HANDLED : DBUS_HANDLER_RESULT_NOT_YET_HANDLED);
-}
-
-
-/*
- * nmwa_dbus_nm_is_running
- *
- * Ask dbus whether or not NetworkManager is running
- *
- */
-static gboolean nmwa_dbus_nm_is_running (DBusConnection *connection)
-{
- DBusError error;
- gboolean exists;
-
- g_return_val_if_fail (connection != NULL, FALSE);
-
- dbus_error_init (&error);
- exists = dbus_bus_name_has_owner (connection, NM_DBUS_SERVICE, &error);
- if (dbus_error_is_set (&error))
- dbus_error_free (&error);
- return (exists);
-}
-
-
-/*
- * nmwa_dbus_init
- *
- * Initialize a connection to NetworkManager if we can get one
- *
- */
-static DBusConnection * nmwa_dbus_init (NMWirelessApplet *applet, GMainContext *context)
-{
- DBusConnection * connection = NULL;
- DBusError error;
- DBusObjectPathVTable vtable = { NULL, &nmi_dbus_info_message_handler, NULL, NULL, NULL, NULL };
- int acquisition;
-
- g_return_val_if_fail (applet != NULL, NULL);
- g_return_val_if_fail (context != NULL, NULL);
-
- dbus_error_init (&error);
- connection = dbus_bus_get (DBUS_BUS_SYSTEM, &error);
- if (dbus_error_is_set (&error))
- {
- nm_warning ("%s raised:\n %s\n\n", error.name, error.message);
- dbus_error_free (&error);
- return NULL;
- }
-
- dbus_error_init (&error);
- acquisition = dbus_bus_request_name (connection, NMI_DBUS_SERVICE, DBUS_NAME_FLAG_PROHIBIT_REPLACEMENT, &error);
- if (dbus_error_is_set (&error))
- {
- nm_warning ("nmwa_dbus_init() could not acquire its service. dbus_bus_acquire_service() says: '%s'", error.message);
- dbus_error_free (&error);
- return NULL;
- }
- if (acquisition == DBUS_REQUEST_NAME_REPLY_EXISTS)
- return NULL;
-
- if (!dbus_connection_register_object_path (connection, NMI_DBUS_PATH, &vtable, applet))
- {
- nm_warning ("nmwa_dbus_init() could not register a handler for NetworkManagerInfo. Not enough memory?");
- return NULL;
- }
-
- if (!dbus_connection_add_filter (connection, nmwa_dbus_filter, applet, NULL))
- return NULL;
-
- dbus_connection_set_exit_on_disconnect (connection, FALSE);
- dbus_connection_setup_with_g_main (connection, context);
-
- dbus_bus_add_match(connection,
- "type='signal',"
- "interface='" DBUS_INTERFACE_DBUS "',"
- "sender='" DBUS_SERVICE_DBUS "'",
- &error);
- if (dbus_error_is_set (&error))
- dbus_error_free (&error);
-
- dbus_bus_add_match(connection,
- "type='signal',"
- "interface='" NM_DBUS_INTERFACE "',"
- "path='" NM_DBUS_PATH "',"
- "sender='" NM_DBUS_SERVICE "'",
- &error);
- if (dbus_error_is_set (&error))
- dbus_error_free (&error);
-
- dbus_bus_add_match(connection,
- "type='signal',"
- "interface='" NM_DBUS_INTERFACE_VPN "',"
- "path='" NM_DBUS_PATH_VPN "',"
- "sender='" NM_DBUS_SERVICE "'",
- &error);
- if (dbus_error_is_set (&error))
- dbus_error_free (&error);
-
- return (connection);
-}
-
-
-/*
- * nmwa_dbus_connection_watcher
- *
- * Try to reconnect if we ever get disconnected from the bus
- *
- */
-static gboolean nmwa_dbus_connection_watcher (gpointer user_data)
-{
- NMWirelessApplet *applet = (NMWirelessApplet *)user_data;
-
- g_return_val_if_fail (applet != NULL, TRUE);
-
- if (!applet->connection)
- {
- if ((applet->connection = nmwa_dbus_init (applet, applet->thread_context)))
- {
- applet->nm_running = nmwa_dbus_nm_is_running (applet->connection);
- applet->dbus_nm_state = NM_STATE_DISCONNECTED;
- nmwa_dbus_update_nm_state (applet);
- nmwa_dbus_update_devices (applet);
- nmwa_dbus_update_dialup (applet);
- nmwa_dbus_vpn_update_vpn_connections (applet);
- }
- }
-
- return (TRUE);
-}
-
-
-/*
- * nmwa_dbus_worker
- *
- * Thread worker function that periodically grabs the NetworkManager state
- * and updates our local applet state to reflect that.
- *
- */
-gpointer nmwa_dbus_worker (gpointer user_data)
-{
- NMWirelessApplet * applet = (NMWirelessApplet *)user_data;
- GSource * timeout_source;
- GSource * strength_source;
-
- g_return_val_if_fail (applet != NULL, NULL);
-
- dbus_g_thread_init ();
-
- if (!(applet->thread_context = g_main_context_new ()))
- return (NULL);
- if (!(applet->thread_loop = g_main_loop_new (applet->thread_context, FALSE)))
- return (NULL);
-
- applet->connection = nmwa_dbus_init (applet, applet->thread_context);
-
- timeout_source = g_timeout_source_new (2000);
- g_source_set_callback (timeout_source, nmwa_dbus_connection_watcher, applet, NULL);
- g_source_attach (timeout_source, applet->thread_context);
-
- strength_source = g_timeout_source_new (2000);
- g_source_set_callback (strength_source, (GSourceFunc) nmwa_dbus_update_device_strength, applet, NULL);
- g_source_attach (strength_source, applet->thread_context);
-
- if (applet->connection && nmwa_dbus_nm_is_running (applet->connection))
- {
- applet->nm_running = TRUE;
- nmwa_dbus_update_nm_state (applet);
- nmwa_dbus_update_devices (applet);
- nmwa_dbus_update_dialup (applet);
- nmwa_dbus_vpn_update_vpn_connections (applet);
- }
-
- g_main_loop_run (applet->thread_loop);
-
- g_source_destroy (timeout_source);
-#if 0
- g_source_destroy (strength_source);
-#endif
-
- return NULL;
-}
diff --git a/gnome/applet/applet-dbus.h b/gnome/applet/applet-dbus.h
deleted file mode 100644
index 92356e22df..0000000000
--- a/gnome/applet/applet-dbus.h
+++ /dev/null
@@ -1,63 +0,0 @@
-/* NetworkManager Wireless Applet -- Display wireless access points and allow user control
- *
- * Dan Williams <dcbw@redhat.com>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- *
- * (C) Copyright 2004 Red Hat, Inc.
- */
-
-#ifndef APPLET_DBUS_H
-#define APPLET_DBUS_H
-
-#include <dbus/dbus.h>
-#include <dbus/dbus-glib.h>
-#include "NetworkManager.h"
-#include "applet.h"
-
-/* Return codes for functions that use dbus */
-enum
-{
- RETURN_SUCCESS = 1,
- RETURN_FAILURE = 0,
- RETURN_NO_NM = -1
-};
-
-static inline gboolean message_is_error (DBusMessage *msg)
-{
- g_return_val_if_fail (msg != NULL, FALSE);
-
- return (dbus_message_get_type (msg) == DBUS_MESSAGE_TYPE_ERROR);
-}
-
-int nmwa_dbus_call_method_string (DBusConnection *con, const char *path, const char *interface, const char *method, gboolean is_obj_path, char **string);
-int nmwa_dbus_call_method_uint32 (DBusConnection *con, const char *path, const char *interface, const char *method, guint32 *num);
-int nmwa_dbus_call_method_int32 (DBusConnection *con, const char *path, const char *interface, const char *method, gint32 *num);
-int nmwa_dbus_call_method_boolean (DBusConnection *con, const char *path, const char *interface, const char *method, gboolean *num);
-int nmwa_dbus_call_method_string_array (DBusConnection *con, const char *path, const char *interface, const char *method,
- gboolean is_obj_path, char ***array, guint32 *array_len);
-
-DBusMessage * nmwa_dbus_create_error_message (DBusMessage *message, const char *exception_namespace, const char *exception, const char *format, ...);
-
-gpointer nmwa_dbus_worker (gpointer user_data);
-
-void nmwa_dbus_enable_scanning (NMWirelessApplet *applet, gboolean enabled);
-
-void nmwa_dbus_enable_wireless (NMWirelessApplet *applet, gboolean enabled);
-
-void nmwa_free_gui_data_model (NMWirelessApplet *applet);
-void nmwa_free_dbus_data_model (NMWirelessApplet *applet);
-
-#endif
diff --git a/gnome/applet/applet.c b/gnome/applet/applet.c
deleted file mode 100644
index 7606ab335c..0000000000
--- a/gnome/applet/applet.c
+++ /dev/null
@@ -1,2610 +0,0 @@
-/* -*- Mode: C; tab-width: 5; indent-tabs-mode: t; c-basic-offset: 5 -*- */
-/* NetworkManager Wireless Applet -- Display wireless access points and allow user control
- *
- * Dan Williams <dcbw@redhat.com>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- *
- * This applet used the GNOME Wireless Applet as a skeleton to build from.
- *
- * GNOME Wireless Applet Authors:
- * Eskil Heyn Olsen <eskil@eskil.dk>
- * Bastien Nocera <hadess@hadess.net> (Gnome2 port)
- *
- * (C) Copyright 2004-2005 Red Hat, Inc.
- * (C) Copyright 2001, 2002 Free Software Foundation
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <string.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include <sys/types.h>
-#include <sys/wait.h>
-#include <ctype.h>
-#include <fcntl.h>
-#include <errno.h>
-#include <math.h>
-#include <dirent.h>
-#include <time.h>
-#include <sys/ioctl.h>
-#include <sys/socket.h>
-#include <netinet/in.h>
-#include <arpa/inet.h>
-#include <sys/un.h>
-#include <net/if.h>
-
-#include <gtk/gtk.h>
-#include <glib/gi18n.h>
-#include <libgnomeui/libgnomeui.h>
-
-#if !GTK_CHECK_VERSION(2,6,0)
-#include <gnome.h>
-#endif
-
-#include <glade/glade.h>
-#include <gconf/gconf-client.h>
-
-#include "applet.h"
-#include "applet-dbus.h"
-#include "applet-dbus-devices.h"
-#include "applet-dbus-vpn.h"
-#include "applet-dbus-info.h"
-#include "other-network-dialog.h"
-#include "passphrase-dialog.h"
-#include "menu-items.h"
-#include "vpn-password-dialog.h"
-#include "vpn-connection.h"
-#include "nm-utils.h"
-
-/* Compat for GTK 2.4 and lower... */
-#if (GTK_MAJOR_VERSION <= 2 && GTK_MINOR_VERSION < 6)
- #define GTK_STOCK_MEDIA_PAUSE GTK_STOCK_STOP
- #define GTK_STOCK_MEDIA_PLAY GTK_STOCK_REFRESH
- #define GTK_STOCK_ABOUT GTK_STOCK_DIALOG_INFO
-#endif
-
-static GObject * nmwa_constructor (GType type, guint n_props, GObjectConstructParam *construct_props);
-static void setup_stock (void);
-static gboolean nmwa_icons_init (NMWirelessApplet *applet);
-static void nmwa_icons_free (NMWirelessApplet *applet);
-static void nmwa_about_cb (NMWirelessApplet *applet);
-static void nmwa_context_menu_update (NMWirelessApplet *applet);
-static GtkWidget * nmwa_get_instance (NMWirelessApplet *applet);
-
-G_DEFINE_TYPE(NMWirelessApplet, nmwa, EGG_TYPE_TRAY_ICON)
-
-/*
- * nm_null_safe_strcmp
- *
- * Doesn't freaking segfault if s1/s2 are NULL
- *
- */
-int nm_null_safe_strcmp (const char *s1, const char *s2)
-{
- if (!s1 && !s2)
- return 0;
- if (!s1 && s2)
- return -1;
- if (s1 && !s2)
- return 1;
-
- return (strcmp (s1, s2));
-}
-
-
-/*
- * nmwa_get_first_active_device
- *
- * Return the first device marked as "active".
- *
- */
-NetworkDevice * nmwa_get_first_active_device (GSList *dev_list)
-{
- GSList * elt;
-
- if (!dev_list)
- return NULL;
-
- for (elt = dev_list; elt; elt = g_slist_next (elt))
- {
- NetworkDevice *dev = (NetworkDevice *)(elt->data);
-
- if (network_device_get_active (dev))
- return dev;
- }
-
- return NULL;
-}
-
-
-static void nmwa_init (NMWirelessApplet *applet)
-{
- applet->animation_id = 0;
- applet->animation_step = 0;
- glade_gnome_init ();
-
- setup_stock ();
- if (!nmwa_icons_init (applet))
- return;
-
-/* gtk_window_set_default_icon_from_file (ICONDIR"/NMWirelessApplet/wireless-applet.png", NULL); */
- gtk_widget_show (nmwa_get_instance (applet));
-}
-
-static void nmwa_class_init (NMWirelessAppletClass *klass)
-{
- GObjectClass *gobject_class;
-
- gobject_class = G_OBJECT_CLASS (klass);
- gobject_class->constructor = nmwa_constructor;
-}
-
-static GObject *nmwa_constructor (GType type, guint n_props, GObjectConstructParam *construct_props)
-{
- GObject *obj;
- NMWirelessApplet *applet;
- NMWirelessAppletClass *klass;
-
- klass = NM_WIRELESS_APPLET_CLASS (g_type_class_peek (type));
- obj = G_OBJECT_CLASS (nmwa_parent_class)->constructor (type, n_props, construct_props);
- applet = NM_WIRELESS_APPLET (obj);
-
- return obj;
-}
-
-static GtkWidget * get_label (GtkWidget *info_dialog, GladeXML *xml, const char *name)
-{
- GtkWidget *label;
-
- if (xml != NULL)
- {
- label = glade_xml_get_widget (xml, name);
- g_object_set_data (G_OBJECT (info_dialog), name, label);
- }
- else
- label = g_object_get_data (G_OBJECT (info_dialog), name);
-
- return label;
-}
-
-static void nmwa_show_socket_err (GtkWidget *info_dialog, const char *err)
-{
- GtkWidget *error_dialog;
- char *msg;
-
- msg = g_strdup_printf ("<span weight=\"bold\" size=\"larger\">%s</span>\n\n%s",
- _("Error displaying connection information: "), err);
- error_dialog = gtk_message_dialog_new_with_markup (GTK_WINDOW (info_dialog),
- 0, GTK_MESSAGE_ERROR,
- GTK_BUTTONS_OK, msg);
- gtk_dialog_run (GTK_DIALOG (error_dialog));
- gtk_widget_destroy (error_dialog);
- g_free (msg);
-}
-
-static gboolean nmwa_update_info (NMWirelessApplet *applet)
-{
- GtkWidget *info_dialog;
- char *addr = NULL, *mask = NULL, *broadcast = NULL;
- char *dest = NULL, *mac = NULL, *iface_and_type = NULL;
- GtkWidget *label;
- struct ifreq ifr;
- int fd, flags;
- gboolean ret_val = TRUE;
- const char *iface;
- NetworkDevice *dev;
- gboolean ret = TRUE;
-
- info_dialog = glade_xml_get_widget (applet->info_dialog_xml, "info_dialog");
- if (!info_dialog)
- {
- char *err = g_strdup (_("Could not find some required resources (the glade file)!"));
- nmwa_show_socket_err (info_dialog, err);
- g_free (err);
- return FALSE;
- }
-
- dev = nmwa_get_first_active_device (applet->gui_device_list);
- iface = network_device_get_iface (dev);
- if (!dev || !iface)
- {
- char *err = g_strdup (_("No active connections!"));
- nmwa_show_socket_err (info_dialog, err);
- g_free (err);
- return FALSE;
- }
-
- fd = socket (AF_INET, SOCK_DGRAM, 0);
- if (fd < 0)
- {
- char *err = g_strdup (_("Could not open socket!"));
- nmwa_show_socket_err (info_dialog, err);
- g_free (err);
- return FALSE;
- }
-
- ifr.ifr_addr.sa_family = AF_INET;
-
- g_strlcpy (ifr.ifr_name, iface, sizeof (ifr.ifr_name));
- if (ioctl (fd, SIOCGIFADDR, &ifr) == 0)
- addr = g_strdup (inet_ntoa (((struct sockaddr_in *) &ifr.ifr_addr)->sin_addr));
-
- g_strlcpy (ifr.ifr_name, iface, sizeof (ifr.ifr_name));
- if (ioctl (fd, SIOCGIFFLAGS, &ifr) < 0)
- {
- char *err = g_strdup (_("Failed to get information about the interface!"));
- nmwa_show_socket_err (info_dialog, err);
- g_free (err);
- ret = FALSE;
- goto out;
- }
- flags = ifr.ifr_flags;
-
- g_strlcpy (ifr.ifr_name, iface, sizeof (ifr.ifr_name));
- if (flags & IFF_BROADCAST && ioctl (fd, SIOCGIFBRDADDR, &ifr) == 0)
- broadcast = g_strdup (inet_ntoa (((struct sockaddr_in *) &ifr.ifr_broadaddr)->sin_addr));
-
- g_strlcpy (ifr.ifr_name, iface, sizeof (ifr.ifr_name));
- if (ioctl (fd, SIOCGIFNETMASK, &ifr) == 0)
- mask = g_strdup (inet_ntoa (((struct sockaddr_in *) &ifr.ifr_addr)->sin_addr));
-
- g_strlcpy (ifr.ifr_name, iface, sizeof (ifr.ifr_name));
- if (flags & IFF_POINTOPOINT && ioctl (fd, SIOCGIFDSTADDR, &ifr) == 0)
- dest = g_strdup (inet_ntoa (((struct sockaddr_in *) &ifr.ifr_dstaddr)->sin_addr));
-
- g_strlcpy (ifr.ifr_name, iface, sizeof (ifr.ifr_name));
- if (ioctl (fd, SIOCGIFHWADDR, &ifr) == 0)
- mac = g_strdup_printf ("%2.2X:%2.2X:%2.2X:%2.2X:%2.2X:%2.2X",
- (unsigned char) ifr.ifr_hwaddr.sa_data[0],
- (unsigned char) ifr.ifr_hwaddr.sa_data[1],
- (unsigned char) ifr.ifr_hwaddr.sa_data[2],
- (unsigned char) ifr.ifr_hwaddr.sa_data[3],
- (unsigned char) ifr.ifr_hwaddr.sa_data[4],
- (unsigned char) ifr.ifr_hwaddr.sa_data[5]);
-
- label = get_label (info_dialog, applet->info_dialog_xml, "label-interface");
- gtk_label_set_text (GTK_LABEL (label), iface);
- if (network_device_is_wired (dev))
- iface_and_type = g_strdup_printf (_("Wired Ethernet (%s)"), iface);
- else
- iface_and_type = g_strdup_printf (_("Wireless Ethernet (%s)"), iface);
- gtk_label_set_text (GTK_LABEL (label), iface_and_type);
-
- label = get_label (info_dialog, applet->info_dialog_xml, "label-ip-address");
- gtk_label_set_text (GTK_LABEL (label), addr);
-
- label = get_label (info_dialog, applet->info_dialog_xml, "label-destination-address");
- if (flags & IFF_POINTOPOINT)
- {
- gtk_label_set_text (GTK_LABEL (label), dest);
- gtk_widget_show (label);
- }
- else
- gtk_widget_hide (label);
-
- label = get_label (info_dialog, applet->info_dialog_xml, "label-destination-address-label");
- if (flags & IFF_POINTOPOINT)
- {
- gtk_label_set_text (GTK_LABEL (label), dest);
- gtk_widget_show (label);
- }
- else
- gtk_widget_hide (label);
-
- label = get_label (info_dialog, applet->info_dialog_xml, "label-broadcast-address");
- gtk_label_set_text (GTK_LABEL (label), broadcast);
-
- label = get_label (info_dialog, applet->info_dialog_xml, "label-subnet-mask");
- gtk_label_set_text (GTK_LABEL (label), mask);
-
- label = get_label (info_dialog, applet->info_dialog_xml, "label-hardware-address");
- gtk_label_set_text (GTK_LABEL (label), mac);
-
-out:
- close (fd);
- g_free (addr);
- g_free (broadcast);
- g_free (mask);
- g_free (dest);
- g_free (iface_and_type);
- g_free (mac);
-
- return ret;
-}
-
-static void nmwa_show_info_cb (GtkMenuItem *mi, NMWirelessApplet *applet)
-{
- GtkWidget *info_dialog;
-
- info_dialog = glade_xml_get_widget (applet->info_dialog_xml, "info_dialog");
-
- if (nmwa_update_info (applet))
- {
- gtk_window_present (GTK_WINDOW (info_dialog));
- gtk_dialog_run (GTK_DIALOG (info_dialog));
- gtk_widget_hide (GTK_WIDGET (info_dialog));
- }
-}
-
-static void nmwa_about_cb (NMWirelessApplet *applet)
-{
- GdkPixbuf *pixbuf;
- char *file;
- GtkWidget *about_dialog;
-
- static const gchar *authors[] =
- {
- "The Red Hat Desktop Team, including:\n",
- "Jonathan Blandford <jrb@redhat.com>",
- "John Palmieri <johnp@redhat.com>",
- "Ray Strode <rstrode@redhat.com>",
- "Colin Walters <walters@redhat.com>",
- "Dan Williams <dcbw@redhat.com>",
- "David Zeuthen <davidz@redhat.com>",
- "\nAnd others, including:\n",
- "Bill Moss <bmoss@clemson.edu>",
- "Tom Parker",
- "j@bootlab.org",
- "Peter Jones <pjones@redhat.com>",
- "Robert Love <rml@novell.com>",
- NULL
- };
-
- static const gchar *documenters[] =
- {
- NULL
- };
-
-#if !GTK_CHECK_VERSION(2,6,0)
- /* GTK 2.4 and earlier, have to use libgnome for about dialog */
- file = gnome_program_locate_file (NULL, GNOME_FILE_DOMAIN_PIXMAP, "gnome-networktool.png", FALSE, NULL);
- pixbuf = gdk_pixbuf_new_from_file (file, NULL);
- g_free (file);
-
- about_dialog = gnome_about_new (_("NetworkManager Applet"),
- VERSION,
- _("Copyright (C) 2004-2005 Red Hat, Inc."),
- _("Notification area applet for managing your network devices and connections."),
- authors,
- documenters,
- NULL,
- pixbuf);
- g_object_unref (pixbuf);
-
- gtk_window_set_screen (GTK_WINDOW (about_dialog), gtk_widget_get_screen (GTK_WIDGET (applet)));
- g_signal_connect (about_dialog, "destroy", G_CALLBACK (gtk_widget_destroyed), &about_dialog);
- gtk_widget_show (about_dialog);
-
-#else
-
- /* GTK 2.6 and later code */
- gtk_show_about_dialog (NULL,
- "name", _("NetworkManager Applet"),
- "version", VERSION,
- "copyright", _("Copyright (C) 2004-2005 Red Hat, Inc."),
- "comments", _("Notification area applet for managing your network devices and connections."),
- "authors", authors,
- "documenters", documenters,
- "translator-credits", NULL,
- "logo-icon-name", GTK_STOCK_NETWORK,
- NULL);
-#endif
-}
-
-typedef struct DialogCBData
-{
- char *msg;
- char *title;
-} DialogCBData;
-
-static void free_dialog_cb_data (DialogCBData *data)
-{
- g_return_if_fail (data != NULL);
-
- g_free (data->msg);
- g_free (data->title);
- memset (data, 0, sizeof (DialogCBData));
- g_free (data);
-}
-
-static void vpn_failure_dialog_close_cb (GtkWidget *dialog, gpointer user_data)
-{
- DialogCBData *data;
-
- if ((data = g_object_get_data (G_OBJECT (dialog), "data")))
- {
- g_object_set_data (G_OBJECT (dialog), "data", NULL);
- free_dialog_cb_data (data);
- }
-
- gtk_widget_destroy (dialog);
-}
-
-
-/*
- * nmwa_show_vpn_failure_dialog
- *
- * Present the VPN failure dialog.
- *
- */
-static gboolean nmwa_show_vpn_failure_dialog (DialogCBData *cb_data)
-{
- GtkWidget *dialog;
- guint32 timestamp;
-
- g_return_val_if_fail (cb_data != NULL, FALSE);
- g_return_val_if_fail (cb_data->msg != NULL, FALSE);
- g_return_val_if_fail (cb_data->title != NULL, FALSE);
-
- dialog = gtk_message_dialog_new_with_markup (NULL, 0, GTK_MESSAGE_ERROR, GTK_BUTTONS_OK, cb_data->msg, NULL);
- gtk_window_set_title (GTK_WINDOW (dialog), cb_data->title);
- g_signal_connect (dialog, "response", G_CALLBACK (vpn_failure_dialog_close_cb), NULL);
- g_signal_connect (dialog, "close", G_CALLBACK (vpn_failure_dialog_close_cb), NULL);
- g_object_set_data (G_OBJECT (dialog), "data", cb_data);
- gtk_widget_show_all (dialog);
-
- /* Bash focus-stealing prevention in the face */
- timestamp = gdk_x11_get_server_time (dialog->window);
- gdk_x11_window_set_user_time (dialog->window, timestamp);
-
- return FALSE;
-}
-
-
-/*
- * nmwa_schedule_vpn_failure_dialog
- *
- * Schedule display of the VPN Failure dialog.
- *
- */
-void nmwa_schedule_vpn_failure_dialog (NMWirelessApplet *applet, const char *member, const char *vpn_name, const char *error_msg)
-{
- DialogCBData *cb_data = NULL;
- gchar *error_head = NULL;
- gchar *error_desc = NULL;
- gchar *error_data = NULL;
-
- g_return_if_fail (applet != NULL);
- g_return_if_fail (member != NULL);
- g_return_if_fail (vpn_name != NULL);
- g_return_if_fail (error_msg != NULL);
-
- cb_data = g_malloc0 (sizeof (DialogCBData));
- cb_data->title = g_strdup (_("VPN Error"));
-
- if (!strcmp (member, NM_DBUS_VPN_SIGNAL_LOGIN_FAILED))
- {
- error_head = g_strdup (_("VPN Login Failure"));
- error_desc = g_strdup_printf (_("Could not start the VPN connection '%s' due to a login failure."), vpn_name);
- }
- else if (!strcmp (member, NM_DBUS_VPN_SIGNAL_LAUNCH_FAILED))
- {
- error_head = g_strdup (_("VPN Start Failure"));
- error_desc = g_strdup_printf (_("Could not start the VPN connection '%s' due to a failure launching the VPN program."), vpn_name);
- }
- else if (!strcmp (member, NM_DBUS_VPN_SIGNAL_CONNECT_FAILED))
- {
- error_head = g_strdup (_("VPN Connect Failure"));
- error_desc = g_strdup_printf (_("Could not start the VPN connection '%s' due to a connection error."), vpn_name);
- }
- else if (!strcmp (member, NM_DBUS_VPN_SIGNAL_VPN_CONFIG_BAD))
- {
- error_head = g_strdup (_("VPN Configuration Error"));
- error_desc = g_strdup_printf (_("The VPN connection '%s' was not correctly configured."), vpn_name);
- }
- else if (!strcmp (member, NM_DBUS_VPN_SIGNAL_IP_CONFIG_BAD))
- {
- error_head = g_strdup (_("VPN Connect Failure"));
- error_desc = g_strdup_printf (_("Could not start the VPN connection '%s' because the VPN server did not return an adequate network configuration."), vpn_name);
- }
- else
- {
- free_dialog_cb_data (cb_data);
- return;
- }
-
- error_data = g_strdup_printf (_("The VPN service said: \"%s\""), error_msg);
-
- cb_data->msg = g_strdup_printf ("<span weight=\"bold\" size=\"larger\">%s</span>\n\n"
- "%s\n\n%s", error_head, error_desc, error_data);
-
- g_free (error_head);
- g_free (error_desc);
- g_free (error_data);
-
- g_idle_add ((GSourceFunc) nmwa_show_vpn_failure_dialog, cb_data);
-}
-
-
-static void vpn_login_banner_dialog_close_cb (GtkWidget *dialog, gpointer user_data)
-{
- char *message;
-
- if ((message = g_object_get_data (G_OBJECT (dialog), "message")))
- {
- g_object_set_data (G_OBJECT (dialog), "message", NULL);
- g_free (message);
- }
-
- gtk_widget_destroy (dialog);
-}
-
-
-/*
- * nmwa_show_vpn_login_banner_dialog
- *
- * Present the VPN login banner dialog.
- *
- */
-static gboolean nmwa_show_vpn_login_banner_dialog (char *message)
-{
- GtkWidget *dialog;
- guint32 timestamp;
-
- g_return_val_if_fail (message != NULL, FALSE);
-
- dialog = gtk_message_dialog_new_with_markup (NULL, 0, GTK_MESSAGE_INFO, GTK_BUTTONS_OK, message, NULL);
- g_signal_connect (dialog, "response", G_CALLBACK (vpn_login_banner_dialog_close_cb), NULL);
- g_signal_connect (dialog, "close", G_CALLBACK (vpn_login_banner_dialog_close_cb), NULL);
- g_object_set_data (G_OBJECT (dialog), "message", message);
- gtk_widget_show_all (dialog);
-
- /* Bash focus-stealing prevention in the face */
- timestamp = gdk_x11_get_server_time (dialog->window);
- gdk_x11_window_set_user_time (dialog->window, timestamp);
-
- return FALSE;
-}
-
-
-/*
- * nmwa_schedule_vpn_login_banner_dialog
- *
- * Schedule display of the VPN Login Banner dialog.
- *
- */
-void nmwa_schedule_vpn_login_banner_dialog (NMWirelessApplet *applet, const char *vpn_name, const char *banner)
-{
- char *msg;
- char *msg2;
-
- g_return_if_fail (applet != NULL);
- g_return_if_fail (vpn_name != NULL);
- g_return_if_fail (banner != NULL);
-
- msg2 = g_strdup_printf (_("VPN connection '%s' said:"), vpn_name);
- msg = g_strdup_printf (_("<span weight=\"bold\" size=\"larger\">%s</span>\n\n"
- "%s\n\n\"%s\""), _("VPN Login Message"), msg2, banner);
- g_free (msg2);
-
- g_idle_add ((GSourceFunc) nmwa_show_vpn_login_banner_dialog, msg);
-}
-
-
-/*
- * nmwa_driver_notify_get_ignored_list
- *
- * Return list of devices for which we are supposed to ignore driver
- * notifications for from GConf.
- *
- */
-static GSList *nmwa_driver_notify_get_ignored_list (NMWirelessApplet *applet)
-{
- char *key;
- GConfValue *value;
- GSList *mac_list = NULL;
-
- g_return_val_if_fail (applet != NULL, NULL);
- g_return_val_if_fail (applet->gconf_client != NULL, NULL);
-
- /* Get current list of access point MAC addresses for this AP from GConf */
- key = g_strdup_printf ("%s/non_notify_cards", GCONF_PATH_PREFS);
- value = gconf_client_get (applet->gconf_client, key, NULL);
-
- if (value && (value->type == GCONF_VALUE_LIST) && (gconf_value_get_list_type (value) == GCONF_VALUE_STRING))
- mac_list = gconf_client_get_list (applet->gconf_client, key, GCONF_VALUE_STRING, NULL);
-
- if (value)
- gconf_value_free (value);
- g_free (key);
-
- return (mac_list);
-}
-
-
-/*
- * nmwa_driver_notify_is_device_ignored
- *
- * Look in GConf and determine whether or not we are supposed to
- * ignore driver notifications for a particular device.
- *
- */
-static gboolean nmwa_driver_notify_is_device_ignored (NMWirelessApplet *applet, NetworkDevice *dev)
-{
- gboolean found = FALSE;
- GSList * mac_list = NULL;
- GSList * elt;
- const char * dev_addr;
-
- g_return_val_if_fail (applet != NULL, TRUE);
- g_return_val_if_fail (applet->gconf_client != NULL, TRUE);
- g_return_val_if_fail (dev != NULL, TRUE);
-
- dev_addr = network_device_get_address (dev);
- g_return_val_if_fail (dev_addr != NULL, TRUE);
- g_return_val_if_fail (strlen (dev_addr) > 0, TRUE);
-
- mac_list = nmwa_driver_notify_get_ignored_list (applet);
-
- /* Ensure that the MAC isn't already in the list */
- for (elt = mac_list; elt; elt = g_slist_next (elt))
- {
- if (elt->data && !strcmp (dev_addr, elt->data))
- {
- found = TRUE;
- break;
- }
- }
-
- /* Free the list, since gconf_client_set_list deep-copies it */
- g_slist_foreach (mac_list, (GFunc)g_free, NULL);
- g_slist_free (mac_list);
-
- return found;
-}
-
-
-/*
- * nmwa_driver_notify_ignore_device
- *
- * Add a device's MAC address to the list of ones that we ignore
- * in GConf. Stores user's pref for "Don't remind me".
- *
- */
-static void nmwa_driver_notify_ignore_device (NMWirelessApplet *applet, NetworkDevice *dev)
-{
- gboolean found = FALSE;
- GSList * new_mac_list = NULL;
- GSList * elt;
- const char * dev_addr;
-
- g_return_if_fail (applet != NULL);
- g_return_if_fail (applet->gconf_client != NULL);
- g_return_if_fail (dev != NULL);
-
- dev_addr = network_device_get_address (dev);
- g_return_if_fail (dev_addr != NULL);
- g_return_if_fail (strlen (dev_addr) > 0);
-
- new_mac_list = nmwa_driver_notify_get_ignored_list (applet);
-
- /* Ensure that the MAC isn't already in the list */
- for (elt = new_mac_list; elt; elt = g_slist_next (elt))
- {
- if (elt->data && !strcmp (dev_addr, elt->data))
- {
- found = TRUE;
- break;
- }
- }
-
- /* Add the new MAC address to the end of the list */
- if (!found)
- {
- char *key = g_strdup_printf ("%s/non_notify_cards", GCONF_PATH_PREFS);
-
- new_mac_list = g_slist_append (new_mac_list, g_strdup (dev_addr));
- gconf_client_set_list (applet->gconf_client, key, GCONF_VALUE_STRING, new_mac_list, NULL);
- g_free (key);
- }
-
- /* Free the list, since gconf_client_set_list deep-copies it */
- g_slist_foreach (new_mac_list, (GFunc)g_free, NULL);
- g_slist_free (new_mac_list);
-}
-
-static gboolean nmwa_driver_notify_dialog_delete_cb (GtkWidget *widget, GdkEvent *event, gpointer user_data)
-{
- gtk_widget_destroy (widget);
- return FALSE;
-}
-
-static gboolean nmwa_driver_notify_dialog_destroy_cb (GtkWidget *widget, GdkEvent *event, gpointer user_data)
-{
- DriverNotifyCBData *cb_data = (DriverNotifyCBData *)(user_data);
- NetworkDevice *dev;
-
- g_return_val_if_fail (cb_data != NULL, FALSE);
- g_return_val_if_fail (cb_data->xml != NULL, FALSE);
-
- dev = cb_data->dev;
- g_return_val_if_fail (dev != NULL, FALSE);
-
- network_device_unref (dev);
-
- g_object_unref (cb_data->xml);
- g_free (cb_data);
-
- return FALSE;
-}
-
-
-static gboolean nmwa_driver_notify_ok_cb (GtkButton *button, gpointer user_data)
-{
- DriverNotifyCBData *cb_data = (DriverNotifyCBData *)(user_data);
- NetworkDevice *dev;
- NMWirelessApplet *applet;
- GtkWidget *dialog;
- GtkWidget *checkbox;
-
- g_return_val_if_fail (cb_data != NULL, FALSE);
- g_return_val_if_fail (cb_data->xml != NULL, FALSE);
-
- dev = cb_data->dev;
- g_return_val_if_fail (dev != NULL, FALSE);
-
- applet = cb_data->applet;
- g_return_val_if_fail (applet != NULL, FALSE);
-
- checkbox = glade_xml_get_widget (cb_data->xml, "dont_remind_checkbox");
- if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (checkbox)))
- nmwa_driver_notify_ignore_device (applet, dev);
-
- dialog = glade_xml_get_widget (cb_data->xml, "driver_sucks_dialog");
- gtk_widget_destroy (dialog);
-
- return FALSE;
-}
-
-
-/*
- * nmwa_driver_notify
- *
- * Notify the user if there's some problem with the driver
- * of a specific network device.
- *
- */
-gboolean nmwa_driver_notify (gpointer user_data)
-{
- DriverNotifyCBData * cb_data = (DriverNotifyCBData *)(user_data);
- NetworkDevice * dev;
- NMWirelessApplet * applet;
- GtkWidget * dialog;
- GtkLabel * label;
- char * label_text = NULL;
- char * temp = NULL;
- GtkButton * button;
- NMDriverSupportLevel support_level;
- guint32 timestamp;
-
- g_return_val_if_fail (cb_data != NULL, FALSE);
-
- dev = cb_data->dev;
- g_return_val_if_fail (dev != NULL, FALSE);
-
- if (!(applet = cb_data->applet) || !applet->glade_file)
- goto out;
-
- /* If the user has already requested that we ignore notifications for
- * this device, don't do anything.
- */
- if (nmwa_driver_notify_is_device_ignored (applet, dev))
- goto out;
-
- if (!(cb_data->xml = glade_xml_new (applet->glade_file, "driver_sucks_dialog", NULL)))
- {
- nmwa_schedule_warning_dialog (applet, _("The NetworkManager Applet could not find some required resources (the glade file was not found)."));
- goto out;
- }
-
- dialog = glade_xml_get_widget (cb_data->xml, "driver_sucks_dialog");
- g_signal_connect (G_OBJECT (dialog), "destroy-event", GTK_SIGNAL_FUNC (nmwa_driver_notify_dialog_destroy_cb), cb_data);
- g_signal_connect (G_OBJECT (dialog), "delete-event", GTK_SIGNAL_FUNC (nmwa_driver_notify_dialog_delete_cb), cb_data);
-
- label = GTK_LABEL (glade_xml_get_widget (cb_data->xml, "driver_sucks_label"));
-
- switch (network_device_get_driver_support_level (dev))
- {
- case NM_DRIVER_NO_WIRELESS_SCAN:
- temp = g_strdup_printf (_("The network device \"%s (%s)\" does not support wireless scanning."),
- network_device_get_desc (dev), network_device_get_iface (dev));
- label_text = g_strdup_printf (gtk_label_get_label (label), temp);
- g_free (temp);
- break;
-
- case NM_DRIVER_NO_CARRIER_DETECT:
- temp = g_strdup_printf (_("The network device \"%s (%s)\" does not support link detection."),
- network_device_get_desc (dev), network_device_get_iface (dev));
- label_text = g_strdup_printf (gtk_label_get_label (label), temp);
- g_free (temp);
- break;
-
- default:
- break;
- }
-
- if (label_text)
- gtk_label_set_markup (label, label_text);
-
- button = GTK_BUTTON (glade_xml_get_widget (cb_data->xml, "ok_button"));
- g_signal_connect (G_OBJECT (button), "clicked", GTK_SIGNAL_FUNC (nmwa_driver_notify_ok_cb), cb_data);
-
- gtk_widget_show_all (GTK_WIDGET (dialog));
-
- /* Bash focus-stealing prevention in the face */
- timestamp = gdk_x11_get_server_time (dialog->window);
- gdk_x11_window_set_user_time (dialog->window, timestamp);
-
-out:
- network_device_unref (cb_data->dev);
- return (FALSE);
-}
-
-
-static void nmwa_set_icon (NMWirelessApplet *applet, GdkPixbuf *new_icon)
-{
- GdkPixbuf *composite;
-
- g_return_if_fail (applet != NULL);
- g_return_if_fail (new_icon != NULL);
-
- composite = gdk_pixbuf_copy (new_icon);
-
- if (applet->gui_active_vpn)
- {
- int dest_x = gdk_pixbuf_get_width (new_icon) - gdk_pixbuf_get_width (applet->vpn_lock_icon);
- int dest_y = gdk_pixbuf_get_height (new_icon) - gdk_pixbuf_get_height (applet->vpn_lock_icon) - 2;
-
- gdk_pixbuf_composite (applet->vpn_lock_icon, composite, dest_x, dest_y, gdk_pixbuf_get_width (applet->vpn_lock_icon),
- gdk_pixbuf_get_height (applet->vpn_lock_icon), dest_x, dest_y, 1.0, 1.0, GDK_INTERP_NEAREST, 255);
- }
-
- gtk_image_set_from_pixbuf (GTK_IMAGE (applet->pixmap), composite);
- g_object_unref (composite);
-}
-
-
-static void nmwa_set_progress (NMWirelessApplet *applet, GdkPixbuf *progress_icon)
-{
- g_return_if_fail (applet != NULL);
-
- gtk_image_set_from_pixbuf (GTK_IMAGE (applet->progress_bar), progress_icon);
- if (!progress_icon)
- gtk_widget_hide (applet->progress_bar);
- else
- gtk_widget_show (applet->progress_bar);
-}
-
-/*
- * animation_timeout
- *
- * Jump to the next frame of the applets icon if the icon
- * is supposed to be animated.
- *
- */
-static gboolean animation_timeout (NMWirelessApplet *applet)
-{
- NetworkDevice *act_dev = nmwa_get_first_active_device (applet->dbus_device_list);
-
- if (!applet->nm_running)
- {
- applet->animation_step = 0;
- return TRUE;
- }
-
- switch (applet->gui_nm_state)
- {
- case NM_STATE_CONNECTING:
- if (act_dev && network_device_is_wireless (act_dev))
- {
- if (applet->animation_step >= NUM_WIRELESS_CONNECTING_FRAMES)
- applet->animation_step = 0;
- nmwa_set_icon (applet, applet->wireless_connecting_icons[applet->animation_step]);
- }
- else if (act_dev)
- {
- if (applet->animation_step >= NUM_WIRED_CONNECTING_FRAMES)
- applet->animation_step = 0;
- nmwa_set_icon (applet, applet->wired_connecting_icons[applet->animation_step]);
- }
- applet->animation_step ++;
- break;
-
- default:
- break;
- }
-
- return TRUE;
-}
-
-
-static GdkPixbuf * nmwa_act_stage_to_pixbuf (NMWirelessApplet *applet, NetworkDevice *dev, WirelessNetwork *net, char **tip)
-{
- const char *essid;
- const char *iface;
-
- g_return_val_if_fail (applet != NULL, NULL);
- g_return_val_if_fail (dev != NULL, NULL);
- g_return_val_if_fail (tip != NULL, NULL);
-
- iface = network_device_get_iface (dev);
- essid = net ? wireless_network_get_essid (net) : NULL;
- switch (network_device_get_act_stage (dev))
- {
- case NM_ACT_STAGE_DEVICE_PREPARE:
- {
- if (network_device_is_wired (dev))
- *tip = g_strdup_printf (_("Preparing device %s for the wired network..."), iface);
- else if (network_device_is_wireless (dev))
- *tip = g_strdup_printf (_("Preparing device %s for the wireless network '%s'..."), iface, essid);
- return applet->progress_icons[1];
- }
-
- case NM_ACT_STAGE_DEVICE_CONFIG:
- {
- if (network_device_is_wired (dev))
- *tip = g_strdup_printf (_("Configuring device %s for the wired network..."), iface);
- else if (network_device_is_wireless (dev))
- *tip = g_strdup_printf (_("Attempting to join the wireless network '%s'..."), essid);
- return applet->progress_icons[3];
- }
-
- case NM_ACT_STAGE_NEED_USER_KEY:
- {
- if (network_device_is_wireless (dev))
- *tip = g_strdup_printf (_("Waiting for Network Key for the wireless network '%s'..."), essid);
- return applet->progress_icons[4];
- }
-
- case NM_ACT_STAGE_IP_CONFIG_START:
- {
- if (network_device_is_wired (dev))
- *tip = g_strdup_printf (_("Requesting a network address from the wired network..."));
- else if (network_device_is_wireless (dev))
- *tip = g_strdup_printf (_("Requesting a network address from the wireless network '%s'..."), essid);
- return applet->progress_icons[5];
- }
-
- case NM_ACT_STAGE_IP_CONFIG_GET:
- {
- if (network_device_is_wired (dev))
- *tip = g_strdup_printf (_("Requesting a network address from the wired network..."));
- else if (network_device_is_wireless (dev))
- *tip = g_strdup_printf (_("Requesting a network address from the wireless network '%s'..."), essid);
- return applet->progress_icons[8];
- }
-
- case NM_ACT_STAGE_IP_CONFIG_COMMIT:
- {
- if (network_device_is_wired (dev))
- *tip = g_strdup_printf (_("Finishing connection to the wired network..."));
- else if (network_device_is_wireless (dev))
- *tip = g_strdup_printf (_("Finishing connection to the wireless network '%s'..."), essid);
- return applet->progress_icons[10];
- }
-
- default:
- case NM_ACT_STAGE_ACTIVATED:
- case NM_ACT_STAGE_FAILED:
- case NM_ACT_STAGE_CANCELLED:
- case NM_ACT_STAGE_UNKNOWN:
- break;
- }
- return NULL;
-}
-
-
-/*
- * nmwa_update_state
- *
- * Figure out what the currently active device is from NetworkManager, its type,
- * and what our icon on the panel should look like for each type.
- *
- */
-static void nmwa_update_state (NMWirelessApplet *applet)
-{
- gboolean show_applet = TRUE;
- gboolean need_animation = FALSE;
- gboolean active_vpn = FALSE;
- GdkPixbuf * pixbuf = NULL;
- GdkPixbuf * progress = NULL;
- gint strength = -1;
- char * tip = NULL;
- WirelessNetwork * active_network = NULL;
- NetworkDevice * act_dev = NULL;
-
- g_mutex_lock (applet->data_mutex);
-
- act_dev = nmwa_get_first_active_device (applet->gui_device_list);
- if (act_dev && network_device_is_wireless (act_dev))
- {
- active_network = network_device_get_active_wireless_network (act_dev);
- strength = CLAMP ((int)network_device_get_strength (act_dev), 0, 100);
- }
-
- if (!applet->nm_running)
- {
- show_applet = FALSE;
- tip = g_strdup (_("NetworkManager is not running"));
- goto done;
- }
-
- if (!act_dev)
- applet->gui_nm_state = NM_STATE_DISCONNECTED;
-
- switch (applet->gui_nm_state)
- {
- case NM_STATE_DISCONNECTED:
- pixbuf = applet->no_connection_icon;
- tip = g_strdup (_("No network connection"));
- break;
-
- case NM_STATE_CONNECTED:
- if (network_device_is_wired (act_dev))
- {
- pixbuf = applet->wired_icon;
- tip = g_strdup (_("Wired network connection"));
- }
- else if (network_device_is_wireless (act_dev))
- {
- if (applet->is_adhoc)
- {
- pixbuf = applet->adhoc_icon;
- tip = g_strdup (_("Connected to an Ad-Hoc wireless network"));
- }
- else
- {
- if (strength > 75)
- pixbuf = applet->wireless_100_icon;
- else if (strength > 50)
- pixbuf = applet->wireless_75_icon;
- else if (strength > 25)
- pixbuf = applet->wireless_50_icon;
- else if (strength > 0)
- pixbuf = applet->wireless_25_icon;
- else
- pixbuf = applet->wireless_00_icon;
- tip = g_strdup_printf (_("Wireless network connection to '%s' (%d%%)"),
- active_network ? wireless_network_get_essid (active_network) : "(unknown)", strength);
- }
- }
- break;
-
- case NM_STATE_CONNECTING:
- progress = nmwa_act_stage_to_pixbuf (applet, act_dev, active_network, &tip);
- need_animation = TRUE;
- break;
-
- default:
- break;
- }
-
-done:
- g_mutex_unlock (applet->data_mutex);
-
- if (!applet->tooltips)
- applet->tooltips = gtk_tooltips_new ();
-
- if (applet->gui_active_vpn != NULL) {
- char *newtip;
- char *vpntip;
-
- vpntip = g_strdup_printf (_("VPN connection to '%s'"), nmwa_vpn_connection_get_name (applet->gui_active_vpn));
- newtip = g_strconcat (tip, "\n", vpntip, NULL);
- g_free (vpntip);
- g_free (tip);
- tip = newtip;
- }
-
- gtk_tooltips_set_tip (applet->tooltips, applet->event_box, tip, NULL);
- g_free (tip);
-
- nmwa_set_progress (applet, progress);
-
- if (applet->animation_id)
- g_source_remove (applet->animation_id);
- if (need_animation)
- applet->animation_id = g_timeout_add (100, (GSourceFunc) animation_timeout, applet);
- else
- {
- if (pixbuf)
- nmwa_set_icon (applet, pixbuf);
- else
- show_applet = FALSE;
- }
-
- /* determine if we should hide the notification icon */
- if (show_applet)
- gtk_widget_show (GTK_WIDGET (applet));
- else
- gtk_widget_hide (GTK_WIDGET (applet));
-}
-
-
-/*
- * nmwa_redraw_timeout
- *
- * Called regularly to update the applet's state and icon in the panel
- *
- */
-static int nmwa_redraw_timeout (NMWirelessApplet *applet)
-{
- nmwa_update_state (applet);
-
- return (TRUE);
-}
-
-static void nmwa_start_redraw_timeout (NMWirelessApplet *applet)
-{
- applet->redraw_timeout_id = g_timeout_add (1000, (GtkFunction) nmwa_redraw_timeout, applet);
-}
-
-
-/*
- * show_warning_dialog
- *
- * pop up a warning or error dialog with certain text
- *
- */
-static gboolean show_warning_dialog (char *mesg)
-{
- GtkWidget * dialog;
- guint32 timestamp;
-
- dialog = gtk_message_dialog_new (NULL, 0, GTK_MESSAGE_ERROR, GTK_BUTTONS_OK, mesg, NULL);
- gtk_widget_realize (dialog);
-
- /* Bash focus-stealing prevention in the face */
- timestamp = gdk_x11_get_server_time (dialog->window);
- gdk_x11_window_set_user_time (dialog->window, timestamp);
-
- gtk_dialog_run (GTK_DIALOG (dialog));
- gtk_widget_destroy (dialog);
- g_free (mesg);
-
- return FALSE;
-}
-
-
-/*
- * nmwa_schedule_warning_dialog
- *
- * Run a warning dialog in the main event loop.
- *
- */
-void nmwa_schedule_warning_dialog (NMWirelessApplet *applet, const char *msg)
-{
- char *lcl_msg;
-
- g_return_if_fail (applet != NULL);
- g_return_if_fail (msg != NULL);
-
- lcl_msg = g_strdup (msg);
- g_idle_add ((GSourceFunc) show_warning_dialog, lcl_msg);
-}
-
-
-/*
- * nmwa_get_device_for_nm_device
- *
- * Searches the device list for a device that matches the
- * NetworkManager ID given.
- *
- */
-NetworkDevice *nmwa_get_device_for_nm_path (GSList *dev_list, const char *nm_path)
-{
- NetworkDevice *found_dev = NULL;
- GSList *elt;
-
- g_return_val_if_fail (nm_path != NULL, NULL);
- g_return_val_if_fail (strlen (nm_path), NULL);
-
- for (elt = dev_list; elt; elt = g_slist_next (elt))
- {
- NetworkDevice *dev = (NetworkDevice *)(elt->data);
- if (dev && (strcmp (network_device_get_nm_path (dev), nm_path) == 0))
- {
- found_dev = dev;
- break;
- }
- }
-
- return (found_dev);
-}
-
-
-/*
- * nmwa_menu_item_activate
- *
- * Signal function called when user clicks on a menu item
- *
- */
-static void nmwa_menu_item_activate (GtkMenuItem *item, gpointer user_data)
-{
- NMWirelessApplet *applet = (NMWirelessApplet *)user_data;
- NetworkDevice *dev = NULL;
- WirelessNetwork *net = NULL;
- char *tag;
-
- g_return_if_fail (item != NULL);
- g_return_if_fail (applet != NULL);
-
- if (!(tag = g_object_get_data (G_OBJECT (item), "device")))
- return;
-
- g_mutex_lock (applet->data_mutex);
- if ((dev = nmwa_get_device_for_nm_path (applet->gui_device_list, tag)))
- network_device_ref (dev);
- g_mutex_unlock (applet->data_mutex);
-
- if (!dev)
- return;
-
- if ((tag = g_object_get_data (G_OBJECT (item), "network")))
- net = network_device_get_wireless_network_by_essid (dev, tag);
-
- nmwa_dbus_set_device (applet->connection, dev, net ? wireless_network_get_essid (net) : NULL, -1, NULL);
- network_device_unref (dev);
-}
-
-
-/*
- * nmwa_menu_vpn_item_activate
- *
- * Signal function called when user clicks on a VPN menu item
- *
- */
-static void nmwa_menu_vpn_item_activate (GtkMenuItem *item, gpointer user_data)
-{
- NMWirelessApplet *applet = (NMWirelessApplet *)user_data;
- char *tag;
-
- g_return_if_fail (item != NULL);
- g_return_if_fail (applet != NULL);
-
- if ((tag = g_object_get_data (G_OBJECT (item), "vpn")))
- {
- VPNConnection *vpn = (VPNConnection *)tag;
- const char *name = nmwa_vpn_connection_get_name (vpn);
- GSList *passwords;
-
- if (vpn != applet->gui_active_vpn)
- {
- char *gconf_key;
- char *escaped_name;
- gboolean last_attempt_success;
- gboolean reprompt;
-
- escaped_name = gconf_escape_key (name, strlen (name));
- gconf_key = g_strdup_printf ("%s/%s/last_attempt_success", GCONF_PATH_VPN_CONNECTIONS, escaped_name);
- last_attempt_success = gconf_client_get_bool (applet->gconf_client, gconf_key, NULL);
- g_free (gconf_key);
- g_free (escaped_name);
-
- reprompt = ! last_attempt_success; /* it's obvious, but.. */
-
- if ((passwords = nmwa_vpn_request_password (applet,
- name,
- nmwa_vpn_connection_get_service (vpn),
- reprompt)) != NULL)
- {
- nmwa_dbus_vpn_activate_connection (applet->connection, name, passwords);
-
- g_slist_foreach (passwords, (GFunc)g_free, NULL);
- g_slist_free (passwords);
- }
- }
- }
-}
-
-
-/*
- * nmwa_menu_dialup_item_activate
- *
- * Signal function called when user clicks on a dialup menu item
- *
- */
-static void nmwa_menu_dialup_item_activate (GtkMenuItem *item, gpointer user_data)
-{
- NMWirelessApplet *applet = (NMWirelessApplet *) user_data;
- const char *dialup;
-
- g_return_if_fail (item != NULL);
- g_return_if_fail (applet != NULL);
-
- dialup = g_object_get_data (G_OBJECT (item), "dialup");
- if (!dialup)
- return;
-
- nmwa_dbus_dialup_activate_connection (applet, dialup);
-}
-
-
-/*
- * nmwa_menu_configure_vpn_item_activate
- *
- * Signal function called when user clicks "Configure VPN..."
- *
- */
-static void nmwa_menu_configure_vpn_item_activate (GtkMenuItem *item, gpointer user_data)
-{
- NMWirelessApplet *applet = (NMWirelessApplet *)user_data;
- const char *argv[] = { BINDIR "/nm-vpn-properties", NULL};
-
- g_return_if_fail (item != NULL);
- g_return_if_fail (applet != NULL);
-
- g_spawn_async (NULL, (gchar **) argv, NULL, 0, NULL, NULL, NULL, NULL);
-}
-
-/*
- * nmwa_menu_disconnect_vpn_item_activate
- *
- * Signal function called when user clicks "Disconnect VPN..."
- *
- */
-static void nmwa_menu_disconnect_vpn_item_activate (GtkMenuItem *item, gpointer user_data)
-{
- NMWirelessApplet *applet = (NMWirelessApplet *)user_data;
-
- g_return_if_fail (item != NULL);
- g_return_if_fail (applet != NULL);
-
- nmwa_dbus_vpn_deactivate_connection (applet->connection);
-}
-
-
-static void scanning_menu_update (GtkWidget *menu_item, GtkCheckMenuItem *active_item)
-{
- g_return_if_fail (active_item != NULL);
-
- g_object_set_data (G_OBJECT (menu_item), "block-activate", GINT_TO_POINTER(1));
- gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (menu_item), (GTK_CHECK_MENU_ITEM (menu_item) == active_item) ? TRUE : FALSE);
- g_object_set_data (G_OBJECT (menu_item), "block-activate", GINT_TO_POINTER(0));
-}
-
-
-/*
- * nmwa_menu_scanning_item_activate
- *
- * Handle a request to change scanning behavior
- *
- */
-static void nmwa_menu_scanning_item_activate (GtkMenuItem *item, gpointer user_data)
-{
- NMWirelessApplet * applet = (NMWirelessApplet *)user_data;
- char * tag;
-
- g_return_if_fail (item != NULL);
- g_return_if_fail (applet != NULL);
-
- if ((tag = g_object_get_data (G_OBJECT (item), "block-activate")))
- if (GPOINTER_TO_INT(tag) == 1)
- return;
-
- if ((tag = g_object_get_data (G_OBJECT (item), "scan_method")))
- {
- NMWirelessScanMethod method = GPOINTER_TO_UINT (tag);
-
- if ((method == NM_SCAN_METHOD_ALWAYS) || (method == NM_SCAN_METHOD_NEVER)
- || (method == NM_SCAN_METHOD_WHEN_UNASSOCIATED))
- gconf_client_set_int (applet->gconf_client, GCONF_PATH_WIRELESS "/scan_method", method, NULL);
- }
-
- /* Check only this menu item */
- if (!applet->scanning_menu)
- return;
-
- gtk_container_foreach (GTK_CONTAINER (applet->scanning_menu), (GtkCallback) scanning_menu_update, (gpointer) item);
-}
-
-
-/*
- * nmwa_menu_add_separator_item
- *
- */
-static void nmwa_menu_add_separator_item (GtkWidget *menu)
-{
- GtkWidget *menu_item;
- menu_item = gtk_separator_menu_item_new ();
- gtk_menu_shell_append (GTK_MENU_SHELL (menu), menu_item);
- gtk_widget_show (menu_item);
-}
-
-
-/*
- * nmwa_menu_add_text_item
- *
- * Add a non-clickable text item to a menu
- *
- */
-static void nmwa_menu_add_text_item (GtkWidget *menu, char *text)
-{
- GtkWidget *menu_item;
-
- g_return_if_fail (text != NULL);
- g_return_if_fail (menu != NULL);
-
- menu_item = gtk_menu_item_new_with_label (text);
- gtk_widget_set_sensitive (menu_item, FALSE);
-
- gtk_menu_shell_append (GTK_MENU_SHELL (menu), menu_item);
- gtk_widget_show (menu_item);
-}
-
-
-/*
- * nmwa_menu_add_device_item
- *
- * Add a network device to the menu
- *
- */
-static void nmwa_menu_add_device_item (GtkWidget *menu, NetworkDevice *device, gint n_devices, NMWirelessApplet *applet)
-{
- GtkWidget * menu_item;
-
- g_return_if_fail (menu != NULL);
- g_return_if_fail (device != NULL);
- g_return_if_fail (applet != NULL);
-
- switch (network_device_get_type (device))
- {
- case DEVICE_TYPE_WIRED_ETHERNET:
- {
- NMWiredMenuItem *item = wired_menu_item_new ();
- GtkCheckMenuItem *gtk_item = wired_menu_item_get_check_item (item);
-
- wired_menu_item_update (item, device, n_devices);
- if (network_device_get_active (device))
- gtk_check_menu_item_set_active (gtk_item, TRUE);
- gtk_check_menu_item_set_draw_as_radio (gtk_item, TRUE);
-
- g_object_set_data (G_OBJECT (gtk_item), "device", g_strdup (network_device_get_nm_path (device)));
- g_object_set_data (G_OBJECT (gtk_item), "nm-item-data", item);
- g_signal_connect(G_OBJECT (gtk_item), "activate", G_CALLBACK (nmwa_menu_item_activate), applet);
-
- gtk_menu_shell_append (GTK_MENU_SHELL (menu), GTK_WIDGET (gtk_item));
- gtk_widget_show (GTK_WIDGET (gtk_item));
- break;
- }
-
- case DEVICE_TYPE_WIRELESS_ETHERNET:
- {
- NMWirelessMenuItem *item = wireless_menu_item_new ();
- GtkMenuItem *gtk_item = wireless_menu_item_get_item (item);
-
- wireless_menu_item_update (item, device, n_devices);
-
- g_object_set_data (G_OBJECT (gtk_item), "device", g_strdup (network_device_get_nm_path (device)));
- g_object_set_data (G_OBJECT (gtk_item), "nm-item-data", item);
- g_signal_connect(G_OBJECT (gtk_item), "activate", G_CALLBACK (nmwa_menu_item_activate), applet);
-
- gtk_menu_shell_append (GTK_MENU_SHELL (menu), GTK_WIDGET (gtk_item));
- gtk_widget_show (GTK_WIDGET (gtk_item));
- break;
- }
-
- default:
- break;
- }
-}
-
-
-static void custom_essid_item_selected (GtkWidget *menu_item, NMWirelessApplet *applet)
-{
- nmwa_other_network_dialog_run (applet, FALSE);
-}
-
-
-static void nmwa_menu_add_custom_essid_item (GtkWidget *menu, NMWirelessApplet *applet)
-{
- GtkWidget *menu_item;
- GtkWidget *label;
-
- menu_item = gtk_menu_item_new ();
- label = gtk_label_new_with_mnemonic (_("_Connect to Other Wireless Network..."));
- gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
- gtk_container_add (GTK_CONTAINER (menu_item), label);
- gtk_widget_show_all (menu_item);
- gtk_menu_shell_append (GTK_MENU_SHELL (menu), menu_item);
- g_signal_connect (menu_item, "activate", G_CALLBACK (custom_essid_item_selected), applet);
-}
-
-
-static void new_network_item_selected (GtkWidget *menu_item, NMWirelessApplet *applet)
-{
- nmwa_other_network_dialog_run (applet, TRUE);
-}
-
-
-static void nmwa_menu_add_create_network_item (GtkWidget *menu, NMWirelessApplet *applet)
-{
- GtkWidget *menu_item;
- GtkWidget *label;
-
- menu_item = gtk_menu_item_new ();
- label = gtk_label_new_with_mnemonic (_("Create _New Wireless Network..."));
- gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
- gtk_container_add (GTK_CONTAINER (menu_item), label);
- gtk_widget_show_all (menu_item);
- gtk_menu_shell_append (GTK_MENU_SHELL (menu), menu_item);
- g_signal_connect (menu_item, "activate", G_CALLBACK (new_network_item_selected), applet);
-}
-
-
-typedef struct AddNetworksCB
-{
- NMWirelessApplet * applet;
- gboolean has_encrypted;
- GtkWidget * menu;
-} AddNetworksCB;
-
-
-/*
- * nmwa_add_networks_helper
- *
- */
-static void nmwa_add_networks_helper (NetworkDevice *dev, WirelessNetwork *net, gpointer user_data)
-{
- AddNetworksCB * cb_data = (AddNetworksCB *)user_data;
- NMNetworkMenuItem * item;
- GtkCheckMenuItem * gtk_item;
-
- g_return_if_fail (dev != NULL);
- g_return_if_fail (net != NULL);
- g_return_if_fail (cb_data != NULL);
- g_return_if_fail (cb_data->menu != NULL);
- g_return_if_fail (cb_data->applet != NULL);
-
- item = network_menu_item_new (cb_data->applet->encryption_size_group);
- gtk_item = network_menu_item_get_check_item (item);
-
- gtk_menu_shell_append (GTK_MENU_SHELL (cb_data->menu), GTK_WIDGET (gtk_item));
- if (network_device_get_active (dev) && wireless_network_get_active (net))
- gtk_check_menu_item_set_active (gtk_item, TRUE);
- network_menu_item_update (item, net, cb_data->has_encrypted);
-
- g_object_set_data (G_OBJECT (gtk_item), "network", g_strdup (wireless_network_get_essid (net)));
- g_object_set_data (G_OBJECT (gtk_item), "device", g_strdup (network_device_get_nm_path (dev)));
- g_object_set_data (G_OBJECT (gtk_item), "nm-item-data", item);
- g_signal_connect (G_OBJECT (gtk_item), "activate", G_CALLBACK (nmwa_menu_item_activate), cb_data->applet);
-
- gtk_widget_show (GTK_WIDGET (gtk_item));
-}
-
-
-/*
- * nmwa_has_encrypted_networks_helper
- *
- */
-static void nmwa_has_encrypted_networks_helper (NetworkDevice *dev, WirelessNetwork *net, gpointer user_data)
-{
- gboolean * has_encrypted = user_data;
-
- g_return_if_fail (dev != NULL);
- g_return_if_fail (net != NULL);
- g_return_if_fail (has_encrypted != NULL);
-
- if (wireless_network_get_encrypted (net))
- *has_encrypted = TRUE;
-}
-
-
-/*
- * nmwa_menu_device_add_networks
- *
- */
-static void nmwa_menu_device_add_networks (GtkWidget *menu, NetworkDevice *dev, NMWirelessApplet *applet)
-{
- GSList * list;
- gboolean has_encrypted = FALSE;
- AddNetworksCB * add_networks_cb = NULL;
-
- g_return_if_fail (menu != NULL);
- g_return_if_fail (applet != NULL);
- g_return_if_fail (dev != NULL);
-
- if (!network_device_is_wireless (dev))
- return;
-
- /* Check for any security */
- network_device_foreach_wireless_network (dev, nmwa_has_encrypted_networks_helper, &has_encrypted);
-
- add_networks_cb = g_malloc0 (sizeof (AddNetworksCB));
- add_networks_cb->applet = applet;
- add_networks_cb->has_encrypted = has_encrypted;
- add_networks_cb->menu = menu;
-
- /* Add all networks in our network list to the menu */
- network_device_foreach_wireless_network (dev, nmwa_add_networks_helper, add_networks_cb);
-
- g_free (add_networks_cb);
-}
-
-
-/*
- * nmwa_menu_add_devices
- *
- */
-static void nmwa_menu_add_vpn_menu (GtkWidget *menu, NMWirelessApplet *applet)
-{
- GtkMenuItem *item;
- GtkMenu *vpn_menu;
- GtkMenuItem *other_item;
- GSList *elt;
-
- g_return_if_fail (menu != NULL);
- g_return_if_fail (applet != NULL);
-
- item = GTK_MENU_ITEM (gtk_menu_item_new_with_mnemonic (_("_VPN Connections")));
-
- vpn_menu = GTK_MENU (gtk_menu_new ());
- for (elt = applet->gui_vpn_connections; elt; elt = g_slist_next (elt))
- {
- GtkCheckMenuItem *vpn_item;
- VPNConnection *vpn = elt->data;
- const char *vpn_name = nmwa_vpn_connection_get_name (vpn);
-
- vpn_item = GTK_CHECK_MENU_ITEM (gtk_check_menu_item_new_with_label (vpn_name));
- nmwa_vpn_connection_ref (vpn);
- g_object_set_data (G_OBJECT (vpn_item), "vpn", vpn);
-
- if (applet->gui_active_vpn && (strcmp (vpn_name, nmwa_vpn_connection_get_name (applet->gui_active_vpn)) == 0))
- gtk_check_menu_item_set_active (vpn_item, TRUE);
-
- g_signal_connect (G_OBJECT (vpn_item), "activate", G_CALLBACK (nmwa_menu_vpn_item_activate), applet);
- gtk_menu_shell_append (GTK_MENU_SHELL (vpn_menu), GTK_WIDGET (vpn_item));
- }
-
- /* Draw a seperator, but only if we have VPN connections above it */
- if (applet->gui_vpn_connections)
- {
- other_item = GTK_MENU_ITEM (gtk_separator_menu_item_new ());
- gtk_menu_shell_append (GTK_MENU_SHELL (vpn_menu), GTK_WIDGET (other_item));
- }
-
- other_item = GTK_MENU_ITEM (gtk_menu_item_new_with_mnemonic (_("_Configure VPN...")));
- g_signal_connect (G_OBJECT (other_item), "activate", G_CALLBACK (nmwa_menu_configure_vpn_item_activate), applet);
- gtk_menu_shell_append (GTK_MENU_SHELL (vpn_menu), GTK_WIDGET (other_item));
-
- other_item = GTK_MENU_ITEM (gtk_menu_item_new_with_mnemonic (_("_Disconnect VPN...")));
- g_signal_connect (G_OBJECT (other_item), "activate", G_CALLBACK (nmwa_menu_disconnect_vpn_item_activate), applet);
- if (!applet->gui_active_vpn)
- gtk_widget_set_sensitive (GTK_WIDGET (other_item), FALSE);
- gtk_menu_shell_append (GTK_MENU_SHELL (vpn_menu), GTK_WIDGET (other_item));
-
- gtk_menu_item_set_submenu (item, GTK_WIDGET (vpn_menu));
-
- gtk_menu_shell_append (GTK_MENU_SHELL (menu), GTK_WIDGET (item));
- gtk_widget_show_all (GTK_WIDGET (item));
-}
-
-
-static void nmwa_menu_add_dialup_menu (GtkWidget *menu, NMWirelessApplet *applet)
-{
- GtkMenuItem *item;
- GtkMenu *dialup_menu;
- GtkMenuItem *other_item;
- GSList *elt;
-
- g_return_if_fail (menu != NULL);
- g_return_if_fail (applet != NULL);
-
- item = GTK_MENU_ITEM (gtk_menu_item_new_with_mnemonic (_("_Dial Up Connections")));
-
- dialup_menu = GTK_MENU (gtk_menu_new ());
- for (elt = applet->dialup_list; elt; elt = g_slist_next (elt))
- {
- GtkMenuItem *dialup_item;
- char *name = elt->data;
- const char *label;
-
- label = g_strdup_printf (_("Connect to %s..."), name);
- dialup_item = GTK_MENU_ITEM (gtk_menu_item_new_with_label (label));
- g_object_set_data (G_OBJECT (dialup_item), "dialup", name);
-
- g_signal_connect (G_OBJECT (dialup_item), "activate", G_CALLBACK (nmwa_menu_dialup_item_activate), applet);
- gtk_menu_shell_append (GTK_MENU_SHELL (dialup_menu), GTK_WIDGET (dialup_item));
- }
-
- gtk_menu_item_set_submenu (item, GTK_WIDGET (dialup_menu));
- gtk_menu_shell_append (GTK_MENU_SHELL (menu), GTK_WIDGET (item));
- gtk_widget_show_all (GTK_WIDGET (item));
-}
-
-
-/** Returns TRUE if, and only if, we have VPN support installed
- *
- * Algorithm: just check whether any .name files exist in
- * /etc/NetworkManager/VPN
- */
-static gboolean is_vpn_available (void)
-{
- GDir *dir;
- gboolean result;
-
- result = FALSE;
- if ((dir = g_dir_open (VPN_NAME_FILES_DIR, 0, NULL)) != NULL) {
- const char *f;
- if (g_dir_read_name (dir) != NULL)
- result = TRUE;
- g_dir_close (dir);
- }
-
- return result;
-}
-
-/*
- * nmwa_menu_add_devices
- *
- */
-static void nmwa_menu_add_devices (GtkWidget *menu, NMWirelessApplet *applet)
-{
- GSList *element;
- gint n_wireless_interfaces = 0;
- gint n_wired_interfaces = 0;
- gboolean vpn_available, dialup_available;
-
- g_return_if_fail (menu != NULL);
- g_return_if_fail (applet != NULL);
-
- g_mutex_lock (applet->data_mutex);
- if (! applet->gui_device_list)
- {
- nmwa_menu_add_text_item (menu, _("No network devices have been found"));
- g_mutex_unlock (applet->data_mutex);
- return;
- }
-
- for (element = applet->gui_device_list; element; element = element->next)
- {
- NetworkDevice *dev = (NetworkDevice *)(element->data);
-
- g_assert (dev);
-
- switch (network_device_get_type (dev))
- {
- case DEVICE_TYPE_WIRELESS_ETHERNET:
- n_wireless_interfaces++;
- break;
- case DEVICE_TYPE_WIRED_ETHERNET:
- n_wired_interfaces++;
- break;
- default:
- break;
- }
- }
-
- /* Add all devices in our device list to the menu */
- for (element = applet->gui_device_list; element; element = element->next)
- {
- NetworkDevice *dev = (NetworkDevice *)(element->data);
-
- if (dev)
- {
- gint n_devices = 0;
-
- switch (network_device_get_type (dev))
- {
- case DEVICE_TYPE_WIRED_ETHERNET:
- n_devices = n_wired_interfaces;
- break;
-
- case DEVICE_TYPE_WIRELESS_ETHERNET:
- n_devices = n_wireless_interfaces;
- break;
-
- default:
- break;
- }
-
- if (n_devices >= 0)
- {
- nmwa_menu_add_device_item (menu, dev, n_devices, applet);
- nmwa_menu_device_add_networks (menu, dev, applet);
- }
- }
- }
-
- /* Add the VPN and Dial Up menus and their associated seperator */
- vpn_available = is_vpn_available ();
- dialup_available = !! applet->dialup_list;
- if (vpn_available || dialup_available)
- {
- nmwa_menu_add_separator_item (menu);
- if (vpn_available)
- nmwa_menu_add_vpn_menu (menu, applet);
- if (dialup_available)
- nmwa_menu_add_dialup_menu (menu, applet);
- }
-
- if (n_wireless_interfaces > 0)
- {
- /* Add the "Other wireless network..." entry */
- nmwa_menu_add_separator_item (menu);
- nmwa_menu_add_custom_essid_item (menu, applet);
- nmwa_menu_add_create_network_item (menu, applet);
- }
-
- g_mutex_unlock (applet->data_mutex);
-}
-
-
-static void nmwa_set_wireless_enabled_cb (GtkWidget *widget, NMWirelessApplet *applet)
-{
- g_return_if_fail (applet != NULL);
-
- nmwa_dbus_enable_wireless (applet, !applet->wireless_enabled);
-}
-
-
-/*
- * nmwa_menu_item_data_free
- *
- * Frees the "network" data tag on a menu item we've created
- *
- */
-static void nmwa_menu_item_data_free (GtkWidget *menu_item, gpointer data)
-{
- char *tag;
- GtkMenu *menu;
-
- g_return_if_fail (menu_item != NULL);
- g_return_if_fail (data != NULL);
-
- if ((tag = g_object_get_data (G_OBJECT (menu_item), "network")))
- {
- g_object_set_data (G_OBJECT (menu_item), "network", NULL);
- g_free (tag);
- }
-
- if ((tag = g_object_get_data (G_OBJECT (menu_item), "nm-item-data")))
- {
- g_object_set_data (G_OBJECT (menu_item), "nm-item-data", NULL);
- g_free (tag);
- }
-
- if ((tag = g_object_get_data (G_OBJECT (menu_item), "device")))
- {
- g_object_set_data (G_OBJECT (menu_item), "device", NULL);
- g_free (tag);
- }
-
- if ((tag = g_object_get_data (G_OBJECT (menu_item), "vpn")))
- {
- g_object_set_data (G_OBJECT (menu_item), "vpn", NULL);
- nmwa_vpn_connection_unref ((VPNConnection *)tag);
- }
-
- if ((tag = g_object_get_data (G_OBJECT (menu_item), "disconnect")))
- {
- g_object_set_data (G_OBJECT (menu_item), "disconnect", NULL);
- g_free (tag);
- }
-
- if ((menu = GTK_MENU (gtk_menu_item_get_submenu (GTK_MENU_ITEM (menu_item)))))
- gtk_container_foreach (GTK_CONTAINER (menu), nmwa_menu_item_data_free, menu);
-
- gtk_widget_destroy (menu_item);
-}
-
-
-/*
- * nmwa_dispose_menu_items
- *
- * Destroy the menu and each of its items data tags
- *
- */
-static void nmwa_dropdown_menu_clear (GtkWidget *menu)
-{
- g_return_if_fail (menu != NULL);
-
- /* Free the "network" data on each menu item, and destroy the item */
- gtk_container_foreach (GTK_CONTAINER (menu), nmwa_menu_item_data_free, menu);
-}
-
-
-/*
- * nmwa_dropdown_menu_populate
- *
- * Set up our networks menu from scratch
- *
- */
-static void nmwa_dropdown_menu_populate (GtkWidget *menu, NMWirelessApplet *applet)
-{
- g_return_if_fail (menu != NULL);
- g_return_if_fail (applet != NULL);
-
- if (!applet->nm_running)
- nmwa_menu_add_text_item (menu, _("NetworkManager is not running..."));
- else
- nmwa_menu_add_devices (menu, applet);
-}
-
-
-/*
- * nmwa_dropdown_menu_show_cb
- *
- * Pop up the wireless networks menu
- *
- */
-static void nmwa_dropdown_menu_show_cb (GtkWidget *menu, NMWirelessApplet *applet)
-{
- g_return_if_fail (menu != NULL);
- g_return_if_fail (applet != NULL);
-
- if (!applet->tooltips)
- applet->tooltips = gtk_tooltips_new ();
- gtk_tooltips_set_tip (applet->tooltips, applet->event_box, NULL, NULL);
-
- if (applet->dropdown_menu && (menu == applet->dropdown_menu))
- {
- nmwa_dropdown_menu_clear (applet->dropdown_menu);
- nmwa_dropdown_menu_populate (applet->dropdown_menu, applet);
- gtk_widget_show_all (applet->dropdown_menu);
- }
-}
-
-/*
- * nmwa_dropdown_menu_create
- *
- * Create the applet's dropdown menu
- *
- */
-static GtkWidget *nmwa_dropdown_menu_create (GtkMenuItem *parent, NMWirelessApplet *applet)
-{
- GtkWidget *menu;
-
- g_return_val_if_fail (parent != NULL, NULL);
- g_return_val_if_fail (applet != NULL, NULL);
-
- menu = gtk_menu_new ();
- gtk_container_set_border_width (GTK_CONTAINER (menu), 0);
- gtk_menu_item_set_submenu (GTK_MENU_ITEM (parent), menu);
- g_signal_connect (menu, "show", G_CALLBACK (nmwa_dropdown_menu_show_cb), applet);
-
- return menu;
-}
-
-
-/*
- * nmwa_context_menu_update
- *
- */
-static void nmwa_context_menu_update (NMWirelessApplet *applet)
-{
- GtkWidget *image;
-
- g_return_if_fail (applet != NULL);
- g_return_if_fail (applet->stop_wireless_item != NULL);
-
- g_mutex_lock (applet->data_mutex);
-
- gtk_widget_destroy (applet->stop_wireless_item);
-
- if (applet->wireless_enabled)
- {
- applet->stop_wireless_item = gtk_image_menu_item_new_with_mnemonic (_("_Stop All Wireless Devices"));
- image = gtk_image_new_from_stock (GTK_STOCK_STOP, GTK_ICON_SIZE_MENU);
- }
- else
- {
- applet->stop_wireless_item = gtk_image_menu_item_new_with_mnemonic (_("_Start All Wireless Devices"));
- image = gtk_image_new_from_stock (GTK_STOCK_MEDIA_PLAY, GTK_ICON_SIZE_MENU);
- }
- g_signal_connect (G_OBJECT (applet->stop_wireless_item), "activate", G_CALLBACK (nmwa_set_wireless_enabled_cb), applet);
- gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (applet->stop_wireless_item), image);
- gtk_menu_shell_insert (GTK_MENU_SHELL (applet->context_menu), applet->stop_wireless_item, 1);
- gtk_widget_show_all (applet->stop_wireless_item);
-
- g_mutex_unlock (applet->data_mutex);
-}
-
-
-/*
- * nmwa_context_menu_create
- *
- * Generate the contextual popup menu.
- *
- */
-static GtkWidget *nmwa_context_menu_create (NMWirelessApplet *applet)
-{
- GtkWidget *menu;
- GtkWidget *menu_item;
- GtkWidget *image;
- GtkWidget *scanning_subitem;
-
- g_return_val_if_fail (applet != NULL, NULL);
-
- menu = gtk_menu_new ();
-
- /* Construct the wireless scanning submenu */
- applet->scan_method = nmwa_gconf_get_wireless_scan_method (applet);
- applet->scanning_item = gtk_menu_item_new_with_mnemonic (_("_Wireless Network Discovery"));
- applet->scanning_menu = gtk_menu_new ();
-
- scanning_subitem = GTK_WIDGET (gtk_check_menu_item_new_with_label (_("Always Search")));
- gtk_check_menu_item_set_draw_as_radio (GTK_CHECK_MENU_ITEM (scanning_subitem), TRUE);
- g_object_set_data (G_OBJECT (scanning_subitem), "scan_method", GUINT_TO_POINTER (NM_SCAN_METHOD_ALWAYS));
- if (applet->scan_method == NM_SCAN_METHOD_ALWAYS)
- gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (scanning_subitem), TRUE);
- g_signal_connect (G_OBJECT (scanning_subitem), "activate", G_CALLBACK (nmwa_menu_scanning_item_activate), applet);
- gtk_menu_shell_append (GTK_MENU_SHELL (applet->scanning_menu), GTK_WIDGET (scanning_subitem));
-
- scanning_subitem = GTK_WIDGET (gtk_check_menu_item_new_with_label (_("Search Only When Disconnected")));
- gtk_check_menu_item_set_draw_as_radio (GTK_CHECK_MENU_ITEM (scanning_subitem), TRUE);
- g_object_set_data (G_OBJECT (scanning_subitem), "scan_method", GINT_TO_POINTER (NM_SCAN_METHOD_WHEN_UNASSOCIATED));
- if (applet->scan_method == NM_SCAN_METHOD_WHEN_UNASSOCIATED)
- gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (scanning_subitem), TRUE);
- g_signal_connect (G_OBJECT (scanning_subitem), "activate", G_CALLBACK (nmwa_menu_scanning_item_activate), applet);
- gtk_menu_shell_append (GTK_MENU_SHELL (applet->scanning_menu), GTK_WIDGET (scanning_subitem));
-
- scanning_subitem = GTK_WIDGET (gtk_check_menu_item_new_with_label (_("Never Search")));
- gtk_check_menu_item_set_draw_as_radio (GTK_CHECK_MENU_ITEM (scanning_subitem), TRUE);
- g_object_set_data (G_OBJECT (scanning_subitem), "scan_method", GINT_TO_POINTER (NM_SCAN_METHOD_NEVER));
- if (applet->scan_method == NM_SCAN_METHOD_NEVER)
- gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (scanning_subitem), TRUE);
- g_signal_connect (G_OBJECT (scanning_subitem), "activate", G_CALLBACK (nmwa_menu_scanning_item_activate), applet);
- gtk_menu_shell_append (GTK_MENU_SHELL (applet->scanning_menu), GTK_WIDGET (scanning_subitem));
-
- gtk_menu_item_set_submenu (GTK_MENU_ITEM (applet->scanning_item), applet->scanning_menu);
- gtk_menu_shell_append (GTK_MENU_SHELL (menu), applet->scanning_item);
-
- /* Stop All Wireless Devices item */
- applet->stop_wireless_item = gtk_image_menu_item_new_with_label (_("Stop All Wireless Devices"));
- g_signal_connect (G_OBJECT (applet->stop_wireless_item), "activate", G_CALLBACK (nmwa_set_wireless_enabled_cb), applet);
- image = gtk_image_new_from_stock (GTK_STOCK_STOP, GTK_ICON_SIZE_MENU);
- gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (applet->stop_wireless_item), image);
- gtk_menu_shell_append (GTK_MENU_SHELL (menu), applet->stop_wireless_item);
-
- menu_item = gtk_image_menu_item_new_with_mnemonic (_("Connection _Information"));
- g_signal_connect (G_OBJECT (menu_item), "activate", G_CALLBACK (nmwa_show_info_cb), applet);
- image = gtk_image_new_from_stock (GTK_STOCK_INFO, GTK_ICON_SIZE_MENU);
- gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_item), image);
- gtk_menu_shell_append (GTK_MENU_SHELL (menu), menu_item);
-
- nmwa_menu_add_separator_item (menu);
-
- menu_item = gtk_image_menu_item_new_with_mnemonic (_("_Help"));
-/* g_signal_connect (G_OBJECT (menu_item), "activate", G_CALLBACK (nmwa_help_cb), applet); */
- image = gtk_image_new_from_stock (GTK_STOCK_HELP, GTK_ICON_SIZE_MENU);
- gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_item), image);
- gtk_menu_shell_append (GTK_MENU_SHELL (menu), menu_item);
- gtk_widget_set_sensitive (GTK_WIDGET (menu_item), FALSE);
-
- menu_item = gtk_image_menu_item_new_with_mnemonic (_("_About"));
- g_signal_connect (G_OBJECT (menu_item), "activate", G_CALLBACK (nmwa_about_cb), applet);
- image = gtk_image_new_from_stock (GTK_STOCK_ABOUT, GTK_ICON_SIZE_MENU);
- gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_item), image);
- gtk_menu_shell_append (GTK_MENU_SHELL (menu), menu_item);
-
- gtk_widget_show_all (menu);
-
- return menu;
-}
-
-
-/*
- * nmwa_theme_change_cb
- *
- * Destroy the popdown menu when the theme changes
- *
- */
-static void nmwa_theme_change_cb (NMWirelessApplet *applet)
-{
- g_return_if_fail (applet != NULL);
-
- if (applet->dropdown_menu)
- nmwa_dropdown_menu_clear (applet->dropdown_menu);
-
- if (applet->top_menu_item)
- {
- gtk_menu_item_remove_submenu (GTK_MENU_ITEM (applet->top_menu_item));
- applet->dropdown_menu = nmwa_dropdown_menu_create (GTK_MENU_ITEM (applet->top_menu_item), applet);
- }
-}
-
-/*
- * nmwa_toplevel_menu_button_press_cb
- *
- * Handle right-clicks for the context popup menu
- *
- */
-static gboolean nmwa_toplevel_menu_button_press_cb (GtkWidget *widget, GdkEventButton *event, gpointer user_data)
-{
- NMWirelessApplet *applet = (NMWirelessApplet *)user_data;
-
- g_return_val_if_fail (applet != NULL, FALSE);
-
- if (event->button != 1)
- g_signal_stop_emission_by_name (widget, "button_press_event");
-
- if (event->button == 3)
- {
- nmwa_context_menu_update (applet);
- gtk_menu_popup (GTK_MENU (applet->context_menu), NULL, NULL, NULL, applet, event->button, event->time);
- return (TRUE);
- }
-
- return (FALSE);
-}
-
-
-/*
- * nmwa_setup_widgets
- *
- * Intialize the applet's widgets and packing, create the initial
- * menu of networks.
- *
- */
-static void nmwa_setup_widgets (NMWirelessApplet *applet)
-{
- GtkWidget *menu_bar;
- GtkWidget *event_box;
-
- /* Event box for tooltips */
- applet->event_box = gtk_event_box_new ();
- gtk_container_set_border_width (GTK_CONTAINER (applet->event_box), 0);
-
- menu_bar = gtk_menu_bar_new ();
-
- applet->top_menu_item = gtk_menu_item_new();
- gtk_widget_set_name (applet->top_menu_item, "ToplevelMenu");
- gtk_container_set_border_width (GTK_CONTAINER (applet->top_menu_item), 0);
- g_signal_connect (applet->top_menu_item, "button_press_event", G_CALLBACK (nmwa_toplevel_menu_button_press_cb), applet);
-
- applet->dropdown_menu = nmwa_dropdown_menu_create (GTK_MENU_ITEM (applet->top_menu_item), applet);
-
- applet->pixmap = gtk_image_new ();
- applet->progress_bar = gtk_image_new ();
-
- applet->icon_box = gtk_hbox_new (FALSE, 3);
- gtk_container_set_border_width (GTK_CONTAINER (applet->icon_box), 0);
-
- /* Set up the widget structure and show the applet */
- gtk_container_add (GTK_CONTAINER (applet->icon_box), applet->progress_bar);
- gtk_container_add (GTK_CONTAINER (applet->icon_box), applet->pixmap);
- gtk_container_add (GTK_CONTAINER (applet->top_menu_item), applet->icon_box);
- gtk_menu_shell_append (GTK_MENU_SHELL (menu_bar), applet->top_menu_item);
- gtk_container_add (GTK_CONTAINER (applet->event_box), menu_bar);
- gtk_container_add (GTK_CONTAINER (applet), applet->event_box);
- gtk_widget_show_all (GTK_WIDGET (applet));
-
- applet->context_menu = nmwa_context_menu_create (applet);
- applet->encryption_size_group = gtk_size_group_new (GTK_SIZE_GROUP_HORIZONTAL);
-}
-
-
-/*
- * nmwa_gconf_get_wireless_scan_method
- *
- * Grab the wireless scan method from GConf
- *
- */
-NMWirelessScanMethod nmwa_gconf_get_wireless_scan_method (NMWirelessApplet *applet)
-{
- NMWirelessScanMethod method = NM_SCAN_METHOD_ALWAYS;
- GConfEntry * entry;
-
- g_return_val_if_fail (applet, NM_SCAN_METHOD_ALWAYS);
- g_return_val_if_fail (applet->gconf_client, NM_SCAN_METHOD_ALWAYS);
-
- if ((entry = gconf_client_get_entry (applet->gconf_client, GCONF_PATH_WIRELESS "/scan_method", NULL, TRUE, NULL)))
- {
- GConfValue * value = gconf_entry_get_value (entry);
-
- if (value && (value->type == GCONF_VALUE_INT))
- {
- NMWirelessScanMethod temp_method = gconf_value_get_int (value);
-
- if ((method == NM_SCAN_METHOD_ALWAYS) || (method == NM_SCAN_METHOD_NEVER)
- || (method == NM_SCAN_METHOD_WHEN_UNASSOCIATED))
- method = temp_method;
- }
- }
-
- return method;
-}
-
-
-/*
- * nmwa_gconf_info_notify_callback
- *
- * Callback from gconf when wireless key/values have changed.
- *
- */
-static void nmwa_gconf_info_notify_callback (GConfClient *client, guint connection_id, GConfEntry *entry, gpointer user_data)
-{
- NMWirelessApplet * applet = (NMWirelessApplet *)user_data;
- const char * key = NULL;
-
- g_return_if_fail (client != NULL);
- g_return_if_fail (entry != NULL);
- g_return_if_fail (applet != NULL);
-
- if ((key = gconf_entry_get_key (entry)))
- {
- int net_path_len = strlen (GCONF_PATH_WIRELESS_NETWORKS) + 1;
-
- if (strcmp (GCONF_PATH_WIRELESS "/scan_method", key) == 0)
- {
- GConfValue * value = gconf_entry_get_value (entry);
-
- if (value && (value->type == GCONF_VALUE_INT))
- {
- NMWirelessScanMethod method = gconf_value_get_int (value);
-
- if ((method == NM_SCAN_METHOD_ALWAYS) || (method == NM_SCAN_METHOD_NEVER)
- || (method == NM_SCAN_METHOD_WHEN_UNASSOCIATED))
- nmi_dbus_signal_update_scan_method (applet->connection);
- }
- }
- if (strncmp (GCONF_PATH_WIRELESS_NETWORKS"/", key, net_path_len) == 0)
- {
- char *network = g_strdup ((key + net_path_len));
- char *slash_pos;
- char *unescaped_network;
-
- /* If its a key under the network name, zero out the slash so we
- * are left with only the network name.
- */
- unescaped_network = gconf_unescape_key (network, strlen (network));
- if ((slash_pos = strchr (unescaped_network, '/')))
- *slash_pos = '\0';
-
- nmi_dbus_signal_update_network (applet->connection, unescaped_network, NETWORK_TYPE_ALLOWED);
- g_free (unescaped_network);
- g_free (network);
- }
- }
-}
-
-
-/*
- * nmwa_gconf_vpn_connections_notify_callback
- *
- * Callback from gconf when VPN connection values have changed.
- *
- */
-static void nmwa_gconf_vpn_connections_notify_callback (GConfClient *client, guint connection_id, GConfEntry *entry, gpointer user_data)
-{
- NMWirelessApplet * applet = (NMWirelessApplet *)user_data;
- const char * key = NULL;
-
- /*g_debug ("Entering nmwa_gconf_vpn_connections_notify_callback, key='%s'", gconf_entry_get_key (entry));*/
-
- g_return_if_fail (client != NULL);
- g_return_if_fail (entry != NULL);
- g_return_if_fail (applet != NULL);
-
- if ((key = gconf_entry_get_key (entry)))
- {
- int path_len = strlen (GCONF_PATH_VPN_CONNECTIONS) + 1;
-
- if (strncmp (GCONF_PATH_VPN_CONNECTIONS"/", key, path_len) == 0)
- {
- char *name = g_strdup ((key + path_len));
- char *slash_pos;
- char *unescaped_name;
- char *name_path;
- GConfValue *value;
-
- /* If its a key under the the VPN name, zero out the slash so we
- * are left with only the VPN name.
- */
- if ((slash_pos = strchr (name, '/')))
- *slash_pos = '\0';
- unescaped_name = gconf_unescape_key (name, strlen (name));
-
- /* Check here if the name entry is gone so we can remove the conn from the UI */
- name_path = g_strdup_printf ("%s/%s/name", GCONF_PATH_VPN_CONNECTIONS, name);
- gconf_client_clear_cache (client);
- value = gconf_client_get (client, name_path, NULL);
- if (value == NULL) {
- /*g_debug ("removing '%s' from UI", name_path);*/
- nmwa_dbus_vpn_remove_one_vpn_connection (applet, unescaped_name);
- } else {
- gconf_value_free (value);
- }
- g_free (name_path);
-
- nmi_dbus_signal_update_vpn_connection (applet->connection, unescaped_name);
-
- g_free (unescaped_name);
- g_free (name);
- }
-
- }
-}
-
-
-/*
- * nmwa_destroy
- *
- * Destroy the applet and clean up its data
- *
- */
-static void nmwa_destroy (NMWirelessApplet *applet, gpointer user_data)
-{
- if (applet->dropdown_menu)
- nmwa_dropdown_menu_clear (applet->dropdown_menu);
- if (applet->top_menu_item)
- gtk_menu_item_remove_submenu (GTK_MENU_ITEM (applet->top_menu_item));
-
- nmwa_icons_free (applet);
-
- nmi_passphrase_dialog_destroy (applet->passphrase_dialog);
-
- if (applet->redraw_timeout_id > 0)
- {
- gtk_timeout_remove (applet->redraw_timeout_id);
- applet->redraw_timeout_id = 0;
- }
-
- g_main_loop_quit (applet->thread_loop);
- g_thread_join (applet->dbus_thread);
-
- if (applet->gconf_client)
- g_object_unref (G_OBJECT (applet->gconf_client));
-
- nmwa_free_gui_data_model (applet);
- nmwa_free_dbus_data_model (applet);
-
- g_free (applet->glade_file);
-
- gconf_client_notify_remove (applet->gconf_client, applet->gconf_prefs_notify_id);
- gconf_client_notify_remove (applet->gconf_client, applet->gconf_vpn_notify_id);
- g_object_unref (G_OBJECT (applet->gconf_client));
-
- exit (EXIT_SUCCESS);
-}
-
-
-/*
- * nmwa_get_instance
- *
- * Create the initial instance of our wireless applet
- *
- */
-static GtkWidget * nmwa_get_instance (NMWirelessApplet *applet)
-{
- GError * error = NULL;
-
- gtk_widget_hide (GTK_WIDGET (applet));
-
- applet->nm_running = FALSE;
- applet->dev_pending_call_list = NULL;
- applet->dbus_device_list = NULL;
- applet->dbus_active_vpn_name = NULL;
- applet->dbus_vpn_connections = NULL;
- applet->dbus_nm_state = NM_STATE_DISCONNECTED;
- applet->vpn_pending_call_list = NULL;
- applet->gui_device_list = NULL;
- applet->gui_active_vpn = NULL;
- applet->gui_vpn_connections = NULL;
- applet->dialup_list = NULL;
- applet->gui_nm_state = NM_STATE_DISCONNECTED;
- applet->tooltips = NULL;
- applet->thread_context = NULL;
- applet->thread_loop = NULL;
- applet->thread_done = FALSE;
- applet->scanning_menu = NULL;
- applet->scanning_item = NULL;
-
- applet->glade_file = g_build_filename (GLADEDIR, "wireless-applet.glade", NULL);
- if (!applet->glade_file || !g_file_test (applet->glade_file, G_FILE_TEST_IS_REGULAR))
- {
- nmwa_schedule_warning_dialog (applet, _("The NetworkManager Applet could not find some required resources (the glade file was not found)."));
- g_free (applet->glade_file);
- applet->glade_file = NULL;
- return NULL;
- }
-
- applet->info_dialog_xml = glade_xml_new (applet->glade_file, "info_dialog", NULL);
- applet->passphrase_dialog = nmi_passphrase_dialog_init (applet);
-
- applet->gconf_client = gconf_client_get_default ();
- if (!applet->gconf_client)
- return NULL;
-
- gconf_client_add_dir (applet->gconf_client, GCONF_PATH_WIRELESS, GCONF_CLIENT_PRELOAD_NONE, NULL);
- applet->gconf_prefs_notify_id = gconf_client_notify_add (applet->gconf_client, GCONF_PATH_WIRELESS,
- nmwa_gconf_info_notify_callback, applet, NULL, NULL);
-
- gconf_client_add_dir (applet->gconf_client, GCONF_PATH_VPN_CONNECTIONS, GCONF_CLIENT_PRELOAD_NONE, NULL);
- applet->gconf_vpn_notify_id = gconf_client_notify_add (applet->gconf_client, GCONF_PATH_VPN_CONNECTIONS,
- nmwa_gconf_vpn_connections_notify_callback, applet, NULL, NULL);
-
- /* Start our dbus thread */
- if (!(applet->data_mutex = g_mutex_new ()))
- {
- g_object_unref (G_OBJECT (applet->gconf_client));
- return NULL;
- }
- if (!(applet->dbus_thread = g_thread_create (nmwa_dbus_worker, applet, TRUE, &error)))
- {
- g_mutex_free (applet->data_mutex);
- g_object_unref (G_OBJECT (applet->gconf_client));
- return NULL;
- }
-
- /* Load pixmaps and create applet widgets */
- nmwa_setup_widgets (applet);
-
- g_signal_connect (applet, "destroy", G_CALLBACK (nmwa_destroy), NULL);
- g_signal_connect (applet, "style-set", G_CALLBACK (nmwa_theme_change_cb), NULL);
-
- /* Start redraw timeout */
- nmwa_start_redraw_timeout (applet);
-
- return GTK_WIDGET (applet);
-}
-
-static void setup_stock (void)
-{
- GtkIconFactory *ifactory;
- GtkIconSet *iset;
- GtkIconSource *isource;
- static gboolean initted = FALSE;
-
- if (initted)
- return;
-
- ifactory = gtk_icon_factory_new ();
- iset = gtk_icon_set_new ();
- isource = gtk_icon_source_new ();
-
- /* we use the lockscreen icon to get a key */
- gtk_icon_source_set_icon_name (isource, "gnome-lockscreen");
- gtk_icon_set_add_source (iset, isource);
- gtk_icon_factory_add (ifactory, "gnome-lockscreen", iset);
- gtk_icon_factory_add_default (ifactory);
-
- initted = TRUE;
-}
-
-static void nmwa_icons_free (NMWirelessApplet *applet)
-{
- gint i;
-
- g_object_unref (applet->no_connection_icon);
- g_object_unref (applet->wired_icon);
- g_object_unref (applet->adhoc_icon);
- g_object_unref (applet->vpn_lock_icon);
-
- g_object_unref (applet->wireless_00_icon);
- g_object_unref (applet->wireless_25_icon);
- g_object_unref (applet->wireless_50_icon);
- g_object_unref (applet->wireless_75_icon);
- g_object_unref (applet->wireless_100_icon);
-
- for (i = 0; i < NUM_WIRED_CONNECTING_FRAMES; i++)
- g_object_unref (applet->wired_connecting_icons[i]);
-
- for (i = 0; i < NUM_WIRELESS_CONNECTING_FRAMES; i++)
- g_object_unref (applet->wireless_connecting_icons[i]);
-}
-
-#define ICON_LOAD(x, y) \
- { \
- GError *err = NULL; \
- x = gtk_icon_theme_load_icon (icon_theme, y, icon_size, 0, &err); \
- if (x == NULL) { \
- success = FALSE; \
- g_warning ("Icon %s missing: %s", y, err->message); \
- g_error_free (err); \
- goto out; \
- } \
- }
-
-static gboolean
-nmwa_icons_load_from_disk (NMWirelessApplet *applet, GtkIconTheme *icon_theme)
-{
- char * name;
- int i;
- gboolean success = FALSE;
-
- /* Assume icons are square */
- gint icon_size = 22;
-
- ICON_LOAD(applet->no_connection_icon, "nm-no-connection");
- ICON_LOAD(applet->wired_icon, "nm-device-wired");
- ICON_LOAD(applet->adhoc_icon, "nm-adhoc");
- ICON_LOAD(applet->vpn_lock_icon, "nm-vpn-lock");
-
- ICON_LOAD(applet->wireless_00_icon, "nm-signal-00");
- ICON_LOAD(applet->wireless_25_icon, "nm-signal-25");
- ICON_LOAD(applet->wireless_50_icon, "nm-signal-50");
- ICON_LOAD(applet->wireless_75_icon, "nm-signal-75");
- ICON_LOAD(applet->wireless_100_icon, "nm-signal-100");
-
- for (i = 0; i < NUM_PROGRESS_FRAMES; i++)
- {
- name = g_strdup_printf ("nm-progress%02d", i+1);
- ICON_LOAD(applet->progress_icons[i], name);
- g_free (name);
- }
-
- for (i = 0; i < NUM_WIRED_CONNECTING_FRAMES; i++)
- {
- name = g_strdup_printf ("nm-connecting%02d", i+1);
- ICON_LOAD(applet->wired_connecting_icons[i], name);
- g_free (name);
- }
-
- for (i = 0; i < NUM_WIRELESS_CONNECTING_FRAMES; i++)
- {
- name = g_strdup_printf ("nm-connecting%02d", i+1);
- ICON_LOAD(applet->wireless_connecting_icons[i], name);
- g_free (name);
- }
-
- success = TRUE;
-
-out:
- if (!success)
- {
- char *msg = g_strdup(_("The NetworkManager applet could not find some required resources. It cannot continue.\n"));
- show_warning_dialog (msg);
- }
-
- return success;
-}
-
-static void nmwa_icon_theme_changed (GtkIconTheme *icon_theme, NMWirelessApplet *applet)
-{
- nmwa_icons_free (applet);
- nmwa_icons_load_from_disk (applet, icon_theme);
- /* FIXME: force redraw */
-}
-
-static gboolean nmwa_icons_init (NMWirelessApplet *applet)
-{
- GtkIconTheme *icon_theme;
- const gchar *style = " \
- style \"MenuBar\" \
- { \
- GtkMenuBar::shadow_type = GTK_SHADOW_NONE \
- GtkMenuBar::internal-padding = 0 \
- } \
- style \"MenuItem\" \
- { \
- xthickness=0 \
- ythickness=0 \
- } \
- class \"GtkMenuBar\" style \"MenuBar\"\
- widget \"*ToplevelMenu*\" style \"MenuItem\"\
- ";
-
- /* FIXME: Do we need to worry about other screens? */
- gtk_rc_parse_string (style);
-
- icon_theme = gtk_icon_theme_get_default ();
- if (!nmwa_icons_load_from_disk (applet, icon_theme))
- return FALSE;
- g_signal_connect (icon_theme, "changed", G_CALLBACK (nmwa_icon_theme_changed), applet);
- return TRUE;
-}
-
-
-NMWirelessApplet *nmwa_new ()
-{
- return g_object_new (NM_TYPE_WIRELESS_APPLET, "title", "NetworkManager", NULL);
-}
-
diff --git a/gnome/applet/applet.h b/gnome/applet/applet.h
deleted file mode 100644
index 17d7388b7c..0000000000
--- a/gnome/applet/applet.h
+++ /dev/null
@@ -1,172 +0,0 @@
-/* NetworkManager Wireless Applet -- Display wireless access points and allow user control
- *
- * Dan Williams <dcbw@redhat.com>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- *
- * (C) Copyright 2004 Red Hat, Inc.
- */
-
-#ifndef APPLET_H
-#define APPLET_H
-#include <gtk/gtk.h>
-#include <gconf/gconf-client.h>
-#include <glade/glade.h>
-#include <dbus/dbus.h>
-#include <dbus/dbus-glib.h>
-#include "eggtrayicon.h"
-#include <net/ethernet.h>
-
-#include "nm-device.h"
-#include "wireless-network.h"
-
-
-/*
- * Preference locations
- */
-#define GCONF_PATH_WIRELESS_NETWORKS "/system/networking/wireless/networks"
-#define GCONF_PATH_WIRELESS "/system/networking/wireless"
-#define GCONF_PATH_VPN_CONNECTIONS "/system/networking/vpn_connections"
-#define GCONF_PATH_PREFS "/apps/NetworkManagerApplet"
-
-
-typedef struct VPNConnection VPNConnection;
-
-
-enum NMWAEncryptionKeyTypes
-{
- KEY_TYPE_128_BIT_PASSPHRASE = 0,
- KEY_TYPE_ASCII_KEY = 1,
- KEY_TYPE_HEX_KEY = 2
-};
-
-
-#define NM_TYPE_WIRELESS_APPLET (nmwa_get_type())
-#define NM_WIRELESS_APPLET(object) (G_TYPE_CHECK_INSTANCE_CAST((object), NM_TYPE_WIRELESS_APPLET, NMWirelessApplet))
-#define NM_WIRELESS_APPLET_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), NM_TYPE_WIRELESS_APPLET, NMWirelessAppletClass))
-#define NM_IS_WIRELESS_APPLET(object) (G_TYPE_CHECK_INSTANCE_TYPE((object), NM_TYPE_WIRELESS_APPLET))
-#define NM_IS_WIRELESS_APPLET_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), NM_TYPE_WIRELESS_APPLET))
-#define NM_WIRELESS_APPLET_GET_CLASS(object) (G_TYPE_INSTANCE_GET_CLASS((object), NM_TYPE_WIRELESS_APPLET, NMWirelessAppletClass))
-
-typedef struct
-{
- EggTrayIconClass parent_class;
-} NMWirelessAppletClass;
-
-/*
- * Applet instance data
- *
- */
-typedef struct
-{
- EggTrayIcon parent;
-
- DBusConnection * connection;
- GConfClient * gconf_client;
- guint gconf_prefs_notify_id;
- guint gconf_vpn_notify_id;
- char * glade_file;
- guint redraw_timeout_id;
-
- /* dbus thread stuff */
- GThread * dbus_thread;
- GMainContext * thread_context;
- GMainLoop * thread_loop;
- gboolean thread_done;
-
- /* Data model elements */
- GMutex * data_mutex;
- gboolean is_adhoc;
- NMWirelessScanMethod scan_method;
- gboolean wireless_enabled;
- gboolean nm_running;
-
- GSList * gui_device_list;
- NMState gui_nm_state;
-
- GSList * dev_pending_call_list;
- GSList * dbus_device_list;
- NMState dbus_nm_state;
-
- GSList * dialup_list;
-
- GSList * gui_vpn_connections;
- VPNConnection * gui_active_vpn;
-
- GSList * vpn_pending_call_list;
- char * dbus_active_vpn_name;
- GSList * dbus_vpn_connections;
-
- GdkPixbuf * no_connection_icon;
- GdkPixbuf * wired_icon;
- GdkPixbuf * adhoc_icon;
-#define NUM_PROGRESS_FRAMES 11
- GdkPixbuf * progress_icons[NUM_PROGRESS_FRAMES];
-#define NUM_WIRED_CONNECTING_FRAMES 11
- GdkPixbuf * wired_connecting_icons[NUM_WIRED_CONNECTING_FRAMES];
- GdkPixbuf * wireless_00_icon;
- GdkPixbuf * wireless_25_icon;
- GdkPixbuf * wireless_50_icon;
- GdkPixbuf * wireless_75_icon;
- GdkPixbuf * wireless_100_icon;
-#define NUM_WIRELESS_CONNECTING_FRAMES 11
- GdkPixbuf * wireless_connecting_icons[NUM_WIRELESS_CONNECTING_FRAMES];
- GdkPixbuf * vpn_lock_icon;
-
- /* Animation stuff */
- int animation_step;
- guint animation_id;
-
- /* Direct UI elements */
- GtkWidget * icon_box;
- GtkWidget * pixmap;
- GtkWidget * progress_bar;
- GtkWidget * top_menu_item;
- GtkWidget * dropdown_menu;
- GtkWidget * vpn_menu;
- GtkWidget * event_box;
- GtkSizeGroup * encryption_size_group;
- GtkTooltips * tooltips;
-
- GtkWidget * context_menu;
- GtkWidget * scanning_item;
- GtkWidget * scanning_menu;
- GtkWidget * stop_wireless_item;
-
- GtkWidget * passphrase_dialog;
- GladeXML * info_dialog_xml;
-} NMWirelessApplet;
-
-typedef struct
-{
- NMWirelessApplet * applet;
- NetworkDevice * dev;
- GladeXML * xml;
-} DriverNotifyCBData;
-
-NetworkDevice * nmwa_get_device_for_nm_path (GSList *dev_list, const char *nm_dev);
-NMWirelessApplet * nmwa_new (void);
-void nmwa_schedule_warning_dialog (NMWirelessApplet *applet, const char *msg);
-gboolean nmwa_driver_notify (gpointer user_data);
-void nmwa_schedule_vpn_failure_dialog (NMWirelessApplet *applet, const char *member, const char *vpn_name, const char *error_msg);
-void nmwa_schedule_vpn_login_banner_dialog (NMWirelessApplet *applet, const char *vpn_name, const char *banner);
-
-NetworkDevice * nmwa_get_first_active_device (GSList *dev_list);
-
-NMWirelessScanMethod nmwa_gconf_get_wireless_scan_method (NMWirelessApplet *applet);
-
-int nm_null_safe_strcmp (const char *s1, const char *s2);
-
-#endif
diff --git a/gnome/applet/eggtrayicon.c b/gnome/applet/eggtrayicon.c
deleted file mode 100644
index c4aa3e6eaf..0000000000
--- a/gnome/applet/eggtrayicon.c
+++ /dev/null
@@ -1,468 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* eggtrayicon.c
- * Copyright (C) 2002 Anders Carlsson <andersca@gnu.org>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-#include <config.h>
-#include <string.h>
-#include <libintl.h>
-
-#include "eggtrayicon.h"
-
-#include <gdk/gdkx.h>
-#include <X11/Xatom.h>
-
-#ifndef EGG_COMPILATION
-#ifndef _
-#define _(x) dgettext (GETTEXT_PACKAGE, x)
-#define N_(x) x
-#endif
-#else
-#define _(x) x
-#define N_(x) x
-#endif
-
-#define SYSTEM_TRAY_REQUEST_DOCK 0
-#define SYSTEM_TRAY_BEGIN_MESSAGE 1
-#define SYSTEM_TRAY_CANCEL_MESSAGE 2
-
-#define SYSTEM_TRAY_ORIENTATION_HORZ 0
-#define SYSTEM_TRAY_ORIENTATION_VERT 1
-
-enum {
- PROP_0,
- PROP_ORIENTATION
-};
-
-static GtkPlugClass *parent_class = NULL;
-
-static void egg_tray_icon_init (EggTrayIcon *icon);
-static void egg_tray_icon_class_init (EggTrayIconClass *klass);
-
-static void egg_tray_icon_get_property (GObject *object,
- guint prop_id,
- GValue *value,
- GParamSpec *pspec);
-
-static void egg_tray_icon_realize (GtkWidget *widget);
-static void egg_tray_icon_unrealize (GtkWidget *widget);
-
-static void egg_tray_icon_update_manager_window (EggTrayIcon *icon);
-
-GType
-egg_tray_icon_get_type (void)
-{
- static GType our_type = 0;
-
- if (our_type == 0)
- {
- static const GTypeInfo our_info =
- {
- sizeof (EggTrayIconClass),
- (GBaseInitFunc) NULL,
- (GBaseFinalizeFunc) NULL,
- (GClassInitFunc) egg_tray_icon_class_init,
- NULL, /* class_finalize */
- NULL, /* class_data */
- sizeof (EggTrayIcon),
- 0, /* n_preallocs */
- (GInstanceInitFunc) egg_tray_icon_init
- };
-
- our_type = g_type_register_static (GTK_TYPE_PLUG, "EggTrayIcon", &our_info, 0);
- }
-
- return our_type;
-}
-
-static void
-egg_tray_icon_init (EggTrayIcon *icon)
-{
- icon->stamp = 1;
- icon->orientation = GTK_ORIENTATION_HORIZONTAL;
-
- gtk_widget_add_events (GTK_WIDGET (icon), GDK_PROPERTY_CHANGE_MASK);
-}
-
-static void
-egg_tray_icon_class_init (EggTrayIconClass *klass)
-{
- GObjectClass *gobject_class = (GObjectClass *)klass;
- GtkWidgetClass *widget_class = (GtkWidgetClass *)klass;
-
- parent_class = g_type_class_peek_parent (klass);
-
- gobject_class->get_property = egg_tray_icon_get_property;
-
- widget_class->realize = egg_tray_icon_realize;
- widget_class->unrealize = egg_tray_icon_unrealize;
-
- g_object_class_install_property (gobject_class,
- PROP_ORIENTATION,
- g_param_spec_enum ("orientation",
- _("Orientation"),
- _("The orientation of the tray."),
- GTK_TYPE_ORIENTATION,
- GTK_ORIENTATION_HORIZONTAL,
- G_PARAM_READABLE));
-}
-
-static void
-egg_tray_icon_get_property (GObject *object,
- guint prop_id,
- GValue *value,
- GParamSpec *pspec)
-{
- EggTrayIcon *icon = EGG_TRAY_ICON (object);
-
- switch (prop_id)
- {
- case PROP_ORIENTATION:
- g_value_set_enum (value, icon->orientation);
- break;
- default:
- G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
- break;
- }
-}
-
-static void
-egg_tray_icon_get_orientation_property (EggTrayIcon *icon)
-{
- Display *xdisplay;
- Atom type;
- int format;
- union {
- gulong *prop;
- guchar *prop_ch;
- } prop = { NULL };
- gulong nitems;
- gulong bytes_after;
- int error, result;
-
- g_assert (icon->manager_window != None);
-
- xdisplay = GDK_DISPLAY_XDISPLAY (gtk_widget_get_display (GTK_WIDGET (icon)));
-
- gdk_error_trap_push ();
- type = None;
- result = XGetWindowProperty (xdisplay,
- icon->manager_window,
- icon->orientation_atom,
- 0, G_MAXLONG, FALSE,
- XA_CARDINAL,
- &type, &format, &nitems,
- &bytes_after, &(prop.prop_ch));
- error = gdk_error_trap_pop ();
-
- if (error || result != Success)
- return;
-
- if (type == XA_CARDINAL)
- {
- GtkOrientation orientation;
-
- orientation = (prop.prop [0] == SYSTEM_TRAY_ORIENTATION_HORZ) ?
- GTK_ORIENTATION_HORIZONTAL :
- GTK_ORIENTATION_VERTICAL;
-
- if (icon->orientation != orientation)
- {
- icon->orientation = orientation;
-
- g_object_notify (G_OBJECT (icon), "orientation");
- }
- }
-
- if (prop.prop)
- XFree (prop.prop);
-}
-
-static GdkFilterReturn
-egg_tray_icon_manager_filter (GdkXEvent *xevent, GdkEvent *event, gpointer user_data)
-{
- EggTrayIcon *icon = user_data;
- XEvent *xev = (XEvent *)xevent;
-
- if (xev->xany.type == ClientMessage &&
- xev->xclient.message_type == icon->manager_atom &&
- xev->xclient.data.l[1] == icon->selection_atom)
- {
- egg_tray_icon_update_manager_window (icon);
- }
- else if (xev->xany.window == icon->manager_window)
- {
- if (xev->xany.type == PropertyNotify &&
- xev->xproperty.atom == icon->orientation_atom)
- {
- egg_tray_icon_get_orientation_property (icon);
- }
- if (xev->xany.type == DestroyNotify)
- {
- egg_tray_icon_update_manager_window (icon);
- }
- }
-
- return GDK_FILTER_CONTINUE;
-}
-
-static void
-egg_tray_icon_unrealize (GtkWidget *widget)
-{
- EggTrayIcon *icon = EGG_TRAY_ICON (widget);
- GdkWindow *root_window;
-
- if (icon->manager_window != None)
- {
- GdkWindow *gdkwin;
-
- gdkwin = gdk_window_lookup_for_display (gtk_widget_get_display (widget),
- icon->manager_window);
-
- gdk_window_remove_filter (gdkwin, egg_tray_icon_manager_filter, icon);
- }
-
- root_window = gdk_screen_get_root_window (gtk_widget_get_screen (widget));
-
- gdk_window_remove_filter (root_window, egg_tray_icon_manager_filter, icon);
-
- if (GTK_WIDGET_CLASS (parent_class)->unrealize)
- (* GTK_WIDGET_CLASS (parent_class)->unrealize) (widget);
-}
-
-static void
-egg_tray_icon_send_manager_message (EggTrayIcon *icon,
- long message,
- Window window,
- long data1,
- long data2,
- long data3)
-{
- XClientMessageEvent ev;
- Display *display;
-
- ev.type = ClientMessage;
- ev.window = window;
- ev.message_type = icon->system_tray_opcode_atom;
- ev.format = 32;
- ev.data.l[0] = gdk_x11_get_server_time (GTK_WIDGET (icon)->window);
- ev.data.l[1] = message;
- ev.data.l[2] = data1;
- ev.data.l[3] = data2;
- ev.data.l[4] = data3;
-
- display = GDK_DISPLAY_XDISPLAY (gtk_widget_get_display (GTK_WIDGET (icon)));
-
- gdk_error_trap_push ();
- XSendEvent (display,
- icon->manager_window, False, NoEventMask, (XEvent *)&ev);
- XSync (display, False);
- gdk_error_trap_pop ();
-}
-
-static void
-egg_tray_icon_send_dock_request (EggTrayIcon *icon)
-{
- egg_tray_icon_send_manager_message (icon,
- SYSTEM_TRAY_REQUEST_DOCK,
- icon->manager_window,
- gtk_plug_get_id (GTK_PLUG (icon)),
- 0, 0);
-}
-
-static void
-egg_tray_icon_update_manager_window (EggTrayIcon *icon)
-{
- Display *xdisplay;
-
- xdisplay = GDK_DISPLAY_XDISPLAY (gtk_widget_get_display (GTK_WIDGET (icon)));
-
- if (icon->manager_window != None)
- {
- GdkWindow *gdkwin;
-
- gdkwin = gdk_window_lookup_for_display (gtk_widget_get_display (GTK_WIDGET (icon)),
- icon->manager_window);
-
- gdk_window_remove_filter (gdkwin, egg_tray_icon_manager_filter, icon);
- }
-
- XGrabServer (xdisplay);
-
- icon->manager_window = XGetSelectionOwner (xdisplay,
- icon->selection_atom);
-
- if (icon->manager_window != None)
- XSelectInput (xdisplay,
- icon->manager_window, StructureNotifyMask|PropertyChangeMask);
-
- XUngrabServer (xdisplay);
- XFlush (xdisplay);
-
- if (icon->manager_window != None)
- {
- GdkWindow *gdkwin;
-
- gdkwin = gdk_window_lookup_for_display (gtk_widget_get_display (GTK_WIDGET (icon)),
- icon->manager_window);
-
- gdk_window_add_filter (gdkwin, egg_tray_icon_manager_filter, icon);
-
- /* Send a request that we'd like to dock */
- egg_tray_icon_send_dock_request (icon);
-
- egg_tray_icon_get_orientation_property (icon);
- }
-}
-
-static void
-egg_tray_icon_realize (GtkWidget *widget)
-{
- EggTrayIcon *icon = EGG_TRAY_ICON (widget);
- GdkScreen *screen;
- GdkDisplay *display;
- Display *xdisplay;
- char buffer[256];
- GdkWindow *root_window;
-
- if (GTK_WIDGET_CLASS (parent_class)->realize)
- GTK_WIDGET_CLASS (parent_class)->realize (widget);
-
- screen = gtk_widget_get_screen (widget);
- display = gdk_screen_get_display (screen);
- xdisplay = gdk_x11_display_get_xdisplay (display);
-
- /* Now see if there's a manager window around */
- g_snprintf (buffer, sizeof (buffer),
- "_NET_SYSTEM_TRAY_S%d",
- gdk_screen_get_number (screen));
-
- icon->selection_atom = XInternAtom (xdisplay, buffer, False);
-
- icon->manager_atom = XInternAtom (xdisplay, "MANAGER", False);
-
- icon->system_tray_opcode_atom = XInternAtom (xdisplay,
- "_NET_SYSTEM_TRAY_OPCODE",
- False);
-
- icon->orientation_atom = XInternAtom (xdisplay,
- "_NET_SYSTEM_TRAY_ORIENTATION",
- False);
-
- egg_tray_icon_update_manager_window (icon);
-
- root_window = gdk_screen_get_root_window (screen);
-
- /* Add a root window filter so that we get changes on MANAGER */
- gdk_window_add_filter (root_window,
- egg_tray_icon_manager_filter, icon);
-}
-
-EggTrayIcon *
-egg_tray_icon_new_for_screen (GdkScreen *screen, const char *name)
-{
- g_return_val_if_fail (GDK_IS_SCREEN (screen), NULL);
-
- return g_object_new (EGG_TYPE_TRAY_ICON, "screen", screen, "title", name, NULL);
-}
-
-EggTrayIcon*
-egg_tray_icon_new (const gchar *name)
-{
- return g_object_new (EGG_TYPE_TRAY_ICON, "title", name, NULL);
-}
-
-guint
-egg_tray_icon_send_message (EggTrayIcon *icon,
- gint timeout,
- const gchar *message,
- gint len)
-{
- guint stamp;
-
- g_return_val_if_fail (EGG_IS_TRAY_ICON (icon), 0);
- g_return_val_if_fail (timeout >= 0, 0);
- g_return_val_if_fail (message != NULL, 0);
-
- if (icon->manager_window == None)
- return 0;
-
- if (len < 0)
- len = strlen (message);
-
- stamp = icon->stamp++;
-
- /* Get ready to send the message */
- egg_tray_icon_send_manager_message (icon, SYSTEM_TRAY_BEGIN_MESSAGE,
- (Window)gtk_plug_get_id (GTK_PLUG (icon)),
- timeout, len, stamp);
-
- /* Now to send the actual message */
- gdk_error_trap_push ();
- while (len > 0)
- {
- XClientMessageEvent ev;
- Display *xdisplay;
-
- xdisplay = GDK_DISPLAY_XDISPLAY (gtk_widget_get_display (GTK_WIDGET (icon)));
-
- ev.type = ClientMessage;
- ev.window = (Window)gtk_plug_get_id (GTK_PLUG (icon));
- ev.format = 8;
- ev.message_type = XInternAtom (xdisplay,
- "_NET_SYSTEM_TRAY_MESSAGE_DATA", False);
- if (len > 20)
- {
- memcpy (&ev.data, message, 20);
- len -= 20;
- message += 20;
- }
- else
- {
- memcpy (&ev.data, message, len);
- len = 0;
- }
-
- XSendEvent (xdisplay,
- icon->manager_window, False, StructureNotifyMask, (XEvent *)&ev);
- XSync (xdisplay, False);
- }
- gdk_error_trap_pop ();
-
- return stamp;
-}
-
-void
-egg_tray_icon_cancel_message (EggTrayIcon *icon,
- guint id)
-{
- g_return_if_fail (EGG_IS_TRAY_ICON (icon));
- g_return_if_fail (id > 0);
-
- egg_tray_icon_send_manager_message (icon, SYSTEM_TRAY_CANCEL_MESSAGE,
- (Window)gtk_plug_get_id (GTK_PLUG (icon)),
- id, 0, 0);
-}
-
-GtkOrientation
-egg_tray_icon_get_orientation (EggTrayIcon *icon)
-{
- g_return_val_if_fail (EGG_IS_TRAY_ICON (icon), GTK_ORIENTATION_HORIZONTAL);
-
- return icon->orientation;
-}
diff --git a/gnome/applet/eggtrayicon.h b/gnome/applet/eggtrayicon.h
deleted file mode 100644
index 007f4c18e9..0000000000
--- a/gnome/applet/eggtrayicon.h
+++ /dev/null
@@ -1,77 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* eggtrayicon.h
- * Copyright (C) 2002 Anders Carlsson <andersca@gnu.org>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-#ifndef __EGG_TRAY_ICON_H__
-#define __EGG_TRAY_ICON_H__
-
-#include <gtk/gtkplug.h>
-#include <gdk/gdkx.h>
-
-G_BEGIN_DECLS
-
-#define EGG_TYPE_TRAY_ICON (egg_tray_icon_get_type ())
-#define EGG_TRAY_ICON(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), EGG_TYPE_TRAY_ICON, EggTrayIcon))
-#define EGG_TRAY_ICON_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), EGG_TYPE_TRAY_ICON, EggTrayIconClass))
-#define EGG_IS_TRAY_ICON(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), EGG_TYPE_TRAY_ICON))
-#define EGG_IS_TRAY_ICON_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), EGG_TYPE_TRAY_ICON))
-#define EGG_TRAY_ICON_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), EGG_TYPE_TRAY_ICON, EggTrayIconClass))
-
-typedef struct _EggTrayIcon EggTrayIcon;
-typedef struct _EggTrayIconClass EggTrayIconClass;
-
-struct _EggTrayIcon
-{
- GtkPlug parent_instance;
-
- guint stamp;
-
- Atom selection_atom;
- Atom manager_atom;
- Atom system_tray_opcode_atom;
- Atom orientation_atom;
- Window manager_window;
-
- GtkOrientation orientation;
-};
-
-struct _EggTrayIconClass
-{
- GtkPlugClass parent_class;
-};
-
-GType egg_tray_icon_get_type (void);
-
-EggTrayIcon *egg_tray_icon_new_for_screen (GdkScreen *screen,
- const gchar *name);
-
-EggTrayIcon *egg_tray_icon_new (const gchar *name);
-
-guint egg_tray_icon_send_message (EggTrayIcon *icon,
- gint timeout,
- const char *message,
- gint len);
-void egg_tray_icon_cancel_message (EggTrayIcon *icon,
- guint id);
-
-GtkOrientation egg_tray_icon_get_orientation (EggTrayIcon *icon);
-
-G_END_DECLS
-
-#endif /* __EGG_TRAY_ICON_H__ */
diff --git a/gnome/applet/icons/.cvsignore b/gnome/applet/icons/.cvsignore
deleted file mode 100644
index 282522db03..0000000000
--- a/gnome/applet/icons/.cvsignore
+++ /dev/null
@@ -1,2 +0,0 @@
-Makefile
-Makefile.in
diff --git a/gnome/applet/icons/Makefile.am b/gnome/applet/icons/Makefile.am
deleted file mode 100644
index 8303465d31..0000000000
--- a/gnome/applet/icons/Makefile.am
+++ /dev/null
@@ -1,46 +0,0 @@
-NULL =
-
-largeicondir=${datadir}/icons/hicolor/48x48/apps
-largeicon_DATA=\
- nm-device-wireless.png
-
-
-smallicondir=${datadir}/icons/hicolor/22x22/apps
-smallicon_DATA= \
- nm-no-connection.png\
- nm-device-wired.png \
- nm-adhoc.png \
- nm-connecting01.png \
- nm-connecting02.png \
- nm-connecting03.png \
- nm-connecting04.png \
- nm-connecting05.png \
- nm-connecting06.png \
- nm-connecting07.png \
- nm-connecting08.png \
- nm-connecting09.png \
- nm-connecting10.png \
- nm-connecting11.png \
- nm-progress11.png \
- nm-progress01.png \
- nm-progress02.png \
- nm-progress03.png \
- nm-progress04.png \
- nm-progress05.png \
- nm-progress06.png \
- nm-progress07.png \
- nm-progress08.png \
- nm-progress09.png \
- nm-progress10.png \
- nm-progress11.png \
- nm-signal-00.png \
- nm-signal-25.png \
- nm-signal-50.png \
- nm-signal-75.png \
- nm-signal-100.png \
- nm-vpn-lock.png \
- $(NULL)
-
-EXTRA_DIST=\
- $(largeicon_DATA) \
- $(smallicon_DATA)
diff --git a/gnome/applet/icons/nm-adhoc.png b/gnome/applet/icons/nm-adhoc.png
deleted file mode 100644
index a1000ed34d..0000000000
--- a/gnome/applet/icons/nm-adhoc.png
+++ /dev/null
Binary files differ
diff --git a/gnome/applet/icons/nm-connecting01.png b/gnome/applet/icons/nm-connecting01.png
deleted file mode 100644
index f82235fd09..0000000000
--- a/gnome/applet/icons/nm-connecting01.png
+++ /dev/null
Binary files differ
diff --git a/gnome/applet/icons/nm-connecting02.png b/gnome/applet/icons/nm-connecting02.png
deleted file mode 100644
index ab26599da2..0000000000
--- a/gnome/applet/icons/nm-connecting02.png
+++ /dev/null
Binary files differ
diff --git a/gnome/applet/icons/nm-connecting03.png b/gnome/applet/icons/nm-connecting03.png
deleted file mode 100644
index e1de068e87..0000000000
--- a/gnome/applet/icons/nm-connecting03.png
+++ /dev/null
Binary files differ
diff --git a/gnome/applet/icons/nm-connecting04.png b/gnome/applet/icons/nm-connecting04.png
deleted file mode 100644
index 35218dbde7..0000000000
--- a/gnome/applet/icons/nm-connecting04.png
+++ /dev/null
Binary files differ
diff --git a/gnome/applet/icons/nm-connecting05.png b/gnome/applet/icons/nm-connecting05.png
deleted file mode 100644
index 1b172a4c2b..0000000000
--- a/gnome/applet/icons/nm-connecting05.png
+++ /dev/null
Binary files differ
diff --git a/gnome/applet/icons/nm-connecting06.png b/gnome/applet/icons/nm-connecting06.png
deleted file mode 100644
index 9296eade77..0000000000
--- a/gnome/applet/icons/nm-connecting06.png
+++ /dev/null
Binary files differ
diff --git a/gnome/applet/icons/nm-connecting07.png b/gnome/applet/icons/nm-connecting07.png
deleted file mode 100644
index 869a188c46..0000000000
--- a/gnome/applet/icons/nm-connecting07.png
+++ /dev/null
Binary files differ
diff --git a/gnome/applet/icons/nm-connecting08.png b/gnome/applet/icons/nm-connecting08.png
deleted file mode 100644
index 01e2929b55..0000000000
--- a/gnome/applet/icons/nm-connecting08.png
+++ /dev/null
Binary files differ
diff --git a/gnome/applet/icons/nm-connecting09.png b/gnome/applet/icons/nm-connecting09.png
deleted file mode 100644
index dfb44fbcc6..0000000000
--- a/gnome/applet/icons/nm-connecting09.png
+++ /dev/null
Binary files differ
diff --git a/gnome/applet/icons/nm-connecting10.png b/gnome/applet/icons/nm-connecting10.png
deleted file mode 100644
index 5c47f89fa0..0000000000
--- a/gnome/applet/icons/nm-connecting10.png
+++ /dev/null
Binary files differ
diff --git a/gnome/applet/icons/nm-connecting11.png b/gnome/applet/icons/nm-connecting11.png
deleted file mode 100644
index 6669b5b17b..0000000000
--- a/gnome/applet/icons/nm-connecting11.png
+++ /dev/null
Binary files differ
diff --git a/gnome/applet/icons/nm-detect01.png b/gnome/applet/icons/nm-detect01.png
deleted file mode 100644
index 7550204ca3..0000000000
--- a/gnome/applet/icons/nm-detect01.png
+++ /dev/null
Binary files differ
diff --git a/gnome/applet/icons/nm-detect02.png b/gnome/applet/icons/nm-detect02.png
deleted file mode 100644
index 4c4746c102..0000000000
--- a/gnome/applet/icons/nm-detect02.png
+++ /dev/null
Binary files differ
diff --git a/gnome/applet/icons/nm-detect03.png b/gnome/applet/icons/nm-detect03.png
deleted file mode 100644
index 805b26a664..0000000000
--- a/gnome/applet/icons/nm-detect03.png
+++ /dev/null
Binary files differ
diff --git a/gnome/applet/icons/nm-detect04.png b/gnome/applet/icons/nm-detect04.png
deleted file mode 100644
index 703c6bf7b1..0000000000
--- a/gnome/applet/icons/nm-detect04.png
+++ /dev/null
Binary files differ
diff --git a/gnome/applet/icons/nm-detect05.png b/gnome/applet/icons/nm-detect05.png
deleted file mode 100644
index c75a2185e8..0000000000
--- a/gnome/applet/icons/nm-detect05.png
+++ /dev/null
Binary files differ
diff --git a/gnome/applet/icons/nm-detect06.png b/gnome/applet/icons/nm-detect06.png
deleted file mode 100644
index 85398d7490..0000000000
--- a/gnome/applet/icons/nm-detect06.png
+++ /dev/null
Binary files differ
diff --git a/gnome/applet/icons/nm-detect07.png b/gnome/applet/icons/nm-detect07.png
deleted file mode 100644
index 4a29eb0fb7..0000000000
--- a/gnome/applet/icons/nm-detect07.png
+++ /dev/null
Binary files differ
diff --git a/gnome/applet/icons/nm-detect08.png b/gnome/applet/icons/nm-detect08.png
deleted file mode 100644
index 0c5addd7ee..0000000000
--- a/gnome/applet/icons/nm-detect08.png
+++ /dev/null
Binary files differ
diff --git a/gnome/applet/icons/nm-detect09.png b/gnome/applet/icons/nm-detect09.png
deleted file mode 100644
index 56e07f4901..0000000000
--- a/gnome/applet/icons/nm-detect09.png
+++ /dev/null
Binary files differ
diff --git a/gnome/applet/icons/nm-detect10.png b/gnome/applet/icons/nm-detect10.png
deleted file mode 100644
index fefe28232a..0000000000
--- a/gnome/applet/icons/nm-detect10.png
+++ /dev/null
Binary files differ
diff --git a/gnome/applet/icons/nm-detect11.png b/gnome/applet/icons/nm-detect11.png
deleted file mode 100644
index 29dcfd259c..0000000000
--- a/gnome/applet/icons/nm-detect11.png
+++ /dev/null
Binary files differ
diff --git a/gnome/applet/icons/nm-detect12.png b/gnome/applet/icons/nm-detect12.png
deleted file mode 100644
index 2832f37e58..0000000000
--- a/gnome/applet/icons/nm-detect12.png
+++ /dev/null
Binary files differ
diff --git a/gnome/applet/icons/nm-detect13.png b/gnome/applet/icons/nm-detect13.png
deleted file mode 100644
index e622facdf8..0000000000
--- a/gnome/applet/icons/nm-detect13.png
+++ /dev/null
Binary files differ
diff --git a/gnome/applet/icons/nm-detect14.png b/gnome/applet/icons/nm-detect14.png
deleted file mode 100644
index ec7c3c7ccb..0000000000
--- a/gnome/applet/icons/nm-detect14.png
+++ /dev/null
Binary files differ
diff --git a/gnome/applet/icons/nm-detect15.png b/gnome/applet/icons/nm-detect15.png
deleted file mode 100644
index 911fcc2cdf..0000000000
--- a/gnome/applet/icons/nm-detect15.png
+++ /dev/null
Binary files differ
diff --git a/gnome/applet/icons/nm-detect16.png b/gnome/applet/icons/nm-detect16.png
deleted file mode 100644
index 6d7310dce9..0000000000
--- a/gnome/applet/icons/nm-detect16.png
+++ /dev/null
Binary files differ
diff --git a/gnome/applet/icons/nm-device-wired.png b/gnome/applet/icons/nm-device-wired.png
deleted file mode 100644
index 4fdfa13f6b..0000000000
--- a/gnome/applet/icons/nm-device-wired.png
+++ /dev/null
Binary files differ
diff --git a/gnome/applet/icons/nm-device-wireless.png b/gnome/applet/icons/nm-device-wireless.png
deleted file mode 100644
index a3e9e26f6a..0000000000
--- a/gnome/applet/icons/nm-device-wireless.png
+++ /dev/null
Binary files differ
diff --git a/gnome/applet/icons/nm-no-connection.png b/gnome/applet/icons/nm-no-connection.png
deleted file mode 100644
index c72497a3d5..0000000000
--- a/gnome/applet/icons/nm-no-connection.png
+++ /dev/null
Binary files differ
diff --git a/gnome/applet/icons/nm-progress01.png b/gnome/applet/icons/nm-progress01.png
deleted file mode 100644
index 133efedfd4..0000000000
--- a/gnome/applet/icons/nm-progress01.png
+++ /dev/null
Binary files differ
diff --git a/gnome/applet/icons/nm-progress02.png b/gnome/applet/icons/nm-progress02.png
deleted file mode 100644
index bc4fb34898..0000000000
--- a/gnome/applet/icons/nm-progress02.png
+++ /dev/null
Binary files differ
diff --git a/gnome/applet/icons/nm-progress03.png b/gnome/applet/icons/nm-progress03.png
deleted file mode 100644
index 1402468c2b..0000000000
--- a/gnome/applet/icons/nm-progress03.png
+++ /dev/null
Binary files differ
diff --git a/gnome/applet/icons/nm-progress04.png b/gnome/applet/icons/nm-progress04.png
deleted file mode 100644
index 5f1b0e512d..0000000000
--- a/gnome/applet/icons/nm-progress04.png
+++ /dev/null
Binary files differ
diff --git a/gnome/applet/icons/nm-progress05.png b/gnome/applet/icons/nm-progress05.png
deleted file mode 100644
index ba8a1c61fb..0000000000
--- a/gnome/applet/icons/nm-progress05.png
+++ /dev/null
Binary files differ
diff --git a/gnome/applet/icons/nm-progress06.png b/gnome/applet/icons/nm-progress06.png
deleted file mode 100644
index 4cffe577de..0000000000
--- a/gnome/applet/icons/nm-progress06.png
+++ /dev/null
Binary files differ
diff --git a/gnome/applet/icons/nm-progress07.png b/gnome/applet/icons/nm-progress07.png
deleted file mode 100644
index 6047e8fd6e..0000000000
--- a/gnome/applet/icons/nm-progress07.png
+++ /dev/null
Binary files differ
diff --git a/gnome/applet/icons/nm-progress08.png b/gnome/applet/icons/nm-progress08.png
deleted file mode 100644
index b1fb49081d..0000000000
--- a/gnome/applet/icons/nm-progress08.png
+++ /dev/null
Binary files differ
diff --git a/gnome/applet/icons/nm-progress09.png b/gnome/applet/icons/nm-progress09.png
deleted file mode 100644
index 0a9bf9b587..0000000000
--- a/gnome/applet/icons/nm-progress09.png
+++ /dev/null
Binary files differ
diff --git a/gnome/applet/icons/nm-progress10.png b/gnome/applet/icons/nm-progress10.png
deleted file mode 100644
index 8e45b7d27d..0000000000
--- a/gnome/applet/icons/nm-progress10.png
+++ /dev/null
Binary files differ
diff --git a/gnome/applet/icons/nm-progress11.png b/gnome/applet/icons/nm-progress11.png
deleted file mode 100644
index e5aeb1430b..0000000000
--- a/gnome/applet/icons/nm-progress11.png
+++ /dev/null
Binary files differ
diff --git a/gnome/applet/icons/nm-progress12.png b/gnome/applet/icons/nm-progress12.png
deleted file mode 100644
index 2776ce3bf9..0000000000
--- a/gnome/applet/icons/nm-progress12.png
+++ /dev/null
Binary files differ
diff --git a/gnome/applet/icons/nm-signal-00.png b/gnome/applet/icons/nm-signal-00.png
deleted file mode 100644
index 403c8bf9f1..0000000000
--- a/gnome/applet/icons/nm-signal-00.png
+++ /dev/null
Binary files differ
diff --git a/gnome/applet/icons/nm-signal-100.png b/gnome/applet/icons/nm-signal-100.png
deleted file mode 100644
index bc5fee63ad..0000000000
--- a/gnome/applet/icons/nm-signal-100.png
+++ /dev/null
Binary files differ
diff --git a/gnome/applet/icons/nm-signal-25.png b/gnome/applet/icons/nm-signal-25.png
deleted file mode 100644
index 9ce0ffffc4..0000000000
--- a/gnome/applet/icons/nm-signal-25.png
+++ /dev/null
Binary files differ
diff --git a/gnome/applet/icons/nm-signal-50.png b/gnome/applet/icons/nm-signal-50.png
deleted file mode 100644
index 1f7d30c8e4..0000000000
--- a/gnome/applet/icons/nm-signal-50.png
+++ /dev/null
Binary files differ
diff --git a/gnome/applet/icons/nm-signal-75.png b/gnome/applet/icons/nm-signal-75.png
deleted file mode 100644
index 1f0bbb8235..0000000000
--- a/gnome/applet/icons/nm-signal-75.png
+++ /dev/null
Binary files differ
diff --git a/gnome/applet/icons/nm-vpn-lock.png b/gnome/applet/icons/nm-vpn-lock.png
deleted file mode 100644
index 73d1a41318..0000000000
--- a/gnome/applet/icons/nm-vpn-lock.png
+++ /dev/null
Binary files differ
diff --git a/gnome/applet/keyring.png b/gnome/applet/keyring.png
deleted file mode 100644
index caade38ad3..0000000000
--- a/gnome/applet/keyring.png
+++ /dev/null
Binary files differ
diff --git a/gnome/applet/main.c b/gnome/applet/main.c
deleted file mode 100644
index 65c21e6a9e..0000000000
--- a/gnome/applet/main.c
+++ /dev/null
@@ -1,74 +0,0 @@
-/* NetworkManager Wireless Applet -- Display wireless access points and allow user control
- *
- * Dan Williams <dcbw@redhat.com>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- *
- * This applet used the GNOME Wireless Applet as a skeleton to build from.
- *
- * (C) Copyright 2005 Red Hat, Inc.
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <string.h>
-#include <gtk/gtk.h>
-#include <libgnomeui/libgnomeui.h>
-#include <glib/gi18n-lib.h>
-
-#include "applet.h"
-
-static void session_die (GnomeClient *client, gpointer client_data)
-{
- gtk_main_quit ();
-}
-
-static gboolean session_save (GnomeClient *client, gpointer client_data)
-{
- return TRUE;
-}
-
-int main (int argc, char *argv[])
-{
- NMWirelessApplet * nmwa;
- GnomeClient * client = NULL;
-
- gnome_program_init ("nm-applet", VERSION, LIBGNOMEUI_MODULE,
- argc, argv,
- GNOME_PARAM_NONE);
-
- client = gnome_master_client ();
- gnome_client_set_restart_command (client, argc, argv);
- gnome_client_set_restart_style (client, GNOME_RESTART_IMMEDIATELY);
-
- g_signal_connect (client, "save_yourself", G_CALLBACK (session_save), NULL);
- g_signal_connect (client, "die", G_CALLBACK (session_die), NULL);
-
- bindtextdomain (GETTEXT_PACKAGE, NULL);
- bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
- textdomain (GETTEXT_PACKAGE);
-
- if ((nmwa = nmwa_new ()))
- {
- gtk_widget_show_all (GTK_WIDGET (nmwa));
- gtk_main ();
- }
-
- gnome_client_set_restart_style (client, GNOME_RESTART_ANYWAY);
-
- return 0;
-}
diff --git a/gnome/applet/menu-items.c b/gnome/applet/menu-items.c
deleted file mode 100644
index 4a48ac0617..0000000000
--- a/gnome/applet/menu-items.c
+++ /dev/null
@@ -1,321 +0,0 @@
-/* menu-info.c - Class to represent the
- *
- * Jonathan Blandford <jrb@redhat.com>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- *
- * This also uses code from eel-vfs-extentions available under the LGPL:
- * Authors: Darin Adler <darin@eazel.com>
- * Pavel Cisler <pavel@eazel.com>
- * Mike Fleming <mfleming@eazel.com>
- * John Sullivan <sullivan@eazel.com>
- *
- * (C) Copyright 2004 Red Hat, Inc.
- * (C) Copyright 1999, 2000 Eazel, Inc.
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <stdio.h>
-#include <glib/gi18n.h>
-#include <string.h>
-
-#include "menu-items.h"
-#include "applet-dbus.h"
-
-
-/****************************************************************
- * Wired menu item
- ****************************************************************/
-
-struct NMWiredMenuItem
-{
- GtkCheckMenuItem *check_item;
- GtkLabel *label;
-};
-
-
-NMWiredMenuItem *wired_menu_item_new (void)
-{
- NMWiredMenuItem *item = g_malloc0 (sizeof (NMWiredMenuItem));
-
- g_return_val_if_fail (item != NULL, NULL);
-
- item->check_item = GTK_CHECK_MENU_ITEM (gtk_check_menu_item_new ());
- item->label = GTK_LABEL (gtk_label_new (NULL));
- gtk_misc_set_alignment (GTK_MISC (item->label), 0.0, 0.5);
- gtk_container_add (GTK_CONTAINER (item->check_item), GTK_WIDGET (item->label));
- gtk_widget_show (GTK_WIDGET (item->label));
-
- return item;
-}
-
-GtkCheckMenuItem *wired_menu_item_get_check_item (NMWiredMenuItem *item)
-{
- g_return_val_if_fail (item != NULL, NULL);
-
- return item->check_item;
-}
-
-void wired_menu_item_update (NMWiredMenuItem *item, NetworkDevice *dev, const gint n_devices)
-{
- char *text;
-
- g_return_if_fail (dev != NULL);
- g_return_if_fail (item != NULL);
- g_assert (network_device_is_wired (dev));
-
- if (n_devices > 1)
- {
- const char *dev_name;
-
- dev_name = network_device_get_desc (dev);
- if (!dev_name)
- dev_name = network_device_get_iface (dev);
- text = g_strdup_printf (_("Wired Network (%s)"), dev_name);
- }
- else
- text = g_strdup (_("_Wired Network"));
-
- gtk_label_set_text_with_mnemonic (GTK_LABEL (item->label), text);
-
- /* Only dim the item if the device supports carrier detection AND
- * we know it doesn't have a link.
- */
- if (network_device_get_driver_support_level (dev) != NM_DRIVER_NO_CARRIER_DETECT)
- gtk_widget_set_sensitive (GTK_WIDGET (item->check_item), network_device_get_link (dev));
-}
-
-
-/****************************************************************
- * Wireless menu item
- ****************************************************************/
-
-struct NMWirelessMenuItem
-{
- GtkMenuItem *menu_item;
- GtkLabel *label;
-};
-
-
-static gboolean label_expose (GtkWidget *widget)
-{
- /* Bad hack to make the label draw normally, instead of insensitive. */
- widget->state = GTK_STATE_NORMAL;
-
- return FALSE;
-}
-
-NMWirelessMenuItem *wireless_menu_item_new (void)
-{
- NMWirelessMenuItem *item = g_malloc0 (sizeof (NMWirelessMenuItem));
-
- g_return_val_if_fail (item != NULL, NULL);
-
- item->menu_item = GTK_MENU_ITEM (gtk_menu_item_new ());
-
- /* Make sure it looks slightly different if the label determines the width of the widget */
- item->label = GTK_LABEL (gtk_label_new (NULL));
- gtk_misc_set_padding (GTK_MISC (item->label), 6, 0);
- g_signal_connect (G_OBJECT (item->label), "expose-event", G_CALLBACK (label_expose), NULL);
-
- gtk_container_add (GTK_CONTAINER (item->menu_item), GTK_WIDGET (item->label));
- gtk_widget_show (GTK_WIDGET (item->label));
-
- gtk_widget_set_sensitive (GTK_WIDGET (item->menu_item), FALSE);
-
- return item;
-}
-
-GtkMenuItem *wireless_menu_item_get_item (NMWirelessMenuItem *item)
-{
- g_return_val_if_fail (item != NULL, NULL);
-
- return item->menu_item;
-}
-
-void wireless_menu_item_update (NMWirelessMenuItem *item, NetworkDevice *dev, const gint n_devices)
-{
- char *text;
- const char *dev_name;
- gint n_essids;
-
- g_return_if_fail (dev != NULL);
- g_return_if_fail (item != NULL);
- g_assert (network_device_is_wireless (dev));
-
- n_essids = network_device_get_num_wireless_networks (dev);
- dev_name = network_device_get_desc (dev) ? network_device_get_desc (dev) : network_device_get_iface (dev);
-
- if (n_devices > 1)
- text = g_strdup_printf (ngettext ("Wireless Network (%s)", "Wireless Networks (%s)", n_essids), dev_name);
- else
- text = g_strdup (ngettext ("Wireless Network", "Wireless Networks", n_essids));
-
- gtk_label_set_markup (GTK_LABEL (item->label), text);
- g_free (text);
-}
-
-
-/****************************************************************
- * Wireless Network menu item
- ****************************************************************/
-
-struct NMNetworkMenuItem
-{
- GtkCheckMenuItem *check_item;
- GtkLabel *label;
- GtkWidget *progress;
- GtkWidget *security_image;
-};
-
-
-NMNetworkMenuItem *network_menu_item_new (GtkSizeGroup *encryption_size_group)
-{
- GtkWidget *hbox;
- NMNetworkMenuItem *item = g_malloc0 (sizeof (NMNetworkMenuItem));
- PangoFontDescription *fontdesc;
- PangoFontMetrics *metrics;
- PangoContext *context;
- PangoLanguage *lang;
- int ascent;
-
- g_return_val_if_fail (item != NULL, NULL);
-
- item->check_item = GTK_CHECK_MENU_ITEM (gtk_check_menu_item_new ());
- gtk_check_menu_item_set_draw_as_radio (item->check_item, TRUE);
-
- hbox = gtk_hbox_new (FALSE, 6);
- item->label = GTK_LABEL (gtk_label_new (NULL));
- gtk_misc_set_alignment (GTK_MISC (item->label), 0.0, 0.5);
-
- item->security_image = gtk_image_new ();
- gtk_size_group_add_widget (encryption_size_group, item->security_image);
-
- gtk_container_add (GTK_CONTAINER (item->check_item), hbox);
- gtk_box_pack_start (GTK_BOX (hbox), GTK_WIDGET (item->label), TRUE, TRUE, 0);
- gtk_box_pack_start (GTK_BOX (hbox), item->security_image, FALSE, FALSE, 0);
-
- item->progress = gtk_progress_bar_new ();
-
- /* get the font ascent for the current font and language */
- context = gtk_widget_get_pango_context (item->progress);
- fontdesc = pango_context_get_font_description (context);
- lang = pango_context_get_language (context);
- metrics = pango_context_get_metrics (context, fontdesc, lang);
- ascent = pango_font_metrics_get_ascent (metrics) * 1.5 / PANGO_SCALE;
- pango_font_metrics_unref (metrics);
-
- /* size our progress bar to be five ascents long */
- gtk_widget_set_size_request (item->progress, ascent * 5, -1);
-
- gtk_box_pack_end (GTK_BOX (hbox), item->progress, FALSE, TRUE, 0);
-
- gtk_widget_show (GTK_WIDGET (item->label));
- gtk_widget_show (item->progress);
- gtk_widget_show (hbox);
-
- return item;
-}
-
-GtkCheckMenuItem *network_menu_item_get_check_item (NMNetworkMenuItem *item)
-{
- g_return_val_if_fail (item != NULL, NULL);
-
- return item->check_item;
-}
-
-/* has_encrypted means that the wireless network has an encrypted
- * area, and thus we need to allow for spacing.
- */
-void network_menu_item_update (NMNetworkMenuItem *item, WirelessNetwork *network, const gboolean is_encrypted)
-{
- char *display_essid;
- gdouble percent;
-
- g_return_if_fail (item != NULL);
- g_return_if_fail (network != NULL);
-
- display_essid = nm_menu_network_escape_essid_for_display (wireless_network_get_essid (network));
- gtk_label_set_text (GTK_LABEL (item->label), display_essid);
- g_free (display_essid);
-
- percent = (double) CLAMP (wireless_network_get_strength (network), 0, 100) / 100.0;
- gtk_progress_set_percentage (GTK_PROGRESS (item->progress), percent);
-
- /* Deal with the encrypted icon */
- g_object_set (item->security_image, "visible", is_encrypted, NULL);
-
- if (wireless_network_get_encrypted (network))
- gtk_image_set_from_stock (GTK_IMAGE (item->security_image), "gnome-lockscreen", GTK_ICON_SIZE_MENU);
- else
- gtk_image_set_from_stock (GTK_IMAGE (item->security_image), NULL, GTK_ICON_SIZE_MENU);
-}
-
-
-
-
-/****************************************************************
- * Utility stuff
- ****************************************************************/
-
-/* This is copied from eel.
- */
-static char *eel_make_valid_utf8 (const char *name)
-{
- GString *string;
- const char *remainder, *invalid;
- int remaining_bytes, valid_bytes;
-
- string = NULL;
- remainder = name;
- remaining_bytes = strlen (name);
-
- while (remaining_bytes != 0) {
- if (g_utf8_validate (remainder, remaining_bytes, &invalid)) {
- break;
- }
- valid_bytes = invalid - remainder;
-
- if (string == NULL) {
- string = g_string_sized_new (remaining_bytes);
- }
- g_string_append_len (string, remainder, valid_bytes);
- g_string_append_c (string, '?');
-
- remaining_bytes -= valid_bytes + 1;
- remainder = invalid + 1;
- }
-
- if (string == NULL) {
- return g_strdup (name);
- }
-
- g_string_append (string, remainder);
- g_string_append (string, _(" (invalid Unicode)"));
- g_assert (g_utf8_validate (string->str, -1, NULL));
-
- return g_string_free (string, FALSE);
-}
-
-char *nm_menu_network_escape_essid_for_display (const char *essid)
-{
- if (g_utf8_validate (essid, -1, NULL))
- return g_strdup (essid);
- else
- return eel_make_valid_utf8 (essid);
-}
diff --git a/gnome/applet/menu-items.h b/gnome/applet/menu-items.h
deleted file mode 100644
index 1b1a278182..0000000000
--- a/gnome/applet/menu-items.h
+++ /dev/null
@@ -1,50 +0,0 @@
-/* menu-info.h: Simple menu items for the Applet to use
- *
- * Jonathan Blandford <jrb@redhat.com>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- *
- * (C) Copyright 2004 Red Hat, Inc.
- */
-
-#ifndef MENU_ITEMS_H
-#define MENU_ITEMS_H
-
-#include <gtk/gtk.h>
-#include "applet.h"
-
-
-typedef struct NMWiredMenuItem NMWiredMenuItem;
-typedef struct NMWirelessMenuItem NMWirelessMenuItem;
-typedef struct NMNetworkMenuItem NMNetworkMenuItem;
-
-
-NMWiredMenuItem *wired_menu_item_new (void);
-GtkCheckMenuItem *wired_menu_item_get_check_item (NMWiredMenuItem *item);
-void wired_menu_item_update (NMWiredMenuItem *item, NetworkDevice *dev, const gint n_devices);
-
-NMWirelessMenuItem *wireless_menu_item_new (void);
-GtkMenuItem *wireless_menu_item_get_item (NMWirelessMenuItem *item);
-void wireless_menu_item_update (NMWirelessMenuItem *item, NetworkDevice *dev, const gint n_devices);
-
-NMNetworkMenuItem *network_menu_item_new (GtkSizeGroup *encryption_size_group);
-GtkCheckMenuItem *network_menu_item_get_check_item (NMNetworkMenuItem *item);
-void network_menu_item_update (NMNetworkMenuItem *item, WirelessNetwork *network, const gboolean is_encrypted);
-
-/* Helper function; escapes an essid for human readable display. */
-char *nm_menu_network_escape_essid_for_display (const char *essid);
-
-
-#endif /* MENU_INFO_H */
diff --git a/gnome/applet/nm-applet.conf b/gnome/applet/nm-applet.conf
deleted file mode 100644
index a4b02e70a4..0000000000
--- a/gnome/applet/nm-applet.conf
+++ /dev/null
@@ -1,24 +0,0 @@
-<!DOCTYPE busconfig PUBLIC
- "-//freedesktop//DTD D-BUS Bus Configuration 1.0//EN"
- "http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd">
-<busconfig>
- <policy user="root">
- <allow own="org.freedesktop.NetworkManagerInfo"/>
-
- <allow send_destination="org.freedesktop.NetworkManagerInfo"/>
- <allow send_interface="org.freedesktop.NetworkManagerInfo"/>
- </policy>
- <policy at_console="true">
- <allow own="org.freedesktop.NetworkManagerInfo"/>
-
- <allow send_destination="org.freedesktop.NetworkManagerInfo"/>
- <allow send_interface="org.freedesktop.NetworkManagerInfo"/>
- </policy>
- <policy context="default">
- <deny own="org.freedesktop.NetworkManagerInfo"/>
-
- <deny send_destination="org.freedesktop.NetworkManagerInfo"/>
- <deny send_interface="org.freedesktop.NetworkManagerInfo"/>
- </policy>
-</busconfig>
-
diff --git a/gnome/applet/nm-device.c b/gnome/applet/nm-device.c
deleted file mode 100644
index 9e3ad54c0e..0000000000
--- a/gnome/applet/nm-device.c
+++ /dev/null
@@ -1,578 +0,0 @@
-/* -*- Mode: C; tab-width: 5; indent-tabs-mode: t; c-basic-offset: 5 -*- */
-/* NetworkManager Wireless Applet -- Display wireless access points and allow user control
- *
- * Dan Williams <dcbw@redhat.com>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- *
- * (C) Copyright 2004-2005 Red Hat, Inc.
- */
-
-
-#include <glib.h>
-#include <string.h>
-#include "nm-device.h"
-
-
-/*
- * Representation of network device
- *
- */
-struct NetworkDevice
-{
- int refcount;
- char * iface;
- char * desc;
- char * nm_path;
- NMDeviceType type;
- gboolean active;
- gboolean link;
- NMDriverSupportLevel driver_support_level;
- char * addr;
- char * udi;
- gint strength;
- GSList * networks;
- NMActStage act_stage;
-};
-
-
-/*
- * network_device_new
- *
- * Create a new network device representation
- *
- */
-NetworkDevice *network_device_new (const char *iface, NMDeviceType type, const char *nm_path)
-{
- NetworkDevice *dev = NULL;
-
- if ((dev = g_malloc0 (sizeof (NetworkDevice))))
- {
- dev->refcount = 1;
- dev->iface = g_strdup (iface);
- dev->type = type;
- dev->nm_path = g_strdup (nm_path);
- }
-
- return dev;
-}
-
-
-/*
- * network_device_copy
- *
- * Create a new network device representation, filling its
- * data in from an already existing one. Deep-copies the
- * wireless networks too.
- *
- */
-NetworkDevice *network_device_copy (NetworkDevice *src)
-{
- NetworkDevice *dev = NULL;
-
- g_return_val_if_fail (src != NULL, NULL);
-
- if ((dev = g_malloc0 (sizeof (NetworkDevice))))
- {
- GSList *elt;
-
- network_device_ref (dev);
- dev->nm_path = g_strdup (src->nm_path);
- dev->type = src->type;
- dev->link = src->link;
- dev->addr = g_strdup (src->addr);
- dev->driver_support_level = src->driver_support_level;
- dev->iface = g_strdup (src->iface);
- dev->desc = g_strdup (src->desc);
- dev->udi = g_strdup (src->udi);
- dev->active = src->active;
- dev->act_stage = src->act_stage;
- dev->strength = src->strength;
-
- for (elt = src->networks; elt; elt = g_slist_next (elt))
- {
- WirelessNetwork *net = (WirelessNetwork *)elt->data;
- if (net)
- {
- WirelessNetwork *copy = wireless_network_copy (net);
- dev->networks = g_slist_append (dev->networks, copy);
- }
- }
- }
-
- return dev;
-}
-
-
-/*
- * network_device_ref
- *
- * Increment the reference count of the network device
- *
- */
-void network_device_ref (NetworkDevice *dev)
-{
- g_return_if_fail (dev != NULL);
-
- dev->refcount++;
-}
-
-
-/*
- * network_device_unref
- *
- * Unrefs (and possibly frees) the representation of a network device
- *
- */
-void network_device_unref (NetworkDevice *dev)
-{
- g_return_if_fail (dev != NULL);
-
- dev->refcount--;
- if (dev->refcount < 1)
- {
- if (dev->type == DEVICE_TYPE_WIRELESS_ETHERNET)
- network_device_clear_wireless_networks (dev);
- g_free (dev->nm_path);
- g_free (dev->iface);
- g_free (dev->udi);
- g_free (dev->desc);
- g_free (dev->addr);
- g_free (dev);
- memset (dev, 0, sizeof (NetworkDevice));
- }
-}
-
-
-gboolean network_device_is_wired (NetworkDevice *dev)
-{
- g_return_val_if_fail (dev != NULL, FALSE);
-
- return (network_device_get_type (dev) == DEVICE_TYPE_WIRED_ETHERNET);
-}
-
-
-gboolean network_device_is_wireless (NetworkDevice *dev)
-{
- g_return_val_if_fail (dev != NULL, FALSE);
-
- return (network_device_get_type (dev) == DEVICE_TYPE_WIRELESS_ETHERNET);
-}
-
-
-/*
- * network_device_get_active_wireless_network
- *
- * Return the active wireless network.
- *
- */
-WirelessNetwork *network_device_get_active_wireless_network (NetworkDevice *dev)
-{
- GSList * list;
- WirelessNetwork * active = NULL;
-
- g_return_val_if_fail (dev != NULL, NULL);
- g_return_val_if_fail (dev->type == DEVICE_TYPE_WIRELESS_ETHERNET, NULL);
-
- for (list = dev->networks; list; list = list->next)
- {
- WirelessNetwork *net = (WirelessNetwork *) list->data;
-
- if (wireless_network_get_active (net))
- {
- active = net;
- break;
- }
- }
-
- return active;
-}
-
-
-/*
- * network_device_get_wireless_network_by_essid
- *
- * Return the wireless network with the specified essid.
- *
- */
-WirelessNetwork *network_device_get_wireless_network_by_essid (NetworkDevice *dev, const char *essid)
-{
- GSList * list;
- WirelessNetwork * return_net = NULL;
-
- g_return_val_if_fail (dev != NULL, NULL);
- g_return_val_if_fail (dev->type == DEVICE_TYPE_WIRELESS_ETHERNET, NULL);
- g_return_val_if_fail (essid != NULL, NULL);
-
- for (list = dev->networks; list; list = list->next)
- {
- WirelessNetwork *net = (WirelessNetwork *) list->data;
-
- if (!strcmp (wireless_network_get_essid (net), essid))
- {
- return_net = net;
- break;
- }
- }
-
- return return_net;
-}
-
-
-/*
- * network_device_get_wireless_network_by_nm_path
- *
- * Return the wireless network with the specified NetworkManager object path.
- *
- */
-WirelessNetwork *network_device_get_wireless_network_by_nm_path (NetworkDevice *dev, const char *nm_path)
-{
- GSList * list;
- WirelessNetwork * return_net = NULL;
-
- g_return_val_if_fail (dev != NULL, NULL);
- g_return_val_if_fail (dev->type == DEVICE_TYPE_WIRELESS_ETHERNET, NULL);
- g_return_val_if_fail (nm_path != NULL, NULL);
-
- for (list = dev->networks; list; list = list->next)
- {
- WirelessNetwork *net = (WirelessNetwork *) list->data;
-
- if (!strcmp (wireless_network_get_nm_path (net), nm_path))
- {
- return_net = net;
- break;
- }
- }
-
- return return_net;
-}
-
-
-/*
- * network_device_get_wireless_network_by_nm_path
- *
- * Return the wireless network with the specified NetworkManager object path.
- *
- */
-void network_device_foreach_wireless_network (NetworkDevice *dev, WirelessNetworkForeach func, gpointer user_data)
-{
- GSList * list;
-
- g_return_if_fail (dev != NULL);
- g_return_if_fail (dev->type == DEVICE_TYPE_WIRELESS_ETHERNET);
- g_return_if_fail (func != NULL);
-
- for (list = dev->networks; list; list = list->next)
- {
- WirelessNetwork *net = (WirelessNetwork *) list->data;
-
- if (net)
- (*func)(dev, net, user_data);
- }
-}
-
-
-/*
- * network_device_add_wireless_network
- *
- * Adds a wireless network to the network device's network list
- *
- */
-void network_device_add_wireless_network (NetworkDevice *dev, WirelessNetwork *net)
-{
- g_return_if_fail (dev != NULL);
- g_return_if_fail (dev->type == DEVICE_TYPE_WIRELESS_ETHERNET);
- g_return_if_fail (net != NULL);
-
- wireless_network_ref (net);
- dev->networks = g_slist_append (dev->networks, net);
-}
-
-
-/*
- * network_device_clear_wireless_networks
- *
- */
-void network_device_clear_wireless_networks (NetworkDevice *dev)
-{
- g_return_if_fail (dev != NULL);
- g_return_if_fail (dev->type == DEVICE_TYPE_WIRELESS_ETHERNET);
-
- g_slist_foreach (dev->networks, (GFunc) wireless_network_unref, NULL);
- g_slist_free (dev->networks);
- dev->networks = NULL;
-}
-
-
-/*
- * network_device_remove_wireless_network
- *
- * Remove one wireless network from the wireless network list
- *
- */
-void network_device_remove_wireless_network (NetworkDevice *dev, WirelessNetwork *net)
-{
- GSList *elt;
-
- g_return_if_fail (dev != NULL);
- g_return_if_fail (dev->type == DEVICE_TYPE_WIRELESS_ETHERNET);
- g_return_if_fail (net != NULL);
-
- for (elt = dev->networks; elt; elt = g_slist_next (elt))
- {
- if (elt->data == net)
- {
- dev->networks = g_slist_remove_link (dev->networks, elt);
- wireless_network_unref ((WirelessNetwork *)elt->data);
- g_slist_free (elt);
- break;
- }
- }
-}
-
-
-static int sort_networks_function (WirelessNetwork *a, WirelessNetwork *b)
-{
- const char *name_a = wireless_network_get_essid (a);
- const char *name_b = wireless_network_get_essid (b);
-
- if (name_a && !name_b)
- return -1;
- else if (!name_a && name_b)
- return 1;
- else if (!name_a && !name_b)
- return 0;
- else
- return strcasecmp (name_a, name_b);
-}
-
-
-/*
- * network_device_sort_wireless_networks
- *
- * Alphabetize the wireless networks list
- *
- */
-void network_device_sort_wireless_networks (NetworkDevice *dev)
-{
- g_return_if_fail (dev != NULL);
- g_return_if_fail (dev->type == DEVICE_TYPE_WIRELESS_ETHERNET);
-
- dev->networks = g_slist_sort (dev->networks, (GCompareFunc) sort_networks_function);
-}
-
-
-/*
- * network_device_get_num_wireless_networks
- *
- * Return the number of wireless networks this device knows about.
- *
- */
-guint network_device_get_num_wireless_networks (NetworkDevice *dev)
-{
- g_return_val_if_fail (dev != NULL, 0);
- g_return_val_if_fail (dev->type == DEVICE_TYPE_WIRELESS_ETHERNET, 0);
-
- return g_slist_length (dev->networks);
-}
-
-
-/*
- * Accessors for hardware address
- */
-const char *network_device_get_address (NetworkDevice *dev)
-{
- g_return_val_if_fail (dev != NULL, NULL);
-
- return (dev->addr);
-}
-
-void network_device_set_address (NetworkDevice *dev, const char *addr)
-{
- g_return_if_fail (dev != NULL);
-
- if (dev->addr)
- {
- g_free (dev->addr);
- dev->addr = NULL;
- }
- if (addr)
- dev->addr = g_strdup (addr);
-}
-
-/*
- * Accessors for driver support level
- */
-NMDriverSupportLevel network_device_get_driver_support_level (NetworkDevice *dev)
-{
- g_return_val_if_fail (dev != NULL, NM_DRIVER_UNSUPPORTED);
-
- return (dev->driver_support_level);
-}
-
-void network_device_set_driver_support_level (NetworkDevice *dev, NMDriverSupportLevel level)
-{
- g_return_if_fail (dev != NULL);
-
- dev->driver_support_level = level;
-}
-
-/*
- * Accessors for NM object path
- */
-const char *network_device_get_nm_path (NetworkDevice *dev)
-{
- g_return_val_if_fail (dev != NULL, NULL);
-
- return (dev->nm_path);
-}
-
-/*
- * Accessors for device type
- */
-NMDeviceType network_device_get_type (NetworkDevice *dev)
-{
- g_return_val_if_fail (dev != NULL, DEVICE_TYPE_DONT_KNOW);
-
- return (dev->type);
-}
-
-/*
- * Accessors for strength
- */
-gint network_device_get_strength (NetworkDevice *dev)
-{
- g_return_val_if_fail (dev != NULL, -1);
- g_return_val_if_fail (dev->type == DEVICE_TYPE_WIRELESS_ETHERNET, -1);
-
- return (dev->strength);
-}
-
-void network_device_set_strength (NetworkDevice *dev, gint strength)
-{
- g_return_if_fail (dev != NULL);
- g_return_if_fail (dev->type == DEVICE_TYPE_WIRELESS_ETHERNET);
-
- dev->strength = strength;
-}
-
-/*
- * Accessors for device's interface name
- */
-const char *network_device_get_iface (NetworkDevice *dev)
-{
- g_return_val_if_fail (dev != NULL, NULL);
-
- return (dev->iface);
-}
-
-/*
- * Accessors for HAL udi
- */
-const char *network_device_get_hal_udi (NetworkDevice *dev)
-{
- g_return_val_if_fail (dev != NULL, NULL);
-
- return (dev->udi);
-}
-
-void network_device_set_hal_udi (NetworkDevice *dev, const char *hal_udi)
-{
- g_return_if_fail (dev != NULL);
-
- if (dev->udi)
- {
- g_free (dev->udi);
- dev->udi = NULL;
- }
- if (hal_udi)
- dev->udi = g_strdup (hal_udi);
-}
-
-/*
- * Accessors for link
- */
-gboolean network_device_get_link (NetworkDevice *dev)
-{
- g_return_val_if_fail (dev != NULL, FALSE);
-
- return (dev->link);
-}
-
-void network_device_set_link (NetworkDevice *dev, gboolean link)
-{
- g_return_if_fail (dev != NULL);
-
- dev->link = link;
-}
-
-/*
- * Accessors for active
- */
-gboolean network_device_get_active (NetworkDevice *dev)
-{
- g_return_val_if_fail (dev != NULL, FALSE);
-
- return (dev->active);
-}
-
-void network_device_set_active (NetworkDevice *dev, gboolean active)
-{
- g_return_if_fail (dev != NULL);
-
- dev->active = active;
-}
-
-/*
- * Accessors for desc
- */
-const char *network_device_get_desc (NetworkDevice *dev)
-{
- g_return_val_if_fail (dev != NULL, NULL);
-
- return (dev->desc);
-}
-
-void network_device_set_desc (NetworkDevice *dev, const char *desc)
-{
- g_return_if_fail (dev != NULL);
-
- if (dev->desc)
- {
- g_free (dev->desc);
- dev->desc = NULL;
- }
- if (desc)
- dev->desc = g_strdup (desc);
-}
-
-/*
- * Accessors for activation stage
- */
-NMActStage network_device_get_act_stage (NetworkDevice *dev)
-{
- g_return_val_if_fail (dev != NULL, FALSE);
-
- return (dev->act_stage);
-}
-
-void network_device_set_act_stage (NetworkDevice *dev, NMActStage act_stage)
-{
- g_return_if_fail (dev != NULL);
-
- dev->act_stage = act_stage;
-}
-
diff --git a/gnome/applet/nm-device.h b/gnome/applet/nm-device.h
deleted file mode 100644
index e79a44a1f6..0000000000
--- a/gnome/applet/nm-device.h
+++ /dev/null
@@ -1,88 +0,0 @@
-/* -*- Mode: C; tab-width: 5; indent-tabs-mode: t; c-basic-offset: 5 -*- */
-/* NetworkManager Wireless Applet -- Display wireless access points and allow user control
- *
- * Dan Williams <dcbw@redhat.com>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- *
- * (C) Copyright 2004-2005 Red Hat, Inc.
- */
-
-
-#ifndef NM_DEVICE_H
-#define NM_DEVICE_H
-
-#include "NetworkManager.h"
-#include "wireless-network.h"
-
-typedef struct NetworkDevice NetworkDevice;
-typedef void (*WirelessNetworkForeach) (NetworkDevice *dev, WirelessNetwork *net, gpointer user_data);
-
-
-NetworkDevice * network_device_new (const char *iface, NMDeviceType type, const char *nm_path);
-NetworkDevice * network_device_copy (NetworkDevice *src);
-
-void network_device_ref (NetworkDevice *dev);
-void network_device_unref (NetworkDevice *dev);
-
-gboolean network_device_is_wired (NetworkDevice *dev);
-gboolean network_device_is_wireless (NetworkDevice *dev);
-
-NMDeviceType network_device_get_type (NetworkDevice *dev);
-
-WirelessNetwork * network_device_get_wireless_network_by_essid (NetworkDevice *dev, const char *essid);
-WirelessNetwork * network_device_get_wireless_network_by_nm_path(NetworkDevice *dev, const char *essid);
-
-WirelessNetwork * network_device_get_active_wireless_network (NetworkDevice *dev);
-
-void network_device_foreach_wireless_network (NetworkDevice *dev, WirelessNetworkForeach func, gpointer user_data);
-
-void network_device_add_wireless_network (NetworkDevice *dev, WirelessNetwork *net);
-void network_device_remove_wireless_network (NetworkDevice *dev, WirelessNetwork *net);
-void network_device_clear_wireless_networks (NetworkDevice *dev);
-
-void network_device_sort_wireless_networks (NetworkDevice *dev);
-
-guint network_device_get_num_wireless_networks (NetworkDevice *dev);
-
-const char * network_device_get_address (NetworkDevice *dev);
-void network_device_set_address (NetworkDevice *dev, const char *addr);
-
-NMDriverSupportLevel network_device_get_driver_support_level (NetworkDevice *dev);
-void network_device_set_driver_support_level (NetworkDevice *dev, NMDriverSupportLevel level);
-
-const char * network_device_get_iface (NetworkDevice *dev);
-
-const char * network_device_get_nm_path (NetworkDevice *dev);
-
-gint network_device_get_strength (NetworkDevice *dev);
-void network_device_set_strength (NetworkDevice *dev, gint strength);
-
-const char * network_device_get_hal_udi (NetworkDevice *dev);
-void network_device_set_hal_udi (NetworkDevice *dev, const char *hal_udi);
-
-gboolean network_device_get_link (NetworkDevice *dev);
-void network_device_set_link (NetworkDevice *dev, gboolean link);
-
-gboolean network_device_get_active (NetworkDevice *dev);
-void network_device_set_active (NetworkDevice *dev, gboolean active);
-
-const char * network_device_get_desc (NetworkDevice *dev);
-void network_device_set_desc (NetworkDevice *dev, const char *desc);
-
-NMActStage network_device_get_act_stage (NetworkDevice *dev);
-void network_device_set_act_stage (NetworkDevice *dev, NMActStage act_stage);
-
-#endif
diff --git a/gnome/applet/other-network-dialog.c b/gnome/applet/other-network-dialog.c
deleted file mode 100644
index 98ca971d0e..0000000000
--- a/gnome/applet/other-network-dialog.c
+++ /dev/null
@@ -1,392 +0,0 @@
-/* NetworkManager Wireless Applet -- Display wireless access points and allow user control
- *
- * Dan Williams <dcbw@redhat.com>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- *
- * This applet used the GNOME Wireless Applet as a skeleton to build from.
- *
- * GNOME Wireless Applet Authors:
- * Eskil Heyn Olsen <eskil@eskil.dk>
- * Bastien Nocera <hadess@hadess.net> (Gnome2 port)
- *
- * (C) Copyright 2004 Red Hat, Inc.
- * (C) Copyright 2001, 2002 Free Software Foundation
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <string.h>
-#include <stdlib.h>
-#include <unistd.h>
-
-#include <glib/gi18n.h>
-#include <gtk/gtk.h>
-#include <glade/glade.h>
-
-#include "NetworkManager.h"
-#include "applet.h"
-#include "applet-dbus.h"
-#include "applet-dbus-devices.h"
-#include "other-network-dialog.h"
-
-
-static void update_button_cb (GtkWidget *widget, GladeXML *xml)
-{
- gboolean enable = FALSE;
- const char * text;
- GtkButton * button;
- GtkEntry * essid_entry;
- GtkCheckButton * enc_check_button;
-
- g_return_if_fail (xml != NULL);
-
- essid_entry = GTK_ENTRY (glade_xml_get_widget (xml, "essid_entry"));
- button = GTK_BUTTON (glade_xml_get_widget (xml, "ok_button"));
- enc_check_button = GTK_CHECK_BUTTON (glade_xml_get_widget (xml, "use_encryption_checkbox"));
-
- /* An ESSID is required */
- text = gtk_entry_get_text (essid_entry);
- if (text && strlen (text) > 0)
- enable = TRUE;
-
- /* If we're using encryption, validate the settings */
- if (enable && gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (enc_check_button)))
- {
- GtkComboBox * combo = GTK_COMBO_BOX (glade_xml_get_widget (xml, "key_type_combo"));
- GtkEntry * passphrase_entry = GTK_ENTRY (glade_xml_get_widget (xml, "passphrase_entry"));
- const char * passphrase_text = gtk_entry_get_text (passphrase_entry);
-
- enable = FALSE;
- switch (gtk_combo_box_get_active (combo))
- {
- case KEY_TYPE_128_BIT_PASSPHRASE:
- if (strlen (passphrase_text) > 0)
- enable = TRUE;
- break;
- case KEY_TYPE_ASCII_KEY:
- if ((strlen (passphrase_text) == 5) || (strlen (passphrase_text) == 13))
- enable = TRUE;
- break;
- case KEY_TYPE_HEX_KEY:
- if ((strlen (passphrase_text) == 10) || (strlen (passphrase_text) == 26))
- enable = TRUE;
- break;
- default:
- break;
- }
- }
-
- gtk_widget_set_sensitive (GTK_WIDGET (button), enable);
-}
-
-static GtkTreeModel *create_wireless_adapter_model (NMWirelessApplet *applet)
-{
- GtkListStore *retval;
- GSList *element;
-
- retval = gtk_list_store_new (2, G_TYPE_STRING, G_TYPE_POINTER);
- /* We should have already locked applet->data_mutex */
- for (element = applet->gui_device_list; element; element = element->next)
- {
- NetworkDevice *dev = (NetworkDevice *)(element->data);
-
- g_assert (dev);
- if (network_device_is_wireless (dev))
- {
- GtkTreeIter iter;
- const char *dev_name;
-
- dev_name = network_device_get_desc (dev) ? network_device_get_desc (dev) : network_device_get_iface (dev);
-
- gtk_list_store_append (retval, &iter);
- gtk_list_store_set (retval, &iter, 0, dev_name, 1, dev, -1);
- }
- }
- return GTK_TREE_MODEL (retval);
-}
-
-
-/*
- * nmwa_other_network_dialog_key_type_combo_changed
- *
- * Change the text of the passphrase entry label to match the selected
- * key type.
- *
- */
-static void nmwa_other_network_dialog_key_type_combo_changed (GtkWidget *key_type_combo, gpointer user_data)
-{
- GtkLabel *entry_label;
- int combo_choice;
- GladeXML *xml = (GladeXML *)user_data;
-
- g_return_if_fail (xml != NULL);
-
- entry_label = GTK_LABEL (glade_xml_get_widget (xml, "passphrase_entry_label"));
- switch ((combo_choice = gtk_combo_box_get_active (GTK_COMBO_BOX (key_type_combo))))
- {
- case KEY_TYPE_128_BIT_PASSPHRASE:
- gtk_label_set_label (entry_label, _("_Passphrase:"));
- break;
- case KEY_TYPE_ASCII_KEY:
- gtk_label_set_label (entry_label, _("_ASCII Key:"));
- break;
- case KEY_TYPE_HEX_KEY:
- gtk_label_set_label (entry_label, _("_Hex Key:"));
- break;
- default:
- break;
- }
-
- update_button_cb (key_type_combo, xml);
-}
-
-
-/*
- * nmwa_other_network_dialog_enc_check_toggled
- *
- * Enable/disable the encryption-related dialog items based on the
- * widget's status.
- *
- */
-static void nmwa_other_network_dialog_enc_check_toggled (GtkWidget *enc_check_button, gpointer user_data)
-{
- GladeXML *xml = (GladeXML *)user_data;
- GtkComboBox *combo;
- GtkEntry *entry;
- GtkLabel *combo_label;
- GtkLabel *entry_label;
- gboolean active;
-
- g_return_if_fail (xml != NULL);
-
- combo = GTK_COMBO_BOX (glade_xml_get_widget (xml, "key_type_combo"));
- combo_label = GTK_LABEL (glade_xml_get_widget (xml, "key_type_combo_label"));
- entry = GTK_ENTRY (glade_xml_get_widget (xml, "passphrase_entry"));
- entry_label = GTK_LABEL (glade_xml_get_widget (xml, "passphrase_entry_label"));
-
- active = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (enc_check_button));
- gtk_widget_set_sensitive (GTK_WIDGET (combo), active);
- gtk_widget_set_sensitive (GTK_WIDGET (combo_label), active);
- gtk_widget_set_sensitive (GTK_WIDGET (entry), active);
- gtk_widget_set_sensitive (GTK_WIDGET (entry_label), active);
-
- update_button_cb (enc_check_button, xml);
-}
-
-
-static GtkDialog *nmwa_other_network_dialog_init (GladeXML *xml, NMWirelessApplet *applet, NetworkDevice **def_dev, gboolean create_network)
-{
- GtkDialog *dialog = NULL;
- GtkWidget *essid_entry;
- GtkWidget *button;
- GtkComboBox *key_type_combo;
- GtkEntry *passphrase_entry;
- gint n_wireless_interfaces = 0;
- GSList *element;
- char *label;
- GtkCheckButton *enc_check_button;
-
- g_return_val_if_fail (xml != NULL, NULL);
- g_return_val_if_fail (applet != NULL, NULL);
- g_return_val_if_fail (def_dev != NULL, NULL);
- g_return_val_if_fail (*def_dev == NULL, NULL);
-
- /* Set up the dialog */
- if (!(dialog = GTK_DIALOG (glade_xml_get_widget (xml, "custom_essid_dialog"))))
- return NULL;
-
- essid_entry = glade_xml_get_widget (xml, "essid_entry");
- button = glade_xml_get_widget (xml, "ok_button");
- gtk_widget_grab_default (GTK_WIDGET (button));
-
- gtk_widget_grab_focus (essid_entry);
- gtk_widget_set_sensitive (button, FALSE);
- g_signal_connect (essid_entry, "changed", G_CALLBACK (update_button_cb), xml);
-
- if (create_network)
- {
- char hostname[HOST_NAME_MAX] = "hostname";
-
- gethostname (hostname, HOST_NAME_MAX);
- hostname[HOST_NAME_MAX-1] = '\n'; /* unspecified whether a truncated hostname is terminated */
-
- gtk_entry_set_text (GTK_ENTRY (essid_entry), hostname);
- gtk_editable_set_position (GTK_EDITABLE (essid_entry), -1);
-
- label = g_strdup_printf ("<span size=\"larger\" weight=\"bold\">%s</span>\n\n%s\n\n%s %s%s",
- _("Create new wireless network"),
- _("Enter the ESSID and security settings of the wireless network you wish to create."),
- _("By default, the ESSID is set to your computer's name,"),
- hostname,
- _(", with no encryption enabled."));
- }
- else
- {
- label = g_strdup_printf ("<span size=\"larger\" weight=\"bold\">%s</span>\n\n%s",
- _("Custom wireless network"),
- _("Enter the ESSID of the wireless network to which you wish to connect."));
- }
- gtk_label_set_markup (GTK_LABEL (glade_xml_get_widget (xml, "essid_label")), label);
- g_free (label);
-
- /* Do we have multiple Network cards? */
- g_mutex_lock (applet->data_mutex);
- for (element = applet->gui_device_list; element; element = element->next)
- {
- NetworkDevice *dev = (NetworkDevice *)(element->data);
-
- g_assert (dev);
- if (network_device_is_wireless (dev))
- {
- if (!*def_dev)
- {
- *def_dev = dev;
- network_device_ref (*def_dev);
- }
- n_wireless_interfaces++;
- }
- }
-
- if (n_wireless_interfaces < 1)
- {
- g_mutex_unlock (applet->data_mutex);
- /* Run away!!! */
- return (NULL);
- }
- else if (n_wireless_interfaces == 1)
- {
- gtk_widget_hide (glade_xml_get_widget (xml, "wireless_adapter_label"));
- gtk_widget_hide (glade_xml_get_widget (xml, "wireless_adapter_combo"));
- }
- else
- {
- GtkWidget *combo;
- GtkTreeModel *model;
-
- combo = glade_xml_get_widget (xml, "wireless_adapter_combo");
- model = create_wireless_adapter_model (applet);
- gtk_combo_box_set_model (GTK_COMBO_BOX (combo), model);
-
- /* Select the first one randomly */
- gtk_combo_box_set_active (GTK_COMBO_BOX (combo), 0);
- }
- g_mutex_unlock (applet->data_mutex);
-
- /* Uncheck the "use encryption" checkbox and disable relevant encryption widgets */
- enc_check_button = GTK_CHECK_BUTTON (glade_xml_get_widget (xml, "use_encryption_checkbox"));
- gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (enc_check_button), 0);
- g_signal_connect (G_OBJECT (enc_check_button), "toggled", GTK_SIGNAL_FUNC (nmwa_other_network_dialog_enc_check_toggled), xml);
- nmwa_other_network_dialog_enc_check_toggled (GTK_WIDGET (enc_check_button), xml);
-
- /* Set initial passphrase entry label and key type combo box item */
- key_type_combo = GTK_COMBO_BOX (glade_xml_get_widget (xml, "key_type_combo"));
- gtk_combo_box_set_active (key_type_combo, KEY_TYPE_128_BIT_PASSPHRASE);
- g_signal_connect (G_OBJECT (key_type_combo), "changed", GTK_SIGNAL_FUNC (nmwa_other_network_dialog_key_type_combo_changed), xml);
- nmwa_other_network_dialog_key_type_combo_changed (GTK_WIDGET (key_type_combo), xml);
-
- passphrase_entry = GTK_ENTRY (glade_xml_get_widget (xml, "passphrase_entry"));
- g_signal_connect (passphrase_entry, "changed", G_CALLBACK (update_button_cb), xml);
-
- return (dialog);
-}
-
-
-void nmwa_other_network_dialog_run (NMWirelessApplet *applet, gboolean create_network)
-{
- gchar *glade_file;
- GtkDialog *dialog;
- gint response;
- NetworkDevice *def_dev = NULL;
- GladeXML *xml;
-
- g_return_if_fail (applet != NULL);
- g_return_if_fail (applet->glade_file != NULL);
-
- if (!(xml = glade_xml_new (applet->glade_file, "custom_essid_dialog", NULL)))
- {
- nmwa_schedule_warning_dialog (applet, _("The NetworkManager Applet could not find some required resources (the glade file was not found)."));
- return;
- }
-
- if (!(dialog = nmwa_other_network_dialog_init (xml, applet, &def_dev, create_network)))
- return;
-
- /* Run the dialog */
- response = gtk_dialog_run (dialog);
-
- if (response == GTK_RESPONSE_OK)
- {
- GtkEntry *essid_entry;
- GtkCheckButton *enc_check_button;
- GtkEntry *passphrase_entry;
- GtkComboBox *key_type_combo;
- const char *essid = NULL;
- const char *passphrase = NULL;
- int key_type = -1;
-
- essid_entry = GTK_ENTRY (glade_xml_get_widget (xml, "essid_entry"));
- essid = gtk_entry_get_text (essid_entry);
-
- enc_check_button = GTK_CHECK_BUTTON (glade_xml_get_widget (xml, "use_encryption_checkbox"));
- if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (enc_check_button)))
- {
- passphrase_entry = GTK_ENTRY (glade_xml_get_widget (xml, "passphrase_entry"));
- passphrase = gtk_entry_get_text (passphrase_entry);
-
- key_type_combo = GTK_COMBO_BOX (glade_xml_get_widget (xml, "key_type_combo"));
- key_type = gtk_combo_box_get_active (GTK_COMBO_BOX (key_type_combo));
- }
-
- if (essid[0] != '\000')
- {
- NMEncKeyType nm_key_type;
-
- /* FIXME: allow picking of the wireless device, we currently just
- * use the first one found in our device list.
- *
- * FIXME: default_dev might have gone away by the time the dialog
- * gets dismissed and we get here...
- */
- switch (key_type)
- {
- case KEY_TYPE_128_BIT_PASSPHRASE:
- nm_key_type = NM_ENC_TYPE_128_BIT_PASSPHRASE;
- break;
- case KEY_TYPE_ASCII_KEY:
- nm_key_type = NM_ENC_TYPE_ASCII_KEY;
- break;
- case KEY_TYPE_HEX_KEY:
- nm_key_type = NM_ENC_TYPE_HEX_KEY;
- break;
- default:
- nm_key_type = NM_ENC_TYPE_UNKNOWN;
- break;
- }
-
- if (create_network)
- nmwa_dbus_create_network (applet->connection, def_dev, essid, nm_key_type, passphrase);
- else
- nmwa_dbus_set_device (applet->connection, def_dev, essid, nm_key_type, passphrase);
-
- network_device_unref (def_dev);
- }
- }
-
- gtk_widget_destroy (GTK_WIDGET (dialog));
- g_object_unref (xml);
-}
diff --git a/gnome/applet/other-network-dialog.h b/gnome/applet/other-network-dialog.h
deleted file mode 100644
index 8dc55f5344..0000000000
--- a/gnome/applet/other-network-dialog.h
+++ /dev/null
@@ -1,30 +0,0 @@
-/* NetworkManager Wireless Applet -- Display wireless access points and allow user control
- *
- * Dan Williams <dcbw@redhat.com>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- *
- * (C) Copyright 2004 Red Hat, Inc.
- */
-
-#include "applet.h"
-
-
-#ifndef OTHER_NETWORK_DIALOG_H
-#define OTHER_NETWORK_DIALOG_H
-
-void nmwa_other_network_dialog_run (NMWirelessApplet *applet, gboolean create_network);
-
-#endif
diff --git a/gnome/applet/passphrase-dialog.c b/gnome/applet/passphrase-dialog.c
deleted file mode 100644
index 2ac6cd29c8..0000000000
--- a/gnome/applet/passphrase-dialog.c
+++ /dev/null
@@ -1,460 +0,0 @@
-/* NetworkManager Wireless Applet -- Display wireless access points and allow user control
- *
- * Dan Williams <dcbw@redhat.com>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- *
- * (C) Copyright 2005 Red Hat, Inc.
- */
-
-#include <config.h>
-#include <libintl.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <gtk/gtk.h>
-#include <glade/glade.h>
-#include <glib.h>
-#include <gnome-keyring.h>
-#include <glib/gi18n.h>
-#include <dbus/dbus.h>
-#include <dbus/dbus-glib.h>
-
-#include "applet.h"
-#include "applet-dbus-info.h"
-#include "passphrase-dialog.h"
-#include "nm-utils.h"
-#include "NetworkManager.h"
-
-static GladeXML *get_dialog_xml (GtkWidget *dialog)
-{
- char *data;
-
- g_return_val_if_fail (dialog != NULL, NULL);
-
- if ((data = g_object_get_data (G_OBJECT (dialog), "glade-xml")))
- return (GladeXML *)data;
-
- return NULL;
-}
-
-
-static void update_button_cb (GtkWidget *widget, GladeXML *xml)
-{
- GtkButton * button;
- GtkComboBox * combo;
- GtkEntry * passphrase_entry;
- const char * passphrase_text;
- gboolean enable = FALSE;
-
- g_return_if_fail (xml != NULL);
-
- button = GTK_BUTTON (glade_xml_get_widget (xml, "login_button"));
- combo = GTK_COMBO_BOX (glade_xml_get_widget (xml, "key_type_combo"));
- passphrase_entry = GTK_ENTRY (glade_xml_get_widget (xml, "passphrase_entry"));
- passphrase_text = gtk_entry_get_text (passphrase_entry);
-
- switch (gtk_combo_box_get_active (combo))
- {
- case KEY_TYPE_128_BIT_PASSPHRASE:
- if (strlen (passphrase_text) > 0)
- enable = TRUE;
- break;
- case KEY_TYPE_ASCII_KEY:
- if ((strlen (passphrase_text) == 5) || (strlen (passphrase_text) == 13))
- enable = TRUE;
- break;
- case KEY_TYPE_HEX_KEY:
- if ((strlen (passphrase_text) == 10) || (strlen (passphrase_text) == 26))
- enable = TRUE;
- break;
- default:
- break;
- }
-
- gtk_widget_set_sensitive (GTK_WIDGET (button), enable);
-}
-
-/*
- * nmi_passphrase_dialog_clear
- *
- * Return dialog to its original state; clear out any network or device qdatas,
- * clear the passphrase entry, and hide the dialog.
- *
- */
-static void nmi_passphrase_dialog_clear (GtkWidget *dialog)
-{
- char * data;
- GtkWidget * entry = NULL;
- GladeXML * xml = NULL;
-
- g_return_if_fail (dialog != NULL);
-
- if ((data = g_object_get_data (G_OBJECT (dialog), "device")))
- {
- network_device_unref ((NetworkDevice *)data);
- g_object_set_data (G_OBJECT (dialog), "device", NULL);
- }
-
- if ((data = g_object_get_data (G_OBJECT (dialog), "network")))
- {
- wireless_network_unref ((WirelessNetwork *)data);
- g_object_set_data (G_OBJECT (dialog), "network", NULL);
- }
-
- if ((data = g_object_get_data (G_OBJECT (dialog), "dbus-message")))
- {
- dbus_message_unref ((DBusMessage *) data);
- g_object_set_data (G_OBJECT (dialog), "dbus-message", NULL);
- }
-
- if ((xml = (GladeXML *)g_object_get_data (G_OBJECT (dialog), "glade-xml")))
- {
- entry = glade_xml_get_widget (xml, "passphrase_entry");
- gtk_entry_set_text (GTK_ENTRY (entry), "");
- }
-
- gtk_widget_hide (dialog);
-}
-
-
-/*
- * nmi_passphrase_dialog_key_type_combo_changed
- *
- * Change the text of the passphrase entry label to match the selected
- * key type.
- *
- */
-static void nmi_passphrase_dialog_key_type_combo_changed (GtkWidget *key_type_combo, gpointer user_data)
-{
- GtkWidget * dialog = gtk_widget_get_toplevel (key_type_combo);
-
- if (GTK_WIDGET_TOPLEVEL (dialog))
- {
- GtkLabel * entry_label;
- int combo_choice;
- GladeXML * dialog_xml;
-
- g_return_if_fail ((dialog_xml = get_dialog_xml (dialog)) != NULL);
-
- entry_label = GTK_LABEL (glade_xml_get_widget (dialog_xml, "passphrase_entry_label"));
- switch ((combo_choice = gtk_combo_box_get_active (GTK_COMBO_BOX (key_type_combo))))
- {
- case KEY_TYPE_128_BIT_PASSPHRASE:
- gtk_label_set_label (entry_label, _("Passphrase:"));
- break;
- case KEY_TYPE_ASCII_KEY:
- gtk_label_set_label (entry_label, _("ASCII Key:"));
- break;
- case KEY_TYPE_HEX_KEY:
- gtk_label_set_label (entry_label, _("Hex Key:"));
- break;
- default:
- break;
- }
- }
-}
-
-
-/*
- * nmi_passphrase_dialog_ok_clicked
- *
- * OK button handler; grab the passphrase and send it back
- * to NetworkManager. Get rid of the dialog.
- *
- */
-static void nmi_passphrase_dialog_ok_clicked (GtkWidget *ok_button, gpointer user_data)
-{
- GtkWidget * dialog = gtk_widget_get_toplevel (ok_button);
- NMWirelessApplet * applet = (NMWirelessApplet *)user_data;
-
- g_return_if_fail (applet != NULL);
-
- if (GTK_WIDGET_TOPLEVEL (dialog))
- {
- GladeXML * dialog_xml;
- GtkEntry * entry;
- GtkComboBox * key_type_combo;
- const char * passphrase;
- NetworkDevice * dev = g_object_get_data (G_OBJECT (dialog), "device");
- WirelessNetwork * net = g_object_get_data (G_OBJECT (dialog), "network");
- DBusMessage * message = g_object_get_data (G_OBJECT (dialog), "dbus-message");
- NMEncKeyType key_type_return = NM_ENC_TYPE_UNKNOWN;
-
- g_return_if_fail ((dialog_xml = get_dialog_xml (dialog)) != NULL);
-
- entry = GTK_ENTRY (glade_xml_get_widget (dialog_xml, "passphrase_entry"));
- key_type_combo = GTK_COMBO_BOX (glade_xml_get_widget (dialog_xml, "key_type_combo"));
- passphrase = gtk_entry_get_text (entry);
-
- switch (gtk_combo_box_get_active (key_type_combo))
- {
- case KEY_TYPE_128_BIT_PASSPHRASE:
- key_type_return = NM_ENC_TYPE_128_BIT_PASSPHRASE;
- break;
- case KEY_TYPE_ASCII_KEY:
- key_type_return = NM_ENC_TYPE_ASCII_KEY;
- break;
- case KEY_TYPE_HEX_KEY:
- key_type_return = NM_ENC_TYPE_HEX_KEY;
- break;
- default:
- key_type_return = NM_ENC_TYPE_UNKNOWN;
- break;
- }
-
- /* Tell NetworkManager about the key the user typed in */
- nmi_dbus_return_user_key (applet->connection, message, passphrase, key_type_return);
- nmi_passphrase_dialog_clear (dialog);
- }
-}
-
-
-/*
- * nmi_passphrase_dialog_cancel_clicked
- *
- * Cancel button handler; return a cancellation message to NetworkManager
- * and get rid of the dialog.
- *
- */
-static void nmi_passphrase_dialog_cancel_clicked (GtkWidget *cancel_button, gpointer user_data)
-{
- GtkWidget * dialog = gtk_widget_get_toplevel (cancel_button);
- NMWirelessApplet * applet = (NMWirelessApplet *)user_data;
-
- g_return_if_fail (applet != NULL);
-
- if (GTK_WIDGET_TOPLEVEL (dialog))
- {
- NetworkDevice * dev = g_object_get_data (G_OBJECT (dialog), "device");
- WirelessNetwork * net = g_object_get_data (G_OBJECT (dialog), "network");
- DBusMessage * message = g_object_get_data (G_OBJECT (dialog), "dbus-message");
-
- nmi_dbus_return_user_key (applet->connection, message, "***canceled***", NM_ENC_TYPE_UNKNOWN);
- nmi_passphrase_dialog_clear (dialog);
- }
-}
-
-
-typedef struct PPDialogCBData
-{
- NMWirelessApplet * applet;
- NetworkDevice * dev;
- WirelessNetwork * net;
- DBusMessage * message;
-} PPDialogCBData;
-
-/*
- * nmi_passphrase_dialog_show
- *
- * Pop up the user key dialog in response to a dbus message
- *
- */
-static gboolean nmi_passphrase_dialog_show (PPDialogCBData *cb_data)
-{
- GtkWidget * dialog;
- GladeXML * dialog_xml;
- const char * orig_label_text;
- guint32 timestamp;
-
- g_return_val_if_fail (cb_data != NULL, FALSE);
- g_return_val_if_fail (cb_data->applet != NULL, FALSE);
- g_return_val_if_fail (cb_data->dev != NULL, FALSE);
- g_return_val_if_fail (cb_data->net != NULL, FALSE);
-
- dialog = cb_data->applet->passphrase_dialog;
- g_return_val_if_fail ((dialog_xml = get_dialog_xml (dialog)) != NULL, FALSE);
-
- if (GTK_WIDGET_VISIBLE (dialog))
- return FALSE;
-
- if (!(orig_label_text = g_object_get_data (G_OBJECT (dialog), "orig-label-text")))
- return FALSE;
-
- nmi_passphrase_dialog_clear (dialog);
-
- /* Insert the Network name into the dialog text */
- if (orig_label_text)
- {
- GtkWidget * label = glade_xml_get_widget (dialog_xml, "label1");
- char * new_label_text = g_strdup_printf (orig_label_text, wireless_network_get_essid (cb_data->net));
-
- gtk_label_set_label (GTK_LABEL (label), new_label_text);
- }
-
- g_object_set_data (G_OBJECT (dialog), "device", cb_data->dev);
- g_object_set_data (G_OBJECT (dialog), "network", cb_data->net);
- g_object_set_data (G_OBJECT (dialog), "dbus-message", cb_data->message);
-
- gtk_widget_show (dialog);
-
- /* Bash focus-stealing prevention in the face */
- timestamp = gdk_x11_get_server_time (dialog->window);
- gdk_x11_window_set_user_time (dialog->window, timestamp);
-
- return FALSE;
-}
-
-
-/*
- * nmi_passphrase_dialog_schedule_show
- *
- * Schedule the passphrase dialog to show
- *
- */
-gboolean nmi_passphrase_dialog_schedule_show (NetworkDevice *dev, WirelessNetwork *net, DBusMessage *message, NMWirelessApplet *applet)
-{
- PPDialogCBData * cb_data;
-
- g_return_val_if_fail (dev != NULL, FALSE);
- g_return_val_if_fail (net != NULL, FALSE);
- g_return_val_if_fail (message != NULL, FALSE);
- g_return_val_if_fail (applet != NULL, FALSE);
-
- cb_data = g_malloc0 (sizeof (PPDialogCBData));
- network_device_ref (dev);
- cb_data->dev = dev;
- wireless_network_ref (net);
- cb_data->net = net;
- cb_data->applet = applet;
- dbus_message_ref (message);
- cb_data->message = message;
-
- g_idle_add ((GSourceFunc) nmi_passphrase_dialog_show, cb_data);
-
- return TRUE;
-}
-
-
-/*
- * nmi_passphrase_dialog_cancel
- *
- * Cancel and hide any user key dialog that might be up
- *
- */
-static gboolean nmi_passphrase_dialog_cancel (NMWirelessApplet *applet)
-{
- GtkWidget *dialog;
-
- g_return_val_if_fail (applet != NULL, FALSE);
- dialog = applet->passphrase_dialog;
-
- if (GTK_WIDGET_VISIBLE (dialog))
- nmi_passphrase_dialog_clear (dialog);
-
- return FALSE;
-}
-
-
-/*
- * nmi_passphrase_dialog_schedule_cancel
- *
- * Schedule the passphrase dialog cancellation
- *
- */
-void nmi_passphrase_dialog_schedule_cancel (NMWirelessApplet *applet)
-{
- g_return_if_fail (applet != NULL);
-
- g_idle_add ((GSourceFunc) nmi_passphrase_dialog_cancel, applet);
-}
-
-
-/*
- * nmi_passphrase_dialog_init
- *
- * Initialize the passphrase dialog
- *
- * Returns: TRUE on success
- * FALSE on failure
- */
-GtkWidget *nmi_passphrase_dialog_init (NMWirelessApplet *applet)
-{
- GtkWidget * dialog;
- GtkButton * ok_button;
- GtkButton * cancel_button;
- GtkEntry * entry;
- GtkComboBox * key_type_combo;
- GtkLabel * label;
- GladeXML * dialog_xml;
- char * orig_label_text;
-
- if (!(dialog_xml = glade_xml_new (applet->glade_file, "passphrase_dialog", NULL)))
- {
- nmwa_schedule_warning_dialog (applet, _("The NetworkManager Applet could not find some required resources (the glade file was not found)."));
- return NULL;
- }
-
- dialog = glade_xml_get_widget (dialog_xml, "passphrase_dialog");
- gtk_widget_hide (dialog);
-
- g_object_set_data (G_OBJECT (dialog), "glade-xml", dialog_xml);
-
- /* Save original label text to preserve the '%s' and other formatting that gets overwritten
- * when the dialog is first shown.
- */
- label = GTK_LABEL (glade_xml_get_widget (dialog_xml, "label1"));
- orig_label_text = g_strdup (gtk_label_get_label (label));
-
- g_object_set_data (G_OBJECT (dialog), "orig-label-text", orig_label_text);
-
- ok_button = GTK_BUTTON (glade_xml_get_widget (dialog_xml, "login_button"));
- g_signal_connect (G_OBJECT (ok_button), "clicked", GTK_SIGNAL_FUNC (nmi_passphrase_dialog_ok_clicked), applet);
- gtk_widget_grab_default (GTK_WIDGET (ok_button));
- cancel_button = GTK_BUTTON (glade_xml_get_widget (dialog_xml, "cancel_button"));
- g_signal_connect (G_OBJECT (cancel_button), "clicked", GTK_SIGNAL_FUNC (nmi_passphrase_dialog_cancel_clicked), applet);
-
- entry = GTK_ENTRY (glade_xml_get_widget (dialog_xml, "passphrase_entry"));
- nmi_passphrase_dialog_clear (dialog);
- gtk_widget_set_sensitive (GTK_WIDGET (ok_button), FALSE);
- g_signal_connect (entry, "changed", G_CALLBACK (update_button_cb), dialog_xml);
-
- key_type_combo = GTK_COMBO_BOX (glade_xml_get_widget (dialog_xml, "key_type_combo"));
- gtk_combo_box_set_active (key_type_combo, 0);
- g_signal_connect (G_OBJECT (key_type_combo), "changed", GTK_SIGNAL_FUNC (nmi_passphrase_dialog_key_type_combo_changed), applet);
- nmi_passphrase_dialog_key_type_combo_changed (GTK_WIDGET (key_type_combo), applet);
-
- return dialog;
-}
-
-
-/*
- * nmi_passphrase_dialog_destroy
- *
- * Dispose of the passphrase dialog and its data
- *
- */
-void nmi_passphrase_dialog_destroy (GtkWidget *dialog)
-{
- char *data;
-
- g_return_if_fail (dialog != NULL);
-
- nmi_passphrase_dialog_clear (dialog);
-
- if ((data = g_object_get_data (G_OBJECT (dialog), "glade-xml")))
- {
- g_object_unref (G_OBJECT (data));
- g_object_set_data (G_OBJECT (dialog), "glade-xml", NULL);
- }
-
- if ((data = g_object_get_data (G_OBJECT (dialog), "orig-label-text")))
- {
- g_free (data);
- g_object_set_data (G_OBJECT (dialog), "orig-label-text", NULL);
- }
-
- gtk_widget_destroy (dialog);
-}
diff --git a/gnome/applet/passphrase-dialog.h b/gnome/applet/passphrase-dialog.h
deleted file mode 100644
index 048c6ef266..0000000000
--- a/gnome/applet/passphrase-dialog.h
+++ /dev/null
@@ -1,37 +0,0 @@
-/* NetworkManager Wireless Applet -- Display wireless access points and allow user control
- *
- * Dan Williams <dcbw@redhat.com>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- *
- * (C) Copyright 2005 Red Hat, Inc.
- */
-
-#ifndef PASSPHRASE_DIALOG_H
-#define PASSPHRASE_DIALOG_H
-
-#include "applet.h"
-#include "nm-device.h"
-#include "wireless-network.h"
-
-GtkWidget * nmi_passphrase_dialog_init (NMWirelessApplet *applet);
-
-void nmi_passphrase_dialog_destroy (GtkWidget *dialog);
-
-gboolean nmi_passphrase_dialog_schedule_show (NetworkDevice *dev, WirelessNetwork *net, DBusMessage *message, NMWirelessApplet *applet);
-
-void nmi_passphrase_dialog_schedule_cancel (NMWirelessApplet *applet);
-
-#endif
diff --git a/gnome/applet/vpn-connection.c b/gnome/applet/vpn-connection.c
deleted file mode 100644
index 625cdfe841..0000000000
--- a/gnome/applet/vpn-connection.c
+++ /dev/null
@@ -1,137 +0,0 @@
-/* NetworkManager Wireless Applet -- Display wireless access points and allow user control
- *
- * Dan Williams <dcbw@redhat.com>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- *
- * (C) Copyright 2004 Red Hat, Inc.
- */
-
-#include <string.h>
-#include "vpn-connection.h"
-
-
-struct VPNConnection
-{
- int refcount;
- char *name;
- char *service;
-};
-
-
-VPNConnection *nmwa_vpn_connection_new (const char *name)
-{
- VPNConnection *vpn;
-
- g_return_val_if_fail (name != NULL, NULL);
-
- vpn = g_malloc0 (sizeof (VPNConnection));
- vpn->refcount = 1;
- vpn->name = g_strdup (name);
-
- return vpn;
-}
-
-
-VPNConnection *nmwa_vpn_connection_copy (VPNConnection *src_vpn)
-{
- VPNConnection *dst_vpn;
-
- g_return_val_if_fail (src_vpn != NULL, NULL);
-
- dst_vpn = g_malloc0 (sizeof (VPNConnection));
- dst_vpn->refcount = 1;
- dst_vpn->name = g_strdup (src_vpn->name);
- dst_vpn->service = src_vpn->service ? g_strdup (src_vpn->service) : NULL;
-
- return dst_vpn;
-}
-
-
-void nmwa_vpn_connection_ref (VPNConnection *vpn)
-{
- g_return_if_fail (vpn != NULL);
-
- vpn->refcount++;
-}
-
-
-void nmwa_vpn_connection_unref (VPNConnection *vpn)
-{
- g_return_if_fail (vpn != NULL);
-
- vpn->refcount--;
- if (vpn->refcount <= 0)
- {
- g_free (vpn->name);
- g_free (vpn->service);
- memset (vpn, 0, sizeof (VPNConnection));
- g_free (vpn);
- }
-}
-
-
-const char *nmwa_vpn_connection_get_name (VPNConnection *vpn)
-{
- g_return_val_if_fail (vpn != NULL, NULL);
-
- return vpn->name;
-}
-
-const char *nmwa_vpn_connection_get_service (VPNConnection *vpn)
-{
- g_return_val_if_fail (vpn != NULL, NULL);
-
- return vpn->service;
-}
-
-
-void nmwa_vpn_connection_set_service (VPNConnection *vpn, const char *service)
-{
- g_return_if_fail (vpn != NULL);
- g_return_if_fail (service != NULL);
-
- g_free (vpn->service);
- vpn->service = g_strdup (service);
-}
-
-
-
-static int is_same_name (VPNConnection *vpn, const char *name)
-{
- if (!vpn || !name || !nmwa_vpn_connection_get_name (vpn))
- return -1;
-
- return strcmp (nmwa_vpn_connection_get_name (vpn), name);
-}
-
-
-VPNConnection *nmwa_vpn_connection_find_by_name (GSList *list, const char *name)
-{
- GSList *elt;
- VPNConnection *vpn = NULL;
-
- g_return_val_if_fail (name != NULL, NULL);
-
- if (!list)
- return NULL;
-
- if ((elt = g_slist_find_custom (list, name, (GCompareFunc) is_same_name)))
- vpn = elt->data;
-
- return vpn;
-}
-
-
diff --git a/gnome/applet/vpn-connection.h b/gnome/applet/vpn-connection.h
deleted file mode 100644
index 347223f9ca..0000000000
--- a/gnome/applet/vpn-connection.h
+++ /dev/null
@@ -1,39 +0,0 @@
-/* NetworkManager Wireless Applet -- Display wireless access points and allow user control
- *
- * Dan Williams <dcbw@redhat.com>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- *
- * (C) Copyright 2004 Red Hat, Inc.
- */
-
-#ifndef VPN_CONNECTION_H
-#define VPN_CONNECTION_H
-
-#include "applet.h"
-
-VPNConnection * nmwa_vpn_connection_new (const char *name);
-VPNConnection * nmwa_vpn_connection_copy (VPNConnection *vpn);
-void nmwa_vpn_connection_ref (VPNConnection *vpn);
-void nmwa_vpn_connection_unref (VPNConnection *vpn);
-
-const char * nmwa_vpn_connection_get_name (VPNConnection *vpn);
-
-const char * nmwa_vpn_connection_get_service (VPNConnection *vpn);
-void nmwa_vpn_connection_set_service (VPNConnection *vpn, const char *service);
-
-VPNConnection * nmwa_vpn_connection_find_by_name (GSList *list, const char *name);
-
-#endif
diff --git a/gnome/applet/vpn-password-dialog.c b/gnome/applet/vpn-password-dialog.c
deleted file mode 100644
index fb56d15928..0000000000
--- a/gnome/applet/vpn-password-dialog.c
+++ /dev/null
@@ -1,235 +0,0 @@
-/* NetworkManager Wireless Applet -- Display wireless access points and allow user control
- *
- * Dan Williams <dcbw@redhat.com>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- *
- * (C) Copyright 2004 Red Hat, Inc.
- */
-
-#include <config.h>
-#include <libintl.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <gtk/gtk.h>
-#include <glade/glade.h>
-#include <glib.h>
-#include <dbus/dbus.h>
-#include <dbus/dbus-glib.h>
-#include <glib/gi18n-lib.h>
-#include <unistd.h>
-
-#include "applet.h"
-#include "vpn-password-dialog.h"
-#include "nm-utils.h"
-
-
-typedef struct {
- GSList **passwords;
- int child_stdin;
- int num_newlines;
-} IOUserData;
-
-static void
-child_finished_cb (GPid pid, gint status, gpointer userdata)
-{
- int *child_status = (gboolean *) userdata;
-
- *child_status = status;
-}
-
-static gboolean
-child_stdout_data_cb (GIOChannel *source, GIOCondition condition, gpointer userdata)
-{
- char *str;
- IOUserData *io_user_data = (IOUserData *) userdata;
- GSList **passwords = (GSList **) io_user_data->passwords;
-
- if (! (condition & G_IO_IN))
- goto out;
-
- if (g_io_channel_read_line (source, &str, NULL, NULL, NULL) == G_IO_STATUS_NORMAL) {
- int len;
-
- len = strlen (str);
- if (len == 1 && str[0] == '\n') {
-
- /* on second line with a newline newline */
- if (++io_user_data->num_newlines == 2) {
- char buf[1];
- /* terminate the child */
- write (io_user_data->child_stdin, buf, sizeof (buf));
- }
- } else if (len > 0) {
- /* remove terminating newline */
- str[len - 1] = '\0';
-
- *passwords = g_slist_append (*passwords, str);
- }
- }
-
-out:
- return TRUE;
-}
-
-GSList *
-nmwa_vpn_request_password (NMWirelessApplet *applet, const char *name, const char *service, gboolean retry)
-{
- const char *argv[] = {NULL /*"/usr/libexec/nm-vpnc-auth-dialog"*/,
- "-n", NULL /*"davidznet42"*/,
- "-s", NULL /*"org.freedesktop.vpnc"*/,
- "-r",
- NULL};
- GSList *passwords = NULL;
- int child_stdin;
- int child_stdout;
- GPid child_pid;
- int child_status;
- GIOChannel *child_stdout_channel;
- guint child_stdout_channel_eventid;
- GDir *dir;
- char *auth_dialog_binary;
- IOUserData io_user_data;
-
- auth_dialog_binary = NULL;
-
- /* find the auth-dialog binary */
- if ((dir = g_dir_open (VPN_NAME_FILES_DIR, 0, NULL)) != NULL) {
- const char *f;
-
- while (auth_dialog_binary == NULL && (f = g_dir_read_name (dir)) != NULL) {
- char *path;
- GKeyFile *keyfile;
-
- if (!g_str_has_suffix (f, ".name"))
- continue;
-
- path = g_strdup_printf ("%s/%s", VPN_NAME_FILES_DIR, f);
-
- keyfile = g_key_file_new ();
- if (g_key_file_load_from_file (keyfile, path, 0, NULL)) {
- char *thisservice;
-
- if ((thisservice = g_key_file_get_string (keyfile,
- "VPN Connection",
- "service", NULL)) != NULL &&
- strcmp (thisservice, service) == 0) {
-
- auth_dialog_binary = g_key_file_get_string (keyfile,
- "GNOME",
- "auth-dialog", NULL);
- }
-
- g_free (thisservice);
- }
- g_key_file_free (keyfile);
- g_free (path);
- }
- g_dir_close (dir);
- }
-
- if (auth_dialog_binary == NULL) {
- /* could find auth-dialog */
- GtkWidget *dialog;
-
- dialog = gtk_message_dialog_new (NULL,
- GTK_DIALOG_DESTROY_WITH_PARENT,
- GTK_MESSAGE_ERROR,
- GTK_BUTTONS_CLOSE,
- _("Cannot start VPN connection '%s'"),
- name);
- gtk_message_dialog_format_secondary_text (GTK_MESSAGE_DIALOG (dialog),
- _("Could not find the authentication dialog for VPN connection type '%s'. Contact your system administrator."),
- service);
- gtk_dialog_run (GTK_DIALOG (dialog));
- gtk_widget_destroy (dialog);
- goto out;
- }
-
- /* Fix up parameters with what we got */
- argv[0] = auth_dialog_binary;
- argv[2] = name;
- argv[4] = service;
- if (!retry)
- argv[5] = NULL;
-
- nm_debug ("retry = %d", retry);
-
- child_status = -1;
-
- if (!g_spawn_async_with_pipes (NULL, /* working_directory */
- (gchar **) argv, /* argv */
- NULL, /* envp */
- G_SPAWN_DO_NOT_REAP_CHILD, /* flags */
- NULL, /* child_setup */
- NULL, /* user_data */
- &child_pid, /* child_pid */
- &child_stdin, /* standard_input */
- &child_stdout, /* standard_output */
- NULL, /* standard_error */
- NULL)) { /* error */
- /* could not spawn */
- GtkWidget *dialog;
-
- dialog = gtk_message_dialog_new (NULL,
- GTK_DIALOG_DESTROY_WITH_PARENT,
- GTK_MESSAGE_ERROR,
- GTK_BUTTONS_CLOSE,
- _("Cannot start VPN connection '%s'"),
- name);
- gtk_message_dialog_format_secondary_text (GTK_MESSAGE_DIALOG (dialog),
- _("There was a problem launching the authentication dialog for VPN connection type '%s'. Contact your system administrator."),
- service);
- gtk_dialog_run (GTK_DIALOG (dialog));
- gtk_widget_destroy (dialog);
- goto out;
- }
-
- /* catch when child is reaped */
- g_child_watch_add (child_pid, child_finished_cb, (gpointer) &child_status);
-
- io_user_data.passwords = &passwords;
- io_user_data.child_stdin = child_stdin;
- io_user_data.num_newlines = 0;
-
- /* listen to what child has to say */
- child_stdout_channel = g_io_channel_unix_new (child_stdout);
- child_stdout_channel_eventid = g_io_add_watch (child_stdout_channel, G_IO_IN, child_stdout_data_cb,
- &io_user_data);
- g_io_channel_set_encoding (child_stdout_channel, NULL, NULL);
-
- /* recurse mainloop here until the child is finished (child_status is set in child_finished_cb) */
- while (child_status == -1) {
- g_main_context_iteration (NULL, TRUE);
- }
-
- g_spawn_close_pid (child_pid);
- g_source_remove (child_stdout_channel_eventid);
- g_io_channel_unref (child_stdout_channel);
-
- if (child_status != 0) {
- if (passwords != NULL) {
- g_slist_foreach (passwords, (GFunc)g_free, NULL);
- g_slist_free (passwords);
- passwords = NULL;
- }
- }
-
-out:
- g_free (auth_dialog_binary);
-
- return passwords;
-}
diff --git a/gnome/applet/vpn-password-dialog.h b/gnome/applet/vpn-password-dialog.h
deleted file mode 100644
index 54cf9e98c8..0000000000
--- a/gnome/applet/vpn-password-dialog.h
+++ /dev/null
@@ -1,32 +0,0 @@
-/* NetworkManager Wireless Applet -- Display wireless access points and allow user control
- *
- * Dan Williams <dcbw@redhat.com>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- *
- * (C) Copyright 2004 Red Hat, Inc.
- */
-
-#ifndef VPN_PASSWORD_DIALOG_H
-#define VPN_PASSWORD_DIALOG_H
-
-#include "applet.h"
-
-GSList *nmwa_vpn_request_password (NMWirelessApplet *applet,
- const char *name,
- const char *service,
- gboolean retry);
-
-#endif
diff --git a/gnome/applet/wireless-applet.glade b/gnome/applet/wireless-applet.glade
deleted file mode 100644
index 94901e25eb..0000000000
--- a/gnome/applet/wireless-applet.glade
+++ /dev/null
@@ -1,1562 +0,0 @@
-<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
-<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd">
-
-<glade-interface>
-
-<widget class="GtkDialog" id="trust_dialog">
- <property name="border_width">6</property>
- <property name="title" translatable="yes"> </property>
- <property name="type">GTK_WINDOW_TOPLEVEL</property>
- <property name="window_position">GTK_WIN_POS_CENTER_ALWAYS</property>
- <property name="modal">True</property>
- <property name="resizable">True</property>
- <property name="destroy_with_parent">False</property>
- <property name="decorated">True</property>
- <property name="skip_taskbar_hint">False</property>
- <property name="skip_pager_hint">False</property>
- <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
- <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
- <property name="focus_on_map">True</property>
- <property name="has_separator">False</property>
-
- <child internal-child="vbox">
- <widget class="GtkVBox" id="dialog-vbox1">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">12</property>
-
- <child internal-child="action_area">
- <widget class="GtkHButtonBox" id="dialog-action_area1">
- <property name="visible">True</property>
- <property name="layout_style">GTK_BUTTONBOX_END</property>
-
- <child>
- <widget class="GtkButton" id="cancel_button">
- <property name="visible">True</property>
- <property name="can_default">True</property>
- <property name="can_focus">True</property>
- <property name="label">gtk-cancel</property>
- <property name="use_stock">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="focus_on_click">True</property>
- <property name="response_id">-6</property>
- </widget>
- </child>
-
- <child>
- <widget class="GtkButton" id="login_button">
- <property name="visible">True</property>
- <property name="can_default">True</property>
- <property name="has_default">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">_Login to Network</property>
- <property name="use_underline">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="focus_on_click">True</property>
- <property name="response_id">-5</property>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="pack_type">GTK_PACK_END</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkHBox" id="hbox1">
- <property name="border_width">6</property>
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">12</property>
-
- <child>
- <widget class="GtkImage" id="image1">
- <property name="visible">True</property>
- <property name="stock">gtk-dialog-warning</property>
- <property name="icon_size">6</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">True</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkVBox" id="vbox1">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">12</property>
-
- <child>
- <widget class="GtkLabel" id="label1">
- <property name="visible">True</property>
- <property name="label" translatable="yes">&lt;span weight=&quot;bold&quot; size=&quot;larger&quot;&gt;Wireless Network Login Confirmation&lt;/span&gt;
-
-You have chosen to log in to the wireless network '%s'. If you are sure that this wireless network is secure, click the checkbox below and NetworkManager will not require confirmation on subsequent log ins.</property>
- <property name="use_underline">False</property>
- <property name="use_markup">True</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">True</property>
- <property name="selectable">False</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
- <property name="width_chars">-1</property>
- <property name="single_line_mode">False</property>
- <property name="angle">0</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkCheckButton" id="trust_checkbutton">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">Always Trust this Wireless Network</property>
- <property name="use_underline">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="focus_on_click">True</property>
- <property name="active">False</property>
- <property name="inconsistent">False</property>
- <property name="draw_indicator">True</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
- </widget>
- </child>
-</widget>
-
-<widget class="GtkDialog" id="driver_sucks_dialog">
- <property name="border_width">6</property>
- <property name="title" translatable="yes"> </property>
- <property name="type">GTK_WINDOW_TOPLEVEL</property>
- <property name="window_position">GTK_WIN_POS_CENTER_ALWAYS</property>
- <property name="modal">True</property>
- <property name="resizable">True</property>
- <property name="destroy_with_parent">False</property>
- <property name="decorated">True</property>
- <property name="skip_taskbar_hint">False</property>
- <property name="skip_pager_hint">False</property>
- <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
- <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
- <property name="focus_on_map">True</property>
- <property name="has_separator">False</property>
-
- <child internal-child="vbox">
- <widget class="GtkVBox" id="vbox2">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">12</property>
-
- <child internal-child="action_area">
- <widget class="GtkHButtonBox" id="hbuttonbox1">
- <property name="visible">True</property>
- <property name="layout_style">GTK_BUTTONBOX_END</property>
-
- <child>
- <widget class="GtkButton" id="ok_button">
- <property name="visible">True</property>
- <property name="can_default">True</property>
- <property name="has_default">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">_OK</property>
- <property name="use_underline">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="focus_on_click">True</property>
- <property name="response_id">-5</property>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="pack_type">GTK_PACK_END</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkHBox" id="hbox2">
- <property name="border_width">6</property>
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">12</property>
-
- <child>
- <widget class="GtkImage" id="image2">
- <property name="visible">True</property>
- <property name="stock">gtk-dialog-warning</property>
- <property name="icon_size">6</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">True</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkVBox" id="vbox3">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">12</property>
-
- <child>
- <widget class="GtkLabel" id="driver_sucks_label">
- <property name="visible">True</property>
- <property name="label" translatable="yes">&lt;span weight=&quot;bold&quot; size=&quot;larger&quot;&gt;Reduced Network Functionality&lt;/span&gt;
-
-%s It will not be completely functional.</property>
- <property name="use_underline">False</property>
- <property name="use_markup">True</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">True</property>
- <property name="selectable">False</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
- <property name="width_chars">-1</property>
- <property name="single_line_mode">False</property>
- <property name="angle">0</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkCheckButton" id="dont_remind_checkbox">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">Don't remind me again</property>
- <property name="use_underline">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="focus_on_click">True</property>
- <property name="active">False</property>
- <property name="inconsistent">False</property>
- <property name="draw_indicator">True</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
- </widget>
- </child>
-</widget>
-
-<widget class="GtkDialog" id="custom_essid_dialog">
- <property name="border_width">6</property>
- <property name="visible">True</property>
- <property name="title" translatable="yes">Other Wireless Network...</property>
- <property name="type">GTK_WINDOW_TOPLEVEL</property>
- <property name="window_position">GTK_WIN_POS_NONE</property>
- <property name="modal">False</property>
- <property name="default_width">488</property>
- <property name="resizable">False</property>
- <property name="destroy_with_parent">False</property>
- <property name="decorated">True</property>
- <property name="skip_taskbar_hint">False</property>
- <property name="skip_pager_hint">False</property>
- <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
- <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
- <property name="focus_on_map">True</property>
- <property name="has_separator">False</property>
-
- <child internal-child="vbox">
- <widget class="GtkVBox" id="dialog-vbox1">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">4</property>
-
- <child internal-child="action_area">
- <widget class="GtkHButtonBox" id="dialog-action_area1">
- <property name="visible">True</property>
- <property name="layout_style">GTK_BUTTONBOX_END</property>
-
- <child>
- <widget class="GtkButton" id="cancel_button">
- <property name="visible">True</property>
- <property name="can_default">True</property>
- <property name="can_focus">True</property>
- <property name="label">gtk-cancel</property>
- <property name="use_stock">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="focus_on_click">True</property>
- <property name="response_id">-6</property>
- </widget>
- </child>
-
- <child>
- <widget class="GtkButton" id="ok_button">
- <property name="visible">True</property>
- <property name="can_default">True</property>
- <property name="has_default">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">C_onnect</property>
- <property name="use_underline">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="focus_on_click">True</property>
- <property name="response_id">-5</property>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="pack_type">GTK_PACK_END</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkHBox" id="hbox1">
- <property name="border_width">6</property>
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">12</property>
-
- <child>
- <widget class="GtkImage" id="image1">
- <property name="visible">True</property>
- <property name="stock">gtk-dialog-question</property>
- <property name="icon_size">6</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">True</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkVBox" id="vbox1">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">12</property>
-
- <child>
- <widget class="GtkLabel" id="essid_label">
- <property name="visible">True</property>
- <property name="label" translatable="yes"></property>
- <property name="use_underline">False</property>
- <property name="use_markup">True</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">True</property>
- <property name="selectable">False</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
- <property name="width_chars">-1</property>
- <property name="single_line_mode">False</property>
- <property name="angle">0</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkTable" id="table1">
- <property name="visible">True</property>
- <property name="n_rows">3</property>
- <property name="n_columns">2</property>
- <property name="homogeneous">False</property>
- <property name="row_spacing">12</property>
- <property name="column_spacing">6</property>
-
- <child>
- <widget class="GtkLabel" id="wireless_adapter_label">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Wireless _adapter:</property>
- <property name="use_underline">True</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="mnemonic_widget">wireless_adapter_combo</property>
- <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
- <property name="width_chars">-1</property>
- <property name="single_line_mode">False</property>
- <property name="angle">0</property>
- </widget>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
- <property name="top_attach">0</property>
- <property name="bottom_attach">1</property>
- <property name="x_options">fill</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkComboBox" id="wireless_adapter_combo">
- <property name="visible">True</property>
- <property name="items" translatable="yes"></property>
- <property name="add_tearoffs">False</property>
- <property name="focus_on_click">True</property>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">0</property>
- <property name="bottom_attach">1</property>
- <property name="x_options">fill</property>
- <property name="y_options">fill</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label2">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Wireless _network:</property>
- <property name="use_underline">True</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="mnemonic_widget">essid_entry</property>
- <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
- <property name="width_chars">-1</property>
- <property name="single_line_mode">False</property>
- <property name="angle">0</property>
- </widget>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="x_options">fill</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkEntry" id="essid_entry">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="editable">True</property>
- <property name="visibility">True</property>
- <property name="max_length">0</property>
- <property name="text" translatable="yes"></property>
- <property name="has_frame">True</property>
- <property name="invisible_char">*</property>
- <property name="activates_default">True</property>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkFrame" id="frame1">
- <property name="visible">True</property>
- <property name="label_xalign">0</property>
- <property name="label_yalign">0.5</property>
- <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
-
- <child>
- <widget class="GtkAlignment" id="alignment1">
- <property name="visible">True</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xscale">1</property>
- <property name="yscale">1</property>
- <property name="top_padding">3</property>
- <property name="bottom_padding">6</property>
- <property name="left_padding">6</property>
- <property name="right_padding">6</property>
-
- <child>
- <widget class="GtkTable" id="table2">
- <property name="visible">True</property>
- <property name="n_rows">2</property>
- <property name="n_columns">3</property>
- <property name="homogeneous">False</property>
- <property name="row_spacing">12</property>
- <property name="column_spacing">6</property>
-
- <child>
- <widget class="GtkLabel" id="key_type_combo_label">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Key type:</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
- <property name="width_chars">-1</property>
- <property name="single_line_mode">False</property>
- <property name="angle">0</property>
- </widget>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
- <property name="top_attach">0</property>
- <property name="bottom_attach">1</property>
- <property name="x_options">fill</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="passphrase_entry_label">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Passphrase:</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
- <property name="width_chars">-1</property>
- <property name="single_line_mode">False</property>
- <property name="angle">0</property>
- </widget>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="x_options">fill</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkEntry" id="passphrase_entry">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="editable">True</property>
- <property name="visibility">True</property>
- <property name="max_length">0</property>
- <property name="text" translatable="yes"></property>
- <property name="has_frame">True</property>
- <property name="invisible_char">*</property>
- <property name="activates_default">False</property>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">3</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkComboBox" id="key_type_combo">
- <property name="visible">True</property>
- <property name="items" translatable="yes">128-bit passphrase (WEP)
-ASCII key (WEP)
-Hex key (WEP)</property>
- <property name="add_tearoffs">False</property>
- <property name="focus_on_click">True</property>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">0</property>
- <property name="bottom_attach">1</property>
- <property name="x_options">fill</property>
- <property name="y_options">fill</property>
- </packing>
- </child>
- </widget>
- </child>
- </widget>
- </child>
-
- <child>
- <widget class="GtkCheckButton" id="use_encryption_checkbox">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">Connect with _encryption enabled</property>
- <property name="use_underline">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="focus_on_click">True</property>
- <property name="active">False</property>
- <property name="inconsistent">False</property>
- <property name="draw_indicator">True</property>
- </widget>
- <packing>
- <property name="type">label_item</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">2</property>
- <property name="top_attach">2</property>
- <property name="bottom_attach">3</property>
- <property name="x_options">fill</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
- </widget>
- </child>
-</widget>
-
-<widget class="GtkDialog" id="passphrase_dialog">
- <property name="border_width">6</property>
- <property name="has_focus">True</property>
- <property name="title" translatable="yes">Wireless Network Key Required</property>
- <property name="type">GTK_WINDOW_TOPLEVEL</property>
- <property name="window_position">GTK_WIN_POS_CENTER_ALWAYS</property>
- <property name="modal">False</property>
- <property name="resizable">False</property>
- <property name="destroy_with_parent">False</property>
- <property name="decorated">True</property>
- <property name="skip_taskbar_hint">False</property>
- <property name="skip_pager_hint">False</property>
- <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
- <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
- <property name="focus_on_map">True</property>
- <property name="has_separator">False</property>
-
- <child internal-child="vbox">
- <widget class="GtkVBox" id="dialog-vbox1">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">12</property>
-
- <child internal-child="action_area">
- <widget class="GtkHButtonBox" id="dialog-action_area1">
- <property name="visible">True</property>
- <property name="layout_style">GTK_BUTTONBOX_END</property>
-
- <child>
- <widget class="GtkButton" id="cancel_button">
- <property name="visible">True</property>
- <property name="can_default">True</property>
- <property name="can_focus">True</property>
- <property name="label">gtk-cancel</property>
- <property name="use_stock">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="focus_on_click">True</property>
- <property name="response_id">-6</property>
- </widget>
- </child>
-
- <child>
- <widget class="GtkButton" id="login_button">
- <property name="visible">True</property>
- <property name="can_default">True</property>
- <property name="has_default">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">_Login to Network</property>
- <property name="use_underline">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="focus_on_click">True</property>
- <property name="response_id">0</property>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="pack_type">GTK_PACK_END</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkHBox" id="hbox1">
- <property name="border_width">6</property>
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">12</property>
-
- <child>
- <widget class="GtkImage" id="image1">
- <property name="visible">True</property>
- <property name="pixbuf">keyring.png</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">True</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkVBox" id="vbox1">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">12</property>
-
- <child>
- <widget class="GtkLabel" id="label1">
- <property name="visible">True</property>
- <property name="label" translatable="yes">&lt;span weight=&quot;bold&quot; size=&quot;larger&quot;&gt;Passphrase Required by Wireless Network&lt;/span&gt;
-
-A passphrase or encryption key is required to access the wireless network '%s'.</property>
- <property name="use_underline">False</property>
- <property name="use_markup">True</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">True</property>
- <property name="selectable">False</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
- <property name="width_chars">-1</property>
- <property name="single_line_mode">False</property>
- <property name="angle">0</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkHBox" id="hbox3">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">6</property>
-
- <child>
- <widget class="GtkLabel" id="label3">
- <property name="visible">True</property>
- <property name="label" translatable="yes">_Key Type:</property>
- <property name="use_underline">True</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
- <property name="width_chars">-1</property>
- <property name="single_line_mode">False</property>
- <property name="angle">0</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkComboBox" id="key_type_combo">
- <property name="visible">True</property>
- <property name="items" translatable="yes">128-bit Passphrase (WEP)
-ASCII Key (WEP)
-Hex Key (WEP)</property>
- <property name="add_tearoffs">False</property>
- <property name="focus_on_click">True</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
-
- <child>
- <placeholder/>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkHBox" id="hbox2">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">6</property>
-
- <child>
- <widget class="GtkLabel" id="passphrase_entry_label">
- <property name="visible">True</property>
- <property name="label" translatable="yes">_Passphrase:</property>
- <property name="use_underline">True</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
- <property name="width_chars">-1</property>
- <property name="single_line_mode">False</property>
- <property name="angle">0</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkEntry" id="passphrase_entry">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="has_focus">True</property>
- <property name="editable">True</property>
- <property name="visibility">True</property>
- <property name="max_length">0</property>
- <property name="text" translatable="yes"></property>
- <property name="has_frame">True</property>
- <property name="invisible_char">*</property>
- <property name="activates_default">True</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
- </widget>
- </child>
-</widget>
-
-<widget class="GtkDialog" id="info_dialog">
- <property name="border_width">6</property>
- <property name="title" translatable="yes">Connection Information</property>
- <property name="type">GTK_WINDOW_TOPLEVEL</property>
- <property name="window_position">GTK_WIN_POS_NONE</property>
- <property name="modal">False</property>
- <property name="resizable">False</property>
- <property name="destroy_with_parent">False</property>
- <property name="decorated">True</property>
- <property name="skip_taskbar_hint">False</property>
- <property name="skip_pager_hint">False</property>
- <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
- <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
- <property name="focus_on_map">True</property>
- <property name="has_separator">False</property>
-
- <child internal-child="vbox">
- <widget class="GtkVBox" id="dialog-vbox1">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">6</property>
-
- <child internal-child="action_area">
- <widget class="GtkHButtonBox" id="dialog-action_area1">
- <property name="visible">True</property>
- <property name="layout_style">GTK_BUTTONBOX_END</property>
-
- <child>
- <widget class="GtkButton" id="closebutton1">
- <property name="visible">True</property>
- <property name="can_default">True</property>
- <property name="has_default">True</property>
- <property name="can_focus">True</property>
- <property name="has_focus">True</property>
- <property name="label">gtk-close</property>
- <property name="use_stock">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="focus_on_click">True</property>
- <property name="response_id">-7</property>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="pack_type">GTK_PACK_END</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkAlignment" id="alignment1">
- <property name="visible">True</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xscale">0</property>
- <property name="yscale">0</property>
- <property name="top_padding">0</property>
- <property name="bottom_padding">0</property>
- <property name="left_padding">0</property>
- <property name="right_padding">0</property>
-
- <child>
- <widget class="GtkVBox" id="vbox1">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">0</property>
-
- <child>
- <widget class="GtkHBox" id="hbox2">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">6</property>
-
- <child>
- <widget class="GtkImage" id="image1">
- <property name="visible">True</property>
- <property name="stock">gtk-dialog-info</property>
- <property name="icon_size">6</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkTable" id="table1">
- <property name="visible">True</property>
- <property name="n_rows">9</property>
- <property name="n_columns">2</property>
- <property name="homogeneous">False</property>
- <property name="row_spacing">3</property>
- <property name="column_spacing">6</property>
-
- <child>
- <widget class="GtkLabel" id="label-interface">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes"></property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">True</property>
- <property name="xalign">0</property>
- <property name="yalign">0</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
- <property name="width_chars">-1</property>
- <property name="single_line_mode">False</property>
- <property name="angle">0</property>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">2</property>
- <property name="bottom_attach">3</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label1">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Interface:</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0</property>
- <property name="yalign">0</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
- <property name="width_chars">-1</property>
- <property name="single_line_mode">False</property>
- <property name="angle">0</property>
- </widget>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
- <property name="top_attach">2</property>
- <property name="bottom_attach">3</property>
- <property name="x_options">fill</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label17">
- <property name="visible">True</property>
- <property name="label" translatable="yes">&lt;span weight=&quot;bold&quot; size=&quot;larger&quot;&gt;Active Connection Information&lt;/span&gt;</property>
- <property name="use_underline">False</property>
- <property name="use_markup">True</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
- <property name="width_chars">-1</property>
- <property name="single_line_mode">False</property>
- <property name="angle">0</property>
- </widget>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">2</property>
- <property name="top_attach">0</property>
- <property name="bottom_attach">1</property>
- <property name="x_options">fill</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label18">
- <property name="visible">True</property>
- <property name="label" translatable="yes"></property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
- <property name="width_chars">-1</property>
- <property name="single_line_mode">False</property>
- <property name="angle">0</property>
- </widget>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="x_options">fill</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label19">
- <property name="visible">True</property>
- <property name="label" translatable="yes"></property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
- <property name="width_chars">-1</property>
- <property name="single_line_mode">False</property>
- <property name="angle">0</property>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="x_options">fill</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label15">
- <property name="visible">True</property>
- <property name="label" translatable="yes"></property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
- <property name="width_chars">-1</property>
- <property name="single_line_mode">False</property>
- <property name="angle">0</property>
- </widget>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
- <property name="top_attach">3</property>
- <property name="bottom_attach">4</property>
- <property name="x_options">fill</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label16">
- <property name="visible">True</property>
- <property name="label" translatable="yes"></property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
- <property name="width_chars">-1</property>
- <property name="single_line_mode">False</property>
- <property name="angle">0</property>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">3</property>
- <property name="bottom_attach">4</property>
- <property name="x_options">fill</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label-destination-address-label">
- <property name="label" translatable="yes">Destination Address:</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0</property>
- <property name="yalign">0</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
- <property name="width_chars">-1</property>
- <property name="single_line_mode">False</property>
- <property name="angle">0</property>
- </widget>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
- <property name="top_attach">4</property>
- <property name="bottom_attach">5</property>
- <property name="x_options">fill</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label-destination-address">
- <property name="can_focus">True</property>
- <property name="label" translatable="yes"></property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">True</property>
- <property name="xalign">0</property>
- <property name="yalign">0</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
- <property name="width_chars">-1</property>
- <property name="single_line_mode">False</property>
- <property name="angle">0</property>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">4</property>
- <property name="bottom_attach">5</property>
- <property name="x_options">fill</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label4">
- <property name="visible">True</property>
- <property name="label" translatable="yes">IP Address:</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
- <property name="width_chars">-1</property>
- <property name="single_line_mode">False</property>
- <property name="angle">0</property>
- </widget>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
- <property name="top_attach">5</property>
- <property name="bottom_attach">6</property>
- <property name="x_options">fill</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label-ip-address">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes"></property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">True</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
- <property name="width_chars">-1</property>
- <property name="single_line_mode">False</property>
- <property name="angle">0</property>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">5</property>
- <property name="bottom_attach">6</property>
- <property name="x_options">fill</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label5">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Broadcast Address:</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0</property>
- <property name="yalign">0</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
- <property name="width_chars">-1</property>
- <property name="single_line_mode">False</property>
- <property name="angle">0</property>
- </widget>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
- <property name="top_attach">6</property>
- <property name="bottom_attach">7</property>
- <property name="x_options">fill</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label6">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Subnet Mask:</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0</property>
- <property name="yalign">0</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
- <property name="width_chars">-1</property>
- <property name="single_line_mode">False</property>
- <property name="angle">0</property>
- </widget>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
- <property name="top_attach">7</property>
- <property name="bottom_attach">8</property>
- <property name="x_options">fill</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label7">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Hardware Address:</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0</property>
- <property name="yalign">0</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
- <property name="width_chars">-1</property>
- <property name="single_line_mode">False</property>
- <property name="angle">0</property>
- </widget>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
- <property name="top_attach">8</property>
- <property name="bottom_attach">9</property>
- <property name="x_options">fill</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label-broadcast-address">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes"></property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">True</property>
- <property name="xalign">0</property>
- <property name="yalign">0</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
- <property name="width_chars">-1</property>
- <property name="single_line_mode">False</property>
- <property name="angle">0</property>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">6</property>
- <property name="bottom_attach">7</property>
- <property name="x_options">fill</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label-subnet-mask">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes"></property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">True</property>
- <property name="xalign">0</property>
- <property name="yalign">0</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
- <property name="width_chars">-1</property>
- <property name="single_line_mode">False</property>
- <property name="angle">0</property>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">7</property>
- <property name="bottom_attach">8</property>
- <property name="x_options">fill</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label-hardware-address">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes"></property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">True</property>
- <property name="xalign">0</property>
- <property name="yalign">0</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
- <property name="width_chars">-1</property>
- <property name="single_line_mode">False</property>
- <property name="angle">0</property>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">8</property>
- <property name="bottom_attach">9</property>
- <property name="x_options">fill</property>
- <property name="y_options"></property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
- </widget>
- </child>
-</widget>
-
-</glade-interface>
diff --git a/gnome/applet/wireless-network.c b/gnome/applet/wireless-network.c
deleted file mode 100644
index 1807667f56..0000000000
--- a/gnome/applet/wireless-network.c
+++ /dev/null
@@ -1,195 +0,0 @@
-/* -*- Mode: C; tab-width: 5; indent-tabs-mode: t; c-basic-offset: 5 -*- */
-/* NetworkManager Wireless Applet -- Display wireless access points and allow user control
- *
- * Dan Williams <dcbw@redhat.com>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- *
- * (C) Copyright 2004-2005 Red Hat, Inc.
- */
-
-
-#include <glib.h>
-#include "wireless-network.h"
-
-/*
- * Representation of a wireless network
- *
- */
-struct WirelessNetwork
-{
- int refcount;
- char * nm_path;
- char * essid;
- gboolean encrypted;
- gboolean active;
- gint8 strength;
-};
-
-
-/*
- * wireless_network_new
- *
- * Create a new wireless network structure
- *
- */
-WirelessNetwork *wireless_network_new (const char *essid, const char *nm_path)
-{
- WirelessNetwork *net = NULL;
-
- g_return_val_if_fail (essid != NULL, NULL);
- g_return_val_if_fail (nm_path != NULL, NULL);
-
- if ((net = g_malloc0 (sizeof (WirelessNetwork))))
- {
- net->essid = g_strdup (essid);
- net->nm_path = g_strdup (nm_path);
- }
-
- return (net);
-}
-
-
-/*
- * wireless_network_copy
- *
- * Create a new wireless network structure from an existing one
- *
- */
-WirelessNetwork *wireless_network_copy (WirelessNetwork *src)
-{
- WirelessNetwork *net = NULL;
-
- g_return_val_if_fail (src != NULL, NULL);
-
- if ((net = g_malloc0 (sizeof (WirelessNetwork))))
- {
- net->refcount = 1;
- net->nm_path = g_strdup (src->nm_path);
- net->essid = g_strdup (src->essid);
- net->active = src->active;
- net->encrypted = src->encrypted;
- net->strength = src->strength;
- }
-
- return (net);
-}
-
-
-/*
- * wireless_network_ref
- *
- * Increment the reference count of the wireless network
- *
- */
-void wireless_network_ref (WirelessNetwork *net)
-{
- g_return_if_fail (net != NULL);
-
- net->refcount++;
-}
-
-
-/*
- * wireless_network_unref
- *
- * Unrefs (and possibly frees) the representation of a wireless network
- *
- */
-void wireless_network_unref (WirelessNetwork *net)
-{
- g_return_if_fail (net != NULL);
-
- net->refcount--;
- if (net->refcount < 1)
- {
- g_free (net->nm_path);
- g_free (net->essid);
- g_free (net);
- }
-}
-
-
-/*
- * Accessors for active
- */
-gboolean wireless_network_get_active (WirelessNetwork *net)
-{
- g_return_val_if_fail (net != NULL, FALSE);
-
- return net->active;
-}
-
-void wireless_network_set_active (WirelessNetwork *net, gboolean active)
-{
- g_return_if_fail (net != NULL);
-
- net->active = active;
-}
-
-/*
- * Accessors for essid
- */
-const char *wireless_network_get_essid (WirelessNetwork *net)
-{
- g_return_val_if_fail (net != NULL, FALSE);
-
- return net->essid;
-}
-
-/*
- * Accessors for nm_path
- */
-const char *wireless_network_get_nm_path (WirelessNetwork *net)
-{
- g_return_val_if_fail (net != NULL, FALSE);
-
- return net->nm_path;
-}
-
-/*
- * Accessors for encrypted
- */
-gboolean wireless_network_get_encrypted (WirelessNetwork *net)
-{
- g_return_val_if_fail (net != NULL, FALSE);
-
- return net->encrypted;
-}
-
-void wireless_network_set_encrypted (WirelessNetwork *net, gboolean encrypted)
-{
- g_return_if_fail (net != NULL);
-
- net->encrypted = encrypted;
-}
-
-/*
- * Accessors for strength
- */
-gint8 wireless_network_get_strength (WirelessNetwork *net)
-{
- g_return_val_if_fail (net != NULL, FALSE);
-
- return net->strength;
-}
-
-void wireless_network_set_strength (WirelessNetwork *net, gint8 strength)
-{
- g_return_if_fail (net != NULL);
-
- net->strength = strength;
-}
-
diff --git a/gnome/applet/wireless-network.h b/gnome/applet/wireless-network.h
deleted file mode 100644
index 4f636f44b7..0000000000
--- a/gnome/applet/wireless-network.h
+++ /dev/null
@@ -1,47 +0,0 @@
-/* -*- Mode: C; tab-width: 5; indent-tabs-mode: t; c-basic-offset: 5 -*- */
-/* NetworkManager Wireless Applet -- Display wireless access points and allow user control
- *
- * Dan Williams <dcbw@redhat.com>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- *
- * (C) Copyright 2004-2005 Red Hat, Inc.
- */
-
-#ifndef WIRELESS_NETWORK_H
-#define WIRELESS_NETWORK_H
-
-typedef struct WirelessNetwork WirelessNetwork;
-
-WirelessNetwork * wireless_network_new (const char *essid, const char *nm_path);
-WirelessNetwork * wireless_network_copy (WirelessNetwork *src);
-
-void wireless_network_ref (WirelessNetwork *net);
-void wireless_network_unref (WirelessNetwork *net);
-
-gboolean wireless_network_get_active (WirelessNetwork *net);
-void wireless_network_set_active (WirelessNetwork *net, gboolean active);
-
-const char * wireless_network_get_essid (WirelessNetwork *net);
-
-const char * wireless_network_get_nm_path (WirelessNetwork *net);
-
-gboolean wireless_network_get_encrypted (WirelessNetwork *net);
-void wireless_network_set_encrypted (WirelessNetwork *net, gboolean encrypted);
-
-gint8 wireless_network_get_strength (WirelessNetwork *net);
-void wireless_network_set_strength (WirelessNetwork *net, gint8 strength);
-
-#endif
diff --git a/gnome/libnm_glib/.cvsignore b/gnome/libnm_glib/.cvsignore
deleted file mode 100644
index e116cf3597..0000000000
--- a/gnome/libnm_glib/.cvsignore
+++ /dev/null
@@ -1,3 +0,0 @@
-libnm_glib.pc
-Makefile.in
-Makefile
diff --git a/gnome/libnm_glib/Makefile.am b/gnome/libnm_glib/Makefile.am
deleted file mode 100644
index 5ad8d7f8a7..0000000000
--- a/gnome/libnm_glib/Makefile.am
+++ /dev/null
@@ -1,31 +0,0 @@
-INCLUDES = -I${top_srcdir} -I${top_srcdir}/utils
-
-lib_LTLIBRARIES=libnm_glib.la
-
-libnm_glib_la_CPPFLAGS = \
- $(DBUS_CFLAGS) \
- $(GTHREAD_CFLAGS) \
- -DDBUS_API_SUBJECT_TO_CHANGE
-
-libnm_glib_la_SOURCES= \
- libnm_glib.c \
- libnm_glib.h
-
-libnm_glib_la_LDFLAGS= \
- $(DBUS_LIBS) \
- $(GTHREAD_LIBS)
-
-libnm_glib_la_LIBADD = $(top_builddir)/utils/libnmutils.la
-
-libnm_glib_includedir=$(includedir)/NetworkManager
-
-libnm_glib_include_HEADERS = libnm_glib.h
-
-pkgconfigdir = $(libdir)/pkgconfig
-pkgconfig_DATA = libnm_glib.pc
-
-DISTCLEANFILES = \
- libnm_glib.pc
-
-EXTRA_DIST = \
- libnm_glib.pc.in
diff --git a/gnome/libnm_glib/libnm_glib.c b/gnome/libnm_glib/libnm_glib.c
deleted file mode 100644
index 67a8f0f419..0000000000
--- a/gnome/libnm_glib/libnm_glib.c
+++ /dev/null
@@ -1,542 +0,0 @@
-/* libnm_glib -- Access NetworkManager information from applications
- *
- * Dan Williams <dcbw@redhat.com>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- *
- * (C) Copyright 2005 Red Hat, Inc.
- */
-
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <glib.h>
-#include <dbus/dbus.h>
-#include <dbus/dbus-glib-lowlevel.h>
-#include "NetworkManager.h"
-#include "libnm_glib.h"
-
-#define DBUS_NO_SERVICE_ERROR "org.freedesktop.DBus.Error.ServiceDoesNotExist"
-
-struct libnm_glib_ctx
-{
- unsigned char check;
-
- GMainContext * g_main_ctx;
- GMainLoop * g_main_loop;
- DBusConnection * dbus_con;
- guint dbus_watcher;
- gboolean thread_done;
- gboolean thread_inited;
-
- GSList * callbacks;
- GMutex * callbacks_lock;
- gint callback_id_last;
-
- libnm_glib_state nm_state;
-};
-
-typedef struct libnm_glib_callback
-{
- gint id;
- GMainContext * gmain_ctx;
- libnm_glib_ctx * libnm_glib_ctx;
- libnm_glib_callback_func func;
- gpointer user_data;
-} libnm_glib_callback;
-
-
-static void libnm_glib_schedule_dbus_watcher (libnm_glib_ctx *ctx);
-static DBusConnection * libnm_glib_dbus_init (gpointer *user_data, GMainContext *context);
-
-
-
-static NMState libnm_glib_get_nm_state (DBusConnection *con)
-{
- DBusMessage * message;
- DBusMessage * reply;
- DBusError error;
- NMState state = NM_STATE_UNKNOWN;
-
- g_return_val_if_fail (con != NULL, NM_STATE_UNKNOWN);
-
- if (!(message = dbus_message_new_method_call (NM_DBUS_SERVICE, NM_DBUS_PATH, NM_DBUS_INTERFACE, "state")))
- {
- fprintf (stderr, "libnm_glib_get_nm_state(): Couldn't allocate the dbus message\n");
- return NM_STATE_UNKNOWN;
- }
-
- dbus_error_init (&error);
- reply = dbus_connection_send_with_reply_and_block (con, message, -1, &error);
- dbus_message_unref (message);
- if (dbus_error_is_set (&error))
- {
- fprintf (stderr, "libnm_glib_get_nm_state(): %s raised:\n %s\n\n", error.name, error.message);
- goto out;
- }
-
- if (!reply)
- {
- fprintf (stderr, "libnm_glib_get_nm_state(): dbus reply message was NULL\n" );
- goto out;
- }
-
- dbus_error_init (&error);
- if (!(dbus_message_get_args (reply, &error, DBUS_TYPE_UINT32, &state, DBUS_TYPE_INVALID)))
- fprintf (stderr, "libnm_glib_get_nm_state(): error while getting args: name='%s' message='%s'\n", error.name, error.message);
- dbus_message_unref (reply);
-
-out:
- if (dbus_error_is_set (&error))
- dbus_error_free (&error);
- return state;
-}
-
-
-static gboolean libnm_glib_callback_helper (gpointer user_data)
-{
- libnm_glib_callback *cb_data = (libnm_glib_callback *)user_data;
-
- g_return_val_if_fail (cb_data != NULL, FALSE);
- g_return_val_if_fail (cb_data->func != NULL, FALSE);
- g_return_val_if_fail (cb_data->libnm_glib_ctx != NULL, FALSE);
-
- (*(cb_data->func)) (cb_data->libnm_glib_ctx, cb_data->user_data);
-
- return FALSE; /* never reschedule ourselves */
-}
-
-static void libnm_glib_schedule_single_callback (libnm_glib_ctx *ctx, libnm_glib_callback *callback)
-{
- GSource *source;
-
- g_return_if_fail (ctx != NULL);
- g_return_if_fail (callback != NULL);
-
- callback->libnm_glib_ctx = ctx;
-
- source = g_idle_source_new ();
- g_source_set_callback (source, libnm_glib_callback_helper, callback, NULL);
- g_source_attach (source, callback->gmain_ctx);
- g_source_unref (source);
-}
-
-
-static void libnm_glib_call_callbacks (libnm_glib_ctx *ctx)
-{
- GSList *elem;
-
- g_return_if_fail (ctx != NULL);
-
- g_mutex_lock (ctx->callbacks_lock);
- for (elem = ctx->callbacks; elem; elem = g_slist_next (elem))
- {
- libnm_glib_callback *callback = (libnm_glib_callback *)(elem->data);
- if (callback)
- libnm_glib_schedule_single_callback (ctx, callback);
- }
- g_mutex_unlock (ctx->callbacks_lock);
-}
-
-
-static void libnm_glib_update_state (libnm_glib_ctx *ctx, NMState state)
-{
- libnm_glib_state old_state;
-
- g_return_if_fail (ctx != NULL);
-
- old_state = ctx->nm_state;
- switch (state)
- {
- case NM_STATE_CONNECTED:
- ctx->nm_state = LIBNM_ACTIVE_NETWORK_CONNECTION;
- break;
-
- case NM_STATE_ASLEEP:
- case NM_STATE_CONNECTING:
- case NM_STATE_DISCONNECTED:
- ctx->nm_state = LIBNM_NO_NETWORK_CONNECTION;
- break;
-
- case NM_STATE_UNKNOWN:
- default:
- ctx->nm_state = LIBNM_NO_NETWORKMANAGER;
- break;
- }
-
- if (old_state != ctx->nm_state)
- libnm_glib_call_callbacks (ctx);
-}
-
-
-static DBusHandlerResult libnm_glib_dbus_filter (DBusConnection *connection, DBusMessage *message, void *user_data)
-{
- libnm_glib_ctx *ctx = (libnm_glib_ctx *)user_data;
- gboolean handled = TRUE;
- DBusError error;
-
- g_return_val_if_fail (ctx != NULL, DBUS_HANDLER_RESULT_NOT_YET_HANDLED);
- g_return_val_if_fail (connection != NULL, DBUS_HANDLER_RESULT_NOT_YET_HANDLED);
- g_return_val_if_fail (message != NULL, DBUS_HANDLER_RESULT_NOT_YET_HANDLED);
-
- dbus_error_init (&error);
- if (dbus_message_is_signal (message, DBUS_INTERFACE_LOCAL, "Disconnected"))
- {
- /* Try to reactivate our connection to dbus on the next pass through the event loop */
- ctx->nm_state = LIBNM_NO_DBUS;
- dbus_connection_disconnect (ctx->dbus_con);
- libnm_glib_schedule_dbus_watcher (ctx);
- }
- else if (dbus_message_is_signal (message, DBUS_INTERFACE_DBUS, "NameOwnerChanged"))
- {
- /* New signal for dbus 0.23... */
- char *service;
- char *old_owner;
- char *new_owner;
-
- if ( dbus_message_get_args (message, &error,
- DBUS_TYPE_STRING, &service,
- DBUS_TYPE_STRING, &old_owner,
- DBUS_TYPE_STRING, &new_owner,
- DBUS_TYPE_INVALID))
- {
- if (strcmp (service, NM_DBUS_SERVICE) == 0)
- {
- gboolean old_owner_good = (old_owner && (strlen (old_owner) > 0));
- gboolean new_owner_good = (new_owner && (strlen (new_owner) > 0));
-
- if (!old_owner_good && new_owner_good) /* Equivalent to old ServiceCreated signal */
- libnm_glib_update_state (ctx, libnm_glib_get_nm_state (ctx->dbus_con));
- else if (old_owner_good && !new_owner_good) /* Equivalent to old ServiceDeleted signal */
- ctx->nm_state = LIBNM_NO_NETWORKMANAGER;
- }
- }
- }
- else if ( dbus_message_is_signal (message, NM_DBUS_INTERFACE, "DeviceNowActive")
- || dbus_message_is_signal (message, NM_DBUS_INTERFACE, "DeviceNoLongerActive")
- || dbus_message_is_signal (message, NM_DBUS_INTERFACE, "DeviceActivating")
- || dbus_message_is_signal (message, NM_DBUS_INTERFACE, "DevicesChanged"))
- {
- libnm_glib_update_state (ctx, libnm_glib_get_nm_state (ctx->dbus_con));
- }
- else if (dbus_message_is_signal (message, NM_DBUS_INTERFACE, NM_DBUS_SIGNAL_STATE_CHANGE))
- {
- NMState state = NM_STATE_UNKNOWN;
-
- dbus_message_get_args (message, &error, DBUS_TYPE_UINT32, &state, DBUS_TYPE_INVALID);
- libnm_glib_update_state (ctx, state);
- }
- else
- handled = FALSE;
-
- if (dbus_error_is_set (&error))
- dbus_error_free (&error);
-
- return (handled ? DBUS_HANDLER_RESULT_HANDLED : DBUS_HANDLER_RESULT_NOT_YET_HANDLED);
-}
-
-
-/*
- * libnm_glib_dbus_init
- *
- * Initialize a connection to dbus and set up our callbacks.
- *
- */
-static DBusConnection * libnm_glib_dbus_init (gpointer *user_data, GMainContext *context)
-{
- DBusConnection *connection = NULL;
- DBusError error;
-
- dbus_error_init (&error);
- connection = dbus_bus_get (DBUS_BUS_SYSTEM, &error);
- if (dbus_error_is_set (&error))
- {
- fprintf (stderr, "libnm: error, %s raised:\n %s\n\n", error.name, error.message);
- dbus_error_free (&error);
- return (NULL);
- }
- if (!connection)
- return NULL;
-
- if (!dbus_connection_add_filter (connection, libnm_glib_dbus_filter, user_data, NULL))
- return (NULL);
-
- dbus_connection_set_exit_on_disconnect (connection, FALSE);
- dbus_connection_setup_with_g_main (connection, context);
-
- dbus_error_init (&error);
- dbus_bus_add_match(connection,
- "type='signal',"
- "interface='" DBUS_INTERFACE_DBUS "',"
- "sender='" DBUS_SERVICE_DBUS "'",
- &error);
- if (dbus_error_is_set (&error))
- dbus_error_free (&error);
-
- dbus_error_init (&error);
- dbus_bus_add_match(connection,
- "type='signal',"
- "interface='" NM_DBUS_INTERFACE "',"
- "path='" NM_DBUS_PATH "',"
- "sender='" NM_DBUS_SERVICE "'",
- &error);
- if (dbus_error_is_set (&error))
- dbus_error_free (&error);
-
- return (connection);
-}
-
-
-/*
- * libnm_glib_dbus_watcher
- *
- * Repeatedly try to re-activate the connection to dbus.
- *
- */
-static gboolean libnm_glib_dbus_watcher (gpointer user_data)
-{
- libnm_glib_ctx *ctx = (libnm_glib_ctx *)user_data;
-
- g_return_val_if_fail (ctx != NULL, FALSE);
-
- if (!ctx->dbus_con)
- ctx->dbus_con = libnm_glib_dbus_init ((gpointer)ctx, ctx->g_main_ctx);
-
- if (ctx->dbus_con)
- return (FALSE); /* Don't reschedule ourselves if we have a connection to dbus */
-
- /* Reschule ourselves if we _still_ don't have a connection to dbus */
- return (TRUE);
-}
-
-
-/*
- * libnm_glib_schedule_dbus_watcher
- *
- * Schedule an idle handler in our main loop to repeatedly
- * attempt to re-activate the dbus connection until connected.
- *
- */
-static void libnm_glib_schedule_dbus_watcher (libnm_glib_ctx *ctx)
-{
- g_return_if_fail (ctx != NULL);
-
- if (ctx->dbus_watcher == 0)
- {
- GSource *source = g_idle_source_new ();
- g_source_set_callback (source, libnm_glib_dbus_watcher, (gpointer)ctx, NULL);
- ctx->dbus_watcher = g_source_attach (source, ctx->g_main_ctx);
- g_source_unref (source);
- }
-}
-
-
-/*
- * libnm_glib_dbus_worker
- *
- * Main thread for libnm
- *
- */
-static gpointer libnm_glib_dbus_worker (gpointer user_data)
-{
- libnm_glib_ctx *ctx = (libnm_glib_ctx *)user_data;
-
- g_return_val_if_fail (ctx != NULL, NULL);
-
- /* If dbus isn't up yet, schedule an idle handler to check for dbus.
- * We also need a way to reconnect to dbus if the connection ever goes
- * down. Should probably be done by a timeout polling dbus_connection_is_connected()
- * or by getting connection status out of libdbus or something.
- */
- if (!ctx->dbus_con)
- libnm_glib_schedule_dbus_watcher (ctx);
- else
- {
- /* Get initial status */
- libnm_glib_update_state (ctx, libnm_glib_get_nm_state (ctx->dbus_con));
- }
-
- ctx->thread_inited = TRUE;
- g_main_loop_run (ctx->g_main_loop);
- ctx->thread_done = TRUE;
-
- return NULL;
-}
-
-
-static void libnm_glib_ctx_free (libnm_glib_ctx *ctx)
-{
- g_return_if_fail (ctx != NULL);
-
- if (ctx->check == 0xDD)
- {
- fprintf (stderr, "libnm_glib_ctx_free(): context %p already freed!\n", ctx);
- return;
- }
-
- if (ctx->g_main_ctx)
- g_main_context_unref (ctx->g_main_ctx);
- if (ctx->g_main_loop)
- g_main_loop_unref (ctx->g_main_loop);
-
- if (ctx->dbus_con)
- dbus_connection_disconnect (ctx->dbus_con);
-
- if (ctx->callbacks_lock)
- g_mutex_free (ctx->callbacks_lock);
-
- g_slist_foreach (ctx->callbacks, (GFunc)g_free, NULL);
- g_slist_free (ctx->callbacks);
-
- memset (ctx, 0, sizeof (libnm_glib_ctx));
- memset (&(ctx->check), 0xDD, sizeof (ctx->check));
- g_free (ctx);
-}
-
-
-static libnm_glib_ctx *libnm_glib_ctx_new (void)
-{
- libnm_glib_ctx *ctx = g_malloc0 (sizeof (libnm_glib_ctx));
-
- if (!ctx)
- return NULL;
-
- if (!(ctx->g_main_ctx = g_main_context_new ()))
- goto error;
- if (!(ctx->g_main_loop = g_main_loop_new (ctx->g_main_ctx, FALSE)))
- goto error;
- if (!(ctx->callbacks_lock = g_mutex_new ()))
- goto error;
-
-success:
- return ctx;
-
-error:
- libnm_glib_ctx_free (ctx);
- return NULL;
-}
-
-
-libnm_glib_ctx *libnm_glib_init (void)
-{
- GError *error = NULL;
- libnm_glib_ctx *ctx = NULL;
-
- g_type_init ();
- if (!g_thread_supported ())
- g_thread_init (NULL);
- dbus_g_thread_init ();
-
- ctx = libnm_glib_ctx_new();
- if (!ctx)
- return NULL;
-
- /* We don't care if dbus isn't around yet, we keep checking for it and
- * intialize our connection when it comes up.
- */
- ctx->dbus_con = libnm_glib_dbus_init ((gpointer)ctx, ctx->g_main_ctx);
- if (ctx->dbus_con)
- libnm_glib_update_state (ctx, libnm_glib_get_nm_state (ctx->dbus_con));
-
- if (!g_thread_create (libnm_glib_dbus_worker, ctx, FALSE, &error))
- {
- if (error)
- g_error_free (error);
- goto error;
- }
-
- /* Wait until initialization of the thread */
- while (!ctx->thread_inited)
- g_usleep (G_USEC_PER_SEC / 2);
-
-success:
- return ctx;
-
-error:
- libnm_glib_ctx_free (ctx);
- return NULL;
-}
-
-
-void libnm_glib_shutdown (libnm_glib_ctx *ctx)
-{
- g_return_if_fail (ctx != NULL);
-
- g_main_loop_quit (ctx->g_main_loop);
- while (!(ctx->thread_done))
- g_usleep (G_USEC_PER_SEC / 2);
-
- libnm_glib_ctx_free (ctx);
-}
-
-
-libnm_glib_state libnm_glib_get_network_state (const libnm_glib_ctx *ctx)
-{
- if (!ctx)
- return LIBNM_INVALID_CONTEXT;
-
- return ctx->nm_state;
-}
-
-
-gint libnm_glib_register_callback (libnm_glib_ctx *ctx, libnm_glib_callback_func func, gpointer user_data, GMainContext *g_main_ctx)
-{
- libnm_glib_callback *callback = NULL;
-
- g_return_val_if_fail (ctx != NULL, -1);
- g_return_val_if_fail (func != NULL, -1);
-
- callback = g_malloc0 (sizeof (libnm_glib_callback));
- if (!callback)
- return -1;
-
- callback->id = ctx->callback_id_last++;
- callback->func = func;
- callback->gmain_ctx = g_main_ctx;
- callback->libnm_glib_ctx = ctx;
- callback->user_data = user_data;
-
- g_mutex_lock (ctx->callbacks_lock);
- ctx->callbacks = g_slist_append (ctx->callbacks, callback);
- libnm_glib_schedule_single_callback (ctx, callback);
- g_mutex_unlock (ctx->callbacks_lock);
-
- return (callback->id);
-}
-
-
-void libnm_glib_unregister_callback (libnm_glib_ctx *ctx, gint id)
-{
- GSList *elem;
-
- g_return_if_fail (ctx != NULL);
- g_return_if_fail (id < 0);
-
- g_mutex_lock (ctx->callbacks_lock);
- elem = ctx->callbacks;
- while (elem)
- {
- libnm_glib_callback *callback = (libnm_glib_callback *)(elem->data);
- if (callback && (callback->id == id))
- {
- ctx->callbacks = g_slist_remove_link (ctx->callbacks, elem);
- break;
- }
-
- elem = g_slist_next (elem);
- }
- g_mutex_unlock (ctx->callbacks_lock);
-}
diff --git a/gnome/libnm_glib/libnm_glib.h b/gnome/libnm_glib/libnm_glib.h
deleted file mode 100644
index 76e1fa602e..0000000000
--- a/gnome/libnm_glib/libnm_glib.h
+++ /dev/null
@@ -1,58 +0,0 @@
-/* libnm_glib -- Access NetworkManager information from applications
- *
- * Dan Williams <dcbw@redhat.com>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- *
- * (C) Copyright 2005 Red Hat, Inc.
- */
-
-#ifndef _LIB_NM_H_
-#define _LIB_NM_H_
-
-#include <glib.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-typedef enum libnm_glib_state
-{
- LIBNM_NO_DBUS = 0,
- LIBNM_NO_NETWORKMANAGER,
- LIBNM_NO_NETWORK_CONNECTION,
- LIBNM_ACTIVE_NETWORK_CONNECTION,
- LIBNM_INVALID_CONTEXT
-} libnm_glib_state;
-
-typedef struct libnm_glib_ctx libnm_glib_ctx;
-
-
-typedef void (*libnm_glib_callback_func) (libnm_glib_ctx *libnm_ctx, gpointer user_data);
-
-
-libnm_glib_ctx *libnm_glib_init (void);
-void libnm_glib_shutdown (libnm_glib_ctx *ctx);
-
-libnm_glib_state libnm_glib_get_network_state (const libnm_glib_ctx *ctx);
-
-gint libnm_glib_register_callback (libnm_glib_ctx *ctx, libnm_glib_callback_func func, gpointer user_data, GMainContext *g_main_ctx);
-void libnm_glib_unregister_callback (libnm_glib_ctx *ctx, gint id);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
diff --git a/gnome/libnm_glib/libnm_glib.pc.in b/gnome/libnm_glib/libnm_glib.pc.in
deleted file mode 100644
index ee37a04a86..0000000000
--- a/gnome/libnm_glib/libnm_glib.pc.in
+++ /dev/null
@@ -1,13 +0,0 @@
-prefix=@prefix@
-exec_prefix=@exec_prefix@
-libdir=@libdir@
-includedir=@includedir@
-
-Name: libnm_glib
-Description: Client library for determining network connection properties from NetworkManager, using glib
-Version: @VERSION@
-Requires: dbus-1 glib-2.0 dbus-glib-1
-Cflags: -DDBUS_API_SUBJECT_TO_CHANGE -I${includedir}/NetworkManager
-Libs: -L${libdir} -lnm_glib
-
-
diff --git a/gnome/vpn-properties/.cvsignore b/gnome/vpn-properties/.cvsignore
deleted file mode 100644
index 4cef91475d..0000000000
--- a/gnome/vpn-properties/.cvsignore
+++ /dev/null
@@ -1,3 +0,0 @@
-Makefile
-Makefile.in
-nm-vpn-properties
diff --git a/gnome/vpn-properties/Makefile.am b/gnome/vpn-properties/Makefile.am
deleted file mode 100644
index 277f990f29..0000000000
--- a/gnome/vpn-properties/Makefile.am
+++ /dev/null
@@ -1,46 +0,0 @@
-
-bin_PROGRAMS = nm-vpn-properties
-
-nm_vpn_propertiesdir=$(includedir)/NetworkManager
-
-nm_vpn_properties_HEADERS = \
- nm-vpn-ui-interface.h
-
-nm_vpn_properties_SOURCES = \
- nm-vpn-properties.c \
- nm-vpn-ui-interface.h
-
-gladedir = $(datadir)/gnome-vpn-properties
-glade_DATA = nm-vpn-properties.glade
-
-nm_vpn_properties_CFLAGS = \
- $(GLADE_CFLAGS) \
- $(GTK_CFLAGS) \
- $(GCONF_CFLAGS) \
- $(GMODULE_CFLAGS) \
- $(LIBGNOMEUI_CFLAGS) \
- -DICONDIR=\""$(datadir)/pixmaps"\" \
- -DGLADEDIR=\""$(gladedir)"\" \
- -DG_DISABLE_DEPRECATED \
- -DGDK_DISABLE_DEPRECATED \
- -DGNOME_DISABLE_DEPRECATED \
- -DGNOMELOCALEDIR=\""$(prefix)/$(DATADIRNAME)/locale"\" \
- -DVERSION=\"$(VERSION)\" \
- $(NULL)
-
-nm_vpn_properties_LDADD = \
- $(GLADE_LIBS) \
- $(GTK_LIBS) \
- $(GCONF_LIBS) \
- $(GMODULE_LIBS) \
- $(LIBGNOMEUI_LIBS) \
- $(NULL)
-
-CLEANFILES = $(server_DATA) *.bak *.gladep *~
-
-EXTRA_DIST = \
- $(glade_DATA) \
- $(NULL)
-
-
-
diff --git a/gnome/vpn-properties/nm-vpn-properties.c b/gnome/vpn-properties/nm-vpn-properties.c
deleted file mode 100644
index a105ee8abd..0000000000
--- a/gnome/vpn-properties/nm-vpn-properties.c
+++ /dev/null
@@ -1,1158 +0,0 @@
-/***************************************************************************
- * CVSID: $Id$
- *
- * nm-vpn-properties.c : GNOME UI dialogs for manipulating VPN connections
- *
- * Copyright (C) 2005 David Zeuthen, <davidz@redhat.com>
- *
- * ===
- * NOTE NOTE NOTE: All source for nm-vpn-properties is licensed to you
- * under your choice of the Academic Free License version 2.0, or the
- * GNU General Public License version 2.
- * ===
- *
- * Licensed under the Academic Free License version 2.0
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- *
- **************************************************************************/
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <string.h>
-#include <gnome.h>
-#include <gdk/gdkx.h>
-#include <gtk/gtkwindow.h>
-#include <glade/glade.h>
-#include <gconf/gconf-client.h>
-#include <glib/gi18n-lib.h>
-
-#define NM_VPN_API_SUBJECT_TO_CHANGE
-#include "nm-vpn-ui-interface.h"
-
-#define NM_GCONF_VPN_CONNECTIONS_PATH "/system/networking/vpn_connections"
-
-static GladeXML *xml;
-static GConfClient *gconf_client;
-
-static GtkWidget *dialog;
-static GtkWindow *druid_window;
-static GtkTreeView *vpn_conn_view;
-static GtkListStore *vpn_conn_list;
-static GtkWidget *vpn_edit;
-static GtkWidget *vpn_export;
-static GtkWidget *vpn_delete;
-static GnomeDruid *druid;
-static GnomeDruidPageEdge *druid_confirm_page;
-static GtkComboBox *vpn_type_combo_box;
-static GtkVBox *vpn_type_details;
-static GtkDialog *edit_dialog;
-
-static GSList *vpn_types;
-
-static NetworkManagerVpnUI *
-find_vpn_ui_by_service_name (const char *service_name)
-{
- GSList *i;
-
- for (i = vpn_types; i != NULL; i = g_slist_next (i)) {
- NetworkManagerVpnUI *vpn_ui;
-
- vpn_ui = i->data;
- if (strcmp (vpn_ui->get_service_name (vpn_ui), service_name) == 0)
- return vpn_ui;
- }
-
- return NULL;
-}
-
-enum {
- VPNCONN_NAME_COLUMN,
- VPNCONN_SVC_NAME_COLUMN,
- VPNCONN_GCONF_COLUMN,
- VPNCONN_USER_CAN_EDIT_COLUMN,
- VPNCONN_N_COLUMNS
-};
-
-static void
-update_edit_del_sensitivity (void)
-{
- GtkTreeIter iter;
- GtkTreeSelection *selection;
- gboolean is_editable;
- char *service_name;
- NetworkManagerVpnUI *vpn_ui;
-
- if ((selection = gtk_tree_view_get_selection (vpn_conn_view)) == NULL)
- goto out;
-
- if (!gtk_tree_selection_get_selected (selection, NULL, &iter))
- goto out;
-
- gtk_tree_model_get (GTK_TREE_MODEL (vpn_conn_list), &iter, VPNCONN_USER_CAN_EDIT_COLUMN, &is_editable, -1);
- gtk_tree_model_get (GTK_TREE_MODEL (vpn_conn_list), &iter, VPNCONN_SVC_NAME_COLUMN, &service_name, -1);
-
- gtk_widget_set_sensitive (vpn_edit, is_editable);
- gtk_widget_set_sensitive (vpn_delete, is_editable);
-
- vpn_ui = find_vpn_ui_by_service_name (service_name);
- gtk_widget_set_sensitive (vpn_export, vpn_ui->can_export (vpn_ui));
-
-out:
- ;
-}
-
-static gboolean
-add_vpn_connection (const char *conn_name, const char *service_name, GSList *conn_data, GSList *routes)
-{
- int i;
- char *gconf_key;
- GtkTreeIter iter;
- char conn_gconf_path[PATH_MAX];
- char *escaped_conn_name;
- gboolean ret;
- gboolean conn_user_can_edit = TRUE;
-
- ret = FALSE;
-
- escaped_conn_name = gconf_escape_key (conn_name, strlen (conn_name));
-
- g_snprintf (conn_gconf_path,
- sizeof (conn_gconf_path),
- NM_GCONF_VPN_CONNECTIONS_PATH "/%s",
- escaped_conn_name);
-
- if (gconf_client_dir_exists (gconf_client, conn_gconf_path, NULL))
- goto out;
-
- /* User-visible name of connection */
- gconf_key = g_strdup_printf ("%s/name", conn_gconf_path);
- gconf_client_set_string (gconf_client, gconf_key, conn_name, NULL);
-
- /* Service name of connection */
- gconf_key = g_strdup_printf ("%s/service_name", conn_gconf_path);
- gconf_client_set_string (gconf_client, gconf_key, service_name, NULL);
-
- /* vpn-daemon specific data */
- gconf_key = g_strdup_printf ("%s/vpn_data", conn_gconf_path);
- {
- gconf_client_set_list (gconf_client, gconf_key, GCONF_VALUE_STRING, conn_data, NULL);
- }
-
- /* routes */
- gconf_key = g_strdup_printf ("%s/routes", conn_gconf_path);
- {
-/*
- GSList *i;
-
- i = NULL;
- i = g_slist_append (i, "172.16.0.0/16");
-*/
- gconf_client_set_list (gconf_client, gconf_key, GCONF_VALUE_STRING, routes, NULL);
- /*g_slist_free (i);*/
- }
-
- gconf_client_suggest_sync (gconf_client, NULL);
-
- conn_user_can_edit = TRUE;
-
- gtk_list_store_append (vpn_conn_list, &iter);
- gtk_list_store_set (vpn_conn_list, &iter,
- VPNCONN_NAME_COLUMN, conn_name,
- VPNCONN_SVC_NAME_COLUMN, service_name,
- VPNCONN_GCONF_COLUMN, conn_gconf_path,
- VPNCONN_USER_CAN_EDIT_COLUMN, &conn_user_can_edit,
- -1);
-
- ret = TRUE;
-
-out:
- g_free (escaped_conn_name);
- return ret;
-}
-
-static void
-vpn_druid_vpn_validity_changed (NetworkManagerVpnUI *vpn_ui,
- gboolean is_valid,
- gpointer user_data)
-{
- char *conn_name;
- GtkTreeIter iter;
-
- /*printf ("vpn_druid_vpn_validity_changed %d!\n", is_valid);*/
-
- conn_name = vpn_ui->get_connection_name (vpn_ui);
-
- /* get list of existing connection names */
- if (gtk_tree_model_get_iter_first (GTK_TREE_MODEL (vpn_conn_list), &iter)) {
- do {
- char *name;
-
- gtk_tree_model_get (GTK_TREE_MODEL (vpn_conn_list),
- &iter,
- VPNCONN_NAME_COLUMN,
- &name,
- -1);
-
- if (strcmp (name, conn_name) == 0) {
- /*printf ("name '%s' is already in use\n", conn_name);*/
- is_valid = FALSE;
- break;
- }
-
- } while (gtk_tree_model_iter_next (GTK_TREE_MODEL (vpn_conn_list), &iter));
- }
-
- g_free (conn_name);
-
- gnome_druid_set_buttons_sensitive (druid,
- TRUE,
- is_valid,
- TRUE,
- FALSE);
-}
-
-
-static gboolean vpn_druid_vpn_type_page_next (GnomeDruidPage *druidpage,
- GtkWidget *widget,
- gpointer user_data)
-{
- GtkWidget *w;
- GtkWidget *vbox;
- NetworkManagerVpnUI *vpn_ui;
-
- /*printf ("vpn_type_next!\n");*/
-
- /* first hide existing child */
- w = g_list_nth_data (gtk_container_children (GTK_CONTAINER (vpn_type_details)), 0);
- if (w != NULL) {
- gtk_widget_hide (w);
- }
-
- /* show appropriate child */
- vpn_ui = (NetworkManagerVpnUI *) g_slist_nth_data (vpn_types, gtk_combo_box_get_active (vpn_type_combo_box));
- if (vpn_ui != NULL) {
- w = vpn_ui->get_widget (vpn_ui, NULL, NULL, NULL);
- if (w != NULL) {
- GtkWidget *old_parent;
- gtk_widget_ref (w);
- old_parent = gtk_widget_get_parent (w);
- if (old_parent != NULL)
- gtk_container_remove (GTK_CONTAINER (old_parent), w);
- gtk_container_add (GTK_CONTAINER (vpn_type_details), w);
- gtk_widget_unref (w);
-
- gtk_widget_show_all (w);
- }
-
- vpn_ui->set_validity_changed_callback (vpn_ui, vpn_druid_vpn_validity_changed, NULL);
- }
-
- return FALSE;
-}
-
-static void vpn_druid_vpn_details_page_prepare (GnomeDruidPage *druidpage,
- GtkWidget *widget,
- gpointer user_data)
-{
- /*printf ("vpn_details_prepare!\n");*/
-
- gnome_druid_set_buttons_sensitive (druid,
- TRUE,
- FALSE,
- TRUE,
- FALSE);
-
-}
-
-static gboolean vpn_druid_vpn_details_page_next (GnomeDruidPage *druidpage,
- GtkWidget *widget,
- gpointer user_data)
-{
- gboolean is_valid;
- NetworkManagerVpnUI *vpn_ui;
-
- is_valid = FALSE;
-
- /*printf ("vpn_details_next!\n");*/
-
- /* validate input */
- vpn_ui = (NetworkManagerVpnUI *) g_slist_nth_data (vpn_types, gtk_combo_box_get_active (vpn_type_combo_box));
- if (vpn_ui != NULL) {
- is_valid = vpn_ui->is_valid (vpn_ui);
- }
-
-out:
- return !is_valid;
-}
-
-static void vpn_druid_vpn_confirm_page_prepare (GnomeDruidPage *druidpage,
- GtkWidget *widget,
- gpointer user_data)
-{
- NetworkManagerVpnUI *vpn_ui;
-
- /*printf ("vpn_confirm_prepare!\n");*/
-
- vpn_ui = (NetworkManagerVpnUI *) g_slist_nth_data (vpn_types, gtk_combo_box_get_active (vpn_type_combo_box));
- if (vpn_ui != NULL) {
- gchar *confirm_text;
-
- vpn_ui->get_confirmation_details (vpn_ui, &confirm_text);
-
- gnome_druid_page_edge_set_text (druid_confirm_page,
- confirm_text);
-
- g_free (confirm_text);
- }
-}
-
-static gboolean vpn_druid_vpn_confirm_page_finish (GnomeDruidPage *druidpage,
- GtkWidget *widget,
- gpointer user_data)
-{
- static int vpncon = 0;
- GSList *conn_data;
- GSList *conn_routes;
- char *conn_name;
- NetworkManagerVpnUI *vpn_ui;
-
- /*printf ("vpn_confirm_finish!\n");*/
-
- vpn_ui = (NetworkManagerVpnUI *) g_slist_nth_data (vpn_types, gtk_combo_box_get_active (vpn_type_combo_box));
- conn_name = vpn_ui->get_connection_name (vpn_ui);
- conn_data = vpn_ui->get_properties (vpn_ui);
- conn_routes = vpn_ui->get_routes (vpn_ui);
-
- add_vpn_connection (conn_name, vpn_ui->get_service_name (vpn_ui), conn_data, conn_routes);
-
- gtk_widget_hide_all (GTK_WIDGET (druid_window));
-out:
- return FALSE;
-}
-
-static gboolean vpn_druid_cancel (GnomeDruid *druid,
- gpointer user_data)
-{
- /*printf ("vpn_druid_cancel!\n");*/
-
- gtk_widget_hide_all (GTK_WIDGET (druid_window));
- return FALSE;
-}
-
-
-
-static void
-add_cb (GtkButton *button, gpointer user_data)
-{
- GtkWidget *w;
- GList *i;
- GList *children;
-
- /*printf ("add_cb\n");*/
-
- /* Bail out if we don't have any VPN implementations on our system */
- if (vpn_types == NULL || g_slist_length (vpn_types) == 0) {
- GtkWidget *dialog;
-
- dialog = gtk_message_dialog_new (NULL,
- GTK_DIALOG_DESTROY_WITH_PARENT,
- GTK_MESSAGE_ERROR,
- GTK_BUTTONS_CLOSE,
- _("Cannot add VPN connection"));
- gtk_message_dialog_format_secondary_text (GTK_MESSAGE_DIALOG (dialog),
- _("No suitable VPN software was found on your system. Contact your system administrator."));
- gtk_dialog_run (GTK_DIALOG (dialog));
- gtk_widget_destroy (dialog);
- goto out;
- }
-
-
- /* remove existing VPN widget */
- children = gtk_container_get_children (GTK_CONTAINER (vpn_type_details));
- for (i = children; i != NULL; i = g_list_next (i)) {
- w = GTK_WIDGET (i->data);
- g_object_ref (G_OBJECT (w));
- gtk_container_remove (GTK_CONTAINER (vpn_type_details), w);
- }
- g_list_free (children);
-
- w = glade_xml_get_widget (xml, "vpn-druid-vpn-start");
- gnome_druid_set_page (druid, GNOME_DRUID_PAGE (w));
-
- gtk_widget_set_sensitive (w, TRUE);
-
- gtk_window_set_policy (druid_window, FALSE, FALSE, TRUE);
-
- gtk_widget_show_all (GTK_WIDGET (druid_window));
-out:
- ;
-}
-
-
-static void
-import_settings (const char *svc_name, const char *name)
-{
- GtkWidget *w;
- GList *i;
- GList *children;
- NetworkManagerVpnUI *vpn_ui;
-
- /*printf ("import_settings svc_name='%s', name='%s' vpn-ui-=\n", svc_name, name);*/
-
- vpn_ui = find_vpn_ui_by_service_name (svc_name);
-
- /* Bail out if we don't have the requested VPN implementation on our system */
- if (vpn_ui == NULL) {
- char *basename;
- GtkWidget *dialog;
-
- basename = g_path_get_basename (name);
-
- dialog = gtk_message_dialog_new (NULL,
- GTK_DIALOG_DESTROY_WITH_PARENT,
- GTK_MESSAGE_ERROR,
- GTK_BUTTONS_CLOSE,
- _("Cannot import VPN connection"));
- gtk_message_dialog_format_secondary_text (GTK_MESSAGE_DIALOG (dialog),
- _("Cannot find suitable software for VPN connection type '%s' to import the file '%s'. Contact your system administrator."),
- svc_name, basename);
- gtk_dialog_run (GTK_DIALOG (dialog));
- gtk_widget_destroy (dialog);
- g_free (basename);
- goto out;
- }
-
- /* remove existing VPN widget */
- children = gtk_container_get_children (GTK_CONTAINER (vpn_type_details));
- for (i = children; i != NULL; i = g_list_next (i)) {
- w = GTK_WIDGET (i->data);
- g_object_ref (G_OBJECT (w));
- gtk_container_remove (GTK_CONTAINER (vpn_type_details), w);
- }
- g_list_free (children);
-
- w = glade_xml_get_widget (xml, "vpn-druid-vpn-details-page");
- gnome_druid_set_page (druid, GNOME_DRUID_PAGE (w));
-
-
- /* show appropriate child */
- w = vpn_ui->get_widget (vpn_ui, NULL, NULL, NULL);
- if (w != NULL) {
- GtkWidget *old_parent;
- gtk_widget_ref (w);
- old_parent = gtk_widget_get_parent (w);
- if (old_parent != NULL)
- gtk_container_remove (GTK_CONTAINER (old_parent), w);
- gtk_container_add (GTK_CONTAINER (vpn_type_details), w);
- gtk_widget_unref (w);
-
- gtk_widget_show_all (w);
- }
- vpn_ui->set_validity_changed_callback (vpn_ui, vpn_druid_vpn_validity_changed, NULL);
-
- vpn_ui->import_file (vpn_ui, name);
-
- gtk_widget_set_sensitive (w, TRUE);
-
- gtk_window_set_policy (druid_window, FALSE, FALSE, TRUE);
- gtk_widget_show_all (GTK_WIDGET (druid_window));
-out:
- ;
-}
-
-
-static void
-vpn_edit_vpn_validity_changed (NetworkManagerVpnUI *vpn_ui,
- gboolean is_valid,
- gpointer user_data)
-{
- const char *orig_conn_name;
- char *conn_name;
- GtkTreeIter iter;
-
- orig_conn_name = (const char *) user_data;
-
- /*printf ("vpn_edit_vpn_validity_changed %d!\n", is_valid);*/
-
- conn_name = vpn_ui->get_connection_name (vpn_ui);
-
- /* get list of existing connection names */
- if (gtk_tree_model_get_iter_first (GTK_TREE_MODEL (vpn_conn_list), &iter)) {
- do {
- char *name;
-
- gtk_tree_model_get (GTK_TREE_MODEL (vpn_conn_list),
- &iter,
- VPNCONN_NAME_COLUMN,
- &name,
- -1);
-
- /* Can override the original name (stored in user_data, see edit_cb()) */
- if (strcmp (name, orig_conn_name) != 0) {
- if (strcmp (name, conn_name) == 0) {
- /*printf ("name '%s' is already in use\n", conn_name);*/
- is_valid = FALSE;
- break;
- }
- }
-
- } while (gtk_tree_model_iter_next (GTK_TREE_MODEL (vpn_conn_list), &iter));
- }
-
- g_free (conn_name);
-
- gtk_dialog_set_response_sensitive (edit_dialog, GTK_RESPONSE_ACCEPT, is_valid);
-
-}
-
-static gboolean
-retrieve_data_from_selected_connection (NetworkManagerVpnUI **vpn_ui,
- GSList **conn_vpn_data,
- GSList **conn_routes,
- const char **conn_name,
- char **conn_gconf_path)
-{
- gboolean result;
- const char *conn_service_name;
- GSList *conn_vpn_data_gconfvalue;
- GSList *conn_routes_gconfvalue;
- GSList *i;
- char key[PATH_MAX];
- GtkTreeSelection *selection;
- GtkTreeIter iter;
- GConfValue *value;
-
- result = FALSE;
-
- if ((selection = gtk_tree_view_get_selection (vpn_conn_view)) == NULL)
- goto out;
-
- if (!gtk_tree_selection_get_selected (selection, NULL, &iter))
- goto out;
-
- gtk_tree_model_get (GTK_TREE_MODEL (vpn_conn_list),
- &iter,
- VPNCONN_GCONF_COLUMN,
- conn_gconf_path,
- -1);
-
- g_snprintf (key, sizeof (key), "%s/name", *conn_gconf_path);
- if ((value = gconf_client_get (gconf_client, key, NULL)) == NULL ||
- (*conn_name = gconf_value_get_string (value)) == NULL)
- goto out;
-
- g_snprintf (key, sizeof (key), "%s/service_name", *conn_gconf_path);
- if ((value = gconf_client_get (gconf_client, key, NULL)) == NULL ||
- (conn_service_name = gconf_value_get_string (value)) == NULL)
- goto out;
-
- *vpn_ui = find_vpn_ui_by_service_name (conn_service_name);
- if (*vpn_ui == NULL) {
- GtkWidget *dialog;
-
- dialog = gtk_message_dialog_new (NULL,
- GTK_DIALOG_DESTROY_WITH_PARENT,
- GTK_MESSAGE_ERROR,
- GTK_BUTTONS_CLOSE,
- _("Error retrieving VPN connection '%s'"),
- *conn_name);
- gtk_message_dialog_format_secondary_text (GTK_MESSAGE_DIALOG (dialog),
- _("Could not find the UI files for VPN connection type '%s'. Contact your system administrator."),
- conn_service_name);
- gtk_dialog_run (GTK_DIALOG (dialog));
- gtk_widget_destroy (dialog);
- goto out;
- }
-
- g_snprintf (key, sizeof (key), "%s/vpn_data", *conn_gconf_path);
- if ((value = gconf_client_get (gconf_client, key, NULL)) == NULL ||
- gconf_value_get_list_type (value) != GCONF_VALUE_STRING ||
- (conn_vpn_data_gconfvalue = gconf_value_get_list (value)) == NULL)
- goto out;
-
- *conn_vpn_data = NULL;
- for (i = conn_vpn_data_gconfvalue; i != NULL; i = g_slist_next (i)) {
- const char *value;
- value = gconf_value_get_string ((GConfValue *) i->data);
- *conn_vpn_data = g_slist_append (*conn_vpn_data, (gpointer) value);
- }
-
-
- /* routes may be an empty list */
- g_snprintf (key, sizeof (key), "%s/routes", *conn_gconf_path);
- if ((value = gconf_client_get (gconf_client, key, NULL)) == NULL ||
- gconf_value_get_list_type (value) != GCONF_VALUE_STRING)
- goto out;
-
- conn_routes_gconfvalue = gconf_value_get_list (value);
- *conn_routes = NULL;
- for (i = conn_routes_gconfvalue; i != NULL; i = g_slist_next (i)) {
- const char *value;
- value = gconf_value_get_string ((GConfValue *) i->data);
- *conn_routes = g_slist_append (*conn_routes, (gpointer) value);
- }
-
- result = TRUE;
-
-out:
- return result;
-}
-
-static void
-edit_cb (GtkButton *button, gpointer user_data)
-{
- gint result;
- GtkWidget *vpn_edit_widget;
- NetworkManagerVpnUI *vpn_ui;
- GSList *conn_vpn_data;
- GSList *conn_routes;
- const char *conn_name;
- char key[PATH_MAX];
- char *conn_gconf_path;
- GtkTreeIter iter;
-
- /*printf ("edit\n");*/
-
- if (!retrieve_data_from_selected_connection (&vpn_ui, &conn_vpn_data, &conn_routes, &conn_name, &conn_gconf_path))
- goto out;
-
- vpn_edit_widget = vpn_ui->get_widget (vpn_ui, conn_vpn_data, conn_routes, conn_name);
-
- g_slist_free (conn_vpn_data);
- g_slist_free (conn_routes);
-
- vpn_ui->set_validity_changed_callback (vpn_ui, vpn_edit_vpn_validity_changed, (gpointer) conn_name);
-
- gtk_widget_reparent (vpn_edit_widget, GTK_WIDGET (edit_dialog->vbox));
-
- gtk_widget_show_all (vpn_edit_widget);
- /*gtk_widget_set_sensitive (vpn_edit_widget, TRUE);*/
-
- /* auto-shrink our window */
- gtk_window_set_policy (GTK_WINDOW (edit_dialog), FALSE, FALSE, TRUE);
-
- gtk_widget_show (GTK_WIDGET (edit_dialog));
-
- result = gtk_dialog_run (GTK_DIALOG (edit_dialog));
-
- if (result == GTK_RESPONSE_ACCEPT) {
- char *new_conn_name;
- GSList *new_conn_data;
- GSList *new_conn_routes;
-
- new_conn_name = vpn_ui->get_connection_name (vpn_ui);
- new_conn_data = vpn_ui->get_properties (vpn_ui);
- new_conn_routes = vpn_ui->get_routes (vpn_ui);
-
- if (strcmp (new_conn_name, conn_name) == 0) {
-
- /* same name, just update properties and routes */
- g_snprintf (key, sizeof (key), "%s/vpn_data", conn_gconf_path);
- gconf_client_set_list (gconf_client, key, GCONF_VALUE_STRING, new_conn_data, NULL);
- g_snprintf (key, sizeof (key), "%s/routes", conn_gconf_path);
- gconf_client_set_list (gconf_client, key, GCONF_VALUE_STRING, new_conn_routes, NULL);
-
- gconf_client_suggest_sync (gconf_client, NULL);
- } else {
-
- /* remove old entry */
- g_snprintf (key, sizeof (key), "%s/name", conn_gconf_path);
- gconf_client_unset (gconf_client, key, NULL);
- g_snprintf (key, sizeof (key), "%s/service_name", conn_gconf_path);
- gconf_client_unset (gconf_client, key, NULL);
- g_snprintf (key, sizeof (key), "%s/vpn_data", conn_gconf_path);
- gconf_client_unset (gconf_client, key, NULL);
- /* TODO: at some point remove routes and user_name */
- g_snprintf (key, sizeof (key), "%s/routes", conn_gconf_path);
- gconf_client_unset (gconf_client, key, NULL);
- g_snprintf (key, sizeof (key), "%s/user_name", conn_gconf_path);
- gconf_client_unset (gconf_client, key, NULL);
- gconf_client_unset (gconf_client, conn_gconf_path, NULL);
- gconf_client_suggest_sync (gconf_client, NULL);
- gtk_list_store_remove (vpn_conn_list, &iter);
-
- /* add new entry */
- add_vpn_connection (new_conn_name, vpn_ui->get_service_name (vpn_ui),
- new_conn_data, new_conn_routes);
- }
-
- if (new_conn_data != NULL) {
- g_slist_foreach (new_conn_data, (GFunc)g_free, NULL);
- g_slist_free (new_conn_data);
- }
- if (new_conn_routes != NULL) {
- g_slist_foreach (new_conn_routes, (GFunc)g_free, NULL);
- g_slist_free (new_conn_routes);
- }
-
-
- }
-
- gtk_widget_hide (GTK_WIDGET (edit_dialog));
-
-out:
- ;
-}
-
-static void
-delete_cb (GtkButton *button, gpointer user_data)
-{
- GtkTreeIter iter;
- GtkTreeSelection *selection;
- gchar *conn_gconf_path;
- gchar *conn_name;
- GtkWidget *dialog;
- int response;
-
- /*printf ("delete\n");*/
-
- if ((selection = gtk_tree_view_get_selection (vpn_conn_view)) == NULL)
- goto out;
-
- if (!gtk_tree_selection_get_selected (selection, NULL, &iter))
- goto out;
-
- gtk_tree_model_get (GTK_TREE_MODEL (vpn_conn_list), &iter, VPNCONN_NAME_COLUMN, &conn_name, -1);
- dialog = gtk_message_dialog_new (NULL,
- GTK_DIALOG_DESTROY_WITH_PARENT,
- GTK_MESSAGE_WARNING,
- GTK_BUTTONS_CANCEL,
- _("Delete VPN connection \"%s\"?"), conn_name);
- gtk_dialog_add_buttons (GTK_DIALOG (dialog), "_Delete", GTK_RESPONSE_OK, NULL);
- gtk_message_dialog_format_secondary_text (GTK_MESSAGE_DIALOG (dialog),
- _("All information about the VPN connection \"%s\" will be lost and you may need your system administrator to provide information to create a new connection."), conn_name);
- response = gtk_dialog_run (GTK_DIALOG (dialog));
- gtk_widget_destroy (dialog);
-
- if (response != GTK_RESPONSE_OK)
- goto out;
-
- gtk_tree_model_get (GTK_TREE_MODEL (vpn_conn_list), &iter, VPNCONN_GCONF_COLUMN, &conn_gconf_path, -1);
-
- if (conn_gconf_path != NULL) {
- char key[PATH_MAX];
-
- g_snprintf (key, sizeof (key), "%s/name", conn_gconf_path);
- gconf_client_unset (gconf_client, key, NULL);
- g_snprintf (key, sizeof (key), "%s/service_name", conn_gconf_path);
- gconf_client_unset (gconf_client, key, NULL);
- g_snprintf (key, sizeof (key), "%s/vpn_data", conn_gconf_path);
- gconf_client_unset (gconf_client, key, NULL);
- g_snprintf (key, sizeof (key), "%s/routes", conn_gconf_path);
- gconf_client_unset (gconf_client, key, NULL);
- /* TODO: remove user_name */
- g_snprintf (key, sizeof (key), "%s/user_name", conn_gconf_path);
- gconf_client_unset (gconf_client, key, NULL);
- gconf_client_unset (gconf_client, conn_gconf_path, NULL);
-
- gconf_client_suggest_sync (gconf_client, NULL);
-
- if (gtk_list_store_remove (vpn_conn_list, &iter))
- gtk_tree_selection_select_iter (selection, &iter);
- }
-
- update_edit_del_sensitivity ();
-
-out:
- ;
-}
-
-static void
-close_cb (void)
-{
- gtk_widget_destroy (dialog);
- gtk_main_quit ();
-}
-
-static void
-export_cb (GtkButton *button, gpointer user_data)
-{
- NetworkManagerVpnUI *vpn_ui;
- GSList *conn_vpn_data;
- GSList *conn_routes;
- const char *conn_name;
- char key[PATH_MAX];
- char *conn_gconf_path;
- GtkTreeIter iter;
-
- /*printf ("edit\n");*/
-
- if (!retrieve_data_from_selected_connection (&vpn_ui, &conn_vpn_data, &conn_routes, &conn_name, &conn_gconf_path))
- goto out;
-
- vpn_ui->export (vpn_ui, conn_vpn_data, conn_routes, conn_name);
-
-out:
- ;
-}
-
-static void get_all_vpn_connections (void)
-{
- GtkTreeIter iter;
- GSList *vpn_conn = NULL;
-
- for (vpn_conn = gconf_client_all_dirs (gconf_client, NM_GCONF_VPN_CONNECTIONS_PATH, NULL);
- vpn_conn != NULL;
- vpn_conn = g_slist_next (vpn_conn)) {
- char key[PATH_MAX];
- GConfValue *value;
- const char *conn_gconf_path;
- const char *conn_name;
- const char *conn_service_name;
- GSList *conn_vpn_data;
- GSList *i;
- gboolean conn_user_can_edit = TRUE;
-
- conn_gconf_path = (const char *) (vpn_conn->data);
-
- g_snprintf (key, sizeof (key), "%s/name", conn_gconf_path);
- conn_user_can_edit = gconf_client_key_is_writable (gconf_client, key, NULL);
- if ((value = gconf_client_get (gconf_client, key, NULL)) == NULL ||
- (conn_name = gconf_value_get_string (value)) == NULL)
- goto error;
-
- g_snprintf (key, sizeof (key), "%s/service_name", conn_gconf_path);
- if ((value = gconf_client_get (gconf_client, key, NULL)) == NULL ||
- (conn_service_name = gconf_value_get_string (value)) == NULL)
- goto error;
-
- g_snprintf (key, sizeof (key), "%s/vpn_data", conn_gconf_path);
- if ((value = gconf_client_get (gconf_client, key, NULL)) == NULL ||
- gconf_value_get_list_type (value) != GCONF_VALUE_STRING ||
- (conn_vpn_data = gconf_value_get_list (value)) == NULL)
- goto error;
-
- //conn_user_can_edit = (strcmp (conn_name, "RH VPN Boston") != 0);
-
- gtk_list_store_append (vpn_conn_list, &iter);
- gtk_list_store_set (vpn_conn_list, &iter,
- VPNCONN_NAME_COLUMN, conn_name,
- VPNCONN_SVC_NAME_COLUMN, conn_service_name,
- VPNCONN_GCONF_COLUMN, conn_gconf_path,
- VPNCONN_USER_CAN_EDIT_COLUMN, conn_user_can_edit,
- -1);
-
- /*
- printf ("conn_name = '%s'\n", conn_name);
- printf ("conn_service_name = '%s'\n", conn_service_name);
- printf ("conn_vpn_data = {");
- {
- GSList *i;
- for (i = conn_vpn_data; i != NULL; i = g_slist_next (i)) {
- printf ("'%s'", gconf_value_get_string ((GConfValue *) i->data));
- if (g_slist_next (i) != NULL)
- printf (", ");
- }
- printf ("}\n");
- }
- */
-
-error:
- g_free (vpn_conn->data);
- }
-
-out:
- ;
-}
-
-static void
-vpn_list_cursor_changed_cb (GtkTreeView *treeview,
- gpointer user_data)
-{
- /*printf ("*** vpn_list_cursor_changed_cb\n");*/
-
- update_edit_del_sensitivity ();
-}
-
-/* TODO: remove these once we get the GModule thing going */
-//extern NetworkManagerVpnUI* vpn_ui_factory_vpnc (void);
-extern NetworkManagerVpnUI* vpn_ui_factory_dummy (void);
-
-static void
-load_properties_module (GSList **vpn_types, const char *path)
-{
- GModule *module;
- NetworkManagerVpnUI* (*nm_vpn_properties_factory) (void) = NULL;
- NetworkManagerVpnUI* impl;
-
- module = g_module_open (path, G_MODULE_BIND_LAZY);
- if (module == NULL) {
- g_warning ("Cannot open module '%s'", path);
- goto out;
- }
-
- if (!g_module_symbol (module, "nm_vpn_properties_factory",
- (gpointer *) &nm_vpn_properties_factory)) {
-
- g_warning ("Cannot locate function 'nm_vpn_properties_factory' in '%s': %s",
- path, g_module_error ());
- g_module_close (module);
- goto out;
- }
-
- impl = nm_vpn_properties_factory ();
- if (impl == NULL) {
- g_warning ("Function 'nm_vpn_properties_factory' in '%s' returned NULL", path);
- g_module_close (module);
- goto out;
- }
-
- *vpn_types = g_slist_append (*vpn_types, impl);
-
-out:
- ;
-}
-
-#define VPN_NAME_FILES_DIR "/etc/NetworkManager/VPN"
-
-static gboolean
-init_app (void)
-{
- GtkWidget *w;
- gchar *glade_file;
- char *file;
- GtkTreeIter iter;
- GtkTreeViewColumn *column;
- GtkCellRenderer *renderer;
- GSList *i;
- NetworkManagerVpnUI *vpn_ui_interface;
- GtkHBox *vpn_type_hbox1;
- GDir *dir;
-
- /* TODO: ensure only one copy of this program is running at any time */
-
- gconf_client = gconf_client_get_default ();
- gconf_client_add_dir (gconf_client, NM_GCONF_VPN_CONNECTIONS_PATH,
- GCONF_CLIENT_PRELOAD_ONELEVEL, NULL);
-
- glade_file = g_strdup_printf ("%s/%s", GLADEDIR, "nm-vpn-properties.glade");
- xml = glade_xml_new (glade_file, NULL, NULL);
- g_free (glade_file);
- if (!xml) {
- GtkWidget *dialog;
-
- dialog = gtk_message_dialog_new (NULL,
- GTK_DIALOG_DESTROY_WITH_PARENT,
- GTK_MESSAGE_ERROR,
- GTK_BUTTONS_CLOSE,
- _("Unable to load"));
- gtk_message_dialog_format_secondary_text (GTK_MESSAGE_DIALOG (dialog),
- _("Cannot find some needed resources (the glade file)!"));
- gtk_dialog_run (GTK_DIALOG (dialog));
- gtk_widget_destroy (dialog);
-
- return FALSE;
- }
-
- /* Load all VPN UI modules by inspecting .name files */
- vpn_types = NULL;
- if ((dir = g_dir_open (VPN_NAME_FILES_DIR, 0, NULL)) != NULL) {
- const char *f;
-
- while ((f = g_dir_read_name (dir)) != NULL) {
- char *path;
- GKeyFile *keyfile;
-
- if (!g_str_has_suffix (f, ".name"))
- continue;
-
- path = g_strdup_printf ("%s/%s", VPN_NAME_FILES_DIR, f);
-
- keyfile = g_key_file_new ();
- if (g_key_file_load_from_file (keyfile, path, 0, NULL)) {
- char *so_path;
-
- if ((so_path = g_key_file_get_string (keyfile,
- "GNOME",
- "properties", NULL)) != NULL) {
- load_properties_module (&vpn_types, so_path);
- g_free (so_path);
- }
- }
- g_key_file_free (keyfile);
- g_free (path);
- }
- g_dir_close (dir);
- }
-
- dialog = glade_xml_get_widget (xml, "vpn-ui-properties");
-
- vpn_type_details = GTK_VBOX (glade_xml_get_widget (xml, "vpn-connection-druid-details-box"));
-
- w = glade_xml_get_widget (xml, "add");
- gtk_signal_connect (GTK_OBJECT (w), "clicked", GTK_SIGNAL_FUNC (add_cb), NULL);
- vpn_edit = glade_xml_get_widget (xml, "edit");
- gtk_signal_connect (GTK_OBJECT (vpn_edit), "clicked", GTK_SIGNAL_FUNC (edit_cb), NULL);
- vpn_export = glade_xml_get_widget (xml, "export");
- gtk_signal_connect (GTK_OBJECT (vpn_export), "clicked", GTK_SIGNAL_FUNC (export_cb), NULL);
- vpn_delete = glade_xml_get_widget (xml, "delete");
- gtk_signal_connect (GTK_OBJECT (vpn_delete), "clicked", GTK_SIGNAL_FUNC (delete_cb), NULL);
- w = glade_xml_get_widget (xml, "close");
- gtk_signal_connect (GTK_OBJECT (w), "clicked",
- GTK_SIGNAL_FUNC (close_cb), NULL);
- gtk_signal_connect (GTK_OBJECT (dialog), "delete_event",
- GTK_SIGNAL_FUNC (close_cb), NULL);
-
-
- vpn_conn_view = GTK_TREE_VIEW (glade_xml_get_widget (xml, "vpnlist"));
- vpn_conn_list = gtk_list_store_new (VPNCONN_N_COLUMNS, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_BOOLEAN);
-
- gtk_signal_connect_after (GTK_OBJECT (vpn_conn_view), "cursor-changed",
- GTK_SIGNAL_FUNC (vpn_list_cursor_changed_cb), NULL);
-
-
- get_all_vpn_connections ();
-
-
-
- column = gtk_tree_view_column_new ();
- renderer = gtk_cell_renderer_text_new ();
- gtk_tree_view_column_pack_start (column, renderer, TRUE);
- gtk_tree_view_column_set_attributes (column, renderer,
- "text", VPNCONN_NAME_COLUMN,
- NULL);
- gtk_tree_view_append_column (vpn_conn_view, column);
-
- gtk_tree_view_set_model (vpn_conn_view, GTK_TREE_MODEL (vpn_conn_list));
- gtk_tree_view_expand_all (vpn_conn_view);
-
-
- gtk_widget_show_all (dialog);
-
- /* fill in possibly choices in the druid when adding a connection */
- vpn_type_hbox1 = GTK_HBOX (glade_xml_get_widget (xml, "vpn-create-connection-druid-hbox1"));
- vpn_type_combo_box = GTK_COMBO_BOX (gtk_combo_box_new_text ());
- for (i = vpn_types; i != NULL; i = g_slist_next (i)) {
- NetworkManagerVpnUI *vpn_ui = i->data;
- gtk_combo_box_append_text (vpn_type_combo_box, vpn_ui->get_display_name (vpn_ui));
-
- }
- gtk_combo_box_set_active (vpn_type_combo_box, 0);
- gtk_box_pack_end (GTK_BOX (vpn_type_hbox1), GTK_WIDGET (vpn_type_combo_box), TRUE, TRUE, 0);
-
-
- /* Druid */
- druid = GNOME_DRUID (glade_xml_get_widget (xml, "vpn-create-connection-druid"));
- gtk_signal_connect (GTK_OBJECT (druid), "cancel", GTK_SIGNAL_FUNC (vpn_druid_cancel), NULL);
- druid_confirm_page = GNOME_DRUID_PAGE_EDGE (glade_xml_get_widget (xml, "vpn-druid-vpn-confirm-page"));
- /* use connect_after, otherwise gnome_druid_set_buttons_sensitive() won't work in prepare handlers */
- w = glade_xml_get_widget (xml, "vpn-druid-vpn-type-page");
- gtk_signal_connect_after (GTK_OBJECT (w), "next", GTK_SIGNAL_FUNC (vpn_druid_vpn_type_page_next), NULL);
- w = glade_xml_get_widget (xml, "vpn-druid-vpn-details-page");
- gtk_signal_connect_after (GTK_OBJECT (w), "prepare", GTK_SIGNAL_FUNC (vpn_druid_vpn_details_page_prepare), NULL);
- gtk_signal_connect_after (GTK_OBJECT (w), "next", GTK_SIGNAL_FUNC (vpn_druid_vpn_details_page_next), NULL);
- w = glade_xml_get_widget (xml, "vpn-druid-vpn-confirm-page");
- gtk_signal_connect_after (GTK_OBJECT (w), "prepare", GTK_SIGNAL_FUNC (vpn_druid_vpn_confirm_page_prepare), NULL);
- gtk_signal_connect_after (GTK_OBJECT (w), "finish", GTK_SIGNAL_FUNC (vpn_druid_vpn_confirm_page_finish), NULL);
-
- druid_window = GTK_WINDOW (glade_xml_get_widget (xml, "vpn-create-connection"));
- /* reuse the widget */
- gtk_signal_connect (GTK_OBJECT (druid_window), "delete-event",
- GTK_SIGNAL_FUNC (gtk_widget_hide_on_delete), NULL);
- /* make the druid window modal wrt. our main window */
- gtk_window_set_modal (druid_window, TRUE);
- gtk_window_set_transient_for (druid_window, GTK_WINDOW (dialog));
-
-
- /* Edit dialog */
- edit_dialog = GTK_DIALOG (gtk_dialog_new_with_buttons (_("Edit VPN Connection"),
- NULL,
- GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT,
- GTK_STOCK_CANCEL,
- GTK_RESPONSE_REJECT,
- GTK_STOCK_APPLY,
- GTK_RESPONSE_ACCEPT,
- NULL));
- /* reuse the widget */
- gtk_signal_connect (GTK_OBJECT (edit_dialog), "delete-event",
- GTK_SIGNAL_FUNC (gtk_widget_hide_on_delete), NULL);
-
-
- /* update "Edit" and "Delete" for current selection */
- update_edit_del_sensitivity ();
-
- return TRUE;
-}
-
-
-int
-main (int argc, char *argv[])
-{
- GOptionContext *context;
- int ret = 1;
- gboolean bad_opts;
- gboolean do_import;
- GError *error = NULL;
- static gchar *import_svc = NULL;
- static gchar *import_file = NULL;
- static GOptionEntry entries[] =
- {
- { "import-service", 's', 0,G_OPTION_ARG_STRING, &import_svc, "VPN Service for importing", NULL},
- { "import-file", 'f', 0, G_OPTION_ARG_STRING, &import_file, "File to import", NULL},
- { NULL }
- };
-
- bindtextdomain (GETTEXT_PACKAGE, NULL);
- bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
- textdomain (GETTEXT_PACKAGE);
-
- context = g_option_context_new ("- NetworkManager VPN properties");
- g_option_context_add_main_entries (context, entries, GETTEXT_PACKAGE);
- g_option_context_add_group (context, gtk_get_option_group (TRUE));
- g_option_context_parse (context, &argc, &argv, &error);
-
- bad_opts = FALSE;
- do_import = FALSE;
- if (import_svc != NULL) {
- if (import_file != NULL) {
- do_import = TRUE;
- } else {
- bad_opts = TRUE;
- }
- } else {
- if (import_file != NULL) {
- bad_opts = TRUE;
- }
- }
-
- if (bad_opts) {
- fprintf (stderr, "Have to supply both service and file\n");
- goto out;
- }
-
- gnome_program_init (GETTEXT_PACKAGE, VERSION, LIBGNOMEUI_MODULE, argc, argv,
- GNOME_PARAM_NONE);
-
- glade_gnome_init ();
-
- if (init_app () == FALSE) {
- ret = 1;
- goto out;
- }
-
- if (do_import) {
- import_settings (import_svc, import_file);
- }
-
- gtk_main ();
-
- ret = 0;
-
-out:
- return ret;
-}
diff --git a/gnome/vpn-properties/nm-vpn-properties.glade b/gnome/vpn-properties/nm-vpn-properties.glade
deleted file mode 100644
index 67bbf5de28..0000000000
--- a/gnome/vpn-properties/nm-vpn-properties.glade
+++ /dev/null
@@ -1,417 +0,0 @@
-<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
-<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd">
-
-<glade-interface>
-<requires lib="gnome"/>
-
-<widget class="GtkWindow" id="vpn-ui-properties">
- <property name="border_width">5</property>
- <property name="width_request">400</property>
- <property name="height_request">300</property>
- <property name="title" translatable="yes">VPN Connections</property>
- <property name="type">GTK_WINDOW_TOPLEVEL</property>
- <property name="window_position">GTK_WIN_POS_CENTER</property>
- <property name="modal">False</property>
- <property name="resizable">True</property>
- <property name="destroy_with_parent">False</property>
- <property name="decorated">True</property>
- <property name="skip_taskbar_hint">False</property>
- <property name="skip_pager_hint">False</property>
- <property name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property>
- <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
- <property name="focus_on_map">True</property>
-
- <child>
- <widget class="GtkVBox" id="vbox23">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">0</property>
-
- <child>
- <widget class="GtkLabel" id="label29">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Manage Virtual Private Network connections</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0</property>
- <property name="yalign">0</property>
- <property name="xpad">6</property>
- <property name="ypad">11</property>
- <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
- <property name="width_chars">-1</property>
- <property name="single_line_mode">False</property>
- <property name="angle">0</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkHBox" id="hbox70">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">0</property>
-
- <child>
- <widget class="GtkScrolledWindow" id="scrolledwindow1">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
- <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
- <property name="shadow_type">GTK_SHADOW_IN</property>
- <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
-
- <child>
- <widget class="GtkTreeView" id="vpnlist">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="headers_visible">False</property>
- <property name="rules_hint">False</property>
- <property name="reorderable">False</property>
- <property name="enable_search">False</property>
- <property name="fixed_height_mode">False</property>
- <property name="hover_selection">False</property>
- <property name="hover_expand">False</property>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkVButtonBox" id="vbuttonbox1">
- <property name="border_width">6</property>
- <property name="visible">True</property>
- <property name="layout_style">GTK_BUTTONBOX_START</property>
- <property name="spacing">12</property>
-
- <child>
- <widget class="GtkButton" id="add">
- <property name="visible">True</property>
- <property name="tooltip" translatable="yes">Add a new VPN connection</property>
- <property name="can_default">True</property>
- <property name="can_focus">True</property>
- <property name="label">gtk-add</property>
- <property name="use_stock">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="focus_on_click">True</property>
- </widget>
- </child>
-
- <child>
- <widget class="GtkButton" id="edit">
- <property name="visible">True</property>
- <property name="tooltip" translatable="yes">Edit the selected VPN connection</property>
- <property name="can_default">True</property>
- <property name="can_focus">True</property>
- <property name="label">gtk-edit</property>
- <property name="use_stock">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="focus_on_click">True</property>
- </widget>
- </child>
-
- <child>
- <widget class="GtkButton" id="export">
- <property name="visible">True</property>
- <property name="tooltip" translatable="yes">Export VPN connection to a file</property>
- <property name="can_default">True</property>
- <property name="can_focus">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="focus_on_click">True</property>
-
- <child>
- <widget class="GtkAlignment" id="alignment1">
- <property name="visible">True</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xscale">0</property>
- <property name="yscale">0</property>
- <property name="top_padding">0</property>
- <property name="bottom_padding">0</property>
- <property name="left_padding">0</property>
- <property name="right_padding">0</property>
-
- <child>
- <widget class="GtkHBox" id="hbox71">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">2</property>
-
- <child>
- <widget class="GtkImage" id="image1">
- <property name="visible">True</property>
- <property name="stock">gtk-save</property>
- <property name="icon_size">4</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label33">
- <property name="visible">True</property>
- <property name="label" translatable="yes">E_xport</property>
- <property name="use_underline">True</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
- <property name="width_chars">-1</property>
- <property name="single_line_mode">False</property>
- <property name="angle">0</property>
- <accessibility>
- <atkproperty name="AtkObject::accessible_description" translatable="yes">Export the VPN settings to a file</atkproperty>
- </accessibility>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
- </widget>
- </child>
- </widget>
- </child>
- </widget>
- </child>
-
- <child>
- <widget class="GtkButton" id="delete">
- <property name="visible">True</property>
- <property name="tooltip" translatable="yes">Delete the selected VPN connection</property>
- <property name="can_default">True</property>
- <property name="can_focus">True</property>
- <property name="label">gtk-delete</property>
- <property name="use_stock">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="focus_on_click">True</property>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">True</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkHButtonBox" id="hbuttonbox1">
- <property name="border_width">6</property>
- <property name="visible">True</property>
- <property name="layout_style">GTK_BUTTONBOX_END</property>
- <property name="spacing">0</property>
-
- <child>
- <widget class="GtkButton" id="close">
- <property name="visible">True</property>
- <property name="can_default">True</property>
- <property name="can_focus">True</property>
- <property name="label">gtk-close</property>
- <property name="use_stock">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="focus_on_click">True</property>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
- </widget>
- </child>
-</widget>
-
-<widget class="GtkWindow" id="vpn-create-connection">
- <property name="title" translatable="yes">Create VPN Connection</property>
- <property name="type">GTK_WINDOW_TOPLEVEL</property>
- <property name="window_position">GTK_WIN_POS_NONE</property>
- <property name="modal">False</property>
- <property name="resizable">True</property>
- <property name="destroy_with_parent">False</property>
- <property name="decorated">True</property>
- <property name="skip_taskbar_hint">False</property>
- <property name="skip_pager_hint">False</property>
- <property name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property>
- <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
- <property name="focus_on_map">True</property>
-
- <child>
- <widget class="GnomeDruid" id="vpn-create-connection-druid">
- <property name="border_width">4</property>
- <property name="visible">True</property>
- <property name="show_help">False</property>
-
- <child>
- <widget class="GnomeDruidPageEdge" id="vpn-druid-vpn-start">
- <property name="visible">True</property>
- <property name="position">GNOME_EDGE_START</property>
- <property name="title" translatable="yes">Create VPN Connection</property>
- <property name="text" translatable="yes">This assistant will guide you through the creation of a new VPN connection to a private network.
-
-It will require some information, such as IP addresses and secrets, that will probably be provided by your system administrator as appropriate.</property>
- </widget>
- </child>
-
- <child>
- <widget class="GnomeDruidPageStandard" id="vpn-druid-vpn-type-page">
- <property name="visible">True</property>
- <property name="title" translatable="yes">Create VPN Connection - 1 of 2</property>
-
- <child internal-child="vbox">
- <widget class="GtkVBox" id="druid-vbox4">
- <property name="border_width">16</property>
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">6</property>
-
- <child>
- <widget class="GtkVBox" id="vbox24">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">0</property>
-
- <child>
- <widget class="GtkLabel" id="label31">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Dependent on the private network you want to connect to, you need to select what type of connection you want to create.</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">True</property>
- <property name="selectable">False</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xpad">12</property>
- <property name="ypad">0</property>
- <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
- <property name="width_chars">-1</property>
- <property name="single_line_mode">False</property>
- <property name="angle">0</property>
- </widget>
- <packing>
- <property name="padding">12</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkHBox" id="vpn-create-connection-druid-hbox1">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">0</property>
-
- <child>
- <widget class="GtkLabel" id="label32">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Connect to:</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
- <property name="width_chars">-1</property>
- <property name="single_line_mode">False</property>
- <property name="angle">0</property>
- </widget>
- <packing>
- <property name="padding">12</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <placeholder/>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">False</property>
- </packing>
- </child>
- </widget>
- </child>
- </widget>
- </child>
-
- <child>
- <widget class="GnomeDruidPageStandard" id="vpn-druid-vpn-details-page">
- <property name="visible">True</property>
- <property name="title" translatable="yes">Create VPN Connection - 2 of 2</property>
-
- <child internal-child="vbox">
- <widget class="GtkVBox" id="vpn-connection-druid-details-box">
- <property name="border_width">16</property>
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">6</property>
-
- <child>
- <placeholder/>
- </child>
- </widget>
- </child>
- </widget>
- </child>
-
- <child>
- <widget class="GnomeDruidPageEdge" id="vpn-druid-vpn-confirm-page">
- <property name="visible">True</property>
- <property name="position">GNOME_EDGE_FINISH</property>
- <property name="title" translatable="yes">Finish create VPN Connection</property>
- <property name="text" translatable="yes"></property>
- </widget>
- </child>
- </widget>
- </child>
-</widget>
-
-</glade-interface>
diff --git a/gnome/vpn-properties/nm-vpn-ui-interface.h b/gnome/vpn-properties/nm-vpn-ui-interface.h
deleted file mode 100644
index 8c1f5c0981..0000000000
--- a/gnome/vpn-properties/nm-vpn-ui-interface.h
+++ /dev/null
@@ -1,84 +0,0 @@
-/***************************************************************************
- * CVSID: $Id$
- *
- * nm-vpn-ui-interface.h : Public interface for VPN UI editing widgets
- *
- * Copyright (C) 2005 David Zeuthen, <davidz@redhat.com>
- *
- * ===
- * NOTE NOTE NOTE: All source for nm-vpn-properties is licensed to you
- * under your choice of the Academic Free License version 2.0, or the
- * GNU General Public License version 2.
- * ===
- *
- * Licensed under the Academic Free License version 2.0
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- *
- **************************************************************************/
-
-#ifndef NM_VPN_UI_INTERFACE_H
-#define NM_VPN_UI_INTERFACE_H
-
-#ifndef NM_VPN_API_SUBJECT_TO_CHANGE
-#error "Please define NM_VPN_API_SUBJECT_TO_CHANGE to acknowledge your understanding that NetworkManager hasn't reached 1.0 and is subject to protocol and API churn. See the README for a full explanation."
-#endif
-
-#include <gtk/gtk.h>
-
-struct _NetworkManagerVpnUI;
-typedef struct _NetworkManagerVpnUI NetworkManagerVpnUI;
-
-typedef void (*NetworkManagerVpnUIDialogValidityCallback) (NetworkManagerVpnUI *self,
- gboolean is_valid,
- gpointer user_data);
-
-
-struct _NetworkManagerVpnUI {
- const char *(*get_display_name) (NetworkManagerVpnUI *self);
-
- const char *(*get_service_name) (NetworkManagerVpnUI *self);
-
- GtkWidget *(*get_widget) (NetworkManagerVpnUI *self, GSList *properties, GSList *routes, const char *connection_name);
-
- void (*set_validity_changed_callback) (NetworkManagerVpnUI *self,
- NetworkManagerVpnUIDialogValidityCallback cb,
- gpointer user_data);
-
- gboolean (*is_valid) (NetworkManagerVpnUI *self);
-
- /*
- * get_confirmation_details:
- * retval is allocated and must be freed
- */
- void (*get_confirmation_details)(NetworkManagerVpnUI *self, gchar **retval);
-
- char *(*get_connection_name) (NetworkManagerVpnUI *self);
-
- GSList *(*get_properties) (NetworkManagerVpnUI *self);
-
- GSList *(*get_routes) (NetworkManagerVpnUI *self);
-
- gboolean (*can_export) (NetworkManagerVpnUI *self);
-
- gboolean (*import_file) (NetworkManagerVpnUI *self, const char *path);
-
- gboolean (*export) (NetworkManagerVpnUI *self, GSList *properties, GSList *routes, const char *connection_name);
-
- gpointer data;
-};
-
-#endif /* NM_VPN_UI_INTERFACE_H */
-
diff --git a/initscript/.cvsignore b/initscript/.cvsignore
deleted file mode 100644
index 372449d46c..0000000000
--- a/initscript/.cvsignore
+++ /dev/null
@@ -1,3 +0,0 @@
-Makefile
-Makefile.in
-NMLaunchHelper
diff --git a/initscript/Debian/.cvsignore b/initscript/Debian/.cvsignore
deleted file mode 100644
index 282522db03..0000000000
--- a/initscript/Debian/.cvsignore
+++ /dev/null
@@ -1,2 +0,0 @@
-Makefile
-Makefile.in
diff --git a/initscript/Debian/Makefile.am b/initscript/Debian/Makefile.am
deleted file mode 100644
index 85954b839d..0000000000
--- a/initscript/Debian/Makefile.am
+++ /dev/null
@@ -1,4 +0,0 @@
-EXTRA_DIST = NetworkManager
-
-initddir = $(sysconfdir)/init.d
-initd_SCRIPTS = NetworkManager
diff --git a/initscript/Debian/NetworkManager b/initscript/Debian/NetworkManager
deleted file mode 100755
index 5d5666ccb2..0000000000
--- a/initscript/Debian/NetworkManager
+++ /dev/null
@@ -1,72 +0,0 @@
-#! /bin/sh
-#
-# NetworkManager NetworkManager daemon
-# Daemon for automatically switching network
-# connections to the best available connection.
-# This file should be placed in /etc/init.d.
-#
-# Authors: <j@bootlab.org>
-# Mark Roach <mrroach@okmaybe.com>
-# Thom May <thom@debian.org>
-#
-# Version: @(#)skeleton 2.85-23 28-Jul-2004 miquels@cistron.nl
-#
-
-set -e
-
-PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
-DESC="Network connection manager daemon"
-NAME="NetworkManager"
-DAEMON=/usr/bin/$NAME
-PIDFILE=/var/run/$NAME.pid
-SCRIPTNAME=/etc/init.d/$NAME
-USER=root
-
-# Gracefully exit if the package has been removed.
-test -x $DAEMON || exit 0
-
-# We need /sbin/ip
-[ -x /sbin/ip ] || exit 1
-
-#
-# Function that starts the daemon/service.
-#
-d_start() {
- start-stop-daemon --start --quiet --pidfile $PIDFILE \
- --user $USER --exec $DAEMON -- $DAEMON_OPTS
-}
-
-#
-# Function that stops the daemon/service.
-#
-d_stop() {
- start-stop-daemon --stop --quiet --pidfile $PIDFILE \
- --oknodo --user $USER --exec $DAEMON
-}
-
-
-case "$1" in
- start)
- echo -n "Starting $DESC: $NAME"
- d_start
- echo "."
- ;;
- stop)
- echo -n "Stopping $DESC: $NAME"
- d_stop
- echo "."
- ;;
- restart|force-reload)
- echo -n "Restarting $DESC: $NAME"
- d_stop
- sleep 1
- d_start
- echo "."
- ;;
- *)
- echo "Usage: $SCRIPTNAME {start|stop|restart|force-reload}" >&2
- exit 1
- ;;
-esac
-
-exit 0
diff --git a/initscript/Gentoo/.cvsignore b/initscript/Gentoo/.cvsignore
deleted file mode 100644
index 282522db03..0000000000
--- a/initscript/Gentoo/.cvsignore
+++ /dev/null
@@ -1,2 +0,0 @@
-Makefile
-Makefile.in
diff --git a/initscript/Gentoo/Makefile.am b/initscript/Gentoo/Makefile.am
deleted file mode 100644
index 85954b839d..0000000000
--- a/initscript/Gentoo/Makefile.am
+++ /dev/null
@@ -1,4 +0,0 @@
-EXTRA_DIST = NetworkManager
-
-initddir = $(sysconfdir)/init.d
-initd_SCRIPTS = NetworkManager
diff --git a/initscript/Gentoo/NetworkManager b/initscript/Gentoo/NetworkManager
deleted file mode 100755
index 40cdade5d1..0000000000
--- a/initscript/Gentoo/NetworkManager
+++ /dev/null
@@ -1,49 +0,0 @@
-#!/sbin/runscript
-#
-# NetworkManager: NetworkManager daemon
-#
-# chkconfig: 345 98 02
-# description: This is a daemon for automatically switching network \
-# connections to the best available connection. \
-#
-# processname: NetworkManager
-# pidfile: /var/run/NetworkManager.pid
-#
-### BEGIN INIT INFO
-# Provides: $network
-### END INIT INFO
-
-# Sanity checks.
-[ -x /usr/bin/NetworkManager ] || exit 0
-
-# We need /sbin/ip
-[ -x /sbin/ip ] || exit 0
-
-# so we can rearrange this easily
-processname=/usr/bin/NetworkManager
-pidfile=/var/run/NetworkManager.pid
-
-depend() {
- need hald
-}
-
-start()
-{
- if [ -e ${pidfile} ]; then
- rm -f ${pidfile}
- fi
- ebegin "Starting NetworkManager"
- start-stop-daemon --start --quiet --exec ${processname}
- eend $?
- echo $(/bin/pidof NetworkManager) > ${pidfile}
-}
-
-stop()
-{
- ebegin "Stopping NetworkManager"
- start-stop-daemon --stop --quiet --exec ${processname} --pidfile ${pidfile}
- eend $?
- if [ -e ${pidfile} ]; then
- rm -f $pidfile
- fi
-}
diff --git a/initscript/Makefile.am b/initscript/Makefile.am
deleted file mode 100644
index b20408a1eb..0000000000
--- a/initscript/Makefile.am
+++ /dev/null
@@ -1,16 +0,0 @@
-SUBDIRS =
-if TARGET_REDHAT
-SUBDIRS += RedHat
-endif
-if TARGET_GENTOO
-SUBDIRS += Gentoo
-endif
-if TARGET_DEBIAN
-SUBDIRS += Debian
-endif
-if TARGET_SLACKWARE
-SUBDIRS += Slackware
-endif
-if TARGET_SUSE
-SUBDIRS += SUSE
-endif
diff --git a/initscript/RedHat/.cvsignore b/initscript/RedHat/.cvsignore
deleted file mode 100644
index 282522db03..0000000000
--- a/initscript/RedHat/.cvsignore
+++ /dev/null
@@ -1,2 +0,0 @@
-Makefile
-Makefile.in
diff --git a/initscript/RedHat/Makefile.am b/initscript/RedHat/Makefile.am
deleted file mode 100644
index 8796239a30..0000000000
--- a/initscript/RedHat/Makefile.am
+++ /dev/null
@@ -1,5 +0,0 @@
-EXTRA_DIST = NetworkManager NetworkManagerDispatcher
-
-initddir = $(sysconfdir)/rc.d/init.d
-initd_SCRIPTS = NetworkManager NetworkManagerDispatcher
-
diff --git a/initscript/RedHat/NetworkManager b/initscript/RedHat/NetworkManager
deleted file mode 100755
index 13102ca0f6..0000000000
--- a/initscript/RedHat/NetworkManager
+++ /dev/null
@@ -1,79 +0,0 @@
-#!/bin/sh
-#
-# NetworkManager: NetworkManager daemon
-#
-# chkconfig: - 98 02
-# description: This is a daemon for automatically switching network \
-# connections to the best available connection. \
-#
-# processname: NetworkManager
-# pidfile: /var/run/NetworkManager.pid
-#
-
-# Sanity checks.
-[ -x /usr/bin/NetworkManager ] || exit 1
-
-# We need /sbin/ip
-[ -x /sbin/ip ] || exit 1
-
-# Source function library.
-. /etc/rc.d/init.d/functions
-
-# so we can rearrange this easily
-processname=NetworkManager
-servicename=NetworkManager
-pidfile=/var/run/NetworkManager.pid
-
-RETVAL=0
-
-start()
-{
- echo $"Setting network parameters... "
- sysctl -e -p /etc/sysctl.conf >/dev/null 2>&1
- echo -n $"Starting NetworkManager daemon: "
- daemon --check $servicename $processname
- RETVAL=$?
- echo
- [ $RETVAL -eq 0 ] && touch /var/lock/subsys/$servicename && echo `/sbin/pidof $processname` > $pidfile
-}
-
-stop()
-{
- echo -n $"Stopping NetworkManager daemon: "
-
- killproc $servicename -TERM
- RETVAL=$?
- echo
- if [ $RETVAL -eq 0 ]; then
- rm -f /var/lock/subsys/$servicename
- rm -f $pidfile
- fi
-}
-
-# See how we were called.
-case "$1" in
- start)
- start
- ;;
- stop)
- stop
- ;;
- status)
- status $processname
- RETVAL=$?
- ;;
- restart)
- stop
- start
- ;;
- condrestart)
- if [ -f /var/lock/subsys/$servicename ]; then
- stop
- start
- fi
- ;;
- *)
- echo $"Usage: $0 {start|stop|status|restart|condrestart}"
- ;;
-esac
-exit $RETVAL
diff --git a/initscript/RedHat/NetworkManagerDispatcher b/initscript/RedHat/NetworkManagerDispatcher
deleted file mode 100755
index a01f0ba90a..0000000000
--- a/initscript/RedHat/NetworkManagerDispatcher
+++ /dev/null
@@ -1,74 +0,0 @@
-#!/bin/sh
-#
-# NetworkManager: NetworkManagerDispatcher daemon
-#
-# chkconfig: - 98 02
-# description: This daemon automatically runs scripts when NetworkManager \
-# changes the network state.
-#
-# processname: NetworkManagerDispatcher
-# pidfile: /var/run/NetworkManagerDispatcher.pid
-#
-
-# Sanity checks.
-[ -x /usr/bin/NetworkManagerDispatcher ] || exit 1
-
-# Source function library.
-. /etc/rc.d/init.d/functions
-
-# so we can rearrange this easily
-processname=NetworkManagerDispatcher
-servicename=NetworkManagerDispatcher
-pidfile=/var/run/NetworkManagerDispatcher.pid
-
-RETVAL=0
-
-start()
-{
- echo -n $"Starting NetworkManagerDispatcher daemon: "
- daemon --check $servicename $processname
- RETVAL=$?
- echo
- [ $RETVAL -eq 0 ] && touch /var/lock/subsys/$servicename && echo `/sbin/pidof $processname` > $pidfile
-}
-
-stop()
-{
- echo -n $"Stopping NetworkManagerDispatcher daemon: "
-
- killproc $servicename -TERM
- RETVAL=$?
- echo
- if [ $RETVAL -eq 0 ]; then
- rm -f /var/lock/subsys/$servicename
- rm -f $pidfile
- fi
-}
-
-# See how we were called.
-case "$1" in
- start)
- start
- ;;
- stop)
- stop
- ;;
- status)
- status $processname
- RETVAL=$?
- ;;
- restart)
- stop
- start
- ;;
- condrestart)
- if [ -f /var/lock/subsys/$servicename ]; then
- stop
- start
- fi
- ;;
- *)
- echo $"Usage: $0 {start|stop|status|restart|condrestart}"
- ;;
-esac
-exit $RETVAL
diff --git a/initscript/SUSE/.cvsignore b/initscript/SUSE/.cvsignore
deleted file mode 100644
index 282522db03..0000000000
--- a/initscript/SUSE/.cvsignore
+++ /dev/null
@@ -1,2 +0,0 @@
-Makefile
-Makefile.in
diff --git a/initscript/SUSE/Makefile.am b/initscript/SUSE/Makefile.am
deleted file mode 100644
index edf9378132..0000000000
--- a/initscript/SUSE/Makefile.am
+++ /dev/null
@@ -1,4 +0,0 @@
-EXTRA_DIST = networkmanager
-
-initddir = $(sysconfdir)/init.d
-initd_SCRIPTS = networkmanager
diff --git a/initscript/SUSE/networkmanager b/initscript/SUSE/networkmanager
deleted file mode 100644
index 60c5f89548..0000000000
--- a/initscript/SUSE/networkmanager
+++ /dev/null
@@ -1,49 +0,0 @@
-#! /bin/sh
-
-### BEGIN INIT INFO
-# Provides: networkmanager
-# Required-Start: $network dbus haldaemon
-# Default-Start: 3 5
-# Default-Stop:
-# Description: NetworkManager, a network and wireless connection manager
-### END INIT INFO
-
-NETWORKMANAGER_BIN=/usr/bin/NetworkManager
-test -x $NETWORKMANAGER_BIN || exit 5
-
-. /etc/rc.status
-rc_reset
-
-case "$1" in
- start)
- checkproc $NETWORKMANAGER_BIN
- if [ $? = 0 ]; then
- echo -n "NetworkManager already running"
- rc_status -v
- rc_exit
- fi
- echo -n "Starting the NetworkManager"
- startproc $NETWORKMANAGER_BIN
- rc_status -v
- ;;
- stop)
- echo -n "Shutting down the NetworkManager"
- killproc -TERM $NETWORKMANAGER_BIN
- rc_status -v
- ;;
- restart)
- $0 stop
- $0 start
- rc_status
- ;;
- status)
- echo -n "Checking for the NetworkManager: "
- checkproc $NETWORKMANAGER_BIN
- rc_status -v
- ;;
- *)
- echo "Usage: $0 {start|stop|status|restart}"
- exit 1
- ;;
-esac
-
diff --git a/initscript/Slackware/.cvsignore b/initscript/Slackware/.cvsignore
deleted file mode 100644
index 282522db03..0000000000
--- a/initscript/Slackware/.cvsignore
+++ /dev/null
@@ -1,2 +0,0 @@
-Makefile
-Makefile.in
diff --git a/initscript/Slackware/Makefile.am b/initscript/Slackware/Makefile.am
deleted file mode 100644
index 5c7c4421df..0000000000
--- a/initscript/Slackware/Makefile.am
+++ /dev/null
@@ -1,5 +0,0 @@
-EXTRA_DIST = rc.networkmanager
-
-initddir = $(sysconfdir)/rc.d
-initd_SCRIPTS = rc.networkmanager
-
diff --git a/initscript/Slackware/rc.networkmanager b/initscript/Slackware/rc.networkmanager
deleted file mode 100755
index 6f89385386..0000000000
--- a/initscript/Slackware/rc.networkmanager
+++ /dev/null
@@ -1,66 +0,0 @@
-#!/bin/sh
-#
-# NetworkManager: NetworkManager daemon
-#
-# description: This is a daemon for automatically switching network \
-# connections to the best available connection. \
-#
-# processname: NetworkManager
-# pidfile: /var/run/NetworkManager.pid
-#
-# We need /sbin/ip
-[ -x /sbin/ip ] || exit 1
-
-processname=NetworkManager
-servicename=NetworkManager
-pidfile=/var/run/NetworkManager.pid
-
-RETVAL=0
-
-start()
-{
- if [ "`pgrep dbus-daemon-1`" = "" ]; then
- echo -n "D-BUS must be running to start NetworkManager"
- exit 1
- fi
- if [ "`pgrep hald`" = "" ]; then
- echo -n "HAL must be running to start NetworkManager"
- exit 1
- fi
-
- echo -n $"Starting NetworkManager daemon: "
- $servicename
- RETVAL=$?
- echo
- [ $RETVAL -eq 0 ] && echo `/sbin/pidof $processname` > $pidfile
-}
-
-stop()
-{
- echo -n $"Stopping NetworkManager daemon: "
-
- killall -s TERM $servicename
- RETVAL=$?
- echo
- if [ $RETVAL -eq 0 ]; then
- rm -f $pidfile
- fi
-}
-
-# See how we were called.
-case "$1" in
- start)
- start
- ;;
- stop)
- stop
- ;;
- restart)
- stop
- start
- ;;
- *)
- echo $"Usage: $0 {start|stop|restart}"
- ;;
-esac
-exit $RETVAL
diff --git a/po/.cvsignore b/po/.cvsignore
deleted file mode 100644
index db6870f6a1..0000000000
--- a/po/.cvsignore
+++ /dev/null
@@ -1,14 +0,0 @@
-*.gmo
-*.mo
-*.pot
-Makefile
-Makefile.in
-Makefile.in.in
-POTFILES
-cat-id-tbl.c
-messages
-missing
-notexist
-po2tbl.sed
-po2tbl.sed.in
-stamp-cat-id
diff --git a/po/ChangeLog b/po/ChangeLog
deleted file mode 100644
index 8cfe84c679..0000000000
--- a/po/ChangeLog
+++ /dev/null
@@ -1,902 +0,0 @@
-2005-08-18 Hendrik Brandt <heb@gnome-de.org>
-
- * de.po: Updated German translation.
-
-2005-08-17 Marcel Telka <marcel@telka.sk>
-
- * sk.po: Updated Slovak translation.
-
-2005-08-16 Adam Weinberger <adamw@gnome.org>
-
- * en_CA.po: Updated Canadian English translation.
-
-2005-08-16 Gabor Kelemen <kelemeng@gnome.hu>
-
- * hu.po: Hungarian translation updated.
-
-2005-08-15 Hendrik Brandt <heb@gnome-de.org>
-
- * de.po: Updated German translation.
-
-2005-08-13 Adam Weinberger <adamw@gnome.org>
-
- * en_CA.po: Updated Canadian English translation.
-
-2005-08-13 Marcel Telka <marcel@telka.sk>
-
- * sk.po: Updated Slovak translation.
-
-2005-08-12 Robert Love <rml@novell.com>
-
- * sv.po: move NetworkManager-vpn translations to their po/
- * POTFILES.skip: add another vpn-daemons/ file
-
-2005-08-10 Maxim Dziumanenko <mvd@mylinux.ua>
-
- * uk.po: Updated Ukrainian translation.
-
-2005-08-06 Adam Weinberger <adamw@gnome.org>
-
- * POTFILES.skip: Add with obsoleted files.
- * en_CA.po: Updated Canadian English translation.
-
-2005-08-06 Hendrik Brandt <heb@gnome-de.org>
-
- * de.po: Updated German translation.
-
-2005-08-06 Miloslav Trmac <mitr@volny.cz>
-
- * cs.po: Updated Czech translation.
-
-2005-08-06 Marcel Telka <marcel@telka.sk>
-
- * sk.po: Updated Slovak translation.
-
-2005-08-04 Kjartan Maraas <kmaraas@gnome.org>
-
- * nb.po: Updated Norwegian bokmål translation.
- * no.po: Same
-
-2005-07-30 Francisco Javier F. Serrador <serrador@cvs.gnome.org>
-
- * es.po: UPdated Spanish translation.
-
-2005-07-26 Marcel Telka <marcel@telka.sk>
-
- * sk.po: Updated Slovak translation.
-
-2005-07-23 Adam Weinberger <adamw@gnome.org>
-
- * en_CA.po: Updated Canadian English translation.
-
-2005-07-23 Miloslav Trmac <mitr@volny.cz>
-
- * cs.po: Updated Czech translation.
-
-2005-07-21 Francisco Javier F. Serrador <serrador@cvs.gnome.org>
-
- es.po: Updated Spanish translation.
-
-2005-07-21 Chao-Hsiung Liao <j_h_liau@yahoo.com.tw>
-
- * zh_TW.po: Updated Traditional Chinese translation.
-
-2005-07-20 Marcel Telka <marcel@telka.sk>
-
- * sk.po: Updated Slovak translation.
-
-2005-07-18 Adam Weinberger <adamw@gnome.org>
-
- * en_CA.po: Updated Canadian English translation.
-
-2005-07-10 Miloslav Trmac <mitr@volny.cz>
-
- * cs.po: Updated Czech translation.
-
-2005-07-06 Marcel Telka <marcel@telka.sk>
-
- * sk.po: Updated Slovak translation.
-
-2005-07-05 Gabor Kelemen <kelemeng@gnome.hu>
-
- * hu.po: Hungarian translation updated.
-
-2005-07-04 Terance Sola <terance@lyse.net>
-
- * nb.po: Updated Norwegian bokmål translation.
- * no.po:
-
-2005-07-03 Adam Weinberger <adamw@gnome.org>
-
- * en_CA.po: Updated Canadian English translation.
-
-2005-07-02 Vincent van Adrighem <adrighem@gnome.org>
-
- * nl.po: Translation updated by Tino Meinen.
-
-2005-07-01 Hendrik Brandt <heb@gnome-de.org>
-
- * de.po: Updated German translation.
-
-2005-06-30 Robert Love <rml@novell.com>
-
- * POTFILES.in: remove examples/ translatable files as they are not
- part of the official dist and thus break "make distcheck". Also
- remove vpn-daemons/ translatable files as they are included in that
- directories own po/POTFILES.in file (and it breaks "make distcheck").
-
-2005-06-28 Kjartan Maraas <kmaraas@gnome.org>
-
- * nb.po: Updated Norwegian bokmål translation.
- * no.po: Same
-
-2005-06-26 Hendrik Brandt <heb@gnome-de.org>
-
- * de.po: Updated German translation.
-
-2005-06-26 Marcel Telka <marcel@telka.sk>
-
- * sk.po: Updated Slovak translation.
-
-2005-06-26 Christian Rose <menthos@menthos.com>
-
- * sv.po: Updated Swedish translation.
-
-2005-06-25 Christian Rose <menthos@menthos.com>
-
- * POTFILES.in: Added missing file entries.
-
-2005-06-25 Marcel Telka <marcel@telka.sk>
-
- * sk.po: Updated Slovak translation.
-
-2005-06-24 Gabor Kelemen <kelemeng@gnome.hu>
-
- * hu.po: Hungarian translation updated.
-
-2005-06-23 Adam Weinberger <adamw@gnome.org>
-
- * en_CA.po: Updated Canadian English translation.
-
-2005-06-21 Marcel Telka <marcel@telka.sk>
-
- * sk.po: Updated Slovak translation.
-
-2005-06-21 Hendrik Brandt <heb@gnome-de.org>
-
- * de.po: Updated German translation.
-
-2005-06-20 Vincent van Adrighem <adrighem@gnome.org>
-
- * nl.po: Translation updated by Tino Meinen.
-
-2005-06-20 Kjartan Maraas <kmaraas@gnome.org>
-
- * nb.po: Update Norwegian Bokmål translation.
- * no.po: Same
-
-2005-06-17 Adam Weinberger <adamw@gnome.org>
-
- * en_CA.po: Updated Canadian English translation.
-
-2005-06-17 Marcel Telka <marcel@telka.sk>
-
- * sk.po: Updated Slovak translation.
-
-2005-06-17 Hendrik Brandt <heb@gnome-de.org>
-
- * de.po: Updated German translation.
-
-2005-06-17 Marcel Telka <marcel@telka.sk>
-
- * sk.po: Updated Slovak translation.
-
-2005-06-14 Francisco Javier F. Serrador <serrador@cvs.gnome.org>
-
- * es.po: Updated Spanish translation.
-
-2005-06-14 Marcel Telka <marcel@telka.sk>
-
- * sk.po: Updated Slovak translation.
-
-2005-06-12 Miloslav Trmac <mitr@volny.cz>
-
- * cs.po: Updated Czech translation.
-
-2005-06-12 David Zeuthen <davidz@redhat.com>
-
- * POTFILES.in: Added gnome/vpn-properties/nm-vpn-properties.c and
- gnome/vpn-properties/nm-vpn-properties.glade
-
-2005-06-10 Marcel Telka <marcel@telka.sk>
-
- * sk.po: Updated Slovak translation.
-
-2005-06-06 Maxim Dziumanenko <mvd@mylinux.com.ua>
-
- * uk.po: Updated Ukrainian translation.
-
-2005-06-01 Vincent van Adrighem <adrighem@gnome.org>
-
- * nl.po: Translation updated by Tino Meinen.
-
-2005-06-01 Marcel Telka <marcel@telka.sk>
-
- * sk.po: Updated Slovak translation.
-
-2005-05-29 Miloslav Trmac <mitr@volny.cz>
-
- * cs.po: Updated Czech translation.
-
-2005-05-24 Gabor Kelemen <kelemeng@gnome.hu>
-
- * hu.po: Hungarian translation updated.
-
-2005-05-24 Frank Arnold <farnold@cvs.gnome.org>
-
- * de.po: Updated German translation.
-
-2005-05-23 Adam Weinberger <adamw@gnome.org>
-
- * en_CA.po: Updated Canadian English translation.
-
-2005-05-20 Frank Arnold <farnold@cvs.gnome.org>
-
- * de.po: Updated German translation.
-
-2005-05-19 Adam Weinberger <adamw@gnome.org>
-
- * en_CA.po: Updated Canadian English translation.
-
-2005-05-15 Dan Williams <dcbw@redhat.com>
-
- From Filip Miletic:
- * po/sr.po
- po/sr@Latn.po
- configure.in
- - Serbian translation added
-
-2005-05-15 Miloslav Trmac <mitr@volny.cz>
-
- * cs.po: Updated Czech translation.
-
-2005-05-15 Vincent van Adrighem <adrighem@gnome.org>
-
- * nl.po: Translation updated by Tino Meinen.
-
-2005-05-15 Marcel Telka <marcel@telka.sk>
-
- * sk.po: Updated Slovak translation.
-
-2005-05-14 Gabor Kelemen <kelemeng@gnome.hu>
-
- * hu.po: Hungarian translation updated.
-
-2005-05-14 Gabor Kelemen <kelemeng@gnome.hu>
-
- * hu.po: Hungarian translation updated.
-
-2005-05-14 Vincent van Adrighem <adrighem@gnome.org>
-
- * nl.po: Translation updated by Tino Meinen.
-
-2005-05-14 Pawan Chitrakar <pawan@mpp.org.np>
-
- * ne.po: Upadated Nepali translation
-
-2005-05-13 Adam Weinberger <adamw@gnome.org>
-
- * en_CA.po: Updated Canadian English translation.
-
-2005-05-12 Marcel Telka <marcel@telka.sk>
-
- * sk.po: Updated Slovak translation.
-
-2005-05-12 Miloslav Trmac <mitr@volny.cz>
-
- * cs.po: Updated Czech translation.
-
-2005-05-06 Miloslav Trmac <mitr@volny.cz>
-
- * cs.po: Updated Czech translation.
-
-2005-05-04 Adam Weinberger <adamw@gnome.org>
-
- * en_CA.po: Updated Canadian English translation.
-
-2005-05-02 Francisco Javier F. Serrador <serrador@cvs.gnome.org>
-
- * es.po: Updated Spanish translation.
-
-2005-05-01 Kjartan Maraas <kmaraas@gnome.org>
-
- * nb.po: Update
- * no.po: Update
-
-2005-04-30 Christian Rose <menthos@menthos.com>
-
- * POTFILES.in: Removed nonexisting files and added
- missing ones.
- * sv.po: Updated Swedish translation.
-
-2005-04-24 Vincent van Adrighem <adrighem@gnome.org>
-
- * nl.po: Translation updated by Tino Meinen.
-
-2005-04-22 Pawan Chitrakar <pawan@mpp.org.np>
-
- * ne.po: Added Nepali translation
-
-2005-04-21 Gabor Kelemen <kelemeng@gnome.hu>
-
- * hu.po: Hungarian translation updated.
-
-2005-04-19 Adam Weinberger <adamw@gnome.org>
-
- * en_CA.po: Updated Canadian English translation.
-
-2005-04-19 David Lodge <dave@cirt.net>
-
- * en_GB.po: Updated British English translation.
-
-2005-04-19 Frank Arnold <farnold@cvs.gnome.org>
-
- * de.po: Updated German translation.
-
-2005-04-19 Vincent van Adrighem <adrighem@gnome.org>
-
- * nl.po: Translation updated by Tino Meinen.
-
-2005-04-16 Adam Weinberger <adamw@gnome.org>
-
- * en_CA.po: Updated Canadian English translation.
-
-2005-04-15 Adam Weinberger <adamw@gnome.org>
-
- * en_CA.po: Updated Canadian English translation.
-
-2005-04-14 Jorge Bernal 'Koke' <jbernal@cvs.gnome.org>
-
- * es.po: Updated Spanish translation.
-
-2005-04-09 Miloslav Trmac <mitr@volny.cz>
-
- * cs.po: Updated Czech translation.
-
-2005-04-07 Kjartan Maraas <kmaraas@gnome.org>
-
- * nb.po: Update
-
-2005-04-06 Gabor Kelemen <kelemeng@gnome.hu>
-
- * hu.po: Hungarian translation added.
-
-2005-04-04 Vincent van Adrighem <adrighem@gnome.org>
-
- * nl.po: Translation updated by Tino Meinen.
-
-2005-04-04 Nikos Charonitakis <charosn@her.forthnet.gr>
-
- * el.po: Updated Greek translation.
-
-2005-04-03 Marcel Telka <marcel@telka.sk>
-
- * sk.po: Updated Slovak translation.
-
-2005-04-02 Frank Arnold <farnold@cvs.gnome.org>
-
- * de.po: Updated German translation.
-
-2005-04-01 Steve Murphy <murf@e-tools.com>
-
- * rw.po: Added Kinyarwanda translation.
-
-2005-04-01 Adam Weinberger <adamw@gnome.org>
-
- * en_CA.po: Updated Canadian English translation.
-
-2005-04-01 Marcel Telka <marcel@telka.sk>
-
- * sk.po: Updated Slovak translation.
-
-2005-03-26 Francisco Javier F. Serrador <serrador@cvs.gnome.org>
-
- * es.po: Updated Spanish translation.
-
-2005-03-16 Adam Weinberger <adamw@gnome.org>
-
- * en_CA.po: Updated Canadian English translation.
-
-2005-03-04 Kjartan Maraas <kmaraas@gnome.org>
-
- * no.po: Update
- * nb.po: Update
-
-2005-03-02 Vincent van Adrighem <adrighem@gnome.org>
-
- * nl.po: Translation updated by Tino Meinen.
-
-2005-02-28 Maxim Dziumanenko <mvd@mylinux.com.ua>
-
- * uk.po: Added Ukrainian translation.
-
-2005-02-27 Jim Huang <jserv@kaffe.org>
-
- * zh_TW.po: Added "zh_TW" (Traditional Chinese).
-
-2005-02-27 Alessio Frusciante <algol@firenze.linux.it>
-
- * it.po: Added Italian translation by
- Francesco Marletta <francesco.marletta@tiscali.it>.
-
-2005-02-22 Miloslav Trmac <mitr@volny.cz>
-
- * cs.po: Updated Czech translation.
-
-2005-02-20 Marcel Telka <marcel@telka.sk>
-
- * sk.po: Updated Slovak translation.
-
-2005-02-20 Hendrik Brandt <heb@gnome-de.org>
-
- * de.po: Updated German translation.
-
-2005-02-19 Adam Weinberger <adamw@gnome.org>
-
- * en_CA.po: Updated Canadian English translation.
-
-2005-02-18 Dan Williams <dcbw@redhat.com>
-
- * Correct spelling of "adaptor"->"adapter"
-
-2005-02-18 Kjartan Maraas <kmaraas@gnome.org>
-
- * nb.po: Update
- * no.po: Update
-
-2005-02-17 Vincent van Adrighem <adrighem@gnome.org>
-
- * nl.po: Translation updated by Tino Meinen.
-
-2005-02-16 Christophe Merlet <redfox@redfoxcenter.org>
-
- * fr.po: Added French translation from
- Raphael Tournoy <lexpas@free.fr>.
-
-2005-02-14 Tomislav Vujec <tvujec@redhat.com>
-
- * configure.in
- po/hr.po
- - Add the Croatian locale.
-
-2005-02-14 Kjartan Maraas <kmaraas@gnome.org>
-
- * nb.po: Update
- * no.po: Update
-
-2005-02-13 David Lodge <dave@cirt.net>
-
- * en_GB.po: Updated British translation.
-
-2005-02-13 Miloslav Trmac <mitr@volny.cz>
-
- * cs.po: Updated Czech translation.
-
-2005-02-12 Nikos Charonitakis <charosn@her.forthnet.gr>
-
- * el.po: Updated Greek translation.
-
-2005-02-11 Marcel Telka <marcel@telka.sk>
-
- * sk.po: Updated Slovak translation.
-
-2005-02-11 Adam Weinberger <adamw@gnome.org>
-
- * en_CA.po: Updated Canadian English translation.
-
-2005-02-11 Frank Arnold <farnold@cvs.gnome.org>
-
- * de.po: Updated German translation.
-
-2005-02-10 Dan Williams <dcbw@redhat.com>
-
- * POTFILES.in
- - Revert the Encoding change since it doesn't seem to work
- on FC4 or FC3 at the moment.
-
-2005-02-09 Adam Weinberger <adamw@gnome.org>
-
- * en_CA.po: Updated Canadian English translation.
-
-2005-02-09 Frank Arnold <farnold@cvs.gnome.org>
-
- * de.po: Updated German translation.
-
-2005-02-08 Kjartan Maraas <kmaraas@gnome.org>
-
- * POTFILES.in: Add encoding foo
- * nb.po: Update
- * no.po: Update
-
-2005-02-04 Miloslav Trmac <mitr@volny.cz>
-
- * cs.po: Updated Czech translation.
-
-2005-02-03 Adam Weinberger <adamw@gnome.org>
-
- * en_CA.po: Updated Canadian English translation.
-
-2005-02-03 Frank Arnold <farnold@cvs.gnome.org>
-
- * de.po: Updated German translation.
-
-2005-01-19 Kjartan Maraas <kmaraas@gnome.org>
-
- * nb.po: Update
- * no.po: Update
-
-2005-01-10 Vincent van Adrighem <adrighem@gnome.org>
-
- * nl.po: Translation updated by Tino Meinen.
-
-2005-01-07 Francisco Javier F. Serrador <serrador@cvs.gnome.org>
-
- * es.po: Updated Spanish translation.
-
-2005-01-01 Satoru SATOH <ss@gnome.gr.jp>
-
- * ja.po: Added Japanese translation
-
-2004-12-25 Kjartan Maraas <kmaraas@gnome.org>
-
- * nb.po: Update.
-
-2004-12-20 Hendrik Brandt <heb@gnome-de.org>
-
- * de.po: Updated German translation.
-
-2004-12-19 Miloslav Trmac <mitr@volny.cz>
-
- * cs.po: Updated Czech translation.
-
-2004-12-18 Vincent van Adrighem <adrighem@gnome.org>
-
- * nl.po: Translation updated by Tino Meinen.
-
-2004-12-18 Marcel Telka <marcel@telka.sk>
-
- * sk.po: Updated Slovak translation.
-
-2004-12-17 Adam Weinberger <adamw@gnome.org>
-
- * en_CA.po: Updated Canadian English translation.
-
-2004-12-07 Miloslav Trmac <mitr@volny.cz>
-
- * cs.po: Updated Czech translation.
-
-2004-12-05 Marcel Telka <marcel@telka.sk>
-
- * sk.po: Updated Slovak translation.
-
-2004-12-05 Adam Weinberger <adamw@gnome.org>
-
- * en_CA.po: Updated Canadian English translation.
-
-2004-12-04 Kjartan Maraas <kmaraas@gnome.org>
-
- * POTFILES.in: Add missing file.
- * nb.po: Update
-
-2004-11-29 Funda Wang <fundawang@linux.net.cn>
-
- * zh_CN.po: Updated Simplified Chinese translation.
-
-2004-11-14 Marcel Telka <marcel@telka.sk>
-
- * sk.po: Updated Slovak translation.
-
-2004-11-09 Adam Weinberger <adamw@gnome.org>
-
- * en_CA.po: Updated Canadian English translation.
-
-2004-11-09 Kjartan Maraas <kmaraas@gnome.org>
-
- * POTFILES.in: Add panel-applet/NWManagerOtherNetworkDialog.c
- * nb.po: Update
-
-2004-11-04 Marcel Telka <marcel@telka.sk>
-
- * sk.po: Updated Slovak translation.
-
-2004-11-04 Adam Weinberger <adamw@gnome.org>
-
- * en_CA.po: Updated Canadian English translation.
-
-2004-11-04 Miloslav Trmac <mitr@volny.cz>
-
- * cs.po: Updated Czech translation.
-
-2004-11-03 Vincent van Adrighem <adrighem@gnome.org>
-
- * nl.po: Translation updated by Tino Meinen.
-
-2004-11-01 Kjartan Maraas <kmaraas@gnome.org>
-
- * nb.po: Updated Norwegian bokmal translation.
-
-2004-10-31 Adam Weinberger <adamw@gnome.org>
-
- * en_CA.po: Updated Canadian English translation.
-
-2004-10-30 Miloslav Trmac <mitr@volny.cz>
-
- * cs.po: Updated Czech translation.
-
-2004-10-30 Marcel Telka <marcel@telka.sk>
-
- * sk.po: Updated Slovak translation.
-
-2004-10-25 Vincent van Adrighem <adrighem@gnome.org>
-
- * nl.po: Translation updated by Tino Meinen.
-
-2004-10-24 Francisco Javier F. Serrador <serrador@cvs.gnome.org>
-
- * es.po: Updated Spanish translation.
-
-2004-10-24 Miloslav Trmac <mitr@volny.cz>
-
- * cs.po: Updated Czech translation.
-
-2004-10-23 Adam Weinberger <adamw@gnome.org>
-
- * en_CA.po: Updated Canadian English translation.
-
-2004-10-22 Hendrik Brandt <hebra@cvs.gnome.org>
-
- * de.po: Updated German translation.
-
-2004-10-20 Kjartan Maraas <kmaraas@gnome.org>
-
- * nb.po: Update.
- * no.po: Update
-
-2004-10-18 Miloslav Trmac <mitr@volny.cz>
-
- * cs.po: Updated Czech translation.
-
-2004-10-17 David Lodge <dave@cirt.net>
-
- * en_GB.po: Updated British English translation.
-
-2004-10-17 Vincent van Adrighem <adrighem@gnome.org>
-
- * nl.po: Translation updated by Tino Meinen.
-
-2004-10-17 Raphael Higino <raphaelh@cvs.gnome.org>
-
- * pt_BR.po: Updated Brazilian Portuguese translation.
-
-2004-10-15 Marcel Telka <marcel@telka.sk>
-
- * sk.po: Updated Slovak translation.
-
-2004-10-15 Adam Weinberger <adamw@gnome.org>
-
- * en_CA.po: Updated Canadian English translation.
-
-2004-10-15 Vincent van Adrighem <adrighem@gnome.org>
-
- * nl.po: Translation updated by Tino Meinen.
-
-2004-10-14 Miloslav Trmac <mitr@volny.cz>
-
- * cs.po: Updated Czech translation.
-
-2004-10-14 Adam Weinberger <adamw@gnome.org>
-
- * en_CA.po: Updated Canadian English translation.
-
-2004-10-13 David Lodge <dave@cirt.net>
-
- * en_GB.po: Updated British English translation.
-
-2004-10-10 Vincent van Adrighem <adrighem@gnome.org>
-
- * nl.po: Translation updated by Tino Meinen.
-
-2004-10-10 Marcel Telka <marcel@telka.sk>
-
- * sk.po: Updated Slovak translation.
-
-2004-10-10 Raphael Higino <raphaelh@cvs.gnome.org>
-
- * pt_BR.po: Updated Brazilian Portuguese translation.
-
-2004-10-10 Miloslav Trmac <mitr@volny.cz>
-
- * cs.po: Updated Czech translation.
-
-2004-10-09 Vincent van Adrighem <adrighem@gnome.org>
-
- * nl.po: Translation updated by Tino Meinen.
-
-2004-10-08 Adam Weinberger <adamw@gnome.org>
-
- * en_CA.po: Updated Canadian English translation.
-
-2004-10-08 Hendrik Brandt <hebra@cvs.gnome.org>
-
- * de.po: Added German translation.
-
-2004-10-08 Miloslav Trmac <mitr@volny.cz>
-
- * cs.po: Updated Czech translation.
-
-2004-10-08 Kjartan Maraas <kmaraas@gnome.org>
-
- * POTFILES.in: Add missing file.
- * nb.po: Update
- * no.po: Update
-
-2004-10-05 Raphael Higino <raphaelh@cvs.gnome.org>
-
- * pt_BR.po: Updated Brazilian Portuguese translation.
-
-2004-10-03 David Lodge <dave@cirt.net>
-
- * en_GB.po: Added British translation.
-
-2004-10-03 Marcel Telka <marcel@telka.sk>
-
- * sk.po: Added Slovak translation.
-
-2004-10-03 Miloslav Trmac <mitr@volny.cz>
-
- * cs.po: Updated Czech translation.
-
-2004-10-02 Adam Weinberger <adamw@gnome.org>
-
- * en_CA.po: Updated Canadian English translation.
-
-2004-09-29 Kjartan Maraas <kmaraas@gnome.org>
-
- * nb.po: Update
- * no.po: Update
-
-2004-09-27 Vincent van Adrighem <adrighem@gnome.org>
-
- * nl.po: Translation updated by Tino Meinen.
-
-2004-09-23 Vincent van Adrighem <adrighem@gnome.org>
-
- * nl.po: Translation updated by Daniel van Eeden.
-
-2004-09-23 Vincent van Adrighem <adrighem@gnome.org>
-
- * nl.po: Translation updated by Tino Meinen.
-
-2004-09-23 Miloslav Trmac <mitr@volny.cz>
-
- * cs.po: Updated Czech translation.
-
-2004-09-22 Raphael Higino <raphaelh@cvs.gnome.org>
-
- * pt_BR.po: Updated Brazilian Portuguese translation.
-
-2004-09-21 Adam Weinberger <adamw@gnome.org>
-
- * en_CA.po: Updated Canadian English translation.
-
-2004-09-21 Miloslav Trmac <mitr@volny.cz>
-
- * cs.po: Updated Czech translation.
-
-Mon Sep 20 11:22:16 2004 Jonathan Blandford <jrb@redhat.com>
-
- * POTFILES.in: add panel-applet/menu-info.c
-
-2004-09-15 Laurent Dhima <laurenti@alblinux.net>
-
- * sq.po: Updated Albanian translation.
-
-2004-09-13 Vincent van Adrighem <adrighem@gnome.org>
-
- * nl.po: Translation updated by Tino Meinen.
-
-2004-09-12 Vincent van Adrighem <adrighem@gnome.org>
-
- * nl.po: Translation updated by Tino Meinen.
-
-2004-09-12 Kjartan Maraas <kmaraas@gnome.org>
-
- * nb.po: Updated
-
-2004-09-11 Martin Willemoes Hansen <mwh@sysrq.dk>
-
- * da.po: Updated Danish translation.
-
-2004-09-10 Adam Weinberger <adamw@gnome.org>
-
- * en_CA.po: Updated Canadian English translation.
-
-2004-09-10 Miloslav Trmac <mitr@volny.cz>
-
- * cs.po: Updated Czech translation.
-
-2004-09-09 Francisco Javier F. Serrador <serrador@cvs.gnome.org>
-
- * es.po: Updated Spanish translation by Antonio Ognio.
-
-2004-09-09 Raphael Higino <raphaelh@cvs.gnome.org>
-
- * pt_BR.po: Updated Brazilian Portuguese translation.
-
-2004-09-09 Ankit Patel <ankit@redhat.com>
-
- * gu.po: Added Gujarati Translation.
-
-2004-09-09 Pablo Saratxaga <pablo@mandrakesoft.com>
-
- * wa.po: Added Walloon file.
-
-2004-09-08 Miloslav Trmac <mitr@volny.cz>
-
- * cs.po: Updated Czech translation.
-
-2004-09-08 Adam Weinberger <adamw@gnome.org>
-
- * en_CA.po: Updated Canadian English translation.
-
-2004-09-07 David Lodge <dave@cirt.net>
-
- * en_GB.po: Added British translation.
-
-2004-09-04 Laurent Dhima <laurenti@alblinux.net>
-
- * sq.po: Added Albanian translation.
-
-2004-09-03 Raphael Higino <raphaelh@cvs.gnome.org>
-
- * pt_BR.po: Added Brazilian Portuguese translation.
-
-2004-09-03 Akagic Amila <bono@linux.org.ba>
-
- * bs.po: Added Bosnian translation.
-
-2004-09-02 Vincent van Adrighem <adrighem@gnome.org>
-
- * nl.po: Translation added by Tino Meinen.
-
-2004-08-28 Kjartan Maraas <kmaraas@gnome.org>
-
- * nb.po: Add Norwegian translation.
- * no.po: Same.
-
-2004-08-28 Miloslav Trmac <mitr@volny.cz>
-
- * cs.po: Added Czech translation.
-
-2004-08-28 Adam Weinberger <adamw@gnome.org>
-
- * en_CA.po: Updated Canadian English translation.
-
-2004-08-27 Adam Weinberger <adamw@gnome.org>
-
- * en_CA.po: Added Canadian English translation.
-
-2004-08-27 Funda Wang <fundawang@linux.net.cn>
-
- * zh_CN.po: Added Simplified Chinese translation.
-
-2004-08-27 Christian Rose <menthos@menthos.com>
-
- * sv.po: Added Swedish translation.
-
-2004-08-27 Christian Rose <menthos@menthos.com>
-
- * .cvsignore: Sorted and added entries.
- * POTFILES.in: Added missing entries.
- * NetworkManager.pot: Removed. This is a generated file.
-
diff --git a/po/POTFILES.in b/po/POTFILES.in
deleted file mode 100644
index e33211418a..0000000000
--- a/po/POTFILES.in
+++ /dev/null
@@ -1,14 +0,0 @@
-# List of source files containing translatable strings.
-# Please keep this file sorted alphabetically.
-gnome/applet/applet-dbus-info.c
-gnome/applet/applet-dbus.c
-gnome/applet/applet.c
-gnome/applet/eggtrayicon.c
-gnome/applet/menu-items.c
-gnome/applet/other-network-dialog.c
-gnome/applet/passphrase-dialog.c
-gnome/applet/vpn-password-dialog.c
-gnome/applet/wireless-applet.glade
-gnome/vpn-properties/nm-vpn-properties.c
-gnome/vpn-properties/nm-vpn-properties.glade
-src/nm-netlink-monitor.c
diff --git a/po/POTFILES.skip b/po/POTFILES.skip
deleted file mode 100644
index f4af018f19..0000000000
--- a/po/POTFILES.skip
+++ /dev/null
@@ -1,9 +0,0 @@
-examples/python/systray/eggtrayicon.c
-vpn-daemons/vpnc/auth-dialog/gnome-two-password-dialog.c
-vpn-daemons/vpnc/auth-dialog/main.c
-vpn-daemons/vpnc/nm-vpnc.desktop.in
-vpn-daemons/vpnc/properties/nm-vpnc-dialog.glade
-vpn-daemons/vpnc/properties/nm-vpnc.c
-vpn-daemons/vpnc/src/nm-vpnc-service.c
-vpn-daemons/vpnc/src/nm-vpnc-service-vpnc-helper.c
-vpn-daemons/vpnc/src/nm-utils.c
diff --git a/po/bs.po b/po/bs.po
deleted file mode 100644
index 5e97139169..0000000000
--- a/po/bs.po
+++ /dev/null
@@ -1,193 +0,0 @@
-# translation of NetworkManager.HEAD.po to Bosnian
-# This file is distributed under the same license as the PACKAGE package.
-# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER.
-# Kemal Å anjta <gomez@lugzdk.ba>, 2004.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: NetworkManager.HEAD\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2004-10-19 13:38-0400\n"
-"PO-Revision-Date: 2004-09-01 04:10+0200\n"
-"Last-Translator: Kemal Å anjta <gomez@lugzdk.ba>\n"
-"Language-Team: Bosnian <lokal@linux.org.ba>\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"X-Generator: KBabel 1.3\n"
-
-#: info-daemon/networks.glade:11
-msgid "Modify Wireless Networks"
-msgstr "Izmjeni Wireless mreže"
-
-#: info-daemon/networks.glade:92
-msgid "<span weight=\"bold\">Wireless Networks:</span>"
-msgstr "<span weight=\"bold\">Wireless Mreže:</span>"
-
-#: info-daemon/passphrase.glade:9
-#, fuzzy
-msgid "Wireless Network Key Required"
-msgstr "Wireless Mreže"
-
-#: info-daemon/passphrase.glade:52
-msgid "_Login to Network"
-msgstr "_Prijava na mrežu"
-
-#: info-daemon/passphrase.glade:100
-#, fuzzy
-msgid ""
-"<span weight=\"bold\" size=\"larger\">Passphrase Required by Wireless "
-"Network</span>\n"
-"\n"
-"A passphrase or encryption key is required to access the wireless network '%"
-"s'."
-msgstr ""
-"<span weight=\"bold\" size=\"larger\">Passphrase je potreban od Wirelles "
-"mreže</span>\n"
-"\n"
-"Passphrase ili WEP key je potreba za pristup Wireless mreži '%s'."
-
-#: info-daemon/passphrase.glade:129
-msgid "Key Type:"
-msgstr ""
-
-#: info-daemon/passphrase.glade:150
-msgid ""
-"128-bit Passphrase\n"
-"128-bit Raw Hex Key"
-msgstr ""
-
-#: info-daemon/passphrase.glade:180
-#: info-daemon/NetworkManagerInfoPassphraseDialog.c:101
-msgid "Passphrase:"
-msgstr "Passphrase:"
-
-#: info-daemon/passphrase.glade:208 panel-applet/essid.glade:162
-msgid "*"
-msgstr "*"
-
-#: info-daemon/NetworkManagerInfoPassphraseDialog.c:104
-msgid "Key:"
-msgstr ""
-
-#. Reuse the above string to make the translators less angry.
-#: panel-applet/NMWirelessApplet.c:691 panel-applet/NMWirelessApplet.c:701
-msgid ""
-"The NetworkManager Applet could not find some required resources (the glade "
-"file was not found)."
-msgstr ""
-"NetworkManager Aplet nije pronašao neke potrebne resurse (glade nije "
-"pronađen)."
-
-#: panel-applet/NMWirelessApplet.c:716
-#, fuzzy
-msgid "Custom wireless network"
-msgstr "Wireless Mreže"
-
-#: panel-applet/NMWirelessApplet.c:717
-msgid "Enter the ESSID of the wireless network to which you wish to connect."
-msgstr ""
-
-#: panel-applet/NMWirelessApplet.c:800
-#, fuzzy
-msgid "Other Wireless Networks..."
-msgstr "Wireless Mreže"
-
-#: panel-applet/NMWirelessApplet.c:911
-msgid "No network devices have been found"
-msgstr ""
-
-#: panel-applet/NMWirelessApplet.c:1028
-msgid "NetworkManager is not running..."
-msgstr "NetworkManager nije pokrenut..."
-
-#: panel-applet/essid.glade:52
-msgid "C_onnect"
-msgstr ""
-
-#: panel-applet/essid.glade:131
-#, fuzzy
-msgid "Wireless _Network:"
-msgstr "Wireless Mreže"
-
-#: panel-applet/essid.glade:177
-#, fuzzy
-msgid "Wireless _adapter:"
-msgstr "Wireless Mreže"
-
-#: panel-applet/menu-info.c:101
-#, fuzzy, c-format
-msgid "Wired Network (%s)"
-msgstr "Wireless Mreže"
-
-#: panel-applet/menu-info.c:103
-#, fuzzy
-msgid "Wired Network"
-msgstr "Wireless Mreže"
-
-#: panel-applet/menu-info.c:168
-#, fuzzy, c-format
-msgid "Wireless Network (%s)"
-msgid_plural "Wireless Networks (%s)"
-msgstr[0] "Wireless Mreže"
-msgstr[1] "Wireless Mreže"
-
-#: panel-applet/menu-info.c:170
-#, fuzzy
-msgid "Wireless Network"
-msgid_plural "Wireless Networks"
-msgstr[0] "Wireless Mreže"
-msgstr[1] "Wireless Mreže"
-
-#: panel-applet/menu-info.c:307
-msgid " (invalid Unicode)"
-msgstr ""
-
-#: examples/python/systray/eggtrayicon.c:111
-msgid "Orientation"
-msgstr ""
-
-#: examples/python/systray/eggtrayicon.c:112
-msgid "The orientation of the tray."
-msgstr ""
-
-#~ msgid " "
-#~ msgstr " "
-
-#~ msgid "There are no network devices..."
-#~ msgstr "Nema mrežnih uređaja..."
-
-#~ msgid "There are no wireless networks..."
-#~ msgstr "Nema wireless mreža..."
-
-#~ msgid "Network Connections"
-#~ msgstr "Mrežne konekcije"
-
-#~ msgid "No network connection is currently active..."
-#~ msgstr "Nijedna mrežna konekcija trenutno nije aktivna..."
-
-#~ msgid "A wired network connection is currently active..."
-#~ msgstr "ŽiÄana mrežna konekcija je trenutno aktivna..."
-
-#~ msgid "_About..."
-#~ msgstr "_O..."
-
-#~ msgid ""
-#~ "<span weight=\"bold\" size=\"larger\">Wireless Network Login "
-#~ "Confirmation</span>\n"
-#~ "\n"
-#~ "You have chosen log in to the wireless network '%s'. If you are sure "
-#~ "this wireless network is secure, click the checkbox below and "
-#~ "NetworkManager will no longer pester you with stupid questions when you "
-#~ "connect to it."
-#~ msgstr ""
-#~ "<span weight=\"bold\" size=\"larger\">Wireless Network Login "
-#~ "Confirmation</span>\n"
-#~ "\n"
-#~ "You have chosen log in to the wireless network '%s'. If you are sure "
-#~ "this wireless network is secure, click the checkbox below and "
-#~ "NetworkManager will no longer pester you with stupid questions when you "
-#~ "connect to it."
-
-#~ msgid "Always Trust this Wireless Network"
-#~ msgstr "Uvijek vjeruj ovoj wireless mreži"
diff --git a/po/cs.po b/po/cs.po
deleted file mode 100644
index cd535ae611..0000000000
--- a/po/cs.po
+++ /dev/null
@@ -1,822 +0,0 @@
-# Czech translation of NetworkManager.
-# Copyright (C) 2004, 2005 NetworkManager'S COPYRIGHT HOLDER
-# Copyright (C) 2004, 2005 Miloslav Trmac <mitr@volny.cz>
-# This file is distributed under the same license as the NetworkManager package.
-# Miloslav Trmac <mitr@volny.cz>, 2004, 2005.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: NetworkManager VERSION\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2005-08-06 12:11+0000\n"
-"PO-Revision-Date: 2005-08-06 14:30+0200\n"
-"Last-Translator: Miloslav Trmac <mitr@volny.cz>\n"
-"Language-Team: Czech <cs@li.org>\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%"
-"10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
-
-#. Setup a request to the keyring to save the network passphrase
-#: ../gnome/applet/applet-dbus-info.c:839
-#, c-format
-msgid "Passphrase for wireless network %s"
-msgstr "Heslo pro bezdrátovou síť %s"
-
-#: ../gnome/applet/applet-dbus-info.c:1049
-#, c-format
-msgid ""
-"The requested wireless network '%s' does not appear to be in range. A "
-"different wireless network will be used if any are available."
-msgstr ""
-"Požadovaná bezdrátová síť '%s' zřejmě není v dosahu. Bude se používat jiná "
-"bezdrátová síť, pokud je k dispozici."
-
-#: ../gnome/applet/applet-dbus.c:598
-#, c-format
-msgid "Connection to the wireless network '%s' failed.\n"
-msgstr "Připojení k bezdrátové síti '%s' selhalo.\n"
-
-#: ../gnome/applet/applet-dbus.c:603
-msgid "Connection to the wired network failed.\n"
-msgstr "Připojení k drátové síti selhalo.\n"
-
-#: ../gnome/applet/applet.c:192
-msgid "Error displaying connection information: "
-msgstr "Chyba při zobrazování informací o připojení: "
-
-#: ../gnome/applet/applet.c:217
-msgid "Could not find some required resources (the glade file)!"
-msgstr "Nemohu najít některé vyžadované zdroje (soubor glade)!"
-
-#: ../gnome/applet/applet.c:227
-msgid "No active connections!"
-msgstr "Žádná aktivní připojení!"
-
-#: ../gnome/applet/applet.c:236
-msgid "Could not open socket!"
-msgstr "Nemohu otevřít socket!"
-
-#: ../gnome/applet/applet.c:251
-msgid "Failed to get information about the interface!"
-msgstr "Nemohu získat informace o rozhraní!"
-
-#: ../gnome/applet/applet.c:284
-#, c-format
-msgid "Wired Ethernet (%s)"
-msgstr "Drátový Ethernet (%s)"
-
-#: ../gnome/applet/applet.c:286
-#, c-format
-msgid "Wireless Ethernet (%s)"
-msgstr "Bezdrátový Ethernet (%s)"
-
-#: ../gnome/applet/applet.c:380 ../gnome/applet/applet.c:398
-msgid "NetworkManager Applet"
-msgstr "Aplet NetworkManager"
-
-#: ../gnome/applet/applet.c:382 ../gnome/applet/applet.c:400
-msgid "Copyright (C) 2004-2005 Red Hat, Inc."
-msgstr "Copyright © 2004-2005 Red Hat, Inc."
-
-#: ../gnome/applet/applet.c:383 ../gnome/applet/applet.c:401
-msgid ""
-"Notification area applet for managing your network devices and connections."
-msgstr ""
-"Aplet oznamovací oblasti pro správu vašich síťových zařízení a připojení."
-
-#: ../gnome/applet/applet.c:486
-msgid "VPN Error"
-msgstr "Chyba VPN"
-
-#: ../gnome/applet/applet.c:490
-#, c-format
-msgid ""
-"<span weight=\"bold\" size=\"larger\">VPN Login Failure</span>\n"
-"\n"
-"Could not start the VPN connection '%s' due to a login failure.\n"
-"\n"
-"The VPN service said: \"%s\""
-msgstr ""
-"<span weight=\"bold\" size=\"larger\">Selhání přihlášení k VPN</span>\n"
-"\n"
-"Nemohu spustit připojení k VPN '%s' kvůli selhání přihlášení.\n"
-"\n"
-"Služba VPN řekla: \"%s\""
-
-#: ../gnome/applet/applet.c:495
-#, c-format
-msgid ""
-"<span weight=\"bold\" size=\"larger\">VPN Start Failure</span>\n"
-"\n"
-"Could not start the VPN connection '%s' due to a failure launching the VPN "
-"program.\n"
-"\n"
-"The VPN service said: \"%s\""
-msgstr ""
-"<span weight=\"bold\" size=\"larger\">Chyba při spouštění VPN</span>\n"
-"\n"
-"Nemohu spustit připojení k VPN '%s' kvůli chybě spouštění programu pro VPN.\n"
-"\n"
-"Služba VPN řekla: \"%s\""
-
-#: ../gnome/applet/applet.c:500
-#, c-format
-msgid ""
-"<span weight=\"bold\" size=\"larger\">VPN Connect Failure</span>\n"
-"\n"
-"Could not start the VPN connection '%s' due to a connection error.\n"
-"\n"
-"The VPN service said: \"%s\""
-msgstr ""
-"<span weight=\"bold\" size=\"larger\">Chyba při připojování k VPN</span>\n"
-"\n"
-"Nemohu spustit připojení k VPN '%s' kvůli chybě připojování.\n"
-"\n"
-"Služba VPN řekla: \"%s\""
-
-#: ../gnome/applet/applet.c:505
-#, c-format
-msgid ""
-"<span weight=\"bold\" size=\"larger\">VPN Configuration Error</span>\n"
-"\n"
-"The VPN connection '%s' was not correctly configured.\n"
-"\n"
-"The VPN service said: \"%s\""
-msgstr ""
-"<span weight=\"bold\" size=\"larger\">Chyba nastavení VPN</span>\n"
-"\n"
-"Připojení k VPN '%s' nebylo správně nastaveno.\n"
-"\n"
-"Služba VPN řekla: \"%s\""
-
-#: ../gnome/applet/applet.c:510
-#, c-format
-msgid ""
-"<span weight=\"bold\" size=\"larger\">VPN Connect Failure</span>\n"
-"\n"
-"Could not start the VPN connection '%s' because the VPN server did not "
-"return an adequate network configuration.\n"
-"\n"
-"The VPN service said: \"%s\""
-msgstr ""
-"<span weight=\"bold\" size=\"larger\">Chyba při připojování k VPN</span>\n"
-"\n"
-"Nemohu spustit připojení k VPN '%s', protože VPN server nevrátil "
-"odpovídající nastavení sítě.\n"
-"\n"
-"Služba VPN řekla: \"%s\""
-
-#: ../gnome/applet/applet.c:577
-#, c-format
-msgid ""
-"<span weight=\"bold\" size=\"larger\">VPN Login Message</span>\n"
-"\n"
-"VPN connection '%s' said:\n"
-"\n"
-"\"%s\""
-msgstr ""
-"<span weight=\"bold\" size=\"larger\">Zpráva o přihlášení k VPN</span>\n"
-"\n"
-"Připojení k VPN '%s' řeklo:\n"
-"\n"
-"\"%s\""
-
-#: ../gnome/applet/applet.c:795 ../gnome/applet/applet.c:2431
-#: ../gnome/applet/other-network-dialog.c:322
-#: ../gnome/applet/passphrase-dialog.c:397
-msgid ""
-"The NetworkManager Applet could not find some required resources (the glade "
-"file was not found)."
-msgstr ""
-"Aplet NetworkManager nemohl najít některé vyžadované zdroje (soubor glade "
-"nebyl nalezen)."
-
-#: ../gnome/applet/applet.c:808
-#, c-format
-msgid "The network device \"%s (%s)\" does not support wireless scanning."
-msgstr "Síťové zařízení \"%s (%s)\" nepodporuje bezdrátové hledání."
-
-#: ../gnome/applet/applet.c:815
-#, c-format
-msgid "The network device \"%s (%s)\" does not support link detection."
-msgstr "Síťové zařízení \"%s (%s)\" nepodporuje detekci připojení."
-
-#: ../gnome/applet/applet.c:936
-#, c-format
-msgid "Preparing device %s for the wired network..."
-msgstr "Připravuji zařízení %s pro drátovou síť..."
-
-#: ../gnome/applet/applet.c:938
-#, c-format
-msgid "Preparing device %s for the wireless network '%s'..."
-msgstr "Připravuji zařízení %s pro bezdrátovou síť '%s' ..."
-
-#: ../gnome/applet/applet.c:945
-#, c-format
-msgid "Configuring device %s for the wired network..."
-msgstr "Nastavuji zařízení %s pro drátovou síť..."
-
-#: ../gnome/applet/applet.c:947
-#, c-format
-msgid "Attempting to join the wireless network '%s'..."
-msgstr "Pokouším se přidat k bezdrátové síti '%s'..."
-
-#: ../gnome/applet/applet.c:954
-#, c-format
-msgid "Waiting for Network Key for the wireless network '%s'..."
-msgstr "ÄŒekám na klÃ­Ä bezdrátové sítÄ› '%s' ..."
-
-#: ../gnome/applet/applet.c:961 ../gnome/applet/applet.c:970
-msgid "Requesting a network address from the wired network..."
-msgstr "Žádám síťovou adresu od drátové sítě..."
-
-#: ../gnome/applet/applet.c:963 ../gnome/applet/applet.c:972
-#, c-format
-msgid "Requesting a network address from the wireless network '%s'..."
-msgstr "Žádám síťovou adresu od bezdrátové sítě '%s'..."
-
-#: ../gnome/applet/applet.c:979
-msgid "Finishing connection to the wired network..."
-msgstr "DokonÄuji pÅ™ipojení k drátové síti..."
-
-#: ../gnome/applet/applet.c:981
-#, c-format
-msgid "Finishing connection to the wireless network '%s'..."
-msgstr "DokonÄuji pÅ™ipojení k bezdrátové síti '%s' ..."
-
-#: ../gnome/applet/applet.c:1027
-msgid "NetworkManager is not running"
-msgstr "NetworkManager neběží"
-
-#: ../gnome/applet/applet.c:1038
-msgid "No network connection"
-msgstr "Žádné připojení k síti"
-
-#: ../gnome/applet/applet.c:1045
-msgid "Wired network connection"
-msgstr "Drátové připojení k síti"
-
-#: ../gnome/applet/applet.c:1052
-msgid "Connected to an Ad-Hoc wireless network"
-msgstr "Připojen k ad-hoc bezdrátové síti"
-
-#: ../gnome/applet/applet.c:1066
-#, c-format
-msgid "Wireless network connection to '%s' (%d%%)"
-msgstr "Bezdrátové připojení k '%s' (%d%%)"
-
-#: ../gnome/applet/applet.c:1091
-#, c-format
-msgid "VPN connection to '%s'"
-msgstr "Připojení k VPN '%s'"
-
-#: ../gnome/applet/applet.c:1542
-msgid "_Connect to Other Wireless Network..."
-msgstr "_Připojit se k jiné bezdrátové síti..."
-
-#: ../gnome/applet/applet.c:1563
-msgid "Create _New Wireless Network..."
-msgstr "Vytvořit _novou bezdrátovou síť..."
-
-#: ../gnome/applet/applet.c:1676
-#: ../gnome/vpn-properties/nm-vpn-properties.glade.h:17
-msgid "VPN Connections"
-msgstr "Připojení k VPN"
-
-#: ../gnome/applet/applet.c:1703
-msgid "Configure VPN..."
-msgstr "Nastavit VPN..."
-
-#: ../gnome/applet/applet.c:1707
-msgid "Disconnect VPN..."
-msgstr "Odpojit VPN..."
-
-#: ../gnome/applet/applet.c:1730
-msgid "Dial Up"
-msgstr "VytáÄené"
-
-#: ../gnome/applet/applet.c:1790
-msgid "No network devices have been found"
-msgstr "Nebylo nalezeno žádné síťové zařízení"
-
-#: ../gnome/applet/applet.c:1955
-msgid "NetworkManager is not running..."
-msgstr "NetworkManager neběží..."
-
-#: ../gnome/applet/applet.c:2023
-msgid "_Stop All Wireless Devices"
-msgstr "Za_stavit všechna bezdrátová zařízení"
-
-#: ../gnome/applet/applet.c:2028
-msgid "_Start All Wireless Devices"
-msgstr "_Spustit všechna bezdrátová zařízení"
-
-#: ../gnome/applet/applet.c:2059
-msgid "_Wireless Network Discovery"
-msgstr "_Hledání bezdrátových sítí"
-
-#: ../gnome/applet/applet.c:2062
-msgid "Always Search"
-msgstr "Vždy hledat"
-
-#: ../gnome/applet/applet.c:2070
-msgid "Search Only When Disconnected"
-msgstr "Hledat jen při odpojení"
-
-#: ../gnome/applet/applet.c:2078
-msgid "Never Search"
-msgstr "Nikdy nehledat"
-
-#. Stop All Wireless Devices item
-#: ../gnome/applet/applet.c:2090
-msgid "Stop All Wireless Devices"
-msgstr "Zastavit všechna bezdrátová zařízení"
-
-#: ../gnome/applet/applet.c:2096
-msgid "Connection _Information"
-msgstr "_Informace o spojení"
-
-#: ../gnome/applet/applet.c:2104
-msgid "_Help"
-msgstr "_Nápověda"
-
-#: ../gnome/applet/applet.c:2111
-msgid "_About"
-msgstr "O _aplikaci"
-
-#: ../gnome/applet/applet.c:2581
-msgid ""
-"The NetworkManager applet could not find some required resources. It cannot "
-"continue.\n"
-msgstr ""
-"Aplet NetworkManager nemohl najít některé vyžadované zdroje. Nemůže "
-"pokraÄovat.\n"
-
-#: ../gnome/applet/eggtrayicon.c:118
-msgid "Orientation"
-msgstr "Orientace"
-
-#: ../gnome/applet/eggtrayicon.c:119
-msgid "The orientation of the tray."
-msgstr "Orientace oznamovací oblasti."
-
-#: ../gnome/applet/menu-items.c:89
-#, c-format
-msgid "Wired Network (%s)"
-msgstr "Drátová síť (%s)"
-
-#: ../gnome/applet/menu-items.c:92
-msgid "_Wired Network"
-msgstr "_Drátová síť"
-
-#: ../gnome/applet/menu-items.c:165
-#, c-format
-msgid "Wireless Network (%s)"
-msgid_plural "Wireless Networks (%s)"
-msgstr[0] "Bezdrátová síť (%s)"
-msgstr[1] "Bezdrátové sítě (%s)"
-msgstr[2] "Bezdrátové sítě (%s)"
-
-#: ../gnome/applet/menu-items.c:167
-msgid "Wireless Network"
-msgid_plural "Wireless Networks"
-msgstr[0] "Bezdrátová síť"
-msgstr[1] "Bezdrátové sítě"
-msgstr[2] "Bezdrátové sítě"
-
-#: ../gnome/applet/menu-items.c:309
-msgid " (invalid Unicode)"
-msgstr " (neplatné Unicode)"
-
-#: ../gnome/applet/other-network-dialog.c:143
-#: ../gnome/applet/passphrase-dialog.c:156
-#: ../gnome/applet/wireless-applet.glade.h:34
-msgid "Passphrase:"
-msgstr "Heslo:"
-
-#: ../gnome/applet/other-network-dialog.c:146
-#: ../gnome/applet/passphrase-dialog.c:159
-msgid "ASCII Key:"
-msgstr "KlÃ­Ä v ASCII:"
-
-#: ../gnome/applet/other-network-dialog.c:149
-#: ../gnome/applet/passphrase-dialog.c:162
-msgid "Hex Key:"
-msgstr "KlÃ­Ä Å¡estnáctkovÄ›:"
-
-#: ../gnome/applet/other-network-dialog.c:232
-msgid "Create new wireless network"
-msgstr "Vytvořit novou bezdrátovou síť"
-
-#: ../gnome/applet/other-network-dialog.c:233
-msgid ""
-"Enter the ESSID and security settings of the wireless network you wish to "
-"create."
-msgstr ""
-"Zadejte ESSID a nastavení zabezpeÄení bezdrátové sítÄ›, kterou chcete "
-"vytvořit."
-
-#: ../gnome/applet/other-network-dialog.c:234
-msgid "By default, the ESSID is set to your computer's name,"
-msgstr "ImplicitnÄ› ne ESSID nastaveno na název vaÅ¡eho poÄítaÄe,"
-
-#: ../gnome/applet/other-network-dialog.c:236
-msgid ", with no encryption enabled."
-msgstr ", bez povoleného šifrování."
-
-#: ../gnome/applet/other-network-dialog.c:241
-msgid "Custom wireless network"
-msgstr "Vlastní bezdrátová síť"
-
-#: ../gnome/applet/other-network-dialog.c:242
-msgid "Enter the ESSID of the wireless network to which you wish to connect."
-msgstr "Zadejte ESSID bezdrátové sítě, ke které se chcete připojit."
-
-#: ../gnome/applet/vpn-password-dialog.c:152
-#: ../gnome/applet/vpn-password-dialog.c:191
-#, c-format
-msgid "Cannot start VPN connection '%s'"
-msgstr "Nemohu spustit připojení k VPN '%s'"
-
-#: ../gnome/applet/vpn-password-dialog.c:155
-#, c-format
-msgid ""
-"Could not find the authentication dialog for VPN connection type '%s'. "
-"Contact your system administrator."
-msgstr ""
-"Nemohu najít autentizaÄní dialog pro typ pÅ™ipojení k VPN '%s'. Kontaktujte "
-"vašeho správce systému."
-
-#: ../gnome/applet/vpn-password-dialog.c:194
-#, c-format
-msgid ""
-"There was a problem launching the authentication dialog for VPN connection "
-"type '%s'. Contact your system administrator."
-msgstr ""
-"PÅ™i spouÅ¡tÄ›ní autentizaÄního dialogu pro typ pÅ™ipojení k VPN '%s' se vyskytl "
-"problém. Kontaktujte vašeho správce systému."
-
-#: ../gnome/applet/wireless-applet.glade.h:1
-msgid " "
-msgstr " "
-
-#: ../gnome/applet/wireless-applet.glade.h:2
-msgid ""
-"128-bit Passphrase (WEP)\n"
-"ASCII Key (WEP)\n"
-"Hex Key (WEP)"
-msgstr ""
-"128-bitové heslo (WEP)\n"
-"KlÃ­Ä v ASCII (WEP)\n"
-"KlÃ­Ä Å¡estnáctkovÄ› (WEP)"
-
-#: ../gnome/applet/wireless-applet.glade.h:5
-msgid ""
-"128-bit passphrase (WEP)\n"
-"ASCII key (WEP)\n"
-"Hex key (WEP)"
-msgstr ""
-"128-bitové heslo (WEP)\n"
-"KlÃ­Ä v ASCII (WEP)\n"
-"KlÃ­Ä Å¡estnáctkovÄ› (WEP)"
-
-#: ../gnome/applet/wireless-applet.glade.h:8
-msgid ""
-"<span weight=\"bold\" size=\"larger\">Active Connection Information</span>"
-msgstr ""
-"<span weight=\"bold\" size=\"larger\">Informace o aktivním spojení</span>"
-
-#: ../gnome/applet/wireless-applet.glade.h:10
-#, no-c-format
-msgid ""
-"<span weight=\"bold\" size=\"larger\">Passphrase Required by Wireless "
-"Network</span>\n"
-"\n"
-"A passphrase or encryption key is required to access the wireless network '%"
-"s'."
-msgstr ""
-"<span weight=\"bold\" size=\"larger\">Bezdrátová síť vyžaduje heslo</span>\n"
-"\n"
-"Pro přístup k bezdrátové síti '%s' je vyžadováno heslo nebo Å¡ifrovací klíÄ."
-
-#: ../gnome/applet/wireless-applet.glade.h:14
-#, no-c-format
-msgid ""
-"<span weight=\"bold\" size=\"larger\">Reduced Network Functionality</span>\n"
-"\n"
-"%s It will not be completely functional."
-msgstr ""
-"<span weight=\"bold\" size=\"larger\">Omezená funkce sítě</span>\n"
-"\n"
-"%s Nebude úplně fungovat."
-
-#: ../gnome/applet/wireless-applet.glade.h:18
-#, no-c-format
-msgid ""
-"<span weight=\"bold\" size=\"larger\">Wireless Network Login Confirmation</"
-"span>\n"
-"\n"
-"You have chosen to log in to the wireless network '%s'. If you are sure "
-"that this wireless network is secure, click the checkbox below and "
-"NetworkManager will not require confirmation on subsequent log ins."
-msgstr ""
-"<span weight=\"bold\" size=\"larger\">Potvrzení přihlášení k bezdrátové "
-"síti</span>\n"
-"\n"
-"Rozhodli jste se přihlásit k bezdrátové síti '%s'. Pokud jste si jisti, že "
-"je tato bezdrátová síť bezpeÄná, kliknÄ›te na zaÅ¡krtávací pole níže a "
-"NetworkManager nebude při dalších přihlašováních žádat o potvrzení."
-
-#: ../gnome/applet/wireless-applet.glade.h:21
-msgid "Always Trust this Wireless Network"
-msgstr "Vždy důvěřovat této bezdrátové síti"
-
-#: ../gnome/applet/wireless-applet.glade.h:22
-msgid "Broadcast Address:"
-msgstr "Adresa broadcastu:"
-
-#: ../gnome/applet/wireless-applet.glade.h:23
-msgid "C_onnect"
-msgstr "_Připojit"
-
-#: ../gnome/applet/wireless-applet.glade.h:24
-msgid "Connect with encryption enabled"
-msgstr "Připojit se s povoleným šifrováním"
-
-#: ../gnome/applet/wireless-applet.glade.h:25
-msgid "Connection Information"
-msgstr "Informace o spojení"
-
-#: ../gnome/applet/wireless-applet.glade.h:26
-msgid "Destination Address:"
-msgstr "Adresa cíle:"
-
-#: ../gnome/applet/wireless-applet.glade.h:27
-msgid "Don't remind me again"
-msgstr "Už mě to nepřipomínat"
-
-#: ../gnome/applet/wireless-applet.glade.h:28
-msgid "Hardware Address:"
-msgstr "Hardwarová adresa:"
-
-#: ../gnome/applet/wireless-applet.glade.h:29
-msgid "IP Address:"
-msgstr "IP adresa:"
-
-#: ../gnome/applet/wireless-applet.glade.h:30
-msgid "Interface:"
-msgstr "Rozhraní:"
-
-#: ../gnome/applet/wireless-applet.glade.h:31
-msgid "Key Type:"
-msgstr "Typ klíÄe:"
-
-#: ../gnome/applet/wireless-applet.glade.h:32
-msgid "Key type:"
-msgstr "Typ klíÄe:"
-
-#: ../gnome/applet/wireless-applet.glade.h:33
-msgid "Other Wireless Network..."
-msgstr "Jiná bezdrátová síť..."
-
-#: ../gnome/applet/wireless-applet.glade.h:35
-msgid "Subnet Mask:"
-msgstr "Maska podsítě:"
-
-#: ../gnome/applet/wireless-applet.glade.h:36
-msgid "Wireless Network Key Required"
-msgstr "Je vyžadován klÃ­Ä bezdrátové sítÄ›"
-
-#: ../gnome/applet/wireless-applet.glade.h:37
-msgid "Wireless _adapter:"
-msgstr "Bezdrátový _adaptér:"
-
-#: ../gnome/applet/wireless-applet.glade.h:38
-msgid "Wireless _network:"
-msgstr "Bezdrátová _síť:"
-
-#: ../gnome/applet/wireless-applet.glade.h:39
-msgid "_Login to Network"
-msgstr "_Přihlásit se k síti"
-
-#: ../gnome/applet/wireless-applet.glade.h:40
-msgid "_OK"
-msgstr "_Budiž"
-
-#: ../gnome/vpn-properties/nm-vpn-properties.c:374
-msgid "Cannot add VPN connection"
-msgstr "Nemohu přidat připojení k VPN"
-
-#: ../gnome/vpn-properties/nm-vpn-properties.c:376
-msgid ""
-"No suitable VPN software was found on your system. Contact your system "
-"administrator."
-msgstr ""
-"Ve vašem systému nebyl nalezen vhodný software pro VPN. Kontaktujte vašeho "
-"správce systému."
-
-#: ../gnome/vpn-properties/nm-vpn-properties.c:428
-msgid "Cannot import VPN connection"
-msgstr "Nemohu importovat připojení k VPN"
-
-#: ../gnome/vpn-properties/nm-vpn-properties.c:430
-#, c-format
-msgid ""
-"Cannot find suitable software for VPN connection type '%s' to import the "
-"file '%s'. Contact your system administrator."
-msgstr ""
-"Nemohu najít vhodný soubor pro typ připojení k VPN '%s' pro import souboru '%"
-"s'. Kontaktujte vašeho správce systému."
-
-#: ../gnome/vpn-properties/nm-vpn-properties.c:570
-#, c-format
-msgid "Error retrieving VPN connection '%s'"
-msgstr "Chyba při získávání připojení k VPN '%s'"
-
-#: ../gnome/vpn-properties/nm-vpn-properties.c:573
-#, c-format
-msgid ""
-"Could not find the UI files for VPN connection type '%s'. Contact your "
-"system administrator."
-msgstr ""
-"Nemohu najít soubory UI pro typ připojení k VPN '%s'. Kontaktujte vašeho "
-"správce systému."
-
-#: ../gnome/vpn-properties/nm-vpn-properties.c:733
-#, c-format
-msgid "Delete VPN connection \"%s\"?"
-msgstr "Odstranit připojení k VPN \"%s\"?"
-
-#: ../gnome/vpn-properties/nm-vpn-properties.c:736
-#, c-format
-msgid ""
-"All information about the VPN connection \"%s\" will be lost and you may "
-"need your system administrator to provide information to create a new "
-"connection."
-msgstr ""
-"Všechny informace o připojení k VPN \"%s\" budou ztraceny a možná vám bude "
-"váš správce systému poskytnout informace pro vytvoření nového připojení."
-
-#: ../gnome/vpn-properties/nm-vpn-properties.c:951
-msgid "Unable to load"
-msgstr "Nemohu naÄíst"
-
-#: ../gnome/vpn-properties/nm-vpn-properties.c:953
-msgid "Cannot find some needed resources (the glade file)!"
-msgstr "Nemohu najít některé vyžadované zdroje (soubor glade)!"
-
-#. Edit dialog
-#: ../gnome/vpn-properties/nm-vpn-properties.c:1071
-msgid "Edit VPN Connection"
-msgstr "Upravit připojení k VPN"
-
-#: ../gnome/vpn-properties/nm-vpn-properties.glade.h:1
-msgid "Add a new VPN connection"
-msgstr "Přidat nové připojení k VPN"
-
-#: ../gnome/vpn-properties/nm-vpn-properties.glade.h:2
-msgid "Connect to:"
-msgstr "Připojit se k:"
-
-#: ../gnome/vpn-properties/nm-vpn-properties.glade.h:3
-msgid "Create VPN Connection"
-msgstr "Vytvořit připojení k VPN"
-
-#: ../gnome/vpn-properties/nm-vpn-properties.glade.h:4
-msgid "Create VPN Connection - 1 of 2"
-msgstr "Vytvořit připojení k VPN - 1 z 2"
-
-#: ../gnome/vpn-properties/nm-vpn-properties.glade.h:5
-msgid "Create VPN Connection - 2 of 2"
-msgstr "Vytvořit připojení k VPN - 2 z 2"
-
-#: ../gnome/vpn-properties/nm-vpn-properties.glade.h:6
-msgid "Delete the selected VPN connection"
-msgstr "Odstranit vybrané připojení k VPN"
-
-#: ../gnome/vpn-properties/nm-vpn-properties.glade.h:7
-msgid ""
-"Dependent on the private network you want to connect to, you need to select "
-"what type of connection you want to create."
-msgstr ""
-"Podle soukromé sítě, ke které se chcete připojit, musíte vybrat, jaký typ "
-"připojení chcete vytvořit."
-
-#: ../gnome/vpn-properties/nm-vpn-properties.glade.h:8
-msgid "E_xport"
-msgstr "_Exportovat"
-
-#: ../gnome/vpn-properties/nm-vpn-properties.glade.h:9
-msgid "Edit the selected VPN connection"
-msgstr "Upravit vybrané připojení k VPN"
-
-#: ../gnome/vpn-properties/nm-vpn-properties.glade.h:10
-msgid "Export VPN connection to a file"
-msgstr "Exportovat připojení k VPN do souboru"
-
-#: ../gnome/vpn-properties/nm-vpn-properties.glade.h:11
-msgid "Export the VPN settings to a file"
-msgstr "Exportovat nastavení VPN do souboru"
-
-#: ../gnome/vpn-properties/nm-vpn-properties.glade.h:12
-msgid "Finish create VPN Connection"
-msgstr "DokonÄit vytváření pÅ™ipojení k VPN"
-
-#: ../gnome/vpn-properties/nm-vpn-properties.glade.h:13
-msgid "Manage Virtual Private Network connections"
-msgstr "Spravovat připojení k virtuálním soukromým sítím"
-
-#: ../gnome/vpn-properties/nm-vpn-properties.glade.h:14
-msgid ""
-"This assistant will guide you through the creation of a new VPN connection "
-"to a private network.\n"
-"\n"
-"It will require some information, such as IP addresses and secrets, that "
-"will probably be provided by your system administrator as appropriate."
-msgstr ""
-"Tento asistent vás provede vytvořením nového připojení VPN k soukromé síti.\n"
-"\n"
-"Bude vyžadovat některé informace, například IP adresy a hesla, které "
-"pravděpodobně dodá váš správce systému."
-
-#: ../src/nm-netlink-monitor.c:154
-#, c-format
-msgid ""
-"unable to create netlink socket for monitoring wired ethernet devices - %s"
-msgstr ""
-"nemohu vytvořit socket netlink pro sledování drátových síťových zařízení - %s"
-
-#: ../src/nm-netlink-monitor.c:172
-#, c-format
-msgid ""
-"unable to bind to netlink socket for monitoring wired ethernet devices - %s"
-msgstr ""
-"nemohu se připojit k socketu netlink pro sledování drátových síťových "
-"zařízení - %s"
-
-#: ../src/nm-netlink-monitor.c:403
-msgid "operation took too long"
-msgstr "operace trvala příliš dlouho"
-
-#: ../src/nm-netlink-monitor.c:500
-msgid "received data from wrong type of sender"
-msgstr "přijata data od špatného typu odesílatele"
-
-#: ../src/nm-netlink-monitor.c:513
-msgid "received data from unexpected sender"
-msgstr "pÅ™ijata data od neoÄekávaného odesílatele"
-
-#: ../src/nm-netlink-monitor.c:535
-#, c-format
-msgid "%s"
-msgstr "%s"
-
-#: ../src/nm-netlink-monitor.c:644
-msgid "too much data was sent over socket and some of it was lost"
-msgstr "po socketu bylo posláno příliš mnoho dat a některá byla ztracena"
-
-#: ../src/nm-netlink-monitor.c:733
-msgid "error occurred while waiting for data on socket"
-msgstr "pÅ™i Äekání na data ze socketu doÅ¡lo k chybÄ›"
-
-#~ msgid "Other Wireless Networks..."
-#~ msgstr "Jiné bezdrátové sítě..."
-
-#~ msgid "Wireless Scanning"
-#~ msgstr "Bezdrátové hledání"
-
-#~ msgid "On"
-#~ msgstr "Zapnuto"
-
-#~ msgid "Off"
-#~ msgstr "Vypnuto"
-
-#~ msgid "Automatic"
-#~ msgstr "Automatické"
-
-#~ msgid "progress bar label|%d %%"
-#~ msgstr "%d %%"
-
-#~ msgid "You must log in to access the Virtual Private Network '%s'."
-#~ msgstr ""
-#~ "Pro přístup k virtuální privátní síti síti '%s' se musíte přihlásit."
-
-#~ msgid "Resume Wireless Scanning"
-#~ msgstr "PokraÄovat v bezdrátovém hledání"
-
-#~ msgid "Configuring device %s for the wireless network '%s'..."
-#~ msgstr "Nastavuji zařízení %s pro bezdrátovou síť '%s' ..."
-
-#~ msgid "<span weight=\"bold\">Wireless Networks:</span>"
-#~ msgstr "<span weight=\"bold\">Bezdrátové sítě:</span>"
-
-#~ msgid "Modify Wireless Networks"
-#~ msgstr "Upravit bezdrátové sítě"
-
-#~ msgid "Scanning for wireless networks..."
-#~ msgstr "Hledám bezdrátové sítě..."
-
-#~ msgid "_About..."
-#~ msgstr "O _aplikaci..."
diff --git a/po/da.po b/po/da.po
deleted file mode 100644
index fc04bd441d..0000000000
--- a/po/da.po
+++ /dev/null
@@ -1,191 +0,0 @@
-# Danish translation of NetworkManager.
-# Copyright (C) 2004 Dan Williams <dcbw@redhat.com>
-# This file is distributed under the same license as the NetworkManager package.
-# David Nielsen <dnielsen@breakmygentoo.net>, 2004.
-# Martin Willemoes Hansen <mwh@sysrq.dk>, 2004
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: NetworkManager\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2004-10-19 13:38-0400\n"
-"PO-Revision-Date: 2004-09-11 16:50+0200\n"
-"Last-Translator: Martin Willemoes Hansen <mwh@sysrq.dk>\n"
-"Language-Team: Danish <dansk@klid.dk>\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-
-#: info-daemon/networks.glade:11
-msgid "Modify Wireless Networks"
-msgstr "Ændre trådløse netværk"
-
-#: info-daemon/networks.glade:92
-msgid "<span weight=\"bold\">Wireless Networks:</span>"
-msgstr "<span weight=\"bold\">Trådløse netværk:</span>"
-
-#: info-daemon/passphrase.glade:9
-msgid "Wireless Network Key Required"
-msgstr "Nøgle til trådløst netværk påkrævet"
-
-#: info-daemon/passphrase.glade:52
-msgid "_Login to Network"
-msgstr "_Log på netværk"
-
-#: info-daemon/passphrase.glade:100
-#, fuzzy
-msgid ""
-"<span weight=\"bold\" size=\"larger\">Passphrase Required by Wireless "
-"Network</span>\n"
-"\n"
-"A passphrase or encryption key is required to access the wireless network '%"
-"s'."
-msgstr ""
-"<span weight=\"bold\" size=\"larger\">Løsen påkrævet af trådløst netværk</"
-"span>\n"
-"\n"
-"Et løsen eller en WEP nøgle er påkrævet for adgang til det trådløse netværk "
-"'%s'."
-
-#: info-daemon/passphrase.glade:129
-msgid "Key Type:"
-msgstr ""
-
-#: info-daemon/passphrase.glade:150
-msgid ""
-"128-bit Passphrase\n"
-"128-bit Raw Hex Key"
-msgstr ""
-
-#: info-daemon/passphrase.glade:180
-#: info-daemon/NetworkManagerInfoPassphraseDialog.c:101
-msgid "Passphrase:"
-msgstr "Løsen:"
-
-#: info-daemon/passphrase.glade:208 panel-applet/essid.glade:162
-msgid "*"
-msgstr "*"
-
-#: info-daemon/NetworkManagerInfoPassphraseDialog.c:104
-msgid "Key:"
-msgstr ""
-
-#. Reuse the above string to make the translators less angry.
-#: panel-applet/NMWirelessApplet.c:691 panel-applet/NMWirelessApplet.c:701
-msgid ""
-"The NetworkManager Applet could not find some required resources (the glade "
-"file was not found)."
-msgstr ""
-"NetworkManager panelprogrammet kunne ikke finde nogle krævede resurser "
-"(glade filen blev ikke fundet)."
-
-#: panel-applet/NMWirelessApplet.c:716
-#, fuzzy
-msgid "Custom wireless network"
-msgstr "Ændre trådløse netværk"
-
-#: panel-applet/NMWirelessApplet.c:717
-msgid "Enter the ESSID of the wireless network to which you wish to connect."
-msgstr ""
-
-#: panel-applet/NMWirelessApplet.c:800
-#, fuzzy
-msgid "Other Wireless Networks..."
-msgstr "Andet trådløst netværk ..."
-
-#: panel-applet/NMWirelessApplet.c:911
-msgid "No network devices have been found"
-msgstr ""
-
-#: panel-applet/NMWirelessApplet.c:1028
-msgid "NetworkManager is not running..."
-msgstr "NetworkManager kører ikke..."
-
-#: panel-applet/essid.glade:52
-msgid "C_onnect"
-msgstr ""
-
-#: panel-applet/essid.glade:131
-#, fuzzy
-msgid "Wireless _Network:"
-msgstr "Ændre trådløse netværk"
-
-#: panel-applet/essid.glade:177
-msgid "Wireless _adapter:"
-msgstr ""
-
-#: panel-applet/menu-info.c:101
-#, fuzzy, c-format
-msgid "Wired Network (%s)"
-msgstr "Ændre trådløse netværk"
-
-#: panel-applet/menu-info.c:103
-#, fuzzy
-msgid "Wired Network"
-msgstr "Ændre trådløse netværk"
-
-#: panel-applet/menu-info.c:168
-#, fuzzy, c-format
-msgid "Wireless Network (%s)"
-msgid_plural "Wireless Networks (%s)"
-msgstr[0] "Ændre trådløse netværk"
-msgstr[1] "Ændre trådløse netværk"
-
-#: panel-applet/menu-info.c:170
-#, fuzzy
-msgid "Wireless Network"
-msgid_plural "Wireless Networks"
-msgstr[0] "Ændre trådløse netværk"
-msgstr[1] "Ændre trådløse netværk"
-
-#: panel-applet/menu-info.c:307
-msgid " (invalid Unicode)"
-msgstr ""
-
-#: examples/python/systray/eggtrayicon.c:111
-msgid "Orientation"
-msgstr ""
-
-#: examples/python/systray/eggtrayicon.c:112
-msgid "The orientation of the tray."
-msgstr ""
-
-#~ msgid "There are no wireless networks..."
-#~ msgstr "Der er ingen trådløse netværk..."
-
-#~ msgid "There are no network devices..."
-#~ msgstr "Der er ingen netværksenheder..."
-
-#~ msgid "Network Connections"
-#~ msgstr "Netværkforbindelsers"
-
-#~ msgid "_About..."
-#~ msgstr "_Om..."
-
-#~ msgid " "
-#~ msgstr " "
-
-#~ msgid ""
-#~ "<span weight=\"bold\" size=\"larger\">Wireless Network Login "
-#~ "Confirmation</span>\n"
-#~ "\n"
-#~ "You have chosen log in to the wireless network '%s'. If you are sure "
-#~ "this wireless network is secure, click the checkbox below and "
-#~ "NetworkManager will no longer pester you with stupid questions when you "
-#~ "connect to it."
-#~ msgstr ""
-#~ "<span weight=\"bold\" size=\"larger\">Trådløst netværk login "
-#~ "bekræftigelse</span>\n"
-#~ "\n"
-#~ "Du har valgt at logge på det trådløse netværk '%s'. Hvis du er sikker på "
-#~ "at dette trådløse netværk er sikkert, afkryds nedenstående boks og "
-#~ "NetworkManager vil i fremtiden ikke spørge når du tilslutter dig."
-
-#~ msgid "Always Trust this Wireless Network"
-#~ msgstr "Stol altid på dette trådløse netværk"
-
-#~ msgid "No network connection is currently active..."
-#~ msgstr "Ingen netværksforbindelse er aktiv..."
-
-#~ msgid "A wired network connection is currently active..."
-#~ msgstr "En kablet netværksforbindelse er aktiv..."
diff --git a/po/de.po b/po/de.po
deleted file mode 100644
index 6a2258ba2f..0000000000
--- a/po/de.po
+++ /dev/null
@@ -1,791 +0,0 @@
-# German translation of NetworkManager.
-# Copyright (C) 2005 Dan Williams <dcbw@redhat.com>
-# This file is distributed under the same license as the NetworkManager package.
-# Hendrik Brandt <heb@gnome-de.org>, 2004.
-# Frank Arnold <frank@scirocco-5v-turbo.de>, 2005.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: NetworkManager\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2005-08-18 00:52+0200\n"
-"PO-Revision-Date: 2005-08-18 00:51+0200\n"
-"Last-Translator: Frank Arnold <frank@scirocco-5v-turbo.de>\n"
-"Language-Team: German <gnome-de@gnome.org>\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"Plural-Forms: nplurals=2; plural=(n != 1);\n"
-
-#. Setup a request to the keyring to save the network passphrase
-#: ../gnome/applet/applet-dbus-info.c:894
-#, c-format
-msgid "Passphrase for wireless network %s"
-msgstr "Passwort für Funknetzwerk %s"
-
-#: ../gnome/applet/applet-dbus-info.c:1116
-#, c-format
-msgid ""
-"The requested wireless network '%s' does not appear to be in range. A "
-"different wireless network will be used if any are available."
-msgstr ""
-"Das gewünschte Funknetzwerk »%s« scheint nicht in Reichweite zu sein. Falls "
-"weitere Funknetzwerke verfügbar sind, wird ein anderes verwendet."
-
-#: ../gnome/applet/applet-dbus.c:598
-#, c-format
-msgid "Connection to the wireless network '%s' failed."
-msgstr "Die Verbindung mit Funknetzwerk »%s« ist fehlgeschlagen."
-
-#: ../gnome/applet/applet-dbus.c:603
-msgid "Connection to the wired network failed."
-msgstr "Die Verbindung mit dem Kabelnetzwerk ist fehlgeschlagen."
-
-#: ../gnome/applet/applet.c:192
-msgid "Error displaying connection information: "
-msgstr "Die Verbindungsinformationen konnte nicht angezeigt werden: "
-
-#: ../gnome/applet/applet.c:217
-msgid "Could not find some required resources (the glade file)!"
-msgstr ""
-"Einige benötigte Ressourcen wurden nicht gefunden (die Glade-Datei fehlt)."
-
-#: ../gnome/applet/applet.c:227
-msgid "No active connections!"
-msgstr "Keine aktive Netzwerkverbindung"
-
-#: ../gnome/applet/applet.c:236
-msgid "Could not open socket!"
-msgstr "Socket konnte nicht geöffnet werden."
-
-#: ../gnome/applet/applet.c:251
-msgid "Failed to get information about the interface!"
-msgstr "Schnittstelleninformationen konnte nicht ermittelt werden."
-
-#: ../gnome/applet/applet.c:284
-#, c-format
-msgid "Wired Ethernet (%s)"
-msgstr "Kabel-Ethernet (%s)"
-
-#: ../gnome/applet/applet.c:286
-#, c-format
-msgid "Wireless Ethernet (%s)"
-msgstr "Funk-Ethernet (%s)"
-
-#: ../gnome/applet/applet.c:380 ../gnome/applet/applet.c:398
-msgid "NetworkManager Applet"
-msgstr "Netzwerk-Manager-Applet"
-
-#: ../gnome/applet/applet.c:382 ../gnome/applet/applet.c:400
-msgid "Copyright (C) 2004-2005 Red Hat, Inc."
-msgstr "Copyright © 2004-2005 Red Hat, Inc."
-
-#: ../gnome/applet/applet.c:383 ../gnome/applet/applet.c:401
-msgid ""
-"Notification area applet for managing your network devices and connections."
-msgstr ""
-"Ein Applet für das Benachrichtigungsfeld, mit dem Sie Ihre Netzwerkgeräte "
-"und Netzwerkverbindungen verwalten können."
-
-#: ../gnome/applet/applet.c:489
-msgid "VPN Error"
-msgstr "VPN-Fehler"
-
-#: ../gnome/applet/applet.c:493
-msgid "VPN Login Failure"
-msgstr "VPN-Anmeldefehler"
-
-#: ../gnome/applet/applet.c:494
-#, c-format
-msgid "Could not start the VPN connection '%s' due to a login failure."
-msgstr ""
-"VPN-Verbindung »%s« konnte auf Grund eines Anmeldefehlers nicht gestartet "
-"werden."
-
-#: ../gnome/applet/applet.c:498
-msgid "VPN Start Failure"
-msgstr "VPN-Startfehler"
-
-#: ../gnome/applet/applet.c:499
-#, c-format
-msgid ""
-"Could not start the VPN connection '%s' due to a failure launching the VPN "
-"program."
-msgstr ""
-"Die VPN-Verbindung »%s« konnte infolge eines Fehlers beim Starten des VPN-"
-"Programms nicht hergestellt werden."
-
-#: ../gnome/applet/applet.c:503 ../gnome/applet/applet.c:513
-msgid "VPN Connect Failure"
-msgstr "VPN-Verbindungsfehler"
-
-#: ../gnome/applet/applet.c:504
-#, c-format
-msgid "Could not start the VPN connection '%s' due to a connection error."
-msgstr ""
-"VPN-Verbindung »%s« konnte auf Grund eines Verbindungsfehlers nicht "
-"gestartet werden"
-
-#: ../gnome/applet/applet.c:508
-msgid "VPN Configuration Error"
-msgstr "VPN-Konfigurationsfehler"
-
-#: ../gnome/applet/applet.c:509
-#, c-format
-msgid "The VPN connection '%s' was not correctly configured."
-msgstr "Die VPN-Verbindung »%s« wurde nicht richtig konfiguriert."
-
-#: ../gnome/applet/applet.c:514
-#, c-format
-msgid ""
-"Could not start the VPN connection '%s' because the VPN server did not "
-"return an adequate network configuration."
-msgstr ""
-"Die VPN-Verbindung »%s« konnte nicht hergestellt werden, da der VPN-Server "
-"keine geeignete Netzwerkkonfiguration lieferte."
-
-#: ../gnome/applet/applet.c:522
-#, c-format
-msgid "The VPN service said: \"%s\""
-msgstr "Anwort des VPN-Dienstes: »%s«"
-
-#: ../gnome/applet/applet.c:591
-#, c-format
-msgid "VPN connection '%s' said:"
-msgstr "Antwort der VPN-Verbindung »%s«:"
-
-#: ../gnome/applet/applet.c:592
-#, c-format
-msgid ""
-"<span weight=\"bold\" size=\"larger\">%s</span>\n"
-"\n"
-"%s\n"
-"\n"
-"\"%s\""
-msgstr ""
-"<span weight=\"bold\" size=\"larger\">%s</span>\n"
-"\n"
-"%s\n"
-"\n"
-"»%s«"
-
-#: ../gnome/applet/applet.c:593
-msgid "VPN Login Message"
-msgstr "VPN-Anmeldemitteilung"
-
-#: ../gnome/applet/applet.c:812 ../gnome/applet/applet.c:2413
-#: ../gnome/applet/other-network-dialog.c:322
-#: ../gnome/applet/passphrase-dialog.c:396
-msgid ""
-"The NetworkManager Applet could not find some required resources (the glade "
-"file was not found)."
-msgstr ""
-"Das Netzwerk-Manager-Applet konnte benötigte Ressourcen nicht finden (Die "
-"Glade-Datei wurde nicht gefunden)."
-
-#: ../gnome/applet/applet.c:825
-#, c-format
-msgid "The network device \"%s (%s)\" does not support wireless scanning."
-msgstr "Das Netzwerkgerät »%s (%s)« unterstützt keine Funknetzwerksuche."
-
-#: ../gnome/applet/applet.c:832
-#, c-format
-msgid "The network device \"%s (%s)\" does not support link detection."
-msgstr "Das Netzwerkgerät »%s (%s)« unterstützt keine Link-Erkennung."
-
-#: ../gnome/applet/applet.c:953
-#, c-format
-msgid "Preparing device %s for the wired network..."
-msgstr "Vorbereiten des Geräts %s wird für das Kabelnetzwerk..."
-
-#: ../gnome/applet/applet.c:955
-#, c-format
-msgid "Preparing device %s for the wireless network '%s'..."
-msgstr "Vorbereiten des Geräts %s für das Funknetzwerk »%s«..."
-
-#: ../gnome/applet/applet.c:962
-#, c-format
-msgid "Configuring device %s for the wired network..."
-msgstr "Konfigurieren des Geräts %s für das Kabelnetzwerk..."
-
-#: ../gnome/applet/applet.c:964
-#, c-format
-msgid "Attempting to join the wireless network '%s'..."
-msgstr "Versuch, dem Funknetzwerk »%s« beizutreten..."
-
-#: ../gnome/applet/applet.c:971
-#, c-format
-msgid "Waiting for Network Key for the wireless network '%s'..."
-msgstr "Warten auf den Netzwerkschlüssel für das Funknetzwerk »%s«..."
-
-#: ../gnome/applet/applet.c:978 ../gnome/applet/applet.c:987
-msgid "Requesting a network address from the wired network..."
-msgstr "Anfordern einer Netzwerkadresse vom Kabelnetzwerk..."
-
-#: ../gnome/applet/applet.c:980 ../gnome/applet/applet.c:989
-#, c-format
-msgid "Requesting a network address from the wireless network '%s'..."
-msgstr "Anfordern einer Netzwerkadresse vom Funknetzwerk »%s«..."
-
-#: ../gnome/applet/applet.c:996
-msgid "Finishing connection to the wired network..."
-msgstr "Fertigstellen der Verbindung mit dem Kabelnetzwerk..."
-
-#: ../gnome/applet/applet.c:998
-#, c-format
-msgid "Finishing connection to the wireless network '%s'..."
-msgstr "Fertigstellen der Verbindung mit dem Funknetzwerk »%s«..."
-
-#: ../gnome/applet/applet.c:1044
-msgid "NetworkManager is not running"
-msgstr "Der Netzwerk-Manager ist nicht aktiv"
-
-#: ../gnome/applet/applet.c:1055
-msgid "No network connection"
-msgstr "Keine Netzwerkverbindung"
-
-#: ../gnome/applet/applet.c:1062
-msgid "Wired network connection"
-msgstr "Kabelnetzwerkverbindung"
-
-#: ../gnome/applet/applet.c:1069
-msgid "Connected to an Ad-Hoc wireless network"
-msgstr "Verbunden mit einem Ad-Hoc-Funknetzwerk"
-
-#: ../gnome/applet/applet.c:1083
-#, c-format
-msgid "Wireless network connection to '%s' (%d%%)"
-msgstr "Funknetzwerkverbindung mit »%s« (%d%%)"
-
-#: ../gnome/applet/applet.c:1108
-#, c-format
-msgid "VPN connection to '%s'"
-msgstr "VPN-Verbindungen zu »%s«"
-
-#: ../gnome/applet/applet.c:1521
-msgid "_Connect to Other Wireless Network..."
-msgstr "Mit einem anderen Funknetzwerk _verbinden..."
-
-#: ../gnome/applet/applet.c:1542
-msgid "Create _New Wireless Network..."
-msgstr "_Neues Funknetzwerk erstellen..."
-
-#: ../gnome/applet/applet.c:1655
-msgid "_VPN Connections"
-msgstr "_VPN-Verbindungen"
-
-#: ../gnome/applet/applet.c:1682
-msgid "_Configure VPN..."
-msgstr "VPN _konfigurieren..."
-
-#: ../gnome/applet/applet.c:1686
-msgid "_Disconnect VPN..."
-msgstr "VPN _trennen..."
-
-#: ../gnome/applet/applet.c:1709
-msgid "_Dial Up Connections"
-msgstr "_Einwahlverbindung"
-
-#: ../gnome/applet/applet.c:1718
-#, c-format
-msgid "Connect to %s..."
-msgstr "Verbinden mit %s..."
-
-#: ../gnome/applet/applet.c:1770
-msgid "No network devices have been found"
-msgstr "Es wurden keine Netzwerkgeräte gefunden"
-
-#: ../gnome/applet/applet.c:1935
-msgid "NetworkManager is not running..."
-msgstr "Der Netzwerk-Manager ist nicht aktiv..."
-
-#: ../gnome/applet/applet.c:2003
-msgid "_Stop All Wireless Devices"
-msgstr "Alle Funknetzwerkgeräte _stoppen"
-
-#: ../gnome/applet/applet.c:2008
-msgid "_Start All Wireless Devices"
-msgstr "Alle Funknetzwerkgeräte s_tarten"
-
-#: ../gnome/applet/applet.c:2039
-msgid "_Wireless Network Discovery"
-msgstr "_Funknetzwerksuche"
-
-#: ../gnome/applet/applet.c:2042
-msgid "Always Search"
-msgstr "Immer Suchen"
-
-#: ../gnome/applet/applet.c:2050
-msgid "Search Only When Disconnected"
-msgstr "Nur Suchen, wenn nicht verbunden"
-
-#: ../gnome/applet/applet.c:2058
-msgid "Never Search"
-msgstr "Niemals Suchen"
-
-#. Stop All Wireless Devices item
-#: ../gnome/applet/applet.c:2070
-msgid "Stop All Wireless Devices"
-msgstr "Alle Funknetzwerkgeräte stoppen"
-
-#: ../gnome/applet/applet.c:2076
-msgid "Connection _Information"
-msgstr "Verbindungs_informationen"
-
-#: ../gnome/applet/applet.c:2084
-msgid "_Help"
-msgstr "_Hilfe"
-
-#: ../gnome/applet/applet.c:2091
-msgid "_About"
-msgstr "_Info"
-
-#: ../gnome/applet/applet.c:2563
-msgid ""
-"The NetworkManager applet could not find some required resources. It cannot "
-"continue.\n"
-msgstr ""
-"Das Netzwerk-Manager-Applet konnte benötigte Ressourcen nicht finden und "
-"kann deshalb nicht fortfahren.\n"
-
-#: ../gnome/applet/eggtrayicon.c:118
-msgid "Orientation"
-msgstr "Ausrichtung"
-
-#: ../gnome/applet/eggtrayicon.c:119
-msgid "The orientation of the tray."
-msgstr "Die Ausrichtung des Benachrichtigungsfeldes."
-
-#: ../gnome/applet/menu-items.c:89
-#, c-format
-msgid "Wired Network (%s)"
-msgstr "Kabelnetzwerk (%s)"
-
-#: ../gnome/applet/menu-items.c:92
-msgid "_Wired Network"
-msgstr "_Kabelnetzwerk"
-
-#: ../gnome/applet/menu-items.c:165
-#, c-format
-msgid "Wireless Network (%s)"
-msgid_plural "Wireless Networks (%s)"
-msgstr[0] "Funknetzwerk (%s)"
-msgstr[1] "Funknetzwerke (%s)"
-
-#: ../gnome/applet/menu-items.c:167
-msgid "Wireless Network"
-msgid_plural "Wireless Networks"
-msgstr[0] "Funknetzwerk"
-msgstr[1] "Funknetzwerke"
-
-#: ../gnome/applet/menu-items.c:309
-msgid " (invalid Unicode)"
-msgstr " (ungültiger Unicode)"
-
-#: ../gnome/applet/other-network-dialog.c:143
-#: ../gnome/applet/passphrase-dialog.c:156
-#: ../gnome/applet/wireless-applet.glade.h:34
-msgid "Passphrase:"
-msgstr "Passwort:"
-
-#: ../gnome/applet/other-network-dialog.c:146
-#: ../gnome/applet/passphrase-dialog.c:159
-msgid "ASCII Key:"
-msgstr "ASCII-Schlüssel:"
-
-#: ../gnome/applet/other-network-dialog.c:149
-#: ../gnome/applet/passphrase-dialog.c:162
-msgid "Hex Key:"
-msgstr "Hexadezimalschlüssel:"
-
-#: ../gnome/applet/other-network-dialog.c:232
-msgid "Create new wireless network"
-msgstr "Ein neues Funknetzwerk erstellen"
-
-#: ../gnome/applet/other-network-dialog.c:233
-msgid ""
-"Enter the ESSID and security settings of the wireless network you wish to "
-"create."
-msgstr ""
-"Bitte geben Sie die ESSID und die Sicherheitseinstellungen für das drahtlose "
-"Netzwerk mit dem Sie sich verbinden möchten ein."
-
-#: ../gnome/applet/other-network-dialog.c:234
-msgid "By default, the ESSID is set to your computer's name,"
-msgstr "Als Vorgabe ist die ESSID auf Ihren Rechnernamen gesetzt."
-
-#: ../gnome/applet/other-network-dialog.c:236
-msgid ", with no encryption enabled."
-msgstr ", ohne aktivierte Verschlüsselung."
-
-#: ../gnome/applet/other-network-dialog.c:241
-msgid "Custom wireless network"
-msgstr "Benutzerdefiniertes Funknetzwerk"
-
-#: ../gnome/applet/other-network-dialog.c:242
-msgid "Enter the ESSID of the wireless network to which you wish to connect."
-msgstr ""
-"Bitte geben Sie die ESSID für das drahtlose Netzwerk mit dem Sie sich "
-"verbinden möchten ein."
-
-#: ../gnome/applet/vpn-password-dialog.c:152
-#: ../gnome/applet/vpn-password-dialog.c:191
-#, c-format
-msgid "Cannot start VPN connection '%s'"
-msgstr "VPN-Verbindung »%s« konnte nicht gestartet werden"
-
-#: ../gnome/applet/vpn-password-dialog.c:155
-#, c-format
-msgid ""
-"Could not find the authentication dialog for VPN connection type '%s'. "
-"Contact your system administrator."
-msgstr ""
-"Es konnte kein Authentifizierungsdialog für die VPN-Verbindung vom Typ »%s« "
-"gefunden werden. Bitte setzen Sie sich mit Ihrem Systemadministrator in "
-"Verbindung."
-
-#: ../gnome/applet/vpn-password-dialog.c:194
-#, c-format
-msgid ""
-"There was a problem launching the authentication dialog for VPN connection "
-"type '%s'. Contact your system administrator."
-msgstr ""
-"Beim Starten des Authentifizierungsdialog für die VPN-Verbindung vom Typ »%"
-"s« ist ein Problem aufgetreten. Bitte setzen Sie sich mit Ihrem "
-"Systemadministrator in Verbindung."
-
-#: ../gnome/applet/wireless-applet.glade.h:1
-msgid " "
-msgstr " "
-
-#: ../gnome/applet/wireless-applet.glade.h:2
-msgid ""
-"128-bit Passphrase (WEP)\n"
-"ASCII Key (WEP)\n"
-"Hex Key (WEP)"
-msgstr ""
-"128-Bit Passwort (WEP)\n"
-"ASCII-Schlüssel (WEP)\n"
-"Hexadezimalschlüssel (WEP)"
-
-#: ../gnome/applet/wireless-applet.glade.h:5
-msgid ""
-"128-bit passphrase (WEP)\n"
-"ASCII key (WEP)\n"
-"Hex key (WEP)"
-msgstr ""
-"128-Bit Passwort (WEP)\n"
-"ASCII-Schlüssel (WEP)\n"
-"Hexadezimalschlüssel (WEP)"
-
-#: ../gnome/applet/wireless-applet.glade.h:8
-msgid ""
-"<span weight=\"bold\" size=\"larger\">Active Connection Information</span>"
-msgstr ""
-"<span weight=\"bold\" size=\"larger\">Informationen zur aktiven Verbindung</"
-"span>"
-
-#: ../gnome/applet/wireless-applet.glade.h:10
-#, no-c-format
-msgid ""
-"<span weight=\"bold\" size=\"larger\">Passphrase Required by Wireless "
-"Network</span>\n"
-"\n"
-"A passphrase or encryption key is required to access the wireless network '%"
-"s'."
-msgstr ""
-"<span weight=\"bold\" size=\"larger\">Passwortgeschütztes Funknetzwerk</"
-"span>\n"
-"\n"
-"Es wird ein Passwort oder ein Verschlüsselungsschlüssel für den Zugang zu "
-"dem Funknetzwerk »%s« benötigt."
-
-#: ../gnome/applet/wireless-applet.glade.h:14
-#, no-c-format
-msgid ""
-"<span weight=\"bold\" size=\"larger\">Reduced Network Functionality</span>\n"
-"\n"
-"%s It will not be completely functional."
-msgstr ""
-"<span weight=\"bold\" size=\"larger\">Eingeschränkte Netzwerkfunktionalität</"
-"span>\n"
-"\n"
-"%s Es wird nicht vollständig funktionstüchtig sein."
-
-#: ../gnome/applet/wireless-applet.glade.h:18
-#, no-c-format
-msgid ""
-"<span weight=\"bold\" size=\"larger\">Wireless Network Login Confirmation</"
-"span>\n"
-"\n"
-"You have chosen to log in to the wireless network '%s'. If you are sure "
-"that this wireless network is secure, click the checkbox below and "
-"NetworkManager will not require confirmation on subsequent log ins."
-msgstr ""
-"<span weight=\"bold\" size=\"larger\">Anmeldungsbestätigung für das "
-"Funknetzwerk</span>\n"
-"\n"
-"Sie haben die Anmeldung am Funknetzwerk »%s« gewählt. Falls Sie sicher sind, "
-"dass dieses Funknetzwerk vertrauenswürdig ist, können Sie die unten "
-"angegebene Option auswählen und der Network-Manager wird ab sofort keine "
-"Bestätigung mehr für dieses Netzwerk verlangen."
-
-#: ../gnome/applet/wireless-applet.glade.h:21
-msgid "Always Trust this Wireless Network"
-msgstr "Diesem Funknetzwerk immer vertrauen"
-
-#: ../gnome/applet/wireless-applet.glade.h:22
-msgid "Broadcast Address:"
-msgstr "Broadcast-Adresse:"
-
-#: ../gnome/applet/wireless-applet.glade.h:23
-msgid "C_onnect"
-msgstr "_Verbinden"
-
-#: ../gnome/applet/wireless-applet.glade.h:24
-msgid "Connect with encryption enabled"
-msgstr "Verschlüsselte Verbindung ist aktiv"
-
-#: ../gnome/applet/wireless-applet.glade.h:25
-msgid "Connection Information"
-msgstr "Verbindungsinformationen"
-
-#: ../gnome/applet/wireless-applet.glade.h:26
-msgid "Destination Address:"
-msgstr "Zieladresse:"
-
-#: ../gnome/applet/wireless-applet.glade.h:27
-msgid "Don't remind me again"
-msgstr "Diesen Hinweis nicht mehr anzeigen"
-
-#: ../gnome/applet/wireless-applet.glade.h:28
-msgid "Hardware Address:"
-msgstr "Hardware-Adresse:"
-
-#: ../gnome/applet/wireless-applet.glade.h:29
-msgid "IP Address:"
-msgstr "IP-Adresse:"
-
-#: ../gnome/applet/wireless-applet.glade.h:30
-msgid "Interface:"
-msgstr "Schnittstelle:"
-
-#: ../gnome/applet/wireless-applet.glade.h:31
-msgid "Key Type:"
-msgstr "Schlüsseltyp:"
-
-#: ../gnome/applet/wireless-applet.glade.h:32
-msgid "Key type:"
-msgstr "Schlüsseltyp:"
-
-#: ../gnome/applet/wireless-applet.glade.h:33
-msgid "Other Wireless Network..."
-msgstr "Anderes Funknetzwerk..."
-
-#: ../gnome/applet/wireless-applet.glade.h:35
-msgid "Subnet Mask:"
-msgstr "Subnetz-Maske:"
-
-#: ../gnome/applet/wireless-applet.glade.h:36
-msgid "Wireless Network Key Required"
-msgstr "Schlüssel für Funknetzwerk benötigt"
-
-#: ../gnome/applet/wireless-applet.glade.h:37
-msgid "Wireless _adapter:"
-msgstr "Funknetzwerkk_arte:"
-
-#: ../gnome/applet/wireless-applet.glade.h:38
-msgid "Wireless _network:"
-msgstr "_Funknetzwerk:"
-
-#: ../gnome/applet/wireless-applet.glade.h:39
-msgid "_Login to Network"
-msgstr "_Am Netzwerk anmelden"
-
-#: ../gnome/applet/wireless-applet.glade.h:40
-msgid "_OK"
-msgstr "_OK"
-
-#: ../gnome/vpn-properties/nm-vpn-properties.c:376
-msgid "Cannot add VPN connection"
-msgstr "VPN-Verbindung konnte nicht hinzugefügt werden"
-
-#: ../gnome/vpn-properties/nm-vpn-properties.c:378
-msgid ""
-"No suitable VPN software was found on your system. Contact your system "
-"administrator."
-msgstr ""
-"Es wurde keine brauchbare VPN-Software gefunden. Bitte setzen Sie sich mit "
-"Ihrem Systemadministrator in Verbindung."
-
-#: ../gnome/vpn-properties/nm-vpn-properties.c:430
-msgid "Cannot import VPN connection"
-msgstr "VPN-Verbindung konnte nicht importiert werden"
-
-#: ../gnome/vpn-properties/nm-vpn-properties.c:432
-#, c-format
-msgid ""
-"Cannot find suitable software for VPN connection type '%s' to import the "
-"file '%s'. Contact your system administrator."
-msgstr ""
-"Es wurde keine brauchbare Software für die VPN-Verbindung vom Typ »%s« zum "
-"Import der Datei »%s« gefunden. Bitte setzen Sie sich mit Ihrem "
-"Systemadministrator in Verbindung."
-
-#: ../gnome/vpn-properties/nm-vpn-properties.c:572
-#, c-format
-msgid "Error retrieving VPN connection '%s'"
-msgstr "Fehler beim Abrufen der VPN-Verbindung »%s«"
-
-#: ../gnome/vpn-properties/nm-vpn-properties.c:575
-#, c-format
-msgid ""
-"Could not find the UI files for VPN connection type '%s'. Contact your "
-"system administrator."
-msgstr ""
-"Die Dateien für die Benutzerschnittstelle für VPN-Verbindungen vom Typ »%s« "
-"wurden nicht gefunden.Bitte setzen Sie sich mit Ihrem Systemadministrator in "
-"Verbindung."
-
-#: ../gnome/vpn-properties/nm-vpn-properties.c:735
-#, c-format
-msgid "Delete VPN connection \"%s\"?"
-msgstr "Möchten Sie die VPN-Verbindungen »%s« löschen?"
-
-#: ../gnome/vpn-properties/nm-vpn-properties.c:738
-#, c-format
-msgid ""
-"All information about the VPN connection \"%s\" will be lost and you may "
-"need your system administrator to provide information to create a new "
-"connection."
-msgstr ""
-"Alle Informationen über die VPN-Verbindung »%s« werden verloren gehen und "
-"Sie werden Ihren Systemadministrator für das Bereitstellen der Informationen "
-"für eine neue Verbindung benötigen."
-
-#: ../gnome/vpn-properties/nm-vpn-properties.c:953
-msgid "Unable to load"
-msgstr "Konnte nicht geladen werden"
-
-#: ../gnome/vpn-properties/nm-vpn-properties.c:955
-msgid "Cannot find some needed resources (the glade file)!"
-msgstr ""
-"Einige benötigte Ressourcen wurden nicht gefunden (die Glade-Datei fehlt)."
-
-#. Edit dialog
-#: ../gnome/vpn-properties/nm-vpn-properties.c:1073
-msgid "Edit VPN Connection"
-msgstr "VPN-Verbindungen bearbeiten"
-
-#: ../gnome/vpn-properties/nm-vpn-properties.glade.h:1
-msgid "Add a new VPN connection"
-msgstr "Neue VPN-Verbindungen hinzufügen"
-
-#: ../gnome/vpn-properties/nm-vpn-properties.glade.h:2
-msgid "Connect to:"
-msgstr "Verbinden mit:"
-
-#: ../gnome/vpn-properties/nm-vpn-properties.glade.h:3
-msgid "Create VPN Connection"
-msgstr "Neue VPN-Verbindungen erstellen"
-
-#: ../gnome/vpn-properties/nm-vpn-properties.glade.h:4
-msgid "Create VPN Connection - 1 of 2"
-msgstr "Neue VPN-Verbindungen erstellen - 1 von 2"
-
-#: ../gnome/vpn-properties/nm-vpn-properties.glade.h:5
-msgid "Create VPN Connection - 2 of 2"
-msgstr "Neue VPN-Verbindungen erstellen - 2 von 2"
-
-#: ../gnome/vpn-properties/nm-vpn-properties.glade.h:6
-msgid "Delete the selected VPN connection"
-msgstr "Die ausgewählte VPN-Verbindung löschen"
-
-#: ../gnome/vpn-properties/nm-vpn-properties.glade.h:7
-msgid ""
-"Dependent on the private network you want to connect to, you need to select "
-"what type of connection you want to create."
-msgstr ""
-"Abhängig von der Art des privaten Netzwerkes mit dem Sie sich verbinden "
-"möchten, müssen Sie den entsprechenden Typ der zu erstellenden Verbindung "
-"auswählen."
-
-#: ../gnome/vpn-properties/nm-vpn-properties.glade.h:8
-msgid "E_xport"
-msgstr "E_xportieren"
-
-#: ../gnome/vpn-properties/nm-vpn-properties.glade.h:9
-msgid "Edit the selected VPN connection"
-msgstr "Die ausgewählte VPN-Verbindung bearbeiten"
-
-#: ../gnome/vpn-properties/nm-vpn-properties.glade.h:10
-msgid "Export VPN connection to a file"
-msgstr "VPN-Verbindung in eine Datei exportieren"
-
-#: ../gnome/vpn-properties/nm-vpn-properties.glade.h:11
-msgid "Export the VPN settings to a file"
-msgstr "Die VPN-Verbindungsdaten in eine Datei exportieren"
-
-#: ../gnome/vpn-properties/nm-vpn-properties.glade.h:12
-msgid "Finish create VPN Connection"
-msgstr "Erstellen einer VPN-Verbindung abschließen"
-
-#: ../gnome/vpn-properties/nm-vpn-properties.glade.h:13
-msgid "Manage Virtual Private Network connections"
-msgstr "Verbindungen mit Virtuelle Private Netzwerke (VPN) verwalten"
-
-#: ../gnome/vpn-properties/nm-vpn-properties.glade.h:14
-msgid ""
-"This assistant will guide you through the creation of a new VPN connection "
-"to a private network.\n"
-"\n"
-"It will require some information, such as IP addresses and secrets, that "
-"will probably be provided by your system administrator as appropriate."
-msgstr ""
-"Dieser Assistent wird Sie durch das Erstellen einer neuen VPN-Verbindung zu "
-"einem privaten Netzwerk geleiten.\n"
-"\n"
-"Dazu benötigen Sie eventuell einige Informationen, wie z.B. IP-Adressen und "
-"Passwörter, welche Sie durch Ihren Systemadministrator erhalten."
-
-#: ../gnome/vpn-properties/nm-vpn-properties.glade.h:17
-msgid "VPN Connections"
-msgstr "VPN-Verbindungen"
-
-#: ../src/nm-netlink-monitor.c:154
-#, c-format
-msgid ""
-"unable to create netlink socket for monitoring wired ethernet devices - %s"
-msgstr ""
-"Erstellung eines Netlink-Socket zur Überwachung von Kabelnetzwerkgeräten "
-"fehlgeschlagen - %s"
-
-#: ../src/nm-netlink-monitor.c:172
-#, c-format
-msgid ""
-"unable to bind to netlink socket for monitoring wired ethernet devices - %s"
-msgstr ""
-"Bindung an einen Netlink-Socket zur Überwachung von Kabelnetzwerkgeräten "
-"fehlgeschlagen - %s"
-
-#: ../src/nm-netlink-monitor.c:403
-msgid "operation took too long"
-msgstr "Vorgang dauerte zu lange"
-
-#: ../src/nm-netlink-monitor.c:500
-msgid "received data from wrong type of sender"
-msgstr "Daten von einem falschen Absendertyp erhalten"
-
-#: ../src/nm-netlink-monitor.c:513
-msgid "received data from unexpected sender"
-msgstr "Daten von einem unerwarteten Absender erhalten"
-
-#: ../src/nm-netlink-monitor.c:644
-msgid "too much data was sent over socket and some of it was lost"
-msgstr ""
-"Es wurden zu viele Daten über den Socket gesendet und einiges davon ist "
-"verloren gegangen"
-
-#: ../src/nm-netlink-monitor.c:733
-msgid "error occurred while waiting for data on socket"
-msgstr "Während des Wartens auf Daten am Socket, ist ein Fehler aufgetreten"
diff --git a/po/el.po b/po/el.po
deleted file mode 100644
index 20c0ffd6c0..0000000000
--- a/po/el.po
+++ /dev/null
@@ -1,347 +0,0 @@
-# translation of el.po to
-# NetworkManager in Greek
-# Nikos Charonitakis <charosn@her.forthnet.gr>, 2005.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: el\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2005-04-04 02:06+0300\n"
-"PO-Revision-Date: 2005-04-04 02:23+0300\n"
-"Last-Translator: Nikos Charonitakis <charosn@her.forthnet.gr>\n"
-"Language-Team: <team@gnome.gr>\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"Plural-Forms: nplurals=2; plural=(n != 1);\n"
-"X-Generator: KBabel 1.9.1\n"
-
-#: info-daemon/networks.glade.h:1
-msgid "<span weight=\"bold\">Wireless Networks:</span>"
-msgstr "<span weight=\"bold\">ΑσÏÏματα Δίκτυα:</span>"
-
-#: info-daemon/networks.glade.h:2
-msgid "Modify Wireless Networks"
-msgstr ""
-
-#: info-daemon/passphrase.glade.h:1 panel-applet/wireless-applet.glade.h:2
-msgid "*"
-msgstr "*"
-
-#: info-daemon/passphrase.glade.h:2
-msgid ""
-"128-bit Passphrase (WEP)\n"
-"Ascii Key (WEP)\n"
-"Hex Key (WEP)"
-msgstr ""
-
-#: info-daemon/passphrase.glade.h:6
-#, no-c-format
-msgid ""
-"<span weight=\"bold\" size=\"larger\">Passphrase Required by Wireless "
-"Network</span>\n"
-"\n"
-"A passphrase or encryption key is required to access the wireless network '%"
-"s'."
-msgstr ""
-
-#: info-daemon/passphrase.glade.h:9
-#, fuzzy
-msgid "Key Type:"
-msgstr "Κατά Είδος"
-
-#: info-daemon/passphrase.glade.h:10
-#: info-daemon/NetworkManagerInfoPassphraseDialog.c:140
-#: panel-applet/NMWirelessAppletOtherNetworkDialog.c:150
-#: panel-applet/essid.glade.h:7 panel-applet/wireless-applet.glade.h:19
-#, fuzzy
-msgid "Passphrase:"
-msgstr "Phrae"
-
-#: info-daemon/passphrase.glade.h:11
-msgid "Wireless Network Key Required"
-msgstr ""
-
-#: info-daemon/passphrase.glade.h:12 panel-applet/wireless-applet.glade.h:22
-msgid "_Login to Network"
-msgstr "_Είσοδος στο Δίκτυο"
-
-#: info-daemon/NetworkManagerInfoPassphraseDialog.c:143
-#: panel-applet/NMWirelessAppletOtherNetworkDialog.c:153
-msgid "Ascii Key:"
-msgstr "Κλειδί Ascii:"
-
-#: info-daemon/NetworkManagerInfoPassphraseDialog.c:146
-#: panel-applet/NMWirelessAppletOtherNetworkDialog.c:156
-msgid "Hex Key:"
-msgstr "Κλειδί Hex:"
-
-#: info-daemon/NetworkManagerInfoVPN.c:158
-#, c-format
-msgid "You must log in to access the private network %s"
-msgstr "Θα Ï€Ïέπει να συνδεθείτε για να έχετε Ï€Ïόσβαση στο ιδιωτκό δίκτυο %s"
-
-#: panel-applet/NMWirelessApplet.c:149 panel-applet/NMWirelessApplet.c:167
-msgid "NetworkManager Applet"
-msgstr "ΕφαÏμογή NetworkManager"
-
-#: panel-applet/NMWirelessApplet.c:151 panel-applet/NMWirelessApplet.c:169
-msgid "Copyright (C) 2004-2005 Red Hat, Inc."
-msgstr "Copyright (C) 2004-2005 Red Hat, Inc."
-
-#: panel-applet/NMWirelessApplet.c:152 panel-applet/NMWirelessApplet.c:170
-#, fuzzy
-msgid "Notification area applet for managing your network devices and connections."
-msgstr "Ένα εφαÏμογίδιο για την παÏακολοÏθηση των τοπικών καιÏικών συνθηκών."
-
-#: panel-applet/NMWirelessApplet.c:384 panel-applet/NMWirelessApplet.c:1523
-#: panel-applet/NMWirelessAppletOtherNetworkDialog.c:319
-msgid ""
-"The NetworkManager Applet could not find some required resources (the glade "
-"file was not found)."
-msgstr ""
-
-#: panel-applet/NMWirelessApplet.c:395
-#, c-format
-msgid "The network device \"%s (%s)\" does not support wireless scanning."
-msgstr ""
-
-#: panel-applet/NMWirelessApplet.c:403
-#, c-format
-msgid "The network device \"%s (%s)\" does not support link detection."
-msgstr ""
-
-#: panel-applet/NMWirelessApplet.c:627
-#, fuzzy
-msgid "No network connection"
-msgstr "σÏνδεση δικτÏου"
-
-#: panel-applet/NMWirelessApplet.c:632
-msgid "Wired network connection"
-msgstr "ΕνσÏÏματη σÏνδεση δικτÏου"
-
-#: panel-applet/NMWirelessApplet.c:637
-msgid "Connecting to a wired network..."
-msgstr "ΣÏνδεση σε ένα ενσÏÏματο δίκτυο..."
-
-#: panel-applet/NMWirelessApplet.c:646
-msgid "Connected to an Ad-Hoc wireless network"
-msgstr ""
-
-#: panel-applet/NMWirelessApplet.c:660
-#, fuzzy, c-format
-msgid "Wireless network connection to '%s' (%d%%)"
-msgstr "Μέθοδος σÏνδεσης δικτÏου"
-
-#: panel-applet/NMWirelessApplet.c:665
-msgid "Wireless network connection"
-msgstr "ΑσÏÏματη σÏνδεση δικτÏου"
-
-#: panel-applet/NMWirelessApplet.c:670
-#, c-format
-msgid "Connecting to wireless network '%s'..."
-msgstr ""
-
-#: panel-applet/NMWirelessApplet.c:676
-msgid "NetworkManager is not running"
-msgstr "Το NetworkManager δεν εκτελείται"
-
-#: panel-applet/NMWirelessApplet.c:681
-#, fuzzy
-msgid "Scanning for wireless networks..."
-msgstr "Ανίχνευση Ï€ÏÎ¿ÏƒÏ‰Ï€Î¹ÎºÎ¿Ï ÎºÎ±Ï„Î±Î»ÏŒÎ³Î¿Ï… παιγνιδιών..."
-
-#: panel-applet/NMWirelessApplet.c:1046
-msgid "Other Wireless Networks..."
-msgstr "Άλλα ΑσÏÏματα Δίκτυα..."
-
-#: panel-applet/NMWirelessApplet.c:1067
-msgid "Create new Wireless Network..."
-msgstr "ΔημιουÏγία νέου ΑσÏÏματου ΔικτÏου..."
-
-#: panel-applet/NMWirelessApplet.c:1143
-msgid "No network devices have been found"
-msgstr "Δε βÏέθηκαν συσκευές δικτÏου"
-
-#: panel-applet/NMWirelessApplet.c:1285
-#, fuzzy
-msgid "NetworkManager is not running..."
-msgstr "Ο διαχειÏιστής αÏχείων του Îαυτίλου δεν εκτελείται."
-
-#: panel-applet/NMWirelessApplet.c:1355 panel-applet/NMWirelessApplet.c:1403
-#, fuzzy
-msgid "Pause Wireless Scanning"
-msgstr "ΑσÏÏματη σÏνδεση"
-
-#: panel-applet/NMWirelessApplet.c:1360
-#, fuzzy
-msgid "Resume Wireless Scanning"
-msgstr "ΑσÏÏματη σÏνδεση"
-
-#: panel-applet/NMWirelessApplet.c:1370 panel-applet/NMWirelessApplet.c:1409
-msgid "Stop All Wireless Devices"
-msgstr "Διακοπή Όλων Των ΑσÏÏματων Συσκευών"
-
-#: panel-applet/NMWirelessApplet.c:1375
-msgid "Start All Wireless Devices"
-msgstr "ΈναÏξη Όλων των ΑσÏÏματων Συσκευών"
-
-#: panel-applet/NMWirelessApplet.c:1418
-msgid "Help"
-msgstr "Βοήθεια"
-
-#: panel-applet/NMWirelessApplet.c:1425
-msgid "About"
-msgstr "ΠεÏί"
-
-#: panel-applet/NMWirelessAppletOtherNetworkDialog.c:232
-msgid "Create new wireless network"
-msgstr "ΔημιουÏγία νέου ασÏÏματου ΔικτÏου"
-
-#: panel-applet/NMWirelessAppletOtherNetworkDialog.c:233
-msgid ""
-"Enter the ESSID and security settings of the wireless network you wish to "
-"create."
-msgstr ""
-
-#: panel-applet/NMWirelessAppletOtherNetworkDialog.c:238
-msgid "Custom wireless network"
-msgstr "ΠÏοσαÏμοσμένο ασÏÏματο δίκτυο"
-
-#: panel-applet/NMWirelessAppletOtherNetworkDialog.c:239
-msgid "Enter the ESSID of the wireless network to which you wish to connect."
-msgstr "Εισάγετε το ESSID του ασÏÏματου δικτÏου που θέλετε να συνδεθείτε."
-
-#: panel-applet/essid.glade.h:1 panel-applet/wireless-applet.glade.h:3
-msgid ""
-"128-bit passphrase (WEP)\n"
-"Ascii key (WEP)\n"
-"Hex key (WEP)"
-msgstr ""
-
-#: panel-applet/essid.glade.h:4 panel-applet/wireless-applet.glade.h:15
-msgid "C_onnect"
-msgstr "ΣÏν_δεση"
-
-#: panel-applet/essid.glade.h:5 panel-applet/wireless-applet.glade.h:16
-msgid "Connect with encryption enabled"
-msgstr "ΣÏνδεση με κÏυπτογÏάφηση"
-
-#: panel-applet/essid.glade.h:6 panel-applet/wireless-applet.glade.h:18
-#, fuzzy
-msgid "Key type:"
-msgstr "Κατά Είδος"
-
-#: panel-applet/essid.glade.h:8 panel-applet/wireless-applet.glade.h:20
-msgid "Wireless _adapter:"
-msgstr "ΑσÏÏματος _Ï€ÏοσαÏμογέας:"
-
-#: panel-applet/essid.glade.h:9 panel-applet/wireless-applet.glade.h:21
-msgid "Wireless _network:"
-msgstr "ΑσÏÏματο _δίκτυο:"
-
-#: panel-applet/menu-info.c:91
-#, c-format
-msgid "Wired Network (%s)"
-msgstr "ΕνσÏÏματο Δίκτυο (%s)"
-
-#: panel-applet/menu-info.c:93
-msgid "Wired Network"
-msgstr "ΕνσÏÏματο Δίκτυο"
-
-#: panel-applet/menu-info.c:166
-#, c-format
-msgid "Wireless Network (%s)"
-msgid_plural "Wireless Networks (%s)"
-msgstr[0] "ΑσÏÏματο Δίκτυο (%s)"
-msgstr[1] "ΑσÏÏματα Δίκτυα (%s)"
-
-#: panel-applet/menu-info.c:168
-msgid "Wireless Network"
-msgid_plural "Wireless Networks"
-msgstr[0] "ΑσÏÏματο Δίκτυο"
-msgstr[1] "ΑσÏÏματα Δίκτυα"
-
-#: panel-applet/menu-info.c:294
-msgid " (invalid Unicode)"
-msgstr " (μή έγκυÏο Unicode)"
-
-#: examples/python/systray/eggtrayicon.c:111 panel-applet/eggtrayicon.c:118
-msgid "Orientation"
-msgstr "ΠÏοσανατολισμός"
-
-#: examples/python/systray/eggtrayicon.c:112 panel-applet/eggtrayicon.c:119
-msgid "The orientation of the tray."
-msgstr "Ο Ï€Ïοσανατολισμός του συÏταÏιοÏ."
-
-#: panel-applet/NMWirelessApplet.xml.h:1
-msgid "_About..."
-msgstr "_ΠεÏί..."
-
-#: panel-applet/wireless-applet.glade.h:1
-msgid " "
-msgstr " "
-
-#: panel-applet/wireless-applet.glade.h:7
-#, no-c-format
-msgid ""
-"<span weight=\"bold\" size=\"larger\">Reduced Network Functionality</span>\n"
-"\n"
-"%s It will not be completely functional."
-msgstr ""
-
-#: panel-applet/wireless-applet.glade.h:11
-#, no-c-format
-msgid ""
-"<span weight=\"bold\" size=\"larger\">Wireless Network Login Confirmation</"
-"span>\n"
-"\n"
-"You have chosen log in to the wireless network '%s'. If you are sure this "
-"wireless network is secure, click the checkbox below and NetworkManager will "
-"no longer pester you with stupid questions when you connect to it."
-msgstr ""
-
-#: panel-applet/wireless-applet.glade.h:14
-#, fuzzy
-msgid "Always Trust this Wireless Network"
-msgstr "ΑσÏÏματο Δίκτυο"
-
-#: panel-applet/wireless-applet.glade.h:17
-msgid "Don't remind me again"
-msgstr "Îα μη γίνει υπενθÏμιση ξανά"
-
-#: panel-applet/wireless-applet.glade.h:23
-msgid "_OK"
-msgstr "_OK"
-
-#: src/nm-netlink-monitor.c:154
-#, c-format
-msgid "unable to create netlink socket for monitoring wired ethernet devices - %s"
-msgstr ""
-
-#: src/nm-netlink-monitor.c:172
-#, c-format
-msgid "unable to bind to netlink socket for monitoring wired ethernet devices - %s"
-msgstr ""
-
-#: src/nm-netlink-monitor.c:403
-msgid "operation took too long"
-msgstr ""
-
-#: src/nm-netlink-monitor.c:500
-msgid "received data from wrong type of sender"
-msgstr ""
-
-#: src/nm-netlink-monitor.c:513
-msgid "received data from unexpected sender"
-msgstr ""
-
-#: src/nm-netlink-monitor.c:535
-#, c-format
-msgid "%s"
-msgstr "%s"
-
-#: src/nm-netlink-monitor.c:644
-msgid "too much data was sent over socket and some of it was lost"
-msgstr ""
-
diff --git a/po/en_CA.po b/po/en_CA.po
deleted file mode 100644
index bade4adf4b..0000000000
--- a/po/en_CA.po
+++ /dev/null
@@ -1,760 +0,0 @@
-# Canadian English translation for NetworkManager
-# Copyright (C) 2004-2005 Adam Weinberger and the GNOME Foundation
-# This file is distributed under the same licence as the NetworkManager package.
-# Adam Weinberger, <adamw@gnome.org>, 2004, 2005.
-#
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: NetworkManager\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2005-08-16 19:30-0400\n"
-"PO-Revision-Date: 2005-08-16 14:52-0400\n"
-"Last-Translator: Adam Weinberger <adamw@gnome.org>\n"
-"Language-Team: Canadian English <adamw@gnome.org>\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"Plural-Forms: nplurals=2; plural=(n != 1);\n"
-
-#. Setup a request to the keyring to save the network passphrase
-#: gnome/applet/applet-dbus-info.c:839
-#, c-format
-msgid "Passphrase for wireless network %s"
-msgstr "Passphrase for wireless network %s"
-
-#: gnome/applet/applet-dbus-info.c:1053
-#, c-format
-msgid ""
-"The requested wireless network '%s' does not appear to be in range. A "
-"different wireless network will be used if any are available."
-msgstr ""
-"The requested wireless network '%s' does not appear to be in range. A "
-"different wireless network will be used if one is available."
-
-#: gnome/applet/applet-dbus.c:598
-#, c-format
-msgid "Connection to the wireless network '%s' failed."
-msgstr "Connection to the wireless network '%s' failed."
-
-#: gnome/applet/applet-dbus.c:603
-msgid "Connection to the wired network failed."
-msgstr "Connection to the wired network failed."
-
-#: gnome/applet/applet.c:192
-msgid "Error displaying connection information: "
-msgstr "Error displaying connection information: "
-
-#: gnome/applet/applet.c:217
-msgid "Could not find some required resources (the glade file)!"
-msgstr "Could not find some required resources (the glade file)!"
-
-#: gnome/applet/applet.c:227
-msgid "No active connections!"
-msgstr "No active connections!"
-
-#: gnome/applet/applet.c:236
-msgid "Could not open socket!"
-msgstr "Could not open socket!"
-
-#: gnome/applet/applet.c:251
-msgid "Failed to get information about the interface!"
-msgstr "Failed to get information about the interface!"
-
-#: gnome/applet/applet.c:284
-#, c-format
-msgid "Wired Ethernet (%s)"
-msgstr "Wired Ethernet (%s)"
-
-#: gnome/applet/applet.c:286
-#, c-format
-msgid "Wireless Ethernet (%s)"
-msgstr "Wireless Ethernet (%s)"
-
-#: gnome/applet/applet.c:380 gnome/applet/applet.c:398
-msgid "NetworkManager Applet"
-msgstr "NetworkManager Applet"
-
-#: gnome/applet/applet.c:382 gnome/applet/applet.c:400
-msgid "Copyright (C) 2004-2005 Red Hat, Inc."
-msgstr "Copyright (C) 2004-2005 Red Hat, Inc."
-
-#: gnome/applet/applet.c:383 gnome/applet/applet.c:401
-msgid ""
-"Notification area applet for managing your network devices and connections."
-msgstr ""
-"Notification area applet for managing your network devices and connections."
-
-#: gnome/applet/applet.c:489
-msgid "VPN Error"
-msgstr "VPN Error"
-
-#: gnome/applet/applet.c:493
-msgid "VPN Login Failure"
-msgstr "VPN Login Failure"
-
-#: gnome/applet/applet.c:494
-msgid "Could not start the VPN connection '%s' due to a login failure."
-msgstr "Could not start the VPN connection '%s' due to a login failure."
-
-#: gnome/applet/applet.c:498
-msgid "VPN Start Failure"
-msgstr "VPN Start Failure"
-
-#: gnome/applet/applet.c:499
-#, c-format
-msgid ""
-"Could not start the VPN connection '%s' due to a failure launching the VPN "
-"program."
-msgstr ""
-"Could not start the VPN connection '%s' due to a failure launching the VPN "
-"program."
-
-#: gnome/applet/applet.c:503 gnome/applet/applet.c:513
-msgid "VPN Connect Failure"
-msgstr "VPN Connect Failure"
-
-#: gnome/applet/applet.c:504
-#, c-format
-msgid "Could not start the VPN connection '%s' due to a connection error."
-msgstr "Could not start the VPN connection '%s' due to a connection error."
-
-#: gnome/applet/applet.c:508
-msgid "VPN Configuration Error"
-msgstr "VPN Configuration Error"
-
-#: gnome/applet/applet.c:509
-#, c-format
-msgid "The VPN connection '%s' was not correctly configured."
-msgstr "The VPN connection '%s' was not correctly configured."
-
-#: gnome/applet/applet.c:514
-#, c-format
-msgid ""
-"Could not start the VPN connection '%s' because the VPN server did not "
-"return an adequate network configuration."
-msgstr ""
-"Could not start the VPN connection '%s' because the VPN server did not "
-"return an adequate network configuration."
-
-#: gnome/applet/applet.c:522
-#, c-format
-msgid "The VPN service said: \"%s\""
-msgstr "The VPN service said: \"%s\""
-
-#: gnome/applet/applet.c:590
-#, c-format
-msgid ""
-"<span weight=\"bold\" size=\"larger\">VPN Login Message</span>\n"
-"\n"
-"VPN connection '%s' said:\n"
-"\n"
-"\"%s\""
-msgstr ""
-"<span weight=\"bold\" size=\"larger\">VPN Login Message</span>\n"
-"\n"
-"VPN connection '%s' said:\n"
-"\n"
-"\"%s\""
-
-#: gnome/applet/applet.c:808 gnome/applet/applet.c:2447
-#: gnome/applet/other-network-dialog.c:322
-#: gnome/applet/passphrase-dialog.c:396
-msgid ""
-"The NetworkManager Applet could not find some required resources (the glade "
-"file was not found)."
-msgstr ""
-"The NetworkManager Applet could not find some required resources (the glade "
-"file was not found)."
-
-#: gnome/applet/applet.c:821
-#, c-format
-msgid "The network device \"%s (%s)\" does not support wireless scanning."
-msgstr "The network device \"%s (%s)\" does not support wireless scanning."
-
-#: gnome/applet/applet.c:828
-#, c-format
-msgid "The network device \"%s (%s)\" does not support link detection."
-msgstr "The network device \"%s (%s)\" does not support link detection."
-
-#: gnome/applet/applet.c:949
-#, c-format
-msgid "Preparing device %s for the wired network..."
-msgstr "Preparing device %s for the wired network..."
-
-#: gnome/applet/applet.c:951
-#, c-format
-msgid "Preparing device %s for the wireless network '%s'..."
-msgstr "Preparing device %s for the wireless network '%s'..."
-
-#: gnome/applet/applet.c:958
-#, c-format
-msgid "Configuring device %s for the wired network..."
-msgstr "Configuring device %s for the wired network..."
-
-#: gnome/applet/applet.c:960
-#, c-format
-msgid "Attempting to join the wireless network '%s'..."
-msgstr "Attempting to join the wireless network '%s'..."
-
-#: gnome/applet/applet.c:967
-#, c-format
-msgid "Waiting for Network Key for the wireless network '%s'..."
-msgstr "Waiting for Network Key for the wireless network '%s'..."
-
-#: gnome/applet/applet.c:974 gnome/applet/applet.c:983
-msgid "Requesting a network address from the wired network..."
-msgstr "Requesting a network address from the wired network..."
-
-#: gnome/applet/applet.c:976 gnome/applet/applet.c:985
-#, c-format
-msgid "Requesting a network address from the wireless network '%s'..."
-msgstr "Requesting a network address from the wireless network '%s'..."
-
-#: gnome/applet/applet.c:992
-msgid "Finishing connection to the wired network..."
-msgstr "Finishing connection to the wired network..."
-
-#: gnome/applet/applet.c:994
-#, c-format
-msgid "Finishing connection to the wireless network '%s'..."
-msgstr "Finishing connection to the wireless network '%s'..."
-
-#: gnome/applet/applet.c:1040
-msgid "NetworkManager is not running"
-msgstr "NetworkManager is not running"
-
-#: gnome/applet/applet.c:1051
-msgid "No network connection"
-msgstr "No network connection"
-
-#: gnome/applet/applet.c:1058
-msgid "Wired network connection"
-msgstr "Wired network connection"
-
-#: gnome/applet/applet.c:1065
-msgid "Connected to an Ad-Hoc wireless network"
-msgstr "Connected to an Ad-Hoc wireless network"
-
-#: gnome/applet/applet.c:1079
-#, c-format
-msgid "Wireless network connection to '%s' (%d%%)"
-msgstr "Wireless network connection to '%s' (%d%%)"
-
-#: gnome/applet/applet.c:1104
-#, c-format
-msgid "VPN connection to '%s'"
-msgstr "VPN connection to '%s'"
-
-#: gnome/applet/applet.c:1555
-msgid "_Connect to Other Wireless Network..."
-msgstr "_Connect to Other Wireless Network..."
-
-#: gnome/applet/applet.c:1576
-msgid "Create _New Wireless Network..."
-msgstr "Create _New Wireless Network..."
-
-#: gnome/applet/applet.c:1689
-msgid "_VPN Connections"
-msgstr "_VPN Connections"
-
-#: gnome/applet/applet.c:1716
-msgid "_Configure VPN..."
-msgstr "_Configure VPN..."
-
-#: gnome/applet/applet.c:1720
-msgid "_Disconnect VPN..."
-msgstr "_Disconnect VPN..."
-
-#: gnome/applet/applet.c:1743
-msgid "_Dial Up Connections"
-msgstr "_Dial-Up Connections"
-
-#: gnome/applet/applet.c:1752
-#, c-format
-msgid "Connect to %s..."
-msgstr "Connect to %s..."
-
-#: gnome/applet/applet.c:1804
-msgid "No network devices have been found"
-msgstr "No network devices have been found"
-
-#: gnome/applet/applet.c:1969
-msgid "NetworkManager is not running..."
-msgstr "NetworkManager is not running..."
-
-#: gnome/applet/applet.c:2037
-msgid "_Stop All Wireless Devices"
-msgstr "_Stop All Wireless Devices"
-
-#: gnome/applet/applet.c:2042
-msgid "_Start All Wireless Devices"
-msgstr "_Start All Wireless Devices"
-
-#: gnome/applet/applet.c:2073
-msgid "_Wireless Network Discovery"
-msgstr "_Wireless Network Discovery"
-
-#: gnome/applet/applet.c:2076
-msgid "Always Search"
-msgstr "Always Search"
-
-#: gnome/applet/applet.c:2084
-msgid "Search Only When Disconnected"
-msgstr "Search Only When Disconnected"
-
-#: gnome/applet/applet.c:2092
-msgid "Never Search"
-msgstr "Never Search"
-
-#. Stop All Wireless Devices item
-#: gnome/applet/applet.c:2104
-msgid "Stop All Wireless Devices"
-msgstr "Stop All Wireless Devices"
-
-#: gnome/applet/applet.c:2110
-msgid "Connection _Information"
-msgstr "Connection _Information"
-
-#: gnome/applet/applet.c:2118
-msgid "_Help"
-msgstr "_Help"
-
-#: gnome/applet/applet.c:2125
-msgid "_About"
-msgstr "_About"
-
-#: gnome/applet/applet.c:2597
-msgid ""
-"The NetworkManager applet could not find some required resources. It cannot "
-"continue.\n"
-msgstr ""
-"The NetworkManager applet could not find some required resources. It cannot "
-"continue.\n"
-
-#: gnome/applet/eggtrayicon.c:118
-msgid "Orientation"
-msgstr "Orientation"
-
-#: gnome/applet/eggtrayicon.c:119
-msgid "The orientation of the tray."
-msgstr "The orientation of the tray."
-
-#: gnome/applet/menu-items.c:89
-#, c-format
-msgid "Wired Network (%s)"
-msgstr "Wired Network (%s)"
-
-#: gnome/applet/menu-items.c:92
-msgid "_Wired Network"
-msgstr "_Wired Network"
-
-#: gnome/applet/menu-items.c:165
-#, c-format
-msgid "Wireless Network (%s)"
-msgid_plural "Wireless Networks (%s)"
-msgstr[0] "Wireless Network (%s)"
-msgstr[1] "Wireless Networks (%s)"
-
-#: gnome/applet/menu-items.c:167
-msgid "Wireless Network"
-msgid_plural "Wireless Networks"
-msgstr[0] "Wireless Network"
-msgstr[1] "Wireless Networks"
-
-#: gnome/applet/menu-items.c:309
-msgid " (invalid Unicode)"
-msgstr " (invalid Unicode)"
-
-#: gnome/applet/other-network-dialog.c:143
-#: gnome/applet/passphrase-dialog.c:156
-#: gnome/applet/wireless-applet.glade.h:34
-msgid "Passphrase:"
-msgstr "Passphrase:"
-
-#: gnome/applet/other-network-dialog.c:146
-#: gnome/applet/passphrase-dialog.c:159
-msgid "ASCII Key:"
-msgstr "ASCII Key:"
-
-#: gnome/applet/other-network-dialog.c:149
-#: gnome/applet/passphrase-dialog.c:162
-msgid "Hex Key:"
-msgstr "Hex Key:"
-
-#: gnome/applet/other-network-dialog.c:232
-msgid "Create new wireless network"
-msgstr "Create new wireless network"
-
-#: gnome/applet/other-network-dialog.c:233
-msgid ""
-"Enter the ESSID and security settings of the wireless network you wish to "
-"create."
-msgstr ""
-"Enter the ESSID and security settings of the wireless network you wish to "
-"create."
-
-#: gnome/applet/other-network-dialog.c:234
-msgid "By default, the ESSID is set to your computer's name,"
-msgstr "By default, the ESSID is set to your computer's name,"
-
-#: gnome/applet/other-network-dialog.c:236
-msgid ", with no encryption enabled."
-msgstr ", with no encryption enabled."
-
-#: gnome/applet/other-network-dialog.c:241
-msgid "Custom wireless network"
-msgstr "Custom wireless network"
-
-#: gnome/applet/other-network-dialog.c:242
-msgid "Enter the ESSID of the wireless network to which you wish to connect."
-msgstr "Enter the ESSID of the wireless network to which you wish to connect."
-
-#: gnome/applet/vpn-password-dialog.c:152
-#: gnome/applet/vpn-password-dialog.c:191
-#, c-format
-msgid "Cannot start VPN connection '%s'"
-msgstr "Cannot start VPN connection '%s'"
-
-#: gnome/applet/vpn-password-dialog.c:155
-#, c-format
-msgid ""
-"Could not find the authentication dialog for VPN connection type '%s'. "
-"Contact your system administrator."
-msgstr ""
-"Could not find the authentication dialogue for VPN connection type '%s'. "
-"Contact your system administrator."
-
-#: gnome/applet/vpn-password-dialog.c:194
-#, c-format
-msgid ""
-"There was a problem launching the authentication dialog for VPN connection "
-"type '%s'. Contact your system administrator."
-msgstr ""
-"There was a problem launching the authentication dialogue for VPN connection "
-"type '%s'. Contact your system administrator."
-
-#: gnome/applet/wireless-applet.glade.h:1
-msgid " "
-msgstr " "
-
-#: gnome/applet/wireless-applet.glade.h:2
-msgid ""
-"128-bit Passphrase (WEP)\n"
-"ASCII Key (WEP)\n"
-"Hex Key (WEP)"
-msgstr ""
-"128-bit Passphrase (WEP)\n"
-"ASCII Key (WEP)\n"
-"Hex Key (WEP)"
-
-#: gnome/applet/wireless-applet.glade.h:5
-msgid ""
-"128-bit passphrase (WEP)\n"
-"ASCII key (WEP)\n"
-"Hex key (WEP)"
-msgstr ""
-"128-bit passphrase (WEP)\n"
-"ASCII key (WEP)\n"
-"Hex key (WEP)"
-
-#: gnome/applet/wireless-applet.glade.h:8
-msgid ""
-"<span weight=\"bold\" size=\"larger\">Active Connection Information</span>"
-msgstr ""
-"<span weight=\"bold\" size=\"larger\">Active Connection Information</span>"
-
-#: gnome/applet/wireless-applet.glade.h:10
-#, no-c-format
-msgid ""
-"<span weight=\"bold\" size=\"larger\">Passphrase Required by Wireless "
-"Network</span>\n"
-"\n"
-"A passphrase or encryption key is required to access the wireless network '%"
-"s'."
-msgstr ""
-"<span weight=\"bold\" size=\"larger\">Passphrase Required by Wireless "
-"Network</span>\n"
-"\n"
-"A passphrase or encryption key is required to access the wireless network '%"
-"s'."
-
-#: gnome/applet/wireless-applet.glade.h:14
-#, no-c-format
-msgid ""
-"<span weight=\"bold\" size=\"larger\">Reduced Network Functionality</span>\n"
-"\n"
-"%s It will not be completely functional."
-msgstr ""
-"<span weight=\"bold\" size=\"larger\">Reduced Network Functionality</span>\n"
-"\n"
-"%s It will not be completely functional."
-
-#: gnome/applet/wireless-applet.glade.h:18
-#, no-c-format
-msgid ""
-"<span weight=\"bold\" size=\"larger\">Wireless Network Login Confirmation</"
-"span>\n"
-"\n"
-"You have chosen to log in to the wireless network '%s'. If you are sure "
-"that this wireless network is secure, click the checkbox below and "
-"NetworkManager will not require confirmation on subsequent log ins."
-msgstr ""
-"<span weight=\"bold\" size=\"larger\">Wireless Network Login Confirmation</"
-"span>\n"
-"\n"
-"You have chosen to log in to the wireless network '%s'. If you are sure "
-"that this wireless network is secure, click the checkbox below and "
-"NetworkManager will not require confirmation on subsequent logins."
-
-#: gnome/applet/wireless-applet.glade.h:21
-msgid "Always Trust this Wireless Network"
-msgstr "Always Trust this Wireless Network"
-
-#: gnome/applet/wireless-applet.glade.h:22
-msgid "Broadcast Address:"
-msgstr "Broadcast Address:"
-
-#: gnome/applet/wireless-applet.glade.h:23
-msgid "C_onnect"
-msgstr "C_onnect"
-
-#: gnome/applet/wireless-applet.glade.h:24
-msgid "Connect with encryption enabled"
-msgstr "Connect with encryption enabled"
-
-#: gnome/applet/wireless-applet.glade.h:25
-msgid "Connection Information"
-msgstr "Connection Information"
-
-#: gnome/applet/wireless-applet.glade.h:26
-msgid "Destination Address:"
-msgstr "Destination Address:"
-
-#: gnome/applet/wireless-applet.glade.h:27
-msgid "Don't remind me again"
-msgstr "Don't remind me again"
-
-#: gnome/applet/wireless-applet.glade.h:28
-msgid "Hardware Address:"
-msgstr "Hardware Address:"
-
-#: gnome/applet/wireless-applet.glade.h:29
-msgid "IP Address:"
-msgstr "IP Address:"
-
-#: gnome/applet/wireless-applet.glade.h:30
-msgid "Interface:"
-msgstr "Interface:"
-
-#: gnome/applet/wireless-applet.glade.h:31
-msgid "Key Type:"
-msgstr "Key Type:"
-
-#: gnome/applet/wireless-applet.glade.h:32
-msgid "Key type:"
-msgstr "Key type:"
-
-#: gnome/applet/wireless-applet.glade.h:33
-msgid "Other Wireless Network..."
-msgstr "Other Wireless Network..."
-
-#: gnome/applet/wireless-applet.glade.h:35
-msgid "Subnet Mask:"
-msgstr "Subnet Mask:"
-
-#: gnome/applet/wireless-applet.glade.h:36
-msgid "Wireless Network Key Required"
-msgstr "Wireless Network Key Required"
-
-#: gnome/applet/wireless-applet.glade.h:37
-msgid "Wireless _adapter:"
-msgstr "Wireless _adapter:"
-
-#: gnome/applet/wireless-applet.glade.h:38
-msgid "Wireless _network:"
-msgstr "Wireless _network:"
-
-#: gnome/applet/wireless-applet.glade.h:39
-msgid "_Login to Network"
-msgstr "_Login to Network"
-
-#: gnome/applet/wireless-applet.glade.h:40
-msgid "_OK"
-msgstr "_OK"
-
-#: gnome/vpn-properties/nm-vpn-properties.c:376
-msgid "Cannot add VPN connection"
-msgstr "Cannot add VPN connection"
-
-#: gnome/vpn-properties/nm-vpn-properties.c:378
-msgid ""
-"No suitable VPN software was found on your system. Contact your system "
-"administrator."
-msgstr ""
-"No suitable VPN software was found on your system. Contact your system "
-"administrator."
-
-#: gnome/vpn-properties/nm-vpn-properties.c:430
-msgid "Cannot import VPN connection"
-msgstr "Cannot import VPN connection"
-
-#: gnome/vpn-properties/nm-vpn-properties.c:432
-#, c-format
-msgid ""
-"Cannot find suitable software for VPN connection type '%s' to import the "
-"file '%s'. Contact your system administrator."
-msgstr ""
-"Cannot find suitable software for VPN connection type '%s' to import the "
-"file '%s'. Contact your system administrator."
-
-#: gnome/vpn-properties/nm-vpn-properties.c:572
-#, c-format
-msgid "Error retrieving VPN connection '%s'"
-msgstr "Error retrieving VPN connection '%s'"
-
-#: gnome/vpn-properties/nm-vpn-properties.c:575
-#, c-format
-msgid ""
-"Could not find the UI files for VPN connection type '%s'. Contact your "
-"system administrator."
-msgstr ""
-"Could not find the UI files for VPN connection type '%s'. Contact your "
-"system administrator."
-
-#: gnome/vpn-properties/nm-vpn-properties.c:735
-#, c-format
-msgid "Delete VPN connection \"%s\"?"
-msgstr "Delete VPN connection \"%s\"?"
-
-#: gnome/vpn-properties/nm-vpn-properties.c:738
-#, c-format
-msgid ""
-"All information about the VPN connection \"%s\" will be lost and you may "
-"need your system administrator to provide information to create a new "
-"connection."
-msgstr ""
-"All information about the VPN connection \"%s\" will be lost and you may "
-"need your system administrator to provide information to create a new "
-"connection."
-
-#: gnome/vpn-properties/nm-vpn-properties.c:953
-msgid "Unable to load"
-msgstr "Unable to load"
-
-#: gnome/vpn-properties/nm-vpn-properties.c:955
-msgid "Cannot find some needed resources (the glade file)!"
-msgstr "Cannot find some needed resources (the glade file)!"
-
-#. Edit dialog
-#: gnome/vpn-properties/nm-vpn-properties.c:1073
-msgid "Edit VPN Connection"
-msgstr "Edit VPN Connection"
-
-#: gnome/vpn-properties/nm-vpn-properties.glade.h:1
-msgid "Add a new VPN connection"
-msgstr "Add a new VPN connection"
-
-#: gnome/vpn-properties/nm-vpn-properties.glade.h:2
-msgid "Connect to:"
-msgstr "Connect to:"
-
-#: gnome/vpn-properties/nm-vpn-properties.glade.h:3
-msgid "Create VPN Connection"
-msgstr "Create VPN Connection"
-
-#: gnome/vpn-properties/nm-vpn-properties.glade.h:4
-msgid "Create VPN Connection - 1 of 2"
-msgstr "Create VPN Connection - 1 of 2"
-
-#: gnome/vpn-properties/nm-vpn-properties.glade.h:5
-msgid "Create VPN Connection - 2 of 2"
-msgstr "Create VPN Connection - 2 of 2"
-
-#: gnome/vpn-properties/nm-vpn-properties.glade.h:6
-msgid "Delete the selected VPN connection"
-msgstr "Delete the selected VPN connection"
-
-#: gnome/vpn-properties/nm-vpn-properties.glade.h:7
-msgid ""
-"Dependent on the private network you want to connect to, you need to select "
-"what type of connection you want to create."
-msgstr ""
-"Depending on the private network you want to connect to, you need to select "
-"what type of connection you want to create."
-
-#: gnome/vpn-properties/nm-vpn-properties.glade.h:8
-msgid "E_xport"
-msgstr "E_xport"
-
-#: gnome/vpn-properties/nm-vpn-properties.glade.h:9
-msgid "Edit the selected VPN connection"
-msgstr "Edit the selected VPN connection"
-
-#: gnome/vpn-properties/nm-vpn-properties.glade.h:10
-msgid "Export VPN connection to a file"
-msgstr "Export VPN connection to a file"
-
-#: gnome/vpn-properties/nm-vpn-properties.glade.h:11
-msgid "Export the VPN settings to a file"
-msgstr "Export the VPN settings to a file"
-
-#: gnome/vpn-properties/nm-vpn-properties.glade.h:12
-msgid "Finish create VPN Connection"
-msgstr "Finish creating VPN Connection"
-
-#: gnome/vpn-properties/nm-vpn-properties.glade.h:13
-msgid "Manage Virtual Private Network connections"
-msgstr "Manage Virtual Private Network connections"
-
-#: gnome/vpn-properties/nm-vpn-properties.glade.h:14
-msgid ""
-"This assistant will guide you through the creation of a new VPN connection "
-"to a private network.\n"
-"\n"
-"It will require some information, such as IP addresses and secrets, that "
-"will probably be provided by your system administrator as appropriate."
-msgstr ""
-"This assistant will guide you through the creation of a new VPN connection "
-"to a private network.\n"
-"\n"
-"It will require some information, such as IP addresses and secrets, that may "
-"be provided by your system administrator."
-
-#: gnome/vpn-properties/nm-vpn-properties.glade.h:17
-msgid "VPN Connections"
-msgstr "VPN Connections"
-
-#: src/nm-netlink-monitor.c:154
-#, c-format
-msgid ""
-"unable to create netlink socket for monitoring wired ethernet devices - %s"
-msgstr ""
-"Unable to create netlink socket for monitoring wired ethernet devices - %s"
-
-#: src/nm-netlink-monitor.c:172
-#, c-format
-msgid ""
-"unable to bind to netlink socket for monitoring wired ethernet devices - %s"
-msgstr ""
-"Unable to bind to netlink socket for monitoring wired ethernet devices - %s"
-
-#: src/nm-netlink-monitor.c:403
-msgid "operation took too long"
-msgstr "Operation took too long"
-
-#: src/nm-netlink-monitor.c:500
-msgid "received data from wrong type of sender"
-msgstr "Received data from wrong type of sender"
-
-#: src/nm-netlink-monitor.c:513
-msgid "received data from unexpected sender"
-msgstr "Received data from unexpected sender"
-
-#: src/nm-netlink-monitor.c:644
-msgid "too much data was sent over socket and some of it was lost"
-msgstr "Too much data was sent over socket and some of it was lost"
-
-#: src/nm-netlink-monitor.c:733
-msgid "error occurred while waiting for data on socket"
-msgstr "error occurred while waiting for data on socket"
diff --git a/po/en_GB.po b/po/en_GB.po
deleted file mode 100644
index ddea573667..0000000000
--- a/po/en_GB.po
+++ /dev/null
@@ -1,418 +0,0 @@
-# NetworkManager
-# Copyright (C) 2004 The GNOME Foundation.
-# This file is distributed under the same license as the NetworkManager package.
-# David Lodge <dave@cirt.net>, 2004.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: NetworkManager \n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2005-04-19 21:52+0100\n"
-"PO-Revision-Date: 2005-04-19 21:54+0100\n"
-"Last-Translator: David Lodge <dave@cirt.net>\n"
-"Language-Team: English (British) <en@li.org>\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"Plural-Forms: nplurals=2; plural=(n != 1);\n"
-
-#: ../info-daemon/networks.glade.h:1
-msgid "<span weight=\"bold\">Wireless Networks:</span>"
-msgstr "<span weight=\"bold\">Wireless Networks:</span>"
-
-#: ../info-daemon/networks.glade.h:2
-msgid "Modify Wireless Networks"
-msgstr "Modify Wireless Networks"
-
-#: ../info-daemon/passphrase.glade.h:1
-#: ../panel-applet/wireless-applet.glade.h:2
-msgid "*"
-msgstr "*"
-
-#: ../info-daemon/passphrase.glade.h:2
-msgid ""
-"128-bit Passphrase (WEP)\n"
-"Ascii Key (WEP)\n"
-"Hex Key (WEP)"
-msgstr ""
-"128-bit Passphrase (WEP)\n"
-"Ascii Key (WEP)\n"
-"Hex Key (WEP)"
-
-#: ../info-daemon/passphrase.glade.h:6
-#, no-c-format
-msgid ""
-"<span weight=\"bold\" size=\"larger\">Passphrase Required by Wireless Network</span>\n"
-"\n"
-"A passphrase or encryption key is required to access the wireless network '%s'."
-msgstr ""
-"<span weight=\"bold\" size=\"larger\">Passphrase Required by Wireless Network</span>\n"
-"\n"
-"A passphrase or encryption key is required to access the wireless network '%s'."
-
-#: ../info-daemon/passphrase.glade.h:9
-msgid "Key Type:"
-msgstr "Key Type:"
-
-#: ../info-daemon/passphrase.glade.h:10
-#: ../info-daemon/NetworkManagerInfoPassphraseDialog.c:140
-#: ../panel-applet/NMWirelessAppletOtherNetworkDialog.c:150
-#: ../panel-applet/essid.glade.h:7
-#: ../panel-applet/wireless-applet.glade.h:19
-msgid "Passphrase:"
-msgstr "Passphrase:"
-
-#: ../info-daemon/passphrase.glade.h:11
-msgid "Wireless Network Key Required"
-msgstr "Wireless Network Key Required"
-
-#: ../info-daemon/passphrase.glade.h:12
-#: ../panel-applet/wireless-applet.glade.h:22
-msgid "_Login to Network"
-msgstr "_Login to Network"
-
-#: ../info-daemon/NetworkManagerInfoPassphraseDialog.c:143
-#: ../panel-applet/NMWirelessAppletOtherNetworkDialog.c:153
-msgid "Ascii Key:"
-msgstr "Ascii Key:"
-
-#: ../info-daemon/NetworkManagerInfoPassphraseDialog.c:146
-#: ../panel-applet/NMWirelessAppletOtherNetworkDialog.c:156
-msgid "Hex Key:"
-msgstr "Hex Key:"
-
-#: ../info-daemon/NetworkManagerInfoVPN.c:158
-#, c-format
-msgid "You must log in to access the private network %s"
-msgstr "You must log in to access the private network %s"
-
-#: ../panel-applet/NMWirelessApplet.c:151
-#: ../panel-applet/NMWirelessApplet.c:169
-msgid "NetworkManager Applet"
-msgstr "NetworkManager Applet"
-
-#: ../panel-applet/NMWirelessApplet.c:153
-#: ../panel-applet/NMWirelessApplet.c:171
-msgid "Copyright (C) 2004-2005 Red Hat, Inc."
-msgstr "Copyright (C) 2004-2005 Red Hat, Inc."
-
-#: ../panel-applet/NMWirelessApplet.c:154
-#: ../panel-applet/NMWirelessApplet.c:172
-msgid "Notification area applet for managing your network devices and connections."
-msgstr "Notification area applet for managing your network devices and connections."
-
-#: ../panel-applet/NMWirelessApplet.c:232
-#, c-format
-msgid ""
-"<span weight=\"bold\" size=\"larger\">VPN Login Failure</span>\n"
-"\n"
-"Could not start the VPN connection '%s' due to a login failure.\n"
-"\n"
-"The VPN service said: \"%s\""
-msgstr ""
-"<span weight=\"bold\" size=\"larger\">VPN Login Failure</span>\n"
-"\n"
-"Could not start the VPN connection '%s' due to a login failure.\n"
-"\n"
-"The VPN service said: \"%s\""
-
-#: ../panel-applet/NMWirelessApplet.c:288
-#, c-format
-msgid ""
-"<span weight=\"bold\" size=\"larger\">VPN Login Message</span>\n"
-"\n"
-"VPN connection '%s' said:\n"
-"\n"
-"\"%s\""
-msgstr ""
-"<span weight=\"bold\" size=\"larger\">VPN Login Message</span>\n"
-"\n"
-"VPN connection '%s' said:\n"
-"\n"
-"\"%s\""
-
-#: ../panel-applet/NMWirelessApplet.c:499
-#: ../panel-applet/NMWirelessApplet.c:1772
-#: ../panel-applet/NMWirelessAppletOtherNetworkDialog.c:319
-msgid "The NetworkManager Applet could not find some required resources (the glade file was not found)."
-msgstr "The NetworkManager Applet could not find some required resources (the glade file was not found)."
-
-#: ../panel-applet/NMWirelessApplet.c:510
-#, c-format
-msgid "The network device \"%s (%s)\" does not support wireless scanning."
-msgstr "The network device \"%s (%s)\" does not support wireless scanning."
-
-#: ../panel-applet/NMWirelessApplet.c:518
-#, c-format
-msgid "The network device \"%s (%s)\" does not support link detection."
-msgstr "The network device \"%s (%s)\" does not support link detection."
-
-#: ../panel-applet/NMWirelessApplet.c:762
-msgid "No network connection"
-msgstr "No network connection"
-
-#: ../panel-applet/NMWirelessApplet.c:767
-msgid "Wired network connection"
-msgstr "Wired network connection"
-
-#: ../panel-applet/NMWirelessApplet.c:772
-msgid "Connecting to a wired network..."
-msgstr "Connecting to a wired network..."
-
-#
-#: ../panel-applet/NMWirelessApplet.c:781
-msgid "Connected to an Ad-Hoc wireless network"
-msgstr "Connected to an Ad-Hoc wireless network"
-
-#: ../panel-applet/NMWirelessApplet.c:795
-#, c-format
-msgid "Wireless network connection to '%s' (%d%%)"
-msgstr "Wireless network connection to '%s' (%d%%)"
-
-#
-#: ../panel-applet/NMWirelessApplet.c:800
-msgid "Wireless network connection"
-msgstr "Wireless network connection"
-
-#
-#: ../panel-applet/NMWirelessApplet.c:805
-#, c-format
-msgid "Connecting to wireless network '%s'..."
-msgstr "Connecting to wireless network '%s'..."
-
-#: ../panel-applet/NMWirelessApplet.c:811
-msgid "NetworkManager is not running"
-msgstr "NetworkManager is not running"
-
-#: ../panel-applet/NMWirelessApplet.c:816
-msgid "Scanning for wireless networks..."
-msgstr "Scanning for wireless networks..."
-
-#: ../panel-applet/NMWirelessApplet.c:1230
-msgid "Other Wireless Networks..."
-msgstr "Other Wireless Networks..."
-
-#: ../panel-applet/NMWirelessApplet.c:1251
-msgid "Create new Wireless Network..."
-msgstr "Create new Wireless Network..."
-
-#: ../panel-applet/NMWirelessApplet.c:1325
-msgid "VPN Connections"
-msgstr "VPN Connections"
-
-#: ../panel-applet/NMWirelessApplet.c:1347
-msgid "Disconnect VPN..."
-msgstr "Disconnect VPN..."
-
-#: ../panel-applet/NMWirelessApplet.c:1376
-msgid "No network devices have been found"
-msgstr "No network devices have been found"
-
-#: ../panel-applet/NMWirelessApplet.c:1534
-msgid "NetworkManager is not running..."
-msgstr "NetworkManager is not running..."
-
-#: ../panel-applet/NMWirelessApplet.c:1604
-#: ../panel-applet/NMWirelessApplet.c:1652
-msgid "Pause Wireless Scanning"
-msgstr "Pause Wireless Scanning"
-
-#: ../panel-applet/NMWirelessApplet.c:1609
-msgid "Resume Wireless Scanning"
-msgstr "Resume Wireless Scanning"
-
-#: ../panel-applet/NMWirelessApplet.c:1619
-#: ../panel-applet/NMWirelessApplet.c:1658
-msgid "Stop All Wireless Devices"
-msgstr "Stop All Wireless Devices"
-
-#: ../panel-applet/NMWirelessApplet.c:1624
-msgid "Start All Wireless Devices"
-msgstr "Start All Wireless Devices"
-
-#: ../panel-applet/NMWirelessApplet.c:1667
-msgid "Help"
-msgstr "Help"
-
-#: ../panel-applet/NMWirelessApplet.c:1674
-msgid "About"
-msgstr "About"
-
-#
-#: ../panel-applet/NMWirelessAppletOtherNetworkDialog.c:232
-msgid "Create new wireless network"
-msgstr "Create new wireless network"
-
-#: ../panel-applet/NMWirelessAppletOtherNetworkDialog.c:233
-msgid "Enter the ESSID and security settings of the wireless network you wish to create."
-msgstr "Enter the ESSID and security settings of the wireless network you wish to create."
-
-#
-#: ../panel-applet/NMWirelessAppletOtherNetworkDialog.c:238
-msgid "Custom wireless network"
-msgstr "Custom wireless network"
-
-#: ../panel-applet/NMWirelessAppletOtherNetworkDialog.c:239
-msgid "Enter the ESSID of the wireless network to which you wish to connect."
-msgstr "Enter the ESSID of the wireless network to which you wish to connect."
-
-#: ../panel-applet/essid.glade.h:1
-#: ../panel-applet/wireless-applet.glade.h:3
-msgid ""
-"128-bit passphrase (WEP)\n"
-"Ascii key (WEP)\n"
-"Hex key (WEP)"
-msgstr ""
-"128-bit passphrase (WEP)\n"
-"Ascii key (WEP)\n"
-"Hex key (WEP)"
-
-#: ../panel-applet/essid.glade.h:4
-#: ../panel-applet/wireless-applet.glade.h:15
-msgid "C_onnect"
-msgstr "C_onnect"
-
-#: ../panel-applet/essid.glade.h:5
-#: ../panel-applet/wireless-applet.glade.h:16
-msgid "Connect with encryption enabled"
-msgstr "Connect with encryption enabled"
-
-#: ../panel-applet/essid.glade.h:6
-#: ../panel-applet/wireless-applet.glade.h:18
-msgid "Key type:"
-msgstr "Key type:"
-
-#
-#: ../panel-applet/essid.glade.h:8
-#: ../panel-applet/wireless-applet.glade.h:20
-msgid "Wireless _adapter:"
-msgstr "Wireless _adapter:"
-
-#
-#: ../panel-applet/essid.glade.h:9
-#: ../panel-applet/wireless-applet.glade.h:21
-msgid "Wireless _network:"
-msgstr "Wireless _network:"
-
-#: ../panel-applet/menu-info.c:91
-#, c-format
-msgid "Wired Network (%s)"
-msgstr "Wired Network (%s)"
-
-#: ../panel-applet/menu-info.c:93
-msgid "Wired Network"
-msgstr "Wired Network"
-
-#: ../panel-applet/menu-info.c:166
-#, c-format
-msgid "Wireless Network (%s)"
-msgid_plural "Wireless Networks (%s)"
-msgstr[0] "Wireless Network (%s)"
-msgstr[1] "Wireless Networks (%s)"
-
-#
-#: ../panel-applet/menu-info.c:168
-msgid "Wireless Network"
-msgid_plural "Wireless Networks"
-msgstr[0] "Wireless Network"
-msgstr[1] "Wireless Networks"
-
-#: ../panel-applet/menu-info.c:294
-msgid " (invalid Unicode)"
-msgstr " (invalid Unicode)"
-
-#: ../panel-applet/NMWirelessApplet.xml.h:1
-msgid "_About..."
-msgstr "_About..."
-
-#: ../panel-applet/eggtrayicon.c:118
-#: ../examples/python/systray/eggtrayicon.c:111
-msgid "Orientation"
-msgstr "Orientation"
-
-#: ../panel-applet/eggtrayicon.c:119
-#: ../examples/python/systray/eggtrayicon.c:112
-msgid "The orientation of the tray."
-msgstr "The orientation of the tray."
-
-#: ../panel-applet/gtkcellrendererprogress.c:243
-#: ../panel-applet/gtkcellrendererprogress.c:301
-#, c-format
-msgid "progress bar label|%d %%"
-msgstr "%d %%"
-
-#: ../panel-applet/wireless-applet.glade.h:1
-msgid " "
-msgstr " "
-
-#: ../panel-applet/wireless-applet.glade.h:7
-#, no-c-format
-msgid ""
-"<span weight=\"bold\" size=\"larger\">Reduced Network Functionality</span>\n"
-"\n"
-"%s It will not be completely functional."
-msgstr ""
-"<span weight=\"bold\" size=\"larger\">Reduced Network Functionality</span>\n"
-"\n"
-"%s It will not be completely functional."
-
-#: ../panel-applet/wireless-applet.glade.h:11
-#, no-c-format
-msgid ""
-"<span weight=\"bold\" size=\"larger\">Wireless Network Login Confirmation</span>\n"
-"\n"
-"You have chosen log in to the wireless network '%s'. If you are sure this wireless network is secure, click the checkbox below and NetworkManager will no longer pester you with stupid questions when you connect to it."
-msgstr ""
-"<span weight=\"bold\" size=\"larger\">Wireless Network Login Confirmation</span>\n"
-"\n"
-"You have chosen log in to the wireless network '%s'. If you are sure this wireless network is secure, click the checkbox below and NetworkManager will no longer pester you with stupid questions when you connect to it."
-
-#
-#: ../panel-applet/wireless-applet.glade.h:14
-msgid "Always Trust this Wireless Network"
-msgstr "Always Trust this Wireless Network"
-
-#: ../panel-applet/wireless-applet.glade.h:17
-msgid "Don't remind me again"
-msgstr "Don't remind me again"
-
-#: ../panel-applet/wireless-applet.glade.h:23
-msgid "_OK"
-msgstr "_OK"
-
-#: ../panel-applet/nmwa-vpn-password-dialog.c:105
-#, c-format
-msgid "You must log in to access the Virtual Private Network '%s'."
-msgstr "You must log in to access the Virtual Private Network '%s'."
-
-#: ../src/nm-netlink-monitor.c:154
-#, c-format
-msgid "unable to create netlink socket for monitoring wired ethernet devices - %s"
-msgstr "unable to create netlink socket for monitoring wired ethernet devices - %s"
-
-#: ../src/nm-netlink-monitor.c:172
-#, c-format
-msgid "unable to bind to netlink socket for monitoring wired ethernet devices - %s"
-msgstr "unable to bind to netlink socket for monitoring wired ethernet devices - %s"
-
-#: ../src/nm-netlink-monitor.c:403
-msgid "operation took too long"
-msgstr "operation took too long"
-
-#: ../src/nm-netlink-monitor.c:500
-msgid "received data from wrong type of sender"
-msgstr "received data from wrong type of sender"
-
-#: ../src/nm-netlink-monitor.c:513
-msgid "received data from unexpected sender"
-msgstr "received data from unexpected sender"
-
-#: ../src/nm-netlink-monitor.c:535
-#, c-format
-msgid "%s"
-msgstr "%s"
-
-#: ../src/nm-netlink-monitor.c:644
-msgid "too much data was sent over socket and some of it was lost"
-msgstr "too much data was sent over socket and some of it was lost"
-
diff --git a/po/es.po b/po/es.po
deleted file mode 100644
index a29d1a8da0..0000000000
--- a/po/es.po
+++ /dev/null
@@ -1,779 +0,0 @@
-# translation of NetworkManager.HEAD.es.po to
-# translation of NetworkManager.HEAD.es.po to Español
-# traducción de es.po al Spanish
-# traducción de NetworkManager.HEAD.po al Spanish
-# Traducción de NetworkManager al español.
-# Copyright (C) Spanish translation for NetworkManager
-# This file is distributed under the same license as the NetworkManager package.
-# Antonio Ognio <antonio@linux.org.pe>, 2004.
-# Francisco Javier F. Serrador <serrador@cvs.gnome.org>, 2004, 2005.
-# Lucas Vieites Fariña <lucas@asixinformatica.com>, 2005.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: NetworkManager.HEAD.es\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2005-07-29 12:11+0000\n"
-"PO-Revision-Date: 2005-07-29 17:39+0200\n"
-"Last-Translator: \n"
-"Language-Team: <en@li.org>\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"X-Generator: KBabel 1.10\n"
-"Plural-Forms: nplurals=2; plural=(n != 1);\n"
-
-#: ../gnome/applet/applet-dbus-info.c:987
-#, c-format
-msgid ""
-"The requested wireless network '%s' does not appear to be in range. A "
-"different wireless network will be used if any are available."
-msgstr ""
-"Parece ser que la red inalámbrica solicitada «%s» no está al alcance. Se "
-"utilizará otra red inalámbrica si está disponible."
-
-#: ../gnome/applet/applet-dbus.c:597
-#, c-format
-msgid "Connection to the wireless network '%s' failed.\n"
-msgstr "La conexión a la red inalámbrica «%s» ha fallado.\n"
-
-#: ../gnome/applet/applet-dbus.c:602
-msgid "Connection to the wired network failed.\n"
-msgstr "La conexión con la red cableada ha fallado.\n"
-
-#: ../gnome/applet/applet.c:192
-msgid "Error displaying connection information: "
-msgstr "Ha ocurrido un error al mostrar información de conexión: "
-
-#: ../gnome/applet/applet.c:217
-msgid "Could not find some required resources (the glade file)!"
-msgstr "No se han podido encontrar algunos recursos necesarios (el archivo glade)."
-
-#: ../gnome/applet/applet.c:227
-msgid "No active connections!"
-msgstr "No hay conexiones activas."
-
-#: ../gnome/applet/applet.c:236
-msgid "Could not open socket!"
-msgstr "No se ha podido abrir el socket."
-
-#: ../gnome/applet/applet.c:251
-msgid "Failed to get information about the interface!"
-msgstr "No se ha podido obtener información acerca de la interfaz."
-
-#: ../gnome/applet/applet.c:284
-#, c-format
-msgid "Wired Ethernet (%s)"
-msgstr "Red Ethernet cableada (%s)"
-
-#: ../gnome/applet/applet.c:286
-#, c-format
-msgid "Wireless Ethernet (%s)"
-msgstr "Red Ethernet inalámbrica (%s)"
-
-#: ../gnome/applet/applet.c:380 ../gnome/applet/applet.c:398
-msgid "NetworkManager Applet"
-msgstr "Miniaplicación NetworkManager"
-
-#: ../gnome/applet/applet.c:382 ../gnome/applet/applet.c:400
-msgid "Copyright (C) 2004-2005 Red Hat, Inc."
-msgstr "Copyright © 2004-2005 Red Hat, Inc."
-
-#: ../gnome/applet/applet.c:383 ../gnome/applet/applet.c:401
-msgid "Notification area applet for managing your network devices and connections."
-msgstr ""
-"Miniaplicación del área de notificación para administrar sus dispositivos de "
-"red y conexiones."
-
-#: ../gnome/applet/applet.c:486
-msgid "VPN Error"
-msgstr "Error de VPN"
-
-#: ../gnome/applet/applet.c:490
-#, c-format
-msgid ""
-"<span weight=\"bold\" size=\"larger\">VPN Login Failure</span>\n"
-"\n"
-"Could not start the VPN connection '%s' due to a login failure.\n"
-"\n"
-"The VPN service said: \"%s\""
-msgstr ""
-"<span weight=\"bold\" size=\"larger\">Error de acceso VPN</span>\n"
-"\n"
-"No se pudo iniciar la conexión VPN «%s» debido a un error de acceso.\n"
-"\n"
-"El servicio VPN ha enviado el siguiente mensaje: «%s»"
-
-#: ../gnome/applet/applet.c:495
-#, c-format
-msgid ""
-"<span weight=\"bold\" size=\"larger\">VPN Start Failure</span>\n"
-"\n"
-"Could not start the VPN connection '%s' due to a failure launching the VPN "
-"program.\n"
-"\n"
-"The VPN service said: \"%s\""
-msgstr ""
-"<span weight=\"bold\" size=\"larger\">Error de inicio VPN</span>\n"
-"\n"
-"No se pudo iniciar la conexión VPN «%s» debido a un error al iniciar el "
-"programa VPN.\n"
-"\n"
-"El servicio VPN ha enviado el siguiente mensaje: «%s»"
-
-#: ../gnome/applet/applet.c:500
-#, c-format
-msgid ""
-"<span weight=\"bold\" size=\"larger\">VPN Connect Failure</span>\n"
-"\n"
-"Could not start the VPN connection '%s' due to a connection error.\n"
-"\n"
-"The VPN service said: \"%s\""
-msgstr ""
-"<span weight=\"bold\" size=\"larger\">Error de conexión VPN</span>\n"
-"\n"
-"No se pudo iniciar la conexión VPN «%s» debido a un error de conexión.\n"
-"\n"
-"El servicio VPN ha enviado el siguiente mensaje: «%s»"
-
-#: ../gnome/applet/applet.c:505
-#, c-format
-msgid ""
-"<span weight=\"bold\" size=\"larger\">VPN Configuration Error</span>\n"
-"\n"
-"The VPN connection '%s' was not correctly configured.\n"
-"\n"
-"The VPN service said: \"%s\""
-msgstr ""
-"<span weight=\"bold\" size=\"larger\">Error de configuración VPN</span>\n"
-"\n"
-"La conexión VPN «%s» no está configurada correctamente.\n"
-"\n"
-"El servicio VPN ha enviado el siguiente mensaje: «%s»"
-
-#: ../gnome/applet/applet.c:510
-#, c-format
-msgid ""
-"<span weight=\"bold\" size=\"larger\">VPN Connect Failure</span>\n"
-"\n"
-"Could not start the VPN connection '%s' because the VPN server did not "
-"return an adequate network configuration.\n"
-"\n"
-"The VPN service said: \"%s\""
-msgstr ""
-"<span weight=\"bold\" size=\"larger\">Error de conexión VPN</span>\n"
-"\n"
-"No se pudo iniciar la conexión VPN «%s» porque el servidor VPN no ha "
-"devuelto una configuración de red adecuada.\n"
-"\n"
-"El servicio VPN ha enviado el siguiente mensaje: «%s»"
-
-#: ../gnome/applet/applet.c:577
-#, c-format
-msgid ""
-"<span weight=\"bold\" size=\"larger\">VPN Login Message</span>\n"
-"\n"
-"VPN connection '%s' said:\n"
-"\n"
-"\"%s\""
-msgstr ""
-"<span weight=\"bold\" size=\"larger\">Mensaje de acceso VPN</span>\n"
-"\n"
-"La conexión VPN «%s» envía el mensaje:\n"
-"\n"
-"\"%s\""
-
-#: ../gnome/applet/applet.c:795 ../gnome/applet/applet.c:2368
-#: ../gnome/applet/other-network-dialog.c:310
-#: ../gnome/applet/passphrase-dialog.c:446
-msgid ""
-"The NetworkManager Applet could not find some required resources (the glade "
-"file was not found)."
-msgstr ""
-"La miniaplicación NetworkManager no pudo encontrar algunos archivos de "
-"recursos (No se encontró el archivo de glade)."
-
-#: ../gnome/applet/applet.c:808
-#, c-format
-msgid "The network device \"%s (%s)\" does not support wireless scanning."
-msgstr ""
-"El dispositivo de red \"%s (%s)\" no puede realizar búsquedas de redes "
-"inalámbricas."
-
-#: ../gnome/applet/applet.c:815
-#, c-format
-msgid "The network device \"%s (%s)\" does not support link detection."
-msgstr "El dispositivo de red \"%s (%s)\" no puede realizar detección de enlaces."
-
-#: ../gnome/applet/applet.c:936
-#, c-format
-msgid "Preparing device %s for the wired network..."
-msgstr "Preparando el dispositivo %s para la red cableada..."
-
-#: ../gnome/applet/applet.c:938
-#, c-format
-msgid "Preparing device %s for the wireless network '%s'..."
-msgstr "Preparando el dispositivo %s para la red inalámbrica «%s»..."
-
-#: ../gnome/applet/applet.c:945
-#, c-format
-msgid "Configuring device %s for the wired network..."
-msgstr "Configurando el dispositivo %s para la red cableada..."
-
-#: ../gnome/applet/applet.c:947
-#, c-format
-msgid "Attempting to join the wireless network '%s'..."
-msgstr "Intentando conectar con la red inalámbrica «%s»..."
-
-#: ../gnome/applet/applet.c:954
-#, c-format
-msgid "Waiting for Network Key for the wireless network '%s'..."
-msgstr "Esperando la contraseña de red para la red inalámbrica «%s»..."
-
-#: ../gnome/applet/applet.c:961 ../gnome/applet/applet.c:970
-msgid "Requesting a network address from the wired network..."
-msgstr "Solicitando una dirección de red a la red cableada..."
-
-#: ../gnome/applet/applet.c:963 ../gnome/applet/applet.c:972
-#, c-format
-msgid "Requesting a network address from the wireless network '%s'..."
-msgstr "Solicitando una dirección de red a la red inalámbrica «%s»..."
-
-#: ../gnome/applet/applet.c:979
-msgid "Finishing connection to the wired network..."
-msgstr "Deteniendo la conexión a la red cableada..."
-
-#: ../gnome/applet/applet.c:981
-#, c-format
-msgid "Finishing connection to the wireless network '%s'..."
-msgstr "Deteniendo la conexión a la red inalámbrica «%s»..."
-
-#: ../gnome/applet/applet.c:1027
-msgid "NetworkManager is not running"
-msgstr "NetworkManager no se está ejecutando"
-
-#: ../gnome/applet/applet.c:1038
-msgid "No network connection"
-msgstr "Sin conexión de red"
-
-#: ../gnome/applet/applet.c:1045
-msgid "Wired network connection"
-msgstr "Conexión de red cableada"
-
-#: ../gnome/applet/applet.c:1052
-msgid "Connected to an Ad-Hoc wireless network"
-msgstr "Conectado con una red inalámbrica Ad-Hoc"
-
-#: ../gnome/applet/applet.c:1066
-#, c-format
-msgid "Wireless network connection to '%s' (%d%%)"
-msgstr "Conexión de red inalámbrica a «%s» (%d%%)"
-
-#: ../gnome/applet/applet.c:1091
-#, c-format
-msgid "VPN connection to '%s'"
-msgstr "Conexión VPN a «%s»"
-
-#: ../gnome/applet/applet.c:1520
-msgid "_Connect to Other Wireless Network..."
-msgstr "_Conectar a otra red inalámbrica..."
-
-#: ../gnome/applet/applet.c:1541
-msgid "Create _New Wireless Network..."
-msgstr "Crear una red inalámbrica _nueva..."
-
-#: ../gnome/applet/applet.c:1654
-#: ../gnome/vpn-properties/nm-vpn-properties.glade.h:17
-msgid "VPN Connections"
-msgstr "Conexiones VPN"
-
-#: ../gnome/applet/applet.c:1681
-msgid "Configure VPN..."
-msgstr "Configurar VPN..."
-
-#: ../gnome/applet/applet.c:1685
-msgid "Disconnect VPN..."
-msgstr "Desconectar VPN..."
-
-#: ../gnome/applet/applet.c:1735
-msgid "No network devices have been found"
-msgstr "No se ha encontrado ningún dispositivo de red"
-
-#: ../gnome/applet/applet.c:1893
-msgid "NetworkManager is not running..."
-msgstr "NetworkManager no se está ejecutando..."
-
-#: ../gnome/applet/applet.c:1961
-msgid "_Stop All Wireless Devices"
-msgstr "_Detener todos los dispositivos inalámbricos"
-
-#: ../gnome/applet/applet.c:1966
-msgid "_Start All Wireless Devices"
-msgstr "_Iniciar todos los dispositivos inalámbricos"
-
-#: ../gnome/applet/applet.c:1997
-msgid "_Wireless Network Discovery"
-msgstr "Descubrir red _inalámbrica"
-
-#: ../gnome/applet/applet.c:2000
-msgid "Always Search"
-msgstr "Buscar siempre"
-
-#: ../gnome/applet/applet.c:2008
-msgid "Search Only When Disconnected"
-msgstr "Buscar sólo si está desconectado"
-
-#: ../gnome/applet/applet.c:2016
-msgid "Never Search"
-msgstr "Nunca buscar"
-
-#. Stop All Wireless Devices item
-#: ../gnome/applet/applet.c:2028
-msgid "Stop All Wireless Devices"
-msgstr "Detener todos los dispositivos inalámbricos"
-
-#: ../gnome/applet/applet.c:2034
-msgid "Connection _Information"
-msgstr "_Información acerca de la conexión"
-
-#: ../gnome/applet/applet.c:2042
-msgid "_Help"
-msgstr "A_yuda"
-
-#: ../gnome/applet/applet.c:2049
-msgid "_About"
-msgstr "_Acerca de"
-
-#: ../gnome/applet/applet.c:2518
-msgid ""
-"The NetworkManager applet could not find some required resources. It cannot "
-"continue.\n"
-msgstr ""
-"La miniaplicación NetworkManager no pudo encontrar algunos recursos "
-"necesarios. No se puede continuar.\n"
-
-#: ../gnome/applet/eggtrayicon.c:118
-msgid "Orientation"
-msgstr "Orientación"
-
-#: ../gnome/applet/eggtrayicon.c:119
-msgid "The orientation of the tray."
-msgstr "La orientación del área de notificación."
-
-#: ../gnome/applet/menu-items.c:89
-#, c-format
-msgid "Wired Network (%s)"
-msgstr "Red cableada (%s)"
-
-#: ../gnome/applet/menu-items.c:92
-msgid "_Wired Network"
-msgstr "Red _cableada"
-
-#: ../gnome/applet/menu-items.c:165
-#, c-format
-msgid "Wireless Network (%s)"
-msgid_plural "Wireless Networks (%s)"
-msgstr[0] "Red inalámbrica (%s)"
-msgstr[1] "Redes inalámbricas (%s)"
-
-#: ../gnome/applet/menu-items.c:167
-msgid "Wireless Network"
-msgid_plural "Wireless Networks"
-msgstr[0] "Red inalámbrica"
-msgstr[1] "Redes inalámbricas"
-
-#: ../gnome/applet/menu-items.c:309
-msgid " (invalid Unicode)"
-msgstr "(Unicode inválido)"
-
-#: ../gnome/applet/other-network-dialog.c:142
-#: ../gnome/applet/passphrase-dialog.c:156
-#: ../gnome/applet/wireless-applet.glade.h:34
-msgid "Passphrase:"
-msgstr "Contraseña:"
-
-#: ../gnome/applet/other-network-dialog.c:145
-#: ../gnome/applet/passphrase-dialog.c:159
-msgid "ASCII Key:"
-msgstr "Clave Ascii:"
-
-#: ../gnome/applet/other-network-dialog.c:148
-#: ../gnome/applet/passphrase-dialog.c:162
-msgid "Hex Key:"
-msgstr "Clave Hex:"
-
-#: ../gnome/applet/other-network-dialog.c:224
-msgid "Create new wireless network"
-msgstr "Crea una red inalámbricas nueva"
-
-#: ../gnome/applet/other-network-dialog.c:225
-msgid ""
-"Enter the ESSID and security settings of the wireless network you wish to "
-"create."
-msgstr ""
-"Introduzca el ESSID y las opcione de seguridad de la red inalámbrica que "
-"quiere crear."
-
-#: ../gnome/applet/other-network-dialog.c:230
-msgid "Custom wireless network"
-msgstr "Red inalámbricas personalizada"
-
-#: ../gnome/applet/other-network-dialog.c:231
-msgid "Enter the ESSID of the wireless network to which you wish to connect."
-msgstr "Introduzca el ESSID de la red inalámbrica con la que quiere conectarse."
-
-#: ../gnome/applet/passphrase-dialog.c:239
-#, c-format
-msgid "Passphrase for wireless network %s"
-msgstr "Frase de paso para la red inalámbrica %s"
-
-#: ../gnome/applet/vpn-password-dialog.c:152
-#: ../gnome/applet/vpn-password-dialog.c:191
-#, c-format
-msgid "Cannot start VPN connection '%s'"
-msgstr "No se puede iniciar la conexión VPN «%s»"
-
-#: ../gnome/applet/vpn-password-dialog.c:155
-#, c-format
-msgid ""
-"Could not find the authentication dialog for VPN connection type '%s'. "
-"Contact your system administrator."
-msgstr ""
-"No se ha podido encontrar el diálogo de autenticación para el tipo de "
-"conexión VPN «%s». Póngase en contacto con su administrador de sistemas."
-
-#: ../gnome/applet/vpn-password-dialog.c:194
-#, c-format
-msgid ""
-"There was a problem launching the authentication dialog for VPN connection "
-"type '%s'. Contact your system administrator."
-msgstr ""
-"Ha habido un problema al iniciar el diálogo de autenticación para el tipo de "
-"conexión VPN «%s». Póngase en contacto con su administrador de sistemas."
-
-#: ../gnome/applet/wireless-applet.glade.h:1
-msgid " "
-msgstr " "
-
-#: ../gnome/applet/wireless-applet.glade.h:2
-msgid ""
-"128-bit Passphrase (WEP)\n"
-"ASCII Key (WEP)\n"
-"Hex Key (WEP)"
-msgstr ""
-"Frase de paso de 128 bits (WEP)\n"
-"Clave Ascii (WEP)\n"
-"Clave Hex (WEP)"
-
-#: ../gnome/applet/wireless-applet.glade.h:5
-msgid ""
-"128-bit passphrase (WEP)\n"
-"ASCII key (WEP)\n"
-"Hex key (WEP)"
-msgstr ""
-"Frase de paso de 128 bits (WEP)\n"
-"Clave Ascii (WEP)\n"
-"Clave Hex (WEP)"
-
-#: ../gnome/applet/wireless-applet.glade.h:8
-msgid "<span weight=\"bold\" size=\"larger\">Active Connection Information</span>"
-msgstr ""
-"<span weight=\"bold\" size=\"larger\">Información de la conexión activa</"
-"span>"
-
-#: ../gnome/applet/wireless-applet.glade.h:10
-#, no-c-format
-msgid ""
-"<span weight=\"bold\" size=\"larger\">Passphrase Required by Wireless "
-"Network</span>\n"
-"\n"
-"A passphrase or encryption key is required to access the wireless network '%"
-"s'."
-msgstr ""
-"<span weight=\"bold\" size=\"larger\">Contraseña requerida por red "
-"inalámbrica</span>\n"
-"\n"
-"Se requiere una frase de paso o clave de encriptación para acceder a la red "
-"inalámbrica «%s»."
-
-#: ../gnome/applet/wireless-applet.glade.h:14
-#, no-c-format
-msgid ""
-"<span weight=\"bold\" size=\"larger\">Reduced Network Functionality</span>\n"
-"\n"
-"%s It will not be completely functional."
-msgstr ""
-"<span weight=\"bold\" size=\"larger\">Funcionalidad de red reducida</span>\n"
-"\n"
-"%s No será completamente funcional."
-
-#: ../gnome/applet/wireless-applet.glade.h:18
-#, no-c-format
-msgid ""
-"<span weight=\"bold\" size=\"larger\">Wireless Network Login Confirmation</"
-"span>\n"
-"\n"
-"You have chosen to log in to the wireless network '%s'. If you are sure "
-"that this wireless network is secure, click the checkbox below and "
-"NetworkManager will not require confirmation on subsequent log ins."
-msgstr ""
-"<span weight=\"bold\" size=\"larger\">Confirmación de entrada a la red "
-"inalámbrica</span>\n"
-"\n"
-"Ha escogido entrar en la red inalámbrica «%s». Si está seguro de que esta "
-"red es segura, marque la casilla de abajo y NetworkManager no le volverá a "
-"solicitar confirmación en los siguientes accesos."
-
-#: ../gnome/applet/wireless-applet.glade.h:21
-msgid "Always Trust this Wireless Network"
-msgstr "Siempre confiar en esta red inalámbrica"
-
-#: ../gnome/applet/wireless-applet.glade.h:22
-msgid "Broadcast Address:"
-msgstr "Dirección de difusión:"
-
-#: ../gnome/applet/wireless-applet.glade.h:23
-msgid "C_onnect"
-msgstr "_Conectar"
-
-#: ../gnome/applet/wireless-applet.glade.h:24
-msgid "Connect with encryption enabled"
-msgstr "Conexión con encriptado activada"
-
-#: ../gnome/applet/wireless-applet.glade.h:25
-msgid "Connection Information"
-msgstr "Información de la conexión"
-
-#: ../gnome/applet/wireless-applet.glade.h:26
-msgid "Destination Address:"
-msgstr "Dirección de destino:"
-
-#: ../gnome/applet/wireless-applet.glade.h:27
-msgid "Don't remind me again"
-msgstr "No me lo vuelvas a recordar"
-
-#: ../gnome/applet/wireless-applet.glade.h:28
-msgid "Hardware Address:"
-msgstr "Dirección hardware:"
-
-#: ../gnome/applet/wireless-applet.glade.h:29
-msgid "IP Address:"
-msgstr "Dirección IP:"
-
-#: ../gnome/applet/wireless-applet.glade.h:30
-msgid "Interface:"
-msgstr "Interfaz:"
-
-#: ../gnome/applet/wireless-applet.glade.h:31
-msgid "Key Type:"
-msgstr "Tipo de clave:"
-
-#: ../gnome/applet/wireless-applet.glade.h:32
-msgid "Key type:"
-msgstr "Tipo de clave:"
-
-#: ../gnome/applet/wireless-applet.glade.h:33
-msgid "Other Wireless Network..."
-msgstr "Otras redes inalámbricas..."
-
-#: ../gnome/applet/wireless-applet.glade.h:35
-msgid "Subnet Mask:"
-msgstr "Máscara de subred:"
-
-#: ../gnome/applet/wireless-applet.glade.h:36
-msgid "Wireless Network Key Required"
-msgstr "Clave requerida para la red inalámbrica"
-
-#: ../gnome/applet/wireless-applet.glade.h:37
-msgid "Wireless _adapter:"
-msgstr "_Adaptador inalámbrico:"
-
-#: ../gnome/applet/wireless-applet.glade.h:38
-msgid "Wireless _network:"
-msgstr "_Red inalámbrica:"
-
-#: ../gnome/applet/wireless-applet.glade.h:39
-msgid "_Login to Network"
-msgstr "_Entrar en la red"
-
-#: ../gnome/applet/wireless-applet.glade.h:40
-msgid "_OK"
-msgstr "_Aceptar"
-
-#: ../gnome/vpn-properties/nm-vpn-properties.c:374
-msgid "Cannot add VPN connection"
-msgstr "No se puede añadir una conexión VPN"
-
-#: ../gnome/vpn-properties/nm-vpn-properties.c:376
-msgid ""
-"No suitable VPN software was found on your system. Contact your system "
-"administrator."
-msgstr ""
-"No se ha encontrado software VPN adecuado en su sistema. Póngase en contacto "
-"con su administrador de sistemas."
-
-#: ../gnome/vpn-properties/nm-vpn-properties.c:428
-msgid "Cannot import VPN connection"
-msgstr "No se puede importar la conexión VPN"
-
-#: ../gnome/vpn-properties/nm-vpn-properties.c:430
-#, c-format
-msgid ""
-"Cannot find suitable software for VPN connection type '%s' to import the "
-"file '%s'. Contact your system administrator."
-msgstr ""
-"No se ha podido encontrar software adecuado para la conexión VPN de tipo «%"
-"s» para importar el archivo «%s». Póngase en contacto con su administrador "
-"de sistemas."
-
-#: ../gnome/vpn-properties/nm-vpn-properties.c:570
-#, c-format
-msgid "Error retrieving VPN connection '%s'"
-msgstr "Ha ocurrido un error al recuperar la conexión VPN «%s»"
-
-#: ../gnome/vpn-properties/nm-vpn-properties.c:573
-#, c-format
-msgid ""
-"Could not find the UI files for VPN connection type '%s'. Contact your "
-"system administrator."
-msgstr ""
-"No se han encontrado los archivos de la IU para la conexión VPN de tipo «%"
-"s». Póngase en contacto con su administrador de sistemas."
-
-#: ../gnome/vpn-properties/nm-vpn-properties.c:733
-#, c-format
-msgid "Delete VPN connection \"%s\"?"
-msgstr "¿Desea eliminar la conexión VPN «%s»?"
-
-#: ../gnome/vpn-properties/nm-vpn-properties.c:736
-#, c-format
-msgid ""
-"All information about the VPN connection \"%s\" will be lost and you may "
-"need your system administrator to provide information to create a new "
-"connection."
-msgstr ""
-"Se perderá toda la información de la conexión VPN «%s» y necesitará que su "
-"administrador de sistemas le proporcione información para crear una conexión."
-
-#: ../gnome/vpn-properties/nm-vpn-properties.c:951
-msgid "Unable to load"
-msgstr "No se puede cargar"
-
-#: ../gnome/vpn-properties/nm-vpn-properties.c:953
-msgid "Cannot find some needed resources (the glade file)!"
-msgstr "No se pueden encontrar algunos recursos necesarios (el archivo glade)."
-
-#. Edit dialog
-#: ../gnome/vpn-properties/nm-vpn-properties.c:1071
-msgid "Edit VPN Connection"
-msgstr "Editar conexión VPN"
-
-#: ../gnome/vpn-properties/nm-vpn-properties.glade.h:1
-msgid "Add a new VPN connection"
-msgstr "Añadir una conexión VPN nueva"
-
-#: ../gnome/vpn-properties/nm-vpn-properties.glade.h:2
-msgid "Connect to:"
-msgstr "Conectar con:"
-
-#: ../gnome/vpn-properties/nm-vpn-properties.glade.h:3
-msgid "Create VPN Connection"
-msgstr "Crear conexión VPN"
-
-#: ../gnome/vpn-properties/nm-vpn-properties.glade.h:4
-msgid "Create VPN Connection - 1 of 2"
-msgstr "Crear conexión VPN - 1 de 2"
-
-#: ../gnome/vpn-properties/nm-vpn-properties.glade.h:5
-msgid "Create VPN Connection - 2 of 2"
-msgstr "Crear conexión VPN - 2 de 2"
-
-#: ../gnome/vpn-properties/nm-vpn-properties.glade.h:6
-msgid "Delete the selected VPN connection"
-msgstr "Eliminar la conexión VPN seleccionada"
-
-#: ../gnome/vpn-properties/nm-vpn-properties.glade.h:7
-msgid ""
-"Dependent on the private network you want to connect to, you need to select "
-"what type of connection you want to create."
-msgstr ""
-"Debe seleccionar qué tipo de conexión desea crear dependiendo de la red "
-"privada a la que quiere conectar."
-
-#: ../gnome/vpn-properties/nm-vpn-properties.glade.h:8
-msgid "E_xport"
-msgstr "E_xportar"
-
-#: ../gnome/vpn-properties/nm-vpn-properties.glade.h:9
-msgid "Edit the selected VPN connection"
-msgstr "Editar la conexión VPN seleccionada"
-
-#: ../gnome/vpn-properties/nm-vpn-properties.glade.h:10
-msgid "Export VPN connection to a file"
-msgstr "Exportar la conexión VPN a un archivo"
-
-#: ../gnome/vpn-properties/nm-vpn-properties.glade.h:11
-msgid "Export the VPN settings to a file"
-msgstr "Exportar los ajustes VPN a un archivo"
-
-#: ../gnome/vpn-properties/nm-vpn-properties.glade.h:12
-msgid "Finish create VPN Connection"
-msgstr "Finalizar la creación de una conexión VPN."
-
-#: ../gnome/vpn-properties/nm-vpn-properties.glade.h:13
-msgid "Manage Virtual Private Network connections"
-msgstr "Gestionar conexiones de Red Privada Virtual (VPN)"
-
-#: ../gnome/vpn-properties/nm-vpn-properties.glade.h:14
-msgid ""
-"This assistant will guide you through the creation of a new VPN connection "
-"to a private network.\n"
-"\n"
-"It will require some information, such as IP addresses and secrets, that "
-"will probably be provided by your system administrator as appropriate."
-msgstr ""
-"Este asistente le guiará a través de la creación de una nueva conexión VPN a "
-"una red privada.\n"
-"\n"
-"Necesitará alguna información como, por ejemplo, direcciones IP y secretos, "
-"que probablemente le serán proporcionados por su administrador de sistemas."
-
-#: ../src/nm-netlink-monitor.c:154
-#, c-format
-msgid "unable to create netlink socket for monitoring wired ethernet devices - %s"
-msgstr ""
-"no puede crear un socket netlink para monitorizar dispositivos ethernet con "
-"cable - %s"
-
-#: ../src/nm-netlink-monitor.c:172
-#, c-format
-msgid "unable to bind to netlink socket for monitoring wired ethernet devices - %s"
-msgstr ""
-"no se puede asociar al socket netlink para monitorizar dispositivos ethernet "
-"con cable - %s"
-
-#: ../src/nm-netlink-monitor.c:403
-msgid "operation took too long"
-msgstr "la operación duró demasiado"
-
-#: ../src/nm-netlink-monitor.c:500
-msgid "received data from wrong type of sender"
-msgstr "se han recibido datos con un tipo de emisor incorrecto"
-
-#: ../src/nm-netlink-monitor.c:513
-msgid "received data from unexpected sender"
-msgstr "se han recibido datos de un emisor inesperado"
-
-#: ../src/nm-netlink-monitor.c:535
-#, c-format
-msgid "%s"
-msgstr "%s"
-
-#: ../src/nm-netlink-monitor.c:644
-msgid "too much data was sent over socket and some of it was lost"
-msgstr "se han enviado demasiados datos a través del socket y algunos de perdieron"
-
-#: ../src/nm-netlink-monitor.c:733
-msgid "error occurred while waiting for data on socket"
-msgstr "ha ocurrido un error mientras esperaban datos en un socket"
-
diff --git a/po/fr.po b/po/fr.po
deleted file mode 100644
index 8ac832baad..0000000000
--- a/po/fr.po
+++ /dev/null
@@ -1,266 +0,0 @@
-# French translation of NetworkManager.
-# Copyright (C) 2004-2005 The GNOME Foundation.
-# This file is distributed under the same license as the NetworkManager package.
-#
-# Raphaël Tournoy <lexpas@free.fr>, 2004.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: NetworkManager 0.3.3\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2005-02-16 00:21+0100\n"
-"PO-Revision-Date: 2005-02-16 00:11+0100\n"
-"Last-Translator: Raphaël Tournoy <lexpas@free.fr>\n"
-"Language-Team: GNOME French Team <gnomefr@traduc.org>\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"Plural-Forms: nplurals=2; plural=n>1;\n"
-
-#: info-daemon/networks.glade.h:1
-msgid "<span weight=\"bold\">Wireless Networks:</span>"
-msgstr "<span weight=\"bold\">Réseaux sans fil :</span>"
-
-#: info-daemon/networks.glade.h:2
-msgid "Modify Wireless Networks"
-msgstr "Modifier les réseaux sans fil"
-
-#: info-daemon/passphrase.glade.h:1 panel-applet/essid.glade.h:1
-msgid "*"
-msgstr "*"
-
-#: info-daemon/passphrase.glade.h:2 panel-applet/essid.glade.h:2
-msgid ""
-"128-bit Passphrase (WEP)\n"
-"Ascii Key (WEP)\n"
-"Hex Key (WEP)"
-msgstr ""
-"Phrase de passe 128 bit (WEP)\n"
-"Clé ASCII (WEP)\n"
-"Clé hexa (WEP)"
-
-#: info-daemon/passphrase.glade.h:6
-#, no-c-format
-msgid ""
-"<span weight=\"bold\" size=\"larger\">Passphrase Required by Wireless "
-"Network</span>\n"
-"\n"
-"A passphrase or encryption key is required to access the wireless network '%"
-"s'."
-msgstr ""
-"<span weight=\"bold\" size=\"larger\">Phrase de passe requise par le réseau "
-"sans fil</span>\n"
-"\n"
-"Une phrase de passe ou une clé de chiffrement est requise pour accéder au "
-"réseau sans fil « %s »."
-
-#: info-daemon/passphrase.glade.h:9 panel-applet/essid.glade.h:7
-msgid "Key Type:"
-msgstr "Type de clé :"
-
-#: info-daemon/passphrase.glade.h:10
-#: info-daemon/NetworkManagerInfoPassphraseDialog.c:139
-#: panel-applet/NMWirelessAppletOtherNetworkDialog.c:149
-#: panel-applet/essid.glade.h:8
-msgid "Passphrase:"
-msgstr "Phrase de passe :"
-
-#: info-daemon/passphrase.glade.h:11
-msgid "Wireless Network Key Required"
-msgstr "Clef requise par le réseau sans fil"
-
-#: info-daemon/passphrase.glade.h:12
-msgid "_Login to Network"
-msgstr "_Connexion au réseau"
-
-#: info-daemon/NetworkManagerInfoPassphraseDialog.c:142
-#: panel-applet/NMWirelessAppletOtherNetworkDialog.c:152
-msgid "Ascii Key:"
-msgstr "Clé ASCII :"
-
-#: info-daemon/NetworkManagerInfoPassphraseDialog.c:145
-#: panel-applet/NMWirelessAppletOtherNetworkDialog.c:155
-msgid "Hex Key:"
-msgstr "Clé hexa :"
-
-#: info-daemon/NetworkManagerInfoVPN.c:157
-#, c-format
-msgid "You must log in to access the private network %s"
-msgstr "Vous devez vous connecter pour accéder au réseau privé %s"
-
-#: panel-applet/NMWirelessApplet.c:140 panel-applet/NMWirelessApplet.c:158
-msgid "NetworkManager Applet"
-msgstr "Applet NetworkManager"
-
-#: panel-applet/NMWirelessApplet.c:142
-msgid "(C) 2004-2005 Red Hat, Inc."
-msgstr "© 2004-2005 Red Hat, Inc."
-
-#: panel-applet/NMWirelessApplet.c:143 panel-applet/NMWirelessApplet.c:161
-msgid "A panel application for managing your network devices & connections."
-msgstr ""
-"Une application de tableau de bord pour gérer vos périphériques réseaux et "
-"vox connexions."
-
-#: panel-applet/NMWirelessApplet.c:160
-msgid "(C) 2004-2005 by Red Hat, Inc."
-msgstr "© 2004-2005 by Red Hat, Inc."
-
-#: panel-applet/NMWirelessApplet.c:377
-msgid "No network connection"
-msgstr "Aucune connexion réseau"
-
-#: panel-applet/NMWirelessApplet.c:382
-msgid "Wired network connection"
-msgstr "Connexion à un réseau cablé"
-
-#: panel-applet/NMWirelessApplet.c:387
-msgid "Connecting to a wired network..."
-msgstr "Connexion à un réseau sans fil..."
-
-#: panel-applet/NMWirelessApplet.c:396
-msgid "Connected to an Ad-Hoc wireless network"
-msgstr "Connecté à un réseau sans fil Ad-Hoc"
-
-#: panel-applet/NMWirelessApplet.c:410
-#, c-format
-msgid "Wireless network connection to '%s' (%d%%)"
-msgstr "Connexion au réseau sans fil vers « %s » (%d%%)"
-
-#: panel-applet/NMWirelessApplet.c:415
-msgid "Wireless network connection"
-msgstr "Connexion réseau sans fil"
-
-#: panel-applet/NMWirelessApplet.c:420
-#, c-format
-msgid "Connecting to wireless network '%s'..."
-msgstr "Connexion au réseau sans fil « %s »..."
-
-#: panel-applet/NMWirelessApplet.c:426
-msgid "NetworkManager is not running"
-msgstr "NetworkManager n'est pas lancé"
-
-#: panel-applet/NMWirelessApplet.c:431
-msgid "Scanning for wireless networks..."
-msgstr "Recherche de réseaux sans fil..."
-
-#: panel-applet/NMWirelessApplet.c:754
-msgid "Other Wireless Networks..."
-msgstr "Autres réseaux sans fil..."
-
-#: panel-applet/NMWirelessApplet.c:775
-msgid "Create new Wireless Network..."
-msgstr "Créer un nouveau réseau sans fil..."
-
-#: panel-applet/NMWirelessApplet.c:885
-msgid "No network devices have been found"
-msgstr "Aucun périphérique réseau n'a été détecté"
-
-#: panel-applet/NMWirelessApplet.c:1003
-msgid "NetworkManager is not running..."
-msgstr "NetworkManager n'est pas lancé..."
-
-#: panel-applet/NMWirelessApplet.c:1047 panel-applet/NMWirelessApplet.c:1096
-msgid "Pause Wireless Scanning"
-msgstr "Interrompre la recherche de réseau sans fil"
-
-#: panel-applet/NMWirelessApplet.c:1052
-msgid "Resume Wireless Scanning"
-msgstr "Reprendre la recherche de réseau sans fil"
-
-#: panel-applet/NMWirelessApplet.c:1062 panel-applet/NMWirelessApplet.c:1102
-msgid "Stop All Wireless Devices"
-msgstr "Arrêter tous les périphériques sans fil"
-
-#: panel-applet/NMWirelessApplet.c:1067
-msgid "Start All Wireless Devices"
-msgstr "Démarrer tous les périphériques sans fil"
-
-#: panel-applet/NMWirelessApplet.c:1112
-msgid "Help"
-msgstr "Aide"
-
-#: panel-applet/NMWirelessApplet.c:1119
-msgid "About"
-msgstr "À _propos"
-
-#: panel-applet/NMWirelessAppletOtherNetworkDialog.c:228
-msgid "Create new wireless network"
-msgstr "Créer un nouveau réseau sans fil"
-
-#: panel-applet/NMWirelessAppletOtherNetworkDialog.c:229
-msgid ""
-"Enter the ESSID and security settings of the wireless network you wish to "
-"create."
-msgstr ""
-"Saisissez l'ESSID et les paramètres de sécurité du réseau sans fil que vous "
-"voulez créer."
-
-#: panel-applet/NMWirelessAppletOtherNetworkDialog.c:234
-msgid "Custom wireless network"
-msgstr "Réseau sans fil personnalisé"
-
-#: panel-applet/NMWirelessAppletOtherNetworkDialog.c:235
-msgid "Enter the ESSID of the wireless network to which you wish to connect."
-msgstr ""
-"Saisissez l'ESSID du réseau sans fil auquel vous voulez vous connecter."
-
-#. Reuse the above string to make the translators less angry.
-#: panel-applet/NMWirelessAppletOtherNetworkDialog.c:316
-#: panel-applet/NMWirelessAppletOtherNetworkDialog.c:325
-msgid ""
-"The NetworkManager Applet could not find some required resources (the glade "
-"file was not found)."
-msgstr ""
-"L'applet NetworkManager n'a pas pu trouver les ressources requises (le "
-"fichier glade n'a pas été trouvé)."
-
-#: panel-applet/essid.glade.h:5
-msgid "C_onnect"
-msgstr "Se _connecter"
-
-#: panel-applet/essid.glade.h:6
-msgid "Connect with encryption enabled"
-msgstr "Se connecter avec le chiffrement activé"
-
-#: panel-applet/essid.glade.h:9
-msgid "Wireless _adapter:"
-msgstr "_Adaptateur sans fil :"
-
-#: panel-applet/essid.glade.h:10
-msgid "Wireless _Network:"
-msgstr "Réseau _sans fil :"
-
-#: panel-applet/menu-info.c:109
-#, c-format
-msgid "Wired Network (%s)"
-msgstr "Réseau cablé (%s)"
-
-#: panel-applet/menu-info.c:111
-msgid "Wired Network"
-msgstr "Réseau cablé"
-
-#: panel-applet/menu-info.c:181
-#, c-format
-msgid "Wireless Network (%s)"
-msgid_plural "Wireless Networks (%s)"
-msgstr[0] "Réseau sans fil (%s)"
-msgstr[1] "Réseaux sans fil (%s)"
-
-#: panel-applet/menu-info.c:183
-msgid "Wireless Network"
-msgid_plural "Wireless Networks"
-msgstr[0] "Réseau sans fil"
-msgstr[1] "Réseaux sans fil"
-
-#: panel-applet/menu-info.c:320
-msgid " (invalid Unicode)"
-msgstr " (Unicode non valide)"
-
-#: examples/python/systray/eggtrayicon.c:111
-msgid "Orientation"
-msgstr "Orientation"
-
-#: examples/python/systray/eggtrayicon.c:112
-msgid "The orientation of the tray."
-msgstr "L'orientation de la zone de notification."
diff --git a/po/gu.po b/po/gu.po
deleted file mode 100644
index b44ba6256b..0000000000
--- a/po/gu.po
+++ /dev/null
@@ -1,190 +0,0 @@
-# translation of NetworkManager.HEAD.po to Gujarati
-# This file is distributed under the same license as the PACKAGE package.
-# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER.
-# Ankit Patel <ankit@redhat.com>, 2004.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: NetworkManager.HEAD\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2004-10-19 13:38-0400\n"
-"PO-Revision-Date: 2004-09-09 14:24+0530\n"
-"Last-Translator: Ankit Patel <ankit@redhat.com>\n"
-"Language-Team: Gujarati\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"X-Generator: KBabel 1.3.1\n"
-"Plural-Forms: Plural-Forms: nplurals=2; plural=(n!=1);\n"
-"\n"
-
-#: info-daemon/networks.glade:11
-msgid "Modify Wireless Networks"
-msgstr "વાયરલેસ નેટવરà«àª•à«‹ સà«àª§àª¾àª°à«‹"
-
-#: info-daemon/networks.glade:92
-msgid "<span weight=\"bold\">Wireless Networks:</span>"
-msgstr "<span weight=\"bold\">વાયરલેસ નેટવરà«àª•à«‹:</span>"
-
-#: info-daemon/passphrase.glade:9
-msgid "Wireless Network Key Required"
-msgstr "વાયરલેસ નેટવરà«àª• કી જરà«àª°à«€ છે"
-
-#: info-daemon/passphrase.glade:52
-msgid "_Login to Network"
-msgstr "નેટવરà«àª•àª®àª¾àª‚ પà«àª°àªµà«‡àª¶à«‹ (_L)"
-
-#: info-daemon/passphrase.glade:100
-#, fuzzy
-msgid ""
-"<span weight=\"bold\" size=\"larger\">Passphrase Required by Wireless "
-"Network</span>\n"
-"\n"
-"A passphrase or encryption key is required to access the wireless network '%"
-"s'."
-msgstr ""
-"<span weight=\"bold\" size=\"larger\">વાયરલેસ નેટવરà«àª• દà«àªµàª¾àª°àª¾ પાસફà«àª°à«‡àª જરà«àª°à«€ છે</"
-"span>\n"
-"\n"
-"પાસફà«àª°à«‡àª અથવા WEP કી ઠવાયરલેસ નેટવરà«àª• '%s' ને ચલાવવા માટે જરà«àª°à«€ છે."
-
-#: info-daemon/passphrase.glade:129
-msgid "Key Type:"
-msgstr ""
-
-#: info-daemon/passphrase.glade:150
-msgid ""
-"128-bit Passphrase\n"
-"128-bit Raw Hex Key"
-msgstr ""
-
-#: info-daemon/passphrase.glade:180
-#: info-daemon/NetworkManagerInfoPassphraseDialog.c:101
-msgid "Passphrase:"
-msgstr "પાસફà«àª°à«‡àª:"
-
-#: info-daemon/passphrase.glade:208 panel-applet/essid.glade:162
-msgid "*"
-msgstr "*"
-
-#: info-daemon/NetworkManagerInfoPassphraseDialog.c:104
-msgid "Key:"
-msgstr ""
-
-#. Reuse the above string to make the translators less angry.
-#: panel-applet/NMWirelessApplet.c:691 panel-applet/NMWirelessApplet.c:701
-msgid ""
-"The NetworkManager Applet could not find some required resources (the glade "
-"file was not found)."
-msgstr "નેટવરà«àª• વà«àª¯àªµàª¸à«àª¥àª¾àªªàª• àªàªªà«àª²à«‡àªŸ અમà«àª• જરà«àª°à«€ સà«àª°à«‹àª¤à«‹ શોધી શકી નહિં (glade ફાઈલ મળી નથી)."
-
-#: panel-applet/NMWirelessApplet.c:716
-#, fuzzy
-msgid "Custom wireless network"
-msgstr "વાયરલેસ નેટવરà«àª•à«‹"
-
-#: panel-applet/NMWirelessApplet.c:717
-msgid "Enter the ESSID of the wireless network to which you wish to connect."
-msgstr ""
-
-#: panel-applet/NMWirelessApplet.c:800
-#, fuzzy
-msgid "Other Wireless Networks..."
-msgstr "વાયરલેસ નેટવરà«àª•à«‹"
-
-#: panel-applet/NMWirelessApplet.c:911
-msgid "No network devices have been found"
-msgstr ""
-
-#: panel-applet/NMWirelessApplet.c:1028
-msgid "NetworkManager is not running..."
-msgstr "નેટવરà«àª• વà«àª¯àªµàª¸à«àª¥àª¾àªªàª• ચાલતà«àª‚ નથી..."
-
-#: panel-applet/essid.glade:52
-msgid "C_onnect"
-msgstr ""
-
-#: panel-applet/essid.glade:131
-#, fuzzy
-msgid "Wireless _Network:"
-msgstr "વાયરલેસ નેટવરà«àª•à«‹"
-
-#: panel-applet/essid.glade:177
-#, fuzzy
-msgid "Wireless _adapter:"
-msgstr "વાયરલેસ નેટવરà«àª•à«‹"
-
-#: panel-applet/menu-info.c:101
-#, fuzzy, c-format
-msgid "Wired Network (%s)"
-msgstr "વાયરલેસ નેટવરà«àª•à«‹"
-
-#: panel-applet/menu-info.c:103
-#, fuzzy
-msgid "Wired Network"
-msgstr "વાયરલેસ નેટવરà«àª•à«‹"
-
-#: panel-applet/menu-info.c:168
-#, fuzzy, c-format
-msgid "Wireless Network (%s)"
-msgid_plural "Wireless Networks (%s)"
-msgstr[0] "વાયરલેસ નેટવરà«àª•à«‹"
-msgstr[1] "વાયરલેસ નેટવરà«àª•à«‹"
-
-#: panel-applet/menu-info.c:170
-#, fuzzy
-msgid "Wireless Network"
-msgid_plural "Wireless Networks"
-msgstr[0] "વાયરલેસ નેટવરà«àª•à«‹"
-msgstr[1] "વાયરલેસ નેટવરà«àª•à«‹"
-
-#: panel-applet/menu-info.c:307
-msgid " (invalid Unicode)"
-msgstr ""
-
-#: examples/python/systray/eggtrayicon.c:111
-msgid "Orientation"
-msgstr ""
-
-#: examples/python/systray/eggtrayicon.c:112
-msgid "The orientation of the tray."
-msgstr ""
-
-#~ msgid "There are no network devices..."
-#~ msgstr "તà«àª¯àª¾àª‚ કોઈ નેટવરà«àª• ઉપકરણો નથી..."
-
-#~ msgid "There are no wireless networks..."
-#~ msgstr "તà«àª¯àª¾àª‚ કોઈ વાયરલેસ નેટવરà«àª• નથી..."
-
-#~ msgid "Network Connections"
-#~ msgstr "નેટવરà«àª• જોડાણો"
-
-#~ msgid "No network connection is currently active..."
-#~ msgstr "કોઈ નેટવરà«àª• જોડાણો વરà«àª¤àª®àª¾àª¨àª®àª¾àª‚ સકà«àª°àª¿àª¯ નથી..."
-
-#~ msgid "A wired network connection is currently active..."
-#~ msgstr "વાયરવાળà«àª‚ નેટવરà«àª• જોડાણ વરà«àª¤àª®àª¾àª¨àª®àª¾àª‚ સકà«àª°àª¿àª¯ છે..."
-
-#~ msgid "_About..."
-#~ msgstr "વિશે (_A)..."
-
-#~ msgid " "
-#~ msgstr " "
-
-#~ msgid ""
-#~ "<span weight=\"bold\" size=\"larger\">Wireless Network Login "
-#~ "Confirmation</span>\n"
-#~ "\n"
-#~ "You have chosen log in to the wireless network '%s'. If you are sure "
-#~ "this wireless network is secure, click the checkbox below and "
-#~ "NetworkManager will no longer pester you with stupid questions when you "
-#~ "connect to it."
-#~ msgstr ""
-#~ "<span weight=\"bold\" size=\"larger\">વાયરલેસ નેટવરà«àª• પà«àª°àªµà«‡àª¶ ખાતરી</span>\n"
-#~ "\n"
-#~ "તમે વાયરલેસ નેટવરà«àª• '%s' માં પà«àª°àªµà«‡àª¶àªµàª¾àª¨à«àª‚ પસંદ કરેલ છે. જો તમે ચોકà«àª•àª¸ હોયકે આ વાયરલેસ "
-#~ "નેટવરà«àª• સà«àª°àª•à«àª·àª¿àª¤ છે, તો નીચેના ચકાસણીબોકà«àª¸àª®àª¾àª‚ કà«àª²àª¿àª• કરો અને નેટવરà«àª• વà«àª¯àªµàª¸à«àª¥àª¾àªªàª• તમને લાંબા "
-#~ "સમય સà«àª§à«€ નકામા પà«àª°àª¶à«àª¨à«‹ પૂછવા માટે સમરà«àª¥ નહિં હોય તેની સાથે જોડાવા માટે."
-
-#~ msgid "Always Trust this Wireless Network"
-#~ msgstr "હંમેશા આ વાયરલેસ નેટવરà«àª•àª¨à«‹ વિશà«àªµàª¾àª¸ કરો"
diff --git a/po/hr.po b/po/hr.po
deleted file mode 100644
index 3ddfd37d32..0000000000
--- a/po/hr.po
+++ /dev/null
@@ -1,220 +0,0 @@
-# NetworkManager
-# Copyright (C) Red Hat, Inc.
-# This file is distributed under the same license as the NetworkManager package.
-# Tomislav Vujec <tvujec@redhat.com>, 2005.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: NetworkManager \n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2005-02-04 17:28+0100\n"
-"PO-Revision-Date: 2005-02-04 01:08+0100\n"
-"Last-Translator: Tomislav Vujec <tvujec@redhat.com>\n"
-"Language-Team: Croatian <hr@li.org>\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"Plural-Forms: nplurals=2; plural=(n != 1);\n"
-
-#: info-daemon/networks.glade:11
-msgid "Modify Wireless Networks"
-msgstr "Postavke bežiÄnih mreža"
-
-#: info-daemon/networks.glade:92
-msgid "<span weight=\"bold\">Wireless Networks:</span>"
-msgstr "<span weight=\"bold\">BežiÄne mreže:</span>"
-
-#: info-daemon/passphrase.glade:9
-msgid "Wireless Network Key Required"
-msgstr "Potreban je kljuÄ bežiÄne mreže"
-
-#: info-daemon/passphrase.glade:52
-msgid "_Login to Network"
-msgstr "_Prijava na mrežu"
-
-#: info-daemon/passphrase.glade:100
-msgid ""
-"<span weight=\"bold\" size=\"larger\">Passphrase Required by Wireless "
-"Network</span>\n"
-"\n"
-"A passphrase or encryption key is required to access the wireless network '%"
-"s'."
-msgstr ""
-"<span weight=\"bold\" size=\"larger\">Potrebna je lozinka za bežiÄnu mrežu</"
-"span>\n"
-"\n"
-"Za pristup mreži '%s', potrebna je lozinka ili kljuÄ."
-
-#: info-daemon/passphrase.glade:129 panel-applet/essid.glade:246
-msgid "Key Type:"
-msgstr "Tip kljuÄa:"
-
-#: info-daemon/passphrase.glade:150 panel-applet/essid.glade:315
-msgid ""
-"128-bit Passphrase (WEP)\n"
-"Ascii Key (WEP)\n"
-"Hex Key (WEP)"
-msgstr ""
-"128-bitna lozinka (WEP)\n"
-"SlovÄani kljuÄ (WEP)\n"
-"Heksadecimalni kljuÄ (WEP)"
-
-#: info-daemon/passphrase.glade:181
-#: info-daemon/NetworkManagerInfoPassphraseDialog.c:139
-#: panel-applet/NMWirelessAppletOtherNetworkDialog.c:149
-#: panel-applet/essid.glade:270
-msgid "Passphrase:"
-msgstr "Lozinka:"
-
-#: info-daemon/passphrase.glade:209 panel-applet/essid.glade:203
-#: panel-applet/essid.glade:300
-msgid "*"
-msgstr "*"
-
-#: info-daemon/NetworkManagerInfoPassphraseDialog.c:142
-#: panel-applet/NMWirelessAppletOtherNetworkDialog.c:152
-msgid "Ascii Key:"
-msgstr "SlovÄani kljuÄ"
-
-#: info-daemon/NetworkManagerInfoPassphraseDialog.c:145
-#: panel-applet/NMWirelessAppletOtherNetworkDialog.c:155
-msgid "Hex Key:"
-msgstr "Heksadecimalni kljuÄ"
-
-#: info-daemon/NetworkManagerInfoVPN.c:157
-#, c-format
-msgid "You must log in to access the private network %s"
-msgstr "Prijava je potrebna za pristup na mrežu %s"
-
-#: panel-applet/NMWirelessApplet.c:313
-msgid "No network connection"
-msgstr "Nema spoja na mrežu"
-
-#: panel-applet/NMWirelessApplet.c:318
-msgid "Wired network connection"
-msgstr "Spoj na žiÄanu mrežu"
-
-#: panel-applet/NMWirelessApplet.c:323
-msgid "Connecting to a wired network..."
-msgstr "Spajanje na žiÄanu mrežu..."
-
-#: panel-applet/NMWirelessApplet.c:332
-msgid "Connected to an Ad-Hoc wireless network"
-msgstr "Spoj na Ad-Hoc bežiÄnu mrežu"
-
-#: panel-applet/NMWirelessApplet.c:346
-#, c-format
-msgid "Wireless network connection to '%s' (%d%%)"
-msgstr "Spoj na bežiÄnu mrežu '%s' (%d%%)"
-
-#: panel-applet/NMWirelessApplet.c:351
-msgid "Wireless network connection"
-msgstr "Spoj na bežiÄnu mrežu"
-
-#: panel-applet/NMWirelessApplet.c:356
-#, c-format
-msgid "Connecting to wireless network '%s'..."
-msgstr "Spajanje na bežiÄnu mrežu '%s'..."
-
-#: panel-applet/NMWirelessApplet.c:362
-msgid "NetworkManager is not running"
-msgstr "NetworkManager nije pokrenut"
-
-#: panel-applet/NMWirelessApplet.c:367
-msgid "Scanning for wireless networks..."
-msgstr "Potraga za bežiÄnim mrežama..."
-
-#: panel-applet/NMWirelessApplet.c:690
-msgid "Other Wireless Networks..."
-msgstr "Ostale bežiÄne mreže..."
-
-#: panel-applet/NMWirelessApplet.c:711
-msgid "Create new Wireless Network..."
-msgstr "Stvori novu beÄiÄnu mrežu..."
-
-#: panel-applet/NMWirelessApplet.c:821
-msgid "No network devices have been found"
-msgstr "Nema mrežnih uređaja"
-
-#: panel-applet/NMWirelessApplet.c:939
-msgid "NetworkManager is not running..."
-msgstr "NetworkManager nije pokrenut..."
-
-#: panel-applet/NMWirelessAppletOtherNetworkDialog.c:228
-msgid "Create new wireless network"
-msgstr "Stvori novu beÄiÄnu mrežu"
-
-#: panel-applet/NMWirelessAppletOtherNetworkDialog.c:229
-msgid ""
-"Enter the ESSID and security settings of the wireless network you wish to "
-"create."
-msgstr "Unesi ESSID i sigurnosne postavke bežiÄne mreže koju treba stvoriti."
-
-#: panel-applet/NMWirelessAppletOtherNetworkDialog.c:234
-msgid "Custom wireless network"
-msgstr "Posebna bežiÄna mreža"
-
-#: panel-applet/NMWirelessAppletOtherNetworkDialog.c:235
-msgid "Enter the ESSID of the wireless network to which you wish to connect."
-msgstr ""
-"Unesi ESSID i sigurnosne postavke bežiÄne mreže na koju se treba spojiti."
-
-#. Reuse the above string to make the translators less angry.
-#: panel-applet/NMWirelessAppletOtherNetworkDialog.c:316
-#: panel-applet/NMWirelessAppletOtherNetworkDialog.c:325
-msgid ""
-"The NetworkManager Applet could not find some required resources (the glade "
-"file was not found)."
-msgstr ""
-"NetworkManager ne može naći potrebne datoteke (glade datoteka nije "
-"pronađena)."
-
-#: panel-applet/essid.glade:53
-msgid "C_onnect"
-msgstr "_Spoji se"
-
-#: panel-applet/essid.glade:132
-msgid "Wireless _adapter:"
-msgstr "BežiÄni _ureÄ‘aj:"
-
-#: panel-applet/essid.glade:172
-msgid "Wireless _Network:"
-msgstr "BežiÄna _mreža:"
-
-#: panel-applet/essid.glade:337
-msgid "Connect with encryption enabled"
-msgstr "Spoji se sa enkripcijom"
-
-#: panel-applet/menu-info.c:109
-#, c-format
-msgid "Wired Network (%s)"
-msgstr "ŽiÄana mreža (%s)"
-
-#: panel-applet/menu-info.c:111
-msgid "Wired Network"
-msgstr "ŽiÄana mreža"
-
-#: panel-applet/menu-info.c:177
-#, c-format
-msgid "Wireless Network (%s)"
-msgid_plural "Wireless Networks (%s)"
-msgstr[0] "BežiÄna mreža (%s)"
-msgstr[1] "BežiÄne mreže (%s)"
-
-#: panel-applet/menu-info.c:179
-msgid "Wireless Network"
-msgid_plural "Wireless Networks"
-msgstr[0] "BežiÄna mreža"
-msgstr[1] "BežiÄne mreže"
-
-#: panel-applet/menu-info.c:316
-msgid " (invalid Unicode)"
-msgstr " (greška u unicodu)"
-
-#: examples/python/systray/eggtrayicon.c:111
-msgid "Orientation"
-msgstr "Orjentacija"
-
-#: examples/python/systray/eggtrayicon.c:112
-msgid "The orientation of the tray."
-msgstr "Orjentacija ladice."
diff --git a/po/hu.po b/po/hu.po
deleted file mode 100644
index a3e058a0f5..0000000000
--- a/po/hu.po
+++ /dev/null
@@ -1,783 +0,0 @@
-# Hungarian translation of NetworkManager
-# This file is distributed under the same license as the NetworkManager package.
-# Copyright (C) 2005, Free Software Foundation. Inc.
-# Gabor Kelemen <kelemeng@gnome.hu>, 2005.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: NetworkManager.HEAD.hu\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2005-08-16 12:23+0000\n"
-"PO-Revision-Date: 2005-08-16 17:00+0200\n"
-"Last-Translator: Gabor Kelemen <kelemeng@gnome.hu>\n"
-"Language-Team: Hungarian <gnome@gnome.hu>\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"Plural-Forms: nplurals=1; plural=0;\n"
-"X-Generator: KBabel 1.10.1\n"
-
-#. Setup a request to the keyring to save the network passphrase
-#: ../gnome/applet/applet-dbus-info.c:839
-#, c-format
-msgid "Passphrase for wireless network %s"
-msgstr "Jelmondat a(z) %s vezeték nélküli hálózathoz"
-
-#: ../gnome/applet/applet-dbus-info.c:1053
-#, c-format
-msgid ""
-"The requested wireless network '%s' does not appear to be in range. A "
-"different wireless network will be used if any are available."
-msgstr ""
-"A kért \"%s\" vezetékes hálózat nincs a hatótávolságon belül. Egy másik "
-"vezeték nélküli hálózat lesz használva, ha elérhető."
-
-#: ../gnome/applet/applet-dbus.c:598
-#, c-format
-msgid "Connection to the wireless network '%s' failed."
-msgstr "Kapcsolódás \"%s\" vezeték nélküli hálózathoz sikertelen."
-
-#: ../gnome/applet/applet-dbus.c:603
-msgid "Connection to the wired network failed."
-msgstr "Kapcsolódás a vezetékes hálózathoz sikertelen."
-
-#: ../gnome/applet/applet.c:192
-msgid "Error displaying connection information: "
-msgstr "Hiba a kapcsolat információinak megjelenítése közben: "
-
-#: ../gnome/applet/applet.c:217
-msgid "Could not find some required resources (the glade file)!"
-msgstr "Nem található néhány szükséges erőforrás (a glade fájl)!"
-
-#: ../gnome/applet/applet.c:227
-msgid "No active connections!"
-msgstr "Nincs aktív kapcsolat!"
-
-#: ../gnome/applet/applet.c:236
-msgid "Could not open socket!"
-msgstr "Nem lehet megnyitni a foglalatot!"
-
-#: ../gnome/applet/applet.c:251
-msgid "Failed to get information about the interface!"
-msgstr "Nem sikerült lekérni az információt a csatolóról!"
-
-#: ../gnome/applet/applet.c:284
-#, c-format
-msgid "Wired Ethernet (%s)"
-msgstr "Vezetékes Ethernet (%s)"
-
-#: ../gnome/applet/applet.c:286
-#, c-format
-msgid "Wireless Ethernet (%s)"
-msgstr "Vezeték nélküli Ethernet (%s)"
-
-#: ../gnome/applet/applet.c:380 ../gnome/applet/applet.c:398
-msgid "NetworkManager Applet"
-msgstr "NetworkManager kisalkalmazás"
-
-#: ../gnome/applet/applet.c:382 ../gnome/applet/applet.c:400
-msgid "Copyright (C) 2004-2005 Red Hat, Inc."
-msgstr "Copyright (C) 2004-2005 Red Hat, Inc."
-
-#: ../gnome/applet/applet.c:383 ../gnome/applet/applet.c:401
-msgid "Notification area applet for managing your network devices and connections."
-msgstr ""
-"Értesítési terület kisalkalmazás a hálózati eszközök és kapcsolatok "
-"kezelésére."
-
-#: ../gnome/applet/applet.c:486
-msgid "VPN Error"
-msgstr "VPN hiba"
-
-#: ../gnome/applet/applet.c:490
-#, c-format
-msgid ""
-"<span weight=\"bold\" size=\"larger\">VPN Login Failure</span>\n"
-"\n"
-"Could not start the VPN connection '%s' due to a login failure.\n"
-"\n"
-"The VPN service said: \"%s\""
-msgstr ""
-"<span weight=\"bold\" size=\"larger\">VPN bejelentkezési hiba</span>\n"
-"\n"
-"Nem sikerült elindítani \"%s\" VPN kapcsolatot egy bejelentkezési hiba "
-"miatt.\n"
-"\n"
-"A VPN szolgáltatás válasza: \"%s\""
-
-#: ../gnome/applet/applet.c:495
-#, c-format
-msgid ""
-"<span weight=\"bold\" size=\"larger\">VPN Start Failure</span>\n"
-"\n"
-"Could not start the VPN connection '%s' due to a failure launching the VPN "
-"program.\n"
-"\n"
-"The VPN service said: \"%s\""
-msgstr ""
-"<span weight=\"bold\" size=\"larger\">VPN indítási hiba</span>\n"
-"\n"
-"Nem sikerült elindítani \"%s\" VPN kapcsolatot a VPN program indításakor "
-"fellépett hiba miatt.\n"
-"\n"
-"A VPN szolgáltatás válasza: \"%s\""
-
-#: ../gnome/applet/applet.c:500
-#, c-format
-msgid ""
-"<span weight=\"bold\" size=\"larger\">VPN Connect Failure</span>\n"
-"\n"
-"Could not start the VPN connection '%s' due to a connection error.\n"
-"\n"
-"The VPN service said: \"%s\""
-msgstr ""
-"<span weight=\"bold\" size=\"larger\">VPN kapcsolódási hiba</span>\n"
-"\n"
-"Nem sikerült elindítani \"%s\" VPN kapcsolatot egy kapcsolódási hiba miatt.\n"
-"\n"
-"A VPN szolgáltatás válasza: \"%s\""
-
-#: ../gnome/applet/applet.c:505
-#, c-format
-msgid ""
-"<span weight=\"bold\" size=\"larger\">VPN Configuration Error</span>\n"
-"\n"
-"The VPN connection '%s' was not correctly configured.\n"
-"\n"
-"The VPN service said: \"%s\""
-msgstr ""
-"<span weight=\"bold\" size=\"larger\">VPN beállítási hiba</span>\n"
-"\n"
-"A(z) \"%s\" VPN kapcsolat nincs megfelelően beállítva.\n"
-"\n"
-"A VPN szolgáltatás válasza: \"%s\""
-
-#: ../gnome/applet/applet.c:510
-#, c-format
-msgid ""
-"<span weight=\"bold\" size=\"larger\">VPN Connect Failure</span>\n"
-"\n"
-"Could not start the VPN connection '%s' because the VPN server did not "
-"return an adequate network configuration.\n"
-"\n"
-"The VPN service said: \"%s\""
-msgstr ""
-"<span weight=\"bold\" size=\"larger\">VPN kapcsolódási hiba</span>\n"
-"\n"
-"Nem sikerült elindítani \"%s\" VPN kapcsolatot, mivel a VPN-kiszolgáló nem "
-"adott vissza megfelelő hálózati beállításokat.\n"
-"\n"
-"A VPN szolgáltatás válasza: \"%s\""
-
-#: ../gnome/applet/applet.c:577
-#, c-format
-msgid ""
-"<span weight=\"bold\" size=\"larger\">VPN Login Message</span>\n"
-"\n"
-"VPN connection '%s' said:\n"
-"\n"
-"\"%s\""
-msgstr ""
-"<span weight=\"bold\" size=\"larger\">VPN bejelentkezési üzenet</span>\n"
-"\n"
-"\"%s\" VPN kapcsolat a következőt mondta:\n"
-"\n"
-"\"%s\""
-
-#: ../gnome/applet/applet.c:795 ../gnome/applet/applet.c:2433
-#: ../gnome/applet/other-network-dialog.c:322
-#: ../gnome/applet/passphrase-dialog.c:396
-msgid ""
-"The NetworkManager Applet could not find some required resources (the glade "
-"file was not found)."
-msgstr "A NetworkManager kisalkalmazás nem talál néhány szükséges glade fájlt."
-
-#: ../gnome/applet/applet.c:808
-#, c-format
-msgid "The network device \"%s (%s)\" does not support wireless scanning."
-msgstr "A(z) \"%s (%s)\" hálózati eszköz nem támogatja a vezeték nélküli keresést."
-
-#: ../gnome/applet/applet.c:815
-#, c-format
-msgid "The network device \"%s (%s)\" does not support link detection."
-msgstr "A(z) \"%s (%s)\" hálózati eszköz nem támogatja a kapcsolatfelismerést."
-
-#: ../gnome/applet/applet.c:936
-#, c-format
-msgid "Preparing device %s for the wired network..."
-msgstr "%s eszköz előkészítése a vezetékes hálózathoz..."
-
-#: ../gnome/applet/applet.c:938
-#, c-format
-msgid "Preparing device %s for the wireless network '%s'..."
-msgstr "%s eszköz előkészítése \"%s\" vezeték nélküli hálózathoz..."
-
-#: ../gnome/applet/applet.c:945
-#, c-format
-msgid "Configuring device %s for the wired network..."
-msgstr "%s eszköz beállítása a vezetékes hálózathoz..."
-
-#: ../gnome/applet/applet.c:947
-#, c-format
-msgid "Attempting to join the wireless network '%s'..."
-msgstr "Kísérlet \"%s\" vezeték nélküli hálózathoz való kapcsolódásra..."
-
-#: ../gnome/applet/applet.c:954
-#, c-format
-msgid "Waiting for Network Key for the wireless network '%s'..."
-msgstr "Várakozás \"%s\" vezeték nélküli hálózat hálózati kulcsára..."
-
-#: ../gnome/applet/applet.c:961 ../gnome/applet/applet.c:970
-msgid "Requesting a network address from the wired network..."
-msgstr "Hálózati cím kérése a vezetékes hálózattól..."
-
-#: ../gnome/applet/applet.c:963 ../gnome/applet/applet.c:972
-#, c-format
-msgid "Requesting a network address from the wireless network '%s'..."
-msgstr "Hálózati cím kérése \"%s\" vezeték nélküli hálózattól..."
-
-#: ../gnome/applet/applet.c:979
-msgid "Finishing connection to the wired network..."
-msgstr "A vezetékes hálózathoz való kapcsolódás befejezése..."
-
-#: ../gnome/applet/applet.c:981
-#, c-format
-msgid "Finishing connection to the wireless network '%s'..."
-msgstr "\"%s\" vezeték nélküli hálózathoz való kapcsolódás befejezése..."
-
-#: ../gnome/applet/applet.c:1027
-msgid "NetworkManager is not running"
-msgstr "A NetworkManager nem fut"
-
-#: ../gnome/applet/applet.c:1038
-msgid "No network connection"
-msgstr "Nincs hálózati kapcsolat"
-
-#: ../gnome/applet/applet.c:1045
-msgid "Wired network connection"
-msgstr "Vezetékes hálózati kapcsolat"
-
-#: ../gnome/applet/applet.c:1052
-msgid "Connected to an Ad-Hoc wireless network"
-msgstr "Ad-hoc vezeték nélküli hálózathoz kapcsolódva"
-
-#: ../gnome/applet/applet.c:1066
-#, c-format
-msgid "Wireless network connection to '%s' (%d%%)"
-msgstr "Vezeték nélküli hálózati kapcsolat a következővel: \"%s\" (%d%%)"
-
-#: ../gnome/applet/applet.c:1091
-#, c-format
-msgid "VPN connection to '%s'"
-msgstr "VPN kapcsolat a következőhöz: \"%s\""
-
-#: ../gnome/applet/applet.c:1542
-msgid "_Connect to Other Wireless Network..."
-msgstr "Kapcsolódás _más vezeték nélküli hálózathoz..."
-
-#: ../gnome/applet/applet.c:1563
-msgid "Create _New Wireless Network..."
-msgstr "Ú_j vezeték nélküli hálózat létrehozása..."
-
-#: ../gnome/applet/applet.c:1676
-#: ../gnome/vpn-properties/nm-vpn-properties.glade.h:17
-msgid "VPN Connections"
-msgstr "VPN kapcsolatok"
-
-#: ../gnome/applet/applet.c:1703
-msgid "Configure VPN..."
-msgstr "VPN beállítása..."
-
-#: ../gnome/applet/applet.c:1707
-msgid "Disconnect VPN..."
-msgstr "VPN bontása..."
-
-#: ../gnome/applet/applet.c:1730
-msgid "Dial Up"
-msgstr "Betárcsázás"
-
-#: ../gnome/applet/applet.c:1739
-#, c-format
-msgid "Connect via %s..."
-msgstr "Kapcsolódás %s használatával..."
-
-#: ../gnome/applet/applet.c:1790
-msgid "No network devices have been found"
-msgstr "Nem találtam hálózati eszközöket"
-
-#: ../gnome/applet/applet.c:1955
-msgid "NetworkManager is not running..."
-msgstr "A NetworkManager nem fut..."
-
-#: ../gnome/applet/applet.c:2023
-msgid "_Stop All Wireless Devices"
-msgstr "Az összes vezeték nélküli eszköz l_eállítása"
-
-#: ../gnome/applet/applet.c:2028
-msgid "_Start All Wireless Devices"
-msgstr "Az összes vezeték nélküli eszköz elin_dítása"
-
-#: ../gnome/applet/applet.c:2059
-msgid "_Wireless Network Discovery"
-msgstr "Vezeték nélküli hálózat _felismerése"
-
-#: ../gnome/applet/applet.c:2062
-msgid "Always Search"
-msgstr "Mindig keres"
-
-#: ../gnome/applet/applet.c:2070
-msgid "Search Only When Disconnected"
-msgstr "Keresés csak kapcsolat nélküli módban"
-
-#: ../gnome/applet/applet.c:2078
-msgid "Never Search"
-msgstr "Soha ne keressen"
-
-#. Stop All Wireless Devices item
-#: ../gnome/applet/applet.c:2090
-msgid "Stop All Wireless Devices"
-msgstr "Az összes vezeték nélküli eszköz leállítása"
-
-#: ../gnome/applet/applet.c:2096
-msgid "Connection _Information"
-msgstr "_Kapcsolat-információk"
-
-#: ../gnome/applet/applet.c:2104
-msgid "_Help"
-msgstr "_Súgó"
-
-#: ../gnome/applet/applet.c:2111
-msgid "_About"
-msgstr "_Névjegy"
-
-#: ../gnome/applet/applet.c:2583
-msgid ""
-"The NetworkManager applet could not find some required resources. It cannot "
-"continue.\n"
-msgstr ""
-"A NetworkManager kisalkalmazás nem talál néhány szükséges erőforrást, ezért "
-"a futása nem folytatódhat.\n"
-
-#: ../gnome/applet/eggtrayicon.c:118
-msgid "Orientation"
-msgstr "Tájolás"
-
-#: ../gnome/applet/eggtrayicon.c:119
-msgid "The orientation of the tray."
-msgstr "A tálca tájolása."
-
-#: ../gnome/applet/menu-items.c:89
-#, c-format
-msgid "Wired Network (%s)"
-msgstr "Vezetékes hálózat (%s)"
-
-#: ../gnome/applet/menu-items.c:92
-msgid "_Wired Network"
-msgstr "_Vezetékes hálózat"
-
-#: ../gnome/applet/menu-items.c:165
-#, c-format
-msgid "Wireless Network (%s)"
-msgid_plural "Wireless Networks (%s)"
-msgstr[0] "Vezeték nélküli hálózat (%s)"
-msgstr[1] "Vezeték nélküli hálózatok (%s)"
-
-#: ../gnome/applet/menu-items.c:167
-msgid "Wireless Network"
-msgid_plural "Wireless Networks"
-msgstr[0] "Vezeték nélküli hálózat"
-msgstr[1] "Vezeték nélküli hálózatok"
-
-#: ../gnome/applet/menu-items.c:309
-msgid " (invalid Unicode)"
-msgstr " (érvénytelen Unicode)"
-
-#: ../gnome/applet/other-network-dialog.c:143
-#: ../gnome/applet/passphrase-dialog.c:156
-#: ../gnome/applet/wireless-applet.glade.h:34
-msgid "Passphrase:"
-msgstr "Jelmondat:"
-
-#: ../gnome/applet/other-network-dialog.c:146
-#: ../gnome/applet/passphrase-dialog.c:159
-msgid "ASCII Key:"
-msgstr "ASCII Kulcs:"
-
-#: ../gnome/applet/other-network-dialog.c:149
-#: ../gnome/applet/passphrase-dialog.c:162
-msgid "Hex Key:"
-msgstr "Hex Kulcs:"
-
-#: ../gnome/applet/other-network-dialog.c:232
-msgid "Create new wireless network"
-msgstr "Új vezeték nélküli hálózat létrehozása"
-
-#: ../gnome/applet/other-network-dialog.c:233
-msgid ""
-"Enter the ESSID and security settings of the wireless network you wish to "
-"create."
-msgstr ""
-"Adja meg a létrehozandó vezeték nélküli hálózat ESSID-jét és biztonsági "
-"beállításait."
-
-#: ../gnome/applet/other-network-dialog.c:234
-msgid "By default, the ESSID is set to your computer's name,"
-msgstr "Alapértelmezésben az ESSID a számítógépe neve,"
-
-#: ../gnome/applet/other-network-dialog.c:236
-msgid ", with no encryption enabled."
-msgstr "kikapcsolt titkosítással."
-
-#: ../gnome/applet/other-network-dialog.c:241
-msgid "Custom wireless network"
-msgstr "Egyéni vezeték nélküli hálózat"
-
-#: ../gnome/applet/other-network-dialog.c:242
-msgid "Enter the ESSID of the wireless network to which you wish to connect."
-msgstr "Adja meg azon vezeték nélküli hálózat ESSID-jét, melyhez kapcsolódni kíván."
-
-#: ../gnome/applet/vpn-password-dialog.c:152
-#: ../gnome/applet/vpn-password-dialog.c:191
-#, c-format
-msgid "Cannot start VPN connection '%s'"
-msgstr "Nem lehet elindítani \"%s\" VPN kapcsolatot"
-
-#: ../gnome/applet/vpn-password-dialog.c:155
-#, c-format
-msgid ""
-"Could not find the authentication dialog for VPN connection type '%s'. "
-"Contact your system administrator."
-msgstr ""
-"Nem található a hitelesítési párbeszédablak a(z) \"%s\" típusú VPN "
-"kapcsolathoz. Lépjen kapcsolatba a rendszergazdával."
-
-#: ../gnome/applet/vpn-password-dialog.c:194
-#, c-format
-msgid ""
-"There was a problem launching the authentication dialog for VPN connection "
-"type '%s'. Contact your system administrator."
-msgstr ""
-"Hiba lépett fel a(z) \"%s\" típusú VPN kapcsolathoz tartozó párbeszédablak "
-"elindítása közben. Lépjen kapcsolatba a rendszergazdával."
-
-#: ../gnome/applet/wireless-applet.glade.h:1
-msgid " "
-msgstr " "
-
-#: ../gnome/applet/wireless-applet.glade.h:2
-msgid ""
-"128-bit Passphrase (WEP)\n"
-"ASCII Key (WEP)\n"
-"Hex Key (WEP)"
-msgstr ""
-"128-bites Jelmondat (WEP)\n"
-"ASCII Kulcs (WEP)\n"
-"Hex Kulcs (WEP)"
-
-#: ../gnome/applet/wireless-applet.glade.h:5
-msgid ""
-"128-bit passphrase (WEP)\n"
-"ASCII key (WEP)\n"
-"Hex key (WEP)"
-msgstr ""
-"128-bites jelmondat (WEP)\n"
-"ASCII kulcs (WEP)\n"
-"Hex kulcs (WEP)"
-
-#: ../gnome/applet/wireless-applet.glade.h:8
-msgid "<span weight=\"bold\" size=\"larger\">Active Connection Information</span>"
-msgstr "<span weight=\"bold\" size=\"larger\">Aktív kapcsolatok információi</span>"
-
-#: ../gnome/applet/wireless-applet.glade.h:10
-#, no-c-format
-msgid ""
-"<span weight=\"bold\" size=\"larger\">Passphrase Required by Wireless "
-"Network</span>\n"
-"\n"
-"A passphrase or encryption key is required to access the wireless network '%"
-"s'."
-msgstr ""
-"<span weight=\"bold\" size=\"larger\">A vezeték nélküli hálózat jelszót "
-"igényel</span>\n"
-"\n"
-"A(z) %s vezeték nélküli hálózathoz való hozzáféréshez jelszó vagy "
-"titkosítási kulcs szükséges."
-
-#: ../gnome/applet/wireless-applet.glade.h:14
-#, no-c-format
-msgid ""
-"<span weight=\"bold\" size=\"larger\">Reduced Network Functionality</span>\n"
-"\n"
-"%s It will not be completely functional."
-msgstr ""
-"<span weight=\"bold\" size=\"larger\">Csökkentett működőképességű hálózat</"
-"span>\n"
-"\n"
-"%s nem lesz teljesen működőképes."
-
-#: ../gnome/applet/wireless-applet.glade.h:18
-#, no-c-format
-msgid ""
-"<span weight=\"bold\" size=\"larger\">Wireless Network Login Confirmation</"
-"span>\n"
-"\n"
-"You have chosen to log in to the wireless network '%s'. If you are sure "
-"that this wireless network is secure, click the checkbox below and "
-"NetworkManager will not require confirmation on subsequent log ins."
-msgstr ""
-"<span weight=\"bold\" size=\"larger\">Vezeték nélküli hálózatba "
-"bejelentkezés megerősítése</span>\n"
-"\n"
-"A(z) \"%s\" vezeték nélküli hálózatba való bejelentkezést választotta. Ha "
-"biztos abban, hogy ez a vezeték nélküli hálózat biztonságos, kattintson az "
-"alábbi jelölőnégyzetre és a NetworkManager nem fog megerősítést kérni, ha a "
-"későbbiekben kapcsolódik hozzá."
-
-#: ../gnome/applet/wireless-applet.glade.h:21
-msgid "Always Trust this Wireless Network"
-msgstr "Mindig megbízom ebben a vezeték nélküli hálózatban"
-
-#: ../gnome/applet/wireless-applet.glade.h:22
-msgid "Broadcast Address:"
-msgstr "Broadcast cím:"
-
-#: ../gnome/applet/wireless-applet.glade.h:23
-msgid "C_onnect"
-msgstr "Kapcs_olódás"
-
-#: ../gnome/applet/wireless-applet.glade.h:24
-msgid "Connect with encryption enabled"
-msgstr "Kapcsolódás bekapcsolt titkosítással"
-
-#: ../gnome/applet/wireless-applet.glade.h:25
-msgid "Connection Information"
-msgstr "Kapcsolat-információk"
-
-#: ../gnome/applet/wireless-applet.glade.h:26
-msgid "Destination Address:"
-msgstr "Célcím:"
-
-#: ../gnome/applet/wireless-applet.glade.h:27
-msgid "Don't remind me again"
-msgstr "Ne emlékezzen rám"
-
-#: ../gnome/applet/wireless-applet.glade.h:28
-msgid "Hardware Address:"
-msgstr "Hardvercím:"
-
-#: ../gnome/applet/wireless-applet.glade.h:29
-msgid "IP Address:"
-msgstr "IP-cím:"
-
-#: ../gnome/applet/wireless-applet.glade.h:30
-msgid "Interface:"
-msgstr "Csatoló:"
-
-#: ../gnome/applet/wireless-applet.glade.h:31
-msgid "Key Type:"
-msgstr "Kulcs típusa:"
-
-#: ../gnome/applet/wireless-applet.glade.h:32
-msgid "Key type:"
-msgstr "Kulcs típusa:"
-
-#: ../gnome/applet/wireless-applet.glade.h:33
-msgid "Other Wireless Network..."
-msgstr "Egyéb vezeték nélküli hálózat..."
-
-#: ../gnome/applet/wireless-applet.glade.h:35
-msgid "Subnet Mask:"
-msgstr "Alhálózati maszk:"
-
-#: ../gnome/applet/wireless-applet.glade.h:36
-msgid "Wireless Network Key Required"
-msgstr "Vezeték nélküli hálózat kulcs szükséges"
-
-#: ../gnome/applet/wireless-applet.glade.h:37
-msgid "Wireless _adapter:"
-msgstr "Vezeték _nélküli csatoló:"
-
-#: ../gnome/applet/wireless-applet.glade.h:38
-msgid "Wireless _network:"
-msgstr "Vezeték nélküli _hálózat:"
-
-#: ../gnome/applet/wireless-applet.glade.h:39
-msgid "_Login to Network"
-msgstr "_Bejelentkezés a hálózatba"
-
-#: ../gnome/applet/wireless-applet.glade.h:40
-msgid "_OK"
-msgstr "_OK"
-
-#: ../gnome/vpn-properties/nm-vpn-properties.c:376
-msgid "Cannot add VPN connection"
-msgstr "Nem lehet VPN kapcsolatot hozzáadni"
-
-#: ../gnome/vpn-properties/nm-vpn-properties.c:378
-msgid ""
-"No suitable VPN software was found on your system. Contact your system "
-"administrator."
-msgstr ""
-"Nem található megfelelő VPN szoftver a rendszerén. Lépjen kapcsolatba a "
-"rendszergazdával."
-
-#: ../gnome/vpn-properties/nm-vpn-properties.c:430
-msgid "Cannot import VPN connection"
-msgstr "Nem lehet VPN kapcsolatot importálni"
-
-#: ../gnome/vpn-properties/nm-vpn-properties.c:432
-#, c-format
-msgid ""
-"Cannot find suitable software for VPN connection type '%s' to import the "
-"file '%s'. Contact your system administrator."
-msgstr ""
-"Nem található a(z) \"%s\" kapcsolattípusnak megfelelő VPN szoftver a(z) \"%s"
-"\" fájl importálásához. Lépjen kapcsolatba a rendszergazdával."
-
-#: ../gnome/vpn-properties/nm-vpn-properties.c:572
-#, c-format
-msgid "Error retrieving VPN connection '%s'"
-msgstr "Hiba a(z) \"%s\" VPN kapcsolat lekérése közben"
-
-#: ../gnome/vpn-properties/nm-vpn-properties.c:575
-#, c-format
-msgid ""
-"Could not find the UI files for VPN connection type '%s'. Contact your "
-"system administrator."
-msgstr ""
-"Nem találhatóak a(z) \"%s\" VPN kapcsolathoz tartozó felhasználóifelület-"
-"fájlok. Lépjen kapcsolatba a rendszergazdával."
-
-#: ../gnome/vpn-properties/nm-vpn-properties.c:735
-#, c-format
-msgid "Delete VPN connection \"%s\"?"
-msgstr "Törli a(z) \"%s\" VPN kapcsolatot?"
-
-#: ../gnome/vpn-properties/nm-vpn-properties.c:738
-#, c-format
-msgid ""
-"All information about the VPN connection \"%s\" will be lost and you may "
-"need your system administrator to provide information to create a new "
-"connection."
-msgstr ""
-"Minden információ a(z) \"%s\" VPN kapcsolatról el fog veszni és egy új "
-"kapcsolat létrehozásához szükséges információkért lehetséges, hogy a "
-"rendszergazdára is szüksége lesz."
-
-#: ../gnome/vpn-properties/nm-vpn-properties.c:953
-msgid "Unable to load"
-msgstr "Nem lehet betölteni"
-
-#: ../gnome/vpn-properties/nm-vpn-properties.c:955
-msgid "Cannot find some needed resources (the glade file)!"
-msgstr "Nem található néhány szükséges erőforrás (a glade fájl)!"
-
-#. Edit dialog
-#: ../gnome/vpn-properties/nm-vpn-properties.c:1073
-msgid "Edit VPN Connection"
-msgstr "VPN kapcsolat szerkesztése"
-
-#: ../gnome/vpn-properties/nm-vpn-properties.glade.h:1
-msgid "Add a new VPN connection"
-msgstr "Új VPN kapcsolat hozzáadása"
-
-#: ../gnome/vpn-properties/nm-vpn-properties.glade.h:2
-msgid "Connect to:"
-msgstr "Kapcsolódás:"
-
-#: ../gnome/vpn-properties/nm-vpn-properties.glade.h:3
-msgid "Create VPN Connection"
-msgstr "VPN kapcsolat létrehozása"
-
-#: ../gnome/vpn-properties/nm-vpn-properties.glade.h:4
-msgid "Create VPN Connection - 1 of 2"
-msgstr "VPN kapcsolat létrehozása - 1/2"
-
-#: ../gnome/vpn-properties/nm-vpn-properties.glade.h:5
-msgid "Create VPN Connection - 2 of 2"
-msgstr "VPN kapcsolat létrehozása - 2/2"
-
-#: ../gnome/vpn-properties/nm-vpn-properties.glade.h:6
-msgid "Delete the selected VPN connection"
-msgstr "A kijelölt VPN kapcsolat törlése"
-
-#: ../gnome/vpn-properties/nm-vpn-properties.glade.h:7
-msgid ""
-"Dependent on the private network you want to connect to, you need to select "
-"what type of connection you want to create."
-msgstr ""
-"A magánhálózat típusától függően, amelyhez kapcsolódni akar, ki kell "
-"választania, milyen típusú kapcsolatot szeretne létrehozni."
-
-#: ../gnome/vpn-properties/nm-vpn-properties.glade.h:8
-msgid "E_xport"
-msgstr "E_xportálás"
-
-#: ../gnome/vpn-properties/nm-vpn-properties.glade.h:9
-msgid "Edit the selected VPN connection"
-msgstr "A kijelölt VPN kapcsolat szerkesztése"
-
-#: ../gnome/vpn-properties/nm-vpn-properties.glade.h:10
-msgid "Export VPN connection to a file"
-msgstr "VPN kapcsolat exportálása fájlba"
-
-#: ../gnome/vpn-properties/nm-vpn-properties.glade.h:11
-msgid "Export the VPN settings to a file"
-msgstr "A VPN beállítások exportálása fájlba"
-
-#: ../gnome/vpn-properties/nm-vpn-properties.glade.h:12
-msgid "Finish create VPN Connection"
-msgstr "VPN kapcsolat létrehozásának befejezése"
-
-#: ../gnome/vpn-properties/nm-vpn-properties.glade.h:13
-msgid "Manage Virtual Private Network connections"
-msgstr "Virtuális magánhálózati (VPN) kapcsolatok kezelése"
-
-#: ../gnome/vpn-properties/nm-vpn-properties.glade.h:14
-msgid ""
-"This assistant will guide you through the creation of a new VPN connection "
-"to a private network.\n"
-"\n"
-"It will require some information, such as IP addresses and secrets, that "
-"will probably be provided by your system administrator as appropriate."
-msgstr ""
-"Ez az asszisztens végigvezeti Önt egy magánhálózathoz tartozó új VPN "
-"kapcsolat létrehozásán.\n"
-"\n"
-"Ehhez szükség lesz néhány információra, például IP-címekre és titkokra, "
-"amiket valószínűleg a rendszergazda megadott Önnek. "
-
-#: ../src/nm-netlink-monitor.c:154
-#, c-format
-msgid "unable to create netlink socket for monitoring wired ethernet devices - %s"
-msgstr ""
-"nem lehet netlink foglalatot létrehozni a vezetékes ethernet kártyák "
-"megfigyelésére - %s"
-
-#: ../src/nm-netlink-monitor.c:172
-#, c-format
-msgid "unable to bind to netlink socket for monitoring wired ethernet devices - %s"
-msgstr ""
-"nem lehet kapcsolódni a netlink foglalathoz a vezetékes ethernet kártyák "
-"megfigyelésére - %s"
-
-#: ../src/nm-netlink-monitor.c:403
-msgid "operation took too long"
-msgstr "a művelet túl sokáig tartott"
-
-#: ../src/nm-netlink-monitor.c:500
-msgid "received data from wrong type of sender"
-msgstr "téves feladótól érkezett adat"
-
-#: ../src/nm-netlink-monitor.c:513
-msgid "received data from unexpected sender"
-msgstr "nem várt feladótól érkezett adat"
-
-#: ../src/nm-netlink-monitor.c:644
-msgid "too much data was sent over socket and some of it was lost"
-msgstr "túl sok adat lett átküldve a foglalaton és ezek egy része elveszett"
-
-#: ../src/nm-netlink-monitor.c:733
-msgid "error occurred while waiting for data on socket"
-msgstr "hiba lépett fel adatokra várakozás közben a foglalaton"
-
diff --git a/po/it.po b/po/it.po
deleted file mode 100644
index 3a56532a6d..0000000000
--- a/po/it.po
+++ /dev/null
@@ -1,281 +0,0 @@
-# Italian translation for NetworkManager
-# Copyright (C) 2004-2005 THE NetworkManager CopyRight Holder
-# This file is distributed under the same license as the NetworkManager package.
-# Francesco Marletta <francesco.marletta@tiscali.it>, 2004-2005.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: NetworkManager 0.1\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2005-02-27 18:46+0100\n"
-"PO-Revision-Date: 2005-02-25 13:19+0100\n"
-"Last-Translator: Francesco Marletta <francesco.marletta@tiscali.it>\n"
-"Language-Team: Italian <tp@list.slinux.it>\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"Plural-Forms: nplurals=2; plural=(n != 1);\n"
-
-#: ../info-daemon/networks.glade.h:1
-msgid "<span weight=\"bold\">Wireless Networks:</span>"
-msgstr "<span weight=\"bold\">Reti wireless:</span>"
-
-#: ../info-daemon/networks.glade.h:2
-msgid "Modify Wireless Networks"
-msgstr "Modifica le reti wireless"
-
-#: ../info-daemon/passphrase.glade.h:1
-msgid "*"
-msgstr "*"
-
-#: ../info-daemon/passphrase.glade.h:2
-msgid ""
-"128-bit Passphrase (WEP)\n"
-"Ascii Key (WEP)\n"
-"Hex Key (WEP)"
-msgstr ""
-"Frase chiave a 128-bit (WEP)\n"
-"Chiave Ascii (WEP)\n"
-"Chiave Esadecimale (WEP)"
-
-#: ../info-daemon/passphrase.glade.h:6
-#, no-c-format
-msgid ""
-"<span weight=\"bold\" size=\"larger\">Passphrase Required by Wireless "
-"Network</span>\n"
-"\n"
-"A passphrase or encryption key is required to access the wireless network '%"
-"s'."
-msgstr ""
-"<span weight=\"bold\" size=\"larger\">Frase chiave richiesta dalla rete "
-"wireless</span>\n"
-"\n"
-"È richiesta una frase chiave o una chiave di cifratura per accedere alla "
-"rete wireless \"%s\"."
-
-#: ../info-daemon/passphrase.glade.h:9
-msgid "Key Type:"
-msgstr "Tipo di chiave:"
-
-#: ../info-daemon/passphrase.glade.h:10
-#: ../info-daemon/NetworkManagerInfoPassphraseDialog.c:139
-#: ../panel-applet/NMWirelessAppletOtherNetworkDialog.c:150
-#: ../panel-applet/essid.glade.h:7
-msgid "Passphrase:"
-msgstr "Frase chiave:"
-
-#: ../info-daemon/passphrase.glade.h:11
-msgid "Wireless Network Key Required"
-msgstr "Richiesta chiave per rete wireless"
-
-#: ../info-daemon/passphrase.glade.h:12
-msgid "_Login to Network"
-msgstr "_Login alla rete"
-
-#: ../info-daemon/NetworkManagerInfoPassphraseDialog.c:142
-#: ../panel-applet/NMWirelessAppletOtherNetworkDialog.c:153
-msgid "Ascii Key:"
-msgstr "Chiave ascii:"
-
-#: ../info-daemon/NetworkManagerInfoPassphraseDialog.c:145
-#: ../panel-applet/NMWirelessAppletOtherNetworkDialog.c:156
-msgid "Hex Key:"
-msgstr "Chiave esadecimale:"
-
-#: ../info-daemon/NetworkManagerInfoVPN.c:157
-#, c-format
-msgid "You must log in to access the private network %s"
-msgstr "È necessario effettuare il login per accedere alla rete privata %s"
-
-#: ../panel-applet/NMWirelessApplet.c:142
-#: ../panel-applet/NMWirelessApplet.c:160
-msgid "NetworkManager Applet"
-msgstr "Applet NetworkManager"
-
-#: ../panel-applet/NMWirelessApplet.c:144
-#: ../panel-applet/NMWirelessApplet.c:162
-msgid "Copyright (C) 2004-2005 Red Hat, Inc."
-msgstr "Copyright © 2004-2005 Red Hat, Inc."
-
-#: ../panel-applet/NMWirelessApplet.c:145
-#: ../panel-applet/NMWirelessApplet.c:163
-msgid ""
-"Notification area applet for managing your network devices and connections."
-msgstr ""
-"Un'applet per l'aerea di notifica per la gestione delle interfacce e delle "
-"connessioni di rete"
-
-#: ../panel-applet/NMWirelessApplet.c:379
-msgid "No network connection"
-msgstr "Nessuna connessione di rete"
-
-#: ../panel-applet/NMWirelessApplet.c:384
-msgid "Wired network connection"
-msgstr "Connessione di rete cablata"
-
-#: ../panel-applet/NMWirelessApplet.c:389
-msgid "Connecting to a wired network..."
-msgstr "Connessione ad una rete cablata in corso..."
-
-#: ../panel-applet/NMWirelessApplet.c:398
-msgid "Connected to an Ad-Hoc wireless network"
-msgstr "Connesso ad una rete wireless ad-hoc"
-
-#: ../panel-applet/NMWirelessApplet.c:412
-#, c-format
-msgid "Wireless network connection to '%s' (%d%%)"
-msgstr "Connessione di rete wireless a \"%s\" (%d%%)"
-
-#: ../panel-applet/NMWirelessApplet.c:417
-msgid "Wireless network connection"
-msgstr "Connessione di rete wireless"
-
-#: ../panel-applet/NMWirelessApplet.c:422
-#, c-format
-msgid "Connecting to wireless network '%s'..."
-msgstr "Connessione alla rete wireless \"%s\" in corso..."
-
-#: ../panel-applet/NMWirelessApplet.c:428
-msgid "NetworkManager is not running"
-msgstr "NetworkManager non è in esecuzione"
-
-#: ../panel-applet/NMWirelessApplet.c:433
-msgid "Scanning for wireless networks..."
-msgstr "Scansione di reti wireless..."
-
-#: ../panel-applet/NMWirelessApplet.c:798
-msgid "Other Wireless Networks..."
-msgstr "Altre reti wireless..."
-
-#: ../panel-applet/NMWirelessApplet.c:819
-msgid "Create new Wireless Network..."
-msgstr "Crea nuova rete wireless..."
-
-#: ../panel-applet/NMWirelessApplet.c:895
-msgid "No network devices have been found"
-msgstr "Non è stata trovata alcuna interfaccia di rete"
-
-#: ../panel-applet/NMWirelessApplet.c:1037
-msgid "NetworkManager is not running..."
-msgstr "NetworkManager non è in esecuzione..."
-
-#: ../panel-applet/NMWirelessApplet.c:1107
-#: ../panel-applet/NMWirelessApplet.c:1156
-msgid "Pause Wireless Scanning"
-msgstr "Sospendere la scansione wireless"
-
-#: ../panel-applet/NMWirelessApplet.c:1112
-msgid "Resume Wireless Scanning"
-msgstr "Riprendere la scansione wireless"
-
-#: ../panel-applet/NMWirelessApplet.c:1122
-#: ../panel-applet/NMWirelessApplet.c:1162
-msgid "Stop All Wireless Devices"
-msgstr "Ferma tutti i dispositivi wireless"
-
-#: ../panel-applet/NMWirelessApplet.c:1127
-msgid "Start All Wireless Devices"
-msgstr "Avvia tutti i dispositivi wireless"
-
-#: ../panel-applet/NMWirelessApplet.c:1172
-msgid "Help"
-msgstr "Aiuto"
-
-#: ../panel-applet/NMWirelessApplet.c:1179
-msgid "About"
-msgstr "Informazioni"
-
-# [NdT] è il titolo della finestra
-#: ../panel-applet/NMWirelessAppletOtherNetworkDialog.c:229
-msgid "Create new wireless network"
-msgstr "Creazione nuova rete wireless"
-
-#: ../panel-applet/NMWirelessAppletOtherNetworkDialog.c:230
-msgid ""
-"Enter the ESSID and security settings of the wireless network you wish to "
-"create."
-msgstr ""
-"Inserire l'ESSID e le impostazioni di sicurezza della rete wireless che si "
-"desidera creare."
-
-#: ../panel-applet/NMWirelessAppletOtherNetworkDialog.c:235
-msgid "Custom wireless network"
-msgstr "Rete wireless personalizzata"
-
-#: ../panel-applet/NMWirelessAppletOtherNetworkDialog.c:236
-msgid "Enter the ESSID of the wireless network to which you wish to connect."
-msgstr "Inserire l'ESSID della rete wireless a cui ci si vuole connettere."
-
-#. Reuse the above string to make the translators less angry.
-#: ../panel-applet/NMWirelessAppletOtherNetworkDialog.c:316
-#: ../panel-applet/NMWirelessAppletOtherNetworkDialog.c:325
-msgid ""
-"The NetworkManager Applet could not find some required resources (the glade "
-"file was not found)."
-msgstr ""
-"L'applet NetworkManager non è riuscita a trovare alcune risorse richieste "
-"(il file glade non è stato trovato)."
-
-#: ../panel-applet/essid.glade.h:1
-msgid ""
-"128-bit passphrase (WEP)\n"
-"Ascii key (WEP)\n"
-"Hex key (WEP)"
-msgstr ""
-"Frase chiave a 128-bit (WEP)\n"
-"Chiave ASCII (WEP)\n"
-"Chiave esadecimale (WEP)"
-
-#: ../panel-applet/essid.glade.h:4
-msgid "C_onnect"
-msgstr "C_onnetti"
-
-#: ../panel-applet/essid.glade.h:5
-msgid "Connect with encryption enabled"
-msgstr "Connessione con cifratura attiva"
-
-#: ../panel-applet/essid.glade.h:6
-msgid "Key type:"
-msgstr "Tipo di chiave:"
-
-#: ../panel-applet/essid.glade.h:8
-msgid "Wireless _adapter:"
-msgstr "_Adattatore wireless:"
-
-#: ../panel-applet/essid.glade.h:9
-msgid "Wireless _network:"
-msgstr "_Rete wireless:"
-
-#: ../panel-applet/menu-info.c:91
-#, c-format
-msgid "Wired Network (%s)"
-msgstr "Rete cablata (%s)"
-
-#: ../panel-applet/menu-info.c:93
-msgid "Wired Network"
-msgstr "Rete cablata"
-
-#: ../panel-applet/menu-info.c:166
-#, c-format
-msgid "Wireless Network (%s)"
-msgid_plural "Wireless Networks (%s)"
-msgstr[0] "Rete wireless (%s)"
-msgstr[1] "Reti wireless (%s)"
-
-#: ../panel-applet/menu-info.c:168
-msgid "Wireless Network"
-msgid_plural "Wireless Networks"
-msgstr[0] "Rete wireless"
-msgstr[1] "Reti wireless"
-
-#: ../panel-applet/menu-info.c:294
-msgid " (invalid Unicode)"
-msgstr " (Unicode non valido)"
-
-#: ../examples/python/systray/eggtrayicon.c:111
-msgid "Orientation"
-msgstr "Orientamento"
-
-#: ../examples/python/systray/eggtrayicon.c:112
-msgid "The orientation of the tray."
-msgstr "L'orientamento del vassoio."
diff --git a/po/ja.po b/po/ja.po
deleted file mode 100644
index 0b9f05b37f..0000000000
--- a/po/ja.po
+++ /dev/null
@@ -1,219 +0,0 @@
-# Japanese translation for NetworkManager
-# Copyright (C) 2005 Dan Williams <dcbw@redhat.com>
-# This file is distributed under the same license as the NetworkManager package.
-# Satoru SATOH <ss@gnome.gr.jp>, 2005.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: NetworkManager 0.3.1\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2005-01-01 11:27+0100\n"
-"PO-Revision-Date: 2005-01-01 23:57+0900\n"
-"Last-Translator: Satoru SATOH <ss@gnome.gr.jp>\n"
-"Language-Team: Japanese <gnome-translation@gnome.gr.jp>\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"Plural-Forms: nplurals=1; plural=0;\n"
-
-#: info-daemon/networks.glade.h:1
-msgid "<span weight=\"bold\">Wireless Networks:</span>"
-msgstr "<span weight=\"bold\">ç„¡ç·šãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯:</span>"
-
-#: info-daemon/networks.glade.h:2
-msgid "Modify Wireless Networks"
-msgstr "ç„¡ç·šãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯ã‚’変更"
-
-#: info-daemon/passphrase.glade.h:1 panel-applet/essid.glade.h:1
-msgid "*"
-msgstr "*"
-
-#: info-daemon/passphrase.glade.h:2 panel-applet/essid.glade.h:2
-msgid ""
-"128-bit Passphrase (WEP)\n"
-"Ascii Key (WEP)\n"
-"Hex Key (WEP)"
-msgstr ""
-"128-bit パスフレーズ (WEP)\n"
-"ASCII éµ (WEP)\n"
-"16 é€²éµ (WEP)"
-
-#: info-daemon/passphrase.glade.h:6
-#, no-c-format
-msgid ""
-"<span weight=\"bold\" size=\"larger\">Passphrase Required by Wireless "
-"Network</span>\n"
-"\n"
-"A passphrase or encryption key is required to access the wireless network '%"
-"s'."
-msgstr ""
-"<span weight=\"bold\" size=\"larger\">ç„¡ç·šãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯ã«ã¯ãƒ‘スフレーズãŒ"
-"å¿…è¦ã§ã™</span>\n\n"
-"ç„¡ç·šãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯ '%s' ã«ã‚¢ã‚¯ã‚»ã‚¹ã™ã‚‹ã«ã¯ãƒ‘スフレーズã‹æš—å·åŒ–éµãŒå¿…è¦ã§ã™"
-
-#: info-daemon/passphrase.glade.h:9 panel-applet/essid.glade.h:7
-msgid "Key Type:"
-msgstr "éµã®ç¨®åˆ¥"
-
-#: info-daemon/passphrase.glade.h:10
-#: info-daemon/NetworkManagerInfoPassphraseDialog.c:139
-#: panel-applet/NMWirelessAppletOtherNetworkDialog.c:147
-#: panel-applet/essid.glade.h:8
-msgid "Passphrase:"
-msgstr "パスフレーズ:"
-
-#: info-daemon/passphrase.glade.h:11
-msgid "Wireless Network Key Required"
-msgstr "ç„¡ç·šãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯éµãŒå¿…è¦ã§ã™"
-
-#: info-daemon/passphrase.glade.h:12
-msgid "_Login to Network"
-msgstr "ãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯ã«ãƒ­ã‚°ã‚¤ãƒ³(_L)"
-
-#: info-daemon/NetworkManagerInfoPassphraseDialog.c:142
-#: panel-applet/NMWirelessAppletOtherNetworkDialog.c:150
-msgid "Ascii Key:"
-msgstr "ASCII éµ:"
-
-#: info-daemon/NetworkManagerInfoPassphraseDialog.c:145
-#: panel-applet/NMWirelessAppletOtherNetworkDialog.c:153
-msgid "Hex Key:"
-msgstr "16 進éµ:"
-
-#: info-daemon/NetworkManagerInfoVPN.c:157
-#, c-format
-msgid "You must log in to access the private network %s"
-msgstr "プライベートãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯ %s ã«ã‚¢ã‚¯ã‚»ã‚¹ã™ã‚‹ã«ã¯ãƒ­ã‚°ã‚¤ãƒ³"
-"ã—ãªã‘ã‚Œã°ã„ã‘ã¾ã›ã‚“"
-
-#: panel-applet/NMWirelessApplet.c:293
-msgid "No network connection"
-msgstr "ãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯æŽ¥ç¶šãªã—"
-
-#: panel-applet/NMWirelessApplet.c:297
-msgid "Wired network connection"
-msgstr "ç„¡ç·šãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯æŽ¥ç¶š"
-
-#: panel-applet/NMWirelessApplet.c:303
-msgid "Connecting to a wired network..."
-msgstr "ç„¡ç·šãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯ã«æŽ¥ç¶šä¸­..."
-
-#: panel-applet/NMWirelessApplet.c:311
-msgid "Connected to an Ad-Hoc wireless network"
-msgstr "Ad-Hoc ç„¡ç·šãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯ã«æŽ¥ç¶šã—ã¾ã—ãŸ"
-
-#: panel-applet/NMWirelessApplet.c:325
-#, c-format
-msgid "Wireless network connection (%d%%)"
-msgstr "ç„¡ç·šãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯æŽ¥ç¶š (%d%%)"
-
-#: panel-applet/NMWirelessApplet.c:329
-msgid "Wireless network connection"
-msgstr "ç„¡ç·šãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯æŽ¥ç¶š"
-
-#: panel-applet/NMWirelessApplet.c:335
-msgid "Connecting to a wireless network..."
-msgstr "ç„¡ç·šãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯ã«æŽ¥ç¶šä¸­..."
-
-#: panel-applet/NMWirelessApplet.c:339
-msgid "NetworkManager is not running"
-msgstr "NetworkManager ã¯å®Ÿè¡Œã•ã‚Œã¦ã„ã¾ã›ã‚“"
-
-#: panel-applet/NMWirelessApplet.c:345
-msgid "Scanning for wireless networks..."
-msgstr "ç„¡ç·šãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯ã‚’走査中..."
-
-#: panel-applet/NMWirelessApplet.c:667
-msgid "Other Wireless Networks..."
-msgstr "ä»–ã®ç„¡ç·šãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯..."
-
-#: panel-applet/NMWirelessApplet.c:688
-msgid "Create new Wireless Network..."
-msgstr "æ–°ã—ã„ç„¡ç·šãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯ã‚’作æˆ..."
-
-#: panel-applet/NMWirelessApplet.c:798
-msgid "No network devices have been found"
-msgstr "ãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯ãƒ‡ãƒã‚¤ã‚¹ãŒã¿ã¤ã‹ã‚Šã¾ã›ã‚“ã§ã—ãŸ"
-
-#: panel-applet/NMWirelessApplet.c:916
-msgid "NetworkManager is not running..."
-msgstr "NetworkManager ã¯å®Ÿè¡Œã•ã‚Œã¦ã„ã¾ã›ã‚“..."
-
-#: panel-applet/NMWirelessAppletOtherNetworkDialog.c:226
-msgid "Create new wireless network"
-msgstr "æ–°ã—ã„ç„¡ç·šãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯ã‚’作æˆ"
-
-#: panel-applet/NMWirelessAppletOtherNetworkDialog.c:227
-msgid ""
-"Enter the ESSID and security settings of the wireless network you wish to "
-"create."
-msgstr ""
-"作æˆã—ãŸã„ç„¡ç·šãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯ã® ESSID ã¨ã‚»ã‚­ãƒ¥ãƒªãƒ†ã‚£è¨­å®šã‚’入力ã—ã¦ä¸‹ã•ã„"
-
-#: panel-applet/NMWirelessAppletOtherNetworkDialog.c:232
-msgid "Custom wireless network"
-msgstr "カスタム無線ãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯"
-
-#: panel-applet/NMWirelessAppletOtherNetworkDialog.c:233
-msgid "Enter the ESSID of the wireless network to which you wish to connect."
-msgstr "接続ã—ãŸç„¡ç·šãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯ã® ESSID を入力ã—ã¦ä¸‹ã•ã„"
-
-#. Reuse the above string to make the translators less angry.
-#: panel-applet/NMWirelessAppletOtherNetworkDialog.c:314
-#: panel-applet/NMWirelessAppletOtherNetworkDialog.c:323
-msgid ""
-"The NetworkManager Applet could not find some required resources (the glade "
-"file was not found)."
-msgstr ""
-"NetworkManager アプレットã¯ã„ãã¤ã‹ã®å¿…è¦ãªãƒªã‚½ãƒ¼ã‚¹"
-"glade ファイル)ã‚’ã¿ã¤ã‘ã‚‹ã“ã¨ãŒã§ãã¾ã›ã‚“ã§ã—ãŸ"
-
-#: panel-applet/essid.glade.h:5
-msgid "C_onnect"
-msgstr "接続(_O)"
-
-#: panel-applet/essid.glade.h:6
-msgid "Connect with encryption enabled"
-msgstr "æš—å·åŒ–を有効ã«ã—ã¦æŽ¥ç¶š"
-
-#: panel-applet/essid.glade.h:9
-msgid "Wireless _adapter:"
-msgstr "無線アダプタ(_A):"
-
-#: panel-applet/essid.glade.h:10
-msgid "Wireless _Network:"
-msgstr "ç„¡ç·šãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯(_N):"
-
-#: panel-applet/menu-info.c:101
-#, c-format
-msgid "Wired Network (%s)"
-msgstr "ç„¡ç·šãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯ (%s)"
-
-#: panel-applet/menu-info.c:103
-msgid "Wired Network"
-msgstr "ç„¡ç·šãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯"
-
-#: panel-applet/menu-info.c:168
-#, c-format
-msgid "Wireless Network (%s)"
-msgid_plural "Wireless Networks (%s)"
-msgstr[0] "ç„¡ç·šãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯ (%s)"
-msgstr[1] "ç„¡ç·šãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯ (%s)"
-
-#: panel-applet/menu-info.c:170
-msgid "Wireless Network"
-msgid_plural "Wireless Networks"
-msgstr[0] "ç„¡ç·šãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯"
-msgstr[1] "ç„¡ç·šãƒãƒƒãƒˆãƒ¯ãƒ¼ã‚¯"
-
-#: panel-applet/menu-info.c:307
-msgid " (invalid Unicode)"
-msgstr " (ä¸æ­£ãª Unicode)"
-
-#: examples/python/systray/eggtrayicon.c:111
-msgid "Orientation"
-msgstr "å‘ã"
-
-#: examples/python/systray/eggtrayicon.c:112
-msgid "The orientation of the tray."
-msgstr "トレイã®å‘ã"
diff --git a/po/mk.po b/po/mk.po
deleted file mode 100644
index 30ac1d46d5..0000000000
--- a/po/mk.po
+++ /dev/null
@@ -1,219 +0,0 @@
-# translation of mk.po.
-# Copyright (C) 2005 THE mk.po'S COPYRIGHT HOLDER
-# This file is distributed under the same license as the mk.po package.
-# Ðрангел Ðнгов <ufo@linux.net.mk>, 2005.
-# , fuzzy
-# <>, 2005.
-# Ðрангел Ðнгов <ufo@linux.net.mk>, 2005.
-#
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: mk.po\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2005-01-16 11:26+0100\n"
-"PO-Revision-Date: 2005-01-16 13:51+0100\n"
-"Last-Translator: <>\n"
-"Language-Team: \n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: "
-
-#: info-daemon/networks.glade.h:1
-msgid "<span weight=\"bold\">Wireless Networks:</span>"
-msgstr "<span weight=\"bold\">Безжични мрежи:</span>"
-
-#: info-daemon/networks.glade.h:2
-msgid "Modify Wireless Networks"
-msgstr "Измени ги безжичните мрежи"
-
-#: info-daemon/passphrase.glade.h:1 panel-applet/essid.glade.h:1
-msgid "*"
-msgstr "*"
-
-#: info-daemon/passphrase.glade.h:2 panel-applet/essid.glade.h:2
-msgid ""
-"128-bit Passphrase (WEP)\n"
-"Ascii Key (WEP)\n"
-"Hex Key (WEP)"
-msgstr ""
-"128-bit Passphrase (WEP)\n"
-"Ascii Key (WEP)\n"
-"Hex Key (WEP)"
-
-#: info-daemon/passphrase.glade.h:6
-#, no-c-format
-msgid ""
-"<span weight=\"bold\" size=\"larger\">Passphrase Required by Wireless "
-"Network</span>\n"
-"\n"
-"A passphrase or encryption key is required to access the wireless network '%"
-"s'."
-msgstr ""
-"<span weight=\"bold\" size=\"larger\">Безжичната мрежа ја бара фразата за лозинката</span>\n"
-"\n"
-"Фразата за лозинката или клучот за кодирање Ñе потребни за приÑтап до безжичната мрежа '%"
-"s'."
-
-#: info-daemon/passphrase.glade.h:9 panel-applet/essid.glade.h:7
-msgid "Key Type:"
-msgstr "Тип на клуч:"
-
-#: info-daemon/passphrase.glade.h:10
-#: info-daemon/NetworkManagerInfoPassphraseDialog.c:139
-#: panel-applet/NMWirelessAppletOtherNetworkDialog.c:147
-#: panel-applet/essid.glade.h:8
-msgid "Passphrase:"
-msgstr "Фраза за лозинка:"
-
-#: info-daemon/passphrase.glade.h:11
-msgid "Wireless Network Key Required"
-msgstr "Потребен е клучот за безжичната мрежа"
-
-#: info-daemon/passphrase.glade.h:12
-msgid "_Login to Network"
-msgstr "_Ðајави Ñе на мрежа"
-
-#: info-daemon/NetworkManagerInfoPassphraseDialog.c:142
-#: panel-applet/NMWirelessAppletOtherNetworkDialog.c:150
-msgid "Ascii Key:"
-msgstr "Ascii клуч:"
-
-#: info-daemon/NetworkManagerInfoPassphraseDialog.c:145
-#: panel-applet/NMWirelessAppletOtherNetworkDialog.c:153
-msgid "Hex Key:"
-msgstr "Hex клуч:"
-
-#: info-daemon/NetworkManagerInfoVPN.c:157
-#, c-format
-msgid "You must log in to access the private network %s"
-msgstr "Морате да Ñе најавите за да приÑтапите на приватната мрежа %s"
-
-#: panel-applet/NMWirelessApplet.c:293
-msgid "No network connection"
-msgstr "Ðема мрежна врÑка"
-
-#: panel-applet/NMWirelessApplet.c:297
-msgid "Wired network connection"
-msgstr "Мрежна врÑка"
-
-#: panel-applet/NMWirelessApplet.c:303
-msgid "Connecting to a wired network..."
-msgstr "Се врзувам за мрежата..."
-
-#: panel-applet/NMWirelessApplet.c:311
-msgid "Connected to an Ad-Hoc wireless network"
-msgstr "Врзани Ñте на ад-хок безжична мрежа"
-
-#: panel-applet/NMWirelessApplet.c:325
-#, c-format
-msgid "Wireless network connection (%d%%)"
-msgstr "Безжична мрежна врÑка (%d%%)"
-
-#: panel-applet/NMWirelessApplet.c:329
-msgid "Wireless network connection"
-msgstr "Безжична мрежна врÑка"
-
-#: panel-applet/NMWirelessApplet.c:335
-msgid "Connecting to a wireless network..."
-msgstr "Се врзувам за безжична мрежа..."
-
-#: panel-applet/NMWirelessApplet.c:339
-msgid "NetworkManager is not running"
-msgstr "Менаџерот за мрежа не работи"
-
-#: panel-applet/NMWirelessApplet.c:345
-msgid "Scanning for wireless networks..."
-msgstr "Скенирам за безжични мрежи..."
-
-#: panel-applet/NMWirelessApplet.c:667
-msgid "Other Wireless Networks..."
-msgstr "Други безжични мрежи..."
-
-#: panel-applet/NMWirelessApplet.c:688
-msgid "Create new Wireless Network..."
-msgstr "Креирај нова безжична мрежа..."
-
-#: panel-applet/NMWirelessApplet.c:798
-msgid "No network devices have been found"
-msgstr "Ðе Ñе пронајдени мрежни уреди"
-
-#: panel-applet/NMWirelessApplet.c:916
-msgid "NetworkManager is not running..."
-msgstr "Менаџерот за мрежа работи..."
-
-#: panel-applet/NMWirelessAppletOtherNetworkDialog.c:226
-msgid "Create new wireless network"
-msgstr "Креирај нова безжична мрежа"
-
-#: panel-applet/NMWirelessAppletOtherNetworkDialog.c:227
-msgid ""
-"Enter the ESSID and security settings of the wireless network you wish to "
-"create."
-msgstr "ВнеÑете ESSID и безбедноÑни подеÑувања за безжичната мрежа што Ñакате да "
-"ја креирате."
-
-#: panel-applet/NMWirelessAppletOtherNetworkDialog.c:232
-msgid "Custom wireless network"
-msgstr "СопÑтвена безжична мрежа"
-
-#: panel-applet/NMWirelessAppletOtherNetworkDialog.c:233
-msgid "Enter the ESSID of the wireless network to which you wish to connect."
-msgstr "ВнеÑете ESSID на безжичната мрежа на која што Ñакате да Ñе врзете."
-
-#. Reuse the above string to make the translators less angry.
-#: panel-applet/NMWirelessAppletOtherNetworkDialog.c:314
-#: panel-applet/NMWirelessAppletOtherNetworkDialog.c:323
-msgid ""
-"The NetworkManager Applet could not find some required resources (the glade "
-"file was not found)."
-msgstr ""
-"Ðплетот за „Менаџерот за мрежа“ не може да најде некои од потребните реÑурÑи (не е "
-"пронајдена glade датотеката)."
-
-#: panel-applet/essid.glade.h:5
-msgid "C_onnect"
-msgstr "Ð’_рзи Ñе"
-
-#: panel-applet/essid.glade.h:6
-msgid "Connect with encryption enabled"
-msgstr "Врзување Ñо овозможено кодирање"
-
-#: panel-applet/essid.glade.h:9
-msgid "Wireless _adapter:"
-msgstr "Безжичен _адаптер:"
-
-#: panel-applet/essid.glade.h:10
-msgid "Wireless _Network:"
-msgstr "Безжична _мрежа:"
-
-#: panel-applet/menu-info.c:101
-#, c-format
-msgid "Wired Network (%s)"
-msgstr "Мрежа (%s)"
-
-#: panel-applet/menu-info.c:103
-msgid "Wired Network"
-msgstr "Мрежа"
-
-#: panel-applet/menu-info.c:168
-#, c-format
-msgid "Wireless Network (%s)"
-msgstr "Безжична мрежа (%s)"
-
-#: panel-applet/menu-info.c:170
-msgid "Wireless Network"
-msgstr "Безжична мрежа"
-
-#: panel-applet/menu-info.c:307
-msgid " (invalid Unicode)"
-msgstr " (невалиден јуникод)"
-
-#: examples/python/systray/eggtrayicon.c:111
-msgid "Orientation"
-msgstr "Ориентација"
-
-#: examples/python/systray/eggtrayicon.c:112
-msgid "The orientation of the tray."
-msgstr "Ориентација во меÑтото за ÑмеÑтување."
-
diff --git a/po/nb.po b/po/nb.po
deleted file mode 100644
index ade51b97af..0000000000
--- a/po/nb.po
+++ /dev/null
@@ -1,761 +0,0 @@
-# translation of NetworkManager to Norwegian Bokmal
-# This file is distributed under the same license as the NetworkManager package.
-# Copyright (C) 2004, 2005 Red Hat, Inc.
-# Kjartan Maraas <kmaraas@gnome.org>, 2004-2005.
-# Terance Edward Sola <terance@lyse.net>, 2005.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: NetworkManager 0.1.x\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2005-08-04 16:29+0200\n"
-"PO-Revision-Date: 2005-08-04 16:38+0200\n"
-"Last-Translator: Kjartan Maraas <kmaraas@gnome.org>\n"
-"Language-Team: Norwegian Bokmal <i18n-nb@lister.ping.uio.no>\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"Plural-Forms: nplurals=2; plural=(n != 1);\n"
-
-#. Setup a request to the keyring to save the network passphrase
-#: ../gnome/applet/applet-dbus-info.c:842
-#, c-format
-msgid "Passphrase for wireless network %s"
-msgstr "Passord for trådløst nettverk %s"
-
-#: ../gnome/applet/applet-dbus-info.c:1052
-#, c-format
-msgid ""
-"The requested wireless network '%s' does not appear to be in range. A "
-"different wireless network will be used if any are available."
-msgstr ""
-"Forespurt trådløst nettverk «%s» ser ut til å være utenfor rekkevidde. Et "
-"annet trådløst nettverk vil bli brukt hvis tilgjengelig."
-
-#: ../gnome/applet/applet-dbus.c:597
-#, c-format
-msgid "Connection to the wireless network '%s' failed.\n"
-msgstr "Tilkobling til trådløst nettverk «%s» feilet.\n"
-
-#: ../gnome/applet/applet-dbus.c:602
-msgid "Connection to the wired network failed.\n"
-msgstr "Tilkobling til trådløst nettverk feilet.\n"
-
-#: ../gnome/applet/applet.c:192
-msgid "Error displaying connection information: "
-msgstr "Feil under visning av tilkoblingsinformasjon:"
-
-#: ../gnome/applet/applet.c:217
-msgid "Could not find some required resources (the glade file)!"
-msgstr "Fant ikke nødvendige ressurser (glade-filen)."
-
-#: ../gnome/applet/applet.c:227
-msgid "No active connections!"
-msgstr "Ingen aktive tilkoblinger!"
-
-#: ../gnome/applet/applet.c:236
-msgid "Could not open socket!"
-msgstr "Kunne ikke åpne sokkel!"
-
-#: ../gnome/applet/applet.c:251
-msgid "Failed to get information about the interface!"
-msgstr "Fikk ikke informasjon om grensesnittet!"
-
-#: ../gnome/applet/applet.c:284
-#, c-format
-msgid "Wired Ethernet (%s)"
-msgstr "Kablet nettverk (%s)"
-
-#: ../gnome/applet/applet.c:286
-#, c-format
-msgid "Wireless Ethernet (%s)"
-msgstr "Trådløst nettverk (%s)"
-
-#: ../gnome/applet/applet.c:380 ../gnome/applet/applet.c:398
-msgid "NetworkManager Applet"
-msgstr "NetworkManager panelprogram"
-
-#: ../gnome/applet/applet.c:382 ../gnome/applet/applet.c:400
-msgid "Copyright (C) 2004-2005 Red Hat, Inc."
-msgstr "Opphavsrett © 2004-2005 Red Hat, Inc."
-
-#: ../gnome/applet/applet.c:383 ../gnome/applet/applet.c:401
-msgid ""
-"Notification area applet for managing your network devices and connections."
-msgstr "Et panelprogram for å håndtere nettverksenheter og tilkoblinger."
-
-#: ../gnome/applet/applet.c:486
-msgid "VPN Error"
-msgstr "Feil med VPN"
-
-#: ../gnome/applet/applet.c:490
-#, c-format
-msgid ""
-"<span weight=\"bold\" size=\"larger\">VPN Login Failure</span>\n"
-"\n"
-"Could not start the VPN connection '%s' due to a login failure.\n"
-"\n"
-"The VPN service said: \"%s\""
-msgstr ""
-"<span weight=\"bold\" size\"larger\">Feil med VPN-pålogging</span>\n"
-"\n"
-"Kunne ikke starte VPN-tilkobling «%s» på grunn av feil ved pålogging.\n"
-"\n"
-"Melding fra VPN-tjenesten: «%s»"
-
-#: ../gnome/applet/applet.c:495
-#, c-format
-msgid ""
-"<span weight=\"bold\" size=\"larger\">VPN Start Failure</span>\n"
-"\n"
-"Could not start the VPN connection '%s' due to a failure launching the VPN "
-"program.\n"
-"\n"
-"The VPN service said: \"%s\""
-msgstr ""
-"<span weight=\"bold\" size\"larger\">Feil med start av VPN</span>\n"
-"\n"
-"Kunne ikke starte VPN-tilkobling «%s» på grunn av feil ved oppstart av VPN-programmet.\n"
-"\n"
-"Melding fra VPN-tjenesten: «%s»"
-
-#: ../gnome/applet/applet.c:500
-#, c-format
-msgid ""
-"<span weight=\"bold\" size=\"larger\">VPN Connect Failure</span>\n"
-"\n"
-"Could not start the VPN connection '%s' due to a connection error.\n"
-"\n"
-"The VPN service said: \"%s\""
-msgstr ""
-"<span weight=\"bold\" size\"larger\">Feil med VPN-tilkobling</span>\n"
-"\n"
-"Kunne ikke starte VPN-tilkobling «%s» på grunn av feil ved tilkobling.\n"
-"\n"
-"Melding fra VPN-tjenesten: «%s»"
-
-#: ../gnome/applet/applet.c:505
-#, c-format
-msgid ""
-"<span weight=\"bold\" size=\"larger\">VPN Configuration Error</span>\n"
-"\n"
-"The VPN connection '%s' was not correctly configured.\n"
-"\n"
-"The VPN service said: \"%s\""
-msgstr ""
-"<span weight=\"bold\" size\"larger\">Feil med konfigurasjon av VPN</span>\n"
-"\n"
-"VPN-tilkobling «%s» er ikke korrekt konfigurert.\n"
-"\n"
-"Melding fra VPN-tjenesten: «%s»"
-
-#: ../gnome/applet/applet.c:510
-#, c-format
-msgid ""
-"<span weight=\"bold\" size=\"larger\">VPN Connect Failure</span>\n"
-"\n"
-"Could not start the VPN connection '%s' because the VPN server did not "
-"return an adequate network configuration.\n"
-"\n"
-"The VPN service said: \"%s\""
-msgstr ""
-"<span weight=\"bold\" size\"larger\">Feil med VPN-tilkobling</span>\n"
-"\n"
-"Kunne ikke starte VPN-tilkobling «%s» fordi VPN-tjeneren ikke returnerte riktig nettverkskonfigurasjon.\n"
-"\n"
-"Melding fra VPN-tjenesten: «%s»"
-
-#: ../gnome/applet/applet.c:577
-#, c-format
-msgid ""
-"<span weight=\"bold\" size=\"larger\">VPN Login Message</span>\n"
-"\n"
-"VPN connection '%s' said:\n"
-"\n"
-"\"%s\""
-msgstr ""
-"<span weight=\"bold\" size=\"larger\">PÃ¥loggingsmelding for VPN</span>\n"
-"\n"
-"Melding fra VPN-tilkobling: «%s»\n"
-"\n"
-"«%s»"
-
-#: ../gnome/applet/applet.c:795 ../gnome/applet/applet.c:2368
-#: ../gnome/applet/other-network-dialog.c:310
-#: ../gnome/applet/passphrase-dialog.c:397
-msgid ""
-"The NetworkManager Applet could not find some required resources (the glade "
-"file was not found)."
-msgstr ""
-"NetworkManager fant ikke nødvendige ressurser (glade-filen ble ikke funnet)."
-
-#: ../gnome/applet/applet.c:808
-#, c-format
-msgid "The network device \"%s (%s)\" does not support wireless scanning."
-msgstr "Nettverksenheten «%s (%s)» støtter ikke søk etter trådløse nettverk."
-
-#: ../gnome/applet/applet.c:815
-#, c-format
-msgid "The network device \"%s (%s)\" does not support link detection."
-msgstr ""
-"Nettverksenheten «%s (%s)» støtter ikke informasjon om tilkoblet status."
-
-#: ../gnome/applet/applet.c:936
-#, c-format
-msgid "Preparing device %s for the wired network..."
-msgstr "Klargjør enhet %s for det trådløse nettverket..."
-
-#: ../gnome/applet/applet.c:938
-#, c-format
-msgid "Preparing device %s for the wireless network '%s'..."
-msgstr "Klargjør enhet %s for trådløst nettverk «%s»..."
-
-#: ../gnome/applet/applet.c:945
-#, c-format
-msgid "Configuring device %s for the wired network..."
-msgstr "Konfigurerer enhet %s for kablet nettverk..."
-
-#: ../gnome/applet/applet.c:947
-#, c-format
-msgid "Attempting to join the wireless network '%s'..."
-msgstr "Forsøker å bruke trådløst nettverk «%s»..."
-
-#: ../gnome/applet/applet.c:954
-#, c-format
-msgid "Waiting for Network Key for the wireless network '%s'..."
-msgstr "Venter på nettverksnøkkel for trådløst nettverk «%s»..."
-
-#: ../gnome/applet/applet.c:961 ../gnome/applet/applet.c:970
-msgid "Requesting a network address from the wired network..."
-msgstr "Ber om en nettverksadresse fra kablet nettverk..."
-
-#: ../gnome/applet/applet.c:963 ../gnome/applet/applet.c:972
-#, c-format
-msgid "Requesting a network address from the wireless network '%s'..."
-msgstr "Ber om en nettverksadresse fra trådløst nettverk «%s»..."
-
-#: ../gnome/applet/applet.c:979
-msgid "Finishing connection to the wired network..."
-msgstr "Fullfører tilkobling til kablet nettverk..."
-
-#: ../gnome/applet/applet.c:981
-#, c-format
-msgid "Finishing connection to the wireless network '%s'..."
-msgstr "Fullfører tilkobling til trådløst nettverk «%s»..."
-
-#: ../gnome/applet/applet.c:1027
-msgid "NetworkManager is not running"
-msgstr "NetworkManager kjører ikke"
-
-#: ../gnome/applet/applet.c:1038
-msgid "No network connection"
-msgstr "Ingen nettverksforbindelse"
-
-#: ../gnome/applet/applet.c:1045
-msgid "Wired network connection"
-msgstr "Trådløs nettverkforbindelse"
-
-#: ../gnome/applet/applet.c:1052
-msgid "Connected to an Ad-Hoc wireless network"
-msgstr "Kobler til et Ad-Hoc trådløst nettverk"
-
-#: ../gnome/applet/applet.c:1066
-#, c-format
-msgid "Wireless network connection to '%s' (%d%%)"
-msgstr "Trådløs nettverksforbindelse til «%s» (%d%%)"
-
-#: ../gnome/applet/applet.c:1091
-#, c-format
-msgid "VPN connection to '%s'"
-msgstr "VPN-tilkobling til «%s»"
-
-#: ../gnome/applet/applet.c:1520
-msgid "_Connect to Other Wireless Network..."
-msgstr "_Koble til annet trådløst nettverk..."
-
-#: ../gnome/applet/applet.c:1541
-msgid "Create _New Wireless Network..."
-msgstr "Opprett _nytt trådløst nettverk..."
-
-#: ../gnome/applet/applet.c:1654
-#: ../gnome/vpn-properties/nm-vpn-properties.glade.h:17
-msgid "VPN Connections"
-msgstr "VPN-tilkoblinger"
-
-#: ../gnome/applet/applet.c:1681
-msgid "Configure VPN..."
-msgstr "Konfigurer VPN..."
-
-#: ../gnome/applet/applet.c:1685
-msgid "Disconnect VPN..."
-msgstr "Koble fra VPN..."
-
-#: ../gnome/applet/applet.c:1735
-msgid "No network devices have been found"
-msgstr "Ingen nettverksenheter ble funnet"
-
-#: ../gnome/applet/applet.c:1893
-msgid "NetworkManager is not running..."
-msgstr "NetworkManager kjører ikke..."
-
-#: ../gnome/applet/applet.c:1961
-msgid "_Stop All Wireless Devices"
-msgstr "_Stopp alle trådløse enheter"
-
-#: ../gnome/applet/applet.c:1966
-msgid "_Start All Wireless Devices"
-msgstr "S_tart alle trådløse enheter"
-
-#: ../gnome/applet/applet.c:1997
-msgid "_Wireless Network Discovery"
-msgstr "Sø_k etter trådløse nettverk"
-
-#: ../gnome/applet/applet.c:2000
-msgid "Always Search"
-msgstr "Alltid søk"
-
-#: ../gnome/applet/applet.c:2008
-msgid "Search Only When Disconnected"
-msgstr "Søk kun når frakoblet"
-
-#: ../gnome/applet/applet.c:2016
-msgid "Never Search"
-msgstr "Aldri søk"
-
-#. Stop All Wireless Devices item
-#: ../gnome/applet/applet.c:2028
-msgid "Stop All Wireless Devices"
-msgstr "Stopp alle trådløse enheter"
-
-#: ../gnome/applet/applet.c:2034
-msgid "Connection _Information"
-msgstr "Tilkoblings_informasjon"
-
-#: ../gnome/applet/applet.c:2042
-msgid "_Help"
-msgstr "_Hjelp"
-
-#: ../gnome/applet/applet.c:2049
-msgid "_About"
-msgstr "_Om"
-
-#: ../gnome/applet/applet.c:2518
-msgid ""
-"The NetworkManager applet could not find some required resources. It cannot "
-"continue.\n"
-msgstr ""
-"Panelprogrammet for NetworkManager fant ikke noen av de nødvendige "
-"ressursene. Det kan ikke fortsette.\n"
-
-#: ../gnome/applet/eggtrayicon.c:118
-msgid "Orientation"
-msgstr "Orientering"
-
-#: ../gnome/applet/eggtrayicon.c:119
-msgid "The orientation of the tray."
-msgstr "Orientering for trauet."
-
-#: ../gnome/applet/menu-items.c:89
-#, c-format
-msgid "Wired Network (%s)"
-msgstr "Kablet nettverk (%s)"
-
-#: ../gnome/applet/menu-items.c:92
-msgid "_Wired Network"
-msgstr "_Kablet nettverk"
-
-#: ../gnome/applet/menu-items.c:165
-#, c-format
-msgid "Wireless Network (%s)"
-msgid_plural "Wireless Networks (%s)"
-msgstr[0] "Trådløst nettverk (%s)"
-msgstr[1] "Trådløse nettverk (%s)"
-
-#: ../gnome/applet/menu-items.c:167
-msgid "Wireless Network"
-msgid_plural "Wireless Networks"
-msgstr[0] "Trådløst nettverk"
-msgstr[1] "Trådløse nettverk"
-
-#: ../gnome/applet/menu-items.c:309
-msgid " (invalid Unicode)"
-msgstr " (ugyldig Unicode)"
-
-#: ../gnome/applet/other-network-dialog.c:142
-#: ../gnome/applet/passphrase-dialog.c:156
-#: ../gnome/applet/wireless-applet.glade.h:34
-msgid "Passphrase:"
-msgstr "Passord:"
-
-#: ../gnome/applet/other-network-dialog.c:145
-#: ../gnome/applet/passphrase-dialog.c:159
-msgid "ASCII Key:"
-msgstr "ASCII-nøkkel:"
-
-#: ../gnome/applet/other-network-dialog.c:148
-#: ../gnome/applet/passphrase-dialog.c:162
-msgid "Hex Key:"
-msgstr "Heksadesimal nøkkel:"
-
-#: ../gnome/applet/other-network-dialog.c:224
-msgid "Create new wireless network"
-msgstr "Opprett nytt trådløst nettverk"
-
-#: ../gnome/applet/other-network-dialog.c:225
-msgid ""
-"Enter the ESSID and security settings of the wireless network you wish to "
-"create."
-msgstr ""
-"Oppgi ESSID og sikkerhetsinnstillinger for det trådløse nettverket du ønsker "
-"Ã¥ opprette."
-
-#: ../gnome/applet/other-network-dialog.c:230
-msgid "Custom wireless network"
-msgstr "Egedefinert trådløst nettverk"
-
-#: ../gnome/applet/other-network-dialog.c:231
-msgid "Enter the ESSID of the wireless network to which you wish to connect."
-msgstr "Oppgi ESSID for det trådløse nettverket du ønsker å koble deg til."
-
-#: ../gnome/applet/vpn-password-dialog.c:152
-#: ../gnome/applet/vpn-password-dialog.c:191
-#, c-format
-msgid "Cannot start VPN connection '%s'"
-msgstr "Kan ikke starte VPN-tilkobling «%s»"
-
-#: ../gnome/applet/vpn-password-dialog.c:155
-#, c-format
-msgid ""
-"Could not find the authentication dialog for VPN connection type '%s'. "
-"Contact your system administrator."
-msgstr ""
-"Fant ikke autentiseringsdialogen for VPN tilkoblingstypen «%s». Kontakt din "
-"systemadministrator."
-
-#: ../gnome/applet/vpn-password-dialog.c:194
-#, c-format
-msgid ""
-"There was a problem launching the authentication dialog for VPN connection "
-"type '%s'. Contact your system administrator."
-msgstr ""
-"Det oppstod en feil under oppstart av autentiseringsdialogen for VPN "
-"tilkoblingstypen «%s». Kontakt din systemadministrator."
-
-#: ../gnome/applet/wireless-applet.glade.h:1
-msgid " "
-msgstr " "
-
-#: ../gnome/applet/wireless-applet.glade.h:2
-msgid ""
-"128-bit Passphrase (WEP)\n"
-"ASCII Key (WEP)\n"
-"Hex Key (WEP)"
-msgstr ""
-"128-bit passord (WEP)\n"
-"ASCII-nøkkel (WEP)\n"
-"Heksadesimal nøkkel (WEP)"
-
-#: ../gnome/applet/wireless-applet.glade.h:5
-msgid ""
-"128-bit passphrase (WEP)\n"
-"ASCII key (WEP)\n"
-"Hex key (WEP)"
-msgstr ""
-"128-bit passord (WEP)\n"
-"ASCII-nøkkel (WEP)\n"
-"Heksadesimal nøkkel (WEP)"
-
-#: ../gnome/applet/wireless-applet.glade.h:8
-msgid ""
-"<span weight=\"bold\" size=\"larger\">Active Connection Information</span>"
-msgstr "<span weight=\"bold\" size=\"larger\">Informasjon om aktiv tilkobling</span>"
-
-#: ../gnome/applet/wireless-applet.glade.h:10
-#, no-c-format
-msgid ""
-"<span weight=\"bold\" size=\"larger\">Passphrase Required by Wireless "
-"Network</span>\n"
-"\n"
-"A passphrase or encryption key is required to access the wireless network '%"
-"s'."
-msgstr ""
-"<span weight=\"bold\" size=\"larger\">Passord kreves for trådløst nettverk</"
-"span>\n"
-"\n"
-"Ett passord eller en krypteringsnøkkel kreves for å aksessere trådløst "
-"nettverk «%s»."
-
-#: ../gnome/applet/wireless-applet.glade.h:14
-#, no-c-format
-msgid ""
-"<span weight=\"bold\" size=\"larger\">Reduced Network Functionality</span>\n"
-"\n"
-"%s It will not be completely functional."
-msgstr ""
-"<span weight=\"bold\" size=\"larger\">Redusert nettverksfunksjonalitet</"
-"span>\n"
-"\n"
-"%s Ikke fullstendig funksjonell."
-
-#: ../gnome/applet/wireless-applet.glade.h:18
-#, no-c-format
-msgid ""
-"<span weight=\"bold\" size=\"larger\">Wireless Network Login Confirmation</"
-"span>\n"
-"\n"
-"You have chosen to log in to the wireless network '%s'. If you are sure "
-"that this wireless network is secure, click the checkbox below and "
-"NetworkManager will not require confirmation on subsequent log ins."
-msgstr ""
-"<span weight=\"bold\" size=\"larger\">Bekreftelse av pålogging på trådløst "
-"nettverk</span>\n"
-"\n"
-"Du har valgt å logge inn på trådløst nettverk «%s». Hvis du er sikker på at "
-"dette trådløse nettverket er sikkert kan du be NetworkManager om å slutte å "
-"spørre spørsmål når du kobler deg til det ved å krysse av i boksen nedenfor."
-
-#: ../gnome/applet/wireless-applet.glade.h:21
-msgid "Always Trust this Wireless Network"
-msgstr "Stol alltid på dette trådløse nettverket"
-
-#: ../gnome/applet/wireless-applet.glade.h:22
-msgid "Broadcast Address:"
-msgstr "Kringkastingsadresse:"
-
-#: ../gnome/applet/wireless-applet.glade.h:23
-msgid "C_onnect"
-msgstr "K_oble til"
-
-#: ../gnome/applet/wireless-applet.glade.h:24
-msgid "Connect with encryption enabled"
-msgstr "Koble til med kryptering"
-
-#: ../gnome/applet/wireless-applet.glade.h:25
-msgid "Connection Information"
-msgstr "Tilkoblingsinformasjon"
-
-#: ../gnome/applet/wireless-applet.glade.h:26
-msgid "Destination Address:"
-msgstr "MÃ¥ladresse:"
-
-#: ../gnome/applet/wireless-applet.glade.h:27
-msgid "Don't remind me again"
-msgstr "Ikke vis påminnelse igjen"
-
-#: ../gnome/applet/wireless-applet.glade.h:28
-msgid "Hardware Address:"
-msgstr "Maskinvareadresse:"
-
-#: ../gnome/applet/wireless-applet.glade.h:29
-msgid "IP Address:"
-msgstr "IP adresse:"
-
-#: ../gnome/applet/wireless-applet.glade.h:30
-msgid "Interface:"
-msgstr "Grensesnitt:"
-
-#: ../gnome/applet/wireless-applet.glade.h:31
-msgid "Key Type:"
-msgstr "Type nøkkel:"
-
-#: ../gnome/applet/wireless-applet.glade.h:32
-msgid "Key type:"
-msgstr "Type nøkkel:"
-
-#: ../gnome/applet/wireless-applet.glade.h:33
-msgid "Other Wireless Network..."
-msgstr "Annet trådløst nettverk..."
-
-#: ../gnome/applet/wireless-applet.glade.h:35
-msgid "Subnet Mask:"
-msgstr "Subnettmaske:"
-
-#: ../gnome/applet/wireless-applet.glade.h:36
-msgid "Wireless Network Key Required"
-msgstr "Nøkkel for trådløst nettverk kreves"
-
-#: ../gnome/applet/wireless-applet.glade.h:37
-msgid "Wireless _adapter:"
-msgstr "Trådløst _kort:"
-
-#: ../gnome/applet/wireless-applet.glade.h:38
-msgid "Wireless _network:"
-msgstr "Trådløst _nettverk:"
-
-#: ../gnome/applet/wireless-applet.glade.h:39
-msgid "_Login to Network"
-msgstr "_Logg på nettverk"
-
-#: ../gnome/applet/wireless-applet.glade.h:40
-msgid "_OK"
-msgstr "_OK"
-
-#: ../gnome/vpn-properties/nm-vpn-properties.c:374
-msgid "Cannot add VPN connection"
-msgstr "Kan ikke legge til VPN-tilkobling"
-
-#: ../gnome/vpn-properties/nm-vpn-properties.c:376
-msgid ""
-"No suitable VPN software was found on your system. Contact your system "
-"administrator."
-msgstr ""
-"Ingen passende VPN-programvare ble funnet på systemet. Kontakt din "
-"systemadministrator."
-
-#: ../gnome/vpn-properties/nm-vpn-properties.c:428
-msgid "Cannot import VPN connection"
-msgstr "Kan ikke importere VPN-tilkobling"
-
-#: ../gnome/vpn-properties/nm-vpn-properties.c:430
-#, c-format
-msgid ""
-"Cannot find suitable software for VPN connection type '%s' to import the "
-"file '%s'. Contact your system administrator."
-msgstr "Kan ikke finne passende programvare for VPN-tilkobling av type «%s» for import av fil «%s». Kontakt din sysstemadministrator."
-
-#: ../gnome/vpn-properties/nm-vpn-properties.c:570
-#, c-format
-msgid "Error retrieving VPN connection '%s'"
-msgstr "Feil under henting av VPN tilkobling «%s»"
-
-#: ../gnome/vpn-properties/nm-vpn-properties.c:573
-#, c-format
-msgid ""
-"Could not find the UI files for VPN connection type '%s'. Contact your "
-"system administrator."
-msgstr "Kunne ikke finne brukergrensesnittfiler for VPN-tilkobling type «%s». Kontakt din systemadministrator."
-
-#: ../gnome/vpn-properties/nm-vpn-properties.c:733
-#, c-format
-msgid "Delete VPN connection \"%s\"?"
-msgstr "Slett VPN-tilkobling «%s»?"
-
-#: ../gnome/vpn-properties/nm-vpn-properties.c:736
-#, c-format
-msgid ""
-"All information about the VPN connection \"%s\" will be lost and you may "
-"need your system administrator to provide information to create a new "
-"connection."
-msgstr "All informasjon om VPN-tilkobling «%s» vil gå tapt og du vil kanskje trenge hjelp fra din systemadministrator for å opprette en ny tilkobling."
-
-#: ../gnome/vpn-properties/nm-vpn-properties.c:951
-msgid "Unable to load"
-msgstr "Kunne ikke laste"
-
-#: ../gnome/vpn-properties/nm-vpn-properties.c:953
-msgid "Cannot find some needed resources (the glade file)!"
-msgstr "Fant ikke nødvendige ressurser (glade-filen)."
-
-#. Edit dialog
-#: ../gnome/vpn-properties/nm-vpn-properties.c:1071
-msgid "Edit VPN Connection"
-msgstr "Rediger VPN-tilkobling"
-
-#: ../gnome/vpn-properties/nm-vpn-properties.glade.h:1
-msgid "Add a new VPN connection"
-msgstr "Legg til en ny VPN-tilkobling"
-
-#: ../gnome/vpn-properties/nm-vpn-properties.glade.h:2
-msgid "Connect to:"
-msgstr "Koble til:"
-
-#: ../gnome/vpn-properties/nm-vpn-properties.glade.h:3
-msgid "Create VPN Connection"
-msgstr "Opprett VPN-tilkobling"
-
-#: ../gnome/vpn-properties/nm-vpn-properties.glade.h:4
-msgid "Create VPN Connection - 1 of 2"
-msgstr "Opprett VPN-tilkobling - 1 av 2"
-
-#: ../gnome/vpn-properties/nm-vpn-properties.glade.h:5
-msgid "Create VPN Connection - 2 of 2"
-msgstr "Opprett VPN-tilkobling - 2 av 2"
-
-#: ../gnome/vpn-properties/nm-vpn-properties.glade.h:6
-msgid "Delete the selected VPN connection"
-msgstr "Slett valgt VPN-tilkobling"
-
-#: ../gnome/vpn-properties/nm-vpn-properties.glade.h:7
-msgid ""
-"Dependent on the private network you want to connect to, you need to select "
-"what type of connection you want to create."
-msgstr ""
-"Du må velge hvilken type tilkobling du vil opprette avhengig av det private "
-"nettverket du vil koble til."
-
-#: ../gnome/vpn-properties/nm-vpn-properties.glade.h:8
-msgid "E_xport"
-msgstr "E_ksporter"
-
-#: ../gnome/vpn-properties/nm-vpn-properties.glade.h:9
-msgid "Edit the selected VPN connection"
-msgstr "Rediger valgt VPN-tilkobling"
-
-#: ../gnome/vpn-properties/nm-vpn-properties.glade.h:10
-msgid "Export VPN connection to a file"
-msgstr "Eksporter VPN-tilkobling til en fil"
-
-#: ../gnome/vpn-properties/nm-vpn-properties.glade.h:11
-msgid "Export the VPN settings to a file"
-msgstr "Eksporter innstillinger for VPN til en fil"
-
-#: ../gnome/vpn-properties/nm-vpn-properties.glade.h:12
-msgid "Finish create VPN Connection"
-msgstr "Fullfør oppretting av VPN-tilkobling"
-
-#: ../gnome/vpn-properties/nm-vpn-properties.glade.h:13
-msgid "Manage Virtual Private Network connections"
-msgstr "HÃ¥ndter tilkoblinger til Virtuelle Private Nettverk"
-
-#: ../gnome/vpn-properties/nm-vpn-properties.glade.h:14
-msgid ""
-"This assistant will guide you through the creation of a new VPN connection "
-"to a private network.\n"
-"\n"
-"It will require some information, such as IP addresses and secrets, that "
-"will probably be provided by your system administrator as appropriate."
-msgstr ""
-"Denne assistenten vil hjelpe deg gjennom oppretting av en ny VPN-tilkobling.\n"
-"\n"
-"Du vil trenge en del informasjon slik som IP-adresse og passord. Du vil sannsynligvis kunne få denne informasjonen fra din systemadministrator."
-
-#: ../src/nm-netlink-monitor.c:159
-#, c-format
-msgid ""
-"unable to create netlink socket for monitoring wired ethernet devices - %s"
-msgstr ""
-"kan ikke opprette netlink-plugg for overvåking av kablede ethernet-enheter - "
-"%s"
-
-#: ../src/nm-netlink-monitor.c:177
-#, c-format
-msgid ""
-"unable to bind to netlink socket for monitoring wired ethernet devices - %s"
-msgstr ""
-"kan ikke binde til netlink-plugg for overvåking av kablede ethernet-enheter "
-"- %s"
-
-#: ../src/nm-netlink-monitor.c:408
-msgid "operation took too long"
-msgstr "operasjonen tok for lang tid"
-
-#: ../src/nm-netlink-monitor.c:505
-msgid "received data from wrong type of sender"
-msgstr "mottok data fra feil type avsender"
-
-#: ../src/nm-netlink-monitor.c:518
-msgid "received data from unexpected sender"
-msgstr "mottok data fra uventet avsender"
-
-#: ../src/nm-netlink-monitor.c:540
-#, c-format
-msgid "%s"
-msgstr "%s"
-
-#: ../src/nm-netlink-monitor.c:649
-msgid "too much data was sent over socket and some of it was lost"
-msgstr "for mye data ble sendt over pluggen og noe data gikk tapt"
-
-#: ../src/nm-netlink-monitor.c:738
-msgid "error occurred while waiting for data on socket"
-msgstr "det skjedde en feil under venting på data på sokkel"
diff --git a/po/ne.po b/po/ne.po
deleted file mode 100644
index 6880c6f6a5..0000000000
--- a/po/ne.po
+++ /dev/null
@@ -1,397 +0,0 @@
-# translation of NetworkManager.HEAD.po to Nepali
-# This file is distributed under the same license as the PACKAGE package.
-# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER.
-# Jyotsna Shrestha <jyoshrestha@hotmail.com>, 2005.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: NetworkManager.HEAD\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2005-05-14 14:36+0545\n"
-"PO-Revision-Date: 2005-04-11 10:13+0000\n"
-"Last-Translator: Jyotsna Shrestha <jyoshrestha@hotmail.com>\n"
-"Language-Team: Nepali <info@mpp.org.np>\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"Plural-Forms: nplurals=2; plural=n!=0;\n"
-"X-Generator: KBabel 1.9.1\n"
-
-#: info-daemon/networks.glade.h:1
-msgid "<span weight=\"bold\">Wireless Networks:</span>"
-msgstr "<span weight=\"bold\">ताररहित संजाल:</span>"
-
-#: info-daemon/networks.glade.h:2
-msgid "Modify Wireless Networks"
-msgstr "ताररहित संजाल सà¥à¤§à¤¾à¤°à¤¨à¥à¤¹à¥‹à¤²à¤¾"
-
-#: info-daemon/passphrase.glade.h:1 panel-applet/wireless-applet.glade.h:2
-msgid "*"
-msgstr "*"
-
-#: info-daemon/passphrase.glade.h:2
-msgid ""
-"128-bit Passphrase (WEP)\n"
-"Ascii Key (WEP)\n"
-"Hex Key (WEP)"
-msgstr ""
-"१२८-विट गà¥à¤œà¤°à¤¿à¤à¤•à¥‹à¤µà¤¾à¤•à¥à¤¯ (डबà¥à¤²à¥ ई पि)\n"
-"à¤à¤à¤¸à¤¸à¤¿à¤†à¤‡à¤†à¤‡ कà¥à¤¨à¥à¤œ (डबà¥à¤²à¥ ई पि)\n"
-"हेकà¥à¤¸ कà¥à¤¨à¥à¤œ (डबà¥à¤²à¥ ई पि)"
-
-#: info-daemon/passphrase.glade.h:6
-#, no-c-format
-msgid ""
-"<span weight=\"bold\" size=\"larger\">Passphrase Required by Wireless "
-"Network</span>\n"
-"\n"
-"A passphrase or encryption key is required to access the wireless network '%"
-"s'."
-msgstr ""
-"<span weight=\"bold\" size=\"larger\">गà¥à¤œà¤°à¤¿à¤à¤•à¥‹à¤µà¤¾à¤•à¥à¤¯ चाहियो ताररहित संजाल</span> "
-"बाट\n"
-"\n"
-"गà¥à¤œà¤°à¤¿à¤à¤•à¥‹à¤µà¤¾à¤•à¥à¤¯ र गà¥à¤ªà¥à¤¤à¤¿à¤•à¤°à¤£ कà¥à¤¨à¥à¤œ ताररहित संजाल '%s' पà¥à¤°à¤µà¥‡à¤¶à¤•à¥‹ लागी चाहिनà¥à¤›à¥¤"
-
-#: info-daemon/passphrase.glade.h:9
-msgid "Key Type:"
-msgstr "कà¥à¤¨à¥à¤œ पà¥à¤°à¤•à¤¾à¤°:"
-
-#: info-daemon/passphrase.glade.h:10
-#: info-daemon/NetworkManagerInfoPassphraseDialog.c:140
-#: panel-applet/NMWirelessAppletOtherNetworkDialog.c:150
-#: panel-applet/essid.glade.h:7 panel-applet/wireless-applet.glade.h:19
-msgid "Passphrase:"
-msgstr "गà¥à¤œà¥à¤°à¤¿à¤à¤•à¥‹à¤µà¤¾à¤•à¥à¤¯:"
-
-#: info-daemon/passphrase.glade.h:11
-msgid "Wireless Network Key Required"
-msgstr "ताररहित सञà¥à¤œà¤¾à¤² कà¥à¤¨à¥à¤œ चाहियो"
-
-#: info-daemon/passphrase.glade.h:12 panel-applet/wireless-applet.glade.h:22
-msgid "_Login to Network"
-msgstr "सञà¥à¤œà¤¾à¤²à¤®à¤¾ लगइन गरà¥à¤¨à¥à¤¹à¥‹à¤²à¤¾"
-
-#: info-daemon/NetworkManagerInfoPassphraseDialog.c:143
-#: panel-applet/NMWirelessAppletOtherNetworkDialog.c:153
-msgid "Ascii Key:"
-msgstr "à¤à¤à¤¸à¤¸à¤¿à¤†à¤‡à¤†à¤‡ कà¥à¤¨à¥à¤œ:"
-
-#: info-daemon/NetworkManagerInfoPassphraseDialog.c:146
-#: panel-applet/NMWirelessAppletOtherNetworkDialog.c:156
-msgid "Hex Key:"
-msgstr "हेकà¥à¤¸ कà¥à¤¨à¥à¤œ:"
-
-#: info-daemon/NetworkManagerInfoVPN.c:158
-#, c-format
-msgid "You must log in to access the private network %s"
-msgstr "तपाईले निजि संजाल %s मा पà¥à¤°à¤µà¥‡à¤¶à¤•à¥‹ लागी लगइन गरà¥à¤¨à¥à¤ªà¤°à¥à¤›à¥¤"
-
-#: panel-applet/NMWirelessApplet.c:151 panel-applet/NMWirelessApplet.c:169
-msgid "NetworkManager Applet"
-msgstr "संजालपà¥à¤°à¤¬à¤¨à¥à¤§à¤• à¤à¤ªà¥à¤²à¥‡à¤Ÿ"
-
-#: panel-applet/NMWirelessApplet.c:153 panel-applet/NMWirelessApplet.c:171
-msgid "Copyright (C) 2004-2005 Red Hat, Inc."
-msgstr "सरà¥à¤µà¤¾à¤§à¤¿à¤•à¤¾à¤° (C) २००४-२००५ रेड हà¥à¤¯à¤¾à¤Ÿ, आइà¤à¤¨à¤¸à¤¿à¥¤"
-
-#: panel-applet/NMWirelessApplet.c:154 panel-applet/NMWirelessApplet.c:172
-msgid ""
-"Notification area applet for managing your network devices and connections."
-msgstr "तपाईको संजाल यनà¥à¤¤à¥à¤°à¤¹à¤°à¥‚ र जडानहरू पà¥à¤°à¤¬à¤¨à¥à¤§à¤•à¥‹ लागी चेतावनी कà¥à¤·à¥‡à¤¤à¥à¤° à¤à¤ªà¤ªà¥à¤²à¥‡à¤Ÿ"
-
-#: panel-applet/NMWirelessApplet.c:232
-#, c-format
-msgid ""
-"<span weight=\"bold\" size=\"larger\">VPN Login Failure</span>\n"
-"\n"
-"Could not start the VPN connection '%s' due to a login failure.\n"
-"\n"
-"The VPN service said: \"%s\""
-msgstr ""
-
-#: panel-applet/NMWirelessApplet.c:288
-#, c-format
-msgid ""
-"<span weight=\"bold\" size=\"larger\">VPN Login Message</span>\n"
-"\n"
-"VPN connection '%s' said:\n"
-"\n"
-"\"%s\""
-msgstr ""
-
-#: panel-applet/NMWirelessApplet.c:499 panel-applet/NMWirelessApplet.c:1772
-#: panel-applet/NMWirelessAppletOtherNetworkDialog.c:319
-msgid ""
-"The NetworkManager Applet could not find some required resources (the glade "
-"file was not found)."
-msgstr "संजालपà¥à¤°à¤¬à¤¨à¥à¤§à¤• à¤à¤ªà¤ªà¥à¤²à¥‡à¤Ÿà¤²à¥‡ केहि आवशà¥à¤¯à¤• सà¥à¤°à¥‹à¤¤à¤¹à¤°à¥‚ फेला पारà¥à¤¨à¤¸à¤•à¥‡à¤¨ (गà¥à¤²à¥‡à¤¡ फाइल फेला परेन)।"
-
-#: panel-applet/NMWirelessApplet.c:510
-#, c-format
-msgid "The network device \"%s (%s)\" does not support wireless scanning."
-msgstr "संजाल साधन \"%s (%s)\" ले ताररहित सà¥à¤•à¥à¤¯à¤¾à¤¨à¤¿à¤™à¤²à¤¾à¤ˆ समरà¥à¤¥à¤¨ गरेन।"
-
-#: panel-applet/NMWirelessApplet.c:518
-#, c-format
-msgid "The network device \"%s (%s)\" does not support link detection."
-msgstr "संजाल साधन \"%s (%s)\" ले समà¥à¤ªà¤°à¥à¤• अनà¥à¤¸à¤¨à¥à¤§à¤¾à¤¨ समरà¥à¤¥à¤¨ गरेन।"
-
-#: panel-applet/NMWirelessApplet.c:762
-msgid "No network connection"
-msgstr "संजाल जडान छैन"
-
-#: panel-applet/NMWirelessApplet.c:767
-msgid "Wired network connection"
-msgstr "तारसहित संजाल जडान"
-
-#: panel-applet/NMWirelessApplet.c:772
-msgid "Connecting to a wired network..."
-msgstr "तारसहित संजालमा समà¥à¤ªà¤°à¥à¤• गरिदै..."
-
-#: panel-applet/NMWirelessApplet.c:781
-msgid "Connected to an Ad-Hoc wireless network"
-msgstr "à¤à¤¡-à¤à¤šà¤“सि ताररहित संजालमा समà¥à¤ªà¤°à¥à¤• सà¥à¤¥à¤¾à¤ªà¤¨à¤¾ गरियो।"
-
-#: panel-applet/NMWirelessApplet.c:795
-#, c-format
-msgid "Wireless network connection to '%s' (%d%%)"
-msgstr "'%s' (%d%%) मा ताररहित संजाल समà¥à¤ªà¤°à¥à¤•"
-
-#: panel-applet/NMWirelessApplet.c:800
-msgid "Wireless network connection"
-msgstr "ताररहित संजाल समà¥à¤ªà¤°à¥à¤•"
-
-#: panel-applet/NMWirelessApplet.c:805
-#, c-format
-msgid "Connecting to wireless network '%s'..."
-msgstr "ताररहित संजाल '%s' समà¥à¤ªà¤°à¥à¤• गरिदै..."
-
-#: panel-applet/NMWirelessApplet.c:811
-msgid "NetworkManager is not running"
-msgstr "संजालपà¥à¤°à¤¬à¤¨à¥à¤§à¤• संचालन भईराखेको छैन।"
-
-#: panel-applet/NMWirelessApplet.c:816
-msgid "Scanning for wireless networks..."
-msgstr "ताररहित संजालको लागी सà¥à¤•à¥à¤¯à¤¾à¤¨à¤¿à¤™ गरिदै॰॰॰"
-
-#: panel-applet/NMWirelessApplet.c:1230
-msgid "Other Wireless Networks..."
-msgstr "अनà¥à¤¯ ताररहित संजालहरू॰॰॰"
-
-#: panel-applet/NMWirelessApplet.c:1251
-msgid "Create new Wireless Network..."
-msgstr "नयाठताररहित सञà¥à¤œà¤¾à¤² सृजना॰॰॰"
-
-#: panel-applet/NMWirelessApplet.c:1325
-#, fuzzy
-msgid "VPN Connections"
-msgstr "संजाल जडान छैन"
-
-#: panel-applet/NMWirelessApplet.c:1347
-msgid "Disconnect VPN..."
-msgstr ""
-
-#: panel-applet/NMWirelessApplet.c:1376
-msgid "No network devices have been found"
-msgstr "संजाल साधन फेला परेको छैन।"
-
-#: panel-applet/NMWirelessApplet.c:1534
-msgid "NetworkManager is not running..."
-msgstr "संजालपà¥à¤°à¤¬à¤¨à¥à¤§à¤• संचालन भईराखेको छैन॰॰॰"
-
-#: panel-applet/NMWirelessApplet.c:1604 panel-applet/NMWirelessApplet.c:1652
-msgid "Pause Wireless Scanning"
-msgstr "ताररहित सà¥à¤•à¥à¤¯à¤¾à¤¨à¤¿à¤™ रोकà¥à¤¨à¥à¤¹à¥‹à¤²à¤¾"
-
-#: panel-applet/NMWirelessApplet.c:1609
-msgid "Resume Wireless Scanning"
-msgstr "ताररहित सà¥à¤•à¥à¤¯à¤¾à¤¨à¤¿à¤™ फेरी शà¥à¤°à¥‚ गरà¥à¤¨à¥à¤¹à¥‹à¤²à¤¾"
-
-#: panel-applet/NMWirelessApplet.c:1619 panel-applet/NMWirelessApplet.c:1658
-msgid "Stop All Wireless Devices"
-msgstr "सबै ताररहित यनà¥à¤¤à¥à¤°à¤¹à¤°à¥ रोकà¥à¤¨à¥à¤¹à¥‹à¤²à¤¾à¥¤"
-
-#: panel-applet/NMWirelessApplet.c:1624
-msgid "Start All Wireless Devices"
-msgstr "सबै ताररहित यनà¥à¤¤à¥à¤°à¤¹à¤°à¥ शà¥à¤°à¥‚ गरà¥à¤¨à¥à¤¹à¥‹à¤²à¤¾à¥¤"
-
-#: panel-applet/NMWirelessApplet.c:1667
-msgid "Help"
-msgstr "मदà¥à¤¦à¤¤à¥’"
-
-#: panel-applet/NMWirelessApplet.c:1674
-msgid "About"
-msgstr "बारेमा॒"
-
-#: panel-applet/NMWirelessAppletOtherNetworkDialog.c:232
-msgid "Create new wireless network"
-msgstr "नयाठताररहित संजाल सृजना गरà¥à¤¨à¥à¤¹à¥‹à¤²à¤¾à¥¤"
-
-#: panel-applet/NMWirelessAppletOtherNetworkDialog.c:233
-msgid ""
-"Enter the ESSID and security settings of the wireless network you wish to "
-"create."
-msgstr ""
-"तपाईले सृजना गरà¥à¤¨ चहानà¥à¤­à¤à¤•à¥‹ ताररहित संजालको ई à¤à¤¸ à¤à¤¸ आई डि र सà¥à¤°à¤•à¥à¤·à¤¾ मिलान पà¥à¤°à¤µà¥‡à¤¶ "
-"गराउनà¥à¤¹à¥‹à¤²à¤¾à¥¤"
-
-#: panel-applet/NMWirelessAppletOtherNetworkDialog.c:238
-msgid "Custom wireless network"
-msgstr "ताररहित संजाल आफै मिलाउनà¥à¤¹à¥‹à¤²à¤¾"
-
-#: panel-applet/NMWirelessAppletOtherNetworkDialog.c:239
-msgid "Enter the ESSID of the wireless network to which you wish to connect."
-msgstr "तपाईले समà¥à¤ªà¤°à¥à¤• गरà¥à¤¨ चहानà¥à¤­à¤à¤•à¥‹ ताररहित संजालको ई à¤à¤¸ à¤à¤¸ आई डि पà¥à¤°à¤µà¥‡à¤¶ गराउनà¥à¤¹à¥‹à¤²à¤¾à¥¤"
-
-#: panel-applet/essid.glade.h:1 panel-applet/wireless-applet.glade.h:3
-msgid ""
-"128-bit passphrase (WEP)\n"
-"Ascii key (WEP)\n"
-"Hex key (WEP)"
-msgstr ""
-"१२८-विट गà¥à¤œà¤°à¤¿à¤à¤•à¥‹à¤µà¤¾à¤•à¥à¤¯ (डबà¥à¤²à¥ ई पि)\n"
-"à¤à¤à¤¸à¤¸à¤¿à¤†à¤‡à¤†à¤‡ कà¥à¤¨à¥à¤œ (डबà¥à¤²à¥ ई पि)\n"
-"हेकà¥à¤¸ कà¥à¤¨à¥à¤œ (डबà¥à¤²à¥ ई पि)"
-
-#: panel-applet/essid.glade.h:4 panel-applet/wireless-applet.glade.h:15
-msgid "C_onnect"
-msgstr "समà¥à¤ªà¤°à¥à¤• गरà¥à¤¨à¥à¤¹à¥‹à¤²à¤¾"
-
-#: panel-applet/essid.glade.h:5 panel-applet/wireless-applet.glade.h:16
-msgid "Connect with encryption enabled"
-msgstr "सकà¥à¤·à¤® गà¥à¤ªà¥à¤¤à¤¿à¤•à¤°à¤£ सहित जडान गरà¥à¤¨à¥à¤¹à¥‹à¤²à¤¾"
-
-#: panel-applet/essid.glade.h:6 panel-applet/wireless-applet.glade.h:18
-msgid "Key type:"
-msgstr "कà¥à¤¨à¥à¤œ पà¥à¤°à¤•à¤¾à¤°:"
-
-#: panel-applet/essid.glade.h:8 panel-applet/wireless-applet.glade.h:20
-msgid "Wireless _adapter:"
-msgstr "ताररहित à¤à¤¡à¤ªà¥à¤Ÿà¤°:"
-
-#: panel-applet/essid.glade.h:9 panel-applet/wireless-applet.glade.h:21
-msgid "Wireless _network:"
-msgstr "ताररहित संजाल:"
-
-#: panel-applet/menu-info.c:91
-#, c-format
-msgid "Wired Network (%s)"
-msgstr "तारसहित सञà¥à¤œà¤¾à¤² (%s)"
-
-#: panel-applet/menu-info.c:93
-msgid "Wired Network"
-msgstr "तारसहित सञà¥à¤œà¤¾à¤²"
-
-#: panel-applet/menu-info.c:166
-#, c-format
-msgid "Wireless Network (%s)"
-msgid_plural "Wireless Networks (%s)"
-msgstr[0] "ताररहित सञà¥à¤œà¤¾à¤² (%s)"
-msgstr[1] "ताररहित सञà¥à¤œà¤¾à¤²à¤¹à¤°à¥‚ (%s)"
-
-#: panel-applet/menu-info.c:168
-msgid "Wireless Network"
-msgid_plural "Wireless Networks"
-msgstr[0] "ताररहित सञà¥à¤œà¤¾à¤²"
-msgstr[1] "ताररहित सञà¥à¤œà¤¾à¤²à¤¹à¤°à¥‚"
-
-#: panel-applet/menu-info.c:294
-msgid " (invalid Unicode)"
-msgstr " (अमानà¥à¤¯ यूनिकोड)"
-
-#: panel-applet/NMWirelessApplet.xml.h:1
-msgid "_About..."
-msgstr "बारेमा॒"
-
-#: panel-applet/eggtrayicon.c:118 examples/python/systray/eggtrayicon.c:111
-msgid "Orientation"
-msgstr "अभिमà¥à¤–ीकरण॒"
-
-#: panel-applet/eggtrayicon.c:119 examples/python/systray/eggtrayicon.c:112
-msgid "The orientation of the tray."
-msgstr "टà¥à¤°à¥‡à¤•à¥‹ अभिमà¥à¤–ीकरण॒"
-
-#: panel-applet/wireless-applet.glade.h:1
-msgid " "
-msgstr " "
-
-#: panel-applet/wireless-applet.glade.h:7
-#, no-c-format
-msgid ""
-"<span weight=\"bold\" size=\"larger\">Reduced Network Functionality</span>\n"
-"\n"
-"%s It will not be completely functional."
-msgstr ""
-"<span weight=\"bold\" size=\"larger\">संजाल कारà¥à¤¯ </span> घटाउछ\n"
-"\n"
-"%s यो पूरà¥à¤£ कारà¥à¤¯ हà¥à¤¨à¥‡ छैन।"
-
-#: panel-applet/wireless-applet.glade.h:11
-#, no-c-format
-msgid ""
-"<span weight=\"bold\" size=\"larger\">Wireless Network Login Confirmation</"
-"span>\n"
-"\n"
-"You have chosen log in to the wireless network '%s'. If you are sure this "
-"wireless network is secure, click the checkbox below and NetworkManager will "
-"no longer pester you with stupid questions when you connect to it."
-msgstr ""
-"<span weight=\"bold\" size=\"larger\">ताररहित संजाल लगइन पà¥à¤°à¤®à¤¾à¤£à¤¿à¤¤</span>\n"
-"\n"
-"तपाईले ताररहित संजाल '%s' मा लगइन छानà¥à¤¨à¥ भà¤à¤•à¥‹ छ। यदि तपाई निशà¥à¤šà¤¿à¤¨à¥à¤¤ हà¥à¤¨à¥à¤¹à¥à¤¨à¥à¤› कि "
-"ताररहित संजाल सà¥à¤°à¤•à¥à¤·à¤¿à¤¤ छ, तलको जाà¤à¤š बाकसमा कà¥à¤²à¤¿à¤• गरà¥à¤¨à¥à¤¹à¥‹à¤²à¤¾ र संजाल पà¥à¤°à¤¬à¤¨à¥à¤§à¤•à¤²à¥‡ मनà¥à¤¦ "
-"पà¥à¤°à¤¶à¥à¤¨à¤¹à¤°à¥‚ले तपाईलाई दà¥:ख दिंदैन जब तपाई यससंग जोडिनà¥à¤¹à¥à¤¨à¥à¤›à¥¤."
-
-#: panel-applet/wireless-applet.glade.h:14
-msgid "Always Trust this Wireless Network"
-msgstr "जहिलेपनि यहि ताररहित सञà¥à¤œà¤¾à¤²à¤®à¤¾ विशà¥à¤µà¤¾à¤¸ गरà¥à¤¨à¥à¤¹à¥‹à¤²à¤¾à¥¤"
-
-#: panel-applet/wireless-applet.glade.h:17
-msgid "Don't remind me again"
-msgstr "मलाई फेरि नसमà¥à¤à¤¾à¤‰à¤¨à¥à¤¹à¥‹à¤²à¤¾à¥¤"
-
-#: panel-applet/wireless-applet.glade.h:23
-msgid "_OK"
-msgstr "ठीक छ॒"
-
-#: panel-applet/nmwa-vpn-password-dialog.c:105
-#, fuzzy, c-format
-msgid "You must log in to access the Virtual Private Network '%s'."
-msgstr "तपाईले निजि संजाल %s मा पà¥à¤°à¤µà¥‡à¤¶à¤•à¥‹ लागी लगइन गरà¥à¤¨à¥à¤ªà¤°à¥à¤›à¥¤"
-
-#: src/nm-netlink-monitor.c:154
-#, c-format
-msgid ""
-"unable to create netlink socket for monitoring wired ethernet devices - %s"
-msgstr "मानिटरिङ तारसहित ईथरनेट यनà¥à¤¤à¥à¤° - %s को लागी नेटलिङà¥à¤• सकेट सृजना गरà¥à¤¨ असकà¥à¤·à¤®"
-
-#: src/nm-netlink-monitor.c:172
-#, c-format
-msgid ""
-"unable to bind to netlink socket for monitoring wired ethernet devices - %s"
-msgstr "मानिटरिङ तारसहित ईथरनेट यनà¥à¤¤à¥à¤° - %s को लागी नेटलिङà¥à¤• सकेट संयोजन गरà¥à¤¨ असकà¥à¤·à¤®"
-
-#: src/nm-netlink-monitor.c:403
-msgid "operation took too long"
-msgstr "संचालनले धेरै लामो लियो"
-
-#: src/nm-netlink-monitor.c:500
-msgid "received data from wrong type of sender"
-msgstr "गलत पà¥à¤°à¤•à¤¾à¤°à¤•à¥‹ पà¥à¤°à¥‡à¤·à¤•à¤¬à¤¾à¤Ÿ पठाà¤à¤•à¥‹ डाटा पà¥à¤°à¤¾à¤ªà¥à¤¤ गरियो।"
-
-#: src/nm-netlink-monitor.c:513
-msgid "received data from unexpected sender"
-msgstr "आशा नगरेको पà¥à¤°à¥‡à¤·à¤•à¤¬à¤¾à¤Ÿ पठाà¤à¤•à¥‹ डाटा पà¥à¤°à¤¾à¤ªà¥à¤¤ गरियो।"
-
-#: src/nm-netlink-monitor.c:535
-#, c-format
-msgid "%s"
-msgstr "%s"
-
-#: src/nm-netlink-monitor.c:644
-msgid "too much data was sent over socket and some of it was lost"
-msgstr "सकेट माथी धेरै डाटाहरू पठाईयो र तà¥à¤¯à¤¸à¤®à¤§à¥à¤¯à¥‡ केहि हरायो।"
-
-#~ msgid "progress bar label|%d %%"
-#~ msgstr "पà¥à¤°à¤—ति बार तह|%d %%"
diff --git a/po/nl.po b/po/nl.po
deleted file mode 100644
index 155176a634..0000000000
--- a/po/nl.po
+++ /dev/null
@@ -1,865 +0,0 @@
-# Dutch translation of NetworkManager
-# Copyright (C) 2004 The Free Software Foundation
-# This file is distributed under the same license as the
-# NetworkManager package.
-# Tino Meinen <a.t.meinen@chello.nl>, 2004, 2005.
-# Daniel van Eeden <daniel_e@dds.nl>, 2004.
-# ----------------------------------------------
-# the wired network het bedraad/bedrade/bekabelde/bekabeld netwerk
-# the wireless network het draadloos netwerk
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: GNOME 2.8\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2005-07-01 20:04+0000\n"
-"PO-Revision-Date: 2005-07-02 02:48+0200\n"
-"Last-Translator: Tino Meinen <a.t.meinen@chello.nl>\n"
-"Language-Team: Dutch <vertaling@vrijschrift.org>\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"Plural-Forms: nplurals=2; plural=(n != 1);\n"
-
-# draadloze netwerk/draadloos netwerk
-#: ../gnome/applet/applet-dbus-info.c:986
-#, c-format
-msgid ""
-"The requested wireless network '%s' does not appear to be in range. A "
-"different wireless network will be used if any are available."
-msgstr ""
-"Het opgevraagde draadloos netwerk '%s' is kennelijk niet binnen bereik. "
-"Indien er een ander draadloos netwerk beschikbaar is zal dat worden gebruikt."
-
-#: ../gnome/applet/applet-dbus.c:597
-#, c-format
-msgid "Connection to the wireless network '%s' failed.\n"
-msgstr "Verbinden maken met het draadloos netwerk '%s' is mislukt.\n"
-
-#: ../gnome/applet/applet-dbus.c:602
-msgid "Connection to the wired network failed.\n"
-msgstr "Verbinding maken met het bedraad netwerk is mislukt.\n"
-
-#: ../gnome/applet/applet.c:190
-msgid "Error displaying connection information: "
-msgstr "Fout bij weergeven van verbindingsinformatie: "
-
-#: ../gnome/applet/applet.c:215
-msgid "Could not find some required resources (the glade file)!"
-msgstr "Kon bepaalde vereiste bronnen niet vinden (het glade bestand)!"
-
-# Netwerken
-#: ../gnome/applet/applet.c:225
-msgid "No active connections!"
-msgstr "Geen actieve netwerkverbindingen!"
-
-#: ../gnome/applet/applet.c:234
-msgid "Could not open socket!"
-msgstr "Kon 'socket' niet openen!"
-
-#: ../gnome/applet/applet.c:249
-msgid "Failed to get information about the interface!"
-msgstr "Verkrijgen van informatie over het apparaat is mislukt!"
-
-#: ../gnome/applet/applet.c:282
-#, c-format
-msgid "Wired Ethernet (%s)"
-msgstr "Bedraad ethernet (%s)"
-
-#: ../gnome/applet/applet.c:284
-#, c-format
-msgid "Wireless Ethernet (%s)"
-msgstr "Draadloos ethernet (%s)"
-
-#: ../gnome/applet/applet.c:378 ../gnome/applet/applet.c:396
-msgid "NetworkManager Applet"
-msgstr "NetworkManager applet"
-
-#: ../gnome/applet/applet.c:380 ../gnome/applet/applet.c:398
-msgid "Copyright (C) 2004-2005 Red Hat, Inc."
-msgstr "Copyright © 2004-2005 Red Hat, Inc."
-
-#: ../gnome/applet/applet.c:381 ../gnome/applet/applet.c:399
-msgid ""
-"Notification area applet for managing your network devices and connections."
-msgstr ""
-"Een paneeltoepassing voor het beheer van uw netwerkapparaten en verbindingen."
-
-#: ../gnome/applet/applet.c:484
-msgid "VPN Error"
-msgstr "VPN-fout"
-
-# aanmeld-fout kan verwarrend zijn omdat je je ook bij een draadloos
-# netwerk moet aanmelden.
-#: ../gnome/applet/applet.c:488
-#, c-format
-msgid ""
-"<span weight=\"bold\" size=\"larger\">VPN Login Failure</span>\n"
-"\n"
-"Could not start the VPN connection '%s' due to a login failure.\n"
-"\n"
-"The VPN service said: \"%s\""
-msgstr ""
-"<span weight=\"bold\" size=\"larger\">VPN-aanmelding mislukt</span>\n"
-"\n"
-"Kon de VPN-verbinding '%s' niet maken vanwege een aanmeldfout.\n"
-"\n"
-"De VPN-service meldde: \"%s\""
-
-#: ../gnome/applet/applet.c:493
-#, c-format
-msgid ""
-"<span weight=\"bold\" size=\"larger\">VPN Start Failure</span>\n"
-"\n"
-"Could not start the VPN connection '%s' due to a failure launching the VPN "
-"program.\n"
-"\n"
-"The VPN service said: \"%s\""
-msgstr ""
-"<span weight=\"bold\" size=\"larger\">VPN-aanmelding mislukt</span>\n"
-"\n"
-"Kon de VPN-verbinding '%s' niet maken omdat het VPN-programma niet kon "
-"opstarten.\n"
-"\n"
-"De VPN-service meldde: \"%s\""
-
-#: ../gnome/applet/applet.c:498
-#, c-format
-msgid ""
-"<span weight=\"bold\" size=\"larger\">VPN Connect Failure</span>\n"
-"\n"
-"Could not start the VPN connection '%s' due to a connection error.\n"
-"\n"
-"The VPN service said: \"%s\""
-msgstr ""
-"<span weight=\"bold\" size=\"larger\">VPN-aanmelding mislukt</span>\n"
-"\n"
-"Kon de VPN-verbinding '%s' niet maken vanwege een verbindingsfout.\n"
-"\n"
-"De VPN-service meldde: \"%s\""
-
-# aanmeld-fout kan verwarrend zijn omdat je je ook bij een draadloos
-# netwerk moet aanmelden.
-#: ../gnome/applet/applet.c:503
-#, c-format
-msgid ""
-"<span weight=\"bold\" size=\"larger\">VPN Configuration Error</span>\n"
-"\n"
-"The VPN connection '%s' was not correctly configured.\n"
-"\n"
-"The VPN service said: \"%s\""
-msgstr ""
-"<span weight=\"bold\" size=\"larger\">VPN-configuratiefout</span>\n"
-"\n"
-"De VPN-verbinding '%s' ia niet juist geconfigureerd.\n"
-"\n"
-"De VPN-service meldde: \"%s\""
-
-#: ../gnome/applet/applet.c:508
-#, c-format
-msgid ""
-"<span weight=\"bold\" size=\"larger\">VPN Connect Failure</span>\n"
-"\n"
-"Could not start the VPN connection '%s' because the VPN server did not "
-"return an adequate network configuration.\n"
-"\n"
-"The VPN service said: \"%s\""
-msgstr ""
-"<span weight=\"bold\" size=\"larger\">VPN-verbinding mislukt</span>\n"
-"\n"
-"Kon de VPN-verbinding '%s' niet maken omdat de VPN-server geen geschikte "
-"netwerkconfiguratie aangaf.\n"
-"De VPN-service meldde: \"%s\""
-
-#: ../gnome/applet/applet.c:575
-#, c-format
-msgid ""
-"<span weight=\"bold\" size=\"larger\">VPN Login Message</span>\n"
-"\n"
-"VPN connection '%s' said:\n"
-"\n"
-"\"%s\""
-msgstr ""
-"<span weight=\"bold\" size=\"larger\">VPN-aanmelding bericht</span>\n"
-"\n"
-"VPN-verbinding '%s' meldde:\n"
-"\n"
-"\"%s\""
-
-#: ../gnome/applet/applet.c:793 ../gnome/applet/applet.c:2357
-#: ../gnome/applet/other-network-dialog.c:315
-#: ../gnome/applet/passphrase-dialog.c:455
-msgid ""
-"The NetworkManager Applet could not find some required resources (the glade "
-"file was not found)."
-msgstr ""
-"Het NetworkManager-applet kon bepaalde vereiste bronnen niet vinden (het "
-"glade bestand is niet gevonden)."
-
-#: ../gnome/applet/applet.c:806
-#, c-format
-msgid "The network device \"%s (%s)\" does not support wireless scanning."
-msgstr "Het netwerkapparaat \"%s (%s)\" ondersteunt draadloos scannen niet."
-
-#: ../gnome/applet/applet.c:813
-#, c-format
-msgid "The network device \"%s (%s)\" does not support link detection."
-msgstr "Het netwerkapparaat \"%s (%s)\" ondersteunt link-detecteren niet."
-
-#: ../gnome/applet/applet.c:934
-#, c-format
-msgid "Preparing device %s for the wired network..."
-msgstr "Apparaat %s wordt ingesteld voor het bedraad netwerk..."
-
-#: ../gnome/applet/applet.c:936
-#, c-format
-msgid "Preparing device %s for the wireless network '%s'..."
-msgstr "Apparaat %s wordt ingesteld op het draadloos netwerk '%s'..."
-
-#: ../gnome/applet/applet.c:943
-#, c-format
-msgid "Configuring device %s for the wired network..."
-msgstr "Appraat %s wordt geconfigureerd voor het bedraad netwerk..."
-
-# poog/pogen/poging
-# dit is een poging om binnen te komen
-# ik poog om binnen te komen
-# bezig met pogen om binen te komen
-#: ../gnome/applet/applet.c:945
-#, c-format
-msgid "Attempting to join the wireless network '%s'..."
-msgstr "Poging om binnen te komen bij draadloos netwerk '%s'..."
-
-#: ../gnome/applet/applet.c:952
-#, c-format
-msgid "Waiting for Network Key for the wireless network '%s'..."
-msgstr "Wachten op netwerksleutel voor draadloos netwerk '%s'..."
-
-# Verzoek een netwerkadres van het bedraad netwerk...
-# er wordt een netwerkadres voor het bedraad netwerk verzocht
-#: ../gnome/applet/applet.c:959 ../gnome/applet/applet.c:968
-msgid "Requesting a network address from the wired network..."
-msgstr "Er wordt een netwerkadres verzocht voor het bedraad netwerk..."
-
-#: ../gnome/applet/applet.c:961 ../gnome/applet/applet.c:970
-#, c-format
-msgid "Requesting a network address from the wireless network '%s'..."
-msgstr "Er wordt een netwerkadres verzocht voor het draadloos netwerk '%s'..."
-
-#: ../gnome/applet/applet.c:977
-msgid "Finishing connection to the wired network..."
-msgstr "Verbinding met het bedraad netwerk wordt voltooid..."
-
-#: ../gnome/applet/applet.c:979
-#, c-format
-msgid "Finishing connection to the wireless network '%s'..."
-msgstr "Verbinding met het draadloos netwerk '%s' wordt voltooid..."
-
-# betere vertaling
-# is niet uitgevoerd (klinkt als verleden tijd)
-# is niet opgestart
-# NetworkManager loopt niet
-# Geen NetworkManager aanwezig
-# NetworkManager niet aanwezig
-#: ../gnome/applet/applet.c:1025
-msgid "NetworkManager is not running"
-msgstr "Geen NetworkManager..."
-
-# Netwerken
-#: ../gnome/applet/applet.c:1036
-msgid "No network connection"
-msgstr "Geen netwerkverbinding"
-
-# bedraad/bekabeld netwerk
-#: ../gnome/applet/applet.c:1043
-msgid "Wired network connection"
-msgstr "Bedraad netwerk"
-
-#: ../gnome/applet/applet.c:1050
-msgid "Connected to an Ad-Hoc wireless network"
-msgstr "Verbonden met een Ad-hoc draadloos netwerk"
-
-#: ../gnome/applet/applet.c:1064
-#, c-format
-msgid "Wireless network connection to '%s' (%d%%)"
-msgstr "Draadloze netwerkverbinding met '%s' (%d%%)"
-
-# verbinding naar/met
-#: ../gnome/applet/applet.c:1089
-#, c-format
-msgid "VPN connection to '%s'"
-msgstr "VPN-verbinding met '%s'"
-
-#: ../gnome/applet/applet.c:1514
-msgid "_Connect to Other Wireless Network..."
-msgstr "_Verbinden met ander draadloos netwerk..."
-
-#: ../gnome/applet/applet.c:1535
-msgid "Create _New Wireless Network..."
-msgstr "_Nieuw draadloos netwerk aanmaken..."
-
-# Netwerken
-#: ../gnome/applet/applet.c:1648
-#: ../gnome/vpn-properties/nm-vpn-properties.glade.h:17
-msgid "VPN Connections"
-msgstr "VPN-verbindingen"
-
-#: ../gnome/applet/applet.c:1670
-msgid "Configure VPN..."
-msgstr "VPN configureren..."
-
-#: ../gnome/applet/applet.c:1674
-msgid "Disconnect VPN..."
-msgstr "VPN-verbinding verbreken..."
-
-# Er zijn geen netwerkapparaten geconfigureerd/gevonden
-#: ../gnome/applet/applet.c:1724
-msgid "No network devices have been found"
-msgstr "Er zijn geen netwerkapparaten geconfigureerd"
-
-# betere vertaling
-# is niet uitgevoerd (klinkt als verleden tijd)
-# is niet opgestart
-# NetworkManager loopt niet
-# Geen NetworkManager aanwezig
-# NetworkManager niet aanwezig
-#: ../gnome/applet/applet.c:1882
-msgid "NetworkManager is not running..."
-msgstr "Geen NetworkManager..."
-
-#: ../gnome/applet/applet.c:1950
-msgid "_Stop All Wireless Devices"
-msgstr "Alle draadloze apparaten _stoppen"
-
-#: ../gnome/applet/applet.c:1955
-msgid "_Start All Wireless Devices"
-msgstr "Alle draadloze apparaten _starten"
-
-#: ../gnome/applet/applet.c:1986
-msgid "_Wireless Network Discovery"
-msgstr "_Draadloos netwerk ontdekken"
-
-# blijven zoeken/altijd zoeken
-#: ../gnome/applet/applet.c:1989
-msgid "Always Search"
-msgstr "Blijven zoeken"
-
-#: ../gnome/applet/applet.c:1997
-msgid "Search Only When Disconnected"
-msgstr "Alleen zoeken wanneer niet verbonden"
-
-#: ../gnome/applet/applet.c:2005
-msgid "Never Search"
-msgstr "Nooit zoeken"
-
-#. Stop All Wireless Devices item
-#: ../gnome/applet/applet.c:2017
-msgid "Stop All Wireless Devices"
-msgstr "Alle draadloze apparaten stoppen"
-
-#: ../gnome/applet/applet.c:2023
-msgid "Connection _Information"
-msgstr "_Verbindingsinformatie"
-
-#: ../gnome/applet/applet.c:2031
-msgid "_Help"
-msgstr "_Hulp"
-
-#: ../gnome/applet/applet.c:2038
-msgid "_About"
-msgstr "In_fo"
-
-# het kan het glade-bestand niet vinden.
-#: ../gnome/applet/applet.c:2506
-msgid ""
-"The NetworkManager applet could not find some required resources. It cannot "
-"continue.\n"
-msgstr ""
-"Het NetworkManager-applet kon bepaalde vereiste bronnen niet vinden. Het "
-"zal nu worden afgesloten.\n"
-
-#: ../gnome/applet/eggtrayicon.c:118
-msgid "Orientation"
-msgstr "Oriëntatie"
-
-#: ../gnome/applet/eggtrayicon.c:119
-msgid "The orientation of the tray."
-msgstr "De oriëntatie van het applet."
-
-#: ../gnome/applet/menu-items.c:89
-#, c-format
-msgid "Wired Network (%s)"
-msgstr "Bedraad netwerk (%s)"
-
-#: ../gnome/applet/menu-items.c:92
-msgid "_Wired Network"
-msgstr "_Bedraad netwerk"
-
-#: ../gnome/applet/menu-items.c:165
-#, c-format
-msgid "Wireless Network (%s)"
-msgid_plural "Wireless Networks (%s)"
-msgstr[0] "Draadloos netwerk (%s)"
-msgstr[1] "Draadloze netwerken (%s)"
-
-#: ../gnome/applet/menu-items.c:167
-msgid "Wireless Network"
-msgid_plural "Wireless Networks"
-msgstr[0] "Draadloos netwerk"
-msgstr[1] "Draadloze netwerken"
-
-#: ../gnome/applet/menu-items.c:309
-msgid " (invalid Unicode)"
-msgstr " (ongeldige Unicode)"
-
-#: ../gnome/applet/other-network-dialog.c:148
-#: ../gnome/applet/passphrase-dialog.c:163
-#: ../gnome/applet/wireless-applet.glade.h:34
-msgid "Passphrase:"
-msgstr "Wachtwoordfrase:"
-
-#: ../gnome/applet/other-network-dialog.c:151
-#: ../gnome/applet/passphrase-dialog.c:166
-msgid "Ascii Key:"
-msgstr "ASCII-sleutel:"
-
-#: ../gnome/applet/other-network-dialog.c:154
-#: ../gnome/applet/passphrase-dialog.c:169
-msgid "Hex Key:"
-msgstr "Hex-sleutel:"
-
-#: ../gnome/applet/other-network-dialog.c:229
-msgid "Create new wireless network"
-msgstr "Nieuw draadloos netwerk aanmaken"
-
-#: ../gnome/applet/other-network-dialog.c:230
-msgid ""
-"Enter the ESSID and security settings of the wireless network you wish to "
-"create."
-msgstr ""
-"Geef de ESSID de beveiligingsinstellingen van het draadloos netwerk dat u "
-"wilt aanmaken."
-
-#: ../gnome/applet/other-network-dialog.c:235
-msgid "Custom wireless network"
-msgstr "Aangepast draadloos netwerk"
-
-#: ../gnome/applet/other-network-dialog.c:236
-msgid "Enter the ESSID of the wireless network to which you wish to connect."
-msgstr ""
-"Geef de ESSID van het draadloos netwerk waarmee u verbinding wilt maken."
-
-#: ../gnome/applet/passphrase-dialog.c:248
-#, c-format
-msgid "Passphrase for wireless network %s"
-msgstr "Wachtwoordfrase voor draadloos netwerk %s"
-
-#: ../gnome/applet/vpn-password-dialog.c:152
-#: ../gnome/applet/vpn-password-dialog.c:191
-#, c-format
-msgid "Cannot start VPN connection '%s'"
-msgstr "Kan VPN-verbinding '%s' niet starten"
-
-#: ../gnome/applet/vpn-password-dialog.c:155
-#, c-format
-msgid ""
-"Could not find the authentication dialog for VPN connection type '%s'. "
-"Contact your system administrator."
-msgstr ""
-"Kon het aanmeldingsdialoogvenster voor VPN-verbindingstype '%s' niet vinden. "
-"Neem contact op met uw systeembeheerder."
-
-#: ../gnome/applet/vpn-password-dialog.c:194
-#, c-format
-msgid ""
-"There was a problem launching the authentication dialog for VPN connection "
-"type '%s'. Contact your system administrator."
-msgstr ""
-"Er was een probleem bij het opstarten van het aanmeldingsdialoogvenster voor "
-"VPN-verbindingstype '%s'. Neem contact op met uw systeembeheerder."
-
-#: ../gnome/applet/wireless-applet.glade.h:1
-msgid " "
-msgstr " "
-
-#: ../gnome/applet/wireless-applet.glade.h:2
-msgid ""
-"128-bit Passphrase (WEP)\n"
-"Ascii Key (WEP)\n"
-"Hex Key (WEP)"
-msgstr ""
-"128-bit Wachtwoordfrase (WEP)\n"
-"ASCII-sleutel (WEP)\n"
-"Hex-sleutel (WEP)"
-
-#: ../gnome/applet/wireless-applet.glade.h:5
-msgid ""
-"128-bit passphrase (WEP)\n"
-"Ascii key (WEP)\n"
-"Hex key (WEP)"
-msgstr ""
-"128-bit wachtwoordfrase (WEP)\n"
-"Ascii-sleutel (WEP)\n"
-"Hex-sleutel (WEP)"
-
-#: ../gnome/applet/wireless-applet.glade.h:8
-msgid ""
-"<span weight=\"bold\" size=\"larger\">Active Connection Information</span>"
-msgstr "<span weight=\"bold\" size=\"larger\">Actieve verbindingsinformatie</span>"
-
-# om toegang te kunnen verkrijgen tot het draadloze netwerk s
-# WEP-key voorlopig laten staan ipv versleuteling, mogelijk is het duidelijker
-#: ../gnome/applet/wireless-applet.glade.h:10
-#, no-c-format
-msgid ""
-"<span weight=\"bold\" size=\"larger\">Passphrase Required by Wireless "
-"Network</span>\n"
-"\n"
-"A passphrase or encryption key is required to access the wireless network '%"
-"s'."
-msgstr ""
-"<span weight=\"bold\" size=\"larger\">Draadloos netwerk vereist "
-"wachtwoordfrase</span>\n"
-"\n"
-"Een wachtwoordfrase of WEP-key is vereist om toegang te krijgen tot het "
-"draadloze netwerk '%s'."
-
-#: ../gnome/applet/wireless-applet.glade.h:14
-#, no-c-format
-msgid ""
-"<span weight=\"bold\" size=\"larger\">Reduced Network Functionality</span>\n"
-"\n"
-"%s It will not be completely functional."
-msgstr ""
-"<span weight=\"bold\" size=\"larger\">Gereduceerde netwerkfunctionaliteit</"
-"span>\n"
-"\n"
-"%s Het zal niet volledig functioneel zijn."
-
-#: ../gnome/applet/wireless-applet.glade.h:18
-#, no-c-format
-msgid ""
-"<span weight=\"bold\" size=\"larger\">Wireless Network Login Confirmation</"
-"span>\n"
-"\n"
-"You have chosen to log in to the wireless network '%s'. If you are sure "
-"that this wireless network is secure, click the checkbox below and "
-"NetworkManager will not require confirmation on subsequent log ins."
-msgstr ""
-"<span weight=\"bold\" size=\"larger\">Aanmelding bij draadloos netwerk "
-"bevestigen</span>\n"
-"\n"
-"U heeft gekozen om uzelf aan te melden bij het draadloze netwerk '%s'. "
-"Indien u zeker weet dat dit draadloze netwerk veilig is, vink dan "
-"onderstaande optie aan. NetworkManager zal u dan geen toestemming meer "
-"vragen wanneer u zich weer bij dit netwerk aanmeldt."
-
-#: ../gnome/applet/wireless-applet.glade.h:21
-msgid "Always Trust this Wireless Network"
-msgstr "Dit draadloze netwerk altijd vertrouwen"
-
-#: ../gnome/applet/wireless-applet.glade.h:22
-msgid "Broadcast Address:"
-msgstr "Broadcastadres:"
-
-#: ../gnome/applet/wireless-applet.glade.h:23
-msgid "C_onnect"
-msgstr "_Verbinden"
-
-#: ../gnome/applet/wireless-applet.glade.h:24
-msgid "Connect with encryption enabled"
-msgstr "Verbinden met versleuteling aangezet"
-
-#: ../gnome/applet/wireless-applet.glade.h:25
-msgid "Connection Information"
-msgstr "Verbindingsinformatie"
-
-#: ../gnome/applet/wireless-applet.glade.h:26
-msgid "Destination Address:"
-msgstr "Doeladres:"
-
-#: ../gnome/applet/wireless-applet.glade.h:27
-msgid "Don't remind me again"
-msgstr "Niet meer tonen"
-
-#: ../gnome/applet/wireless-applet.glade.h:28
-msgid "Hardware Address:"
-msgstr "Hardware-adres:"
-
-#: ../gnome/applet/wireless-applet.glade.h:29
-msgid "IP Address:"
-msgstr "IP-adres:"
-
-#: ../gnome/applet/wireless-applet.glade.h:30
-msgid "Interface:"
-msgstr "Apparaat:"
-
-#: ../gnome/applet/wireless-applet.glade.h:31
-msgid "Key Type:"
-msgstr "Sleuteltype:"
-
-#: ../gnome/applet/wireless-applet.glade.h:32
-msgid "Key type:"
-msgstr "Sleuteltype:"
-
-#: ../gnome/applet/wireless-applet.glade.h:33
-msgid "Other Wireless Network..."
-msgstr "Ander draadloos netwerk..."
-
-#: ../gnome/applet/wireless-applet.glade.h:35
-msgid "Subnet Mask:"
-msgstr "Subnetmasker:"
-
-#: ../gnome/applet/wireless-applet.glade.h:36
-msgid "Wireless Network Key Required"
-msgstr "Sleutel draadloos netwerk vereist"
-
-#: ../gnome/applet/wireless-applet.glade.h:37
-msgid "Wireless _adapter:"
-msgstr "Draadloze _adapter:"
-
-#: ../gnome/applet/wireless-applet.glade.h:38
-msgid "Wireless _network:"
-msgstr "Draadloos _netwerk:"
-
-#: ../gnome/applet/wireless-applet.glade.h:39
-msgid "_Login to Network"
-msgstr "_Aanmelden bij het netwerk"
-
-# Okay
-#: ../gnome/applet/wireless-applet.glade.h:40
-msgid "_OK"
-msgstr "_OK"
-
-#: ../gnome/vpn-properties/nm-vpn-properties.c:374
-msgid "Cannot add VPN connection"
-msgstr "Kan VPN-verbinding niet toevoegen"
-
-#: ../gnome/vpn-properties/nm-vpn-properties.c:376
-msgid ""
-"No suitable VPN software was found on your system. Contact your system "
-"administrator."
-msgstr ""
-"Er is geen geschikte VPN-software gevonden op uw systeem. Neem contact op "
-"met uw systeembeheerder."
-
-# Netwerken
-#: ../gnome/vpn-properties/nm-vpn-properties.c:428
-msgid "Cannot import VPN connection"
-msgstr "Kan VPN-verbinding niet importeren"
-
-#: ../gnome/vpn-properties/nm-vpn-properties.c:430
-#, c-format
-msgid ""
-"Cannot find suitable software for VPN connection type '%s' to import the "
-"file '%s'. Contact your system administrator."
-msgstr ""
-"Kan geen geschikte software vinden voor VPN-verbinding type '%s' om het "
-"bestand '%s' te importeren. Neem contact op met uw systeembeheerder."
-
-# herleiden/ophalen
-#: ../gnome/vpn-properties/nm-vpn-properties.c:570
-#, c-format
-msgid "Error retrieving VPN connection '%s'"
-msgstr "Fout bij herleiden VPN-verbinding '%s'"
-
-# bleh: UI files
-#: ../gnome/vpn-properties/nm-vpn-properties.c:573
-#, c-format
-msgid ""
-"Could not find the UI files for VPN connection type '%s'. Contact your "
-"system administrator."
-msgstr ""
-"Kon de UI-bestanden voor VPN-verbinding type '%s' niet vinden. Neem contact "
-"op met uw systeembeheerder."
-
-#: ../gnome/vpn-properties/nm-vpn-properties.c:733
-#, c-format
-msgid "Delete VPN connection \"%s\"?"
-msgstr "VPN-verbinding \"%s\" verwijderen?"
-
-#: ../gnome/vpn-properties/nm-vpn-properties.c:736
-#, c-format
-msgid ""
-"All information about the VPN connection \"%s\" will be lost and you may "
-"need your system administrator to provide information to create a new "
-"connection."
-msgstr ""
-"Alle informatie over de VPN-verbinding \"%s\" zal verloren gaan en u zult "
-"mogelijk uw systeembeheerder om informatie moeten vragen voor het opzetten "
-"van een nieuwe verbinding."
-
-#: ../gnome/vpn-properties/nm-vpn-properties.c:951
-msgid "Unable to load"
-msgstr "Kon niet laden"
-
-#: ../gnome/vpn-properties/nm-vpn-properties.c:953
-msgid "Cannot find some needed resources (the glade file)!"
-msgstr "Kon bepaalde vereiste bronnen niet vinden (het glade bestand)!"
-
-# Netwerken
-#. Edit dialog
-#: ../gnome/vpn-properties/nm-vpn-properties.c:1071
-msgid "Edit VPN Connection"
-msgstr "VPN-verbinding bewerken"
-
-#: ../gnome/vpn-properties/nm-vpn-properties.glade.h:1
-msgid "Add a new VPN connection"
-msgstr "Een nieuwe VPN-verbinding toevoegen"
-
-#: ../gnome/vpn-properties/nm-vpn-properties.glade.h:2
-msgid "Connect to:"
-msgstr "Verbinden met:"
-
-#: ../gnome/vpn-properties/nm-vpn-properties.glade.h:3
-msgid "Create VPN Connection"
-msgstr "VPN-verbinding aanmaken"
-
-#: ../gnome/vpn-properties/nm-vpn-properties.glade.h:4
-msgid "Create VPN Connection - 1 of 2"
-msgstr "VPN-verbinding aanmaken - 1 van 2"
-
-#: ../gnome/vpn-properties/nm-vpn-properties.glade.h:5
-msgid "Create VPN Connection - 2 of 2"
-msgstr "VPN-verbinding aanmaken - 2 van 2"
-
-#: ../gnome/vpn-properties/nm-vpn-properties.glade.h:6
-msgid "Delete the selected VPN connection"
-msgstr "De geselecteerde VPN-verbinding verwijderen"
-
-#: ../gnome/vpn-properties/nm-vpn-properties.glade.h:7
-msgid ""
-"Dependent on the private network you want to connect to, you need to select "
-"what type of connection you want to create."
-msgstr ""
-"Afhankelijk van het privé-netwerk weermee u een verbinding wilt maken, moet "
-"u het type verbinding selecteren wat u wilt maken."
-
-#: ../gnome/vpn-properties/nm-vpn-properties.glade.h:8
-msgid "E_xport"
-msgstr "E_xporteren"
-
-#: ../gnome/vpn-properties/nm-vpn-properties.glade.h:9
-msgid "Edit the selected VPN connection"
-msgstr "De geselecteerde VPN-verbinding bewerken"
-
-#: ../gnome/vpn-properties/nm-vpn-properties.glade.h:10
-msgid "Export VPN connection to a file"
-msgstr "VPN-verbinding exporteren naar een bestand"
-
-#: ../gnome/vpn-properties/nm-vpn-properties.glade.h:11
-msgid "Export the VPN settings to a file"
-msgstr "De VPN-instellingen exporteren naar een bestand"
-
-#: ../gnome/vpn-properties/nm-vpn-properties.glade.h:12
-msgid "Finish create VPN Connection"
-msgstr "VPN-verbinding aanmaken voltooien"
-
-# virtuele privenetwerkverbindingen
-# virtuele prive-netwerken beheren
-#: ../gnome/vpn-properties/nm-vpn-properties.glade.h:13
-msgid "Manage Virtual Private Network connections"
-msgstr "Virtual Private Network-verbindingen beheren"
-
-#: ../gnome/vpn-properties/nm-vpn-properties.glade.h:14
-msgid ""
-"This assistant will guide you through the creation of a new VPN connection "
-"to a private network.\n"
-"\n"
-"It will require some information, such as IP addresses and secrets, that "
-"will probably be provided by your system administrator as appropriate."
-msgstr ""
-"Deze assistent zal u helpen bij het opzetten van een nieuwe VPN-verbinding "
-"met een privé-netwerk\n"
-"\n"
-"Het heeft bepaalde gegevens nodig zoals IP-adressen en geheimen die "
-"waarschijnlijk door uw systeembeheerder zullen worden verstrekt voor zover "
-"nodig."
-
-#: ../src/nm-netlink-monitor.c:154
-#, c-format
-msgid ""
-"unable to create netlink socket for monitoring wired ethernet devices - %s"
-msgstr ""
-"niet in staat om een netlink-socket aan te maken voor het monitoren van "
-"bekabelde ethernet-apparaten - %s"
-
-#: ../src/nm-netlink-monitor.c:172
-#, c-format
-msgid ""
-"unable to bind to netlink socket for monitoring wired ethernet devices - %s"
-msgstr ""
-"Niet in staat om te binden aan netlink-socket voor het monitoren van "
-"bekabelde ethernet-apparaten - %s"
-
-#: ../src/nm-netlink-monitor.c:404
-msgid "operation took too long"
-msgstr "bewerking duurde te lang"
-
-#: ../src/nm-netlink-monitor.c:501
-msgid "received data from wrong type of sender"
-msgstr "data ontvangen van een verkeerd type zender"
-
-#: ../src/nm-netlink-monitor.c:514
-msgid "received data from unexpected sender"
-msgstr "data ontvangen van een onverwachte zender"
-
-#: ../src/nm-netlink-monitor.c:536
-#, c-format
-msgid "%s"
-msgstr "%s"
-
-#: ../src/nm-netlink-monitor.c:645
-msgid "too much data was sent over socket and some of it was lost"
-msgstr "te veel data verzonden over de socket, een gedeelte is verloren"
-
-#: ../src/nm-netlink-monitor.c:734
-msgid "error occurred while waiting for data on socket"
-msgstr "er is een fout opgetreden bij het wachten op data van de 'socket'"
-
-#~ msgid "Other Wireless Networks..."
-#~ msgstr "Andere draadloze netwerken..."
-
-# Scannen voor/zoeken naar draadloze netwerken pauzeren/hervatten
-#~ msgid "Pause Wireless Scanning"
-#~ msgstr "Draadloos scannen pauzeren"
-
-#~ msgid "Resume Wireless Scanning"
-#~ msgstr "Draadloos scannen hervatten"
-
-#~ msgid "progress bar label|%d %%"
-#~ msgstr "voortgangsbalk label|%d %%"
-
-# privénetwerk
-#~ msgid "You must log in to access the Virtual Private Network '%s'."
-#~ msgstr "U moet inloggen voor toegang tot het Virtual Private Network '%s'."
-
-#~ msgid "*"
-#~ msgstr "*"
-
-#~ msgid "<span weight=\"bold\">Wireless Networks:</span>"
-#~ msgstr "<span weight=\"bold\">Draadloze netwerken:</span>"
-
-#~ msgid "Modify Wireless Networks"
-#~ msgstr "Draadloze netwerken aanpassen"
-
-#~ msgid "You must log in to access the private network %s"
-#~ msgstr "U moet inloggen voor toegang tot het privénetwerk %s"
-
-# scannen voor draadloze netwerken
-#~ msgid "Scanning for wireless networks..."
-#~ msgstr "Scannen naar draadloze netwerken..."
-
-#~ msgid "_About..."
-#~ msgstr "In_fo..."
-
-#~ msgid "There are no network devices..."
-#~ msgstr "Er zijn geen netwerkapparaten..."
-
-# aanwezig/actief
-#~ msgid "No network connection is currently active..."
-#~ msgstr "Er is momenteel geen netwerkverbinding actief..."
-
-# een draadloos netwerk aanwezig...
-#~ msgid "A wired network connection is currently active..."
-#~ msgstr "Er is momenteel een draadloze netwerkverbinding actief..."
diff --git a/po/no.po b/po/no.po
deleted file mode 100644
index ade51b97af..0000000000
--- a/po/no.po
+++ /dev/null
@@ -1,761 +0,0 @@
-# translation of NetworkManager to Norwegian Bokmal
-# This file is distributed under the same license as the NetworkManager package.
-# Copyright (C) 2004, 2005 Red Hat, Inc.
-# Kjartan Maraas <kmaraas@gnome.org>, 2004-2005.
-# Terance Edward Sola <terance@lyse.net>, 2005.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: NetworkManager 0.1.x\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2005-08-04 16:29+0200\n"
-"PO-Revision-Date: 2005-08-04 16:38+0200\n"
-"Last-Translator: Kjartan Maraas <kmaraas@gnome.org>\n"
-"Language-Team: Norwegian Bokmal <i18n-nb@lister.ping.uio.no>\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"Plural-Forms: nplurals=2; plural=(n != 1);\n"
-
-#. Setup a request to the keyring to save the network passphrase
-#: ../gnome/applet/applet-dbus-info.c:842
-#, c-format
-msgid "Passphrase for wireless network %s"
-msgstr "Passord for trådløst nettverk %s"
-
-#: ../gnome/applet/applet-dbus-info.c:1052
-#, c-format
-msgid ""
-"The requested wireless network '%s' does not appear to be in range. A "
-"different wireless network will be used if any are available."
-msgstr ""
-"Forespurt trådløst nettverk «%s» ser ut til å være utenfor rekkevidde. Et "
-"annet trådløst nettverk vil bli brukt hvis tilgjengelig."
-
-#: ../gnome/applet/applet-dbus.c:597
-#, c-format
-msgid "Connection to the wireless network '%s' failed.\n"
-msgstr "Tilkobling til trådløst nettverk «%s» feilet.\n"
-
-#: ../gnome/applet/applet-dbus.c:602
-msgid "Connection to the wired network failed.\n"
-msgstr "Tilkobling til trådløst nettverk feilet.\n"
-
-#: ../gnome/applet/applet.c:192
-msgid "Error displaying connection information: "
-msgstr "Feil under visning av tilkoblingsinformasjon:"
-
-#: ../gnome/applet/applet.c:217
-msgid "Could not find some required resources (the glade file)!"
-msgstr "Fant ikke nødvendige ressurser (glade-filen)."
-
-#: ../gnome/applet/applet.c:227
-msgid "No active connections!"
-msgstr "Ingen aktive tilkoblinger!"
-
-#: ../gnome/applet/applet.c:236
-msgid "Could not open socket!"
-msgstr "Kunne ikke åpne sokkel!"
-
-#: ../gnome/applet/applet.c:251
-msgid "Failed to get information about the interface!"
-msgstr "Fikk ikke informasjon om grensesnittet!"
-
-#: ../gnome/applet/applet.c:284
-#, c-format
-msgid "Wired Ethernet (%s)"
-msgstr "Kablet nettverk (%s)"
-
-#: ../gnome/applet/applet.c:286
-#, c-format
-msgid "Wireless Ethernet (%s)"
-msgstr "Trådløst nettverk (%s)"
-
-#: ../gnome/applet/applet.c:380 ../gnome/applet/applet.c:398
-msgid "NetworkManager Applet"
-msgstr "NetworkManager panelprogram"
-
-#: ../gnome/applet/applet.c:382 ../gnome/applet/applet.c:400
-msgid "Copyright (C) 2004-2005 Red Hat, Inc."
-msgstr "Opphavsrett © 2004-2005 Red Hat, Inc."
-
-#: ../gnome/applet/applet.c:383 ../gnome/applet/applet.c:401
-msgid ""
-"Notification area applet for managing your network devices and connections."
-msgstr "Et panelprogram for å håndtere nettverksenheter og tilkoblinger."
-
-#: ../gnome/applet/applet.c:486
-msgid "VPN Error"
-msgstr "Feil med VPN"
-
-#: ../gnome/applet/applet.c:490
-#, c-format
-msgid ""
-"<span weight=\"bold\" size=\"larger\">VPN Login Failure</span>\n"
-"\n"
-"Could not start the VPN connection '%s' due to a login failure.\n"
-"\n"
-"The VPN service said: \"%s\""
-msgstr ""
-"<span weight=\"bold\" size\"larger\">Feil med VPN-pålogging</span>\n"
-"\n"
-"Kunne ikke starte VPN-tilkobling «%s» på grunn av feil ved pålogging.\n"
-"\n"
-"Melding fra VPN-tjenesten: «%s»"
-
-#: ../gnome/applet/applet.c:495
-#, c-format
-msgid ""
-"<span weight=\"bold\" size=\"larger\">VPN Start Failure</span>\n"
-"\n"
-"Could not start the VPN connection '%s' due to a failure launching the VPN "
-"program.\n"
-"\n"
-"The VPN service said: \"%s\""
-msgstr ""
-"<span weight=\"bold\" size\"larger\">Feil med start av VPN</span>\n"
-"\n"
-"Kunne ikke starte VPN-tilkobling «%s» på grunn av feil ved oppstart av VPN-programmet.\n"
-"\n"
-"Melding fra VPN-tjenesten: «%s»"
-
-#: ../gnome/applet/applet.c:500
-#, c-format
-msgid ""
-"<span weight=\"bold\" size=\"larger\">VPN Connect Failure</span>\n"
-"\n"
-"Could not start the VPN connection '%s' due to a connection error.\n"
-"\n"
-"The VPN service said: \"%s\""
-msgstr ""
-"<span weight=\"bold\" size\"larger\">Feil med VPN-tilkobling</span>\n"
-"\n"
-"Kunne ikke starte VPN-tilkobling «%s» på grunn av feil ved tilkobling.\n"
-"\n"
-"Melding fra VPN-tjenesten: «%s»"
-
-#: ../gnome/applet/applet.c:505
-#, c-format
-msgid ""
-"<span weight=\"bold\" size=\"larger\">VPN Configuration Error</span>\n"
-"\n"
-"The VPN connection '%s' was not correctly configured.\n"
-"\n"
-"The VPN service said: \"%s\""
-msgstr ""
-"<span weight=\"bold\" size\"larger\">Feil med konfigurasjon av VPN</span>\n"
-"\n"
-"VPN-tilkobling «%s» er ikke korrekt konfigurert.\n"
-"\n"
-"Melding fra VPN-tjenesten: «%s»"
-
-#: ../gnome/applet/applet.c:510
-#, c-format
-msgid ""
-"<span weight=\"bold\" size=\"larger\">VPN Connect Failure</span>\n"
-"\n"
-"Could not start the VPN connection '%s' because the VPN server did not "
-"return an adequate network configuration.\n"
-"\n"
-"The VPN service said: \"%s\""
-msgstr ""
-"<span weight=\"bold\" size\"larger\">Feil med VPN-tilkobling</span>\n"
-"\n"
-"Kunne ikke starte VPN-tilkobling «%s» fordi VPN-tjeneren ikke returnerte riktig nettverkskonfigurasjon.\n"
-"\n"
-"Melding fra VPN-tjenesten: «%s»"
-
-#: ../gnome/applet/applet.c:577
-#, c-format
-msgid ""
-"<span weight=\"bold\" size=\"larger\">VPN Login Message</span>\n"
-"\n"
-"VPN connection '%s' said:\n"
-"\n"
-"\"%s\""
-msgstr ""
-"<span weight=\"bold\" size=\"larger\">PÃ¥loggingsmelding for VPN</span>\n"
-"\n"
-"Melding fra VPN-tilkobling: «%s»\n"
-"\n"
-"«%s»"
-
-#: ../gnome/applet/applet.c:795 ../gnome/applet/applet.c:2368
-#: ../gnome/applet/other-network-dialog.c:310
-#: ../gnome/applet/passphrase-dialog.c:397
-msgid ""
-"The NetworkManager Applet could not find some required resources (the glade "
-"file was not found)."
-msgstr ""
-"NetworkManager fant ikke nødvendige ressurser (glade-filen ble ikke funnet)."
-
-#: ../gnome/applet/applet.c:808
-#, c-format
-msgid "The network device \"%s (%s)\" does not support wireless scanning."
-msgstr "Nettverksenheten «%s (%s)» støtter ikke søk etter trådløse nettverk."
-
-#: ../gnome/applet/applet.c:815
-#, c-format
-msgid "The network device \"%s (%s)\" does not support link detection."
-msgstr ""
-"Nettverksenheten «%s (%s)» støtter ikke informasjon om tilkoblet status."
-
-#: ../gnome/applet/applet.c:936
-#, c-format
-msgid "Preparing device %s for the wired network..."
-msgstr "Klargjør enhet %s for det trådløse nettverket..."
-
-#: ../gnome/applet/applet.c:938
-#, c-format
-msgid "Preparing device %s for the wireless network '%s'..."
-msgstr "Klargjør enhet %s for trådløst nettverk «%s»..."
-
-#: ../gnome/applet/applet.c:945
-#, c-format
-msgid "Configuring device %s for the wired network..."
-msgstr "Konfigurerer enhet %s for kablet nettverk..."
-
-#: ../gnome/applet/applet.c:947
-#, c-format
-msgid "Attempting to join the wireless network '%s'..."
-msgstr "Forsøker å bruke trådløst nettverk «%s»..."
-
-#: ../gnome/applet/applet.c:954
-#, c-format
-msgid "Waiting for Network Key for the wireless network '%s'..."
-msgstr "Venter på nettverksnøkkel for trådløst nettverk «%s»..."
-
-#: ../gnome/applet/applet.c:961 ../gnome/applet/applet.c:970
-msgid "Requesting a network address from the wired network..."
-msgstr "Ber om en nettverksadresse fra kablet nettverk..."
-
-#: ../gnome/applet/applet.c:963 ../gnome/applet/applet.c:972
-#, c-format
-msgid "Requesting a network address from the wireless network '%s'..."
-msgstr "Ber om en nettverksadresse fra trådløst nettverk «%s»..."
-
-#: ../gnome/applet/applet.c:979
-msgid "Finishing connection to the wired network..."
-msgstr "Fullfører tilkobling til kablet nettverk..."
-
-#: ../gnome/applet/applet.c:981
-#, c-format
-msgid "Finishing connection to the wireless network '%s'..."
-msgstr "Fullfører tilkobling til trådløst nettverk «%s»..."
-
-#: ../gnome/applet/applet.c:1027
-msgid "NetworkManager is not running"
-msgstr "NetworkManager kjører ikke"
-
-#: ../gnome/applet/applet.c:1038
-msgid "No network connection"
-msgstr "Ingen nettverksforbindelse"
-
-#: ../gnome/applet/applet.c:1045
-msgid "Wired network connection"
-msgstr "Trådløs nettverkforbindelse"
-
-#: ../gnome/applet/applet.c:1052
-msgid "Connected to an Ad-Hoc wireless network"
-msgstr "Kobler til et Ad-Hoc trådløst nettverk"
-
-#: ../gnome/applet/applet.c:1066
-#, c-format
-msgid "Wireless network connection to '%s' (%d%%)"
-msgstr "Trådløs nettverksforbindelse til «%s» (%d%%)"
-
-#: ../gnome/applet/applet.c:1091
-#, c-format
-msgid "VPN connection to '%s'"
-msgstr "VPN-tilkobling til «%s»"
-
-#: ../gnome/applet/applet.c:1520
-msgid "_Connect to Other Wireless Network..."
-msgstr "_Koble til annet trådløst nettverk..."
-
-#: ../gnome/applet/applet.c:1541
-msgid "Create _New Wireless Network..."
-msgstr "Opprett _nytt trådløst nettverk..."
-
-#: ../gnome/applet/applet.c:1654
-#: ../gnome/vpn-properties/nm-vpn-properties.glade.h:17
-msgid "VPN Connections"
-msgstr "VPN-tilkoblinger"
-
-#: ../gnome/applet/applet.c:1681
-msgid "Configure VPN..."
-msgstr "Konfigurer VPN..."
-
-#: ../gnome/applet/applet.c:1685
-msgid "Disconnect VPN..."
-msgstr "Koble fra VPN..."
-
-#: ../gnome/applet/applet.c:1735
-msgid "No network devices have been found"
-msgstr "Ingen nettverksenheter ble funnet"
-
-#: ../gnome/applet/applet.c:1893
-msgid "NetworkManager is not running..."
-msgstr "NetworkManager kjører ikke..."
-
-#: ../gnome/applet/applet.c:1961
-msgid "_Stop All Wireless Devices"
-msgstr "_Stopp alle trådløse enheter"
-
-#: ../gnome/applet/applet.c:1966
-msgid "_Start All Wireless Devices"
-msgstr "S_tart alle trådløse enheter"
-
-#: ../gnome/applet/applet.c:1997
-msgid "_Wireless Network Discovery"
-msgstr "Sø_k etter trådløse nettverk"
-
-#: ../gnome/applet/applet.c:2000
-msgid "Always Search"
-msgstr "Alltid søk"
-
-#: ../gnome/applet/applet.c:2008
-msgid "Search Only When Disconnected"
-msgstr "Søk kun når frakoblet"
-
-#: ../gnome/applet/applet.c:2016
-msgid "Never Search"
-msgstr "Aldri søk"
-
-#. Stop All Wireless Devices item
-#: ../gnome/applet/applet.c:2028
-msgid "Stop All Wireless Devices"
-msgstr "Stopp alle trådløse enheter"
-
-#: ../gnome/applet/applet.c:2034
-msgid "Connection _Information"
-msgstr "Tilkoblings_informasjon"
-
-#: ../gnome/applet/applet.c:2042
-msgid "_Help"
-msgstr "_Hjelp"
-
-#: ../gnome/applet/applet.c:2049
-msgid "_About"
-msgstr "_Om"
-
-#: ../gnome/applet/applet.c:2518
-msgid ""
-"The NetworkManager applet could not find some required resources. It cannot "
-"continue.\n"
-msgstr ""
-"Panelprogrammet for NetworkManager fant ikke noen av de nødvendige "
-"ressursene. Det kan ikke fortsette.\n"
-
-#: ../gnome/applet/eggtrayicon.c:118
-msgid "Orientation"
-msgstr "Orientering"
-
-#: ../gnome/applet/eggtrayicon.c:119
-msgid "The orientation of the tray."
-msgstr "Orientering for trauet."
-
-#: ../gnome/applet/menu-items.c:89
-#, c-format
-msgid "Wired Network (%s)"
-msgstr "Kablet nettverk (%s)"
-
-#: ../gnome/applet/menu-items.c:92
-msgid "_Wired Network"
-msgstr "_Kablet nettverk"
-
-#: ../gnome/applet/menu-items.c:165
-#, c-format
-msgid "Wireless Network (%s)"
-msgid_plural "Wireless Networks (%s)"
-msgstr[0] "Trådløst nettverk (%s)"
-msgstr[1] "Trådløse nettverk (%s)"
-
-#: ../gnome/applet/menu-items.c:167
-msgid "Wireless Network"
-msgid_plural "Wireless Networks"
-msgstr[0] "Trådløst nettverk"
-msgstr[1] "Trådløse nettverk"
-
-#: ../gnome/applet/menu-items.c:309
-msgid " (invalid Unicode)"
-msgstr " (ugyldig Unicode)"
-
-#: ../gnome/applet/other-network-dialog.c:142
-#: ../gnome/applet/passphrase-dialog.c:156
-#: ../gnome/applet/wireless-applet.glade.h:34
-msgid "Passphrase:"
-msgstr "Passord:"
-
-#: ../gnome/applet/other-network-dialog.c:145
-#: ../gnome/applet/passphrase-dialog.c:159
-msgid "ASCII Key:"
-msgstr "ASCII-nøkkel:"
-
-#: ../gnome/applet/other-network-dialog.c:148
-#: ../gnome/applet/passphrase-dialog.c:162
-msgid "Hex Key:"
-msgstr "Heksadesimal nøkkel:"
-
-#: ../gnome/applet/other-network-dialog.c:224
-msgid "Create new wireless network"
-msgstr "Opprett nytt trådløst nettverk"
-
-#: ../gnome/applet/other-network-dialog.c:225
-msgid ""
-"Enter the ESSID and security settings of the wireless network you wish to "
-"create."
-msgstr ""
-"Oppgi ESSID og sikkerhetsinnstillinger for det trådløse nettverket du ønsker "
-"Ã¥ opprette."
-
-#: ../gnome/applet/other-network-dialog.c:230
-msgid "Custom wireless network"
-msgstr "Egedefinert trådløst nettverk"
-
-#: ../gnome/applet/other-network-dialog.c:231
-msgid "Enter the ESSID of the wireless network to which you wish to connect."
-msgstr "Oppgi ESSID for det trådløse nettverket du ønsker å koble deg til."
-
-#: ../gnome/applet/vpn-password-dialog.c:152
-#: ../gnome/applet/vpn-password-dialog.c:191
-#, c-format
-msgid "Cannot start VPN connection '%s'"
-msgstr "Kan ikke starte VPN-tilkobling «%s»"
-
-#: ../gnome/applet/vpn-password-dialog.c:155
-#, c-format
-msgid ""
-"Could not find the authentication dialog for VPN connection type '%s'. "
-"Contact your system administrator."
-msgstr ""
-"Fant ikke autentiseringsdialogen for VPN tilkoblingstypen «%s». Kontakt din "
-"systemadministrator."
-
-#: ../gnome/applet/vpn-password-dialog.c:194
-#, c-format
-msgid ""
-"There was a problem launching the authentication dialog for VPN connection "
-"type '%s'. Contact your system administrator."
-msgstr ""
-"Det oppstod en feil under oppstart av autentiseringsdialogen for VPN "
-"tilkoblingstypen «%s». Kontakt din systemadministrator."
-
-#: ../gnome/applet/wireless-applet.glade.h:1
-msgid " "
-msgstr " "
-
-#: ../gnome/applet/wireless-applet.glade.h:2
-msgid ""
-"128-bit Passphrase (WEP)\n"
-"ASCII Key (WEP)\n"
-"Hex Key (WEP)"
-msgstr ""
-"128-bit passord (WEP)\n"
-"ASCII-nøkkel (WEP)\n"
-"Heksadesimal nøkkel (WEP)"
-
-#: ../gnome/applet/wireless-applet.glade.h:5
-msgid ""
-"128-bit passphrase (WEP)\n"
-"ASCII key (WEP)\n"
-"Hex key (WEP)"
-msgstr ""
-"128-bit passord (WEP)\n"
-"ASCII-nøkkel (WEP)\n"
-"Heksadesimal nøkkel (WEP)"
-
-#: ../gnome/applet/wireless-applet.glade.h:8
-msgid ""
-"<span weight=\"bold\" size=\"larger\">Active Connection Information</span>"
-msgstr "<span weight=\"bold\" size=\"larger\">Informasjon om aktiv tilkobling</span>"
-
-#: ../gnome/applet/wireless-applet.glade.h:10
-#, no-c-format
-msgid ""
-"<span weight=\"bold\" size=\"larger\">Passphrase Required by Wireless "
-"Network</span>\n"
-"\n"
-"A passphrase or encryption key is required to access the wireless network '%"
-"s'."
-msgstr ""
-"<span weight=\"bold\" size=\"larger\">Passord kreves for trådløst nettverk</"
-"span>\n"
-"\n"
-"Ett passord eller en krypteringsnøkkel kreves for å aksessere trådløst "
-"nettverk «%s»."
-
-#: ../gnome/applet/wireless-applet.glade.h:14
-#, no-c-format
-msgid ""
-"<span weight=\"bold\" size=\"larger\">Reduced Network Functionality</span>\n"
-"\n"
-"%s It will not be completely functional."
-msgstr ""
-"<span weight=\"bold\" size=\"larger\">Redusert nettverksfunksjonalitet</"
-"span>\n"
-"\n"
-"%s Ikke fullstendig funksjonell."
-
-#: ../gnome/applet/wireless-applet.glade.h:18
-#, no-c-format
-msgid ""
-"<span weight=\"bold\" size=\"larger\">Wireless Network Login Confirmation</"
-"span>\n"
-"\n"
-"You have chosen to log in to the wireless network '%s'. If you are sure "
-"that this wireless network is secure, click the checkbox below and "
-"NetworkManager will not require confirmation on subsequent log ins."
-msgstr ""
-"<span weight=\"bold\" size=\"larger\">Bekreftelse av pålogging på trådløst "
-"nettverk</span>\n"
-"\n"
-"Du har valgt å logge inn på trådløst nettverk «%s». Hvis du er sikker på at "
-"dette trådløse nettverket er sikkert kan du be NetworkManager om å slutte å "
-"spørre spørsmål når du kobler deg til det ved å krysse av i boksen nedenfor."
-
-#: ../gnome/applet/wireless-applet.glade.h:21
-msgid "Always Trust this Wireless Network"
-msgstr "Stol alltid på dette trådløse nettverket"
-
-#: ../gnome/applet/wireless-applet.glade.h:22
-msgid "Broadcast Address:"
-msgstr "Kringkastingsadresse:"
-
-#: ../gnome/applet/wireless-applet.glade.h:23
-msgid "C_onnect"
-msgstr "K_oble til"
-
-#: ../gnome/applet/wireless-applet.glade.h:24
-msgid "Connect with encryption enabled"
-msgstr "Koble til med kryptering"
-
-#: ../gnome/applet/wireless-applet.glade.h:25
-msgid "Connection Information"
-msgstr "Tilkoblingsinformasjon"
-
-#: ../gnome/applet/wireless-applet.glade.h:26
-msgid "Destination Address:"
-msgstr "MÃ¥ladresse:"
-
-#: ../gnome/applet/wireless-applet.glade.h:27
-msgid "Don't remind me again"
-msgstr "Ikke vis påminnelse igjen"
-
-#: ../gnome/applet/wireless-applet.glade.h:28
-msgid "Hardware Address:"
-msgstr "Maskinvareadresse:"
-
-#: ../gnome/applet/wireless-applet.glade.h:29
-msgid "IP Address:"
-msgstr "IP adresse:"
-
-#: ../gnome/applet/wireless-applet.glade.h:30
-msgid "Interface:"
-msgstr "Grensesnitt:"
-
-#: ../gnome/applet/wireless-applet.glade.h:31
-msgid "Key Type:"
-msgstr "Type nøkkel:"
-
-#: ../gnome/applet/wireless-applet.glade.h:32
-msgid "Key type:"
-msgstr "Type nøkkel:"
-
-#: ../gnome/applet/wireless-applet.glade.h:33
-msgid "Other Wireless Network..."
-msgstr "Annet trådløst nettverk..."
-
-#: ../gnome/applet/wireless-applet.glade.h:35
-msgid "Subnet Mask:"
-msgstr "Subnettmaske:"
-
-#: ../gnome/applet/wireless-applet.glade.h:36
-msgid "Wireless Network Key Required"
-msgstr "Nøkkel for trådløst nettverk kreves"
-
-#: ../gnome/applet/wireless-applet.glade.h:37
-msgid "Wireless _adapter:"
-msgstr "Trådløst _kort:"
-
-#: ../gnome/applet/wireless-applet.glade.h:38
-msgid "Wireless _network:"
-msgstr "Trådløst _nettverk:"
-
-#: ../gnome/applet/wireless-applet.glade.h:39
-msgid "_Login to Network"
-msgstr "_Logg på nettverk"
-
-#: ../gnome/applet/wireless-applet.glade.h:40
-msgid "_OK"
-msgstr "_OK"
-
-#: ../gnome/vpn-properties/nm-vpn-properties.c:374
-msgid "Cannot add VPN connection"
-msgstr "Kan ikke legge til VPN-tilkobling"
-
-#: ../gnome/vpn-properties/nm-vpn-properties.c:376
-msgid ""
-"No suitable VPN software was found on your system. Contact your system "
-"administrator."
-msgstr ""
-"Ingen passende VPN-programvare ble funnet på systemet. Kontakt din "
-"systemadministrator."
-
-#: ../gnome/vpn-properties/nm-vpn-properties.c:428
-msgid "Cannot import VPN connection"
-msgstr "Kan ikke importere VPN-tilkobling"
-
-#: ../gnome/vpn-properties/nm-vpn-properties.c:430
-#, c-format
-msgid ""
-"Cannot find suitable software for VPN connection type '%s' to import the "
-"file '%s'. Contact your system administrator."
-msgstr "Kan ikke finne passende programvare for VPN-tilkobling av type «%s» for import av fil «%s». Kontakt din sysstemadministrator."
-
-#: ../gnome/vpn-properties/nm-vpn-properties.c:570
-#, c-format
-msgid "Error retrieving VPN connection '%s'"
-msgstr "Feil under henting av VPN tilkobling «%s»"
-
-#: ../gnome/vpn-properties/nm-vpn-properties.c:573
-#, c-format
-msgid ""
-"Could not find the UI files for VPN connection type '%s'. Contact your "
-"system administrator."
-msgstr "Kunne ikke finne brukergrensesnittfiler for VPN-tilkobling type «%s». Kontakt din systemadministrator."
-
-#: ../gnome/vpn-properties/nm-vpn-properties.c:733
-#, c-format
-msgid "Delete VPN connection \"%s\"?"
-msgstr "Slett VPN-tilkobling «%s»?"
-
-#: ../gnome/vpn-properties/nm-vpn-properties.c:736
-#, c-format
-msgid ""
-"All information about the VPN connection \"%s\" will be lost and you may "
-"need your system administrator to provide information to create a new "
-"connection."
-msgstr "All informasjon om VPN-tilkobling «%s» vil gå tapt og du vil kanskje trenge hjelp fra din systemadministrator for å opprette en ny tilkobling."
-
-#: ../gnome/vpn-properties/nm-vpn-properties.c:951
-msgid "Unable to load"
-msgstr "Kunne ikke laste"
-
-#: ../gnome/vpn-properties/nm-vpn-properties.c:953
-msgid "Cannot find some needed resources (the glade file)!"
-msgstr "Fant ikke nødvendige ressurser (glade-filen)."
-
-#. Edit dialog
-#: ../gnome/vpn-properties/nm-vpn-properties.c:1071
-msgid "Edit VPN Connection"
-msgstr "Rediger VPN-tilkobling"
-
-#: ../gnome/vpn-properties/nm-vpn-properties.glade.h:1
-msgid "Add a new VPN connection"
-msgstr "Legg til en ny VPN-tilkobling"
-
-#: ../gnome/vpn-properties/nm-vpn-properties.glade.h:2
-msgid "Connect to:"
-msgstr "Koble til:"
-
-#: ../gnome/vpn-properties/nm-vpn-properties.glade.h:3
-msgid "Create VPN Connection"
-msgstr "Opprett VPN-tilkobling"
-
-#: ../gnome/vpn-properties/nm-vpn-properties.glade.h:4
-msgid "Create VPN Connection - 1 of 2"
-msgstr "Opprett VPN-tilkobling - 1 av 2"
-
-#: ../gnome/vpn-properties/nm-vpn-properties.glade.h:5
-msgid "Create VPN Connection - 2 of 2"
-msgstr "Opprett VPN-tilkobling - 2 av 2"
-
-#: ../gnome/vpn-properties/nm-vpn-properties.glade.h:6
-msgid "Delete the selected VPN connection"
-msgstr "Slett valgt VPN-tilkobling"
-
-#: ../gnome/vpn-properties/nm-vpn-properties.glade.h:7
-msgid ""
-"Dependent on the private network you want to connect to, you need to select "
-"what type of connection you want to create."
-msgstr ""
-"Du må velge hvilken type tilkobling du vil opprette avhengig av det private "
-"nettverket du vil koble til."
-
-#: ../gnome/vpn-properties/nm-vpn-properties.glade.h:8
-msgid "E_xport"
-msgstr "E_ksporter"
-
-#: ../gnome/vpn-properties/nm-vpn-properties.glade.h:9
-msgid "Edit the selected VPN connection"
-msgstr "Rediger valgt VPN-tilkobling"
-
-#: ../gnome/vpn-properties/nm-vpn-properties.glade.h:10
-msgid "Export VPN connection to a file"
-msgstr "Eksporter VPN-tilkobling til en fil"
-
-#: ../gnome/vpn-properties/nm-vpn-properties.glade.h:11
-msgid "Export the VPN settings to a file"
-msgstr "Eksporter innstillinger for VPN til en fil"
-
-#: ../gnome/vpn-properties/nm-vpn-properties.glade.h:12
-msgid "Finish create VPN Connection"
-msgstr "Fullfør oppretting av VPN-tilkobling"
-
-#: ../gnome/vpn-properties/nm-vpn-properties.glade.h:13
-msgid "Manage Virtual Private Network connections"
-msgstr "HÃ¥ndter tilkoblinger til Virtuelle Private Nettverk"
-
-#: ../gnome/vpn-properties/nm-vpn-properties.glade.h:14
-msgid ""
-"This assistant will guide you through the creation of a new VPN connection "
-"to a private network.\n"
-"\n"
-"It will require some information, such as IP addresses and secrets, that "
-"will probably be provided by your system administrator as appropriate."
-msgstr ""
-"Denne assistenten vil hjelpe deg gjennom oppretting av en ny VPN-tilkobling.\n"
-"\n"
-"Du vil trenge en del informasjon slik som IP-adresse og passord. Du vil sannsynligvis kunne få denne informasjonen fra din systemadministrator."
-
-#: ../src/nm-netlink-monitor.c:159
-#, c-format
-msgid ""
-"unable to create netlink socket for monitoring wired ethernet devices - %s"
-msgstr ""
-"kan ikke opprette netlink-plugg for overvåking av kablede ethernet-enheter - "
-"%s"
-
-#: ../src/nm-netlink-monitor.c:177
-#, c-format
-msgid ""
-"unable to bind to netlink socket for monitoring wired ethernet devices - %s"
-msgstr ""
-"kan ikke binde til netlink-plugg for overvåking av kablede ethernet-enheter "
-"- %s"
-
-#: ../src/nm-netlink-monitor.c:408
-msgid "operation took too long"
-msgstr "operasjonen tok for lang tid"
-
-#: ../src/nm-netlink-monitor.c:505
-msgid "received data from wrong type of sender"
-msgstr "mottok data fra feil type avsender"
-
-#: ../src/nm-netlink-monitor.c:518
-msgid "received data from unexpected sender"
-msgstr "mottok data fra uventet avsender"
-
-#: ../src/nm-netlink-monitor.c:540
-#, c-format
-msgid "%s"
-msgstr "%s"
-
-#: ../src/nm-netlink-monitor.c:649
-msgid "too much data was sent over socket and some of it was lost"
-msgstr "for mye data ble sendt over pluggen og noe data gikk tapt"
-
-#: ../src/nm-netlink-monitor.c:738
-msgid "error occurred while waiting for data on socket"
-msgstr "det skjedde en feil under venting på data på sokkel"
diff --git a/po/pa.po b/po/pa.po
deleted file mode 100644
index 81a69e73ca..0000000000
--- a/po/pa.po
+++ /dev/null
@@ -1,268 +0,0 @@
-# translation of NetworkManager.HEAD.po to Punjabi
-# translation of pa.po to Punjabi
-# This file is distributed under the same license as the PACKAGE package.
-# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER.
-# Amanpreet Singh Alam <aalam@redhat.com>, 2004.
-# Amanpreet Singh Alam <amanpreetalam@yahoo.com>, 2005.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: NetworkManager.HEAD\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2005-03-05 11:56+0100\n"
-"PO-Revision-Date: 2005-03-05 18:06+0530\n"
-"Last-Translator: Amanpreet Singh Alam <amanpreetalam@yahoo.com>\n"
-"Language-Team: Punjabi <fedora-trans-pa@redhat.com>\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"X-Generator: KBabel 1.9.1\n"
-"Plural-Forms: nplurals=2; plural=(n != 1);\n"
-"\n"
-
-#: info-daemon/networks.glade.h:1
-msgid "<span weight=\"bold\">Wireless Networks:</span>"
-msgstr "<span weight=\"bold\">ਬੇਤਾਰ ਨੈੱਟਵਰਕ:</span>"
-
-#: info-daemon/networks.glade.h:2
-msgid "Modify Wireless Networks"
-msgstr "ਬੇਤਾਰ ਨੈੱਟਵਰਕ ਸੋਧ"
-
-#: info-daemon/passphrase.glade.h:1
-msgid "*"
-msgstr "*"
-
-#: info-daemon/passphrase.glade.h:2
-msgid ""
-"128-bit Passphrase (WEP)\n"
-"Ascii Key (WEP)\n"
-"Hex Key (WEP)"
-msgstr ""
-"128-bit ਪà©à¨¹à©ˆà¨°à¨¾ (WEP)\n"
-"Ascii ਕà©à©°à¨œà©€ (WEP)\n"
-"Hex ਕà©à©°à¨œà©€ (WEP)"
-
-#: info-daemon/passphrase.glade.h:6
-#, no-c-format
-msgid ""
-"<span weight=\"bold\" size=\"larger\">Passphrase Required by Wireless "
-"Network</span>\n"
-"\n"
-"A passphrase or encryption key is required to access the wireless network '%"
-"s'."
-msgstr ""
-
-#: info-daemon/passphrase.glade.h:9
-msgid "Key Type:"
-msgstr "ਕà©à©°à¨œà©€ ਕਿਸਮ:"
-
-#: info-daemon/passphrase.glade.h:10
-#: info-daemon/NetworkManagerInfoPassphraseDialog.c:139
-#: panel-applet/NMWirelessAppletOtherNetworkDialog.c:150
-#: panel-applet/essid.glade.h:7
-msgid "Passphrase:"
-msgstr "ਪà©à¨°à¨¸à©°à¨—:"
-
-#: info-daemon/passphrase.glade.h:11
-msgid "Wireless Network Key Required"
-msgstr "ਬੇਤਾਰ ਨੈੱਟਵਰਕ ਸਵਿੱਚ ਲੋੜੀਦਾ"
-
-#: info-daemon/passphrase.glade.h:12
-msgid "_Login to Network"
-msgstr "ਨੈਟਵਰਕ ਤੇ ਲਾਗਿੰਨ(_L)"
-
-#: info-daemon/NetworkManagerInfoPassphraseDialog.c:142
-#: panel-applet/NMWirelessAppletOtherNetworkDialog.c:153
-msgid "Ascii Key:"
-msgstr "Ascii ਕà©à©°à¨œà©€:"
-
-#: info-daemon/NetworkManagerInfoPassphraseDialog.c:145
-#: panel-applet/NMWirelessAppletOtherNetworkDialog.c:156
-msgid "Hex Key:"
-msgstr "Hex ਕà©à©°à¨œà©€:"
-
-#: info-daemon/NetworkManagerInfoVPN.c:157
-#, c-format
-msgid "You must log in to access the private network %s"
-msgstr "ਤà©à¨¹à¨¾à¨¨à©‚à©° ਨਿੱਜੀ ਨੈਟਵਰਕ %s ਨੂੰ ਵਰਤਣ ਲਈ ਲਾਗਿੰਨ ਕਰਨਾ ਪਵੇਗਾ"
-
-#: panel-applet/NMWirelessApplet.c:142 panel-applet/NMWirelessApplet.c:160
-msgid "NetworkManager Applet"
-msgstr "ਨੈਟਵਰਕਮੈਨੇਜਰ à¨à¨ªà¨²à¨¿à¨Ÿ"
-
-#: panel-applet/NMWirelessApplet.c:144 panel-applet/NMWirelessApplet.c:162
-msgid "Copyright (C) 2004-2005 Red Hat, Inc."
-msgstr "ਹੱਕ ਰਾਖਵੇਂ ਹਨ (C) 2004-2005 Red Hat, Inc."
-
-#: panel-applet/NMWirelessApplet.c:145 panel-applet/NMWirelessApplet.c:163
-msgid "Notification area applet for managing your network devices and connections."
-msgstr "ਸੂਚਨਾ ਖੇਤਰ à¨à¨ªà¨²à¨¿à¨Ÿ, ਜੋ ਕਿ ਵੇਖਾਉਦਾ ਹੈ ਕਿ ਤà©à¨¹à¨¾à¨¡à©‡ ਨੈਟਵਰਕ ਜੰਤਰਾਂ ਅਤੇ ਕà©à¨¨à©ˆà¨•à¨¶à¨¨à¨¾à¨‚ ਨੂੰ ਕਿਵੇਂ ਵੇਖਿਆ ਜਾਵੇ।"
-
-#: panel-applet/NMWirelessApplet.c:379
-msgid "No network connection"
-msgstr "ਕੋਈ ਨੈਟਵਰਕ ਕà©à¨¨à©ˆà¨•à¨¶à¨¨ ਨਹੀਂ"
-
-#: panel-applet/NMWirelessApplet.c:384
-msgid "Wired network connection"
-msgstr "ਬੇਤਾਰ ਨੈੱਟਵਰਕ ਕà©à¨¨à©ˆà¨•à¨¶à¨¨"
-
-#: panel-applet/NMWirelessApplet.c:389
-msgid "Connecting to a wired network..."
-msgstr "ਤਾਰ ਵਾਲੇ ਨੈਟਵਰਕ ਨਾਲ ਜà©à©œà¨¿à¨† ਜਾ ਰਿਹਾ ਹੈ..."
-
-#: panel-applet/NMWirelessApplet.c:398
-msgid "Connected to an Ad-Hoc wireless network"
-msgstr "Ad-Hoc ਬੇਤਾਰ ਨੈਟਵਰਕ ਨਾਲ ਜà©à©œà¨¿à¨†"
-
-#: panel-applet/NMWirelessApplet.c:412
-#, c-format
-msgid "Wireless network connection to '%s' (%d%%)"
-msgstr "'%s' (%d%%) ਲਈ ਬੇਤਾਰ ਨੈਟਵਰਕ ਕà©à¨¨à©ˆà¨•à¨¶à¨¨"
-
-#: panel-applet/NMWirelessApplet.c:417
-msgid "Wireless network connection"
-msgstr "ਬੇਤਾਰ ਨੈੱਟਵਰਕ ਸੋਧ"
-
-#: panel-applet/NMWirelessApplet.c:422
-#, c-format
-msgid "Connecting to wireless network '%s'..."
-msgstr "ਬੇਤਾਰ ਨੈੱਟਵਰਕ '%s' ਨਾਲ ਜà©à©œà¨¿à¨† ਜਾ ਰਿਹਾ ਹੈ..."
-
-#: panel-applet/NMWirelessApplet.c:428
-msgid "NetworkManager is not running"
-msgstr "ਨੈਟਵਰਕ ਮੈਨੇਜਰ ਚੱਲ ਨਹੀਂ ਜਾ ਰਿਹਾ ਹੈ"
-
-#: panel-applet/NMWirelessApplet.c:433
-msgid "Scanning for wireless networks..."
-msgstr "ਬੇਤਾਰ ਨੈੱਟਵਰਕ ਲਈ ਖੋਜ ਜਾਰੀ ਹੈ..."
-
-#: panel-applet/NMWirelessApplet.c:798
-msgid "Other Wireless Networks..."
-msgstr "ਹੋਰ ਬੇਤਾਰ ਨੈੱਟਵਰਕ..."
-
-#: panel-applet/NMWirelessApplet.c:819
-msgid "Create new Wireless Network..."
-msgstr "ਨਵਾਂ ਬੇਤਾਰ ਨੈੱਟਵਰਕ ਬਣਾਓ..."
-
-#: panel-applet/NMWirelessApplet.c:895
-msgid "No network devices have been found"
-msgstr "ਕੋਈ ਨੈਟਵਰਕ ਜੰਤਰ ਨਹੀਂ ਲੱਭਿਆ"
-
-#: panel-applet/NMWirelessApplet.c:1037
-msgid "NetworkManager is not running..."
-msgstr "ਨੈਟਵਰਕਮੈਨੇਜਰ ਚੱਲ ਨਹੀਂ ਰਿਹਾ ਹੈ..."
-
-#: panel-applet/NMWirelessApplet.c:1107 panel-applet/NMWirelessApplet.c:1156
-msgid "Pause Wireless Scanning"
-msgstr "ਬੇਤਾਰ ਪੜਤਾਲ ਰੋਕੋ"
-
-#: panel-applet/NMWirelessApplet.c:1112
-msgid "Resume Wireless Scanning"
-msgstr "ਬੇਤਾਰ ਪੜਤਾਲ ਮà©à©œ ਚਾਲੂ"
-
-#: panel-applet/NMWirelessApplet.c:1122 panel-applet/NMWirelessApplet.c:1162
-msgid "Stop All Wireless Devices"
-msgstr "ਸਭ ਬੇਤਾਰ ਜੰਤਰ ਰੋਕੋ"
-
-#: panel-applet/NMWirelessApplet.c:1127
-msgid "Start All Wireless Devices"
-msgstr "ਸਭ ਬੇਤਾਰ ਜੰਤਰ ਸ਼à©à¨°à©‚"
-
-#: panel-applet/NMWirelessApplet.c:1172
-msgid "Help"
-msgstr "ਸਹਾਇਤਾ"
-
-#: panel-applet/NMWirelessApplet.c:1179
-msgid "About"
-msgstr "ਇਸ ਬਾਰੇ"
-
-#: panel-applet/NMWirelessAppletOtherNetworkDialog.c:229
-msgid "Create new wireless network"
-msgstr "ਬੇਤਾਰ ਨੈੱਟਵਰਕ ਬਣਾਓ"
-
-#: panel-applet/NMWirelessAppletOtherNetworkDialog.c:230
-msgid ""
-"Enter the ESSID and security settings of the wireless network you wish to "
-"create."
-msgstr ""
-
-#: panel-applet/NMWirelessAppletOtherNetworkDialog.c:235
-msgid "Custom wireless network"
-msgstr "ਬੇਤਾਰ ਨੈੱਟਵਰਕ ਸੋਧ"
-
-#: panel-applet/NMWirelessAppletOtherNetworkDialog.c:236
-msgid "Enter the ESSID of the wireless network to which you wish to connect."
-msgstr ""
-
-#. Reuse the above string to make the translators less angry.
-#: panel-applet/NMWirelessAppletOtherNetworkDialog.c:316
-#: panel-applet/NMWirelessAppletOtherNetworkDialog.c:325
-msgid ""
-"The NetworkManager Applet could not find some required resources (the glade "
-"file was not found)."
-msgstr ""
-
-#: panel-applet/essid.glade.h:1
-msgid ""
-"128-bit passphrase (WEP)\n"
-"Ascii key (WEP)\n"
-"Hex key (WEP)"
-msgstr ""
-"128-bit ਪà©à¨¹à©ˆà¨°à¨¾ (WEP)\n"
-"Ascii ਕà©à©°à¨œà©€ (WEP)\n"
-"Hex ਕà©à©°à¨œà©€ (WEP)"
-
-#: panel-applet/essid.glade.h:4
-msgid "C_onnect"
-msgstr "ਕà©à¨¨à©ˆà¨•à¨¶à¨¨(_o)"
-
-#: panel-applet/essid.glade.h:5
-msgid "Connect with encryption enabled"
-msgstr "ਇਕà©à¨°à¨¿à¨ªà¨¶à¨¨ ਨਾਲ ਕà©à¨¨à©ˆà¨•à¨¶à¨¨ ਯੋਗ"
-
-#: panel-applet/essid.glade.h:6
-msgid "Key type:"
-msgstr "ਕà©à©°à¨œà©€ ਕਿਸਮ:"
-
-#: panel-applet/essid.glade.h:8
-msgid "Wireless _adapter:"
-msgstr "ਬੇਤਾਰ à¨à¨¡à¨ªà¨Ÿà¨°(_a):"
-
-#: panel-applet/essid.glade.h:9
-msgid "Wireless _network:"
-msgstr "ਬੇਤਾਰ ਨੈਟਵਰਕ(_n):"
-
-#: panel-applet/menu-info.c:91
-#, c-format
-msgid "Wired Network (%s)"
-msgstr "ਤਾਰ ਨੈਟਰਵਕ (%s)"
-
-#: panel-applet/menu-info.c:93
-msgid "Wired Network"
-msgstr "ਤਾਰ ਨੈੱਟਵਰਕ"
-
-#: panel-applet/menu-info.c:166
-#, c-format
-msgid "Wireless Network (%s)"
-msgid_plural "Wireless Networks (%s)"
-msgstr[0] "ਬੇਤਾਰ ਨੈੱਟਵਰਕ (%s)"
-msgstr[1] "ਬੇਤਾਰ ਨੈੱਟਵਰਕ (%s)"
-
-#: panel-applet/menu-info.c:168
-msgid "Wireless Network"
-msgid_plural "Wireless Networks"
-msgstr[0] "ਬੇਤਾਰ ਨੈੱਟਵਰਕ"
-msgstr[1] "ਬੇਤਾਰ ਨੈੱਟਵਰਕ"
-
-#: panel-applet/menu-info.c:294
-msgid " (invalid Unicode)"
-msgstr " (ਗਲਤ ਯੂਨੀਕੋਡ)"
-
-#: examples/python/systray/eggtrayicon.c:111
-msgid "Orientation"
-msgstr "ਸਥਿਤੀ"
-
-#: examples/python/systray/eggtrayicon.c:112
-msgid "The orientation of the tray."
-msgstr "ਟਰੇ ਦੀ ਸਥਿਤੀ ਹੈ।"
-
diff --git a/po/pt_BR.po b/po/pt_BR.po
deleted file mode 100644
index ba58d4dd46..0000000000
--- a/po/pt_BR.po
+++ /dev/null
@@ -1,188 +0,0 @@
-# Brazilian Portuguese translation of NetworkManager.
-# Copyright (C) 2004 Free Software Foundation, Inc.
-# This file is distributed under the same license as the NetworkManager package.
-# Raphael Higino <raphaelh@uai.com.br>, 2004.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: NetworkManager\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2004-10-19 13:38-0400\n"
-"PO-Revision-Date: 2004-09-22 08:56-0300\n"
-"Last-Translator: Raphael Higino <raphaelh@uai.com.br>\n"
-"Language-Team: Brazilian Portuguese <gnome-l10n-br@listas.cipsga.org.br>\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"Plural-Forms: nplurals=2; plural=(n > 1);\n"
-
-#: info-daemon/networks.glade:11
-msgid "Modify Wireless Networks"
-msgstr "Modificar Redes Sem Fio"
-
-#: info-daemon/networks.glade:92
-msgid "<span weight=\"bold\">Wireless Networks:</span>"
-msgstr "<span weight=\"bold\">Redes Sem Fio:</span>"
-
-#: info-daemon/passphrase.glade:9
-msgid "Wireless Network Key Required"
-msgstr "Chave da Rede Sem Fio Requerida"
-
-#: info-daemon/passphrase.glade:52
-msgid "_Login to Network"
-msgstr "_Entrar na rede"
-
-#: info-daemon/passphrase.glade:100
-msgid ""
-"<span weight=\"bold\" size=\"larger\">Passphrase Required by Wireless "
-"Network</span>\n"
-"\n"
-"A passphrase or encryption key is required to access the wireless network '%"
-"s'."
-msgstr ""
-"<span weight=\"bold\" size=\"larger\">Frase Secreta Requerida pela Rede Sem "
-"Fio</span>\n"
-"\n"
-"Uma frase secreta ou uma chave de criptografia é requerida para acessar a "
-"rede sem fio '%s'."
-
-#: info-daemon/passphrase.glade:129
-msgid "Key Type:"
-msgstr "Tipo de Chave:"
-
-#: info-daemon/passphrase.glade:150
-msgid ""
-"128-bit Passphrase\n"
-"128-bit Raw Hex Key"
-msgstr ""
-"Frase Secreta de 128 bits\n"
-"Chave Hexa Bruta de 128 bits"
-
-#: info-daemon/passphrase.glade:180
-#: info-daemon/NetworkManagerInfoPassphraseDialog.c:101
-msgid "Passphrase:"
-msgstr "Frase Secreta:"
-
-#: info-daemon/passphrase.glade:208 panel-applet/essid.glade:162
-msgid "*"
-msgstr "*"
-
-#: info-daemon/NetworkManagerInfoPassphraseDialog.c:104
-msgid "Key:"
-msgstr "Chave:"
-
-#. Reuse the above string to make the translators less angry.
-#: panel-applet/NMWirelessApplet.c:691 panel-applet/NMWirelessApplet.c:701
-msgid ""
-"The NetworkManager Applet could not find some required resources (the glade "
-"file was not found)."
-msgstr ""
-"O mini-aplicativo Gerenciador de Rede não pôde encontrar alguns recursos "
-"requeridos (o arquivo glade não foi encontrado)."
-
-#: panel-applet/NMWirelessApplet.c:716
-msgid "Custom wireless network"
-msgstr "Rede sem fio personalizada"
-
-#: panel-applet/NMWirelessApplet.c:717
-msgid "Enter the ESSID of the wireless network to which you wish to connect."
-msgstr "Digite a ESSID da rede sem fio com a qual você deseja se conectar."
-
-#: panel-applet/NMWirelessApplet.c:800
-msgid "Other Wireless Networks..."
-msgstr "Outras Redes Sem Fio..."
-
-#: panel-applet/NMWirelessApplet.c:911
-msgid "No network devices have been found"
-msgstr "Nenhum dispositivo de rede foi encontrado"
-
-#: panel-applet/NMWirelessApplet.c:1028
-msgid "NetworkManager is not running..."
-msgstr "O Gerenciador de Rede não está sendo executado..."
-
-#: panel-applet/essid.glade:52
-msgid "C_onnect"
-msgstr "C_onectar"
-
-#: panel-applet/essid.glade:131
-msgid "Wireless _Network:"
-msgstr "_Rede Sem Fio:"
-
-#: panel-applet/essid.glade:177
-msgid "Wireless _adapter:"
-msgstr "_Adaptador Sem Fio:"
-
-#: panel-applet/menu-info.c:101
-#, c-format
-msgid "Wired Network (%s)"
-msgstr "Rede Por Fios (%s)"
-
-#: panel-applet/menu-info.c:103
-msgid "Wired Network"
-msgstr "Rede Por Fios"
-
-#: panel-applet/menu-info.c:168
-#, c-format
-msgid "Wireless Network (%s)"
-msgid_plural "Wireless Networks (%s)"
-msgstr[0] "Rede Sem Fio (%s)"
-msgstr[1] "Redes Sem Fio (%s)"
-
-#: panel-applet/menu-info.c:170
-msgid "Wireless Network"
-msgid_plural "Wireless Networks"
-msgstr[0] "Rede Sem Fio"
-msgstr[1] "Redes Sem Fio"
-
-#: panel-applet/menu-info.c:307
-msgid " (invalid Unicode)"
-msgstr " (Unicode inválido)"
-
-#: examples/python/systray/eggtrayicon.c:111
-msgid "Orientation"
-msgstr "Orientação"
-
-#: examples/python/systray/eggtrayicon.c:112
-msgid "The orientation of the tray."
-msgstr "A orientação da bandeja."
-
-#~ msgid "_About..."
-#~ msgstr "_Sobre..."
-
-#~ msgid " "
-#~ msgstr " "
-
-#~ msgid ""
-#~ "<span weight=\"bold\" size=\"larger\">Wireless Network Login "
-#~ "Confirmation</span>\n"
-#~ "\n"
-#~ "You have chosen log in to the wireless network '%s'. If you are sure "
-#~ "this wireless network is secure, click the checkbox below and "
-#~ "NetworkManager will no longer pester you with stupid questions when you "
-#~ "connect to it."
-#~ msgstr ""
-#~ "<span weight=\"bold\" size=\"larger\">Confirmação de Entrada em Rede Sem "
-#~ "Fio</span>\n"
-#~ "\n"
-#~ "Você escolheu entrar na rede sem fio '%s'. Se você tem certeza de que "
-#~ "essa rede é segura, clique na caixa de verificação abaixo e o Gerenciador "
-#~ "de Rede não vai mais te incomodar com perguntas estúpidas quando você se "
-#~ "conectar nela."
-
-#~ msgid "Always Trust this Wireless Network"
-#~ msgstr "Sempre confiar nessa rede sem fio"
-
-#~ msgid "There are no network devices..."
-#~ msgstr "Não há nenhum dispositivo de rede..."
-
-#~ msgid "There are no wireless networks..."
-#~ msgstr "Não há nenhum dispositivo sem fio..."
-
-#~ msgid "Network Connections"
-#~ msgstr "Conexões de Rede"
-
-#~ msgid "No network connection is currently active..."
-#~ msgstr "Atualmente nenhuma conexão de rede está ativa..."
-
-#~ msgid "A wired network connection is currently active..."
-#~ msgstr "Atualmente uma conexão por fios está ativa..."
diff --git a/po/rw.po b/po/rw.po
deleted file mode 100644
index 8fa7644e29..0000000000
--- a/po/rw.po
+++ /dev/null
@@ -1,398 +0,0 @@
-# translation of NetworkManager to Kinyarwanda.
-# Copyright (C) 2005 Free Software Foundation, Inc.
-# This file is distributed under the same license as the NetworkManager package.
-# Steve Murphy <murf@e-tools.com>, 2005
-# Steve performed initial rough translation from compendium built from translations provided by the following translators:
-# Philibert Ndandali <ndandali@yahoo.fr>, 2005.
-# Viateur MUGENZI <muvia1@yahoo.fr>, 2005.
-# Noëlla Mupole <s24211045@tuks.co.za>, 2005.
-# Carole Karema <karemacarole@hotmail.com>, 2005.
-# JEAN BAPTISTE NGENDAHAYO <ngenda_denis@yahoo.co.uk>, 2005.
-# Augustin KIBERWA <akiberwa@yahoo.co.uk>, 2005.
-# Donatien NSENGIYUMVA <ndonatienuk@yahoo.co.uk>, 2005..
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: NetworkManager HEAD\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2005-04-01 16:22-0700\n"
-"PO-Revision-Date: 2005-03-31 20:55-0700\n"
-"Last-Translator: Steve Murphy <murf@e-tools.com>\n"
-"Language-Team: Kinyarwanda <translation-team-rw@lists.sourceforge.net>\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"ULL NAME <EMAIL@ADDRESS>\n"
-"Plural-Forms: nplurals=2; plural=(n != 1);\n"
-
-#: info-daemon/networks.glade.h:1
-#, fuzzy
-msgid "<span weight=\"bold\">Wireless Networks:</span>"
-msgstr "<Uburemere UTSINDAGIYE"
-
-#: info-daemon/networks.glade.h:2
-msgid "Modify Wireless Networks"
-msgstr ""
-
-#: info-daemon/passphrase.glade.h:1 panel-applet/wireless-applet.glade.h:2
-msgid "*"
-msgstr "*"
-
-#: info-daemon/passphrase.glade.h:2
-msgid ""
-"128-bit Passphrase (WEP)\n"
-"Ascii Key (WEP)\n"
-"Hex Key (WEP)"
-msgstr ""
-
-#: info-daemon/passphrase.glade.h:6
-#, fuzzy, no-c-format
-msgid ""
-"<span weight=\"bold\" size=\"larger\">Passphrase Required by Wireless "
-"Network</span>\n"
-"\n"
-"A passphrase or encryption key is required to access the wireless network '%"
-"s'."
-msgstr ""
-"<Uburemere UTSINDAGIYE Ingano Kinini ku A Cyangwa Bishunzwe: Urufunguzo ni "
-"Bya ngombwa Kuri i urusobe"
-
-# #-#-#-#-# sw.pot (PACKAGE VERSION) #-#-#-#-#
-# sw/source\ui\index\cnttab.src:TP_TOX_SELECT.FT_SORTALG.text
-# #-#-#-#-# sw.pot (PACKAGE VERSION) #-#-#-#-#
-# sw/source\ui\misc\srtdlg.src:DLG_SORTING.FT_KEYTYP.text
-#: info-daemon/passphrase.glade.h:9
-#, fuzzy
-msgid "Key Type:"
-msgstr "Ubwoko bw'agakandisho"
-
-#: info-daemon/passphrase.glade.h:10
-#: info-daemon/NetworkManagerInfoPassphraseDialog.c:140
-#: panel-applet/NMWirelessAppletOtherNetworkDialog.c:150
-#: panel-applet/essid.glade.h:7 panel-applet/wireless-applet.glade.h:19
-msgid "Passphrase:"
-msgstr ""
-
-#: info-daemon/passphrase.glade.h:11
-msgid "Wireless Network Key Required"
-msgstr ""
-
-#: info-daemon/passphrase.glade.h:12 panel-applet/wireless-applet.glade.h:22
-#, fuzzy
-msgid "_Login to Network"
-msgstr "Kuri"
-
-#: info-daemon/NetworkManagerInfoPassphraseDialog.c:143
-#: panel-applet/NMWirelessAppletOtherNetworkDialog.c:153
-msgid "Ascii Key:"
-msgstr ""
-
-#: info-daemon/NetworkManagerInfoPassphraseDialog.c:146
-#: panel-applet/NMWirelessAppletOtherNetworkDialog.c:156
-msgid "Hex Key:"
-msgstr ""
-
-#: info-daemon/NetworkManagerInfoVPN.c:158
-#, fuzzy, c-format
-msgid "You must log in to access the private network %s"
-msgstr "LOG in Kuri i By'umwihariko urusobe"
-
-#: panel-applet/NMWirelessApplet.c:149 panel-applet/NMWirelessApplet.c:167
-msgid "NetworkManager Applet"
-msgstr ""
-
-#: panel-applet/NMWirelessApplet.c:151 panel-applet/NMWirelessApplet.c:169
-#, fuzzy
-msgid "Copyright (C) 2004-2005 Red Hat, Inc."
-msgstr "C"
-
-#: panel-applet/NMWirelessApplet.c:152 panel-applet/NMWirelessApplet.c:170
-#, fuzzy
-msgid ""
-"Notification area applet for managing your network devices and connections."
-msgstr "Ubuso Apuleti... kugirango urusobe Na Ukwihuza"
-
-#: panel-applet/NMWirelessApplet.c:384 panel-applet/NMWirelessApplet.c:1523
-#: panel-applet/NMWirelessAppletOtherNetworkDialog.c:319
-#, fuzzy
-msgid ""
-"The NetworkManager Applet could not find some required resources (the glade "
-"file was not found)."
-msgstr "OYA Gushaka Bya ngombwa i IDOSIYE OYA Byabonetse"
-
-#: panel-applet/NMWirelessApplet.c:395
-#, fuzzy, c-format
-msgid "The network device \"%s (%s)\" does not support wireless scanning."
-msgstr "urusobe APAREYE OYA Gushigikira"
-
-#: panel-applet/NMWirelessApplet.c:403
-#, fuzzy, c-format
-msgid "The network device \"%s (%s)\" does not support link detection."
-msgstr "urusobe APAREYE OYA Gushigikira Ihuza"
-
-#: panel-applet/NMWirelessApplet.c:627
-#, fuzzy
-msgid "No network connection"
-msgstr "urusobe Ukwihuza"
-
-#: panel-applet/NMWirelessApplet.c:632
-#, fuzzy
-msgid "Wired network connection"
-msgstr "urusobe Ukwihuza"
-
-#: panel-applet/NMWirelessApplet.c:637
-#, fuzzy
-msgid "Connecting to a wired network..."
-msgstr "Kuri a urusobe"
-
-#: panel-applet/NMWirelessApplet.c:646
-#, fuzzy
-msgid "Connected to an Ad-Hoc wireless network"
-msgstr "Kuri urusobe"
-
-#: panel-applet/NMWirelessApplet.c:660
-#, fuzzy, c-format
-msgid "Wireless network connection to '%s' (%d%%)"
-msgstr "urusobe Ukwihuza Kuri"
-
-#: panel-applet/NMWirelessApplet.c:665
-#, fuzzy
-msgid "Wireless network connection"
-msgstr "urusobe Ukwihuza"
-
-#: panel-applet/NMWirelessApplet.c:670
-#, fuzzy, c-format
-msgid "Connecting to wireless network '%s'..."
-msgstr "Kuri urusobe"
-
-#: panel-applet/NMWirelessApplet.c:676
-#, fuzzy
-msgid "NetworkManager is not running"
-msgstr "ni OYA"
-
-#: panel-applet/NMWirelessApplet.c:681
-#, fuzzy
-msgid "Scanning for wireless networks..."
-msgstr "kugirango"
-
-#: panel-applet/NMWirelessApplet.c:1046
-msgid "Other Wireless Networks..."
-msgstr ""
-
-#: panel-applet/NMWirelessApplet.c:1067
-#, fuzzy
-msgid "Create new Wireless Network..."
-msgstr "Gishya"
-
-#: panel-applet/NMWirelessApplet.c:1143
-#, fuzzy
-msgid "No network devices have been found"
-msgstr "urusobe Byabonetse"
-
-#: panel-applet/NMWirelessApplet.c:1285
-#, fuzzy
-msgid "NetworkManager is not running..."
-msgstr "ni OYA"
-
-#: panel-applet/NMWirelessApplet.c:1355 panel-applet/NMWirelessApplet.c:1403
-msgid "Pause Wireless Scanning"
-msgstr ""
-
-#: panel-applet/NMWirelessApplet.c:1360
-msgid "Resume Wireless Scanning"
-msgstr ""
-
-#: panel-applet/NMWirelessApplet.c:1370 panel-applet/NMWirelessApplet.c:1409
-msgid "Stop All Wireless Devices"
-msgstr ""
-
-#: panel-applet/NMWirelessApplet.c:1375
-#, fuzzy
-msgid "Start All Wireless Devices"
-msgstr "Gutangira"
-
-# scp/source\office\profile.lng:STR_VALUE_TEMPLATE_SERVICES_HELP.text
-#: panel-applet/NMWirelessApplet.c:1418
-msgid "Help"
-msgstr "Ifashayobora"
-
-#: panel-applet/NMWirelessApplet.c:1425
-msgid "About"
-msgstr "Bigyanye"
-
-#: panel-applet/NMWirelessAppletOtherNetworkDialog.c:232
-#, fuzzy
-msgid "Create new wireless network"
-msgstr "Gishya urusobe"
-
-#: panel-applet/NMWirelessAppletOtherNetworkDialog.c:233
-#, fuzzy
-msgid ""
-"Enter the ESSID and security settings of the wireless network you wish to "
-"create."
-msgstr "i Na Umutekano Amagenamiterere Bya i urusobe Kuri Kurema"
-
-#: panel-applet/NMWirelessAppletOtherNetworkDialog.c:238
-#, fuzzy
-msgid "Custom wireless network"
-msgstr "Kugena urusobe"
-
-#: panel-applet/NMWirelessAppletOtherNetworkDialog.c:239
-#, fuzzy
-msgid "Enter the ESSID of the wireless network to which you wish to connect."
-msgstr "i Bya i urusobe Kuri Kuri Kwihuza"
-
-#: panel-applet/essid.glade.h:1 panel-applet/wireless-applet.glade.h:3
-#, fuzzy
-msgid ""
-"128-bit passphrase (WEP)\n"
-"Ascii key (WEP)\n"
-"Hex key (WEP)"
-msgstr "Urufunguzo Urufunguzo"
-
-#: panel-applet/essid.glade.h:4 panel-applet/wireless-applet.glade.h:15
-#, fuzzy
-msgid "C_onnect"
-msgstr "Kwihuza"
-
-#: panel-applet/essid.glade.h:5 panel-applet/wireless-applet.glade.h:16
-#, fuzzy
-msgid "Connect with encryption enabled"
-msgstr "Na: Bishunzwe: Bikora"
-
-# #-#-#-#-# sw.pot (PACKAGE VERSION) #-#-#-#-#
-# sw/source\ui\index\cnttab.src:TP_TOX_SELECT.FT_SORTALG.text
-# #-#-#-#-# sw.pot (PACKAGE VERSION) #-#-#-#-#
-# sw/source\ui\misc\srtdlg.src:DLG_SORTING.FT_KEYTYP.text
-#: panel-applet/essid.glade.h:6 panel-applet/wireless-applet.glade.h:18
-#, fuzzy
-msgid "Key type:"
-msgstr "Ubwoko bw'agakandisho"
-
-#: panel-applet/essid.glade.h:8 panel-applet/wireless-applet.glade.h:20
-msgid "Wireless _adapter:"
-msgstr ""
-
-#: panel-applet/essid.glade.h:9 panel-applet/wireless-applet.glade.h:21
-#, fuzzy
-msgid "Wireless _network:"
-msgstr "urusobe"
-
-#: panel-applet/menu-info.c:91
-#, c-format
-msgid "Wired Network (%s)"
-msgstr ""
-
-#: panel-applet/menu-info.c:93
-msgid "Wired Network"
-msgstr ""
-
-#: panel-applet/menu-info.c:166
-#, c-format
-msgid "Wireless Network (%s)"
-msgid_plural "Wireless Networks (%s)"
-msgstr[0] ""
-msgstr[1] ""
-
-#: panel-applet/menu-info.c:168
-msgid "Wireless Network"
-msgid_plural "Wireless Networks"
-msgstr[0] ""
-msgstr[1] ""
-
-#: panel-applet/menu-info.c:294
-#, fuzzy
-msgid " (invalid Unicode)"
-msgstr "(Sibyo"
-
-#: examples/python/systray/eggtrayicon.c:111 panel-applet/eggtrayicon.c:118
-msgid "Orientation"
-msgstr "Icyerekezo"
-
-#: examples/python/systray/eggtrayicon.c:112 panel-applet/eggtrayicon.c:119
-#, fuzzy
-msgid "The orientation of the tray."
-msgstr "Icyerekezo Bya i"
-
-# offmgr/source\offapp\intro\intro.hrc:TEXT_DEFAULTABOUT.text
-#: panel-applet/NMWirelessApplet.xml.h:1
-#, fuzzy
-msgid "_About..."
-msgstr "Ibyerekeye"
-
-#: panel-applet/wireless-applet.glade.h:1
-msgid " "
-msgstr " "
-
-#: panel-applet/wireless-applet.glade.h:7
-#, fuzzy, no-c-format
-msgid ""
-"<span weight=\"bold\" size=\"larger\">Reduced Network Functionality</span>\n"
-"\n"
-"%s It will not be completely functional."
-msgstr "<Uburemere UTSINDAGIYE Ingano Kinini OYA"
-
-#: panel-applet/wireless-applet.glade.h:11
-#, fuzzy, no-c-format
-msgid ""
-"<span weight=\"bold\" size=\"larger\">Wireless Network Login Confirmation</"
-"span>\n"
-"\n"
-"You have chosen log in to the wireless network '%s'. If you are sure this "
-"wireless network is secure, click the checkbox below and NetworkManager will "
-"no longer pester you with stupid questions when you connect to it."
-msgstr ""
-"<Uburemere UTSINDAGIYE Ingano Kinini LOG in Kuri i urusobe iyi urusobe ni "
-"Kanda i munsi Na Oya Na: Ryari: Kwihuza Kuri"
-
-#: panel-applet/wireless-applet.glade.h:14
-#, fuzzy
-msgid "Always Trust this Wireless Network"
-msgstr "iyi"
-
-#: panel-applet/wireless-applet.glade.h:17
-msgid "Don't remind me again"
-msgstr ""
-
-# crashrep/source\all\crashrep.lng:%OK_BUTTON%.text
-#: panel-applet/wireless-applet.glade.h:23
-#, fuzzy
-msgid "_OK"
-msgstr "YEGO"
-
-#: src/nm-netlink-monitor.c:154
-#, fuzzy, c-format
-msgid ""
-"unable to create netlink socket for monitoring wired ethernet devices - %s"
-msgstr "Kuri Kurema kugirango"
-
-#: src/nm-netlink-monitor.c:172
-#, fuzzy, c-format
-msgid ""
-"unable to bind to netlink socket for monitoring wired ethernet devices - %s"
-msgstr "Kuri Kuri kugirango"
-
-#: src/nm-netlink-monitor.c:403
-msgid "operation took too long"
-msgstr ""
-
-#: src/nm-netlink-monitor.c:500
-#, fuzzy
-msgid "received data from wrong type of sender"
-msgstr "BYAKIRIWE Ibyatanzwe Bivuye Ubwoko Bya Uwohereza"
-
-#: src/nm-netlink-monitor.c:513
-#, fuzzy
-msgid "received data from unexpected sender"
-msgstr "BYAKIRIWE Ibyatanzwe Bivuye Uwohereza"
-
-# basctl/source\basicide\basidesh.src:RID_IMGBTN_REMOVEWATCH.text
-#: src/nm-netlink-monitor.c:535
-#, fuzzy, c-format
-msgid "%s"
-msgstr "%s"
-
-#: src/nm-netlink-monitor.c:644
-#, fuzzy
-msgid "too much data was sent over socket and some of it was lost"
-msgstr "Ibyatanzwe Yoherejwe: KURI Na Bya"
diff --git a/po/sk.po b/po/sk.po
deleted file mode 100644
index 32c661df76..0000000000
--- a/po/sk.po
+++ /dev/null
@@ -1,775 +0,0 @@
-# Slovak translations for NetworkManager package.
-# Copyright (C) 2004, 2005 Free Software Foundation, Inc.
-# This file is distributed under the same license as the NetworkManager package.
-# Marcel Telka <marcel@telka.sk>, 2004, 2005.
-#
-# $Id: sk.po,v 1.31 2005/08/17 17:56:20 marcel Exp $
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: NetworkManager\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2005-08-17 19:22+0200\n"
-"PO-Revision-Date: 2005-08-17 19:54+0200\n"
-"Last-Translator: Marcel Telka <marcel@telka.sk>\n"
-"Language-Team: Slovak <sk-i18n@lists.linux.sk>\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"Plural-Forms: nplurals=3; plural= (n==1) ? 1 : (n>=2 && n<=4) ? 2 : 0;\n"
-
-#. Setup a request to the keyring to save the network passphrase
-#: ../gnome/applet/applet-dbus-info.c:894
-#, c-format
-msgid "Passphrase for wireless network %s"
-msgstr "Heslo pre bezdrôtovú sieť %s"
-
-#: ../gnome/applet/applet-dbus-info.c:1116
-#, c-format
-msgid ""
-"The requested wireless network '%s' does not appear to be in range. A "
-"different wireless network will be used if any are available."
-msgstr ""
-"Zdá sa, že požadovaná bezdrôtová sieť '%s' nie je v dosahu. Bude použitá iná "
-"bezdrôtová sieť, ak sú nejaké dostupné."
-
-#: ../gnome/applet/applet-dbus.c:598
-#, c-format
-msgid "Connection to the wireless network '%s' failed."
-msgstr "Pripájanie k bezdrôtovej sieti '%s' zlyhalo."
-
-#: ../gnome/applet/applet-dbus.c:603
-msgid "Connection to the wired network failed."
-msgstr "Pripájanie k drôtovej sieti zlyhalo."
-
-#: ../gnome/applet/applet.c:192
-msgid "Error displaying connection information: "
-msgstr "Chyba pri zobrazovaní informácií o spojení: "
-
-#: ../gnome/applet/applet.c:217
-msgid "Could not find some required resources (the glade file)!"
-msgstr "Nepodarilo sa nájsť niektoré vyžadované zdroje (súbor glade)!"
-
-#: ../gnome/applet/applet.c:227
-msgid "No active connections!"
-msgstr "Bez aktívnych sieťových spojení!"
-
-#: ../gnome/applet/applet.c:236
-msgid "Could not open socket!"
-msgstr "Nepodarilo sa otvoriť zásuvku!"
-
-#: ../gnome/applet/applet.c:251
-msgid "Failed to get information about the interface!"
-msgstr "Získavanie informácií o rozhraní zlyhalo!"
-
-#: ../gnome/applet/applet.c:284
-#, c-format
-msgid "Wired Ethernet (%s)"
-msgstr "Drôtový ethernet (%s)"
-
-#: ../gnome/applet/applet.c:286
-#, c-format
-msgid "Wireless Ethernet (%s)"
-msgstr "Bezdrôtový ethernet (%s)"
-
-#: ../gnome/applet/applet.c:380 ../gnome/applet/applet.c:398
-msgid "NetworkManager Applet"
-msgstr "Applet NetworkManager"
-
-#: ../gnome/applet/applet.c:382 ../gnome/applet/applet.c:400
-msgid "Copyright (C) 2004-2005 Red Hat, Inc."
-msgstr "Autorské práva © 2004-2005 Red Hat, Inc."
-
-#: ../gnome/applet/applet.c:383 ../gnome/applet/applet.c:401
-msgid ""
-"Notification area applet for managing your network devices and connections."
-msgstr ""
-"Aplet oblasti upozornení pre správu vašich sieťových zariadení a pripojení."
-
-#: ../gnome/applet/applet.c:489
-msgid "VPN Error"
-msgstr "Chyba VPN"
-
-#: ../gnome/applet/applet.c:493
-msgid "VPN Login Failure"
-msgstr "Zlyhanie VPN prihlásenia"
-
-#: ../gnome/applet/applet.c:494
-#, c-format
-msgid "Could not start the VPN connection '%s' due to a login failure."
-msgstr "Nepodarilo sa spustiť VPN spojenie '%s' kvôli zlyhania prihlásenia."
-
-#: ../gnome/applet/applet.c:498
-msgid "VPN Start Failure"
-msgstr "Zlyhanie spustenia VPN"
-
-#: ../gnome/applet/applet.c:499
-#, c-format
-msgid ""
-"Could not start the VPN connection '%s' due to a failure launching the VPN "
-"program."
-msgstr ""
-"Nepodarilo sa spustiť VPN spojenie '%s' kvôli zlyhaniu spustenia VPN "
-"programu."
-
-#: ../gnome/applet/applet.c:503 ../gnome/applet/applet.c:513
-msgid "VPN Connect Failure"
-msgstr "Zlyhanie VPN spojenia"
-
-#: ../gnome/applet/applet.c:504
-#, c-format
-msgid "Could not start the VPN connection '%s' due to a connection error."
-msgstr "Nepodarilo sa spustiť VPN spojenie '%s' kvôli chybe spojenia."
-
-#: ../gnome/applet/applet.c:508
-msgid "VPN Configuration Error"
-msgstr "Chyba konfigurácie VPN"
-
-#: ../gnome/applet/applet.c:509
-#, c-format
-msgid "The VPN connection '%s' was not correctly configured."
-msgstr "VPN spojenie '%s' nebolo správne nakonfigurované."
-
-#: ../gnome/applet/applet.c:514
-#, c-format
-msgid ""
-"Could not start the VPN connection '%s' because the VPN server did not "
-"return an adequate network configuration."
-msgstr ""
-"Nepodarilo sa spustiť VPN spojenie '%s', pretože VPN server nevrátil "
-"príslušnú konfiguráciu siete."
-
-#: ../gnome/applet/applet.c:522
-#, c-format
-msgid "The VPN service said: \"%s\""
-msgstr "VPN služba oznámila: \"%s\""
-
-#: ../gnome/applet/applet.c:591
-#, c-format
-msgid "VPN connection '%s' said:"
-msgstr "VPN spojenie '%s' oznámilo:"
-
-#: ../gnome/applet/applet.c:592
-#, c-format
-msgid ""
-"<span weight=\"bold\" size=\"larger\">%s</span>\n"
-"\n"
-"%s\n"
-"\n"
-"\"%s\""
-msgstr ""
-"<span weight=\"bold\" size=\"larger\">%s</span>\n"
-"\n"
-"%s\n"
-"\n"
-"\"%s\""
-
-#: ../gnome/applet/applet.c:593
-msgid "VPN Login Message"
-msgstr "Správa VPN prihlásenia"
-
-#: ../gnome/applet/applet.c:812 ../gnome/applet/applet.c:2413
-#: ../gnome/applet/other-network-dialog.c:322
-#: ../gnome/applet/passphrase-dialog.c:396
-msgid ""
-"The NetworkManager Applet could not find some required resources (the glade "
-"file was not found)."
-msgstr ""
-"Applet NetworkManager nemohol nájsť niektoré vyžadované zdroje (súbor glade "
-"nebol nájdený)."
-
-#: ../gnome/applet/applet.c:825
-#, c-format
-msgid "The network device \"%s (%s)\" does not support wireless scanning."
-msgstr "Sieťové zariadenie \"%s (%s)\" nepodporuje bezdrôtové vyhľadávanie."
-
-#: ../gnome/applet/applet.c:832
-#, c-format
-msgid "The network device \"%s (%s)\" does not support link detection."
-msgstr "Sieťové zariadenie \"%s (%s)\" nepodporuje detekciu linky."
-
-#: ../gnome/applet/applet.c:953
-#, c-format
-msgid "Preparing device %s for the wired network..."
-msgstr "Pripravujem zariadenie %s pre drôtovú sieť..."
-
-#: ../gnome/applet/applet.c:955
-#, c-format
-msgid "Preparing device %s for the wireless network '%s'..."
-msgstr "Pripravujem zariadenie %s pre bezdrôtovú sieť '%s'..."
-
-#: ../gnome/applet/applet.c:962
-#, c-format
-msgid "Configuring device %s for the wired network..."
-msgstr "Konfigurácia zariadenia %s pre drôtovú sieť..."
-
-#: ../gnome/applet/applet.c:964
-#, c-format
-msgid "Attempting to join the wireless network '%s'..."
-msgstr "Pokus o pripojenie k bezdrôtovej sieti '%s'..."
-
-#: ../gnome/applet/applet.c:971
-#, c-format
-msgid "Waiting for Network Key for the wireless network '%s'..."
-msgstr "ÄŒakanie na sieÅ¥ový kÄ¾ÃºÄ pre bezdrôtovú sieÅ¥ '%s'..."
-
-#: ../gnome/applet/applet.c:978 ../gnome/applet/applet.c:987
-msgid "Requesting a network address from the wired network..."
-msgstr "Vyžiadanie sieťovej adresy z drôtovej siete..."
-
-#: ../gnome/applet/applet.c:980 ../gnome/applet/applet.c:989
-#, c-format
-msgid "Requesting a network address from the wireless network '%s'..."
-msgstr "Vyžiadanie sieťovej adresy z bezdrôtovej siete '%s'..."
-
-#: ../gnome/applet/applet.c:996
-msgid "Finishing connection to the wired network..."
-msgstr "UkonÄovanie spojenia k drôtovej sieti..."
-
-#: ../gnome/applet/applet.c:998
-#, c-format
-msgid "Finishing connection to the wireless network '%s'..."
-msgstr "UkonÄovanie spojenia k bezdrôtovej sieti '%s'..."
-
-#: ../gnome/applet/applet.c:1044
-msgid "NetworkManager is not running"
-msgstr "NetworkManager nebeží"
-
-#: ../gnome/applet/applet.c:1055
-msgid "No network connection"
-msgstr "Bez sieťového spojenia"
-
-#: ../gnome/applet/applet.c:1062
-msgid "Wired network connection"
-msgstr "Pripojenie k drôtovej sieti"
-
-#: ../gnome/applet/applet.c:1069
-msgid "Connected to an Ad-Hoc wireless network"
-msgstr "Pripájané k bezdrôtovej sieti Ad-Hoc"
-
-#: ../gnome/applet/applet.c:1083
-#, c-format
-msgid "Wireless network connection to '%s' (%d%%)"
-msgstr "Bezdrôtové sieťové pripojenie k '%s' (%d%%)"
-
-#: ../gnome/applet/applet.c:1108
-#, c-format
-msgid "VPN connection to '%s'"
-msgstr "VPN spojenie s '%s'"
-
-#: ../gnome/applet/applet.c:1521
-msgid "_Connect to Other Wireless Network..."
-msgstr "_Pripojiť sa k inej bezdrôtovej sieti..."
-
-#: ../gnome/applet/applet.c:1542
-msgid "Create _New Wireless Network..."
-msgstr "Vytvoriť _novú bezdrôtovú sieť..."
-
-#: ../gnome/applet/applet.c:1655
-msgid "_VPN Connections"
-msgstr "_VPN spojenia"
-
-#: ../gnome/applet/applet.c:1682
-msgid "_Configure VPN..."
-msgstr "_Konfigurovať VPN..."
-
-#: ../gnome/applet/applet.c:1686
-msgid "_Disconnect VPN..."
-msgstr "_Odpojiť VPN..."
-
-#: ../gnome/applet/applet.c:1709
-msgid "_Dial Up Connections"
-msgstr "_VytáÄané spojenia"
-
-#: ../gnome/applet/applet.c:1718
-#, c-format
-msgid "Connect to %s..."
-msgstr "Pripojiť k %s..."
-
-#: ../gnome/applet/applet.c:1770
-msgid "No network devices have been found"
-msgstr "Neboli nájdené iné sieťové zariadenia"
-
-#: ../gnome/applet/applet.c:1935
-msgid "NetworkManager is not running..."
-msgstr "NetworkManager nebeží..."
-
-#: ../gnome/applet/applet.c:2003
-msgid "_Stop All Wireless Devices"
-msgstr "_Zastaviť všetky bezdrôtové zariadenia"
-
-#: ../gnome/applet/applet.c:2008
-msgid "_Start All Wireless Devices"
-msgstr "_Spustiť všetky bezdrôtové zariadenia"
-
-#: ../gnome/applet/applet.c:2039
-msgid "_Wireless Network Discovery"
-msgstr "_Prehľadávanie bezdrôtových sietí"
-
-#: ../gnome/applet/applet.c:2042
-msgid "Always Search"
-msgstr "Vždy vyhľadávať"
-
-#: ../gnome/applet/applet.c:2050
-msgid "Search Only When Disconnected"
-msgstr "Vyhľadávať len pri odpojení"
-
-#: ../gnome/applet/applet.c:2058
-msgid "Never Search"
-msgstr "Nikdy nevyhľadávať"
-
-#. Stop All Wireless Devices item
-#: ../gnome/applet/applet.c:2070
-msgid "Stop All Wireless Devices"
-msgstr "Zastaviť všetky bezdrôtové zariadenia"
-
-#: ../gnome/applet/applet.c:2076
-msgid "Connection _Information"
-msgstr "_Informácie o spojení"
-
-#: ../gnome/applet/applet.c:2084
-msgid "_Help"
-msgstr "_Pomocník"
-
-#: ../gnome/applet/applet.c:2091
-msgid "_About"
-msgstr "_O programe"
-
-#: ../gnome/applet/applet.c:2563
-msgid ""
-"The NetworkManager applet could not find some required resources. It cannot "
-"continue.\n"
-msgstr ""
-"Applet NetworkManager nemohol nájsť niektoré vyžadované zdroje. Nemôže "
-"pokraÄovaÅ¥.\n"
-
-#: ../gnome/applet/eggtrayicon.c:118
-msgid "Orientation"
-msgstr "Orientácia"
-
-#: ../gnome/applet/eggtrayicon.c:119
-msgid "The orientation of the tray."
-msgstr "Orientácia systémovej lišty."
-
-#: ../gnome/applet/menu-items.c:89
-#, c-format
-msgid "Wired Network (%s)"
-msgstr "Drôtová sieť (%s)"
-
-#: ../gnome/applet/menu-items.c:92
-msgid "_Wired Network"
-msgstr "_Drôtová sieť"
-
-#: ../gnome/applet/menu-items.c:165
-#, c-format
-msgid "Wireless Network (%s)"
-msgid_plural "Wireless Networks (%s)"
-msgstr[0] "Bezdrôtových sietí (%s)"
-msgstr[1] "Bezdrôtová sieť (%s)"
-msgstr[2] "Bezdrôtové siete (%s)"
-
-#: ../gnome/applet/menu-items.c:167
-msgid "Wireless Network"
-msgid_plural "Wireless Networks"
-msgstr[0] "Bezdrôtových sietí"
-msgstr[1] "Bezdrôtová sieť"
-msgstr[2] "Bezdrôtové siete"
-
-#: ../gnome/applet/menu-items.c:309
-msgid " (invalid Unicode)"
-msgstr " (neplatný Unikód)"
-
-#: ../gnome/applet/other-network-dialog.c:143
-#: ../gnome/applet/passphrase-dialog.c:156
-#: ../gnome/applet/wireless-applet.glade.h:34
-msgid "Passphrase:"
-msgstr "Heslo:"
-
-#: ../gnome/applet/other-network-dialog.c:146
-#: ../gnome/applet/passphrase-dialog.c:159
-msgid "ASCII Key:"
-msgstr "ASCII kľúÄ:"
-
-#: ../gnome/applet/other-network-dialog.c:149
-#: ../gnome/applet/passphrase-dialog.c:162
-msgid "Hex Key:"
-msgstr "KÄ¾ÃºÄ v Å¡estnástkovej sústave:"
-
-#: ../gnome/applet/other-network-dialog.c:232
-msgid "Create new wireless network"
-msgstr "Vytvoriť novú bezdrôtovú sieť"
-
-#: ../gnome/applet/other-network-dialog.c:233
-msgid ""
-"Enter the ESSID and security settings of the wireless network you wish to "
-"create."
-msgstr ""
-"Zadajte ESSID a bezpeÄnostné nastavenia bezdrôtovej siete, ktorú chcete "
-"vytvoriť."
-
-#: ../gnome/applet/other-network-dialog.c:234
-msgid "By default, the ESSID is set to your computer's name,"
-msgstr "Å tandardne je ESSID nastavené na názov vášho poÄítaÄa,"
-
-#: ../gnome/applet/other-network-dialog.c:236
-msgid ", with no encryption enabled."
-msgstr ", bez povoleného šifrovania."
-
-#: ../gnome/applet/other-network-dialog.c:241
-msgid "Custom wireless network"
-msgstr "Vlastná bezdrôtová sieť"
-
-#: ../gnome/applet/other-network-dialog.c:242
-msgid "Enter the ESSID of the wireless network to which you wish to connect."
-msgstr "Zadajte ESSID bezdrôtovej siete, ku ktorej sa chcete pripojiť."
-
-#: ../gnome/applet/vpn-password-dialog.c:152
-#: ../gnome/applet/vpn-password-dialog.c:191
-#, c-format
-msgid "Cannot start VPN connection '%s'"
-msgstr "Nepodarilo sa spustiť VPN spojenie '%s'"
-
-#: ../gnome/applet/vpn-password-dialog.c:155
-#, c-format
-msgid ""
-"Could not find the authentication dialog for VPN connection type '%s'. "
-"Contact your system administrator."
-msgstr ""
-"Nepodarilo sa nájsť dialógové okno overenia totožnosti pre VPN spojenie typu "
-"'%s'. Spojte sa s vašim správcom systému."
-
-#: ../gnome/applet/vpn-password-dialog.c:194
-#, c-format
-msgid ""
-"There was a problem launching the authentication dialog for VPN connection "
-"type '%s'. Contact your system administrator."
-msgstr ""
-"Vyskytol sa problém pri spúšťaní dialógového okna overenia totožnosti pre "
-"VPN spojenie typu '%s'. Spojte sa s vašim sprácom systému."
-
-#: ../gnome/applet/wireless-applet.glade.h:1
-msgid " "
-msgstr " "
-
-#: ../gnome/applet/wireless-applet.glade.h:2
-msgid ""
-"128-bit Passphrase (WEP)\n"
-"ASCII Key (WEP)\n"
-"Hex Key (WEP)"
-msgstr ""
-"128-bitvé heslo (WEP)\n"
-"ASCII kÄ¾ÃºÄ (WEP)\n"
-"KÄ¾ÃºÄ v Å¡estnástkovej sústave (WEP)"
-
-#: ../gnome/applet/wireless-applet.glade.h:5
-msgid ""
-"128-bit passphrase (WEP)\n"
-"ASCII key (WEP)\n"
-"Hex key (WEP)"
-msgstr ""
-"128-bitvé heslo (WEP)\n"
-"ASCII kÄ¾ÃºÄ (WEP)\n"
-"KÄ¾ÃºÄ v Å¡estnástkovej sústave (WEP)"
-
-#: ../gnome/applet/wireless-applet.glade.h:8
-msgid ""
-"<span weight=\"bold\" size=\"larger\">Active Connection Information</span>"
-msgstr ""
-"<span weight=\"bold\" size=\"larger\">Informácie o aktívnom spojení</span>"
-
-#: ../gnome/applet/wireless-applet.glade.h:10
-#, no-c-format
-msgid ""
-"<span weight=\"bold\" size=\"larger\">Passphrase Required by Wireless "
-"Network</span>\n"
-"\n"
-"A passphrase or encryption key is required to access the wireless network '%"
-"s'."
-msgstr ""
-"<span weight=\"bold\" size=\"larger\">Heslo vyžadované bezdrôtovou sieťou</"
-"span>\n"
-"\n"
-"Heslo alebo Å¡ifrovací kÄ¾ÃºÄ je potrebný pre prístup k bezdrôtovej sieti '%s'."
-
-#: ../gnome/applet/wireless-applet.glade.h:14
-#, no-c-format
-msgid ""
-"<span weight=\"bold\" size=\"larger\">Reduced Network Functionality</span>\n"
-"\n"
-"%s It will not be completely functional."
-msgstr ""
-"<span weight=\"bold\" size=\"larger\">Obmedzená sieÅ¥ová funkÄnosÅ¥</span>\n"
-"\n"
-"%s Nebude to úplne funkÄné."
-
-#: ../gnome/applet/wireless-applet.glade.h:18
-#, no-c-format
-msgid ""
-"<span weight=\"bold\" size=\"larger\">Wireless Network Login Confirmation</"
-"span>\n"
-"\n"
-"You have chosen to log in to the wireless network '%s'. If you are sure "
-"that this wireless network is secure, click the checkbox below and "
-"NetworkManager will not require confirmation on subsequent log ins."
-msgstr ""
-"<span weight=\"bold\" size=\"larger\">Potvrdenie prihlásenia do bezdrôtovej "
-"siete</span>\n"
-"\n"
-"Vybrali ste si prihlásenie do bezdrôtovej siete '%s'. Ak ste si istý, že "
-"táto bezdrôtová sieÅ¥ je bezpeÄná, oznaÄte zaÅ¡krtávacie pole nižšie a "
-"NetworkManager nebude viac vyžadovaÅ¥ potvrdenie pri Äalších prihláseniach."
-
-#: ../gnome/applet/wireless-applet.glade.h:21
-msgid "Always Trust this Wireless Network"
-msgstr "Vždy dôverovať tejto bezdrôtovej sieti"
-
-#: ../gnome/applet/wireless-applet.glade.h:22
-msgid "Broadcast Address:"
-msgstr "Adresa šírenia:"
-
-#: ../gnome/applet/wireless-applet.glade.h:23
-msgid "C_onnect"
-msgstr "Prip_ojiť"
-
-#: ../gnome/applet/wireless-applet.glade.h:24
-msgid "Connect with encryption enabled"
-msgstr "Povolené pripojenie so šifrovaním"
-
-#: ../gnome/applet/wireless-applet.glade.h:25
-msgid "Connection Information"
-msgstr "Informácie o spojení"
-
-#: ../gnome/applet/wireless-applet.glade.h:26
-msgid "Destination Address:"
-msgstr "Cieľová adresa:"
-
-#: ../gnome/applet/wireless-applet.glade.h:27
-msgid "Don't remind me again"
-msgstr "Nepripomínať mi znovu"
-
-#: ../gnome/applet/wireless-applet.glade.h:28
-msgid "Hardware Address:"
-msgstr "Hardvérová adresa:"
-
-#: ../gnome/applet/wireless-applet.glade.h:29
-msgid "IP Address:"
-msgstr "IP adresa:"
-
-#: ../gnome/applet/wireless-applet.glade.h:30
-msgid "Interface:"
-msgstr "Rozhranie:"
-
-#: ../gnome/applet/wireless-applet.glade.h:31
-msgid "Key Type:"
-msgstr "Typ kľúÄa:"
-
-#: ../gnome/applet/wireless-applet.glade.h:32
-msgid "Key type:"
-msgstr "Typ kľúÄa:"
-
-#: ../gnome/applet/wireless-applet.glade.h:33
-msgid "Other Wireless Network..."
-msgstr "Ostatné bezdrôtové siete..."
-
-#: ../gnome/applet/wireless-applet.glade.h:35
-msgid "Subnet Mask:"
-msgstr "Maska podsiete:"
-
-#: ../gnome/applet/wireless-applet.glade.h:36
-msgid "Wireless Network Key Required"
-msgstr "Je potrebný kÄ¾ÃºÄ bezdrôtovej siete"
-
-#: ../gnome/applet/wireless-applet.glade.h:37
-msgid "Wireless _adapter:"
-msgstr "Bezdrôtový _adaptér:"
-
-#: ../gnome/applet/wireless-applet.glade.h:38
-msgid "Wireless _network:"
-msgstr "Bezdrôtová _sieť:"
-
-#: ../gnome/applet/wireless-applet.glade.h:39
-msgid "_Login to Network"
-msgstr "_Prihlásenie k sieti"
-
-#: ../gnome/applet/wireless-applet.glade.h:40
-msgid "_OK"
-msgstr "_Ok"
-
-#: ../gnome/vpn-properties/nm-vpn-properties.c:376
-msgid "Cannot add VPN connection"
-msgstr "Nemôžte pridať VPN spojenie"
-
-#: ../gnome/vpn-properties/nm-vpn-properties.c:378
-msgid ""
-"No suitable VPN software was found on your system. Contact your system "
-"administrator."
-msgstr ""
-"Vo vašom systéme nebol nájdený použiteľný softvér pre VPN. Spojte sa so "
-"správcom vášho systému."
-
-#: ../gnome/vpn-properties/nm-vpn-properties.c:430
-msgid "Cannot import VPN connection"
-msgstr "Nemôžte importovať VPN spojenie"
-
-#: ../gnome/vpn-properties/nm-vpn-properties.c:432
-#, c-format
-msgid ""
-"Cannot find suitable software for VPN connection type '%s' to import the "
-"file '%s'. Contact your system administrator."
-msgstr ""
-"Nepodarilo sa nájsť použiteľný softvér pre pre VPN spojenie typu '%s' na "
-"import súboru '%s'. Spojte sa so správcom vášho systému."
-
-#: ../gnome/vpn-properties/nm-vpn-properties.c:572
-#, c-format
-msgid "Error retrieving VPN connection '%s'"
-msgstr "Chyba pri získavaní VPN spojenia '%s'"
-
-#: ../gnome/vpn-properties/nm-vpn-properties.c:575
-#, c-format
-msgid ""
-"Could not find the UI files for VPN connection type '%s'. Contact your "
-"system administrator."
-msgstr ""
-"Nepodarilo sa nájsť súbory používateľského rozhrania pre VPN spojenie typu '%"
-"s'. Spojte sa so správcom vášho systému."
-
-#: ../gnome/vpn-properties/nm-vpn-properties.c:735
-#, c-format
-msgid "Delete VPN connection \"%s\"?"
-msgstr "Odstrániť VPN spojenie \"%s\"?"
-
-#: ../gnome/vpn-properties/nm-vpn-properties.c:738
-#, c-format
-msgid ""
-"All information about the VPN connection \"%s\" will be lost and you may "
-"need your system administrator to provide information to create a new "
-"connection."
-msgstr ""
-"Všetky informácie o VPN spojení \"%s\" budú stratené a možno budete "
-"potrebovať správcu vášho systému, aby vám poskytol informácie na vytvorenie "
-"nového spojenia."
-
-#: ../gnome/vpn-properties/nm-vpn-properties.c:953
-msgid "Unable to load"
-msgstr "Nepodarilo sa naÄítaÅ¥"
-
-#: ../gnome/vpn-properties/nm-vpn-properties.c:955
-msgid "Cannot find some needed resources (the glade file)!"
-msgstr "Nepodarilo sa nájsť niektoré vyžadované zdroje (súbor glade)!"
-
-#. Edit dialog
-#: ../gnome/vpn-properties/nm-vpn-properties.c:1073
-msgid "Edit VPN Connection"
-msgstr "Upraviť VPN spojenie"
-
-#: ../gnome/vpn-properties/nm-vpn-properties.glade.h:1
-msgid "Add a new VPN connection"
-msgstr "Pridať nové VPN spojenie"
-
-#: ../gnome/vpn-properties/nm-vpn-properties.glade.h:2
-msgid "Connect to:"
-msgstr "Pripojiť k:"
-
-#: ../gnome/vpn-properties/nm-vpn-properties.glade.h:3
-msgid "Create VPN Connection"
-msgstr "Vytvoriť VPN spojenie"
-
-#: ../gnome/vpn-properties/nm-vpn-properties.glade.h:4
-msgid "Create VPN Connection - 1 of 2"
-msgstr "Vytvoriť VPN spojenie - 1 z 2"
-
-#: ../gnome/vpn-properties/nm-vpn-properties.glade.h:5
-msgid "Create VPN Connection - 2 of 2"
-msgstr "Vytvoriť VPN spojenie - 2 z 2"
-
-#: ../gnome/vpn-properties/nm-vpn-properties.glade.h:6
-msgid "Delete the selected VPN connection"
-msgstr "Odstrániť vybrané VPN spojenie"
-
-#: ../gnome/vpn-properties/nm-vpn-properties.glade.h:7
-msgid ""
-"Dependent on the private network you want to connect to, you need to select "
-"what type of connection you want to create."
-msgstr ""
-"V závislosti od privátnej siete, ku ktorej sa chcete pripojiť, potrebujete "
-"vybrať typ spojenia, ktoré chcete vytvoriť."
-
-#: ../gnome/vpn-properties/nm-vpn-properties.glade.h:8
-msgid "E_xport"
-msgstr "E_xportovať"
-
-#: ../gnome/vpn-properties/nm-vpn-properties.glade.h:9
-msgid "Edit the selected VPN connection"
-msgstr "Upraviť vybrané VPN spojenie"
-
-#: ../gnome/vpn-properties/nm-vpn-properties.glade.h:10
-msgid "Export VPN connection to a file"
-msgstr "Exportovať VPN spojenie do súboru"
-
-#: ../gnome/vpn-properties/nm-vpn-properties.glade.h:11
-msgid "Export the VPN settings to a file"
-msgstr "Exportovať VPN nastavenia do súboru"
-
-#: ../gnome/vpn-properties/nm-vpn-properties.glade.h:12
-msgid "Finish create VPN Connection"
-msgstr "DokonÄiÅ¥ vytváranie VPN spojenia"
-
-#: ../gnome/vpn-properties/nm-vpn-properties.glade.h:13
-msgid "Manage Virtual Private Network connections"
-msgstr "Spravovať spojenia Virtuálnych Privátnych Sietí (VPN)"
-
-#: ../gnome/vpn-properties/nm-vpn-properties.glade.h:14
-msgid ""
-"This assistant will guide you through the creation of a new VPN connection "
-"to a private network.\n"
-"\n"
-"It will require some information, such as IP addresses and secrets, that "
-"will probably be provided by your system administrator as appropriate."
-msgstr ""
-"Tento asistent vás bude sprevádzaÅ¥ poÄas vytvárania nového VPN spojenia k "
-"privátnej sieti.\n"
-"\n"
-"Bude vyžadovať niektoré informácie, ako je IP adresy a heslá, ktoré budú "
-"pravdepodobne poskytnuté vašim správcom systému."
-
-#: ../gnome/vpn-properties/nm-vpn-properties.glade.h:17
-msgid "VPN Connections"
-msgstr "VPN spojenia"
-
-#: ../src/nm-netlink-monitor.c:154
-#, c-format
-msgid ""
-"unable to create netlink socket for monitoring wired ethernet devices - %s"
-msgstr ""
-"nepodarilo sa vytvoriť sieťovú zásuvku pre sledovanie drôtových ethernet "
-"zariadení - %s"
-
-#: ../src/nm-netlink-monitor.c:172
-#, c-format
-msgid ""
-"unable to bind to netlink socket for monitoring wired ethernet devices - %s"
-msgstr ""
-"nepodarilo sa pripojiť k sieťovej zásuvke pre sledovanie drôtových ethernet "
-"zariadení - %s"
-
-#: ../src/nm-netlink-monitor.c:403
-msgid "operation took too long"
-msgstr "operácia trvala veľmi dlho"
-
-#: ../src/nm-netlink-monitor.c:500
-msgid "received data from wrong type of sender"
-msgstr "prijaté dáta od zlého typu odosielateľa"
-
-#: ../src/nm-netlink-monitor.c:513
-msgid "received data from unexpected sender"
-msgstr "prijaté dáta od neoÄakávaného odosielateľa"
-
-#: ../src/nm-netlink-monitor.c:644
-msgid "too much data was sent over socket and some of it was lost"
-msgstr ""
-"príliš veľa dát bolo odoslaných cez zásuvku a niektoré z nich boli stratené"
-
-#: ../src/nm-netlink-monitor.c:733
-msgid "error occurred while waiting for data on socket"
-msgstr "vyskytla sa chyba pri Äakaní na dáta zo zásuvky"
diff --git a/po/sq.po b/po/sq.po
deleted file mode 100644
index b425d1e3fa..0000000000
--- a/po/sq.po
+++ /dev/null
@@ -1,184 +0,0 @@
-# Përkthimi i mesazheve të NetworkManager në shqip
-# This file is distributed under the same license as the NetworkManager package.
-# Copyright (C) 2004 Free Software Foundation, Inc.
-# Laurent Dhima <laurenti@alblinux.net>, 2004.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: NetworkManager HEAD\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2004-10-19 13:38-0400\n"
-"PO-Revision-Date: 2004-09-15 11:49+0200\n"
-"Last-Translator: Laurent Dhima <laurenti@alblinux.net>\n"
-"Language-Team: Albanian <gnome-albanian-perkthyesit@lists.sourceforge.net>\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-
-#: info-daemon/networks.glade:11
-msgid "Modify Wireless Networks"
-msgstr "Ndrysho Rrjetet Wireless"
-
-#: info-daemon/networks.glade:92
-msgid "<span weight=\"bold\">Wireless Networks:</span>"
-msgstr "<span weight=\"bold\">Rrjete Wireless:</span>"
-
-#: info-daemon/passphrase.glade:9
-msgid "Wireless Network Key Required"
-msgstr "Nevoitet Kyçi i Rrjetit Wireless"
-
-#: info-daemon/passphrase.glade:52
-msgid "_Login to Network"
-msgstr "_Identifikohu në Rrjet"
-
-#: info-daemon/passphrase.glade:100
-#, fuzzy
-msgid ""
-"<span weight=\"bold\" size=\"larger\">Passphrase Required by Wireless "
-"Network</span>\n"
-"\n"
-"A passphrase or encryption key is required to access the wireless network '%"
-"s'."
-msgstr ""
-"<span weight=\"bold\" size=\"larger\">Fjalëkalimi kërkohet nga Rrjeti "
-"Wirelessi</span>\n"
-"\n"
-"Për t'u futur në rrjetin wireless '%s' kërkohet fjalëkalimi ose një kyç WEP."
-
-#: info-daemon/passphrase.glade:129
-msgid "Key Type:"
-msgstr ""
-
-#: info-daemon/passphrase.glade:150
-msgid ""
-"128-bit Passphrase\n"
-"128-bit Raw Hex Key"
-msgstr ""
-
-#: info-daemon/passphrase.glade:180
-#: info-daemon/NetworkManagerInfoPassphraseDialog.c:101
-msgid "Passphrase:"
-msgstr "Fjalëkalimi:"
-
-#: info-daemon/passphrase.glade:208 panel-applet/essid.glade:162
-msgid "*"
-msgstr "*"
-
-#: info-daemon/NetworkManagerInfoPassphraseDialog.c:104
-msgid "Key:"
-msgstr ""
-
-#. Reuse the above string to make the translators less angry.
-#: panel-applet/NMWirelessApplet.c:691 panel-applet/NMWirelessApplet.c:701
-msgid ""
-"The NetworkManager Applet could not find some required resources (the glade "
-"file was not found)."
-msgstr ""
-"Instrumenti NetworkManager nuk arrin të gjejë disa burime të nevojshme (file "
-"glade nuk u gjet)."
-
-#: panel-applet/NMWirelessApplet.c:716
-#, fuzzy
-msgid "Custom wireless network"
-msgstr "Ndrysho Rrjetet Wireless"
-
-#: panel-applet/NMWirelessApplet.c:717
-msgid "Enter the ESSID of the wireless network to which you wish to connect."
-msgstr ""
-
-#: panel-applet/NMWirelessApplet.c:800
-#, fuzzy
-msgid "Other Wireless Networks..."
-msgstr "Rrjete të tjerë Wireless..."
-
-#: panel-applet/NMWirelessApplet.c:911
-msgid "No network devices have been found"
-msgstr ""
-
-#: panel-applet/NMWirelessApplet.c:1028
-msgid "NetworkManager is not running..."
-msgstr "NetworkManager nuk është duke punuar..."
-
-#: panel-applet/essid.glade:52
-msgid "C_onnect"
-msgstr ""
-
-#: panel-applet/essid.glade:131
-#, fuzzy
-msgid "Wireless _Network:"
-msgstr "Ndrysho Rrjetet Wireless"
-
-#: panel-applet/essid.glade:177
-msgid "Wireless _adapter:"
-msgstr ""
-
-#: panel-applet/menu-info.c:101
-#, fuzzy, c-format
-msgid "Wired Network (%s)"
-msgstr "Ndrysho Rrjetet Wireless"
-
-#: panel-applet/menu-info.c:103
-#, fuzzy
-msgid "Wired Network"
-msgstr "Ndrysho Rrjetet Wireless"
-
-#: panel-applet/menu-info.c:168
-#, fuzzy, c-format
-msgid "Wireless Network (%s)"
-msgid_plural "Wireless Networks (%s)"
-msgstr[0] "Ndrysho Rrjetet Wireless"
-msgstr[1] "Ndrysho Rrjetet Wireless"
-
-#: panel-applet/menu-info.c:170
-#, fuzzy
-msgid "Wireless Network"
-msgid_plural "Wireless Networks"
-msgstr[0] "Ndrysho Rrjetet Wireless"
-msgstr[1] "Ndrysho Rrjetet Wireless"
-
-#: panel-applet/menu-info.c:307
-msgid " (invalid Unicode)"
-msgstr ""
-
-#: examples/python/systray/eggtrayicon.c:111
-msgid "Orientation"
-msgstr ""
-
-#: examples/python/systray/eggtrayicon.c:112
-msgid "The orientation of the tray."
-msgstr ""
-
-#~ msgid "There are no wireless networks..."
-#~ msgstr "Nuk ekziston asnjë rrjet wireless..."
-
-#~ msgid "There are no network devices..."
-#~ msgstr "Nuk ekziston asnjë dispozitiv rrjeti..."
-
-#~ msgid "Network Connections"
-#~ msgstr "Lidhjet e rrjetit"
-
-#~ msgid "_About..."
-#~ msgstr "_Informacione..."
-
-#~ msgid " "
-#~ msgstr " "
-
-#~ msgid ""
-#~ "<span weight=\"bold\" size=\"larger\">Wireless Network Login "
-#~ "Confirmation</span>\n"
-#~ "\n"
-#~ "You have chosen log in to the wireless network '%s'. If you are sure "
-#~ "this wireless network is secure, click the checkbox below and "
-#~ "NetworkManager will no longer pester you with stupid questions when you "
-#~ "connect to it."
-#~ msgstr ""
-#~ "<span weight=\"bold\" size=\"larger\">Konfirmimi i futjes në Rrjetin "
-#~ "Wireless</span>\n"
-#~ "\n"
-#~ "Jeni duke u futur në rrjetin wireless '%s'. Nëse jeni i sigurt që ky "
-#~ "rrjet pa fije është i sigurt, kliko tek kutia zgjedhëse e mëposhtme dhe "
-#~ "NetworkManager nuk do t'ju bezdisë më me pyetje të kota në momentin që do "
-#~ "të dëshironi të lidheni me të."
-
-#~ msgid "Always Trust this Wireless Network"
-#~ msgstr "Ky rrjet wireless është gjithmonë i besueshëm"
diff --git a/po/sr.po b/po/sr.po
deleted file mode 100644
index af488f0843..0000000000
--- a/po/sr.po
+++ /dev/null
@@ -1,437 +0,0 @@
-# Serbian Cyrillic and Latin translations for NetworkManager
-# Copyright (C) 2004-2005 GNOME Foundation
-# This file is distributed under the same licence as the NetworkManager package.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: NetworkManager\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2005-05-13 16:11-0400\n"
-"PO-Revision-Date: 2005-05-14 18:47+02:00\n"
-"Last-Translator: Filip Miletic <f dot miletic at ewi dot tudelft dot nl>\n"
-"Language-Team: Serbian <gnu@prevod.org>\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n"
-
-#: examples/python/systray/eggtrayicon.c:111 gnome/applet/eggtrayicon.c:118
-msgid "Orientation"
-msgstr "УÑмерење"
-
-# Потребан је бољи превод за ово
-#: examples/python/systray/eggtrayicon.c:112 gnome/applet/eggtrayicon.c:119
-msgid "The orientation of the tray."
-msgstr "УÑмерење обавештајне зоне."
-
-#: gnome/applet/applet-dbus-info.c:852
-#, c-format
-msgid ""
-"The requested wireless network '%s' does not appear to be in range. A "
-"different wireless network will be used if any are available."
-msgstr "Тражена бежична мрежа „%s“ није у домету. Биће коришћена друга бежична мрежа ако је раÑположива."
-
-#: gnome/applet/applet-dbus.c:573
-#, c-format
-msgid "Connection to the wireless network '%s' failed.\n"
-msgstr "ÐеуÑпела веза Ñа бежичном мрежом „%s“.\n"
-
-#: gnome/applet/applet-dbus.c:578
-msgid "Connection to the wired network failed.\n"
-msgstr "ÐеуÑпела веза Ñа жичаном мрежом.\n"
-
-#: gnome/applet/applet.c:194 gnome/applet/applet.c:212
-msgid "NetworkManager Applet"
-msgstr "Ðплет Управник мреже"
-
-#: gnome/applet/applet.c:196 gnome/applet/applet.c:214
-msgid "Copyright (C) 2004-2005 Red Hat, Inc."
-msgstr "Copyright (C) 2004-2005 Red Hat, Inc."
-
-#: gnome/applet/applet.c:197 gnome/applet/applet.c:215
-msgid ""
-"Notification area applet for managing your network devices and connections."
-msgstr "Ðплет за обавештајну зону за управљање мрежним уређајима и везама."
-
-#: gnome/applet/applet.c:280
-#, c-format
-msgid ""
-"<span weight=\"bold\" size=\"larger\">VPN Login Failure</span>\n"
-"\n"
-"Could not start the VPN connection '%s' due to a login failure.\n"
-"\n"
-"The VPN service said: \"%s\""
-msgstr ""
-"<span weight=\"bold\" size=\"larger\">Пријава на VPN није уÑпела</span>\n"
-"\n"
-"VPN веза Ñа мрежом „%s“ није оÑтварена јер пријава није уÑпела.\n"
-"\n"
-"Порука VPN ÑервиÑа је била : „%s“"
-
-#: gnome/applet/applet.c:341
-#, c-format
-msgid ""
-"<span weight=\"bold\" size=\"larger\">VPN Login Message</span>\n"
-"\n"
-"VPN connection '%s' said:\n"
-"\n"
-"\"%s\""
-msgstr ""
-"<span weight=\"bold\" size=\"larger\">Порука при пријави на VPN</span>\n"
-"\n"
-"Порука VPN везе „%s“ је:\n"
-"\n"
-"„%s“"
-
-#: gnome/applet/applet.c:559 gnome/applet/applet.c:1922
-#: gnome/applet/other-network-dialog.c:315
-#: gnome/applet/passphrase-dialog.c:430
-msgid ""
-"The NetworkManager Applet could not find some required resources (the glade "
-"file was not found)."
-msgstr "Ðплет Управник мреже није могао да пронађе неке од потребних реÑурÑа (глејд датотека није пронађена)."
-
-#: gnome/applet/applet.c:572
-#, c-format
-msgid "The network device \"%s (%s)\" does not support wireless scanning."
-msgstr "Мрежни уређај „%s (%s)“ не подржава потрагу за бежичним мрежама."
-
-#: gnome/applet/applet.c:579
-#, c-format
-msgid "The network device \"%s (%s)\" does not support link detection."
-msgstr "Мрежни уређај „%s (%s)“ не подржава откривање везе."
-
-#: gnome/applet/applet.c:700
-#, c-format
-msgid "Preparing device %s for the wired network..."
-msgstr "Припрема уређаја %s за жичану мрежу..."
-
-#: gnome/applet/applet.c:702
-#, c-format
-msgid "Preparing device %s for the wireless network '%s'..."
-msgstr "Припрема уређаја %s за бежичну мрежу „%s“..."
-
-#: gnome/applet/applet.c:709
-#, c-format
-msgid "Configuring device %s for the wired network..."
-msgstr "Подешавање уређаја %s за бежичну мрежу..."
-
-#: gnome/applet/applet.c:711
-#, c-format
-msgid "Attempting to join the wireless network '%s'..."
-msgstr "Покушај приÑтупа бежичној мрежи „%s“..."
-
-#: gnome/applet/applet.c:718
-#, c-format
-msgid "Waiting for Network Key for the wireless network '%s'..."
-msgstr "Чекање на мрежни кључ за бежичну мрежу „%s“..."
-
-#: gnome/applet/applet.c:725 gnome/applet/applet.c:734
-msgid "Requesting a network address from the wired network..."
-msgstr "Потраживање мрежне адреÑе за жичану мрежу..."
-
-#: gnome/applet/applet.c:727 gnome/applet/applet.c:736
-#, c-format
-msgid "Requesting a network address from the wireless network '%s'..."
-msgstr "Потраживање мрежне адреÑе за бежичну мрежу „%s“..."
-
-#: gnome/applet/applet.c:743
-msgid "Finishing connection to the wired network..."
-msgstr "ОбуÑтављање везе Ñа жичаном мрежом..."
-
-#: gnome/applet/applet.c:745
-#, c-format
-msgid "Finishing connection to the wireless network '%s'..."
-msgstr "ОбуÑтављање везе Ñа бежичном мрежом „%s“..."
-
-#: gnome/applet/applet.c:791
-msgid "NetworkManager is not running"
-msgstr "Управљач мреже није покренут"
-
-#: gnome/applet/applet.c:802
-msgid "No network connection"
-msgstr "Ðема мрежних веза"
-
-#: gnome/applet/applet.c:809
-msgid "Wired network connection"
-msgstr "Бежична мрежна веза"
-
-# FIXME Ðд-хок
-#: gnome/applet/applet.c:816
-msgid "Connected to an Ad-Hoc wireless network"
-msgstr "Повезан Ñа ад-хок бежичном мрежом"
-
-#: gnome/applet/applet.c:830
-#, c-format
-msgid "Wireless network connection to '%s' (%d%%)"
-msgstr "Бежична мрежна веза Ñа „%s“ (%d%%)"
-
-#: gnome/applet/applet.c:1181
-msgid "Other Wireless Networks..."
-msgstr "ОÑтале бежичне мреже..."
-
-#: gnome/applet/applet.c:1202
-msgid "Create new Wireless Network..."
-msgstr "Ðаправи нову бежичну мрежу..."
-
-#: gnome/applet/applet.c:1315
-msgid "VPN Connections"
-msgstr "VPN везе"
-
-#: gnome/applet/applet.c:1337
-msgid "Disconnect VPN..."
-msgstr "ИÑкључи VPN..."
-
-#: gnome/applet/applet.c:1366
-msgid "No network devices have been found"
-msgstr "Ðије пронађен ниједан мрежни уређај"
-
-#: gnome/applet/applet.c:1529
-msgid "NetworkManager is not running..."
-msgstr "Управљач мрежом није покренут..."
-
-#: gnome/applet/applet.c:1599 gnome/applet/applet.c:1647
-msgid "Pause Wireless Scanning"
-msgstr "ОбуÑтави тражење бежичне мреже"
-
-#: gnome/applet/applet.c:1604
-msgid "Resume Wireless Scanning"
-msgstr "ÐаÑтави тражење бежичне мреже"
-
-#: gnome/applet/applet.c:1614 gnome/applet/applet.c:1653
-msgid "Stop All Wireless Devices"
-msgstr "ЗауÑтави Ñве бежичне уређаје"
-
-#: gnome/applet/applet.c:1619
-msgid "Start All Wireless Devices"
-msgstr "Покрени Ñве бежичне уређаје"
-
-#: gnome/applet/applet.c:1662
-msgid "Help"
-msgstr "Помоћ"
-
-#: gnome/applet/applet.c:1669
-msgid "About"
-msgstr "О програму"
-
-#: gnome/applet/applet.c:2070
-msgid ""
-"The NetworkManager applet could not find some required resources. It cannot "
-"continue.\n"
-msgstr "Управљач мрежом није уÑпео да пронађе неопходне реÑурÑе и не може да наÑтави рад.\n"
-
-#: gnome/applet/gtkcellrendererprogress.c:243
-#: gnome/applet/gtkcellrendererprogress.c:301
-#, c-format
-msgid "progress bar label|%d %%"
-msgstr "%d %%"
-
-#: gnome/applet/menu-items.c:91
-#, c-format
-msgid "Wired Network (%s)"
-msgstr "Жичана мрежа (%s)"
-
-#: gnome/applet/menu-items.c:93
-msgid "Wired Network"
-msgstr "Жичана мрежа"
-
-#: gnome/applet/menu-items.c:166
-#, c-format
-msgid "Wireless Network (%s)"
-msgid_plural "Wireless Networks (%s)"
-msgstr[0] "Бежична мрежа (%s)"
-msgstr[1] "Бежичне мреже (%s)"
-msgstr[2] "Бежичних мрежа (%s)"
-
-#: gnome/applet/menu-items.c:168
-msgid "Wireless Network"
-msgid_plural "Wireless Networks"
-msgstr[0] "Бежична мрежа"
-msgstr[1] "Бежичне мреже"
-msgstr[2] "Бежичне мреже"
-
-#: gnome/applet/menu-items.c:294
-msgid " (invalid Unicode)"
-msgstr " (неиÑправан Уникод)"
-
-#: gnome/applet/other-network-dialog.c:148
-#: gnome/applet/passphrase-dialog.c:164
-#: gnome/applet/wireless-applet.glade.h:27
-msgid "Passphrase:"
-msgstr "Лозинка:"
-
-#: gnome/applet/other-network-dialog.c:151
-#: gnome/applet/passphrase-dialog.c:167
-msgid "Ascii Key:"
-msgstr "ÐСКРИ кључ:"
-
-#: gnome/applet/other-network-dialog.c:154
-#: gnome/applet/passphrase-dialog.c:170
-msgid "Hex Key:"
-msgstr "ХекÑа кључ:"
-
-#: gnome/applet/other-network-dialog.c:229
-msgid "Create new wireless network"
-msgstr "Ðаправи нову бежичну мрежу"
-
-#: gnome/applet/other-network-dialog.c:230
-msgid ""
-"Enter the ESSID and security settings of the wireless network you wish to "
-"create."
-msgstr "УнеÑите ESSID и безбедноÑне поÑтавке бежичне мреже коју желите да начините."
-
-#: gnome/applet/other-network-dialog.c:235
-msgid "Custom wireless network"
-msgstr "КориÑничка бежична мрежа"
-
-#: gnome/applet/other-network-dialog.c:236
-msgid "Enter the ESSID of the wireless network to which you wish to connect."
-msgstr "УнеÑите ESSID бежичне мреже Ñа којом желите да Ñе повежете."
-
-#: gnome/applet/vpn-password-dialog.c:105
-#, c-format
-msgid "You must log in to access the Virtual Private Network '%s'."
-msgstr "Морате бити пријављени како биÑте кориÑтили виртуелну приватну мрежу „%s“."
-
-#: gnome/applet/wireless-applet.glade.h:1
-msgid " "
-msgstr " "
-
-#: gnome/applet/wireless-applet.glade.h:2
-msgid "*"
-msgstr "*"
-
-#: gnome/applet/wireless-applet.glade.h:3
-msgid ""
-"128-bit Passphrase (WEP)\n"
-"Ascii Key (WEP)\n"
-"Hex Key (WEP)"
-msgstr ""
-"128-битни кључ (WEP)\n"
-"ÐСКРИ кључ (WEP)\n"
-"Ð¥ÐµÐºÑ ÐºÑ™ÑƒÑ‡ (WEP)"
-
-#: gnome/applet/wireless-applet.glade.h:6
-msgid ""
-"128-bit passphrase (WEP)\n"
-"Ascii key (WEP)\n"
-"Hex key (WEP)"
-msgstr ""
-"128-битни кључ (WEP)\n"
-"ÐСКРИ кључ (WEP)\n"
-"Ð¥ÐµÐºÑ ÐºÑ™ÑƒÑ‡ (WEP)"
-
-#: gnome/applet/wireless-applet.glade.h:10
-#, no-c-format
-msgid ""
-"<span weight=\"bold\" size=\"larger\">Passphrase Required by Wireless "
-"Network</span>\n"
-"\n"
-"A passphrase or encryption key is required to access the wireless network '%"
-"s'."
-msgstr ""
-"<span weight=\"bold\" size=\"larger\">Бежична мрежа захтева лозинку</span>\n"
-"\n"
-" Лозинка или кључ за шифровање Ñу неопходни за приÑтуп бежичној мрежи „%s“."
-
-#: gnome/applet/wireless-applet.glade.h:14
-#, no-c-format
-msgid ""
-"<span weight=\"bold\" size=\"larger\">Reduced Network Functionality</span>\n"
-"\n"
-"%s It will not be completely functional."
-msgstr ""
-"<span weight=\"bold\" size=\"larger\">Смањена употребна вредноÑÑ‚ мреже</span>\n"
-"\n"
-"%s неће бити ÑаÑвим употребљива."
-
-#: gnome/applet/wireless-applet.glade.h:18
-#, no-c-format
-msgid ""
-"<span weight=\"bold\" size=\"larger\">Wireless Network Login Confirmation</"
-"span>\n"
-"\n"
-"You have chosen log in to the wireless network '%s'. If you are sure this "
-"wireless network is secure, click the checkbox below and NetworkManager will "
-"no longer pester you with stupid questions when you connect to it."
-msgstr ""
-"<span weight=\"bold\" size=\"larger\">Потврда пријаве на мрежу</span>\n"
-"\n"
-"Желите да Ñе пријавите на мрежу „%s“. Ðко Ñте Ñигурни да је ова бежична мрежа безбедна, обележите кућицу иÑпод и Управник мреже вам више неће поÑтављати Ñувишна питања при пријави на ову мрежу."
-
-#: gnome/applet/wireless-applet.glade.h:21
-msgid "Always Trust this Wireless Network"
-msgstr "Увек поклони поверење бежичној мрежи"
-
-#: gnome/applet/wireless-applet.glade.h:22
-msgid "C_onnect"
-msgstr "П_овежи Ñе"
-
-#: gnome/applet/wireless-applet.glade.h:23
-msgid "Connect with encryption enabled"
-msgstr "Повежи Ñе и укључи шифровање"
-
-#: gnome/applet/wireless-applet.glade.h:24
-msgid "Don't remind me again"
-msgstr "Ðе подÑећај ме више"
-
-#: gnome/applet/wireless-applet.glade.h:25
-msgid "Key Type:"
-msgstr "Ð’Ñ€Ñта кључа:"
-
-#: gnome/applet/wireless-applet.glade.h:26
-msgid "Key type:"
-msgstr "Ð’Ñ€Ñта кључа:"
-
-#: gnome/applet/wireless-applet.glade.h:28
-msgid "Wireless Network Key Required"
-msgstr "Потребан је кључ за бежичну мрежу"
-
-#: gnome/applet/wireless-applet.glade.h:29
-msgid "Wireless _adapter:"
-msgstr "Бежични _уређај:"
-
-#: gnome/applet/wireless-applet.glade.h:30
-msgid "Wireless _network:"
-msgstr "Бежична _мрежа:"
-
-#: gnome/applet/wireless-applet.glade.h:31
-msgid "_Login to Network"
-msgstr "_Умрежи Ñе"
-
-#: gnome/applet/wireless-applet.glade.h:32
-msgid "_OK"
-msgstr "_У реду"
-
-#: src/nm-netlink-monitor.c:154
-#, c-format
-msgid ""
-"unable to create netlink socket for monitoring wired ethernet devices - %s"
-msgstr "Ðије могуће направити утичницу за поÑматрање жичаног мрежног уређаја - %s"
-
-#: src/nm-netlink-monitor.c:172
-#, c-format
-msgid ""
-"unable to bind to netlink socket for monitoring wired ethernet devices - %s"
-msgstr "Ðије могуће повезати Ñе на утичницу за поÑматрање жичаног мрежног уређаја - %s"
-
-#: src/nm-netlink-monitor.c:404
-msgid "operation took too long"
-msgstr "Потрага је предуго трајала"
-
-#: src/nm-netlink-monitor.c:501
-msgid "received data from wrong type of sender"
-msgstr "Примљени Ñу подаци погрешног типа од пошиљаоца"
-
-#: src/nm-netlink-monitor.c:514
-msgid "received data from unexpected sender"
-msgstr "Примљени Ñу подаци од неочекиваног пошиљаоца"
-
-#: src/nm-netlink-monitor.c:536
-#, c-format
-msgid "%s"
-msgstr "%s"
-
-#: src/nm-netlink-monitor.c:645
-msgid "too much data was sent over socket and some of it was lost"
-msgstr "Сувише података је поÑлато кроз утичницу и нешто од њих је изгубљено"
diff --git a/po/sr@Latn.po b/po/sr@Latn.po
deleted file mode 100644
index 21b55f58ed..0000000000
--- a/po/sr@Latn.po
+++ /dev/null
@@ -1,437 +0,0 @@
-# Serbian Cyrillic and Latin translations for NetworkManager
-# Copyright (C) 2004-2005 GNOME Foundation
-# This file is distributed under the same licence as the NetworkManager package.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: NetworkManager\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2005-05-13 16:11-0400\n"
-"PO-Revision-Date: 2005-05-14 18:47+02:00\n"
-"Last-Translator: Filip Miletic <f dot miletic at ewi dot tudelft dot nl>\n"
-"Language-Team: Serbian <gnu@prevod.org>\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n"
-
-#: examples/python/systray/eggtrayicon.c:111 gnome/applet/eggtrayicon.c:118
-msgid "Orientation"
-msgstr "Usmerenje"
-
-# Potreban je bolji prevod za ovo
-#: examples/python/systray/eggtrayicon.c:112 gnome/applet/eggtrayicon.c:119
-msgid "The orientation of the tray."
-msgstr "Usmerenje obaveštajne zone."
-
-#: gnome/applet/applet-dbus-info.c:852
-#, c-format
-msgid ""
-"The requested wireless network '%s' does not appear to be in range. A "
-"different wireless network will be used if any are available."
-msgstr "Tražena bežiÄna mreža „%s“ nije u dometu. Biće korišćena druga bežiÄna mreža ako je raspoloživa."
-
-#: gnome/applet/applet-dbus.c:573
-#, c-format
-msgid "Connection to the wireless network '%s' failed.\n"
-msgstr "Neuspela veza sa bežiÄnom mrežom „%s“.\n"
-
-#: gnome/applet/applet-dbus.c:578
-msgid "Connection to the wired network failed.\n"
-msgstr "Neuspela veza sa žiÄanom mrežom.\n"
-
-#: gnome/applet/applet.c:194 gnome/applet/applet.c:212
-msgid "NetworkManager Applet"
-msgstr "Aplet Upravnik mreže"
-
-#: gnome/applet/applet.c:196 gnome/applet/applet.c:214
-msgid "Copyright (C) 2004-2005 Red Hat, Inc."
-msgstr "Copyright (C) 2004-2005 Red Hat, Inc."
-
-#: gnome/applet/applet.c:197 gnome/applet/applet.c:215
-msgid ""
-"Notification area applet for managing your network devices and connections."
-msgstr "Aplet za obaveštajnu zonu za upravljanje mrežnim uređajima i vezama."
-
-#: gnome/applet/applet.c:280
-#, c-format
-msgid ""
-"<span weight=\"bold\" size=\"larger\">VPN Login Failure</span>\n"
-"\n"
-"Could not start the VPN connection '%s' due to a login failure.\n"
-"\n"
-"The VPN service said: \"%s\""
-msgstr ""
-"<span weight=\"bold\" size=\"larger\">Prijava na VPN nije uspela</span>\n"
-"\n"
-"VPN veza sa mrežom „%s“ nije ostvarena jer prijava nije uspela.\n"
-"\n"
-"Poruka VPN servisa je bila : „%s“"
-
-#: gnome/applet/applet.c:341
-#, c-format
-msgid ""
-"<span weight=\"bold\" size=\"larger\">VPN Login Message</span>\n"
-"\n"
-"VPN connection '%s' said:\n"
-"\n"
-"\"%s\""
-msgstr ""
-"<span weight=\"bold\" size=\"larger\">Poruka pri prijavi na VPN</span>\n"
-"\n"
-"Poruka VPN veze „%s“ je:\n"
-"\n"
-"„%s“"
-
-#: gnome/applet/applet.c:559 gnome/applet/applet.c:1922
-#: gnome/applet/other-network-dialog.c:315
-#: gnome/applet/passphrase-dialog.c:430
-msgid ""
-"The NetworkManager Applet could not find some required resources (the glade "
-"file was not found)."
-msgstr "Aplet Upravnik mreže nije mogao da pronađe neke od potrebnih resursa (glejd datoteka nije pronađena)."
-
-#: gnome/applet/applet.c:572
-#, c-format
-msgid "The network device \"%s (%s)\" does not support wireless scanning."
-msgstr "Mrežni ureÄ‘aj „%s (%s)“ ne podržava potragu za bežiÄnim mrežama."
-
-#: gnome/applet/applet.c:579
-#, c-format
-msgid "The network device \"%s (%s)\" does not support link detection."
-msgstr "Mrežni uređaj „%s (%s)“ ne podržava otkrivanje veze."
-
-#: gnome/applet/applet.c:700
-#, c-format
-msgid "Preparing device %s for the wired network..."
-msgstr "Priprema ureÄ‘aja %s za žiÄanu mrežu..."
-
-#: gnome/applet/applet.c:702
-#, c-format
-msgid "Preparing device %s for the wireless network '%s'..."
-msgstr "Priprema ureÄ‘aja %s za bežiÄnu mrežu „%s“..."
-
-#: gnome/applet/applet.c:709
-#, c-format
-msgid "Configuring device %s for the wired network..."
-msgstr "PodeÅ¡avanje ureÄ‘aja %s za bežiÄnu mrežu..."
-
-#: gnome/applet/applet.c:711
-#, c-format
-msgid "Attempting to join the wireless network '%s'..."
-msgstr "PokuÅ¡aj pristupa bežiÄnoj mreži „%s“..."
-
-#: gnome/applet/applet.c:718
-#, c-format
-msgid "Waiting for Network Key for the wireless network '%s'..."
-msgstr "ÄŒekanje na mrežni kljuÄ za bežiÄnu mrežu „%s“..."
-
-#: gnome/applet/applet.c:725 gnome/applet/applet.c:734
-msgid "Requesting a network address from the wired network..."
-msgstr "Potraživanje mrežne adrese za žiÄanu mrežu..."
-
-#: gnome/applet/applet.c:727 gnome/applet/applet.c:736
-#, c-format
-msgid "Requesting a network address from the wireless network '%s'..."
-msgstr "Potraživanje mrežne adrese za bežiÄnu mrežu „%s“..."
-
-#: gnome/applet/applet.c:743
-msgid "Finishing connection to the wired network..."
-msgstr "Obustavljanje veze sa žiÄanom mrežom..."
-
-#: gnome/applet/applet.c:745
-#, c-format
-msgid "Finishing connection to the wireless network '%s'..."
-msgstr "Obustavljanje veze sa bežiÄnom mrežom „%s“..."
-
-#: gnome/applet/applet.c:791
-msgid "NetworkManager is not running"
-msgstr "UpravljaÄ mreže nije pokrenut"
-
-#: gnome/applet/applet.c:802
-msgid "No network connection"
-msgstr "Nema mrežnih veza"
-
-#: gnome/applet/applet.c:809
-msgid "Wired network connection"
-msgstr "BežiÄna mrežna veza"
-
-# FIXME Ad-hok
-#: gnome/applet/applet.c:816
-msgid "Connected to an Ad-Hoc wireless network"
-msgstr "Povezan sa ad-hok bežiÄnom mrežom"
-
-#: gnome/applet/applet.c:830
-#, c-format
-msgid "Wireless network connection to '%s' (%d%%)"
-msgstr "BežiÄna mrežna veza sa „%s“ (%d%%)"
-
-#: gnome/applet/applet.c:1181
-msgid "Other Wireless Networks..."
-msgstr "Ostale bežiÄne mreže..."
-
-#: gnome/applet/applet.c:1202
-msgid "Create new Wireless Network..."
-msgstr "Napravi novu bežiÄnu mrežu..."
-
-#: gnome/applet/applet.c:1315
-msgid "VPN Connections"
-msgstr "VPN veze"
-
-#: gnome/applet/applet.c:1337
-msgid "Disconnect VPN..."
-msgstr "IskljuÄi VPN..."
-
-#: gnome/applet/applet.c:1366
-msgid "No network devices have been found"
-msgstr "Nije pronađen nijedan mrežni uređaj"
-
-#: gnome/applet/applet.c:1529
-msgid "NetworkManager is not running..."
-msgstr "UpravljaÄ mrežom nije pokrenut..."
-
-#: gnome/applet/applet.c:1599 gnome/applet/applet.c:1647
-msgid "Pause Wireless Scanning"
-msgstr "Obustavi traženje bežiÄne mreže"
-
-#: gnome/applet/applet.c:1604
-msgid "Resume Wireless Scanning"
-msgstr "Nastavi traženje bežiÄne mreže"
-
-#: gnome/applet/applet.c:1614 gnome/applet/applet.c:1653
-msgid "Stop All Wireless Devices"
-msgstr "Zaustavi sve bežiÄne ureÄ‘aje"
-
-#: gnome/applet/applet.c:1619
-msgid "Start All Wireless Devices"
-msgstr "Pokreni sve bežiÄne ureÄ‘aje"
-
-#: gnome/applet/applet.c:1662
-msgid "Help"
-msgstr "Pomoć"
-
-#: gnome/applet/applet.c:1669
-msgid "About"
-msgstr "O programu"
-
-#: gnome/applet/applet.c:2070
-msgid ""
-"The NetworkManager applet could not find some required resources. It cannot "
-"continue.\n"
-msgstr "UpravljaÄ mrežom nije uspeo da pronaÄ‘e neophodne resurse i ne može da nastavi rad.\n"
-
-#: gnome/applet/gtkcellrendererprogress.c:243
-#: gnome/applet/gtkcellrendererprogress.c:301
-#, c-format
-msgid "progress bar label|%d %%"
-msgstr "%d %%"
-
-#: gnome/applet/menu-items.c:91
-#, c-format
-msgid "Wired Network (%s)"
-msgstr "ŽiÄana mreža (%s)"
-
-#: gnome/applet/menu-items.c:93
-msgid "Wired Network"
-msgstr "ŽiÄana mreža"
-
-#: gnome/applet/menu-items.c:166
-#, c-format
-msgid "Wireless Network (%s)"
-msgid_plural "Wireless Networks (%s)"
-msgstr[0] "BežiÄna mreža (%s)"
-msgstr[1] "BežiÄne mreže (%s)"
-msgstr[2] "BežiÄnih mreža (%s)"
-
-#: gnome/applet/menu-items.c:168
-msgid "Wireless Network"
-msgid_plural "Wireless Networks"
-msgstr[0] "BežiÄna mreža"
-msgstr[1] "BežiÄne mreže"
-msgstr[2] "BežiÄne mreže"
-
-#: gnome/applet/menu-items.c:294
-msgid " (invalid Unicode)"
-msgstr " (neispravan Unikod)"
-
-#: gnome/applet/other-network-dialog.c:148
-#: gnome/applet/passphrase-dialog.c:164
-#: gnome/applet/wireless-applet.glade.h:27
-msgid "Passphrase:"
-msgstr "Lozinka:"
-
-#: gnome/applet/other-network-dialog.c:151
-#: gnome/applet/passphrase-dialog.c:167
-msgid "Ascii Key:"
-msgstr "ASKRI kljuÄ:"
-
-#: gnome/applet/other-network-dialog.c:154
-#: gnome/applet/passphrase-dialog.c:170
-msgid "Hex Key:"
-msgstr "Heksa kljuÄ:"
-
-#: gnome/applet/other-network-dialog.c:229
-msgid "Create new wireless network"
-msgstr "Napravi novu bežiÄnu mrežu"
-
-#: gnome/applet/other-network-dialog.c:230
-msgid ""
-"Enter the ESSID and security settings of the wireless network you wish to "
-"create."
-msgstr "Unesite ESSID i bezbednosne postavke bežiÄne mreže koju želite da naÄinite."
-
-#: gnome/applet/other-network-dialog.c:235
-msgid "Custom wireless network"
-msgstr "KorisniÄka bežiÄna mreža"
-
-#: gnome/applet/other-network-dialog.c:236
-msgid "Enter the ESSID of the wireless network to which you wish to connect."
-msgstr "Unesite ESSID bežiÄne mreže sa kojom želite da se povežete."
-
-#: gnome/applet/vpn-password-dialog.c:105
-#, c-format
-msgid "You must log in to access the Virtual Private Network '%s'."
-msgstr "Morate biti prijavljeni kako biste koristili virtuelnu privatnu mrežu „%s“."
-
-#: gnome/applet/wireless-applet.glade.h:1
-msgid " "
-msgstr " "
-
-#: gnome/applet/wireless-applet.glade.h:2
-msgid "*"
-msgstr "*"
-
-#: gnome/applet/wireless-applet.glade.h:3
-msgid ""
-"128-bit Passphrase (WEP)\n"
-"Ascii Key (WEP)\n"
-"Hex Key (WEP)"
-msgstr ""
-"128-bitni kljuÄ (WEP)\n"
-"ASKRI kljuÄ (WEP)\n"
-"Heks kljuÄ (WEP)"
-
-#: gnome/applet/wireless-applet.glade.h:6
-msgid ""
-"128-bit passphrase (WEP)\n"
-"Ascii key (WEP)\n"
-"Hex key (WEP)"
-msgstr ""
-"128-bitni kljuÄ (WEP)\n"
-"ASKRI kljuÄ (WEP)\n"
-"Heks kljuÄ (WEP)"
-
-#: gnome/applet/wireless-applet.glade.h:10
-#, no-c-format
-msgid ""
-"<span weight=\"bold\" size=\"larger\">Passphrase Required by Wireless "
-"Network</span>\n"
-"\n"
-"A passphrase or encryption key is required to access the wireless network '%"
-"s'."
-msgstr ""
-"<span weight=\"bold\" size=\"larger\">BežiÄna mreža zahteva lozinku</span>\n"
-"\n"
-" Lozinka ili kljuÄ za Å¡ifrovanje su neophodni za pristup bežiÄnoj mreži „%s“."
-
-#: gnome/applet/wireless-applet.glade.h:14
-#, no-c-format
-msgid ""
-"<span weight=\"bold\" size=\"larger\">Reduced Network Functionality</span>\n"
-"\n"
-"%s It will not be completely functional."
-msgstr ""
-"<span weight=\"bold\" size=\"larger\">Smanjena upotrebna vrednost mreže</span>\n"
-"\n"
-"%s neće biti sasvim upotrebljiva."
-
-#: gnome/applet/wireless-applet.glade.h:18
-#, no-c-format
-msgid ""
-"<span weight=\"bold\" size=\"larger\">Wireless Network Login Confirmation</"
-"span>\n"
-"\n"
-"You have chosen log in to the wireless network '%s'. If you are sure this "
-"wireless network is secure, click the checkbox below and NetworkManager will "
-"no longer pester you with stupid questions when you connect to it."
-msgstr ""
-"<span weight=\"bold\" size=\"larger\">Potvrda prijave na mrežu</span>\n"
-"\n"
-"Želite da se prijavite na mrežu „%s“. Ako ste sigurni da je ova bežiÄna mreža bezbedna, obeležite kućicu ispod i Upravnik mreže vam viÅ¡e neće postavljati suviÅ¡na pitanja pri prijavi na ovu mrežu."
-
-#: gnome/applet/wireless-applet.glade.h:21
-msgid "Always Trust this Wireless Network"
-msgstr "Uvek pokloni poverenje bežiÄnoj mreži"
-
-#: gnome/applet/wireless-applet.glade.h:22
-msgid "C_onnect"
-msgstr "P_oveži se"
-
-#: gnome/applet/wireless-applet.glade.h:23
-msgid "Connect with encryption enabled"
-msgstr "Poveži se i ukljuÄi Å¡ifrovanje"
-
-#: gnome/applet/wireless-applet.glade.h:24
-msgid "Don't remind me again"
-msgstr "Ne podsećaj me više"
-
-#: gnome/applet/wireless-applet.glade.h:25
-msgid "Key Type:"
-msgstr "Vrsta kljuÄa:"
-
-#: gnome/applet/wireless-applet.glade.h:26
-msgid "Key type:"
-msgstr "Vrsta kljuÄa:"
-
-#: gnome/applet/wireless-applet.glade.h:28
-msgid "Wireless Network Key Required"
-msgstr "Potreban je kljuÄ za bežiÄnu mrežu"
-
-#: gnome/applet/wireless-applet.glade.h:29
-msgid "Wireless _adapter:"
-msgstr "BežiÄni _ureÄ‘aj:"
-
-#: gnome/applet/wireless-applet.glade.h:30
-msgid "Wireless _network:"
-msgstr "BežiÄna _mreža:"
-
-#: gnome/applet/wireless-applet.glade.h:31
-msgid "_Login to Network"
-msgstr "_Umreži se"
-
-#: gnome/applet/wireless-applet.glade.h:32
-msgid "_OK"
-msgstr "_U redu"
-
-#: src/nm-netlink-monitor.c:154
-#, c-format
-msgid ""
-"unable to create netlink socket for monitoring wired ethernet devices - %s"
-msgstr "Nije moguće napraviti utiÄnicu za posmatranje žiÄanog mrežnog ureÄ‘aja - %s"
-
-#: src/nm-netlink-monitor.c:172
-#, c-format
-msgid ""
-"unable to bind to netlink socket for monitoring wired ethernet devices - %s"
-msgstr "Nije moguće povezati se na utiÄnicu za posmatranje žiÄanog mrežnog ureÄ‘aja - %s"
-
-#: src/nm-netlink-monitor.c:404
-msgid "operation took too long"
-msgstr "Potraga je predugo trajala"
-
-#: src/nm-netlink-monitor.c:501
-msgid "received data from wrong type of sender"
-msgstr "Primljeni su podaci pogrešnog tipa od pošiljaoca"
-
-#: src/nm-netlink-monitor.c:514
-msgid "received data from unexpected sender"
-msgstr "Primljeni su podaci od neoÄekivanog poÅ¡iljaoca"
-
-#: src/nm-netlink-monitor.c:536
-#, c-format
-msgid "%s"
-msgstr "%s"
-
-#: src/nm-netlink-monitor.c:645
-msgid "too much data was sent over socket and some of it was lost"
-msgstr "SuviÅ¡e podataka je poslato kroz utiÄnicu i neÅ¡to od njih je izgubljeno"
diff --git a/po/sv.po b/po/sv.po
deleted file mode 100644
index 63781d935d..0000000000
--- a/po/sv.po
+++ /dev/null
@@ -1,961 +0,0 @@
-# Swedish messages for NetworkManager.
-# Copyright (C) 2004, 2005 Free Software Foundation, Inc.
-# Christian Rose <menthos@menthos.com>, 2004, 2005.
-#
-# $Id: sv.po,v 1.7 2005/08/12 18:28:45 rml Exp $
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: NetworkManager\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2005-06-26 01:20+0200\n"
-"PO-Revision-Date: 2005-06-26 01:20+0200\n"
-"Last-Translator: Christian Rose <menthos@menthos.com>\n"
-"Language-Team: Swedish <sv@li.org>\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"Plural-Forms: nplurals=2; plural=(n != 1);\n"
-
-#: examples/python/systray/eggtrayicon.c:111 gnome/applet/eggtrayicon.c:118
-msgid "Orientation"
-msgstr "Orientering"
-
-#: examples/python/systray/eggtrayicon.c:112 gnome/applet/eggtrayicon.c:119
-msgid "The orientation of the tray."
-msgstr "Orienteringen på lådan."
-
-#: gnome/applet/applet-dbus-info.c:986
-#, c-format
-msgid ""
-"The requested wireless network '%s' does not appear to be in range. A "
-"different wireless network will be used if any are available."
-msgstr ""
-"Det begärda trådlösa nätverket \"%s\" verkar inte vara inom räckhåll. Ett "
-"annat trådlöst nätverk kommer att användas om något är tillgängligt."
-
-#: gnome/applet/applet-dbus.c:597
-#, c-format
-msgid "Connection to the wireless network '%s' failed.\n"
-msgstr "Anslutning till det trådlösa nätverket \"%s\" misslyckades.\n"
-
-#: gnome/applet/applet-dbus.c:602
-msgid "Connection to the wired network failed.\n"
-msgstr "Anslutning till det trådburna nätverket misslyckades.\n"
-
-#: gnome/applet/applet.c:196 gnome/applet/applet.c:214
-msgid "NetworkManager Applet"
-msgstr "Panelprogram för nätverkshantering"
-
-#: gnome/applet/applet.c:198 gnome/applet/applet.c:216
-msgid "Copyright (C) 2004-2005 Red Hat, Inc."
-msgstr "Copyright © 2004-2005 Red Hat, Inc."
-
-#: gnome/applet/applet.c:199 gnome/applet/applet.c:217
-msgid ""
-"Notification area applet for managing your network devices and connections."
-msgstr ""
-"Panelprogram i notifieringsytan för hantering av dina nätverksenheter och "
-"nätverksanslutningar."
-
-#: gnome/applet/applet.c:302
-msgid "VPN Error"
-msgstr "VPN-fel"
-
-#: gnome/applet/applet.c:306
-#, c-format
-msgid ""
-"<span weight=\"bold\" size=\"larger\">VPN Login Failure</span>\n"
-"\n"
-"Could not start the VPN connection '%s' due to a login failure.\n"
-"\n"
-"The VPN service said: \"%s\""
-msgstr ""
-"<span weight=\"bold\" size=\"larger\">VPN-inloggningsfel</span>\n"
-"\n"
-"Kunde inte starta VPN-anslutningen \"%s\" på grund av ett inloggningfel.\n"
-"\n"
-"VPN-tjänsten sa: \"%s\""
-
-#: gnome/applet/applet.c:311
-#, c-format
-msgid ""
-"<span weight=\"bold\" size=\"larger\">VPN Start Failure</span>\n"
-"\n"
-"Could not start the VPN connection '%s' due to a failure launching the VPN "
-"program.\n"
-"\n"
-"The VPN service said: \"%s\""
-msgstr ""
-"<span weight=\"bold\" size=\"larger\">VPN-startfel</span>\n"
-"\n"
-"Kunde inte starta VPN-anslutningen \"%s\" på grund av ett fel vid start av "
-"VPN-programmet.\n"
-"\n"
-"VPN-tjänsten sa: \"%s\""
-
-#: gnome/applet/applet.c:316
-#, c-format
-msgid ""
-"<span weight=\"bold\" size=\"larger\">VPN Connect Failure</span>\n"
-"\n"
-"Could not start the VPN connection '%s' due to a connection error.\n"
-"\n"
-"The VPN service said: \"%s\""
-msgstr ""
-"<span weight=\"bold\" size=\"larger\">VPN-anslutningsfel</span>\n"
-"\n"
-"Kunde inte starta VPN-anslutningen \"%s\" på grund av ett anslutningsfel.\n"
-"\n"
-"VPN-tjänsten sa: \"%s\""
-
-#: gnome/applet/applet.c:321
-#, c-format
-msgid ""
-"<span weight=\"bold\" size=\"larger\">VPN Configuration Error</span>\n"
-"\n"
-"The VPN connection '%s' was not correctly configured.\n"
-"\n"
-"The VPN service said: \"%s\""
-msgstr ""
-"<span weight=\"bold\" size=\"larger\">VPN-konfigurationsfel</span>\n"
-"\n"
-"VPN-anslutningen \"%s\" konfigurerades inte korrekt.\n"
-"\n"
-"VPN-tjänsten sa: \"%s\""
-
-#: gnome/applet/applet.c:326
-#, c-format
-msgid ""
-"<span weight=\"bold\" size=\"larger\">VPN Connect Failure</span>\n"
-"\n"
-"Could not start the VPN connection '%s' because the VPN server did not "
-"return an adequate network configuration.\n"
-"\n"
-"The VPN service said: \"%s\""
-msgstr ""
-"<span weight=\"bold\" size=\"larger\">VPN-anslutningsfel</span>\n"
-"\n"
-"Kunde inte starta VPN-anslutningen \"%s\" eftersom VPN-servern inte "
-"returnerade en lämplig nätverkskonfiguration.\n"
-"\n"
-"VPN-tjänsten sa: \"%s\""
-
-#: gnome/applet/applet.c:393
-#, c-format
-msgid ""
-"<span weight=\"bold\" size=\"larger\">VPN Login Message</span>\n"
-"\n"
-"VPN connection '%s' said:\n"
-"\n"
-"\"%s\""
-msgstr ""
-"<span weight=\"bold\" size=\"larger\">VPN-inloggningsmeddelande</span>\n"
-"\n"
-"VPN-anslutningen \"%s\" sa:\n"
-"\n"
-"\"%s\""
-
-#: gnome/applet/applet.c:611 gnome/applet/applet.c:2166
-#: gnome/applet/other-network-dialog.c:315
-#: gnome/applet/passphrase-dialog.c:455
-msgid ""
-"The NetworkManager Applet could not find some required resources (the glade "
-"file was not found)."
-msgstr ""
-"Panelprogrammet för nätverkshantering kunde inte hitta en del nödvändiga "
-"resurser (glade-filen hittades inte)."
-
-#: gnome/applet/applet.c:624
-#, c-format
-msgid "The network device \"%s (%s)\" does not support wireless scanning."
-msgstr "Nätverksenheten \"%s (%s)\" stöder inte trådlös genomsökning."
-
-#: gnome/applet/applet.c:631
-#, c-format
-msgid "The network device \"%s (%s)\" does not support link detection."
-msgstr "Nätverksenheten \"%s (%s)\" stöder inte länkdetektering."
-
-#: gnome/applet/applet.c:752
-#, c-format
-msgid "Preparing device %s for the wired network..."
-msgstr "Förbereder enheten %s för det trådbundna nätverket..."
-
-#: gnome/applet/applet.c:754
-#, c-format
-msgid "Preparing device %s for the wireless network '%s'..."
-msgstr "Förbereder enheten %s för det trådlösa nätverket \"%s\"..."
-
-#: gnome/applet/applet.c:761
-#, c-format
-msgid "Configuring device %s for the wired network..."
-msgstr "Konfigurerar enheten %s för det trådbundna nätverket..."
-
-#: gnome/applet/applet.c:763
-#, c-format
-msgid "Attempting to join the wireless network '%s'..."
-msgstr "Försöker ansluta till det trådlösa nätverket \"%s\"..."
-
-#: gnome/applet/applet.c:770
-#, c-format
-msgid "Waiting for Network Key for the wireless network '%s'..."
-msgstr "Väntar på nätverksnyckel för det trådlösa nätverket \"%s\"..."
-
-#: gnome/applet/applet.c:777 gnome/applet/applet.c:786
-msgid "Requesting a network address from the wired network..."
-msgstr "Begär en nätverksadress från det trådbundna nätverket..."
-
-#: gnome/applet/applet.c:779 gnome/applet/applet.c:788
-#, c-format
-msgid "Requesting a network address from the wireless network '%s'..."
-msgstr "Begär en nätverksadress från det trådlösa nätverket \"%s\"..."
-
-#: gnome/applet/applet.c:795
-msgid "Finishing connection to the wired network..."
-msgstr "Slutför anslutning till det trådbundna nätverket..."
-
-#: gnome/applet/applet.c:797
-#, c-format
-msgid "Finishing connection to the wireless network '%s'..."
-msgstr "Slutför anslutning till det trådlösa nätverket \"%s\"..."
-
-#: gnome/applet/applet.c:843
-msgid "NetworkManager is not running"
-msgstr "Nätverkshanteraren är inte igång"
-
-#: gnome/applet/applet.c:854
-msgid "No network connection"
-msgstr "Ingen nätverksanslutning"
-
-#: gnome/applet/applet.c:861
-msgid "Wired network connection"
-msgstr "Trådbunden nätverksanslutning"
-
-#: gnome/applet/applet.c:868
-msgid "Connected to an Ad-Hoc wireless network"
-msgstr "Anluten till ett trådlöst ad hoc-nätverk"
-
-#: gnome/applet/applet.c:882
-#, c-format
-msgid "Wireless network connection to '%s' (%d%%)"
-msgstr "Trådlös nätverksanslutning till \"%s\" (%d%%)"
-
-#: gnome/applet/applet.c:907
-#, c-format
-msgid "VPN connection to '%s'"
-msgstr "VPN-anslutning till \"%s\""
-
-#: gnome/applet/applet.c:1332
-msgid "_Connect to Other Wireless Network..."
-msgstr "_Anslut till annat trådlöst nätverk..."
-
-#: gnome/applet/applet.c:1353
-msgid "Create _New Wireless Network..."
-msgstr "Skapa _nytt trådlöst nätverk..."
-
-#: gnome/applet/applet.c:1466
-#: gnome/vpn-properties/nm-vpn-properties.glade.h:17
-msgid "VPN Connections"
-msgstr "VPN-anslutningar"
-
-#: gnome/applet/applet.c:1488
-msgid "Configure VPN..."
-msgstr "Konfigurera VPN..."
-
-#: gnome/applet/applet.c:1492
-msgid "Disconnect VPN..."
-msgstr "Koppla från VPN..."
-
-#: gnome/applet/applet.c:1542
-msgid "No network devices have been found"
-msgstr "Inga nätverksenheter har hittats"
-
-#: gnome/applet/applet.c:1700
-msgid "NetworkManager is not running..."
-msgstr "Nätverkshanteraren är inte igång..."
-
-#: gnome/applet/applet.c:1768
-msgid "_Stop All Wireless Devices"
-msgstr "_Stoppa alla trådlösa enheter"
-
-#: gnome/applet/applet.c:1773
-msgid "_Start All Wireless Devices"
-msgstr "_Starta alla trådlösa enheter"
-
-#: gnome/applet/applet.c:1804
-msgid "_Wireless Network Discovery"
-msgstr "_Upptäckt av trådlösa nätverk"
-
-#: gnome/applet/applet.c:1807
-msgid "Always Search"
-msgstr "Sök alltid"
-
-#: gnome/applet/applet.c:1814
-msgid "Search Only When Disconnected"
-msgstr "Sök endast då frånkopplad"
-
-#: gnome/applet/applet.c:1821
-msgid "Never Search"
-msgstr "Sök aldrig"
-
-#. Stop All Wireless Devices item
-#: gnome/applet/applet.c:1832
-msgid "Stop All Wireless Devices"
-msgstr "Stoppa alla trådlösa enheter"
-
-#: gnome/applet/applet.c:1840
-msgid "_Help"
-msgstr "_Hjälp"
-
-#: gnome/applet/applet.c:1847
-msgid "_About"
-msgstr "_Om"
-
-#: gnome/applet/applet.c:2314
-msgid ""
-"The NetworkManager applet could not find some required resources. It cannot "
-"continue.\n"
-msgstr ""
-"Panelprogrammet för nätverkshantering kunde inte hitta en del nödvändiga "
-"resurser. Det kan inte fortsätta.\n"
-
-#: gnome/applet/menu-items.c:86
-#, c-format
-msgid "Wired Network (%s)"
-msgstr "Trådbundet nätverk (%s)"
-
-#: gnome/applet/menu-items.c:88
-msgid "_Wired Network"
-msgstr "_Trådbundet nätverk"
-
-#: gnome/applet/menu-items.c:161
-#, c-format
-msgid "Wireless Network (%s)"
-msgid_plural "Wireless Networks (%s)"
-msgstr[0] "Trådlöst nätverk (%s)"
-msgstr[1] "Trådlösa nätverk (%s)"
-
-#: gnome/applet/menu-items.c:163
-msgid "Wireless Network"
-msgid_plural "Wireless Networks"
-msgstr[0] "Trådlöst nätverk"
-msgstr[1] "Trådlösa nätverk"
-
-#: gnome/applet/menu-items.c:305
-msgid " (invalid Unicode)"
-msgstr " (ogiltig Unicode)"
-
-#: gnome/applet/other-network-dialog.c:148
-#: gnome/applet/passphrase-dialog.c:163
-#: gnome/applet/wireless-applet.glade.h:27
-msgid "Passphrase:"
-msgstr "Lösenfras:"
-
-#: gnome/applet/other-network-dialog.c:151
-#: gnome/applet/passphrase-dialog.c:166
-msgid "Ascii Key:"
-msgstr "Ascii-nyckel:"
-
-#: gnome/applet/other-network-dialog.c:154
-#: gnome/applet/passphrase-dialog.c:169
-msgid "Hex Key:"
-msgstr "Hexadecimal nyckel:"
-
-#: gnome/applet/other-network-dialog.c:229
-msgid "Create new wireless network"
-msgstr "Skapa nytt trådlöst nätverk"
-
-#: gnome/applet/other-network-dialog.c:230
-msgid ""
-"Enter the ESSID and security settings of the wireless network you wish to "
-"create."
-msgstr ""
-"Ange ESSID och säkerhetsinställningarna för det trådlösa nätverk som du vill "
-"skapa."
-
-#: gnome/applet/other-network-dialog.c:235
-msgid "Custom wireless network"
-msgstr "Anpassat trådlöst nätverk"
-
-#: gnome/applet/other-network-dialog.c:236
-msgid "Enter the ESSID of the wireless network to which you wish to connect."
-msgstr "Ange ESSID för det trådlösa nätverk som du vill ansluta till."
-
-#: gnome/applet/passphrase-dialog.c:248
-#, c-format
-msgid "Passphrase for wireless network %s"
-msgstr "Lösenfras för det trådlösa nätverket %s"
-
-#: gnome/applet/vpn-password-dialog.c:152
-#: gnome/applet/vpn-password-dialog.c:191
-#, c-format
-msgid "Cannot start VPN connection '%s'"
-msgstr "Kan inte starta VPN-anslutningen \"%s\""
-
-#: gnome/applet/vpn-password-dialog.c:155
-#, c-format
-msgid ""
-"Could not find the authentication dialog for VPN connection type '%s'. "
-"Contact your system administrator."
-msgstr ""
-"Kunde inte hitta autentiseringsdialogen för VPN-anslutningstypen \"%s\". "
-"Kontakta din systemadministratör."
-
-#: gnome/applet/vpn-password-dialog.c:194
-#, c-format
-msgid ""
-"There was a problem launching the authentication dialog for VPN connection "
-"type '%s'. Contact your system administrator."
-msgstr ""
-"Ett problem inträffade vid start av autentiseringsdialogen för VPN-"
-"anslutningstypen \"%s\". Kontakta din systemadministratör."
-
-#: gnome/applet/wireless-applet.glade.h:1
-msgid " "
-msgstr " "
-
-#: gnome/applet/wireless-applet.glade.h:2
-msgid ""
-"128-bit Passphrase (WEP)\n"
-"Ascii Key (WEP)\n"
-"Hex Key (WEP)"
-msgstr ""
-"128-bitars lösenfras (WEP)\n"
-"Ascii-nyckel (WEP)\n"
-"Hexadecimal nyckel (WEP)"
-
-#: gnome/applet/wireless-applet.glade.h:5
-msgid ""
-"128-bit passphrase (WEP)\n"
-"Ascii key (WEP)\n"
-"Hex key (WEP)"
-msgstr ""
-"128-bitars lösenfras (WEP)\n"
-"Ascii-nyckel (WEP)\n"
-"Hexadecimal nyckel (WEP)"
-
-#: gnome/applet/wireless-applet.glade.h:9
-#, no-c-format
-msgid ""
-"<span weight=\"bold\" size=\"larger\">Passphrase Required by Wireless "
-"Network</span>\n"
-"\n"
-"A passphrase or encryption key is required to access the wireless network '%"
-"s'."
-msgstr ""
-"<span weight=\"bold\" size=\"larger\">Lösenfras krävs av det trådlösa "
-"nätverket</span>\n"
-"\n"
-"En lösenfras eller en krypteringsnyckel krävs för att komma åt det trådlösa "
-"nätverket \"%s\"."
-
-#: gnome/applet/wireless-applet.glade.h:13
-#, no-c-format
-msgid ""
-"<span weight=\"bold\" size=\"larger\">Reduced Network Functionality</span>\n"
-"\n"
-"%s It will not be completely functional."
-msgstr ""
-"<span weight=\"bold\" size=\"larger\">Reducerad nätverksfunktionalitet</"
-"span>\n"
-"\n"
-"%s Det kommer inte att vara helt fungerande."
-
-#: gnome/applet/wireless-applet.glade.h:17
-#, no-c-format
-msgid ""
-"<span weight=\"bold\" size=\"larger\">Wireless Network Login Confirmation</"
-"span>\n"
-"\n"
-"You have chosen to log in to the wireless network '%s'. If you are sure "
-"that this wireless network is secure, click the checkbox below and "
-"NetworkManager will not require confirmation on subsequent log ins."
-msgstr ""
-"<span weight=\"bold\" size=\"larger\">Inloggningsbekräftelse för trådlöst "
-"nätverk</span>\n"
-"\n"
-"Du har valt att logga in på det trådlösa nätverket \"%s\". Om du är säker på "
-"att detta trådlösa nätverk är säkert klickar du i kryssrutan nedan, så "
-"kommer nätverkshanteraren inte längre att kräva bekräftelse vid framtida "
-"inloggningar."
-
-#: gnome/applet/wireless-applet.glade.h:20
-msgid "Always Trust this Wireless Network"
-msgstr "Lita alltid på detta trådlösa nätverk"
-
-#: gnome/applet/wireless-applet.glade.h:21
-msgid "C_onnect"
-msgstr "_Anslut"
-
-#: gnome/applet/wireless-applet.glade.h:22
-msgid "Connect with encryption enabled"
-msgstr "Anslut med kryptering aktiverad"
-
-#: gnome/applet/wireless-applet.glade.h:23
-msgid "Don't remind me again"
-msgstr "PÃ¥minn mig inte igen"
-
-#: gnome/applet/wireless-applet.glade.h:24
-msgid "Key Type:"
-msgstr "Nyckeltyp:"
-
-#: gnome/applet/wireless-applet.glade.h:25
-msgid "Key type:"
-msgstr "Nyckeltyp:"
-
-#: gnome/applet/wireless-applet.glade.h:26
-msgid "Other Wireless Network..."
-msgstr "Annat trådlöst nätverk..."
-
-#: gnome/applet/wireless-applet.glade.h:28
-msgid "Wireless Network Key Required"
-msgstr "Nyckel krävs för det trådlösa nätverket"
-
-#: gnome/applet/wireless-applet.glade.h:29
-msgid "Wireless _adapter:"
-msgstr "Trådlös _nätverksadapter:"
-
-#: gnome/applet/wireless-applet.glade.h:30
-msgid "Wireless _network:"
-msgstr "Trådlöst _nätverk:"
-
-#: gnome/applet/wireless-applet.glade.h:31
-msgid "_Login to Network"
-msgstr "_Logga in på nätverket"
-
-#: gnome/applet/wireless-applet.glade.h:32
-msgid "_OK"
-msgstr "_OK"
-
-#: gnome/vpn-properties/nm-vpn-properties.c:374
-msgid "Cannot add VPN connection"
-msgstr "Kan inte lägga till VPN-anslutning"
-
-#: gnome/vpn-properties/nm-vpn-properties.c:376
-msgid ""
-"No suitable VPN software was found on your system. Contact your system "
-"administrator."
-msgstr ""
-"Ingen lämplig VPN-programvara hittades på ditt system. Kontakta din "
-"systemadministratör."
-
-#: gnome/vpn-properties/nm-vpn-properties.c:428
-msgid "Cannot import VPN connection"
-msgstr "Kan inte importera VPN-anslutning"
-
-#: gnome/vpn-properties/nm-vpn-properties.c:430
-#, c-format
-msgid ""
-"Cannot find suitable software for VPN connection type '%s' to import the "
-"file '%s'. Contact your system administrator."
-msgstr ""
-"Kan inte hitta lämplig programvara för VPN-anslutningstypen \"%s\" för att "
-"importera filen \"%s\". Kontakta din systemadministratör."
-
-#: gnome/vpn-properties/nm-vpn-properties.c:570
-#, c-format
-msgid "Error retrieving VPN connection '%s'"
-msgstr "Fel vid hämtning av VPN-anslutningen \"%s\""
-
-#: gnome/vpn-properties/nm-vpn-properties.c:573
-#, c-format
-msgid ""
-"Could not find the UI files for VPN connection type '%s'. Contact your "
-"system administrator."
-msgstr ""
-"Kunde inte hitta användargränssnittsfilerna för VPN-anslutningstypen \"%s\". "
-"Kontakta din systemadministratör."
-
-#: gnome/vpn-properties/nm-vpn-properties.c:733
-#, c-format
-msgid "Delete VPN connection \"%s\"?"
-msgstr "Ta bort VPN-anslutningen \"%s\"?"
-
-#: gnome/vpn-properties/nm-vpn-properties.c:736
-#, c-format
-msgid ""
-"All information about the VPN connection \"%s\" will be lost and you may "
-"need your system administrator to provide information to create a new "
-"connection."
-msgstr ""
-"All information om VPN-anslutningen \"%s\" kommer att gå förlorad och du kan "
-"komma att behöva kontakta din systemadministratör för att få information för "
-"att kunna skapa en ny anslutning."
-
-#. Edit dialog
-#: gnome/vpn-properties/nm-vpn-properties.c:1056
-msgid "Edit VPN Connection"
-msgstr "Redigera VPN-anslutning"
-
-#: gnome/vpn-properties/nm-vpn-properties.glade.h:1
-msgid "Add a new VPN connection"
-msgstr "Lägg till en ny VPN-anslutning"
-
-#: gnome/vpn-properties/nm-vpn-properties.glade.h:2
-msgid "Connect to:"
-msgstr "Anslut till:"
-
-#: gnome/vpn-properties/nm-vpn-properties.glade.h:3
-msgid "Create VPN Connection"
-msgstr "Skapa VPN-anslutning"
-
-#: gnome/vpn-properties/nm-vpn-properties.glade.h:4
-msgid "Create VPN Connection - 1 of 2"
-msgstr "Skapa VPN-anslutning - 1 av 2"
-
-#: gnome/vpn-properties/nm-vpn-properties.glade.h:5
-msgid "Create VPN Connection - 2 of 2"
-msgstr "Skapa VPN-anslutning - 2 av 2"
-
-#: gnome/vpn-properties/nm-vpn-properties.glade.h:6
-msgid "Delete the selected VPN connection"
-msgstr "Ta bort den markerade VPN-anslutningen"
-
-#: gnome/vpn-properties/nm-vpn-properties.glade.h:7
-msgid ""
-"Dependent on the private network you want to connect to, you need to select "
-"what type of connection you want to create."
-msgstr ""
-"Beroende på det privata nätverk som du vill ansluta till måste du välja "
-"vilken typ av anslutning som du vill skapa."
-
-#: gnome/vpn-properties/nm-vpn-properties.glade.h:8
-msgid "E_xport"
-msgstr "E_xportera"
-
-#: gnome/vpn-properties/nm-vpn-properties.glade.h:9
-msgid "Edit the selected VPN connection"
-msgstr "Redigera den markerade VPN-anslutningen"
-
-#: gnome/vpn-properties/nm-vpn-properties.glade.h:10
-msgid "Export VPN connection to a file"
-msgstr "Exportera VPN-anslutningen till en fil"
-
-#: gnome/vpn-properties/nm-vpn-properties.glade.h:11
-msgid "Export the VPN settings to a file"
-msgstr "Exportera VPN-inställningarna till en fil"
-
-#: gnome/vpn-properties/nm-vpn-properties.glade.h:12
-msgid "Finish create VPN Connection"
-msgstr "Slutför skapande av VPN-anslutning"
-
-#: gnome/vpn-properties/nm-vpn-properties.glade.h:13
-msgid "Manage Virtual Private Network connections"
-msgstr "Hantera VPN-anslutningar"
-
-#: gnome/vpn-properties/nm-vpn-properties.glade.h:14
-#, fuzzy
-msgid ""
-"This assistant will guide you through the creation of a new VPN connection "
-"to a private network.\n"
-"\n"
-"It will require some information, such as IP addresses and secrets, that "
-"will probably be provided by your system administrator as appropriate."
-msgstr ""
-"Denna guide kommer att hjälpa dig igenom processen att skapa en ny VPN-"
-"anslutning till ett privat nätverk.\n"
-"\n"
-"Den kommer att kräva en del information, som till exempel ip-adresser och "
-"hemligheter, som troligtvis kommer att tillhandahållas av din "
-"systemadministratör."
-
-#: src/nm-netlink-monitor.c:154
-#, c-format
-msgid ""
-"unable to create netlink socket for monitoring wired ethernet devices - %s"
-msgstr ""
-"kan inte skapa netlink-uttag för övervakning av trådbundna ethernet-enheter "
-"- %s"
-
-#: src/nm-netlink-monitor.c:172
-#, c-format
-msgid ""
-"unable to bind to netlink socket for monitoring wired ethernet devices - %s"
-msgstr ""
-"kan inte binda till netlink-uttag för övervakning av trådbundna ethernet-"
-"enheter - %s"
-
-#: src/nm-netlink-monitor.c:404
-msgid "operation took too long"
-msgstr "åtgärden tog för lång tid"
-
-#: src/nm-netlink-monitor.c:501
-msgid "received data from wrong type of sender"
-msgstr "mottog data från fel typ av avsändare"
-
-#: src/nm-netlink-monitor.c:514
-msgid "received data from unexpected sender"
-msgstr "mottog data från oväntad avsändare"
-
-#: src/nm-netlink-monitor.c:536
-#, c-format
-msgid "%s"
-msgstr "%s"
-
-#: src/nm-netlink-monitor.c:645
-msgid "too much data was sent over socket and some of it was lost"
-msgstr "för mycket data skickades över uttaget och en del gick förlorat"
-
-#: src/nm-netlink-monitor.c:734
-msgid "error occurred while waiting for data on socket"
-msgstr "fel inträffade vid väntan på data i uttaget"
-
-#~ msgid "Connection to the wireless network '%s' failed."
-#~ msgstr "Anslutning till det trådlösa nätverket \"%s\" misslyckades."
-
-#~ msgid "Connection to the wired network failed."
-#~ msgstr "Anslutning till det trådburna nätverket misslyckades."
-
-#~ msgid "Error"
-#~ msgstr "Fel"
-
-#~ msgid "VPN Login Failure"
-#~ msgstr "VPN-inloggningsfel"
-
-#~ msgid ""
-#~ "Could not start the VPN connection '%s' due to a login failure.\n"
-#~ "\n"
-#~ "The VPN service said: \"%s\""
-#~ msgstr ""
-#~ "Kunde inte starta VPN-anslutningen \"%s\" på grund av ett inloggningfel.\n"
-#~ "\n"
-#~ "VPN-tjänsten sa: \"%s\""
-
-#~ msgid "VPN Start Failure"
-#~ msgstr "VPN-startfel"
-
-#~ msgid ""
-#~ "Could not start the VPN connection '%s' due to a failure launching the "
-#~ "VPN program.\n"
-#~ "\n"
-#~ "The VPN service said: \"%s\""
-#~ msgstr ""
-#~ "Kunde inte starta VPN-anslutningen \"%s\" på grund av ett fel vid start "
-#~ "av VPN-programmet.\n"
-#~ "\n"
-#~ "VPN-tjänsten sa: \"%s\""
-
-#~ msgid "VPN Connect Failure"
-#~ msgstr "VPN-anslutningsfel"
-
-#~ msgid ""
-#~ "Could not start the VPN connection '%s' due to a connection error.\n"
-#~ "\n"
-#~ "The VPN service said: \"%s\""
-#~ msgstr ""
-#~ "Kunde inte starta VPN-anslutningen \"%s\" på grund av ett "
-#~ "anslutningsfel.\n"
-#~ "\n"
-#~ "VPN-tjänsten sa: \"%s\""
-
-#~ msgid "VPN Configuration Error"
-#~ msgstr "VPN-konfigurationsfel"
-
-#~ msgid ""
-#~ "The VPN connection '%s' was not correctly configured.\n"
-#~ "\n"
-#~ "The VPN service said: \"%s\""
-#~ msgstr ""
-#~ "VPN-anslutningen \"%s\" konfigurerades inte korrekt.\n"
-#~ "\n"
-#~ "VPN-tjänsten sa: \"%s\""
-
-#~ msgid ""
-#~ "Could not start the VPN connection '%s' because the VPN server did not "
-#~ "return an adequate network configuration.\n"
-#~ "\n"
-#~ "The VPN service said: \"%s\""
-#~ msgstr ""
-#~ "Kunde inte starta VPN-anslutningen \"%s\" eftersom VPN-servern inte "
-#~ "returnerade en lämplig nätverkskonfiguration.\n"
-#~ "\n"
-#~ "VPN-tjänsten sa: \"%s\""
-
-#~ msgid "VPN Login Message"
-#~ msgstr "VPN-inloggningsmeddelande"
-
-#~ msgid ""
-#~ "VPN connection '%s' said:\n"
-#~ "\n"
-#~ "\"%s\""
-#~ msgstr ""
-#~ "VPN-anslutningen \"%s\" sa:\n"
-#~ "\n"
-#~ "\"%s\""
-
-#~ msgid "VPN connection"
-#~ msgstr "VPN-anslutning"
-
-#~ msgid "VPN Connection"
-#~ msgstr "VPN-anslutning"
-
-#~ msgid "Create New Wireless Network..."
-#~ msgstr "Skapa nytt trådlöst nätverk..."
-
-#~ msgid "Start All Wireless Devices"
-#~ msgstr "Starta alla trådlösa enheter"
-
-#~ msgid "Wireless Network Discovery"
-#~ msgstr "Upptäckt av trådlösa nätverk"
-
-#~ msgid "Help"
-#~ msgstr "Hjälp"
-
-#~ msgid "Wired Network"
-#~ msgstr "Trådbundet nätverk"
-
-#~ msgid "Reduced Network Functionality"
-#~ msgstr "Reducerad nätverksfunktionalitet"
-
-#~ msgid "%s It will not be completely functional."
-#~ msgstr "%s Det kommer inte att vara helt fungerande."
-
-#~ msgid "It will not be completely functional."
-#~ msgstr "Det kommer inte att vara helt fungerande."
-
-#~ msgid "Other Wireless Networks..."
-#~ msgstr "Andra trådlösa nätverk..."
-
-#~ msgid "Export"
-#~ msgstr "Exportera"
-
-#~ msgid "Username:"
-#~ msgstr "Användarnamn:"
-
-#~ msgid "Domain:"
-#~ msgstr "Domän:"
-
-#~ msgid "Password:"
-#~ msgstr "Lösenord:"
-
-#~ msgid "VPN Connection Manager"
-#~ msgstr "VPN-anslutningshanterare"
-
-#~ msgid "Connection Name"
-#~ msgstr "Anslutningsnamn"
-
-#~ msgid "Optional Information"
-#~ msgstr "Valfri information"
-
-#~ msgid "Required Information"
-#~ msgstr "Nödvändig information"
-
-#~ msgid "Username: %s"
-#~ msgstr "Användarnamn: %s"
-
-#~ msgid "Username: %s"
-#~ msgstr "Användarnamn: %s"
-
-#~ msgid "Routes: %s"
-#~ msgstr "Vägar: %s"
-
-#~ msgid "Routes: %s"
-#~ msgstr "Vägar: %s"
-
-#~ msgid "Domain: %s"
-#~ msgstr "Domän: %s"
-
-#~ msgid "Domain: %s"
-#~ msgstr "Domän: %s"
-
-#~ msgid "Scanning for wireless networks..."
-#~ msgstr "Söker efter trådlösa nätverk..."
-
-#~ msgid "Pause Wireless Scanning"
-#~ msgstr "Gör paus i sökning efter trådlösa nätverk"
-
-#~ msgid "Resume Wireless Scanning"
-#~ msgstr "Återuppta sökning efter trådlösa nätverk"
-
-#~ msgid "About"
-#~ msgstr "Om"
-
-#~ msgid "progress bar label|%d %%"
-#~ msgstr "%d %%"
-
-#~ msgid "*"
-#~ msgstr "*"
-
-#~ msgid "Copyright © 2004-2005 Red Hat, Inc."
-#~ msgstr "Copyright © 2004-2005 Red Hat, Inc."
-
-#~ msgid "Copyright (C) 2004-2006 Red Hat, Inc."
-#~ msgstr "Copyright © 2004-2006 Red Hat, Inc."
-
-#~ msgid "Copyright © 2004-2006 Red Hat, Inc."
-#~ msgstr "Copyright © 2004-2006 Red Hat, Inc."
-
-#~ msgid "Copyright (C) 2004-2007 Red Hat, Inc."
-#~ msgstr "Copyright © 2004-2007 Red Hat, Inc."
-
-#~ msgid "Copyright © 2004-2007 Red Hat, Inc."
-#~ msgstr "Copyright © 2004-2007 Red Hat, Inc."
-
-#~ msgid "Copyright (C) 2004-2008 Red Hat, Inc."
-#~ msgstr "Copyright © 2004-2008 Red Hat, Inc."
-
-#~ msgid "Copyright © 2004-2008 Red Hat, Inc."
-#~ msgstr "Copyright © 2004-2008 Red Hat, Inc."
-
-#~ msgid "Other Wireless Networks"
-#~ msgstr "Andra trådlösa nätverk"
-
-#~ msgid "Create new Wireless Network"
-#~ msgstr "Skapa nytt trådlöst nätverk"
-
-#~ msgid "VPN"
-#~ msgstr "VPN"
-
-#~ msgid ""
-#~ "The NetworkManager applet could not find some required resources. It "
-#~ "cannot continue."
-#~ msgstr ""
-#~ "Panelprogrammet för nätverkshantering kunde inte hitta en del nödvändiga "
-#~ "resurser. Det kan inte fortsätta."
-
-#~ msgid "Create new wireless network..."
-#~ msgstr "Skapa nytt trådlöst nätverk..."
-
-#~ msgid "Wireless network:"
-#~ msgstr "Trådlöst nätverk:"
-
-#~ msgid "Modify Wireless Networks"
-#~ msgstr "Ändra trådlösa nätverk"
-
-#~ msgid "<span weight=\"bold\">Wireless Networks:</span>"
-#~ msgstr "<span weight=\"bold\">Trådlösa nätverk:</span>"
-
-#~ msgid "There are no network devices..."
-#~ msgstr "Det finns inga nätverksenheter..."
-
-#~ msgid "A wired network connection is currently active..."
-#~ msgstr "En kabelburen nätverksanslutning är aktiv för tillfället..."
-
-#~ msgid "Modify Wireless Network"
-#~ msgstr "Ändra trådlöst nätverk"
-
-#~ msgid "Wireless networks"
-#~ msgstr "Trådlösa nätverk"
-
-#~ msgid ""
-#~ "A passphrase or WEP key is required to access the wireless network '%s'."
-#~ msgstr ""
-#~ "En lösenfras eller en WEP-nyckel krävs för att komma åt det trådlösa "
-#~ "nätverket \"%s\"."
-
-#~ msgid "About..."
-#~ msgstr "Om..."
-
-#~ msgid "Wireless Network Login Confirmation"
-#~ msgstr "Inloggningsbekräftelse för trådlöst nätverk"
-
-#~ msgid ""
-#~ "You have chosen log in to the wireless network '%s'. If you are sure "
-#~ "this wireless network is secure, click the checkbox below and "
-#~ "NetworkManager will no longer pester you with stupid questions when you "
-#~ "connect to it."
-#~ msgstr ""
-#~ "Du har valt att logga in på det trådlösa nätverket \"%s\". Om du är säker "
-#~ "på att detta trådlösa nätverk är säkert klickar du i kryssrutan nedan, så "
-#~ "kommer nätverkshanteraren inte längre att besvära dig med dumma frågor "
-#~ "när du ansluter till det."
diff --git a/po/uk.po b/po/uk.po
deleted file mode 100644
index 44c6eb637c..0000000000
--- a/po/uk.po
+++ /dev/null
@@ -1,787 +0,0 @@
-# Ukrainian translation of NetworkManager
-# Copyright (C) Free Software Foundation, 2005
-# This file is distributed under the same license as the NetworkManager package.
-# Maxim Dziumanenko <mvd@mylinux.ua>, 2005.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: NetworkManager\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2005-08-10 12:09+0300\n"
-"PO-Revision-Date: 2005-08-10 03:32+0200\n"
-"Last-Translator: Maxim Dziumanenko <mvd@mylinux.ua>\n"
-"Language-Team: Ukrainian <uk@li.org>\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%"
-"10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
-
-#. Setup a request to the keyring to save the network passphrase
-#: ../gnome/applet/applet-dbus-info.c:839
-#, c-format
-msgid "Passphrase for wireless network %s"
-msgstr "Парольна фраза бездротової мережі %s"
-
-#: ../gnome/applet/applet-dbus-info.c:1049
-#, c-format
-msgid ""
-"The requested wireless network '%s' does not appear to be in range. A "
-"different wireless network will be used if any are available."
-msgstr ""
-"Запитане бездротове з'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ '%s' поза межами доÑÑжноÑÑ‚Ñ–. Будуть "
-"викориÑтовуватиÑÑŒ різні бездротові з'єднаннÑ, з тих Ñкі будуть доÑтупні."
-
-#: ../gnome/applet/applet-dbus.c:598
-#, c-format
-msgid "Connection to the wireless network '%s' failed.\n"
-msgstr "Помилка з'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ð· бездротовою мережею '%s'.\n"
-
-#: ../gnome/applet/applet-dbus.c:603
-msgid "Connection to the wired network failed.\n"
-msgstr "Помилка з'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ð· дротовою мережею.\n"
-
-#: ../gnome/applet/applet.c:192
-msgid "Error displaying connection information: "
-msgstr "Помилка Ð²Ñ–Ð´Ð¾Ð±Ñ€Ð°Ð¶ÐµÐ½Ð½Ñ Ñ–Ð½Ñ„Ð¾Ñ€Ð¼Ð°Ñ†Ñ–Ñ— про з'єднаннÑ: "
-
-#: ../gnome/applet/applet.c:217
-msgid "Could not find some required resources (the glade file)!"
-msgstr "Ðе вдаєтьÑÑ Ð·Ð½Ð°Ð¹Ñ‚Ð¸ деÑкі необхідні реÑурÑи (не знайдено файл glade)!"
-
-#: ../gnome/applet/applet.c:227
-msgid "No active connections!"
-msgstr "Ðемає активних з'єднань!"
-
-#: ../gnome/applet/applet.c:236
-msgid "Could not open socket!"
-msgstr "Ðе вдаєтьÑÑ Ð²Ñ–Ð´ÐºÑ€Ð¸Ñ‚Ð¸ Ñокет!"
-
-#: ../gnome/applet/applet.c:251
-msgid "Failed to get information about the interface!"
-msgstr "Ðе вдаєтьÑÑ Ð¾Ñ‚Ñ€Ð¸Ð¼Ð°Ñ‚Ð¸ інформацію про інтерфейÑ!"
-
-#: ../gnome/applet/applet.c:284
-#, c-format
-msgid "Wired Ethernet (%s)"
-msgstr "Дротова мережа Ethernet (%s)"
-
-#: ../gnome/applet/applet.c:286
-#, c-format
-msgid "Wireless Ethernet (%s)"
-msgstr "Бездротова мережа Ethernet (%s)"
-
-#: ../gnome/applet/applet.c:380 ../gnome/applet/applet.c:398
-msgid "NetworkManager Applet"
-msgstr "Ðплет NetworkManager"
-
-#: ../gnome/applet/applet.c:382 ../gnome/applet/applet.c:400
-msgid "Copyright (C) 2004-2005 Red Hat, Inc."
-msgstr "ÐвторÑькі права (C) 2004-2005 Red Hat, Inc."
-
-#: ../gnome/applet/applet.c:383 ../gnome/applet/applet.c:401
-msgid ""
-"Notification area applet for managing your network devices and connections."
-msgstr ""
-"Ðплет облаÑÑ‚Ñ– ÑÐ¿Ð¾Ð²Ñ–Ñ‰ÐµÐ½Ð½Ñ Ð´Ð»Ñ ÐºÐµÑ€ÑƒÐ²Ð°Ð½Ð½Ñ Ð¼ÐµÑ€ÐµÐ¶Ð½Ð¸Ð¼Ð¸ приÑтроÑми та з'єднаннÑми."
-
-#: ../gnome/applet/applet.c:486
-msgid "VPN Error"
-msgstr "Помилка VPN"
-
-#: ../gnome/applet/applet.c:490
-#, c-format
-msgid ""
-"<span weight=\"bold\" size=\"larger\">VPN Login Failure</span>\n"
-"\n"
-"Could not start the VPN connection '%s' due to a login failure.\n"
-"\n"
-"The VPN service said: \"%s\""
-msgstr ""
-"<span weight=\"bold\" size=\"larger\">Помилка входу у VPN</span>\n"
-"\n"
-"Через помилку входу не вдаєтьÑÑ Ð·Ð°Ð¿ÑƒÑтити VPN-з'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ '%s'.\n"
-"\n"
-"ÐŸÐ¾Ð²Ñ–Ð´Ð¾Ð¼Ð»ÐµÐ½Ð½Ñ Ñлужби VPN: \"%s\""
-
-#: ../gnome/applet/applet.c:495
-#, c-format
-msgid ""
-"<span weight=\"bold\" size=\"larger\">VPN Start Failure</span>\n"
-"\n"
-"Could not start the VPN connection '%s' due to a failure launching the VPN "
-"program.\n"
-"\n"
-"The VPN service said: \"%s\""
-msgstr ""
-"<span weight=\"bold\" size=\"larger\">Помилка запуÑку VPN</span>\n"
-"\n"
-"Ðе вдаєтьÑÑ Ð·Ð°Ð¿ÑƒÑтити VPN-з'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ '%s' через помилку запуÑку програми "
-"VPN.\n"
-"\n"
-"ÐŸÐ¾Ð²Ñ–Ð´Ð¾Ð¼Ð»ÐµÐ½Ð½Ñ Ñлужби VPN: \"%s\""
-
-#: ../gnome/applet/applet.c:500
-#, c-format
-msgid ""
-"<span weight=\"bold\" size=\"larger\">VPN Connect Failure</span>\n"
-"\n"
-"Could not start the VPN connection '%s' due to a connection error.\n"
-"\n"
-"The VPN service said: \"%s\""
-msgstr ""
-"<span weight=\"bold\" size=\"larger\">Помилка з'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ VPN</span>\n"
-"\n"
-"Ðе вдаєтьÑÑ Ð²Ñ–Ð´ÐºÑ€Ð¸Ñ‚Ð¸ VPN-з'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ '%s' через помилку з'єднаннÑ.\n"
-"\n"
-"ÐŸÐ¾Ð²Ñ–Ð´Ð¾Ð¼Ð»ÐµÐ½Ð½Ñ Ñлужби VPN: \"%s\""
-
-#: ../gnome/applet/applet.c:505
-#, c-format
-msgid ""
-"<span weight=\"bold\" size=\"larger\">VPN Configuration Error</span>\n"
-"\n"
-"The VPN connection '%s' was not correctly configured.\n"
-"\n"
-"The VPN service said: \"%s\""
-msgstr ""
-"<span weight=\"bold\" size=\"larger\">Помилка Ð½Ð°Ð»Ð°ÑˆÑ‚Ð¾Ð²ÑƒÐ²Ð°Ð½Ð½Ñ VPN</span>\n"
-"\n"
-"VPN-з'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ '%s' некоректно налаштовано.\n"
-"\n"
-"ÐŸÐ¾Ð²Ñ–Ð´Ð¾Ð¼Ð»ÐµÐ½Ð½Ñ Ñлужби VPN: \"%s\""
-
-#: ../gnome/applet/applet.c:510
-#, c-format
-msgid ""
-"<span weight=\"bold\" size=\"larger\">VPN Connect Failure</span>\n"
-"\n"
-"Could not start the VPN connection '%s' because the VPN server did not "
-"return an adequate network configuration.\n"
-"\n"
-"The VPN service said: \"%s\""
-msgstr ""
-"<span weight=\"bold\" size=\"larger\">Помилка з'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ VPN</span>\n"
-"\n"
-"Ðе вдаєтьÑÑ Ð·Ð°Ð¿ÑƒÑтити VPN-з'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ '%s', тому що VPN-Ñервер не повернув "
-"належної конфігурації мережі.\n"
-"\n"
-"ÐŸÐ¾Ð²Ñ–Ð´Ð¾Ð¼Ð»ÐµÐ½Ð½Ñ Ñлужби VPN: \"%s\""
-
-#: ../gnome/applet/applet.c:577
-#, c-format
-msgid ""
-"<span weight=\"bold\" size=\"larger\">VPN Login Message</span>\n"
-"\n"
-"VPN connection '%s' said:\n"
-"\n"
-"\"%s\""
-msgstr ""
-"<span weight=\"bold\" size=\"larger\">ÐŸÐ¾Ð²Ñ–Ð´Ð¾Ð¼Ð»ÐµÐ½Ð½Ñ Ð²Ñ…Ð¾Ð´Ñƒ VPN</span>\n"
-"\n"
-"ÐŸÐ¾Ð²Ñ–Ð´Ð¾Ð¼Ð»ÐµÐ½Ð½Ñ VPN-з'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ '%s':\n"
-"\n"
-"\"%s\""
-
-#: ../gnome/applet/applet.c:795 ../gnome/applet/applet.c:2431
-#: ../gnome/applet/other-network-dialog.c:322
-#: ../gnome/applet/passphrase-dialog.c:397
-msgid ""
-"The NetworkManager Applet could not find some required resources (the glade "
-"file was not found)."
-msgstr ""
-"Ðплет NetworkManager не може знайти деÑкі необхідні реÑурÑи (не знайдено "
-"файл glade)."
-
-#: ../gnome/applet/applet.c:808
-#, c-format
-msgid "The network device \"%s (%s)\" does not support wireless scanning."
-msgstr ""
-"Мережний приÑтрій \"%s (%s)\" не підтримує ÑÐºÐ°Ð½ÑƒÐ²Ð°Ð½Ð½Ñ Ð±ÐµÐ·Ð´Ñ€Ð¾Ñ‚Ð¾Ð²Ð¾Ñ— мережі."
-
-#: ../gnome/applet/applet.c:815
-#, c-format
-msgid "The network device \"%s (%s)\" does not support link detection."
-msgstr "Мережний приÑтрій \"%s (%s)\" не підтримує виÑÐ²Ð»ÐµÐ½Ð½Ñ Ð·Ð²'Ñзку."
-
-#: ../gnome/applet/applet.c:936
-#, c-format
-msgid "Preparing device %s for the wired network..."
-msgstr "ПриÑтрій %s готуєтьÑÑ Ð´Ð¾ з'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ð· дротовою мережею..."
-
-#: ../gnome/applet/applet.c:938
-#, c-format
-msgid "Preparing device %s for the wireless network '%s'..."
-msgstr "ПриÑтрій %s готуєтьÑÑ Ð´Ð¾ з'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ð· бездротовою мережею '%s'..."
-
-#: ../gnome/applet/applet.c:945
-#, c-format
-msgid "Configuring device %s for the wired network..."
-msgstr "ПриÑтрій %s налаштовуєтьÑÑ Ð´Ð»Ñ Ð´Ñ€Ð¾Ñ‚Ð¾Ð²Ð¾Ñ— мережі..."
-
-#: ../gnome/applet/applet.c:947
-#, c-format
-msgid "Attempting to join the wireless network '%s'..."
-msgstr "Спроба з'єднатиÑÑŒ з бездротовою мережею '%s'..."
-
-#: ../gnome/applet/applet.c:954
-#, c-format
-msgid "Waiting for Network Key for the wireless network '%s'..."
-msgstr "ОчікуєтьÑÑ Ð¼ÐµÑ€ÐµÐ¶Ð½Ð¸Ð¹ ключ бездротової мережі '%s'..."
-
-#: ../gnome/applet/applet.c:961 ../gnome/applet/applet.c:970
-msgid "Requesting a network address from the wired network..."
-msgstr "ЗапитуєтьÑÑ Ð¼ÐµÑ€ÐµÐ¶Ð½Ð° адреÑа дротової мережі..."
-
-#: ../gnome/applet/applet.c:963 ../gnome/applet/applet.c:972
-#, c-format
-msgid "Requesting a network address from the wireless network '%s'..."
-msgstr "ЗапитуєтьÑÑ Ð¼ÐµÑ€ÐµÐ¶Ð½Ð° адреÑа бездротової мережі '%s'..."
-
-#: ../gnome/applet/applet.c:979
-msgid "Finishing connection to the wired network..."
-msgstr "ЗавершуєтьÑÑ Ð·'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ð· дротовою мережею..."
-
-#: ../gnome/applet/applet.c:981
-#, c-format
-msgid "Finishing connection to the wireless network '%s'..."
-msgstr "ЗавершуєтьÑÑ Ð·'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ð· бездротовою мережею '%s'..."
-
-#: ../gnome/applet/applet.c:1027
-msgid "NetworkManager is not running"
-msgstr "NetworkManager не запущено"
-
-#: ../gnome/applet/applet.c:1038
-msgid "No network connection"
-msgstr "Ðемає з'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ð· мережею"
-
-#: ../gnome/applet/applet.c:1045
-msgid "Wired network connection"
-msgstr "Дротове з'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ð· мережею"
-
-#: ../gnome/applet/applet.c:1052
-msgid "Connected to an Ad-Hoc wireless network"
-msgstr "З'єднано з оÑобливою бездротовою мережею"
-
-#: ../gnome/applet/applet.c:1066
-#, c-format
-msgid "Wireless network connection to '%s' (%d%%)"
-msgstr "Бездротове мережне з'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ð· '%s' (%d%%)"
-
-#: ../gnome/applet/applet.c:1091
-#, c-format
-msgid "VPN connection to '%s'"
-msgstr "VPN з'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ð´Ð¾ '%s'"
-
-#: ../gnome/applet/applet.c:1542
-msgid "_Connect to Other Wireless Network..."
-msgstr "_З'єднатиÑÑŒ з іншою бездротовою мережею..."
-
-#: ../gnome/applet/applet.c:1563
-msgid "Create _New Wireless Network..."
-msgstr "Створити _нову бездротову мережу..."
-
-#: ../gnome/applet/applet.c:1676
-#: ../gnome/vpn-properties/nm-vpn-properties.glade.h:17
-msgid "VPN Connections"
-msgstr "ÐÐ°Ð»Ð°ÑˆÑ‚Ð¾Ð²ÑƒÐ²Ð°Ð½Ð½Ñ VPN"
-
-#: ../gnome/applet/applet.c:1703
-msgid "Configure VPN..."
-msgstr "ÐÐ°Ð»Ð°ÑˆÑ‚Ð¾Ð²ÑƒÐ²Ð°Ð½Ð½Ñ VPN..."
-
-#: ../gnome/applet/applet.c:1707
-msgid "Disconnect VPN..."
-msgstr "Від'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ð²Ñ–Ð´ VPN..."
-
-#: ../gnome/applet/applet.c:1730
-msgid "Dial Up"
-msgstr "Комутаційне з'єднаннÑ"
-
-#: ../gnome/applet/applet.c:1790
-msgid "No network devices have been found"
-msgstr "Ðе було знайдено мережних приÑтроїв"
-
-#: ../gnome/applet/applet.c:1955
-msgid "NetworkManager is not running..."
-msgstr "NetworkManager не запущено..."
-
-#: ../gnome/applet/applet.c:2023
-msgid "_Stop All Wireless Devices"
-msgstr "З_упинити уÑÑ– бездротові приÑтрої"
-
-#: ../gnome/applet/applet.c:2028
-msgid "_Start All Wireless Devices"
-msgstr "_ЗапуÑтити уÑÑ– бездротові приÑтрої"
-
-#: ../gnome/applet/applet.c:2059
-msgid "_Wireless Network Discovery"
-msgstr "ВиÑÐ²Ð»ÐµÐ½Ð½Ñ _бездротовії мережі"
-
-#: ../gnome/applet/applet.c:2062
-msgid "Always Search"
-msgstr "Шукати завжди"
-
-#: ../gnome/applet/applet.c:2070
-msgid "Search Only When Disconnected"
-msgstr "Шукати лише піÑÐ»Ñ Ð²Ñ–Ð´'єднаннÑ"
-
-#: ../gnome/applet/applet.c:2078
-msgid "Never Search"
-msgstr "Ðіколи не шукати"
-
-#. Stop All Wireless Devices item
-#: ../gnome/applet/applet.c:2090
-msgid "Stop All Wireless Devices"
-msgstr "Зупинити уÑÑ– бездротові приÑтрої"
-
-#: ../gnome/applet/applet.c:2096
-msgid "Connection _Information"
-msgstr "_Ð†Ð½Ñ„Ð¾Ñ€Ð¼Ð°Ñ†Ñ–Ñ Ð¿Ñ€Ð¾ з'єднаннÑ"
-
-#: ../gnome/applet/applet.c:2104
-msgid "_Help"
-msgstr "_Довідка"
-
-#: ../gnome/applet/applet.c:2111
-msgid "_About"
-msgstr "_Про програму"
-
-#: ../gnome/applet/applet.c:2581
-msgid ""
-"The NetworkManager applet could not find some required resources. It cannot "
-"continue.\n"
-msgstr ""
-"Ðплет NetworkManager не може знайти деÑкі необхідні реÑурÑи. Продовжувати "
-"роботу неможливо.\n"
-
-#: ../gnome/applet/eggtrayicon.c:118
-msgid "Orientation"
-msgstr "ОрієнтаціÑ"
-
-#: ../gnome/applet/eggtrayicon.c:119
-msgid "The orientation of the tray."
-msgstr "ÐžÑ€Ñ–Ñ”Ð½Ñ‚Ð°Ñ†Ñ–Ñ Ð»Ð¾Ñ‚ÐºÐ°."
-
-#: ../gnome/applet/menu-items.c:89
-#, c-format
-msgid "Wired Network (%s)"
-msgstr "Дротова мережа (%s)"
-
-#: ../gnome/applet/menu-items.c:92
-msgid "_Wired Network"
-msgstr "_Дротова мережа"
-
-#: ../gnome/applet/menu-items.c:165
-#, c-format
-msgid "Wireless Network (%s)"
-msgid_plural "Wireless Networks (%s)"
-msgstr[0] "Бездротова мережа (%s)"
-msgstr[1] "Бездротові мережі (%s)"
-msgstr[2] "Бездротові мережі (%s)"
-
-#: ../gnome/applet/menu-items.c:167
-msgid "Wireless Network"
-msgid_plural "Wireless Networks"
-msgstr[0] "Бездротова мережа"
-msgstr[1] "Бездротові мережі"
-msgstr[2] "Бездротові мережі"
-
-#: ../gnome/applet/menu-items.c:309
-msgid " (invalid Unicode)"
-msgstr " (неправильний Юнікод)"
-
-#: ../gnome/applet/other-network-dialog.c:143
-#: ../gnome/applet/passphrase-dialog.c:156
-#: ../gnome/applet/wireless-applet.glade.h:34
-msgid "Passphrase:"
-msgstr "Парольна фраза:"
-
-#: ../gnome/applet/other-network-dialog.c:146
-#: ../gnome/applet/passphrase-dialog.c:159
-msgid "ASCII Key:"
-msgstr "ASCII-ключ:"
-
-#: ../gnome/applet/other-network-dialog.c:149
-#: ../gnome/applet/passphrase-dialog.c:162
-msgid "Hex Key:"
-msgstr "ШіÑтнадцÑтковий ключ:"
-
-#: ../gnome/applet/other-network-dialog.c:232
-msgid "Create new wireless network"
-msgstr "Створити новий бездротовий приÑтрій"
-
-#: ../gnome/applet/other-network-dialog.c:233
-msgid ""
-"Enter the ESSID and security settings of the wireless network you wish to "
-"create."
-msgstr ""
-"Введіть ESSID та параметри безпеки бездротової мережі, Ñку ви бажаєте "
-"Ñтворити."
-
-#: ../gnome/applet/other-network-dialog.c:234
-msgid "By default, the ESSID is set to your computer's name,"
-msgstr "Типово, Ð·Ð½Ð°Ñ‡ÐµÐ½Ð½Ñ ESSID таке ж Ñк назва комп'ютера,"
-
-#: ../gnome/applet/other-network-dialog.c:236
-msgid ", with no encryption enabled."
-msgstr ", без ÑƒÐ²Ñ–Ð¼ÐºÐ½ÐµÐ½Ð½Ñ ÑˆÐ¸Ñ„Ñ€ÑƒÐ²Ð°Ð½Ð½Ñ"
-
-#: ../gnome/applet/other-network-dialog.c:241
-msgid "Custom wireless network"
-msgstr "ВлаÑна бездротова мережа"
-
-#: ../gnome/applet/other-network-dialog.c:242
-msgid "Enter the ESSID of the wireless network to which you wish to connect."
-msgstr "Введіть ESSID бездротової мережі, до Ñкої ви бажаєте з'єднатиÑÑŒ."
-
-#: ../gnome/applet/vpn-password-dialog.c:152
-#: ../gnome/applet/vpn-password-dialog.c:191
-#, c-format
-msgid "Cannot start VPN connection '%s'"
-msgstr "Ðе вдаєтьÑÑ Ð·Ð°Ð¿ÑƒÑтити з'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ VPN '%s'"
-
-#: ../gnome/applet/vpn-password-dialog.c:155
-#, c-format
-msgid ""
-"Could not find the authentication dialog for VPN connection type '%s'. "
-"Contact your system administrator."
-msgstr ""
-"Ðе вдаєтьÑÑ Ð·Ð½Ð°Ð¹Ñ‚Ð¸ діалогове вікно аутентифікації Ð´Ð»Ñ Ð·'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ VPN типу '%"
-"s'. Зв'ÑжітьÑÑ Ð· ÑиÑтемним адмініÑтратором."
-
-#: ../gnome/applet/vpn-password-dialog.c:194
-#, c-format
-msgid ""
-"There was a problem launching the authentication dialog for VPN connection "
-"type '%s'. Contact your system administrator."
-msgstr ""
-"Проблема запуÑку діалогового вікна аутентифікації Ð´Ð»Ñ Ð·'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ VPN типу '%"
-"s'. Зв'ÑжітьÑÑ Ð· ÑиÑтемним адмініÑтратором."
-
-#: ../gnome/applet/wireless-applet.glade.h:1
-msgid " "
-msgstr " "
-
-#: ../gnome/applet/wireless-applet.glade.h:2
-msgid ""
-"128-bit Passphrase (WEP)\n"
-"ASCII Key (WEP)\n"
-"Hex Key (WEP)"
-msgstr ""
-"128-бітна парольна фраза (WEP)\n"
-"ASCII-ключ (WEP)\n"
-"ШіÑтнадцÑтковий ключ (WEP)"
-
-#: ../gnome/applet/wireless-applet.glade.h:5
-msgid ""
-"128-bit passphrase (WEP)\n"
-"ASCII key (WEP)\n"
-"Hex key (WEP)"
-msgstr ""
-"128-бітна парольна фраза (WEP)\n"
-"ASCII-ключ (WEP)\n"
-"ШіÑтнадцÑтковий ключ (WEP)"
-
-#: ../gnome/applet/wireless-applet.glade.h:8
-msgid ""
-"<span weight=\"bold\" size=\"larger\">Active Connection Information</span>"
-msgstr ""
-"<span weight=\"bold\" size=\"larger\">Ð†Ð½Ñ„Ð¾Ñ€Ð¼Ð°Ñ†Ñ–Ñ Ð¿Ñ€Ð¾ активні з'єднаннÑ</span>"
-
-#: ../gnome/applet/wireless-applet.glade.h:10
-#, no-c-format
-msgid ""
-"<span weight=\"bold\" size=\"larger\">Passphrase Required by Wireless "
-"Network</span>\n"
-"\n"
-"A passphrase or encryption key is required to access the wireless network '%"
-"s'."
-msgstr ""
-"<span weight=\"bold\" size=\"larger\">Ð”Ð»Ñ Ð±ÐµÐ·Ð´Ñ€Ð¾Ñ‚Ð¾Ð²Ð¾Ñ— мережі потрібна "
-"парольна фраза</span>\n"
-"\n"
-"Ð”Ð»Ñ Ð´Ð¾Ñтупу до бездротової мережі '%s' необхідна парольна фраза чи ключ "
-"шифруваннÑ."
-
-#: ../gnome/applet/wireless-applet.glade.h:14
-#, no-c-format
-msgid ""
-"<span weight=\"bold\" size=\"larger\">Reduced Network Functionality</span>\n"
-"\n"
-"%s It will not be completely functional."
-msgstr ""
-"<span weight=\"bold\" size=\"larger\">Скорочена мережна функціональніÑÑ‚ÑŒ</"
-"span>\n"
-"\n"
-"%s Програма не повніÑÑ‚ÑŽ функціональна."
-
-#: ../gnome/applet/wireless-applet.glade.h:18
-#, no-c-format
-msgid ""
-"<span weight=\"bold\" size=\"larger\">Wireless Network Login Confirmation</"
-"span>\n"
-"\n"
-"You have chosen to log in to the wireless network '%s'. If you are sure "
-"that this wireless network is secure, click the checkbox below and "
-"NetworkManager will not require confirmation on subsequent log ins."
-msgstr ""
-"<span weight=\"bold\" size=\"larger\">Параметри входу у бездротову мережу</"
-"span>\n"
-"\n"
-"Ви входите у бездротову мережу '%s'. Якщо ви впевнені, що вона безпечна, "
-"відмітьте поле нижче, та NetworkManager надалі не буде набридати запитаннÑми "
-"при з'єднанні."
-
-#: ../gnome/applet/wireless-applet.glade.h:21
-msgid "Always Trust this Wireless Network"
-msgstr "Завжди довірÑти бездротовій мережі"
-
-#: ../gnome/applet/wireless-applet.glade.h:22
-msgid "Broadcast Address:"
-msgstr "Широкомовна адреÑа:"
-
-#: ../gnome/applet/wireless-applet.glade.h:23
-msgid "C_onnect"
-msgstr "_З'єднатиÑÑŒ"
-
-#: ../gnome/applet/wireless-applet.glade.h:24
-msgid "Connect with encryption enabled"
-msgstr "З'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ Ð· шифруваннÑм"
-
-#: ../gnome/applet/wireless-applet.glade.h:25
-msgid "Connection Information"
-msgstr "Ð†Ð½Ñ„Ð¾Ñ€Ð¼Ð°Ñ†Ñ–Ñ Ð¿Ñ€Ð¾ з'єднаннÑ"
-
-#: ../gnome/applet/wireless-applet.glade.h:26
-msgid "Destination Address:"
-msgstr "Цільова адреÑа:"
-
-#: ../gnome/applet/wireless-applet.glade.h:27
-msgid "Don't remind me again"
-msgstr "Ðе нагадувати надалі"
-
-#: ../gnome/applet/wireless-applet.glade.h:28
-msgid "Hardware Address:"
-msgstr "Ðпаратна адреÑа:"
-
-#: ../gnome/applet/wireless-applet.glade.h:29
-msgid "IP Address:"
-msgstr "ÐдреÑа IP:"
-
-#: ../gnome/applet/wireless-applet.glade.h:30
-msgid "Interface:"
-msgstr "ІнтерфейÑ:"
-
-#: ../gnome/applet/wireless-applet.glade.h:31
-msgid "Key Type:"
-msgstr "Тип ключа:"
-
-#: ../gnome/applet/wireless-applet.glade.h:32
-msgid "Key type:"
-msgstr "Тип ключа:"
-
-#: ../gnome/applet/wireless-applet.glade.h:33
-msgid "Other Wireless Network..."
-msgstr "Інша бездротова мережа..."
-
-#: ../gnome/applet/wireless-applet.glade.h:35
-msgid "Subnet Mask:"
-msgstr "МаÑка мережі:"
-
-#: ../gnome/applet/wireless-applet.glade.h:36
-msgid "Wireless Network Key Required"
-msgstr "ВимагаєтьÑÑ ÐºÐ»ÑŽÑ‡ бездротової мережі"
-
-#: ../gnome/applet/wireless-applet.glade.h:37
-msgid "Wireless _adapter:"
-msgstr "Бездротовий _адаптер:"
-
-#: ../gnome/applet/wireless-applet.glade.h:38
-msgid "Wireless _network:"
-msgstr "Бездротова _мережа"
-
-#: ../gnome/applet/wireless-applet.glade.h:39
-msgid "_Login to Network"
-msgstr "_Увійти в мережу"
-
-#: ../gnome/applet/wireless-applet.glade.h:40
-msgid "_OK"
-msgstr "_Гаразд"
-
-#: ../gnome/vpn-properties/nm-vpn-properties.c:374
-msgid "Cannot add VPN connection"
-msgstr "Ðе вдаєтьÑÑ Ð´Ð¾Ð´Ð°Ñ‚Ð¸ з'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ VPN"
-
-#: ../gnome/vpn-properties/nm-vpn-properties.c:376
-msgid ""
-"No suitable VPN software was found on your system. Contact your system "
-"administrator."
-msgstr ""
-"У ÑиÑтемі не вÑтановлено потрібне програмне Ð·Ð°Ð±ÐµÐ·Ð¿ÐµÑ‡ÐµÐ½Ð½Ñ VPN. Зв'ÑжітьÑÑ Ð· "
-"ÑиÑтемним адмініÑтратором."
-
-#: ../gnome/vpn-properties/nm-vpn-properties.c:428
-msgid "Cannot import VPN connection"
-msgstr "Ðе вдаєтьÑÑ Ñ–Ð¼Ð¿Ð¾Ñ€Ñ‚ÑƒÐ²Ð°Ñ‚Ð¸ з'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ VPN"
-
-#: ../gnome/vpn-properties/nm-vpn-properties.c:430
-#, c-format
-msgid ""
-"Cannot find suitable software for VPN connection type '%s' to import the "
-"file '%s'. Contact your system administrator."
-msgstr ""
-"Ðе вдаєтьÑÑ Ð·Ð½Ð°Ð¹Ñ‚Ð¸ відповідне програмне Ð·Ð°Ð±ÐµÐ·Ð¿ÐµÑ‡ÐµÐ½Ð½Ñ Ð´Ð»Ñ Ð·'єднань VPN типу '%"
-"s', щоб імпортувати файл '%s'. Зв'ÑжітьÑÑ Ð· ÑиÑтемним адмініÑтратором."
-
-#: ../gnome/vpn-properties/nm-vpn-properties.c:570
-#, c-format
-msgid "Error retrieving VPN connection '%s'"
-msgstr "Помилка Ð¾Ñ‚Ñ€Ð¸Ð¼Ð°Ð½Ð½Ñ Ð·'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ VPN '%s'"
-
-#: ../gnome/vpn-properties/nm-vpn-properties.c:573
-#, c-format
-msgid ""
-"Could not find the UI files for VPN connection type '%s'. Contact your "
-"system administrator."
-msgstr ""
-"Ðе вдаєтьÑÑ Ð·Ð½Ð°Ð¹Ñ‚Ð¸ файли графічного інтерфейÑу Ð´Ð»Ñ Ð·'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ VPN типу '%s'. "
-"Зв'ÑжітьÑÑ Ð· ÑиÑтемним адмініÑтратором."
-
-#: ../gnome/vpn-properties/nm-vpn-properties.c:733
-#, c-format
-msgid "Delete VPN connection \"%s\"?"
-msgstr "Видалити з'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ VPN \"%s\"?"
-
-#: ../gnome/vpn-properties/nm-vpn-properties.c:736
-#, c-format
-msgid ""
-"All information about the VPN connection \"%s\" will be lost and you may "
-"need your system administrator to provide information to create a new "
-"connection."
-msgstr ""
-"УÑÑ Ñ–Ð½Ñ„Ð¾Ñ€Ð¼Ð°Ñ†Ñ–Ñ Ð¿Ñ€Ð¾ з'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ VPN \"%s\" буде втрачена. Можливо, вам "
-"доведетьÑÑ Ð·Ð²ÐµÑ€Ð½ÑƒÑ‚Ð¸ÑÑŒ до ÑиÑтемного адмініÑтратора за інформацією Ð´Ð»Ñ "
-"ÑÑ‚Ð²Ð¾Ñ€ÐµÐ½Ð½Ñ Ð½Ð¾Ð²Ð¾Ð³Ð¾ з'єднаннÑ."
-
-#: ../gnome/vpn-properties/nm-vpn-properties.c:951
-msgid "Unable to load"
-msgstr "Ðе вдаєтьÑÑ Ð·Ð°Ð²Ð°Ð½Ñ‚Ð°Ð¶Ð¸Ñ‚Ð¸"
-
-#: ../gnome/vpn-properties/nm-vpn-properties.c:953
-msgid "Cannot find some needed resources (the glade file)!"
-msgstr "Ðе вдаєтьÑÑ Ð·Ð½Ð°Ð¹Ñ‚Ð¸ деÑкі необхідні реÑурÑи (не знайдено файл glade)!"
-
-#. Edit dialog
-#: ../gnome/vpn-properties/nm-vpn-properties.c:1071
-msgid "Edit VPN Connection"
-msgstr "Правка з'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ VPN"
-
-#: ../gnome/vpn-properties/nm-vpn-properties.glade.h:1
-msgid "Add a new VPN connection"
-msgstr "Додати нове з'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ VPN"
-
-#: ../gnome/vpn-properties/nm-vpn-properties.glade.h:2
-msgid "Connect to:"
-msgstr "З'єднатиÑÑŒ з:"
-
-#: ../gnome/vpn-properties/nm-vpn-properties.glade.h:3
-msgid "Create VPN Connection"
-msgstr "Ð¡Ñ‚Ð²Ð¾Ñ€ÐµÐ½Ð½Ñ Ð·'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ VPN"
-
-#: ../gnome/vpn-properties/nm-vpn-properties.glade.h:4
-msgid "Create VPN Connection - 1 of 2"
-msgstr "Ð¡Ñ‚Ð²Ð¾Ñ€ÐµÐ½Ð½Ñ Ð·'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ VPN - 1 з 2"
-
-#: ../gnome/vpn-properties/nm-vpn-properties.glade.h:5
-msgid "Create VPN Connection - 2 of 2"
-msgstr "Ð¡Ñ‚Ð²Ð¾Ñ€ÐµÐ½Ð½Ñ Ð·'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ VPN - 2 з 2"
-
-#: ../gnome/vpn-properties/nm-vpn-properties.glade.h:6
-msgid "Delete the selected VPN connection"
-msgstr "Видалити виділені з'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ VPN"
-
-#: ../gnome/vpn-properties/nm-vpn-properties.glade.h:7
-msgid ""
-"Dependent on the private network you want to connect to, you need to select "
-"what type of connection you want to create."
-msgstr ""
-"Ð’ залежноÑÑ‚Ñ– від приватної мережі, до Ñкої ви хочете приєднатиÑÑŒ, вам "
-"потрібно виділити тип Ñтворюваного з'єднаннÑ."
-
-#: ../gnome/vpn-properties/nm-vpn-properties.glade.h:8
-msgid "E_xport"
-msgstr "_ЕкÑпорт"
-
-#: ../gnome/vpn-properties/nm-vpn-properties.glade.h:9
-msgid "Edit the selected VPN connection"
-msgstr "Редагувати виділене з'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ VPN"
-
-#: ../gnome/vpn-properties/nm-vpn-properties.glade.h:10
-msgid "Export VPN connection to a file"
-msgstr "ЕкÑпортувати з'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ VPN у файл"
-
-#: ../gnome/vpn-properties/nm-vpn-properties.glade.h:11
-msgid "Export the VPN settings to a file"
-msgstr "ЕкÑпортувати параметри VPN у файл"
-
-#: ../gnome/vpn-properties/nm-vpn-properties.glade.h:12
-msgid "Finish create VPN Connection"
-msgstr "Ð—Ð°Ð²ÐµÑ€ÑˆÐµÐ½Ð½Ñ ÑÑ‚Ð²Ð¾Ñ€ÐµÐ½Ð½Ñ Ð·'Ñ”Ð´Ð½Ð°Ð½Ð½Ñ VPN"
-
-#: ../gnome/vpn-properties/nm-vpn-properties.glade.h:13
-msgid "Manage Virtual Private Network connections"
-msgstr "ÐšÐµÑ€ÑƒÐ²Ð°Ð½Ð½Ñ Ð·'єднаннÑми віртуальної приватної мережеі"
-
-#: ../gnome/vpn-properties/nm-vpn-properties.glade.h:14
-msgid ""
-"This assistant will guide you through the creation of a new VPN connection "
-"to a private network.\n"
-"\n"
-"It will require some information, such as IP addresses and secrets, that "
-"will probably be provided by your system administrator as appropriate."
-msgstr ""
-"Цей помічник допоможе Ñтворити нову приватну мережу VPN.\n"
-"\n"
-"Ðеобхідно вказати деÑку інформацію, наприклад адреÑи IP та Ñекрети, Ñкі, "
-"можливо, надаютьÑÑ ÑиÑтемним вашим адмініÑтратором."
-
-#: ../src/nm-netlink-monitor.c:154
-#, c-format
-msgid ""
-"unable to create netlink socket for monitoring wired ethernet devices - %s"
-msgstr ""
-"не вдаєтьÑÑ Ñтворити мережний Ñокет Ð´Ð»Ñ ÐºÐ¾Ð½Ñ‚Ñ€Ð¾Ð»ÑŽ приÑтрою ethernet - %s"
-
-#: ../src/nm-netlink-monitor.c:172
-#, c-format
-msgid ""
-"unable to bind to netlink socket for monitoring wired ethernet devices - %s"
-msgstr ""
-"не вдаєтьÑÑ Ð¿Ñ€Ð¸Ð²'ÑзатиÑÑŒ до мережного Ñокету Ð´Ð»Ñ ÐºÐ¾Ð½Ñ‚Ñ€Ð¾Ð»ÑŽ приÑтрою ethernet "
-"- %s"
-
-#: ../src/nm-netlink-monitor.c:403
-msgid "operation took too long"
-msgstr "Ð¾Ð¿ÐµÑ€Ð°Ñ†Ñ–Ñ Ð²Ð¸ÐºÐ¾Ð½ÑƒÑ”Ñ‚ÑŒÑÑ Ð½Ð°Ð´Ñ‚Ð¾ довго"
-
-#: ../src/nm-netlink-monitor.c:500
-msgid "received data from wrong type of sender"
-msgstr "отримано дані з неправильним типом відправника"
-
-#: ../src/nm-netlink-monitor.c:513
-msgid "received data from unexpected sender"
-msgstr "отримано дані з неÑподіваним відправником"
-
-#: ../src/nm-netlink-monitor.c:535
-#, c-format
-msgid "%s"
-msgstr "%s"
-
-#: ../src/nm-netlink-monitor.c:644
-msgid "too much data was sent over socket and some of it was lost"
-msgstr "через Ñокет надто багато даних надіÑлано, та чаÑтину з них втрачено"
-
-#: ../src/nm-netlink-monitor.c:733
-msgid "error occurred while waiting for data on socket"
-msgstr "помилка при очікуванні даних з Ñокету"
diff --git a/po/wa.po b/po/wa.po
deleted file mode 100644
index 41bccf2a6a..0000000000
--- a/po/wa.po
+++ /dev/null
@@ -1,193 +0,0 @@
-# translation of wa.po to Walloon
-# This file is distributed under the same license as the PACKAGE package.
-# Copyright (C) 2004 Free Software Foundation, Inc.
-# Pablo Saratxaga <pablo@walon.org>, 2004.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: NetworkManager\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2004-10-19 13:38-0400\n"
-"PO-Revision-Date: 2004-09-09 10:41+0200\n"
-"Last-Translator: Pablo Saratxaga <pablo@walon.org>\n"
-"Language-Team: Walloon <linux-wa@walon.org>\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"Plural-Forms: nplurals=2; plural=n > 1;\n"
-
-#: info-daemon/networks.glade:11
-msgid "Modify Wireless Networks"
-msgstr "Candjî les rantoeles sins fyis"
-
-#: info-daemon/networks.glade:92
-msgid "<span weight=\"bold\">Wireless Networks:</span>"
-msgstr "<span weight=\"bold\">Rantoeles sins fyis:</span>"
-
-#: info-daemon/passphrase.glade:9
-msgid "Wireless Network Key Required"
-msgstr "I gn a mezåjhe d' ene clé d' ecriptaedje pol rantoele sins fyis"
-
-#: info-daemon/passphrase.glade:52
-msgid "_Login to Network"
-msgstr "S' _elodjî sol rantoele"
-
-#: info-daemon/passphrase.glade:100
-#, fuzzy
-msgid ""
-"<span weight=\"bold\" size=\"larger\">Passphrase Required by Wireless "
-"Network</span>\n"
-"\n"
-"A passphrase or encryption key is required to access the wireless network '%"
-"s'."
-msgstr ""
-"<span weight=\"bold\" size=\"larger\">Li rantoele sins fyis a mezåjhe d' on "
-"scret</span>\n"
-"\n"
-"I gn a mezåjhe d' on sicret ou d' ene clé WEP po-z aveur accès al rantoele "
-"sins fyis «%s»."
-
-#: info-daemon/passphrase.glade:129
-msgid "Key Type:"
-msgstr ""
-
-#: info-daemon/passphrase.glade:150
-msgid ""
-"128-bit Passphrase\n"
-"128-bit Raw Hex Key"
-msgstr ""
-
-#: info-daemon/passphrase.glade:180
-#: info-daemon/NetworkManagerInfoPassphraseDialog.c:101
-msgid "Passphrase:"
-msgstr "Sicret:"
-
-#: info-daemon/passphrase.glade:208 panel-applet/essid.glade:162
-msgid "*"
-msgstr "*"
-
-#: info-daemon/NetworkManagerInfoPassphraseDialog.c:104
-msgid "Key:"
-msgstr ""
-
-#. Reuse the above string to make the translators less angry.
-#: panel-applet/NMWirelessApplet.c:691 panel-applet/NMWirelessApplet.c:701
-msgid ""
-"The NetworkManager Applet could not find some required resources (the glade "
-"file was not found)."
-msgstr ""
-"L' aplikete manaedjresse di rantoeles n' a nén savou trover sacwantès "
-"rsoûces k' end a mezåjhe (li fitchî glade n' a nén stî trové)."
-
-#: panel-applet/NMWirelessApplet.c:716
-#, fuzzy
-msgid "Custom wireless network"
-msgstr "Rantoeles sins fyis"
-
-#: panel-applet/NMWirelessApplet.c:717
-msgid "Enter the ESSID of the wireless network to which you wish to connect."
-msgstr ""
-
-#: panel-applet/NMWirelessApplet.c:800
-#, fuzzy
-msgid "Other Wireless Networks..."
-msgstr "Rantoeles sins fyis"
-
-#: panel-applet/NMWirelessApplet.c:911
-msgid "No network devices have been found"
-msgstr ""
-
-#: panel-applet/NMWirelessApplet.c:1028
-msgid "NetworkManager is not running..."
-msgstr "Li manaedjeu d' rantoeles n' est nén en alaedje..."
-
-#: panel-applet/essid.glade:52
-msgid "C_onnect"
-msgstr ""
-
-#: panel-applet/essid.glade:131
-#, fuzzy
-msgid "Wireless _Network:"
-msgstr "Rantoeles sins fyis"
-
-#: panel-applet/essid.glade:177
-#, fuzzy
-msgid "Wireless _adapter:"
-msgstr "Rantoeles sins fyis"
-
-#: panel-applet/menu-info.c:101
-#, fuzzy, c-format
-msgid "Wired Network (%s)"
-msgstr "Rantoeles sins fyis"
-
-#: panel-applet/menu-info.c:103
-#, fuzzy
-msgid "Wired Network"
-msgstr "Rantoeles sins fyis"
-
-#: panel-applet/menu-info.c:168
-#, fuzzy, c-format
-msgid "Wireless Network (%s)"
-msgid_plural "Wireless Networks (%s)"
-msgstr[0] "Rantoeles sins fyis"
-msgstr[1] "Rantoeles sins fyis"
-
-#: panel-applet/menu-info.c:170
-#, fuzzy
-msgid "Wireless Network"
-msgid_plural "Wireless Networks"
-msgstr[0] "Rantoeles sins fyis"
-msgstr[1] "Rantoeles sins fyis"
-
-#: panel-applet/menu-info.c:307
-msgid " (invalid Unicode)"
-msgstr ""
-
-#: examples/python/systray/eggtrayicon.c:111
-msgid "Orientation"
-msgstr ""
-
-#: examples/python/systray/eggtrayicon.c:112
-msgid "The orientation of the tray."
-msgstr ""
-
-#~ msgid "There are no network devices..."
-#~ msgstr "I gn a nou éndjin rantoele...."
-
-#~ msgid "There are no wireless networks..."
-#~ msgstr "I gn a nole rantoele sins fyis..."
-
-#~ msgid "Network Connections"
-#~ msgstr "Raloyaedjes rantoele"
-
-#~ msgid "No network connection is currently active..."
-#~ msgstr "Nou raloyaedje rantoele en alaedje pol moumint..."
-
-#~ msgid "A wired network connection is currently active..."
-#~ msgstr "On raloyaedje rantoele, mins so fyis, est en alaedje pol moumint..."
-
-#~ msgid "_About..."
-#~ msgstr "Ã…_d fwait..."
-
-#~ msgid " "
-#~ msgstr " "
-
-#~ msgid ""
-#~ "<span weight=\"bold\" size=\"larger\">Wireless Network Login "
-#~ "Confirmation</span>\n"
-#~ "\n"
-#~ "You have chosen log in to the wireless network '%s'. If you are sure "
-#~ "this wireless network is secure, click the checkbox below and "
-#~ "NetworkManager will no longer pester you with stupid questions when you "
-#~ "connect to it."
-#~ msgstr ""
-#~ "<span weight=\"bold\" size=\"larger\">Acertinaedje di l' elodjaedje al "
-#~ "rantoele sins fyis</span>\n"
-#~ "\n"
-#~ "Vos avoz tchoezi di vs elodjî al rantoele sins fyis «%s». Si vos estoz "
-#~ "seur ki cisse rantoele la est fiyåve, clitchîz sol boesse a clitchî chal "
-#~ "pa dzo, eyet l' manaedjeu di rantoeles ni vos pelrè pus avou ces kesses "
-#~ "ci l' côp ki vént."
-
-#~ msgid "Always Trust this Wireless Network"
-#~ msgstr "Aveur tofer fiyate dins cisse rantoele ci"
diff --git a/po/zh_CN.po b/po/zh_CN.po
deleted file mode 100644
index a6414bea23..0000000000
--- a/po/zh_CN.po
+++ /dev/null
@@ -1,191 +0,0 @@
-# SOME DESCRIPTIVE TITLE.
-# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
-# This file is distributed under the same license as the PACKAGE package.
-# Funda Wang <fundawang@linux.net.cn>, 2004.
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: NetworkManager\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2004-11-29 11:55+0100\n"
-"PO-Revision-Date: 2004-11-29 20:22+0800\n"
-"Last-Translator: Funda Wang <fundawang@linux.net.cn>\n"
-"Language-Team: zh_CN <i18n-translation@lists.linux.net.cn>\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"Plural-Forms: nplurals=1; plural=0;\n"
-
-#: info-daemon/networks.glade.h:1
-msgid "<span weight=\"bold\">Wireless Networks:</span>"
-msgstr "<span weight=\"bold\">无线网络:</span>"
-
-#: info-daemon/networks.glade.h:2
-msgid "Modify Wireless Networks"
-msgstr "修改无线网络"
-
-#: info-daemon/passphrase.glade.h:1 panel-applet/essid.glade.h:1
-msgid "*"
-msgstr "*"
-
-#: info-daemon/passphrase.glade.h:2 panel-applet/essid.glade.h:2
-msgid ""
-"128-bit Passphrase (WEP)\n"
-"Ascii Key (WEP)\n"
-"Hex Key (WEP)"
-msgstr ""
-"128 ä½å¯†ç å¥(WEP)\n"
-"ASCII 密钥(WEP)\n"
-"å六进制密钥(WEP)"
-
-#: info-daemon/passphrase.glade.h:6
-#, no-c-format
-msgid ""
-"<span weight=\"bold\" size=\"larger\">Passphrase Required by Wireless "
-"Network</span>\n"
-"\n"
-"A passphrase or encryption key is required to access the wireless network '%"
-"s'."
-msgstr ""
-"<span weight=\"bold\" size=\"larger\">无线网络需è¦å¯†ç å¥</span>\n"
-"\n"
-"è¦è®¿é—®æ— çº¿ç½‘络“%sâ€ï¼Œéœ€è¦æ供密ç å¥æˆ–加密密钥。"
-
-#: info-daemon/passphrase.glade.h:9 panel-applet/essid.glade.h:7
-msgid "Key Type:"
-msgstr "密钥类型:"
-
-#: info-daemon/passphrase.glade.h:10
-#: info-daemon/NetworkManagerInfoPassphraseDialog.c:135
-#: panel-applet/NMWirelessAppletOtherNetworkDialog.c:147
-#: panel-applet/essid.glade.h:8
-msgid "Passphrase:"
-msgstr "密ç å¥ï¼š"
-
-#: info-daemon/passphrase.glade.h:11
-msgid "Wireless Network Key Required"
-msgstr "需è¦æ— çº¿ç½‘络密钥"
-
-#: info-daemon/passphrase.glade.h:12
-msgid "_Login to Network"
-msgstr "登录到网络(_L)"
-
-#: info-daemon/NetworkManagerInfoPassphraseDialog.c:138
-#: panel-applet/NMWirelessAppletOtherNetworkDialog.c:150
-msgid "Ascii Key:"
-msgstr "ASCII 密钥:"
-
-#: info-daemon/NetworkManagerInfoPassphraseDialog.c:141
-#: panel-applet/NMWirelessAppletOtherNetworkDialog.c:153
-msgid "Hex Key:"
-msgstr "å六进制密钥:"
-
-#: panel-applet/NMWirelessApplet.c:289
-msgid "No network connection"
-msgstr "没有网络连接"
-
-#: panel-applet/NMWirelessApplet.c:293
-msgid "Wired network connection"
-msgstr "有线网络连接"
-
-#: panel-applet/NMWirelessApplet.c:299
-msgid "Connecting to a wired network..."
-msgstr "正在连接到有线网络..."
-
-#: panel-applet/NMWirelessApplet.c:314
-#, c-format
-msgid "Wireless network connection (%d%%)"
-msgstr "无线网络连接(%d%%)"
-
-#: panel-applet/NMWirelessApplet.c:317
-msgid "Wireless network connection"
-msgstr "无线网络连接"
-
-#: panel-applet/NMWirelessApplet.c:323
-msgid "Connecting to a wireless network..."
-msgstr "正在连接到无线网络..."
-
-#: panel-applet/NMWirelessApplet.c:326
-msgid "NetworkManager is not running"
-msgstr "网络管ç†å™¨æœªè¿è¡Œ"
-
-#: panel-applet/NMWirelessApplet.c:332
-msgid "Scanning for wireless networks..."
-msgstr "正在扫æ无线网络..."
-
-#: panel-applet/NMWirelessApplet.c:656
-msgid "Other Wireless Networks..."
-msgstr "其它无线网络..."
-
-#: panel-applet/NMWirelessApplet.c:767
-msgid "No network devices have been found"
-msgstr "没有å‘现网络设备"
-
-#: panel-applet/NMWirelessApplet.c:884
-msgid "NetworkManager is not running..."
-msgstr "网络管ç†å™¨æœªè¿è¡Œ..."
-
-#: panel-applet/NMWirelessAppletOtherNetworkDialog.c:224
-msgid "Custom wireless network"
-msgstr "自定义无线网络"
-
-#: panel-applet/NMWirelessAppletOtherNetworkDialog.c:225
-msgid "Enter the ESSID of the wireless network to which you wish to connect."
-msgstr "输入您想è¦è¿žæŽ¥çš„无线网络的 ESSID。"
-
-#. Reuse the above string to make the translators less angry.
-#: panel-applet/NMWirelessAppletOtherNetworkDialog.c:305
-#: panel-applet/NMWirelessAppletOtherNetworkDialog.c:314
-msgid ""
-"The NetworkManager Applet could not find some required resources (the glade "
-"file was not found)."
-msgstr "网络管ç†å™¨å°ç¨‹åºæ‰¾ä¸åˆ°æ‰€éœ€çš„资æº(glade 文件未找到)。"
-
-#: panel-applet/essid.glade.h:5
-msgid "C_onnect"
-msgstr "连接(_O)"
-
-#: panel-applet/essid.glade.h:6
-msgid "Connect with encryption enabled"
-msgstr "å¯ç”¨åŠ å¯†è¿žæŽ¥"
-
-#: panel-applet/essid.glade.h:9
-msgid "Wireless _adapter:"
-msgstr "无线适é…器(_A):"
-
-#: panel-applet/essid.glade.h:10
-msgid "Wireless _Network:"
-msgstr "无线网络(_N):"
-
-#: panel-applet/menu-info.c:101
-#, c-format
-msgid "Wired Network (%s)"
-msgstr "无线网络(%s)"
-
-#: panel-applet/menu-info.c:103
-msgid "Wired Network"
-msgstr "无线网络"
-
-#: panel-applet/menu-info.c:168
-#, c-format
-msgid "Wireless Network (%s)"
-msgid_plural "Wireless Networks (%s)"
-msgstr[0] "无线网络(%s)"
-
-#: panel-applet/menu-info.c:170
-msgid "Wireless Network"
-msgid_plural "Wireless Networks"
-msgstr[0] "无线网络"
-
-#: panel-applet/menu-info.c:307
-msgid " (invalid Unicode)"
-msgstr " (无效的 Unicode)"
-
-#: examples/python/systray/eggtrayicon.c:111
-msgid "Orientation"
-msgstr "æ–¹å‘"
-
-#: examples/python/systray/eggtrayicon.c:112
-msgid "The orientation of the tray."
-msgstr "托盘方å‘。"
-
diff --git a/po/zh_TW.po b/po/zh_TW.po
deleted file mode 100644
index 8ca72d1a30..0000000000
--- a/po/zh_TW.po
+++ /dev/null
@@ -1,708 +0,0 @@
-# Traditional Chinese translation of Network Manager.
-# Copyright (C) 2005 Free Software Foundation, Inc.
-# Woodman Tuen <wmtuen@gmail.com>, 2005.
-#
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: Network Manager\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2005-07-21 22:15+0800\n"
-"PO-Revision-Date: 2005-07-09 11:14+0800\n"
-"Last-Translator: Woodman Tuen <wmtuen@gmail.com>\n"
-"Language-Team: Chinese/Traditional <community@linuxhall.org>\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"Plural-Forms: nplurals=1; plural=0;\n"
-
-#: ../gnome/applet/applet-dbus-info.c:986
-#, c-format
-msgid ""
-"The requested wireless network '%s' does not appear to be in range. A "
-"different wireless network will be used if any are available."
-msgstr ""
-
-#: ../gnome/applet/applet-dbus.c:597
-#, c-format
-msgid "Connection to the wireless network '%s' failed.\n"
-msgstr "連接無線網路‘%s’失敗。\n"
-
-#: ../gnome/applet/applet-dbus.c:602
-msgid "Connection to the wired network failed.\n"
-msgstr "連接有線網路失敗。\n"
-
-#: ../gnome/applet/applet.c:192
-msgid "Error displaying connection information: "
-msgstr "顯示連線資訊發生錯誤:"
-
-#: ../gnome/applet/applet.c:217
-msgid "Could not find some required resources (the glade file)!"
-msgstr "無法找到一些需è¦çš„資æºï¼ˆglade 檔)ï¼"
-
-#: ../gnome/applet/applet.c:227
-msgid "No active connections!"
-msgstr "沒有使用中的連線"
-
-#: ../gnome/applet/applet.c:236
-msgid "Could not open socket!"
-msgstr ""
-
-#: ../gnome/applet/applet.c:251
-msgid "Failed to get information about the interface!"
-msgstr "無法å–得網路介é¢çš„訊資ï¼"
-
-#: ../gnome/applet/applet.c:284
-#, c-format
-msgid "Wired Ethernet (%s)"
-msgstr "有線乙太網路 (%s)"
-
-#: ../gnome/applet/applet.c:286
-#, c-format
-msgid "Wireless Ethernet (%s)"
-msgstr "有線乙太網路 (%s)"
-
-#: ../gnome/applet/applet.c:380 ../gnome/applet/applet.c:398
-msgid "NetworkManager Applet"
-msgstr "NetworkManager é¢æ¿ç¨‹å¼"
-
-#: ../gnome/applet/applet.c:382 ../gnome/applet/applet.c:400
-msgid "Copyright (C) 2004-2005 Red Hat, Inc."
-msgstr "版權所有 (C) 2004-2005 Red Hat, Inc."
-
-#: ../gnome/applet/applet.c:383 ../gnome/applet/applet.c:401
-msgid ""
-"Notification area applet for managing your network devices and connections."
-msgstr ""
-
-#: ../gnome/applet/applet.c:486
-msgid "VPN Error"
-msgstr "VPN 錯誤"
-
-#: ../gnome/applet/applet.c:490
-#, c-format
-msgid ""
-"<span weight=\"bold\" size=\"larger\">VPN Login Failure</span>\n"
-"\n"
-"Could not start the VPN connection '%s' due to a login failure.\n"
-"\n"
-"The VPN service said: \"%s\""
-msgstr ""
-
-#: ../gnome/applet/applet.c:495
-#, c-format
-msgid ""
-"<span weight=\"bold\" size=\"larger\">VPN Start Failure</span>\n"
-"\n"
-"Could not start the VPN connection '%s' due to a failure launching the VPN "
-"program.\n"
-"\n"
-"The VPN service said: \"%s\""
-msgstr ""
-
-#: ../gnome/applet/applet.c:500
-#, c-format
-msgid ""
-"<span weight=\"bold\" size=\"larger\">VPN Connect Failure</span>\n"
-"\n"
-"Could not start the VPN connection '%s' due to a connection error.\n"
-"\n"
-"The VPN service said: \"%s\""
-msgstr ""
-
-#: ../gnome/applet/applet.c:505
-#, c-format
-msgid ""
-"<span weight=\"bold\" size=\"larger\">VPN Configuration Error</span>\n"
-"\n"
-"The VPN connection '%s' was not correctly configured.\n"
-"\n"
-"The VPN service said: \"%s\""
-msgstr ""
-
-#: ../gnome/applet/applet.c:510
-#, c-format
-msgid ""
-"<span weight=\"bold\" size=\"larger\">VPN Connect Failure</span>\n"
-"\n"
-"Could not start the VPN connection '%s' because the VPN server did not "
-"return an adequate network configuration.\n"
-"\n"
-"The VPN service said: \"%s\""
-msgstr ""
-
-#: ../gnome/applet/applet.c:577
-#, c-format
-msgid ""
-"<span weight=\"bold\" size=\"larger\">VPN Login Message</span>\n"
-"\n"
-"VPN connection '%s' said:\n"
-"\n"
-"\"%s\""
-msgstr ""
-"<span weight=\"bold\" size=\"larger\">VPN 登入訊æ¯</span>\n"
-"\n"
-"VPN 連線‘%s’說:\n"
-"\n"
-"\"%s\""
-
-#: ../gnome/applet/applet.c:795 ../gnome/applet/applet.c:2365
-#: ../gnome/applet/other-network-dialog.c:315
-#: ../gnome/applet/passphrase-dialog.c:455
-msgid ""
-"The NetworkManager Applet could not find some required resources (the glade "
-"file was not found)."
-msgstr "NetworkManager é¢æ¿ç¨‹å¼ç„¡æ³•æ‰¾åˆ°ä¸€äº›éœ€è¦çš„資æºï¼ˆæ‰¾ä¸åˆ° glade 檔)"
-
-#: ../gnome/applet/applet.c:808
-#, c-format
-msgid "The network device \"%s (%s)\" does not support wireless scanning."
-msgstr "網路è£ç½®â€œ%s (%s)â€ä¸æ”¯æ´ç„¡ç·šç¶²è·¯æŽƒæ。"
-
-#: ../gnome/applet/applet.c:815
-#, c-format
-msgid "The network device \"%s (%s)\" does not support link detection."
-msgstr "網路è£ç½®â€œ%s (%s)â€ä¸æ”¯æ´é€£æŽ¥åµæ¸¬"
-
-#: ../gnome/applet/applet.c:936
-#, c-format
-msgid "Preparing device %s for the wired network..."
-msgstr "è£ç½® %s 正準備連接有線網路..."
-
-#: ../gnome/applet/applet.c:938
-#, c-format
-msgid "Preparing device %s for the wireless network '%s'..."
-msgstr "è£ç½® %s 正準備連接無線網路‘%s’..."
-
-#: ../gnome/applet/applet.c:945
-#, fuzzy, c-format
-msgid "Configuring device %s for the wired network..."
-msgstr "正在連接到有線網路..."
-
-#: ../gnome/applet/applet.c:947
-#, c-format
-msgid "Attempting to join the wireless network '%s'..."
-msgstr "正在嘗試加入無線網路‘%s’..."
-
-#: ../gnome/applet/applet.c:954
-#, c-format
-msgid "Waiting for Network Key for the wireless network '%s'..."
-msgstr "正在等待無線網路‘%s’的網路金鑰..."
-
-#: ../gnome/applet/applet.c:961 ../gnome/applet/applet.c:970
-msgid "Requesting a network address from the wired network..."
-msgstr "æ­£è¦æ±‚有線網路æ供網路ä½å€..."
-
-#: ../gnome/applet/applet.c:963 ../gnome/applet/applet.c:972
-#, c-format
-msgid "Requesting a network address from the wireless network '%s'..."
-msgstr "æ­£è¦æ±‚無線網路‘%s’æ供網路ä½å€..."
-
-#: ../gnome/applet/applet.c:979
-msgid "Finishing connection to the wired network..."
-msgstr "連接有線網路完æˆ..."
-
-#: ../gnome/applet/applet.c:981
-#, c-format
-msgid "Finishing connection to the wireless network '%s'..."
-msgstr "連接無線網路‘%s’完æˆ..."
-
-#: ../gnome/applet/applet.c:1027
-msgid "NetworkManager is not running"
-msgstr "NetworkManager 沒有執行"
-
-#: ../gnome/applet/applet.c:1038
-msgid "No network connection"
-msgstr "沒有網路連接"
-
-#: ../gnome/applet/applet.c:1045
-msgid "Wired network connection"
-msgstr "有線網路連接"
-
-#: ../gnome/applet/applet.c:1052
-msgid "Connected to an Ad-Hoc wireless network"
-msgstr "連接到 Ad-Hoc 點å°é»žå¼ç„¡ç·šç¶²è·¯"
-
-#: ../gnome/applet/applet.c:1066
-#, c-format
-msgid "Wireless network connection to '%s' (%d%%)"
-msgstr "無線網路連接到‘%s’ (%d%%)"
-
-#: ../gnome/applet/applet.c:1091
-#, c-format
-msgid "VPN connection to '%s'"
-msgstr "VPN 連線連接到‘%s’"
-
-#: ../gnome/applet/applet.c:1517
-msgid "_Connect to Other Wireless Network..."
-msgstr "連接到其它的無線網路(_C)..."
-
-#: ../gnome/applet/applet.c:1538
-msgid "Create _New Wireless Network..."
-msgstr "建立新的無線網路(_N)..."
-
-#: ../gnome/applet/applet.c:1651
-#: ../gnome/vpn-properties/nm-vpn-properties.glade.h:17
-msgid "VPN Connections"
-msgstr "VPN 連線"
-
-#: ../gnome/applet/applet.c:1678
-msgid "Configure VPN..."
-msgstr "設置 VPN..."
-
-#: ../gnome/applet/applet.c:1682
-msgid "Disconnect VPN..."
-msgstr "與 VPN 斷線..."
-
-#: ../gnome/applet/applet.c:1732
-msgid "No network devices have been found"
-msgstr "找ä¸åˆ°ä»»ä½•ç¶²è·¯è£ç½®"
-
-#: ../gnome/applet/applet.c:1890
-msgid "NetworkManager is not running..."
-msgstr "NetworkManager 沒有執行...."
-
-#: ../gnome/applet/applet.c:1958
-msgid "_Stop All Wireless Devices"
-msgstr "åœæ­¢æ‰€æœ‰ç„¡ç·šç¶²è·¯è£ç½®(_S)"
-
-#: ../gnome/applet/applet.c:1963
-msgid "_Start All Wireless Devices"
-msgstr "開始執行所有無線網路è£ç½®(_S)"
-
-#: ../gnome/applet/applet.c:1994
-#, fuzzy
-msgid "_Wireless Network Discovery"
-msgstr "無線網路 (%s)"
-
-#: ../gnome/applet/applet.c:1997
-msgid "Always Search"
-msgstr "總是æœå°‹"
-
-#: ../gnome/applet/applet.c:2005
-msgid "Search Only When Disconnected"
-msgstr "在斷線時æ‰æœå°‹"
-
-#: ../gnome/applet/applet.c:2013
-msgid "Never Search"
-msgstr "æ°¸ä¸æœå°‹"
-
-#. Stop All Wireless Devices item
-#: ../gnome/applet/applet.c:2025
-msgid "Stop All Wireless Devices"
-msgstr "åœæ­¢æ‰€æœ‰ç„¡ç·šç¶²è·¯è£ç½®"
-
-#: ../gnome/applet/applet.c:2031
-msgid "Connection _Information"
-msgstr "連線資訊(_I)"
-
-#: ../gnome/applet/applet.c:2039
-msgid "_Help"
-msgstr "求助(_H)"
-
-#: ../gnome/applet/applet.c:2046
-msgid "_About"
-msgstr "關於(_A)"
-
-#: ../gnome/applet/applet.c:2515
-msgid ""
-"The NetworkManager applet could not find some required resources. It cannot "
-"continue.\n"
-msgstr "NetworkManager é¢æ¿ç¨‹å¼ç„¡æ³•æ‰¾åˆ°ä¸€äº›éœ€è¦çš„資æºã€‚它無法繼續。\n"
-
-#: ../gnome/applet/eggtrayicon.c:118
-msgid "Orientation"
-msgstr "æ–¹å‘"
-
-#: ../gnome/applet/eggtrayicon.c:119
-msgid "The orientation of the tray."
-msgstr "é¢æ¿çš„æ–¹å‘"
-
-#: ../gnome/applet/menu-items.c:89
-#, c-format
-msgid "Wired Network (%s)"
-msgstr "有線網路 (%s)"
-
-#: ../gnome/applet/menu-items.c:92
-msgid "_Wired Network"
-msgstr "有線網路(_W)"
-
-#: ../gnome/applet/menu-items.c:165
-#, c-format
-msgid "Wireless Network (%s)"
-msgid_plural "Wireless Networks (%s)"
-msgstr[0] "無線網路 (%s)"
-
-#: ../gnome/applet/menu-items.c:167
-msgid "Wireless Network"
-msgid_plural "Wireless Networks"
-msgstr[0] "無線網路"
-
-#: ../gnome/applet/menu-items.c:309
-msgid " (invalid Unicode)"
-msgstr "(無效的統一碼)"
-
-#: ../gnome/applet/other-network-dialog.c:148
-#: ../gnome/applet/passphrase-dialog.c:163
-#: ../gnome/applet/wireless-applet.glade.h:34
-msgid "Passphrase:"
-msgstr "通行碼:"
-
-#: ../gnome/applet/other-network-dialog.c:151
-#: ../gnome/applet/passphrase-dialog.c:166
-#, fuzzy
-msgid "ASCII Key:"
-msgstr "Acii æ ¼å¼é‡‘鑰:"
-
-#: ../gnome/applet/other-network-dialog.c:154
-#: ../gnome/applet/passphrase-dialog.c:169
-msgid "Hex Key:"
-msgstr "Hex æ ¼å¼é‡‘鑰:"
-
-#: ../gnome/applet/other-network-dialog.c:229
-msgid "Create new wireless network"
-msgstr "建立新的無線網路"
-
-#: ../gnome/applet/other-network-dialog.c:230
-msgid ""
-"Enter the ESSID and security settings of the wireless network you wish to "
-"create."
-msgstr "輸入您è¦å»ºç«‹çš„無線網路的 ESSID åŠå®‰å…¨è¨­å®šã€‚"
-
-#: ../gnome/applet/other-network-dialog.c:235
-msgid "Custom wireless network"
-msgstr "自訂無線網路"
-
-#: ../gnome/applet/other-network-dialog.c:236
-msgid "Enter the ESSID of the wireless network to which you wish to connect."
-msgstr "輸入您è¦é€£æŽ¥çš„無線網路的 ESSID。"
-
-#: ../gnome/applet/passphrase-dialog.c:248
-#, c-format
-msgid "Passphrase for wireless network %s"
-msgstr "無線網路 %s 的通行碼"
-
-#: ../gnome/applet/vpn-password-dialog.c:152
-#: ../gnome/applet/vpn-password-dialog.c:191
-#, c-format
-msgid "Cannot start VPN connection '%s'"
-msgstr "無法執行 VPN 連線‘%s’"
-
-#: ../gnome/applet/vpn-password-dialog.c:155
-#, c-format
-msgid ""
-"Could not find the authentication dialog for VPN connection type '%s'. "
-"Contact your system administrator."
-msgstr ""
-
-#: ../gnome/applet/vpn-password-dialog.c:194
-#, c-format
-msgid ""
-"There was a problem launching the authentication dialog for VPN connection "
-"type '%s'. Contact your system administrator."
-msgstr ""
-
-#: ../gnome/applet/wireless-applet.glade.h:1
-msgid " "
-msgstr " "
-
-#: ../gnome/applet/wireless-applet.glade.h:2
-msgid ""
-"128-bit Passphrase (WEP)\n"
-"Ascii Key (WEP)\n"
-"Hex Key (WEP)"
-msgstr ""
-"128ä½å…ƒé€šè¡Œç¢¼ (WEP)\n"
-"Acii æ ¼å¼é‡‘é‘° (WEP)\n"
-"Hex æ ¼å¼é‡‘é‘° (WEP)"
-
-#: ../gnome/applet/wireless-applet.glade.h:5
-msgid ""
-"128-bit passphrase (WEP)\n"
-"Ascii key (WEP)\n"
-"Hex key (WEP)"
-msgstr ""
-"128ä½å…ƒé€šè¡Œç¢¼ (WEP)\n"
-"Acii æ ¼å¼é‡‘é‘° (WEP)\n"
-"Hex æ ¼å¼é‡‘é‘° (WEP)"
-
-#: ../gnome/applet/wireless-applet.glade.h:8
-msgid ""
-"<span weight=\"bold\" size=\"larger\">Active Connection Information</span>"
-msgstr "<span weight=\"bold\">使用中的連線資訊:</span>"
-
-#: ../gnome/applet/wireless-applet.glade.h:10
-#, no-c-format
-msgid ""
-"<span weight=\"bold\" size=\"larger\">Passphrase Required by Wireless "
-"Network</span>\n"
-"\n"
-"A passphrase or encryption key is required to access the wireless network '%"
-"s'."
-msgstr ""
-"<span weight=\"bold\" size=\"larger\">無線網路通行碼請求</span>\n"
-"\n"
-"需è¦ä¸€å€‹é€šè¡Œç¢¼æˆ–是密鑰來存å–無線網路‘%s’"
-
-#: ../gnome/applet/wireless-applet.glade.h:14
-#, no-c-format
-msgid ""
-"<span weight=\"bold\" size=\"larger\">Reduced Network Functionality</span>\n"
-"\n"
-"%s It will not be completely functional."
-msgstr ""
-
-#: ../gnome/applet/wireless-applet.glade.h:18
-#, no-c-format
-msgid ""
-"<span weight=\"bold\" size=\"larger\">Wireless Network Login Confirmation</"
-"span>\n"
-"\n"
-"You have chosen to log in to the wireless network '%s'. If you are sure "
-"that this wireless network is secure, click the checkbox below and "
-"NetworkManager will not require confirmation on subsequent log ins."
-msgstr ""
-
-#: ../gnome/applet/wireless-applet.glade.h:21
-msgid "Always Trust this Wireless Network"
-msgstr "總是信任這無線網路"
-
-#: ../gnome/applet/wireless-applet.glade.h:22
-msgid "Broadcast Address:"
-msgstr "廣播ä½å€ï¼š"
-
-#: ../gnome/applet/wireless-applet.glade.h:23
-msgid "C_onnect"
-msgstr "連線(_O)"
-
-#: ../gnome/applet/wireless-applet.glade.h:24
-msgid "Connect with encryption enabled"
-msgstr "啟用加密連接"
-
-#: ../gnome/applet/wireless-applet.glade.h:25
-msgid "Connection Information"
-msgstr "連線資訊"
-
-#: ../gnome/applet/wireless-applet.glade.h:26
-msgid "Destination Address:"
-msgstr "目的地ä½å€ï¼š"
-
-#: ../gnome/applet/wireless-applet.glade.h:27
-msgid "Don't remind me again"
-msgstr "ä¸è¦å†æ醒我"
-
-#: ../gnome/applet/wireless-applet.glade.h:28
-msgid "Hardware Address:"
-msgstr "硬體ä½å€ï¼š"
-
-#: ../gnome/applet/wireless-applet.glade.h:29
-msgid "IP Address:"
-msgstr "IP ä½å€ï¼š"
-
-#: ../gnome/applet/wireless-applet.glade.h:30
-msgid "Interface:"
-msgstr "介é¢ï¼š"
-
-#: ../gnome/applet/wireless-applet.glade.h:31
-msgid "Key Type:"
-msgstr "金鑰類型:"
-
-#: ../gnome/applet/wireless-applet.glade.h:32
-msgid "Key type:"
-msgstr "金鑰類型:"
-
-#: ../gnome/applet/wireless-applet.glade.h:33
-msgid "Other Wireless Network..."
-msgstr "其它無線網路..."
-
-#: ../gnome/applet/wireless-applet.glade.h:35
-msgid "Subnet Mask:"
-msgstr "å­ç¶²è·¯é®ç½©ï¼š"
-
-#: ../gnome/applet/wireless-applet.glade.h:36
-msgid "Wireless Network Key Required"
-msgstr "需è¦ç„¡ç·šç¶²è·¯é‡‘é‘°"
-
-#: ../gnome/applet/wireless-applet.glade.h:37
-msgid "Wireless _adapter:"
-msgstr "無線網絡å¡(_A):"
-
-#: ../gnome/applet/wireless-applet.glade.h:38
-msgid "Wireless _network:"
-msgstr "無線網路(_N):"
-
-#: ../gnome/applet/wireless-applet.glade.h:39
-msgid "_Login to Network"
-msgstr "登入網路(_L)"
-
-#: ../gnome/applet/wireless-applet.glade.h:40
-msgid "_OK"
-msgstr "確定(_O)"
-
-#: ../gnome/vpn-properties/nm-vpn-properties.c:374
-msgid "Cannot add VPN connection"
-msgstr "無法加入 VPN 連線"
-
-#: ../gnome/vpn-properties/nm-vpn-properties.c:376
-msgid ""
-"No suitable VPN software was found on your system. Contact your system "
-"administrator."
-msgstr ""
-
-#: ../gnome/vpn-properties/nm-vpn-properties.c:428
-msgid "Cannot import VPN connection"
-msgstr "無法匯入 VPN 網路連線"
-
-#: ../gnome/vpn-properties/nm-vpn-properties.c:430
-#, c-format
-msgid ""
-"Cannot find suitable software for VPN connection type '%s' to import the "
-"file '%s'. Contact your system administrator."
-msgstr ""
-
-#: ../gnome/vpn-properties/nm-vpn-properties.c:570
-#, c-format
-msgid "Error retrieving VPN connection '%s'"
-msgstr ""
-
-#: ../gnome/vpn-properties/nm-vpn-properties.c:573
-#, c-format
-msgid ""
-"Could not find the UI files for VPN connection type '%s'. Contact your "
-"system administrator."
-msgstr ""
-
-#: ../gnome/vpn-properties/nm-vpn-properties.c:733
-#, c-format
-msgid "Delete VPN connection \"%s\"?"
-msgstr "刪除 VPN 連線“%sâ€ï¼Ÿ"
-
-#: ../gnome/vpn-properties/nm-vpn-properties.c:736
-#, c-format
-msgid ""
-"All information about the VPN connection \"%s\" will be lost and you may "
-"need your system administrator to provide information to create a new "
-"connection."
-msgstr ""
-
-#: ../gnome/vpn-properties/nm-vpn-properties.c:951
-msgid "Unable to load"
-msgstr "無法載入"
-
-#: ../gnome/vpn-properties/nm-vpn-properties.c:953
-msgid "Cannot find some needed resources (the glade file)!"
-msgstr "無法找到一些需è¦çš„資æºï¼ˆ glade 檔)ï¼"
-
-#. Edit dialog
-#: ../gnome/vpn-properties/nm-vpn-properties.c:1071
-msgid "Edit VPN Connection"
-msgstr "編輯 VPN 連線"
-
-#: ../gnome/vpn-properties/nm-vpn-properties.glade.h:1
-msgid "Add a new VPN connection"
-msgstr "加入新的 VPN 連線"
-
-#: ../gnome/vpn-properties/nm-vpn-properties.glade.h:2
-msgid "Connect to:"
-msgstr "連線到:"
-
-#: ../gnome/vpn-properties/nm-vpn-properties.glade.h:3
-msgid "Create VPN Connection"
-msgstr "建立 VPN 連線"
-
-#: ../gnome/vpn-properties/nm-vpn-properties.glade.h:4
-msgid "Create VPN Connection - 1 of 2"
-msgstr "建立 VPN 連線 - 第一步"
-
-#: ../gnome/vpn-properties/nm-vpn-properties.glade.h:5
-msgid "Create VPN Connection - 2 of 2"
-msgstr "建立 VPN 連線 - 第二步"
-
-#: ../gnome/vpn-properties/nm-vpn-properties.glade.h:6
-msgid "Delete the selected VPN connection"
-msgstr ""
-
-#: ../gnome/vpn-properties/nm-vpn-properties.glade.h:7
-msgid ""
-"Dependent on the private network you want to connect to, you need to select "
-"what type of connection you want to create."
-msgstr ""
-
-#: ../gnome/vpn-properties/nm-vpn-properties.glade.h:8
-msgid "E_xport"
-msgstr "匯出(_X)"
-
-#: ../gnome/vpn-properties/nm-vpn-properties.glade.h:9
-msgid "Edit the selected VPN connection"
-msgstr "編輯已é¸çš„ VPN 連線"
-
-#: ../gnome/vpn-properties/nm-vpn-properties.glade.h:10
-msgid "Export VPN connection to a file"
-msgstr "匯出 VPN 連線至檔案"
-
-#: ../gnome/vpn-properties/nm-vpn-properties.glade.h:11
-msgid "Export the VPN settings to a file"
-msgstr "匯出 VPN 設定至檔案"
-
-#: ../gnome/vpn-properties/nm-vpn-properties.glade.h:12
-msgid "Finish create VPN Connection"
-msgstr "建立 VPN 連線完æˆ"
-
-#: ../gnome/vpn-properties/nm-vpn-properties.glade.h:13
-msgid "Manage Virtual Private Network connections"
-msgstr "管ç†è™›æ“¬ç§æœ‰ç¶²è·¯é€£ç·š"
-
-#: ../gnome/vpn-properties/nm-vpn-properties.glade.h:14
-msgid ""
-"This assistant will guide you through the creation of a new VPN connection "
-"to a private network.\n"
-"\n"
-"It will require some information, such as IP addresses and secrets, that "
-"will probably be provided by your system administrator as appropriate."
-msgstr ""
-
-#: ../src/nm-netlink-monitor.c:154
-#, c-format
-msgid ""
-"unable to create netlink socket for monitoring wired ethernet devices - %s"
-msgstr ""
-
-#: ../src/nm-netlink-monitor.c:172
-#, c-format
-msgid ""
-"unable to bind to netlink socket for monitoring wired ethernet devices - %s"
-msgstr ""
-
-#: ../src/nm-netlink-monitor.c:404
-msgid "operation took too long"
-msgstr ""
-
-#: ../src/nm-netlink-monitor.c:501
-msgid "received data from wrong type of sender"
-msgstr ""
-
-#: ../src/nm-netlink-monitor.c:514
-msgid "received data from unexpected sender"
-msgstr ""
-
-#: ../src/nm-netlink-monitor.c:536
-#, c-format
-msgid "%s"
-msgstr "%s"
-
-#: ../src/nm-netlink-monitor.c:645
-msgid "too much data was sent over socket and some of it was lost"
-msgstr ""
-
-#: ../src/nm-netlink-monitor.c:734
-msgid "error occurred while waiting for data on socket"
-msgstr ""
-
-#~ msgid "Modify Wireless Networks"
-#~ msgstr "修改無線網路"
-
-#~ msgid "*"
-#~ msgstr "*"
-
-#~ msgid "You must log in to access the private network %s"
-#~ msgstr "您需è¦ç™»å…¥ä¾†å­˜å–ç§æœ‰ç¶²è·¯ %s"
diff --git a/src/.cvsignore b/src/.cvsignore
deleted file mode 100644
index 47e4a4182d..0000000000
--- a/src/.cvsignore
+++ /dev/null
@@ -1,3 +0,0 @@
-Makefile
-Makefile.in
-NetworkManager
diff --git a/src/Makefile.am b/src/Makefile.am
deleted file mode 100644
index bfe55028f4..0000000000
--- a/src/Makefile.am
+++ /dev/null
@@ -1,88 +0,0 @@
-SUBDIRS=named-manager vpn-manager dhcp-manager backends
-
-INCLUDES = -I${top_srcdir} -I${top_srcdir}/src/named-manager -I${top_srcdir}/src/vpn-manager -I${top_srcdir}/src/dhcp-manager -I${top_srcdir}/utils
-
-bin_PROGRAMS = NetworkManager
-
-NetworkManager_SOURCES = \
- NetworkManagerAP.c \
- NetworkManagerAP.h \
- NetworkManagerAPList.c \
- NetworkManagerAPList.h \
- NetworkManagerDbus.c \
- NetworkManagerDbus.h \
- NetworkManagerDbusUtils.c \
- NetworkManagerDialup.h \
- NetworkManagerDbusUtils.h \
- nm-dbus-nm.c \
- nm-dbus-nm.h \
- nm-dbus-device.c \
- nm-dbus-device.h \
- nm-dbus-net.c \
- nm-dbus-net.h \
- nm-dbus-nmi.c \
- nm-dbus-nmi.h \
- NetworkManagerDevice.c \
- NetworkManagerDevice.h \
- NetworkManagerDevicePrivate.h \
- nm-ip4-config.c \
- nm-ip4-config.h \
- NetworkManager.c \
- NetworkManagerMain.h \
- NetworkManagerPolicy.c \
- NetworkManagerPolicy.h \
- NetworkManagerUtils.c \
- NetworkManagerUtils.h \
- NetworkManagerWireless.c \
- NetworkManagerWireless.h \
- NetworkManagerSystem.c \
- NetworkManagerSystem.h \
- nm-netlink-monitor.c \
- nm-netlink-monitor.h \
- nm-activation-request.c \
- nm-activation-request.h \
- autoip.c \
- autoip.h
-
-NetworkManager_CPPFLAGS = \
- $(DBUS_CFLAGS) \
- $(GTHREAD_CFLAGS) \
- $(HAL_CFLAGS) \
- $(OPENSSL_CFLAGS) \
- -DDBUS_API_SUBJECT_TO_CHANGE \
- -DG_DISABLE_DEPRECATED \
- -DBINDIR=\"$(bindir)\" \
- -DDATADIR=\"$(datadir)\" \
- -DSYSCONFDIR=\"$(sysconfdir)\" \
- -DARP_DEBUG
-if WITH_GCRYPT
-NetworkManager_CPPFLAGS += $(LIBGCRYPT_CFLAGS)
-endif
-
-
-if !WITH_GCRYPT
-NetworkManager_SOURCES += gnome-keyring-md5.c gnome-keyring-md5.h
-endif
-
-NetworkManager_LDADD = \
- $(DBUS_LIBS) \
- $(GTHREAD_LIBS) \
- $(HAL_LIBS) \
- $(IWLIB) \
- $(top_builddir)/utils/libnmutils.la \
- ./named-manager/libnamed-manager.la \
- ./vpn-manager/libvpn-manager.la \
- ./dhcp-manager/libdhcp-manager.la \
- ./backends/libnmbackend.la
-
-if WITH_GCRYPT
-NetworkManager_LDADD += $(LIBGCRYPT_LIBS)
-endif
-
-dbusservicedir = $(DBUS_SYS_DIR)
-dbusservice_DATA = NetworkManager.conf
-
-helperdir = $(bindir)
-helper_SCRIPTS = NMLoadModules
-
-EXTRA_DIST = $(dbusservice_DATA) $(helper_SCRIPTS)
diff --git a/src/NMLoadModules b/src/NMLoadModules
deleted file mode 100755
index 0dc6a486cc..0000000000
--- a/src/NMLoadModules
+++ /dev/null
@@ -1,61 +0,0 @@
-#! /bin/bash
-# Load kernel modules for all network devices
-
-CWD=`pwd`
-cd /etc/sysconfig/network-scripts
-
-# find all the interfaces besides loopback.
-# ignore aliases, alternative configurations, and editor backup files
-interfaces=`ls ifcfg* | LANG=C egrep -v '(ifcfg-lo|:|rpmsave|rpmorig|rpmnew)' | \
- LANG=C egrep -v '(~|\.bak)$' | \
- LANG=C egrep 'ifcfg-[A-Za-z0-9\._-]+$' | \
- sed 's/^ifcfg-//g' |
- sed 's/[0-9]/ &/' | LANG=C sort -k 1,1 -k 2n | sed 's/ //'`
-
-# bring up all other interfaces configured to come up at boot time
-for i in $interfaces; do
- eval $(LANG=C fgrep "DEVICE=" ifcfg-$i)
- eval $(LANG=C fgrep "TYPE=" ifcfg-$i)
- eval $(LANG=C fgrep "SLAVE=" ifcfg-$i)
- eval $(LANG=C fgrep "BRIDGE=" ifcfg-$i)
-
- if [ -z "$DEVICE" ] ; then DEVICE="$i"; fi
-
- if [ "${DEVICE##cipcb}" != "$DEVICE" ] ; then
- unset DEVICE TYPE SLAVE BRIDGE
- continue
- fi
-
- if [ "$TYPE" = "xDSL" ]; then
- unset DEVICE TYPE SLAVE BRIDGE
- continue
- fi
-
- if [ -n "$BRIDGE" ]; then
- unset DEVICE TYPE SLAVE BRIDGE
- continue
- fi
-
- if [ "${DEVICE%%.*}" != "$DEVICE" ] ; then
- unset DEVICE TYPE SLAVE BRIDGE
- continue
- fi
-
- if [ "$SLAVE" = "yes" ]; then
- unset DEVICE TYPE SLAVE BRIDGE
- continue
- fi
- unset DEVICE TYPE SLAVE BRIDGE
-
- # Load the module
- LC_ALL= LANG= /sbin/ip -o link | grep -q $i
- if [ "$?" = "1" ]; then
- alias=`modprobe -c | awk "/^(alias|install)[[:space:]]+$i[[:space:]]/ { print \\$3 }"`
- if [ -n "$alias" -a "$alias" != "off" -a "$alias" != "/bin/true" ]; then
- modprobe $alias > /dev/null 2>&1
- fi
- fi
- continue
-done
-
-exit 0
diff --git a/src/NetworkManager.c b/src/NetworkManager.c
deleted file mode 100644
index 4b1a442db2..0000000000
--- a/src/NetworkManager.c
+++ /dev/null
@@ -1,989 +0,0 @@
-/* NetworkManager -- Network link manager
- *
- * Dan Williams <dcbw@redhat.com>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- *
- * (C) Copyright 2004 Red Hat, Inc.
- */
-
-#include <glib.h>
-#include <dbus/dbus.h>
-#include <dbus/dbus-glib-lowlevel.h>
-#include <dbus/dbus-glib.h>
-#include <libhal.h>
-#include <getopt.h>
-#include <errno.h>
-#include <stdlib.h>
-#include <signal.h>
-#include <unistd.h>
-#include <fcntl.h>
-#include <sys/stat.h>
-#include <sys/types.h>
-
-#include "NetworkManager.h"
-#include "nm-utils.h"
-#include "NetworkManagerUtils.h"
-#include "NetworkManagerDevice.h"
-#include "NetworkManagerPolicy.h"
-#include "NetworkManagerWireless.h"
-#include "NetworkManagerDbus.h"
-#include "NetworkManagerAP.h"
-#include "NetworkManagerAPList.h"
-#include "NetworkManagerSystem.h"
-#include "nm-named-manager.h"
-#include "nm-dbus-vpn.h"
-#include "nm-netlink-monitor.h"
-#include "nm-dhcp-manager.h"
-
-#define NM_WIRELESS_LINK_STATE_POLL_INTERVAL (5 * 1000)
-
-/*
- * Globals
- */
-static NMData *nm_data = NULL;
-
-static gboolean sigterm_pipe_handler (GIOChannel *src, GIOCondition condition, gpointer data);
-static void sigterm_handler (int signum);
-static void nm_data_free (NMData *data);
-
-/*
- * nm_get_device_interface_from_hal
- *
- */
-static char *nm_get_device_interface_from_hal (LibHalContext *ctx, const char *udi)
-{
- char *iface = NULL;
-
- if (libhal_device_property_exists (ctx, udi, "net.interface", NULL))
- {
- /* Only use Ethernet and Wireless devices at the moment */
- if (libhal_device_property_exists (ctx, udi, "info.category", NULL))
- {
- char *category = libhal_device_get_property_string (ctx, udi, "info.category", NULL);
- if (category && (!strcmp (category, "net.80203") || !strcmp (category, "net.80211")))
- {
- char *temp = libhal_device_get_property_string (ctx, udi, "net.interface", NULL);
- iface = g_strdup (temp);
- libhal_free_string (temp);
- }
- libhal_free_string (category);
- }
- }
-
- return (iface);
-}
-
-
-/*
- * nm_create_device_and_add_to_list
- *
- * Create a new network device and add it to our device list.
- *
- * Returns: newly allocated device on success
- * NULL on failure
- */
-NMDevice * nm_create_device_and_add_to_list (NMData *data, const char *udi, const char *iface,
- gboolean test_device, NMDeviceType test_device_type)
-{
- NMDevice *dev = NULL;
-
- g_return_val_if_fail (data != NULL, NULL);
- g_return_val_if_fail (udi != NULL, NULL);
- g_return_val_if_fail (iface != NULL, NULL);
- g_return_val_if_fail (strlen (iface) > 0, NULL);
-
- /* If we are called to create a test devices, but test devices weren't enabled
- * on the command-line, don't create the device.
- */
- if (!data->enable_test_devices && test_device)
- {
- nm_warning ("attempted to create a test device, "
- "but test devices were not enabled "
- "on the command line.");
- return (NULL);
- }
-
- /* Make sure the device is not already in the device list */
- if ((dev = nm_get_device_by_iface (data, iface)))
- return (NULL);
-
- if ((dev = nm_device_new (iface, udi, test_device, test_device_type, data)))
- {
- /* Attempt to acquire mutex for device list addition. If acquire fails,
- * just ignore the device addition entirely.
- */
- if (nm_try_acquire_mutex (data->dev_list_mutex, __FUNCTION__))
- {
- nm_info ("Now managing %s device '%s'.",
- nm_device_is_wireless (dev) ? "wireless" : "wired", nm_device_get_iface (dev));
-
- data->dev_list = g_slist_append (data->dev_list, dev);
- nm_device_deactivate (dev);
-
- nm_unlock_mutex (data->dev_list_mutex, __FUNCTION__);
-
- nm_policy_schedule_device_change_check (data);
- nm_dbus_schedule_device_status_change_signal (data, dev, NULL, DEVICE_ADDED);
- }
- else
- {
- /* If we couldn't add the device to our list, free its data. */
- nm_warning ("could not acquire device list mutex." );
- nm_device_unref (dev);
- dev = NULL;
- }
- } else nm_warning ("could not allocate device data." );
-
- return (dev);
-}
-
-
-/*
- * nm_remove_device_from_list
- *
- * Searches for a device entry in the NLM device list by udi,
- * and if found, removes that element from the list and frees
- * its data.
- */
-void nm_remove_device_from_list (NMData *data, const char *udi)
-{
- g_return_if_fail (data != NULL);
- g_return_if_fail (udi != NULL);
-
- /* Attempt to acquire mutex for device list deletion. If acquire fails,
- * just ignore the device deletion entirely.
- */
- if (nm_try_acquire_mutex (data->dev_list_mutex, __FUNCTION__))
- {
- GSList *elt;
- for (elt = data->dev_list; elt; elt = g_slist_next (elt))
- {
- NMDevice *dev = (NMDevice *)(elt->data);
-
- if (dev && (nm_null_safe_strcmp (nm_device_get_udi (dev), udi) == 0))
- {
- nm_device_set_removed (dev, TRUE);
- nm_device_deactivate (dev);
- nm_device_worker_thread_stop (dev);
- nm_dbus_schedule_device_status_change_signal (data, dev, NULL, DEVICE_REMOVED);
-
- nm_device_unref (dev);
-
- /* Remove the device entry from the device list and free its data */
- data->dev_list = g_slist_remove_link (data->dev_list, elt);
- g_slist_free (elt);
- nm_policy_schedule_device_change_check (data);
- break;
- }
- }
- nm_unlock_mutex (data->dev_list_mutex, __FUNCTION__);
- } else nm_warning ("could not acquire device list mutex." );
-}
-
-
-/*
- * nm_get_active_device
- *
- * Return the currently active device.
- *
- */
-NMDevice *nm_get_active_device (NMData *data)
-{
- NMDevice * dev = NULL;
- GSList * elt;
-
- g_return_val_if_fail (data != NULL, NULL);
-
- nm_lock_mutex (data->dev_list_mutex, __FUNCTION__);
- for (elt = data->dev_list; elt; elt = g_slist_next (elt))
- {
- if ((dev = (NMDevice *)(elt->data)) && nm_device_get_act_request (dev))
- break;
- dev = NULL;
- }
- nm_unlock_mutex (data->dev_list_mutex, __FUNCTION__);
-
- return dev;
-}
-
-
-/* Hal doesn't really give us any way to pass a GMainContext to our
- * mainloop integration function unfortunately. So we have to use
- * a global.
- */
-GMainContext *main_context = NULL;
-
-/*
- * nm_hal_mainloop_integration
- *
- */
-static void nm_hal_mainloop_integration (LibHalContext *ctx, DBusConnection * dbus_connection)
-{
- dbus_connection_setup_with_g_main (dbus_connection, main_context);
-}
-
-/*
- * nm_hal_device_added
- *
- */
-static void nm_hal_device_added (LibHalContext *ctx, const char *udi)
-{
- NMData *data = (NMData *)libhal_ctx_get_user_data (ctx);
- char *iface = NULL;
-
- g_return_if_fail (data != NULL);
-
- nm_debug ("New device added (hal udi is '%s').", udi );
-
- /* Sometimes the device's properties (like net.interface) are not set up yet,
- * so this call will fail, and it will actually be added when hal sets the device's
- * capabilities a bit later on.
- */
- if ((iface = nm_get_device_interface_from_hal (data->hal_ctx, udi)))
- {
- nm_create_device_and_add_to_list (data, udi, iface, FALSE, DEVICE_TYPE_DONT_KNOW);
- g_free (iface);
- }
-}
-
-
-/*
- * nm_hal_device_removed
- *
- */
-static void nm_hal_device_removed (LibHalContext *ctx, const char *udi)
-{
- NMData *data = (NMData *)libhal_ctx_get_user_data (ctx);
-
- g_return_if_fail (data != NULL);
-
- nm_debug ("Device removed (hal udi is '%s').", udi );
-
- nm_remove_device_from_list (data, udi);
-}
-
-
-/*
- * nm_hal_device_new_capability
- *
- */
-static void nm_hal_device_new_capability (LibHalContext *ctx, const char *udi, const char *capability)
-{
- NMData *data = (NMData *)libhal_ctx_get_user_data (ctx);
-
- g_return_if_fail (data != NULL);
-
- /*nm_debug ("nm_hal_device_new_capability() called with udi = %s, capability = %s", udi, capability );*/
-
- if (capability && ((strcmp (capability, "net.80203") == 0) || (strcmp (capability, "net.80211") == 0)))
- {
- char *iface;
-
- if ((iface = nm_get_device_interface_from_hal (data->hal_ctx, udi)))
- {
- nm_create_device_and_add_to_list (data, udi, iface, FALSE, DEVICE_TYPE_DONT_KNOW);
- g_free (iface);
- }
- }
-}
-
-
-/*
- * nm_add_initial_devices
- *
- * Add all devices that hal knows about right now (ie not hotplug devices)
- *
- */
-static void nm_add_initial_devices (NMData *data)
-{
- char ** net_devices;
- int num_net_devices;
- int i;
- DBusError error;
-
- g_return_if_fail (data != NULL);
-
- dbus_error_init (&error);
- /* Grab a list of network devices */
- net_devices = libhal_find_device_by_capability (data->hal_ctx, "net", &num_net_devices, &error);
- if (dbus_error_is_set (&error))
- {
- nm_warning ("could not find existing networking devices: %s", error.message);
- dbus_error_free (&error);
- }
-
- if (net_devices)
- {
- for (i = 0; i < num_net_devices; i++)
- {
- char *iface;
-
- if ((iface = nm_get_device_interface_from_hal (data->hal_ctx, net_devices[i])))
- {
- nm_create_device_and_add_to_list (data, net_devices[i], iface, FALSE, DEVICE_TYPE_DONT_KNOW);
- g_free (iface);
- }
- }
- }
-
- libhal_free_string_array (net_devices);
-}
-
-
-/*
- * nm_state_change_signal_broadcast
- *
- */
-static gboolean nm_state_change_signal_broadcast (gpointer user_data)
-{
- NMData *data = (NMData *)user_data;
-
- g_return_val_if_fail (data != NULL, FALSE);
-
- nm_dbus_signal_state_change (data->dbus_connection, data);
- return FALSE;
-}
-
-
-/*
- * nm_schedule_state_change_signal_broadcast
- *
- */
-void nm_schedule_state_change_signal_broadcast (NMData *data)
-{
- guint id = 0;
- GSource *source;
-
- g_return_if_fail (data != NULL);
-
- source = g_idle_source_new ();
- g_source_set_callback (source, nm_state_change_signal_broadcast, data, NULL);
- id = g_source_attach (source, data->main_context);
- g_source_unref (source);
-}
-
-
-/*
- * nm_data_new
- *
- * Create data structure used in callbacks from libhal.
- *
- */
-static NMData *nm_data_new (gboolean enable_test_devices)
-{
- struct sigaction action;
- sigset_t block_mask;
- NMData * data;
- GSource * iosource;
-
- data = g_new0 (NMData, 1);
-
- data->main_context = g_main_context_new ();
- data->main_loop = g_main_loop_new (data->main_context, FALSE);
-
- if (pipe(data->sigterm_pipe) < 0)
- {
- nm_error ("Couldn't create pipe: %s", g_strerror (errno));
- exit (EXIT_FAILURE);
- }
-
- data->sigterm_iochannel = g_io_channel_unix_new (data->sigterm_pipe[0]);
- iosource = g_io_create_watch (data->sigterm_iochannel, G_IO_IN | G_IO_ERR);
- g_source_set_callback (iosource, (GSourceFunc) sigterm_pipe_handler, data, NULL);
- g_source_attach (iosource, data->main_context);
- g_source_unref (iosource);
-
- action.sa_handler = sigterm_handler;
- sigemptyset (&block_mask);
- action.sa_mask = block_mask;
- action.sa_flags = 0;
- sigaction (SIGINT, &action, NULL);
- sigaction (SIGTERM, &action, NULL);
-
- data->named_manager = nm_named_manager_new (data->main_context);
-
- /* Initialize the device list mutex to protect additions/deletions to it. */
- data->dev_list_mutex = g_mutex_new ();
- data->dialup_list_mutex = g_mutex_new ();
- if (!data->dev_list_mutex || !data->dialup_list_mutex)
- {
- nm_data_free (data);
- nm_warning ("could not initialize data structure locks.");
- return (NULL);
- }
- nm_register_mutex_desc (data->dev_list_mutex, "Device List Mutex");
- nm_register_mutex_desc (data->dialup_list_mutex, "DialUp List Mutex");
-
- /* Initialize the access point lists */
- data->allowed_ap_list = nm_ap_list_new (NETWORK_TYPE_ALLOWED);
- data->invalid_ap_list = nm_ap_list_new (NETWORK_TYPE_INVALID);
- if (!data->allowed_ap_list || !data->invalid_ap_list)
- {
- nm_data_free (data);
- nm_warning ("could not create access point lists.");
- return (NULL);
- }
-
- data->enable_test_devices = enable_test_devices;
-
- data->scanning_method = NM_SCAN_METHOD_ALWAYS;
- data->wireless_enabled = TRUE;
-
- nm_policy_schedule_device_change_check (data);
-
- return (data);
-}
-
-
-static void device_stop_and_free (NMDevice *dev, gpointer user_data)
-{
- g_return_if_fail (dev != NULL);
-
- nm_device_set_removed (dev, TRUE);
- nm_device_deactivate (dev);
- nm_device_unref (dev);
-}
-
-
-/*
- * nm_data_free
- *
- * Free data structure used in callbacks.
- *
- */
-static void nm_data_free (NMData *data)
-{
- g_return_if_fail (data != NULL);
-
- /* Kill any active VPN connection */
- if (nm_vpn_manager_get_active_vpn_connection (data->vpn_manager))
- nm_vpn_manager_deactivate_vpn_connection (data->vpn_manager);
-
- /* Stop and destroy all devices */
- nm_lock_mutex (data->dev_list_mutex, __FUNCTION__);
- g_slist_foreach (data->dev_list, (GFunc) device_stop_and_free, NULL);
- g_slist_free (data->dev_list);
- nm_unlock_mutex (data->dev_list_mutex, __FUNCTION__);
-
- g_mutex_free (data->dev_list_mutex);
-
- nm_ap_list_unref (data->allowed_ap_list);
- nm_ap_list_unref (data->invalid_ap_list);
-
- nm_vpn_manager_dispose (data->vpn_manager);
- nm_dhcp_manager_dispose (data->dhcp_manager);
- g_object_unref (data->named_manager);
-
- g_main_loop_unref (data->main_loop);
- g_main_context_unref (data->main_context);
-
- g_io_channel_unref(data->sigterm_iochannel);
-
- nm_hal_deinit (data);
-
- memset (data, 0, sizeof (NMData));
-}
-
-static void sigterm_handler (int signum)
-{
- int ignore;
-
- /* FIXME: This line is probably not a great
- * thing to have in a signal handler
- */
- nm_info ("Caught SIGINT/SIGTERM");
-
- ignore = write (nm_data->sigterm_pipe[1], "X", 1);
-}
-
-static gboolean sigterm_pipe_handler (GIOChannel *src, GIOCondition condition, gpointer user_data)
-{
- NMData * data = user_data;
- NMDevice * act_dev = NULL;
-
- nm_info ("Caught terminiation signal");
- g_main_loop_quit (data->main_loop);
- return FALSE;
-}
-
-/*
- * nm_print_usage
- *
- * Prints program usage.
- *
- */
-static void nm_print_usage (void)
-{
- fprintf (stderr, "\n" "usage : NetworkManager [--no-daemon] [--help]\n");
- fprintf (stderr,
- "\n"
- " --no-daemon Don't become a daemon\n"
- " --enable-test-devices Allow dummy devices to be created via DBUS methods [DEBUG]\n"
- " --help Show this information and exit\n"
- "\n"
- "NetworkManager monitors all network connections and automatically\n"
- "chooses the best connection to use. It also allows the user to\n"
- "specify wireless access points which wireless cards in the computer\n"
- "should associate with.\n"
- "\n");
-}
-
-/*
- * nm_poll_and_update_wireless_link_state
- *
- * Called every 2s to poll wireless cards and determine if they have a link
- * or not.
- *
- */
-static gboolean nm_poll_and_update_wireless_link_state (NMData *data)
-{
- GSList * elt;
- GSList * copy = NULL;
- NMDevice * dev;
-
- g_return_val_if_fail (data != NULL, TRUE);
-
- if ((data->wireless_enabled == FALSE) || (data->asleep == TRUE))
- return (TRUE);
-
- /* Copy device list and ref devices to keep them around */
- if (nm_try_acquire_mutex (data->dev_list_mutex, __FUNCTION__))
- {
- for (elt = data->dev_list; elt; elt = g_slist_next (elt))
- {
- if ((dev = (NMDevice *)(elt->data)))
- {
- nm_device_ref (dev);
- copy = g_slist_append (copy, dev);
- }
- }
- nm_unlock_mutex (data->dev_list_mutex, __FUNCTION__);
- }
-
- for (elt = copy; elt; elt = g_slist_next (elt))
- {
- if ((dev = (NMDevice *)(elt->data)))
- {
- if (nm_device_is_wireless (dev) && !nm_device_is_activating (dev))
- {
- nm_device_set_link_active (dev, nm_device_probe_link_state (dev));
- nm_device_update_signal_strength (dev);
- }
- nm_device_unref (dev);
- }
- }
-
- g_slist_free (copy);
-
- return TRUE;
-}
-
-static void nm_monitor_wireless_link_state (NMData *data)
-{
- GSource *link_source;
- link_source = g_timeout_source_new (NM_WIRELESS_LINK_STATE_POLL_INTERVAL);
- g_source_set_callback (link_source,
- (GSourceFunc) nm_poll_and_update_wireless_link_state,
- data, NULL);
- g_source_attach (link_source, nm_data->main_context);
- g_source_unref (link_source);
-}
-
-static void nm_device_link_activated (NmNetlinkMonitor *monitor, const gchar *interface_name, NMData *data)
-{
- NMDevice *dev = NULL;
-
- if (nm_try_acquire_mutex (data->dev_list_mutex, __FUNCTION__))
- {
- if ((dev = nm_get_device_by_iface (data, interface_name)))
- nm_device_ref (dev);
- nm_unlock_mutex (data->dev_list_mutex, __FUNCTION__);
- }
-
- /* Don't do anything if we already have a link */
- if (dev)
- {
- if (nm_device_is_wired (dev) && !nm_device_has_active_link (dev))
- {
- NMDevice *act_dev = NULL;
-
- nm_device_set_link_active (dev, TRUE);
- nm_policy_schedule_device_change_check (data);
- }
- nm_device_unref (dev);
- }
-}
-
-static void nm_device_link_deactivated (NmNetlinkMonitor *monitor, const gchar *interface_name, NMData *data)
-{
- NMDevice *dev = NULL;
-
- if (nm_try_acquire_mutex (data->dev_list_mutex, __FUNCTION__))
- {
- if ((dev = nm_get_device_by_iface (data, interface_name)))
- nm_device_ref (dev);
- nm_unlock_mutex (data->dev_list_mutex, __FUNCTION__);
- }
-
- if (dev)
- {
- if (nm_device_is_wired (dev))
- nm_device_set_link_active (dev, FALSE);
- nm_device_unref (dev);
- }
-}
-
-static void
-nm_error_monitoring_device_link_state (NmNetlinkMonitor *monitor,
- GError *error,
- NMData *data)
-{
- /* FIXME: Try to handle the error instead of just printing it.
- */
- nm_warning ("error monitoring wired ethernet link state: %s\n",
- error->message);
-}
-
-static void
-nm_monitor_wired_link_state (NMData *data)
-{
- GError *error;
- NmNetlinkMonitor *monitor;
-
- monitor = nm_netlink_monitor_new ();
-
- error = NULL;
- nm_netlink_monitor_open_connection (monitor, &error);
-
- if (error != NULL)
- {
- nm_warning ("could not monitor wired ethernet devices: %s",
- error->message);
- g_error_free (error);
- g_object_unref (monitor);
- return;
- }
-
- g_signal_connect (G_OBJECT (monitor), "interface-connected",
- G_CALLBACK (nm_device_link_activated), data);
-
- g_signal_connect (G_OBJECT (monitor), "interface-disconnected",
- G_CALLBACK (nm_device_link_deactivated), data);
-
- g_signal_connect (G_OBJECT (monitor), "error",
- G_CALLBACK (nm_error_monitoring_device_link_state),
- data);
-
- nm_netlink_monitor_attach (monitor, data->main_context);
-
- /* Request initial status of cards
- */
- nm_netlink_monitor_request_status (monitor, NULL);
-
- data->netlink_monitor = monitor;
-}
-
-static void
-nm_info_handler (const gchar *log_domain,
- GLogLevelFlags log_level,
- const gchar *message,
- gboolean is_daemon)
-{
- int syslog_priority;
-
- switch (log_level)
- {
- case G_LOG_LEVEL_ERROR:
- syslog_priority = LOG_CRIT;
- break;
-
- case G_LOG_LEVEL_CRITICAL:
- syslog_priority = LOG_ERR;
- break;
-
- case G_LOG_LEVEL_WARNING:
- syslog_priority = LOG_WARNING;
- break;
-
- case G_LOG_LEVEL_MESSAGE:
- syslog_priority = LOG_NOTICE;
-
- case G_LOG_LEVEL_DEBUG:
- syslog_priority = LOG_DEBUG;
- break;
-
- case G_LOG_LEVEL_INFO:
- default:
- syslog_priority = LOG_INFO;
- break;
- }
-
- syslog (syslog_priority, "%s", message);
-}
-
-static void
-nm_set_up_log_handlers (gboolean become_daemon)
-{
- if (become_daemon)
- openlog (G_LOG_DOMAIN, LOG_CONS, LOG_DAEMON);
- else
- openlog (G_LOG_DOMAIN, LOG_CONS | LOG_PERROR, LOG_USER);
-
- g_log_set_handler (G_LOG_DOMAIN,
- G_LOG_LEVEL_MASK,
- (GLogFunc) nm_info_handler,
- GINT_TO_POINTER (become_daemon));
-}
-
-
-static LibHalContext *nm_get_hal_ctx (NMData *data)
-{
- LibHalContext * ctx = NULL;
- DBusError error;
-
- g_return_val_if_fail (data != NULL, NULL);
-
- /* Initialize libhal. We get a connection to the hal daemon here. */
- if ((ctx = libhal_ctx_new()) == NULL)
- {
- nm_error ("libhal_ctx_new() failed, exiting...");
- return NULL;
- }
-
- nm_hal_mainloop_integration (ctx, data->dbus_connection);
- libhal_ctx_set_dbus_connection (ctx, data->dbus_connection);
- dbus_error_init (&error);
- if(!libhal_ctx_init (ctx, &error))
- {
- nm_error ("libhal_ctx_init() failed: %s\n"
- "Make sure the hal daemon is running?",
- error.message);
-
- dbus_error_free (&error);
- libhal_ctx_free (ctx);
- return NULL;
- }
-
- libhal_ctx_set_user_data (ctx, data);
- libhal_ctx_set_device_added (ctx, nm_hal_device_added);
- libhal_ctx_set_device_removed (ctx, nm_hal_device_removed);
- libhal_ctx_set_device_new_capability (ctx, nm_hal_device_new_capability);
-
- dbus_error_init (&error);
- libhal_device_property_watch_all (ctx, &error);
- if (dbus_error_is_set (&error))
- {
- nm_error ("libhal_device_property_watch_all(): %s", error.message);
- dbus_error_free (&error);
- libhal_ctx_free (ctx);
- }
-
- return ctx;
-}
-
-
-void nm_hal_init (NMData *data)
-{
- g_return_if_fail (data != NULL);
-
- if ((data->hal_ctx = nm_get_hal_ctx (data)))
- nm_add_initial_devices (data);
-}
-
-
-void nm_hal_deinit (NMData *data)
-{
- g_return_if_fail (data != NULL);
-
- if (data->hal_ctx)
- {
- DBusError error;
-
- dbus_error_init (&error);
- libhal_ctx_shutdown (data->hal_ctx, &error);
- if (dbus_error_is_set (&error))
- {
- nm_warning ("libhal shutdown failed - %s", error.message);
- dbus_error_free (&error);
- }
- libhal_ctx_free (data->hal_ctx);
- data->hal_ctx = NULL;
- }
-}
-
-/*
- * main
- *
- */
-int main( int argc, char *argv[] )
-{
- guint link_source_id;
- GSource * link_source;
- gboolean become_daemon = TRUE;
- gboolean enable_test_devices = FALSE;
- GError * error = NULL;
- DBusError dbus_error;
- char * owner;
-
- if ((int)getuid() != 0)
- {
- g_printerr ("You must be root to run NetworkManager!\n");
- return (EXIT_FAILURE);
- }
-
- /* Parse options */
- while (1)
- {
- int c;
- int option_index = 0;
- const char *opt;
-
- static struct option options[] = {
- {"no-daemon", 0, NULL, 0},
- {"enable-test-devices", 0, NULL, 0},
- {"help", 0, NULL, 0},
- {NULL, 0, NULL, 0}
- };
-
- c = getopt_long (argc, argv, "", options, &option_index);
- if (c == -1)
- break;
-
- switch (c)
- {
- case 0:
- opt = options[option_index].name;
- if (strcmp (opt, "help") == 0)
- {
- nm_print_usage ();
- exit (EXIT_SUCCESS);
- }
- else if (strcmp (opt, "no-daemon") == 0)
- become_daemon = FALSE;
- else if (strcmp (opt, "enable-test-devices") == 0)
- enable_test_devices = TRUE;
- break;
-
- default:
- nm_print_usage ();
- exit (EXIT_FAILURE);
- break;
- }
- }
-
- if (become_daemon && daemon (0, 0) < 0)
- {
- int saved_errno;
-
- saved_errno = errno;
- nm_error ("NetworkManager could not daemonize: %s [error %u]",
- g_strerror (saved_errno), saved_errno);
- exit (EXIT_FAILURE);
- }
-
- g_type_init ();
- if (!g_thread_supported ())
- g_thread_init (NULL);
- dbus_g_thread_init ();
-
- nm_set_up_log_handlers (become_daemon);
- nm_info ("starting...");
-
- nm_system_init();
-
- /* Load all network device kernel modules.
- * NOTE: this hack is temporary until device modules get loaded
- * on startup by something else. The problem is that unless
- * the module is loaded, HAL doesn't know its a network device,
- * and therefore can't tell us about it.
- */
- nm_system_load_device_modules ();
-
- /* Initialize our instance data */
- nm_data = nm_data_new (enable_test_devices);
- if (!nm_data)
- {
- nm_error ("nm_data_new() failed... Not enough memory?");
- exit (EXIT_FAILURE);
- }
-
- /* Create our dbus service */
- nm_data->dbus_connection = nm_dbus_init (nm_data);
- if (!nm_data->dbus_connection)
- {
- nm_error ("nm_dbus_init() failed, exiting. "
- "Either dbus is not running, or the "
- "NetworkManager dbus security policy "
- "was not loaded.");
- nm_data_free (nm_data);
- exit (EXIT_FAILURE);
- }
-
- /* Need to happen after DBUS is initialized */
- nm_data->vpn_manager = nm_vpn_manager_new (nm_data);
- nm_data->dhcp_manager = nm_dhcp_manager_new (nm_data);
-
- /* If NMI is running, grab allowed wireless network lists from it ASAP */
- if (nm_dbus_is_info_daemon_running (nm_data->dbus_connection))
- {
- nm_policy_schedule_allowed_ap_list_update (nm_data);
- nm_dbus_vpn_schedule_vpn_connections_update (nm_data);
- nm_dbus_update_wireless_scan_method (nm_data->dbus_connection, nm_data);
- }
-
- /* Right before we init hal, we have to make sure our mainloop
- * integration function knows about our GMainContext. HAL doesn't give
- * us any way to pass that into its mainloop integration callback, so
- * its got to be a global.
- */
- main_context = nm_data->main_context;
-
- /* If Hal is around, grab a device list from it */
- if ((owner = get_name_owner (nm_data->dbus_connection, "org.freedesktop.Hal")))
- nm_hal_init (nm_data);
-
- /* We run dhclient when we need to, and we don't want any stray ones
- * lying around upon launch.
- */
-// nm_system_kill_all_dhcp_daemons ();
-
- /* Bring up the loopback interface. */
- nm_system_enable_loopback ();
-
- /* Create watch functions that monitor cards for link status. */
- nm_monitor_wireless_link_state (nm_data);
- nm_monitor_wired_link_state (nm_data);
-
- /* Get modems, ISDN, and so on's configuration from the system */
- nm_data->dialup_list = nm_system_get_dialup_config ();
-
- if (!nm_named_manager_start (nm_data->named_manager, &error))
- {
- nm_error ("couldn't initialize nameserver: %s",
- error->message);
- exit (EXIT_FAILURE);
- }
-
- nm_schedule_state_change_signal_broadcast (nm_data);
-
- /* Wheeee!!! */
- g_main_loop_run (nm_data->main_loop);
-
- nm_print_open_socks ();
- nm_data_free (nm_data);
-
- exit (0);
-}
diff --git a/src/NetworkManager.conf b/src/NetworkManager.conf
deleted file mode 100644
index 680a4ad2eb..0000000000
--- a/src/NetworkManager.conf
+++ /dev/null
@@ -1,21 +0,0 @@
-<!DOCTYPE busconfig PUBLIC
- "-//freedesktop//DTD D-BUS Bus Configuration 1.0//EN"
- "http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd">
-<busconfig>
- <policy user="root">
- <allow own="org.freedesktop.NetworkManager"/>
-
- <allow send_destination="org.freedesktop.NetworkManager"/>
- <allow send_interface="org.freedesktop.NetworkManager"/>
- </policy>
- <policy at_console="true">
- <allow send_destination="org.freedesktop.NetworkManager"/>
- <allow send_interface="org.freedesktop.NetworkManager"/>
- </policy>
- <policy context="default">
- <deny own="org.freedesktop.NetworkManager"/>
- <deny send_destination="org.freedesktop.NetworkManager"/>
- <deny send_interface="org.freedesktop.NetworkManager"/>
- </policy>
-</busconfig>
-
diff --git a/src/NetworkManagerAP.c b/src/NetworkManagerAP.c
deleted file mode 100644
index 367495edb4..0000000000
--- a/src/NetworkManagerAP.c
+++ /dev/null
@@ -1,615 +0,0 @@
-/* NetworkManager -- Network link manager
- *
- * Dan Williams <dcbw@redhat.com>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- *
- * (C) Copyright 2004 Red Hat, Inc.
- */
-
-#include "NetworkManagerAP.h"
-#include "NetworkManagerUtils.h"
-#include "nm-utils.h"
-#include "NetworkManagerWireless.h"
-
-
-/*
- * Encapsulates Access Point information
- */
-struct NMAccessPoint
-{
- guint refcount;
- char *essid;
- struct ether_addr *address;
- NMNetworkMode mode;
- gint8 strength;
- double freq;
- guint16 rate;
- gboolean encrypted;
-
- /* Non-scanned attributes */
- gboolean invalid;
- gboolean matched; /* used in ap list diffing */
- gboolean artificial; /* Whether or not the AP is from a scan */
- gboolean user_created; /* Whether or not the AP was created by the user with "Create network..." */
- GTimeVal last_seen; /* Last time the AP was seen in a scan */
-
- /* Things from user prefs/NetworkManagerInfo */
- gboolean trusted;
- char *enc_key;
- NMEncKeyType enc_type;
- NMDeviceAuthMethod auth_method;
- GTimeVal timestamp;
- GSList *user_addresses;
-};
-
-/*
- * nm_ap_new
- *
- * Create a new, blank user access point info structure
- *
- */
-NMAccessPoint * nm_ap_new (void)
-{
- NMAccessPoint *ap;
-
- ap = g_new0 (NMAccessPoint, 1);
- if (!ap)
- {
- nm_warning ("nm_ap_new() could not allocate a new user access point info structure. Not enough memory?");
- return (NULL);
- }
-
- ap->mode = NETWORK_MODE_INFRA;
- ap->auth_method = NM_DEVICE_AUTH_METHOD_UNKNOWN;
- ap->refcount = 1;
-
- return (ap);
-}
-
-
-/*
- * nm_ap_new_from_ap
- *
- * Create a new user access point info structure, duplicating an existing one
- *
- */
-NMAccessPoint * nm_ap_new_from_ap (NMAccessPoint *src_ap)
-{
- NMAccessPoint *new_ap;
- struct ether_addr *new_addr;
-
- g_return_val_if_fail (src_ap != NULL, NULL);
-
- new_addr = g_new0 (struct ether_addr, 1);
- g_return_val_if_fail (new_addr != NULL, NULL);
-
- new_ap = nm_ap_new();
- if (!new_ap)
- {
- nm_warning ("nm_ap_new_from_uap() could not allocate a new user access point structure. Not enough memory?");
- return (NULL);
- }
-
- if (src_ap->essid && (strlen (src_ap->essid) > 0))
- new_ap->essid = g_strdup (src_ap->essid);
- if (src_ap->address)
- {
- memcpy (new_addr, src_ap->address, sizeof (struct ether_addr));
- new_ap->address = new_addr;
- }
- new_ap->mode = src_ap->mode;
- new_ap->strength = src_ap->strength;
- new_ap->freq = src_ap->freq;
- new_ap->rate = src_ap->rate;
- new_ap->encrypted = src_ap->encrypted;
-
- if (src_ap->enc_key && (strlen (src_ap->enc_key) > 0))
- new_ap->enc_key = g_strdup (src_ap->enc_key);
-
- return (new_ap);
-}
-
-
-/*
- * AP refcounting functions
- */
-void nm_ap_ref (NMAccessPoint *ap)
-{
- g_return_if_fail (ap != NULL);
-
- ap->refcount++;
-}
-
-void nm_ap_unref (NMAccessPoint *ap)
-{
- g_return_if_fail (ap != NULL);
-
- ap->refcount--;
- if (ap->refcount == 0)
- {
- g_free (ap->essid);
- g_free (ap->address);
- g_free (ap->enc_key);
- g_slist_foreach (ap->user_addresses, (GFunc)g_free, NULL);
- g_slist_free (ap->user_addresses);
-
- ap->essid = NULL;
- ap->enc_key = NULL;
-
- g_free (ap);
- }
-}
-
-
-/*
- * Get/set functions for timestamp
- *
- */
-const GTimeVal *nm_ap_get_timestamp (const NMAccessPoint *ap)
-{
- g_return_val_if_fail (ap != NULL, 0);
-
- return (&ap->timestamp);
-}
-
-void nm_ap_set_timestamp (NMAccessPoint *ap, const GTimeVal *timestamp)
-{
- g_return_if_fail (ap != NULL);
-
- ap->timestamp = *timestamp;
-}
-
-
-/*
- * Get/set functions for essid
- *
- */
-char * nm_ap_get_essid (const NMAccessPoint *ap)
-{
- g_assert (ap);
- g_return_val_if_fail (ap != NULL, NULL);
-
- return (ap->essid);
-}
-
-void nm_ap_set_essid (NMAccessPoint *ap, const char * essid)
-{
- g_return_if_fail (ap != NULL);
-
- if (ap->essid)
- {
- g_free (ap->essid);
- ap->essid = NULL;
- }
-
- if (essid)
- ap->essid = g_strdup (essid);
-}
-
-
-/*
- * Get/set functions for encryption key
- *
- */
-const char * nm_ap_get_enc_key_source (const NMAccessPoint *ap)
-{
- g_return_val_if_fail (ap != NULL, NULL);
-
- return (ap->enc_key);
-}
-
-void nm_ap_set_enc_key_source (NMAccessPoint *ap, const char * key, NMEncKeyType type)
-{
- g_return_if_fail (ap != NULL);
-
- if (ap->enc_key)
- g_free (ap->enc_key);
-
- ap->enc_key = g_strdup (key);
- ap->enc_type = type;
-}
-
-char *nm_ap_get_enc_key_hashed (const NMAccessPoint *ap)
-{
- char * hashed = NULL;
- const char * source_key;
-
- g_return_val_if_fail (ap != NULL, NULL);
-
- source_key = nm_ap_get_enc_key_source (ap);
- switch (ap->enc_type)
- {
- case (NM_ENC_TYPE_128_BIT_PASSPHRASE):
- if (source_key)
- hashed = nm_wireless_128bit_key_from_passphrase (source_key);
- break;
- case (NM_ENC_TYPE_ASCII_KEY):
- if (source_key){
- if(strlen(source_key)<=5)
- hashed = nm_wireless_64bit_ascii_to_hex (source_key);
- else
- hashed = nm_wireless_128bit_ascii_to_hex (source_key);
- }
- break;
- case (NM_ENC_TYPE_HEX_KEY):
- case (NM_ENC_TYPE_UNKNOWN):
- if (source_key)
- hashed = g_strdup (source_key);
- break;
-
- default:
- break;
- }
-
- return (hashed);
-}
-
-
-/*
- * Get/set functions for encrypted flag
- *
- */
-gboolean nm_ap_get_encrypted (const NMAccessPoint *ap)
-{
- g_return_val_if_fail (ap != NULL, FALSE);
-
- return (ap->encrypted);
-}
-
-void nm_ap_set_encrypted (NMAccessPoint *ap, gboolean encrypted)
-{
- g_return_if_fail (ap != NULL);
-
- ap->encrypted = encrypted;
-}
-
-
-/*
- * Return the encryption method the user specified for this access point.
- *
- */
-NMEncKeyType nm_ap_get_enc_type (const NMAccessPoint *ap)
-{
- g_return_val_if_fail (ap != NULL, TRUE);
-
- return (ap->enc_type);
-}
-
-
-/*
- * Get/set functions for auth_method
- *
- */
-NMDeviceAuthMethod nm_ap_get_auth_method (const NMAccessPoint *ap)
-{
- g_return_val_if_fail (ap != NULL, NM_DEVICE_AUTH_METHOD_UNKNOWN);
-
- return (ap->auth_method);
-}
-
-void nm_ap_set_auth_method (NMAccessPoint *ap, NMDeviceAuthMethod auth_method)
-{
- g_return_if_fail (ap != NULL);
-
- ap->auth_method = auth_method;
-}
-
-
-/*
- * Get/set functions for address
- *
- */
-const struct ether_addr * nm_ap_get_address (const NMAccessPoint *ap)
-{
- g_return_val_if_fail (ap != NULL, NULL);
-
- return (ap->address);
-}
-
-void nm_ap_set_address (NMAccessPoint *ap, const struct ether_addr * addr)
-{
- struct ether_addr *new_addr;
-
- g_return_if_fail (ap != NULL);
-
- new_addr = g_new0 (struct ether_addr, 1);
- g_return_if_fail (new_addr != NULL);
-
- if (ap->address)
- g_free (ap->address);
-
- memcpy (new_addr, addr, sizeof (struct ether_addr));
- ap->address = new_addr;
-}
-
-
-/*
- * Get/set functions for mode (ie Ad-Hoc, Infrastructure, etc)
- *
- */
-NMNetworkMode nm_ap_get_mode (const NMAccessPoint *ap)
-{
- g_return_val_if_fail (ap != NULL, NETWORK_MODE_UNKNOWN);
-
- return (ap->mode);
-}
-
-void nm_ap_set_mode (NMAccessPoint *ap, const NMNetworkMode mode)
-{
- g_return_if_fail (ap != NULL);
-
- ap->mode = mode;
-}
-
-
-/*
- * Get/set functions for strength
- *
- */
-gint8 nm_ap_get_strength (const NMAccessPoint *ap)
-{
- g_return_val_if_fail (ap != NULL, 0);
-
- return (ap->strength);
-}
-
-void nm_ap_set_strength (NMAccessPoint *ap, const gint8 strength)
-{
- g_return_if_fail (ap != NULL);
-
- ap->strength = strength;
-}
-
-
-/*
- * Get/set functions for frequency
- *
- */
-double nm_ap_get_freq (const NMAccessPoint *ap)
-{
- g_return_val_if_fail (ap != NULL, 0);
-
- return (ap->freq);
-}
-
-void nm_ap_set_freq (NMAccessPoint *ap, const double freq)
-{
- g_return_if_fail (ap != NULL);
-
- ap->freq = freq;
-}
-
-
-/*
- * Get/set functions for rate
- *
- */
-guint16 nm_ap_get_rate (const NMAccessPoint *ap)
-{
- g_return_val_if_fail (ap != NULL, 0);
-
- return (ap->rate);
-}
-
-void nm_ap_set_rate (NMAccessPoint *ap, guint16 rate)
-{
- g_return_if_fail (ap != NULL);
-
- ap->rate = rate;
-}
-
-
-/*
- * Get/set functions for "invalid" access points, ie ones
- * for which a user explicitly does not wish to connect to
- * (by cancelling requests for WEP key, for example)
- *
- */
-gboolean nm_ap_get_invalid (const NMAccessPoint *ap)
-{
- g_return_val_if_fail (ap != NULL, TRUE);
-
- return (ap->invalid);
-}
-
-void nm_ap_set_invalid (NMAccessPoint *ap, gboolean invalid)
-{
- g_return_if_fail (ap != NULL);
-
- ap->invalid = invalid;
-}
-
-
-/*
- * Get/set functions for "matched", which is used by
- * the ap list diffing functions to speed up the diff
- *
- */
-gboolean nm_ap_get_matched (const NMAccessPoint *ap)
-{
- g_return_val_if_fail (ap != NULL, TRUE);
-
- return (ap->matched);
-}
-
-void nm_ap_set_matched (NMAccessPoint *ap, gboolean matched)
-{
- g_return_if_fail (ap != NULL);
-
- ap->matched = matched;
-}
-
-
-/*
- * Get/Set functions to indicate that an access point is
- * 'trusted'
- *
- */
-gboolean nm_ap_get_trusted (const NMAccessPoint *ap)
-{
- g_return_val_if_fail (ap != NULL, FALSE);
-
- return (ap->trusted);
-}
-
-void nm_ap_set_trusted (NMAccessPoint *ap, gboolean trusted)
-{
- g_return_if_fail (ap != NULL);
-
- ap->trusted = trusted;
-}
-
-
-/*
- * Get/Set functions to indicate that an access point is
- * 'artificial', ie whether or not it was actually scanned
- * by the card or not
- *
- */
-gboolean nm_ap_get_artificial (const NMAccessPoint *ap)
-{
- g_return_val_if_fail (ap != NULL, FALSE);
-
- return (ap->artificial);
-}
-
-void nm_ap_set_artificial (NMAccessPoint *ap, gboolean artificial)
-{
- g_return_if_fail (ap != NULL);
-
- ap->artificial = artificial;
-}
-
-
-/*
- * Get/Set functions for how long ago the AP was last seen in a scan.
- * APs older than a certain date are dropped from the list.
- *
- */
-const GTimeVal *nm_ap_get_last_seen (const NMAccessPoint *ap)
-{
- g_return_val_if_fail (ap != NULL, FALSE);
-
- return (&ap->last_seen);
-}
-
-void nm_ap_set_last_seen (NMAccessPoint *ap, const GTimeVal *last_seen)
-{
- g_return_if_fail (ap != NULL);
-
- ap->last_seen = *last_seen;
-}
-
-
-/*
- * Get/Set functions to indicate that an access point is
- * user-created, ie whether or not its a network filled with
- * information from the user and intended to create a new Ad-Hoc
- * wireless network.
- *
- */
-gboolean nm_ap_get_user_created (const NMAccessPoint *ap)
-{
- g_return_val_if_fail (ap != NULL, FALSE);
-
- return (ap->user_created);
-}
-
-void nm_ap_set_user_created (NMAccessPoint *ap, gboolean user_created)
-{
- g_return_if_fail (ap != NULL);
-
- ap->user_created = user_created;
-}
-
-
-/*
- * Get/Set functions for user address list
- *
- * The internal address list is always "owned" by the AP and
- * the list returned by nm_ap_get_user_addresses() is a deep copy.
- * Likewise, when setting the list, a deep copy is made for the
- * ap's actual list.
- *
- */
-GSList *nm_ap_get_user_addresses (const NMAccessPoint *ap)
-{
- GSList *new = NULL;
- GSList *elt = NULL;
-
- g_return_val_if_fail (ap != NULL, NULL);
-
- for (elt = ap->user_addresses; elt; elt = g_slist_next (elt))
- {
- if (elt->data)
- new = g_slist_append (new, g_strdup (elt->data));
- }
-
- /* Return a _deep__copy_ of the address list */
- return (new);
-}
-
-void nm_ap_set_user_addresses (NMAccessPoint *ap, GSList *list)
-{
- GSList *elt = NULL;
- GSList *new = NULL;
-
- g_return_if_fail (ap != NULL);
-
- /* Free existing list */
- for (elt = ap->user_addresses; elt; elt = g_slist_next (elt))
- {
- if (elt->data)
- g_free (elt->data);
- }
-
- /* Copy new list and set as our own */
- for (elt = list; elt; elt = g_slist_next (elt))
- {
- if (elt->data)
- new = g_slist_append (new, g_strdup (elt->data));
- }
-
- ap->user_addresses = new;
-}
-
-
-gboolean nm_ap_is_enc_key_valid (NMAccessPoint *ap)
-{
- const char *key;
- NMEncKeyType key_type;
-
- g_return_val_if_fail (ap != NULL, FALSE);
-
- key = nm_ap_get_enc_key_source (ap);
- key_type = nm_ap_get_enc_type (ap);
-
- if (nm_is_enc_key_valid (key, key_type))
- return TRUE;
-
- return FALSE;
-}
-
-gboolean nm_is_enc_key_valid (const char *key, NMEncKeyType key_type)
-{
- if ( key
- && strlen (key)
- && (key_type != NM_ENC_TYPE_UNKNOWN)
- && (key_type != NM_ENC_TYPE_NONE))
- return TRUE;
-
- return FALSE;
-}
diff --git a/src/NetworkManagerAP.h b/src/NetworkManagerAP.h
deleted file mode 100644
index 1e95d4e5e9..0000000000
--- a/src/NetworkManagerAP.h
+++ /dev/null
@@ -1,94 +0,0 @@
-/* NetworkManager -- Network link manager
- *
- * Dan Williams <dcbw@redhat.com>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- *
- * (C) Copyright 2004 Red Hat, Inc.
- */
-
-#ifndef NETWORK_MANAGER_AP_H
-#define NETWORK_MANAGER_AP_H
-
-#include <glib.h>
-#include <time.h>
-#include "NetworkManager.h"
-
-typedef struct NMAccessPoint NMAccessPoint;
-
-NMAccessPoint * nm_ap_new (void);
-NMAccessPoint * nm_ap_new_from_ap (NMAccessPoint *ap);
-
-void nm_ap_unref (NMAccessPoint *ap);
-void nm_ap_ref (NMAccessPoint *ap);
-
-const GTimeVal * nm_ap_get_timestamp (const NMAccessPoint *ap);
-void nm_ap_set_timestamp (NMAccessPoint *ap, const GTimeVal *timestamp);
-
-char * nm_ap_get_essid (const NMAccessPoint *ap);
-void nm_ap_set_essid (NMAccessPoint *ap, const char *essid);
-
-const char * nm_ap_get_enc_key_source (const NMAccessPoint *ap);
-char * nm_ap_get_enc_key_hashed (const NMAccessPoint *ap);
-void nm_ap_set_enc_key_source (NMAccessPoint *ap, const char *key, NMEncKeyType type);
-NMEncKeyType nm_ap_get_enc_type (const NMAccessPoint *ap);
-
-NMDeviceAuthMethod nm_ap_get_auth_method (const NMAccessPoint *ap);
-void nm_ap_set_auth_method (NMAccessPoint *ap, const NMDeviceAuthMethod auth_method);
-
-gboolean nm_ap_get_encrypted (const NMAccessPoint *ap);
-void nm_ap_set_encrypted (NMAccessPoint *ap, gboolean encrypted);
-
-const struct ether_addr * nm_ap_get_address (const NMAccessPoint *ap);
-void nm_ap_set_address (NMAccessPoint *ap, const struct ether_addr *addr);
-
-NMNetworkMode nm_ap_get_mode (const NMAccessPoint *ap);
-void nm_ap_set_mode (NMAccessPoint *ap, const NMNetworkMode mode);
-
-gint8 nm_ap_get_strength (const NMAccessPoint *ap);
-void nm_ap_set_strength (NMAccessPoint *ap, gint8 strength);
-
-double nm_ap_get_freq (const NMAccessPoint *ap);
-void nm_ap_set_freq (NMAccessPoint *ap, double freq);
-
-guint16 nm_ap_get_rate (const NMAccessPoint *ap);
-void nm_ap_set_rate (NMAccessPoint *ap, guint16 rate);
-
-gboolean nm_ap_get_invalid (const NMAccessPoint *ap);
-void nm_ap_set_invalid (NMAccessPoint *ap, gboolean invalid);
-
-gboolean nm_ap_get_matched (const NMAccessPoint *ap);
-void nm_ap_set_matched (NMAccessPoint *ap, gboolean matched);
-
-gboolean nm_ap_get_trusted (const NMAccessPoint *ap);
-void nm_ap_set_trusted (NMAccessPoint *ap, gboolean trusted);
-
-gboolean nm_ap_get_artificial (const NMAccessPoint *ap);
-void nm_ap_set_artificial (NMAccessPoint *ap, gboolean artificial);
-
-const GTimeVal * nm_ap_get_last_seen (const NMAccessPoint *ap);
-void nm_ap_set_last_seen (NMAccessPoint *ap, const GTimeVal *last_seen);
-
-gboolean nm_ap_get_user_created (const NMAccessPoint *ap);
-void nm_ap_set_user_created (NMAccessPoint *ap, gboolean user_created);
-
-GSList * nm_ap_get_user_addresses (const NMAccessPoint *ap);
-void nm_ap_set_user_addresses (NMAccessPoint *ap, GSList *list);
-
-/* Helper */
-gboolean nm_ap_is_enc_key_valid (NMAccessPoint *ap);
-gboolean nm_is_enc_key_valid (const char *key, NMEncKeyType key_type);
-
-#endif
diff --git a/src/NetworkManagerAPList.c b/src/NetworkManagerAPList.c
deleted file mode 100644
index f49f2d54fe..0000000000
--- a/src/NetworkManagerAPList.c
+++ /dev/null
@@ -1,803 +0,0 @@
-/* NetworkManager -- Network link manager
- *
- * Dan Williams <dcbw@redhat.com>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- *
- * (C) Copyright 2004 Red Hat, Inc.
- */
-
-#include <glib.h>
-#include <dbus/dbus-glib.h>
-#include <netinet/ether.h>
-#include "NetworkManagerAP.h"
-#include "NetworkManagerAPList.h"
-#include "NetworkManagerUtils.h"
-#include "NetworkManagerDbus.h"
-#include "nm-utils.h"
-
-
-struct NMAccessPointList
-{
- guint refcount;
- NMNetworkType type;
- GSList *ap_list;
- GMutex *mutex;
-};
-
-
-/*
- * nm_ap_list_new
- *
- * Creates a new empty access point list
- *
- */
-NMAccessPointList *nm_ap_list_new (NMNetworkType type)
-{
- NMAccessPointList *list = g_new0 (NMAccessPointList, 1);
-
- g_return_val_if_fail (list != NULL, NULL);
-
- nm_ap_list_ref (list);
- list->type = type;
- list->mutex = g_mutex_new ();
- if (!list->mutex)
- {
- g_free (list);
- nm_warning ("nm_ap_list_new() could not create list mutex");
- return (NULL);
- }
- nm_register_mutex_desc (list->mutex, "AP List Mutex");
-
- return (list);
-}
-
-
-/*
- * nm_ap_list_ref
- *
- * Increases the refcount of the ap list
- *
- */
-void nm_ap_list_ref (NMAccessPointList *list)
-{
- g_return_if_fail (list != NULL);
-
- list->refcount++;
-}
-
-
-/*
- * nm_ap_list_element_free
- *
- * Frees each member of an access point list before the list is
- * disposed of.
- *
- */
-static void nm_ap_list_element_free (void *element, void *user_data)
-{
- nm_ap_unref (element);
-}
-
-
-/*
- * nm_ap_list_unref
- *
- * Decreases the refcount of the ap list, and if it reaches
- * 0 frees the structure.
- *
- */
-void nm_ap_list_unref (NMAccessPointList *list)
-{
- if (!list)
- return;
-
- list->refcount--;
- if (list->refcount <= 0)
- {
- gboolean acquired = nm_try_acquire_mutex (list->mutex, __FUNCTION__);
-
- g_slist_foreach (list->ap_list, nm_ap_list_element_free, NULL);
- g_slist_free (list->ap_list);
-
- if (acquired)
- nm_unlock_mutex (list->mutex, __FUNCTION__);
-
- g_mutex_free (list->mutex);
- g_free(list);
- }
-}
-
-
-/*
- * nm_ap_list_size
- *
- * Return size of the access point list
- *
- */
-guint nm_ap_list_size (NMAccessPointList *list)
-{
- guint size;
-
- g_return_val_if_fail (list != NULL, 0);
-
- if (!nm_ap_list_lock (list))
- {
- nm_warning ("nm_ap_list_size() could not acquire AP list mutex." );
- return 0;
- }
-
- size = g_slist_length (list->ap_list);
- nm_ap_list_unlock (list);
-
- return size;
-}
-
-
-/*
- * nm_ap_list_is_empty
- *
- * Returns whether or not the access point list has any access points
- * in it.
- *
- */
-gboolean nm_ap_list_is_empty (NMAccessPointList *list)
-{
- return ((list->ap_list == NULL));
-}
-
-
-/*
- * nm_ap_list_append_ap
- *
- * Helper to append an AP to an ap list of a certain type.
- *
- */
-void nm_ap_list_append_ap (NMAccessPointList *list, NMAccessPoint *ap)
-{
- g_return_if_fail (list != NULL);
- g_return_if_fail (ap != NULL);
-
- if (!nm_ap_list_lock (list))
- {
- nm_warning ("nm_ap_list_append_ap() could not acquire AP list mutex." );
- return;
- }
-
- nm_ap_ref (ap);
- list->ap_list = g_slist_append (list->ap_list, ap);
-
- nm_ap_list_unlock (list);
-}
-
-
-/*
- * nm_ap_list_remove_ap
- *
- * Helper to remove an AP to an ap list of a certain type.
- *
- */
-void nm_ap_list_remove_ap (NMAccessPointList *list, NMAccessPoint *ap)
-{
- GSList *elt = NULL;
-
- g_return_if_fail (list != NULL);
- g_return_if_fail (ap != NULL);
-
- if (!nm_ap_list_lock (list))
- {
- nm_warning ("nm_ap_list_remove_ap() could not acquire AP list mutex." );
- return;
- }
-
- for (elt = list->ap_list; elt; elt = g_slist_next (elt))
- {
- NMAccessPoint *list_ap = (NMAccessPoint *)(elt->data);
-
- if (list_ap == ap)
- {
- list->ap_list = g_slist_remove_link (list->ap_list, elt);
- nm_ap_unref (list_ap);
- g_slist_free (elt);
- break;
- }
- }
- nm_ap_list_unlock (list);
-}
-
-
-/*
- * nm_ap_list_remove_ap_by_essid
- *
- * Helper to remove an AP from an AP list by the AP's ESSID.
- *
- */
-void nm_ap_list_remove_ap_by_essid (NMAccessPointList *list, const char *network)
-{
- GSList *elt = NULL;
-
- g_return_if_fail (list != NULL);
- g_return_if_fail (network != NULL);
-
- if (!nm_ap_list_lock (list))
- {
- nm_warning ("nm_ap_list_remove_ap_by_essid() could not acquire AP list mutex." );
- return;
- }
-
- for (elt = list->ap_list; elt; elt = g_slist_next (elt))
- {
- NMAccessPoint *list_ap = (NMAccessPoint *)(elt->data);
-
- if (nm_null_safe_strcmp (nm_ap_get_essid (list_ap), network) == 0)
- {
- list->ap_list = g_slist_remove_link (list->ap_list, elt);
- nm_ap_unref (list_ap);
- g_slist_free (elt);
- break;
- }
- }
- nm_ap_list_unlock (list);
-}
-
-/* nm_ap_list_remove_duplicate_essids
- *
- */
-void nm_ap_list_remove_duplicate_essids (NMAccessPointList *list)
-{
- NMAccessPoint *removal_ap;
- NMAccessPoint *list_ap_max;
- GSList *elt_i = NULL;
- GSList *elt_j = NULL;
- GSList *elt_max = NULL;
- GSList *removal_list = NULL;
- GSList *elt;
- gint8 max_strength = 0;
- gint8 strengthj = 0;
-
- g_return_if_fail (list != NULL);
-
- if (!nm_ap_list_lock (list))
- {
- nm_warning ("nm_ap_list_append_ap() could not acquire AP list mutex." );
- return;
- }
-
- for (elt_i = list->ap_list; elt_i; elt_i = g_slist_next (elt_i))
- {
- NMAccessPoint *list_ap_i = (NMAccessPoint *)(elt_i->data);
- gboolean found = FALSE;
-
- for (elt_j = list->ap_list; elt_j < elt_i; elt_j = g_slist_next (elt_j))
- {
- NMAccessPoint *list_ap_j = (NMAccessPoint *)(elt_j->data);
-
- if ((found = (nm_null_safe_strcmp (nm_ap_get_essid (list_ap_i), nm_ap_get_essid (list_ap_j)) == 0)))
- break;
- }
-
- if (found)
- continue;
-
- elt_max = elt_i;
- list_ap_max = (NMAccessPoint *)(elt_i->data);
- max_strength = nm_ap_get_strength (list_ap_i);
-
- for (elt_j = g_slist_next (elt_i); elt_j; elt_j = g_slist_next (elt_j))
- {
- NMAccessPoint *list_ap_j = (NMAccessPoint *)(elt_j->data);
-
- strengthj = nm_ap_get_strength (list_ap_j);
- if (nm_null_safe_strcmp (nm_ap_get_essid (list_ap_i), nm_ap_get_essid (list_ap_j)) == 0)
- {
- if (strengthj > max_strength)
- {
- removal_list = g_slist_append (removal_list, list_ap_max);
- list_ap_max = list_ap_j;
- max_strength = strengthj;
- }
- else
- removal_list = g_slist_append (removal_list, list_ap_j);
- }
- }
- }
- nm_ap_list_unlock (list);
-
- for (elt = removal_list; elt; elt = g_slist_next (elt))
- {
- if ((removal_ap = (NMAccessPoint *)(elt->data)))
- nm_ap_list_remove_ap (list, removal_ap);
- }
- g_slist_free (removal_list);
-
-}
-
-
-/*
- * nm_ap_list_get_ap_by_essid
- *
- * Search through an access point list and return the access point
- * that has a given essid.
- *
- */
-NMAccessPoint *nm_ap_list_get_ap_by_essid (NMAccessPointList *list, const char *network)
-{
- NMAccessPoint *ap;
- NMAccessPoint *found_ap = NULL;
- NMAPListIter *iter;
-
- if (!network)
- return (NULL);
-
- if (!list)
- return (NULL);
-
- if (!(iter = nm_ap_list_iter_new (list)))
- return (NULL);
-
- while ((ap = nm_ap_list_iter_next (iter)))
- {
- if (nm_ap_get_essid (ap) && (nm_null_safe_strcmp (nm_ap_get_essid (ap), network) == 0))
- {
- found_ap = ap;
- break;
- }
- }
- nm_ap_list_iter_free (iter);
-
- return (found_ap);
-}
-
-
-/*
- * nm_ap_list_get_ap_by_address
- *
- * Search through an access point list and return the access point
- * that has a given AP address.
- *
- */
-NMAccessPoint *nm_ap_list_get_ap_by_address (NMAccessPointList *list, const struct ether_addr *addr)
-{
- NMAccessPoint *ap;
- NMAccessPoint *found_ap = NULL;
- NMAPListIter *iter;
-
- if (!addr)
- return (NULL);
-
- if (!list)
- return (NULL);
-
- if (!(iter = nm_ap_list_iter_new (list)))
- return (NULL);
-
- while ((ap = nm_ap_list_iter_next (iter)))
- {
- GSList *user_addrs;
- gboolean success = FALSE;
-
- if (nm_ap_get_address (ap) && (memcmp (addr, nm_ap_get_address (ap), sizeof (struct ether_addr)) == 0))
- success = TRUE;
-
- if (!success && (user_addrs = nm_ap_get_user_addresses (ap)))
- {
- char char_addr[20];
- GSList *elt;
-
- memset (&char_addr[0], 0, 20);
- ether_ntoa_r (addr, &char_addr[0]);
- for (elt = user_addrs; elt; elt = g_slist_next (elt))
- {
- if (elt->data && !strcmp (elt->data, &char_addr[0]))
- {
- success = TRUE;
- break;
- }
- }
-
- g_slist_foreach (user_addrs, (GFunc)g_free, NULL);
- g_slist_free (user_addrs);
- }
-
- if (success)
- {
- found_ap = ap;
- break;
- }
- }
- nm_ap_list_iter_free (iter);
-
- return (found_ap);
-}
-
-
-/*
- * nm_ap_list_merge_scanned_ap
- *
- * Given an AP list and an access point, merge the access point into the list.
- * If the AP is already in the list, merge just the /attributes/ together for that
- * AP, if its not already in the list then just add it. This doesn't merge all
- * attributes, just ones that are likely to be new from the scan.
- *
- * Returns: FALSE if the AP was not new and was merged
- * TRUE if the ap was completely new
- *
- */
-gboolean nm_ap_list_merge_scanned_ap (NMAccessPointList *list, NMAccessPoint *merge_ap,
- gboolean *new, gboolean *strength_changed)
-{
- NMAccessPoint *list_ap_addr, *list_ap_essid;
- gboolean success = FALSE;
-
- g_return_val_if_fail (list != NULL, FALSE);
- g_return_val_if_fail (merge_ap != NULL, FALSE);
- g_return_val_if_fail (new != NULL, FALSE);
- g_return_val_if_fail (strength_changed != NULL, FALSE);
-
- if ((list_ap_addr = nm_ap_list_get_ap_by_address (list, nm_ap_get_address (merge_ap))))
- {
-
- /* First, we check for an address match. If the merge AP has the
- * same address as a list AP, the merge AP and the list AP
- * must be the same physical AP. The list AP properties must be from
- * a previous scan so the time_last_seen's are not equal.
- * Update encryption, authentication method,
- * strength, and the time_last_seen. */
-
- const GTimeVal *merge_ap_seen = nm_ap_get_last_seen (merge_ap);
- const GTimeVal *list_ap_addr_seen = nm_ap_get_last_seen (list_ap_addr);
-
- nm_ap_set_encrypted (list_ap_addr, nm_ap_get_encrypted (merge_ap));
- nm_ap_set_auth_method (list_ap_addr, nm_ap_get_auth_method (merge_ap));
- if (nm_ap_get_strength (merge_ap) != nm_ap_get_strength (list_ap_addr))
- {
- nm_ap_set_strength (list_ap_addr, nm_ap_get_strength (merge_ap));
- *strength_changed = TRUE;
- }
- nm_ap_set_last_seen (list_ap_addr, merge_ap_seen);
- }
- else if ((list_ap_essid = nm_ap_list_get_ap_by_essid (list, nm_ap_get_essid (merge_ap))))
- {
-
- /* Second, we check for an ESSID match. In this case,
- * a list AP has the same non-NULL ESSID as the merge AP. Update the
- * encryption and authentication method. Update the strength and address
- * except when the time_last_seen of the list AP is the same as the
- * time_last_seen of the merge AP and the strength of the list AP is greater
- * than or equal to the strength of the merge AP. If the time_last_seen's are
- * equal, the merge AP and the list AP come from the same scan.
- * Update the time_last_seen. */
-
- const GTimeVal *merge_ap_seen = nm_ap_get_last_seen (merge_ap);
- const GTimeVal *list_ap_essid_seen = nm_ap_get_last_seen (list_ap_essid);
-
- nm_ap_set_encrypted (list_ap_essid, nm_ap_get_encrypted (merge_ap));
- nm_ap_set_auth_method (list_ap_essid, nm_ap_get_auth_method (merge_ap));
-
- if (!((list_ap_essid_seen->tv_sec == merge_ap_seen->tv_sec)
- && (nm_ap_get_strength (list_ap_essid) >= nm_ap_get_strength (merge_ap))))
- {
- nm_ap_set_strength (list_ap_essid, nm_ap_get_strength (merge_ap));
- nm_ap_set_address (list_ap_essid, nm_ap_get_address (merge_ap));
- *strength_changed = TRUE;
- }
- nm_ap_set_last_seen (list_ap_essid, merge_ap_seen);
- }
- else
- {
- /* Add the merge AP to the list. */
- nm_ap_list_append_ap (list, merge_ap);
- *new = TRUE;
- }
- return TRUE;
-}
-
-
-/*
- * nm_ap_list_copy_properties
- *
- * Update properties (like encryption keys or timestamps) in one access point list from
- * access points in another list, if the APs in the first list are present
- * in the second.
- *
- */
-void nm_ap_list_copy_properties (NMAccessPointList *dest, NMAccessPointList *source)
-{
- NMAPListIter *iter;
- NMAccessPoint *dest_ap;
-
- if (!dest || !source)
- return;
-
- if ((iter = nm_ap_list_iter_new (dest)))
- {
- while ((dest_ap = nm_ap_list_iter_next (iter)))
- {
- NMAccessPoint *src_ap = NULL;
-
- if ((src_ap = nm_ap_list_get_ap_by_essid (source, nm_ap_get_essid (dest_ap))))
- {
- nm_ap_set_invalid (dest_ap, nm_ap_get_invalid (src_ap));
- nm_ap_set_enc_key_source (dest_ap, nm_ap_get_enc_key_source (src_ap), nm_ap_get_enc_type (src_ap));
- if (nm_ap_get_auth_method (src_ap) != NM_DEVICE_AUTH_METHOD_UNKNOWN)
- {
- /* Ensure that we don't set the NONE auth method from the src_ap
- * if the dest_ap has encryption enabled.
- */
- if (nm_ap_get_encrypted (dest_ap) && (nm_ap_get_auth_method (src_ap) != NM_DEVICE_AUTH_METHOD_NONE))
- nm_ap_set_auth_method (dest_ap, nm_ap_get_auth_method (src_ap));
- else if (!nm_ap_get_encrypted (dest_ap))
- nm_ap_set_auth_method (dest_ap, NM_DEVICE_AUTH_METHOD_NONE);
- }
- nm_ap_set_timestamp (dest_ap, nm_ap_get_timestamp (src_ap));
- }
- }
- nm_ap_list_iter_free (iter);
- }
-}
-
-
-/*
- * nm_ap_list_copy_one_essid_by_address
- *
- * If the access point doesn't have an ESSID, search through a list of access points
- * and find one (if any) that has the MAC address of the access point we're looking for.
- * If one is found, copy the essid over to the original access point.
- *
- */
-void nm_ap_list_copy_one_essid_by_address (NMAccessPoint *ap, NMAccessPointList *search_list)
-{
- NMAccessPoint *found_ap;
-
- if (!ap || !search_list)
- return;
-
- if (!nm_ap_get_essid (ap) && (found_ap = nm_ap_list_get_ap_by_address (search_list, nm_ap_get_address (ap))))
- {
- if (nm_ap_get_essid (found_ap))
- nm_ap_set_essid (ap, nm_ap_get_essid (found_ap));
- }
-}
-
-
-/*
- * nm_ap_list_copy_essids_by_address
- *
- * For each blank-essid access point in the destination list, try to find
- * an access point in the source list that has the same MAC address, and if
- * its found, copy the source access point's essid to the dest access point.
- *
- */
-void nm_ap_list_copy_essids_by_address (NMAccessPointList *dest, NMAccessPointList *source)
-{
- NMAPListIter *iter;
- NMAccessPoint *dest_ap;
-
- if (!dest || !source)
- return;
-
- if ((iter = nm_ap_list_iter_new (dest)))
- {
- while ((dest_ap = nm_ap_list_iter_next (iter)))
- nm_ap_list_copy_one_essid_by_address (dest_ap, source);
-
- nm_ap_list_iter_free (iter);
- }
-}
-
-
-/*
- * nm_ap_list_diff
- *
- * Takes two ap lists and determines the differences. For each ap that is present
- * in the original list, but not in the new list, a WirelessNetworkDisappeared signal is emitted
- * over DBus. For each ap in the new list but not in the original, a WirelessNetworkAppeared
- * signal is emitted. For each ap that is the same between the lists, the "invalid" flag is copied
- * over from the old ap to the new ap to preserve "invalid" ap status (ie, user cancelled entering
- * a WEP key so we cannot connect to it anyway, so why try).
- *
- * NOTE: it is assumed that this function is called only ONCE for each list passed into it,
- * since the "matched" value on access points in the list are never cleared after the
- * ap is initially created. Therefore, calling this function twice for any given ap list
- * may result in undesired behavior.
- *
- */
-void nm_ap_list_diff (NMData *data, NMDevice *dev, NMAccessPointList *old, NMAccessPointList *new)
-{
- NMAPListIter *iter;
- NMAccessPoint *old_ap;
- NMAccessPoint *new_ap;
-
- g_return_if_fail (data != NULL);
- g_return_if_fail (dev != NULL);
-
- /* Iterate over each item in the old list and find it in the new list */
- if (old && (iter = nm_ap_list_iter_new (old)))
- {
- while ((old_ap = nm_ap_list_iter_next (iter)))
- {
- NMAccessPoint *new_ap = NULL;
-
- if (nm_ap_get_essid (old_ap))
- {
- if ((new_ap = nm_ap_list_get_ap_by_essid (new, nm_ap_get_essid (old_ap))))
- {
- nm_ap_set_matched (old_ap, TRUE);
- nm_ap_set_matched (new_ap, TRUE);
- }
- else
- nm_dbus_signal_wireless_network_change (data->dbus_connection, dev, old_ap, NETWORK_STATUS_DISAPPEARED, -1);
- }
- }
- nm_ap_list_iter_free (iter);
- }
-
- /* Iterate over the new list and compare to the old list. Items that aren't already
- * matched are by definition new networks.
- */
- if (new && (iter = nm_ap_list_iter_new (new)))
- {
- while ((new_ap = nm_ap_list_iter_next (iter)))
- {
- if (!nm_ap_get_matched (new_ap) && nm_ap_get_essid (new_ap))
- nm_dbus_signal_wireless_network_change (data->dbus_connection, dev, new_ap, NETWORK_STATUS_APPEARED, -1);
- }
- nm_ap_list_iter_free (iter);
- }
-}
-
-
-/*
- * nm_ap_list_get_type
- *
- * Return the type of an AP list
- *
- */
-NMNetworkType nm_ap_list_get_type (NMAccessPointList *list)
-{
- g_return_val_if_fail (list != NULL, NETWORK_TYPE_UNKNOWN);
-
- return (list->type);
-}
-
-
-/*
- * nm_ap_list_lock
- *
- * Grab exclusive access to an access point list
- *
- */
-gboolean nm_ap_list_lock (NMAccessPointList *list)
-{
- g_return_val_if_fail (list != NULL, FALSE);
-
- return (nm_try_acquire_mutex (list->mutex, __FUNCTION__));
-}
-
-
-/*
- * nm_ap_list_unlock
- *
- * Give up access to an access point list
- *
- */
-void nm_ap_list_unlock (NMAccessPointList *list)
-{
- g_return_if_fail (list != NULL);
-
- nm_unlock_mutex (list->mutex, __FUNCTION__);
-}
-
-
-
-struct NMAPListIter
-{
- NMAccessPointList *list;
- GSList *cur_pos;
- gboolean valid;
-};
-
-
-NMAPListIter * nm_ap_list_iter_new (NMAccessPointList *list)
-{
- NMAPListIter *iter;
-
- g_return_val_if_fail (list != NULL, NULL);
-
- if (!(iter = g_new0 (NMAPListIter, 1)))
- return (NULL);
-
- if (!nm_ap_list_lock (list))
- {
- g_free (iter);
- return (NULL);
- }
-
- iter->list = list;
- iter->cur_pos = list->ap_list;
- iter->valid = FALSE;
-
- return (iter);
-}
-
-
-NMAccessPoint * nm_ap_list_iter_get_ap (NMAPListIter *iter)
-{
- g_return_val_if_fail (iter != NULL, NULL);
- g_return_val_if_fail (iter->valid, NULL);
-
- if (!iter->cur_pos)
- return (NULL);
-
- return ((NMAccessPoint *)(iter->cur_pos->data));
-}
-
-
-NMAccessPoint * nm_ap_list_iter_next (NMAPListIter *iter)
-{
- g_return_val_if_fail (iter != NULL, NULL);
-
- if (iter->valid)
- iter->cur_pos = g_slist_next (iter->cur_pos);
- else
- {
- iter->valid = TRUE;
- iter->cur_pos = iter->list->ap_list;
- }
- return (nm_ap_list_iter_get_ap (iter));
-}
-
-
-void nm_ap_list_iter_free (NMAPListIter *iter)
-{
- g_return_if_fail (iter != NULL);
-
- nm_ap_list_unlock (iter->list);
- memset (iter, 0, sizeof (struct NMAPListIter));
- g_free (iter);
-}
-
-
-/*
- * nm_ap_list_print_members
- *
- * Print the information about each access point in an AP list
- *
- */
-void nm_ap_list_print_members (NMAccessPointList *list, const char *name)
-{
- NMAccessPoint *ap;
- NMAPListIter *iter;
- int i = 0;
-
- g_return_if_fail (list != NULL);
- g_return_if_fail (name != NULL);
-
- if (!(iter = nm_ap_list_iter_new (list)))
- return;
-
- nm_warning ("AP_LIST_PRINT: printing members of '%s'", name);
- while ((ap = nm_ap_list_iter_next (iter)))
- {
- const GTimeVal *timestamp = nm_ap_get_timestamp (ap);
- nm_warning ("\t%d)\tobj=%p, essid='%s', timestamp=%ld, key='%s', enc=%d, addr=%p, strength=%d, %s=%f, rate=%d, inval=%d, mode=%d",
- i, ap, nm_ap_get_essid (ap), timestamp->tv_sec, nm_ap_get_enc_key_source (ap), nm_ap_get_encrypted (ap),
- nm_ap_get_address (ap), nm_ap_get_strength (ap), (nm_ap_get_freq (ap) < 20) ? "channel" : "freq", nm_ap_get_freq (ap), nm_ap_get_rate (ap),
- nm_ap_get_invalid (ap), nm_ap_get_mode (ap));
- i++;
- }
- nm_warning ("AP_LIST_PRINT: done");
- nm_ap_list_iter_free (iter);
-}
diff --git a/src/NetworkManagerAPList.h b/src/NetworkManagerAPList.h
deleted file mode 100644
index 301160674c..0000000000
--- a/src/NetworkManagerAPList.h
+++ /dev/null
@@ -1,67 +0,0 @@
-/* NetworkManager -- Network link manager
- *
- * Dan Williams <dcbw@redhat.com>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- *
- * (C) Copyright 2004 Red Hat, Inc.
- */
-
-#ifndef NETWORK_MANAGER_AP_LIST_H
-#define NETWORK_MANAGER_AP_LIST_H
-
-#include <glib.h>
-#include "NetworkManager.h"
-#include "NetworkManagerDevice.h"
-
-
-typedef struct NMAccessPointList NMAccessPointList;
-typedef struct NMAPListIter NMAPListIter;
-
-NMAccessPointList * nm_ap_list_new (NMNetworkType type);
-void nm_ap_list_ref (NMAccessPointList *list);
-void nm_ap_list_unref (NMAccessPointList *list);
-
-guint nm_ap_list_size (NMAccessPointList *list);
-gboolean nm_ap_list_is_empty (NMAccessPointList *list);
-
-void nm_ap_list_append_ap (NMAccessPointList *list, NMAccessPoint *ap);
-void nm_ap_list_remove_ap (NMAccessPointList *list, NMAccessPoint *ap);
-void nm_ap_list_remove_ap_by_essid (NMAccessPointList *list, const char *network);
-void nm_ap_list_remove_duplicate_essids (NMAccessPointList *list);
-
-NMAccessPoint * nm_ap_list_get_ap_by_essid (NMAccessPointList *list, const char *network);
-NMAccessPoint * nm_ap_list_get_ap_by_address (NMAccessPointList *list, const struct ether_addr *addr);
-
-void nm_ap_list_copy_properties (NMAccessPointList *dest, NMAccessPointList *source);
-void nm_ap_list_copy_essids_by_address (NMAccessPointList *dest, NMAccessPointList *source);
-void nm_ap_list_copy_one_essid_by_address (NMAccessPoint *ap, NMAccessPointList *search_list);
-
-void nm_ap_list_diff (NMData *data, NMDevice *dev, NMAccessPointList *old, NMAccessPointList *new);
-gboolean nm_ap_list_merge_scanned_ap (NMAccessPointList *list, NMAccessPoint *merge_ap, gboolean *new, gboolean *strength_changed);
-
-NMNetworkType nm_ap_list_get_type (NMAccessPointList *list);
-
-gboolean nm_ap_list_lock (NMAccessPointList *list);
-void nm_ap_list_unlock (NMAccessPointList *list);
-
-NMAPListIter * nm_ap_list_iter_new (NMAccessPointList *list);
-NMAccessPoint * nm_ap_list_iter_get_ap (NMAPListIter *iter);
-NMAccessPoint * nm_ap_list_iter_next (NMAPListIter *iter);
-void nm_ap_list_iter_free (NMAPListIter *iter);
-
-void nm_ap_list_print_members (NMAccessPointList *list, const char *name);
-
-#endif
diff --git a/src/NetworkManagerDbus.c b/src/NetworkManagerDbus.c
deleted file mode 100644
index 27c3e3f827..0000000000
--- a/src/NetworkManagerDbus.c
+++ /dev/null
@@ -1,1404 +0,0 @@
-/* NetworkManager -- Network link manager
- *
- * Dan Williams <dcbw@redhat.com>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- *
- * (C) Copyright 2004 Red Hat, Inc.
- */
-
-#include <glib.h>
-#include <dbus/dbus.h>
-#include <dbus/dbus-glib-lowlevel.h>
-#include <dbus/dbus-glib.h>
-#include <stdarg.h>
-#include <signal.h>
-#include <iwlib.h>
-#include <netinet/ether.h>
-
-#include "NetworkManager.h"
-#include "NetworkManagerUtils.h"
-#include "NetworkManagerDevice.h"
-#include "NetworkManagerDbus.h"
-#include "NetworkManagerDbusUtils.h"
-#include "NetworkManagerAP.h"
-#include "NetworkManagerAPList.h"
-#include "NetworkManagerPolicy.h"
-#include "nm-dbus-nm.h"
-#include "nm-dbus-device.h"
-#include "nm-dbus-net.h"
-#include "nm-dbus-vpn.h"
-#include "nm-utils.h"
-#include "nm-dhcp-manager.h"
-
-static char *get_nmi_match_string (const char *owner);
-
-/*
- * nm_dbus_create_error_message
- *
- * Make a DBus error message
- *
- */
-DBusMessage *nm_dbus_create_error_message (DBusMessage *message, const char *exception_namespace,
- const char *exception, const char *format, ...)
-{
- char *exception_text;
- DBusMessage *reply_message;
- va_list args;
- char error_text[512];
-
- va_start (args, format);
- vsnprintf (error_text, 512, format, args);
- va_end (args);
-
- exception_text = g_strdup_printf ("%s.%s", exception_namespace, exception);
- reply_message = dbus_message_new_error (message, exception_text, error_text);
- g_free (exception_text);
-
- return (reply_message);
-}
-
-
-/*
- * nm_dbus_get_object_path_for_device
- *
- * Copies the object path for a device object. Caller must free returned string.
- *
- */
-char * nm_dbus_get_object_path_for_device (NMDevice *dev)
-{
- char *object_path, *escaped_object_path;
-
- g_return_val_if_fail (dev != NULL, NULL);
-
- object_path = g_strdup_printf ("%s/%s", NM_DBUS_PATH_DEVICES, nm_device_get_iface (dev));
- escaped_object_path = nm_dbus_escape_object_path (object_path);
- g_free (object_path);
-
- return escaped_object_path;
-}
-
-
-/*
- * nm_dbus_get_object_path_for_network
- *
- * Copies the object path for a network object. Caller must free returned string.
- *
- */
-char * nm_dbus_get_object_path_for_network (NMDevice *dev, NMAccessPoint *ap)
-{
- char *object_path, *escaped_object_path;
-
- g_return_val_if_fail (dev != NULL, NULL);
- g_return_val_if_fail (ap != NULL, NULL);
-
- if (!nm_ap_get_essid (ap))
- return NULL;
-
- object_path = g_strdup_printf ("%s/%s/Networks/%s", NM_DBUS_PATH_DEVICES, nm_device_get_iface (dev), nm_ap_get_essid (ap));
- escaped_object_path = nm_dbus_escape_object_path (object_path);
- g_free (object_path);
-
- return escaped_object_path;
-}
-
-
-/*
- * nm_dbus_get_device_from_object_path
- *
- * Returns the device associated with a dbus object path
- *
- */
-NMDevice *nm_dbus_get_device_from_object_path (NMData *data, const char *path)
-{
- NMDevice *dev = NULL;
-
- g_return_val_if_fail (path != NULL, NULL);
- g_return_val_if_fail (data != NULL, NULL);
-
- /* FIXME
- * This function could be much more efficient, for example we could
- * actually _parse_ the object path, but that's a lot more code and
- * stupid stuff. The approach below is slower, less efficient, but
- * less code and less error-prone.
- */
-
- /* Iterate over device list */
- if (nm_try_acquire_mutex (data->dev_list_mutex, __FUNCTION__))
- {
- GSList *elt;
- char compare_path[100];
- char *escaped_compare_path;
-
- for (elt = data->dev_list; elt; elt = g_slist_next (elt))
- {
- if ((dev = (NMDevice *)(elt->data)))
- {
- snprintf (compare_path, 100, "%s/%s", NM_DBUS_PATH_DEVICES, nm_device_get_iface (dev));
- escaped_compare_path = nm_dbus_escape_object_path (compare_path);
- /* Compare against our constructed path, but ignore any trailing elements */
- if (strncmp (path, compare_path, strlen (escaped_compare_path)) == 0)
- {
- g_free (escaped_compare_path);
- break;
- }
- g_free (escaped_compare_path);
- dev = NULL;
- }
- }
- nm_unlock_mutex (data->dev_list_mutex, __FUNCTION__);
- }
-
- return (dev);
-}
-
-
-/*-------------------------------------------------------------*/
-/* Handler code */
-/*-------------------------------------------------------------*/
-
-typedef struct NMStatusChangeData
-{
- NMData * data;
- NMDevice * dev;
- NMAccessPoint * ap;
- DeviceStatus status;
-} NMStatusChangeData;
-
-
-typedef struct
-{
- DeviceStatus status;
- const char * signal;
-} DeviceStatusSignals;
-
-static DeviceStatusSignals dev_status_signals[] =
-{
- { DEVICE_NO_LONGER_ACTIVE, "DeviceNoLongerActive" },
- { DEVICE_NOW_ACTIVE, "DeviceNowActive" },
- { DEVICE_ACTIVATING, "DeviceActivating" },
- { DEVICE_ACTIVATION_FAILED, "DeviceActivationFailed" },
- { DEVICE_ADDED, "DeviceAdded" },
- { DEVICE_REMOVED, "DeviceRemoved" },
- { DEVICE_CARRIER_ON, "DeviceCarrierOn" },
- { DEVICE_CARRIER_OFF, "DeviceCarrierOff" },
- { DEVICE_STATUS_INVALID, NULL }
-};
-
-/*
- * nm_dbus_signal_device_status_change
- *
- * Notifies the bus that a particular device has had a status change
- *
- */
-static gboolean nm_dbus_signal_device_status_change (gpointer user_data)
-{
- NMStatusChangeData *cb_data = (NMStatusChangeData *)user_data;
- DBusMessage * message;
- char * dev_path;
- const char * signal = NULL;
- int i = 0;
-
- g_return_val_if_fail (cb_data->data, FALSE);
- g_return_val_if_fail (cb_data->data->dbus_connection, FALSE);
- g_return_val_if_fail (cb_data->dev, FALSE);
-
- while ((dev_status_signals[i].status != DEVICE_STATUS_INVALID) && (dev_status_signals[i].status != cb_data->status))
- i++;
-
- if (!(signal = dev_status_signals[i].signal))
- return FALSE;
-
- if (!(dev_path = nm_dbus_get_object_path_for_device (cb_data->dev)))
- return FALSE;
-
- if (!(message = dbus_message_new_signal (NM_DBUS_PATH, NM_DBUS_INTERFACE, signal)))
- {
- nm_warning ("nm_dbus_signal_device_status_change(): Not enough memory for new dbus message!");
- g_free (dev_path);
- return FALSE;
- }
-
- /* If the device was wireless, attach the name of the wireless network that failed to activate */
- if (cb_data->ap)
- {
- const char *essid = nm_ap_get_essid (cb_data->ap);
- if (essid)
- dbus_message_append_args (message, DBUS_TYPE_OBJECT_PATH, &dev_path, DBUS_TYPE_STRING, &essid, DBUS_TYPE_INVALID);
- nm_ap_unref (cb_data->ap);
- }
- else
- dbus_message_append_args (message, DBUS_TYPE_OBJECT_PATH, &dev_path, DBUS_TYPE_INVALID);
-
- g_free (dev_path);
-
- if (!dbus_connection_send (cb_data->data->dbus_connection, message, NULL))
- nm_warning ("nm_dbus_signal_device_status_change(): Could not raise the signal!");
-
- dbus_message_unref (message);
-
- nm_device_unref (cb_data->dev);
- g_free (cb_data);
-
- return FALSE;
-}
-
-
-void nm_dbus_schedule_device_status_change_signal (NMData *data, NMDevice *dev, NMAccessPoint *ap, DeviceStatus status)
-{
- NMStatusChangeData *cb_data = NULL;
- GSource *source;
-
- g_return_if_fail (data != NULL);
- g_return_if_fail (dev != NULL);
-
- cb_data = g_malloc0 (sizeof (NMStatusChangeData));
- nm_device_ref (dev);
- cb_data->data = data;
- cb_data->dev = dev;
- if (ap)
- {
- nm_ap_ref (ap);
- cb_data->ap = ap;
- }
- cb_data->status = status;
-
- source = g_idle_source_new ();
- g_source_set_priority (source, G_PRIORITY_HIGH_IDLE);
- g_source_set_callback (source, nm_dbus_signal_device_status_change, cb_data, NULL);
- g_source_attach (source, data->main_context);
- g_source_unref (source);
-}
-
-
-/*
- * nm_dbus_network_status_from_data
- *
- * Return a network status string based on our network data
- *
- * Caller MUST free returned value
- *
- */
-NMState nm_get_app_state_from_data (NMData *data)
-{
- NMDevice * act_dev = NULL;
-
- g_return_val_if_fail (data != NULL, NM_STATE_DISCONNECTED);
-
- if (data->asleep == TRUE)
- return NM_STATE_ASLEEP;
-
- act_dev = nm_get_active_device (data);
- if (!act_dev)
- return NM_STATE_DISCONNECTED;
-
- if (nm_device_is_activating (act_dev))
- return NM_STATE_CONNECTING;
- else
- return NM_STATE_CONNECTED;
-
- g_assert_not_reached ();
-
- return NM_STATE_UNKNOWN;
-}
-
-
-/*
- * nm_dbus_signal_state_change
- *
- * Signal a change in state
- *
- */
-void nm_dbus_signal_state_change (DBusConnection *connection, NMData *data)
-{
- DBusMessage * message;
- NMState state;
-
- g_return_if_fail (connection != NULL);
- g_return_if_fail (data != NULL);
-
- if (!(message = dbus_message_new_signal (NM_DBUS_PATH, NM_DBUS_INTERFACE, NM_DBUS_SIGNAL_STATE_CHANGE)))
- {
- nm_warning ("nm_dbus_signal_state_change(): Not enough memory for new dbus message!");
- return;
- }
-
- state = nm_get_app_state_from_data (data);
- dbus_message_append_args (message, DBUS_TYPE_UINT32, &state, DBUS_TYPE_INVALID);
- if (!dbus_connection_send (connection, message, NULL))
- nm_warning ("nm_dbus_signal_state_change(): Could not raise the signal!");
-
- dbus_message_unref (message);
-}
-
-/*
- * nm_dbus_signal_wireless_network_change
- *
- * Notifies the bus that a new wireless network has come into range
- *
- */
-void nm_dbus_signal_wireless_network_change (DBusConnection *connection, NMDevice *dev, NMAccessPoint *ap, NMNetworkStatus status, gint8 strength)
-{
- DBusMessage * message;
- char * dev_path = NULL;
- char * net_path = NULL;
- const char * signal = NULL;
-
- g_return_if_fail (connection != NULL);
- g_return_if_fail (dev != NULL);
- g_return_if_fail (ap != NULL);
-
- if (!(dev_path = nm_dbus_get_object_path_for_device (dev)))
- goto out;
-
- if (!(net_path = nm_dbus_get_object_path_for_network (dev, ap)))
- goto out;
-
- switch (status)
- {
- case NETWORK_STATUS_DISAPPEARED:
- signal = "WirelessNetworkDisappeared";
- break;
- case NETWORK_STATUS_APPEARED:
- signal = "WirelessNetworkAppeared";
- break;
- case NETWORK_STATUS_STRENGTH_CHANGED:
- signal = "WirelessNetworkStrengthChanged";
- break;
- default:
- break;
- }
-
- if (!signal)
- {
- nm_warning ("nm_dbus_signal_wireless_network_change(): tried to broadcast unknown signal.");
- goto out;
- }
-
- if (!(message = dbus_message_new_signal (NM_DBUS_PATH, NM_DBUS_INTERFACE, signal)))
- {
- nm_warning ("nm_dbus_signal_wireless_network_change(): Not enough memory for new dbus message!");
- goto out;
- }
-
- dbus_message_append_args (message, DBUS_TYPE_OBJECT_PATH, &dev_path, DBUS_TYPE_OBJECT_PATH, &net_path, DBUS_TYPE_INVALID);
- if (status == NETWORK_STATUS_STRENGTH_CHANGED)
- dbus_message_append_args (message, DBUS_TYPE_INT32, &strength, DBUS_TYPE_INVALID);
-
- if (!dbus_connection_send (connection, message, NULL))
- nm_warning ("nm_dbus_signal_wireless_network_change(): Could not raise the WirelessNetwork* signal!");
-
- dbus_message_unref (message);
-
-out:
- g_free (net_path);
- g_free (dev_path);
-}
-
-
-/*
- * nm_dbus_get_user_key_for_network_cb
- *
- * Callback from nm_dbus_get_user_key_for_network when NetworkManagerInfo returns
- * the new user key.
- *
- */
-static void nm_dbus_get_user_key_for_network_cb (DBusPendingCall *pcall, NMActRequest *req)
-{
- DBusMessage * reply;
- NMData * data;
- NMDevice * dev;
- NMAccessPoint * ap;
- char * passphrase = NULL;
- NMEncKeyType key_type = -1;
-
- g_return_if_fail (pcall != NULL);
- g_return_if_fail (req != NULL);
-
- data = nm_act_request_get_data (req);
- g_assert (data);
-
- dev = nm_act_request_get_dev (req);
- g_assert (dev);
-
- ap = nm_act_request_get_ap (req);
- g_assert (ap);
-
- dbus_pending_call_ref (pcall);
-
- nm_info ("Activation (%s) New wireless user key for network '%s' received.", nm_device_get_iface (dev), nm_ap_get_essid (ap));
-
- if (!dbus_pending_call_get_completed (pcall))
- goto out;
-
- if (!(reply = dbus_pending_call_steal_reply (pcall)))
- goto out;
-
- if (dbus_message_get_type (reply) == DBUS_MESSAGE_TYPE_ERROR)
- {
- /* FIXME: since we're not marking the device as invalid, its a fair bet
- * that NM will just try to reactivate the device again, and may fail
- * to get the user key in exactly the same way, which ends up right back
- * here... ad nauseum. Figure out how to deal with a failure here.
- */
- if (nm_device_is_activating (dev))
- nm_device_activation_cancel (dev);
- nm_policy_schedule_device_change_check (data);
-
- dbus_message_unref (reply);
- goto out;
- }
-
- if (dbus_message_get_args (reply, NULL, DBUS_TYPE_STRING, &passphrase, DBUS_TYPE_INT32, &key_type, DBUS_TYPE_INVALID))
- nm_device_set_user_key_for_network (req, passphrase, key_type);
- dbus_message_unref (reply);
-
- nm_act_request_set_user_key_pending_call (req, NULL);
-
-out:
- nm_act_request_unref (req);
- dbus_pending_call_unref (pcall);
-}
-
-
-/*
- * nm_dbus_get_user_key_for_network
- *
- * Asks the info-daemon for a user-entered WEP key.
- *
- */
-void nm_dbus_get_user_key_for_network (DBusConnection *connection, NMActRequest *req, const gboolean new_key)
-{
- DBusMessage * message;
- DBusPendingCall * pcall;
- NMData * data;
- NMDevice * dev;
- NMAccessPoint * ap;
- gint32 attempt = 1;
- char * dev_path;
- char * net_path;
- char * essid;
-
- g_return_if_fail (connection != NULL);
- g_return_if_fail (req != NULL);
-
- data = nm_act_request_get_data (req);
- g_assert (data);
-
- dev = nm_act_request_get_dev (req);
- g_assert (dev);
-
- ap = nm_act_request_get_ap (req);
- g_assert (ap);
-
- essid = nm_ap_get_essid (ap);
- nm_info ("Activation (%s) New wireless user key requested for network '%s'.", nm_device_get_iface (dev), essid);
-
- if (!(message = dbus_message_new_method_call (NMI_DBUS_SERVICE, NMI_DBUS_PATH, NMI_DBUS_INTERFACE, "getKeyForNetwork")))
- {
- nm_warning ("nm_dbus_get_user_key_for_network(): Couldn't allocate the dbus message");
- return;
- }
-
- dev_path = nm_dbus_get_object_path_for_device (dev);
- net_path = nm_dbus_get_object_path_for_network (dev, ap);
- if (dev_path && strlen (dev_path) && net_path && strlen (net_path))
- {
- dbus_message_append_args (message, DBUS_TYPE_OBJECT_PATH, &dev_path,
- DBUS_TYPE_OBJECT_PATH, &net_path,
- DBUS_TYPE_STRING, &essid,
- DBUS_TYPE_INT32, &attempt,
- DBUS_TYPE_BOOLEAN, &new_key,
- DBUS_TYPE_INVALID);
- if (dbus_connection_send_with_reply (connection, message, &pcall, INT_MAX) && pcall)
- {
- nm_act_request_ref (req);
- nm_act_request_set_stage (req, NM_ACT_STAGE_NEED_USER_KEY);
- nm_act_request_set_user_key_pending_call (req, pcall);
- dbus_pending_call_set_notify (pcall, (DBusPendingCallNotifyFunction) nm_dbus_get_user_key_for_network_cb, req, NULL);
- }
- else
- nm_warning ("nm_dbus_get_user_key_for_network(): could not send dbus message");
- } else nm_warning ("nm_dbus_get_user_key_for_network(): bad object path data");
- g_free (net_path);
- g_free (dev_path);
-
- /* FIXME: figure out how to deal with a failure here, otherwise
- * we just hang in the activation process and nothing happens
- * until the user cancels stuff.
- */
-
- dbus_message_unref (message);
-}
-
-
-/*
- * nm_dbus_cancel_get_user_key_for_network
- *
- * Sends a user-key cancellation message to NetworkManagerInfo
- *
- */
-void nm_dbus_cancel_get_user_key_for_network (DBusConnection *connection, NMActRequest *req)
-{
- DBusMessage * message;
- DBusPendingCall * pcall;
-
- g_return_if_fail (connection != NULL);
- g_return_if_fail (req != NULL);
-
- if ((pcall = nm_act_request_get_user_key_pending_call (req)))
- dbus_pending_call_cancel (pcall);
-
- if (!(message = dbus_message_new_method_call (NMI_DBUS_SERVICE, NMI_DBUS_PATH, NMI_DBUS_INTERFACE, "cancelGetKeyForNetwork")))
- {
- nm_warning ("nm_dbus_cancel_get_user_key_for_network(): Couldn't allocate the dbus message");
- return;
- }
-
- if (!dbus_connection_send (connection, message, NULL))
- nm_warning ("nm_dbus_cancel_get_user_key_for_network(): could not send dbus message");
-
- dbus_message_unref (message);
-}
-
-
-/*
- * nm_dbus_update_wireless_scan_method_cb
- *
- * Callback from nm_dbus_update_wireless_scan_method
- *
- */
-static void nm_dbus_update_wireless_scan_method_cb (DBusPendingCall *pcall, NMData *data)
-{
- DBusMessage * reply;
- NMWirelessScanMethod method = NM_SCAN_METHOD_UNKNOWN;
-
- g_return_if_fail (pcall != NULL);
- g_return_if_fail (data != NULL);
-
- if (!dbus_pending_call_get_completed (pcall))
- goto out;
-
- if (!(reply = dbus_pending_call_steal_reply (pcall)))
- goto out;
-
- if (dbus_message_get_type (reply) == DBUS_MESSAGE_TYPE_ERROR)
- {
- dbus_message_unref (reply);
- goto out;
- }
-
- if (dbus_message_get_args (reply, NULL, DBUS_TYPE_UINT32, &method, DBUS_TYPE_INVALID))
- {
- if ((method == NM_SCAN_METHOD_ALWAYS) || (method == NM_SCAN_METHOD_NEVER)
- || (method == NM_SCAN_METHOD_WHEN_UNASSOCIATED))
- data->scanning_method = method;
- }
- dbus_message_unref (reply);
-
-out:
- dbus_pending_call_unref (pcall);
-}
-
-
-/*
- * nm_dbus_update_wireless_scan_method
- *
- * Get the wireless scan method from NetworkManagerInfo
- *
- */
-void nm_dbus_update_wireless_scan_method (DBusConnection *connection, NMData *data)
-{
- DBusMessage * message = NULL;
- DBusPendingCall * pcall = NULL;
-
- g_return_if_fail (connection != NULL);
- g_return_if_fail (data != NULL);
-
- if (!(message = dbus_message_new_method_call (NMI_DBUS_SERVICE, NMI_DBUS_PATH, NMI_DBUS_INTERFACE, "getWirelessScanMethod")))
- {
- nm_warning ("nm_dbus_update_wireless_scan_method(): Couldn't allocate the dbus message");
- return;
- }
-
- if (dbus_connection_send_with_reply (connection, message, &pcall, INT_MAX) && pcall)
- dbus_pending_call_set_notify (pcall, (DBusPendingCallNotifyFunction) nm_dbus_update_wireless_scan_method_cb, data, NULL);
- else
- nm_warning ("nm_dbus_update_wireless_scan_method(): could not send dbus message");
-
- dbus_message_unref (message);
-}
-
-
-/*
- * nm_dbus_update_network_info
- *
- * Tell NetworkManagerInfo the updated info of the AP
- *
- */
-gboolean nm_dbus_update_network_info (DBusConnection *connection, NMAccessPoint *ap, const gboolean user_requested)
-{
- DBusMessage * message;
- gboolean success = FALSE;
- dbus_int32_t auth_method;
- const char * essid;
- const char * enc_key_source;
- dbus_int32_t enc_key_type;
-
- g_return_val_if_fail (connection != NULL, FALSE);
- g_return_val_if_fail (ap != NULL, FALSE);
-
- auth_method = nm_ap_get_auth_method (ap);
- if (auth_method == NM_DEVICE_AUTH_METHOD_UNKNOWN)
- return FALSE;
-
- essid = nm_ap_get_essid (ap);
- if (!(enc_key_source = nm_ap_get_enc_key_source (ap)))
- enc_key_source = "";
- enc_key_type = nm_ap_get_enc_type (ap);
-
- if (!(message = dbus_message_new_method_call (NMI_DBUS_SERVICE, NMI_DBUS_PATH, NMI_DBUS_INTERFACE, "updateNetworkInfo")))
- {
- nm_warning ("nm_dbus_update_network_info(): Couldn't allocate the dbus message");
- return FALSE;
- }
-
- dbus_message_append_args (message, DBUS_TYPE_STRING, &essid,
- DBUS_TYPE_STRING, &enc_key_source,
- DBUS_TYPE_INT32, &enc_key_type,
- DBUS_TYPE_INT32, &auth_method,
- DBUS_TYPE_BOOLEAN, &user_requested,
- DBUS_TYPE_INVALID);
- if (!dbus_connection_send (connection, message, NULL))
- nm_warning ("nm_dbus_update_network_info(): failed to send dbus message.");
- else
- success = TRUE;
-
- dbus_message_unref (message);
- return success;
-}
-
-
-/*
- * nm_dbus_add_network_address
- *
- * Tell NetworkManagerInfo the MAC address of an AP
- *
- * Returns: FALSE on error
- * TRUE on success
- *
- */
-gboolean nm_dbus_add_network_address (DBusConnection *connection, NMNetworkType type, const char *network, struct ether_addr *addr)
-{
- DBusMessage * message;
- gboolean success = FALSE;
- gchar * char_addr;
- dbus_int32_t type_as_int32 = (dbus_int32_t) type;
-
- g_return_val_if_fail (connection != NULL, FALSE);
- g_return_val_if_fail (network != NULL, FALSE);
- g_return_val_if_fail (type != NETWORK_TYPE_UNKNOWN, FALSE);
- g_return_val_if_fail (addr != NULL, FALSE);
-
- if (!(message = dbus_message_new_method_call (NMI_DBUS_SERVICE, NMI_DBUS_PATH, NMI_DBUS_INTERFACE, "addNetworkAddress")))
- {
- nm_warning ("nm_dbus_add_network_ap_mac_address(): Couldn't allocate the dbus message");
- return (FALSE);
- }
-
- char_addr = g_new0 (gchar, 20);
- ether_ntoa_r (addr, char_addr);
- dbus_message_append_args (message, DBUS_TYPE_STRING, &network,
- DBUS_TYPE_INT32, &type_as_int32,
- DBUS_TYPE_STRING, &char_addr,
- DBUS_TYPE_INVALID);
- g_free (char_addr);
-
- if (!dbus_connection_send (connection, message, NULL))
- nm_warning ("nm_dbus_add_network_ap_mac_address(): failed to send dbus message.");
- else
- success = TRUE;
-
- dbus_message_unref (message);
- return (success);
-}
-
-
-typedef struct GetOneNetworkCBData
-{
- NMData * data;
- char * network;
- NMAccessPointList * list;
-} GetOneNetworkCBData;
-
-
-static void free_get_one_network_cb_data (GetOneNetworkCBData *data)
-{
- if (data)
- {
- nm_ap_list_unref (data->list);
- g_free (data->network);
- data->list = NULL;
- data->network = NULL;
- data->data = NULL;
- g_free (data);
- }
-}
-
-typedef struct GetNetworksCBData
-{
- NMData * data;
- NMAccessPointList * list;
-} GetNetworksCBData;
-
-
-static void free_get_networks_cb_data (GetNetworksCBData *data)
-{
- if (data)
- {
- nm_ap_list_unref (data->list);
- data->data = NULL;
- data->list = NULL;
- g_free (data);
- }
-}
-
-/*
- * nm_dbus_get_network_data_cb
- *
- * Add a new NMAccessPoint to the allowed list with the correct properties
- *
- */
-static void nm_dbus_get_network_data_cb (DBusPendingCall *pcall, void *user_data)
-{
- GetOneNetworkCBData * cb_data = (GetOneNetworkCBData *)user_data;
- DBusMessage * reply;
- DBusError error;
- const char * essid = NULL;
- gint timestamp_secs = -1;
- const char * key = NULL;
- NMEncKeyType key_type = -1;
- gboolean trusted = FALSE;
- NMDeviceAuthMethod auth_method = NM_DEVICE_AUTH_METHOD_UNKNOWN;
- char ** addresses;
- int num_addresses;
-
- g_return_if_fail (pcall != NULL);
- g_return_if_fail (cb_data != NULL);
- g_return_if_fail (cb_data->data != NULL);
- g_return_if_fail (cb_data->network != NULL);
- g_return_if_fail (cb_data->list != NULL);
-
- dbus_pending_call_ref (pcall);
-
- if (!dbus_pending_call_get_completed (pcall))
- goto out;
-
- if (!(reply = dbus_pending_call_steal_reply (pcall)))
- goto out;
-
- if (dbus_message_is_error (reply, "BadNetworkData"))
- {
- dbus_message_unref (reply);
- nm_ap_list_remove_ap_by_essid (cb_data->list, cb_data->network);
- goto out;
- }
-
- dbus_error_init (&error);
- if (dbus_message_get_args (reply, &error, DBUS_TYPE_STRING, &essid,
- DBUS_TYPE_INT32, &timestamp_secs,
- DBUS_TYPE_INT32, &key_type,
- DBUS_TYPE_INT32, &auth_method,
- DBUS_TYPE_BOOLEAN, &trusted,
- DBUS_TYPE_ARRAY, DBUS_TYPE_STRING, &addresses, &num_addresses,
- DBUS_TYPE_INVALID))
- {
- if (timestamp_secs > 0)
- {
- NMAccessPoint * ap;
- NMAccessPoint * list_ap;
- GTimeVal * timestamp = g_new0 (GTimeVal, 1);
- GSList * addr_list = NULL;
- int i;
-
- ap = nm_ap_new ();
- nm_ap_set_essid (ap, essid);
-
- timestamp->tv_sec = timestamp_secs;
- timestamp->tv_usec = 0;
- nm_ap_set_timestamp (ap, timestamp);
- g_free (timestamp);
-
- nm_ap_set_trusted (ap, trusted);
- nm_ap_set_auth_method (ap, auth_method);
-
- /* We get the actual key when we try to connect, use NULL for now. */
- nm_ap_set_enc_key_source (ap, NULL, key_type);
-
- for (i = 0; i < num_addresses; i++)
- if (strlen (addresses[i]) >= 11)
- addr_list = g_slist_append (addr_list, g_strdup (addresses[i]));
- nm_ap_set_user_addresses (ap, addr_list);
-
- if ((list_ap = nm_ap_list_get_ap_by_essid (cb_data->list, essid)))
- {
- nm_ap_set_essid (list_ap, nm_ap_get_essid (ap));
- nm_ap_set_timestamp (list_ap, nm_ap_get_timestamp (ap));
- nm_ap_set_trusted (list_ap, nm_ap_get_trusted (ap));
- nm_ap_set_enc_key_source (list_ap, nm_ap_get_enc_key_source (ap), nm_ap_get_enc_type (ap));
- nm_ap_set_auth_method (list_ap, nm_ap_get_auth_method (ap));
- nm_ap_set_user_addresses (list_ap, nm_ap_get_user_addresses (ap));
- }
- else
- {
- /* New AP, just add it to the list */
- nm_ap_list_append_ap (cb_data->list, ap);
- }
- nm_ap_unref (ap);
-
- /* Ensure all devices get new information copied into their device lists */
- nm_policy_schedule_device_ap_lists_update_from_allowed (cb_data->data);
- }
- dbus_free_string_array (addresses);
- }
- dbus_message_unref (reply);
-
-out:
- dbus_pending_call_unref (pcall);
-}
-
-
-/*
- * nm_dbus_get_networks_cb
- *
- * Async callback from nm_dbus_get_networks
- *
- */
-static void nm_dbus_get_networks_cb (DBusPendingCall *pcall, void *user_data)
-{
- DBusMessage * reply;
- DBusMessageIter iter, array_iter;
- GetNetworksCBData * cb_data = (GetNetworksCBData *)user_data;
-
- g_return_if_fail (pcall);
- g_return_if_fail (cb_data != NULL);
- g_return_if_fail (cb_data->list != NULL);
- g_return_if_fail (cb_data->data != NULL);
-
- dbus_pending_call_ref (pcall);
-
- if (!dbus_pending_call_get_completed (pcall))
- goto out;
-
- if (!(reply = dbus_pending_call_steal_reply (pcall)))
- goto out;
-
- if (message_is_error (reply))
- goto out;
-
- dbus_message_iter_init (reply, &iter);
- dbus_message_iter_recurse (&iter, &array_iter);
- while (dbus_message_iter_get_arg_type (&array_iter) == DBUS_TYPE_STRING)
- {
- const char * value;
- DBusMessage * message;
-
- dbus_message_iter_get_basic (&array_iter, &value);
-
- /* Get properties on each network */
- if ((message = dbus_message_new_method_call (NMI_DBUS_SERVICE, NMI_DBUS_PATH, NMI_DBUS_INTERFACE, "getNetworkProperties")))
- {
- dbus_int32_t type_as_int32 = (dbus_int32_t) nm_ap_list_get_type (cb_data->list);
- DBusPendingCall * net_pcall = NULL;
-
- dbus_message_append_args (message, DBUS_TYPE_STRING, &value, DBUS_TYPE_INT32, &type_as_int32, DBUS_TYPE_INVALID);
- dbus_connection_send_with_reply (cb_data->data->dbus_connection, message, &net_pcall, -1);
- dbus_message_unref (message);
- if (net_pcall)
- {
- GetOneNetworkCBData * net_cb_data = g_malloc0 (sizeof (GetOneNetworkCBData));
-
- net_cb_data->data = cb_data->data;
- net_cb_data->network = g_strdup (value);
- nm_ap_list_ref (cb_data->list);
- net_cb_data->list = cb_data->list;
-
- dbus_pending_call_set_notify (net_pcall, nm_dbus_get_network_data_cb, net_cb_data, (DBusFreeFunction) free_get_one_network_cb_data);
- }
- }
-
- dbus_message_iter_next(&array_iter);
- }
- dbus_message_unref (reply);
-
-out:
- dbus_pending_call_unref (pcall);
-}
-
-
-/*
- * nm_dbus_update_allowed_networks
- *
- * Update all allowed networks from NetworkManagerInfo
- *
- */
-void nm_dbus_update_allowed_networks (DBusConnection *connection, NMAccessPointList *list, NMData *data)
-{
- DBusMessage * message;
- dbus_int32_t type_as_int32 = (dbus_int32_t) nm_ap_list_get_type (list);
- DBusPendingCall * pcall = NULL;
-
- g_return_if_fail (connection != NULL);
- g_return_if_fail (list != NULL);
- g_return_if_fail (data != NULL);
-
- if (!(message = dbus_message_new_method_call (NMI_DBUS_SERVICE, NMI_DBUS_PATH, NMI_DBUS_INTERFACE, "getNetworks")))
- return;
-
- dbus_message_append_args (message, DBUS_TYPE_INT32, &type_as_int32, DBUS_TYPE_INVALID);
- dbus_connection_send_with_reply (connection, message, &pcall, -1);
- dbus_message_unref (message);
- if (pcall)
- {
- GetNetworksCBData * cb_data = g_malloc0 (sizeof (GetNetworksCBData));
-
- cb_data->data = data;
- nm_ap_list_ref (list);
- cb_data->list = list;
- dbus_pending_call_set_notify (pcall, nm_dbus_get_networks_cb, cb_data, (DBusFreeFunction) free_get_networks_cb_data);
- }
-}
-
-
-/*
- * nm_dbus_update_one_allowed_network
- *
- * Update all networks of a specific type from NetworkManagerInfo
- *
- */
-static void nm_dbus_update_one_allowed_network (DBusConnection *connection, const char *network, NMData *data)
-{
- DBusMessage * message;
- dbus_int32_t type_as_int32 = NETWORK_TYPE_ALLOWED;
- DBusPendingCall * pcall = NULL;
- GetOneNetworkCBData * cb_data = NULL;
-
- g_return_if_fail (connection != NULL);
- g_return_if_fail (data != NULL);
-
- if (!(message = dbus_message_new_method_call (NMI_DBUS_SERVICE, NMI_DBUS_PATH, NMI_DBUS_INTERFACE, "getNetworkProperties")))
- {
- nm_warning ("nm_dbus_update_one_allowed_network(): Couldn't allocate the dbus message");
- return;
- }
-
- cb_data = g_malloc0 (sizeof (GetOneNetworkCBData));
- cb_data->data = data;
- cb_data->network = g_strdup (network);
- cb_data->list = data->allowed_ap_list;
-
- dbus_message_append_args (message, DBUS_TYPE_STRING, &network, DBUS_TYPE_INT32, &type_as_int32, DBUS_TYPE_INVALID);
- dbus_connection_send_with_reply (connection, message, &pcall, -1);
- dbus_message_unref (message);
- if (!pcall)
- nm_warning ("nm_dbus_update_one_allowed_network(): pending call was NULL");
- else
- dbus_pending_call_set_notify (pcall, nm_dbus_get_network_data_cb, cb_data, (DBusFreeFunction) free_get_one_network_cb_data);
-}
-
-
-/*
- * nm_dbus_signal_filter
- *
- * Respond to NetworkManagerInfo signals about changing Allowed Networks
- *
- */
-static DBusHandlerResult nm_dbus_signal_filter (DBusConnection *connection, DBusMessage *message, void *user_data)
-{
- NMData * data = (NMData *)user_data;
- const char * object_path;
- const char * method;
- gboolean handled = FALSE;
- DBusError error;
-
- g_return_val_if_fail (data != NULL, DBUS_HANDLER_RESULT_NOT_YET_HANDLED);
- g_return_val_if_fail (connection != NULL, DBUS_HANDLER_RESULT_NOT_YET_HANDLED);
- g_return_val_if_fail (message != NULL, DBUS_HANDLER_RESULT_NOT_YET_HANDLED);
-
- method = dbus_message_get_member (message);
- if (!(object_path = dbus_message_get_path (message)))
- return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
-
- if (dbus_message_get_type (message) != DBUS_MESSAGE_TYPE_SIGNAL)
- return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
-
- /* nm_debug ("nm_dbus_nmi_filter() got method %s for path %s", method, object_path); */
-
- dbus_error_init (&error);
-
- if (strcmp (object_path, NMI_DBUS_PATH) == 0)
- {
- if (dbus_message_is_signal (message, NMI_DBUS_INTERFACE, "WirelessNetworkUpdate"))
- {
- char *network = NULL;
-
- if (dbus_message_get_args (message, &error, DBUS_TYPE_STRING, &network, DBUS_TYPE_INVALID))
- {
- /* Update a single wireless network's data */
- nm_debug ("NetworkManagerInfo triggered update of wireless network '%s'", network);
- nm_dbus_update_one_allowed_network (connection, network, data);
- handled = TRUE;
- }
- }
- else if (dbus_message_is_signal (message, NMI_DBUS_INTERFACE, "VPNConnectionUpdate"))
- {
- char *name = NULL;
-
- if (dbus_message_get_args (message, &error, DBUS_TYPE_STRING, &name, DBUS_TYPE_INVALID))
- {
- nm_debug ("NetworkManagerInfo triggered update of VPN connection '%s'", name);
- nm_dbus_vpn_update_one_vpn_connection (data->dbus_connection, name, data);
- handled = TRUE;
- }
- }
- else if (dbus_message_is_signal (message, NMI_DBUS_INTERFACE, "WirelessScanMethodUpdate"))
- nm_dbus_update_wireless_scan_method (data->dbus_connection, data);
- }
- else if (dbus_message_is_signal (message, DBUS_INTERFACE_DBUS, "Disconnected"))
- {
- /* FIXME: try to recover from disconnection */
- data->dbus_connection = NULL;
- handled = TRUE;
- }
- else if (dbus_message_is_signal (message, DBUS_INTERFACE_DBUS, "NameOwnerChanged"))
- {
- char *service;
- char *old_owner;
- char *new_owner;
-
- if (dbus_message_get_args (message, &error, DBUS_TYPE_STRING, &service, DBUS_TYPE_STRING, &old_owner,
- DBUS_TYPE_STRING, &new_owner, DBUS_TYPE_INVALID))
- {
- gboolean old_owner_good = (old_owner && (strlen (old_owner) > 0));
- gboolean new_owner_good = (new_owner && (strlen (new_owner) > 0));
-
- if (strcmp (service, NMI_DBUS_SERVICE) == 0)
- {
- if (!old_owner_good && new_owner_good) /* NMI just appeared */
- {
- char *match = get_nmi_match_string (new_owner);
- dbus_bus_add_match (connection, match, NULL);
- nm_policy_schedule_allowed_ap_list_update (data);
- nm_dbus_vpn_schedule_vpn_connections_update (data);
- nm_dbus_update_wireless_scan_method (data->dbus_connection, data);
- g_free (match);
- handled = TRUE;
- }
- else if (old_owner_good && !new_owner_good) /* NMI went away */
- {
- char *match = get_nmi_match_string (old_owner);
- dbus_bus_remove_match (connection, match, NULL);
- g_free (match);
- }
- }
- else if (strcmp (service, "org.freedesktop.Hal") == 0)
- {
- if (!old_owner_good && new_owner_good) /* Hal just appeared */
- nm_hal_init (data);
- else if (old_owner_good && !new_owner_good) /* Hal went away */
- nm_hal_deinit (data);
- }
- else if (nm_dhcp_manager_process_name_owner_changed (data->dhcp_manager, service, old_owner, new_owner) == TRUE)
- {
- /* Processed by the DHCP manager */
- handled = TRUE;
- }
- else if (nm_vpn_manager_process_name_owner_changed (data->vpn_manager, service, old_owner, new_owner) == TRUE)
- {
- /* Processed by the VPN manager */
- handled = TRUE;
- }
- }
- }
- else if (nm_dhcp_manager_process_signal (data->dhcp_manager, message) == TRUE)
- {
- /* Processed by the DHCP manager */
- handled = TRUE;
- }
- else if (nm_vpn_manager_process_signal (data->vpn_manager, message) == TRUE)
- {
- /* Processed by the VPN manager */
- handled = TRUE;
- }
-
- if (dbus_error_is_set (&error))
- dbus_error_free (&error);
-
- return (handled ? DBUS_HANDLER_RESULT_HANDLED : DBUS_HANDLER_RESULT_NOT_YET_HANDLED);
-}
-
-
-/*
- * nm_dbus_nm_message_handler
- *
- * Dispatch messages against our NetworkManager object
- *
- */
-static DBusHandlerResult nm_dbus_nm_message_handler (DBusConnection *connection, DBusMessage *message, void *user_data)
-{
- NMData *data = (NMData *)user_data;
- gboolean handled = TRUE;
- DBusMessage *reply = NULL;
- NMDbusCBData cb_data;
-
- g_return_val_if_fail (data != NULL, DBUS_HANDLER_RESULT_NOT_YET_HANDLED);
- g_return_val_if_fail (data->nm_methods != NULL, DBUS_HANDLER_RESULT_NOT_YET_HANDLED);
- g_return_val_if_fail (connection != NULL, DBUS_HANDLER_RESULT_NOT_YET_HANDLED);
- g_return_val_if_fail (message != NULL, DBUS_HANDLER_RESULT_NOT_YET_HANDLED);
-
- cb_data.data = data;
- cb_data.dev = NULL;
- handled = nm_dbus_method_dispatch (data->nm_methods, connection, message, &cb_data, &reply);
- if (reply)
- {
- dbus_connection_send (connection, reply, NULL);
- dbus_message_unref (reply);
- }
-
- return (handled ? DBUS_HANDLER_RESULT_HANDLED : DBUS_HANDLER_RESULT_NOT_YET_HANDLED);
-}
-
-
-/*
- * nm_dbus_devices_message_handler
- *
- * Dispatch messages against individual network devices
- *
- */
-static DBusHandlerResult nm_dbus_devices_message_handler (DBusConnection *connection, DBusMessage *message, void *user_data)
-{
- NMData *data = (NMData *)user_data;
- gboolean handled = FALSE;
- const char *path;
- DBusMessage *reply = NULL;
- NMDevice *dev;
-
- g_return_val_if_fail (data != NULL, DBUS_HANDLER_RESULT_NOT_YET_HANDLED);
- g_return_val_if_fail (connection != NULL, DBUS_HANDLER_RESULT_NOT_YET_HANDLED);
- g_return_val_if_fail (message != NULL, DBUS_HANDLER_RESULT_NOT_YET_HANDLED);
-
- path = dbus_message_get_path (message);
-
- if (!(dev = nm_dbus_get_device_from_object_path (data, path)))
- reply = nm_dbus_create_error_message (message, NM_DBUS_INTERFACE, "DeviceNotFound", "The requested network device does not exist.");
- else
- {
- char *object_path, *escaped_object_path;
- NMDbusCBData cb_data;
-
- cb_data.data = data;
- cb_data.dev = dev;
-
- /* Test whether or not the _networks_ of a device were queried instead of the device itself */
- object_path = g_strdup_printf ("%s/%s/Networks/", NM_DBUS_PATH_DEVICES, nm_device_get_iface (dev));
- escaped_object_path = nm_dbus_escape_object_path (object_path);
- g_free (object_path);
- if (strncmp (path, escaped_object_path, strlen (escaped_object_path)) == 0)
- handled = nm_dbus_method_dispatch (data->net_methods, connection, message, &cb_data, &reply);
- else
- handled = nm_dbus_method_dispatch (data->device_methods, connection, message, &cb_data, &reply);
- g_free (escaped_object_path);
- }
-
- if (reply)
- {
- dbus_connection_send (connection, reply, NULL);
- dbus_message_unref (reply);
- handled = TRUE;
- }
-
- return (handled ? DBUS_HANDLER_RESULT_HANDLED : DBUS_HANDLER_RESULT_NOT_YET_HANDLED);
-}
-
-
-/*
- * nm_dbus_vpn_message_handler
- *
- * Dispatch messages against our NetworkManager VPNConnections object
- *
- */
-static DBusHandlerResult nm_dbus_vpn_message_handler (DBusConnection *connection, DBusMessage *message, void *user_data)
-{
- NMData *data = (NMData *)user_data;
- gboolean handled = TRUE;
- DBusMessage *reply = NULL;
- NMDbusCBData cb_data;
-
- g_return_val_if_fail (data != NULL, DBUS_HANDLER_RESULT_NOT_YET_HANDLED);
- g_return_val_if_fail (data->vpn_methods != NULL, DBUS_HANDLER_RESULT_NOT_YET_HANDLED);
- g_return_val_if_fail (connection != NULL, DBUS_HANDLER_RESULT_NOT_YET_HANDLED);
- g_return_val_if_fail (message != NULL, DBUS_HANDLER_RESULT_NOT_YET_HANDLED);
-
- cb_data.data = data;
- cb_data.dev = NULL;
- handled = nm_dbus_method_dispatch (data->vpn_methods, connection, message, &cb_data, &reply);
- if (reply)
- {
- dbus_connection_send (connection, reply, NULL);
- dbus_message_unref (reply);
- }
-
- return (handled ? DBUS_HANDLER_RESULT_HANDLED : DBUS_HANDLER_RESULT_NOT_YET_HANDLED);
-}
-
-
-/*
- * nm_dbus_is_info_daemon_running
- *
- * Ask dbus whether or not the info daemon is providing its dbus service
- *
- */
-gboolean nm_dbus_is_info_daemon_running (DBusConnection *connection)
-{
- DBusError error;
- gboolean running = FALSE;
-
- g_return_val_if_fail (connection != NULL, FALSE);
-
- dbus_error_init (&error);
- running = dbus_bus_name_has_owner (connection, NMI_DBUS_SERVICE, &error);
- if (dbus_error_is_set (&error))
- {
- running = FALSE;
- dbus_error_free (&error);
- }
- return running;
-}
-
-
-char *get_name_owner (DBusConnection *con, const char *name)
-{
- DBusMessage * message;
- DBusMessage * reply;
- char * owner = NULL;
-
- g_return_val_if_fail (con != NULL, NULL);
- g_return_val_if_fail (name != NULL, NULL);
-
- if ((message = dbus_message_new_method_call (DBUS_SERVICE_DBUS, DBUS_PATH_DBUS, DBUS_INTERFACE_DBUS, "GetNameOwner")))
- {
- dbus_message_append_args (message, DBUS_TYPE_STRING, &name, DBUS_TYPE_INVALID);
- if ((reply = dbus_connection_send_with_reply_and_block (con, message, -1, NULL)))
- {
- const char *tmp_name = NULL;
- if (dbus_message_get_args (reply, NULL, DBUS_TYPE_STRING, &tmp_name, DBUS_TYPE_INVALID))
- owner = g_strdup (tmp_name);
- dbus_message_unref (reply);
- }
- dbus_message_unref (message);
- }
-
- return owner;
-}
-
-
-static char *get_nmi_match_string (const char *owner)
-{
- g_return_val_if_fail (owner != NULL, NULL);
-
- return g_strdup_printf ("type='signal',interface='" NMI_DBUS_INTERFACE "',sender='%s',path='" NMI_DBUS_PATH "'", owner);
-}
-
-
-/*
- * nm_dbus_init
- *
- * Connect to the system messagebus and register ourselves as a service.
- *
- */
-DBusConnection *nm_dbus_init (NMData *data)
-{
- DBusError error;
- DBusConnection * connection;
- DBusObjectPathVTable nm_vtable = {NULL, &nm_dbus_nm_message_handler, NULL, NULL, NULL, NULL};
- DBusObjectPathVTable devices_vtable = {NULL, &nm_dbus_devices_message_handler, NULL, NULL, NULL, NULL};
- DBusObjectPathVTable vpn_vtable = {NULL, &nm_dbus_vpn_message_handler, NULL, NULL, NULL, NULL};
- char * owner;
-
- dbus_connection_set_change_sigpipe (TRUE);
-
- dbus_error_init (&error);
- connection = dbus_bus_get (DBUS_BUS_SYSTEM, &error);
- if ((connection == NULL) || dbus_error_is_set (&error))
- {
- nm_warning ("nm_dbus_init() could not get the system bus. Make sure the message bus daemon is running?");
- connection = NULL;
- goto out;
- }
-
-// dbus_connection_set_exit_on_disconnect (connection, FALSE);
- dbus_connection_setup_with_g_main (connection, data->main_context);
-
- data->nm_methods = nm_dbus_nm_methods_setup ();
- data->device_methods = nm_dbus_device_methods_setup ();
- data->net_methods = nm_dbus_net_methods_setup ();
- data->vpn_methods = nm_dbus_vpn_methods_setup ();
-
- if ( !dbus_connection_register_object_path (connection, NM_DBUS_PATH, &nm_vtable, data)
- || !dbus_connection_register_fallback (connection, NM_DBUS_PATH_DEVICES, &devices_vtable, data)
- || !dbus_connection_register_object_path (connection, NM_DBUS_PATH_VPN, &vpn_vtable, data))
- {
- nm_error ("nm_dbus_init() could not register D-BUS handlers. Cannot continue.");
- connection = NULL;
- goto out;
- }
-
- if (!dbus_connection_add_filter (connection, nm_dbus_signal_filter, data, NULL))
- {
- nm_error ("nm_dbus_init() could not attach a dbus message filter. The NetworkManager dbus security policy may not be loaded. Restart dbus?");
- connection = NULL;
- goto out;
- }
-
- dbus_bus_add_match (connection,
- "type='signal',"
- "interface='" DBUS_INTERFACE_DBUS "',"
- "sender='" DBUS_SERVICE_DBUS "'",
- NULL);
-
- if ((owner = get_name_owner (connection, NMI_DBUS_SERVICE)))
- {
- char *match = get_nmi_match_string (owner);
-
- dbus_bus_add_match (connection, match, NULL);
- g_free (match);
- g_free (owner);
- }
-
- dbus_error_init (&error);
- dbus_bus_request_name (connection, NM_DBUS_SERVICE, 0, &error);
- if (dbus_error_is_set (&error))
- {
- nm_warning ("nm_dbus_init() could not acquire its service. dbus_bus_acquire_service() says: '%s'", error.message);
- connection = NULL;
- goto out;
- }
-
-out:
- if (dbus_error_is_set (&error))
- dbus_error_free (&error);
-
- return (connection);
-}
diff --git a/src/NetworkManagerDbus.h b/src/NetworkManagerDbus.h
deleted file mode 100644
index 238242c16c..0000000000
--- a/src/NetworkManagerDbus.h
+++ /dev/null
@@ -1,89 +0,0 @@
-/* NetworkManager -- Network link manager
- *
- * Dan Williams <dcbw@redhat.com>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- *
- * (C) Copyright 2004 Red Hat, Inc.
- */
-
-#ifndef NETWORK_MANAGER_DBUS_H
-#define NETWORK_MANAGER_DBUS_H
-
-#include <glib.h>
-#include <dbus/dbus.h>
-#include <dbus/dbus-glib.h>
-#include "NetworkManager.h"
-#include "NetworkManagerAPList.h"
-
-
-typedef enum
-{
- DEVICE_STATUS_INVALID,
- DEVICE_NOW_ACTIVE,
- DEVICE_NO_LONGER_ACTIVE,
- DEVICE_ACTIVATING,
- DEVICE_ACTIVATION_FAILED,
- DEVICE_ACTIVATION_CANCELED,
- DEVICE_ADDED,
- DEVICE_REMOVED,
- DEVICE_CARRIER_ON,
- DEVICE_CARRIER_OFF
-} DeviceStatus;
-
-
-static inline gboolean message_is_error (DBusMessage *msg)
-{
- g_return_val_if_fail (msg != NULL, FALSE);
-
- return (dbus_message_get_type (msg) == DBUS_MESSAGE_TYPE_ERROR);
-}
-
-
-DBusConnection *nm_dbus_init (NMData *data);
-
-gboolean nm_dbus_is_info_daemon_running (DBusConnection *connection);
-char * get_name_owner (DBusConnection *con, const char *name);
-
-char * nm_dbus_get_object_path_for_device (NMDevice *dev);
-char * nm_dbus_get_object_path_for_network (NMDevice *dev, NMAccessPoint *ap);
-
-void nm_dbus_schedule_device_status_change_signal (NMData *data, NMDevice *dev, NMAccessPoint *ap, DeviceStatus status);
-
-void nm_dbus_signal_state_change (DBusConnection *connection, NMData *data);
-
-void nm_dbus_signal_wireless_network_change (DBusConnection *connection, NMDevice *dev, NMAccessPoint *ap, NMNetworkStatus status, gint8 strength);
-
-void nm_dbus_get_user_key_for_network (DBusConnection *connection, NMActRequest *req, const gboolean new_key);
-
-void nm_dbus_cancel_get_user_key_for_network (DBusConnection *connection, NMActRequest *req);
-
-void nm_dbus_update_wireless_scan_method (DBusConnection *connection, NMData *data);
-
-NMAccessPoint *nm_dbus_get_network_object (DBusConnection *connection, NMNetworkType type, const char *network);
-
-gboolean nm_dbus_add_network_address (DBusConnection *connection, NMNetworkType type, const char *network, struct ether_addr *addr);
-
-gboolean nm_dbus_update_network_info (DBusConnection *connection, NMAccessPoint *ap, const gboolean user_requested);
-
-void nm_dbus_update_allowed_networks (DBusConnection *connection, NMAccessPointList *list, NMData *data);
-
-NMDevice * nm_dbus_get_device_from_object_path (NMData *data, const char *path);
-
-NMState nm_get_app_state_from_data (NMData *data);
-
-DBusMessage * nm_dbus_create_error_message (DBusMessage *message, const char *exception_namespace, const char *exception, const char *format, ...);
-
-#endif
diff --git a/src/NetworkManagerDbusUtils.c b/src/NetworkManagerDbusUtils.c
deleted file mode 100644
index 62cbf1ba1e..0000000000
--- a/src/NetworkManagerDbusUtils.c
+++ /dev/null
@@ -1,100 +0,0 @@
-/* NetworkManager -- Network link manager
- *
- * Dan Williams <dcbw@redhat.com>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- *
- * (C) Copyright 2005 Red Hat, Inc.
- */
-
-#include <syslog.h>
-#include "NetworkManagerDbusUtils.h"
-
-
-struct NMDbusMethodList
-{
- NMDbusMethod validate_method;
- GHashTable *methods;
-};
-
-
-NMDbusMethodList * nm_dbus_method_list_new (NMDbusMethod validate_method)
-{
- NMDbusMethodList *list = g_malloc0 (sizeof (NMDbusMethodList));
-
- if (list)
- {
- list->validate_method = validate_method;
- list->methods = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, NULL);
- }
-
- return list;
-}
-
-
-void nm_dbus_method_list_add_method (NMDbusMethodList *list, const char *method, NMDbusMethod callback)
-{
- g_return_if_fail (list != NULL);
- g_return_if_fail (list->methods != NULL);
- g_return_if_fail (method != NULL);
- g_return_if_fail (callback != NULL);
-
- g_hash_table_insert (list->methods, g_strdup (method), callback);
-}
-
-
-gboolean nm_dbus_method_dispatch (NMDbusMethodList *list, DBusConnection *connection, DBusMessage *message, gpointer user_data, DBusMessage **reply)
-{
- NMDbusMethod callback = NULL;
- const char *method;
- DBusMessage *temp_reply = NULL;
-
- if (reply)
- *reply = NULL;
-
- g_return_val_if_fail (list != NULL, FALSE);
- g_return_val_if_fail (list->methods != NULL, FALSE);
- g_return_val_if_fail (connection != NULL, FALSE);
- g_return_val_if_fail (message != NULL, FALSE);
-
- if (!(method = dbus_message_get_member (message)))
- return FALSE;
-
- if (!(callback = g_hash_table_lookup (list->methods, method)))
- return FALSE;
-
- /* Call the optional validate method first, if it returns NULL then we
- * actually dispatch the call.
- */
- if (list->validate_method)
- temp_reply = (*(list->validate_method)) (connection, message, (NMDbusCBData *)user_data);
- if (!temp_reply)
- temp_reply = (*callback) (connection, message, (NMDbusCBData *)user_data);
-
- if (reply)
- *reply = temp_reply;
-
- return (TRUE);
-}
-
-
-void nm_dbus_method_list_free (NMDbusMethodList *list)
-{
- if (list)
- {
- g_hash_table_destroy (list->methods);
- g_free (list);
- }
-}
diff --git a/src/NetworkManagerDbusUtils.h b/src/NetworkManagerDbusUtils.h
deleted file mode 100644
index f87927c0ac..0000000000
--- a/src/NetworkManagerDbusUtils.h
+++ /dev/null
@@ -1,52 +0,0 @@
-/* NetworkManager -- Network link manager
- *
- * Dan Williams <dcbw@redhat.com>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- *
- * (C) Copyright 2005 Red Hat, Inc.
- */
-
-#ifndef NETWORK_MANAGER_DBUS_UTILS_H
-#define NETWORK_MANAGER_DBUS_UTILS_H
-
-#include <glib.h>
-#include <dbus/dbus.h>
-#include <dbus/dbus-glib-lowlevel.h>
-#include <dbus/dbus-glib.h>
-
-#include "NetworkManagerDevice.h"
-
-typedef struct NMDbusCBData
-{
- NMData *data;
- NMDevice *dev;
- NMAccessPoint *ap;
-} NMDbusCBData;
-
-typedef DBusMessage* (*NMDbusMethod) (DBusConnection *, DBusMessage *, NMDbusCBData *);
-
-
-NMDbusMethodList * nm_dbus_method_list_new (NMDbusMethod validate_method);
-
-void nm_dbus_method_list_add_method (NMDbusMethodList *list, const char *method, NMDbusMethod callback);
-
-gboolean nm_dbus_method_dispatch (NMDbusMethodList *list, DBusConnection *connection, DBusMessage *message,
- gpointer user_data, DBusMessage **reply);
-
-void nm_dbus_method_list_free (NMDbusMethodList *list);
-
-
-#endif
diff --git a/src/NetworkManagerDevice.c b/src/NetworkManagerDevice.c
deleted file mode 100644
index 84c894d4b3..0000000000
--- a/src/NetworkManagerDevice.c
+++ /dev/null
@@ -1,4264 +0,0 @@
-/* NetworkManager -- Network link manager
- *
- * Dan Williams <dcbw@redhat.com>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- *
- * (C) Copyright 2005 Red Hat, Inc.
- */
-
-#include <errno.h>
-#include <glib.h>
-#include <dbus/dbus-glib.h>
-#include <libhal.h>
-#include <iwlib.h>
-#include <signal.h>
-#include <string.h>
-
-#include "autoip.h"
-#include "NetworkManager.h"
-#include "NetworkManagerMain.h"
-#include "NetworkManagerDevice.h"
-#include "NetworkManagerDevicePrivate.h"
-#include "NetworkManagerUtils.h"
-#include "NetworkManagerDbus.h"
-#include "NetworkManagerWireless.h"
-#include "NetworkManagerPolicy.h"
-#include "NetworkManagerAPList.h"
-#include "NetworkManagerSystem.h"
-#include "nm-ip4-config.h"
-#include "nm-vpn-manager.h"
-#include "nm-dhcp-manager.h"
-#include "nm-activation-request.h"
-#include "nm-utils.h"
-
-/* Local static prototypes */
-static gpointer nm_device_worker (gpointer user_data);
-static gboolean nm_device_wireless_scan (gpointer user_data);
-static gboolean supports_mii_carrier_detect (NMDevice *dev);
-static gboolean supports_ethtool_carrier_detect (NMDevice *dev);
-static gboolean nm_device_bring_up_wait (NMDevice *dev, gboolean cancelable);
-static gboolean link_to_specific_ap (NMDevice *dev, NMAccessPoint *ap, gboolean default_link);
-
-static void nm_device_activate_schedule_stage1_device_prepare (NMActRequest *req);
-static void nm_device_activate_schedule_stage2_device_config (NMActRequest *req);
-static void nm_device_activate_schedule_stage3_ip_config_start (NMActRequest *req);
-static void nm_device_activate_schedule_stage5_ip_config_commit (NMActRequest *req);
-
-typedef struct
-{
- NMDevice *dev;
- struct wireless_scan_head scan_head;
-} NMWirelessScanResults;
-
-typedef struct
-{
- NMDevice *dev;
- gboolean reschedule;
-} NMWirelessScanCB;
-
-/******************************************************/
-
-
-/******************************************************/
-
-/*
- * nm_device_test_wireless_extensions
- *
- * Test whether a given device is a wireless one or not.
- *
- */
-static gboolean nm_device_test_wireless_extensions (NMDevice *dev)
-{
- int err = -1;
- char ioctl_buf[64];
- NMSock *sk;
-
- g_return_val_if_fail (dev != NULL, FALSE);
-
- /* We obviously cannot probe test devices (since they don't
- * actually exist in hardware).
- */
- if (dev->test_device)
- return (FALSE);
-
- ioctl_buf[63] = 0;
- strncpy (ioctl_buf, nm_device_get_iface(dev), 63);
-
- if ((sk = nm_dev_sock_open (dev, DEV_WIRELESS, __FUNCTION__, NULL)))
- {
-#ifdef IOCTL_DEBUG
- nm_info ("%s: About to GET IWNAME\n", nm_device_get_iface (dev));
-#endif
- err = ioctl (nm_dev_sock_get_fd (sk), SIOCGIWNAME, ioctl_buf);
-#ifdef IOCTL_DEBUG
- nm_info ("%s: Done with GET IWNAME\n", nm_device_get_iface (dev));
-#endif
- nm_dev_sock_close (sk);
- }
- return (err == 0);
-}
-
-
-/*
- * nm_device_supports_wireless_scan
- *
- * Test whether a given device is a wireless one or not.
- *
- */
-static gboolean nm_device_supports_wireless_scan (NMDevice *dev)
-{
- NMSock *sk;
- int err;
- gboolean can_scan = TRUE;
- wireless_scan_head scan_data;
-
- g_return_val_if_fail (dev != NULL, FALSE);
- g_return_val_if_fail (dev->type == DEVICE_TYPE_WIRELESS_ETHERNET, FALSE);
-
- /* A test wireless device can always scan (we generate fake scan data for it) */
- if (dev->test_device)
- return (TRUE);
-
- if ((sk = nm_dev_sock_open (dev, DEV_WIRELESS, __FUNCTION__, NULL)))
- {
- err = iw_scan (nm_dev_sock_get_fd (sk), (char *)nm_device_get_iface (dev), WIRELESS_EXT, &scan_data);
- nm_dispose_scan_results (scan_data.result);
- if ((err == -1) && (errno == EOPNOTSUPP))
- can_scan = FALSE;
- nm_dev_sock_close (sk);
- }
- return (can_scan);
-}
-
-
-/*
- * nm_get_device_by_udi
- *
- * Search through the device list for a device with a given UDI.
- *
- * NOTE: the caller MUST hold the device list mutex already to make
- * this routine thread-safe.
- *
- */
-NMDevice *nm_get_device_by_udi (NMData *data, const char *udi)
-{
- NMDevice *dev = NULL;
- GSList *elt;
-
- g_return_val_if_fail (data != NULL, NULL);
- g_return_val_if_fail (udi != NULL, NULL);
-
- for (elt = data->dev_list; elt; elt = g_slist_next (elt))
- {
- if ((dev = (NMDevice *)(elt->data)))
- {
- if (nm_null_safe_strcmp (nm_device_get_udi (dev), udi) == 0)
- break;
- }
- }
-
- return (dev);
-}
-
-
-/*
- * nm_get_device_by_iface
- *
- * Search through the device list for a device with a given iface.
- *
- * NOTE: the caller MUST hold the device list mutex already to make
- * this routine thread-safe.
- *
- */
-NMDevice *nm_get_device_by_iface (NMData *data, const char *iface)
-{
- NMDevice *iter_dev = NULL;
- NMDevice *found_dev = NULL;
- GSList *elt;
-
- g_return_val_if_fail (data != NULL, NULL);
- g_return_val_if_fail (iface != NULL, NULL);
-
- for (elt = data->dev_list; elt; elt = g_slist_next (elt))
- {
- iter_dev = (NMDevice *)(elt->data);
- if (iter_dev)
- {
- if (nm_null_safe_strcmp (nm_device_get_iface (iter_dev), iface) == 0)
- {
- found_dev = iter_dev;
- break;
- }
- }
- }
-
- return (found_dev);
-}
-
-
-/*****************************************************************************/
-/* NMDevice object routines */
-/*****************************************************************************/
-
-
-/*
- * nm_device_copy_allowed_to_dev_list
- *
- * For devices that don't support wireless scanning, copy
- * the allowed AP list to the device's ap list.
- *
- */
-void nm_device_copy_allowed_to_dev_list (NMDevice *dev, NMAccessPointList *allowed_list)
-{
- NMAPListIter *iter;
- NMAccessPoint *src_ap;
- NMAccessPointList *dev_list;
-
- g_return_if_fail (dev != NULL);
-
- if (allowed_list == NULL)
- return;
-
- nm_device_ap_list_clear (dev);
- dev->options.wireless.ap_list = nm_ap_list_new (NETWORK_TYPE_ALLOWED);
-
- if (!(iter = nm_ap_list_iter_new (allowed_list)))
- return;
-
- dev_list = nm_device_ap_list_get (dev);
- while ((src_ap = nm_ap_list_iter_next (iter)))
- {
- NMAccessPoint *dst_ap = nm_ap_new_from_ap (src_ap);
-
- /* Assume that if the allowed list AP has a saved encryption
- * key that the AP is encrypted.
- */
- if ( (nm_ap_get_auth_method (src_ap) == NM_DEVICE_AUTH_METHOD_OPEN_SYSTEM)
- || (nm_ap_get_auth_method (src_ap) == NM_DEVICE_AUTH_METHOD_SHARED_KEY))
- nm_ap_set_encrypted (dst_ap, TRUE);
-
- nm_ap_list_append_ap (dev_list, dst_ap);
- nm_ap_unref (dst_ap);
- }
- nm_ap_list_iter_free (iter);
-}
-
-
-/*
- * nm_device_new
- *
- * Creates and initializes the structure representation of an NM device. For test
- * devices, a device type other than DEVICE_TYPE_DONT_KNOW must be specified, this
- * argument is ignored for real hardware devices since they are auto-probed.
- *
- */
-NMDevice *nm_device_new (const char *iface, const char *udi, gboolean test_dev, NMDeviceType test_dev_type, NMData *app_data)
-{
- NMDevice *dev;
- GError *error = NULL;
- nm_completion_args args;
-
- g_return_val_if_fail (iface != NULL, NULL);
- g_return_val_if_fail (strlen (iface) > 0, NULL);
- g_return_val_if_fail (app_data != NULL, NULL);
-
- /* Test devices must have a valid type specified */
- if (test_dev && !(test_dev_type != DEVICE_TYPE_DONT_KNOW))
- return (NULL);
-
- /* Another check to make sure we don't create a test device unless
- * test devices were enabled on the command line.
- */
- if (!app_data->enable_test_devices && test_dev)
- {
- nm_warning ("attempt to create a test device, but test devices were not enabled "
- "on the command line. Will not create the device.");
- return (NULL);
- }
-
- dev = g_malloc0 (sizeof (NMDevice));
-
- dev->refcount = 2; /* 1 for starters, and another 1 for the worker thread */
- dev->app_data = app_data;
- dev->iface = g_strdup (iface);
- dev->test_device = test_dev;
- nm_device_set_udi (dev, udi);
- dev->use_dhcp = TRUE;
-
- /* Real hardware devices are probed for their type, test devices must have
- * their type specified.
- */
- if (test_dev)
- dev->type = test_dev_type;
- else
- dev->type = nm_device_test_wireless_extensions (dev) ?
- DEVICE_TYPE_WIRELESS_ETHERNET : DEVICE_TYPE_WIRED_ETHERNET;
-
- /* Device thread's main loop */
- dev->context = g_main_context_new ();
- dev->loop = g_main_loop_new (dev->context, FALSE);
-
- if (!dev->context || !dev->loop)
- goto err;
-
- /* Have to bring the device up before checking link status and other stuff */
- nm_device_bring_up_wait (dev, 0);
-
- /* Initialize wireless-specific options */
- if (nm_device_is_wireless (dev))
- {
- NMSock *sk;
- NMDeviceWirelessOptions *opts = &(dev->options.wireless);
-
- nm_device_set_mode (dev, NETWORK_MODE_INFRA);
-
- opts->scan_interval = 20;
-
- opts->scan_mutex = g_mutex_new ();
- opts->ap_list = nm_ap_list_new (NETWORK_TYPE_DEVICE);
- if (!opts->scan_mutex || !opts->ap_list)
- goto err;
-
- nm_register_mutex_desc (opts->scan_mutex, "Scan Mutex");
-
- opts->supports_wireless_scan = nm_device_supports_wireless_scan (dev);
-
- /* Non-scanning devices show the entire allowed AP list as their
- * available networks.
- */
- if (opts->supports_wireless_scan == FALSE)
- nm_device_copy_allowed_to_dev_list (dev, app_data->allowed_ap_list);
-
- if ((sk = nm_dev_sock_open (dev, DEV_WIRELESS, __FUNCTION__, NULL)))
- {
- iwrange range;
- if (iw_get_range_info (nm_dev_sock_get_fd (sk), nm_device_get_iface (dev), &range) >= 0)
- {
- int i;
-
- opts->max_qual.qual = range.max_qual.qual;
- opts->max_qual.level = range.max_qual.level;
- opts->max_qual.noise = range.max_qual.noise;
- opts->max_qual.updated = range.max_qual.updated;
-
- opts->avg_qual.qual = range.avg_qual.qual;
- opts->avg_qual.level = range.avg_qual.level;
- opts->avg_qual.noise = range.avg_qual.noise;
- opts->avg_qual.updated = range.avg_qual.updated;
-
- opts->num_freqs = MIN (range.num_frequency, IW_MAX_FREQUENCIES);
- for (i = 0; i < opts->num_freqs; i++)
- opts->freqs[i] = iw_freq2float (&(range.freq[i]));
- }
- nm_dev_sock_close (sk);
- }
- }
- else if (nm_device_is_wired (dev))
- {
- if (supports_ethtool_carrier_detect (dev) || supports_mii_carrier_detect (dev))
- dev->options.wired.has_carrier_detect = TRUE;
- }
-
- /* Must be called after carrier detect or wireless scan detect. */
- dev->driver_support_level = nm_get_driver_support_level (dev->app_data->hal_ctx, dev);
-
- if (nm_device_get_driver_support_level (dev) != NM_DRIVER_UNSUPPORTED)
- {
- nm_device_set_link_active (dev, nm_device_probe_link_state (dev));
- nm_device_update_ip4_address (dev);
- nm_device_update_hw_address (dev);
-
- /* Grab IP config data for this device from the system configuration files */
- dev->system_config_data = nm_system_device_get_system_config (dev);
- dev->use_dhcp = nm_system_device_get_use_dhcp (dev);
- }
-
- dev->worker = g_thread_create (nm_device_worker, dev, TRUE, &error);
- if (!dev->worker)
- {
- nm_error ("could not create device worker thread. (glib said: '%s')", error->message);
- g_error_free (error);
- goto err;
- }
-
- /* Block until our device thread has actually had a chance to start. */
- args[0] = &dev->worker_started;
- args[1] = (gpointer) "nm_device_new(): waiting for device's worker thread to start";
- args[2] = GINT_TO_POINTER (LOG_INFO);
- args[3] = GINT_TO_POINTER (0);
- nm_wait_for_completion (NM_COMPLETION_TRIES_INFINITY,
- G_USEC_PER_SEC / 20, nm_completion_boolean_test, NULL, args);
-
- nm_info ("nm_device_new(): device's worker thread started, continuing.");
-
- return (dev);
-
-err:
- /* Initial refcount is 2 */
- nm_device_unref (dev);
- nm_device_unref (dev);
- return NULL;
-}
-
-
-/*
- * Refcounting functions
- */
-void nm_device_ref (NMDevice *dev)
-{
- g_return_if_fail (dev != NULL);
-
- dev->refcount++;
-}
-
-/*
- * nm_device_unref
- *
- * Decreases the refcount on a device by 1, and if the refcount reaches 0,
- * deallocates memory used by the device.
- *
- * Returns: FALSE if device was not deallocated
- * TRUE if device was deallocated
- */
-gboolean nm_device_unref (NMDevice *dev)
-{
- gboolean deleted = FALSE;
-
- g_return_val_if_fail (dev != NULL, TRUE);
-
- if (dev->refcount == 1)
- {
- nm_device_worker_thread_stop (dev);
- nm_device_bring_down (dev);
-
- if (nm_device_is_wireless (dev))
- {
- nm_device_ap_list_clear (dev);
-
- g_mutex_free (dev->options.wireless.scan_mutex);
- if (dev->options.wireless.ap_list)
- nm_ap_list_unref (dev->options.wireless.ap_list);
- }
-
- nm_system_device_free_system_config (dev, dev->system_config_data);
- if (dev->ip4_config)
- nm_ip4_config_unref (dev->ip4_config);
-
- if (dev->act_request)
- nm_act_request_unref (dev->act_request);
-
- g_free (dev->udi);
- g_free (dev->iface);
- memset (dev, 0, sizeof (NMDevice));
- g_free (dev);
- deleted = TRUE;
- }
- else
- dev->refcount--;
-
- return deleted;
-}
-
-
-/*
- * nm_device_worker
- *
- * Main thread of the device.
- *
- */
-static gpointer nm_device_worker (gpointer user_data)
-{
- NMDevice *dev = (NMDevice *)user_data;
-
- if (!dev)
- {
- nm_error ("received NULL device object, NetworkManager cannot continue.");
- exit (1);
- }
-
- /* Start the scanning timeout for devices that can do scanning */
- if (nm_device_is_wireless (dev) && nm_device_get_supports_wireless_scan (dev))
- {
- GSource *source = g_idle_source_new ();
- guint source_id = 0;
- NMWirelessScanCB *scan_cb;
-
- scan_cb = g_malloc0 (sizeof (NMWirelessScanCB));
- scan_cb->dev = dev;
- scan_cb->reschedule = TRUE;
-
- g_source_set_callback (source, nm_device_wireless_scan, scan_cb, NULL);
- source_id = g_source_attach (source, dev->context);
- g_source_unref (source);
- }
-
- dev->worker_started = TRUE;
- g_main_loop_run (dev->loop);
-
- g_main_loop_unref (dev->loop);
- g_main_context_unref (dev->context);
-
- dev->loop = NULL;
- dev->context = NULL;
-
- nm_device_unref (dev);
-
- return NULL;
-}
-
-
-void nm_device_worker_thread_stop (NMDevice *dev)
-{
- g_return_if_fail (dev != NULL);
-
- if (dev->loop)
- g_main_loop_quit (dev->loop);
- if (dev->worker)
- {
- g_thread_join (dev->worker);
- dev->worker = NULL;
- }
-}
-
-
-/*
- * nm_device_get_app_data
- *
- */
-NMData *nm_device_get_app_data (const NMDevice *dev)
-{
- g_return_val_if_fail (dev != NULL, FALSE);
-
- return (dev->app_data);
-}
-
-
-/*
- * Get/Set for "removed" flag
- */
-gboolean nm_device_get_removed (const NMDevice *dev)
-{
- g_return_val_if_fail (dev != NULL, TRUE);
-
- return (dev->removed);
-}
-
-void nm_device_set_removed (NMDevice *dev, const gboolean removed)
-{
- g_return_if_fail (dev != NULL);
-
- dev->removed = removed;
-}
-
-
-/*
- * Return the amount of time we should wait for the device
- * to get a link, based on the # of frequencies it has to
- * scan.
- */
-static gint nm_device_get_association_pause_value (NMDevice *dev)
-{
- g_return_val_if_fail (dev != NULL, -1);
- g_return_val_if_fail (nm_device_is_wireless (dev), -1);
-
- /* If the card supports more than 14 channels, we should probably wait
- * around 10s so it can scan them all. After we set the ESSID on the card, the card
- * has to scan all channels to find our requested AP (which can take a long time
- * if it is an A/B/G chipset like the Atheros 5212, for example).
- */
- if (dev->options.wireless.num_freqs > 14)
- return 8;
- else
- return 5;
-}
-
-
-/*
- * Get/set functions for UDI
- */
-char * nm_device_get_udi (NMDevice *dev)
-{
- g_return_val_if_fail (dev != NULL, NULL);
-
- return (dev->udi);
-}
-
-void nm_device_set_udi (NMDevice *dev, const char *udi)
-{
- g_return_if_fail (dev != NULL);
- g_return_if_fail (udi != NULL);
-
- if (dev->udi)
- g_free (dev->udi);
-
- dev->udi = g_strdup (udi);
-}
-
-
-/*
- * Get/set functions for iface
- */
-const char * nm_device_get_iface (NMDevice *dev)
-{
- g_return_val_if_fail (dev != NULL, NULL);
-
- return (dev->iface);
-}
-
-
-/*
- * Get/set functions for type
- */
-guint nm_device_get_type (NMDevice *dev)
-{
- g_return_val_if_fail (dev != NULL, DEVICE_TYPE_DONT_KNOW);
-
- return (dev->type);
-}
-
-gboolean nm_device_is_wireless (NMDevice *dev)
-{
- g_return_val_if_fail (dev != NULL, FALSE);
-
- return (dev->type == DEVICE_TYPE_WIRELESS_ETHERNET);
-}
-
-gboolean nm_device_is_wired (NMDevice *dev)
-{
- g_return_val_if_fail (dev != NULL, FALSE);
-
- return (dev->type == DEVICE_TYPE_WIRED_ETHERNET);
-}
-
-
-/*
- * Accessor for driver support level
- */
-NMDriverSupportLevel nm_device_get_driver_support_level (NMDevice *dev)
-{
- g_return_val_if_fail (dev != NULL, NM_DRIVER_UNSUPPORTED);
-
- return (dev->driver_support_level);
-}
-
-
-/*
- * Get/set functions for link_active
- */
-gboolean nm_device_has_active_link (NMDevice *dev)
-{
- g_return_val_if_fail (dev != NULL, FALSE);
-
- return (dev->link_active);
-}
-
-void nm_device_set_link_active (NMDevice *dev, const gboolean link_active)
-{
- g_return_if_fail (dev != NULL);
- g_return_if_fail (dev->app_data != NULL);
-
- if (dev->link_active != link_active)
- {
- dev->link_active = link_active;
-
- /* Deactivate a currently active device */
- if (!link_active && nm_device_get_act_request (dev))
- {
- nm_device_deactivate (dev);
- nm_policy_schedule_device_change_check (dev->app_data);
- }
- else if (link_active && !nm_device_get_act_request (dev))
- {
- NMDevice * act_dev = nm_get_active_device (dev->app_data);
- NMActRequest * act_dev_req = act_dev ? nm_device_get_act_request (act_dev) : NULL;
-
- /* Should we switch to this device now that it has a link?
- *
- * Only auto-switch for wired devices, AND...
- *
- * only switch to fully-supported devices, since ones that don't have carrier detection
- * capability usually report the carrier as "always on" even if its not really on. User
- * must manually choose semi-supported devices.
- *
- */
- if (nm_device_is_wired (dev) && (nm_device_get_driver_support_level (dev) == NM_DRIVER_FULLY_SUPPORTED))
- {
- gboolean do_switch = act_dev ? FALSE : TRUE; /* If no currently active device, switch to this one */
- NMActRequest * act_req;
-
- /* If active device is wireless, switch to this one */
- if (act_dev && nm_device_is_wireless (act_dev) && act_dev_req && !nm_act_request_get_user_requested (act_dev_req))
- do_switch = TRUE;
-
- if (do_switch && (act_req = nm_act_request_new (dev->app_data, dev, NULL, TRUE)))
- {
- nm_info ("Will activate wired connection '%s' because it now has a link.", nm_device_get_iface (dev));
- nm_policy_schedule_device_activation (act_req);
- }
- }
- }
- nm_dbus_schedule_device_status_change_signal (dev->app_data, dev, NULL, link_active ? DEVICE_CARRIER_ON : DEVICE_CARRIER_OFF);
- }
-}
-
-
-/*
- * Get function for supports_wireless_scan
- */
-gboolean nm_device_get_supports_wireless_scan (NMDevice *dev)
-{
- g_return_val_if_fail (dev != NULL, FALSE);
-
- if (!nm_device_is_wireless (dev))
- return (FALSE);
-
- return (dev->options.wireless.supports_wireless_scan);
-}
-
-
-/*
- * nm_device_get_supports_carrier_detect
- */
-gboolean nm_device_get_supports_carrier_detect (NMDevice *dev)
-{
- g_return_val_if_fail (dev != NULL, FALSE);
-
- if (!nm_device_is_wired (dev))
- return (FALSE);
-
- return (dev->options.wired.has_carrier_detect);
-}
-
-/*
- * nm_device_wireless_is_associated
- *
- * Figure out whether or not we're associated to an access point
- */
-static gboolean nm_device_wireless_is_associated (NMDevice *dev)
-{
- struct iwreq wrq;
- NMSock *sk;
- gboolean associated = FALSE;
-
- g_return_val_if_fail (dev != NULL, FALSE);
- g_return_val_if_fail (dev->app_data != NULL, FALSE);
-
- /* Test devices have their link state set through DBUS */
- if (dev->test_device)
- return nm_device_has_active_link (dev);
-
- if ((sk = nm_dev_sock_open (dev, DEV_WIRELESS, __FUNCTION__, NULL)) == NULL)
- return FALSE;
-
- /* Some cards, for example ipw2x00 cards, can short-circuit the MAC
- * address check using this check on IWNAME. Its faster.
- */
- memset (&wrq, 0, sizeof (struct iwreq));
-#ifdef IOCTL_DEBUG
- nm_info ("%s: About to GET IWNAME.", nm_device_get_iface (dev));
-#endif
- if (iw_get_ext (nm_dev_sock_get_fd (sk), nm_device_get_iface (dev), SIOCGIWNAME, &wrq) >= 0)
- {
- if (!strcmp(wrq.u.name, "unassociated"))
- {
- associated = FALSE;
- goto out;
- }
- }
-
- if (!associated)
- {
- /*
- * For all other wireless cards, the best indicator of a "link" at this time
- * seems to be whether the card has a valid access point MAC address.
- * Is there a better way? Some cards don't work too well with this check, ie
- * Lucent WaveLAN.
- */
-#ifdef IOCTL_DEBUG
- nm_info ("%s: About to GET IWAP.", nm_device_get_iface (dev));
-#endif
- if (iw_get_ext (nm_dev_sock_get_fd (sk), nm_device_get_iface (dev), SIOCGIWAP, &wrq) >= 0)
- if (nm_ethernet_address_is_valid ((struct ether_addr *)(&(wrq.u.ap_addr.sa_data))))
- associated = TRUE;
- }
-
-out:
- nm_dev_sock_close (sk);
-
- return associated;
-}
-
-/*
- * nm_device_probe_wireless_link_state
- *
- * Gets the link state of a wireless device. WARNING: results are not
- * conclusive if the device is currently activating.
- *
- */
-static gboolean nm_device_probe_wireless_link_state (NMDevice *dev)
-{
- gboolean link = FALSE;
- NMAccessPoint *best_ap;
-
- g_return_val_if_fail (dev != NULL, FALSE);
- g_return_val_if_fail (dev->app_data != NULL, FALSE);
-
- /* Test devices have their link state set through DBUS */
- if (dev->test_device)
- return nm_device_has_active_link (dev);
-
- if ((best_ap = nm_device_get_best_ap (dev)))
- {
- link = link_to_specific_ap (dev, best_ap, TRUE);
- nm_ap_unref (best_ap);
- }
-
- return link;
-}
-
-
-/*
- * nm_device_probe_wired_link_state
- *
- *
- *
- */
-static gboolean nm_device_probe_wired_link_state (NMDevice *dev)
-{
- gboolean link = FALSE;
- gchar *contents, *carrier_path;
- gsize length;
-
- g_return_val_if_fail (dev != NULL, FALSE);
- g_return_val_if_fail (nm_device_is_wired (dev) == TRUE, FALSE);
- g_return_val_if_fail (dev->app_data != NULL, FALSE);
-
- /* Test devices have their link state set through DBUS */
- if (dev->test_device)
- return nm_device_has_active_link (dev);
-
- if (dev->removed)
- return FALSE;
-
- carrier_path = g_strdup_printf ("/sys/class/net/%s/carrier", dev->iface);
- if (g_file_get_contents (carrier_path, &contents, &length, NULL))
- {
- link = (gboolean) atoi (contents);
- g_free (contents);
- }
- g_free (carrier_path);
-
- /* We say that non-carrier-detect devices always have a link, because
- * they never get auto-selected by NM. User has to force them on us,
- * so we just hope the user knows whether or not the cable's plugged in.
- */
- if (dev->options.wired.has_carrier_detect != TRUE)
- link = TRUE;
-
- return link;
-}
-
-
-/*
- * nm_device_probe_link_state
- *
- * Return the current link state of the device.
- *
- */
-gboolean nm_device_probe_link_state (NMDevice *dev)
-{
- gboolean link = FALSE;
-
- g_return_val_if_fail (dev != NULL, FALSE);
-
- if (!nm_device_is_up (dev))
- nm_device_bring_up (dev);
-
- if (nm_device_is_wireless (dev))
- {
- link = nm_device_probe_wireless_link_state (dev);
- nm_device_update_signal_strength (dev);
- }
- else if (nm_device_is_wired (dev))
- link = nm_device_probe_wired_link_state (dev);
-
- return link;
-}
-
-
-/*
- * nm_device_get_essid
- *
- * If a device is wireless, return the essid that it is attempting
- * to use.
- *
- * Returns: allocated string containing essid. Must be freed by caller.
- *
- */
-char * nm_device_get_essid (NMDevice *dev)
-{
- NMSock *sk;
- int err;
-
- g_return_val_if_fail (dev != NULL, NULL);
- g_return_val_if_fail (nm_device_is_wireless (dev), NULL);
-
- /* Test devices return the essid of their "best" access point
- * or if there is none, the contents of the cur_essid field.
- */
- if (dev->test_device)
- {
- NMAccessPoint *best_ap = nm_device_get_best_ap (dev);
- char *essid = dev->options.wireless.cur_essid;
-
- /* Or, if we've got a best ap, use that ESSID instead */
- if (best_ap)
- {
- essid = nm_ap_get_essid (best_ap);
- nm_ap_unref (best_ap);
- }
- return essid;
- }
-
- if ((sk = nm_dev_sock_open (dev, DEV_WIRELESS, __FUNCTION__, NULL)))
- {
- wireless_config info;
-
-#ifdef IOCTL_DEBUG
- nm_info ("%s: About to GET 'basic config' for ESSID.", nm_device_get_iface (dev));
-#endif
- err = iw_get_basic_config (nm_dev_sock_get_fd (sk), nm_device_get_iface (dev), &info);
- if (err >= 0)
- {
- if (dev->options.wireless.cur_essid)
- g_free (dev->options.wireless.cur_essid);
- dev->options.wireless.cur_essid = g_strdup (info.essid);
- }
- else
- nm_warning ("nm_device_get_essid(): error getting ESSID for device %s. errno = %d", nm_device_get_iface (dev), errno);
-
- nm_dev_sock_close (sk);
- }
-
- return (dev->options.wireless.cur_essid);
-}
-
-
-/*
- * nm_device_set_essid
- *
- * If a device is wireless, set the essid that it should use.
- */
-void nm_device_set_essid (NMDevice *dev, const char *essid)
-{
- NMSock *sk;
- int err;
- struct iwreq wreq;
- unsigned char safe_essid[IW_ESSID_MAX_SIZE + 1] = "\0";
-
- g_return_if_fail (dev != NULL);
- g_return_if_fail (nm_device_is_wireless (dev));
-
- /* Test devices directly set cur_essid */
- if (dev->test_device)
- {
- if (dev->options.wireless.cur_essid)
- g_free (dev->options.wireless.cur_essid);
- dev->options.wireless.cur_essid = g_strdup (essid);
- return;
- }
-
- /* Make sure the essid we get passed is a valid size */
- if (!essid)
- safe_essid[0] = '\0';
- else
- {
- strncpy (safe_essid, essid, IW_ESSID_MAX_SIZE);
- safe_essid[IW_ESSID_MAX_SIZE] = '\0';
- }
-
- if ((sk = nm_dev_sock_open (dev, DEV_WIRELESS, __FUNCTION__, NULL)))
- {
- wreq.u.essid.pointer = (caddr_t) safe_essid;
- wreq.u.essid.length = strlen (safe_essid) + 1;
- wreq.u.essid.flags = 1; /* Enable essid on card */
-
-#ifdef IOCTL_DEBUG
- nm_info ("%s: About to SET IWESSID.", nm_device_get_iface (dev));
-#endif
- if ((err = iw_set_ext (nm_dev_sock_get_fd (sk), nm_device_get_iface (dev), SIOCSIWESSID, &wreq)) == -1)
- {
- if (errno != ENODEV)
- nm_warning ("nm_device_set_essid(): error setting ESSID '%s' for device %s. errno = %d", safe_essid, nm_device_get_iface (dev), errno);
- }
-
- nm_dev_sock_close (sk);
-
- /* Orinoco cards seem to need extra time here to not screw
- * up the firmware, which reboots when you set the ESSID.
- * Unfortunately, there's no way to know when the card is back up
- * again. Sigh...
- */
- sleep (2);
- }
-}
-
-
-/*
- * nm_device_get_frequency
- *
- * For wireless devices, get the frequency we broadcast/receive on.
- *
- */
-static double nm_device_get_frequency (NMDevice *dev)
-{
- NMSock *sk;
- int err;
- double freq = 0;
-
- g_return_val_if_fail (dev != NULL, 0);
- g_return_val_if_fail (nm_device_is_wireless (dev), 0);
-
- /* Test devices don't really have a frequency, they always succeed */
- if (dev->test_device)
- return 703000000;
-
- if ((sk = nm_dev_sock_open (dev, DEV_WIRELESS, __FUNCTION__, NULL)))
- {
- struct iwreq wrq;
-
-#ifdef IOCTL_DEBUG
- nm_info ("%s: About to GET IWFREQ.", nm_device_get_iface (dev));
-#endif
- err = iw_get_ext (nm_dev_sock_get_fd (sk), nm_device_get_iface (dev), SIOCGIWFREQ, &wrq);
- if (err >= 0)
- freq = iw_freq2float (&wrq.u.freq);
- if (err == -1)
- nm_warning ("nm_device_get_frequency(): error getting frequency for device %s. errno = %d", nm_device_get_iface (dev), errno);
-
- nm_dev_sock_close (sk);
- }
- return (freq);
-}
-
-
-/*
- * nm_device_set_frequency
- *
- * For wireless devices, set the frequency to broadcast/receive on.
- * A frequency <= 0 means "auto".
- *
- */
-static void nm_device_set_frequency (NMDevice *dev, const double freq)
-{
- NMSock *sk;
- int err;
-
- /* HACK FOR NOW */
- if (freq <= 0)
- return;
-
- g_return_if_fail (dev != NULL);
- g_return_if_fail (nm_device_is_wireless (dev));
-
- /* Test devices don't really have a frequency, they always succeed */
- if (dev->test_device)
- return;
-
- if (nm_device_get_frequency (dev) == freq)
- return;
-
- if ((sk = nm_dev_sock_open (dev, DEV_WIRELESS, __FUNCTION__, NULL)))
- {
- struct iwreq wrq;
-
- if (freq <= 0)
- {
- /* Auto */
- /* People like to make things hard for us. Even though iwlib/iwconfig say
- * that wrq.u.freq.m should be -1 for "auto" mode, nobody actually supports
- * that. Madwifi actually uses "0" to mean "auto". So, we'll try 0 first
- * and if that doesn't work, fall back to the iwconfig method and use -1.
- *
- * As a further note, it appears that Atheros/Madwifi cards can't go back to
- * any-channel operation once you force set the channel on them. For example,
- * if you set a prism54 card to a specific channel, but then set the ESSID to
- * something else later, it will scan for the ESSID and switch channels just fine.
- * Atheros cards, however, just stay at the channel you previously set and don't
- * budge, no matter what you do to them, until you tell them to go back to
- * any-channel operation.
- */
- wrq.u.freq.m = 0;
- wrq.u.freq.e = 0;
- wrq.u.freq.flags = 0;
- }
- else
- {
- /* Fixed */
- wrq.u.freq.flags = IW_FREQ_FIXED;
- iw_float2freq (freq, &wrq.u.freq);
- }
-#ifdef IOCTL_DEBUG
- nm_info ("%s: About to SET IWFREQ.", nm_device_get_iface (dev));
-#endif
- if ((err = iw_set_ext (nm_dev_sock_get_fd (sk), nm_device_get_iface (dev), SIOCSIWFREQ, &wrq)) == -1)
- {
- gboolean success = FALSE;
- if ((freq <= 0) && ((errno == EINVAL) || (errno == EOPNOTSUPP)))
- {
- /* Ok, try "auto" the iwconfig way if the Atheros way didn't work */
- wrq.u.freq.m = -1;
- wrq.u.freq.e = 0;
- wrq.u.freq.flags = 0;
- if (iw_set_ext (nm_dev_sock_get_fd (sk), nm_device_get_iface (dev), SIOCSIWFREQ, &wrq) != -1)
- success = TRUE;
- }
- }
-
- nm_dev_sock_close (sk);
- }
-}
-
-
-/*
- * nm_device_get_bitrate
- *
- * For wireless devices, get the bitrate to broadcast/receive at.
- * Returned value is rate in KHz.
- *
- */
-static int nm_device_get_bitrate (NMDevice *dev)
-{
- NMSock *sk;
- int err = -1;
- struct iwreq wrq;
-
- g_return_val_if_fail (dev != NULL, 0);
- g_return_val_if_fail (nm_device_is_wireless (dev), 0);
-
- /* Test devices don't really have a bitrate, they always succeed */
- if (dev->test_device)
- return 11;
-
- if ((sk = nm_dev_sock_open (dev, DEV_WIRELESS, __FUNCTION__, NULL)))
- {
-#ifdef IOCTL_DEBUG
- nm_info ("%s: About to GET IWRATE.", nm_device_get_iface (dev));
-#endif
- err = iw_get_ext (nm_dev_sock_get_fd (sk), nm_device_get_iface (dev), SIOCGIWRATE, &wrq);
- nm_dev_sock_close (sk);
- }
-
- return ((err >= 0) ? wrq.u.bitrate.value / 1000 : 0);
-}
-
-
-/*
- * nm_device_set_bitrate
- *
- * For wireless devices, set the bitrate to broadcast/receive at.
- * Rate argument should be in Mbps (mega-bits per second), or 0 for automatic.
- *
- */
-static void nm_device_set_bitrate (NMDevice *dev, const int Mbps)
-{
- NMSock *sk;
-
- g_return_if_fail (dev != NULL);
- g_return_if_fail (nm_device_is_wireless (dev));
-
- /* Test devices don't really have a bitrate, they always succeed */
- if (dev->test_device)
- return;
-
- if (nm_device_get_bitrate (dev) == Mbps)
- return;
-
- if ((sk = nm_dev_sock_open (dev, DEV_WIRELESS, __FUNCTION__, NULL)))
- {
- struct iwreq wrq;
-
- if (Mbps != 0)
- {
- wrq.u.bitrate.value = Mbps * 1000;
- wrq.u.bitrate.fixed = 1;
- }
- else
- {
- /* Auto bitrate */
- wrq.u.bitrate.value = -1;
- wrq.u.bitrate.fixed = 0;
- }
- /* Silently fail as not all drivers support setting bitrate yet (ipw2x00 for example) */
-#ifdef IOCTL_DEBUG
- nm_info ("%s: About to SET IWRATE.", nm_device_get_iface (dev));
-#endif
- iw_set_ext (nm_dev_sock_get_fd (sk), nm_device_get_iface (dev), SIOCSIWRATE, &wrq);
-
- nm_dev_sock_close (sk);
- }
-}
-
-
-/*
- * nm_device_get_ap_address
- *
- * If a device is wireless, get the access point's ethernet address
- * that the card is associated with.
- */
-void nm_device_get_ap_address (NMDevice *dev, struct ether_addr *addr)
-{
- NMSock *sk;
- struct iwreq wrq;
-
- g_return_if_fail (dev != NULL);
- g_return_if_fail (addr != NULL);
- g_return_if_fail (nm_device_is_wireless (dev));
-
- memset (addr, 0, sizeof (struct ether_addr));
-
- /* Test devices return an invalid address when there's no link,
- * and a made-up address when there is a link.
- */
- if (dev->test_device)
- {
- struct ether_addr good_addr = { {0x70, 0x37, 0x03, 0x70, 0x37, 0x03} };
- struct ether_addr bad_addr = { {0x00, 0x00, 0x00, 0x00, 0x00, 0x00} };
- gboolean link = nm_device_has_active_link (dev);
-
- memcpy ((link ? &good_addr : &bad_addr), &(wrq.u.ap_addr.sa_data), sizeof (struct ether_addr));
- return;
- }
-
- if ((sk = nm_dev_sock_open (dev, DEV_WIRELESS, __FUNCTION__, NULL)))
- {
-#ifdef IOCTL_DEBUG
- nm_info ("%s: About to GET IWAP.", nm_device_get_iface (dev));
-#endif
- if (iw_get_ext (nm_dev_sock_get_fd (sk), nm_device_get_iface (dev), SIOCGIWAP, &wrq) >= 0)
- memcpy (addr, &(wrq.u.ap_addr.sa_data), sizeof (struct ether_addr));
- nm_dev_sock_close (sk);
- }
-}
-
-
-/*
- * nm_device_set_enc_key
- *
- * If a device is wireless, set the encryption key that it should use.
- *
- * key: encryption key to use, or NULL or "" to disable encryption.
- * NOTE that at this time, the key must be the raw HEX key, not
- * a passphrase.
- */
-void nm_device_set_enc_key (NMDevice *dev, const char *key, NMDeviceAuthMethod auth_method)
-{
- NMSock *sk;
- int err;
- struct iwreq wreq;
- int keylen;
- unsigned char safe_key[IW_ENCODING_TOKEN_MAX + 1];
- gboolean set_key = FALSE;
-
- g_return_if_fail (dev != NULL);
- g_return_if_fail (nm_device_is_wireless (dev));
-
- /* Test devices just ignore encryption keys */
- if (dev->test_device)
- return;
-
- /* Make sure the essid we get passed is a valid size */
- if (!key)
- safe_key[0] = '\0';
- else
- {
- strncpy (safe_key, key, IW_ENCODING_TOKEN_MAX);
- safe_key[IW_ENCODING_TOKEN_MAX] = '\0';
- }
-
- if ((sk = nm_dev_sock_open (dev, DEV_WIRELESS, __FUNCTION__, NULL)))
- {
- wreq.u.data.pointer = (caddr_t) NULL;
- wreq.u.data.length = 0;
- wreq.u.data.flags = IW_ENCODE_ENABLED;
-
- /* Unfortunately, some drivers (Cisco) don't make a distinction between
- * Open System authentication mode and whether or not to use WEP. You
- * DON'T have to use WEP when using Open System, but these cards force
- * it. Therefore, we have to set Open System mode when using WEP.
- */
-
- if (strlen (safe_key) == 0)
- {
- wreq.u.data.flags |= IW_ENCODE_DISABLED | IW_ENCODE_NOKEY;
- set_key = TRUE;
- }
- else
- {
- unsigned char parsed_key[IW_ENCODING_TOKEN_MAX + 1];
-
- keylen = iw_in_key_full (nm_dev_sock_get_fd (sk), nm_device_get_iface (dev), safe_key, &parsed_key[0], &wreq.u.data.flags);
- if (keylen > 0)
- {
- switch (auth_method)
- {
- case NM_DEVICE_AUTH_METHOD_OPEN_SYSTEM:
- wreq.u.data.flags |= IW_ENCODE_OPEN;
- break;
- case NM_DEVICE_AUTH_METHOD_SHARED_KEY:
- wreq.u.data.flags |= IW_ENCODE_RESTRICTED;
- break;
- default:
- wreq.u.data.flags |= IW_ENCODE_RESTRICTED;
- break;
- }
- wreq.u.data.pointer = (caddr_t) &parsed_key;
- wreq.u.data.length = keylen;
- set_key = TRUE;
- }
- }
-
- if (set_key)
- {
-#ifdef IOCTL_DEBUG
- nm_info ("%s: About to SET IWENCODE.", nm_device_get_iface (dev));
-#endif
- if (iw_set_ext (nm_dev_sock_get_fd (sk), nm_device_get_iface (dev), SIOCSIWENCODE, &wreq) == -1)
- {
- if (errno != ENODEV)
- nm_warning ("nm_device_set_enc_key(): error setting key for device %s. errno = %d", nm_device_get_iface (dev), errno);
- }
- }
-
- nm_dev_sock_close (sk);
- } else nm_warning ("nm_device_set_enc_key(): could not get wireless control socket.");
-}
-
-
-/*
- * nm_device_get_signal_strength
- *
- * Get the current signal strength of a wireless device. This only works when
- * the card is associated with an access point, so will only work for the
- * active device.
- *
- * Returns: -1 on error
- * 0 - 100 strength percentage of the connection to the current access point
- *
- */
-gint8 nm_device_get_signal_strength (NMDevice *dev)
-{
- g_return_val_if_fail (dev != NULL, -1);
- g_return_val_if_fail (nm_device_is_wireless (dev), -1);
-
- return (dev->options.wireless.strength);
-}
-
-
-/*
- * nm_device_update_signal_strength
- *
- * Update the device's idea of the strength of its connection to the
- * current access point.
- *
- */
-void nm_device_update_signal_strength (NMDevice *dev)
-{
- gboolean has_range = FALSE;
- NMSock * sk;
- iwrange range;
- iwstats stats;
- int percent = -1;
-
- g_return_if_fail (dev != NULL);
- g_return_if_fail (nm_device_is_wireless (dev));
- g_return_if_fail (dev->app_data != NULL);
-
- /* Grab the scan lock since our strength is meaningless during a scan. */
- if (!nm_try_acquire_mutex (dev->options.wireless.scan_mutex, __FUNCTION__))
- return;
-
- /* If we aren't the active device, we don't really have a signal strength
- * that would mean anything.
- */
- if (!dev->act_request)
- {
- dev->options.wireless.strength = -1;
- goto out;
- }
-
- /* Fake a value for test devices */
- if (dev->test_device)
- {
- dev->options.wireless.strength = 75;
- goto out;
- }
-
- if ((sk = nm_dev_sock_open (dev, DEV_WIRELESS, __FUNCTION__, NULL)))
- {
- memset (&range, 0, sizeof (iwrange));
- memset (&stats, 0, sizeof (iwstats));
-#ifdef IOCTL_DEBUG
- nm_info ("%s: About to GET 'iwrange'.", nm_device_get_iface (dev));
-#endif
- has_range = (iw_get_range_info (nm_dev_sock_get_fd (sk), nm_device_get_iface (dev), &range) >= 0);
-#ifdef IOCTL_DEBUG
- nm_info ("%s: About to GET 'iwstats'.", nm_device_get_iface (dev));
-#endif
- if (iw_get_stats (nm_dev_sock_get_fd (sk), nm_device_get_iface (dev), &stats, &range, has_range) == 0)
- {
- percent = nm_wireless_qual_to_percent (&stats.qual, (const iwqual *)(&dev->options.wireless.max_qual),
- (const iwqual *)(&dev->options.wireless.avg_qual));
- }
- nm_dev_sock_close (sk);
- }
-
- /* Try to smooth out the strength. Atmel cards, for example, will give no strength
- * one second and normal strength the next.
- */
- if ((percent == -1) && (++dev->options.wireless.invalid_strength_counter <= 3))
- percent = dev->options.wireless.strength;
- else
- dev->options.wireless.invalid_strength_counter = 0;
-
- dev->options.wireless.strength = percent;
-
-out:
- nm_unlock_mutex (dev->options.wireless.scan_mutex, __FUNCTION__);
-}
-
-
-/*
- * nm_device_get_ip4_address
- *
- * Get a device's IPv4 address
- *
- */
-guint32 nm_device_get_ip4_address(NMDevice *dev)
-{
- g_return_val_if_fail (dev != NULL, 0);
-
- return (dev->ip4_address);
-}
-
-void nm_device_update_ip4_address (NMDevice *dev)
-{
- guint32 new_address;
- struct ifreq req;
- NMSock *sk;
- int err;
-
- g_return_if_fail (dev != NULL);
- g_return_if_fail (dev->app_data != NULL);
- g_return_if_fail (nm_device_get_iface (dev) != NULL);
-
- /* Test devices get a nice, bogus IP address */
- if (dev->test_device)
- {
- dev->ip4_address = 0x07030703;
- return;
- }
-
- if ((sk = nm_dev_sock_open (dev, DEV_GENERAL, __FUNCTION__, NULL)) == NULL)
- return;
-
- memset (&req, 0, sizeof (struct ifreq));
- strncpy ((char *)(&req.ifr_name), nm_device_get_iface (dev), strlen (nm_device_get_iface (dev)));
-#ifdef IOCTL_DEBUG
- nm_info ("%s: About to GET IFADDR.", nm_device_get_iface (dev));
-#endif
- err = ioctl (nm_dev_sock_get_fd (sk), SIOCGIFADDR, &req);
-#ifdef IOCTL_DEBUG
- nm_info ("%s: Done with GET IFADDR.", nm_device_get_iface (dev));
-#endif
- nm_dev_sock_close (sk);
- if (err != 0)
- return;
-
- new_address = ((struct sockaddr_in *)(&req.ifr_addr))->sin_addr.s_addr;
- if (new_address != nm_device_get_ip4_address (dev))
- dev->ip4_address = new_address;
-}
-
-
-/*
- * nm_device_get_ip6_address
- *
- * Get a device's IPv6 address
- *
- */
-void nm_device_get_ip6_address(NMDevice *dev)
-{
- /* FIXME
- * Implement
- */
-}
-
-
-/*
- * nm_device_get_hw_address
- *
- * Get a device's hardware address
- *
- */
-void nm_device_get_hw_address (NMDevice *dev, struct ether_addr *addr)
-{
- g_return_if_fail (addr != NULL);
- g_return_if_fail (dev != NULL);
-
- memcpy (addr, &(dev->hw_addr), sizeof (struct ether_addr));
-}
-
-void nm_device_update_hw_address (NMDevice *dev)
-{
- struct ifreq req;
- NMSock *sk;
- int err;
-
- g_return_if_fail (dev != NULL);
- g_return_if_fail (dev->app_data != NULL);
- g_return_if_fail (nm_device_get_iface (dev) != NULL);
-
- /* Test devices get a nice, bogus IP address */
- if (dev->test_device)
- {
- memset (&(dev->hw_addr), 0, sizeof (struct ether_addr));
- return;
- }
-
- if ((sk = nm_dev_sock_open (dev, DEV_GENERAL, __FUNCTION__, NULL)) == NULL)
- return;
-
- memset (&req, 0, sizeof (struct ifreq));
- strncpy ((char *)(&req.ifr_name), nm_device_get_iface (dev), strlen (nm_device_get_iface (dev)));
-#ifdef IOCTL_DEBUG
- nm_info ("%s: About to GET IFHWADDR.", nm_device_get_iface (dev));
-#endif
- err = ioctl (nm_dev_sock_get_fd (sk), SIOCGIFHWADDR, &req);
-#ifdef IOCTL_DEBUG
- nm_info ("%s: Done with GET IFHWADDR.", nm_device_get_iface (dev));
-#endif
- nm_dev_sock_close (sk);
- if (err != 0)
- return;
-
- memcpy (&(dev->hw_addr), &(req.ifr_hwaddr.sa_data), sizeof (struct ether_addr));
-}
-
-
-/*
- * nm_device_set_up_down
- *
- * Set the up flag on the device on or off
- *
- */
-static void nm_device_set_up_down (NMDevice *dev, gboolean up)
-{
- g_return_if_fail (dev != NULL);
-
- /* Test devices do whatever we tell them to do */
- if (dev->test_device)
- {
- dev->test_device_up = up;
- return;
- }
-
- nm_system_device_set_up_down (dev, up);
-
- /* Make sure we have a valid MAC address, some cards reload firmware when they
- * are brought up.
- */
- if (!nm_ethernet_address_is_valid (&(dev->hw_addr)))
- nm_device_update_hw_address (dev);
-}
-
-
-/*
- * Interface state functions: bring up, down, check
- *
- */
-gboolean nm_device_is_up (NMDevice *dev)
-{
- NMSock * sk;
- struct ifreq ifr;
- int err;
-
- g_return_val_if_fail (dev != NULL, FALSE);
-
- if (dev->test_device)
- return (dev->test_device_up);
-
- if ((sk = nm_dev_sock_open (dev, DEV_GENERAL, __FUNCTION__, NULL)) == NULL)
- return (FALSE);
-
- /* Get device's flags */
- strcpy (ifr.ifr_name, nm_device_get_iface (dev));
-#ifdef IOCTL_DEBUG
- nm_info ("%s: About to GET IFFLAGS.", nm_device_get_iface (dev));
-#endif
- err = ioctl (nm_dev_sock_get_fd (sk), SIOCGIFFLAGS, &ifr);
-#ifdef IOCTL_DEBUG
- nm_info ("%s: Done with GET IFFLAGS.", nm_device_get_iface (dev));
-#endif
- nm_dev_sock_close (sk);
- if (!err)
- return (!((ifr.ifr_flags^IFF_UP) & IFF_UP));
-
- if (errno != ENODEV)
- nm_warning ("nm_device_is_up() could not get flags for device %s. errno = %d", nm_device_get_iface (dev), errno );
-
- return FALSE;
-}
-
-/* I really wish nm_v_wait_for_completion_or_timeout could translate these
- * to first class args instead of a all this void * arg stuff, so these
- * helpers could be nice and _tiny_. */
-static gboolean nm_completion_device_is_up_test (int tries, nm_completion_args args)
-{
- NMDevice *dev = args[0];
- gboolean *err = args[1];
- gboolean cancelable = GPOINTER_TO_INT (args[2]);
-
- g_return_val_if_fail (dev != NULL, TRUE);
- g_return_val_if_fail (err != NULL, TRUE);
-
- *err = FALSE;
- if (cancelable && nm_device_activation_should_cancel (dev)) {
- *err = TRUE;
- return TRUE;
- }
- if (nm_device_is_up (dev))
- return TRUE;
- return FALSE;
-}
-
-void nm_device_bring_up (NMDevice *dev)
-{
- g_return_if_fail (dev != NULL);
-
- nm_device_set_up_down (dev, TRUE);
-}
-
-gboolean nm_device_bring_up_wait (NMDevice *dev, gboolean cancelable)
-{
- gboolean err = FALSE;
- nm_completion_args args;
-
- g_return_val_if_fail (dev != NULL, TRUE);
-
- nm_device_bring_up (dev);
-
- args[0] = dev;
- args[1] = &err;
- args[2] = GINT_TO_POINTER (cancelable);
- nm_wait_for_completion (400, G_USEC_PER_SEC / 200, NULL, nm_completion_device_is_up_test, args);
- if (err)
- nm_info ("failed to bring up device %s", dev->iface);
- return err;
-}
-
-void nm_device_bring_down (NMDevice *dev)
-{
- g_return_if_fail (dev != NULL);
-
- nm_device_set_up_down (dev, FALSE);
-}
-
-static gboolean nm_completion_device_is_down_test (int tries, nm_completion_args args)
-{
- NMDevice *dev = args[0];
- gboolean *err = args[1];
- gboolean cancelable = GPOINTER_TO_INT (args[2]);
-
- g_return_val_if_fail (dev != NULL, TRUE);
- g_return_val_if_fail (err != NULL, TRUE);
-
- *err = FALSE;
- if (cancelable && nm_device_activation_should_cancel (dev)) {
- *err = TRUE;
- return TRUE;
- }
- if (!nm_device_is_up (dev))
- return TRUE;
- return FALSE;
-}
-
-static gboolean nm_device_bring_down_wait (NMDevice *dev, gboolean cancelable)
-{
- gboolean err = FALSE;
- nm_completion_args args;
-
- g_return_val_if_fail (dev != NULL, TRUE);
-
- nm_device_bring_down (dev);
-
- args[0] = dev;
- args[1] = &err;
- args[2] = GINT_TO_POINTER (cancelable);
- nm_wait_for_completion(400, G_USEC_PER_SEC / 200, NULL,
- nm_completion_device_is_down_test, args);
- if (err)
- nm_info ("failed to bring down device %s", dev->iface);
- return err;
-}
-
-
-/*
- * nm_device_get_mode
- *
- * Get managed/infrastructure/adhoc mode on a device (currently wireless only)
- *
- */
-NMNetworkMode nm_device_get_mode (NMDevice *dev)
-{
- NMSock *sk;
- NMNetworkMode mode = NETWORK_MODE_UNKNOWN;
-
- g_return_val_if_fail (dev != NULL, NETWORK_MODE_UNKNOWN);
- g_return_val_if_fail (nm_device_is_wireless (dev), NETWORK_MODE_UNKNOWN);
-
- /* Force the card into Managed/Infrastructure mode */
- if ((sk = nm_dev_sock_open (dev, DEV_WIRELESS, __FUNCTION__, NULL)))
- {
- struct iwreq wrq;
- int err;
-
- memset (&wrq, 0, sizeof (struct iwreq));
-#ifdef IOCTL_DEBUG
- nm_info ("%s: About to GET IWMODE.", nm_device_get_iface (dev));
-#endif
- if (iw_get_ext (nm_dev_sock_get_fd (sk), nm_device_get_iface (dev), SIOCGIWMODE, &wrq) == 0)
- {
- switch (wrq.u.mode)
- {
- case IW_MODE_INFRA:
- mode = NETWORK_MODE_INFRA;
- break;
- case IW_MODE_ADHOC:
- mode = NETWORK_MODE_ADHOC;
- break;
- default:
- break;
- }
- }
- else
- nm_warning ("nm_device_get_mode (%s): error getting card mode. errno = %d", nm_device_get_iface (dev), errno);
- nm_dev_sock_close (sk);
- }
-
- return (mode);
-}
-
-
-/*
- * nm_device_set_mode
- *
- * Set managed/infrastructure/adhoc mode on a device (currently wireless only)
- *
- */
-gboolean nm_device_set_mode (NMDevice *dev, const NMNetworkMode mode)
-{
- NMSock *sk;
- gboolean success = FALSE;
-
- g_return_val_if_fail (dev != NULL, FALSE);
- g_return_val_if_fail (nm_device_is_wireless (dev), FALSE);
- g_return_val_if_fail ((mode == NETWORK_MODE_INFRA) || (mode == NETWORK_MODE_ADHOC), FALSE);
-
- if (nm_device_get_mode (dev) == mode)
- return TRUE;
-
- /* Force the card into Managed/Infrastructure mode */
- if ((sk = nm_dev_sock_open (dev, DEV_WIRELESS, __FUNCTION__, NULL)))
- {
- struct iwreq wreq;
- int err;
- gboolean mode_good = FALSE;
-
- switch (mode)
- {
- case NETWORK_MODE_INFRA:
- wreq.u.mode = IW_MODE_INFRA;
- mode_good = TRUE;
- break;
- case NETWORK_MODE_ADHOC:
- wreq.u.mode = IW_MODE_ADHOC;
- mode_good = TRUE;
- break;
- default:
- mode_good = FALSE;
- break;
- }
- if (mode_good)
- {
-#ifdef IOCTL_DEBUG
- nm_info ("%s: About to SET IWMODE.", nm_device_get_iface (dev));
-#endif
- if (iw_set_ext (nm_dev_sock_get_fd (sk), nm_device_get_iface (dev), SIOCSIWMODE, &wreq) == 0)
- success = TRUE;
- else
- {
- if (errno != ENODEV)
- nm_warning ("nm_device_set_mode (%s): error setting card to %s mode. errno = %d",
- nm_device_get_iface (dev),
- mode == NETWORK_MODE_INFRA ? "Infrastructure" : (mode == NETWORK_MODE_ADHOC ? "adhoc" : "unknown"),
- errno);
- }
- }
- nm_dev_sock_close (sk);
- }
-
- return (success);
-}
-
-
-/*
- * nm_device_activation_start
- *
- * Tell the device thread to begin activation.
- *
- * Returns: TRUE on success activation beginning
- * FALSE on error beginning activation (bad params, couldn't create thread)
- *
- */
-gboolean nm_device_activation_start (NMActRequest *req)
-{
- NMData * data = NULL;
- NMDevice * dev = NULL;
-
- g_return_val_if_fail (req != NULL, FALSE);
-
- data = nm_act_request_get_data (req);
- g_assert (data);
-
- dev = nm_act_request_get_dev (req);
- g_assert (dev);
-
- g_return_val_if_fail (!nm_device_is_activating (dev), TRUE); /* Return if activation has already begun */
-
- if (nm_device_get_driver_support_level (dev) == NM_DRIVER_UNSUPPORTED)
- return FALSE;
-
- nm_act_request_ref (req);
- dev->act_request = req;
- dev->quit_activation = FALSE;
-
- nm_info ("Activation (%s) started...", nm_device_get_iface (dev));
-
- nm_act_request_set_stage (req, NM_ACT_STAGE_DEVICE_PREPARE);
- nm_device_activate_schedule_stage1_device_prepare (req);
-
- nm_schedule_state_change_signal_broadcast (data);
- nm_dbus_schedule_device_status_change_signal (data, dev, NULL, DEVICE_ACTIVATING);
-
- return TRUE;
-}
-
-
-/*
- * nm_device_activation_handle_cancel
- *
- * Cancel activation on a device and clean up.
- *
- */
-static gboolean nm_device_activation_handle_cancel (NMActRequest *req)
-{
- NMDevice * dev;
- NMData * data;
-
- g_return_val_if_fail (req != NULL, FALSE);
-
- data = nm_act_request_get_data (req);
- g_assert (data);
-
- dev = nm_act_request_get_dev (req);
- g_assert (dev);
-
- if ((req = nm_device_get_act_request (dev)) && nm_device_is_activating (dev))
- {
- dev->act_request = NULL;
- nm_act_request_unref (req);
- }
- nm_schedule_state_change_signal_broadcast (dev->app_data);
-
- nm_info ("Activation (%s) cancellation handled.", nm_device_get_iface (dev));
- return FALSE;
-}
-
-
-/*
- * nm_device_schedule_activation_handle_cancel
- *
- * Schedule the activation cancel handler
- *
- */
-static void nm_device_schedule_activation_handle_cancel (NMActRequest *req)
-{
- NMDevice * dev;
- NMData * data;
- GSource * source;
-
- g_return_if_fail (req != NULL);
-
- data = nm_act_request_get_data (req);
- g_assert (data);
-
- dev = nm_act_request_get_dev (req);
- g_assert (dev);
-
- nm_info ("Activation (%s) cancellation handler scheduled...", nm_device_get_iface (dev));
- source = g_idle_source_new ();
- g_source_set_callback (source, (GSourceFunc) nm_device_activation_handle_cancel, req, NULL);
- g_source_attach (source, dev->context);
- g_source_unref (source);
-}
-
-
-/*
- * nm_device_get_act_request
- *
- * Return the devices activation request, if any.
- *
- */
-NMActRequest *nm_device_get_act_request (NMDevice *dev)
-{
- g_return_val_if_fail (dev != NULL, NULL);
-
- return dev->act_request;
-}
-
-
-/*
- * get_initial_auth_method
- *
- * Update the auth method of the AP from the last-known-good one saved in the allowed list
- * (which is found from NMI) and ensure that its valid with the encryption status of the AP.
- *
- */
-static NMDeviceAuthMethod get_initial_auth_method (NMAccessPoint *ap, NMAccessPointList *allowed_list)
-{
- g_return_val_if_fail (ap != NULL, NM_DEVICE_AUTH_METHOD_OPEN_SYSTEM);
-
- if (nm_ap_get_encrypted (ap))
- {
- NMDeviceAuthMethod auth = nm_ap_get_auth_method (ap);
- NMAccessPoint *allowed_ap = nm_ap_list_get_ap_by_essid (allowed_list, nm_ap_get_essid (ap));
-
- /* Prefer default auth method if we found one for this AP in our allowed list. */
- if (allowed_ap)
- auth = nm_ap_get_auth_method (allowed_ap);
-
- if ( (auth == NM_DEVICE_AUTH_METHOD_OPEN_SYSTEM)
- || (auth == NM_DEVICE_AUTH_METHOD_SHARED_KEY))
- return (auth);
- else
- return (NM_DEVICE_AUTH_METHOD_OPEN_SYSTEM);
- }
-
- return (NM_DEVICE_AUTH_METHOD_NONE);
-}
-
-
-/*
- * nm_device_activate_stage1_device_prepare
- *
- * Prepare for device activation
- *
- */
-static gboolean nm_device_activate_stage1_device_prepare (NMActRequest *req)
-{
- NMDevice * dev;
- NMData * data;
- NMAccessPoint * ap;
-
- g_return_val_if_fail (req != NULL, FALSE);
-
- data = nm_act_request_get_data (req);
- g_assert (data);
-
- dev = nm_act_request_get_dev (req);
- g_assert (dev);
-
- nm_info ("Activation (%s) Stage 1 (Device Prepare) started...", nm_device_get_iface (dev));
-
- if (nm_device_is_wireless (dev))
- {
- ap = nm_act_request_get_ap (req);
- g_assert (ap);
-
- if (nm_ap_get_artificial (ap))
- {
- /* Some Cisco cards (340/350 PCMCIA) don't return non-broadcasting APs
- * in their scan results, so we can't know beforehand whether or not the
- * AP was encrypted. We have to update their encryption status on the fly.
- */
- if (nm_ap_get_encrypted (ap) || nm_ap_is_enc_key_valid (ap))
- {
- nm_ap_set_encrypted (ap, TRUE);
- nm_ap_set_auth_method (ap, NM_DEVICE_AUTH_METHOD_OPEN_SYSTEM);
- }
- }
-
- /* Initial authentication method */
- nm_ap_set_auth_method (ap, get_initial_auth_method (ap, data->allowed_ap_list));
- }
-
- if (nm_device_activation_should_cancel (dev))
- nm_device_schedule_activation_handle_cancel (req);
- else
- nm_device_activate_schedule_stage2_device_config (req);
-
- nm_info ("Activation (%s) Stage 1 (Device Prepare) complete.", nm_device_get_iface (dev));
- return FALSE;
-}
-
-
-/*
- * nm_device_activate_schedule_stage1_device_prepare
- *
- * Prepare a device for activation
- *
- */
-void nm_device_activate_schedule_stage1_device_prepare (NMActRequest *req)
-{
- GSource * source = NULL;
- NMDevice * dev = NULL;
-
- g_return_if_fail (req != NULL);
-
- dev = nm_act_request_get_dev (req);
- g_assert (dev);
-
- nm_act_request_set_stage (req, NM_ACT_STAGE_DEVICE_PREPARE);
- nm_info ("Activation (%s) Stage 1 (Device Prepare) scheduled...", nm_device_get_iface (dev));
-
- source = g_idle_source_new ();
- g_source_set_callback (source, (GSourceFunc) nm_device_activate_stage1_device_prepare, req, NULL);
- g_source_attach (source, dev->context);
- g_source_unref (source);
-}
-
-
-static gboolean nm_device_link_test (int tries, nm_completion_args args)
-{
- NMDevice *dev = args[0];
- gboolean *err = args[1];
-
- g_return_val_if_fail (dev != NULL, TRUE);
- g_return_val_if_fail (err != NULL, TRUE);
-
- if (nm_device_wireless_is_associated (dev) && nm_device_get_essid (dev))
- {
- *err = FALSE;
- return TRUE;
- }
- *err = TRUE;
- return FALSE;
-}
-
-static gboolean nm_device_is_up_and_associated_wait (NMDevice *dev, int timeout, int interval)
-{
- gboolean err;
- const gint delay = (G_USEC_PER_SEC * nm_device_get_association_pause_value (dev)) / interval;
- const gint max_cycles = timeout * interval;
- nm_completion_args args;
-
- g_return_val_if_fail (dev != NULL, TRUE);
-
- args[0] = dev;
- args[1] = &err;
- nm_wait_for_completion (max_cycles, delay, NULL, nm_device_link_test, args);
- return !err;
-}
-
-
-/*
- * nm_device_set_wireless_config
- *
- * Bring up a wireless card with the essid and wep key of its "best" ap
- *
- * Returns: TRUE on successful activation
- * FALSE on unsuccessful activation (ie no best AP)
- *
- */
-static gboolean nm_device_set_wireless_config (NMDevice *dev, NMAccessPoint *ap)
-{
- NMDeviceAuthMethod auth;
- const char *essid = NULL;
-
- g_return_val_if_fail (dev != NULL, FALSE);
- g_return_val_if_fail (nm_device_is_wireless (dev), FALSE);
- g_return_val_if_fail (ap != NULL, FALSE);
- g_return_val_if_fail (nm_ap_get_essid (ap) != NULL, FALSE);
- g_return_val_if_fail (nm_ap_get_auth_method (ap) != NM_DEVICE_AUTH_METHOD_UNKNOWN, FALSE);
-
- dev->options.wireless.failed_link_count = 0;
-
- /* Force the card into Managed/Infrastructure mode */
- nm_device_bring_down_wait (dev, 0);
- nm_device_bring_up_wait (dev, 0);
-
- nm_device_set_mode (dev, NETWORK_MODE_INFRA);
-
- essid = nm_ap_get_essid (ap);
- auth = nm_ap_get_auth_method (ap);
-
- nm_device_set_mode (dev, nm_ap_get_mode (ap));
- nm_device_set_bitrate (dev, 0);
-
- if (nm_ap_get_user_created (ap) || (nm_ap_get_freq (ap) && (nm_ap_get_mode (ap) == NETWORK_MODE_ADHOC)))
- nm_device_set_frequency (dev, nm_ap_get_freq (ap));
- else
- nm_device_set_frequency (dev, 0); /* auto */
-
- if (nm_ap_get_encrypted (ap) && nm_ap_is_enc_key_valid (ap))
- {
- char * hashed_key = nm_ap_get_enc_key_hashed (ap);
-
- if (auth == NM_DEVICE_AUTH_METHOD_NONE)
- {
- nm_ap_set_auth_method (ap, NM_DEVICE_AUTH_METHOD_OPEN_SYSTEM);
- nm_warning ("Activation (%s/wireless): AP '%s' said it was encrypted, but had "
- "'none' for authentication method. Using Open System authentication method.",
- nm_device_get_iface (dev), nm_ap_get_essid (ap));
- }
- nm_device_set_enc_key (dev, hashed_key, auth);
- g_free (hashed_key);
- }
- else
- nm_device_set_enc_key (dev, NULL, NM_DEVICE_AUTH_METHOD_NONE);
-
- nm_device_set_essid (dev, essid);
-
- nm_info ("Activation (%s/wireless): using essid '%s', with %s authentication.",
- nm_device_get_iface (dev), essid, (auth == NM_DEVICE_AUTH_METHOD_NONE) ? "no" :
- ((auth == NM_DEVICE_AUTH_METHOD_OPEN_SYSTEM) ? "Open System" :
- ((auth == NM_DEVICE_AUTH_METHOD_SHARED_KEY) ? "Shared Key" : "unknown")));
-
- /* Bring the device up and pause to allow card to associate. After we set the ESSID
- * on the card, the card has to scan all channels to find our requested AP (which can
- * take a long time if it is an A/B/G chipset like the Atheros 5212, for example).
- */
- nm_device_is_up_and_associated_wait (dev, 2, 100);
-
- /* Some cards don't really work well in ad-hoc mode unless you explicitly set the bitrate
- * on them. (Netgear WG511T/Atheros 5212 with madwifi drivers). Until we can get rate information
- * from scanned access points out of iwlib, clamp bitrate for these cards at 11Mbps.
- */
- if ((nm_ap_get_mode (ap) == NETWORK_MODE_ADHOC) && (nm_device_get_bitrate (dev) <= 0))
- nm_device_set_bitrate (dev, 11000); /* In Kbps */
-
- return TRUE;
-}
-
-
-/*
- * nm_device_wireless_configure_adhoc
- *
- * Create an ad-hoc network (rather than associating with one).
- *
- */
-static void nm_device_wireless_configure_adhoc (NMActRequest *req)
-{
- NMData * data;
- NMDevice * dev;
- NMAccessPoint * ap;
- NMDeviceAuthMethod auth = NM_DEVICE_AUTH_METHOD_NONE;
- NMAPListIter * iter;
- NMAccessPoint * tmp_ap;
- double card_freqs[IW_MAX_FREQUENCIES];
- int num_freqs = 0, i;
- double freq_to_use = 0;
- iwrange range;
- NMSock * sk;
- int err;
-
- g_return_if_fail (req != NULL);
-
- data = nm_act_request_get_data (req);
- g_assert (data);
-
- dev = nm_act_request_get_dev (req);
- g_assert (dev);
-
- ap = nm_act_request_get_ap (req);
- g_assert (ap);
-
- if (nm_ap_get_encrypted (ap))
- auth = NM_DEVICE_AUTH_METHOD_SHARED_KEY;
-
- /* Build our local list of frequencies to whittle down until we find a free one */
- memset (&card_freqs, 0, sizeof (card_freqs));
- num_freqs = MIN (dev->options.wireless.num_freqs, IW_MAX_FREQUENCIES);
- for (i = 0; i < num_freqs; i++)
- card_freqs[i] = dev->options.wireless.freqs[i];
-
- /* We need to find a clear wireless channel to use. We will
- * only use 802.11b channels for now.
- */
- iter = nm_ap_list_iter_new (nm_device_ap_list_get (dev));
- while ((tmp_ap = nm_ap_list_iter_next (iter)))
- {
- double ap_freq = nm_ap_get_freq (tmp_ap);
- for (i = 0; i < num_freqs && ap_freq; i++)
- {
- if (card_freqs[i] == ap_freq)
- card_freqs[i] = 0;
- }
- }
- nm_ap_list_iter_free (iter);
-
- if ((sk = nm_dev_sock_open (dev, DEV_WIRELESS, __FUNCTION__, NULL)) == NULL)
- {
- nm_policy_schedule_activation_failed (req);
- return;
- }
-
- err = iw_get_range_info (nm_dev_sock_get_fd (sk), nm_device_get_iface (dev), &range);
- nm_dev_sock_close (sk);
- if (err < 0)
- {
- nm_policy_schedule_activation_failed (req);
- return;
- }
-
- /* Ok, find the first non-zero freq in our table and use it.
- * For now we only try to use a channel in the 802.11b channel
- * space so that most everyone can see it.
- */
- for (i = 0; i < num_freqs; i++)
- {
- int channel = iw_freq_to_channel (card_freqs[i], &range);
- if (card_freqs[i] && (channel > 0) && (channel < 15))
- {
- freq_to_use = card_freqs[i];
- break;
- }
- }
-
- /* Hmm, no free channels in 802.11b space. Pick one more or less randomly */
- if (!freq_to_use)
- {
- double pfreq;
- int channel = (int)(random () % 14);
- int err;
-
- err = iw_channel_to_freq (channel, &pfreq, &range);
- if (err == channel)
- freq_to_use = pfreq;
- }
-
- if (!freq_to_use)
- {
- nm_policy_schedule_activation_failed (req);
- return;
- }
-
- nm_ap_set_freq (ap, freq_to_use);
-
- nm_info ("Will create network '%s' with frequency %f.", nm_ap_get_essid (ap), nm_ap_get_freq (ap));
- nm_device_set_wireless_config (dev, ap);
-
- if (nm_device_activation_should_cancel (dev))
- {
- nm_device_schedule_activation_handle_cancel (req);
- return;
- }
-
- nm_device_activate_schedule_stage3_ip_config_start (req);
-}
-
-
-static gboolean nm_dwwfl_test (int tries, nm_completion_args args)
-{
- NMDevice * dev = args[0];
- guint * assoc_count = args[1];
- double * last_freq = args[2];
- char * essid = args[3];
- int required = GPOINTER_TO_INT (args[4]);
-
- double cur_freq = nm_device_get_frequency (dev);
- gboolean assoc = nm_device_wireless_is_associated (dev);
- const char * cur_essid = nm_device_get_essid (dev);
-
- /* If we've been cancelled, return that we should stop */
- if (nm_device_activation_should_cancel (dev))
- return TRUE;
-
- /* If we're on the same frequency and essid, and we're associated,
- * increment the count for how many iterations we've been associated;
- * otherwise start over. */
- /* XXX floating point comparison this way is dangerous, IIRC */
- if ((cur_freq == *last_freq) && assoc && !strcmp (essid, cur_essid))
- {
- (*assoc_count)++;
- }
- else
- {
- *assoc_count = 0;
- *last_freq = cur_freq;
- }
-
- /* If we're told to cancel, return that we're finished.
- * If the card's frequency has been stable for more than the required
- * interval, return that we're finished.
- * Otherwise, we're not finished. */
- if (nm_device_activation_should_cancel (dev) || (*assoc_count >= required))
- return TRUE;
-
- return FALSE;
-}
-
-
-/*
- * nm_device_wireless_wait_for_link
- *
- * Try to be clever about when the wireless card really has associated with the access point.
- * Return TRUE when we think that it has, and FALSE when we thing it has not associated.
- *
- */
-static gboolean nm_device_wireless_wait_for_link (NMDevice *dev, const char *essid)
-{
- guint assoc = 0;
- double last_freq = 0;
- guint assoc_count = 0;
- struct timeval timeout = { .tv_sec = 0, .tv_usec = 0 };
- nm_completion_args args;
-
- /* we want to sleep for a very short amount of time, to minimize
- * hysteresis on the boundaries of our required time. But we
- * also want the maximum to be based on what the card */
- const guint delay = 30;
- const guint required_tries = 10;
- const guint min_delay = 2 * (delay / required_tries);
-
- g_return_val_if_fail (dev != NULL, FALSE);
-
- /* for cards which don't scan many frequencies, this will return
- * 5 seconds, which we'll bump up to 6 seconds below. Oh well. */
- timeout.tv_sec = (time_t) nm_device_get_association_pause_value (dev);
-
- /* Refuse to to have a timeout that's _less_ than twice the total time
- * required before calling a link valid */
- if (timeout.tv_sec < min_delay)
- timeout.tv_sec = min_delay;
-
- /* We more or less keep asking the driver for the frequency the
- * card is listening on until it connects to an AP. Once it's
- * associated, the driver stops scanning. To detect that, we look
- * for the essid and frequency to remain constant for 3 seconds.
- * When it remains constant, we assume it's a real link. */
- args[0] = dev;
- args[1] = &assoc;
- args[2] = &last_freq;
- args[3] = (void *)essid;
- args[4] = (void *)(required_tries * 2);
- nm_wait_for_timeout (&timeout, G_USEC_PER_SEC / delay, nm_dwwfl_test, nm_dwwfl_test, args);
-
- /* If we've had a reasonable association count, we say we have a link */
- if (assoc > required_tries)
- return TRUE;
- return FALSE;
-}
-
-
-static gboolean ap_need_key (NMDevice *dev, NMAccessPoint *ap)
-{
- char *essid;
- gboolean need_key = FALSE;
-
- g_return_val_if_fail (ap != NULL, FALSE);
-
- essid = nm_ap_get_essid (ap);
-
- if (!nm_ap_get_encrypted (ap))
- {
- nm_info ("Activation (%s/wireless): access point '%s' is unencrypted, no key needed.",
- nm_device_get_iface (dev), essid ? essid : "(null)");
- }
- else
- {
- if (nm_ap_is_enc_key_valid (ap))
- {
- nm_info ("Activation (%s/wireless): access point '%s' "
- "is encrypted, and a key exists. No new key needed.",
- nm_device_get_iface (dev), essid ? essid : "(null)");
- }
- else
- {
- nm_info ("Activation (%s/wireless): access point '%s' "
- "is encrypted, but NO valid key exists. New key needed.",
- nm_device_get_iface (dev),
- essid ? essid : "(null)");
- need_key = TRUE;
- }
- }
-
- return need_key;
-}
-
-
-/*
- * nm_device_activate_wireless_configure
- *
- * Configure a wireless device for association with a particular access point.
- *
- */
-static void nm_device_wireless_configure (NMActRequest *req)
-{
- NMData * data;
- NMDevice * dev;
- NMAccessPoint * ap;
- gboolean success = FALSE;
-
- g_return_if_fail (req != NULL);
-
- data = nm_act_request_get_data (req);
- g_assert (data);
-
- dev = nm_act_request_get_dev (req);
- g_assert (dev);
-
- ap = nm_act_request_get_ap (req);
- g_assert (ap);
-
- nm_device_bring_up_wait (dev, 1);
-
- nm_info ("Activation (%s/wireless) Stage 1 (Device Configure) will connect to access point '%s'.", nm_device_get_iface (dev), nm_ap_get_essid (ap));
-
- if (ap_need_key (dev, ap))
- {
- nm_dbus_get_user_key_for_network (data->dbus_connection, req, FALSE);
- return;
- }
-
- while (success == FALSE)
- {
- gboolean link = FALSE;
-
- if (nm_device_activation_should_cancel (dev))
- break;
-
- nm_device_set_wireless_config (dev, ap);
-
- success = link = nm_device_wireless_wait_for_link (dev, nm_ap_get_essid (ap));
-
- if (nm_device_activation_should_cancel (dev))
- break;
-
- if (!link)
- {
- if (nm_ap_get_auth_method (ap) == NM_DEVICE_AUTH_METHOD_OPEN_SYSTEM)
- {
- nm_debug ("Activation (%s/wireless): no hardware link to '%s' in Open System mode, trying Shared Key.",
- nm_device_get_iface (dev), nm_ap_get_essid (ap) ? nm_ap_get_essid (ap) : "(none)");
- /* Back down to Shared Key mode */
- nm_ap_set_auth_method (ap, NM_DEVICE_AUTH_METHOD_SHARED_KEY);
- success = FALSE;
- continue;
- }
- else if (nm_ap_get_auth_method (ap) == NM_DEVICE_AUTH_METHOD_SHARED_KEY)
- {
- /* Didn't work in Shared Key either. */
- nm_debug ("Activation (%s/wireless): no hardware link to '%s' in Shared Key mode, need correct key?",
- nm_device_get_iface (dev), nm_ap_get_essid (ap) ? nm_ap_get_essid (ap) : "(none)");
- nm_dbus_get_user_key_for_network (data->dbus_connection, req, TRUE);
- break;
- }
- else
- {
- nm_debug ("Activation (%s/wireless): no hardware link to '%s' in non-encrypted mode.",
- nm_device_get_iface (dev), nm_ap_get_essid (ap) ? nm_ap_get_essid (ap) : "(none)");
- nm_policy_schedule_activation_failed (req);
- break;
- }
- }
- }
-
- if (success)
- {
- nm_info ("Activation (%s/wireless) Stage 2 (Device Configure) successful. Connected to access point '%s'.", nm_device_get_iface (dev), nm_ap_get_essid (ap) ? nm_ap_get_essid (ap) : "(none)");
- nm_device_activate_schedule_stage3_ip_config_start (req);
- }
- else if (!nm_device_activation_should_cancel (dev) && (nm_act_request_get_stage (req) != NM_ACT_STAGE_NEED_USER_KEY))
- nm_policy_schedule_activation_failed (req);
-}
-
-
-/*
- * nm_device_wired_configure
- *
- * Configure a wired device for activation
- *
- */
-static void nm_device_wired_configure (NMActRequest *req)
-{
- NMData * data;
- NMDevice * dev;
-
- g_return_if_fail (req != NULL);
-
- data = nm_act_request_get_data (req);
- g_assert (data);
-
- dev = nm_act_request_get_dev (req);
- g_assert (dev);
-
- nm_info ("Activation (%s/wired) Stage 2 (Device Configure) successful.", nm_device_get_iface (dev));
- nm_device_activate_schedule_stage3_ip_config_start (req);
-}
-
-
-/*
- * nm_device_activate_stage2_device_config
- *
- * Determine device parameters and set those on the device, ie
- * for wireless devices, set essid, keys, etc.
- *
- */
-static gboolean nm_device_activate_stage2_device_config (NMActRequest *req)
-{
- NMDevice * dev;
- NMData * data;
- NMAccessPoint * ap;
-
- g_return_val_if_fail (req != NULL, FALSE);
-
- data = nm_act_request_get_data (req);
- g_assert (data);
-
- dev = nm_act_request_get_dev (req);
- g_assert (dev);
-
- ap = nm_act_request_get_ap (req);
- if (nm_device_is_wireless (dev))
- g_assert (ap);
-
- nm_info ("Activation (%s) Stage 2 (Device Configure) starting...", nm_device_get_iface (dev));
-
- /* Bring the device up */
- if (!nm_device_is_up (dev))
- nm_device_bring_up (dev);
-
- if (nm_device_activation_should_cancel (dev))
- {
- nm_device_schedule_activation_handle_cancel (req);
- goto out;
- }
-
- if (nm_device_is_wireless (dev))
- {
- if (nm_ap_get_user_created (ap))
- nm_device_wireless_configure_adhoc (req);
- else
- nm_device_wireless_configure (req);
- }
- else if (nm_device_is_wired (dev))
- nm_device_wired_configure (req);
-
- if (nm_device_activation_should_cancel (dev))
- nm_device_schedule_activation_handle_cancel (req);
-
-out:
- nm_info ("Activation (%s) Stage 2 (Device Configure) complete.", nm_device_get_iface (dev));
- return FALSE;
-}
-
-
-/*
- * nm_device_activate_schedule_stage2_device_config
- *
- * Schedule setup of the hardware device
- *
- */
-void nm_device_activate_schedule_stage2_device_config (NMActRequest *req)
-{
- GSource * source = NULL;
- NMDevice * dev = NULL;
-
- g_return_if_fail (req != NULL);
-
- dev = nm_act_request_get_dev (req);
- g_assert (dev);
-
- nm_act_request_set_stage (req, NM_ACT_STAGE_DEVICE_CONFIG);
-
- source = g_idle_source_new ();
- g_source_set_callback (source, (GSourceFunc) nm_device_activate_stage2_device_config, req, NULL);
- g_source_attach (source, dev->context);
- g_source_unref (source);
- nm_info ("Activation (%s) Stage 2 (Device Configure) scheduled...", nm_device_get_iface (dev));
-}
-
-
-/*
- * nm_device_activate_stage3_ip_config_start
- *
- * Begin IP configuration with either DHCP or static IP.
- *
- */
-static gboolean nm_device_activate_stage3_ip_config_start (NMActRequest *req)
-{
- NMData * data = NULL;
- NMDevice * dev = NULL;
- NMAccessPoint * ap = NULL;
- NMIP4Config * ip4_config = NULL;
-
- g_return_val_if_fail (req != NULL, FALSE);
-
- data = nm_act_request_get_data (req);
- g_assert (data);
-
- dev = nm_act_request_get_dev (req);
- g_assert (dev);
-
- nm_info ("Activation (%s) Stage 3 (IP Configure Start) started...", nm_device_get_iface (dev));
-
- if (nm_device_activation_should_cancel (dev))
- {
- nm_device_schedule_activation_handle_cancel (req);
- goto out;
- }
-
- if (nm_device_is_wireless (dev))
- ap = nm_act_request_get_ap (req);
-
- if (!(ap && nm_ap_get_user_created (ap)) && nm_device_get_use_dhcp (dev))
- {
- /* Begin a DHCP transaction on the interface */
- if (!nm_dhcp_manager_begin_transaction (data->dhcp_manager, req))
- nm_policy_schedule_activation_failed (req);
- goto out;
- }
-
- if (nm_device_activation_should_cancel (dev))
- {
- nm_device_schedule_activation_handle_cancel (req);
- goto out;
- }
-
- /* Static IP and user-created wireless networks skip directly to IP configure stage */
- nm_device_activate_schedule_stage4_ip_config_get (req);
-
-out:
- nm_info ("Activation (%s) Stage 3 (IP Configure Start) complete.", nm_device_get_iface (dev));
- return FALSE;
-}
-
-
-/*
- * nm_device_activate_schedule_stage3_ip_config_start
- *
- * Schedule IP configuration start
- */
-static void nm_device_activate_schedule_stage3_ip_config_start (NMActRequest *req)
-{
- GSource * source = NULL;
- NMDevice * dev = NULL;
-
- g_return_if_fail (req != NULL);
-
- dev = nm_act_request_get_dev (req);
- g_assert (dev);
-
- nm_act_request_set_stage (req, NM_ACT_STAGE_IP_CONFIG_START);
-
- source = g_idle_source_new ();
- g_source_set_callback (source, (GSourceFunc) nm_device_activate_stage3_ip_config_start, req, NULL);
- g_source_attach (source, dev->context);
- g_source_unref (source);
- nm_info ("Activation (%s) Stage 3 (IP Configure Start) scheduled.", nm_device_get_iface (dev));
-}
-
-
-/*
- * nm_device_new_ip4_autoip_config
- *
- * Build up an IP config with a Link Local address
- *
- */
-static NMIP4Config *nm_device_new_ip4_autoip_config (NMDevice *dev)
-{
- struct in_addr ip;
- NMIP4Config * config = NULL;
-
- g_return_val_if_fail (dev != NULL, NULL);
-
- if (get_autoip (dev, &ip))
- {
- #define LINKLOCAL_BCAST 0xa9feffff
- int temp = ip.s_addr;
-
- config = nm_ip4_config_new ();
-
- nm_ip4_config_set_address (config, (guint32)(ip.s_addr));
- nm_ip4_config_set_netmask (config, (guint32)(ntohl (0xFFFF0000)));
- nm_ip4_config_set_broadcast (config, (guint32)(ntohl (LINKLOCAL_BCAST)));
- nm_ip4_config_set_gateway (config, 0);
- }
-
- return config;
-}
-
-
-/*
- * nm_device_activate_stage4_ip_config_get
- *
- * Retrieve the correct IP config.
- *
- */
-static gboolean nm_device_activate_stage4_ip_config_get (NMActRequest *req)
-{
- NMData * data = NULL;
- NMDevice * dev = NULL;
- NMAccessPoint * ap = NULL;
- NMIP4Config * ip4_config = NULL;
-
- g_return_val_if_fail (req != NULL, FALSE);
-
- data = nm_act_request_get_data (req);
- g_assert (data);
-
- dev = nm_act_request_get_dev (req);
- g_assert (data);
-
- if (nm_device_is_wireless (dev))
- {
- ap = nm_act_request_get_ap (req);
- g_assert (ap);
- }
-
- nm_info ("Activation (%s) Stage 4 (IP Configure Get) started...", nm_device_get_iface (dev));
-
- if (nm_device_activation_should_cancel (dev))
- {
- nm_device_schedule_activation_handle_cancel (req);
- goto out;
- }
-
- if (ap && nm_ap_get_user_created (ap))
- ip4_config = nm_device_new_ip4_autoip_config (dev);
- else if (nm_device_get_use_dhcp (dev))
- ip4_config = nm_dhcp_manager_get_ip4_config (data->dhcp_manager, req);
- else
- ip4_config = nm_system_device_new_ip4_system_config (dev);
-
- if (nm_device_activation_should_cancel (dev))
- {
- nm_device_schedule_activation_handle_cancel (req);
- goto out;
- }
-
- if (ip4_config)
- {
- nm_act_request_set_ip4_config (req, ip4_config);
- nm_device_activate_schedule_stage5_ip_config_commit (req);
- }
- else
- {
- /* Interfaces cannot be down if they are the active interface,
- * otherwise we cannot use them for scanning or link detection.
- */
- if (nm_device_is_wireless (dev))
- {
- nm_device_set_essid (dev, "");
- nm_device_set_enc_key (dev, NULL, NM_DEVICE_AUTH_METHOD_NONE);
- }
-
- if (!nm_device_is_up (dev))
- nm_device_bring_up (dev);
-
- nm_policy_schedule_activation_failed (req);
- }
-
-out:
- nm_info ("Activation (%s) Stage 4 (IP Configure Get) complete.", nm_device_get_iface (dev));
- return FALSE;
-}
-
-
-/*
- * nm_device_activate_schedule_stage4_ip_config_get
- *
- * Schedule creation of the IP config
- *
- */
-void nm_device_activate_schedule_stage4_ip_config_get (NMActRequest *req)
-{
- GSource * source = NULL;
- NMDevice * dev = NULL;
-
- g_return_if_fail (req != NULL);
-
- dev = nm_act_request_get_dev (req);
- g_assert (dev);
-
- nm_act_request_set_stage (req, NM_ACT_STAGE_IP_CONFIG_GET);
- nm_info ("Activation (%s) Stage 4 (IP Configure Get) scheduled...", nm_device_get_iface (dev));
-
- source = g_idle_source_new ();
- g_source_set_callback (source, (GSourceFunc) nm_device_activate_stage4_ip_config_get, req, NULL);
- g_source_attach (source, dev->context);
- g_source_unref (source);
-}
-
-
-/*
- * nm_device_activate_stage4_ip_config_timeout
- *
- * Retrieve the correct IP config.
- *
- */
-static gboolean nm_device_activate_stage4_ip_config_timeout (NMActRequest *req)
-{
- NMData * data = NULL;
- NMDevice * dev = NULL;
- NMIP4Config * ip4_config = NULL;
-
- g_return_val_if_fail (req != NULL, FALSE);
-
- data = nm_act_request_get_data (req);
- g_assert (data);
-
- dev = nm_act_request_get_dev (req);
- g_assert (dev);
-
- nm_info ("Activation (%s) Stage 4 (IP Configure Timeout) started...", nm_device_get_iface (dev));
-
- if (nm_device_activation_should_cancel (dev))
- {
- nm_device_schedule_activation_handle_cancel (req);
- goto out;
- }
-
- if (nm_device_is_wired (dev))
- {
- /* Wired network, no DHCP reply. Let's get an IP via Zeroconf. */
- nm_info ("No DHCP reply received. Automatically obtaining IP via Zeroconf.");
- ip4_config = nm_device_new_ip4_autoip_config (dev);
- }
- else if (nm_device_is_wireless (dev))
- {
- NMAccessPoint *ap = nm_act_request_get_ap (req);
-
- g_assert (ap);
-
- /* For those broken cards that report successful hardware link even when WEP key is wrong,
- * and also for Open System mode (where you cannot know WEP key is wrong ever), we try to
- * do DHCP and if that fails, fall back to next auth mode and try again.
- */
- if (nm_ap_get_auth_method (ap) == NM_DEVICE_AUTH_METHOD_OPEN_SYSTEM)
- {
- /* Back down to Shared Key mode */
- nm_debug ("Activation (%s/wireless): could not get IP configuration info for '%s' in Open System mode, trying Shared Key.",
- nm_device_get_iface (dev), nm_ap_get_essid (ap) ? nm_ap_get_essid (ap) : "(none)");
- nm_ap_set_auth_method (ap, NM_DEVICE_AUTH_METHOD_SHARED_KEY);
- nm_device_activate_schedule_stage2_device_config (req);
- }
- else if ((nm_ap_get_auth_method (ap) == NM_DEVICE_AUTH_METHOD_SHARED_KEY))
- {
- /* Shared Key mode failed, we must have bad WEP key */
- nm_debug ("Activation (%s/wireless): could not get IP configuration info for '%s' in Shared Key mode, asking for new key.",
- nm_device_get_iface (dev), nm_ap_get_essid (ap) ? nm_ap_get_essid (ap) : "(none)");
- nm_dbus_get_user_key_for_network (data->dbus_connection, req, TRUE);
- }
- else
- {
- /*
- * Wireless, not encrypted, no DHCP Reply. Try Zeroconf. We do not do this in
- * the encrypted case, because the problem could be (and more likely is) a bad key.
- */
- nm_info ("No DHCP reply received. Automatically obtaining IP via Zeroconf.");
- ip4_config = nm_device_new_ip4_autoip_config (dev);
- }
- }
-
- if (ip4_config)
- {
- nm_act_request_set_ip4_config (req, ip4_config);
- nm_device_activate_schedule_stage5_ip_config_commit (req);
- }
-
-out:
- nm_info ("Activation (%s) Stage 4 (IP Configure Timeout) complete.", nm_device_get_iface (dev));
- return FALSE;
-}
-
-
-/*
- * nm_device_activate_schedule_stage4_ip_config_timeout
- *
- * Deal with a timed out DHCP transaction
- *
- */
-void nm_device_activate_schedule_stage4_ip_config_timeout (NMActRequest *req)
-{
- GSource * source = NULL;
- NMDevice * dev = NULL;
-
- g_return_if_fail (req != NULL);
-
- dev = nm_act_request_get_dev (req);
- g_assert (dev);
-
- nm_act_request_set_stage (req, NM_ACT_STAGE_IP_CONFIG_GET);
-
- source = g_idle_source_new ();
- g_source_set_callback (source, (GSourceFunc) nm_device_activate_stage4_ip_config_timeout, req, NULL);
- g_source_attach (source, dev->context);
- g_source_unref (source);
- nm_info ("Activation (%s) Stage 4 (IP Configure Timeout) scheduled...", nm_device_get_iface (dev));
-}
-
-
-/*
- * nm_device_activate_stage5_ip_config_commit
- *
- * Commit the IP config on the device
- *
- */
-static gboolean nm_device_activate_stage5_ip_config_commit (NMActRequest *req)
-{
- NMData * data = NULL;
- NMDevice * dev = NULL;
- NMAccessPoint * ap = NULL;
- NMIP4Config * ip4_config = NULL;
-
- g_return_val_if_fail (req != NULL, FALSE);
-
- data = nm_act_request_get_data (req);
- g_assert (data);
-
- dev = nm_act_request_get_dev (req);
- g_assert (dev);
-
- ip4_config = nm_act_request_get_ip4_config (req);
- g_assert (ip4_config);
-
- nm_info ("Activation (%s) Stage 5 (IP Configure Commit) started...", nm_device_get_iface (dev));
-
- if (nm_device_activation_should_cancel (dev))
- {
- nm_device_schedule_activation_handle_cancel (req);
- goto out;
- }
-
- nm_device_set_ip4_config (dev, ip4_config);
- if (nm_system_device_set_from_ip4_config (dev))
- {
- nm_device_update_ip4_address (dev);
- nm_system_device_add_ip6_link_address (dev);
- nm_system_restart_mdns_responder ();
- nm_policy_schedule_activation_finish (req);
- nm_device_set_link_active (dev, nm_device_probe_link_state (dev));
- }
- else
- nm_policy_schedule_activation_failed (req);
-
-out:
- nm_info ("Activation (%s) Stage 5 (IP Configure Commit) complete.", nm_device_get_iface (dev));
- return FALSE;
-}
-
-
-/*
- * nm_device_activate_schedule_stage5_ip_config_commit
- *
- * Schedule commit of the IP config
- */
-static void nm_device_activate_schedule_stage5_ip_config_commit (NMActRequest *req)
-{
- GSource * source = NULL;
- NMDevice * dev = NULL;
-
- g_return_if_fail (req != NULL);
-
- dev = nm_act_request_get_dev (req);
- g_assert (dev);
-
- nm_act_request_set_stage (req, NM_ACT_STAGE_IP_CONFIG_COMMIT);
-
- source = g_idle_source_new ();
- g_source_set_callback (source, (GSourceFunc) nm_device_activate_stage5_ip_config_commit, req, NULL);
- g_source_attach (source, dev->context);
- g_source_unref (source);
- nm_info ("Activation (%s) Stage 5 (IP Configure Commit) scheduled...", nm_device_get_iface (dev));
-}
-
-
-/*
- * nm_device_is_activating
- *
- * Return whether or not the device is currently activating itself.
- *
- */
-gboolean nm_device_is_activating (NMDevice *dev)
-{
- NMActRequest * req;
- NMActStage stage;
- gboolean activating = FALSE;
-
- g_return_val_if_fail (dev != NULL, FALSE);
-
- if (!(req = nm_device_get_act_request (dev)))
- return FALSE;
-
- stage = nm_act_request_get_stage (req);
- switch (stage)
- {
- case NM_ACT_STAGE_DEVICE_PREPARE:
- case NM_ACT_STAGE_DEVICE_CONFIG:
- case NM_ACT_STAGE_NEED_USER_KEY:
- case NM_ACT_STAGE_IP_CONFIG_START:
- case NM_ACT_STAGE_IP_CONFIG_GET:
- case NM_ACT_STAGE_IP_CONFIG_COMMIT:
- activating = TRUE;
- break;
-
- case NM_ACT_STAGE_ACTIVATED:
- case NM_ACT_STAGE_FAILED:
- case NM_ACT_STAGE_CANCELLED:
- case NM_ACT_STAGE_UNKNOWN:
- default:
- break;
- }
-
- return activating;
-}
-
-
-/*
- * nm_device_is_activated
- *
- * Return whether or not the device is successfully activated.
- *
- */
-static gboolean nm_device_is_activated (NMDevice *dev)
-{
- NMActRequest * req;
- NMActStage stage;
- gboolean activated = FALSE;
-
- g_return_val_if_fail (dev != NULL, FALSE);
-
- if (!(req = nm_device_get_act_request (dev)))
- return FALSE;
-
- stage = nm_act_request_get_stage (req);
- switch (stage)
- {
- case NM_ACT_STAGE_ACTIVATED:
- activated = TRUE;
- break;
-
- case NM_ACT_STAGE_DEVICE_PREPARE:
- case NM_ACT_STAGE_DEVICE_CONFIG:
- case NM_ACT_STAGE_NEED_USER_KEY:
- case NM_ACT_STAGE_IP_CONFIG_START:
- case NM_ACT_STAGE_IP_CONFIG_GET:
- case NM_ACT_STAGE_IP_CONFIG_COMMIT:
- case NM_ACT_STAGE_FAILED:
- case NM_ACT_STAGE_CANCELLED:
- case NM_ACT_STAGE_UNKNOWN:
- default:
- break;
- }
-
- return activated;
-}
-
-
-/*
- * nm_device_activation_should_cancel
- *
- * Return whether or not we've been told to cancel activation
- *
- */
-gboolean nm_device_activation_should_cancel (NMDevice *dev)
-{
- g_return_val_if_fail (dev != NULL, FALSE);
-
- return (dev->quit_activation);
-}
-
-
-static gboolean nm_ac_test (int tries, nm_completion_args args)
-{
- NMDevice *dev = args[0];
-
- g_return_val_if_fail (dev != NULL, TRUE);
-
- if (nm_device_is_activating (dev))
- {
- if (tries % 20 == 0)
- nm_info ("Activation (%s): waiting for device to cancel activation.", nm_device_get_iface(dev));
- return FALSE;
- }
-
- return TRUE;
-}
-
-
-/*
- * nm_device_activation_cancel
- *
- * Signal activation worker that it should stop and die.
- *
- */
-void nm_device_activation_cancel (NMDevice *dev)
-{
- nm_completion_args args;
-
- g_return_if_fail (dev != NULL);
- g_assert (dev->app_data);
-
- if (nm_device_is_activating (dev))
- {
- NMActRequest * req = nm_device_get_act_request (dev);
- gboolean clear_act_request = FALSE;
-
- nm_info ("Activation (%s): cancelling...", nm_device_get_iface (dev));
- dev->quit_activation = TRUE;
-
- /* If the device is waiting for DHCP or a user key, force its current request to stop. */
- if (nm_act_request_get_stage (req) == NM_ACT_STAGE_NEED_USER_KEY)
- {
- nm_dbus_cancel_get_user_key_for_network (dev->app_data->dbus_connection, req);
- clear_act_request = TRUE;
- }
- else if (nm_act_request_get_stage (req) == NM_ACT_STAGE_IP_CONFIG_START)
- {
- nm_dhcp_manager_cancel_transaction (dev->app_data->dhcp_manager, req);
- clear_act_request = TRUE;
- }
-
- if (clear_act_request)
- {
- dev->act_request = NULL;
- nm_act_request_unref (req);
- }
-
- /* Spin until cancelled. Possible race conditions or deadlocks here.
- * The other problem with waiting here is that we hold up dbus traffic
- * that we should respond to.
- */
- args[0] = dev;
- nm_wait_for_completion (NM_COMPLETION_TRIES_INFINITY, G_USEC_PER_SEC / 20, nm_ac_test, NULL, args);
- nm_info ("Activation (%s): cancelled.", nm_device_get_iface(dev));
- nm_schedule_state_change_signal_broadcast (dev->app_data);
- }
-}
-
-
-/*
- * nm_device_deactivate
- *
- * Remove a device's routing table entries and IP address.
- *
- */
-gboolean nm_device_deactivate (NMDevice *dev)
-{
- NMIP4Config * config;
-
- g_return_val_if_fail (dev != NULL, FALSE);
- g_return_val_if_fail (dev->app_data != NULL, FALSE);
-
- nm_info ("Deactivating device %s.", nm_device_get_iface (dev));
-
- if (dev->act_request)
- {
- /* Only send if the device is actually active */
- nm_dbus_schedule_device_status_change_signal (dev->app_data, dev, NULL, DEVICE_NO_LONGER_ACTIVE);
- }
-
- if (nm_device_is_activating (dev))
- nm_device_activation_cancel (dev);
-
- if (dev->act_request)
- {
- nm_dhcp_manager_cancel_transaction (dev->app_data->dhcp_manager, dev->act_request);
- nm_act_request_unref (dev->act_request);
- dev->act_request = NULL;
- }
-
- if (nm_device_get_driver_support_level (dev) == NM_DRIVER_UNSUPPORTED)
- return TRUE;
-
- nm_vpn_manager_deactivate_vpn_connection (dev->app_data->vpn_manager);
-
- /* Remove any device nameservers and domains */
- if ((config = nm_device_get_ip4_config (dev)))
- {
- nm_system_remove_ip4_config_nameservers (dev->app_data->named_manager, config);
- nm_system_remove_ip4_config_search_domains (dev->app_data->named_manager, config);
- nm_device_set_ip4_config (dev, NULL);
- }
-
- /* Take out any entries in the routing table and any IP address the device had. */
- nm_system_device_flush_routes (dev);
- nm_system_device_flush_addresses (dev);
- nm_device_update_ip4_address (dev);
-
- /* Clean up stuff, don't leave the card associated */
- if (nm_device_is_wireless (dev))
- {
- nm_device_set_essid (dev, "");
- nm_device_set_enc_key (dev, NULL, NM_DEVICE_AUTH_METHOD_NONE);
- nm_device_set_mode (dev, NETWORK_MODE_INFRA);
- dev->options.wireless.scan_interval = 20;
- }
-
- return TRUE;
-}
-
-
-/*
- * nm_device_set_user_key_for_network
- *
- * Called upon receipt of a NetworkManagerInfo reply with a
- * user-supplied key.
- *
- */
-void nm_device_set_user_key_for_network (NMActRequest *req, const char *key, const NMEncKeyType enc_type)
-{
- NMData * data;
- NMDevice * dev;
- NMAccessPoint * ap;
- const char * cancel_message = "***canceled***";
-
- g_return_if_fail (key != NULL);
-
- data = nm_act_request_get_data (req);
- g_assert (data);
-
- dev = nm_act_request_get_dev (req);
- g_assert (dev);
-
- ap = nm_act_request_get_ap (req);
- g_assert (ap);
-
- /* If the user canceled, mark the ap as invalid */
- if (strncmp (key, cancel_message, strlen (cancel_message)) == 0)
- {
- nm_ap_list_append_ap (data->invalid_ap_list, ap);
- nm_policy_schedule_device_change_check (data);
- if (req == nm_device_get_act_request (dev))
- nm_device_schedule_activation_handle_cancel (req);
- }
- else
- {
- NMAccessPoint * allowed_ap = nm_ap_list_get_ap_by_essid (data->allowed_ap_list, nm_ap_get_essid (ap));
-
- /* Start off at Open System auth mode with the new key */
- nm_ap_set_auth_method (ap, NM_DEVICE_AUTH_METHOD_OPEN_SYSTEM);
- nm_ap_set_enc_key_source (ap, key, enc_type);
-
- /* Be sure to update NMI with the new auth mode */
- nm_ap_set_auth_method (allowed_ap, NM_DEVICE_AUTH_METHOD_OPEN_SYSTEM);
-
- nm_device_activate_schedule_stage1_device_prepare (req);
- }
-}
-
-
-/*
- * nm_device_ap_list_add_ap
- *
- * Add an access point to the devices internal AP list.
- *
- */
-static void nm_device_ap_list_add_ap (NMDevice *dev, NMAccessPoint *ap)
-{
- g_return_if_fail (dev != NULL);
- g_return_if_fail (ap != NULL);
- g_return_if_fail (nm_device_is_wireless (dev));
-
- nm_ap_list_append_ap (dev->options.wireless.ap_list, ap);
- /* Transfer ownership of ap to the list by unrefing it here */
- nm_ap_unref (ap);
-}
-
-
-/*
- * nm_device_ap_list_clear
- *
- * Clears out the device's internal list of available access points.
- *
- */
-void nm_device_ap_list_clear (NMDevice *dev)
-{
- g_return_if_fail (dev != NULL);
- g_return_if_fail (nm_device_is_wireless (dev));
-
- if (!dev->options.wireless.ap_list)
- return;
-
- nm_ap_list_unref (dev->options.wireless.ap_list);
- dev->options.wireless.ap_list = NULL;
-}
-
-
-/*
- * nm_device_ap_list_get_ap_by_essid
- *
- * Get the access point for a specific essid
- *
- */
-NMAccessPoint *nm_device_ap_list_get_ap_by_essid (NMDevice *dev, const char *essid)
-{
- NMAccessPoint *ret_ap = NULL;
-
- g_return_val_if_fail (dev != NULL, NULL);
- g_return_val_if_fail (nm_device_is_wireless (dev), NULL);
- g_return_val_if_fail (essid != NULL, NULL);
-
- if (!dev->options.wireless.ap_list)
- return (NULL);
-
- ret_ap = nm_ap_list_get_ap_by_essid (dev->options.wireless.ap_list, essid);
-
- return (ret_ap);
-}
-
-
-/*
- * nm_device_ap_list_get_ap_by_address
- *
- * Get the access point for a specific MAC address
- *
- */
-NMAccessPoint *nm_device_ap_list_get_ap_by_address (NMDevice *dev, const struct ether_addr *addr)
-{
- NMAccessPoint *ret_ap = NULL;
-
- g_return_val_if_fail (dev != NULL, NULL);
- g_return_val_if_fail (nm_device_is_wireless (dev), NULL);
- g_return_val_if_fail (addr != NULL, NULL);
-
- if (!dev->options.wireless.ap_list)
- return (NULL);
-
- ret_ap = nm_ap_list_get_ap_by_address (dev->options.wireless.ap_list, addr);
-
- return (ret_ap);
-}
-
-
-/*
- * nm_device_ap_list_get_ap_by_obj_path
- *
- * Get the access point for a dbus object path. Requires an _unescaped_
- * object path.
- *
- */
-NMAccessPoint *nm_device_ap_list_get_ap_by_obj_path (NMDevice *dev, const char *obj_path)
-{
- NMAccessPoint * ret_ap = NULL;
- char * built_path;
- char * dev_path;
-
- g_return_val_if_fail (dev != NULL, NULL);
- g_return_val_if_fail (nm_device_is_wireless (dev), NULL);
- g_return_val_if_fail (obj_path != NULL, NULL);
-
- if (!dev->options.wireless.ap_list)
- return (NULL);
-
- dev_path = nm_dbus_get_object_path_for_device (dev);
- dev_path = nm_dbus_unescape_object_path (dev_path);
- built_path = g_strdup_printf ("%s/Networks/", dev_path);
- g_free (dev_path);
-
- if (strncmp (built_path, obj_path, strlen (built_path)) == 0)
- {
- char *essid = g_strdup (obj_path + strlen (built_path));
-
- ret_ap = nm_ap_list_get_ap_by_essid (dev->options.wireless.ap_list, essid);
- g_free (essid);
- }
- g_free (built_path);
-
- return (ret_ap);
-}
-
-
-/*
- * nm_device_ap_list_get
- *
- * Return a pointer to the AP list
- *
- */
-NMAccessPointList *nm_device_ap_list_get (NMDevice *dev)
-{
- g_return_val_if_fail (dev != NULL, NULL);
- g_return_val_if_fail (nm_device_is_wireless (dev), NULL);
-
- return (dev->options.wireless.ap_list);
-}
-
-
-static gboolean link_to_specific_ap (NMDevice *dev, NMAccessPoint *ap, gboolean default_link)
-{
- gboolean link = FALSE;
-
- /* Checking hardware's ESSID during a scan is doesn't work. */
- nm_lock_mutex (dev->options.wireless.scan_mutex, __FUNCTION__);
-
- if (nm_device_wireless_is_associated (dev))
- {
- char * dev_essid = nm_device_get_essid (dev);
- char * ap_essid = nm_ap_get_essid (ap);
-
- if (dev_essid && ap_essid && !strcmp (dev_essid, ap_essid))
- {
- dev->options.wireless.failed_link_count = 0;
- link = TRUE;
- }
- }
-
- nm_unlock_mutex (dev->options.wireless.scan_mutex, __FUNCTION__);
-
- if (!link)
- {
- dev->options.wireless.failed_link_count++;
- if (dev->options.wireless.failed_link_count < 3)
- link = default_link;
- }
-
- return link;
-}
-
-/*
- * nm_device_update_best_ap
- *
- * Recalculate the "best" access point we should be associating with.
- *
- */
-NMAccessPoint * nm_device_get_best_ap (NMDevice *dev)
-{
- NMAccessPointList * ap_list;
- NMAPListIter * iter;
- NMAccessPoint * scan_ap = NULL;
- NMAccessPoint * best_ap = NULL;
- NMAccessPoint * cur_ap = NULL;
- NMActRequest * req = NULL;
- NMAccessPoint * trusted_best_ap = NULL;
- NMAccessPoint * untrusted_best_ap = NULL;
- GTimeVal trusted_latest_timestamp = {0, 0};
- GTimeVal untrusted_latest_timestamp = {0, 0};
-
- g_return_val_if_fail (dev != NULL, NULL);
- g_return_val_if_fail (nm_device_is_wireless (dev), NULL);
- g_assert (dev->app_data);
-
- /* Devices that can't scan don't do anything automatic.
- * The user must choose the access point from the menu.
- */
- if (!nm_device_get_supports_wireless_scan (dev) && !nm_device_has_active_link (dev))
- return NULL;
-
- if (!(ap_list = nm_device_ap_list_get (dev)))
- return NULL;
-
- /* We prefer the currently selected access point if its user-chosen or if there
- * is still a hardware link to it.
- */
- if ((req = nm_device_get_act_request (dev)))
- {
- if ((cur_ap = nm_act_request_get_ap (req)))
- {
- char * essid = nm_ap_get_essid (cur_ap);
- gboolean keep = FALSE;
-
- if (nm_ap_get_user_created (cur_ap))
- keep = TRUE;
- else if (nm_act_request_get_user_requested (req))
- keep = TRUE;
- else if (link_to_specific_ap (dev, cur_ap, TRUE))
- keep = TRUE;
-
- /* Only keep if its not in the invalid list and its _is_ in our scaned list */
- if ( keep
- && !nm_ap_list_get_ap_by_essid (dev->app_data->invalid_ap_list, essid)
- && nm_device_ap_list_get_ap_by_essid (dev, essid))
- {
- nm_ap_ref (cur_ap);
- return cur_ap;
- }
- }
- }
-
- if (!(iter = nm_ap_list_iter_new (ap_list)))
- return NULL;
- while ((scan_ap = nm_ap_list_iter_next (iter)))
- {
- NMAccessPoint *tmp_ap;
- char *ap_essid = nm_ap_get_essid (scan_ap);
-
- /* Access points in the "invalid" list cannot be used */
- if (nm_ap_list_get_ap_by_essid (dev->app_data->invalid_ap_list, ap_essid))
- continue;
-
- if ((tmp_ap = nm_ap_list_get_ap_by_essid (dev->app_data->allowed_ap_list, ap_essid)))
- {
- const GTimeVal *curtime = nm_ap_get_timestamp (tmp_ap);
-
- if (nm_ap_get_trusted (tmp_ap) && (curtime->tv_sec > trusted_latest_timestamp.tv_sec))
- {
- trusted_latest_timestamp = *nm_ap_get_timestamp (tmp_ap);
- trusted_best_ap = scan_ap;
- /* Merge access point data (mainly to get updated WEP key) */
- nm_ap_set_enc_key_source (trusted_best_ap, nm_ap_get_enc_key_source (tmp_ap), nm_ap_get_enc_type (tmp_ap));
- }
- else if (!nm_ap_get_trusted (tmp_ap) && (curtime->tv_sec > untrusted_latest_timestamp.tv_sec))
- {
- untrusted_latest_timestamp = *nm_ap_get_timestamp (tmp_ap);
- untrusted_best_ap = scan_ap;
- /* Merge access point data (mainly to get updated WEP key) */
- nm_ap_set_enc_key_source (untrusted_best_ap, nm_ap_get_enc_key_source (tmp_ap), nm_ap_get_enc_type (tmp_ap));
- }
- }
- }
- best_ap = trusted_best_ap ? trusted_best_ap : untrusted_best_ap;
- nm_ap_list_iter_free (iter);
-
- if (best_ap)
- nm_ap_ref (best_ap);
-
- return best_ap;
-}
-
-
-/*
- * nm_device_wireless_get_activation_ap
- *
- * Return an access point suitable for use in the device activation
- * request.
- *
- */
-NMAccessPoint * nm_device_wireless_get_activation_ap (NMDevice *dev, const char *essid, const char *key, NMEncKeyType key_type)
-{
- gboolean encrypted = FALSE;
- NMAccessPoint *ap = NULL;
- NMAccessPoint *tmp_ap = NULL;
-
- g_return_val_if_fail (dev != NULL, NULL);
- g_return_val_if_fail (dev->app_data != NULL, NULL);
- g_return_val_if_fail (essid != NULL, NULL);
-
- nm_debug ("Forcing AP '%s'", essid);
-
- if ( key
- && strlen (key)
- && (key_type != NM_ENC_TYPE_UNKNOWN)
- && (key_type != NM_ENC_TYPE_NONE))
- encrypted = TRUE;
-
- /* Find the AP in our card's scan list first.
- * If its not there, create an entirely new AP.
- */
- if (!(ap = nm_ap_list_get_ap_by_essid (nm_device_ap_list_get (dev), essid)))
- {
- /* Okay, the card didn't see it in the scan, Cisco cards sometimes do this.
- * So we make a "fake" access point and add it to the scan list.
- */
- ap = nm_ap_new ();
- nm_ap_set_essid (ap, essid);
- nm_ap_set_encrypted (ap, encrypted);
- if (encrypted)
- nm_ap_set_auth_method (ap, NM_DEVICE_AUTH_METHOD_OPEN_SYSTEM);
- else
- nm_ap_set_auth_method (ap, NM_DEVICE_AUTH_METHOD_NONE);
- nm_ap_set_artificial (ap, TRUE);
- nm_ap_list_append_ap (nm_device_ap_list_get (dev), ap);
- nm_ap_unref (ap);
- }
- else
- {
- /* If the AP is in the ignore list, we have to remove it since
- * the User Knows What's Best.
- */
- nm_ap_list_remove_ap_by_essid (dev->app_data->invalid_ap_list, nm_ap_get_essid (ap));
- }
-
- /* Now that this AP has an essid, copy over encryption keys and whatnot */
- if ((tmp_ap = nm_ap_list_get_ap_by_essid (dev->app_data->allowed_ap_list, nm_ap_get_essid (ap))))
- {
- nm_ap_set_enc_key_source (ap, nm_ap_get_enc_key_source (tmp_ap), nm_ap_get_enc_type (tmp_ap));
- nm_ap_set_auth_method (ap, nm_ap_get_auth_method (tmp_ap));
- nm_ap_set_invalid (ap, nm_ap_get_invalid (tmp_ap));
- nm_ap_set_timestamp (ap, nm_ap_get_timestamp (tmp_ap));
- }
-
- /* Use the encryption key and type the user sent us if its valid */
- if (encrypted)
- nm_ap_set_enc_key_source (ap, key, key_type);
-
- return ap;
-}
-
-
-/*
- * nm_device_fake_ap_list
- *
- * Fake the access point list, used for test devices.
- *
- */
-static void nm_device_fake_ap_list (NMDevice *dev)
-{
- #define NUM_FAKE_APS 4
-
- int i;
- NMAccessPointList * old_ap_list = nm_device_ap_list_get (dev);
-
- const char *fake_essids[NUM_FAKE_APS] = { "green", "bay", "packers", "rule" };
- struct ether_addr fake_addrs[NUM_FAKE_APS] = {{{0x70, 0x37, 0x03, 0x70, 0x37, 0x03}},
- {{0x12, 0x34, 0x56, 0x78, 0x90, 0xab}},
- {{0xcd, 0xef, 0x12, 0x34, 0x56, 0x78}},
- {{0x90, 0xab, 0xcd, 0xef, 0x12, 0x34}} };
- guint8 fake_qualities[NUM_FAKE_APS] = { 150, 26, 200, 100 };
- double fake_freqs[NUM_FAKE_APS] = { 3.1416, 4.1416, 5.1415, 6.1415 };
- gboolean fake_enc[NUM_FAKE_APS] = { FALSE, TRUE, FALSE, TRUE };
-
- g_return_if_fail (dev != NULL);
- g_return_if_fail (dev->app_data != NULL);
-
- dev->options.wireless.ap_list = nm_ap_list_new (NETWORK_TYPE_DEVICE);
-
- for (i = 0; i < NUM_FAKE_APS; i++)
- {
- NMAccessPoint *nm_ap = nm_ap_new ();
- NMAccessPoint *list_ap;
-
- /* Copy over info from scan to local structure */
- nm_ap_set_essid (nm_ap, fake_essids[i]);
-
- if (fake_enc[i])
- nm_ap_set_encrypted (nm_ap, FALSE);
- else
- nm_ap_set_encrypted (nm_ap, TRUE);
-
- nm_ap_set_address (nm_ap, (const struct ether_addr *)(&fake_addrs[i]));
- nm_ap_set_strength (nm_ap, fake_qualities[i]);
- nm_ap_set_freq (nm_ap, fake_freqs[i]);
-
- /* Merge settings from wireless networks, mainly keys */
- if ((list_ap = nm_ap_list_get_ap_by_essid (dev->app_data->allowed_ap_list, nm_ap_get_essid (nm_ap))))
- {
- nm_ap_set_timestamp (nm_ap, nm_ap_get_timestamp (list_ap));
- nm_ap_set_enc_key_source (nm_ap, nm_ap_get_enc_key_source (list_ap), nm_ap_get_enc_type (list_ap));
- }
-
- /* Add the AP to the device's AP list */
- nm_device_ap_list_add_ap (dev, nm_ap);
- }
-
- if (nm_device_get_act_request (dev))
- nm_ap_list_diff (dev->app_data, dev, old_ap_list, nm_device_ap_list_get (dev));
- if (old_ap_list)
- nm_ap_list_unref (old_ap_list);
-}
-
-
-/*
- * nm_device_wireless_schedule_scan
- *
- * Schedule a wireless scan in the /device's/ thread.
- *
- */
-static void nm_device_wireless_schedule_scan (NMDevice *dev)
-{
- GSource *wscan_source;
- guint wscan_source_id;
- NMWirelessScanCB *scan_cb;
-
- g_return_if_fail (dev != NULL);
- g_return_if_fail (nm_device_is_wireless (dev));
-
- scan_cb = g_malloc0 (sizeof (NMWirelessScanCB));
- scan_cb->dev = dev;
- scan_cb->reschedule = TRUE;
-
- wscan_source = g_timeout_source_new (dev->options.wireless.scan_interval * 1000);
- g_source_set_callback (wscan_source, nm_device_wireless_scan, scan_cb, NULL);
- wscan_source_id = g_source_attach (wscan_source, dev->context);
- g_source_unref (wscan_source);
-}
-
-
-/*
- * nm_device_wireless_process_scan_results
- *
- * Process results of an iwscan() into our own AP lists. We're an idle function,
- * but we never reschedule ourselves.
- *
- */
-static gboolean nm_device_wireless_process_scan_results (gpointer user_data)
-{
- NMWirelessScanResults *results = (NMWirelessScanResults *)user_data;
- NMDevice *dev;
- wireless_scan *tmp_ap;
- gboolean have_blank_essids = FALSE;
- NMAPListIter *iter;
- GTimeVal cur_time;
- gboolean list_changed = FALSE;
-
- g_return_val_if_fail (results != NULL, FALSE);
-
- dev = results->dev;
- if (!dev || !results->scan_head.result)
- return FALSE;
-
- g_get_current_time (&cur_time);
-
- /* Translate iwlib scan results to NM access point list */
- for (tmp_ap = results->scan_head.result; tmp_ap; tmp_ap = tmp_ap->next)
- {
- /* We need at least an ESSID or a MAC address for each access point */
- if (tmp_ap->b.has_essid || tmp_ap->has_ap_addr)
- {
- NMAccessPoint *nm_ap = nm_ap_new ();
- int percent;
- gboolean new = FALSE;
- gboolean strength_changed = FALSE;
- gboolean success = FALSE;
-
- /* Copy over info from scan to local structure */
-
- /* ipw2x00 drivers fill in an essid of "<hidden>" if they think the access point
- * is hiding its MAC address. Sigh.
- */
- if ( !tmp_ap->b.has_essid
- || (tmp_ap->b.essid && !strlen (tmp_ap->b.essid))
- || (tmp_ap->b.essid && !strcmp (tmp_ap->b.essid, "<hidden>"))) /* Stupid ipw drivers use <hidden> */
- nm_ap_set_essid (nm_ap, NULL);
- else
- nm_ap_set_essid (nm_ap, tmp_ap->b.essid);
-
- if (tmp_ap->b.has_key && (tmp_ap->b.key_flags & IW_ENCODE_DISABLED))
- {
- nm_ap_set_encrypted (nm_ap, FALSE);
- nm_ap_set_auth_method (nm_ap, NM_DEVICE_AUTH_METHOD_NONE);
- }
- else
- {
- nm_ap_set_encrypted (nm_ap, TRUE);
- nm_ap_set_auth_method (nm_ap, NM_DEVICE_AUTH_METHOD_OPEN_SYSTEM);
- }
-
- if (tmp_ap->has_ap_addr)
- nm_ap_set_address (nm_ap, (const struct ether_addr *)(tmp_ap->ap_addr.sa_data));
-
- if (tmp_ap->b.has_mode)
- {
- NMNetworkMode mode = NETWORK_MODE_INFRA;
- switch (tmp_ap->b.mode)
- {
- case IW_MODE_INFRA:
- mode = NETWORK_MODE_INFRA;
- break;
- case IW_MODE_ADHOC:
- mode = NETWORK_MODE_ADHOC;
- break;
- default:
- mode = NETWORK_MODE_INFRA;
- break;
- }
- nm_ap_set_mode (nm_ap, mode);
- }
- else
- nm_ap_set_mode (nm_ap, NETWORK_MODE_INFRA);
-
- percent = nm_wireless_qual_to_percent (&(tmp_ap->stats.qual),
- (const iwqual *)(&dev->options.wireless.max_qual),
- (const iwqual *)(&dev->options.wireless.avg_qual));
- nm_ap_set_strength (nm_ap, percent);
-
- if (tmp_ap->b.has_freq)
- nm_ap_set_freq (nm_ap, tmp_ap->b.freq);
-
- nm_ap_set_last_seen (nm_ap, &cur_time);
-
- /* If the AP is not broadcasting its ESSID, try to fill it in here from our
- * allowed list where we cache known MAC->ESSID associations.
- */
- if (!nm_ap_get_essid (nm_ap))
- nm_ap_list_copy_one_essid_by_address (nm_ap, dev->app_data->allowed_ap_list);
-
- /* Add the AP to the device's AP list */
- success = nm_ap_list_merge_scanned_ap (nm_device_ap_list_get (dev), nm_ap, &new, &strength_changed);
- if (success)
- {
- /* Handle dbus signals that we need to broadcast when the AP is added to the list or changes strength */
- if (new)
- {
- nm_dbus_signal_wireless_network_change (dev->app_data->dbus_connection, dev, nm_ap,
- NETWORK_STATUS_APPEARED, -1);
- list_changed = TRUE;
- }
- else if (strength_changed)
- {
- nm_dbus_signal_wireless_network_change (dev->app_data->dbus_connection, dev, nm_ap,
- NETWORK_STATUS_STRENGTH_CHANGED, nm_ap_get_strength (nm_ap));
- }
- }
- nm_ap_unref (nm_ap);
- }
- }
-
- /* Once we have the list, copy in any relevant information from our Allowed list. */
- nm_ap_list_copy_properties (nm_device_ap_list_get (dev), dev->app_data->allowed_ap_list);
-
- /* Walk the access point list and remove any access points older than 120s */
- g_get_current_time (&cur_time);
- if (nm_device_ap_list_get (dev) && (iter = nm_ap_list_iter_new (nm_device_ap_list_get (dev))))
- {
- NMAccessPoint *outdated_ap;
- GSList * outdated_list = NULL;
- GSList * elt;
- NMActRequest * req = nm_device_get_act_request (dev);
- NMAccessPoint *cur_ap = NULL;
-
- if (req)
- {
- cur_ap = nm_act_request_get_ap (req);
- g_assert (cur_ap);
- }
-
- while ((outdated_ap = nm_ap_list_iter_next (iter)))
- {
- const GTimeVal *ap_time = nm_ap_get_last_seen (outdated_ap);
- gboolean keep_around = FALSE;
-
- /* Don't ever get prune the AP we're currently associated with */
- if ( nm_ap_get_essid (outdated_ap)
- && (cur_ap && (nm_null_safe_strcmp (nm_ap_get_essid (cur_ap), nm_ap_get_essid (outdated_ap))) == 0))
- keep_around = TRUE;
-
- if (!keep_around && (ap_time->tv_sec + 120 < cur_time.tv_sec))
- outdated_list = g_slist_append (outdated_list, outdated_ap);
- }
- nm_ap_list_iter_free (iter);
-
- /* Ok, now remove outdated ones. We have to do it after the lock
- * because nm_ap_list_remove_ap() locks the list too.
- */
- for (elt = outdated_list; elt; elt = g_slist_next (elt))
- {
- if ((outdated_ap = (NMAccessPoint *)(elt->data)))
- {
- nm_dbus_signal_wireless_network_change (dev->app_data->dbus_connection, dev, outdated_ap, NETWORK_STATUS_DISAPPEARED, -1);
- nm_ap_list_remove_ap (nm_device_ap_list_get (dev), outdated_ap);
- list_changed = TRUE;
- }
- }
- g_slist_free (outdated_list);
- }
-
- /* If the list changed or we are unassociated, decrease our wireless scanning interval */
- if (list_changed || !nm_device_is_activated (dev))
- dev->options.wireless.scan_interval = 20;
- else
- dev->options.wireless.scan_interval = MIN (60, dev->options.wireless.scan_interval + 10);
-
- nm_policy_schedule_device_change_check (dev->app_data);
-
- return FALSE;
-}
-
-
-static gboolean nm_completion_scan_has_results (int tries, nm_completion_args args)
-{
- NMDevice *dev = args[0];
- gboolean *err = args[1];
- NMSock *sk = args[2];
- NMWirelessScanResults *scan_results = args[3];
- int rc;
-
- g_return_val_if_fail (dev != NULL, TRUE);
- g_return_val_if_fail (err != NULL, TRUE);
- g_return_val_if_fail (scan_results != NULL, TRUE);
-
- rc = iw_scan (nm_dev_sock_get_fd (sk), (char *)nm_device_get_iface (dev), WIRELESS_EXT, &(scan_results->scan_head));
- *err = FALSE;
- if (rc == -1 && errno == ETIME)
- {
- /* Scans take time. iw_scan's timeout is 15 seconds, so if the card hasn't returned
- * scan results after two consecutive runs of iw_scan(), the card sucks.
- */
- if (tries >= 1)
- {
- nm_warning ("Warning: the wireless card (%s) requires too much time for scans. Its driver needs to be fixed.", nm_device_get_iface (dev));
- scan_results->scan_head.result = NULL;
- *err = TRUE;
- return TRUE;
- }
- else
- {
- /* Give the card one more chance to return scan results */
- scan_results->scan_head.result = NULL;
- return FALSE;
- }
- }
- if ((rc == -1 && errno == ENODATA) || (rc == 0 && scan_results->scan_head.result == NULL))
- {
- /* Card hasn't had time yet to compile full access point list.
- * Give it some more time and scan again. If that doesn't
- * work, we eventually give up. */
- scan_results->scan_head.result = NULL;
- return FALSE;
- }
- else if (rc == -1)
- {
- scan_results->scan_head.result = NULL;
- return TRUE;
- }
- return TRUE;
-}
-
-
-/*
- * nm_device_wireless_scan
- *
- * Get a list of access points this device can see.
- *
- */
-static gboolean nm_device_wireless_scan (gpointer user_data)
-{
- NMWirelessScanCB *scan_cb = (NMWirelessScanCB *)(user_data);
- NMDevice *dev = NULL;
- NMWirelessScanResults *scan_results = NULL;
-
- g_return_val_if_fail (scan_cb != NULL, FALSE);
-
- dev = scan_cb->dev;
- if (!dev || !dev->app_data)
- {
- g_free (scan_cb);
- return FALSE;
- }
-
- /* Reschedule if scanning is off, or if scanning is AUTO and we are
- * associated to an access point.
- */
- if ( (dev->app_data->scanning_method == NM_SCAN_METHOD_NEVER)
- || ( (dev->app_data->scanning_method == NM_SCAN_METHOD_WHEN_UNASSOCIATED)
- && nm_device_is_activated (dev)))
- {
- dev->options.wireless.scan_interval = 10;
- goto reschedule;
- }
-
- /* Reschedule ourselves if all wireless is disabled, we're asleep,
- * or we are currently activating.
- */
- if ( (dev->app_data->wireless_enabled == FALSE)
- || (dev->app_data->asleep == TRUE)
- || (nm_device_is_activating (dev) == TRUE))
- {
- dev->options.wireless.scan_interval = 10;
- goto reschedule;
- }
-
- /* Test devices get a fake ap list */
- if (dev->test_device)
- {
- nm_device_fake_ap_list (dev);
- dev->options.wireless.scan_interval = 20;
- goto reschedule;
- }
-
- /* Grab the scan mutex */
- if (nm_try_acquire_mutex (dev->options.wireless.scan_mutex, __FUNCTION__))
- {
- NMSock *sk;
- gboolean devup_err;
-
- /* Device must be up before we can scan */
- devup_err = nm_device_bring_up_wait(dev, 1);
- if (devup_err)
- {
- nm_unlock_mutex (dev->options.wireless.scan_mutex, __FUNCTION__);
- goto reschedule;
- }
-
- if ((sk = nm_dev_sock_open (dev, DEV_WIRELESS, __FUNCTION__, NULL)))
- {
- int err;
- NMNetworkMode orig_mode = NETWORK_MODE_INFRA;
- double orig_freq = 0;
- int orig_rate = 0;
- const int max_wait = G_USEC_PER_SEC * nm_device_get_association_pause_value (dev) /2;
- nm_completion_args args;
-
- orig_mode = nm_device_get_mode (dev);
- if (orig_mode == NETWORK_MODE_ADHOC)
- {
- orig_freq = nm_device_get_frequency (dev);
- orig_rate = nm_device_get_bitrate (dev);
- }
-
- /* Must be in infrastructure mode during scan, otherwise we don't get a full
- * list of scan results. Scanning doesn't work well in Ad-Hoc mode :(
- */
- nm_device_set_mode (dev, NETWORK_MODE_INFRA);
- nm_device_set_frequency (dev, 0);
-
- scan_results = g_malloc0 (sizeof (NMWirelessScanResults));
-
- args[0] = dev;
- args[1] = &err;
- args[2] = sk;
- args[3] = scan_results;
- nm_wait_for_completion(max_wait, max_wait/20,
- nm_completion_scan_has_results, NULL, args);
-
- nm_device_set_mode (dev, orig_mode);
- /* Only set frequency if ad-hoc mode */
- if (orig_mode == NETWORK_MODE_ADHOC)
- {
- nm_device_set_frequency (dev, orig_freq);
- nm_device_set_bitrate (dev, orig_rate);
- }
-
- nm_dev_sock_close (sk);
-
- if (!scan_results->scan_head.result)
- {
- g_free (scan_results);
- scan_results = NULL;
- }
- }
- nm_unlock_mutex (dev->options.wireless.scan_mutex, __FUNCTION__);
- }
-
-
- /* We run the scan processing function from the main thread, since it must deliver
- * messages over DBUS. Plus, that way the main thread is the only thread that has
- * to modify the device's access point list.
- */
- if ((scan_results != NULL) && (scan_results->scan_head.result != NULL))
- {
- guint scan_process_source_id = 0;
- GSource *scan_process_source = g_idle_source_new ();
- GTimeVal cur_time;
-
- scan_results->dev = dev;
- g_source_set_callback (scan_process_source, nm_device_wireless_process_scan_results, scan_results, NULL);
- scan_process_source_id = g_source_attach (scan_process_source, dev->app_data->main_context);
- g_source_unref (scan_process_source);
-
- g_get_current_time (&cur_time);
- dev->options.wireless.last_scan = cur_time.tv_sec;
- }
-
-reschedule:
- /* Make sure we reschedule ourselves so we keep scanning */
- if (scan_cb->reschedule)
- nm_device_wireless_schedule_scan (dev);
-
- g_free (scan_cb);
- return FALSE;
-}
-
-
-/* IP Configuration stuff */
-
-gboolean nm_device_get_use_dhcp (NMDevice *dev)
-{
- g_return_val_if_fail (dev != NULL, FALSE);
-
- return dev->use_dhcp;
-}
-
-void nm_device_set_use_dhcp (NMDevice *dev, gboolean use_dhcp)
-{
- g_return_if_fail (dev != NULL);
-
- dev->use_dhcp = use_dhcp;
-}
-
-
-NMIP4Config *nm_device_get_ip4_config (NMDevice *dev)
-{
- g_return_val_if_fail (dev != NULL, NULL);
-
- return dev->ip4_config;
-}
-
-
-void nm_device_set_ip4_config (NMDevice *dev, NMIP4Config *config)
-{
- NMIP4Config *old_config;
-
- g_return_if_fail (dev != NULL);
-
- old_config = dev->ip4_config;
- if (config)
- nm_ip4_config_ref (config);
- dev->ip4_config = config;
- if (old_config)
- nm_ip4_config_unref (old_config);
-}
-
-
-/*
- * nm_device_get_system_config_data
- *
- * Return distro-specific system configuration data for this device.
- *
- */
-void *nm_device_get_system_config_data (NMDevice *dev)
-{
- g_return_val_if_fail (dev != NULL, NULL);
-
- return dev->system_config_data;
-}
-
-
-/* Define types for stupid headers */
-typedef u_int8_t u8;
-typedef u_int16_t u16;
-typedef u_int32_t u32;
-typedef u_int64_t u64;
-
-
-/**************************************/
-/* Ethtool capability detection */
-/**************************************/
-#include <linux/sockios.h>
-#include <linux/ethtool.h>
-
-static gboolean supports_ethtool_carrier_detect (NMDevice *dev)
-{
- NMSock *sk;
- struct ifreq ifr;
- gboolean supports_ethtool = FALSE;
- struct ethtool_cmd edata;
-
- g_return_val_if_fail (dev != NULL, FALSE);
-
- if ((sk = nm_dev_sock_open (dev, DEV_GENERAL, __FUNCTION__, NULL)) == NULL)
- {
- nm_warning ("cannot open socket on interface %s for ethtool detect; errno=%d", nm_device_get_iface (dev), errno);
- return (FALSE);
- }
-
- strncpy (ifr.ifr_name, nm_device_get_iface (dev), sizeof(ifr.ifr_name)-1);
- edata.cmd = ETHTOOL_GLINK;
- ifr.ifr_data = (char *) &edata;
-#ifdef IOCTL_DEBUG
- nm_info ("%s: About to ETHTOOL\n", nm_device_get_iface (dev));
-#endif
- if (ioctl (nm_dev_sock_get_fd (sk), SIOCETHTOOL, &ifr) == -1)
- goto out;
-
- supports_ethtool = TRUE;
-
-out:
-#ifdef IOCTL_DEBUG
- nm_info ("%s: Done with ETHTOOL\n", nm_device_get_iface (dev));
-#endif
- nm_dev_sock_close (sk);
- return (supports_ethtool);
-}
-
-
-
-/**************************************/
-/* MII capability detection */
-/**************************************/
-#include <linux/mii.h>
-
-static int mdio_read (NMDevice *dev, NMSock *sk, struct ifreq *ifr, int location)
-{
- struct mii_ioctl_data *mii;
- int val = -1;
-
- g_return_val_if_fail (sk != NULL, -1);
- g_return_val_if_fail (ifr != NULL, -1);
-
- mii = (struct mii_ioctl_data *) &(ifr->ifr_data);
- mii->reg_num = location;
-
-#ifdef IOCTL_DEBUG
- nm_info ("%s: About to GET MIIREG\n", nm_device_get_iface (dev));
-#endif
- if (ioctl (nm_dev_sock_get_fd (sk), SIOCGMIIREG, ifr) >= 0)
- val = mii->val_out;
-#ifdef IOCTL_DEBUG
- nm_info ("%s: Done with GET MIIREG\n", nm_device_get_iface (dev));
-#endif
-
- return val;
-}
-
-static gboolean supports_mii_carrier_detect (NMDevice *dev)
-{
- NMSock * sk;
- struct ifreq ifr;
- int bmsr;
- gboolean supports_mii = FALSE;
- int err;
-
- g_return_val_if_fail (dev != NULL, FALSE);
-
- if ((sk = nm_dev_sock_open (dev, DEV_GENERAL, __FUNCTION__, NULL)) == NULL)
- {
- nm_warning ("cannot open socket on interface %s for MII detect; errno=%d", nm_device_get_iface (dev), errno);
- return (FALSE);
- }
-
- strncpy (ifr.ifr_name, nm_device_get_iface (dev), sizeof(ifr.ifr_name)-1);
-#ifdef IOCTL_DEBUG
- nm_info ("%s: About to GET MIIPHY\n", nm_device_get_iface (dev));
-#endif
- err = ioctl (nm_dev_sock_get_fd (sk), SIOCGMIIPHY, &ifr);
-#ifdef IOCTL_DEBUG
- nm_info ("%s: Done with GET MIIPHY\n", nm_device_get_iface (dev));
-#endif
- if (err < 0)
- goto out;
-
- /* If we can read the BMSR register, we assume that the card supports MII link detection */
- bmsr = mdio_read (dev, sk, &ifr, MII_BMSR);
- supports_mii = (bmsr != -1) ? TRUE : FALSE;
-
-out:
- nm_dev_sock_close (sk);
- return supports_mii;
-}
-
-/****************************************/
-/* End Code ripped from HAL */
-/****************************************/
-
-
-/****************************************/
-/* Test device routes */
-/****************************************/
-
-/*
- * nm_device_is_test_device
- *
- */
-gboolean nm_device_is_test_device (NMDevice *dev)
-{
- g_return_val_if_fail (dev != NULL, FALSE);
-
- return (dev->test_device);
-}
-
diff --git a/src/NetworkManagerDevice.h b/src/NetworkManagerDevice.h
deleted file mode 100644
index 1a17f527eb..0000000000
--- a/src/NetworkManagerDevice.h
+++ /dev/null
@@ -1,135 +0,0 @@
-/* NetworkManager -- Network link manager
- *
- * Dan Williams <dcbw@redhat.com>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- *
- * (C) Copyright 2004 Red Hat, Inc.
- */
-
-#ifndef NETWORK_MANAGER_DEVICE_H
-#define NETWORK_MANAGER_DEVICE_H
-
-#include <net/ethernet.h>
-#include <iwlib.h>
-#include "NetworkManager.h"
-#include "NetworkManagerMain.h"
-#include "nm-ip4-config.h"
-
-#if 0
-#define IOCTL_DEBUG
-#endif
-
-typedef struct NMDevice NMDevice;
-
-
-NMDevice * nm_device_new (const char *iface, const char *udi, gboolean test_device,
- NMDeviceType test_dev_type, NMData *app_data);
-
-void nm_device_ref (NMDevice *dev);
-gboolean nm_device_unref (NMDevice *dev);
-void nm_device_worker_thread_stop (NMDevice *dev);
-
-int nm_device_open_sock (void);
-
-char * nm_device_get_udi (NMDevice *dev);
-void nm_device_set_udi (NMDevice *dev, const char *udi);
-
-const char * nm_device_get_iface (NMDevice *dev);
-
-NMDeviceType nm_device_get_type (NMDevice *dev);
-NMDriverSupportLevel nm_device_get_driver_support_level (NMDevice *dev);
-
-gboolean nm_device_is_wireless (NMDevice *dev);
-gboolean nm_device_is_wired (NMDevice *dev);
-
-NMData * nm_device_get_app_data (const NMDevice *dev);
-
-gboolean nm_device_get_removed (const NMDevice *dev);
-void nm_device_set_removed (NMDevice *dev, const gboolean removed);
-
-gboolean nm_device_has_active_link (NMDevice *dev);
-void nm_device_set_link_active (NMDevice *dev, const gboolean active);
-gboolean nm_device_probe_link_state (NMDevice *dev);
-
-char * nm_device_get_essid (NMDevice *dev);
-void nm_device_set_essid (NMDevice *dev, const char *essid);
-
-void nm_device_get_ap_address (NMDevice *dev, struct ether_addr *addr);
-
-NMNetworkMode nm_device_get_mode (NMDevice *dev);
-
-guint32 nm_device_get_ip4_address (NMDevice *dev);
-void nm_device_update_ip4_address (NMDevice *dev);
-
-void nm_device_get_hw_address (NMDevice *dev, struct ether_addr *addr);
-void nm_device_update_hw_address (NMDevice *dev);
-
-void nm_device_get_ip6_address (NMDevice *dev);
-
-gboolean nm_device_get_supports_wireless_scan (NMDevice *dev);
-
-gboolean nm_device_get_supports_carrier_detect (NMDevice *dev);
-
-gboolean nm_device_set_mode (NMDevice *dev, const NMNetworkMode mode);
-
-gint8 nm_device_get_signal_strength (NMDevice *dev);
-void nm_device_update_signal_strength (NMDevice *dev);
-
-NMAccessPoint *nm_device_get_best_ap (NMDevice *dev);
-
-/* There is no function to get the WEP key since that's a slight security risk */
-void nm_device_set_enc_key (NMDevice *dev, const char *key, NMDeviceAuthMethod auth_method);
-
-NMActRequest * nm_device_get_act_request (NMDevice *dev);
-gboolean nm_device_activation_start (NMActRequest *req);
-void nm_device_activate_schedule_stage4_ip_config_get (NMActRequest *req);
-void nm_device_activate_schedule_stage4_ip_config_timeout (NMActRequest *req);
-void nm_device_activation_cancel (NMDevice *dev);
-gboolean nm_device_activation_should_cancel (NMDevice *dev);
-gboolean nm_device_is_activating (NMDevice *dev);
-gboolean nm_device_deactivate (NMDevice *dev);
-
-NMAccessPoint *nm_device_wireless_get_activation_ap (NMDevice *dev, const char *essid, const char *key, NMEncKeyType key_type);
-
-void nm_device_set_user_key_for_network (NMActRequest *req, const char *key, const NMEncKeyType enc_type);
-
-void nm_device_bring_up (NMDevice *dev);
-void nm_device_bring_down (NMDevice *dev);
-gboolean nm_device_is_up (NMDevice *dev);
-
-void nm_device_ap_list_clear (NMDevice *dev);
-struct NMAccessPointList *nm_device_ap_list_get (NMDevice *dev);
-NMAccessPoint *nm_device_ap_list_get_ap_by_essid (NMDevice *dev, const char *essid);
-NMAccessPoint *nm_device_ap_list_get_ap_by_address (NMDevice *dev, const struct ether_addr *addr);
-NMAccessPoint *nm_device_ap_list_get_ap_by_obj_path (NMDevice *dev, const char *obj_path);
-void nm_device_copy_allowed_to_dev_list (NMDevice *dev, struct NMAccessPointList *allowed_list);
-
-gboolean nm_device_get_use_dhcp (NMDevice *dev);
-void nm_device_set_use_dhcp (NMDevice *dev, gboolean use_dhcp);
-
-NMIP4Config * nm_device_get_ip4_config (NMDevice *dev);
-void nm_device_set_ip4_config (NMDevice *dev, NMIP4Config *config);
-
-void * nm_device_get_system_config_data (NMDevice *dev);
-
-/* Utility routines */
-NMDevice * nm_get_device_by_udi (NMData *data, const char *udi);
-NMDevice * nm_get_device_by_iface (NMData *data, const char *iface);
-
-/* Test device routines */
-gboolean nm_device_is_test_device (NMDevice *dev);
-
-#endif
diff --git a/src/NetworkManagerDevicePrivate.h b/src/NetworkManagerDevicePrivate.h
deleted file mode 100644
index a7817d3134..0000000000
--- a/src/NetworkManagerDevicePrivate.h
+++ /dev/null
@@ -1,109 +0,0 @@
-/* NetworkManager -- Network link manager
- *
- * Dan Williams <dcbw@redhat.com>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- *
- * (C) Copyright 2005 Red Hat, Inc.
- */
-
-#include <errno.h>
-#include <glib.h>
-#include <dbus/dbus-glib.h>
-#include <libhal.h>
-#include <iwlib.h>
-#include <signal.h>
-#include <string.h>
-
-#include "NetworkManager.h"
-#include "NetworkManagerMain.h"
-#include "NetworkManagerDevice.h"
-#include "NetworkManagerAPList.h"
-
-
-/* Wireless device specific options */
-typedef struct NMDeviceWirelessOptions
-{
- char * cur_essid; /* Mainly for test devices */
- gboolean supports_wireless_scan;
- gint8 strength;
- gint8 invalid_strength_counter;
- iwqual max_qual;
- iwqual avg_qual;
-
- guint failed_link_count;
-
- gint8 num_freqs;
- double freqs[IW_MAX_FREQUENCIES];
-
- GMutex * scan_mutex;
- NMAccessPointList * ap_list;
- guint8 scan_interval; /* seconds */
- guint32 last_scan;
-} NMDeviceWirelessOptions;
-
-/* Wired device specific options */
-typedef struct NMDeviceWiredOptions
-{
- gboolean has_carrier_detect;
-} NMDeviceWiredOptions;
-
-/* General options structure */
-typedef union NMDeviceOptions
-{
- NMDeviceWirelessOptions wireless;
- NMDeviceWiredOptions wired;
-} NMDeviceOptions;
-
-
-/*
- * NetworkManager device structure
- */
-struct NMDevice
-{
- guint refcount;
-
- char * udi;
- char * iface;
- NMDeviceType type;
- NMDriverSupportLevel driver_support_level;
- gboolean removed;
-
- gboolean link_active;
- guint32 ip4_address;
- /* FIXME: ipv6 address too */
- struct ether_addr hw_addr;
- NMData * app_data;
- NMDeviceOptions options;
-
- /* IP configuration info */
- void * system_config_data; /* Distro-specific config data (parsed config file, etc) */
- gboolean use_dhcp;
- NMIP4Config * ip4_config; /* Config from DHCP, PPP, or system config files */
-
- GMainContext * context;
- GMainLoop * loop;
- GThread * worker;
- gboolean worker_started;
- guint renew_timeout;
- guint rebind_timeout;
-
- NMActRequest * act_request;
- gboolean quit_activation; /* Flag to signal activation thread to stop activating */
-
- gboolean test_device;
- gboolean test_device_up;
-};
-
diff --git a/src/NetworkManagerDialup.h b/src/NetworkManagerDialup.h
deleted file mode 100644
index 6f1d5c324d..0000000000
--- a/src/NetworkManagerDialup.h
+++ /dev/null
@@ -1,10 +0,0 @@
-#ifndef _NETWORK_MANAGER_DIALUP_H
-#define _NETWORK_MANAGER_DIALUP_H
-
-typedef struct NMDialUpConfig
-{
- char *name; /* user-readable name, unique */
- void *data; /* backend internal data */
-} NMDialUpConfig;
-
-#endif /* _NETWORK_MANAGER_DIALUP_H */
diff --git a/src/NetworkManagerMain.h b/src/NetworkManagerMain.h
deleted file mode 100644
index 7405998e57..0000000000
--- a/src/NetworkManagerMain.h
+++ /dev/null
@@ -1,108 +0,0 @@
-/* NetworkManager -- Network link manager
- *
- * Dan Williams <dcbw@redhat.com>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- *
- * (C) Copyright 2004 Red Hat, Inc.
- */
-
-#ifndef NETWORK_MANAGER_MAIN_H
-#define NETWORK_MANAGER_MAIN_H
-
-#include <glib.h>
-#include <glib/gthread.h>
-#include <dbus/dbus.h>
-#include <libhal.h>
-#include "NetworkManager.h"
-#include "NetworkManagerAP.h"
-#include "nm-netlink-monitor.h"
-#include "nm-named-manager.h"
-
-
-typedef enum NMIntState
-{
- NM_INT_STATE_UNKNOWN = 0,
- NM_INT_STATE_ASLEEP,
- NM_INT_STATE_CONFIGURE_AP,
- NM_INT_STATE_CONFIGURE_DEV,
- NM_INT_STATE_CONFIGURE_IP,
- NM_INT_STATE_CONNECTED,
- NM_INT_STATE_DISCONNECTED
-} NMIntState;
-
-
-typedef struct NMDbusMethodList NMDbusMethodList;
-typedef struct NMActRequest NMActRequest;
-typedef struct NMVPNManager NMVPNManager;
-typedef struct NMDHCPManager NMDHCPManager;
-
-#define DHCP_SERVICE_NAME "com.redhat.dhcp"
-#define DHCP_OBJECT_PATH "/com/redhat/dhcp"
-
-typedef struct NMData
-{
- GIOChannel * sigterm_iochannel;
- int sigterm_pipe[2];
-
- LibHalContext * hal_ctx;
-
- NmNetlinkMonitor * netlink_monitor;
-
- NMNamedManager * named_manager;
- NMVPNManager * vpn_manager;
- NMDHCPManager * dhcp_manager;
-
- DBusConnection * dbus_connection;
- NMDbusMethodList * nm_methods;
- NMDbusMethodList * device_methods;
- NMDbusMethodList * net_methods;
- NMDbusMethodList * vpn_methods;
-
- GMainContext * main_context;
- GMainLoop * main_loop;
- gboolean enable_test_devices;
-
- guint dev_change_check_idle_id;
-
- GSList * dev_list;
- GMutex * dev_list_mutex;
-
- NMWirelessScanMethod scanning_method;
- gboolean wireless_enabled;
- gboolean asleep;
-
- GSList * dialup_list;
- GMutex * dialup_list_mutex;
-
- struct NMAccessPointList *allowed_ap_list;
- struct NMAccessPointList *invalid_ap_list;
-} NMData;
-
-
-struct NMDevice * nm_get_active_device (NMData *data);
-
-struct NMDevice * nm_create_device_and_add_to_list (NMData *data, const char *udi, const char *iface,
- gboolean test_device, NMDeviceType test_device_type);
-
-void nm_remove_device_from_list (NMData *data, const char *udi);
-
-void nm_schedule_state_change_signal_broadcast (NMData *data);
-
-void nm_hal_init (NMData *data);
-
-void nm_hal_deinit (NMData *data);
-
-#endif
diff --git a/src/NetworkManagerPolicy.c b/src/NetworkManagerPolicy.c
deleted file mode 100644
index 7f847d4668..0000000000
--- a/src/NetworkManagerPolicy.c
+++ /dev/null
@@ -1,677 +0,0 @@
-/* NetworkManager -- Network link manager
- *
- * Dan Williams <dcbw@redhat.com>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- *
- * (C) Copyright 2005 Red Hat, Inc.
- */
-
-#include <stdio.h>
-#include <unistd.h>
-#include <errno.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <signal.h>
-#include <fcntl.h>
-#include <sys/select.h>
-
-#include "NetworkManagerPolicy.h"
-#include "NetworkManagerUtils.h"
-#include "NetworkManagerAP.h"
-#include "NetworkManagerAPList.h"
-#include "NetworkManagerDbus.h"
-#include "nm-activation-request.h"
-#include "nm-utils.h"
-
-
-/*
- * nm_policy_activation_finish
- *
- * Finishes up activation by sending out dbus signals, which has to happen
- * on the main thread.
- *
- */
-static gboolean nm_policy_activation_finish (NMActRequest *req)
-{
- NMDevice *dev = NULL;
- NMAccessPoint *ap = NULL;
- NMData *data = NULL;
-
- g_return_val_if_fail (req != NULL, FALSE);
-
- data = nm_act_request_get_data (req);
- g_assert (data);
-
- dev = nm_act_request_get_dev (req);
- g_assert (dev);
-
- /* Tell NetworkManagerInfo to store the MAC address of the active device's AP */
- if (nm_device_is_wireless (dev))
- {
- struct ether_addr addr;
- NMAccessPoint * ap = nm_act_request_get_ap (req);
- NMAccessPoint * tmp_ap;
-
- /* Cache details in the info-daemon since the connect was successful */
- nm_dbus_update_network_info (data->dbus_connection, ap, nm_act_request_get_user_requested (req));
-
- /* Cache the correct auth method in our AP list too */
- if ((tmp_ap = nm_ap_list_get_ap_by_essid (data->allowed_ap_list, nm_ap_get_essid (ap))))
- nm_ap_set_auth_method (tmp_ap, nm_ap_get_auth_method (ap));
-
- nm_device_get_ap_address (dev, &addr);
- if (!nm_ap_get_address (ap) || !nm_ethernet_address_is_valid (nm_ap_get_address (ap)))
- nm_ap_set_address (ap, &addr);
-
- /* Don't store MAC addresses for non-infrastructure networks */
- if ((nm_ap_get_mode (ap) == NETWORK_MODE_INFRA) && nm_ethernet_address_is_valid (&addr))
- nm_dbus_add_network_address (data->dbus_connection, NETWORK_TYPE_ALLOWED, nm_ap_get_essid (ap), &addr);
- }
-
- nm_info ("Activation (%s) successful, device activated.", nm_device_get_iface (dev));
- nm_dbus_schedule_device_status_change_signal (data, dev, NULL, DEVICE_NOW_ACTIVE);
- nm_schedule_state_change_signal_broadcast (data);
-
-out:
- return FALSE;
-}
-
-
-/*
- * nm_policy_schedule_activation_finish
- *
- */
-void nm_policy_schedule_activation_finish (NMActRequest *req)
-{
- GSource * source;
- NMData * data;
- NMDevice * dev;
-
- g_return_if_fail (req != NULL);
-
- data = nm_act_request_get_data (req);
- g_assert (data);
-
- dev = nm_act_request_get_dev (req);
- g_assert (dev);
-
- nm_act_request_set_stage (req, NM_ACT_STAGE_ACTIVATED);
-
- source = g_idle_source_new ();
- g_source_set_priority (source, G_PRIORITY_HIGH_IDLE);
- g_source_set_callback (source, (GSourceFunc) nm_policy_activation_finish, req, NULL);
- g_source_attach (source, data->main_context);
- g_source_unref (source);
- nm_info ("Activation (%s) Finish handler scheduled.", nm_device_get_iface (dev));
-}
-
-
-/*
- * nm_policy_activation_failed
- *
- * Clean up a failed activation.
- *
- */
-static gboolean nm_policy_activation_failed (NMActRequest *req)
-{
- NMDevice *dev = NULL;
- NMAccessPoint *ap = NULL;
- NMData *data = NULL;
-
- g_return_val_if_fail (req != NULL, FALSE);
-
- data = nm_act_request_get_data (req);
- g_assert (data);
-
- dev = nm_act_request_get_dev (req);
- g_assert (dev);
-
- if (nm_device_is_wireless (dev))
- {
- if ((ap = nm_act_request_get_ap (req)))
- {
- /* Only pop up the Network Not Found dialog when its a user-requested access point
- * that failed, not one that we've automatically found and connected to.
- */
- if (nm_act_request_get_user_requested (req))
- nm_dbus_schedule_device_status_change_signal (data, dev, ap, DEVICE_ACTIVATION_FAILED);
-
- /* Add the AP to the invalid list and force a best ap update */
- nm_ap_set_invalid (ap, TRUE);
- nm_ap_list_append_ap (data->invalid_ap_list, ap);
- }
-
- nm_info ("Activation (%s) failed for access point (%s)", nm_device_get_iface (dev),
- ap ? nm_ap_get_essid (ap) : "(none)");
- }
- else
- {
- nm_info ("Activation (%s) failed.", nm_device_get_iface (dev));
- nm_dbus_schedule_device_status_change_signal (data, dev, NULL, DEVICE_ACTIVATION_FAILED);
- }
-
- nm_device_deactivate (dev);
- nm_schedule_state_change_signal_broadcast (data);
- nm_policy_schedule_device_change_check (data);
-
-out:
- return FALSE;
-}
-
-
-/*
- * nm_policy_schedule_activation_failed
- *
- */
-void nm_policy_schedule_activation_failed (NMActRequest *req)
-{
- GSource * source;
- NMData * data;
- NMDevice * dev;
-
- g_return_if_fail (req != NULL);
-
- data = nm_act_request_get_data (req);
- g_assert (data);
-
- dev = nm_act_request_get_dev (req);
- g_assert (dev);
-
- nm_act_request_set_stage (req, NM_ACT_STAGE_FAILED);
-
- source = g_idle_source_new ();
- g_source_set_priority (source, G_PRIORITY_HIGH_IDLE);
- g_source_set_callback (source, (GSourceFunc) nm_policy_activation_failed, req, NULL);
- g_source_attach (source, data->main_context);
- g_source_unref (source);
- nm_info ("Activation (%s) failure scheduled...", nm_device_get_iface (dev));
-}
-
-
-/*
- * nm_policy_auto_get_best_device
- *
- * Find the best device to use, regardless of whether we are
- * "locked" on one device at this time.
- *
- */
-static NMDevice * nm_policy_auto_get_best_device (NMData *data, NMAccessPoint **ap)
-{
- GSList *elt;
- NMDevice *best_wired_dev = NULL;
- guint best_wired_prio = 0;
- NMDevice *best_wireless_dev = NULL;
- guint best_wireless_prio = 0;
- NMDevice *highest_priority_dev = NULL;
-
- g_return_val_if_fail (data != NULL, NULL);
- g_return_val_if_fail (ap != NULL, NULL);
-
- if (data->asleep)
- return NULL;
-
- for (elt = data->dev_list; elt != NULL; elt = g_slist_next (elt))
- {
- guint dev_type;
- gboolean link_active;
- guint prio = 0;
- NMDevice *dev = (NMDevice *)(elt->data);
-
- /* Skip devices that can't do carrier detect or can't do wireless scanning */
- if (nm_device_get_driver_support_level (dev) != NM_DRIVER_FULLY_SUPPORTED)
- continue;
-
- dev_type = nm_device_get_type (dev);
- link_active = nm_device_has_active_link (dev);
-
- if (nm_device_is_wired (dev))
- {
- /* We never automatically choose devices that don't support carrier detect */
- if (!nm_device_get_supports_carrier_detect (dev))
- continue;
-
- if (link_active)
- prio += 1;
-
- if (nm_device_get_act_request (dev) && link_active)
- prio += 1;
-
- if (prio > best_wired_prio)
- {
- best_wired_dev = dev;
- best_wired_prio = prio;
- }
- }
- else if (nm_device_is_wireless (dev) && data->wireless_enabled)
- {
- if (link_active)
- prio += 1;
-
- if (nm_device_get_supports_wireless_scan (dev))
- prio += 2;
- else
- prio += 1;
-
- if (nm_device_get_act_request (dev) && link_active)
- prio += 3;
-
- /* Stick with an already active non-scanning device if the user chose one */
- if (!nm_device_get_supports_wireless_scan (dev) && nm_device_get_act_request (dev))
- prio += 2;
-
- if (prio > best_wireless_prio)
- {
- best_wireless_dev = dev;
- best_wireless_prio = prio;
- }
- }
- }
-
- if (best_wired_dev)
- highest_priority_dev = best_wired_dev;
- else if (best_wireless_dev)
- {
- highest_priority_dev = best_wireless_dev;
- *ap = nm_device_get_best_ap (highest_priority_dev);
- /* If the device doesn't have a "best" ap, then we can't use it */
- if (!*ap)
- highest_priority_dev = NULL;
- }
-
-#if 0
- nm_info ("AUTO: Best wired device = %s, best wireless device = %s (%s)", best_wired_dev ? nm_device_get_iface (best_wired_dev) : "(null)",
- best_wireless_dev ? nm_device_get_iface (best_wireless_dev) : "(null)", (best_wireless_dev && *ap) ? nm_ap_get_essid (*ap) : "null" );
-#endif
-
- return highest_priority_dev;
-}
-
-
-/*
- * nm_policy_device_change_check
- *
- * Figures out which interface to switch the active
- * network connection to if our global network state has changed.
- * Global network state changes are triggered by:
- * 1) insertion/deletion of interfaces
- * 2) link state change of an interface
- * 3) wireless network topology changes
- *
- */
-static gboolean nm_policy_device_change_check (NMData *data)
-{
- NMAccessPoint * ap = NULL;
- NMDevice * new_dev = NULL;
- NMDevice * old_dev = NULL;
- gboolean do_switch = FALSE;
-
- g_return_val_if_fail (data != NULL, FALSE);
-
- data->dev_change_check_idle_id = 0;
-
- old_dev = nm_get_active_device (data);
-
- if (!nm_try_acquire_mutex (data->dev_list_mutex, __FUNCTION__))
- return FALSE;
-
- if (old_dev)
- {
- /* Don't interrupt a currently activating device. */
- if (nm_device_is_activating (old_dev))
- {
- nm_info ("Old device '%s' activating, won't change.", nm_device_get_iface (old_dev));
- goto out;
- }
-
- /* Don't interrupt semi-supported devices either. If the user chose one, they must
- * explicitly choose to move to another device, we're not going to move for them.
- */
- if (nm_device_get_driver_support_level (old_dev) != NM_DRIVER_FULLY_SUPPORTED)
- {
- nm_info ("Old device '%s' was semi-supported and user chosen, won't change unless told to.",
- nm_device_get_iface (old_dev));
- goto out;
- }
- }
-
- new_dev = nm_policy_auto_get_best_device (data, &ap);
-
- /* Four cases here:
- *
- * 1) old device is NULL, new device is NULL - we aren't currently connected to anything, and we
- * can't find anything to connect to. Do nothing.
- *
- * 2) old device is NULL, new device is good - we aren't currenlty connected to anything, but
- * we have something we can connect to. Connect to it.
- *
- * 3) old device is good, new device is NULL - have a current connection, but it's no good since
- * auto device picking didn't come up with the save device. Terminate current connection.
- *
- * 4) old device is good, new device is good - have a current connection, and auto device picking
- * came up with a device too. More considerations:
- * a) different devices? activate new device
- * b) same device, different access points? activate new device
- * c) same device, same access point? do nothing
- */
-
- if (!old_dev && !new_dev)
- {
- /* Do nothing, wait for something like link-state to change, or an access point to be found */
- }
- else if (!old_dev && new_dev)
- {
- /* Activate new device */
- nm_info ("SWITCH: no current connection, found better connection '%s'.", nm_device_get_iface (new_dev));
- do_switch = TRUE;
- }
- else if (old_dev && !new_dev)
- {
- /* Terminate current connection */
- nm_info ("SWITCH: terminating current connection '%s' because it's no longer valid.", nm_device_get_iface (old_dev));
- nm_device_deactivate (old_dev);
- do_switch = TRUE;
- }
- else if (old_dev && new_dev)
- {
- NMActRequest * old_act_req = nm_device_get_act_request (old_dev);
- gboolean old_user_requested = nm_act_request_get_user_requested (old_act_req);
-
- if (nm_device_is_wired (old_dev))
- {
- /* Only switch if the old device was not user requested, and we are either switching to
- * a new device. Note that new_dev will never be wireless since automatic device picking
- * above will prefer a wired device to a wireless device.
- */
- if (!old_user_requested && (new_dev != old_dev))
- {
- nm_info ("SWITCH: found better connection '%s' than current connection '%s'.", nm_device_get_iface (new_dev), nm_device_get_iface (old_dev));
- do_switch = TRUE;
- }
- }
- else if (nm_device_is_wireless (old_dev))
- {
- /* Only switch if the old device's wireless config is invalid */
- if (nm_device_is_wireless (new_dev))
- {
- NMAccessPoint *old_ap = nm_act_request_get_ap (old_act_req);
- const char * old_essid = nm_ap_get_essid (old_ap);
- const char * new_essid = nm_ap_get_essid (ap);
-
- /* Schedule new activation if the currently associated access point is not the "best" one
- * or we've lost the link to the old access point.
- */
- if ((strcmp (old_essid, new_essid) != 0) || !nm_device_has_active_link (old_dev))
- {
- nm_info ("SWITCH: found better connection '%s/%s' than current connection '%s/%s'.", nm_device_get_iface (new_dev),
- new_essid, nm_device_get_iface (old_dev), old_essid);
- do_switch = TRUE;
- }
- }
- else if (nm_device_is_wired (new_dev))
- {
- if (!nm_device_has_active_link (old_dev))
- do_switch = TRUE;
- }
- }
- }
-
- if (do_switch && (nm_device_is_wired (new_dev) || (nm_device_is_wireless (new_dev) && ap)))
- {
- NMActRequest * act_req = NULL;
-
- if ((act_req = nm_act_request_new (data, new_dev, ap, FALSE)))
-
- {
- nm_info ("Will activate connection '%s%s%s'.", nm_device_get_iface (new_dev), ap ? "/" : "", ap ? nm_ap_get_essid (ap) : "");
- nm_policy_schedule_device_activation (act_req);
- }
- }
-
- if (ap)
- nm_ap_unref (ap);
-
-out:
- nm_unlock_mutex (data->dev_list_mutex, __FUNCTION__);
- return FALSE;
-}
-
-
-/*
- * nm_policy_schedule_device_change_check
- *
- * Queue up an idle handler to deal with state changes that could
- * cause us to activate a different device or wireless network.
- *
- */
-void nm_policy_schedule_device_change_check (NMData *data)
-{
- static GStaticMutex mutex = G_STATIC_MUTEX_INIT;
-
- g_return_if_fail (data != NULL);
-
- g_static_mutex_lock (&mutex);
-
- if (data->dev_change_check_idle_id == 0)
- {
- GSource * source = g_idle_source_new ();
-
- g_source_set_callback (source, (GSourceFunc) nm_policy_device_change_check, data, NULL);
- data->dev_change_check_idle_id = g_source_attach (source, data->main_context);
- g_source_unref (source);
- }
-
- g_static_mutex_unlock (&mutex);
-}
-
-
-/*
- * nm_policy_device_activation
- *
- * Handle device activation, shutting down all other devices and starting
- * activation on the requested device.
- *
- */
-static gboolean nm_policy_device_activation (NMActRequest *req)
-{
- NMData * data;
- NMDevice * new_dev = NULL;
- NMDevice * old_dev = NULL;
-
- g_return_val_if_fail (req != NULL, FALSE);
-
- data = nm_act_request_get_data (req);
- g_assert (data);
-
- if ((old_dev = nm_get_active_device (data)))
- nm_device_deactivate (old_dev);
-
- new_dev = nm_act_request_get_dev (req);
- if (nm_device_is_activating (new_dev))
- return FALSE;
-
- nm_device_activation_start (req);
-
- return FALSE;
-}
-
-
-/*
- * nm_policy_schedule_device_activation
- *
- * Activate a particular device (and possibly access point)
- *
- */
-void nm_policy_schedule_device_activation (NMActRequest *req)
-{
- GSource * source;
- NMData * data;
- NMDevice * dev;
-
- g_return_if_fail (req != NULL);
-
- data = nm_act_request_get_data (req);
- g_assert (data);
-
- dev = nm_act_request_get_dev (req);
- g_assert (dev);
-
- source = g_idle_source_new ();
- g_source_set_priority (source, G_PRIORITY_HIGH_IDLE);
- g_source_set_callback (source, (GSourceFunc) nm_policy_device_activation, req, NULL);
- g_source_attach (source, data->main_context);
- g_source_unref (source);
- nm_info ("Device %s activation scheduled...", nm_device_get_iface (dev));
-}
-
-
-static gboolean allowed_list_update_pending = FALSE;
-
-/*
- * nm_policy_allowed_ap_list_update
- *
- * Requery NetworkManagerInfo for a list of updated
- * allowed wireless networks.
- *
- */
-static gboolean nm_policy_allowed_ap_list_update (gpointer user_data)
-{
- NMData *data = (NMData *)user_data;
- GSList *elt;
-
- allowed_list_update_pending = FALSE;
-
- g_return_val_if_fail (data != NULL, FALSE);
-
- nm_info ("Updating allowed wireless network lists.");
-
- /* Query info daemon for network lists if its now running */
- if (data->allowed_ap_list)
- nm_ap_list_unref (data->allowed_ap_list);
- if ((data->allowed_ap_list = nm_ap_list_new (NETWORK_TYPE_ALLOWED)))
- nm_dbus_update_allowed_networks (data->dbus_connection, data->allowed_ap_list, data);
-
- return (FALSE);
-}
-
-
-/*
- * nm_policy_schedule_allowed_ap_list_update
- *
- * Schedule an update of the allowed AP list in the main thread.
- *
- */
-void nm_policy_schedule_allowed_ap_list_update (NMData *app_data)
-{
- static GStaticMutex mutex = G_STATIC_MUTEX_INIT;
-
- g_return_if_fail (app_data != NULL);
- g_return_if_fail (app_data->main_context != NULL);
-
- g_static_mutex_lock (&mutex);
-
- if (allowed_list_update_pending == FALSE)
- {
- GSource *source = g_idle_source_new ();
- /* We want this idle source to run before any other idle source */
- g_source_set_priority (source, G_PRIORITY_HIGH_IDLE);
- g_source_set_callback (source, nm_policy_allowed_ap_list_update, app_data, NULL);
- g_source_attach (source, app_data->main_context);
- g_source_unref (source);
-
- allowed_list_update_pending = TRUE;
- }
-
- g_static_mutex_unlock (&mutex);
-}
-
-
-static gboolean device_list_update_pending = FALSE;
-
-/*
- * nm_policy_device_list_update_from_allowed_list
- *
- * Requery NetworkManagerInfo for a list of updated
- * allowed wireless networks.
- *
- */
-static gboolean nm_policy_device_list_update_from_allowed_list (NMData *data)
-{
- GSList * elt;
-
- device_list_update_pending = FALSE;
-
- g_return_val_if_fail (data != NULL, FALSE);
-
- for (elt = data->dev_list; elt != NULL; elt = g_slist_next (elt))
- {
- NMDevice *dev = (NMDevice *)(elt->data);
- if (nm_device_is_wireless (dev))
- {
- NMAccessPoint *best_ap;
-
- if (nm_device_get_supports_wireless_scan (dev))
- {
- /* Once we have the list, copy in any relevant information from our Allowed list and fill
- * in the ESSID of base stations that aren't broadcasting their ESSID, if we have their
- * MAC address in our allowed list.
- */
- nm_ap_list_copy_essids_by_address (nm_device_ap_list_get (dev), data->allowed_ap_list);
- nm_ap_list_copy_properties (nm_device_ap_list_get (dev), data->allowed_ap_list);
- }
- else
- nm_device_copy_allowed_to_dev_list (dev, data->allowed_ap_list);
-
- nm_ap_list_remove_duplicate_essids (nm_device_ap_list_get (dev));
- }
- }
-
- nm_policy_schedule_device_change_check (data);
-
- return FALSE;
-}
-
-
-/*
- * nm_policy_schedule_device_ap_lists_update_from_allowed
- *
- * Schedule an update of each wireless device's AP list from
- * the allowed list, in the main thread.
- *
- */
-void nm_policy_schedule_device_ap_lists_update_from_allowed (NMData *app_data)
-{
- static GStaticMutex mutex = G_STATIC_MUTEX_INIT;
-
- g_return_if_fail (app_data != NULL);
- g_return_if_fail (app_data->main_context != NULL);
-
- g_static_mutex_lock (&mutex);
-
- if (device_list_update_pending == FALSE)
- {
- GSource *source = g_idle_source_new ();
-
- /* We want this idle source to run before any other idle source */
- g_source_set_priority (source, G_PRIORITY_HIGH_IDLE);
- g_source_set_callback (source, (GSourceFunc) nm_policy_device_list_update_from_allowed_list, app_data, NULL);
- g_source_attach (source, app_data->main_context);
- g_source_unref (source);
-
- device_list_update_pending = TRUE;
- }
-
- g_static_mutex_unlock (&mutex);
-}
diff --git a/src/NetworkManagerPolicy.h b/src/NetworkManagerPolicy.h
deleted file mode 100644
index a9692b24db..0000000000
--- a/src/NetworkManagerPolicy.h
+++ /dev/null
@@ -1,40 +0,0 @@
-/* NetworkManager -- Network link manager
- *
- * Dan Williams <dcbw@redhat.com>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- *
- * (C) Copyright 2004 Red Hat, Inc.
- */
-
-#ifndef NETWORK_MANAGER_POLICY_H
-#define NETWORK_MANAGER_POLICY_H
-
-#include "NetworkManager.h"
-#include "NetworkManagerDevice.h"
-#include "NetworkManagerDbus.h"
-#include "nm-activation-request.h"
-
-void nm_policy_schedule_device_change_check (NMData *data);
-
-void nm_policy_schedule_device_activation (NMActRequest *req);
-
-void nm_policy_schedule_allowed_ap_list_update (NMData *app_data);
-void nm_policy_schedule_device_ap_lists_update_from_allowed (NMData *app_data);
-
-void nm_policy_schedule_activation_finish (NMActRequest *req);
-void nm_policy_schedule_activation_failed (NMActRequest *req);
-
-#endif
diff --git a/src/NetworkManagerSystem.c b/src/NetworkManagerSystem.c
deleted file mode 100644
index 24662b4591..0000000000
--- a/src/NetworkManagerSystem.c
+++ /dev/null
@@ -1,821 +0,0 @@
-/* NetworkManager -- Network link manager
- *
- * Dan Williams <dcbw@redhat.com>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- *
- * Copyright (C) 2004 Red Hat, Inc.
- * Copyright (C) 1996 - 1997 Yoichi Hariguchi <yoichi@fore.com>
- * Copyright (C) January, 1998 Sergei Viznyuk <sv@phystech.com>
- *
- */
-
-#include <sys/types.h>
-#include <sys/socket.h>
-#include <sys/ioctl.h>
-#include <sys/stat.h>
-#include <netinet/in.h>
-#include <net/route.h>
-#include <arpa/nameser.h>
-#include <arpa/inet.h>
-#include <fcntl.h>
-#include <stdio.h>
-#include <string.h>
-#include <syslog.h>
-#include <errno.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include <resolv.h>
-#include <netdb.h>
-#include <glib.h>
-#include "NetworkManagerSystem.h"
-#include "NetworkManagerDevice.h"
-#include "NetworkManagerUtils.h"
-#include "nm-utils.h"
-
-
-
-static gboolean nm_system_device_set_ip4_address (NMDevice *dev, int ip4_address);
-static gboolean nm_system_device_set_ip4_address_with_iface (NMDevice *dev, const char *iface, int ip4_address);
-
-static gboolean nm_system_device_set_ip4_ptp_address (NMDevice *dev, int ip4_ptp_address);
-static gboolean nm_system_device_set_ip4_ptp_address_with_iface (NMDevice *dev, const char *iface, int ip4_ptp_address);
-
-static gboolean nm_system_device_set_ip4_netmask (NMDevice *dev, int ip4_netmask);
-static gboolean nm_system_device_set_ip4_netmask_with_iface (NMDevice *dev, const char *iface, int ip4_netmask);
-
-static gboolean nm_system_device_set_ip4_broadcast (NMDevice *dev, int ip4_broadcast);
-static gboolean nm_system_device_set_ip4_broadcast_with_iface (NMDevice *dev, const char *iface, int ip4_broadcast);
-
-static gboolean nm_system_device_set_mtu (NMDevice *dev, guint16 in_mtu);
-static gboolean nm_system_device_set_mtu_with_iface (NMDevice *dev, const char *iface, guint16 in_mtu);
-
-static gboolean nm_system_device_set_ip4_route (NMDevice *dev, int ip4_gateway, int ip4_dest, int ip4_netmask);
-static gboolean nm_system_device_set_ip4_route_with_iface (NMDevice *dev, const char *iface, int ip4_gateway, int ip4_dest, int ip4_netmask);
-
-
-/*
- * nm_system_remove_ip4_config_nameservers
- *
- * Remove an IPv4 Config's nameservers from the name service.
- *
- */
-void nm_system_remove_ip4_config_nameservers (NMNamedManager *named, NMIP4Config *config)
-{
- GError *error = NULL;
- int i, len;
-
- g_return_if_fail (config != NULL);
-
- len = nm_ip4_config_get_num_nameservers (config);
- for (i = 0; i < len; i++)
- {
- guint id = nm_ip4_config_get_nameserver_id (config, i);
- if ((id != 0) && !nm_named_manager_remove_nameserver_ipv4 (named, id, &error))
- {
- nm_warning ("Couldn't remove nameserver: %s", error->message);
- g_clear_error (&error);
- }
- else
- nm_ip4_config_set_nameserver_id (config, i, 0);
- }
-}
-
-
-static void set_nameservers (NMNamedManager *named, NMIP4Config *config)
-{
- GError *error = NULL;
- int i, len;
-
- g_return_if_fail (config != NULL);
-
- len = nm_ip4_config_get_num_nameservers (config);
- for (i = 0; i < len; i++)
- {
- guint id;
- guint ns_addr = nm_ip4_config_get_nameserver (config, i);
- struct in_addr temp_addr;
- char * nameserver;
-
- temp_addr.s_addr = ns_addr;
- nameserver = g_strdup (inet_ntoa (temp_addr));
- nm_info ("Adding nameserver: %s", nameserver);
- if ((id = nm_named_manager_add_nameserver_ipv4 (named, nameserver, &error)))
- nm_ip4_config_set_nameserver_id (config, i, id);
- else
- {
- nm_warning ("Couldn't add nameserver: %s", error->message);
- g_clear_error (&error);
- }
- g_free (nameserver);
- }
-}
-
-
-/*
- * nm_system_remove_ip4_config_search_domains
- *
- * Remove an IPv4 Config's search domains from the name service.
- *
- */
-void nm_system_remove_ip4_config_search_domains (NMNamedManager *named, NMIP4Config *config)
-{
- GError *error = NULL;
- int i, len;
-
- g_return_if_fail (config != NULL);
-
- len = nm_ip4_config_get_num_domains (config);
- for (i = 0; i < len; i++)
- {
- guint id = nm_ip4_config_get_domain_id (config, i);
- if ((id != 0) && !nm_named_manager_remove_domain_search (named, id, &error))
- {
- nm_warning ("Couldn't remove domain search: %s", error->message);
- g_clear_error (&error);
- }
- else
- nm_ip4_config_set_domain_id (config, i, 0);
- }
-}
-
-static void set_search_domains (NMNamedManager *named, NMIP4Config *config)
-{
- GError *error = NULL;
- int i, len;
-
- g_return_if_fail (config != NULL);
-
- len = nm_ip4_config_get_num_domains (config);
- for (i = 0; i < len; i++)
- {
- const char * domain = nm_ip4_config_get_domain (config, i);
- guint id;
-
- nm_info ("Adding domain search: %s", domain);
- if ((id = nm_named_manager_add_domain_search (named, domain, &error)))
- nm_ip4_config_set_domain_id (config, i, id);
- else
- {
- nm_warning ("Couldn't add domain search: %s", error->message);
- g_clear_error (&error);
- }
- }
-}
-
-
-/*
- * nm_system_device_set_from_ip4_config
- *
- * Set IPv4 configuration of the device from an NMIP4Config object.
- *
- */
-gboolean nm_system_device_set_from_ip4_config (NMDevice *dev)
-{
- NMData * app_data;
- NMIP4Config * config;
- gboolean success = FALSE;
-
- g_return_val_if_fail (dev != NULL, FALSE);
-
- app_data = nm_device_get_app_data (dev);
- g_return_val_if_fail (app_data != NULL, FALSE);
-
- config = nm_device_get_ip4_config (dev);
- g_return_val_if_fail (config != NULL, FALSE);
-
- nm_system_delete_default_route ();
- nm_system_device_flush_addresses (dev);
- nm_system_device_flush_routes (dev);
- nm_system_flush_arp_cache ();
-
- nm_system_device_set_ip4_address (dev, nm_ip4_config_get_address (config));
- nm_system_device_set_ip4_netmask (dev, nm_ip4_config_get_netmask (config));
- nm_system_device_set_ip4_broadcast (dev, nm_ip4_config_get_broadcast (config));
- sleep (1);
- nm_system_device_set_ip4_route (dev, nm_ip4_config_get_gateway (config), 0, 0);
-
- set_nameservers (app_data->named_manager, config);
- set_search_domains (app_data->named_manager, config);
-
- return TRUE;
-}
-
-
-/*
- * validate_ip4_route
- *
- * Ensure that IP4 routes are in the correct format
- *
- */
-static char *validate_ip4_route (const char *route)
-{
- char * ret = NULL;
- char * temp = NULL;
- int slash_pos = -1;
- char * p = NULL;
- int len, i;
- int dot_count = 0;
- gboolean have_slash = FALSE;
- struct in_addr addr;
-
- g_return_val_if_fail (route != NULL, NULL);
-
- len = strlen (route);
- /* Minimum length, ie 1.1.1.1/8 */
- if (len < 9)
- return NULL;
-
- for (i = 0; i < len; i++)
- {
- /* Ensure there is only one slash */
- if (route[i] == '/')
- {
- if (have_slash)
- goto out;
-
- have_slash = TRUE;
- slash_pos = i;
- continue;
- }
-
- if (route[i] == '.')
- {
- if (dot_count >= 4)
- goto out;
-
- dot_count++;
- continue;
- }
-
- if (!isdigit (route[i]))
- goto out;
- }
-
- /* Make sure there is at least one slash and 3 dots */
- if (!have_slash || !slash_pos || (dot_count != 3))
- goto out;
-
- /* Valid IP address part */
- temp = g_strdup (route);
- temp[slash_pos] = '\0';
- memset (&addr, 0, sizeof (struct in_addr));
- if (inet_aton (temp, &addr) == 0)
- goto out;
-
- /* Ensure the network # is valid */
- p = temp + slash_pos + 1;
- i = (int) strtol (p, NULL, 10);
- if ((i < 0) || (i > 32))
- goto out;
-
- /* Success! */
- ret = g_strdup (route);
-
-out:
- g_free (temp);
- return ret;
-}
-
-
-/*
- * nm_system_vpn_device_set_from_ip4_config
- *
- * Set IPv4 configuration of a VPN device from an NMIP4Config object.
- *
- */
-gboolean nm_system_vpn_device_set_from_ip4_config (NMNamedManager *named, NMDevice *active_device, const char *iface, NMIP4Config *config, char **routes, int num_routes)
-{
- gboolean success = FALSE;
- NMIP4Config * ad_config = NULL;
-
- g_return_val_if_fail (iface != NULL, FALSE);
- g_return_val_if_fail (config != NULL, FALSE);
-
- if (active_device && (ad_config = nm_device_get_ip4_config (active_device)))
- {
- nm_system_remove_ip4_config_nameservers (named, ad_config);
- nm_system_remove_ip4_config_search_domains (named, ad_config);
- nm_system_device_set_ip4_route (active_device, nm_ip4_config_get_gateway (ad_config), nm_ip4_config_get_gateway (config), 0xFFFFFFFF);
- }
-
- nm_system_device_set_up_down_with_iface (NULL, iface, TRUE);
-
- nm_system_device_set_ip4_address_with_iface (NULL, iface, nm_ip4_config_get_address (config));
- nm_system_device_set_ip4_ptp_address_with_iface (NULL, iface, nm_ip4_config_get_address (config));
- nm_system_device_set_ip4_netmask_with_iface (NULL, iface, nm_ip4_config_get_netmask (config));
- nm_system_device_set_mtu_with_iface (NULL, iface, 1412);
- sleep (1);
- nm_system_device_flush_routes_with_iface (iface);
- if (num_routes <= 0)
- {
- nm_system_delete_default_route ();
- nm_system_device_add_default_route_via_device_with_iface (iface);
- }
- else
- {
- int i;
- for (i = 0; i < num_routes; i++)
- {
- char *valid_ip4_route;
-
- /* Make sure the route is valid, otherwise it's a security risk as the route
- * text is simply taken from the user, and passed directly to system(). If
- * we did not check the route, think of:
- *
- * system("/sbin/ip route add `rm -rf /` dev eth0")
- *
- * where `rm -rf /` was the route text. As UID 0 (root), we have to be careful.
- */
- if ((valid_ip4_route = validate_ip4_route (routes[i])))
- {
- nm_system_device_add_route_via_device_with_iface (iface, valid_ip4_route);
- g_free (valid_ip4_route);
- }
- }
- }
-
- set_nameservers (named, config);
- set_search_domains (named, config);
-
- return TRUE;
-}
-
-
-/*
- * nm_system_device_set_up_down
- *
- * Mark the device as up or down.
- *
- */
-gboolean nm_system_device_set_up_down (NMDevice *dev, gboolean up)
-{
- g_return_val_if_fail (dev != NULL, FALSE);
-
- return nm_system_device_set_up_down_with_iface (dev, nm_device_get_iface (dev), up);
-}
-
-gboolean nm_system_device_set_up_down_with_iface (NMDevice *dev, const char *iface, gboolean up)
-{
- struct ifreq ifr;
- guint32 flags = up ? IFF_UP : ~IFF_UP;
- NMSock * sk;
- gboolean success = FALSE;
- int err;
-
- g_return_val_if_fail (iface != NULL, FALSE);
-
- if ((sk = nm_dev_sock_open (dev, DEV_GENERAL, __FUNCTION__, NULL)) == NULL)
- return FALSE;
-
- /* Get flags already there */
- memset (&ifr, 0, sizeof (struct ifreq));
- memcpy (ifr.ifr_name, iface, strlen (iface));
-#ifdef IOCTL_DEBUG
- nm_info ("%s: About to GET IFFLAGS\n", nm_device_get_iface (dev));
-#endif
- err = ioctl (nm_dev_sock_get_fd (sk), SIOCGIFFLAGS, &ifr);
-#ifdef IOCTL_DEBUG
- nm_info ("%s: Done with GET IFFLAGS\n", nm_device_get_iface (dev));
-#endif
-
- if (err == -1)
- {
- if (errno != ENODEV)
- nm_warning ("nm_system_device_set_up_down_with_iface() could not get flags for device %s. errno = %d", iface, errno );
- }
- else
- {
- /* If the interface doesn't have those flags already, set them on it. */
- if ((ifr.ifr_flags^flags) & IFF_UP)
- {
- ifr.ifr_flags &= ~IFF_UP;
- ifr.ifr_flags |= IFF_UP & flags;
-
-#ifdef IOCTL_DEBUG
- nm_info ("%s: About to SET IFFLAGS\n", nm_device_get_iface (dev));
-#endif
- err = ioctl (nm_dev_sock_get_fd (sk), SIOCSIFFLAGS, &ifr);
-#ifdef IOCTL_DEBUG
- nm_info ("%s: About to SET IFFLAGS\n", nm_device_get_iface (dev));
-#endif
-
- if (err == -1)
- {
- if (errno != ENODEV)
- nm_warning ("nm_system_device_set_up_down_with_iface() could not bring device %s %s. errno = %d", iface, (up ? "up" : "down"), errno);
- }
- }
- }
-
- nm_dev_sock_close (sk);
- return success;
-}
-
-
-/*
- * nm_system_device_set_ip4_address
- *
- * Set the device's IPv4 address.
- *
- */
-static gboolean nm_system_device_set_ip4_address (NMDevice *dev, int ip4_address)
-{
- g_return_val_if_fail (dev != NULL, FALSE);
-
- return nm_system_device_set_ip4_address_with_iface (dev, nm_device_get_iface (dev), ip4_address);
-}
-
-static gboolean nm_system_device_set_ip4_address_with_iface (NMDevice *dev, const char *iface, int ip4_address)
-{
- struct ifreq ifr;
- NMSock * sk;
- gboolean success = FALSE;
- struct sockaddr_in *p = (struct sockaddr_in *)&(ifr.ifr_addr);
- int err;
-
- g_return_val_if_fail (iface != NULL, FALSE);
-
- if ((sk = nm_dev_sock_open (dev, NETWORK_CONTROL, __FUNCTION__, NULL)) == NULL)
- return FALSE;
-
- memset (&ifr, 0, sizeof (struct ifreq));
- memcpy (ifr.ifr_name, iface, strlen (iface));
- p->sin_family = AF_INET;
- p->sin_addr.s_addr = ip4_address;
-
-#ifdef IOCTL_DEBUG
- nm_info ("%s: About to SET IFADDR\n", nm_device_get_iface (dev));
-#endif
- err = ioctl (nm_dev_sock_get_fd (sk), SIOCSIFADDR, &ifr);
-#ifdef IOCTL_DEBUG
- nm_info ("%s: About to SET IFADDR\n", nm_device_get_iface (dev));
-#endif
-
- if (err == -1)
- nm_warning ("nm_system_device_set_ip4_address_by_iface (%s): failed to set IPv4 address!", iface);
- else
- {
- success = TRUE;
- nm_info ("Your IP address = %u.%u.%u.%u",
- ((unsigned char *)&ip4_address)[0], ((unsigned char *)&ip4_address)[1],
- ((unsigned char *)&ip4_address)[2], ((unsigned char *)&ip4_address)[3]);
- }
-
- nm_dev_sock_close (sk);
- return success;
-}
-
-
-/*
- * nm_system_device_set_ip4_ptp_address
- *
- * Set the device's IPv4 point-to-point address.
- *
- */
-static gboolean nm_system_device_set_ip4_ptp_address (NMDevice *dev, int ip4_ptp_address)
-{
- g_return_val_if_fail (dev != NULL, FALSE);
-
- return nm_system_device_set_ip4_ptp_address_with_iface (dev, nm_device_get_iface (dev), ip4_ptp_address);
-}
-
-static gboolean nm_system_device_set_ip4_ptp_address_with_iface (NMDevice *dev, const char *iface, int ip4_ptp_address)
-{
- struct ifreq ifr;
- NMSock * sk;
- gboolean success = FALSE;
- struct sockaddr_in *p = (struct sockaddr_in *)&(ifr.ifr_addr);
- int err;
-
- g_return_val_if_fail (iface != NULL, FALSE);
-
- if ((sk = nm_dev_sock_open (dev, NETWORK_CONTROL, __FUNCTION__, NULL)) == NULL)
- return FALSE;
-
- memset (&ifr, 0, sizeof (struct ifreq));
- memcpy (ifr.ifr_name, iface, strlen (iface));
- p->sin_family = AF_INET;
- p->sin_port = 0;
- p->sin_addr.s_addr = ip4_ptp_address;
-
-#ifdef IOCTL_DEBUG
- nm_info ("%s: About to SET IFDSTADDR\n", nm_device_get_iface (dev));
-#endif
- err = ioctl (nm_dev_sock_get_fd (sk), SIOCSIFDSTADDR, &ifr);
-#ifdef IOCTL_DEBUG
- nm_info ("%s: About to SET IFDSTADDR\n", nm_device_get_iface (dev));
-#endif
-
- if (err == -1)
- nm_warning ("nm_system_device_set_ip4_ptp_address (%s): failed to set IPv4 point-to-point address!", iface);
- else
- {
- struct ifreq ifr2;
-
- memset (&ifr2, 0, sizeof (struct ifreq));
- memcpy (ifr2.ifr_name, iface, strlen (iface));
-
-#ifdef IOCTL_DEBUG
- nm_info ("%s: About to GET IFFLAGS (ptp)\n", nm_device_get_iface (dev));
-#endif
- err = ioctl (nm_dev_sock_get_fd (sk), SIOCGIFFLAGS, &ifr2);
-#ifdef IOCTL_DEBUG
- nm_info ("%s: About to GET IFFLAGS (ptp)\n", nm_device_get_iface (dev));
-#endif
-
- if (err >= 0)
- {
- memcpy (ifr2.ifr_name, iface, strlen (iface));
- ifr2.ifr_flags |= IFF_POINTOPOINT;
-
-#ifdef IOCTL_DEBUG
- nm_info ("%s: About to SET IFFLAGS (ptp)\n", nm_device_get_iface (dev));
-#endif
- err = ioctl (nm_dev_sock_get_fd (sk), SIOCSIFFLAGS, &ifr2);
-#ifdef IOCTL_DEBUG
- nm_info ("%s: About to SET IFFLAGS (ptp)\n", nm_device_get_iface (dev));
-#endif
-
- if (err >= 0)
- {
- success = TRUE;
- nm_info ("Your Point-to-Point IP address = %u.%u.%u.%u",
- ((unsigned char *)&ip4_ptp_address)[0], ((unsigned char *)&ip4_ptp_address)[1],
- ((unsigned char *)&ip4_ptp_address)[2], ((unsigned char *)&ip4_ptp_address)[3]);
- }
- else
- nm_warning ("nm_system_device_set_ip4_ptp_address (%s): failed to set POINTOPOINT flag on device!", iface);
- }
- else
- nm_warning ("nm_system_device_set_ip4_ptp_address (%s): failed to get interface flags!", iface);
- }
-
- nm_dev_sock_close (sk);
- return (success);
-}
-
-
-/*
- * nm_system_device_set_ip4_netmask
- *
- * Set the IPv4 netmask on a device.
- *
- */
-static gboolean nm_system_device_set_ip4_netmask (NMDevice *dev, int ip4_netmask)
-{
- g_return_val_if_fail (dev != NULL, FALSE);
-
- return nm_system_device_set_ip4_netmask_with_iface (dev, nm_device_get_iface (dev), ip4_netmask);
-}
-
-static gboolean nm_system_device_set_ip4_netmask_with_iface (NMDevice *dev, const char *iface, int ip4_netmask)
-{
- struct ifreq ifr;
- NMSock * sk;
- gboolean success = FALSE;
- struct sockaddr_in *p = (struct sockaddr_in *)&(ifr.ifr_addr);
- int err;
-
- g_return_val_if_fail (iface != NULL, FALSE);
-
- if ((sk = nm_dev_sock_open (dev, NETWORK_CONTROL, __FUNCTION__, NULL)) == NULL)
- return FALSE;
-
- memset (&ifr, 0, sizeof (struct ifreq));
- memcpy (ifr.ifr_name, iface, strlen (iface));
- p->sin_family = AF_INET;
- p->sin_addr.s_addr = ip4_netmask;
-#ifdef IOCTL_DEBUG
- nm_info ("%s: About to SET IFNETMASK\n", nm_device_get_iface (dev));
-#endif
- err = ioctl (nm_dev_sock_get_fd (sk), SIOCSIFNETMASK, &ifr);
-#ifdef IOCTL_DEBUG
- nm_info ("%s: About to SET IFNETMASK\n", nm_device_get_iface (dev));
-#endif
-
- if (err == -1)
- nm_warning ("nm_system_device_set_ip4_netmask (%s): failed to set IPv4 netmask! errno = %s", iface, strerror (errno));
- else
- success = TRUE;
-
- nm_dev_sock_close (sk);
- return success;
-}
-
-
-/*
- * nm_system_device_set_ip4_broadcast
- *
- * Set the IPv4 broadcast address on a device.
- *
- */
-static gboolean nm_system_device_set_ip4_broadcast (NMDevice *dev, int ip4_broadcast)
-{
- g_return_val_if_fail (dev != NULL, FALSE);
-
- return nm_system_device_set_ip4_broadcast_with_iface (dev, nm_device_get_iface (dev), ip4_broadcast);
-}
-
-static gboolean nm_system_device_set_ip4_broadcast_with_iface (NMDevice *dev, const char *iface, int ip4_broadcast)
-{
- struct ifreq ifr;
- NMSock * sk;
- gboolean success = FALSE;
- struct sockaddr_in *p = (struct sockaddr_in *)&(ifr.ifr_addr);
- int err;
-
- g_return_val_if_fail (iface != NULL, FALSE);
-
- if ((sk = nm_dev_sock_open (dev, NETWORK_CONTROL, __FUNCTION__, NULL)) == NULL)
- return FALSE;
-
- memset (&ifr, 0, sizeof(struct ifreq));
- memcpy (ifr.ifr_name, iface, strlen (iface));
- p->sin_family = AF_INET;
- p->sin_addr.s_addr = ip4_broadcast;
-#ifdef IOCTL_DEBUG
- nm_info ("%s: About to SET IFBRDADDR\n", nm_device_get_iface (dev));
-#endif
- err = ioctl (nm_dev_sock_get_fd (sk), SIOCSIFBRDADDR, &ifr);
-#ifdef IOCTL_DEBUG
- nm_info ("%s: About to SET IFBRDADDR\n", nm_device_get_iface (dev));
-#endif
-
- if (err == -1)
- nm_warning ("nm_system_device_set_ip4_netmask (%s): failed to set IPv4 broadcast address!", iface);
- else
- success = TRUE;
-
- nm_dev_sock_close (sk);
- return success;
-}
-
-
-/*
- * nm_system_device_set_ip4_broadcast
- *
- * Set the IPv4 broadcast address on a device.
- *
- */
-static gboolean nm_system_device_set_ip4_route (NMDevice *dev, int ip4_gateway, int ip4_dest, int ip4_netmask)
-{
- g_return_val_if_fail (dev != NULL, FALSE);
-
- return nm_system_device_set_ip4_route_with_iface (dev, nm_device_get_iface (dev), ip4_gateway, ip4_dest, ip4_netmask);
-}
-
-/*
- * nm_system_device_set_mtu
- *
- * Set the MTU on a device.
- *
- */
-static gboolean nm_system_device_set_mtu (NMDevice *dev, guint16 in_mtu)
-{
- g_return_val_if_fail (dev != NULL, FALSE);
-
- return nm_system_device_set_mtu_with_iface (dev, nm_device_get_iface (dev), in_mtu);
-}
-
-static gboolean nm_system_device_set_mtu_with_iface (NMDevice *dev, const char *iface, guint16 in_mtu)
-{
- struct ifreq ifr;
- NMSock * sk;
- gboolean success = FALSE;
- int err;
-
- g_return_val_if_fail (iface != NULL, FALSE);
-
- if ((sk = nm_dev_sock_open (dev, NETWORK_CONTROL, __FUNCTION__, NULL)) == NULL)
- return FALSE;
-
- memset (&ifr, 0, sizeof (struct ifreq));
- memcpy (ifr.ifr_name, iface, strlen (iface));
- ifr.ifr_mtu = in_mtu;
-#ifdef IOCTL_DEBUG
- nm_info ("%s: About to SET IFMTU\n", nm_device_get_iface (dev));
-#endif
- err = ioctl (nm_dev_sock_get_fd (sk), SIOCSIFMTU, &ifr);
-#ifdef IOCTL_DEBUG
- nm_info ("%s: About to SET IFMTU\n", nm_device_get_iface (dev));
-#endif
-
- if (err == -1)
- nm_warning ("nm_system_device_set_mtu (%s): failed to set mtu! errno = %s", iface, strerror (errno));
- else
- success = TRUE;
-
- nm_dev_sock_close (sk);
- return success;
-}
-
-static gboolean nm_system_device_set_ip4_route_with_iface (NMDevice *dev, const char *iface, int ip4_gateway, int ip4_dest, int ip4_netmask)
-{
- NMSock * sk;
- gboolean success = FALSE;
- struct rtentry rtent;
- struct sockaddr_in *p;
- int err;
-
- g_return_val_if_fail (iface != NULL, FALSE);
-
- /*
- * Zero is not a legal gateway and the ioctl will fail. But zero is a
- * way of saying "no route" so we just return here. Hopefully the
- * caller flushed the routes, first.
- */
- if (ip4_gateway == 0)
- return TRUE;
-
- if ((sk = nm_dev_sock_open (dev, NETWORK_CONTROL, __FUNCTION__, NULL)) == NULL)
- return FALSE;
-
- memset (&rtent, 0, sizeof (struct rtentry));
- p = (struct sockaddr_in *)&rtent.rt_dst;
- p->sin_family = AF_INET;
- p->sin_addr.s_addr = ip4_dest;
- p = (struct sockaddr_in *)&rtent.rt_gateway;
- p->sin_family = AF_INET;
- p->sin_addr.s_addr = ip4_gateway;
- p = (struct sockaddr_in *)&rtent.rt_genmask;
- p->sin_family = AF_INET;
- p->sin_addr.s_addr = ip4_netmask;
- rtent.rt_dev = (char *)iface;
- rtent.rt_metric = 1;
- rtent.rt_window = 0;
- rtent.rt_flags = RTF_UP | RTF_GATEWAY | (rtent.rt_window ? RTF_WINDOW : 0);
-
-#ifdef IOCTL_DEBUG
- nm_info ("%s: About to CADDRT\n", nm_device_get_iface (dev));
-#endif
- err = ioctl (nm_dev_sock_get_fd (sk), SIOCADDRT, &rtent);
-#ifdef IOCTL_DEBUG
- nm_info ("%s: About to CADDRT\n", nm_device_get_iface (dev));
-#endif
-
- if (err == -1)
- {
- if (errno == ENETUNREACH) /* possibly gateway is over the bridge */
- { /* try adding a route to gateway first */
- struct rtentry rtent2;
-
- memset (&rtent2, 0, sizeof(struct rtentry));
- p = (struct sockaddr_in *)&rtent2.rt_dst;
- p->sin_family = AF_INET;
- p = (struct sockaddr_in *)&rtent2.rt_gateway;
- p->sin_family = AF_INET;
- p->sin_addr.s_addr = ip4_gateway;
- p = (struct sockaddr_in *)&rtent2.rt_genmask;
- p->sin_family = AF_INET;
- p->sin_addr.s_addr = 0xffffffff;
- rtent2.rt_dev = (char *)iface;
- rtent2.rt_metric = 0;
- rtent2.rt_flags = RTF_UP | RTF_HOST;
-
-#ifdef IOCTL_DEBUG
- nm_info ("%s: About to CADDRT (2)\n", nm_device_get_iface (dev));
-#endif
- err = ioctl (nm_dev_sock_get_fd (sk), SIOCADDRT, &rtent2);
-#ifdef IOCTL_DEBUG
- nm_info ("%s: About to CADDRT (2)\n", nm_device_get_iface (dev));
-#endif
-
- if (err == 0)
- {
-#ifdef IOCTL_DEBUG
- nm_info ("%s: About to CADDRT (3)\n", nm_device_get_iface (dev));
-#endif
- err = ioctl (nm_dev_sock_get_fd (sk), SIOCADDRT, &rtent);
-#ifdef IOCTL_DEBUG
- nm_info ("%s: About to CADDRT (3)\n", nm_device_get_iface (dev));
-#endif
-
- if (err == 0)
- success = TRUE;
- else
- nm_warning ("nm_system_device_set_ip4_route_with_iface (%s): failed to set IPv4 default route! error = %s", iface, strerror (errno));
- }
- }
- else
- nm_warning ("nm_system_device_set_ip4_route_with_iface (%s): failed to set IPv4 default route! error = %s", iface, strerror (errno));
- }
- else
- success = TRUE;
-
- nm_dev_sock_close (sk);
- return (success);
-}
-
diff --git a/src/NetworkManagerSystem.h b/src/NetworkManagerSystem.h
deleted file mode 100644
index 620c026253..0000000000
--- a/src/NetworkManagerSystem.h
+++ /dev/null
@@ -1,80 +0,0 @@
-/* NetworkManager -- Network link manager
- *
- * Dan Williams <dcbw@redhat.com>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- *
- * (C) Copyright 2004 Red Hat, Inc.
- */
-
-#ifndef NETWORK_MANAGER_SYSTEM_H
-#define NETWORK_MANAGER_SYSTEM_H
-
-#include <glib.h>
-#include "NetworkManagerDevice.h"
-
-
-/* Prototypes for system/distribution dependent functions,
- * implemented in the backend files in backends/ directory
- */
-
-void nm_system_init (void);
-gboolean nm_system_device_has_active_routes (NMDevice *dev);
-
-void nm_system_device_flush_routes (NMDevice *dev);
-void nm_system_device_flush_routes_with_iface (const char *iface);
-
-void nm_system_device_add_default_route_via_device(NMDevice *dev);
-void nm_system_device_add_default_route_via_device_with_iface(const char *iface);
-
-void nm_system_device_add_route_via_device_with_iface (const char *iface, const char *route);
-
-void nm_system_device_flush_addresses (NMDevice *dev);
-void nm_system_device_flush_addresses_with_iface (const char *iface);
-
-gboolean nm_system_device_setup_static_ip4_config (NMDevice *dev);
-void nm_system_enable_loopback (void);
-void nm_system_flush_loopback_routes (void);
-void nm_system_delete_default_route (void);
-void nm_system_flush_arp_cache (void);
-void nm_system_kill_all_dhcp_daemons (void);
-void nm_system_update_dns (void);
-void nm_system_load_device_modules (void);
-void nm_system_restart_mdns_responder (void);
-void nm_system_device_add_ip6_link_address (NMDevice *dev);
-
-void * nm_system_device_get_system_config (NMDevice *dev);
-void nm_system_device_free_system_config (NMDevice *dev, void *system_config_data);
-NMIP4Config * nm_system_device_new_ip4_system_config (NMDevice *dev);
-
-gboolean nm_system_device_get_use_dhcp (NMDevice *dev);
-
-/* Prototypes for system-layer network functions (ie setting IP address, etc) */
-void nm_system_remove_ip4_config_nameservers (NMNamedManager *named, NMIP4Config *config);
-void nm_system_remove_ip4_config_search_domains (NMNamedManager *named, NMIP4Config *config);
-
-gboolean nm_system_device_set_from_ip4_config (NMDevice *dev);
-gboolean nm_system_vpn_device_set_from_ip4_config (NMNamedManager *named, NMDevice *active_device, const char *iface, NMIP4Config *config, char **routes, int num_routes);
-
-gboolean nm_system_device_set_up_down (NMDevice *dev, gboolean up);
-gboolean nm_system_device_set_up_down_with_iface (NMDevice *dev, const char *iface, gboolean up);
-
-gboolean nm_system_device_update_resolv_conf (void *data, int len, const char *domain_name);
-
-GSList * nm_system_get_dialup_config (void);
-void nm_system_deactivate_all_dialup (GSList *list);
-gboolean nm_system_activate_dialup (GSList *list, const char *dialup);
-
-#endif
diff --git a/src/NetworkManagerUtils.c b/src/NetworkManagerUtils.c
deleted file mode 100644
index 94b930c7cd..0000000000
--- a/src/NetworkManagerUtils.c
+++ /dev/null
@@ -1,804 +0,0 @@
-/* NetworkManager -- Network link manager
- *
- * Dan Williams <dcbw@redhat.com>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- *
- * (C) Copyright 2004 Red Hat, Inc.
- */
-
-#include <glib.h>
-#include <stdio.h>
-#include <sys/types.h>
-#include <sys/socket.h>
-#include <linux/sockios.h>
-#include <syslog.h>
-#include <stdarg.h>
-#include <sys/time.h>
-#include <string.h>
-#include <signal.h>
-#include <iwlib.h>
-
-#include "NetworkManager.h"
-#include "NetworkManagerUtils.h"
-#include "nm-utils.h"
-
-
-struct NMSock
-{
- int fd;
- char *func;
- char *desc;
- NMDevice *dev;
-};
-
-static GSList *sock_list = NULL;
-static GStaticMutex sock_list_mutex = G_STATIC_MUTEX_INIT;
-
-typedef struct MutexDesc
-{
- GMutex *mutex;
- char *desc;
-} MutexDesc;
-
-GSList *mutex_descs = NULL;
-
-/*#define LOCKING_DEBUG*/
-
-
-static MutexDesc *nm_find_mutex_desc (GMutex *mutex)
-{
- GSList *elt;
-
- for (elt = mutex_descs; elt; elt = g_slist_next (elt))
- {
- MutexDesc *desc = (MutexDesc *)(elt->data);
- if (desc && (desc->mutex == mutex))
- return desc;
- }
-
- return NULL;
-}
-
-
-/*
- * nm_register_mutex_desc
- *
- * Associate a description with a particular mutex.
- *
- */
-void nm_register_mutex_desc (GMutex *mutex, const char *string)
-{
- if (!(nm_find_mutex_desc (mutex)))
- {
- MutexDesc *desc = g_malloc0 (sizeof (MutexDesc));
- desc->mutex = mutex;
- desc->desc = g_strdup (string);
- mutex_descs = g_slist_append (mutex_descs, desc);
- }
-}
-
-
-/*
- * nm_try_acquire_mutex
- *
- * Tries to acquire a given mutex, sleeping a bit between tries.
- *
- * Returns: FALSE if mutex was not acquired
- * TRUE if mutex was successfully acquired
- */
-gboolean nm_try_acquire_mutex (GMutex *mutex, const char *func)
-{
- g_return_val_if_fail (mutex != NULL, FALSE);
-
- if (g_mutex_trylock (mutex))
- {
-#ifdef LOCKING_DEBUG
- if (func)
- {
- MutexDesc *desc = nm_find_mutex_desc (mutex);
- nm_debug ("MUTEX: <%s %p> acquired by %s", desc ? desc->desc : "(none)", mutex, func);
- }
-#endif
- return (TRUE);
- }
-
-#ifdef LOCKING_DEBUG
- if (func)
- {
- MutexDesc *desc = nm_find_mutex_desc (mutex);
- nm_debug ("MUTEX: <%s %p> FAILED to be acquired by %s", desc ? desc->desc : "(none)", mutex, func);
- }
-#endif
- return (FALSE);
-}
-
-
-/*
- * nm_lock_mutex
- *
- * Blocks until a mutex is grabbed, with debugging.
- *
- */
-void nm_lock_mutex (GMutex *mutex, const char *func)
-{
-#ifdef LOCKING_DEBUG
- if (func)
- {
- MutexDesc *desc = nm_find_mutex_desc (mutex);
- nm_debug ("MUTEX: <%s %p> being acquired by %s", desc ? desc->desc : "(none)", mutex, func);
- }
-#endif
- g_mutex_lock (mutex);
-}
-
-
-/*
- * nm_unlock_mutex
- *
- * Simply unlocks a mutex, balances nm_try_acquire_mutex()
- *
- */
-void nm_unlock_mutex (GMutex *mutex, const char *func)
-{
- g_return_if_fail (mutex != NULL);
-
-#ifdef LOCKING_DEBUG
- if (func)
- {
- MutexDesc *desc = nm_find_mutex_desc (mutex);
- nm_debug ("MUTEX: <%s %p> released by %s", desc ? desc->desc : "(none)", mutex, func);
- }
-#endif
-
- g_mutex_unlock (mutex);
-}
-
-
-/*
- * nm_dev_sock_open
- *
- * Open a socket to a network device and store some debug info about it.
- *
- */
-NMSock *nm_dev_sock_open (NMDevice *dev, SockType type, const char *func_name, const char *desc)
-{
- NMSock *sock = NULL;
-
- sock = g_malloc0 (sizeof (NMSock));
-
- sock->fd = -1;
-
- switch (type)
- {
- case DEV_WIRELESS:
- sock->fd = iw_sockets_open ();
- break;
-
- case DEV_GENERAL:
- if ((sock->fd = socket (PF_INET, SOCK_DGRAM, 0)) < 0)
- if ((sock->fd = socket (PF_PACKET, SOCK_DGRAM, 0)) < 0)
- sock->fd = socket (PF_INET6, SOCK_DGRAM, 0);
- break;
-
- case NETWORK_CONTROL:
- sock->fd = socket (AF_PACKET, SOCK_PACKET, htons (ETH_P_ALL));
- break;
-
- default:
- break;
- }
-
- if (sock->fd < 0)
- {
- g_free (sock);
- nm_warning ("Could not open control socket for device '%s'.", dev ? nm_device_get_iface (dev) : "none");
- return NULL;
- }
-
- sock->func = func_name ? g_strdup (func_name) : NULL;
- sock->desc = desc ? g_strdup (desc) : NULL;
- sock->dev = dev;
- if (sock->dev)
- nm_device_ref (sock->dev);
-
- /* Add the sock to our global sock list for tracking */
- g_static_mutex_lock (&sock_list_mutex);
- sock_list = g_slist_append (sock_list, sock);
- g_static_mutex_unlock (&sock_list_mutex);
-
- return sock;
-}
-
-
-/*
- * nm_dev_sock_close
- *
- * Close a socket and free its debug data.
- *
- */
-void nm_dev_sock_close (NMSock *sock)
-{
- GSList *elt;
-
- g_return_if_fail (sock != NULL);
-
- close (sock->fd);
- g_free (sock->func);
- g_free (sock->desc);
- if (sock->dev)
- nm_device_unref (sock->dev);
-
- memset (sock, 0, sizeof (NMSock));
-
- g_static_mutex_lock (&sock_list_mutex);
- for (elt = sock_list; elt; elt = g_slist_next (elt))
- {
- NMSock *temp_sock = (NMSock *)(elt->data);
- if (temp_sock == sock)
- {
- sock_list = g_slist_remove_link (sock_list, elt);
- g_slist_free (elt);
- break;
- }
- }
- g_static_mutex_unlock (&sock_list_mutex);
-
- g_free (sock);
-}
-
-
-/*
- * nm_dev_sock_get_fd
- *
- * Return the fd associated with an NMSock
- *
- */
-int nm_dev_sock_get_fd (NMSock *sock)
-{
- g_return_val_if_fail (sock != NULL, -1);
-
- return sock->fd;
-}
-
-
-/*
- * nm_print_open_socks
- *
- * Print a list of currently open and registered NMSocks.
- *
- */
-void nm_print_open_socks (void)
-{
- GSList *elt = NULL;
- int i = 0;
-
- nm_debug ("Open Sockets List:");
- g_static_mutex_lock (&sock_list_mutex);
- for (elt = sock_list; elt; elt = g_slist_next (elt))
- {
- NMSock *sock = (NMSock *)(elt->data);
- if (sock)
- {
- i++;
- nm_debug (" %d: %s fd:%d F:'%s' D:'%s'", i, sock->dev ? nm_device_get_iface (sock->dev) : "",
- sock->fd, sock->func, sock->desc);
- }
- }
- g_static_mutex_unlock (&sock_list_mutex);
- nm_debug ("Open Sockets List Done.");
-}
-
-
-/*
- * nm_null_safe_strcmp
- *
- * Doesn't freaking segfault if s1/s2 are NULL
- *
- */
-int nm_null_safe_strcmp (const char *s1, const char *s2)
-{
- if (!s1 && !s2)
- return 0;
- if (!s1 && s2)
- return -1;
- if (s1 && !s2)
- return 1;
-
- return (strcmp (s1, s2));
-}
-
-
-/*
- * nm_ethernet_address_is_valid
- *
- * Compares an ethernet address against known invalid addresses.
- *
- */
-gboolean nm_ethernet_address_is_valid (const struct ether_addr *test_addr)
-{
- gboolean valid = FALSE;
- struct ether_addr invalid_addr1 = { {0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF} };
- struct ether_addr invalid_addr2 = { {0x00, 0x00, 0x00, 0x00, 0x00, 0x00} };
- struct ether_addr invalid_addr3 = { {0x44, 0x44, 0x44, 0x44, 0x44, 0x44} };
- struct ether_addr invalid_addr4 = { {0x00, 0x30, 0xb4, 0x00, 0x00, 0x00} }; /* prism54 dummy MAC */
-
- g_return_val_if_fail (test_addr != NULL, FALSE);
-
- /* Compare the AP address the card has with invalid ethernet MAC addresses. */
- if ( (memcmp(test_addr, &invalid_addr1, sizeof(struct ether_addr)) != 0)
- && (memcmp(test_addr, &invalid_addr2, sizeof(struct ether_addr)) != 0)
- && (memcmp(test_addr, &invalid_addr3, sizeof(struct ether_addr)) != 0)
- && (memcmp(test_addr, &invalid_addr4, sizeof(struct ether_addr)) != 0)
- && ((test_addr->ether_addr_octet[0] & 1) == 0)) /* Multicast addresses */
- valid = TRUE;
-
- return (valid);
-}
-
-
-/*
- * nm_dispose_scan_results
- *
- * Free memory used by the wireless scan results structure
- *
- */
-void nm_dispose_scan_results (wireless_scan *result_list)
-{
- wireless_scan *tmp = result_list;
-
- while (tmp)
- {
- wireless_scan *tmp2 = tmp;
-
- tmp = tmp->next;
- free (tmp2);
- }
-}
-
-
-/*
- * nm_spawn_process
- *
- * Wrap g_spawn_sync in a usable manner
- *
- */
-int nm_spawn_process (const char *args)
-{
- gint num_args;
- char **argv = NULL;
- int exit_status = -1;
- GError *error = NULL;
- char *so = NULL;
- char *se = NULL;
-
- g_return_val_if_fail (args != NULL, -1);
-
- if (g_shell_parse_argv (args, &num_args, &argv, &error))
- {
- GError *error2 = NULL;
-
- if (!g_spawn_sync ("/", argv, NULL, 0, NULL, NULL, &so, &se, &exit_status, &error2))
- nm_warning ("nm_spawn_process('%s'): could not spawn process. (%s)\n", args, error2->message);
-
- if (so) g_free(so);
- if (se) g_free(se);
- if (argv) g_strfreev (argv);
- if (error2) g_error_free (error2);
- } else nm_warning ("nm_spawn_process('%s'): could not parse arguments (%s)\n", args, error->message);
-
- if (error) g_error_free (error);
-
- return (exit_status);
-}
-
-
-typedef struct driver_support
-{
- char *name;
- NMDriverSupportLevel level;
-} driver_support;
-
-
-/* Blacklist of unsupported wireless drivers */
-static driver_support wireless_driver_blacklist[] =
-{
- {NULL, NM_DRIVER_UNSUPPORTED}
-};
-
-
-/* Blacklist of unsupported wired drivers. Drivers/cards that don't support
- * link detection should be blacklisted.
- */
-static driver_support wired_driver_blacklist[] =
-{
-/* Completely unsupported drivers */
- {NULL, NM_DRIVER_UNSUPPORTED}
-};
-
-
-/*
- * nm_get_device_driver_name
- *
- * Get the device's driver name from HAL.
- *
- */
-static char *nm_get_device_driver_name (LibHalContext *ctx, NMDevice *dev)
-{
- char *udi = NULL;
- char *driver_name = NULL;
-
- g_return_val_if_fail (ctx != NULL, NULL);
- g_return_val_if_fail (dev != NULL, NULL);
-
- if ((udi = nm_device_get_udi (dev)))
- {
- char *parent_udi = libhal_device_get_property_string (ctx, udi, "info.parent", NULL);
-
- if (parent_udi && libhal_device_property_exists (ctx, parent_udi, "info.linux.driver", NULL))
- driver_name = libhal_device_get_property_string (ctx, parent_udi, "info.linux.driver", NULL);
- g_free(parent_udi);
- }
-
- return (driver_name);
-}
-
-/*
- * nm_get_wireless_driver_support_level
- *
- * Blacklist certain wireless devices.
- *
- */
-static NMDriverSupportLevel nm_get_wireless_driver_support_level (LibHalContext *ctx, NMDevice *dev, char **driver)
-{
- NMDriverSupportLevel level = NM_DRIVER_FULLY_SUPPORTED;
- char *driver_name = NULL;
-
- g_return_val_if_fail (ctx != NULL, NM_DRIVER_UNSUPPORTED);
- g_return_val_if_fail (dev != NULL, NM_DRIVER_UNSUPPORTED);
- g_return_val_if_fail (driver != NULL, NM_DRIVER_UNSUPPORTED);
- g_return_val_if_fail (*driver == NULL, NM_DRIVER_UNSUPPORTED);
-
- if ((driver_name = nm_get_device_driver_name (ctx, dev)))
- {
- driver_support *drv;
- for (drv = &wireless_driver_blacklist[0]; drv->name; drv++)
- {
- if (!strcmp (drv->name, driver_name))
- {
- level = drv->level;
- break;
- }
- }
- *driver = g_strdup (driver_name);
- g_free (driver_name);
- }
-
- /* Check for carrier detection support */
- if ((level != NM_DRIVER_UNSUPPORTED) && !nm_device_get_supports_wireless_scan (dev))
- level = NM_DRIVER_NO_WIRELESS_SCAN;
-
- return (level);
-}
-
-
-/*
- * nm_get_wired_driver_support_level
- *
- * Blacklist certain devices.
- *
- */
-static NMDriverSupportLevel nm_get_wired_driver_support_level (LibHalContext *ctx, NMDevice *dev, char **driver)
-{
- NMDriverSupportLevel level = NM_DRIVER_FULLY_SUPPORTED;
- char *driver_name = NULL;
- char *usb_test;
- char *udi;
-
- g_return_val_if_fail (ctx != NULL, NM_DRIVER_UNSUPPORTED);
- g_return_val_if_fail (dev != NULL, NM_DRIVER_UNSUPPORTED);
- g_return_val_if_fail (driver != NULL, NM_DRIVER_UNSUPPORTED);
- g_return_val_if_fail (*driver == NULL, NM_DRIVER_UNSUPPORTED);
-
- if ((driver_name = nm_get_device_driver_name (ctx, dev)))
- {
- driver_support *drv;
- for (drv = &wired_driver_blacklist[0]; drv->name; drv++)
- {
- if (!strcmp (drv->name, driver_name))
- {
- level = drv->level;
- break;
- }
- }
- *driver = g_strdup (driver_name);
- g_free (driver_name);
- }
-
- /* cipsec devices are also explicitly unsupported at this time */
- if (strstr (nm_device_get_iface (dev), "cipsec"))
- level = NM_DRIVER_UNSUPPORTED;
-
- /* Ignore Ethernet-over-USB devices too for the moment (Red Hat #135722) */
- udi = nm_device_get_udi (dev);
- if ( libhal_device_property_exists (ctx, udi, "usb.interface.class", NULL)
- && (usb_test = libhal_device_get_property_string (ctx, udi, "usb.interface.class", NULL)))
- {
- libhal_free_string (usb_test);
- level = NM_DRIVER_UNSUPPORTED;
- }
-
- /* Check for carrier detection support */
- if ((level != NM_DRIVER_UNSUPPORTED) && !nm_device_get_supports_carrier_detect(dev))
- level = NM_DRIVER_NO_CARRIER_DETECT;
-
- return (level);
-}
-
-
-/*
- * nm_get_driver_support_level
- *
- * Return the driver support level for a particular device.
- *
- */
-NMDriverSupportLevel nm_get_driver_support_level (LibHalContext *ctx, NMDevice *dev)
-{
- char *driver = NULL;
- NMDriverSupportLevel level = NM_DRIVER_UNSUPPORTED;
-
- g_return_val_if_fail (ctx != NULL, NM_DRIVER_UNSUPPORTED);
- g_return_val_if_fail (dev != NULL, NM_DRIVER_UNSUPPORTED);
-
- if (nm_device_is_wireless (dev))
- level = nm_get_wireless_driver_support_level (ctx, dev, &driver);
- else if (nm_device_is_wired (dev))
- level = nm_get_wired_driver_support_level (ctx, dev, &driver);
-
- switch (level)
- {
- case NM_DRIVER_NO_CARRIER_DETECT:
- nm_info ("%s: Driver '%s' does not support carrier detection.\n"
- "\tYou must switch to it manually.", nm_device_get_iface (dev), driver);
- break;
- case NM_DRIVER_NO_WIRELESS_SCAN:
- nm_info ("%s: Driver '%s' does not support wireless scanning.\n"
- "\tNetworkManager will not be able to fully use the card.",
- nm_device_get_iface (dev), driver);
- break;
- case NM_DRIVER_FULLY_SUPPORTED:
- nm_info ("%s: Driver support level for '%s' is fully-supported",
- nm_device_get_iface (dev), driver);
- break;
- default:
- nm_info ("%s: Driver support level for '%s' is unsupported",
- nm_device_get_iface (dev), driver);
- break;
- }
-
- g_free (driver);
- return (level);
-}
-
-static inline int nm_timeval_cmp(const struct timeval *a,
- const struct timeval *b)
-{
- int x;
- x = a->tv_sec - b->tv_sec;
- x *= G_USEC_PER_SEC;
- if (x)
- return x;
- x = a->tv_usec - b->tv_usec;
- if (x)
- return x;
- return 0;
-}
-
-static inline int nm_timeval_has_passed(const struct timeval *a)
-{
- struct timeval current;
-
- gettimeofday(&current, NULL);
-
- return (nm_timeval_cmp(&current, a) >= 0);
-}
-
-static inline void nm_timeval_add(struct timeval *a,
- const struct timeval *b)
-{
- struct timeval b1;
-
- memmove(&b1, b, sizeof b1);
-
- /* normalize a and b to be positive for everything */
- while (a->tv_usec < 0)
- {
- a->tv_sec--;
- a->tv_usec += G_USEC_PER_SEC;
- }
- while (b1.tv_usec < 0)
- {
- b1.tv_sec--;
- b1.tv_usec += G_USEC_PER_SEC;
- }
-
- /* now add secs and usecs */
- a->tv_sec += b1.tv_sec;
- a->tv_usec += b1.tv_usec;
-
- /* and handle our overflow */
- if (a->tv_usec > G_USEC_PER_SEC)
- {
- a->tv_sec++;
- a->tv_usec -= G_USEC_PER_SEC;
- }
-}
-
-static void nm_v_wait_for_completion_or_timeout(
- const int max_tries,
- const struct timeval *max_time,
- const guint interval_usecs,
- nm_completion_func test_func,
- nm_completion_func action_func,
- nm_completion_args args)
-{
- int try;
- gboolean finished = FALSE;
- struct timeval finish_time;
-
- g_return_if_fail (test_func || action_func);
-
- if (max_time) {
- gettimeofday(&finish_time, NULL);
- nm_timeval_add(&finish_time, max_time);
- }
-
- try = -1;
- while (!finished &&
- (max_tries == NM_COMPLETION_TRIES_INFINITY || try < max_tries))
- {
- if (max_time && nm_timeval_has_passed(&finish_time))
- break;
- try++;
- if (test_func)
- {
- finished = (*test_func)(try, args);
- if (finished)
- break;
- }
-
-/* #define NM_SLEEP_DEBUG */
-#ifdef NM_SLEEP_DEBUG
- syslog (LOG_INFO, "sleeping or %d usecs", interval_usecs);
-#endif
- g_usleep(interval_usecs);
- if (action_func)
- finished = (*action_func)(try, args);
- }
-}
-
-/* these should probably be moved to NetworkManagerUtils.h as macros
- * since they don't do varargs stuff any more */
-void nm_wait_for_completion_or_timeout(
- const int max_tries,
- const struct timeval *max_time,
- const guint interval_usecs,
- nm_completion_func test_func,
- nm_completion_func action_func,
- nm_completion_args args)
-{
- nm_v_wait_for_completion_or_timeout(max_tries, max_time,
- interval_usecs, test_func,
- action_func, args);
-}
-
-void nm_wait_for_completion(
- const int max_tries,
- const guint interval_usecs,
- nm_completion_func test_func,
- nm_completion_func action_func,
- nm_completion_args args)
-{
- nm_v_wait_for_completion_or_timeout(max_tries, NULL,
- interval_usecs, test_func,
- action_func, args);
-}
-
-void nm_wait_for_timeout(
- const struct timeval *max_time,
- const guint interval_usecs,
- nm_completion_func test_func,
- nm_completion_func action_func,
- nm_completion_args args)
-{
- nm_v_wait_for_completion_or_timeout(-1, max_time, interval_usecs,
- test_func, action_func, args);
-}
-
-/* you can use these, but they're really just examples */
-gboolean nm_completion_boolean_test(int tries, nm_completion_args args)
-{
- gboolean *condition = (gboolean *)args[0];
- char *message = (char *)args[1];
- int log_level = GPOINTER_TO_INT (args[2]);
- int log_interval = GPOINTER_TO_INT (args[3]);
-
- g_return_val_if_fail (condition != NULL, TRUE);
-
- if (message)
- if ((log_interval == 0 && tries == 0) || (log_interval != 0 && tries % log_interval == 0))
- {
- if (log_level == LOG_WARNING)
- nm_warning_str (message);
- else if (log_level == LOG_ERR)
- nm_error_str (message);
- else if (log_level == LOG_DEBUG)
- nm_debug_str (message);
- else
- nm_info_str (message);
- }
-
- if (*condition)
- return TRUE;
- return FALSE;
-}
-
-gboolean nm_completion_boolean_function1_test(int tries,
- nm_completion_args args)
-{
- nm_completion_boolean_function_1 condition = args[0];
- char *message = args[1];
- int log_level = GPOINTER_TO_INT (args[2]);
- int log_interval = GPOINTER_TO_INT (args[3]);
- u_int64_t arg0;
-
- memcpy(&arg0, &args[4], sizeof (arg0));
-
- g_return_val_if_fail (condition, TRUE);
-
- if (message)
- if ((log_interval == 0 && tries == 0)
- || (log_interval != 0 && tries % log_interval == 0))
- syslog(log_level, message);
-
- if (!(*condition)(arg0))
- return TRUE;
- return FALSE;
-}
-
-gboolean nm_completion_boolean_function2_test(int tries,
- nm_completion_args args)
-{
- nm_completion_boolean_function_2 condition = args[0];
- char *message = args[1];
- int log_level = GPOINTER_TO_INT (args[2]);
- int log_interval = GPOINTER_TO_INT (args[3]);
- u_int64_t arg0, arg1;
-
- memcpy(&arg0, &args[4], sizeof (arg0));
- memcpy(&arg1, &args[4]+sizeof (arg0), sizeof (arg1));
-
- g_return_val_if_fail (condition, TRUE);
-
- if (message)
- if ((log_interval == 0 && tries == 0)
- || (log_interval != 0 && tries % log_interval == 0))
- syslog(log_level, message);
-
- if (!(*condition)(arg0, arg1))
- return TRUE;
- return FALSE;
-}
-
diff --git a/src/NetworkManagerUtils.h b/src/NetworkManagerUtils.h
deleted file mode 100644
index 33585a1e31..0000000000
--- a/src/NetworkManagerUtils.h
+++ /dev/null
@@ -1,105 +0,0 @@
-/* NetworkManager -- Network link manager
- *
- * Dan Williams <dcbw@redhat.com>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- *
- * (C) Copyright 2004 Red Hat, Inc.
- */
-
-#ifndef NETWORK_MANAGER_UTILS_H
-#define NETWORK_MANAGER_UTILS_H
-
-#include <glib.h>
-#include <stdio.h>
-#include <syslog.h>
-#include <net/ethernet.h>
-#include <iwlib.h>
-#include <sys/time.h>
-#include <stdarg.h>
-
-#include "NetworkManager.h"
-#include "NetworkManagerMain.h"
-#include "NetworkManagerDevice.h"
-
-typedef enum SockType
-{
- DEV_WIRELESS,
- DEV_GENERAL,
- NETWORK_CONTROL
-} SockType;
-
-typedef struct NMSock NMSock;
-
-
-gboolean nm_try_acquire_mutex (GMutex *mutex, const char *func);
-void nm_lock_mutex (GMutex *mutex, const char *func);
-void nm_unlock_mutex (GMutex *mutex, const char *func);
-void nm_register_mutex_desc (GMutex *mutex, const char *string);
-
-NMSock * nm_dev_sock_open (NMDevice *dev, SockType type, const char *func_name, const char *desc);
-void nm_dev_sock_close (NMSock *sock);
-int nm_dev_sock_get_fd (NMSock *sock);
-void nm_print_open_socks (void);
-
-int nm_null_safe_strcmp (const char *s1, const char *s2);
-
-gboolean nm_ethernet_address_is_valid (const struct ether_addr *test_addr);
-
-void nm_dispose_scan_results (wireless_scan *result_list);
-
-int nm_spawn_process (const char *args);
-
-NMDriverSupportLevel nm_get_driver_support_level (LibHalContext *ctx, NMDevice *dev);
-
-#define NM_COMPLETION_TRIES_INFINITY -1
-
-typedef void * nm_completion_args[8];
-
-typedef gboolean (*nm_completion_func)(int tries, nm_completion_args args);
-typedef gboolean (*nm_completion_boolean_function_1)(u_int64_t arg);
-typedef gboolean (*nm_completion_boolean_function_2)(
- u_int64_t arg0, u_int64_t arg1);
-
-void nm_wait_for_completion(
- const int max_tries,
- const guint interval_usecs,
- nm_completion_func test_func,
- nm_completion_func action_func,
- nm_completion_args args);
-
-void nm_wait_for_completion_or_timeout(
- const int max_tries,
- const struct timeval *max_time,
- const guint interval_usecs,
- nm_completion_func test_func,
- nm_completion_func action_func,
- nm_completion_args args);
-
-void nm_wait_for_timeout(
- const struct timeval *max_time,
- const guint interval_usecs,
- nm_completion_func test_func,
- nm_completion_func action_func,
- nm_completion_args args);
-
-gboolean nm_completion_boolean_test(int tries, nm_completion_args args);
-gboolean nm_completion_boolean_function1_test(int tries,
- nm_completion_args args);
-gboolean nm_completion_boolean_function2_test(int tries,
- nm_completion_args args);
-#define nm_completion_boolean_function_test nm_completion_boolean_function1_test
-
-#endif
diff --git a/src/NetworkManagerWireless.c b/src/NetworkManagerWireless.c
deleted file mode 100644
index 6f8f325b92..0000000000
--- a/src/NetworkManagerWireless.c
+++ /dev/null
@@ -1,234 +0,0 @@
-/* NetworkManager -- Network link manager
- *
- * Dan Williams <dcbw@redhat.com>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- *
- * (C) Copyright 2004 Red Hat, Inc.
- */
-
-#include <stdio.h>
-#include <iwlib.h>
-#include "config.h"
-#ifdef HAVE_GCRYPT
-#include <gcrypt.h>
-#else
-#include "gnome-keyring-md5.h"
-#endif
-#include "NetworkManager.h"
-#include "NetworkManagerDevice.h"
-#include "NetworkManagerWireless.h"
-#include "NetworkManagerPolicy.h"
-#include "NetworkManagerUtils.h"
-#include "utils/nm-utils.h"
-
-/*
- * nm_wireless_64bit_ascii_to_hex
- *
- * Convert an ASCII string into a suitable WEP key.
- *
- */
-char *nm_wireless_64bit_ascii_to_hex (const unsigned char *ascii)
-{
- static char hex_digits[] = "0123456789abcdef";
- unsigned char *res;
- int i;
-
- res = g_malloc (33);
- for (i = 0; i < 16; i++)
- {
- res[2*i] = hex_digits[(ascii[i] >> 4) & 0xf];
- res[2*i+1] = hex_digits[ascii[i] & 0xf];
- }
-
- /* We chomp it at byte 10, since WEP keys only use 40 bits */
- res[10] = 0;
- return (res);
-}
-
-
-/*
- * nm_wireless_128bit_ascii_to_hex
- *
- * Convert an ascii string into a suitable string for use
- * as a WEP key.
- *
- * Code originally by Alex Larsson <alexl@redhat.com> and
- * copyright Red Hat, Inc. under terms of the LGPL.
- *
- */
-char *nm_wireless_128bit_ascii_to_hex (const unsigned char *ascii)
-{
- static char hex_digits[] = "0123456789abcdef";
- unsigned char *res;
- int i;
-
- res = g_malloc (33);
- for (i = 0; i < 16; i++)
- {
- res[2*i] = hex_digits[(ascii[i] >> 4) & 0xf];
- res[2*i+1] = hex_digits[ascii[i] & 0xf];
- }
- /* We chomp it at byte 26, since WEP keys only use 104 bits */
- res[26] = 0;
-
- return (res);
-}
-
-
-/*
- * nm_wireless_128bit_key_from_passphrase
- *
- * From a passphrase, generate a standard 128-bit WEP key using
- * MD5 algorithm.
- *
- */
-char *nm_wireless_128bit_key_from_passphrase (const char *passphrase)
-{
- char md5_data[65];
- unsigned char digest[16];
- int passphrase_len;
- int i;
-
- g_return_val_if_fail (passphrase != NULL, NULL);
-
- passphrase_len = strlen (passphrase);
- if (passphrase_len < 1)
- return (NULL);
-
- /* Get at least 64 bits */
- for (i = 0; i < 64; i++)
- md5_data [i] = passphrase [i % passphrase_len];
-
- /* Null terminate md5 data-to-hash and hash it */
- md5_data[64] = 0;
-#ifdef HAVE_GCRYPT
- gcry_md_hash_buffer (GCRY_MD_MD5, digest, md5_data, 64);
-#else
- gnome_keyring_md5_string (md5_data, digest);
-#endif
-
- return (nm_wireless_128bit_ascii_to_hex (digest));
-}
-
-
-/*
- * nm_wireless_stats_to_percent
- *
- * Convert an iw_stats structure from a scan or the card into
- * a magical signal strength percentage.
- *
- */
-int nm_wireless_qual_to_percent (const struct iw_quality *qual, const struct iw_quality *max_qual, const struct iw_quality *avg_qual)
-{
- int percent = -1;
- int level_percent = -1;
-
- g_return_val_if_fail (qual != NULL, -1);
- g_return_val_if_fail (max_qual != NULL, -1);
- g_return_val_if_fail (avg_qual != NULL, -1);
-
-#ifdef IW_QUAL_DEBUG
-nm_debug ("QL: qual %d/%u/0x%X, level %d/%u/0x%X, noise %d/%u/0x%X, updated: 0x%X ** MAX: qual %d/%u/0x%X, level %d/%u/0x%X, noise %d/%u/0x%X, updated: 0x%X",
-(__s8)qual->qual, qual->qual, qual->qual,
-(__s8)qual->level, qual->level, qual->level,
-(__s8)qual->noise, qual->noise, qual->noise,
-qual->updated,
-(__s8)max_qual->qual, max_qual->qual, max_qual->qual,
-(__s8)max_qual->level, max_qual->level, max_qual->level,
-(__s8)max_qual->noise, max_qual->noise, max_qual->noise,
-max_qual->updated);
-#endif
-
- /* Try using the card's idea of the signal quality first as long as it tells us what the max quality is.
- * Drivers that fill in quality values MUST treat them as percentages, ie the "Link Quality" MUST be
- * bounded by 0 and max_qual->qual, and MUST change in a linear fashion. Within those bounds, drivers
- * are free to use whatever they want to calculate "Link Quality".
- */
- if ((max_qual->qual != 0) && !(max_qual->updated & IW_QUAL_QUAL_INVALID) && !(qual->updated & IW_QUAL_QUAL_INVALID))
- percent = (int)(100 * ((double)qual->qual / (double)max_qual->qual));
-
- /* If the driver doesn't specify a complete and valid quality, we have two options:
- *
- * 1) dBm: driver must specify max_qual->level = 0, and have valid values for
- * qual->level and (qual->noise OR max_qual->noise)
- * 2) raw RSSI: driver must specify max_qual->level > 0, and have valid values for
- * qual->level and max_qual->level
- *
- * This is the WEXT spec. If this interpretation is wrong, I'll fix it. Otherwise,
- * If drivers don't conform to it, they are wrong and need to be fixed.
- */
-
- if ( (max_qual->level == 0) && !(max_qual->updated & IW_QUAL_LEVEL_INVALID) /* Valid max_qual->level == 0 */
- && !(qual->updated & IW_QUAL_LEVEL_INVALID) /* Must have valid qual->level */
- && ( ((max_qual->noise > 0) && !(max_qual->updated & IW_QUAL_NOISE_INVALID)) /* Must have valid max_qual->noise */
- || ((qual->noise > 0) && !(qual->updated & IW_QUAL_NOISE_INVALID))) /* OR valid qual->noise */
- )
- {
- /* Absolute power values (dBm) */
-
- /* Reasonable fallbacks for dumb drivers that don't specify either level. */
- #define FALLBACK_NOISE_FLOOR_DBM -90
- #define FALLBACK_SIGNAL_MAX_DBM -20
- int max_level = FALLBACK_SIGNAL_MAX_DBM;
- int noise = FALLBACK_NOISE_FLOOR_DBM;
- int level = qual->level - 0x100;
-
- level = CLAMP (level, FALLBACK_NOISE_FLOOR_DBM, FALLBACK_SIGNAL_MAX_DBM);
-
- if ((qual->noise > 0) && (!qual->updated & IW_QUAL_NOISE_INVALID))
- noise = qual->noise - 0x100;
- else if ((max_qual->noise > 0) && !(max_qual->updated & IW_QUAL_NOISE_INVALID))
- noise = max_qual->noise - 0x100;
- noise = CLAMP (noise, FALLBACK_NOISE_FLOOR_DBM, FALLBACK_SIGNAL_MAX_DBM);
-
- /* A sort of signal-to-noise ratio calculation */
- level_percent = (int)(100 - 70 *(
- ((double)max_level - (double)level) /
- ((double)max_level - (double)noise)));
-#ifdef IW_QUAL_DEBUG
- nm_debug ("QL1: level_percent is %d. max_level %d, level %d, noise_floor %d.", level_percent, max_level, level, noise);
-#endif
- }
- else if ((max_qual->level != 0) && !(max_qual->updated & IW_QUAL_LEVEL_INVALID) /* Valid max_qual->level as upper bound */
- && !(qual->updated & IW_QUAL_LEVEL_INVALID))
- {
- /* Relative power values (RSSI) */
-
- int level = qual->level;
-
- /* Signal level is relavtive (0 -> max_qual->level) */
- level = CLAMP (level, 0, max_qual->level);
- level_percent = (int)(100 * ((double)level / (double)max_qual->level));
-#ifdef IW_QUAL_DEBUG
- nm_debug ("QL2: level_percent is %d. max_level %d, level %d.", level_percent, max_qual->level, level);
-#endif
- }
- else if (percent == -1)
- {
-#ifdef IW_QUAL_DEBUG
- nm_debug ("QL: Could not get quality %% value from driver. Driver is probably buggy.");
-#endif
- }
-
- /* If the quality percent was 0 or doesn't exist, then try to use signal levels instead */
- if ((percent < 1) && (level_percent >= 0))
- percent = level_percent;
-
-#ifdef IW_QUAL_DEBUG
- nm_debug ("QL: Final quality percent is %d (%d).", percent, CLAMP (percent, 0, 100));
-#endif
- return (CLAMP (percent, 0, 100));
-}
diff --git a/src/NetworkManagerWireless.h b/src/NetworkManagerWireless.h
deleted file mode 100644
index 299f3b0f3d..0000000000
--- a/src/NetworkManagerWireless.h
+++ /dev/null
@@ -1,39 +0,0 @@
-/* NetworkManager -- Network link manager
- *
- * Dan Williams <dcbw@redhat.com>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- *
- * (C) Copyright 2004 Red Hat, Inc.
- */
-
-#ifndef NETWORK_MANAGER_WIRELESS_H
-#define NETWORK_MANAGER_WIRELESS_H
-
-#include <iwlib.h>
-#include "NetworkManager.h"
-#include "NetworkManagerDevice.h"
-#include "NetworkManagerAPList.h"
-
-
-char * nm_wireless_64bit_ascii_to_hex (const unsigned char *ascii);
-char * nm_wireless_128bit_ascii_to_hex (const unsigned char *ascii);
-char * nm_wireless_128bit_key_from_passphrase (const char *passphrase);
-
-int nm_wireless_qual_to_percent (const struct iw_quality *qual,
- const struct iw_quality *max_qual,
- const struct iw_quality *avg_qual);
-
-#endif
diff --git a/src/autoip.c b/src/autoip.c
deleted file mode 100644
index c842df404e..0000000000
--- a/src/autoip.c
+++ /dev/null
@@ -1,350 +0,0 @@
-// Based upon http://www.zeroconf.org/AVH-IPv4LL.c
-// Merged into NetworkManager by Tom Parker <palfrey@tevp.net>
-// Original copyright continues below
-//
-// ----------------------------------
-// Simple IPv4 Link-Local addressing (see <http://www.zeroconf.org/>)
-// @(#)llip.c, 1.5, Copyright 2003 by Arthur van Hoff (avh@strangeberry.com)
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License, or (at your option) any later version.
-// See <http://www.gnu.org/copyleft/lesser.html>
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-// Lesser General Public License for more details.
-
-#include <string.h>
-#include <stdlib.h>
-#include <stdio.h>
-#include <sys/poll.h>
-#include <arpa/inet.h>
-#include <netinet/ether.h>
-#include <linux/sockios.h>
-#include <sys/ioctl.h>
-#include <sys/time.h>
-#include <syslog.h>
-#include <glib.h>
-#include <unistd.h>
-#include "NetworkManager.h"
-#include "NetworkManagerDevice.h"
-#include "NetworkManagerMain.h"
-#include "NetworkManagerUtils.h"
-#include "nm-utils.h"
-#include "autoip.h"
-
-// Times here are in seconds
-#define LINKLOCAL_ADDR 0xa9fe0000
-#define LINKLOCAL_BCAST 0xa9feffff
-#define PROBE_NUM 3
-#define PROBE_MIN 1
-#define PROBE_MAX 2
-#define ANNOUNCE_NUM 3
-#define ANNOUNCE_INTERVAL 2
-#define ANNOUNCE_WAIT 2
-
-#define FAILURE_TIMEOUT 14
-
-
-typedef struct EtherHeader
-{
- u_int8_t ether_dhost[ETH_ALEN]; /* destination eth addr */
- u_int8_t ether_shost[ETH_ALEN]; /* source ether addr */
- u_int16_t ether_type; /* packet type ID field */
-} __attribute__((packed)) EtherHeader;
-
-
-typedef struct ARPMessage
-{
- EtherHeader ethhdr;
- u_short htype; /* hardware type (must be ARPHRD_ETHER) */
- u_short ptype; /* protocol type (must be ETHERTYPE_IP) */
- u_char hlen; /* hardware address length (must be 6) */
- u_char plen; /* protocol address length (must be 4) */
- u_short operation; /* ARP opcode */
- u_char sHaddr[ETH_ALEN]; /* sender's hardware address */
- u_char sInaddr[4]; /* sender's IP address */
- u_char tHaddr[ETH_ALEN]; /* target's hardware address */
- u_char tInaddr[4]; /* target's IP address */
- u_char pad[18]; /* pad for min. Ethernet payload (60 bytes) */
-} __attribute__((packed)) ARPMessage;
-
-
-// Times here are in seconds
-#define ARP_DEFAULT_LEASETIME 100
-
-static struct in_addr null_ip = {0};
-static struct ether_addr null_addr = {{0, 0, 0, 0, 0, 0}};
-static struct ether_addr broadcast_addr = {{0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF}};
-
-/**
- * Pick a random link local IP address.
- */
-static void pick (struct in_addr *ip)
-{
- ip->s_addr = htonl (LINKLOCAL_ADDR | ((abs(random()) % 0xFD00) + (abs(random()) % 0x0100)));
-
- /* Make sure we don't use 0xFF or 0x00 anywhere */
- while (((ip->s_addr & 0x0000FF00) == 0xFF00) || ((ip->s_addr & 0x0000FF00) == 0x0000))
- ip->s_addr = (ip->s_addr & 0xFFFF00FF) + (abs(random()) && 0xFFFF);
-
- while (((ip->s_addr & 0x000000FF) == 0xFF) || ((ip->s_addr & 0x000000FF) == 0x00))
- ip->s_addr = (ip->s_addr & 0xFFFFFF00) + (abs(random()) && 0xFF);
-}
-
-/**
- * Send out an ARP packet.
- */
-static gboolean arp(int fd, struct sockaddr *saddr, int op,
- struct ether_addr *source_addr, struct in_addr source_ip,
- struct ether_addr *target_addr, struct in_addr target_ip)
-{
- struct ARPMessage p;
- gboolean success = FALSE;
-
- memset (&p, 0, sizeof (p));
-
- /* ether header */
- p.ethhdr.ether_type = htons (ETHERTYPE_ARP);
- memcpy (p.ethhdr.ether_shost, source_addr, ETH_ALEN);
- memcpy (p.ethhdr.ether_dhost, &broadcast_addr, ETH_ALEN);
-
- /* arp request */
- p.htype = htons (ARPHRD_ETHER);
- p.ptype = htons (ETHERTYPE_IP);
- p.hlen = ETH_ALEN;
- p.plen = 4;
- p.operation = htons (op);
- memcpy (&p.sHaddr, source_addr, ETH_ALEN);
- memcpy (&p.sInaddr, &source_ip, sizeof (p.sInaddr));
- memcpy (&p.tHaddr, target_addr, ETH_ALEN);
- memcpy (&p.tInaddr, &target_ip, sizeof (p.tInaddr));
-
- /* send it */
- if (sendto (fd, &p, sizeof (p), 0, saddr, sizeof (*saddr)) < 0)
- nm_warning ("autoip ARP sendto() failed.");
- else
- success = TRUE;
-
- return success;
-}
-
-/*****************************************************************************/
-/* Subtract the `struct timeval' values X and Y,
- storing the result in RESULT.
- Return 1 if the difference is negative, otherwise 0. */
-static int timeval_subtract (struct timeval *result, struct timeval *x, struct timeval *y)
-{
- /* Perform the carry for the later subtraction by updating Y. */
- if (x->tv_usec < y->tv_usec)
- {
- int nsec = (y->tv_usec - x->tv_usec) / 1000000 + 1;
- y->tv_usec -= 1000000 * nsec;
- y->tv_sec += nsec;
- }
- if (x->tv_usec - y->tv_usec > 1000000)
- {
- int nsec = (x->tv_usec - y->tv_usec) / 1000000;
- y->tv_usec += 1000000 * nsec;
- y->tv_sec -= nsec;
- }
-
- /* Compute the time remaining to wait.
- `tv_usec' is certainly positive. */
- result->tv_sec = x->tv_sec - y->tv_sec;
- result->tv_usec = x->tv_usec - y->tv_usec;
-
- /* Return 1 if result is negative. */
- return x->tv_sec < y->tv_sec;
-}
-
-enum return_vals
-{
- RET_ERROR = 0,
- RET_TIMEOUT,
- RET_CEASED,
- RET_SUCCESS
-};
-
-/*****************************************************************************/
-/* "timeout" should be the future point in time when we wish to stop
- * checking for data on the socket.
- */
-static int peekfd (NMDevice *dev, int sk, struct timeval *timeout)
-{
- struct timeval diff;
- struct timeval now;
-
- /* Wake up each second to check whether or not we've been told
- * to stop with iface->cease and check our timeout.
- */
- gettimeofday (&now, NULL);
-// nm_info ("autoip waiting for data, overall timeout = {%ds, %dus}\n", (int)timeout->tv_sec, (int)timeout->tv_usec);
- while (timeval_subtract (&diff, timeout, &now) == 0)
- {
- fd_set fs;
- struct timeval wait = {1, 0};
-// nm_info ("autoip waiting for data, remaining timeout = {%ds, %dus}\n", (int)diff.tv_sec, (int)diff.tv_usec);
-
- FD_ZERO (&fs);
- FD_SET (sk, &fs);
-
- if (select (sk+1, &fs, NULL, NULL, &wait) == -1)
- return RET_ERROR;
- if (FD_ISSET(sk, &fs))
- return RET_SUCCESS;
- if (nm_device_activation_should_cancel (dev))
- return RET_CEASED;
- gettimeofday (&now, NULL);
- };
- return RET_TIMEOUT;
-}
-
-
-gboolean get_autoip (NMDevice *dev, struct in_addr *out_ip)
-{
- struct sockaddr saddr;
- ARPMessage p;
- struct ether_addr addr;
- struct in_addr ip = {0};
- NMSock *sk;
- int nprobes = 0;
- int nannounce = 0;
- gboolean success = FALSE;
- char *temp_addr;
-
- g_return_val_if_fail (dev != NULL, FALSE);
- g_return_val_if_fail (out_ip != NULL, FALSE);
-
- out_ip->s_addr = 0;
-
- /* initialize saddr */
- memset (&saddr, 0, sizeof (saddr));
- strncpy (saddr.sa_data, nm_device_get_iface (dev), sizeof (saddr.sa_data));
-
- /* open an ARP socket */
- if ((sk = nm_dev_sock_open (dev, NETWORK_CONTROL, __FUNCTION__, NULL)) == NULL)
- {
- nm_warning ("%s: Couldn't open network control socket.", nm_device_get_iface (dev));
- goto out;
- }
-
- /* bind to the ARP socket */
- if (bind (nm_dev_sock_get_fd (sk), &saddr, sizeof (saddr)) < 0)
- {
- nm_warning ("%s: Couldn't bind to the device.", nm_device_get_iface (dev));
- goto out;
- }
-
- nm_device_get_hw_address (dev, &addr);
-
- /* initialize pseudo random selection of IP addresses */
- srandom ( (addr.ether_addr_octet[ETHER_ADDR_LEN-4] << 24) |
- (addr.ether_addr_octet[ETHER_ADDR_LEN-3] << 16) |
- (addr.ether_addr_octet[ETHER_ADDR_LEN-2] << 8) |
- (addr.ether_addr_octet[ETHER_ADDR_LEN-1] << 0));
-
- /* pick an ip address */
- if (ip.s_addr == 0)
- pick (&ip);
-
- while (1)
- {
- struct timeval timeout;
- int err;
-
- /* Make sure we haven't been told to quit */
- if (nm_device_activation_should_cancel (dev))
- goto out;
-
- if (nprobes < PROBE_NUM)
- {
- nm_info ("autoip: Sending probe #%d for IP address %s.", nprobes, inet_ntoa (ip));
- arp (nm_dev_sock_get_fd (sk), &saddr, ARPOP_REQUEST, &addr, null_ip, &null_addr, ip);
- nprobes++;
- gettimeofday (&timeout, NULL);
- if (nprobes == PROBE_NUM)
- {
- /* Link local specifies a different interval between
- * the end of probe requests and announce packets.
- */
- timeout.tv_sec += ANNOUNCE_WAIT;
- }
- else
- {
- /* FIXME: we need to randomize the timeout _between_ MIN and MAX */
- timeout.tv_sec += PROBE_MIN;
- timeout.tv_usec += (random () % 200000);
- }
- }
- else if (nannounce < ANNOUNCE_NUM)
- {
- nm_info ("autoip: Sending announce #%d for IP address %s.", nannounce, inet_ntoa (ip));
- arp (nm_dev_sock_get_fd (sk), &saddr, ARPOP_REQUEST, &addr, ip, &addr, ip);
- nannounce++;
- gettimeofday (&timeout, NULL);
- timeout.tv_sec += ANNOUNCE_INTERVAL;
- timeout.tv_usec += (random () % 200000);
- }
- else
- {
- /* Use our address! */
- memcpy (out_ip, &ip, sizeof (ip));
- success = TRUE;
- goto out;
- }
-
- nm_info ("autoip: Waiting for reply...");
- err = peekfd (dev, nm_dev_sock_get_fd (sk), &timeout);
- if ((err == RET_ERROR) || (err == RET_CEASED))
- goto out;
-
- /* There's some data waiting for us */
- if (err == RET_SUCCESS)
- {
- nm_info ("autoip: Got some data to check for reply packet.");
-
- /* read ARP packet */
- if (recv (nm_dev_sock_get_fd (sk), &p, sizeof (p), 0) < 0)
- {
- nm_warning ("autoip: packet receive failure, ignoring it.");
- continue;
- }
-
- #ifdef ARP_DEBUG
- nm_warning ("autoip: (%s) recv arp type=%d, op=%d, ", nm_device_get_iface (dev), ntohs(p.ethhdr.ether_type), ntohs(p.operation));
- {
- struct in_addr a;
- memcpy (&(a.s_addr), &(p.sInaddr), sizeof (a.s_addr));
- nm_warning (" source = %s %02X:%02X:%02X:%02X:%02X:%02X, ", inet_ntoa (a),
- p.sHaddr[0], p.sHaddr[1], p.sHaddr[2], p.sHaddr[3], p.sHaddr[4], p.sHaddr[5]);
- memcpy (&(a.s_addr), &(p.tInaddr), sizeof (a.s_addr));
- nm_warning (" target = %s %02X:%02X:%02X:%02X:%02X:%02X\n", inet_ntoa (a),
- p.tHaddr[0], p.tHaddr[1], p.tHaddr[2], p.tHaddr[3], p.tHaddr[4], p.tHaddr[5]);
- }
- #endif
-
- if ( (ntohs (p.ethhdr.ether_type) == ETHERTYPE_ARP)
- && (ntohs (p.operation) == ARPOP_REPLY)
- && ((uint32_t)(*p.tInaddr) == ip.s_addr)
- && (memcmp (&addr, &p.tHaddr, ETH_ALEN) != 0))
- {
- #ifdef ARP_DEBUG
- nm_warning ("autoip: (%s) ARP conflict for IP address %s.\n", nm_device_get_iface (dev), inet_ntoa(ip));
- #endif
-
- /* Ok, start all over again */
- pick (&ip);
- nprobes = 0;
- nannounce = 0;
- }
- }
- }
-
-out:
- nm_dev_sock_close (sk);
- return success;
-}
diff --git a/src/autoip.h b/src/autoip.h
deleted file mode 100644
index b2be3e2a8a..0000000000
--- a/src/autoip.h
+++ /dev/null
@@ -1,3 +0,0 @@
-#include "NetworkManagerDevice.h"
-
-extern gboolean get_autoip (NMDevice *dev, struct in_addr *out_ip);
diff --git a/src/backends/.cvsignore b/src/backends/.cvsignore
deleted file mode 100644
index 46cd0498a7..0000000000
--- a/src/backends/.cvsignore
+++ /dev/null
@@ -1,3 +0,0 @@
-.dirstamp
-Makefile
-Makefile.in
diff --git a/src/backends/Makefile.am b/src/backends/Makefile.am
deleted file mode 100644
index f25998f606..0000000000
--- a/src/backends/Makefile.am
+++ /dev/null
@@ -1,46 +0,0 @@
-INCLUDES = -I${top_srcdir} -I${top_srcdir}/src/named-manager -I${top_srcdir}/src/vpn-manager -I${top_srcdir}/src -I${top_srcdir}/utils
-
-noinst_LTLIBRARIES = libnmbackend.la
-
-libnmbackend_la_SOURCES =
-
-if TARGET_REDHAT
-libnmbackend_la_SOURCES += NetworkManagerRedHat.c \
- shvar.c \
- shvar.h
-endif
-
-if TARGET_SUSE
-libnmbackend_la_SOURCES += NetworkManagerSuSE.c \
- shvar.c \
- shvar.h
-endif
-
-if TARGET_GENTOO
-libnmbackend_la_SOURCES += NetworkManagerGentoo.c \
- shvar.c \
- shvar.h
-endif
-
-if TARGET_DEBIAN
-libnmbackend_la_SOURCES += NetworkManagerDebian.c \
- interface_parser.c \
- interface_parser.h
-endif
-
-if TARGET_SLACKWARE
-libnmbackend_la_SOURCES += NetworkManagerSlackware.c
-endif
-
-libnmbackend_la_LIBADD = $(DBUS_LIBS) $(GTHREAD_LIBS)
-libnmbackend_la_CPPFLAGS = $(DBUS_CFLAGS) \
- $(GTHREAD_CFLAGS) \
- $(HAL_CFLAGS) \
- -g \
- -Wall \
- -DDBUS_API_SUBJECT_TO_CHANGE \
- -DG_DISABLE_DEPRECATED \
- -DBINDIR=\"$(bindir)\" \
- -DDATADIR=\"$(datadir)\" \
- -DSYSCONFDIR=\"$(sysconfdir)\"
-
diff --git a/src/backends/NetworkManagerDebian.c b/src/backends/NetworkManagerDebian.c
deleted file mode 100644
index 7bc2d2fe6f..0000000000
--- a/src/backends/NetworkManagerDebian.c
+++ /dev/null
@@ -1,729 +0,0 @@
-/* NetworkManager -- Network link manager
- *
- * Matthew Garrett <mjg59@srcf.ucam.org>
- *
- * Heavily based on NetworkManagerRedhat.c by Dan Williams <dcbw@redhat.com>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- *
- * (C) Copyright 2004 Tom Parker
- * (C) Copyright 2004 Matthew Garrett
- * (C) Copyright 2004 Red Hat, Inc.
- */
-
-#include <stdio.h>
-#include <sys/types.h>
-#include <signal.h>
-#include <arpa/inet.h>
-#include "NetworkManagerSystem.h"
-#include "NetworkManagerUtils.h"
-#include "NetworkManagerDevice.h"
-#include "NetworkManagerDialup.h"
-#include "interface_parser.h"
-#include "nm-utils.h"
-
-#define ARPING "/usr/sbin/arping"
-
-/*
- * nm_system_init
- *
- * Initializes the distribution-specific system backend
- *
- */
-void nm_system_init (void)
-{
-}
-
-/*
- * nm_system_device_add_default_route_via_device
- *
- * Add default route to the given device
- *
- */
-void nm_system_device_add_default_route_via_device (NMDevice *dev)
-{
- g_return_if_fail (dev != NULL);
-
- /* Not really applicable for test devices */
- if (nm_device_is_test_device (dev))
- return;
-
- nm_system_device_add_default_route_via_device_with_iface (nm_device_get_iface (dev));
-}
-
-
-/*
- * nm_system_device_add_default_route_via_device_with_iface
- *
- * Add default route to the given device
- *
- */
-void nm_system_device_add_default_route_via_device_with_iface (const char *iface)
-{
- char *buf;
-
- g_return_if_fail (iface != NULL);
-
- /* Add default gateway */
- buf = g_strdup_printf ("/sbin/ip route add default dev %s", iface);
- nm_spawn_process (buf);
- g_free (buf);
-}
-
-/*
- * nm_system_device_add_route_via_device_with_iface
- *
- * Add route to the given device
- *
- */
-void nm_system_device_add_route_via_device_with_iface (const char *iface, const char *route)
-{
- char *buf;
-
- g_return_if_fail (iface != NULL);
-
- /* Add default gateway */
- buf = g_strdup_printf ("/sbin/ip route add %s dev %s", route, iface);
- nm_spawn_process (buf);
- g_free (buf);
-}
-
-
-/*
- * nm_system_device_flush_addresses
- *
- * Flush all network addresses associated with a network device
- *
- */
-void nm_system_device_flush_routes (NMDevice *dev)
-{
- char *buf;
-
- g_return_if_fail (dev != NULL);
-
- /* Not really applicable for test devices */
- if (nm_device_is_test_device (dev))
- return;
-
- nm_system_device_flush_routes_with_iface (nm_device_get_iface (dev));
-}
-
-/*
- * nm_system_device_flush_routes_with_iface
- *
- * Flush all routes associated with a network device
- *
- */
-void nm_system_device_flush_routes_with_iface (const char *iface)
-{
- char *buf;
-
- g_return_if_fail (iface != NULL);
-
- /* Remove routing table entries */
- buf = g_strdup_printf ("/sbin/ip route flush dev %s", iface);
- nm_spawn_process (buf);
- g_free (buf);
-}
-
-/*
- * nm_system_device_flush_addresses
- *
- * Flush all network addresses associated with a network device
- *
- */
-void nm_system_device_flush_addresses (NMDevice *dev)
-{
- g_return_if_fail (dev != NULL);
-
- /* Not really applicable for test devices */
- if (nm_device_is_test_device (dev))
- return;
-
- nm_system_device_flush_addresses_with_iface (nm_device_get_iface (dev));
-}
-
-
-/*
- * nm_system_device_flush_addresses_with_iface
- *
- * Flush all network addresses associated with a network device
- *
- */
-void nm_system_device_flush_addresses_with_iface (const char *iface)
-{
- char *buf;
-
- g_return_if_fail (iface != NULL);
-
- /* Remove all IP addresses for a device */
- buf = g_strdup_printf ("/sbin/ip address flush dev %s", iface);
- nm_spawn_process (buf);
- g_free (buf);
-}
-
-/*
- * nm_system_device_setup_static_ip4_config
- *
- * Set up the device with a particular IPv4 address/netmask/gateway.
- *
- * Returns: TRUE on success
- * FALSE on error
- *
- */
-#if 0
-gboolean nm_system_device_setup_static_ip4_config (NMDevice *dev)
-{
-#define IPBITS (sizeof (guint32) * 8)
- struct in_addr temp_addr;
- struct in_addr temp_addr2;
- char *s_tmp;
- char *s_tmp2;
- int i;
- guint32 addr;
- guint32 netmask;
- guint32 prefix = IPBITS; /* initialize with # bits in ipv4 address */
- guint32 broadcast;
- char *buf;
- int err;
- const char *iface;
-
- g_return_val_if_fail (dev != NULL, FALSE);
- g_return_val_if_fail (!nm_device_config_get_use_dhcp (dev), FALSE);
-
- addr = nm_device_config_get_ip4_address (dev);
- netmask = nm_device_config_get_ip4_netmask (dev);
- iface = nm_device_get_iface (dev);
- broadcast = nm_device_config_get_ip4_broadcast (dev);
-
- /* get the prefix from the netmask */
- for (i = 0; i < IPBITS; i++)
- {
- if (!(ntohl (netmask) & ((2 << i) - 1)))
- prefix--;
- }
-
- /* Calculate the broadcast address if the user didn't specify one */
- if (!broadcast)
- broadcast = ((addr & (int)netmask) | ~(int)netmask);
-
- /*
- * Try and work out if someone else has our IP
- * using RFC 2131 Duplicate Address Detection
- */
- temp_addr.s_addr = addr;
- buf = g_strdup_printf ("%s -q -D -c 1 -I %s %s",ARPING,
- iface, inet_ntoa (temp_addr));
- if ((err = nm_spawn_process (buf)))
- {
- nm_warning ("Error: Duplicate address '%s' detected for "
- "device '%s' \n", iface, inet_ntoa (temp_addr));
- goto error;
- }
- g_free (buf);
-
- /* set our IP address */
- temp_addr.s_addr = addr;
- temp_addr2.s_addr = broadcast;
- s_tmp = g_strdup (inet_ntoa (temp_addr));
- s_tmp2 = g_strdup (inet_ntoa (temp_addr2));
- buf = g_strdup_printf ("/sbin/ip addr add %s/%d brd %s dev %s label %s",
- s_tmp, prefix, s_tmp2, iface, iface);
- g_free (s_tmp);
- g_free (s_tmp2);
- if ((err = nm_spawn_process (buf)))
- {
- nm_warning ("Error: could not set network configuration for "
- "device '%s' using command:\n '%s'",
- iface, buf);
- goto error;
- }
- g_free (buf);
-
- /* Alert other computers of our new address */
- temp_addr.s_addr = addr;
- buf = g_strdup_printf ("%s -q -A -c 1 -I %s %s", ARPING,iface,
- inet_ntoa (temp_addr));
- nm_spawn_process (buf);
- g_free (buf);
- g_usleep (G_USEC_PER_SEC * 2);
- buf = g_strdup_printf ("%s -q -U -c 1 -I %s %s", ARPING, iface,
- inet_ntoa (temp_addr));
- nm_spawn_process (buf);
- g_free (buf);
-
- /* set the default route to be this device's gateway */
- temp_addr.s_addr = nm_device_config_get_ip4_gateway (dev);
- buf = g_strdup_printf ("/sbin/ip route replace default via %s dev %s",
- inet_ntoa (temp_addr), iface);
- if ((err = nm_spawn_process (buf)))
- {
- nm_warning ("Error: could not set default route using "
- "command:\n '%s'", buf);
- goto error;
- }
- g_free (buf);
- return (TRUE);
-
-error:
- g_free (buf);
- nm_system_device_flush_addresses (dev);
- nm_system_device_flush_routes (dev);
- return (FALSE);
-}
-#endif
-
-/*
- * nm_system_enable_loopback
- *
- * Bring up the loopback interface
- *
- */
-void nm_system_enable_loopback (void)
-{
- nm_spawn_process ("/sbin/ifup lo");
-}
-
-
-/*
- * nm_system_flush_loopback_routes
- *
- * Flush all routes associated with the loopback device, because it
- * sometimes gets the first route for ZeroConf/Link-Local traffic.
- *
- */
-void nm_system_flush_loopback_routes (void)
-{
- nm_spawn_process ("/sbin/ip route flush dev lo");
-}
-
-
-/*
- * nm_system_delete_default_route
- *
- * Remove the old default route in preparation for a new one
- *
- */
-void nm_system_delete_default_route (void)
-{
- nm_spawn_process ("/sbin/ip route del default");
-}
-
-
-/*
- * nm_system_flush_arp_cache
- *
- * Flush all entries in the arp cache.
- *
- */
-void nm_system_flush_arp_cache (void)
-{
- nm_spawn_process ("/sbin/ip neigh flush all");
-}
-
-
-/*
- * nm_system_kill_all_dhcp_daemons
- *
- * Kill all DHCP daemons currently running, done at startup.
- *
- */
-void nm_system_kill_all_dhcp_daemons (void)
-{
- nm_spawn_process ("/usr/bin/killall -q dhclient");
-}
-
-
-/*
- * nm_system_update_dns
- *
- * Make glibc/nscd aware of any changes to the resolv.conf file by
- * restarting nscd.
- *
- */
-void nm_system_update_dns (void)
-{
- nm_spawn_process ("/usr/sbin/invoke-rc.d nscd restart");
-
-}
-
-
-/*
- * nm_system_load_device_modules
- *
- * This is a null op - all our drivers should already be loaded.
- *
- */
-void nm_system_load_device_modules (void)
-{
- return;
-}
-
-
-/*
- * nm_system_restart_mdns_responder
- *
- * Restart the multicast DNS responder so that it knows about new
- * network interfaces and IP addresses.
- *
- */
-void nm_system_restart_mdns_responder (void)
-{
- nm_spawn_process ("/usr/bin/killall -q -USR1 mDNSResponder");
-}
-
-
-/*
- * nm_system_device_add_ip6_link_address
- *
- * Add a default link-local IPv6 address to a device.
- *
- */
-void nm_system_device_add_ip6_link_address (NMDevice *dev)
-{
- char *buf;
- char *addr;
- struct ether_addr hw_addr;
- unsigned char eui[8];
-
- nm_device_get_hw_address(dev, &hw_addr);
-
- memcpy (eui, &(hw_addr.ether_addr_octet), sizeof (hw_addr.ether_addr_octet));
- memmove(eui+5, eui+3, 3);
- eui[3] = 0xff;
- eui[4] = 0xfe;
- eui[0] ^= 2;
-
- /* Add the default link-local IPv6 address to a device */
- buf = g_strdup_printf ("/sbin/ip -6 address add fe80::%x%02x:%x%02x:%x%02x:%x%02x/64 dev %s",
- eui[0], eui[1], eui[2], eui[3],
- eui[4], eui[5],
- eui[6], eui[7], nm_device_get_iface (dev));
- nm_spawn_process (buf);
- g_free (buf);
-}
-
-typedef struct DebSystemConfigData
-{
- NMIP4Config * config;
- gboolean use_dhcp;
-} DebSystemConfigData;
-
-/*
- * set_ip4_config_from_resolv_conf
- *
- * Add nameservers and search names from a resolv.conf format file.
- *
- */
-static void set_ip4_config_from_resolv_conf (const char *filename, NMIP4Config *ip4_config)
-{
- char * contents = NULL;
- char ** split_contents = NULL;
- int i, len;
-
- g_return_if_fail (filename != NULL);
- g_return_if_fail (ip4_config != NULL);
-
- if (!g_file_get_contents (filename, &contents, NULL, NULL) || (contents == NULL))
- return;
-
- if (!(split_contents = g_strsplit (contents, "\n", 0)))
- goto out;
-
- len = g_strv_length (split_contents);
- for (i = 0; i < len; i++)
- {
- char *line = split_contents[i];
-
- /* Ignore comments */
- if (!line || (line[0] == ';'))
- continue;
-
- line = g_strstrip (line);
- if ((strncmp (line, "search", 6) == 0) && (strlen (line) > 6))
- {
- char *searches = g_strdup (line + 7);
- char **split_searches = NULL;
-
- if (!searches || !strlen (searches))
- continue;
-
- /* Allow space-separated search domains */
- if ((split_searches = g_strsplit (searches, " ", 0)))
- {
- int m, srch_len;
-
- srch_len = g_strv_length (split_searches);
- for (m = 0; m < srch_len; m++)
- {
- if (split_searches[m])
- nm_ip4_config_add_domain (ip4_config, split_searches[m]);
- }
- g_strfreev (split_searches);
- }
- else
- {
- /* Only 1 item, add the whole line */
- nm_ip4_config_add_domain (ip4_config, searches);
- }
-
- g_free (searches);
- }
- else if ((strncmp (line, "nameserver", 10) == 0) && (strlen (line) > 10))
- {
- guint32 addr = (guint32) (inet_addr (line + 11));
-
- if (addr != (guint32) -1)
- nm_ip4_config_add_nameserver (ip4_config, addr);
- }
- }
-
- g_strfreev (split_contents);
-
-out:
- g_free (contents);
-}
-
-
-/*
- * nm_system_device_get_system_config
- *
- * Retrieve any relevant configuration info for a particular device
- * from the system network configuration information. Clear out existing
- * info before setting stuff too.
- *
- */
-void* nm_system_device_get_system_config (NMDevice *dev)
-{
- DebSystemConfigData * sys_data = NULL;
- if_block *curr_device;
- const char *buf;
- gboolean error = FALSE;
-
- g_return_val_if_fail (dev != NULL, NULL);
-
- sys_data = g_malloc0 (sizeof (DebSystemConfigData));
- sys_data->use_dhcp = TRUE;
-
- ifparser_init();
-
- /* Make sure this config file is for this device */
- curr_device = ifparser_getif(nm_device_get_iface (dev));
- if (curr_device == NULL)
- goto out;
-
- buf = ifparser_getkey(curr_device, "inet");
- if (buf)
- {
- if (strcmp (buf, "dhcp")!=0)
- sys_data->use_dhcp = FALSE;
- }
-
- buf = ifparser_getkey (curr_device, "address");
- if (buf)
- nm_ip4_config_set_address (sys_data->config, inet_addr (buf));
-
- buf = ifparser_getkey (curr_device, "gateway");
- if (buf)
- nm_ip4_config_set_gateway (sys_data->config, inet_addr (buf));
-
- buf = ifparser_getkey (curr_device, "netmask");
- if (buf)
- nm_ip4_config_set_netmask (sys_data->config, inet_addr (buf));
- else
- {
- guint32 addr = nm_ip4_config_get_address (sys_data->config);
-
- /* Make a default netmask if we have an IP address */
- if (((ntohl (addr) & 0xFF000000) >> 24) <= 127)
- nm_ip4_config_set_netmask (sys_data->config, htonl (0xFF000000));
- else if (((ntohl (addr) & 0xFF000000) >> 24) <= 191)
- nm_ip4_config_set_netmask (sys_data->config, htonl (0xFFFF0000));
- else
- nm_ip4_config_set_netmask (sys_data->config, htonl (0xFFFFFF00));
- }
-
- buf = ifparser_getkey (curr_device, "broadcast");
- if (buf)
- nm_ip4_config_set_broadcast (sys_data->config, inet_addr (buf));
- else
- {
- guint32 broadcast = ((nm_ip4_config_get_address (sys_data->config) & nm_ip4_config_get_netmask (sys_data->config))
- | ~nm_ip4_config_get_netmask (sys_data->config));
- nm_ip4_config_set_broadcast (sys_data->config, broadcast);
- }
-
- if (!sys_data->use_dhcp)
- set_ip4_config_from_resolv_conf (SYSCONFDIR"/resolv.conf", sys_data->config);
-
-#if 0
- nm_debug ("------ Config (%s)", nm_device_get_iface (dev));
- nm_debug (" DHCP=%d\n", use_dhcp);
- nm_debug (" ADDR=%d\n", ip4_address);
- nm_debug (" GW=%d\n", ip4_gateway);
- nm_debug (" NM=%d\n", ip4_netmask);
- nm_debug ("---------------------\n");
-#endif
-
-out:
- ifparser_destroy();
- if (error)
- {
- sys_data->use_dhcp = TRUE;
- /* Clear out the config */
- nm_ip4_config_unref (sys_data->config);
- sys_data->config = NULL;
- }
-
- return (void *)sys_data;
-}
-
-/*
- * nm_system_device_free_system_config
- *
- * Free stored system config data
- *
- */
-void nm_system_device_free_system_config (NMDevice *dev, void *system_config_data)
-{
- DebSystemConfigData *sys_data = (DebSystemConfigData *)system_config_data;
-
- g_return_if_fail (dev != NULL);
-
- if (!sys_data)
- return;
-
- if (sys_data->config)
- nm_ip4_config_unref (sys_data->config);
-}
-
-
-/*
- * nm_system_device_get_use_dhcp
- *
- * Return whether the distro-specific system config tells us to use
- * dhcp for this device.
- *
- */
-gboolean nm_system_device_get_use_dhcp (NMDevice *dev)
-{
- DebSystemConfigData *sys_data;
-
- g_return_val_if_fail (dev != NULL, TRUE);
-
- if ((sys_data = nm_device_get_system_config_data (dev)))
- return sys_data->use_dhcp;
-
- return TRUE;
-}
-
-
-NMIP4Config *nm_system_device_new_ip4_system_config (NMDevice *dev)
-{
- DebSystemConfigData *sys_data;
- NMIP4Config *new_config = NULL;
-
- g_return_val_if_fail (dev != NULL, NULL);
-
- if ((sys_data = nm_device_get_system_config_data (dev)))
- new_config = nm_ip4_config_copy (sys_data->config);
-
- return new_config;
-}
-
-void nm_system_deactivate_all_dialup (GSList *list)
-{
- GSList *elt;
-
- for (elt = list; elt; elt = g_slist_next (elt))
- {
- NMDialUpConfig *config = (NMDialUpConfig *) elt->data;
- char *cmd;
-
- cmd = g_strdup_printf ("/sbin/ifdown %s", (char *) config->data);
- nm_spawn_process (cmd);
- g_free (cmd);
- }
-}
-
-gboolean nm_system_activate_dialup (GSList *list, const char *dialup)
-{
- GSList *elt;
- gboolean ret = FALSE;
-
- for (elt = list; elt; elt = g_slist_next (elt))
- {
- NMDialUpConfig *config = (NMDialUpConfig *) elt->data;
- if (strcmp (dialup, config->name) == 0)
- {
- char *cmd;
-
- nm_info ("Activating dialup device %s (%s) ...", dialup, (char *) config->data);
- cmd = g_strdup_printf ("/sbin/ifup %s", (char *) config->data);
- nm_spawn_process (cmd);
- g_free (cmd);
- ret = TRUE;
- break;
- }
- }
-
- return ret;
-}
-
-GSList * nm_system_get_dialup_config (void)
-{
- const char *buf;
- if_block *curr_device;
- gboolean error = FALSE;
- GError *err;
- unsigned int i = 0;
- size_t len;
- GSList *list = NULL;
- if_block *curr;
- ifparser_init();
-
- /* FIXME: get all ppp(and others?) lines from /e/n/i here */
- curr = ifparser_getfirst();
- while(curr!=NULL)
- {
- NMDialUpConfig *config;
- if (strcmp(curr->type,"iface")==0)
- {
- buf = ifparser_getkey(curr,"inet");
- if (buf && strcmp (buf, "ppp")==0)
- {
- config = g_malloc (sizeof (NMDialUpConfig));
- config->name = g_strdup_printf ("Modem (#%d)", i++);
- config->data = g_strdup (curr->name); /* interface name */
-
- list = g_slist_append (list, config);
-
- nm_info ("Found dial up configuration for %s: %s", config->name, (char *) config->data);
- }
- }
- curr = curr->next;
- }
- ifparser_destroy();
-
- /* Hack: Go back and remove the "(#0)" if there is only one device */
- if (i == 1)
- {
- NMDialUpConfig *config = (NMDialUpConfig *) list->data;
- g_free (config->name);
- config->name = g_strdup ("Modem");
- }
-
- return list;
-}
diff --git a/src/backends/NetworkManagerGentoo.c b/src/backends/NetworkManagerGentoo.c
deleted file mode 100644
index fda6cb869a..0000000000
--- a/src/backends/NetworkManagerGentoo.c
+++ /dev/null
@@ -1,537 +0,0 @@
-/* NetworkManager -- Network link manager
- *
- * Dan Williams <dcbw@redhat.com>
- * Dan Willemsen <dan@willemsen.us>
- * Robert Paskowitz
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- *
- * (C) Copyright 2004 Red Hat, Inc.
- * (C) Copyright 2004 Dan Willemsen
- * (C) Copyright 2004 Robert Paskowitz
- */
-
-#include <stdio.h>
-#include <sys/types.h>
-#include <signal.h>
-
-#include <arpa/inet.h>
-#include "NetworkManagerSystem.h"
-#include "NetworkManagerUtils.h"
-#include "NetworkManagerDevice.h"
-#include "nm-utils.h"
-#include "shvar.h"
-
-/*
- * nm_system_init
- *
- * Initializes the distribution-specific system backend
- *
- */
-void nm_system_init (void)
-{
- /* Kill any dhclients lying around */
- nm_system_kill_all_dhcp_daemons ();
-}
-
-/*
- * nm_system_device_flush_routes
- *
- * Flush all routes associated with a network device
- *
- */
-void nm_system_device_flush_routes (NMDevice *dev)
-{
- g_return_if_fail (dev != NULL);
-
- /* Not really applicable for test devices */
- if (nm_device_is_test_device (dev))
- return;
-
- nm_system_device_flush_routes_with_iface (nm_device_get_iface (dev));
-}
-
-/*
- * nm_system_device_flush_routes_with_iface
- *
- * Flush all routes associated with a network device
- *
- */
-void nm_system_device_flush_routes_with_iface (const char *iface)
-{
- char *buf;
-
- g_return_if_fail (iface != NULL);
-
- /* Remove routing table entries */
- buf = g_strdup_printf ("/sbin/ip route flush dev %s", iface);
- nm_spawn_process (buf);
- g_free (buf);
-}
-
-/*
- * nm_system_device_has_active_routes
- *
- * Find out whether the specified device has any routes in the routing
- * table.
- *
- */
-gboolean nm_system_device_has_active_routes (NMDevice *dev)
-{
- return (FALSE);
-}
-
-
-/*
- * nm_system_device_flush_addresses
- *
- * Flush all network addresses associated with a network device
- *
- */
-void nm_system_device_flush_addresses (NMDevice *dev)
-{
- g_return_if_fail (dev != NULL);
-
- /* Not really applicable for test devices */
- if (nm_device_is_test_device (dev))
- return;
-
- nm_system_device_flush_addresses_with_iface (nm_device_get_iface (dev));
-}
-
-/*
- * nm_system_device_flush_addresses_with_iface
- *
- * Flush all network addresses associated with a network device
- *
- */
-void nm_system_device_flush_addresses_with_iface (const char *iface)
-{
- char *buf;
-
- g_return_if_fail (iface != NULL);
-
- /* Remove all IP addresses for a device */
- buf = g_strdup_printf ("/sbin/ip address flush dev %s", iface);
- nm_spawn_process (buf);
- g_free (buf);
-}
-
-#if 0
- /* Alert other computers of our new address */
- temp_addr.s_addr = addr;
- buf = g_strdup_printf ("/sbin/arping -q -A -c 1 -I %s %s", iface, inet_ntoa (temp_addr));
- nm_spawn_process (buf);
- g_free (buf);
- g_usleep (G_USEC_PER_SEC * 2);
- buf = g_strdup_printf ("/sbin/arping -q -U -c 1 -I %s %s", iface, inet_ntoa (temp_addr));
- nm_spawn_process (buf);
- g_free (buf);
-#endif
-
-/*
- * nm_system_device_add_route_via_device_with_iface
- *
- * Add route to the given device
- *
- */
-void nm_system_device_add_route_via_device_with_iface (const char *iface, const char *route)
-{
- char *buf;
-
- g_return_if_fail (iface != NULL);
-
- /* Add default gateway */
- buf = g_strdup_printf ("/sbin/ip route add %s dev %s", route, iface);
- nm_spawn_process (buf);
- g_free (buf);
-}
-
-
-/*
- * nm_system_enable_loopback
- *
- * Bring up the loopback interface
- *
- */
-void nm_system_enable_loopback (void)
-{
- nm_spawn_process("/etc/init.d/net.lo start");
-}
-
-
-/*
- * nm_system_flush_loopback_routes
- *
- * Flush all routes associated with the loopback device, because it
- * sometimes gets the first route for ZeroConf/Link-Local traffic.
- *
- */
-void nm_system_flush_loopback_routes (void)
-{
- /* Remove routing table entries for lo */
- nm_spawn_process ("/sbin/ip route flush dev lo");
-}
-
-/*
- * nm_system_delete_default_route
- *
- * Remove the old default route in preparation for a new one
- *
- */
-void nm_system_delete_default_route (void)
-{
- nm_spawn_process ("/sbin/ip route del default");
-}
-
-/*
- * nm_system_flush_arp_cache
- *
- * Flush all entries in the arp cache.
- *
- */
-void nm_system_flush_arp_cache (void)
-{
- nm_spawn_process ("/sbin/ip neigh flush all");
-}
-
-
-
-/*
- * nm_system_kill_all_dhcp_daemons
- *
- * Kill all DHCP daemons currently running, done at startup
- *
- */
-void nm_system_kill_all_dhcp_daemons (void)
-{
-}
-
-/*
- * nm_system_update_dns
- *
- * Make glibc/nscd aware of any changes to the resolv.conf file by
- * restarting nscd. Only restart if already running.
- *
- */
-void nm_system_update_dns (void)
-{
- #ifdef NM_NO_NAMED
- if (nm_spawn_process ("/etc/init.d/nscd status") == 0)
- nm_spawn_process ("/etc/init.d/nscd restart");
- #else
- nm_spawn_process("/usr/sbin/killall -q nscd");
- #endif
-}
-
-/*
- * nm_system_load_device_modules
- *
- * Loads any network adapter kernel modules, these should already be loaded
- * by /etc/modules.autoload.d/kernel-2.x
- *
- * Gentoo should have all modules loaded.
- */
-void nm_system_load_device_modules (void)
-{
-}
-
-
-
-/*
- * nm_system_restart_mdns_responder
- *
- * Restart the multicast DNS responder so that it knows about new
- * network interfaces and IP addresses.
- *
- */
-void nm_system_restart_mdns_responder (void)
-{
- nm_spawn_process("/etc/init.d/mDNSResponder stop");
- nm_spawn_process("/etc/init.d/mDNSResponder zap");
- nm_spawn_process("/etc/init.d/mDNSResponder start");
-}
-
-
-/*
- * nm_system_device_add_ip6_link_address
- *
- * Add a default link-local IPv6 address to a device.
- *
- */
-void nm_system_device_add_ip6_link_address (NMDevice *dev)
-{
- char *buf;
- char *addr;
- struct ether_addr hw_addr;
- unsigned char eui[8];
-
- nm_device_get_hw_address(dev, &hw_addr);
-
- memcpy (eui, &(hw_addr.ether_addr_octet), sizeof (hw_addr.ether_addr_octet));
- memmove (eui+5, eui+3, 3);
- eui[3] = 0xff;
- eui[4] = 0xfe;
- eui[0] ^= 2;
-
- /* Add the default link-local IPv6 address to a device */
- buf = g_strdup_printf("/sbin/ip -6 address add fe80::%x%02x:%x%02x:%x%02x:%x%02x/64 dev %s",
- eui[0], eui[1], eui[2], eui[3], eui[4], eui[5],
- eui[6], eui[7], nm_device_get_iface(dev));
- nm_spawn_process(buf);
- g_free(buf);
-}
-
-typedef struct GentooSystemConfigData
-{
- NMIP4Config * config;
- gboolean use_dhcp;
-} GentooSystemConfigData;
-
-
-/*
- * nm_system_device_get_system_config
- *
- * Retrieve any relevant configuration info for a particular device
- * from the system network configuration information. Clear out existing
- * info before setting stuff too.
- *
- */
-void *nm_system_device_get_system_config (NMDevice *dev)
-{
- char *cfg_file_path = NULL;
- FILE *file = NULL;
- char buffer[100];
- char confline[100], dhcpline[100], ipline[100];
- int ipa, ipb, ipc, ipd;
- int nNext = 0, bNext = 0, count = 0;
- char *confToken;
- gboolean data_good = FALSE;
- gboolean use_dhcp = TRUE;
- GentooSystemConfigData *sys_data = NULL;
- guint32 ip4_address = 0;
- guint32 ip4_netmask = 0;
- guint32 ip4_gateway = 0;
- guint32 ip4_broadcast = 0;
-
- g_return_val_if_fail (dev != NULL, NULL);
-
- sys_data = g_malloc0 (sizeof (GentooSystemConfigData));
- sys_data->config = nm_device_get_ip4_config(dev);
- /* We use DHCP on an interface unless told not to */
- sys_data->use_dhcp = TRUE;
- nm_device_set_use_dhcp (dev, TRUE);
-// nm_ip4_config_set_address (sys_data->config, 0);
-// nm_ip4_config_set_gateway (sys_data->config, 0);
-// nm_ip4_config_set_netmask (sys_data->config, 0);
-
- /* Gentoo systems store this information in
- * /etc/conf.d/net, this is for all interfaces.
- */
-
- cfg_file_path = g_strdup_printf ("/etc/conf.d/net");
- if (!cfg_file_path)
- return NULL;
-
- if (!(file = fopen (cfg_file_path, "r")))
- {
- g_free (cfg_file_path);
- return NULL;
- }
- sprintf(confline, "iface_%s", nm_device_get_iface (dev));
- sprintf(dhcpline, "iface_%s=\"dhcp\"", nm_device_get_iface (dev));
- while (fgets (buffer, 499, file) && !feof (file))
- {
- /* Kock off newline if any */
- g_strstrip (buffer);
-
- if (strncmp (buffer, confline, strlen(confline)) == 0)
- {
- /* Make sure this config file is for this device */
- if (strncmp (&buffer[strlen(confline) - strlen(nm_device_get_iface (dev))],
- nm_device_get_iface (dev), strlen(nm_device_get_iface (dev))) != 0)
- {
- nm_warning ("System config file '%s' does not define device '%s'\n",
- cfg_file_path, nm_device_get_iface (dev));
- break;
- }
- else
- data_good = TRUE;
-
- if (strncmp (buffer, dhcpline, strlen(dhcpline)) == 0)
- {
- use_dhcp = TRUE;
- }
- else
- {
- use_dhcp = FALSE;
- confToken = strtok(&buffer[strlen(confline) + 2], " ");
- while (count < 3)
- {
- if (nNext == 1 && bNext == 1)
- {
- ip4_address = inet_addr (confToken);
- count++;
- continue;
- }
- if (strcmp(confToken, "netmask") == 0)
- {
- confToken = strtok(NULL, " ");
- ip4_netmask = inet_addr (confToken);
- count++;
- nNext = 1;
- }
- else if (strcmp(confToken, "broadcast") == 0)
- {
- confToken = strtok(NULL, " ");
- count++;
- bNext = 1;
- }
- else
- {
- ip4_address = inet_addr (confToken);
- count++;
- }
- confToken = strtok(NULL, " ");
- }
- }
- }
- /* If we aren't using dhcp, then try to get the gateway */
- if (!use_dhcp)
- {
- sprintf(ipline, "gateway=\"%s/", nm_device_get_iface (dev));
- if (strncmp(buffer, ipline, strlen(ipline) - 1) == 0)
- {
- sprintf(ipline, "gateway=\"%s/%%d.%%d.%%d.%%d\"", nm_device_get_iface (dev) );
- sscanf(buffer, ipline, &ipa, &ipb, &ipc, &ipd);
- sprintf(ipline, "%d.%d.%d.%d", ipa, ipb, ipc, ipd);
- ip4_gateway = inet_addr (ipline);
- }
- }
- }
- fclose (file);
- g_free (cfg_file_path);
-
- /* If successful, set values on the device */
- if (data_good)
- {
- nm_warning("data good :-)");
- nm_device_set_use_dhcp (dev, use_dhcp);
- if (ip4_address)
- nm_ip4_config_set_address (sys_data->config, ip4_address);
- if (ip4_gateway)
- nm_ip4_config_set_gateway (sys_data->config, ip4_gateway);
- if (ip4_netmask)
- nm_ip4_config_set_netmask (sys_data->config, ip4_netmask);
- if (ip4_broadcast)
- nm_ip4_config_set_broadcast (sys_data->config, ip4_broadcast);
- }
- return (void *)sys_data;
-}
-
-/*
- * nm_system_device_add_default_route_via_device
- *
- * Flush all routes associated with a network device
- *
- */
-void nm_system_device_add_default_route_via_device (NMDevice *dev)
-{
- g_return_if_fail (dev != NULL);
-
- /* Not really applicable for test devices */
- if (nm_device_is_test_device (dev))
- return;
-
- nm_system_device_add_default_route_via_device_with_iface (nm_device_get_iface (dev));
-}
-
-/*
- * nm_system_device_add_default_route_via_device_with_iface
- *
- * Add default route to the given device
- *
- */
-void nm_system_device_add_default_route_via_device_with_iface (const char *iface)
-{
- char *buf;
-
- g_return_if_fail (iface != NULL);
-
- /* Add default gateway */
- buf = g_strdup_printf ("/sbin/ip route add default dev %s", iface);
- nm_spawn_process (buf);
- g_free (buf);
-}
-
-void nm_system_device_free_system_config (NMDevice *dev, void *system_config_data)
-{
- GentooSystemConfigData *sys_data = (GentooSystemConfigData *)system_config_data;
-
- g_return_if_fail (dev != NULL);
-
- if (!sys_data)
- return;
-
- if (sys_data->config)
- nm_ip4_config_unref (sys_data->config);
-
-}
-
-NMIP4Config *nm_system_device_new_ip4_system_config (NMDevice *dev)
-{
- GentooSystemConfigData *sys_data;
- NMIP4Config *new_config = NULL;
-
- g_return_val_if_fail (dev != NULL, NULL);
-
- if ((sys_data = nm_device_get_system_config_data (dev)))
- new_config = nm_ip4_config_copy (sys_data->config);
-
- return new_config;
-}
-
-gboolean nm_system_device_get_use_dhcp (NMDevice *dev)
-{
- GentooSystemConfigData *sys_data;
-
- g_return_val_if_fail (dev != NULL, TRUE);
-
- if ((sys_data = nm_device_get_system_config_data (dev)))
- return sys_data->use_dhcp;
-
- return TRUE;
-}
-
-void nm_system_deactivate_all_dialup (GSList *list)
-{
-}
-
-gboolean nm_system_activate_dialup (GSList *list, const char *dialup)
-{
- return FALSE;
-}
-
-/*
- * nm_system_get_dialup_config
- *
- * Enumerate dial up options on this system, allocate NMDialUpConfig's,
- * fill them out, and return.
- *
- */
-GSList * nm_system_get_dialup_config (void)
-{
- return NULL;
-}
diff --git a/src/backends/NetworkManagerRedHat.c b/src/backends/NetworkManagerRedHat.c
deleted file mode 100644
index ac8311efe1..0000000000
--- a/src/backends/NetworkManagerRedHat.c
+++ /dev/null
@@ -1,674 +0,0 @@
-/* NetworkManager -- Network link manager
- *
- * Dan Williams <dcbw@redhat.com>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- *
- * (C) Copyright 2004 Red Hat, Inc.
- */
-
-#include <stdio.h>
-#include <sys/types.h>
-#include <signal.h>
-#include <arpa/inet.h>
-#include "NetworkManagerSystem.h"
-#include "NetworkManagerUtils.h"
-#include "NetworkManagerDevice.h"
-#include "nm-utils.h"
-#include "shvar.h"
-
-/*
- * nm_system_init
- *
- * Initializes the distribution-specific system backend
- *
- */
-void nm_system_init (void)
-{
- /* Kill any dhclients lying around */
- nm_system_kill_all_dhcp_daemons ();
-}
-
-
-/*
- * nm_system_device_flush_routes
- *
- * Flush all routes associated with a network device
- *
- */
-void nm_system_device_flush_routes (NMDevice *dev)
-{
- g_return_if_fail (dev != NULL);
-
- /* Not really applicable for test devices */
- if (nm_device_is_test_device (dev))
- return;
-
- nm_system_device_flush_routes_with_iface (nm_device_get_iface (dev));
-}
-
-
-/*
- * nm_system_device_flush_routes_with_iface
- *
- * Flush all routes associated with a network device
- *
- */
-void nm_system_device_flush_routes_with_iface (const char *iface)
-{
- char *buf;
-
- g_return_if_fail (iface != NULL);
-
- /* Remove routing table entries */
- buf = g_strdup_printf ("/sbin/ip route flush dev %s", iface);
- nm_spawn_process (buf);
- g_free (buf);
-}
-
-
-/*
- * nm_system_device_add_default_route_via_device
- *
- * Add default route to the given device
- *
- */
-void nm_system_device_add_default_route_via_device (NMDevice *dev)
-{
- g_return_if_fail (dev != NULL);
-
- /* Not really applicable for test devices */
- if (nm_device_is_test_device (dev))
- return;
-
- nm_system_device_add_default_route_via_device_with_iface (nm_device_get_iface (dev));
-}
-
-
-/*
- * nm_system_device_add_default_route_via_device_with_iface
- *
- * Add default route to the given device
- *
- */
-void nm_system_device_add_default_route_via_device_with_iface (const char *iface)
-{
- char *buf;
-
- g_return_if_fail (iface != NULL);
-
- /* Add default gateway */
- buf = g_strdup_printf ("/sbin/ip route add default dev %s", iface);
- nm_spawn_process (buf);
- g_free (buf);
-}
-
-
-/*
- * nm_system_device_add_route_via_device_with_iface
- *
- * Add route to the given device
- *
- */
-void nm_system_device_add_route_via_device_with_iface (const char *iface, const char *route)
-{
- char *buf;
-
- g_return_if_fail (iface != NULL);
-
- /* Add default gateway */
- buf = g_strdup_printf ("/sbin/ip route add %s dev %s", route, iface);
- nm_spawn_process (buf);
- g_free (buf);
-}
-
-
-/*
- * nm_system_device_has_active_routes
- *
- * Find out whether the specified device has any routes in the routing
- * table.
- *
- */
-gboolean nm_system_device_has_active_routes (NMDevice *dev)
-{
- return (FALSE);
-}
-
-
-/*
- * nm_system_device_flush_addresses
- *
- * Flush all network addresses associated with a network device
- *
- */
-void nm_system_device_flush_addresses (NMDevice *dev)
-{
- g_return_if_fail (dev != NULL);
-
- /* Not really applicable for test devices */
- if (nm_device_is_test_device (dev))
- return;
-
- nm_system_device_flush_addresses_with_iface (nm_device_get_iface (dev));
-}
-
-
-/*
- * nm_system_device_flush_addresses_with_iface
- *
- * Flush all network addresses associated with a network device
- *
- */
-void nm_system_device_flush_addresses_with_iface (const char *iface)
-{
- char *buf;
-
- g_return_if_fail (iface != NULL);
-
- /* Remove all IP addresses for a device */
- buf = g_strdup_printf ("/sbin/ip address flush dev %s", iface);
- nm_spawn_process (buf);
- g_free (buf);
-}
-
-
-#if 0
- /* Alert other computers of our new address */
- temp_addr.s_addr = addr;
- buf = g_strdup_printf ("/sbin/arping -q -A -c 1 -I %s %s", iface, inet_ntoa (temp_addr));
- nm_spawn_process (buf);
- g_free (buf);
- g_usleep (G_USEC_PER_SEC * 2);
- buf = g_strdup_printf ("/sbin/arping -q -U -c 1 -I %s %s", iface, inet_ntoa (temp_addr));
- nm_spawn_process (buf);
- g_free (buf);
-#endif
-
-
-/*
- * nm_system_enable_loopback
- *
- * Bring up the loopback interface
- *
- */
-void nm_system_enable_loopback (void)
-{
- nm_spawn_process ("/sbin/ip link set dev lo up");
- nm_spawn_process ("/sbin/ip addr add 127.0.0.1/8 brd 127.255.255.255 dev lo scope host label loopback");
-}
-
-
-/*
- * nm_system_flush_loopback_routes
- *
- * Flush all routes associated with the loopback device, because it
- * sometimes gets the first route for ZeroConf/Link-Local traffic.
- *
- */
-void nm_system_flush_loopback_routes (void)
-{
- /* Remove routing table entries for lo */
- nm_spawn_process ("/sbin/ip route flush dev lo");
-}
-
-
-/*
- * nm_system_delete_default_route
- *
- * Remove the old default route in preparation for a new one
- *
- */
-void nm_system_delete_default_route (void)
-{
- nm_spawn_process ("/sbin/ip route del default");
-}
-
-
-/*
- * nm_system_flush_arp_cache
- *
- * Flush all entries in the arp cache.
- *
- */
-void nm_system_flush_arp_cache (void)
-{
- nm_spawn_process ("/sbin/ip neigh flush all");
-}
-
-
-/*
- * nm_system_kill_all_dhcp_daemons
- *
- * Kill all DHCP daemons currently running, done at startup.
- *
- */
-void nm_system_kill_all_dhcp_daemons (void)
-{
-}
-
-
-/*
- * nm_system_update_dns
- *
- * Invalidate the nscd host cache, if it exists, since
- * we changed resolv.conf.
- *
- */
-void nm_system_update_dns (void)
-{
-#ifdef NM_NO_NAMED
- if (nm_spawn_process ("/etc/init.d/nscd status") != 0)
- nm_spawn_process ("/etc/init.d/nscd restart");
-
- nm_info ("Clearing nscd hosts cache.");
- nm_spawn_process ("/usr/sbin/nscd -i hosts");
-#else
- nm_spawn_process ("/usr/bin/killall -q nscd");
-#endif
-}
-
-
-/*
- * nm_system_load_device_modules
- *
- * Load any network adapter kernel modules that we need to, since Fedora doesn't
- * autoload them at this time.
- *
- */
-void nm_system_load_device_modules (void)
-{
- nm_spawn_process ("/usr/bin/NMLoadModules");
-}
-
-
-/*
- * nm_system_restart_mdns_responder
- *
- * Restart the multicast DNS responder so that it knows about new
- * network interfaces and IP addresses.
- *
- */
-void nm_system_restart_mdns_responder (void)
-{
- FILE *fp = NULL;
-
- if ((fp = fopen ("/var/run/mDNSResponder.pid", "rt")))
- {
- int pid;
- int res = fscanf (fp, "%d", &pid);
- fclose (fp);
- if (res == 1)
- {
- nm_info ("Restarting mDNSResponder.");
- kill (pid, SIGUSR1);
- }
- }
-}
-
-
-/*
- * nm_system_device_add_ip6_link_address
- *
- * Add a default link-local IPv6 address to a device.
- *
- */
-void nm_system_device_add_ip6_link_address (NMDevice *dev)
-{
- char *buf;
- char *addr;
- struct ether_addr hw_addr;
- unsigned char eui[8];
-
- nm_device_get_hw_address(dev, &hw_addr);
-
- memcpy (eui, &(hw_addr.ether_addr_octet), sizeof (hw_addr.ether_addr_octet));
- memmove (eui+5, eui+3, 3);
- eui[3] = 0xff;
- eui[4] = 0xfe;
- eui[0] ^= 2;
-
- /* Add the default link-local IPv6 address to a device */
- buf = g_strdup_printf ("/sbin/ip -6 address add fe80::%x%02x:%x%02x:%x%02x:%x%02x/64 dev %s",
- eui[0], eui[1], eui[2], eui[3], eui[4], eui[5],
- eui[6], eui[7], nm_device_get_iface (dev));
- nm_spawn_process (buf);
- g_free (buf);
-}
-
-
-typedef struct RHSystemConfigData
-{
- NMIP4Config * config;
- gboolean use_dhcp;
-} RHSystemConfigData;
-
-
-/*
- * get_current_profile_name
- *
- * Retrieve the current network profile, if any
- *
- */
-static char *get_current_profile_name (void)
-{
- shvarFile * file;
- char * buf;
-
- if (!(file = svNewFile (SYSCONFDIR"/sysconfig/network")))
- return NULL;
-
- buf = svGetValue (file, "CURRENT_PROFILE");
- if (!buf)
- buf = strdup ("default");
- svCloseFile (file);
-
- return buf;
-}
-
-
-/*
- * set_ip4_config_from_resolv_conf
- *
- * Add nameservers and search names from a resolv.conf format file.
- *
- */
-static void set_ip4_config_from_resolv_conf (const char *filename, NMIP4Config *ip4_config)
-{
- char * contents = NULL;
- char ** split_contents = NULL;
- int i, len;
-
- g_return_if_fail (filename != NULL);
- g_return_if_fail (ip4_config != NULL);
-
- if (!g_file_get_contents (filename, &contents, NULL, NULL) || (contents == NULL))
- return;
-
- if (!(split_contents = g_strsplit (contents, "\n", 0)))
- goto out;
-
- len = g_strv_length (split_contents);
- for (i = 0; i < len; i++)
- {
- char *line = split_contents[i];
-
- /* Ignore comments */
- if (!line || (line[0] == ';'))
- continue;
-
- line = g_strstrip (line);
- if ((strncmp (line, "search", 6) == 0) && (strlen (line) > 6))
- {
- char *searches = g_strdup (line + 7);
- char **split_searches = NULL;
-
- if (!searches || !strlen (searches))
- continue;
-
- /* Allow space-separated search domains */
- if ((split_searches = g_strsplit (searches, " ", 0)))
- {
- int m, srch_len;
-
- srch_len = g_strv_length (split_searches);
- for (m = 0; m < srch_len; m++)
- {
- if (split_searches[m])
- nm_ip4_config_add_domain (ip4_config, split_searches[m]);
- }
- g_strfreev (split_searches);
- }
- else
- {
- /* Only 1 item, add the whole line */
- nm_ip4_config_add_domain (ip4_config, searches);
- }
-
- g_free (searches);
- }
- else if ((strncmp (line, "nameserver", 10) == 0) && (strlen (line) > 10))
- {
- guint32 addr = (guint32) (inet_addr (line + 11));
-
- if (addr != (guint32) -1)
- nm_ip4_config_add_nameserver (ip4_config, addr);
- }
- }
-
- g_strfreev (split_contents);
-
-out:
- g_free (contents);
-}
-
-
-/*
- * nm_system_device_get_system_config
- *
- * Read in the config file for a device.
- *
- */
-void *nm_system_device_get_system_config (NMDevice *dev)
-{
- char * cfg_file_path = NULL;
- shvarFile * file;
- char * buf = NULL;
- RHSystemConfigData * sys_data = NULL;
- gboolean error = FALSE;
-
- g_return_val_if_fail (dev != NULL, NULL);
-
- /* Red Hat/Fedora Core systems store this information in
- * /etc/sysconfig/network-scripts/ifcfg-* where * is the interface
- * name.
- */
-
- sys_data = g_malloc0 (sizeof (RHSystemConfigData));
- sys_data->use_dhcp = TRUE;
-
- cfg_file_path = g_strdup_printf (SYSCONFDIR"/sysconfig/network-scripts/ifcfg-%s", nm_device_get_iface (dev));
- if (!cfg_file_path)
- return sys_data;
-
- if (!(file = svNewFile (cfg_file_path)))
- {
- g_free (cfg_file_path);
- return sys_data;
- }
- g_free (cfg_file_path);
-
- /* Make sure this config file is for this device */
- buf = svGetValue (file, "DEVICE");
- if (!buf || strcmp (buf, nm_device_get_iface (dev)))
- {
- free (buf);
- goto out;
- }
-
- if ((buf = svGetValue (file, "BOOTPROTO")))
- {
- if (strcasecmp (buf, "dhcp"))
- sys_data->use_dhcp = FALSE;
- free (buf);
- }
-
- sys_data->config = nm_ip4_config_new ();
-
- if (!(sys_data->use_dhcp))
- {
- if ((buf = svGetValue (file, "IPADDR")))
- {
- nm_ip4_config_set_address (sys_data->config, inet_addr (buf));
- free (buf);
- }
- else
- {
- nm_warning ("Network configuration for device '%s' was invalid (non-DHCP configuration, "
- "but no IP address specified. Will use DHCP instead.", nm_device_get_iface (dev));
- error = TRUE;
- goto out;
- }
-
- if ((buf = svGetValue (file, "GATEWAY")))
- {
- nm_ip4_config_set_gateway (sys_data->config, inet_addr (buf));
- free (buf);
- }
- else
- {
- nm_warning ("Network configuration for device '%s' was invalid (non-DHCP configuration, "
- "but no gateway specified. Will use DHCP instead.", nm_device_get_iface (dev));
- error = TRUE;
- goto out;
- }
-
- if ((buf = svGetValue (file, "NETMASK")))
- {
- nm_ip4_config_set_netmask (sys_data->config, inet_addr (buf));
- free (buf);
- }
- else
- {
- guint32 addr = nm_ip4_config_get_address (sys_data->config);
-
- /* Make a default netmask if we have an IP address */
- if (((ntohl (addr) & 0xFF000000) >> 24) <= 127)
- nm_ip4_config_set_netmask (sys_data->config, htonl (0xFF000000));
- else if (((ntohl (addr) & 0xFF000000) >> 24) <= 191)
- nm_ip4_config_set_netmask (sys_data->config, htonl (0xFFFF0000));
- else
- nm_ip4_config_set_netmask (sys_data->config, htonl (0xFFFFFF00));
- }
-
- if ((buf = svGetValue (file, "BROADCAST")))
- {
- nm_ip4_config_set_broadcast (sys_data->config, inet_addr (buf));
- free (buf);
- }
- else
- {
- guint32 broadcast = ((nm_ip4_config_get_address (sys_data->config) & nm_ip4_config_get_netmask (sys_data->config))
- | ~nm_ip4_config_get_netmask (sys_data->config));
- nm_ip4_config_set_broadcast (sys_data->config, broadcast);
- }
- }
-
- /* If we're using Static IP, grab DNS servers from the profile's config file */
- if (!sys_data->use_dhcp)
- {
- char * cur_profile_name = get_current_profile_name ();
-
- if (cur_profile_name)
- {
- char *filename = g_strdup_printf (SYSCONFDIR"/sysconfig/networking/profiles/%s/resolv.conf", cur_profile_name);
-
- set_ip4_config_from_resolv_conf (filename, sys_data->config);
- g_free (filename);
- g_free (cur_profile_name);
- }
- }
-
-#if 0
- nm_debug ("------ Config (%s)", nm_device_get_iface (dev));
- nm_debug (" DHCP=%d\n", sys_data->use_dhcp);
- nm_debug (" ADDR=%d\n", nm_ip4_config_get_address (sys_data->config));
- nm_debug (" GW=%d\n", nm_ip4_config_get_gateway (sys_data->config));
- nm_debug (" NM=%d\n", nm_ip4_config_get_netmask (sys_data->config));
- nm_debug ("---------------------\n");
-#endif
-
-out:
- svCloseFile (file);
-
- if (error)
- {
- sys_data->use_dhcp = TRUE;
- /* Clear out the config */
- nm_ip4_config_unref (sys_data->config);
- sys_data->config = NULL;
- }
-
- return (void *)sys_data;
-}
-
-
-/*
- * nm_system_device_free_system_config
- *
- * Free stored system config data
- *
- */
-void nm_system_device_free_system_config (NMDevice *dev, void *system_config_data)
-{
- RHSystemConfigData *sys_data = (RHSystemConfigData *)system_config_data;
-
- g_return_if_fail (dev != NULL);
-
- if (!sys_data)
- return;
-
- if (sys_data->config)
- nm_ip4_config_unref (sys_data->config);
-}
-
-
-/*
- * nm_system_device_get_use_dhcp
- *
- * Return whether the distro-specific system config tells us to use
- * dhcp for this device.
- *
- */
-gboolean nm_system_device_get_use_dhcp (NMDevice *dev)
-{
- RHSystemConfigData *sys_data;
-
- g_return_val_if_fail (dev != NULL, TRUE);
-
- if ((sys_data = nm_device_get_system_config_data (dev)))
- return sys_data->use_dhcp;
-
- return TRUE;
-}
-
-
-NMIP4Config *nm_system_device_new_ip4_system_config (NMDevice *dev)
-{
- RHSystemConfigData *sys_data;
- NMIP4Config *new_config = NULL;
-
- g_return_val_if_fail (dev != NULL, NULL);
-
- if ((sys_data = nm_device_get_system_config_data (dev)))
- new_config = nm_ip4_config_copy (sys_data->config);
-
- return new_config;
-}
-
-
-void nm_system_deactivate_all_dialup (GSList *list)
-{
-}
-
-gboolean nm_system_activate_dialup (GSList *list, const char *dialup)
-{
- return FALSE;
-}
-
-GSList * nm_system_get_dialup_config (void)
-{
- return NULL;
-}
diff --git a/src/backends/NetworkManagerSlackware.c b/src/backends/NetworkManagerSlackware.c
deleted file mode 100644
index 2f81c7609f..0000000000
--- a/src/backends/NetworkManagerSlackware.c
+++ /dev/null
@@ -1,233 +0,0 @@
-/* NetworkManager -- Network link manager
- *
- * Narayan Newton <narayan_newton@yahoo.com>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- *
- * (C) Copyright 2004 RedHat, Inc.
- * (C) Copyright 2004 Narayan Newton
- */
-
-#include <stdio.h>
-#include <sys/types.h>
-#include <signal.h>
-#include "NetworkManagerSystem.h"
-#include "NetworkManagerUtils.h"
-#include "NetworkManagerDevice.h"
-#include "nm-utils.h"
-
-/*
- * Mostly a mix of the Gentoo and RedHat Backends
- */
-
-/*
- * nm_system_init
- *
- * Initializes the distribution-specific system backend
- *
- */
-void nm_system_init (void)
-{
-}
-
-/*
- * nm_system_device_flush_routes
- *
- * Flush all routes associated with a network device
- *
- */
-void nm_system_device_flush_routes (NMDevice *dev)
-{
- char buf [100];
-
- g_return_if_fail (dev != NULL);
-
- /* Not really applicable for test devices */
- if (nm_device_is_test_device (dev))
- return;
-
- /* Remove routing table entries */
- snprintf (buf, 100, "/sbin/ip route flush dev %s", nm_device_get_iface (dev));
- nm_spawn_process (buf);
-}
-
-
-/*
- * nm_system_device_flush_addresses
- *
- * Flush all network addresses associated with a network device
- *
- */
-void nm_system_device_flush_addresses (NMDevice *dev)
-{
- char buf [100];
-
- g_return_if_fail (dev != NULL);
-
- /* Not really applicable for test devices */
- if (nm_device_is_test_device (dev))
- return;
-
- /* Remove all IP addresses for a device */
- snprintf (buf, 100, "/sbin/ip address flush dev %s", nm_device_get_iface (dev));
- nm_spawn_process (buf);
-}
-
-
-/*
- * nm_system_device_setup_static_ip4_config
- *
- * Set up the device with a particular IPv4 address/netmask/gateway.
- *
- * Returns: TRUE on success
- * FALSE on error
- *
- */
-gboolean nm_system_device_setup_static_ip4_config (NMDevice *dev)
-{
- nm_warning ("nm_system_device_setup_static_ip4_config() is not implemented yet for this distribution.\n");
- return FALSE;
-}
-
-
-/*
- * nm_system_device_update_config_info
- *
- * Retrieve any relevant configuration info for a particular device
- * from the system network configuration information. Clear out existing
- * info before setting stuff too.
- *
- */
-void nm_system_device_update_config_info (NMDevice *dev)
-{
-}
-
-
-/*
- * nm_system_enable_loopback
- *
- * Bring up the loopback interface
- *
- */
-void nm_system_enable_loopback (void)
-{
- nm_spawn_process ("/sbin/ip link set dev lo up");
- nm_spawn_process ("/sbin/ip addr add 127.0.0.1/8 brd 127.255.255.255 dev lo label loopback");
-}
-
-
-/*
- * nm_system_delete_default_route
- *
- * Remove the old default route in preparation for a new one
- *
- */
-void nm_system_delete_default_route (void)
-{
- nm_spawn_process ("/sbin/ip route del default");
-}
-
-
-/*
- * nm_system_kill_all_dhcp_daemons
- *
- * Kill all DHCP daemons currently running, done at startup.
- *
- */
-void nm_system_kill_all_dhcp_daemons (void)
-{
- nm_spawn_process ("/usr/bin/killall -q dhcpcd");
-}
-
-
-/*
- * nm_system_update_dns
- *
- * Make glibc/nscd aware of any changes to the resolv.conf file by
- * restarting nscd.
- *
- */
-void nm_system_update_dns (void)
-{
-}
-
-
-/*
- * nm_system_load_device_modules
- *
- * These should already be loaded
- *
- */
-void nm_system_load_device_modules (void)
-{
-}
-
-
-/*
- * nm_system_restart_mdns_responder
- *
- * Restart the multicast DNS responder so that it knows about new
- * network interfaces and IP addresses.
- *
- */
-void nm_system_restart_mdns_responder (void)
-{
-}
-
-
-/*
- * nm_system_device_add_ip6_link_address
- *
- * Add a default link-local IPv6 address to a device.
- *
- */
-void nm_system_device_add_ip6_link_address (NMDevice *dev)
-{
-}
-
-
-/*
- * nm_system_device_add_default_route_via_device
- *
- * Flush all routes associated with a network device
- *
- */
-void nm_system_device_add_default_route_via_device (NMDevice *dev)
-{
-}
-
-
-/*
- * nm_system_flush_loopback_routes
- *
- * Flush all routes associated with the loopback device, because it
- * sometimes gets the first route for ZeroConf/Link-Local traffic.
- *
- */
-void nm_system_flush_loopback_routes (void)
-{
-}
-
-
-/*
- * nm_system_flush_arp_cache
- *
- * Flush all entries in the arp cache.
- *
- */
-void nm_system_flush_arp_cache (void)
-{
-}
-
diff --git a/src/backends/NetworkManagerSuSE.c b/src/backends/NetworkManagerSuSE.c
deleted file mode 100644
index 5ec9c966cc..0000000000
--- a/src/backends/NetworkManagerSuSE.c
+++ /dev/null
@@ -1,822 +0,0 @@
-/*
- * NetworkManager -- Network link manager
- *
- * Dan Williams <dcbw@redhat.com>
- * Kay Sievers <kay.sievers@suse.de>
- * Robert Love <rml@novell.com>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- *
- * (C) Copyright 2004 Red Hat, Inc.
- * (C) Copyright 2005 SuSE GmbH
- */
-
-#include <stdio.h>
-#include <sys/types.h>
-#include <signal.h>
-#include <sys/stat.h>
-#include <arpa/inet.h>
-
-#include "NetworkManagerSystem.h"
-#include "NetworkManagerUtils.h"
-#include "NetworkManagerDevice.h"
-#include "NetworkManagerDialup.h"
-#include "nm-utils.h"
-#include "shvar.h"
-
-/*
- * nm_system_init
- *
- * Initializes the distribution-specific system backend
- *
- */
-void nm_system_init (void)
-{
- /* Kill any dhclients lying around */
- nm_system_kill_all_dhcp_daemons ();
-}
-
-
-/*
- * nm_system_device_flush_routes
- *
- * Flush all routes associated with a network device
- *
- */
-void nm_system_device_flush_routes (NMDevice *dev)
-{
- g_return_if_fail (dev != NULL);
-
- /* Not really applicable for test devices */
- if (nm_device_is_test_device (dev))
- return;
-
- nm_system_device_flush_routes_with_iface (nm_device_get_iface (dev));
-}
-
-
-/*
- * nm_system_device_flush_routes_with_iface
- *
- * Flush all routes associated with a network device
- *
- */
-void nm_system_device_flush_routes_with_iface (const char *iface)
-{
- char *buf;
-
- g_return_if_fail (iface != NULL);
-
- /* Remove routing table entries */
- buf = g_strdup_printf ("/sbin/ip route flush dev %s", iface);
- nm_spawn_process (buf);
- g_free (buf);
-}
-
-
-/*
- * nm_system_device_add_default_route_via_device
- *
- * Add default route to the given device
- *
- */
-void nm_system_device_add_default_route_via_device (NMDevice *dev)
-{
- g_return_if_fail (dev != NULL);
-
- /* Not really applicable for test devices */
- if (nm_device_is_test_device (dev))
- return;
-
- nm_system_device_add_default_route_via_device_with_iface (nm_device_get_iface (dev));
-}
-
-
-/*
- * nm_system_device_add_default_route_via_device_with_iface
- *
- * Add default route to the given device
- *
- */
-void nm_system_device_add_default_route_via_device_with_iface (const char *iface)
-{
- char *buf;
-
- g_return_if_fail (iface != NULL);
-
- /* Add default gateway */
- buf = g_strdup_printf ("/sbin/ip route add default dev %s", iface);
- nm_spawn_process (buf);
- g_free (buf);
-}
-
-
-/*
- * nm_system_device_add_route_via_device_with_iface
- *
- * Add route to the given device
- *
- */
-void nm_system_device_add_route_via_device_with_iface (const char *iface, const char *route)
-{
- char *buf;
-
- g_return_if_fail (iface != NULL);
-
- /* Add default gateway */
- buf = g_strdup_printf ("/sbin/ip route add %s dev %s", route, iface);
- nm_spawn_process (buf);
- g_free (buf);
-}
-
-
-/*
- * nm_system_device_has_active_routes
- *
- * Find out whether the specified device has any routes in the routing
- * table.
- *
- */
-gboolean nm_system_device_has_active_routes (NMDevice *dev)
-{
- return FALSE;
-}
-
-
-/*
- * nm_system_device_flush_addresses
- *
- * Flush all network addresses associated with a network device
- *
- */
-void nm_system_device_flush_addresses (NMDevice *dev)
-{
- g_return_if_fail (dev != NULL);
-
- /* Not really applicable for test devices */
- if (nm_device_is_test_device (dev))
- return;
-
- nm_system_device_flush_addresses_with_iface (nm_device_get_iface (dev));
-}
-
-
-/*
- * nm_system_device_flush_addresses_with_iface
- *
- * Flush all network addresses associated with a network device
- *
- */
-void nm_system_device_flush_addresses_with_iface (const char *iface)
-{
- char *buf;
-
- g_return_if_fail (iface != NULL);
-
- /* Remove all IP addresses for a device */
- buf = g_strdup_printf ("/sbin/ip address flush dev %s", iface);
- nm_spawn_process (buf);
- g_free (buf);
-}
-
-
-/*
- * nm_system_enable_loopback
- *
- * Bring up the loopback interface
- *
- */
-void nm_system_enable_loopback (void)
-{
- nm_spawn_process ("/sbin/ip link set dev lo up");
- nm_spawn_process ("/sbin/ip addr add 127.0.0.1/8 brd 127.255.255.255 dev lo scope host label loopback");
-}
-
-
-/*
- * nm_system_flush_loopback_routes
- *
- * Flush all routes associated with the loopback device, because it
- * sometimes gets the first route for ZeroConf/Link-Local traffic.
- *
- */
-void nm_system_flush_loopback_routes (void)
-{
- /* Remove routing table entries for lo */
- nm_spawn_process ("/sbin/ip route flush dev lo");
-}
-
-
-/*
- * nm_system_delete_default_route
- *
- * Remove the old default route in preparation for a new one
- *
- */
-void nm_system_delete_default_route (void)
-{
- nm_spawn_process ("/sbin/ip route del default");
-}
-
-
-/*
- * nm_system_flush_arp_cache
- *
- * Flush all entries in the arp cache.
- *
- */
-void nm_system_flush_arp_cache (void)
-{
- nm_spawn_process ("/sbin/ip neigh flush all");
-}
-
-
-/*
- * nm_system_kill_all_dhcp_daemons
- *
- * Kill all DHCP daemons currently running, done at startup.
- *
- */
-void nm_system_kill_all_dhcp_daemons (void)
-{
-}
-
-
-/*
- * nm_system_update_dns
- *
- * Invalidate the nscd host cache, if it exists, since
- * we changed resolv.conf.
- *
- */
-void nm_system_update_dns (void)
-{
-#ifdef NM_NO_NAMED
- if (nm_spawn_process ("/etc/init.d/nscd status") != 0)
- nm_spawn_process ("/etc/init.d/nscd restart");
-
- nm_info ("Clearing nscd hosts cache.");
- nm_spawn_process ("/usr/sbin/nscd -i hosts");
-#else
- nm_spawn_process ("/usr/bin/killall -q nscd");
-#endif
-}
-
-
-/*
- * nm_system_load_device_modules
- *
- * Load any network adapter kernel modules that we need.
- *
- */
-void nm_system_load_device_modules (void)
-{
-}
-
-
-/*
- * nm_system_restart_mdns_responder
- *
- * Restart the multicast DNS responder so that it knows about new
- * network interfaces and IP addresses.
- *
- */
-void nm_system_restart_mdns_responder (void)
-{
- pid_t pid;
- FILE *fp;
- int res;
-
- fp = fopen ("/var/run/mdnsd.pid", "rt");
- if (!fp)
- return;
-
- res = fscanf (fp, "%d", &pid);
- if (res == 1)
- {
- nm_info ("Restarting mdnsd (pid=%d).", pid);
- kill (pid, SIGUSR1);
- }
-
- fclose (fp);
-}
-
-
-/*
- * nm_system_device_add_ip6_link_address
- *
- * Add a default link-local IPv6 address to a device.
- *
- */
-void nm_system_device_add_ip6_link_address (NMDevice *dev)
-{
- char *buf;
- struct ether_addr hw_addr;
- unsigned char eui[8];
-
- nm_device_get_hw_address (dev, &hw_addr);
-
- memcpy (eui, &(hw_addr.ether_addr_octet), sizeof (hw_addr.ether_addr_octet));
- memmove (eui+5, eui+3, 3);
- eui[3] = 0xff;
- eui[4] = 0xfe;
- eui[0] ^= 2;
-
- /* Add the default link-local IPv6 address to a device */
- buf = g_strdup_printf ("/sbin/ip -6 address add fe80::%x%02x:%x%02x:%x%02x:%x%02x/64 dev %s",
- eui[0], eui[1], eui[2], eui[3], eui[4], eui[5],
- eui[6], eui[7], nm_device_get_iface (dev));
- nm_spawn_process (buf);
- g_free (buf);
-}
-
-
-typedef struct SuSESystemConfigData
-{
- NMIP4Config * config;
- gboolean use_dhcp;
-} SuSESystemConfigData;
-
-/*
- * set_ip4_config_from_resolv_conf
- *
- * Add nameservers and search names from a resolv.conf format file.
- *
- */
-static void set_ip4_config_from_resolv_conf (const char *filename, NMIP4Config *ip4_config)
-{
- char *contents = NULL;
- char **split_contents = NULL;
- int i, len;
-
- g_return_if_fail (filename != NULL);
- g_return_if_fail (ip4_config != NULL);
-
- if (!g_file_get_contents (filename, &contents, NULL, NULL) || (contents == NULL))
- return;
-
- if (!(split_contents = g_strsplit (contents, "\n", 0)))
- goto out;
-
- len = g_strv_length (split_contents);
- for (i = 0; i < len; i++)
- {
- char *line = split_contents[i];
-
- /* Ignore comments */
- if (!line || (line[0] == ';'))
- continue;
-
- line = g_strstrip (line);
- if ((strncmp (line, "search", 6) == 0) && (strlen (line) > 6))
- {
- char *searches = g_strdup (line + 7);
- char **split_searches = NULL;
-
- if (!searches || !strlen (searches))
- continue;
-
- /* Allow space-separated search domains */
- if ((split_searches = g_strsplit (searches, " ", 0)))
- {
- int m, srch_len;
-
- srch_len = g_strv_length (split_searches);
- for (m = 0; m < srch_len; m++)
- {
- if (split_searches[m])
- nm_ip4_config_add_domain (ip4_config, split_searches[m]);
- }
- g_strfreev (split_searches);
- }
- else
- {
- /* Only 1 item, add the whole line */
- nm_ip4_config_add_domain (ip4_config, searches);
- }
-
- g_free (searches);
- }
- else if ((strncmp (line, "nameserver", 10) == 0) && (strlen (line) > 10))
- {
- guint32 addr = (guint32) (inet_addr (line + 11));
-
- if (addr != (guint32) -1)
- nm_ip4_config_add_nameserver (ip4_config, addr);
- }
- }
-
- g_strfreev (split_contents);
-
-out:
- g_free (contents);
-}
-
-
-/*
- * nm_system_device_get_system_config
- *
- * Read in the config file for a device.
- *
- */
-void *nm_system_device_get_system_config (NMDevice *dev)
-{
- char *cfg_file_path = NULL;
- char mac[18];
- struct stat statbuf;
- shvarFile *file;
- char *buf = NULL;
- SuSESystemConfigData *sys_data = NULL;
- struct ether_addr addr;
- FILE *f = NULL;
- char buffer[512];
- gboolean error = FALSE;
- unsigned int i;
- int len;
- struct in_addr temp_addr;
- char *ip_str;
-
- g_return_val_if_fail (dev != NULL, NULL);
-
- /* SuSE stores this information usually in /etc/sysconfig/network/ifcfg-*-<MAC address> */
-
- sys_data = g_malloc0 (sizeof (SuSESystemConfigData));
- sys_data->use_dhcp = TRUE;
-
- memset (&addr, 0, sizeof(addr));
- nm_device_get_hw_address (dev, &addr);
- sprintf (mac, "%02x:%02x:%02x:%02x:%02x:%02x",
- addr.ether_addr_octet[0], addr.ether_addr_octet[1],
- addr.ether_addr_octet[2], addr.ether_addr_octet[3],
- addr.ether_addr_octet[4], addr.ether_addr_octet[5]);
- cfg_file_path = g_strdup_printf (SYSCONFDIR"/sysconfig/network/ifcfg-eth-id-%s", mac);
- if (!cfg_file_path)
- return sys_data;
- if (stat(cfg_file_path, &statbuf) == 0)
- goto found;
-
- g_free(cfg_file_path);
- cfg_file_path = g_strdup_printf (SYSCONFDIR"/sysconfig/network/ifcfg-wlan-id-%s", mac);
- if (!cfg_file_path)
- return sys_data;
- if (stat(cfg_file_path, &statbuf) == 0)
- goto found;
-
- g_free(cfg_file_path);
- cfg_file_path = g_strdup_printf (SYSCONFDIR"/sysconfig/network/ifcfg-%s", nm_device_get_iface (dev));
- if (!cfg_file_path)
- return sys_data;
- if (stat(cfg_file_path, &statbuf) == 0)
- goto found;
-
- g_free (cfg_file_path);
- return sys_data;
-
-found:
- nm_debug ("found config %s for if %s", cfg_file_path, nm_device_get_iface (dev));
- if (!(file = svNewFile (cfg_file_path)))
- {
- g_free (cfg_file_path);
- return sys_data;
- }
- g_free (cfg_file_path);
-
- if ((buf = svGetValue (file, "BOOTPROTO")))
- {
- nm_debug ("BOOTPROTO=%s", buf);
- if (strcasecmp (buf, "dhcp"))
- sys_data->use_dhcp = FALSE;
- free (buf);
- }
-
- sys_data->config = nm_ip4_config_new ();
-
- if (!(sys_data->use_dhcp))
- {
- if ((buf = svGetValue (file, "IPADDR")))
- {
- nm_ip4_config_set_address (sys_data->config, inet_addr (buf));
- free (buf);
- }
- else
- {
- nm_warning ("Network configuration for device '%s' was invalid (non-DHCP configuration, "
- "but no IP address specified. Will use DHCP instead.", nm_device_get_iface (dev));
- error = TRUE;
- goto out;
- }
-
- if ((buf = svGetValue (file, "NETMASK")))
- {
- nm_ip4_config_set_netmask (sys_data->config, inet_addr (buf));
- free (buf);
- }
- else
- {
- guint32 ip4addr = nm_ip4_config_get_address (sys_data->config);
-
- /* Make a default netmask if we have an IP address */
- if (((ntohl (ip4addr) & 0xFF000000) >> 24) <= 127)
- nm_ip4_config_set_netmask (sys_data->config, htonl (0xFF000000));
- else if (((ntohl (ip4addr) & 0xFF000000) >> 24) <= 191)
- nm_ip4_config_set_netmask (sys_data->config, htonl (0xFFFF0000));
- else
- nm_ip4_config_set_netmask (sys_data->config, htonl (0xFFFFFF00));
- }
-
- if ((buf = svGetValue (file, "BROADCAST")))
- {
- nm_ip4_config_set_broadcast (sys_data->config, inet_addr (buf));
- free (buf);
- }
- else
- {
- guint32 broadcast = ((nm_ip4_config_get_address (sys_data->config) & nm_ip4_config_get_netmask (sys_data->config))
- | ~nm_ip4_config_get_netmask (sys_data->config));
- nm_ip4_config_set_broadcast (sys_data->config, broadcast);
- }
-
- buf = NULL;
- if ((f = fopen ("/etc/sysconfig/network/routes", "r")))
- {
- while (fgets (buffer, 512, f) && !feof (f))
- {
- buf = strtok(buffer, " ");
- if (strcmp(buf, "default") == 0)
- {
- buf = strtok(NULL, " ");
- if (buf)
- nm_ip4_config_set_gateway (sys_data->config, inet_addr (buf));
- break;
- }
- }
- fclose (f);
- }
- if (!buf)
- {
- nm_warning ("Network configuration for device '%s' was invalid (non-DHCP configuration, "
- "but no gateway specified. Will use DHCP instead.", nm_device_get_iface (dev));
- error = TRUE;
- goto out;
- }
-
- set_ip4_config_from_resolv_conf (SYSCONFDIR"/resolv.conf", sys_data->config);
- }
-
-out:
- svCloseFile (file);
-
- if (error)
- {
- nm_debug ("error, enable dhcp");
- sys_data->use_dhcp = TRUE;
- /* Clear out the config */
- nm_ip4_config_unref (sys_data->config);
- sys_data->config = NULL;
- }
-
- nm_debug ("------ Config (%s)", nm_device_get_iface (dev));
- nm_debug ("dhcp=%u", sys_data->use_dhcp);
-
- temp_addr.s_addr = nm_ip4_config_get_address (sys_data->config);
- ip_str = g_strdup (inet_ntoa (temp_addr));
- nm_debug ("addr=%s", ip_str);
- g_free (ip_str);
-
- temp_addr.s_addr = nm_ip4_config_get_gateway (sys_data->config);
- ip_str = g_strdup (inet_ntoa (temp_addr));
- nm_debug ("gw=%s", ip_str);
- g_free (ip_str);
-
- temp_addr.s_addr = nm_ip4_config_get_netmask (sys_data->config);
- ip_str = g_strdup (inet_ntoa (temp_addr));
- nm_debug ("mask=%s", ip_str);
- g_free (ip_str);
-
- len = nm_ip4_config_get_num_nameservers (sys_data->config);
- for (i = 0; i < len; i++)
- {
- guint ns_addr = nm_ip4_config_get_nameserver (sys_data->config, i);
-
- temp_addr.s_addr = ns_addr;
- ip_str = g_strdup (inet_ntoa (temp_addr));
- nm_debug ("ns_%u=%s", i, ip_str);
- g_free (ip_str);
- }
- nm_debug ("---------------------\n");
-
- return sys_data;
-}
-
-
-/*
- * nm_system_device_free_system_config
- *
- * Free stored system config data
- *
- */
-void nm_system_device_free_system_config (NMDevice *dev, void *system_config_data)
-{
- SuSESystemConfigData *sys_data = (SuSESystemConfigData *)system_config_data;
-
- g_return_if_fail (dev != NULL);
-
- if (!sys_data)
- return;
-
- if (sys_data->config)
- nm_ip4_config_unref (sys_data->config);
-}
-
-
-/*
- * nm_system_device_get_use_dhcp
- *
- * Return whether the distro-specific system config tells us to use
- * dhcp for this device.
- *
- */
-gboolean nm_system_device_get_use_dhcp (NMDevice *dev)
-{
- SuSESystemConfigData *sys_data;
-
- g_return_val_if_fail (dev != NULL, TRUE);
-
- if ((sys_data = nm_device_get_system_config_data (dev)))
- return sys_data->use_dhcp;
-
- return TRUE;
-}
-
-
-NMIP4Config *nm_system_device_new_ip4_system_config (NMDevice *dev)
-{
- SuSESystemConfigData *sys_data;
- NMIP4Config *new_config = NULL;
-
- g_return_val_if_fail (dev != NULL, NULL);
-
- if ((sys_data = nm_device_get_system_config_data (dev)))
- new_config = nm_ip4_config_copy (sys_data->config);
-
- return new_config;
-}
-
-
-void nm_system_deactivate_all_dialup (GSList *list)
-{
- GSList *elt;
-
- for (elt = list; elt; elt = g_slist_next (elt))
- {
- NMDialUpConfig *config = (NMDialUpConfig *) elt->data;
- char *cmd;
-
- cmd = g_strdup_printf ("/sbin/ifdown %s", (char *) config->data);
- nm_spawn_process (cmd);
- g_free (cmd);
- }
-}
-
-
-gboolean nm_system_activate_dialup (GSList *list, const char *dialup)
-{
- GSList *elt;
- gboolean ret = FALSE;
-
- for (elt = list; elt; elt = g_slist_next (elt))
- {
- NMDialUpConfig *config = (NMDialUpConfig *) elt->data;
- if (strcmp (dialup, config->name) == 0)
- {
- char *cmd;
-
- nm_info ("Activating dialup device %s (%s) ...", dialup, (char *) config->data);
- cmd = g_strdup_printf ("/sbin/ifup %s", (char *) config->data);
- nm_spawn_process (cmd);
- g_free (cmd);
- ret = TRUE;
- break;
- }
- }
-
- return ret;
-}
-
-
-/*
- * verify_and_return_provider - given a provider identifier, verify that it is able to dial without
- * prompting and return the provider name. On failure, return NULL. Caller is responsible for
- * free'ing the return.
-*/
-static char * verify_and_return_provider (const char *provider)
-{
- shvarFile *file;
- char *name, *buf = NULL;
- int ret;
-
- name = g_strdup_printf ("/etc/sysconfig/network/providers/%s", provider);
-
- file = svNewFile (name);
- if (!file)
- goto out_gfree;
-
- buf = svGetValue (file, "ASKPASSWORD");
- if (!buf)
- goto out_close;
- ret = strcmp (buf, "no");
- free (buf);
- if (ret)
- goto out_close;
-
- buf = svGetValue (file, "PROVIDER");
-
-out_close:
- svCloseFile (file);
-out_gfree:
- g_free (name);
-
- return buf;
-}
-
-
-/*
- * nm_system_get_dialup_config
- *
- * Enumerate dial up options on this system, allocate NMDialUpConfig's,
- * fill them out, and return.
- *
- */
-GSList * nm_system_get_dialup_config (void)
-{
- GSList *list = NULL;
- const char *dentry;
- unsigned int i = 0;
- size_t len;
- GError *err;
- GDir *dir;
-
- dir = g_dir_open (SYSCONFDIR "/sysconfig/network", 0, &err);
- if (!dir)
- {
- nm_warning ("Could not open directory " SYSCONFDIR "/sysconfig/network: %s", err->message);
- return NULL;
- }
-
- while ((dentry = g_dir_read_name (dir)))
- {
- NMDialUpConfig *config;
- shvarFile *modem_file;
- char *name, *buf, *provider_name;
-
- /* we only want modems */
- if (!g_str_has_prefix (dentry, "ifcfg-modem"))
- continue;
-
- /* open the configuration file */
- name = g_strdup_printf ("/etc/sysconfig/network/%s", dentry);
- modem_file = svNewFile (name);
- if (!modem_file)
- goto out_gfree;
- /* get the name of the provider used for this entry */
- buf = svGetValue (modem_file, "PROVIDER");
- if (!buf)
- goto out_close;
-
- provider_name = verify_and_return_provider (buf);
- if (!provider_name)
- goto out_free;
-
- config = g_malloc (sizeof (NMDialUpConfig));
- config->name = g_strdup_printf ("%s via Modem", provider_name);
- config->data = g_strdup (dentry + 6); /* skip the "ifcfg-" prefix */
-
- list = g_slist_append (list, config);
-
- nm_info ("Found dial up configuration for %s: %s", config->name, (char *) config->data);
-
- free (provider_name);
-out_free:
- free (buf);
-out_close:
- svCloseFile (modem_file);
-out_gfree:
- g_free (name);
- }
-
- g_dir_close (dir);
-
- return list;
-}
diff --git a/src/backends/interface_parser.c b/src/backends/interface_parser.c
deleted file mode 100644
index 715fab0095..0000000000
--- a/src/backends/interface_parser.c
+++ /dev/null
@@ -1,192 +0,0 @@
-/* NetworkManager -- Network link manager
- *
- * Tom Parker <palfrey@tevp.net>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- *
- * (C) Copyright 2004 Tom Parker
- */
-
-
-#include "interface_parser.h"
-#include "NetworkManagerUtils.h"
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include "nm-utils.h"
-
-if_block* first;
-if_block* last;
-
-if_data* last_data;
-
-void add_block(const char *type, const char* name)
-{
- if_block *ret = (if_block*)calloc(1,sizeof(struct _if_block));
- ret->name = g_strdup(name);
- ret->type = g_strdup(type);
- if (first == NULL)
- first = last = ret;
- else
- {
- last->next = ret;
- last = ret;
- }
- last_data = NULL;
- //printf("added block '%s' with type '%s'\n",name,type);
-}
-
-void add_data(const char *key,const char *data)
-{
- if_data *ret = (if_data*)calloc(1,sizeof(struct _if_data));
- ret->key = g_strdup(key);
- ret->data = g_strdup(data);
-
- if (last->info == NULL)
- {
- last->info = ret;
- last_data = ret;
- }
- else
- {
- last_data->next = ret;
- last_data = last_data->next;
- }
- //printf("added data '%s' with key '%s'\n",data,key);
-}
-
-#define SPACE_OR_TAB(string,ret) {ret = strchr(string,' ');ret=(ret == NULL?strchr(string,'\t'):ret);}
-
-void ifparser_init()
-{
- FILE *inp = fopen(INTERFACES,"r");
- int ret = 0;
- if (inp == NULL)
- {
- nm_warning ("Error: Can't open %s\n",INTERFACES);
- return;
- }
- first = last = NULL;
- while(1)
- {
- char *line,rline[255],*space;
- ret = fscanf(inp,"%255[^\n]\n",rline);
- if (ret == EOF)
- break;
- line = rline;
- while(line[0] == ' ')
- line++;
- if (line[0]=='#' || line[0]=='\0')
- continue;
-
- SPACE_OR_TAB(line,space)
- if (space == NULL)
- {
- nm_warning ("Error: Can't parse interface line '%s'\n",line);
- continue;
- }
- space[0] = '\0';
-
-
- if (strcmp(line,"iface")==0)
- {
- char *space2 = strchr(space+1,' ');
- if (space2 == NULL)
- {
- nm_warning ("Error: Can't parse iface line '%s'\n",space+1);
- continue;
- }
- space2[0]='\0';
- add_block(line,space+1);
-
- if (space2[1]!='\0')
- {
- space = strchr(space2+1,' ');
- if (space == NULL)
- {
- nm_warning ("Error: Can't parse data '%s'\n",space2+1);
- continue;
- }
- space[0] = '\0';
- add_data(space2+1,space+1);
- }
- }
- else if (strcmp(line,"auto")==0)
- add_block(line,space+1);
- else
- add_data(line,space+1);
-
- //printf("line: '%s' ret=%d\n",rline,ret);
- }
- fclose(inp);
-}
-
-void _destroy_data(if_data *ifd)
-{
- if (ifd == NULL)
- return;
- _destroy_data(ifd->next);
- free(ifd->key);
- free(ifd->data);
- free(ifd);
- return;
-}
-
-void _destroy_block(if_block* ifb)
-{
- if (ifb == NULL)
- return;
- _destroy_block(ifb->next);
- _destroy_data(ifb->info);
- free(ifb->name);
- free(ifb->type);
- free(ifb);
- return;
-}
-
-void ifparser_destroy()
-{
- _destroy_block(first);
- first = last = NULL;
-}
-
-if_block *ifparser_getfirst()
-{
- return first;
-}
-
-if_block *ifparser_getif(const char* iface)
-{
- if_block *curr = first;
- while(curr!=NULL)
- {
- if (strcmp(curr->type,"iface")==0 && strcmp(curr->name,iface)==0)
- return curr;
- curr = curr->next;
- }
- return NULL;
-}
-
-const char *ifparser_getkey(if_block* iface, const char *key)
-{
- if_data *curr = iface->info;
- while(curr!=NULL)
- {
- if (strcmp(curr->key,key)==0)
- return curr->data;
- curr = curr->next;
- }
- return NULL;
-}
diff --git a/src/backends/interface_parser.h b/src/backends/interface_parser.h
deleted file mode 100644
index 584278f662..0000000000
--- a/src/backends/interface_parser.h
+++ /dev/null
@@ -1,52 +0,0 @@
-/* NetworkManager -- Network link manager
- *
- * Tom Parker <palfrey@tevp.net>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- *
- * (C) Copyright 2004 Tom Parker
- */
-
-
-#ifndef _INTERFACE_PARSER_H
-#define _INTERFACE_PARSER_H
-
-#define INTERFACES "/etc/network/interfaces"
-
-typedef struct _if_data
-{
- char *key;
- char *data;
- struct _if_data *next;
-} if_data;
-
-typedef struct _if_block
-{
- char *type;
- char *name;
- if_data *info;
- struct _if_block *next;
-} if_block;
-
-void ifparser_init();
-void ifparser_destroy();
-
-const char* ifparser_interfaces();
-if_block *ifparser_getif(const char* iface);
-if_block *ifparser_getfirst();
-const char *ifparser_getkey(if_block* iface, const char *key);
-
-#endif
-
diff --git a/src/backends/shvar.c b/src/backends/shvar.c
deleted file mode 100644
index c2d1b5afbd..0000000000
--- a/src/backends/shvar.c
+++ /dev/null
@@ -1,398 +0,0 @@
-/*
- * shvar.c
- *
- * Implementation of non-destructively reading/writing files containing
- * only shell variable declarations and full-line comments.
- *
- * Includes explicit inheritance mechanism intended for use with
- * Red Hat Linux ifcfg-* files. There is no protection against
- * inheritance loops; they will generally cause stack overflows.
- * Furthermore, they are only intended for one level of inheritance;
- * the value setting algorithm assumes this.
- *
- * Copyright 1999,2000 Red Hat, Inc.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- *
- */
-
-#include <fcntl.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <unistd.h>
-
-#include "shvar.h"
-
-/* Open the file <name>, returning a shvarFile on success and NULL on failure.
- Add a wrinkle to let the caller specify whether or not to create the file
- (actually, return a structure anyway) if it doesn't exist. */
-static shvarFile *
-svOpenFile(const char *name, gboolean create)
-{
- shvarFile *s = NULL;
- int closefd = 0;
-
- s = g_malloc0(sizeof(shvarFile));
-
-#if 1 /* NetworkManager local change */
- s->fd = open(name, O_RDONLY); /* NOT O_CREAT */
- if (s->fd != -1) closefd = 1;
-#else
- s->fd = open(name, O_RDWR); /* NOT O_CREAT */
- if (s->fd == -1) {
- /* try read-only */
- s->fd = open(name, O_RDONLY); /* NOT O_CREAT */
- if (s->fd != -1) closefd = 1;
- }
-#endif
- s->fileName = g_strdup(name);
-
- if (s->fd != -1) {
- struct stat buf;
- char *p, *q;
-
- if (fstat(s->fd, &buf) < 0) goto bail;
- s->arena = g_malloc0(buf.st_size + 1);
-
- if (read(s->fd, s->arena, buf.st_size) < 0) goto bail;
-
- /* we'd use g_strsplit() here, but we want a list, not an array */
- for(p = s->arena; (q = strchr(p, '\n')) != NULL; p = q + 1) {
- s->lineList = g_list_append(s->lineList, g_strndup(p, q - p));
- }
-
- /* closefd is set if we opened the file read-only, so go ahead and
- close it, because we can't write to it anyway */
- if (closefd) {
- close(s->fd);
- s->fd = -1;
- }
-
- return s;
- }
-
- if (create) {
- return s;
- }
-
-bail:
- if (s->fd != -1) close(s->fd);
- if (s->arena) g_free (s->arena);
- if (s->fileName) g_free (s->fileName);
- g_free (s);
- return NULL;
-}
-
-/* Open the file <name>, return shvarFile on success, NULL on failure */
-shvarFile *
-svNewFile(const char *name)
-{
- return svOpenFile(name, FALSE);
-}
-
-/* Create a new file structure, returning actual data if the file exists,
- * and a suitable starting point if it doesn't. */
-shvarFile *
-svCreateFile(const char *name)
-{
- return svOpenFile(name, TRUE);
-}
-
-/* remove escaped characters in place */
-static void
-unescape(char *s) {
- int len, i;
-
- len = strlen(s);
- if ((s[0] == '"' || s[0] == '\'') && s[0] == s[len-1]) {
- i = len - 2;
- memmove(s, s+1, i);
- s[i+1] = '\0';
- len = i;
- }
- for (i = 0; i < len; i++) {
- if (s[i] == '\\') {
- memmove(s+i, s+i+1, len-(i+1));
- len--;
- }
- s[len] = '\0';
- }
-}
-
-
-/* create a new string with all necessary characters escaped.
- * caller must free returned string
- */
-static const char escapees[] = "\"'\\$~`"; /* must be escaped */
-static const char spaces[] = " \t|&;()<>"; /* only require "" */
-static char *
-escape(const char *s) {
- char *new;
- int i, j, mangle = 0, space = 0;
- int newlen, slen;
- static int esclen, splen;
-
- if (!esclen) esclen = strlen(escapees);
- if (!splen) splen = strlen(spaces);
- slen = strlen(s);
-
- for (i = 0; i < slen; i++) {
- if (strchr(escapees, s[i])) mangle++;
- if (strchr(spaces, s[i])) space++;
- }
- if (!mangle && !space) return strdup(s);
-
- newlen = slen + mangle + 3; /* 3 is extra ""\0 */
- new = g_malloc0(newlen);
- if (!new) return NULL;
-
- j = 0;
- new[j++] = '"';
- for (i = 0; i < slen; i++) {
- if (strchr(escapees, s[i])) {
- new[j++] = '\\';
- }
- new[j++] = s[i];
- }
- new[j++] = '"';
- g_assert(j == slen + mangle + 2); /* j is the index of the '\0' */
-
- return new;
-}
-
-/* Get the value associated with the key, and leave the current pointer
- * pointing at the line containing the value. The char* returned MUST
- * be freed by the caller.
- */
-char *
-svGetValue(shvarFile *s, const char *key)
-{
- char *value = NULL;
- char *line;
- char *keyString;
- int len;
-
- g_assert(s);
- g_assert(key);
-
- keyString = g_malloc0(strlen(key) + 2);
- strcpy(keyString, key);
- keyString[strlen(key)] = '=';
- len = strlen(keyString);
-
- for (s->current = s->lineList; s->current; s->current = s->current->next) {
- line = s->current->data;
- if (!strncmp(keyString, line, len)) {
- value = g_strdup(line + len);
- unescape(value);
- break;
- }
- }
- g_free(keyString);
-
- if (value) {
- if (value[0]) {
- return value;
- } else {
- g_free(value);
- return NULL;
- }
- }
- if (s->parent) value = svGetValue(s->parent, key);
- return value;
-}
-
-/* return 1 if <key> resolves to any truth value (e.g. "yes", "y", "true")
- * return 0 if <key> resolves to any non-truth value (e.g. "no", "n", "false")
- * return <default> otherwise
- */
-int
-svTrueValue(shvarFile *s, const char *key, int def)
-{
- char *tmp;
- int returnValue = def;
-
- tmp = svGetValue(s, key);
- if (!tmp) return returnValue;
-
- if ( (!strcasecmp("yes", tmp)) ||
- (!strcasecmp("true", tmp)) ||
- (!strcasecmp("t", tmp)) ||
- (!strcasecmp("y", tmp)) ) returnValue = 1;
- else
- if ( (!strcasecmp("no", tmp)) ||
- (!strcasecmp("false", tmp)) ||
- (!strcasecmp("f", tmp)) ||
- (!strcasecmp("n", tmp)) ) returnValue = 0;
-
- g_free (tmp);
- return returnValue;
-}
-
-
-/* Set the variable <key> equal to the value <value>.
- * If <key> does not exist, and the <current> pointer is set, append
- * the key=value pair after that line. Otherwise, prepend the pair
- * to the top of the file. Here's the algorithm, as the C code
- * seems to be rather dense:
- *
- * if (value == NULL), then:
- * if val2 (parent): change line to key= or append line key=
- * if val1 (this) : delete line
- * else noop
- * else use this table:
- * val2
- * NULL value other
- * v NULL append line noop append line
- * a
- * l value noop noop noop
- * 1
- * other change line delete line change line
- *
- * No changes are ever made to the parent config file, only to the
- * specific file passed on the command line.
- *
- */
-void
-svSetValue(shvarFile *s, const char *key, const char *value)
-{
- char *newval = NULL, *val1 = NULL, *val2 = NULL;
- char *keyValue;
-
- g_assert(s);
- g_assert(key);
- /* value may be NULL */
-
- if (value) newval = escape(value);
- keyValue = g_strdup_printf("%s=%s", key, newval ? newval : "");
-
- val1 = svGetValue(s, key);
- if (val1 && newval && !strcmp(val1, newval)) goto bail;
- if (s->parent) val2 = svGetValue(s->parent, key);
-
- if (!newval || !newval[0]) {
- /* delete value somehow */
- if (val2) {
- /* change/append line to get key= */
- if (s->current) s->current->data = keyValue;
- else s->lineList = g_list_append(s->lineList, keyValue);
- s->freeList = g_list_append(s->freeList, keyValue);
- s->modified = 1;
- } else if (val1) {
- /* delete line */
- s->lineList = g_list_remove_link(s->lineList, s->current);
- g_list_free_1(s->current);
- s->modified = 1;
- goto bail; /* do not need keyValue */
- }
- goto end;
- }
-
- if (!val1) {
- if (val2 && !strcmp(val2, newval)) goto end;
- /* append line */
- s->lineList = g_list_append(s->lineList, keyValue);
- s->freeList = g_list_append(s->freeList, keyValue);
- s->modified = 1;
- goto end;
- }
-
- /* deal with a whole line of noops */
- if (val1 && !strcmp(val1, newval)) goto end;
-
- /* At this point, val1 && val1 != value */
- if (val2 && !strcmp(val2, newval)) {
- /* delete line */
- s->lineList = g_list_remove_link(s->lineList, s->current);
- g_list_free_1(s->current);
- s->modified = 1;
- goto bail; /* do not need keyValue */
- } else {
- /* change line */
- if (s->current) s->current->data = keyValue;
- else s->lineList = g_list_append(s->lineList, keyValue);
- s->freeList = g_list_append(s->freeList, keyValue);
- s->modified = 1;
- }
-
-end:
- if (newval) free(newval);
- if (val1) free(val1);
- if (val2) free(val2);
- return;
-
-bail:
- if (keyValue) free (keyValue);
- goto end;
-}
-
-/* Write the current contents iff modified. Returns -1 on error
- * and 0 on success. Do not write if no values have been modified.
- * The mode argument is only used if creating the file, not if
- * re-writing an existing file, and is passed unchanged to the
- * open() syscall.
- */
-int
-svWriteFile(shvarFile *s, int mode)
-{
- FILE *f;
- int tmpfd;
-
- if (s->modified) {
- if (s->fd == -1)
- s->fd = open(s->fileName, O_WRONLY|O_CREAT, mode);
- if (s->fd == -1)
- return -1;
- if (ftruncate(s->fd, 0) < 0)
- return -1;
-
- tmpfd = dup(s->fd);
- f = fdopen(tmpfd, "w");
- fseek(f, 0, SEEK_SET);
- for (s->current = s->lineList; s->current; s->current = s->current->next) {
- char *line = s->current->data;
- fprintf(f, "%s\n", line);
- }
- fclose(f);
- }
-
- return 0;
-}
-
-
-/* Close the file descriptor (if open) and delete the shvarFile.
- * Returns -1 on error and 0 on success.
- */
-int
-svCloseFile(shvarFile *s)
-{
-
- g_assert(s);
-
- if (s->fd != -1) close(s->fd);
-
- g_free(s->arena);
- for (s->current = s->freeList; s->current; s->current = s->current->next) {
- g_free(s->current->data);
- }
- g_free(s->fileName);
- g_list_free(s->freeList);
- g_list_free(s->lineList); /* implicitly frees s->current */
- g_free(s);
- return 0;
-}
diff --git a/src/backends/shvar.h b/src/backends/shvar.h
deleted file mode 100644
index 50d10680de..0000000000
--- a/src/backends/shvar.h
+++ /dev/null
@@ -1,103 +0,0 @@
-/*
- * shvar.h
- *
- * Interface for non-destructively reading/writing files containing
- * only shell variable declarations and full-line comments.
- *
- * Includes explicit inheritance mechanism intended for use with
- * Red Hat Linux ifcfg-* files. There is no protection against
- * inheritance loops; they will generally cause stack overflows.
- * Furthermore, they are only intended for one level of inheritance;
- * the value setting algorithm assumes this.
- *
- * Copyright 1999 Red Hat, Inc.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- *
- */
-#ifndef _SHVAR_H
-#define _SHVAR_H
-
-#include <glib.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif /* __cplusplus */
-
-typedef struct _shvarFile shvarFile;
-struct _shvarFile {
- char *fileName; /* read-only */
- int fd; /* read-only */
- char *arena; /* ignore */
- GList *lineList; /* read-only */
- GList *freeList; /* ignore */
- GList *current; /* set implicitly or explicitly,
- points to element of lineList */
- shvarFile *parent; /* set explicitly */
- int modified; /* ignore */
-};
-
-
-/* Create the file <name>, return shvarFile on success, NULL on failure */
-shvarFile *
-svCreateFile(const char *name);
-
-/* Open the file <name>, return shvarFile on success, NULL on failure */
-shvarFile *
-svNewFile(const char *name);
-
-/* Get the value associated with the key, and leave the current pointer
- * pointing at the line containing the value. The char* returned MUST
- * be freed by the caller.
- */
-char *
-svGetValue(shvarFile *s, const char *key);
-
-/* return 1 if <key> resolves to any truth value (e.g. "yes", "y", "true")
- * return 0 if <key> resolves to any non-truth value (e.g. "no", "n", "false")
- * return <def> otherwise
- */
-int
-svTrueValue(shvarFile *s, const char *key, int def);
-
-/* Set the variable <key> equal to the value <value>.
- * If <key> does not exist, and the <current> pointer is set, append
- * the key=value pair after that line. Otherwise, prepend the pair
- * to the top of the file.
- */
-void
-svSetValue(shvarFile *s, const char *key, const char *value);
-
-
-/* Write the current contents iff modified. Returns -1 on error
- * and 0 on success. Do not write if no values have been modified.
- * The mode argument is only used if creating the file, not if
- * re-writing an existing file, and is passed unchanged to the
- * open() syscall.
- */
-int
-svWriteFile(shvarFile *s, int mode);
-
-/* Close the file descriptor (if open) and delete the shvarFile.
- * Returns -1 on error and 0 on success.
- */
-int
-svCloseFile(shvarFile *s);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* ! _SHVAR_H */
diff --git a/src/dhcp-manager/.cvsignore b/src/dhcp-manager/.cvsignore
deleted file mode 100644
index 282522db03..0000000000
--- a/src/dhcp-manager/.cvsignore
+++ /dev/null
@@ -1,2 +0,0 @@
-Makefile
-Makefile.in
diff --git a/src/dhcp-manager/Makefile.am b/src/dhcp-manager/Makefile.am
deleted file mode 100644
index ed62a734fd..0000000000
--- a/src/dhcp-manager/Makefile.am
+++ /dev/null
@@ -1,21 +0,0 @@
-INCLUDES = -I${top_srcdir} -I${top_srcdir}/utils -I${top_srcdir}/src -I${top_srcdir}/src/named-manager
-
-noinst_LTLIBRARIES = libdhcp-manager.la
-
-libdhcp_manager_la_SOURCES = nm-dhcp-manager.c \
- nm-dhcp-manager.h
-
-libdhcp_manager_la_CPPFLAGS = $(DBUS_CFLAGS) \
- $(GTHREAD_CFLAGS) \
- $(HAL_CFLAGS) \
- -DDHCDBD_BINARY_PATH=\"$(DHCDBD_BINARY_PATH)\" \
- -g \
- -Wall \
- -DDBUS_API_SUBJECT_TO_CHANGE \
- -DG_DISABLE_DEPRECATED \
- -DBINDIR=\"$(bindir)\" \
- -DDATADIR=\"$(datadir)\" \
- -DSYSCONFDIR=\"$(sysconfdir)\"
-
-
-libdhcp_manager_la_LIBADD = $(DBUS_LIBS) $(GTHREAD_LIBS)
diff --git a/src/dhcp-manager/nm-dhcp-manager.c b/src/dhcp-manager/nm-dhcp-manager.c
deleted file mode 100644
index 09a43b92c5..0000000000
--- a/src/dhcp-manager/nm-dhcp-manager.c
+++ /dev/null
@@ -1,665 +0,0 @@
-/* nm-dhcp-manager.c - Handle the DHCP daemon for NetworkManager
- *
- * Copyright (C) 2005 Dan Williams
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
- * 02111-1307, USA.
- */
-
-
-#include <glib.h>
-#include <dbus/dbus.h>
-#include "nm-dhcp-manager.h"
-#include "NetworkManagerDevice.h"
-#include "NetworkManagerPolicy.h"
-#include "nm-activation-request.h"
-#include "nm-utils.h"
-#include <sys/socket.h>
-#include <netinet/in.h>
-#include <arpa/inet.h>
-
-
-struct NMDHCPManager
-{
- NMData * data;
- gboolean running;
-};
-
-
-char *get_dhcp_match_string (const char *owner)
-{
- g_return_val_if_fail (owner != NULL, NULL);
-
- return g_strdup_printf ("type='signal',interface='" DHCP_SERVICE_NAME ".state',sender='%s'", owner);
-}
-
-
-static gboolean state_is_bound (guint8 state)
-{
- if ( (state == 2) /* BOUND */
- || (state == 3) /* RENEW */
- || (state == 4) /* REBOOT */
- || (state == 5)) /* REBIND */
- return TRUE;
-
- return FALSE;
-}
-
-
-static gboolean state_is_down (guint8 state)
-{
- if ( (state == 0) /* NBI */
- || (state == 11) /* RELEASE */
- || (state == 13) /* ABEND */
- || (state == 14)) /* END */
- return TRUE;
-
- return FALSE;
-}
-
-
-/*
- * nm_dhcp_manager_exec_daemon
- *
- * Launch the DHCP daemon.
- *
- */
-static gboolean nm_dhcp_manager_exec_daemon (NMDHCPManager *manager)
-{
- GPtrArray *dhcp_argv;
- GError *error = NULL;
- GPid pid;
-
- g_return_val_if_fail (manager != NULL, FALSE);
-
- dhcp_argv = g_ptr_array_new ();
- g_ptr_array_add (dhcp_argv, (gpointer) DHCDBD_BINARY_PATH);
- g_ptr_array_add (dhcp_argv, (gpointer) "--system");
- g_ptr_array_add (dhcp_argv, NULL);
-
- if (!g_spawn_async ("/", (char **) dhcp_argv->pdata, NULL, 0, NULL, NULL, &pid, &error))
- {
- g_ptr_array_free (dhcp_argv, TRUE);
- nm_warning ("Could not activate the DHCP daemon " DHCDBD_BINARY_PATH ". error: '%s'.", error->message);
- g_error_free (error);
- return FALSE;
- }
- g_ptr_array_free (dhcp_argv, TRUE);
- nm_info ("Activated the DHCP daemon " DHCDBD_BINARY_PATH " with PID %d.", pid);
-
- return TRUE;
-}
-
-
-NMDHCPManager * nm_dhcp_manager_new (NMData *data)
-{
- NMDHCPManager * manager;
- char * owner;
-
- g_return_val_if_fail (data != NULL, NULL);
- g_return_val_if_fail (data->dbus_connection != NULL, NULL);
-
- manager = g_malloc0 (sizeof (NMDHCPManager));
- manager->data = data;
- manager->running = dbus_bus_name_has_owner (manager->data->dbus_connection, DHCP_SERVICE_NAME, NULL);
-
- if (manager->running && (owner = get_name_owner (data->dbus_connection, DHCP_SERVICE_NAME)))
- {
- char *match = get_dhcp_match_string (owner);
- dbus_bus_add_match (data->dbus_connection, match, NULL);
- g_free (match);
- g_free (owner);
- }
-
- return manager;
-}
-
-
-void nm_dhcp_manager_dispose (NMDHCPManager *manager)
-{
- g_return_if_fail (manager != NULL);
-
- memset (manager, 0, sizeof (NMDHCPManager));
- g_free (manager);
-}
-
-
-guint8 nm_dhcp_manager_get_state_for_device (NMDHCPManager *manager, NMDevice *dev)
-{
- DBusMessage * message;
- DBusMessage * reply;
- char * path;
- guint8 state = 0;
- DBusError error;
-
- g_return_val_if_fail (manager != NULL, 0);
- g_return_val_if_fail (dev != NULL, 0);
-
- if (!manager->running)
- {
- if (nm_dhcp_manager_exec_daemon (manager) == FALSE)
- return 0;
- sleep (1);
- }
-
- path = g_strdup_printf (DHCP_OBJECT_PATH"/%s", nm_device_get_iface (dev));
- message = dbus_message_new_method_call (DHCP_SERVICE_NAME, path, DHCP_SERVICE_NAME".dbus.get", "reason");
- g_free (path);
- if (message == NULL)
- {
- nm_warning ("nm_dhcp_manager_get_state_for_device(): Couldn't allocate the dbus message");
- return 0;
- }
-
- dbus_error_init (&error);
- reply = dbus_connection_send_with_reply_and_block (manager->data->dbus_connection, message, -1, &error);
- dbus_message_unref (message);
- if (dbus_error_is_set (&error))
- {
- if (strcmp (error.name, "org.freedesktop.DBus.Error.UnknownMethod") != 0)
- nm_info ("Error from dhcdbd on 'reason' request because: name '%s', message '%s'.", error.name, error.message);
- dbus_error_free (&error);
- }
- if (reply)
- {
- if (!dbus_message_get_args (reply, &error, DBUS_TYPE_UINT32, &state, DBUS_TYPE_INVALID))
- state = 0;
- dbus_message_unref (reply);
- }
-
- return state;
-}
-
-
-/*
- * nm_dhcp_manager_handle_timeout
- *
- * Called after timeout of a DHCP transaction to notify device of the failure.
- *
- */
-gboolean nm_dhcp_manager_handle_timeout (NMActRequest *req)
-{
- NMData * data;
- NMDevice * dev;
-
- g_return_val_if_fail (req != NULL, FALSE);
-
- data = nm_act_request_get_data (req);
- g_assert (data);
-
- dev = nm_act_request_get_dev (req);
- g_assert (dev);
-
- nm_info ("Device '%s' DHCP transaction took too long (>25s), stopping it.", nm_device_get_iface (dev));
-
- if (nm_act_request_get_stage (req) == NM_ACT_STAGE_IP_CONFIG_START)
- {
- nm_act_request_set_dhcp_timeout (req, 0);
- nm_dhcp_manager_cancel_transaction (data->dhcp_manager, req);
- nm_device_activate_schedule_stage4_ip_config_timeout (req);
- }
-
- return FALSE;
-}
-
-
-gboolean nm_dhcp_manager_begin_transaction (NMDHCPManager *manager, NMActRequest *req)
-{
- DBusError error;
- DBusMessage * message;
- DBusMessage * reply;
- NMDevice * dev;
- char * path;
- const guint32 opt1 = 31; /* turns off ALL actions and dhclient-script just writes options to dhcdbd */
- const guint32 opt2 = 2; /* dhclient is run in ONE SHOT mode and releases existing leases when brought down */
- GSource * source;
-
- g_return_val_if_fail (manager != NULL, FALSE);
- g_return_val_if_fail (req != NULL, FALSE);
-
- if (!manager->running)
- {
- if (nm_dhcp_manager_exec_daemon (manager) == FALSE)
- return FALSE;
- sleep (1);
- }
- else
- {
- /* Cancel any DHCP transaction already in progress */
- nm_dhcp_manager_cancel_transaction (manager, req);
- /* FIXME don't sleep */
- sleep (1);
- }
-
- dev = nm_act_request_get_dev (req);
- g_assert (dev);
-
- nm_info ("Activation (%s) Beginning DHCP transaction.", nm_device_get_iface (dev));
-
- path = g_strdup_printf (DHCP_OBJECT_PATH"/%s", nm_device_get_iface (dev));
- message = dbus_message_new_method_call (DHCP_SERVICE_NAME, path, DHCP_SERVICE_NAME, "up");
- g_free (path);
- if (message == NULL)
- {
- nm_warning ("nm_dhcp_manager_begin_transaction(): Couldn't allocate the dbus message");
- return FALSE;
- }
-
- dbus_message_append_args (message, DBUS_TYPE_UINT32, &opt1, DBUS_TYPE_UINT32, &opt2, DBUS_TYPE_INVALID);
- dbus_error_init (&error);
- if ((reply = dbus_connection_send_with_reply_and_block (manager->data->dbus_connection, message, -1, &error)))
- dbus_message_unref (reply);
- dbus_message_unref (message);
- if (dbus_error_is_set (&error))
- {
- nm_info ("Couldn't send DHCP 'up' message because: name '%s', message '%s'.", error.name, error.message);
- dbus_error_free (&error);
- return FALSE;
- }
-
- /* Set up a timeout on the transaction to kill it after 25s */
- source = g_timeout_source_new (25000);
- g_source_set_callback (source, (GSourceFunc) nm_dhcp_manager_handle_timeout, req, NULL);
- nm_act_request_set_dhcp_timeout (req, g_source_attach (source, manager->data->main_context));
- g_source_unref (source);
-
- return TRUE;
-}
-
-
-static void remove_timeout (NMDHCPManager *manager, NMActRequest *req)
-{
- guint id;
-
- g_return_if_fail (manager != NULL);
- g_return_if_fail (req != NULL);
-
- /* Remove any pending timeouts on the request */
- if ((id = nm_act_request_get_dhcp_timeout (req)) > 0)
- {
- GSource * source = g_main_context_find_source_by_id (manager->data->main_context, id);
- nm_act_request_set_dhcp_timeout (req, 0);
- g_source_destroy (source);
- }
-}
-
-/*
- * nm_dhcp_manager_cancel_transaction
- *
- * Stop any in-progress DHCP transaction on a particular device.
- *
- */
-void nm_dhcp_manager_cancel_transaction (NMDHCPManager *manager, NMActRequest *req)
-{
- NMDevice *dev;
-
- g_return_if_fail (manager != NULL);
- g_return_if_fail (req != NULL);
-
- dev = nm_act_request_get_dev (req);
- g_assert (dev);
-
- if (manager->running && !state_is_down (nm_act_request_get_dhcp_state (req)))
- {
- DBusMessage * message;
- char * path = g_strdup_printf (DHCP_OBJECT_PATH"/%s", nm_device_get_iface (dev));
-
- if ((message = dbus_message_new_method_call (DHCP_SERVICE_NAME, path, DHCP_SERVICE_NAME, "down")))
- {
- dbus_connection_send (manager->data->dbus_connection, message, NULL);
- dbus_message_unref (message);
- }
- g_free (path);
-
- remove_timeout (manager, req);
- }
-}
-
-
-static gboolean get_ip4_uint32s (NMDHCPManager *manager, NMDevice *dev, const char *item, guint32 **ip4_uint32, guint32 *num_items)
-{
- DBusMessage * message = NULL;
- DBusMessage * reply = NULL;
- char * path;
- gboolean success = FALSE;
-
- g_return_val_if_fail (manager != NULL, FALSE);
- g_return_val_if_fail (dev != NULL, FALSE);
- g_return_val_if_fail (ip4_uint32 != NULL, FALSE);
- g_return_val_if_fail (num_items != NULL, FALSE);
-
- *ip4_uint32 = NULL;
- *num_items = 0;
- path = g_strdup_printf (DHCP_OBJECT_PATH"/%s", nm_device_get_iface (dev));
- if ((message = dbus_message_new_method_call (DHCP_SERVICE_NAME, path, DHCP_SERVICE_NAME".dbus.get", item)))
- {
- DBusError error;
-
- dbus_error_init (&error);
- reply = dbus_connection_send_with_reply_and_block (manager->data->dbus_connection, message, -1, &error);
- if (reply)
- {
- GArray *buffer;
- DBusMessageIter iter;
-
- dbus_message_iter_init (reply, &iter);
-
- buffer = g_array_new (TRUE, TRUE, sizeof (guint32));
- while (dbus_message_iter_get_arg_type (&iter) == DBUS_TYPE_UINT32)
- {
- guint32 value;
-
- dbus_message_iter_get_basic (&iter, &value);
- g_array_append_val (buffer, value);
- dbus_message_iter_next (&iter);
- success = TRUE;
- }
-
- if (success)
- {
- *ip4_uint32 = (guint32 *)(buffer->data);
- *num_items = buffer->len;
- }
- g_array_free (buffer, FALSE);
- dbus_message_unref (reply);
- }
-
- if (dbus_error_is_set (&error))
- {
- nm_warning ("get_ip4_uint32(): error calling '%s', DHCP daemon returned error '%s', message '%s'.", item, error.name, error.message);
- dbus_error_free (&error);
- }
- dbus_message_unref (message);
- }
- g_free (path);
-
- return success;
-}
-
-
-static gboolean get_ip4_string (NMDHCPManager *manager, NMDevice *dev, const char *item, char **string)
-{
- DBusMessage * message = NULL;
- DBusMessage * reply = NULL;
- char * path;
- gboolean success = FALSE;
-
- g_return_val_if_fail (manager != NULL, FALSE);
- g_return_val_if_fail (dev != NULL, FALSE);
- g_return_val_if_fail (string != NULL, FALSE);
-
- *string = NULL;
- path = g_strdup_printf (DHCP_OBJECT_PATH"/%s", nm_device_get_iface (dev));
- if ((message = dbus_message_new_method_call (DHCP_SERVICE_NAME, path, DHCP_SERVICE_NAME".dbus.get", item)))
- {
- DBusError error;
-
- dbus_error_init (&error);
- if ((reply = dbus_connection_send_with_reply_and_block (manager->data->dbus_connection, message, -1, &error)))
- {
- char *dbus_string;
-
- dbus_error_init (&error);
- if (dbus_message_get_args (reply, &error, DBUS_TYPE_STRING, &dbus_string, DBUS_TYPE_INVALID))
- {
- *string = g_strdup (dbus_string);
- success = TRUE;
- }
- }
-
- if (dbus_error_is_set (&error))
- {
- nm_warning ("get_ip4_string(): error calling '%s', DHCP daemon returned error '%s', message '%s'.", item, error.name, error.message);
- dbus_error_free (&error);
- *string = NULL;
- }
- dbus_message_unref (message);
- }
- g_free (path);
-
- return success;
-}
-
-
-/*
- * nm_dhcp_manager_get_ip4_config
- *
- * Get IP4 configuration values from the DHCP daemon
- *
- */
-NMIP4Config * nm_dhcp_manager_get_ip4_config (NMDHCPManager *manager, NMActRequest *req)
-{
- NMDevice * dev;
- NMIP4Config * ip4_config = NULL;
- int i;
- guint32 count = 0;
- guint32 * ip4_address = NULL;
- guint32 * ip4_netmask = NULL;
- guint32 * ip4_broadcast = NULL;
- guint32 * ip4_nameservers = NULL;
- guint32 * ip4_gateway = NULL;
- guint32 num_ip4_nameservers = 0;
- char * domain_names = NULL;
- struct in_addr temp_addr;
-
- g_return_val_if_fail (manager != NULL, NULL);
- g_return_val_if_fail (req != NULL, NULL);
-
- if (!manager->running)
- return NULL;
-
- dev = nm_act_request_get_dev (req);
- g_assert (dev);
-
- if (!state_is_bound (nm_act_request_get_dhcp_state (req)))
- {
- nm_warning ("Tried to get IP4 Config for a device when dhcdbd wasn't in a BOUND state!");
- return NULL;
- }
-
- if (!get_ip4_uint32s (manager, dev, "ip_address", &ip4_address, &count) || !count)
- goto out;
-
- if (!get_ip4_uint32s (manager, dev, "subnet_mask", &ip4_netmask, &count) || !count)
- goto out;
-
- if (!get_ip4_uint32s (manager, dev, "broadcast_address", &ip4_broadcast, &count) || !count)
- goto out;
-
- if (!get_ip4_uint32s (manager, dev, "routers", &ip4_gateway, &count) || !count)
- {
- /* If DHCP doesn't have a 'routers', just use the DHCP server's address as our gateway for now */
- if (!get_ip4_uint32s (manager, dev, "dhcp_server_identifier", &ip4_gateway, &count) || !count)
- goto out;
- }
-
- if (!get_ip4_uint32s (manager, dev, "domain_name_servers", &ip4_nameservers, &num_ip4_nameservers) || !num_ip4_nameservers)
- goto out;
-
- get_ip4_string (manager, dev, "domain_name", &domain_names);
-
- nm_info ("Retrieved the following IP4 configuration from the DHCP daemon:");
-
- ip4_config = nm_ip4_config_new ();
- nm_ip4_config_set_address (ip4_config, ip4_address[0]);
- temp_addr.s_addr = ip4_address[0];
- nm_info (" address %s", inet_ntoa (temp_addr));
-
- nm_ip4_config_set_netmask (ip4_config, ip4_netmask[0]);
- temp_addr.s_addr = ip4_netmask[0];
- nm_info (" netmask %s", inet_ntoa (temp_addr));
-
- nm_ip4_config_set_broadcast (ip4_config, ip4_broadcast[0]);
- temp_addr.s_addr = ip4_broadcast[0];
- nm_info (" broadcast %s", inet_ntoa (temp_addr));
-
- nm_ip4_config_set_gateway (ip4_config, ip4_gateway[0]);
- temp_addr.s_addr = ip4_gateway[0];
- nm_info (" gateway %s", inet_ntoa (temp_addr));
-
- for (i = 0; i < num_ip4_nameservers; i++)
- {
- nm_ip4_config_add_nameserver (ip4_config, ip4_nameservers[i]);
- temp_addr.s_addr = ip4_nameservers[i];
- nm_info (" nameserver %s", inet_ntoa (temp_addr));
- }
-
- if (domain_names)
- {
- char **searches = g_strsplit (domain_names, " ", 0);
- char **s;
-
- for (s = searches; *s; s++)
- {
- nm_info (" domain name '%s'", *s);
- nm_ip4_config_add_domain (ip4_config, *s);
- }
- g_strfreev (searches);
- }
-
-out:
- return ip4_config;
-}
-
-
-/*
- * nm_dhcp_manager_process_signal
- *
- * Possibly process a signal from the bus, if it comes from the currently
- * active DHCP daemon, if any. Return TRUE if processed, FALSE if not.
- *
- */
-gboolean nm_dhcp_manager_process_signal (NMDHCPManager *manager, DBusMessage *message)
-{
- const char * object_path;
- const char * member;
- const char * interface;
- gboolean handled = FALSE;
- NMDevice * dev;
- NMActRequest * req = NULL;
-
- g_return_val_if_fail (manager != NULL, FALSE);
- g_return_val_if_fail (message != NULL, FALSE);
-
- if (!(object_path = dbus_message_get_path (message)))
- return FALSE;
- if (!(member = dbus_message_get_member (message)))
- return FALSE;
- if (!(interface = dbus_message_get_interface (message)))
- return FALSE;
-
- /* nm_info ("nm_dhcp_manager_process_signal(): got signal op='%s' member='%s' interface='%s'", object_path, member, interface); */
-
- dev = nm_get_device_by_iface (manager->data, member);
- if (dev && (req = nm_device_get_act_request (dev)))
- {
- if (dbus_message_is_signal (message, "com.redhat.dhcp.state", nm_device_get_iface (dev)))
- {
- guint8 state;
-
- if (dbus_message_get_args (message, NULL, DBUS_TYPE_BYTE, &state, DBUS_TYPE_INVALID))
- {
- nm_info ("DHCP daemon state now %d for interface %s", state, nm_device_get_iface (dev));
- switch (state)
- {
- case 2: /* BOUND */
- case 3: /* RENEW */
- case 4: /* REBOOT */
- case 5: /* REBIND */
- if (nm_act_request_get_stage (req) == NM_ACT_STAGE_IP_CONFIG_START)
- {
- nm_device_activate_schedule_stage4_ip_config_get (req);
- remove_timeout (manager, req);
- }
- break;
-
- case 8: /* TIMEOUT - timed out trying to contact server */
- if (nm_act_request_get_stage (req) == NM_ACT_STAGE_IP_CONFIG_START)
- {
- nm_device_activate_schedule_stage4_ip_config_timeout (req);
- remove_timeout (manager, req);
- }
- break;
-
- case 9: /* FAIL */
- case 13: /* ABEND */
-// case 14: /* END */
- if (nm_act_request_get_stage (req) == NM_ACT_STAGE_IP_CONFIG_START)
- {
- nm_policy_schedule_activation_failed (req);
- remove_timeout (manager, req);
- }
- break;
-
- default:
- break;
- }
- nm_act_request_set_dhcp_state (req, state);
- }
-
- handled = TRUE;
- }
- }
-
- return handled;
-}
-
-
-/*
- * nm_dhcp_manager_process_name_owner_changed
- *
- * Respond to "service created"/"service deleted" signals from dbus for the active DHCP daemon.
- *
- */
-gboolean nm_dhcp_manager_process_name_owner_changed (NMDHCPManager *manager, const char *changed_service_name, const char *old_owner, const char *new_owner)
-{
- gboolean handled = FALSE;
- gboolean old_owner_good = (old_owner && strlen (old_owner));
- gboolean new_owner_good = (new_owner && strlen (new_owner));
-
- g_return_val_if_fail (manager != NULL, FALSE);
- g_return_val_if_fail (changed_service_name != NULL, FALSE);
-
- /* Can't handle the signal if its not from the DHCP service */
- if (strcmp (DHCP_SERVICE_NAME, changed_service_name) != 0)
- return FALSE;
-
- if (!old_owner_good && new_owner_good)
- {
- char *match = get_dhcp_match_string (new_owner);
-
- /* DHCP service got created */
- dbus_bus_add_match (manager->data->dbus_connection, match, NULL);
- g_free (match);
-
- manager->running = TRUE;
- handled = TRUE;
- }
- else if (old_owner_good && !new_owner_good)
- {
- char *match = get_dhcp_match_string (old_owner);
-
- /* DHCP service went away */
- dbus_bus_remove_match (manager->data->dbus_connection, match, NULL);
- g_free (match);
-
- manager->running = FALSE;
- handled = TRUE;
- }
-
- return handled;
-}
-
-
diff --git a/src/dhcp-manager/nm-dhcp-manager.h b/src/dhcp-manager/nm-dhcp-manager.h
deleted file mode 100644
index a139ca96c3..0000000000
--- a/src/dhcp-manager/nm-dhcp-manager.h
+++ /dev/null
@@ -1,42 +0,0 @@
-/* nm-dhcp-manager.c - Handle the DHCP daemon for NetworkManager
- *
- * Copyright (C) 2005 Dan Williams
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
- * 02111-1307, USA.
- */
-
-#ifndef NM_DHCP_MANAGER_H
-#define NM_DHCP_MANAGER_H
-
-#include "NetworkManagerMain.h"
-#include "NetworkManagerDevice.h"
-
-char * get_dhcp_match_string (const char *owner);
-
-NMDHCPManager * nm_dhcp_manager_new (NMData *data);
-void nm_dhcp_manager_dispose (NMDHCPManager *manager);
-
-gboolean nm_dhcp_manager_begin_transaction (NMDHCPManager *manager, NMActRequest *req);
-void nm_dhcp_manager_cancel_transaction (NMDHCPManager *manager, NMActRequest *req);
-
-NMIP4Config * nm_dhcp_manager_get_ip4_config (NMDHCPManager *manager, NMActRequest *req);
-
-gboolean nm_dhcp_manager_process_signal (NMDHCPManager *manager, DBusMessage *message);
-gboolean nm_dhcp_manager_process_name_owner_changed (NMDHCPManager *manager, const char *changed_service_name, const char *old_owner, const char *new_owner);
-
-guint8 nm_dhcp_manager_get_state_for_device (NMDHCPManager *manager, NMDevice *dev);
-
-#endif
diff --git a/src/gnome-keyring-md5.c b/src/gnome-keyring-md5.c
deleted file mode 100644
index 4ea0729c14..0000000000
--- a/src/gnome-keyring-md5.c
+++ /dev/null
@@ -1,291 +0,0 @@
-/*
- * This code implements the MD5 message-digest algorithm.
- * The algorithm is due to Ron Rivest. This code was
- * written by Colin Plumb in 1993, no copyright is claimed.
- * This code is in the public domain; do with it what you wish.
- *
- * Equivalent code is available from RSA Data Security, Inc.
- * This code has been tested against that, and is equivalent,
- * except that you don't need to include two pages of legalese
- * with every copy.
- *
- * To compute the message digest of a chunk of bytes, declare an
- * GnomeKeyringMD5Context structure, pass it to gnome_keyring_md5_init, call
- * gnome_keyring_md5_update as needed on buffers full of bytes, and then call
- * gnome_keyring_md5_final, which will fill a supplied 32-byte array with the
- * digest in ascii form.
- *
- */
-
-#include "gnome-keyring-md5.h"
-#include <string.h>
-
-static void gnome_keyring_md5_transform (guint32 buf[4],
- guint32 const in[16]);
-
-void
-gnome_keyring_md5_string (const char *string, unsigned char digest[16])
-{
- struct GnomeKeyringMD5Context md5_context;
-
- gnome_keyring_md5_init (&md5_context);
- gnome_keyring_md5_update (&md5_context, string, strlen (string));
- gnome_keyring_md5_final (digest, &md5_context);
-}
-
-#if G_BYTE_ORDER == G_LITTLE_ENDIAN
-#define byteReverse(buf, len) /* Nothing */
-#else
-
-/*
- * Note: this code is harmless on little-endian machines.
- */
-static void
-byteReverse(unsigned char *buf, unsigned longs)
-{
- guint32 t;
- do {
- t = (guint32) ((unsigned) buf[3] << 8 | buf[2]) << 16 |
- ((unsigned) buf[1] << 8 | buf[0]);
- *(guint32 *) buf = t;
- buf += 4;
- } while (--longs);
-}
-
-#endif
-
-char *
-gnome_keyring_md5_digest_to_ascii (unsigned char digest[16])
-{
- static char hex_digits[] = "0123456789abcdef";
- unsigned char *res;
- int i;
-
- res = g_malloc (33);
-
- for (i = 0; i < 16; i++) {
- res[2*i] = hex_digits[digest[i] >> 4];
- res[2*i+1] = hex_digits[digest[i] & 0xf];
- }
-
- res[32] = 0;
-
- return res;
-}
-
-
-/*
- * Start MD5 accumulation. Set bit count to 0 and buffer to mysterious
- * initialization constants.
- */
-void
-gnome_keyring_md5_init (struct GnomeKeyringMD5Context *ctx)
-{
- ctx->buf[0] = 0x67452301;
- ctx->buf[1] = 0xefcdab89;
- ctx->buf[2] = 0x98badcfe;
- ctx->buf[3] = 0x10325476;
-
- ctx->bits[0] = 0;
- ctx->bits[1] = 0;
-}
-
-/*
- * Update context to reflect the concatenation of another buffer full
- * of bytes.
- */
-void
-gnome_keyring_md5_update (struct GnomeKeyringMD5Context *ctx,
- unsigned char const *buf,
- unsigned len)
-{
- guint32 t;
-
- /* Update bitcount */
-
- t = ctx->bits[0];
- if ((ctx->bits[0] = t + ((guint32) len << 3)) < t)
- ctx->bits[1]++; /* Carry from low to high */
- ctx->bits[1] += len >> 29;
-
- t = (t >> 3) & 0x3f; /* Bytes already in shsInfo->data */
-
- /* Handle any leading odd-sized chunks */
-
- if (t) {
- unsigned char *p = (unsigned char *) ctx->in + t;
-
- t = 64 - t;
- if (len < t) {
- memcpy (p, buf, len);
- return;
- }
- memcpy (p, buf, t);
- byteReverse (ctx->in, 16);
- gnome_keyring_md5_transform (ctx->buf, (guint32 *) ctx->in);
- buf += t;
- len -= t;
- }
-
- /* Process data in 64-byte chunks */
-
- while (len >= 64) {
- memcpy (ctx->in, buf, 64);
- byteReverse (ctx->in, 16);
- gnome_keyring_md5_transform (ctx->buf, (guint32 *) ctx->in);
- buf += 64;
- len -= 64;
- }
-
- /* Handle any remaining bytes of data. */
-
- memcpy(ctx->in, buf, len);
-}
-
-/*
- * Final wrapup - pad to 64-byte boundary with the bit pattern
- * 1 0* (64-bit count of bits processed, MSB-first)
- */
-void
-gnome_keyring_md5_final (unsigned char digest[16], struct GnomeKeyringMD5Context *ctx)
-{
- unsigned count;
- unsigned char *p;
-
- /* Compute number of bytes mod 64 */
- count = (ctx->bits[0] >> 3) & 0x3F;
-
- /* Set the first char of padding to 0x80. This is safe since there is
- always at least one byte free */
- p = ctx->in + count;
- *p++ = 0x80;
-
- /* Bytes of padding needed to make 64 bytes */
- count = 64 - 1 - count;
-
- /* Pad out to 56 mod 64 */
- if (count < 8) {
- /* Two lots of padding: Pad the first block to 64 bytes */
- memset (p, 0, count);
- byteReverse (ctx->in, 16);
- gnome_keyring_md5_transform (ctx->buf, (guint32 *) ctx->in);
-
- /* Now fill the next block with 56 bytes */
- memset(ctx->in, 0, 56);
- } else {
- /* Pad block to 56 bytes */
- memset(p, 0, count - 8);
- }
- byteReverse(ctx->in, 14);
-
- /* Append length in bits and transform */
- ((guint32 *) ctx->in)[14] = ctx->bits[0];
- ((guint32 *) ctx->in)[15] = ctx->bits[1];
-
- gnome_keyring_md5_transform (ctx->buf, (guint32 *) ctx->in);
- byteReverse ((unsigned char *) ctx->buf, 4);
- memcpy (digest, ctx->buf, 16);
- memset (ctx, 0, sizeof(ctx)); /* In case it's sensitive */
-}
-
-
-/* The four core functions - F1 is optimized somewhat */
-
-#define F1(x, y, z) (z ^ (x & (y ^ z)))
-#define F2(x, y, z) F1 (z, x, y)
-#define F3(x, y, z) (x ^ y ^ z)
-#define F4(x, y, z) (y ^ (x | ~z))
-
-/* This is the central step in the MD5 algorithm. */
-#define gnome_keyring_md5_step(f, w, x, y, z, data, s) \
- ( w += f(x, y, z) + data, w = w<<s | w>>(32-s), w += x )
-
-/*
- * The core of the MD5 algorithm, this alters an existing MD5 hash to
- * reflect the addition of 16 longwords of new data. GnomeKeyringMD5Update blocks
- * the data and converts bytes into longwords for this routine.
- */
-static void
-gnome_keyring_md5_transform (guint32 buf[4], guint32 const in[16])
-{
- register guint32 a, b, c, d;
-
- a = buf[0];
- b = buf[1];
- c = buf[2];
- d = buf[3];
-
- gnome_keyring_md5_step(F1, a, b, c, d, in[0] + 0xd76aa478, 7);
- gnome_keyring_md5_step(F1, d, a, b, c, in[1] + 0xe8c7b756, 12);
- gnome_keyring_md5_step(F1, c, d, a, b, in[2] + 0x242070db, 17);
- gnome_keyring_md5_step(F1, b, c, d, a, in[3] + 0xc1bdceee, 22);
- gnome_keyring_md5_step(F1, a, b, c, d, in[4] + 0xf57c0faf, 7);
- gnome_keyring_md5_step(F1, d, a, b, c, in[5] + 0x4787c62a, 12);
- gnome_keyring_md5_step(F1, c, d, a, b, in[6] + 0xa8304613, 17);
- gnome_keyring_md5_step(F1, b, c, d, a, in[7] + 0xfd469501, 22);
- gnome_keyring_md5_step(F1, a, b, c, d, in[8] + 0x698098d8, 7);
- gnome_keyring_md5_step(F1, d, a, b, c, in[9] + 0x8b44f7af, 12);
- gnome_keyring_md5_step(F1, c, d, a, b, in[10] + 0xffff5bb1, 17);
- gnome_keyring_md5_step(F1, b, c, d, a, in[11] + 0x895cd7be, 22);
- gnome_keyring_md5_step(F1, a, b, c, d, in[12] + 0x6b901122, 7);
- gnome_keyring_md5_step(F1, d, a, b, c, in[13] + 0xfd987193, 12);
- gnome_keyring_md5_step(F1, c, d, a, b, in[14] + 0xa679438e, 17);
- gnome_keyring_md5_step(F1, b, c, d, a, in[15] + 0x49b40821, 22);
-
- gnome_keyring_md5_step(F2, a, b, c, d, in[1] + 0xf61e2562, 5);
- gnome_keyring_md5_step(F2, d, a, b, c, in[6] + 0xc040b340, 9);
- gnome_keyring_md5_step(F2, c, d, a, b, in[11] + 0x265e5a51, 14);
- gnome_keyring_md5_step(F2, b, c, d, a, in[0] + 0xe9b6c7aa, 20);
- gnome_keyring_md5_step(F2, a, b, c, d, in[5] + 0xd62f105d, 5);
- gnome_keyring_md5_step(F2, d, a, b, c, in[10] + 0x02441453, 9);
- gnome_keyring_md5_step(F2, c, d, a, b, in[15] + 0xd8a1e681, 14);
- gnome_keyring_md5_step(F2, b, c, d, a, in[4] + 0xe7d3fbc8, 20);
- gnome_keyring_md5_step(F2, a, b, c, d, in[9] + 0x21e1cde6, 5);
- gnome_keyring_md5_step(F2, d, a, b, c, in[14] + 0xc33707d6, 9);
- gnome_keyring_md5_step(F2, c, d, a, b, in[3] + 0xf4d50d87, 14);
- gnome_keyring_md5_step(F2, b, c, d, a, in[8] + 0x455a14ed, 20);
- gnome_keyring_md5_step(F2, a, b, c, d, in[13] + 0xa9e3e905, 5);
- gnome_keyring_md5_step(F2, d, a, b, c, in[2] + 0xfcefa3f8, 9);
- gnome_keyring_md5_step(F2, c, d, a, b, in[7] + 0x676f02d9, 14);
- gnome_keyring_md5_step(F2, b, c, d, a, in[12] + 0x8d2a4c8a, 20);
-
- gnome_keyring_md5_step(F3, a, b, c, d, in[5] + 0xfffa3942, 4);
- gnome_keyring_md5_step(F3, d, a, b, c, in[8] + 0x8771f681, 11);
- gnome_keyring_md5_step(F3, c, d, a, b, in[11] + 0x6d9d6122, 16);
- gnome_keyring_md5_step(F3, b, c, d, a, in[14] + 0xfde5380c, 23);
- gnome_keyring_md5_step(F3, a, b, c, d, in[1] + 0xa4beea44, 4);
- gnome_keyring_md5_step(F3, d, a, b, c, in[4] + 0x4bdecfa9, 11);
- gnome_keyring_md5_step(F3, c, d, a, b, in[7] + 0xf6bb4b60, 16);
- gnome_keyring_md5_step(F3, b, c, d, a, in[10] + 0xbebfbc70, 23);
- gnome_keyring_md5_step(F3, a, b, c, d, in[13] + 0x289b7ec6, 4);
- gnome_keyring_md5_step(F3, d, a, b, c, in[0] + 0xeaa127fa, 11);
- gnome_keyring_md5_step(F3, c, d, a, b, in[3] + 0xd4ef3085, 16);
- gnome_keyring_md5_step(F3, b, c, d, a, in[6] + 0x04881d05, 23);
- gnome_keyring_md5_step(F3, a, b, c, d, in[9] + 0xd9d4d039, 4);
- gnome_keyring_md5_step(F3, d, a, b, c, in[12] + 0xe6db99e5, 11);
- gnome_keyring_md5_step(F3, c, d, a, b, in[15] + 0x1fa27cf8, 16);
- gnome_keyring_md5_step(F3, b, c, d, a, in[2] + 0xc4ac5665, 23);
-
- gnome_keyring_md5_step(F4, a, b, c, d, in[0] + 0xf4292244, 6);
- gnome_keyring_md5_step(F4, d, a, b, c, in[7] + 0x432aff97, 10);
- gnome_keyring_md5_step(F4, c, d, a, b, in[14] + 0xab9423a7, 15);
- gnome_keyring_md5_step(F4, b, c, d, a, in[5] + 0xfc93a039, 21);
- gnome_keyring_md5_step(F4, a, b, c, d, in[12] + 0x655b59c3, 6);
- gnome_keyring_md5_step(F4, d, a, b, c, in[3] + 0x8f0ccc92, 10);
- gnome_keyring_md5_step(F4, c, d, a, b, in[10] + 0xffeff47d, 15);
- gnome_keyring_md5_step(F4, b, c, d, a, in[1] + 0x85845dd1, 21);
- gnome_keyring_md5_step(F4, a, b, c, d, in[8] + 0x6fa87e4f, 6);
- gnome_keyring_md5_step(F4, d, a, b, c, in[15] + 0xfe2ce6e0, 10);
- gnome_keyring_md5_step(F4, c, d, a, b, in[6] + 0xa3014314, 15);
- gnome_keyring_md5_step(F4, b, c, d, a, in[13] + 0x4e0811a1, 21);
- gnome_keyring_md5_step(F4, a, b, c, d, in[4] + 0xf7537e82, 6);
- gnome_keyring_md5_step(F4, d, a, b, c, in[11] + 0xbd3af235, 10);
- gnome_keyring_md5_step(F4, c, d, a, b, in[2] + 0x2ad7d2bb, 15);
- gnome_keyring_md5_step(F4, b, c, d, a, in[9] + 0xeb86d391, 21);
-
- buf[0] += a;
- buf[1] += b;
- buf[2] += c;
- buf[3] += d;
-}
-
diff --git a/src/gnome-keyring-md5.h b/src/gnome-keyring-md5.h
deleted file mode 100644
index f3fd5be560..0000000000
--- a/src/gnome-keyring-md5.h
+++ /dev/null
@@ -1,22 +0,0 @@
-#ifndef GNOME_KEYRING_MD5_H
-#define GNOME_KEYRING_MD5_H
-
-#include <glib.h>
-
-struct GnomeKeyringMD5Context {
- guint32 buf[4];
- guint32 bits[2];
- unsigned char in[64];
-};
-
-char *gnome_keyring_md5_digest_to_ascii (unsigned char digest[16]);
-void gnome_keyring_md5_string (const char *string,
- unsigned char digest[16]);
-void gnome_keyring_md5_init (struct GnomeKeyringMD5Context *ctx);
-void gnome_keyring_md5_update (struct GnomeKeyringMD5Context *ctx,
- unsigned char const *buf,
- unsigned len);
-void gnome_keyring_md5_final (unsigned char digest[16],
- struct GnomeKeyringMD5Context *ctx);
-
-#endif /* GNOME_KEYRING_MD5_H */
diff --git a/src/named-manager/.cvsignore b/src/named-manager/.cvsignore
deleted file mode 100644
index 282522db03..0000000000
--- a/src/named-manager/.cvsignore
+++ /dev/null
@@ -1,2 +0,0 @@
-Makefile
-Makefile.in
diff --git a/src/named-manager/Makefile.am b/src/named-manager/Makefile.am
deleted file mode 100644
index d62edf8fb0..0000000000
--- a/src/named-manager/Makefile.am
+++ /dev/null
@@ -1,14 +0,0 @@
-namedconf_DATA = named.conf
-namedconfdir = $(pkgdatadir)
-
-EXTRA_DIST = $(namedconf_DATA)
-
-INCLUDES = -I${top_srcdir}/utils
-
-noinst_LTLIBRARIES = libnamed-manager.la
-
-libnamed_manager_la_SOURCES = nm-named-manager.h nm-named-manager.c
-
-libnamed_manager_la_CPPFLAGS = $(DBUS_CFLAGS) $(GTHREAD_CFLAGS) -DNM_PKGDATADIR=\"$(pkgdatadir)\" -DNM_LOCALSTATEDIR=\"$(localstatedir)\"
-
-libnamed_manager_la_LIBADD = $(DBUS_LIBS) $(GTHREAD_LIBS)
diff --git a/src/named-manager/named.conf b/src/named-manager/named.conf
deleted file mode 100644
index 0e2e42c11f..0000000000
--- a/src/named-manager/named.conf
+++ /dev/null
@@ -1,15 +0,0 @@
-// Named configuration, generated by NetworkManager
-
-options {
- directory "/";
- query-source address * port *;
- forward only;
- forwarders { @@FORWARDERS@@ };
- listen-on { 127.0.0.1; };
- pid-file "@@PID_FILE@@";
-};
-
-// Disable rndc
-controls { };
-
-@@DOMAIN_ZONES@@
diff --git a/src/named-manager/nm-named-manager.c b/src/named-manager/nm-named-manager.c
deleted file mode 100644
index 393299006d..0000000000
--- a/src/named-manager/nm-named-manager.c
+++ /dev/null
@@ -1,827 +0,0 @@
-/*
- * Copyright (C) 2004 Red Hat, Inc.
- *
- * Written by Colin Walters <walters@redhat.com>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- *
- */
-
-#include "config.h"
-#include "nm-named-manager.h"
-#include <stdio.h>
-#include <string.h>
-#include <sys/stat.h>
-#include <sys/wait.h>
-#include <ftw.h>
-#include <unistd.h>
-#include <signal.h>
-#include <stdlib.h>
-#include <errno.h>
-#include <resolv.h>
-#include <fcntl.h>
-#include <sys/socket.h>
-#include <sys/param.h>
-#include <syslog.h>
-#include <glib.h>
-#include "nm-utils.h"
-
-#ifdef HAVE_SELINUX
-#include <selinux/selinux.h>
-#endif
-
-#ifndef RESOLV_CONF
-#define RESOLV_CONF "/etc/resolv.conf"
-#endif
-
-/* From NetworkManagerSystem.h/.c */
-void nm_system_update_dns (void);
-
-enum
-{
- PROP_0,
- PROP_CONTEXT,
-};
-
-G_DEFINE_TYPE(NMNamedManager, nm_named_manager, G_TYPE_OBJECT)
-
-static void nm_named_manager_finalize (GObject *object);
-static void nm_named_manager_dispose (GObject *object);
-static GObject *nm_named_manager_constructor (GType type, guint n_construct_properties,
- GObjectConstructParam *construct_properties);
-static void nm_named_manager_set_property (GObject *object,
- guint prop_id,
- const GValue *value,
- GParamSpec *pspec);
-static void nm_named_manager_get_property (GObject *object,
- guint prop_id,
- GValue *value,
- GParamSpec *pspec);
-static gboolean rewrite_resolv_conf (NMNamedManager *mgr, GError **error);
-
-struct NMNamedManagerPrivate
-{
- gboolean use_named;
- GPid named_pid;
- guint spawn_count;
- GMainContext *main_context;
- GSource *child_watch;
- GSource *queued_reload;
-
- guint id_serial;
- GHashTable *domain_searches; /* guint -> char * */
- GHashTable *global_ipv4_nameservers; /* guint -> char * */
- GHashTable *domain_ipv4_nameservers; /* char * -> GHashTable(guint -> char *) */
-
- char *named_conf;
- char *named_pid_file;
-
- gboolean disposed;
-};
-
-static void
-nm_named_manager_class_init (NMNamedManagerClass *klass)
-{
- GObjectClass *object_class = G_OBJECT_CLASS (klass);
-
- object_class->dispose = nm_named_manager_dispose;
- object_class->finalize = nm_named_manager_finalize;
- object_class->constructor = nm_named_manager_constructor;
- object_class->set_property = nm_named_manager_set_property;
- object_class->get_property = nm_named_manager_get_property;
-
- g_object_class_install_property (object_class,
- PROP_CONTEXT,
- g_param_spec_pointer ("context",
- "GMainContext",
- "Main context",
- G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
-}
-
-static void
-nm_named_manager_init (NMNamedManager *mgr)
-{
- mgr->priv = g_new0 (NMNamedManagerPrivate, 1);
-
-#ifdef NM_NO_NAMED
- mgr->priv->use_named = FALSE;
-#else
- mgr->priv->use_named = TRUE;
-#endif
-
- mgr->priv->domain_searches = g_hash_table_new_full (NULL, NULL,
- NULL, (GDestroyNotify) g_free);
- mgr->priv->global_ipv4_nameservers = g_hash_table_new_full (NULL, NULL,
- NULL, (GDestroyNotify) g_free);
- mgr->priv->domain_ipv4_nameservers = g_hash_table_new_full (g_str_hash, g_str_equal,
- g_free,
- (GDestroyNotify) g_hash_table_destroy);
-}
-
-static void
-nm_named_manager_set_property (GObject *object,
- guint prop_id,
- const GValue *value,
- GParamSpec *pspec)
-{
- NMNamedManager *mgr = NM_NAMED_MANAGER (object);
-
- switch (prop_id)
- {
- case PROP_CONTEXT:
- mgr->priv->main_context = g_value_get_pointer (value);
- g_main_context_ref (mgr->priv->main_context);
- break;
- default:
- G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
- break;
- }
-}
-
-static void
-nm_named_manager_get_property (GObject *object,
- guint prop_id,
- GValue *value,
- GParamSpec *pspec)
-{
- NMNamedManager *mgr = NM_NAMED_MANAGER (object);
-
- switch (prop_id)
- {
- case PROP_CONTEXT:
- g_value_set_pointer (value, mgr->priv->main_context);
- default:
- G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
- break;
- }
-}
-
-static void
-nm_named_manager_dispose (GObject *object)
-{
- NMNamedManager *mgr = NM_NAMED_MANAGER (object);
-
- if (mgr->priv->disposed)
- return;
- mgr->priv->disposed = TRUE;
-
-#ifndef NM_NO_NAMED
- /* Write out a correct resolv.conf when we quit so that
- * resolv.conf isn't stuck pointing to 127.0.0.1.
- */
- mgr->priv->use_named = FALSE;
- rewrite_resolv_conf (mgr, NULL);
-#endif
-
- if (mgr->priv->named_conf)
- unlink (mgr->priv->named_conf);
- if (mgr->priv->named_pid_file)
- unlink (mgr->priv->named_pid_file);
- if (mgr->priv->named_pid > 0)
- kill (mgr->priv->named_pid, SIGTERM);
- if (mgr->priv->child_watch)
- g_source_destroy (mgr->priv->child_watch);
- if (mgr->priv->main_context)
- g_main_context_unref (mgr->priv->main_context);
-
-}
-
-static void
-nm_named_manager_finalize (GObject *object)
-{
- NMNamedManager *mgr = NM_NAMED_MANAGER (object);
-
- g_return_if_fail (mgr->priv != NULL);
-
- g_hash_table_destroy (mgr->priv->domain_searches);
- g_hash_table_destroy (mgr->priv->global_ipv4_nameservers);
- g_hash_table_destroy (mgr->priv->domain_ipv4_nameservers);
-
- g_free (mgr->priv->named_pid_file);
- g_free (mgr->priv->named_conf);
-
- g_free (mgr->priv);
-
- G_OBJECT_CLASS (nm_named_manager_parent_class)->finalize (object);
-}
-
-static GObject *
-nm_named_manager_constructor (GType type, guint n_construct_properties,
- GObjectConstructParam *construct_properties)
-{
- NMNamedManager *mgr;
- NMNamedManagerClass *klass;
- GObjectClass *parent_class;
-
- klass = NM_NAMED_MANAGER_CLASS (g_type_class_peek (NM_TYPE_NAMED_MANAGER));
-
- parent_class = G_OBJECT_CLASS (g_type_class_peek_parent (klass));
-
- mgr = NM_NAMED_MANAGER (parent_class->constructor (type, n_construct_properties,
- construct_properties));
-
-
- return G_OBJECT (mgr);
-}
-
-NMNamedManager *
-nm_named_manager_new (GMainContext *main_context)
-{
- return NM_NAMED_MANAGER (g_object_new (NM_TYPE_NAMED_MANAGER,
- "context",
- main_context,
- NULL));
-}
-
-GQuark
-nm_named_manager_error_quark (void)
-{
- static GQuark quark = 0;
- if (!quark)
- quark = g_quark_from_static_string ("nm_named_manager_error");
-
- return quark;
-}
-
-static void
-join_forwarders (gpointer key, gpointer value, gpointer data)
-{
- guint id = GPOINTER_TO_UINT (key);
- const char *server = value;
- GString *str = data;
-
- g_string_append_c (str, ' ');
- g_string_append (str, server);
- g_string_append_c (str, ';');
-}
-
-static char *
-compute_global_forwarders (NMNamedManager *mgr)
-{
- GString *str = g_string_new ("");
-
- g_hash_table_foreach (mgr->priv->global_ipv4_nameservers,
- join_forwarders,
- str);
- return g_string_free (str, FALSE);
-}
-
-static void
-compute_zone (gpointer key, gpointer value, gpointer data)
-{
- const char *domain = key;
- GHashTable *servers = value;
- GString *str = data;
-
- g_string_append_c (str, '\n');
- g_string_append (str, " zone \"");
- g_string_append (str, domain);
- g_string_append (str, "\"\n");
- g_string_append (str, " forwarders {");
-
- g_hash_table_foreach (servers, join_forwarders, str);
- g_string_append (str, "}\n}\n");
-}
-
-static char *
-compute_domain_zones (NMNamedManager *mgr)
-{
- GString *str = g_string_new ("");
-
- g_hash_table_foreach (mgr->priv->domain_ipv4_nameservers,
- compute_zone,
- str);
- return g_string_free (str, FALSE);
-}
-
-gboolean
-generate_named_conf (NMNamedManager *mgr, GError **error)
-{
- gboolean ret = FALSE;
-
-#ifdef NM_NO_NAMED
- if (mgr->priv->use_named == FALSE)
- return rewrite_resolv_conf (mgr, error);
-
-#else
- int out_fd;
- char *config_contents_str;
- char **config_contents;
- char **line;
- const char *config_name;
-
- config_name = NM_PKGDATADIR "/named.conf";
-
- if (!mgr->priv->named_pid_file)
- mgr->priv->named_pid_file = g_build_filename (NM_NAMED_DATA_DIR,
- "NetworkManager-pid-named",
- NULL);
-
- if (!mgr->priv->named_conf)
- mgr->priv->named_conf = g_build_filename (NM_NAMED_DATA_DIR,
- "NetworkManager-named.conf",
- NULL);
- unlink (mgr->priv->named_conf);
- out_fd = open (mgr->priv->named_conf, O_WRONLY|O_CREAT|O_TRUNC, 0644);
- if (out_fd < 0)
- {
- g_set_error (error,
- G_FILE_ERROR,
- G_FILE_ERROR_EXIST,
- "Couldn't create %s: %s",
- mgr->priv->named_conf,
- g_strerror (errno));
- return FALSE;
- }
- /* This is needed to work around the Fedora Core 3
- * SELinux policy for named. We need it to be able
- * to read the config file created by NetworkManager,
- * which runs in unconfined_t
- */
-#if 0
-#ifdef HAVE_SELINUX
- {
- char *context;
- if (matchpathcon (mgr->priv->named_conf, 0, &context) < 0)
- syslog (LOG_WARNING, "matchpathcon(%s) failed: %s",
- mgr->priv->named_conf, strerror (errno));
- else if (fsetfilecon(out_fd, context) < 0)
- syslog (LOG_WARNING, "fsetfilecon failed: %s",
- strerror (errno));
- }
-#endif
-#endif
-
- if (!g_file_get_contents (config_name,
- &config_contents_str,
- NULL,
- error))
- {
- close (out_fd);
- return FALSE;
- }
-
- config_contents = g_strsplit (config_contents_str,
- "\n",
- 0);
- g_free (config_contents_str);
-
- for (line = config_contents; *line; line++)
- {
- const char *variable_pos;
- const char *variable_end_pos;
-
- if ((variable_pos = strstr (*line, "@@"))
- && (variable_end_pos = strstr (variable_pos + 2, "@@")))
- {
- char *variable;
- char *replacement = NULL;
-
- variable = g_strndup (variable_pos + 2,
- variable_end_pos - (variable_pos + 2));
- if (strcmp ("LOCALSTATEDIR", variable) == 0)
- replacement = g_strdup (NM_LOCALSTATEDIR);
- else if (strcmp ("PID_FILE", variable) == 0)
- replacement = g_strdup (mgr->priv->named_pid_file);
- else if (strcmp ("FORWARDERS", variable) == 0)
- replacement = compute_global_forwarders (mgr);
- else if (strcmp ("DOMAIN_ZONES", variable) == 0)
- replacement = compute_domain_zones (mgr);
- else
- {
- syslog (LOG_WARNING, "Unknown variable %s in %s",
- variable, config_name);
- if (write (out_fd, *line, strlen (*line)) < 0)
- goto replacement_lose;
- }
-
- if (write (out_fd, *line, variable_pos - *line) < 0)
- goto replacement_lose;
- if (write (out_fd, replacement, strlen (replacement)) < 0)
- goto replacement_lose;
- if (write (out_fd, variable_end_pos + 2, strlen (variable_end_pos + 2)) < 0)
- goto replacement_lose;
- if (write (out_fd, "\n", 1) < 0)
- goto replacement_lose;
-
- g_free (variable);
- g_free (replacement);
- continue;
- replacement_lose:
- ret = FALSE;
- g_free (variable);
- g_free (replacement);
- goto write_lose;
- } else {
- if (write (out_fd, *line, strlen (*line)) < 0) {
- ret = FALSE;
- goto write_lose;
- }
- }
- if (write (out_fd, "\n", 1) < 0) {
- ret = FALSE;
- goto write_lose;
- }
- }
-
- ret = TRUE;
-write_lose:
- close (out_fd);
- g_strfreev (config_contents);
-#endif
- return ret;
-}
-
-static void
-watch_cb (GPid pid, gint status, gpointer data)
-{
- NMNamedManager *mgr = NM_NAMED_MANAGER (data);
-
- if (WIFEXITED (status))
- syslog (LOG_WARNING, "named exited with error code %d", WEXITSTATUS (status));
- else if (WIFSTOPPED (status))
- syslog (LOG_WARNING, "named stopped unexpectedly with signal %d", WSTOPSIG (status));
- else if (WIFSIGNALED (status))
- syslog (LOG_WARNING, "named died with signal %d", WTERMSIG (status));
- else
- syslog (LOG_WARNING, "named died from an unknown cause");
-
- if (mgr->priv->queued_reload) {
- g_source_destroy (mgr->priv->queued_reload);
- mgr->priv->queued_reload = NULL;
- }
-
- /* FIXME - do something with error; need to handle failure to
- * respawn */
- mgr->priv->named_pid = 0;
- nm_named_manager_start (mgr, NULL);
-}
-
-gboolean
-nm_named_manager_start (NMNamedManager *mgr, GError **error)
-{
-#ifndef NM_NO_NAMED
- GPid pid;
- const char *named_binary;
- GPtrArray *named_argv;
-
- mgr->priv->named_pid = 0;
-
- mgr->priv->spawn_count++;
- if (mgr->priv->spawn_count > 5)
- {
- g_set_error (error,
- NM_NAMED_MANAGER_ERROR,
- NM_NAMED_MANAGER_ERROR_SYSTEM,
- "named crashed more than 5 times, refusing to try again");
- return FALSE;
- }
-
- if (!generate_named_conf (mgr, error))
- return FALSE;
-
- named_argv = g_ptr_array_new ();
- named_binary = g_getenv ("NM_NAMED_BINARY_PATH") ?
- g_getenv ("NM_NAMED_BINARY_PATH") : NM_NAMED_BINARY_PATH;
- g_ptr_array_add (named_argv, (char *) named_binary);
- g_ptr_array_add (named_argv, "-f");
- g_ptr_array_add (named_argv, "-u");
- g_ptr_array_add (named_argv, NM_NAMED_USER);
- g_ptr_array_add (named_argv, "-c");
- g_ptr_array_add (named_argv, mgr->priv->named_conf);
- g_ptr_array_add (named_argv, NULL);
-
- if (!g_spawn_async (NULL, (char **) named_argv->pdata, NULL,
- G_SPAWN_LEAVE_DESCRIPTORS_OPEN |
- G_SPAWN_DO_NOT_REAP_CHILD,
- NULL, NULL, &pid,
- error))
- {
- g_ptr_array_free (named_argv, TRUE);
- return FALSE;
- }
- g_ptr_array_free (named_argv, TRUE);
- nm_info ("named started with pid %d", pid);
- mgr->priv->named_pid = pid;
- if (mgr->priv->child_watch)
- g_source_destroy (mgr->priv->child_watch);
- mgr->priv->child_watch = g_child_watch_source_new (pid);
- g_source_set_callback (mgr->priv->child_watch, (GSourceFunc) watch_cb, mgr, NULL);
- g_source_attach (mgr->priv->child_watch, mgr->priv->main_context);
- g_source_unref (mgr->priv->child_watch);
- mgr->priv->child_watch = NULL;
-#endif
-
- if (!rewrite_resolv_conf (mgr, error))
- {
- kill (mgr->priv->named_pid, SIGTERM);
- mgr->priv->named_pid = 0;
- return FALSE;
- }
-
- return TRUE;
-}
-
-static gboolean
-reload_named (NMNamedManager *mgr, GError **error)
-{
- /* FIXME - handle error */
- if (!generate_named_conf (mgr, error))
- return FALSE;
-#ifndef NM_NO_NAMED
- if (kill (mgr->priv->named_pid, SIGHUP) < 0) {
- g_set_error (error,
- NM_NAMED_MANAGER_ERROR,
- NM_NAMED_MANAGER_ERROR_SYSTEM,
- "Couldn't signal nameserver: %s",
- g_strerror (errno));
- return FALSE;
- }
-#endif
- return TRUE;
-}
-
-static gboolean
-validate_host (const char *server, GError **error)
-{
- for (; *server; server++)
- {
- if (!(g_ascii_isalpha (*server)
- || g_ascii_isdigit (*server)
- || *server == '-'
- || *server == '.'))
- {
- g_set_error (error,
- NM_NAMED_MANAGER_ERROR,
- NM_NAMED_MANAGER_ERROR_INVALID_HOST,
- "Invalid characters in host");
- return FALSE;
- }
- }
- return TRUE;
-}
-
-static void
-compute_search (gpointer key, gpointer value, gpointer data)
-{
- const char *server = value;
- GString *str = data;
-
- g_string_append_c (str, ' ');
- g_string_append (str, server);
-}
-
-static char *
-compute_domain_searches (NMNamedManager *mgr)
-{
- GString *str = g_string_new ("");
-
- if (g_hash_table_size (mgr->priv->domain_searches) > 0)
- {
- g_string_append (str, "search");
- /* FIXME: Technically you can only have 6 search domains, but we
- * pretty much ignore that here for the moment.
- */
- g_hash_table_foreach (mgr->priv->domain_searches,
- compute_search,
- str);
- }
- return g_string_free (str, FALSE);
-}
-
-static void
-write_nameserver (gpointer key, gpointer value, gpointer data)
-{
- guint id = GPOINTER_TO_UINT (key);
- const char *server = value;
- FILE *f = data;
-
- fprintf (f, "nameserver %s\n", server);
-
-}
-
-static gboolean
-rewrite_resolv_conf (NMNamedManager *mgr, GError **error)
-{
- const char *tmp_resolv_conf = RESOLV_CONF ".tmp";
- char *searches = NULL;
- FILE *f;
-
- if ((f = fopen (tmp_resolv_conf, "w")) == NULL)
- goto lose;
-
- searches = compute_domain_searches (mgr);
- if (fprintf (f, "%s","; generated by NetworkManager, do not edit!\n\n") < 0) {
- goto lose;
- }
-
- if (mgr->priv->use_named == TRUE) {
- /* Using caching-nameserver & local DNS */
- if (fprintf (f, "%s%s%s", "; Use a local caching nameserver controlled by NetworkManager\n\n", searches, "\n\nnameserver 127.0.0.1\n") < 0) {
- goto lose;
- }
- } else {
- /* Using glibc resolver, we need this in the NM_NO_NAMED == FALSE
- * case too, to write out correct resolv.conf when we quit.
- */
- fprintf (f, "%s\n\n", searches);
- g_hash_table_foreach (mgr->priv->global_ipv4_nameservers,
- write_nameserver,
- f);
- }
- g_free (searches);
- if (fclose (f) < 0)
- goto lose;
-
- if (rename (tmp_resolv_conf, RESOLV_CONF) < 0)
- goto lose;
- nm_system_update_dns ();
- return TRUE;
-
- lose:
- g_free (searches);
- g_set_error (error,
- NM_NAMED_MANAGER_ERROR,
- NM_NAMED_MANAGER_ERROR_SYSTEM,
- "Could not update " RESOLV_CONF ": %s\n", g_strerror (errno));
- return FALSE;
-}
-
-guint
-nm_named_manager_add_domain_search (NMNamedManager *mgr,
- const char *domain,
- GError **error)
-{
- guint id;
-
- if (!validate_host (domain, error))
- return 0;
-
- id = ++mgr->priv->id_serial;
-
- g_hash_table_insert (mgr->priv->domain_searches,
- GUINT_TO_POINTER (id),
- g_strdup (domain));
- if (!rewrite_resolv_conf (mgr, error)) {
- g_hash_table_remove (mgr->priv->global_ipv4_nameservers,
- GUINT_TO_POINTER (id));
- return 0;
- }
- return id;
-}
-
-gboolean
-nm_named_manager_remove_domain_search (NMNamedManager *mgr,
- guint id,
- GError **error)
-{
- if (!g_hash_table_remove (mgr->priv->domain_searches,
- GUINT_TO_POINTER (id)))
- {
- g_set_error (error,
- NM_NAMED_MANAGER_ERROR,
- NM_NAMED_MANAGER_ERROR_INVALID_ID,
- "Invalid domain search id");
- return FALSE;
- }
- if (!rewrite_resolv_conf (mgr, error))
- return FALSE;
- return TRUE;
-}
-
-guint
-nm_named_manager_add_nameserver_ipv4 (NMNamedManager *mgr,
- const char *server,
- GError **error)
-{
- guint id;
-
- if (!validate_host (server, error))
- return 0;
-
- id = ++mgr->priv->id_serial;
-
- g_hash_table_insert (mgr->priv->global_ipv4_nameservers,
- GUINT_TO_POINTER (id),
- g_strdup (server));
- if (!reload_named (mgr, error)) {
- g_hash_table_remove (mgr->priv->global_ipv4_nameservers,
- GUINT_TO_POINTER (id));
- return 0;
- }
- return id;
-}
-
-guint
-nm_named_manager_add_domain_nameserver_ipv4 (NMNamedManager *mgr,
- const char *domain,
- const char *server,
- GError **error)
-{
- GHashTable *servers;
- guint id;
-
- if (!validate_host (server, error))
- return 0;
-
- id = ++mgr->priv->id_serial;
-
- servers = g_hash_table_lookup (mgr->priv->domain_ipv4_nameservers,
- domain);
- if (!servers)
- {
- servers = g_hash_table_new_full (NULL, NULL,
- NULL, (GDestroyNotify) g_free);
- g_hash_table_insert (mgr->priv->domain_ipv4_nameservers,
- g_strdup (domain),
- servers);
- }
- g_hash_table_insert (servers,
- GUINT_TO_POINTER (id),
- g_strdup (server));
- if (!reload_named (mgr, error)) {
- g_hash_table_remove (servers, domain);
- return 0;
- }
- return id;
-}
-
-gboolean
-nm_named_manager_remove_nameserver_ipv4 (NMNamedManager *mgr,
- guint id,
- GError **error)
-{
- if (!g_hash_table_remove (mgr->priv->global_ipv4_nameservers,
- GUINT_TO_POINTER (id)))
- {
- g_set_error (error,
- NM_NAMED_MANAGER_ERROR,
- NM_NAMED_MANAGER_ERROR_INVALID_ID,
- "Invalid nameserver id");
- return FALSE;
- }
-
- if (!reload_named (mgr, error))
- return FALSE;
-
- return TRUE;
-}
-
-typedef struct {
- guint id;
- gboolean removed;
-} NMNamedManagerRemoveData;
-
-static void
-remove_domain_id (gpointer key, gpointer value, gpointer data)
-{
- const char *domain = key;
- GHashTable *servers = value;
- NMNamedManagerRemoveData *removedata = data;
-
- if (removedata->removed)
- return;
-
- if (g_hash_table_remove (servers, GUINT_TO_POINTER (removedata->id)))
- removedata->removed = TRUE;
-}
-
-gboolean
-nm_named_manager_remove_domain_nameserver_ipv4 (NMNamedManager *mgr,
- guint id,
- GError **error)
-{
- NMNamedManagerRemoveData data;
-
- data.id = id;
- data.removed = FALSE;
-
- g_hash_table_foreach (mgr->priv->domain_ipv4_nameservers,
- remove_domain_id,
- &data);
- if (!data.removed)
- {
- g_set_error (error,
- NM_NAMED_MANAGER_ERROR,
- NM_NAMED_MANAGER_ERROR_INVALID_ID,
- "Invalid nameserver id");
- return FALSE;
- }
-
- if (!reload_named (mgr, error))
- return FALSE;
-
- return TRUE;
-}
diff --git a/src/named-manager/nm-named-manager.h b/src/named-manager/nm-named-manager.h
deleted file mode 100644
index 48ed680fd6..0000000000
--- a/src/named-manager/nm-named-manager.h
+++ /dev/null
@@ -1,93 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
- * Copyright (C) 2004 Red Hat, Inc.
- *
- * Written by Colin Walters <walters@redhat.com>
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * License along with this program; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-#ifndef __NM_NAMED_MANAGER_H__
-#define __NM_NAMED_MANAGER_H__
-
-#include "config.h"
-#include <glib-object.h>
-
-typedef enum
-{
- NM_NAMED_MANAGER_ERROR_SYSTEM,
- NM_NAMED_MANAGER_ERROR_INVALID_NAMESERVER,
- NM_NAMED_MANAGER_ERROR_INVALID_HOST,
- NM_NAMED_MANAGER_ERROR_INVALID_ID
-} NMNamedManagerError;
-
-#define NM_NAMED_MANAGER_ERROR nm_named_manager_error_quark ()
-GQuark nm_named_manager_error_quark (void);
-
-G_BEGIN_DECLS
-
-#define NM_TYPE_NAMED_MANAGER (nm_named_manager_get_type ())
-#define NM_NAMED_MANAGER(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), NM_TYPE_NAMED_MANAGER, NMNamedManager))
-#define NM_NAMED_MANAGER_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), NM_TYPE_NAMED_MANAGER, NMNamedManagerClass))
-#define NM_IS_NAMED_MANAGER(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), NM_TYPE_NAMED_MANAGER))
-#define NM_IS_NAMED_MANAGER_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), NM_TYPE_NAMED_MANAGER))
-#define NM_NAMED_MANAGER_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), NM_TYPE_NAMED_MANAGER, NMNamedManagerClass))
-
-typedef struct NMNamedManagerPrivate NMNamedManagerPrivate;
-
-typedef struct
-{
- GObject parent;
-
- NMNamedManagerPrivate *priv;
-} NMNamedManager;
-
-typedef struct
-{
- GObjectClass parent;
-
-} NMNamedManagerClass;
-
-GType nm_named_manager_get_type (void);
-
-NMNamedManager * nm_named_manager_new (GMainContext *main_context);
-
-gboolean nm_named_manager_start (NMNamedManager *mgr, GError **error);
-
-guint nm_named_manager_add_domain_search (NMNamedManager *mgr,
- const char *domain,
- GError **error);
-guint nm_named_manager_add_nameserver_ipv4 (NMNamedManager *mgr,
- const char *server,
- GError **error);
-guint nm_named_manager_add_domain_nameserver_ipv4 (NMNamedManager *mgr,
- const char *domain,
- const char *server,
- GError **error);
-
-gboolean nm_named_manager_remove_domain_search (NMNamedManager *mgr,
- guint id,
- GError **error);
-gboolean nm_named_manager_remove_nameserver_ipv4 (NMNamedManager *mgr,
- guint id,
- GError **error);
-gboolean nm_named_manager_remove_domain_nameserver_ipv4 (NMNamedManager *mgr,
- guint id,
- GError **error);
-
-G_END_DECLS
-
-#endif /* __NM_NAMED_MANAGER_H__ */
diff --git a/src/nm-activation-request.c b/src/nm-activation-request.c
deleted file mode 100644
index 8f59a774de..0000000000
--- a/src/nm-activation-request.c
+++ /dev/null
@@ -1,242 +0,0 @@
-/* NetworkManager -- Network link manager
- *
- * Dan Williams <dcbw@redhat.com>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- *
- * (C) Copyright 2005 Red Hat, Inc.
- */
-
-
-#include <glib.h>
-#include <string.h>
-#include <dbus/dbus.h>
-#include "nm-activation-request.h"
-#include "NetworkManagerDevice.h"
-#include "NetworkManagerDbus.h"
-#include "nm-dhcp-manager.h"
-#include "nm-utils.h"
-
-
-struct NMActRequest
-{
- int refcount;
- NMData * data;
- NMDevice * dev;
- NMAccessPoint * ap;
- NMIP4Config * ip4_config;
-
- gboolean user_requested;
-
- NMActStage stage;
- DBusPendingCall * user_key_pcall;
-
- guint8 dhcp_state;
- guint dhcp_timeout;
-};
-
-
-NMActRequest * nm_act_request_new (NMData *data, NMDevice *dev, NMAccessPoint *ap, gboolean user_requested)
-{
- NMActRequest * req;
-
- g_return_val_if_fail (data != NULL, NULL);
- g_return_val_if_fail (dev != NULL, NULL);
-
- if (nm_device_is_wireless (dev))
- g_return_val_if_fail (ap != NULL, NULL);
-
- req = g_malloc0 (sizeof (NMActRequest));
- req->refcount = 1;
- req->data = data;
-
- nm_device_ref (dev);
- req->dev = dev;
-
- if (ap)
- nm_ap_ref (ap);
- req->ap = ap;
-
- req->user_requested = user_requested;
- req->dhcp_state = nm_dhcp_manager_get_state_for_device (data->dhcp_manager, dev);
-
- return req;
-}
-
-void nm_act_request_ref (NMActRequest *req)
-{
- g_return_if_fail (req != NULL);
-
- req->refcount++;
-}
-
-
-void nm_act_request_unref (NMActRequest *req)
-{
- g_return_if_fail (req != NULL);
-
- if (req->refcount == 1)
- {
- nm_device_unref (req->dev);
- if (req->ap)
- nm_ap_unref (req->ap);
-
- if (req->dhcp_timeout > 0)
- {
- GSource * source = g_main_context_find_source_by_id (req->data->main_context, req->dhcp_timeout);
- g_source_destroy (source);
- }
-
- memset (req, 0, sizeof (NMActRequest));
- }
- else
- req->refcount--;
-}
-
-NMDevice * nm_act_request_get_dev (NMActRequest *req)
-{
- g_return_val_if_fail (req != NULL, NULL);
-
- return req->dev;
-}
-
-
-NMData * nm_act_request_get_data (NMActRequest *req)
-{
- g_return_val_if_fail (req != NULL, NULL);
-
- return req->data;
-}
-
-
-NMAccessPoint * nm_act_request_get_ap (NMActRequest *req)
-{
- g_return_val_if_fail (req != NULL, NULL);
-
- return req->ap;
-}
-
-
-gboolean nm_act_request_get_user_requested (NMActRequest *req)
-{
- g_return_val_if_fail (req != NULL, FALSE);
-
- return req->user_requested;
-}
-
-
-NMIP4Config * nm_act_request_get_ip4_config (NMActRequest *req)
-{
- g_return_val_if_fail (req != NULL, NULL);
-
- return req->ip4_config;
-}
-
-void nm_act_request_set_ip4_config (NMActRequest *req, NMIP4Config *ip4_config)
-{
- g_return_if_fail (req != NULL);
-
- if (req->ip4_config)
- {
- nm_ip4_config_unref (req->ip4_config);
- req->ip4_config = NULL;
- }
- if (ip4_config)
- {
- nm_ip4_config_ref (ip4_config);
- req->ip4_config = ip4_config;
- }
-}
-
-NMActStage nm_act_request_get_stage (NMActRequest *req)
-{
- g_return_val_if_fail (req != NULL, NM_ACT_STAGE_UNKNOWN);
-
- return req->stage;
-}
-
-void nm_act_request_set_stage (NMActRequest *req, NMActStage stage)
-{
- DBusMessage * message;
- char * dev_path;
-
- g_return_if_fail (req != NULL);
-
- req->stage = stage;
-
- g_return_if_fail (req->data);
- g_return_if_fail (req->dev);
-
- if (!(dev_path = nm_dbus_get_object_path_for_device (req->dev)))
- return;
-
- if (!(message = dbus_message_new_signal (NM_DBUS_PATH, NM_DBUS_INTERFACE, "DeviceActivationStage")))
- {
- nm_warning ("nm_act_request_set_stage(): Not enough memory for new dbus message!");
- g_free (dev_path);
- return;
- }
-
- dbus_message_append_args (message, DBUS_TYPE_OBJECT_PATH, &dev_path, DBUS_TYPE_UINT32, &stage, DBUS_TYPE_INVALID);
- g_free (dev_path);
-
- if (!dbus_connection_send (req->data->dbus_connection, message, NULL))
- nm_warning ("nm_act_request_set_stage(): Could not raise the signal!");
-
- dbus_message_unref (message);
-}
-
-DBusPendingCall * nm_act_request_get_user_key_pending_call (NMActRequest *req)
-{
- g_return_val_if_fail (req != NULL, NULL);
-
- return req->user_key_pcall;
-}
-
-void nm_act_request_set_user_key_pending_call (NMActRequest *req, DBusPendingCall *pcall)
-{
- g_return_if_fail (req != NULL);
-
- req->user_key_pcall = pcall;
-}
-
-guint8 nm_act_request_get_dhcp_state (NMActRequest *req)
-{
- g_return_val_if_fail (req != NULL, 0);
-
- return req->dhcp_state;
-}
-
-void nm_act_request_set_dhcp_state (NMActRequest *req, guint8 dhcp_state)
-{
- g_return_if_fail (req != NULL);
-
- req->dhcp_state = dhcp_state;
-}
-
-guint nm_act_request_get_dhcp_timeout (NMActRequest *req)
-{
- g_return_val_if_fail (req != NULL, 0);
-
- return req->dhcp_timeout;
-}
-
-void nm_act_request_set_dhcp_timeout (NMActRequest *req, guint dhcp_timeout)
-{
- g_return_if_fail (req != NULL);
-
- req->dhcp_timeout = dhcp_timeout;
-}
-
diff --git a/src/nm-activation-request.h b/src/nm-activation-request.h
deleted file mode 100644
index e3ce6d34be..0000000000
--- a/src/nm-activation-request.h
+++ /dev/null
@@ -1,59 +0,0 @@
-/* NetworkManager -- Network link manager
- *
- * Dan Williams <dcbw@redhat.com>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- *
- * (C) Copyright 2005 Red Hat, Inc.
- */
-
-#ifndef NM_ACTIVATION_REQUEST_H
-#define NM_ACTIVATION_REQUEST_H
-
-#include <glib.h>
-#include <dbus/dbus.h>
-#include "NetworkManager.h"
-#include "NetworkManagerMain.h"
-#include "NetworkManagerDevice.h"
-#include "NetworkManagerAP.h"
-#include "nm-ip4-config.h"
-
-
-
-NMActRequest * nm_act_request_new (NMData *data, NMDevice *dev, NMAccessPoint *ap, gboolean user_requested);
-void nm_act_request_ref (NMActRequest *req);
-void nm_act_request_unref (NMActRequest *req);
-
-NMDevice * nm_act_request_get_dev (NMActRequest *req);
-NMData * nm_act_request_get_data (NMActRequest *req);
-NMAccessPoint * nm_act_request_get_ap (NMActRequest *req);
-gboolean nm_act_request_get_user_requested (NMActRequest *req);
-
-NMIP4Config * nm_act_request_get_ip4_config (NMActRequest *req);
-void nm_act_request_set_ip4_config (NMActRequest *req, NMIP4Config *ip4_config);
-
-NMActStage nm_act_request_get_stage (NMActRequest *req);
-void nm_act_request_set_stage (NMActRequest *req, NMActStage stage);
-
-DBusPendingCall * nm_act_request_get_user_key_pending_call (NMActRequest *req);
-void nm_act_request_set_user_key_pending_call (NMActRequest *req, DBusPendingCall *pcall);
-
-guint8 nm_act_request_get_dhcp_state (NMActRequest *req);
-void nm_act_request_set_dhcp_state (NMActRequest *req, guint8 dhcp_state);
-
-guint nm_act_request_get_dhcp_timeout (NMActRequest *req);
-void nm_act_request_set_dhcp_timeout (NMActRequest *req, guint dhcp_timeout);
-
-#endif
diff --git a/src/nm-dbus-device.c b/src/nm-dbus-device.c
deleted file mode 100644
index 68bad51aa0..0000000000
--- a/src/nm-dbus-device.c
+++ /dev/null
@@ -1,463 +0,0 @@
-/* NetworkManager -- Network link manager
- *
- * Dan Williams <dcbw@redhat.com>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- *
- * (C) Copyright 2005 Red Hat, Inc.
- */
-
-#include <glib.h>
-#include <dbus/dbus.h>
-#include <dbus/dbus-glib-lowlevel.h>
-#include <dbus/dbus-glib.h>
-#include <stdarg.h>
-#include <syslog.h>
-#include <netinet/ether.h>
-
-#include "nm-utils.h"
-#include "NetworkManagerDevice.h"
-#include "NetworkManagerDbus.h"
-#include "NetworkManagerDbusUtils.h"
-#include "NetworkManagerPolicy.h"
-#include "nm-dbus-device.h"
-
-
-static DBusMessage *nm_dbus_device_get_name (DBusConnection *connection, DBusMessage *message, NMDbusCBData *data)
-{
- DBusMessage *reply = NULL;
- NMDevice *dev;
-
- g_return_val_if_fail (data && data->data && data->dev && connection && message, NULL);
-
- dev = data->dev;
- if ((reply = dbus_message_new_method_return (message))) {
- const char *iface;
- iface = nm_device_get_iface (dev);
- dbus_message_append_args (reply, DBUS_TYPE_STRING, &iface, DBUS_TYPE_INVALID);
- }
-
- return reply;
-}
-
-static DBusMessage *nm_dbus_device_get_type (DBusConnection *connection, DBusMessage *message, NMDbusCBData *data)
-{
- DBusMessage *reply = NULL;
- NMDevice *dev;
-
- g_return_val_if_fail (data && data->data && data->dev && connection && message, NULL);
-
- dev = data->dev;
- if ((reply = dbus_message_new_method_return (message))) {
- dbus_int32_t type;
- type = nm_device_get_type (dev);
- dbus_message_append_args (reply, DBUS_TYPE_INT32, &type, DBUS_TYPE_INVALID);
- }
-
- return reply;
-}
-
-static DBusMessage *nm_dbus_device_get_hal_udi (DBusConnection *connection, DBusMessage *message, NMDbusCBData *data)
-{
- DBusMessage *reply = NULL;
- NMDevice *dev;
-
- g_return_val_if_fail (data && data->data && data->dev && connection && message, NULL);
-
- dev = data->dev;
- if ((reply = dbus_message_new_method_return (message))) {
- const char *udi;
- udi = nm_device_get_udi (dev);
- dbus_message_append_args (reply, DBUS_TYPE_STRING, &udi, DBUS_TYPE_INVALID);
- }
-
- return reply;
-}
-
-static DBusMessage *nm_dbus_device_get_ip4_address (DBusConnection *connection, DBusMessage *message, NMDbusCBData *data)
-{
- DBusMessage *reply = NULL;
- NMDevice *dev;
-
- g_return_val_if_fail (data && data->data && data->dev && connection && message, NULL);
-
- dev = data->dev;
- if ((reply = dbus_message_new_method_return (message))) {
- dbus_uint32_t address;
-
- address = nm_device_get_ip4_address (dev);
- dbus_message_append_args (reply, DBUS_TYPE_UINT32, &address, DBUS_TYPE_INVALID);
- }
-
- return reply;
-}
-
-static DBusMessage *nm_dbus_device_get_hw_address (DBusConnection *connection, DBusMessage *message, NMDbusCBData *data)
-{
- DBusMessage *reply = NULL;
- NMDevice *dev;
-
- g_return_val_if_fail (data && data->data && data->dev && connection && message, NULL);
-
- dev = data->dev;
- if ((reply = dbus_message_new_method_return (message)))
- {
- struct ether_addr addr;
- char char_addr[20];
- char *ptr = &char_addr[0];
-
- nm_device_get_hw_address (dev, &addr);
- memset (char_addr, 0, 20);
- ether_ntoa_r (&addr, &char_addr[0]);
- dbus_message_append_args (reply, DBUS_TYPE_STRING, &ptr, DBUS_TYPE_INVALID);
- }
-
- return reply;
-}
-
-static DBusMessage *nm_dbus_device_get_mode (DBusConnection *connection, DBusMessage *message, NMDbusCBData *data)
-{
- DBusMessage *reply = NULL;
- NMDevice *dev;
-
- g_return_val_if_fail (data && data->data && data->dev && connection && message, NULL);
-
- dev = data->dev;
- if ((reply = dbus_message_new_method_return (message))) {
- dbus_uint32_t mode;
- mode = nm_device_get_mode (dev);
- dbus_message_append_args (reply, DBUS_TYPE_UINT32, &mode, DBUS_TYPE_INVALID);
- }
-
- return reply;
-}
-
-static DBusMessage *nm_dbus_device_get_link_active (DBusConnection *connection, DBusMessage *message, NMDbusCBData *data)
-{
- DBusMessage *reply = NULL;
- NMDevice *dev;
-
- g_return_val_if_fail (data && data->data && data->dev && connection && message, NULL);
-
- dev = data->dev;
- if ((reply = dbus_message_new_method_return (message))) {
- dbus_bool_t is_active;
-
- is_active = nm_device_has_active_link (dev);
- dbus_message_append_args (reply, DBUS_TYPE_BOOLEAN, &is_active, DBUS_TYPE_INVALID);
- }
-
- return reply;
-}
-
-static DBusMessage *nm_dbus_device_get_strength (DBusConnection *connection, DBusMessage *message, NMDbusCBData *data)
-{
- DBusMessage *reply = NULL;
- NMDevice *dev;
-
- g_return_val_if_fail (data && data->data && data->dev && connection && message, NULL);
-
- /* Only wireless devices have signal strength */
- dev = data->dev;
- if (!nm_device_is_wireless (dev))
- {
- reply = nm_dbus_create_error_message (message, NM_DBUS_INTERFACE, "DeviceNotWireless",
- "Wired devices cannot have signal strength.");
- }
- else if ((reply = dbus_message_new_method_return (message))) {
- dbus_int32_t strength;
-
- strength = nm_device_get_signal_strength (dev);
- dbus_message_append_args (reply, DBUS_TYPE_INT32, &strength, DBUS_TYPE_INVALID);
- }
-
- return reply;
-}
-
-static DBusMessage *nm_dbus_device_get_active_network (DBusConnection *connection, DBusMessage *message, NMDbusCBData *data)
-{
- DBusMessage *reply = NULL;
- gboolean success = FALSE;
- NMDevice *dev;
-
- g_return_val_if_fail (data && data->data && data->dev && connection && message, NULL);
-
- /* Only wireless devices have an active network */
- dev = data->dev;
- if (!nm_device_is_wireless (dev))
- {
- reply = nm_dbus_create_error_message (message, NM_DBUS_INTERFACE, "DeviceNotWireless",
- "Wired devices cannot have active networks.");
- }
- else if ((reply = dbus_message_new_method_return (message)))
- {
- NMActRequest * req = nm_device_get_act_request (dev);
- NMAccessPoint * ap;
-
- if (req && (ap = nm_act_request_get_ap (req)))
- {
- NMAccessPoint *tmp_ap;
- char * object_path = NULL;
-
- if ( (tmp_ap = nm_device_ap_list_get_ap_by_essid (dev, nm_ap_get_essid (ap)))
- && (object_path = nm_dbus_get_object_path_for_network (dev, tmp_ap)))
- {
- dbus_message_append_args (reply, DBUS_TYPE_OBJECT_PATH, &object_path, DBUS_TYPE_INVALID);
- g_free (object_path);
- success = TRUE;
- }
- }
- if (!success)
- {
- dbus_message_unref (reply);
- reply = nm_dbus_create_error_message (message, NM_DBUS_INTERFACE, "NoActiveNetwork",
- "The device is not associated with any networks at this time.");
- }
- }
-
- return reply;
-}
-
-static DBusMessage *nm_dbus_device_get_networks (DBusConnection *connection, DBusMessage *message, NMDbusCBData *data)
-{
- DBusMessage *reply = NULL;
- NMDevice *dev;
-
- g_return_val_if_fail (data && data->data && data->dev && connection && message, NULL);
-
- /* Only wireless devices have networks */
- dev = data->dev;
- if (!nm_device_is_wireless (dev))
- {
- reply = nm_dbus_create_error_message (message, NM_DBUS_INTERFACE, "DeviceNotWireless",
- "Wired devices cannot see wireless networks.");
- }
- else if ((reply = dbus_message_new_method_return (message)))
- {
- DBusMessageIter iter;
- DBusMessageIter iter_array;
- NMAccessPoint *ap = NULL;
- gboolean success = FALSE;
- NMAccessPointList *ap_list;
- NMAPListIter *list_iter;
- char *object_path,
- *escaped_object_path;
-
- dbus_message_iter_init_append (reply, &iter);
- dbus_message_iter_open_container (&iter, DBUS_TYPE_ARRAY, DBUS_TYPE_OBJECT_PATH_AS_STRING, &iter_array);
-
- if ((ap_list = nm_device_ap_list_get (dev)))
- {
- if ((list_iter = nm_ap_list_iter_new (ap_list)))
- {
- while ((ap = nm_ap_list_iter_next (list_iter)))
- {
- if (nm_ap_get_essid (ap))
- {
- escaped_object_path = nm_dbus_get_object_path_for_network (dev, ap);
- dbus_message_iter_append_basic (&iter_array, DBUS_TYPE_OBJECT_PATH, &escaped_object_path);
- g_free (escaped_object_path);
- success = TRUE;
- }
- }
- nm_ap_list_iter_free (list_iter);
- }
- }
-
- dbus_message_iter_close_container (&iter, &iter_array);
-
- if (!success)
- {
- dbus_message_unref (reply);
- reply = nm_dbus_create_error_message (message, NM_DBUS_INTERFACE, "NoNetworks",
- "The device cannot see any wireless networks.");
- }
- }
-
- return reply;
-}
-
-static DBusMessage *nm_dbus_device_get_driver_support_level (DBusConnection *connection, DBusMessage *message, NMDbusCBData *data)
-{
- DBusMessage *reply = NULL;
- NMDevice *dev;
-
- g_return_val_if_fail (data && data->data && data->dev && connection && message, NULL);
-
- dev = data->dev;
- if ((reply = dbus_message_new_method_return (message)))
- {
- dbus_uint32_t driver_support_level = nm_device_get_driver_support_level (dev);
- dbus_message_append_args (reply, DBUS_TYPE_UINT32, &driver_support_level, DBUS_TYPE_INVALID);
- }
-
- return reply;
-}
-
-static DBusMessage *nm_dbus_device_set_link_active (DBusConnection *connection, DBusMessage *message, NMDbusCBData *data)
-{
- DBusMessage *reply = NULL;
- NMDevice *dev;
-
- g_return_val_if_fail (data && data->data && data->dev && connection && message, NULL);
-
- /* Can only set link status for active devices */
- dev = data->dev;
- if (!nm_device_is_test_device (dev))
- {
- reply = nm_dbus_create_error_message (message, NM_DBUS_INTERFACE, "NotTestDevice",
- "Only test devices can have their link status set manually.");
- }
- else if ((reply = dbus_message_new_method_return (message)))
- {
- DBusError error;
- gboolean link;
-
- dbus_error_init (&error);
- if (dbus_message_get_args (message, &error, DBUS_TYPE_BOOLEAN, &link, DBUS_TYPE_INVALID))
- {
- nm_device_set_link_active (dev, link);
- nm_policy_schedule_device_change_check (data->data);
- }
- }
-
- return reply;
-}
-
-static DBusMessage *nm_dbus_device_get_properties (DBusConnection *connection, DBusMessage *message, NMDbusCBData *data)
-{
- DBusMessage *reply = NULL;
- NMDevice *dev;
-
- g_return_val_if_fail (data && data->data && data->dev && connection && message, NULL);
-
- dev = data->dev;
- if ((reply = dbus_message_new_method_return (message)))
- {
- char * op = nm_dbus_get_object_path_for_device (dev);
- const char * iface = nm_device_get_iface (dev);
- dbus_uint32_t type = (dbus_uint32_t) nm_device_get_type (dev);
- const char * udi = nm_device_get_udi (dev);
- dbus_uint32_t ip4_address = (dbus_uint32_t) nm_device_get_ip4_address (dev);
- struct ether_addr hw_addr;
- char hw_addr_buf[20];
- char * hw_addr_buf_ptr = &hw_addr_buf[0];
- dbus_uint32_t mode = 0;
- dbus_int32_t strength = -1;
- char * active_network_path = NULL;
- dbus_bool_t link_active = (dbus_bool_t) nm_device_has_active_link (dev);
- dbus_uint32_t driver_support_level = (dbus_uint32_t) nm_device_get_driver_support_level (dev);
- char ** networks = NULL;
- int num_networks = 0;
- dbus_bool_t active = nm_device_get_act_request (dev) ? TRUE : FALSE;
- NMActStage act_stage = active ? nm_act_request_get_stage (nm_device_get_act_request (dev)) : NM_ACT_STAGE_UNKNOWN;
-
- nm_device_get_hw_address (dev, &hw_addr);
- memset (hw_addr_buf, 0, 20);
- ether_ntoa_r (&hw_addr, &hw_addr_buf[0]);
-
- if (nm_device_is_wireless (dev))
- {
- NMActRequest * req = nm_device_get_act_request (dev);
- NMAccessPoint * ap;
- NMAccessPointList * ap_list;
- NMAPListIter * iter;
-
- strength = (dbus_int32_t) nm_device_get_signal_strength (dev);
- mode = (dbus_uint32_t) nm_device_get_mode (dev);
-
- if (req && (ap = nm_act_request_get_ap (req)))
- {
- NMAccessPoint *tmp_ap;
-
- if ((tmp_ap = nm_device_ap_list_get_ap_by_essid (dev, nm_ap_get_essid (ap))))
- active_network_path = nm_dbus_get_object_path_for_network (dev, tmp_ap);
- }
-
- ap_list = nm_device_ap_list_get (dev);
- if (ap_list && (num_networks = nm_ap_list_size (ap_list)))
- {
- if ((iter = nm_ap_list_iter_new (ap_list)))
- {
- int i = 0;
- NMAccessPoint * ap;
-
- networks = g_malloc0 (sizeof (char *) * (num_networks + 1));
- while ((ap = nm_ap_list_iter_next (iter)))
- {
- char *ap_op = nm_dbus_get_object_path_for_network (dev, ap);
- if (ap_op)
- networks[i++] = ap_op;
- }
- num_networks = i; /* # actually added to array, since we can have NULL essid access points */
-
- nm_ap_list_iter_free (iter);
- }
- }
- }
- if (!active_network_path)
- active_network_path = g_strdup ("");
-
- dbus_message_append_args (reply, DBUS_TYPE_OBJECT_PATH, &op,
- DBUS_TYPE_STRING, &iface,
- DBUS_TYPE_UINT32, &type,
- DBUS_TYPE_STRING, &udi,
- DBUS_TYPE_BOOLEAN,&active,
- DBUS_TYPE_UINT32, &act_stage,
- DBUS_TYPE_UINT32, &ip4_address,
- DBUS_TYPE_STRING, &hw_addr_buf_ptr,
- DBUS_TYPE_UINT32, &mode,
- DBUS_TYPE_INT32, &strength,
- DBUS_TYPE_BOOLEAN,&link_active,
- DBUS_TYPE_UINT32, &driver_support_level,
- DBUS_TYPE_STRING, &active_network_path,
- DBUS_TYPE_ARRAY, DBUS_TYPE_STRING, &networks, num_networks,
- DBUS_TYPE_INVALID);
- g_free (op);
- g_free (active_network_path);
- g_strfreev (networks);
- }
-
- return reply;
-}
-
-
-/*
- * nm_dbus_device_methods_setup
- *
- * Register handlers for dbus methods on the org.freedesktop.NetworkManager.Devices object.
- *
- */
-NMDbusMethodList *nm_dbus_device_methods_setup (void)
-{
- NMDbusMethodList *list = nm_dbus_method_list_new (NULL);
-
- nm_dbus_method_list_add_method (list, "getProperties", nm_dbus_device_get_properties);
-
- nm_dbus_method_list_add_method (list, "getName", nm_dbus_device_get_name);
- nm_dbus_method_list_add_method (list, "getType", nm_dbus_device_get_type);
- nm_dbus_method_list_add_method (list, "getHalUdi", nm_dbus_device_get_hal_udi);
- nm_dbus_method_list_add_method (list, "getIP4Address", nm_dbus_device_get_ip4_address);
- nm_dbus_method_list_add_method (list, "getHWAddress", nm_dbus_device_get_hw_address);
- nm_dbus_method_list_add_method (list, "getMode", nm_dbus_device_get_mode);
- nm_dbus_method_list_add_method (list, "getStrength", nm_dbus_device_get_strength);
- nm_dbus_method_list_add_method (list, "getActiveNetwork", nm_dbus_device_get_active_network);
- nm_dbus_method_list_add_method (list, "getNetworks", nm_dbus_device_get_networks);
- nm_dbus_method_list_add_method (list, "getLinkActive", nm_dbus_device_get_link_active);
- nm_dbus_method_list_add_method (list, "setLinkActive", nm_dbus_device_set_link_active);
- nm_dbus_method_list_add_method (list, "getDriverSupportLevel", nm_dbus_device_get_driver_support_level);
-
- return (list);
-}
diff --git a/src/nm-dbus-device.h b/src/nm-dbus-device.h
deleted file mode 100644
index a3d4527062..0000000000
--- a/src/nm-dbus-device.h
+++ /dev/null
@@ -1,29 +0,0 @@
-/* NetworkManager -- Network link manager
- *
- * Dan Williams <dcbw@redhat.com>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- *
- * (C) Copyright 2005 Red Hat, Inc.
- */
-
-#ifndef NM_DBUS_DEVICE_H
-#define NM_DBUS_DEVICE_H
-
-
-NMDbusMethodList *nm_dbus_device_methods_setup (void);
-
-
-#endif
diff --git a/src/nm-dbus-net.c b/src/nm-dbus-net.c
deleted file mode 100644
index efb2dd1cd3..0000000000
--- a/src/nm-dbus-net.c
+++ /dev/null
@@ -1,291 +0,0 @@
-/* NetworkManager -- Network link manager
- *
- * Dan Williams <dcbw@redhat.com>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- *
- * (C) Copyright 2005 Red Hat, Inc.
- */
-
-#include "NetworkManagerDevice.h"
-#include "NetworkManagerDbus.h"
-#include "NetworkManagerAP.h"
-#include "NetworkManagerAPList.h"
-#include "NetworkManagerUtils.h"
-#include "nm-dbus-net.h"
-#include "nm-utils.h"
-
-/*
- * nm_dbus_get_ap_from_object_path
- *
- * Returns the network (ap) associated with a dbus object path
- *
- */
-static NMAccessPoint *nm_dbus_get_ap_from_object_path (const char *path, NMDevice *dev)
-{
- NMAccessPoint *ap = NULL;
- NMAccessPointList *ap_list;
- NMAPListIter *iter;
- char compare_path[100], *escaped_compare_path;
-
- g_return_val_if_fail (path != NULL, NULL);
- g_return_val_if_fail (dev != NULL, NULL);
-
- ap_list = nm_device_ap_list_get (dev);
- if (!ap_list)
- return (NULL);
-
- if (!(iter = nm_ap_list_iter_new (ap_list)))
- return (NULL);
-
- while ((ap = nm_ap_list_iter_next (iter)))
- {
- int len;
-
- snprintf (compare_path, 100, "%s/%s/Networks/%s", NM_DBUS_PATH_DEVICES,
- nm_device_get_iface (dev), nm_ap_get_essid (ap));
- escaped_compare_path = nm_dbus_escape_object_path (compare_path);
-
- len = strlen(escaped_compare_path);
- if (strncmp (path, escaped_compare_path, len) == 0)
- {
- /* Differentiate between 'foo' and 'foo-a' */
- if (path[len] == '\0' || path[len] == '/')
- {
- g_free (escaped_compare_path);
- break;
- }
- }
- g_free (escaped_compare_path);
- }
-
- nm_ap_list_iter_free (iter);
- return (ap);
-}
-
-
-static DBusMessage *nm_dbus_net_validate (DBusConnection *connection, DBusMessage *message, NMDbusCBData *data)
-{
- DBusMessage *reply = NULL;
- NMAccessPoint *ap;
- const char *path;
-
- g_return_val_if_fail (data && data->data && data->dev && connection && message, NULL);
-
- path = dbus_message_get_path (message);
- if ((ap = nm_dbus_get_ap_from_object_path (path, data->dev)))
- data->ap = ap;
- else
- {
- reply = nm_dbus_create_error_message (message, NM_DBUS_INTERFACE, "NetworkNotFound",
- "The requested network does not exist for this device.");
- }
-
- return reply;
-}
-
-static DBusMessage *nm_dbus_net_get_name (DBusConnection *connection, DBusMessage *message, NMDbusCBData *data)
-{
- DBusMessage *reply = NULL;
-
- g_return_val_if_fail (data && data->data && data->dev && data->ap && connection && message, NULL);
-
- if ((reply = dbus_message_new_method_return (message)))
- {
- const char *essid = nm_ap_get_essid (data->ap);
- dbus_message_append_args (reply, DBUS_TYPE_STRING, &essid, DBUS_TYPE_INVALID);
- }
-
- return reply;
-}
-
-static DBusMessage *nm_dbus_net_get_address (DBusConnection *connection, DBusMessage *message, NMDbusCBData *data)
-{
- DBusMessage *reply = NULL;
-
- g_return_val_if_fail (data && data->data && data->dev && data->ap && connection && message, NULL);
-
- if ((reply = dbus_message_new_method_return (message)))
- {
- char buf[20];
-
- memset (&buf[0], 0, 20);
- iw_ether_ntop((const struct ether_addr *) (nm_ap_get_address (data->ap)), &buf[0]);
- dbus_message_append_args (reply, DBUS_TYPE_STRING, &buf, DBUS_TYPE_INVALID);
- }
-
- return reply;
-}
-
-static DBusMessage *nm_dbus_net_get_strength (DBusConnection *connection, DBusMessage *message, NMDbusCBData *data)
-{
- DBusMessage *reply = NULL;
-
- g_return_val_if_fail (data && data->data && data->dev && data->ap && connection && message, NULL);
-
- /* We iterate over the device list and return the best strength for all
- * APs with the given ESSID.
- */
- if ((reply = dbus_message_new_method_return (message)))
- {
- NMAccessPoint *tmp_ap = NULL;
- NMAccessPointList *ap_list;
- NMAPListIter *iter;
- int best_strength = nm_ap_get_strength (data->ap);
-
- if (!(ap_list = nm_device_ap_list_get (data->dev)))
- goto append;
-
- if (!(iter = nm_ap_list_iter_new (ap_list)))
- goto append;
-
- /* Find best strength # among all APs that share this essid */
- while ((tmp_ap = nm_ap_list_iter_next (iter)))
- {
- if (nm_null_safe_strcmp (nm_ap_get_essid (data->ap), nm_ap_get_essid (tmp_ap)) == 0)
- if (nm_ap_get_strength (tmp_ap) > best_strength)
- best_strength = nm_ap_get_strength (tmp_ap);
- }
- nm_ap_list_iter_free (iter);
-
- append:
- dbus_message_append_args (reply, DBUS_TYPE_INT32, &best_strength, DBUS_TYPE_INVALID);
- }
-
- return reply;
-}
-
-static DBusMessage *nm_dbus_net_get_frequency (DBusConnection *connection, DBusMessage *message, NMDbusCBData *data)
-{
- DBusMessage *reply = NULL;
-
- g_return_val_if_fail (data && data->data && data->dev && data->ap && connection && message, NULL);
-
- if ((reply = dbus_message_new_method_return (message))) {
- double freq;
- freq = nm_ap_get_freq (data->ap);
- dbus_message_append_args (reply, DBUS_TYPE_DOUBLE, &freq, DBUS_TYPE_INVALID);
- }
-
- return reply;
-}
-
-static DBusMessage *nm_dbus_net_get_rate (DBusConnection *connection, DBusMessage *message, NMDbusCBData *data)
-{
- DBusMessage *reply = NULL;
-
- g_return_val_if_fail (data && data->data && data->dev && data->ap && connection && message, NULL);
-
- if ((reply = dbus_message_new_method_return (message))) {
- dbus_int32_t rate;
- rate = nm_ap_get_rate (data->ap);
- dbus_message_append_args (reply, DBUS_TYPE_INT32, &rate, DBUS_TYPE_INVALID);
- }
-
- return reply;
-}
-
-static DBusMessage *nm_dbus_net_get_encrypted (DBusConnection *connection, DBusMessage *message, NMDbusCBData *data)
-{
- DBusMessage *reply = NULL;
-
- g_return_val_if_fail (data && data->data && data->dev && data->ap && connection && message, NULL);
-
- if ((reply = dbus_message_new_method_return (message))) {
- dbus_bool_t is_encrypted;
- is_encrypted = nm_ap_get_encrypted (data->ap);
- dbus_message_append_args (reply, DBUS_TYPE_BOOLEAN, &is_encrypted, DBUS_TYPE_INVALID);
- }
-
- return reply;
-}
-
-static DBusMessage *nm_dbus_net_get_mode (DBusConnection *connection, DBusMessage *message, NMDbusCBData *data)
-{
- DBusMessage *reply = NULL;
-
- g_return_val_if_fail (data && data->data && data->dev && data->ap && connection && message, NULL);
-
- if ((reply = dbus_message_new_method_return (message))) {
- dbus_uint32_t mode;
- mode = nm_ap_get_mode (data->ap);
- dbus_message_append_args (reply, DBUS_TYPE_UINT32, &mode, DBUS_TYPE_INVALID);
- }
-
- return reply;
-}
-
-
-static DBusMessage *nm_dbus_net_get_properties (DBusConnection *connection, DBusMessage *message, NMDbusCBData *data)
-{
- DBusMessage *reply = NULL;
-
- g_return_val_if_fail (data && data->data && data->dev && data->ap && connection && message, NULL);
-
- if ((reply = dbus_message_new_method_return (message)))
- {
- char * op = nm_dbus_get_object_path_for_network (data->dev, data->ap);
- const char * essid = nm_ap_get_essid (data->ap);
- char hw_addr_buf[20];
- char * hw_addr_buf_ptr = &hw_addr_buf[0];
- dbus_int32_t strength = nm_ap_get_strength (data->ap);
- double freq = nm_ap_get_freq (data->ap);
- dbus_int32_t rate = nm_ap_get_rate (data->ap);
- dbus_bool_t enc = nm_ap_get_encrypted (data->ap);
- dbus_uint32_t mode = nm_ap_get_mode (data->ap);
-
- memset (&hw_addr_buf[0], 0, 20);
- if (nm_ap_get_address (data->ap))
- iw_ether_ntop((const struct ether_addr *) (nm_ap_get_address (data->ap)), &hw_addr_buf[0]);
-
- dbus_message_append_args (reply, DBUS_TYPE_OBJECT_PATH, &op,
- DBUS_TYPE_STRING, &essid,
- DBUS_TYPE_STRING, &hw_addr_buf_ptr,
- DBUS_TYPE_INT32, &strength,
- DBUS_TYPE_DOUBLE, &freq,
- DBUS_TYPE_INT32, &rate,
- DBUS_TYPE_BOOLEAN,&enc,
- DBUS_TYPE_UINT32, &mode,
- DBUS_TYPE_INVALID);
- g_free (op);
- }
-
- return reply;
-}
-
-
-/*
- * nm_dbus_net_methods_setup
- *
- * Register handlers for dbus methods on the
- * org.freedesktop.NetworkManager.Devices.<dev>.Networks object.
- *
- */
-NMDbusMethodList *nm_dbus_net_methods_setup (void)
-{
- NMDbusMethodList *list = nm_dbus_method_list_new (nm_dbus_net_validate);
-
- nm_dbus_method_list_add_method (list, "getProperties", nm_dbus_net_get_properties);
-
- nm_dbus_method_list_add_method (list, "getName", nm_dbus_net_get_name);
- nm_dbus_method_list_add_method (list, "getAddress", nm_dbus_net_get_address);
- nm_dbus_method_list_add_method (list, "getStrength", nm_dbus_net_get_strength);
- nm_dbus_method_list_add_method (list, "getFrequency", nm_dbus_net_get_frequency);
- nm_dbus_method_list_add_method (list, "getRate", nm_dbus_net_get_rate);
- nm_dbus_method_list_add_method (list, "getEncrypted", nm_dbus_net_get_encrypted);
- nm_dbus_method_list_add_method (list, "getMode", nm_dbus_net_get_mode);
-
- return (list);
-}
diff --git a/src/nm-dbus-net.h b/src/nm-dbus-net.h
deleted file mode 100644
index e40ebc1e65..0000000000
--- a/src/nm-dbus-net.h
+++ /dev/null
@@ -1,29 +0,0 @@
-/* NetworkManager -- Network link manager
- *
- * Dan Williams <dcbw@redhat.com>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- *
- * (C) Copyright 2005 Red Hat, Inc.
- */
-
-#ifndef NM_DBUS_NET_H
-#define NM_DBUS_NET_H
-
-#include "NetworkManagerDbusUtils.h"
-
-NMDbusMethodList *nm_dbus_net_methods_setup (void);
-
-#endif
diff --git a/src/nm-dbus-nm.c b/src/nm-dbus-nm.c
deleted file mode 100644
index b76ea19d5b..0000000000
--- a/src/nm-dbus-nm.c
+++ /dev/null
@@ -1,583 +0,0 @@
-/* NetworkManager -- Network link manager
- *
- * Dan Williams <dcbw@redhat.com>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- *
- * (C) Copyright 2005 Red Hat, Inc.
- */
-
-#include <glib.h>
-#include <dbus/dbus.h>
-#include <dbus/dbus-glib-lowlevel.h>
-#include <dbus/dbus-glib.h>
-#include <stdarg.h>
-
-#include "nm-dbus-nm.h"
-#include "nm-utils.h"
-#include "NetworkManagerDbus.h"
-#include "NetworkManagerDbusUtils.h"
-#include "NetworkManagerUtils.h"
-#include "NetworkManagerPolicy.h"
-#include "NetworkManagerDialup.h"
-#include "NetworkManagerSystem.h"
-#include "NetworkManager.h"
-
-
-/*
- * nm_dbus_nm_get_devices
- *
- * Returns a string array of object paths corresponding to the
- * devices in the device list.
- *
- */
-static DBusMessage *nm_dbus_nm_get_devices (DBusConnection *connection, DBusMessage *message, NMDbusCBData *data)
-{
- DBusMessage *reply = NULL;
- DBusMessageIter iter;
- DBusMessageIter iter_array;
-
- g_return_val_if_fail (data != NULL, NULL);
- g_return_val_if_fail (data->data != NULL, NULL);
- g_return_val_if_fail (connection != NULL, NULL);
- g_return_val_if_fail (message != NULL, NULL);
-
- /* Check for no devices */
- if (!data->data->dev_list)
- return (nm_dbus_create_error_message (message, NM_DBUS_INTERFACE, "NoDevices",
- "There are no available network devices."));
-
- if (!(reply = dbus_message_new_method_return (message)))
- return NULL;
-
- dbus_message_iter_init_append (reply, &iter);
- /* Iterate over device list and grab index of "active device" */
- if (nm_try_acquire_mutex (data->data->dev_list_mutex, __FUNCTION__))
- {
- GSList *elt;
- gboolean appended = FALSE;
-
- dbus_message_iter_open_container (&iter, DBUS_TYPE_ARRAY, DBUS_TYPE_OBJECT_PATH_AS_STRING, &iter_array);
-
- for (elt = data->data->dev_list; elt; elt = g_slist_next (elt))
- {
- NMDevice *dev = (NMDevice *)(elt->data);
-
- if (dev && (nm_device_get_driver_support_level (dev) != NM_DRIVER_UNSUPPORTED))
- {
- char *op = nm_dbus_get_object_path_for_device (dev);
-
- dbus_message_iter_append_basic (&iter_array, DBUS_TYPE_OBJECT_PATH, &op);
- g_free (op);
- appended = TRUE;
- }
- }
-
- /* If by some chance there is a device list, but it has no devices in it
- * (something which should never happen), die.
- */
- if (!appended)
- {
- nm_warning ("Device list existed, but no devices were in it.");
- g_assert_not_reached ();
- }
-
- dbus_message_iter_close_container (&iter, &iter_array);
- nm_unlock_mutex (data->data->dev_list_mutex, __FUNCTION__);
- }
- else
- {
- dbus_message_unref (reply);
- reply = nm_dbus_create_error_message (message, NM_DBUS_INTERFACE, "Retry",
- "NetworkManager could not lock device list, try again.");
- }
-
- return (reply);
-}
-
-
-static DBusMessage *nm_dbus_nm_get_dialup (DBusConnection *connection, DBusMessage *message, NMDbusCBData *data)
-{
- DBusMessage *reply = NULL;
- DBusMessageIter iter;
-
- g_return_val_if_fail (data != NULL, NULL);
- g_return_val_if_fail (data->data != NULL, NULL);
- g_return_val_if_fail (connection != NULL, NULL);
- g_return_val_if_fail (message != NULL, NULL);
-
- /* Check for no dialup devices */
- if (!data->data->dialup_list)
- return (nm_dbus_create_error_message (message, NM_DBUS_INTERFACE, "NoDialup",
- "There are no available dialup devices."));
-
- reply = dbus_message_new_method_return (message);
- if (!reply)
- return NULL;
-
- dbus_message_iter_init_append (reply, &iter);
- if (nm_try_acquire_mutex (data->data->dialup_list_mutex, __FUNCTION__))
- {
- DBusMessageIter iter_array;
- GSList *elt;
-
- dbus_message_iter_open_container (&iter, DBUS_TYPE_ARRAY, DBUS_TYPE_STRING_AS_STRING, &iter_array);
-
- for (elt = data->data->dialup_list; elt; elt = g_slist_next (elt))
- {
- NMDialUpConfig *config = (NMDialUpConfig *) elt->data;
- dbus_message_iter_append_basic (&iter_array, DBUS_TYPE_STRING, &config->name);
- }
-
- dbus_message_iter_close_container (&iter, &iter_array);
- nm_unlock_mutex (data->data->dialup_list_mutex, __FUNCTION__);
- }
- else
- {
- dbus_message_unref (reply);
- reply = nm_dbus_create_error_message (message, NM_DBUS_INTERFACE, "Retry",
- "NetworkManager could not lock dialup list, try again.");
- }
-
- return reply;
-}
-
-
-static DBusMessage *nm_dbus_nm_activate_dialup (DBusConnection *connection, DBusMessage *message, NMDbusCBData *data)
-{
- DBusMessage *reply = NULL;
- NMData *nm_data = (NMData *) data->data;
- const char *dialup;
-
- g_return_val_if_fail (data != NULL, NULL);
- g_return_val_if_fail (data->data != NULL, NULL);
- g_return_val_if_fail (connection != NULL, NULL);
- g_return_val_if_fail (message != NULL, NULL);
-
- reply = dbus_message_new_method_return (message);
- if (!reply)
- return NULL;
-
- if (!dbus_message_get_args (message, NULL, DBUS_TYPE_STRING, &dialup, DBUS_TYPE_INVALID))
- {
- reply = nm_dbus_create_error_message (message, NM_DBUS_INTERFACE, "InvalidArguments",
- "NetworkManager::activateDialup called with invalid arguments.");
- goto out;
- }
-
- nm_lock_mutex (nm_data->dialup_list_mutex, __FUNCTION__);
- if (!nm_system_activate_dialup (nm_data->dialup_list, dialup))
- reply = nm_dbus_create_error_message (message, NM_DBUS_INTERFACE, "ActivationFailed",
- "Failed to activate the dialup device.");
- nm_unlock_mutex (nm_data->dialup_list_mutex, __FUNCTION__);
-
-out:
- return reply;
-}
-
-
-/*
- * nm_dbus_nm_set_active_device
- *
- * Notify the state modification handler that we want to lock to a specific
- * device.
- *
- */
-static DBusMessage *nm_dbus_nm_set_active_device (DBusConnection *connection, DBusMessage *message, NMDbusCBData *data)
-{
- NMDevice * dev = NULL;
- DBusMessage * reply = NULL;
- char * dev_path = NULL;
- char * essid = NULL;
- char * key = NULL;
- int key_type = -1;
- NMActRequest * req = NULL;
- NMAccessPoint * ap = NULL;
-
- g_return_val_if_fail (connection != NULL, NULL);
- g_return_val_if_fail (message != NULL, NULL);
- g_return_val_if_fail (data != NULL, NULL);
- g_return_val_if_fail (data->data != NULL, NULL);
-
- /* Try to grab both device _and_ network first, and if that fails then just the device. */
- if (!dbus_message_get_args (message, NULL, DBUS_TYPE_OBJECT_PATH, &dev_path,
- DBUS_TYPE_STRING, &essid,
- DBUS_TYPE_STRING, &key,
- DBUS_TYPE_INT32, &key_type, DBUS_TYPE_INVALID))
- {
- /* So if that failed, try getting just the device */
- if (!dbus_message_get_args (message, NULL, DBUS_TYPE_OBJECT_PATH, &dev_path, DBUS_TYPE_INVALID))
- {
- reply = nm_dbus_create_error_message (message, NM_DBUS_INTERFACE, "InvalidArguments",
- "NetworkManager::setActiveDevice called with invalid arguments.");
- goto out;
- } else nm_info ("FORCE: device '%s'", dev_path);
- } else nm_info ("FORCE: device '%s', network '%s'", dev_path, essid);
-
- /* So by now we have a valid device and possibly a network as well */
- dev_path = nm_dbus_unescape_object_path (dev_path);
- dev = nm_dbus_get_device_from_object_path (data->data, dev_path);
- g_free (dev_path);
- if (!dev || (nm_device_get_driver_support_level (dev) == NM_DRIVER_UNSUPPORTED))
- {
- reply = nm_dbus_create_error_message (message, NM_DBUS_INTERFACE, "DeviceNotFound",
- "The requested network device does not exist.");
- goto out;
- }
-
- /* Make sure network is valid and device is wireless */
- if (nm_device_is_wireless (dev) && !essid)
- {
- reply = nm_dbus_create_error_message (message, NM_DBUS_INTERFACE, "InvalidArguments",
- "NetworkManager::setActiveDevice called with invalid arguments.");
- goto out;
- }
-
- nm_device_deactivate (dev);
-
- nm_schedule_state_change_signal_broadcast (data->data);
-
- if (nm_device_is_wireless (dev))
- ap = nm_device_wireless_get_activation_ap (dev, essid, key, (NMEncKeyType)key_type);
- nm_policy_schedule_device_activation (nm_act_request_new (data->data, dev, ap, TRUE));
-
-out:
- return reply;
-}
-
-/*
- * nm_dbus_nm_create_wireless_network
- *
- * Create a new wireless network and
- *
- */
-static DBusMessage *nm_dbus_nm_create_wireless_network (DBusConnection *connection, DBusMessage *message, NMDbusCBData *data)
-{
- NMDevice * dev = NULL;
- DBusMessage * reply = NULL;
- char * dev_path = NULL;
- NMAccessPoint * new_ap = NULL;
- char * network = NULL;
- char * key = NULL;
- int key_type = -1;
- DBusError error;
-
- g_return_val_if_fail (connection != NULL, NULL);
- g_return_val_if_fail (message != NULL, NULL);
- g_return_val_if_fail (data != NULL, NULL);
- g_return_val_if_fail (data->data != NULL, NULL);
-
- /* Try to grab both device _and_ network first, and if that fails then just the device. */
- dbus_error_init (&error);
- if (!dbus_message_get_args (message, &error, DBUS_TYPE_OBJECT_PATH, &dev_path,
- DBUS_TYPE_STRING, &network,
- DBUS_TYPE_STRING, &key,
- DBUS_TYPE_INT32, &key_type, DBUS_TYPE_INVALID))
- {
- reply = nm_dbus_create_error_message (message, NM_DBUS_INTERFACE, "InvalidArguments",
- "NetworkManager::createWirelessNetwork called with invalid arguments.");
- return reply;
- } else nm_info ("Creating network '%s' on device '%s'.", network, dev_path);
-
- dev_path = nm_dbus_unescape_object_path (dev_path);
- dev = nm_dbus_get_device_from_object_path (data->data, dev_path);
- g_free (dev_path);
- if (!dev || (nm_device_get_driver_support_level (dev) == NM_DRIVER_UNSUPPORTED))
- {
- reply = nm_dbus_create_error_message (message, NM_DBUS_INTERFACE, "DeviceNotFound",
- "The requested network device does not exist.");
- return reply;
- }
- nm_device_ref (dev);
-
- /* Make sure network is valid and device is wireless */
- if (!nm_device_is_wireless (dev) || !network)
- {
- reply = nm_dbus_create_error_message (message, NM_DBUS_INTERFACE, "InvalidArguments",
- "NetworkManager::createWirelessNetwork called with invalid arguments.");
- goto out;
- }
-
- new_ap = nm_ap_new ();
-
- /* Fill in the description of the network to create */
- nm_ap_set_essid (new_ap, network);
- if (nm_is_enc_key_valid (key, (NMEncKeyType)key_type))
- {
- nm_ap_set_encrypted (new_ap, TRUE);
- nm_ap_set_enc_key_source (new_ap, key, (NMEncKeyType)key_type);
- nm_ap_set_auth_method (new_ap, NM_DEVICE_AUTH_METHOD_OPEN_SYSTEM);
- }
- nm_ap_set_mode (new_ap, NETWORK_MODE_ADHOC);
- nm_ap_set_user_created (new_ap, TRUE);
-
- nm_policy_schedule_device_activation (nm_act_request_new (data->data, dev, new_ap, TRUE));
-
-out:
- nm_device_unref (dev);
- return reply;
-}
-
-
-static DBusMessage *nm_dbus_nm_create_test_device (DBusConnection *connection, DBusMessage *message, NMDbusCBData *data)
-{
- DBusError err;
- NMDeviceType type;
- DBusMessage *reply = NULL;
- static int test_dev_num = 0;
-
- g_return_val_if_fail (data && data->data && connection && message, NULL);
-
- dbus_error_init (&err);
- if ( dbus_message_get_args (message, &err, DBUS_TYPE_INT32, &type, DBUS_TYPE_INVALID)
- && ((type == DEVICE_TYPE_WIRED_ETHERNET) || (type == DEVICE_TYPE_WIRELESS_ETHERNET)))
- {
- char *interface = g_strdup_printf ("test%d", test_dev_num);
- char *udi = g_strdup_printf ("/test-devices/%s", interface);
- NMDevice *dev = NULL;
-
- dev = nm_create_device_and_add_to_list (data->data, udi, interface, TRUE, type);
- test_dev_num++;
- if ((reply = dbus_message_new_method_return (message)))
- {
- char *dev_path, *escaped_dev_path;
- dev_path = g_strdup_printf ("%s/%s", NM_DBUS_PATH_DEVICES, nm_device_get_iface (dev));
- escaped_dev_path = nm_dbus_escape_object_path (dev_path);
- dbus_message_append_args (reply, DBUS_TYPE_STRING, &dev_path, DBUS_TYPE_INVALID);
- g_free (dev_path);
- g_free (escaped_dev_path);
- }
- g_free (interface);
- g_free (udi);
- }
- else
- reply = nm_dbus_create_error_message (message, NM_DBUS_INTERFACE, "BadType", "The test device type was invalid.");
-
- return (reply);
-}
-
-static DBusMessage *nm_dbus_nm_remove_test_device (DBusConnection *connection, DBusMessage *message, NMDbusCBData *data)
-{
- DBusMessage *reply = NULL;
- DBusError err;
- char *dev_path;
-
- g_return_val_if_fail (data && data->data && connection && message, NULL);
-
- dbus_error_init (&err);
- if (dbus_message_get_args (message, &err, DBUS_TYPE_STRING, &dev_path, DBUS_TYPE_INVALID))
- {
- NMDevice *dev;
-
- dev_path = nm_dbus_unescape_object_path (dev_path);
-
- if ((dev = nm_dbus_get_device_from_object_path (data->data, dev_path)))
- {
- if (nm_device_is_test_device (dev))
- nm_remove_device_from_list (data->data, nm_device_get_udi (dev));
- else
- reply = nm_dbus_create_error_message (message, NM_DBUS_INTERFACE, "NotTestDevice",
- "Only test devices can be removed via dbus calls.");
- }
- else
- {
- reply = nm_dbus_create_error_message (message, NM_DBUS_INTERFACE, "DeviceNotFound",
- "The requested network device does not exist.");
- }
-
- g_free (dev_path);
- }
- else
- {
- reply = nm_dbus_create_error_message (message, NM_DBUS_INTERFACE, "DeviceBad",
- "The device ID was bad.");
- }
-
- if (dbus_error_is_set (&err))
- dbus_error_free (&err);
-
- return (reply);
-}
-
-
-static DBusMessage *nm_dbus_nm_get_wireless_scan_method (DBusConnection *connection, DBusMessage *message, NMDbusCBData *data)
-{
- DBusMessage *reply = NULL;
-
- g_return_val_if_fail (data && data->data && connection && message, NULL);
-
- if ((reply = dbus_message_new_method_return (message)))
- dbus_message_append_args (reply, DBUS_TYPE_UINT32, &data->data->scanning_method, DBUS_TYPE_INVALID);
-
- return reply;
-}
-
-static DBusMessage *nm_dbus_nm_set_wireless_enabled (DBusConnection *connection, DBusMessage *message, NMDbusCBData *data)
-{
- gboolean enabled = FALSE;
- DBusError err;
- NMData *app_data;
-
- g_return_val_if_fail (data && data->data && connection && message, NULL);
-
- dbus_error_init (&err);
- if (!dbus_message_get_args (message, &err, DBUS_TYPE_BOOLEAN, &enabled, DBUS_TYPE_INVALID))
- return NULL;
-
- app_data = data->data;
- app_data->wireless_enabled = enabled;
-
- if (!enabled)
- {
- GSList *elt;
-
- /* Physically down all wireless devices */
- nm_lock_mutex (app_data->dev_list_mutex, __FUNCTION__);
- for (elt = app_data->dev_list; elt; elt = g_slist_next (elt))
- {
- NMDevice *dev = (NMDevice *)(elt->data);
- if (nm_device_is_wireless (dev))
- {
- nm_device_deactivate (dev);
- nm_device_bring_down (dev);
- }
- }
- nm_unlock_mutex (app_data->dev_list_mutex, __FUNCTION__);
- }
-
- nm_policy_schedule_device_change_check (data->data);
-
- return NULL;
-}
-
-static DBusMessage *nm_dbus_nm_get_wireless_enabled (DBusConnection *connection, DBusMessage *message, NMDbusCBData *data)
-{
- DBusMessage *reply = NULL;
-
- g_return_val_if_fail (data && data->data && connection && message, NULL);
-
- if ((reply = dbus_message_new_method_return (message)))
- dbus_message_append_args (reply, DBUS_TYPE_BOOLEAN, &data->data->wireless_enabled, DBUS_TYPE_INVALID);
-
- return reply;
-}
-
-static DBusMessage *nm_dbus_nm_sleep (DBusConnection *connection, DBusMessage *message, NMDbusCBData *data)
-{
- GSList *elt;
- NMData *app_data;
-
- g_return_val_if_fail (data && data->data && connection && message, NULL);
-
- app_data = data->data;
- if (app_data->asleep == FALSE)
- {
- nm_info ("Going to sleep.");
-
- app_data->asleep = TRUE;
-
- /* Physically down all devices */
- nm_lock_mutex (app_data->dev_list_mutex, __FUNCTION__);
- for (elt = app_data->dev_list; elt; elt = g_slist_next (elt))
- {
- NMDevice *dev = (NMDevice *)(elt->data);
-
- nm_device_deactivate (dev);
- nm_device_bring_down (dev);
- }
- nm_unlock_mutex (app_data->dev_list_mutex, __FUNCTION__);
-
- nm_lock_mutex (app_data->dialup_list_mutex, __FUNCTION__);
- nm_system_deactivate_all_dialup (app_data->dialup_list);
- nm_unlock_mutex (app_data->dialup_list_mutex, __FUNCTION__);
-
- nm_schedule_state_change_signal_broadcast (app_data);
- nm_policy_schedule_device_change_check (data->data);
- }
-
- return NULL;
-}
-
-static DBusMessage *nm_dbus_nm_wake (DBusConnection *connection, DBusMessage *message, NMDbusCBData *data)
-{
- GSList *elt;
- NMData *app_data;
-
- g_return_val_if_fail (data && data->data && connection && message, NULL);
-
- app_data = data->data;
- if (app_data->asleep == TRUE)
- {
- nm_info ("Waking up from sleep.");
- app_data->asleep = FALSE;
-
- /* Physically up all devices */
- nm_lock_mutex (app_data->dev_list_mutex, __FUNCTION__);
- for (elt = app_data->dev_list; elt; elt = g_slist_next (elt))
- {
- NMDevice *dev = (NMDevice *)(elt->data);
-
- nm_device_bring_up (dev);
- }
- nm_unlock_mutex (app_data->dev_list_mutex, __FUNCTION__);
-
- nm_schedule_state_change_signal_broadcast (app_data);
- nm_policy_schedule_device_change_check (data->data);
- }
-
- return NULL;
-}
-
-static DBusMessage *nm_dbus_nm_get_state (DBusConnection *connection, DBusMessage *message, NMDbusCBData *data)
-{
- DBusMessage * reply = NULL;
- NMState state;
-
- g_return_val_if_fail (data && data->data && connection && message, NULL);
-
- state = nm_get_app_state_from_data (data->data);
- if ((reply = dbus_message_new_method_return (message)))
- dbus_message_append_args (reply, DBUS_TYPE_UINT32, &state, DBUS_TYPE_INVALID);
-
- return reply;
-}
-
-
-/*
- * nm_dbus_nm_methods_setup
- *
- * Register handlers for dbus methods on the org.freedesktop.NetworkManager object.
- *
- */
-NMDbusMethodList *nm_dbus_nm_methods_setup (void)
-{
- NMDbusMethodList *list = nm_dbus_method_list_new (NULL);
-
- nm_dbus_method_list_add_method (list, "getDevices", nm_dbus_nm_get_devices);
- nm_dbus_method_list_add_method (list, "getDialup", nm_dbus_nm_get_dialup);
- nm_dbus_method_list_add_method (list, "activateDialup", nm_dbus_nm_activate_dialup);
- nm_dbus_method_list_add_method (list, "setActiveDevice", nm_dbus_nm_set_active_device);
- nm_dbus_method_list_add_method (list, "createWirelessNetwork", nm_dbus_nm_create_wireless_network);
- nm_dbus_method_list_add_method (list, "getWirelessScanMethod", nm_dbus_nm_get_wireless_scan_method);
- nm_dbus_method_list_add_method (list, "setWirelessEnabled", nm_dbus_nm_set_wireless_enabled);
- nm_dbus_method_list_add_method (list, "getWirelessEnabled", nm_dbus_nm_get_wireless_enabled);
- nm_dbus_method_list_add_method (list, "sleep", nm_dbus_nm_sleep);
- nm_dbus_method_list_add_method (list, "wake", nm_dbus_nm_wake);
- nm_dbus_method_list_add_method (list, "state", nm_dbus_nm_get_state);
- nm_dbus_method_list_add_method (list, "createTestDevice", nm_dbus_nm_create_test_device);
- nm_dbus_method_list_add_method (list, "removeTestDevice", nm_dbus_nm_remove_test_device);
-
- return (list);
-}
diff --git a/src/nm-dbus-nm.h b/src/nm-dbus-nm.h
deleted file mode 100644
index 2ad488f371..0000000000
--- a/src/nm-dbus-nm.h
+++ /dev/null
@@ -1,30 +0,0 @@
-/* NetworkManager -- Network link manager
- *
- * Dan Williams <dcbw@redhat.com>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- *
- * (C) Copyright 2005 Red Hat, Inc.
- */
-
-#ifndef NM_DBUS_NM_H
-#define NM_DBUS_NM_H
-
-#include "NetworkManagerDbusUtils.h"
-
-
-NMDbusMethodList *nm_dbus_nm_methods_setup (void);
-
-#endif
diff --git a/src/nm-dbus-nmi.c b/src/nm-dbus-nmi.c
deleted file mode 100644
index e69de29bb2..0000000000
--- a/src/nm-dbus-nmi.c
+++ /dev/null
diff --git a/src/nm-dbus-nmi.h b/src/nm-dbus-nmi.h
deleted file mode 100644
index e69de29bb2..0000000000
--- a/src/nm-dbus-nmi.h
+++ /dev/null
diff --git a/src/nm-ip4-config.c b/src/nm-ip4-config.c
deleted file mode 100644
index 644cb2ba24..0000000000
--- a/src/nm-ip4-config.c
+++ /dev/null
@@ -1,307 +0,0 @@
-/* NetworkManager -- Network link manager
- *
- * Dan Williams <dcbw@redhat.com>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- *
- * (C) Copyright 2005 Red Hat, Inc.
- */
-
-
-#include <glib.h>
-#include <stdio.h>
-#include <string.h>
-#include "NetworkManager.h"
-#include "nm-ip4-config.h"
-
-
-typedef struct NamserverID
-{
- guint32 ns_address;
- guint32 ns_id;
-} NameserverID;
-
-typedef struct DomainID
-{
- char * domain;
- guint32 domain_id;
-} DomainID;
-
-struct NMIP4Config
-{
- guint refcount;
- guint32 ip4_address;
- guint32 ip4_gateway;
- guint32 ip4_netmask;
- guint32 ip4_broadcast;
- GSList *nameservers;
- GSList *domains;
-};
-
-
-static void domain_id_free (DomainID *did);
-static void nameserver_id_free (NameserverID *ns);
-
-
-NMIP4Config *nm_ip4_config_new (void)
-{
- NMIP4Config *config = g_malloc0 (sizeof (NMIP4Config));
-
- config->refcount = 1;
-
- return config;
-}
-
-NMIP4Config *nm_ip4_config_copy (NMIP4Config *src_config)
-{
- NMIP4Config * dst_config;
- int i, len;
-
- g_return_val_if_fail (src_config != NULL, NULL);
-
- dst_config = g_malloc0 (sizeof (NMIP4Config));
- dst_config->refcount = 1;
-
- dst_config->ip4_address = nm_ip4_config_get_address (src_config);
- dst_config->ip4_gateway = nm_ip4_config_get_gateway (src_config);
- dst_config->ip4_netmask = nm_ip4_config_get_netmask (src_config);
- dst_config->ip4_broadcast = nm_ip4_config_get_broadcast (src_config);
-
- len = nm_ip4_config_get_num_nameservers (src_config);
- for (i = 0; i < len; i++)
- nm_ip4_config_add_nameserver (dst_config, nm_ip4_config_get_nameserver (src_config, i));
-
- len = nm_ip4_config_get_num_domains (src_config);
- for (i = 0; i < len; i++)
- nm_ip4_config_add_domain (dst_config, nm_ip4_config_get_domain (src_config, i));
-
- return dst_config;
-}
-
-void nm_ip4_config_ref (NMIP4Config *config)
-{
- g_return_if_fail (config != NULL);
-
- config->refcount++;
-}
-
-void nm_ip4_config_unref (NMIP4Config *config)
-{
- g_return_if_fail (config != NULL);
-
- config->refcount--;
- if (config->refcount <= 0)
- {
- g_slist_foreach (config->nameservers, (GFunc) nameserver_id_free, NULL);
- g_slist_free (config->nameservers);
- g_slist_foreach (config->domains, (GFunc) domain_id_free, NULL);
- g_slist_free (config->domains);
-
- memset (config, 0, sizeof (NMIP4Config));
- g_free (config);
- }
-}
-
-guint32 nm_ip4_config_get_address (NMIP4Config *config)
-{
- g_return_val_if_fail (config != NULL, 0);
-
- return config->ip4_address;
-}
-
-void nm_ip4_config_set_address (NMIP4Config *config, guint32 addr)
-{
- g_return_if_fail (config != NULL);
-
- config->ip4_address = addr;
-}
-
-guint32 nm_ip4_config_get_gateway (NMIP4Config *config)
-{
- g_return_val_if_fail (config != NULL, 0);
-
- return config->ip4_gateway;
-}
-
-void nm_ip4_config_set_gateway (NMIP4Config *config, guint32 gateway)
-{
- g_return_if_fail (config != NULL);
-
- config->ip4_gateway = gateway;
-}
-
-guint32 nm_ip4_config_get_netmask (NMIP4Config *config)
-{
- g_return_val_if_fail (config != NULL, 0);
-
- return config->ip4_netmask;
-}
-
-void nm_ip4_config_set_netmask (NMIP4Config *config, guint32 netmask)
-{
- g_return_if_fail (config != NULL);
-
- config->ip4_netmask = netmask;
-}
-
-guint32 nm_ip4_config_get_broadcast (NMIP4Config *config)
-{
- g_return_val_if_fail (config != NULL, 0);
-
- return config->ip4_broadcast;
-}
-
-void nm_ip4_config_set_broadcast (NMIP4Config *config, guint32 broadcast)
-{
- g_return_if_fail (config != NULL);
-
- config->ip4_broadcast = broadcast;
-}
-
-
-static NameserverID *nameserver_id_new (guint32 nameserver)
-{
- NameserverID *ns = g_malloc0 (sizeof (NameserverID));
-
- ns->ns_address = nameserver;
-
- return ns;
-}
-
-static void nameserver_id_free (NameserverID *ns)
-{
- g_free (ns);
-}
-
-void nm_ip4_config_add_nameserver (NMIP4Config *config, guint32 nameserver)
-{
- g_return_if_fail (config != NULL);
-
- config->nameservers = g_slist_append (config->nameservers, nameserver_id_new (nameserver));
-}
-
-guint32 nm_ip4_config_get_nameserver (NMIP4Config *config, guint index)
-{
- NameserverID *ns;
-
- g_return_val_if_fail (config != NULL, 0);
- g_return_val_if_fail (index < g_slist_length (config->nameservers), 0);
-
- if ((ns = g_slist_nth_data (config->nameservers, index)))
- return ns->ns_address;
- return 0;
-}
-
-guint32 nm_ip4_config_get_nameserver_id (NMIP4Config *config, guint index)
-{
- NameserverID *ns;
-
- g_return_val_if_fail (config != NULL, 0);
- g_return_val_if_fail (index < g_slist_length (config->nameservers), 0);
-
- if ((ns = g_slist_nth_data (config->nameservers, index)))
- return ns->ns_id;
- return 0;
-}
-
-void nm_ip4_config_set_nameserver_id (NMIP4Config *config, guint index, guint32 id)
-{
- NameserverID *ns;
-
- g_return_if_fail (config != NULL);
- g_return_if_fail (index < g_slist_length (config->nameservers));
-
- if ((ns = g_slist_nth_data (config->nameservers, index)))
- ns->ns_id = id;
-}
-
-guint32 nm_ip4_config_get_num_nameservers (NMIP4Config *config)
-{
- g_return_val_if_fail (config != NULL, 0);
-
- return (g_slist_length (config->nameservers));
-}
-
-
-static DomainID *domain_id_new (const char *domain)
-{
- DomainID *did = g_malloc0 (sizeof (DomainID));
-
- did->domain = g_strdup (domain);
-
- return did;
-}
-
-static void domain_id_free (DomainID *did)
-{
- if (!did)
- return;
-
- g_free (did->domain);
- g_free (did);
-}
-
-void nm_ip4_config_add_domain (NMIP4Config *config, const char *domain)
-{
- g_return_if_fail (config != NULL);
- g_return_if_fail (domain != NULL);
-
- if (!strlen (domain))
- return;
-
- config->domains = g_slist_append (config->domains, domain_id_new (domain));
-}
-
-const char *nm_ip4_config_get_domain (NMIP4Config *config, guint index)
-{
- DomainID *did;
-
- g_return_val_if_fail (config != NULL, NULL);
- g_return_val_if_fail (index < g_slist_length (config->domains), NULL);
-
- if ((did = g_slist_nth_data (config->domains, index)))
- return did->domain;
- return NULL;
-}
-
-guint32 nm_ip4_config_get_domain_id (NMIP4Config *config, guint index)
-{
- DomainID *did;
-
- g_return_val_if_fail (config != NULL, 0);
- g_return_val_if_fail (index < g_slist_length (config->domains), 0);
-
- if ((did = g_slist_nth_data (config->domains, index)))
- return did->domain_id;
- return 0;
-}
-
-void nm_ip4_config_set_domain_id (NMIP4Config *config, guint index, guint32 id)
-{
- DomainID *did;
-
- g_return_if_fail (config != NULL);
- g_return_if_fail (index < g_slist_length (config->domains));
-
- if ((did = g_slist_nth_data (config->domains, index)))
- did->domain_id = id;
-}
-
-guint32 nm_ip4_config_get_num_domains (NMIP4Config *config)
-{
- g_return_val_if_fail (config != NULL, 0);
-
- return (g_slist_length (config->domains));
-}
diff --git a/src/nm-ip4-config.h b/src/nm-ip4-config.h
deleted file mode 100644
index 8cf29ac644..0000000000
--- a/src/nm-ip4-config.h
+++ /dev/null
@@ -1,59 +0,0 @@
-/* NetworkManager -- Network link manager
- *
- * Dan Williams <dcbw@redhat.com>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- *
- * (C) Copyright 2004 Red Hat, Inc.
- */
-
-#ifndef NM_IP4_CONFIG_H
-#define NM_IP4_CONFIG_H
-
-#include <glib.h>
-
-typedef struct NMIP4Config NMIP4Config;
-
-
-NMIP4Config * nm_ip4_config_new (void);
-NMIP4Config * nm_ip4_config_copy (NMIP4Config *config);
-void nm_ip4_config_ref (NMIP4Config *config);
-void nm_ip4_config_unref (NMIP4Config *config);
-
-guint32 nm_ip4_config_get_address (NMIP4Config *config);
-void nm_ip4_config_set_address (NMIP4Config *config, guint32 addr);
-
-guint32 nm_ip4_config_get_gateway (NMIP4Config *config);
-void nm_ip4_config_set_gateway (NMIP4Config *config, guint32 gateway);
-
-guint32 nm_ip4_config_get_netmask (NMIP4Config *config);
-void nm_ip4_config_set_netmask (NMIP4Config *config, guint32 netmask);
-
-guint32 nm_ip4_config_get_broadcast (NMIP4Config *config);
-void nm_ip4_config_set_broadcast (NMIP4Config *config, guint32 broadcast);
-
-void nm_ip4_config_add_nameserver (NMIP4Config *config, guint32 nameserver);
-guint32 nm_ip4_config_get_nameserver (NMIP4Config *config, guint index);
-guint32 nm_ip4_config_get_nameserver_id (NMIP4Config *config, guint index);
-void nm_ip4_config_set_nameserver_id (NMIP4Config *config, guint index, guint32 id);
-guint32 nm_ip4_config_get_num_nameservers (NMIP4Config *config);
-
-void nm_ip4_config_add_domain (NMIP4Config *config, const char *domain);
-const char * nm_ip4_config_get_domain (NMIP4Config *config, guint index);
-guint32 nm_ip4_config_get_domain_id (NMIP4Config *config, guint index);
-void nm_ip4_config_set_domain_id (NMIP4Config *config, guint index, guint32 id);
-guint32 nm_ip4_config_get_num_domains (NMIP4Config *config);
-
-#endif
diff --git a/src/nm-netlink-monitor.c b/src/nm-netlink-monitor.c
deleted file mode 100644
index d581e84885..0000000000
--- a/src/nm-netlink-monitor.c
+++ /dev/null
@@ -1,751 +0,0 @@
-/* nm-netlink-monitor.c - Monitor netlink socket for interface change
- * events
- *
- * Copyright (C) 2005 Ray Strode
- *
- * Some code borrowed from HAL:
-
- * Copyright (C) 2003 David Zeuthen, <david@fubar.dk>
- * Copyright (C) 2004 Novell, Inc.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
- * 02111-1307, USA.
- */
-#include <errno.h>
-#include <string.h>
-#include <sys/types.h>
-#include <sys/socket.h>
-#include <linux/types.h>
-#include <linux/netlink.h>
-#include <linux/rtnetlink.h>
-#include <linux/if.h>
-#include <linux/unistd.h>
-#include <unistd.h>
-
-#include <glib.h>
-#include <glib/gi18n.h>
-
-#include "nm-netlink-monitor.h"
-#include "nm-utils.h"
-
-#define NM_NETLINK_MONITOR_EVENT_CONDITIONS \
- ((GIOCondition) (G_IO_IN | G_IO_PRI))
-
-#define NM_NETLINK_MONITOR_ERROR_CONDITIONS \
- ((GIOCondition) (G_IO_ERR | G_IO_NVAL))
-
-#define NM_NETLINK_MONITOR_DISCONNECT_CONDITIONS \
- ((GIOCondition) (G_IO_HUP))
-
-struct _NmNetlinkMonitorPrivate
-{
- GMainContext *context;
- GIOChannel *io_channel;
- GSource *event_source;
-};
-
-static void nm_netlink_monitor_finalize (GObject *object);
-static void nm_netlink_monitor_class_install_signals (NmNetlinkMonitorClass *service_class);
-
-static gboolean
-nm_netlink_monitor_event_handler (GIOChannel *channel,
- GIOCondition io_condition,
- NmNetlinkMonitor *monitor);
-static gboolean
-nm_netlink_monitor_error_handler (GIOChannel *channel,
- GIOCondition io_condition,
- NmNetlinkMonitor *monitor);
-static gboolean
-nm_netlink_monitor_disconnect_handler (GIOChannel *channel,
- GIOCondition io_condition,
- NmNetlinkMonitor *monitor);
-enum
-{
- INTERFACE_CONNECTED = 0,
- INTERFACE_DISCONNECTED,
- ERROR,
- NUMBER_OF_SIGNALS
-};
-
-static guint nm_netlink_monitor_signals[NUMBER_OF_SIGNALS];
-
-G_DEFINE_TYPE (NmNetlinkMonitor, nm_netlink_monitor, G_TYPE_OBJECT);
-
-static void
-nm_netlink_monitor_class_init (NmNetlinkMonitorClass *monitor_class)
-{
- GObjectClass *gobject_class;
-
- gobject_class = G_OBJECT_CLASS (monitor_class);
-
- gobject_class->finalize = nm_netlink_monitor_finalize;
-
- nm_netlink_monitor_class_install_signals (monitor_class);
-
- g_type_class_add_private (monitor_class, sizeof (NmNetlinkMonitorPrivate));
-}
-
-static void
-nm_netlink_monitor_class_install_signals (NmNetlinkMonitorClass *monitor_class)
-{
- GObjectClass *object_class;
-
- object_class = G_OBJECT_CLASS (monitor_class);
-
- nm_netlink_monitor_signals[INTERFACE_CONNECTED] =
- g_signal_new ("interface-connected",
- G_OBJECT_CLASS_TYPE (object_class),
- G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET (NmNetlinkMonitorClass, interface_connected),
- NULL, NULL, g_cclosure_marshal_VOID__STRING,
- G_TYPE_NONE, 1, G_TYPE_STRING);
- monitor_class->interface_connected = NULL;
-
- nm_netlink_monitor_signals[INTERFACE_DISCONNECTED] =
- g_signal_new ("interface-disconnected",
- G_OBJECT_CLASS_TYPE (object_class),
- G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET (NmNetlinkMonitorClass, interface_disconnected),
- NULL, NULL, g_cclosure_marshal_VOID__STRING,
- G_TYPE_NONE, 1, G_TYPE_STRING);
- monitor_class->interface_disconnected = NULL;
-
- nm_netlink_monitor_signals[ERROR] =
- g_signal_new ("error",
- G_OBJECT_CLASS_TYPE (object_class),
- G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET (NmNetlinkMonitorClass, error),
- NULL, NULL, g_cclosure_marshal_VOID__POINTER,
- G_TYPE_NONE, 1, G_TYPE_POINTER);
- monitor_class->error = NULL;
-}
-
-gboolean
-nm_netlink_monitor_open_connection (NmNetlinkMonitor *monitor,
- GError **error)
-{
- struct sockaddr_nl monitor_address = { 0 };
- int fd, saved_errno;
- GError *channel_error;
- GIOFlags channel_flags;
-
- g_return_val_if_fail (monitor->priv->io_channel == NULL, FALSE);
-
- fd = socket (PF_NETLINK, SOCK_RAW, NETLINK_ROUTE);
-
- if (fd < 0)
- {
- saved_errno = errno;
-
- g_set_error (error, NM_NETLINK_MONITOR_ERROR,
- NM_NETLINK_MONITOR_ERROR_OPENING_SOCKET,
- _("unable to create netlink socket for monitoring "
- "wired ethernet devices - %s"),
- g_strerror (saved_errno));
- return FALSE;
- }
-
- monitor_address.nl_family = AF_NETLINK;
- monitor_address.nl_pid = getpid ();
- monitor_address.nl_groups = RTMGRP_LINK;
-
- if (bind (fd,
- (struct sockaddr *) &monitor_address,
- sizeof (monitor_address)) < 0) {
-
- saved_errno = errno;
-
- g_set_error (error, NM_NETLINK_MONITOR_ERROR,
- NM_NETLINK_MONITOR_ERROR_BINDING_TO_SOCKET,
- _("unable to bind to netlink socket for monitoring "
- "wired ethernet devices - %s"),
- g_strerror (saved_errno));
- return FALSE;
- }
-
- monitor->priv->io_channel = g_io_channel_unix_new (fd);
-
- channel_error = NULL;
- g_io_channel_set_encoding (monitor->priv->io_channel,
- NULL /* encoding */,
- &channel_error);
-
- /* Encoding is NULL, so no conversion error can possibly
- * occur
- */
- g_assert (channel_error == NULL);
-
- g_io_channel_set_close_on_unref (monitor->priv->io_channel,
- TRUE);
-
- channel_flags = g_io_channel_get_flags (monitor->priv->io_channel);
- channel_error = NULL;
- g_io_channel_set_flags (monitor->priv->io_channel,
- channel_flags | G_IO_FLAG_NONBLOCK,
- &channel_error);
-
- if (channel_error != NULL)
- {
- g_propagate_error (error, channel_error);
- return FALSE;
- }
-
- return TRUE;
-}
-
-void
-nm_netlink_monitor_close_connection (NmNetlinkMonitor *monitor)
-{
- g_return_if_fail (monitor->priv->io_channel != NULL);
-
- if (monitor->priv->event_source != NULL)
- nm_netlink_monitor_detach (monitor);
-
- g_io_channel_shutdown (monitor->priv->io_channel,
- TRUE /* flush pending data */,
- NULL);
-
- g_io_channel_unref (monitor->priv->io_channel);
- monitor->priv->io_channel = NULL;
-}
-
-static void
-nm_netlink_monitor_init (NmNetlinkMonitor *monitor)
-{
- monitor->priv = G_TYPE_INSTANCE_GET_PRIVATE (monitor,
- NM_TYPE_NETLINK_MONITOR,
- NmNetlinkMonitorPrivate);
- monitor->priv->context = NULL;
- monitor->priv->io_channel = NULL;
- monitor->priv->event_source = NULL;
-}
-
-static void
-nm_netlink_monitor_finalize (GObject *object)
-{
- NmNetlinkMonitor *monitor;
- GObjectClass *gobject_class;
-
- monitor = NM_NETLINK_MONITOR (object);
- gobject_class = G_OBJECT_CLASS (nm_netlink_monitor_parent_class);
-
- if (monitor->priv->io_channel != NULL)
- nm_netlink_monitor_close_connection (monitor);
-
- gobject_class->finalize (object);
-}
-
-GQuark
-nm_netlink_monitor_error_quark (void)
-{
- static GQuark error_quark = 0;
-
- if (error_quark == 0)
- error_quark = g_quark_from_static_string ("nm-netlink-monitor-error-quark");
-
- return error_quark;
-}
-
-NmNetlinkMonitor *
-nm_netlink_monitor_new (void)
-{
- GObject *instance;
-
- instance = g_object_new (NM_TYPE_NETLINK_MONITOR, NULL, NULL);
-
- return NM_NETLINK_MONITOR (instance);
-}
-
-static void
-nm_netlink_monitor_clear_event_source (NmNetlinkMonitor *monitor)
-{
- monitor->priv->event_source = NULL;
-}
-
-void
-nm_netlink_monitor_attach (NmNetlinkMonitor *monitor,
- GMainContext *context)
-{
- GSource *event_source;
-
- g_return_if_fail (NM_IS_NETLINK_MONITOR (monitor));
- g_return_if_fail (monitor->priv->context == NULL);
-
- if (context == NULL)
- context = g_main_context_default ();
-
- monitor->priv->context = g_main_context_ref (context);
-
- event_source = g_io_create_watch (monitor->priv->io_channel,
- NM_NETLINK_MONITOR_EVENT_CONDITIONS |
- NM_NETLINK_MONITOR_ERROR_CONDITIONS |
- NM_NETLINK_MONITOR_DISCONNECT_CONDITIONS);
- g_source_set_callback (event_source,
- (GSourceFunc) nm_netlink_monitor_event_handler,
- monitor,
- (GDestroyNotify)
- nm_netlink_monitor_clear_event_source);
- g_source_attach (event_source, context);
- monitor->priv->event_source = event_source;
-}
-
-void
-nm_netlink_monitor_detach (NmNetlinkMonitor *monitor)
-{
- g_return_if_fail (NM_IS_NETLINK_MONITOR (monitor));
- g_return_if_fail (monitor->priv->context != NULL);
-
- g_source_destroy (monitor->priv->event_source);
- monitor->priv->event_source = NULL;
-
- g_main_context_unref (monitor->priv->context);
- monitor->priv->context = NULL;
-}
-
-gboolean
-nm_netlink_monitor_request_status (NmNetlinkMonitor *monitor,
- GError **error)
-{
- typedef struct
- {
- struct nlmsghdr header;
- struct rtgenmsg request;
- } NmNetlinkMonitorStatusPacket;
- NmNetlinkMonitorStatusPacket packet = { { 0 } };
- struct sockaddr_nl recipient = { 0 };
- static guint32 sequence_number;
- int fd, saved_errno;
- ssize_t num_bytes_sent;
- size_t num_bytes_to_send, total_bytes_sent;
- gdouble max_wait_period, now;
- const gchar *buffer;
- GError *socket_error;
-
- fd = g_io_channel_unix_get_fd (monitor->priv->io_channel);
-
- recipient.nl_family = AF_NETLINK;
- recipient.nl_pid = 0; /* going to kernel */
- recipient.nl_groups = RTMGRP_LINK;
-
- packet.header.nlmsg_len = NLMSG_LENGTH (sizeof (struct rtgenmsg));
- packet.header.nlmsg_flags = NLM_F_ROOT | NLM_F_MATCH | NLM_F_REQUEST;
- packet.header.nlmsg_type = RTM_GETLINK;
- packet.header.nlmsg_pid = getpid ();
- /* Might be good to generate a unique sequence number and track
- the response */
- packet.header.nlmsg_seq = sequence_number << 16;
- sequence_number++;
-
- packet.request.rtgen_family = AF_UNSPEC;
-
- nm_get_timestamp (&now);
-
- /* only block for around 1.5 seconds
- * FIXME: maybe too long? */
- max_wait_period = now + 1.5;
- num_bytes_sent = 0;
- buffer = (const gchar *) &packet;
- num_bytes_to_send = sizeof (packet);
- total_bytes_sent = 0;
- socket_error = NULL;
- do
- {
- num_bytes_sent = sendto (fd,
- buffer + total_bytes_sent,
- num_bytes_to_send,
- MSG_DONTWAIT,
- (struct sockaddr *) &recipient,
- sizeof (recipient));
- if (num_bytes_sent < 0)
- {
- saved_errno = errno;
-
- if ((saved_errno == EAGAIN) ||
- (saved_errno == EWOULDBLOCK))
- {
- nm_get_timestamp (&now);
- if ((max_wait_period - now) > G_MINDOUBLE)
- {
- saved_errno = 0;
- continue;
- }
- }
-
- socket_error =
- g_error_new (NM_NETLINK_MONITOR_ERROR,
- NM_NETLINK_MONITOR_ERROR_SENDING_TO_SOCKET,
- "%s", g_strerror (saved_errno));
- break;
- }
-
- total_bytes_sent += num_bytes_sent;
- num_bytes_to_send -= num_bytes_sent;
-
- nm_get_timestamp (&now);
-
- if ((max_wait_period - now) < G_MINDOUBLE)
- {
- socket_error =
- g_error_new (NM_NETLINK_MONITOR_ERROR,
- NM_NETLINK_MONITOR_ERROR_SENDING_TO_SOCKET,
- _("operation took too long"));
- break;
- }
- } while (num_bytes_to_send > 0);
-
- if (socket_error != NULL)
- {
- if (error != NULL)
- g_propagate_error (error, socket_error);
- else
- {
- g_signal_emit (G_OBJECT (monitor),
- nm_netlink_monitor_signals[ERROR],
- 0, socket_error);
- g_error_free (socket_error);
- }
-
- return FALSE;
- }
-
- return TRUE;
-}
-
-static gboolean
-receive_pending_bytes (GIOChannel *channel,
- gchar **str_return,
- gsize *length,
- GError **error)
-{
- GString *pending_bytes;
- ssize_t num_bytes_read;
- gboolean succeeded;
- struct sockaddr_nl sender = { 0 };
- gchar buffer[4096];
- static const size_t buffer_capacity = (size_t) sizeof (buffer);
- socklen_t sender_size;
- int fd, saved_errno;
-
- fd = g_io_channel_unix_get_fd (channel);
-
- pending_bytes = g_string_sized_new (4096);
-
- sender_size = (socklen_t) sizeof (sender);
- saved_errno = 0;
- succeeded = TRUE;
- do
- {
- num_bytes_read = recvfrom (fd, buffer, buffer_capacity,
- MSG_DONTWAIT,
- (struct sockaddr *) &sender,
- &sender_size);
-
- if (num_bytes_read < 0)
- {
- saved_errno = errno;
-
- /* the kernel doesn't send EOF when it's done,
- * so we just have to wait until it wants to
- * block and assume that means it's done.
- */
- if (saved_errno == EAGAIN)
- {
- saved_errno = 0;
- break;
- }
- }
- else if (saved_errno == EINTR)
- saved_errno = 0;
-
- /* First let's make sure that the sender is actually
- * someone legitimate.
- *
- * There are a few possibilities:
- * 1) The size of the sender is less than the
- * size of a generic sockaddr structure.
- * This means we got sent completely bogus
- * data.
- * 2) The size of the sender is greater than or
- * equal to the size of a generic sockaddr
- * structure, but the address family the sender
- * belongs to is not AF_NETLINK. In this case
- * we were sent some spurious packets that we
- * don't care about.
- * 3) The address family is AF_NETLINK but the
- * the size of the sender is not equal to the
- * size of a sockaddr_nl structure. This means
- * we can't treat the received data as an
- * instance of sockaddr_nl structure.
- *
- * In any of the above cases, we should discard the data.
- */
- if ((sender_size != (socklen_t) sizeof (sender)) ||
- ((sender_size == (socklen_t) sizeof (sender)) &&
- sender.nl_family != AF_NETLINK))
- {
- g_set_error (error, NM_NETLINK_MONITOR_ERROR,
- NM_NETLINK_MONITOR_ERROR_BAD_SENDER,
- _("received data from wrong type of sender"));
- succeeded = FALSE;
- goto out;
- }
-
- /* We only care about messages from the kernel,
- * not anywhere else. Only the kernel can have
- * nl_pid == 0.
- */
- if (sender.nl_pid != 0)
- {
- g_set_error (error, NM_NETLINK_MONITOR_ERROR,
- NM_NETLINK_MONITOR_ERROR_BAD_SENDER,
- _("received data from unexpected sender"));
- succeeded = FALSE;
- goto out;
-
- }
-
- /* Okay, the data has passed basic sanity checks,
- * let's store it.
- */
- if (num_bytes_read > 0)
- {
- g_string_append_len (pending_bytes,
- buffer, (gssize) num_bytes_read);
- memset (buffer, 0, num_bytes_read);
- }
- }
- while ((num_bytes_read > 0) || (saved_errno == EINTR));
-
- if (saved_errno != 0)
- {
- g_set_error (error, NM_NETLINK_MONITOR_ERROR,
- NM_NETLINK_MONITOR_ERROR_READING_FROM_SOCKET,
- "%s", g_strerror (saved_errno));
- succeeded = FALSE;
- goto out;
- }
-
-out:
- if ((pending_bytes->len > 0) && succeeded)
- {
- if (str_return)
- *str_return = pending_bytes->str;
-
- if (length)
- *length = pending_bytes->len;
-
- g_string_free (pending_bytes, FALSE);
- pending_bytes = NULL;
- }
- else
- {
- if (str_return)
- *str_return = NULL;
-
- if (length)
- *length = 0;
- }
-
- if (pending_bytes != NULL)
- g_string_free (pending_bytes, TRUE);
- return succeeded;
-}
-
-static gboolean
-nm_netlink_monitor_event_handler (GIOChannel *channel,
- GIOCondition io_condition,
- NmNetlinkMonitor *monitor)
-{
- GError *error;
- gchar *received_bytes=NULL;
- gboolean processing_is_done;
- gsize num_received_bytes;
- guint num_bytes_to_process;
- struct nlmsghdr *header;
-
- if (io_condition & NM_NETLINK_MONITOR_ERROR_CONDITIONS)
- return nm_netlink_monitor_error_handler (channel, io_condition, monitor);
- else if (io_condition & NM_NETLINK_MONITOR_DISCONNECT_CONDITIONS)
- return nm_netlink_monitor_disconnect_handler (channel, io_condition, monitor);
-
- g_return_val_if_fail (!(io_condition &
- ~(NM_NETLINK_MONITOR_EVENT_CONDITIONS)),
- FALSE);
-
- error = NULL;
-
- /* Unfortunately, the kernel doesn't return EOF when it's
- * done sending packets, so read_to_end () gets confused.
- *
- * This let's us do sockaddr_nl specific sanity checks anyway.
- */
- //status = g_io_channel_read_to_end (channel, &received_bytes,
- // &num_received_bytes,
- // &error);
- receive_pending_bytes (channel, &received_bytes,
- &num_received_bytes,
- &error);
- if (error != NULL)
- {
- g_signal_emit (G_OBJECT (monitor),
- nm_netlink_monitor_signals[ERROR],
- 0, error);
- g_error_free (error);
- return FALSE;
- }
-
- if (num_received_bytes == 0)
- return TRUE;
-
- /* Why does NLMSG_* use unsigned ints instead of unsigned longs
- * or size_t?
- */
- num_bytes_to_process = (guint) num_received_bytes;
-
- processing_is_done = FALSE;
- for (header = (struct nlmsghdr *) received_bytes;
- !processing_is_done &&
- NLMSG_OK (header, (gint) num_bytes_to_process);
- header = NLMSG_NEXT (header, num_bytes_to_process))
- {
- struct ifinfomsg *interface_info;
- struct rtattr *attribute;
- int num_attribute_bytes_to_process;
- gboolean is_connected;
- gchar *interface_name;
-
- g_assert (num_bytes_to_process <= num_received_bytes);
-
- switch (header->nlmsg_type)
- {
- case NLMSG_DONE:
- processing_is_done = TRUE;
- continue;
-
- case NLMSG_NOOP:
- continue;
-
- case NLMSG_OVERRUN:
- {
- error = g_error_new (NM_NETLINK_MONITOR_ERROR,
- NM_NETLINK_MONITOR_ERROR_BAD_SOCKET_DATA,
- _("too much data was sent "
- "over socket and some of "
- "it was lost"));
-
- g_signal_emit (G_OBJECT (monitor),
- nm_netlink_monitor_signals[ERROR],
- 0, error);
- g_error_free (error);
- error = NULL;
- continue;
- }
-
- case NLMSG_ERROR:
- {
- struct nlmsgerr *error_message;
-
- error_message =
- (struct nlmsgerr *) NLMSG_DATA (header);
-
- error = g_error_new (NM_NETLINK_MONITOR_ERROR,
- NM_NETLINK_MONITOR_ERROR_BAD_SOCKET_DATA,
- "%s", g_strerror (error_message->error));
-
- g_signal_emit (G_OBJECT (monitor),
- nm_netlink_monitor_signals[ERROR],
- 0, error);
- g_error_free (error);
- error = NULL;
- continue;
- }
-
- default:
- /* we continue above, so we don't have to stuff
- * everything below here in here */
- break;
- }
-
- interface_name = NULL;
- interface_info = (struct ifinfomsg *) NLMSG_DATA (header);
-
- /* The !! weirdness is to cannonicalize the value to 0 or 1.
- */
- is_connected = !!((gboolean) (interface_info->ifi_flags & IFF_RUNNING));
-
- num_attribute_bytes_to_process = IFLA_PAYLOAD (header);
-
- for (attribute = IFLA_RTA (interface_info);
- RTA_OK (attribute, num_attribute_bytes_to_process);
- attribute = RTA_NEXT (attribute, num_attribute_bytes_to_process))
- {
- if (attribute->rta_type == IFLA_IFNAME) {
- interface_name =
- (gchar *) g_strdup (RTA_DATA (attribute));
- }
- }
-
- if (interface_name != NULL)
- {
- if (is_connected)
- g_signal_emit (G_OBJECT (monitor),
- nm_netlink_monitor_signals[INTERFACE_CONNECTED],
- 0, interface_name);
- else
- g_signal_emit (G_OBJECT (monitor),
- nm_netlink_monitor_signals[INTERFACE_DISCONNECTED],
- 0, interface_name);
-
- g_free (interface_name);
- }
- }
- g_free (received_bytes);
-
- return TRUE;
-}
-
-static gboolean
-nm_netlink_monitor_error_handler (GIOChannel *channel,
- GIOCondition io_condition,
- NmNetlinkMonitor *monitor)
-{
- GError *socket_error;
-
- g_return_val_if_fail (!(io_condition &
- ~(NM_NETLINK_MONITOR_ERROR_CONDITIONS)),
- FALSE);
-
- socket_error =
- g_error_new (NM_NETLINK_MONITOR_ERROR,
- NM_NETLINK_MONITOR_ERROR_WAITING_FOR_SOCKET_DATA,
- _("error occurred while waiting for data on socket"));
-
- g_signal_emit (G_OBJECT (monitor),
- nm_netlink_monitor_signals[ERROR],
- 0, socket_error);
- return TRUE;
-}
-
-static gboolean
-nm_netlink_monitor_disconnect_handler (GIOChannel *channel,
- GIOCondition io_condition,
- NmNetlinkMonitor *monitor)
-{
-
- g_return_val_if_fail (!(io_condition &
- ~(NM_NETLINK_MONITOR_DISCONNECT_CONDITIONS)),
- FALSE);
- return FALSE;
-}
diff --git a/src/nm-netlink-monitor.h b/src/nm-netlink-monitor.h
deleted file mode 100644
index c6fccfe05a..0000000000
--- a/src/nm-netlink-monitor.h
+++ /dev/null
@@ -1,95 +0,0 @@
-/* nm-netlink-monitor.h - monitor netlink socket for network
- * interface eventss
- *
- * Copyright (C) 2005 Ray Strode
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
- * 02111-1307, USA.
- */
-#ifndef NM_NETLINK_MONITOR_H
-#define NM_NETLINK_MONITOR_H
-
-#include <glib.h>
-#include <glib-object.h>
-
-G_BEGIN_DECLS
-
-#define NM_TYPE_NETLINK_MONITOR (nm_netlink_monitor_get_type ())
-#define NM_NETLINK_MONITOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), NM_TYPE_NETLINK_MONITOR, NmNetlinkMonitor))
-#define NM_NETLINK_MONITOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), NM_TYPE_NETLINK_MONITOR, NmNetlinkMonitorClass))
-#define NM_IS_NETLINK_MONITOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), NM_TYPE_NETLINK_MONITOR))
-#define NM_IS_NETLINK_MONITOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), NM_TYPE_NETLINK_MONITOR))
-#define NM_NETLINK_MONITOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), NM_TYPE_NETLINK_MONITOR, NmNetlinkMonitorClass))
-#define NM_NETLINK_MONITOR_ERROR (nm_netlink_monitor_error_quark ())
-
-
-typedef struct _NmNetlinkMonitor NmNetlinkMonitor;
-typedef struct _NmNetlinkMonitorClass NmNetlinkMonitorClass;
-typedef struct _NmNetlinkMonitorPrivate NmNetlinkMonitorPrivate;
-typedef enum _NmNetlinkMonitorError NmNetlinkMonitorError;
-
-struct _NmNetlinkMonitor
-{
- GObject parent;
-
- /*< private >*/
- NmNetlinkMonitorPrivate *priv;
-};
-
-struct _NmNetlinkMonitorClass
-{
- GObjectClass parent_class;
-
- /* Signals */
- void (* interface_connected) (NmNetlinkMonitor *monitor,
- const gchar *interface);
- void (* interface_disconnected) (NmNetlinkMonitor *monitor,
- const gchar *interface);
- void (* error) (NmNetlinkMonitor *monitor,
- GError *error);
-};
-
-enum _NmNetlinkMonitorError
-{
- NM_NETLINK_MONITOR_ERROR_GENERIC = 0,
- NM_NETLINK_MONITOR_ERROR_OPENING_SOCKET,
- NM_NETLINK_MONITOR_ERROR_BINDING_TO_SOCKET,
- NM_NETLINK_MONITOR_ERROR_BAD_SENDER,
- NM_NETLINK_MONITOR_ERROR_BAD_SOCKET_DATA,
- NM_NETLINK_MONITOR_ERROR_WAITING_FOR_SOCKET_DATA,
- NM_NETLINK_MONITOR_ERROR_READING_FROM_SOCKET,
- NM_NETLINK_MONITOR_ERROR_SENDING_TO_SOCKET
-};
-
-GType nm_netlink_monitor_get_type (void) G_GNUC_CONST;
-GQuark nm_netlink_monitor_error_quark (void) G_GNUC_CONST;
-
-NmNetlinkMonitor *nm_netlink_monitor_new (void);
-
-gboolean
-nm_netlink_monitor_open_connection (NmNetlinkMonitor *monitor,
- GError **error);
-
-void
-nm_netlink_monitor_close_connection (NmNetlinkMonitor *monitor);
-
-void nm_netlink_monitor_attach (NmNetlinkMonitor *monitor,
- GMainContext *context);
-void nm_netlink_monitor_detach (NmNetlinkMonitor *monitor);
-
-gboolean nm_netlink_monitor_request_status (NmNetlinkMonitor *monitor,
- GError **error);
-G_END_DECLS
-#endif /* NM_NETLINK_MONITOR_H */
diff --git a/src/vpn-manager/.cvsignore b/src/vpn-manager/.cvsignore
deleted file mode 100644
index 282522db03..0000000000
--- a/src/vpn-manager/.cvsignore
+++ /dev/null
@@ -1,2 +0,0 @@
-Makefile
-Makefile.in
diff --git a/src/vpn-manager/Makefile.am b/src/vpn-manager/Makefile.am
deleted file mode 100644
index 12f6f760bc..0000000000
--- a/src/vpn-manager/Makefile.am
+++ /dev/null
@@ -1,26 +0,0 @@
-INCLUDES = -I${top_srcdir} -I${top_srcdir}/utils -I${top_srcdir}/src -I${top_srcdir}/src/named-manager
-
-noinst_LTLIBRARIES = libvpn-manager.la
-
-libvpn_manager_la_SOURCES = nm-dbus-vpn.c \
- nm-dbus-vpn.h \
- nm-vpn-connection.c \
- nm-vpn-connection.h \
- nm-vpn-manager.c \
- nm-vpn-manager.h \
- nm-vpn-service.c \
- nm-vpn-service.h
-
-libvpn_manager_la_CPPFLAGS = $(DBUS_CFLAGS) \
- $(GTHREAD_CFLAGS) \
- $(HAL_CFLAGS) \
- -g \
- -Wall \
- -DDBUS_API_SUBJECT_TO_CHANGE \
- -DG_DISABLE_DEPRECATED \
- -DBINDIR=\"$(bindir)\" \
- -DDATADIR=\"$(datadir)\" \
- -DSYSCONFDIR=\"$(sysconfdir)\"
-
-
-libvpn_manager_la_LIBADD = $(DBUS_LIBS) $(GTHREAD_LIBS)
diff --git a/src/vpn-manager/nm-dbus-vpn.c b/src/vpn-manager/nm-dbus-vpn.c
deleted file mode 100644
index 4703b79bc2..0000000000
--- a/src/vpn-manager/nm-dbus-vpn.c
+++ /dev/null
@@ -1,763 +0,0 @@
-/* NetworkManager -- Network link manager
- *
- * Dan Williams <dcbw@redhat.com>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- *
- * (C) Copyright 2005 Red Hat, Inc.
- */
-
-#include <glib.h>
-#include <dbus/dbus.h>
-#include "NetworkManagerMain.h"
-#include "NetworkManagerDevice.h"
-#include "NetworkManagerDbus.h"
-#include "NetworkManagerUtils.h"
-#include "nm-dbus-vpn.h"
-#include "nm-vpn-manager.h"
-#include "nm-vpn-connection.h"
-#include "nm-utils.h"
-
-
-/*
- * nm_dbus_vpn_signal_vpn_connection_update
- *
- * Notifies the bus that a VPN connection's properties have changed.
- *
- */
-void nm_dbus_vpn_signal_vpn_connection_update (DBusConnection *con, NMVPNConnection *vpn, const char *signal)
-{
- DBusMessage *message;
- const char *vpn_name;
-
- g_return_if_fail (con != NULL);
- g_return_if_fail (vpn != NULL);
-
- if (!(message = dbus_message_new_signal (NM_DBUS_PATH_VPN, NM_DBUS_INTERFACE_VPN, signal)))
- {
- nm_warning ("Not enough memory for new dbus message!");
- return;
- }
-
- vpn_name = nm_vpn_connection_get_name (vpn);
- dbus_message_append_args (message, DBUS_TYPE_STRING, &vpn_name, DBUS_TYPE_INVALID);
- if (!dbus_connection_send (con, message, NULL))
- nm_warning ("Could not raise the %s signal!", signal);
-
- dbus_message_unref (message);
-}
-
-
-/*
- * nm_dbus_vpn_signal_vpn_connection_change
- *
- * Notifies the bus that the current VPN connection, if any, has changed.
- *
- */
-void nm_dbus_vpn_signal_vpn_connection_change (DBusConnection *con, NMVPNConnection *vpn)
-{
- DBusMessage *message;
- const char *vpn_name;
-
- g_return_if_fail (con != NULL);
-
- if (!(message = dbus_message_new_signal (NM_DBUS_PATH_VPN, NM_DBUS_INTERFACE_VPN, "VPNConnectionChange")))
- {
- nm_warning ("Not enough memory for new dbus message!");
- return;
- }
-
- if (vpn)
- vpn_name = nm_vpn_connection_get_name (vpn);
- else
- vpn_name = "";
- dbus_message_append_args (message, DBUS_TYPE_STRING, &vpn_name, DBUS_TYPE_INVALID);
- if (!dbus_connection_send (con, message, NULL))
- nm_warning ("Could not raise the VPNConnectionChange signal!");
-
- dbus_message_unref (message);
-}
-
-
-/*
- * nnm_dbus_vpn_signal_vpn_failure
- *
- * Proxy a VPN Failure message from the vpn daemon to the bus.
- *
- */
-void nm_dbus_vpn_signal_vpn_failed (DBusConnection *con, const char *signal, NMVPNConnection *vpn, const char *error_msg)
-{
- DBusMessage *message;
- const char *vpn_name;
-
- g_return_if_fail (con != NULL);
- g_return_if_fail (signal != NULL);
- g_return_if_fail (vpn != NULL);
- g_return_if_fail (error_msg != NULL);
-
- if (!(message = dbus_message_new_signal (NM_DBUS_PATH_VPN, NM_DBUS_INTERFACE_VPN, signal)))
- {
- nm_warning ("Not enough memory for new dbus message!");
- return;
- }
-
- vpn_name = nm_vpn_connection_get_name (vpn);
- dbus_message_append_args (message, DBUS_TYPE_STRING, &vpn_name, DBUS_TYPE_STRING, &error_msg, DBUS_TYPE_INVALID);
- if (!dbus_connection_send (con, message, NULL))
- nm_warning ("Could not raise the %s signal!", signal);
-
- dbus_message_unref (message);
-}
-
-
-/*
- * nnm_dbus_vpn_signal_vpn_login_banner
- *
- * Pass the VPN's login banner message to the bus if anyone wants to use it.
- *
- */
-void nm_dbus_vpn_signal_vpn_login_banner (DBusConnection *con, NMVPNConnection *vpn, const char *banner)
-{
- DBusMessage *message;
- const char *vpn_name;
-
- g_return_if_fail (con != NULL);
- g_return_if_fail (vpn != NULL);
- g_return_if_fail (banner != NULL);
-
- if (!(message = dbus_message_new_signal (NM_DBUS_PATH_VPN, NM_DBUS_INTERFACE_VPN, NM_DBUS_VPN_SIGNAL_LOGIN_BANNER)))
- {
- nm_warning ("Not enough memory for new dbus message!");
- return;
- }
-
- vpn_name = nm_vpn_connection_get_name (vpn);
- dbus_message_append_args (message, DBUS_TYPE_STRING, &vpn_name, DBUS_TYPE_STRING, &banner, DBUS_TYPE_INVALID);
- if (!dbus_connection_send (con, message, NULL))
- nm_warning ("Could not raise the VPNLoginBanner signal!");
-
- dbus_message_unref (message);
-}
-
-
-/*
- * nm_dbus_vpn_get_vpn_data
- *
- * Get VPN specific data from NMI for a vpn connection
- *
- * NOTE: caller MUST free returned value using g_strfreev()
- *
- */
-static char ** nm_dbus_vpn_get_vpn_data (DBusConnection *connection, NMVPNConnection *vpn, int *num_items)
-{
- DBusMessage *message;
- DBusError error;
- DBusMessage *reply;
- char **data_items = NULL;
- const char *vpn_name;
-
- g_return_val_if_fail (connection != NULL, NULL);
- g_return_val_if_fail (vpn != NULL, NULL);
- g_return_val_if_fail (num_items != NULL, NULL);
-
- *num_items = -1;
-
- if (!(message = dbus_message_new_method_call (NMI_DBUS_SERVICE, NMI_DBUS_PATH, NMI_DBUS_INTERFACE, "getVPNConnectionVPNData")))
- {
- nm_warning ("nm_dbus_vpn_get_vpn_data(): Couldn't allocate the dbus message");
- return (NULL);
- }
-
- vpn_name = nm_vpn_connection_get_name (vpn);
- dbus_message_append_args (message, DBUS_TYPE_STRING, &vpn_name, DBUS_TYPE_INVALID);
-
- dbus_error_init (&error);
- reply = dbus_connection_send_with_reply_and_block (connection, message, -1, &error);
- dbus_message_unref (message);
- if (dbus_error_is_set (&error))
- nm_warning ("nm_dbus_vpn_get_vpn_data(): %s raised %s", error.name, error.message);
- else if (!reply)
- nm_info ("nm_dbus_vpn_get_vpn_data(): reply was NULL.");
- else
- {
- DBusMessageIter iter, array_iter;
- GArray *buffer;
-
- dbus_message_iter_init (reply, &iter);
- dbus_message_iter_recurse (&iter, &array_iter);
-
- buffer = g_array_new (TRUE, TRUE, sizeof (gchar *));
-
- if (buffer == NULL)
- return NULL;
-
- while (dbus_message_iter_get_arg_type (&array_iter) == DBUS_TYPE_STRING)
- {
- const char *value;
- char *str;
-
- dbus_message_iter_get_basic (&array_iter, &value);
- str = g_strdup (value);
-
- if (str == NULL)
- {
- g_array_free (buffer, TRUE);
- return NULL;
- }
-
- g_array_append_val (buffer, str);
-
- dbus_message_iter_next (&array_iter);
- }
- data_items = (gchar **)(buffer->data);
- *num_items = buffer->len;
- g_array_free (buffer, FALSE);
- }
-
- if (reply)
- dbus_message_unref (reply);
-
- return (data_items);
-}
-
-
-/*
- * nm_dbus_vpn_get_routes
- *
- * Get VPN routes from NMI for a vpn connection
- *
- * NOTE: caller MUST free returned value using g_strfreev()
- *
- */
-char ** nm_dbus_vpn_get_routes (DBusConnection *connection, NMVPNConnection *vpn, int *num_items)
-{
- DBusMessage *message;
- DBusError error;
- DBusMessage *reply;
- char **routes = NULL;
- const char *vpn_name;
-
- g_return_val_if_fail (connection != NULL, NULL);
- g_return_val_if_fail (vpn != NULL, NULL);
- g_return_val_if_fail (num_items != NULL, NULL);
-
- *num_items = -1;
-
- if (!(message = dbus_message_new_method_call (NMI_DBUS_SERVICE, NMI_DBUS_PATH, NMI_DBUS_INTERFACE, "getVPNConnectionRoutes")))
- {
- nm_warning ("nm_dbus_vpn_get_routes(): Couldn't allocate the dbus message");
- return (NULL);
- }
-
- vpn_name = nm_vpn_connection_get_name (vpn);
- dbus_message_append_args (message, DBUS_TYPE_STRING, &vpn_name, DBUS_TYPE_INVALID);
-
- dbus_error_init (&error);
- reply = dbus_connection_send_with_reply_and_block (connection, message, -1, &error);
- dbus_message_unref (message);
- if (dbus_error_is_set (&error))
- nm_warning ("nm_dbus_vpn_get_routes(): %s raised %s", error.name, error.message);
- else if (!reply)
- nm_info ("nm_dbus_vpn_get_routes(): reply was NULL.");
- else
- {
- DBusMessageIter iter, array_iter;
- GArray *buffer;
-
- dbus_message_iter_init (reply, &iter);
- dbus_message_iter_recurse (&iter, &array_iter);
-
- buffer = g_array_new (TRUE, TRUE, sizeof (gchar *));
-
- if (buffer == NULL)
- return NULL;
-
- while (dbus_message_iter_get_arg_type (&array_iter) == DBUS_TYPE_STRING)
- {
- const char *value;
- char *str;
-
- dbus_message_iter_get_basic (&array_iter, &value);
- str = g_strdup (value);
-
- if (str == NULL)
- {
- g_array_free (buffer, TRUE);
- return NULL;
- }
-
- g_array_append_val (buffer, str);
-
- dbus_message_iter_next (&array_iter);
- }
- routes = (gchar **)(buffer->data);
- *num_items = buffer->len;
- g_array_free (buffer, FALSE);
- }
-
- if (reply)
- dbus_message_unref (reply);
-
- return (routes);
-}
-
-
-typedef struct UpdateOneVPNCBData
-{
- NMData * data;
- char * vpn;
-} UpdateOneVPNCBData;
-
-
-static void free_update_one_vpn_cb_data (UpdateOneVPNCBData *data)
-{
- if (data)
- g_free (data->vpn);
- g_free (data);
-}
-
-/*
- * nm_dbus_vpn_update_one_connection_cb
- *
- * Retrieve and add to our VPN Manager one VPN connection from NMI.
- *
- */
-static void nm_dbus_vpn_update_one_connection_cb (DBusPendingCall *pcall, void *user_data)
-{
- UpdateOneVPNCBData * cb_data = (UpdateOneVPNCBData *) user_data;
- DBusMessage * reply;
- const char * con_name = NULL;
- const char * service_name = NULL;
- const char * user_name = NULL;
-
- g_return_if_fail (pcall != NULL);
- g_return_if_fail (cb_data != NULL);
- g_return_if_fail (cb_data->data != NULL);
- g_return_if_fail (cb_data->data->vpn_manager != NULL);
-
- dbus_pending_call_ref (pcall);
-
- if (!dbus_pending_call_get_completed (pcall))
- goto out;
-
- if (!(reply = dbus_pending_call_steal_reply (pcall)))
- goto out;
-
- if (dbus_message_is_error (reply, "BadVPNConnectionData"))
- {
- NMVPNConnection *vpn = nm_vpn_manager_find_connection_by_name (cb_data->data->vpn_manager, cb_data->vpn);
-
- nm_vpn_connection_ref (vpn);
- nm_vpn_manager_remove_connection (cb_data->data->vpn_manager, vpn);
- nm_dbus_vpn_signal_vpn_connection_update (cb_data->data->dbus_connection, vpn, "VPNConnectionRemoved");
- nm_vpn_connection_unref (vpn);
- goto out;
- }
-
- if (dbus_message_get_args (reply, NULL, DBUS_TYPE_STRING, &con_name, DBUS_TYPE_STRING, &service_name,
- DBUS_TYPE_STRING, &user_name, DBUS_TYPE_INVALID))
- {
- NMVPNConnection * vpn;
- gboolean new = TRUE;
-
- if ((vpn = nm_vpn_manager_find_connection_by_name (cb_data->data->vpn_manager, con_name)))
- {
- nm_vpn_manager_remove_connection (cb_data->data->vpn_manager, vpn);
- new = FALSE;
- }
-
- vpn = nm_vpn_manager_add_connection (cb_data->data->vpn_manager, con_name, service_name, user_name);
- nm_dbus_vpn_signal_vpn_connection_update (cb_data->data->dbus_connection, vpn, new ? "VPNConnectionAdded" : "VPNConnectionUpdate");
- }
- dbus_message_unref (reply);
-
-out:
- dbus_pending_call_unref (pcall);
-}
-
-
-/*
- * nm_dbus_vpn_connections_update_cb
- *
- * Async callback from nnm_dbus_vpn_connections_update
- *
- */
-static void nm_dbus_vpn_connections_update_cb (DBusPendingCall *pcall, void *user_data)
-{
- NMData * data = (NMData *) user_data;
- DBusMessage * reply;
- DBusMessageIter iter, array_iter;
-
- g_return_if_fail (pcall);
- g_return_if_fail (data != NULL);
-
- dbus_pending_call_ref (pcall);
-
- if (!dbus_pending_call_get_completed (pcall))
- goto out;
-
- if (!(reply = dbus_pending_call_steal_reply (pcall)))
- goto out;
-
- if (message_is_error (reply))
- goto out;
-
- nm_info ("Updating VPN Connections...");
-
- dbus_message_iter_init (reply, &iter);
- dbus_message_iter_recurse (&iter, &array_iter);
- while (dbus_message_iter_get_arg_type (&array_iter) == DBUS_TYPE_STRING)
- {
- DBusMessage * message;
- const char * value;
-
- dbus_message_iter_get_basic (&array_iter, &value);
-
- if ((message = dbus_message_new_method_call (NMI_DBUS_SERVICE, NMI_DBUS_PATH, NMI_DBUS_INTERFACE, "getVPNConnectionProperties")))
- {
- DBusPendingCall * vpn_pcall = NULL;
-
- dbus_message_append_args (message, DBUS_TYPE_STRING, &value, DBUS_TYPE_INVALID);
- dbus_connection_send_with_reply (data->dbus_connection, message, &vpn_pcall, -1);
- dbus_message_unref (message);
- if (vpn_pcall)
- {
- UpdateOneVPNCBData * vpn_cb_data = g_malloc0 (sizeof (UpdateOneVPNCBData));
-
- vpn_cb_data->data = data;
- vpn_cb_data->vpn = g_strdup (value);
- dbus_pending_call_set_notify (vpn_pcall, nm_dbus_vpn_update_one_connection_cb, vpn_cb_data, (DBusFreeFunction) free_update_one_vpn_cb_data);
- }
- }
- dbus_message_iter_next (&array_iter);
- }
- dbus_message_unref (reply);
-
-out:
- dbus_pending_call_unref (pcall);
-}
-
-
-/*
- * nm_dbus_vpn_update_one_vpn_connection
- *
- * Update one VPN connection
- *
- */
-void nm_dbus_vpn_update_one_vpn_connection (DBusConnection *connection, const char *vpn, NMData *data)
-{
- DBusMessage * message;
- DBusPendingCall * pcall = NULL;
-
- g_return_if_fail (connection != NULL);
- g_return_if_fail (vpn != NULL);
- g_return_if_fail (data != NULL);
-
- if (!(message = dbus_message_new_method_call (NMI_DBUS_SERVICE, NMI_DBUS_PATH, NMI_DBUS_INTERFACE, "getVPNConnectionProperties")))
- {
- nm_warning ("nm_dbus_update_one_vpn_connection(): Couldn't allocate the dbus message");
- return;
- }
-
- dbus_message_append_args (message, DBUS_TYPE_STRING, &vpn, DBUS_TYPE_INVALID);
- dbus_connection_send_with_reply (connection, message, &pcall, -1);
- dbus_message_unref (message);
- if (pcall)
- {
- UpdateOneVPNCBData * cb_data = g_malloc0 (sizeof (UpdateOneVPNCBData));
-
- cb_data->data = data;
- cb_data->vpn = g_strdup (vpn);
- dbus_pending_call_set_notify (pcall, nm_dbus_vpn_update_one_connection_cb, cb_data, (DBusFreeFunction) free_update_one_vpn_cb_data);
- }
-}
-
-
-/*
- * nm_dbus_vpn_connections_update_from_nmi
- *
- * Update VPN connections from NetworkManagerInfo.
- *
- */
-static gboolean nm_dbus_vpn_connections_update_from_nmi (NMData *data)
-{
- DBusMessage * message;
- DBusPendingCall * pcall;
-
- g_return_val_if_fail (data != NULL, FALSE);
- g_return_val_if_fail (data->dbus_connection != NULL, FALSE);
- g_return_val_if_fail (data->vpn_manager != NULL, FALSE);
-
- /* Clear all existing connections in preparation for new ones */
- nm_vpn_manager_clear_connections (data->vpn_manager);
-
- if (!(message = dbus_message_new_method_call (NMI_DBUS_SERVICE, NMI_DBUS_PATH, NMI_DBUS_INTERFACE, "getVPNConnections")))
- {
- nm_warning ("nm_dbus_vpn_connections_update (): Couldn't allocate the dbus message");
- return FALSE;
- }
-
- dbus_connection_send_with_reply (data->dbus_connection, message, &pcall, -1);
- dbus_message_unref (message);
- if (pcall)
- {
- dbus_pending_call_set_notify (pcall, nm_dbus_vpn_connections_update_cb, data, NULL);
- dbus_pending_call_block (pcall);
- }
-
- return FALSE;
-}
-
-
-/*
- * nm_dbus_vpn_schedule_vpn_connections_update
- *
- * Schedule an update of VPN connections in the main thread
- *
- */
-void nm_dbus_vpn_schedule_vpn_connections_update (NMData *app_data)
-{
- GSource *source = NULL;
-
- g_return_if_fail (app_data != NULL);
- g_return_if_fail (app_data->main_context != NULL);
-
- source = g_idle_source_new ();
- /* We want this idle source to run before any other idle source */
- g_source_set_priority (source, G_PRIORITY_HIGH_IDLE);
- g_source_set_callback (source, (GSourceFunc) nm_dbus_vpn_connections_update_from_nmi, app_data, NULL);
- g_source_attach (source, app_data->main_context);
- g_source_unref (source);
-}
-
-
-/*
- * nm_dbus_vpn_get_vpn_connections
- *
- * Returns a string array of VPN connection names.
- *
- */
-static DBusMessage *nm_dbus_vpn_get_vpn_connections (DBusConnection *connection, DBusMessage *message, NMDbusCBData *data)
-{
- DBusMessage *reply = NULL;
- char **vpn_names = NULL;
- int num_names;
-
- g_return_val_if_fail (data != NULL, NULL);
- g_return_val_if_fail (data->data != NULL, NULL);
- g_return_val_if_fail (connection != NULL, NULL);
- g_return_val_if_fail (message != NULL, NULL);
-
- if (!data->data->vpn_manager)
- {
- reply = nm_dbus_create_error_message (message, NM_DBUS_INTERFACE_VPN, "NoVPNConnections", "There are no available VPN connections.");
- goto out;
- }
-
- vpn_names = nm_vpn_manager_get_connection_names (data->data->vpn_manager);
- num_names = vpn_names ? g_strv_length (vpn_names) : 0;
- if (num_names == 0)
- {
- reply = nm_dbus_create_error_message (message, NM_DBUS_INTERFACE_VPN, "NoVPNConnections", "There are no available VPN connections.");
- goto out;
- }
-
- if (!(reply = dbus_message_new_method_return (message)))
- goto out;
-
- dbus_message_append_args (reply, DBUS_TYPE_ARRAY, DBUS_TYPE_STRING, &vpn_names, num_names, DBUS_TYPE_INVALID);
-
-out:
- if (vpn_names)
- g_strfreev (vpn_names);
-
- return (reply);
-}
-
-
-/*
- * nm_dbus_vpn_get_vpn_connection_properties
- *
- * Grab properties of a VPN connection
- *
- */
-static DBusMessage *nm_dbus_vpn_get_vpn_connection_properties (DBusConnection *connection, DBusMessage *message, NMDbusCBData *data)
-{
- DBusMessage *reply = NULL;
- DBusError error;
- const char *name;
- gboolean good = FALSE;
- NMVPNConnection *vpn_con;
-
- g_return_val_if_fail (data != NULL, NULL);
- g_return_val_if_fail (data->data != NULL, NULL);
- g_return_val_if_fail (connection != NULL, NULL);
- g_return_val_if_fail (message != NULL, NULL);
-
- /* Check for no VPN Manager */
- if (!data->data->vpn_manager)
- return nm_dbus_create_error_message (message, NM_DBUS_INTERFACE_VPN, "NoVPNConnections", "There are no available VPN connections.");
-
- if (!(reply = dbus_message_new_method_return (message)))
- return NULL;
-
- dbus_error_init (&error);
- if (dbus_message_get_args (message, &error, DBUS_TYPE_STRING, &name, DBUS_TYPE_INVALID))
- {
- if ((vpn_con = nm_vpn_manager_find_connection_by_name (data->data->vpn_manager, name)))
- {
- const char *user_name;
- const char *service;
-
- user_name = nm_vpn_connection_get_user_name (vpn_con);
- service = nm_vpn_service_get_service_name (nm_vpn_connection_get_service (vpn_con));
-
- dbus_message_append_args (reply, DBUS_TYPE_STRING, &name, DBUS_TYPE_STRING, &user_name, DBUS_TYPE_STRING, &service, DBUS_TYPE_INVALID);
- good = TRUE;
- }
- }
-
- if (!good)
- reply = nm_dbus_create_error_message (message, NM_DBUS_INTERFACE_VPN, "InvalidVPNConnection", "No VPN connection with that name was found.");
-
- return reply;
-}
-
-
-/*
- * nm_dbus_vpn_get_active_vpn_connection
- *
- * Return the name of the currently active VPN connection.
- *
- */
-static DBusMessage *nm_dbus_vpn_get_active_vpn_connection (DBusConnection *connection, DBusMessage *message, NMDbusCBData *data)
-{
- DBusMessage *reply = NULL;
- const char *name;
- NMVPNConnection *vpn = NULL;
-
- g_return_val_if_fail (data != NULL, NULL);
- g_return_val_if_fail (data->data != NULL, NULL);
- g_return_val_if_fail (connection != NULL, NULL);
- g_return_val_if_fail (message != NULL, NULL);
-
- /* Check for no VPN Manager */
- if (!data->data->vpn_manager)
- return nm_dbus_create_error_message (message, NM_DBUS_INTERFACE_VPN, "NoVPNConnections", "There are no available VPN connections.");
-
- if (!(vpn = nm_vpn_manager_get_active_vpn_connection (data->data->vpn_manager)))
- return nm_dbus_create_error_message (message, NM_DBUS_INTERFACE_VPN, "NoActiveVPNConnection", "There is no active VPN connection.");
-
- if (!(reply = dbus_message_new_method_return (message)))
- return NULL;
-
- name = nm_vpn_connection_get_name (vpn);
- dbus_message_append_args (reply, DBUS_TYPE_STRING, &name, DBUS_TYPE_INVALID);
-
- return reply;
-}
-
-
-/*
- * nm_dbus_vpn_activate_connection
- *
- * Activate a specific VPN connection.
- *
- */
-static DBusMessage *nm_dbus_vpn_activate_connection (DBusConnection *connection, DBusMessage *message, NMDbusCBData *data)
-{
- DBusError error;
- const char *name;
- char **passwords;
- int num_passwords;
- NMVPNConnection *vpn;
-
- g_return_val_if_fail (data != NULL, NULL);
- g_return_val_if_fail (data->data != NULL, NULL);
- g_return_val_if_fail (connection != NULL, NULL);
- g_return_val_if_fail (message != NULL, NULL);
-
- nm_info ("Entering");
-
- dbus_error_init (&error);
-
- if (dbus_message_get_args (message, &error, DBUS_TYPE_STRING, &name, DBUS_TYPE_ARRAY, DBUS_TYPE_STRING, &passwords, &num_passwords, DBUS_TYPE_INVALID)) {
- if ((vpn = nm_vpn_manager_find_connection_by_name (data->data->vpn_manager, name)))
- {
- int item_count = -1;
- char **items;
-
- if ((items = nm_dbus_vpn_get_vpn_data (connection, vpn, &item_count)))
- {
- char *joined_string = g_strjoinv (" / ", items);
- NMVPNService *service = nm_vpn_connection_get_service (vpn);;
-
- nm_info ("Will activate VPN connection '%s', service '%s', user_name '%s', vpn_data '%s'.",
- name, nm_vpn_service_get_service_name (service), nm_vpn_connection_get_user_name (vpn), joined_string);
- nm_vpn_manager_activate_vpn_connection (data->data->vpn_manager, vpn, passwords, num_passwords, items, item_count);
-
- g_free (joined_string);
- g_strfreev (items);
- }
- } else {
- nm_warning ("Cannot find name '%s'", name);
- }
- } else {
- nm_warning ("Syntax error receiving nm_dbus_vpn_activate_connection");
- }
-
- return NULL;
-}
-
-
-/*
- * nm_dbus_vpn_deactivate_connection
- *
- * Deactivate the active VPN connection, if any.
- *
- */
-static DBusMessage *nm_dbus_vpn_deactivate_connection (DBusConnection *connection, DBusMessage *message, NMDbusCBData *data)
-{
- g_return_val_if_fail (data != NULL, NULL);
- g_return_val_if_fail (data->data != NULL, NULL);
- g_return_val_if_fail (connection != NULL, NULL);
- g_return_val_if_fail (message != NULL, NULL);
-
- nm_info ("Will deactivate the current VPN connection.");
- nm_vpn_manager_deactivate_vpn_connection (data->data->vpn_manager);
-
- return NULL;
-}
-
-
-/*
- * nm_dbus_vpn_methods_setup
- *
- * Register handlers for dbus methods on the
- * org.freedesktop.NetworkManager.VPNConnections object.
- *
- */
-NMDbusMethodList *nm_dbus_vpn_methods_setup (void)
-{
- NMDbusMethodList *list = nm_dbus_method_list_new (NULL);
-
- nm_dbus_method_list_add_method (list, "getVPNConnections", nm_dbus_vpn_get_vpn_connections);
- nm_dbus_method_list_add_method (list, "getVPNConnectionProperties", nm_dbus_vpn_get_vpn_connection_properties);
- nm_dbus_method_list_add_method (list, "getActiveVPNConnection", nm_dbus_vpn_get_active_vpn_connection);
- nm_dbus_method_list_add_method (list, "activateVPNConnection", nm_dbus_vpn_activate_connection);
- nm_dbus_method_list_add_method (list, "deactivateVPNConnection", nm_dbus_vpn_deactivate_connection);
-
- return (list);
-}
diff --git a/src/vpn-manager/nm-dbus-vpn.h b/src/vpn-manager/nm-dbus-vpn.h
deleted file mode 100644
index 6713861e4f..0000000000
--- a/src/vpn-manager/nm-dbus-vpn.h
+++ /dev/null
@@ -1,42 +0,0 @@
-/* NetworkManager -- Network link manager
- *
- * Dan Williams <dcbw@redhat.com>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- *
- * (C) Copyright 2005 Red Hat, Inc.
- */
-
-#ifndef NM_DBUS_VPN_H
-#define NM_DBUS_VPN_H
-
-#include "NetworkManagerDbusUtils.h"
-#include "nm-vpn-manager.h"
-#include "nm-vpn-connection.h"
-
-
-void nm_dbus_vpn_schedule_vpn_connections_update (NMData *app_data);
-void nm_dbus_vpn_update_one_vpn_connection (DBusConnection *connection, const char *vpn, NMData *data);
-
-void nm_dbus_vpn_signal_vpn_connection_update (DBusConnection *con, NMVPNConnection *vpn, const char *signal);
-void nm_dbus_vpn_signal_vpn_connection_change (DBusConnection *con, NMVPNConnection *vpn);
-void nm_dbus_vpn_signal_vpn_failed (DBusConnection *con, const char *signal, NMVPNConnection *vpn, const char *error_msg);
-void nm_dbus_vpn_signal_vpn_login_banner (DBusConnection *con, NMVPNConnection *vpn, const char *banner);
-
-char ** nm_dbus_vpn_get_routes (DBusConnection *connection, NMVPNConnection *vpn, int *num_items);
-
-NMDbusMethodList * nm_dbus_vpn_methods_setup (void);
-
-#endif
diff --git a/src/vpn-manager/nm-vpn-connection.c b/src/vpn-manager/nm-vpn-connection.c
deleted file mode 100644
index 223fd3c3c3..0000000000
--- a/src/vpn-manager/nm-vpn-connection.c
+++ /dev/null
@@ -1,101 +0,0 @@
-/* nm-vpn-connection.c - handle a single VPN connections within NetworkManager's framework
- *
- * Copyright (C) 2005 Dan Williams
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
- * 02111-1307, USA.
- */
-
-#include "config.h"
-#include <glib.h>
-#include <string.h>
-#include "nm-vpn-connection.h"
-
-
-struct NMVPNConnection
-{
- int refcount;
- char *name;
- char *user_name;
- NMVPNService *service;
-};
-
-
-NMVPNConnection *nm_vpn_connection_new (const char *name, const char *user_name, NMVPNService *service)
-{
- NMVPNConnection *connection;
-
- g_return_val_if_fail (name != NULL, NULL);
- g_return_val_if_fail (user_name != NULL, NULL);
- g_return_val_if_fail (service != NULL, NULL);
-
-
- connection = g_malloc0 (sizeof (NMVPNConnection));
- connection->refcount = 1;
-
- connection->name = g_strdup (name);
- connection->user_name = g_strdup (user_name);
-
- nm_vpn_service_ref (service);
- connection->service = service;
-
- return connection;
-}
-
-
-void nm_vpn_connection_ref (NMVPNConnection *connection)
-{
- g_return_if_fail (connection != NULL);
-
- connection->refcount++;
-}
-
-void nm_vpn_connection_unref (NMVPNConnection *connection)
-{
- g_return_if_fail (connection != NULL);
-
- connection->refcount--;
- if (connection->refcount <= 0)
- {
- g_free (connection->name);
- g_free (connection->user_name);
- nm_vpn_service_unref (connection->service);
-
- memset (connection, 0, sizeof (NMVPNConnection));
- g_free (connection);
- }
-}
-
-const char *nm_vpn_connection_get_name (NMVPNConnection *connection)
-{
- g_return_val_if_fail (connection != NULL, NULL);
-
- return connection->name;
-}
-
-const char *nm_vpn_connection_get_user_name (NMVPNConnection *connection)
-{
- g_return_val_if_fail (connection != NULL, NULL);
-
- return connection->user_name;
-}
-
-NMVPNService *nm_vpn_connection_get_service (NMVPNConnection *connection)
-{
- g_return_val_if_fail (connection != NULL, NULL);
-
- return connection->service;
-}
-
diff --git a/src/vpn-manager/nm-vpn-connection.h b/src/vpn-manager/nm-vpn-connection.h
deleted file mode 100644
index 7109c15595..0000000000
--- a/src/vpn-manager/nm-vpn-connection.h
+++ /dev/null
@@ -1,36 +0,0 @@
-/* nm-vpn-connection.h - handle a single VPN connection within NetworkManager's framework
- *
- * Copyright (C) 2005 Dan Williams
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
- * 02111-1307, USA.
- */
-#ifndef NM_VPN_CONNECTION_H
-#define NM_VPN_CONNECTION_H
-
-#include "nm-vpn-service.h"
-
-typedef struct NMVPNConnection NMVPNConnection;
-
-
-NMVPNConnection *nm_vpn_connection_new (const char *name, const char *user_name, NMVPNService *service);
-void nm_vpn_connection_ref (NMVPNConnection *connection);
-void nm_vpn_connection_unref (NMVPNConnection *connection);
-
-const char * nm_vpn_connection_get_name (NMVPNConnection *connection);
-const char * nm_vpn_connection_get_user_name (NMVPNConnection *connection);
-NMVPNService * nm_vpn_connection_get_service (NMVPNConnection *connection);
-
-#endif /* NM_VPN_MANAGER_H */
diff --git a/src/vpn-manager/nm-vpn-manager.c b/src/vpn-manager/nm-vpn-manager.c
deleted file mode 100644
index b6668efe2a..0000000000
--- a/src/vpn-manager/nm-vpn-manager.c
+++ /dev/null
@@ -1,885 +0,0 @@
-/* nm-vpn-manager.c - handle VPN connections within NetworkManager's framework
- *
- * Copyright (C) 2005 Dan Williams
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
- * 02111-1307, USA.
- */
-
-#include <glib.h>
-#include <stdio.h>
-#include <string.h>
-#include <sys/socket.h>
-#include <netinet/in.h>
-#include <arpa/inet.h>
-#include <dbus/dbus.h>
-#include "nm-vpn-manager.h"
-#include "NetworkManager.h"
-#include "NetworkManagerMain.h"
-#include "NetworkManagerDbus.h"
-#include "NetworkManagerSystem.h"
-#include "nm-vpn-connection.h"
-#include "nm-vpn-service.h"
-#include "nm-dbus-vpn.h"
-#include "nm-activation-request.h"
-#include "nm-utils.h"
-
-#define VPN_SERVICE_FILE_PATH SYSCONFDIR"/NetworkManager/VPN"
-
-struct NMVPNManager
-{
- NMData * app_data;
- GSList * services;
- GSList * connections;
- NMVPNConnection * active;
- char * active_device;
- NMIP4Config * active_config;
-};
-
-static GSList * nm_vpn_manager_load_services (void);
-static void nm_vpn_manager_set_active_vpn_connection (NMVPNManager *manager, NMVPNConnection *con);
-
-/*
- * nm_vpn_manager_new
- *
- * Create a new VPN manager instance.
- *
- */
-NMVPNManager *nm_vpn_manager_new (NMData *app_data)
-{
- NMVPNManager *manager;
-
- g_return_val_if_fail (app_data != NULL, NULL);
-
- manager = g_malloc0 (sizeof (NMVPNManager));
- manager->services = nm_vpn_manager_load_services ();
- manager->app_data = app_data;
-
- return manager;
-}
-
-
-/*
- * nm_vpn_manager_dispose
- *
- * Release the VPN manager and all its data.
- *
- */
-void nm_vpn_manager_dispose (NMVPNManager *manager)
-{
- g_return_if_fail (manager != NULL);
-
- nm_vpn_manager_set_active_vpn_connection (manager, NULL);
- if (manager->active_device)
- g_free (manager->active_device);
-
- if (manager->active_config)
- {
- nm_system_remove_ip4_config_nameservers (manager->app_data->named_manager, manager->active_config);
- nm_system_remove_ip4_config_search_domains (manager->app_data->named_manager, manager->active_config);
- nm_ip4_config_unref (manager->active_config);
- }
-
- g_slist_foreach (manager->connections, (GFunc) nm_vpn_connection_unref, NULL);
- g_slist_free (manager->connections);
-
- g_slist_foreach (manager->services, (GFunc) nm_vpn_service_unref, NULL);
- g_slist_free (manager->services);
-
- memset (manager, 0, sizeof (NMVPNManager));
- g_free (manager);
-}
-
-
-/*
- * nm_vpn_manager_clear_connections
- *
- * Dispose of all the VPN connections the manager knows about.
- *
- */
-void nm_vpn_manager_clear_connections (NMVPNManager *manager)
-{
- g_return_if_fail (manager != NULL);
-
- g_slist_foreach (manager->connections, (GFunc) nm_vpn_connection_unref, NULL);
- g_slist_free (manager->connections);
- manager->connections = NULL;
-}
-
-
-/*
- * find_vpn_service
- *
- * Return the VPN Service for a given vpn service name.
- *
- */
-static NMVPNService *find_service_by_name (NMVPNManager *manager, const char *service_name)
-{
- NMVPNService *service = NULL;
- GSList *elt;
-
- g_return_val_if_fail (manager != NULL, NULL);
- g_return_val_if_fail (service_name != NULL, NULL);
-
- for (elt = manager->services; elt; elt = g_slist_next (elt))
- {
- if ((service = (NMVPNService *)(elt->data)))
- {
- const char *search_name = nm_vpn_service_get_service_name (service);
- if (search_name && (strcmp (service_name, search_name) == 0))
- break;
- }
- service = NULL;
- }
-
- return service;
-}
-
-
-/*
- * nm_vpn_manager_find_connection_by_name
- *
- * Return the NMVPNConnection object associated with a particular name.
- *
- */
-NMVPNConnection *nm_vpn_manager_find_connection_by_name (NMVPNManager *manager, const char *con_name)
-{
- NMVPNConnection *con = NULL;
- GSList *elt;
-
- g_return_val_if_fail (manager != NULL, NULL);
- g_return_val_if_fail (con_name != NULL, NULL);
-
- for (elt = manager->connections; elt; elt = g_slist_next (elt))
- {
- if ((con = (NMVPNConnection *)(elt->data)))
- {
- const char *search_name = nm_vpn_connection_get_name (con);
- if (search_name && (strcmp (con_name, search_name) == 0))
- break;
- }
- con = NULL;
- }
-
- return con;
-}
-
-
-/*
- * nm_vpn_manager_set_active_vpn_connection
- *
- * Sets the active connection and adds a dbus signal filter for that
- * connection's service name.
- *
- */
-static void nm_vpn_manager_set_active_vpn_connection (NMVPNManager *manager, NMVPNConnection *con)
-{
- char *match_string = NULL;
- const char *service_name = NULL;
- NMVPNConnection *active;
- NMVPNService *service;
-
- g_return_if_fail (manager != NULL);
-
- if ((active = nm_vpn_manager_get_active_vpn_connection (manager)))
- {
- service = nm_vpn_connection_get_service (active);
- if (service && (service_name = nm_vpn_service_get_service_name (service)))
- {
- /* Remove any previous watch on this VPN connection's service name */
- match_string = g_strdup_printf ("type='signal',"
- "interface='%s',"
- "sender='%s'", service_name, service_name);
- dbus_bus_remove_match (manager->app_data->dbus_connection, match_string, NULL);
- g_free (match_string);
- }
- nm_vpn_connection_unref (active);
- }
- manager->active = NULL;
-
- if (manager->active_config)
- {
- nm_system_remove_ip4_config_nameservers (manager->app_data->named_manager, manager->active_config);
- nm_system_remove_ip4_config_search_domains (manager->app_data->named_manager, manager->active_config);
- nm_ip4_config_unref (manager->active_config);
- manager->active_config = NULL;
- }
-
- if (manager->active_device)
- {
- nm_system_device_set_up_down_with_iface (NULL, manager->active_device, FALSE);
- nm_system_device_flush_routes_with_iface (manager->active_device);
- nm_system_device_flush_addresses_with_iface (manager->active_device);
- g_free (manager->active_device);
- manager->active_device = NULL;
- }
-
- nm_dbus_vpn_signal_vpn_connection_change (manager->app_data->dbus_connection, con);
-
- /* If passed NULL (clear active connection) there's nothing more to do */
- if (!con)
- return;
-
- service = nm_vpn_connection_get_service (con);
- if (!service || !(service_name = nm_vpn_service_get_service_name (service)))
- {
- nm_warning ("VPN connection could not be set active because it didn't have a VPN service.");
- return;
- }
-
- nm_vpn_connection_ref (con);
- manager->active = con;
-
- /* Add a dbus filter for this connection's service name so its signals
- * get delivered to us.
- */
- match_string = g_strdup_printf ("type='signal',"
- "interface='%s',"
- "sender='%s'", service_name, service_name);
- dbus_bus_add_match (manager->app_data->dbus_connection, match_string, NULL);
- g_free (match_string);
-}
-
-
-/*
- * nm_vpn_manager_add_connection
- *
- * Add a new VPN connection if none already exits, otherwise update the existing one.
- *
- */
-NMVPNConnection *nm_vpn_manager_add_connection (NMVPNManager *manager, const char *name, const char *service_name, const char *user_name)
-{
- NMVPNConnection *connection = NULL;
- NMVPNService *service;
-
- g_return_val_if_fail (manager != NULL, NULL);
- g_return_val_if_fail (name != NULL, NULL);
- g_return_val_if_fail (service_name != NULL, NULL);
- g_return_val_if_fail (user_name != NULL, NULL);
-
- /* Verify that the service name we are adding is in our allowed list */
- service = find_service_by_name (manager, service_name);
- if (service && (connection = nm_vpn_connection_new (name, user_name, service)))
- {
- GSList *elt;
-
- /* Remove the existing connection if found */
- for (elt = manager->connections; elt; elt = g_slist_next (elt))
- {
- NMVPNConnection *con = (NMVPNConnection *)(elt->data);
-
- if (con && nm_vpn_connection_get_name (con) && (strcmp (nm_vpn_connection_get_name (con), name) == 0))
- {
- manager->connections = g_slist_remove_link (manager->connections, elt);
- nm_vpn_connection_unref (con);
- g_slist_free (elt);
- }
- }
-
- /* Add in the updated connection */
- manager->connections = g_slist_append (manager->connections, connection);
- }
-
- return connection;
-}
-
-
-/*
- * nm_vpn_manager_remove_connection
- *
- * Remove a VPN connection.
- *
- */
-void nm_vpn_manager_remove_connection (NMVPNManager *manager, NMVPNConnection *vpn)
-{
- g_return_if_fail (manager != NULL);
- g_return_if_fail (vpn != NULL);
-
- manager->connections = g_slist_remove (manager->connections, vpn);
- nm_vpn_connection_unref (vpn);
-}
-
-
-/*
- * Prints config returned from vpnc-helper
- */
-static void print_vpn_config (guint32 ip4_vpn_gateway,
- const char *tundev,
- guint32 ip4_internal_address,
- gint32 ip4_internal_netmask,
- guint32 *ip4_internal_dns,
- guint32 ip4_internal_dns_len,
- guint32 *ip4_internal_nbns,
- guint32 ip4_internal_nbns_len,
- const char *dns_domain,
- const char *login_banner)
-{
- struct in_addr temp_addr;
- guint32 i;
-
- temp_addr.s_addr = ip4_vpn_gateway;
- nm_info ("VPN Gateway: %s", inet_ntoa (temp_addr));
- nm_info ("Tunnel Device: %s", tundev);
- temp_addr.s_addr = ip4_internal_address;
- nm_info ("Internal IP4 Address: %s", inet_ntoa (temp_addr));
- temp_addr.s_addr = ip4_internal_netmask;
- nm_info ("Internal IP4 Netmask: %s", inet_ntoa (temp_addr));
-
- for (i = 0; i < ip4_internal_dns_len; i++)
- {
- if (ip4_internal_dns[i] != 0)
- {
- temp_addr.s_addr = ip4_internal_dns[i];
- nm_info ("Internal IP4 DNS: %s", inet_ntoa (temp_addr));
- }
- }
-
- for (i = 0; i < ip4_internal_nbns_len; i++)
- {
- if (ip4_internal_nbns[i] != 0)
- {
- temp_addr.s_addr = ip4_internal_nbns[i];
- nm_info ("Internal IP4 NBNS: %s", inet_ntoa (temp_addr));
- }
- }
-
- nm_info ("DNS Domain: '%s'", dns_domain);
- nm_info ("Login Banner:");
- nm_info ("-----------------------------------------");
- nm_info ("%s", login_banner);
- nm_info ("-----------------------------------------");
-}
-
-/*
- * nm_vpn_manager_handle_ip4_config_signal
- *
- * Configure a device with IPv4 config info in response the the VPN daemon.
- *
- */
-void nm_vpn_manager_handle_ip4_config_signal (NMVPNManager *manager, DBusMessage *message, NMVPNService *service, NMVPNConnection *con)
-{
- guint32 ip4_vpn_gateway;
- char * tundev;
- guint32 ip4_internal_address;
- guint32 ip4_internal_netmask;
- guint32 * ip4_internal_dns;
- guint32 ip4_internal_dns_len;
- guint32 * ip4_internal_nbns;
- guint32 ip4_internal_nbns_len;
- char * dns_domain;
- char * login_banner;
-
- g_return_if_fail (manager != NULL);
- g_return_if_fail (message != NULL);
- g_return_if_fail (service != NULL);
- g_return_if_fail (con != NULL);
-
- if (dbus_message_get_args(message, NULL, DBUS_TYPE_UINT32, &ip4_vpn_gateway,
- DBUS_TYPE_STRING, &tundev,
- DBUS_TYPE_UINT32, &ip4_internal_address,
- DBUS_TYPE_UINT32, &ip4_internal_netmask,
- DBUS_TYPE_ARRAY, DBUS_TYPE_UINT32, &ip4_internal_dns, &ip4_internal_dns_len,
- DBUS_TYPE_ARRAY, DBUS_TYPE_UINT32, &ip4_internal_nbns, &ip4_internal_nbns_len,
- DBUS_TYPE_STRING, &dns_domain,
- DBUS_TYPE_STRING, &login_banner, DBUS_TYPE_INVALID))
- {
- NMIP4Config * config;
- NMDevice * vpn_dev;
- guint32 i;
-
-#if 0
- print_vpn_config (ip4_vpn_gateway, tundev, ip4_internal_address, ip4_internal_netmask,
- ip4_internal_dns, ip4_internal_dns_len, ip4_internal_nbns, ip4_internal_nbns_len,
- dns_domain, login_banner);
-#endif
-
- config = nm_ip4_config_new ();
-
- nm_ip4_config_set_address (config, ip4_internal_address);
-
- if (ip4_internal_netmask)
- nm_ip4_config_set_netmask (config, ip4_internal_netmask);
- else
- nm_ip4_config_set_netmask (config, 0x00FF); /* Class C */
-
- nm_ip4_config_set_gateway (config, ip4_vpn_gateway);
-
- if (strlen (dns_domain))
- nm_ip4_config_add_domain (config, dns_domain);
-
- for (i = 0; i < ip4_internal_dns_len; i++)
- {
- if (ip4_internal_dns[i] != 0)
- nm_ip4_config_add_nameserver (config, ip4_internal_dns[i]);
- }
-
- manager->active_device = g_strdup (tundev);
- manager->active_config = config;
- vpn_dev = nm_get_active_device (manager->app_data);
- if (vpn_dev)
- {
- int num_routes = -1;
- char **routes = nm_dbus_vpn_get_routes (manager->app_data->dbus_connection, con, &num_routes);
-
- nm_system_vpn_device_set_from_ip4_config (manager->app_data->named_manager, vpn_dev,
- manager->active_device, manager->active_config,
- routes, num_routes);
- if (login_banner && strlen (login_banner))
- nm_dbus_vpn_signal_vpn_login_banner (manager->app_data->dbus_connection, con, login_banner);
- g_strfreev(routes);
- }
- }
-}
-
-
-/*
- * nm_vpn_manager_get_connection_names
- *
- * Return an array of strings of all the VPN Connection names
- * we know about.
- *
- */
-char **nm_vpn_manager_get_connection_names (NMVPNManager *manager)
-{
- char **names = NULL;
- GSList *elt;
- int i;
-
- g_return_val_if_fail (manager != NULL, NULL);
-
- names = g_malloc0 ((g_slist_length (manager->connections) + 1) * sizeof (char *));
- for (elt = manager->connections, i = 0; elt; elt = g_slist_next (elt), i++)
- {
- NMVPNConnection *vpn_con = (NMVPNConnection *)(elt->data);
- if (vpn_con)
- names[i] = g_strdup (nm_vpn_connection_get_name (vpn_con));
- }
-
- return names;
-}
-
-
-/*
- * nm_vpn_manager_get_active_vpn_connection
- *
- * Return the active VPN connection, if any.
- *
- */
-NMVPNConnection *nm_vpn_manager_get_active_vpn_connection (NMVPNManager *manager)
-{
- g_return_val_if_fail (manager != NULL, NULL);
-
- return manager->active;
-}
-
-
-/*
- * construct_op_from_service_name
- *
- * Construct an object path from a dbus service name by replacing
- * all "." in the service with "/" and prepending a "/" to the
- * object path.
- *
- */
-static char *construct_op_from_service_name (const char *service_name)
-{
- char **split = NULL;
- char *temp1;
- char *temp2;
-
- g_return_val_if_fail (service_name != NULL, NULL);
-
- if (!(split = g_strsplit (service_name, ".", 0)))
- return NULL;
-
- temp1 = g_strjoinv ("/", split);
- g_strfreev (split);
- temp2 = g_strdup_printf ("/%s", temp1);
- g_free (temp1);
-
- if (!temp2 || !strlen (temp2))
- {
- g_free (temp2);
- temp2 = NULL;
- }
-
- return temp2;
-}
-
-
-/*
- * nm_vpn_manager_process_signal
- *
- * Possibly process a signal from the bus, if it comes from the currently
- * active VPN daemon, if any. Return TRUE if processed, FALSE if not.
- *
- */
-gboolean nm_vpn_manager_process_signal (NMVPNManager *manager, DBusMessage *message)
-{
- const char * object_path;
- const char * member;
- const char * temp_op;
- NMVPNConnection * active;
- NMVPNService * service;
- const char * service_name;
-
- g_return_val_if_fail (manager != NULL, FALSE);
- g_return_val_if_fail (message != NULL, FALSE);
-
- if (!(object_path = dbus_message_get_path (message)))
- return FALSE;
-
- if (!(member = dbus_message_get_member (message)))
- return FALSE;
-
- if (!(active = nm_vpn_manager_get_active_vpn_connection (manager)))
- return FALSE;
-
- service = nm_vpn_connection_get_service (active);
- if (!service || !(service_name = nm_vpn_service_get_service_name (service)))
- return FALSE;
-
- temp_op = construct_op_from_service_name (service_name);
- if (!temp_op || (strcmp (object_path, temp_op) != 0))
- return FALSE;
-
- if ( dbus_message_is_signal (message, service_name, NM_DBUS_VPN_SIGNAL_LOGIN_FAILED)
- || dbus_message_is_signal (message, service_name, NM_DBUS_VPN_SIGNAL_LAUNCH_FAILED)
- || dbus_message_is_signal (message, service_name, NM_DBUS_VPN_SIGNAL_CONNECT_FAILED)
- || dbus_message_is_signal (message, service_name, NM_DBUS_VPN_SIGNAL_VPN_CONFIG_BAD)
- || dbus_message_is_signal (message, service_name, NM_DBUS_VPN_SIGNAL_IP_CONFIG_BAD))
- {
- char *error_msg;
-
- if (!dbus_message_get_args (message, NULL, DBUS_TYPE_STRING, &error_msg, DBUS_TYPE_INVALID))
- error_msg = (char *) "";
- nm_warning ("VPN failed for service '%s', signal '%s', with message '%s'.", service_name, member, error_msg);
- nm_dbus_vpn_signal_vpn_failed (manager->app_data->dbus_connection, member, active, error_msg);
- }
- else if (dbus_message_is_signal (message, service_name, NM_DBUS_VPN_SIGNAL_STATE_CHANGE))
- {
- NMVPNState old_state;
- NMVPNState new_state;
-
- if (dbus_message_get_args (message, NULL, DBUS_TYPE_UINT32, &old_state, DBUS_TYPE_UINT32, &new_state, DBUS_TYPE_INVALID))
- {
- nm_info ("VPN service '%s' signaled new state %d, old state %d.", service_name, new_state, old_state);
- nm_vpn_service_set_state (service, new_state);
-
- /* If the VPN daemon state is now stopped and it was starting, clear the active connection */
- if (((new_state == NM_VPN_STATE_STOPPED) || (new_state == NM_VPN_STATE_SHUTDOWN) || (new_state == NM_VPN_STATE_STOPPING))
- && ((old_state == NM_VPN_STATE_STARTED) || (old_state == NM_VPN_STATE_STARTING)))
- {
- nm_vpn_manager_set_active_vpn_connection (manager, NULL);
- }
- }
- }
- else if (dbus_message_is_signal (message, service_name, NM_DBUS_VPN_SIGNAL_IP4_CONFIG))
- nm_vpn_manager_handle_ip4_config_signal (manager, message, service, active);
-
- return TRUE;
-}
-
-
-/*
- * nm_vpn_manager_process_name_owner_changed
- *
- * Respond to "service created"/"service deleted" signals from dbus for our active VPN daemon.
- *
- */
-gboolean nm_vpn_manager_process_name_owner_changed (NMVPNManager *manager, const char *changed_service_name, const char *old_owner, const char *new_owner)
-{
- NMVPNService *service;
- NMVPNConnection *active;
- gboolean old_owner_good = (old_owner && strlen (old_owner));
- gboolean new_owner_good = (new_owner && strlen (new_owner));
-
- g_return_val_if_fail (manager != NULL, FALSE);
- g_return_val_if_fail (changed_service_name != NULL, FALSE);
-
- if (!(active = nm_vpn_manager_get_active_vpn_connection (manager)))
- return FALSE;
- nm_vpn_connection_ref (active);
-
- if (!(service = nm_vpn_connection_get_service (active)))
- {
- nm_vpn_connection_unref (active);
- return FALSE;
- }
-
- /* Can't handle the signal if its not from our active VPN service */
- if (strcmp (nm_vpn_service_get_service_name (service), changed_service_name) != 0)
- {
- nm_vpn_connection_unref (active);
- return FALSE;
- }
-
- if (!old_owner_good && new_owner_good)
- {
- /* VPN service got created. */
- }
- else if (old_owner_good && !new_owner_good)
- {
- /* VPN service went away. */
- nm_vpn_service_set_state (service, NM_VPN_STATE_SHUTDOWN);
- nm_vpn_manager_set_active_vpn_connection (manager, NULL);
- nm_dbus_vpn_signal_vpn_connection_change (manager->app_data->dbus_connection, active);
- }
-
- nm_vpn_connection_unref (active);
- return TRUE;
-}
-
-
-/*
- * nm_vpn_manager_activate_vpn_connection
- *
- * Signal the VPN service daemon to activate a particular VPN connection,
- * launching that daemon if necessary.
- *
- */
-void nm_vpn_manager_activate_vpn_connection (NMVPNManager *manager, NMVPNConnection *vpn, char **password_items, int password_count, char **data_items, int count)
-{
- DBusMessage *message;
- DBusMessage *reply;
- char *op;
- NMVPNService *service;
- const char *service_name;
- const char *name;
- const char *user_name;
- DBusError error;
-
- g_return_if_fail (manager != NULL);
- g_return_if_fail (manager->app_data != NULL);
- g_return_if_fail (manager->app_data->dbus_connection != NULL);
- g_return_if_fail (vpn != NULL);
- g_return_if_fail (password_items != NULL);
- g_return_if_fail (data_items != NULL);
-
- nm_vpn_manager_set_active_vpn_connection (manager, NULL);
-
- /* Construct a new method call with the correct service and object path */
- if (!(service = nm_vpn_connection_get_service (vpn)) || !(service_name = nm_vpn_service_get_service_name (service)))
- return;
-
- nm_vpn_manager_set_active_vpn_connection (manager, vpn);
-
- /* Start the daemon if its not already running */
- if (!dbus_bus_name_has_owner (manager->app_data->dbus_connection, service_name, NULL))
- {
- if (!nm_vpn_service_exec_daemon (service))
- {
- nm_vpn_manager_set_active_vpn_connection (manager, NULL);
- return;
- }
- }
-
- /* Send the activate request to the daemon */
- op = construct_op_from_service_name (service_name);
- message = dbus_message_new_method_call (service_name, op, service_name, "startConnection");
- g_free (op);
- if (!message)
- {
- nm_warning ("Couldn't allocate dbus message.");
- nm_vpn_manager_set_active_vpn_connection (manager, NULL);
- return;
- }
-
- name = nm_vpn_connection_get_name (vpn);
- user_name = nm_vpn_connection_get_user_name (vpn);
-
- dbus_message_append_args (message, DBUS_TYPE_STRING, &name,
- DBUS_TYPE_STRING, &user_name,
- DBUS_TYPE_ARRAY, DBUS_TYPE_STRING, &password_items, password_count,
- DBUS_TYPE_ARRAY, DBUS_TYPE_STRING, &data_items, count,
- DBUS_TYPE_INVALID);
-
- /* Send the message to the daemon again, now that its running. */
- dbus_error_init (&error);
- reply = dbus_connection_send_with_reply_and_block (manager->app_data->dbus_connection, message, -1, &error);
- dbus_message_unref (message);
- if (dbus_error_is_set (&error))
- {
- nm_warning ("Could not activate the VPN service. dbus says: '%s' '%s'.", error.name, error.message);
- dbus_error_free (&error);
- nm_vpn_manager_set_active_vpn_connection (manager, NULL);
- return;
- }
-
- if (reply)
- dbus_message_unref (reply);
-}
-
-
-/*
- * nm_vpn_manager_deactivate_vpn_connection
- *
- * Signal the VPN service daemon to deactivate a particular VPN connection.
- *
- */
-void nm_vpn_manager_deactivate_vpn_connection (NMVPNManager *manager)
-{
- DBusMessage * message;
- char * op;
- NMVPNService * service;
- const char * service_name;
- NMVPNConnection * active;
- NMDevice * dev;
-
- g_return_if_fail (manager != NULL);
-
- if (!(active = nm_vpn_manager_get_active_vpn_connection (manager)))
- return;
- nm_vpn_connection_ref (active);
-
- /* Construct a new method call with the correct service and object path */
- service = nm_vpn_connection_get_service (active);
- service_name = nm_vpn_service_get_service_name (service);
- op = construct_op_from_service_name (service_name);
- message = dbus_message_new_method_call (service_name, op, service_name, "stopConnection");
- g_free (op);
- if (!message)
- {
- nm_warning ("Couldn't allocate dbus message.");
- goto out;
- }
-
- /* Call the specific VPN service, let dbus activate it if needed */
- dbus_connection_send (manager->app_data->dbus_connection, message, NULL);
- dbus_message_unref (message);
-
-out:
- nm_vpn_manager_set_active_vpn_connection (manager, NULL);
- nm_vpn_connection_unref (active);
-
- if ((dev = nm_get_active_device (manager->app_data)))
- nm_system_device_set_from_ip4_config (dev);
-}
-
-
-/*********************************************************************/
-
-static GSList *nm_vpn_manager_load_services (void)
-{
- GSList *list = NULL;
- GDir *vpn_dir;
-
- /* Load allowed service names */
- if ((vpn_dir = g_dir_open (VPN_SERVICE_FILE_PATH, 0, NULL)))
- {
- const char *file_name;
-
- while ((file_name = g_dir_read_name (vpn_dir)))
- {
- char *file_path = g_strdup_printf (VPN_SERVICE_FILE_PATH"/%s", file_name);
- char *contents;
-
- if (g_file_get_contents (file_path, &contents, NULL, NULL) && (contents != NULL))
- {
- char **split_contents = g_strsplit (contents, "\n", 0);
-
- if (split_contents)
- {
- int i, len;
- NMVPNService * service = nm_vpn_service_new ();
- gboolean have_name = FALSE;
- gboolean have_service = FALSE;
- gboolean have_program = FALSE;
-
- len = g_strv_length (split_contents);
- for (i = 0; i < len; i++)
- {
- char *line = split_contents[i];
-
- #define NAME_TAG "name="
- #define SERVICE_TAG "service="
- #define PROGRAM_TAG "program="
-
- if (!line || !strlen (line)) continue;
-
- /* Comment lines begin with # */
- if (line[0] == '#') continue;
-
- if ((strncmp (line, NAME_TAG, strlen (NAME_TAG)) == 0) && !have_name)
- {
- char * name = g_strdup (line+strlen (NAME_TAG));
- GSList * dup_elt;
- gboolean found = FALSE;
-
- for (dup_elt = list; dup_elt; dup_elt = g_slist_next (dup_elt))
- {
- NMVPNService *dup_svc = (NMVPNService *)(dup_elt->data);
- if (dup_svc && nm_vpn_service_get_name (dup_svc) && !strcmp (nm_vpn_service_get_name (dup_svc), name))
- {
- found = TRUE;
- break;
- }
- }
- if (!found)
- nm_vpn_service_set_name (service, (const char *)name);
- g_free (name);
- have_name = TRUE;
- }
- else if ((strncmp (line, SERVICE_TAG, strlen (SERVICE_TAG)) == 0) && !have_service)
- {
- char *service_name = g_strdup (line+strlen (SERVICE_TAG));
-
- /* Deny the load if the service name is NetworkManager or NetworkManagerInfo. */
- if (strcmp (service_name, NM_DBUS_SERVICE) && strcmp (service_name, NM_DBUS_SERVICE))
- nm_vpn_service_set_service_name (service, (const char *)service_name);
- else
- nm_warning ("VPN service name matched NetworkManager or NetworkManagerInfo service names, "
- "which is not allowed and might be malicious.");
- g_free (service_name);
- have_service = TRUE;
- }
- else if ((strncmp (line, PROGRAM_TAG, strlen (PROGRAM_TAG)) == 0) && !have_program)
- {
- gboolean program_ok = FALSE;
- if ((strlen (line) >= strlen (PROGRAM_TAG) + 1))
- {
- if ((*(line+strlen (PROGRAM_TAG)) == '/') && (*(line+strlen (line)-1) != '/'))
- {
- nm_vpn_service_set_program (service, (const char *)(line+strlen (PROGRAM_TAG)));
- program_ok = TRUE;
- }
- }
- if (!program_ok)
- nm_warning ("WARNING: VPN program '%s' invalid in file '%s'", line, file_path);
- have_program = TRUE;
- }
- }
- g_strfreev (split_contents);
-
- if (nm_vpn_service_get_name (service) && nm_vpn_service_get_service_name (service) && nm_vpn_service_get_program (service))
- {
- nm_info ("Adding VPN service '%s' with name '%s' and program '%s'", nm_vpn_service_get_service_name (service),
- nm_vpn_service_get_name (service), nm_vpn_service_get_program (service));
- list = g_slist_append (list, service);
- }
- else
- nm_vpn_service_unref (service);
- }
- g_free (contents);
- }
- g_free (file_path);
- }
-
- g_dir_close (vpn_dir);
- }
-
- return list;
-}
-
diff --git a/src/vpn-manager/nm-vpn-manager.h b/src/vpn-manager/nm-vpn-manager.h
deleted file mode 100644
index 64fac40bb8..0000000000
--- a/src/vpn-manager/nm-vpn-manager.h
+++ /dev/null
@@ -1,45 +0,0 @@
-/* nm-vpn-manager.h - handle VPN connections within NetworkManager's framework
- *
- * Copyright (C) 2005 Dan Williams
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
- * 02111-1307, USA.
- */
-#ifndef NM_VPN_MANAGER_H
-#define NM_VPN_MANAGER_H
-
-#include <dbus/dbus.h>
-#include "NetworkManagerMain.h"
-#include "nm-vpn-connection.h"
-
-
-NMVPNManager * nm_vpn_manager_new (NMData *app_data);
-void nm_vpn_manager_clear_connections (NMVPNManager *manager);
-NMVPNConnection * nm_vpn_manager_add_connection (NMVPNManager *manager, const char *name, const char *service_name, const char *user_name);
-void nm_vpn_manager_remove_connection (NMVPNManager *manager, NMVPNConnection *vpn);
-char ** nm_vpn_manager_get_connection_names (NMVPNManager *manager);
-void nm_vpn_manager_dispose (NMVPNManager *manager);
-
-NMVPNConnection * nm_vpn_manager_get_active_vpn_connection (NMVPNManager *manager);
-
-void nm_vpn_manager_activate_vpn_connection (NMVPNManager *manager, NMVPNConnection *vpn, char **password_items, int password_count, char **data_items, int count);
-void nm_vpn_manager_deactivate_vpn_connection (NMVPNManager *manager);
-
-NMVPNConnection * nm_vpn_manager_find_connection_by_name (NMVPNManager *manager, const char *con_name);
-
-gboolean nm_vpn_manager_process_signal (NMVPNManager *manager, DBusMessage *signal);
-gboolean nm_vpn_manager_process_name_owner_changed (NMVPNManager *manager, const char *service, const char *old_owner, const char *new_owner);
-
-#endif /* NM_VPN_MANAGER_H */
diff --git a/src/vpn-manager/nm-vpn-service.c b/src/vpn-manager/nm-vpn-service.c
deleted file mode 100644
index b746ada4d6..0000000000
--- a/src/vpn-manager/nm-vpn-service.c
+++ /dev/null
@@ -1,174 +0,0 @@
-/* NetworkManager -- Network link manager
- *
- * Dan Williams <dcbw@redhat.com>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- *
- * (C) Copyright 2005 Red Hat, Inc.
- */
-
-#include <glib.h>
-#include <dbus/dbus.h>
-#include "nm-dbus-vpn.h"
-#include "nm-vpn-service.h"
-#include "nm-utils.h"
-
-
-struct NMVPNService
-{
- int refcount;
- char *name;
- char *service;
- char *program;
- NMVPNState state;
-};
-
-
-NMVPNService *nm_vpn_service_new (void)
-{
- NMVPNService *service = g_malloc0 (sizeof (NMVPNService));
-
- service->refcount = 1;
- service->state = NM_VPN_STATE_SHUTDOWN;
-
- return service;
-}
-
-void nm_vpn_service_ref (NMVPNService *service)
-{
- g_return_if_fail (service != NULL);
-
- service->refcount++;
-}
-
-
-void nm_vpn_service_unref (NMVPNService *service)
-{
- g_return_if_fail (service != NULL);
-
- service->refcount--;
- if (service->refcount <= 0)
- {
- g_free (service->name);
- g_free (service->service);
- g_free (service->program);
- memset (service, 0, sizeof (NMVPNService));
- g_free (service);
- }
-}
-
-
-const char *nm_vpn_service_get_name (NMVPNService *service)
-{
- g_return_val_if_fail (service != NULL, NULL);
-
- return service->name;
-}
-
-
-void nm_vpn_service_set_name (NMVPNService *service, const char *name)
-{
- g_return_if_fail (service != NULL);
-
- if (service->name)
- g_free (service->name);
- service->name = g_strdup (name);
-}
-
-
-const char *nm_vpn_service_get_service_name (NMVPNService *service)
-{
- g_return_val_if_fail (service != NULL, NULL);
-
- return service->service;
-}
-
-
-void nm_vpn_service_set_service_name (NMVPNService *service, const char *name)
-{
- g_return_if_fail (service != NULL);
-
- if (service->service)
- g_free (service->service);
- service->service = g_strdup (name);
-}
-
-
-const char *nm_vpn_service_get_program (NMVPNService *service)
-{
- g_return_val_if_fail (service != NULL, NULL);
-
- return service->program;
-}
-
-
-void nm_vpn_service_set_program (NMVPNService *service, const char *program)
-{
- g_return_if_fail (service != NULL);
-
- if (service->program)
- g_free (service->program);
- service->program = g_strdup (program);
-}
-
-
-NMVPNState nm_vpn_service_get_state (NMVPNService *service)
-{
- g_return_val_if_fail (service != NULL, NM_VPN_STATE_UNKNOWN);
-
- return service->state;
-}
-
-
-void nm_vpn_service_set_state (NMVPNService *service, const NMVPNState state)
-{
- g_return_if_fail (service != NULL);
-
- service->state = state;
-}
-
-
-gboolean nm_vpn_service_exec_daemon (NMVPNService *service)
-{
- GPtrArray *vpn_argv;
- GError *error = NULL;
- GPid pid;
-
- g_return_val_if_fail (service != NULL, FALSE);
-
- if (!nm_vpn_service_get_program (service))
- return FALSE;
-
- vpn_argv = g_ptr_array_new ();
- g_ptr_array_add (vpn_argv, (char *) nm_vpn_service_get_program (service));
- g_ptr_array_add (vpn_argv, NULL);
-
- if (!g_spawn_async (NULL, (char **) vpn_argv->pdata, NULL, 0, NULL, NULL, &pid, &error))
- {
- g_ptr_array_free (vpn_argv, TRUE);
- nm_warning ("Could not activate the VPN service '%s'. error: '%s'.", nm_vpn_service_get_service_name (service), error->message);
- g_error_free (error);
- return FALSE;
- }
- g_ptr_array_free (vpn_argv, TRUE);
- nm_info ("Activated the VPN service '%s' with PID %d.", nm_vpn_service_get_service_name (service), pid);
-
- /* Wait a bit for the daemon to start up */
- /* FIXME: don't sleep, keep retrying dbus message or something */
- sleep (1);
-
- return TRUE;
-}
-
diff --git a/src/vpn-manager/nm-vpn-service.h b/src/vpn-manager/nm-vpn-service.h
deleted file mode 100644
index 70a9b1605a..0000000000
--- a/src/vpn-manager/nm-vpn-service.h
+++ /dev/null
@@ -1,51 +0,0 @@
-/* NetworkManager -- Network link manager
- *
- * Dan Williams <dcbw@redhat.com>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- *
- * (C) Copyright 2005 Red Hat, Inc.
- */
-
-#ifndef NM_VPN_SERVICE_H
-#define NM_VPN_SERVICE_H
-
-
-#include <dbus/dbus.h>
-#include "NetworkManager.h"
-
-
-typedef struct NMVPNService NMVPNService;
-
-NMVPNService * nm_vpn_service_new (void);
-
-void nm_vpn_service_ref (NMVPNService *service);
-void nm_vpn_service_unref (NMVPNService *service);
-
-const char * nm_vpn_service_get_name (NMVPNService *service);
-void nm_vpn_service_set_name (NMVPNService *service, const char *name);
-
-const char * nm_vpn_service_get_service_name (NMVPNService *service);
-void nm_vpn_service_set_service_name (NMVPNService *service, const char *name);
-
-const char * nm_vpn_service_get_program (NMVPNService *service);
-void nm_vpn_service_set_program (NMVPNService *service, const char *program);
-
-NMVPNState nm_vpn_service_get_state (NMVPNService *service);
-void nm_vpn_service_set_state (NMVPNService *service, const NMVPNState state);
-
-gboolean nm_vpn_service_exec_daemon (NMVPNService *service);
-
-#endif
diff --git a/test/.cvsignore b/test/.cvsignore
deleted file mode 100644
index 2e63101323..0000000000
--- a/test/.cvsignore
+++ /dev/null
@@ -1,7 +0,0 @@
-Makefile
-Makefile.in
-nminfotest
-nmtest
-nmtestdevices
-libnm_glib_test
-nm-dhcp-opt-test
diff --git a/test/Makefile.am b/test/Makefile.am
deleted file mode 100644
index ce07ccef24..0000000000
--- a/test/Makefile.am
+++ /dev/null
@@ -1,30 +0,0 @@
-INCLUDES = -I${top_srcdir} -I${top_srcdir}/gnome/libnm_glib -I${top_srcdir}/utils
-
-AM_CPPFLAGS = \
- $(DBUS_CFLAGS) \
- $(GTHREAD_CFLAGS) \
- $(HAL_CFLAGS) \
- -DDBUS_API_SUBJECT_TO_CHANGE \
- -DBINDIR=\"$(bindir)\" \
- -DDATADIR=\"$(datadir)\"
-
-noinst_PROGRAMS = nmtest nminfotest nmtestdevices libnm_glib_test
-
-nmtest_SOURCES = nmtest.c
-nmtest_LDADD = $(DBUS_LIBS) $(GTHREAD_LIBS) $(HAL_LIBS) \
- $(top_builddir)/utils/libnmutils.la
-
-
-nminfotest_SOURCES = nminfotest.c
-nminfotest_LDADD = $(DBUS_LIBS) $(GTHREAD_LIBS) \
- $(top_builddir)/utils/libnmutils.la
-
-nmtestdevices_SOURCES = nmtestdevices.c
-nmtestdevices_LDADD = $(DBUS_LIBS) $(GTHREAD_LIBS) \
- $(top_builddir)/utils/libnmutils.la
-
-libnm_glib_test_SOURCES = libnm_glib_test.c
-libnm_glib_test_LDADD = $(DBUS_LIBS) $(GTHREAD_LIBS) \
- $(top_builddir)/utils/libnmutils.la \
- ../gnome/libnm_glib/libnm_glib.la
-
diff --git a/test/libnm_glib_test.c b/test/libnm_glib_test.c
deleted file mode 100644
index 93ae67472a..0000000000
--- a/test/libnm_glib_test.c
+++ /dev/null
@@ -1,82 +0,0 @@
-/* libnm_glib_test - test app for libnm_glib
- *
- * Dan Williams <dcbw@redhat.com>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- *
- * (C) Copyright 2005 Red Hat, Inc.
- */
-
-#include <glib.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include "libnm_glib.h"
-
-
-void status_printer (libnm_glib_ctx *ctx, gpointer user_data)
-{
- libnm_glib_state state;
-
- g_return_if_fail (ctx != NULL);
-
- state = libnm_glib_get_network_state (ctx);
- switch (state)
- {
- case LIBNM_NO_DBUS:
- fprintf (stderr, "Status: No DBUS\n");
- break;
- case LIBNM_NO_NETWORKMANAGER:
- fprintf (stderr, "Status: No NetworkManager\n");
- break;
- case LIBNM_NO_NETWORK_CONNECTION:
- fprintf (stderr, "Status: No Connection\n");
- break;
- case LIBNM_ACTIVE_NETWORK_CONNECTION:
- fprintf (stderr, "Status: Active Connection\n");
- break;
- case LIBNM_INVALID_CONTEXT:
- fprintf (stderr, "Status: Error\n");
- break;
- default:
- fprintf (stderr, "Status: unknown\n");
- break;
- }
-}
-
-
-int main( int argc, char *argv[] )
-{
- GMainLoop *loop;
- libnm_glib_ctx *ctx;
- guint id;
-
- ctx = libnm_glib_init ();
- if (!ctx)
- {
- fprintf (stderr, "Could not initialize libnm.\n");
- exit (1);
- }
- libnm_glib_register_callback (ctx, status_printer, ctx, NULL);
-
- loop = g_main_loop_new (NULL, FALSE);
-// id = g_timeout_add (2000, status_printer, (gpointer)ctx);
-
- g_main_loop_run (loop);
-
-// g_source_remove (id);
-
- exit (0);
-}
diff --git a/test/nm-dhcp-opt-test.c b/test/nm-dhcp-opt-test.c
deleted file mode 100644
index 43c1e31a7b..0000000000
--- a/test/nm-dhcp-opt-test.c
+++ /dev/null
@@ -1,270 +0,0 @@
-/* nm-dhcp-opt-test - test app for NetworkManager's DHCP Options interface
- *
- * Dan Williams <dcbw@redhat.com>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- *
- * (C) Copyright 2005 Red Hat, Inc.
- */
-
-#include <glib.h>
-#include <dbus/dbus.h>
-#include <dbus/dbus-glib.h>
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-
-#include <sys/socket.h>
-#include <netinet/in.h>
-#include <arpa/inet.h>
-
-#include "NetworkManager.h"
-
-/* Return codes for functions that use dbus */
-enum
-{
- RETURN_SUCCESS = 1,
- RETURN_FAILURE = 0,
- RETURN_NO_NM = -1
-};
-
-
-#define DBUS_NO_SERVICE_ERROR "org.freedesktop.DBus.Error.ServiceDoesNotExist"
-#define NM_DHCP_OPT_NOT_FOUND_ERROR "org.freedesktop.NetworkManager.OptionNotFound"
-
-static char *dbus_type_to_string (int type)
-{
- switch (type)
- {
- case DBUS_TYPE_UINT32:
- return "uint32";
-
- case DBUS_TYPE_BOOLEAN:
- return "boolean";
-
- case DBUS_TYPE_BYTE:
- return "byte";
-
- case DBUS_TYPE_STRING:
- return "string";
- }
- g_assert_not_reached ();
- return NULL;
-}
-
-
-/*
- * call_nm_method
- *
- * Do a method call on NetworkManager.
- *
- * Returns: RETURN_SUCCESS on success
- * RETURN_FAILURE on failure
- * RETURN_NO_NM if NetworkManager service no longer exists
- */
-static int call_nm_method (DBusConnection *con, const char *method, int opt, gboolean is_array, int arg_type, void **arg, int *item_count)
-{
- DBusMessage *message;
- DBusMessage *reply;
- DBusError error;
- dbus_bool_t ret = TRUE;
- DBusMessageIter iter;
-
- g_return_val_if_fail (con != NULL, RETURN_FAILURE);
- g_return_val_if_fail (method != NULL, RETURN_FAILURE);
- g_return_val_if_fail (arg != NULL, RETURN_FAILURE);
-
- if (is_array)
- {
- g_return_val_if_fail (item_count != NULL, RETURN_FAILURE);
- *item_count = 0;
- }
-
- if (!(message = dbus_message_new_method_call (NM_DBUS_SERVICE, NM_DBUS_PATH_DHCP, NM_DBUS_INTERFACE_DHCP, method)))
- {
- fprintf (stderr, "call_nm_method(): Couldn't allocate the dbus message\n");
- return (RETURN_FAILURE);
- }
- dbus_message_append_args (message, DBUS_TYPE_UINT32, &opt, DBUS_TYPE_INVALID);
-
- dbus_error_init (&error);
- reply = dbus_connection_send_with_reply_and_block (con, message, -1, &error);
- dbus_message_unref (message);
- if (dbus_error_is_set (&error))
- {
- int ret = RETURN_FAILURE;
-
- if (!strcmp (error.name, DBUS_NO_SERVICE_ERROR))
- ret = RETURN_NO_NM;
-
- if (ret != RETURN_SUCCESS && (strcmp (error.name, NM_DHCP_OPT_NOT_FOUND_ERROR) != 0))
- fprintf (stderr, "call_nm_method(): %s raised:\n %s\n\n", error.name, error.message);
-
- dbus_error_free (&error);
- return (ret);
- }
-
- if (reply == NULL)
- {
- fprintf (stderr, "call_nm_method(): dbus reply message was NULL\n" );
- return (RETURN_FAILURE);
- }
-
- if (is_array)
- ret = dbus_message_get_args (reply, NULL, DBUS_TYPE_ARRAY, arg_type, arg, item_count, DBUS_TYPE_INVALID);
- else
- ret = dbus_message_get_args (reply, NULL, arg_type, arg, DBUS_TYPE_INVALID);
-
-/*
- We simply don't unref the message, so that the values returned stay
- valid in the caller of this function.
- dbus_message_unref (reply);
-*/
- if (!ret)
- {
- fprintf (stderr, "call_nm_method(): error while getting args.\n");
- return (RETURN_FAILURE);
- }
-
- return (RETURN_SUCCESS);
-}
-
-void print_array (DBusConnection *connection, int opt)
-{
- int num_items;
- unsigned int *uint32 = NULL;
- int *int32 = NULL;
- gboolean *bool = NULL;
- unsigned char *byte = NULL;
- char **string = NULL;
- void *item = NULL;
- char *method = NULL;
- int ret;
- const char *name = NULL;
- int opt_type = -1;
- unsigned int foo;
-
- ret = call_nm_method (connection, "getName", opt, FALSE, DBUS_TYPE_STRING, (void *)(&name), NULL);
- if (ret != RETURN_SUCCESS)
- return;
-
- ret = call_nm_method (connection, "getElementType", opt, FALSE, DBUS_TYPE_UINT32, (void *)(&opt_type), NULL);
- if (ret != RETURN_SUCCESS)
- return;
-
- switch (opt_type)
- {
- case DBUS_TYPE_UINT32:
- item = &uint32;
- method = "getInteger";
- break;
-
- case DBUS_TYPE_BOOLEAN:
- item = &bool;
- method = "getBoolean";
- break;
-
- case DBUS_TYPE_BYTE:
- item = &byte;
- method = "getByte";
- break;
-
- case DBUS_TYPE_STRING:
- item = &string;
- method = "getString";
- break;
-
- default:
- fprintf (stderr, "%d: Type %c\n", opt, opt_type);
- g_assert_not_reached ();
- break;
- }
-
- ret = call_nm_method (connection, method, opt, TRUE, opt_type, item, &num_items);
- if ((ret == RETURN_SUCCESS) && (num_items > 0))
- {
- int i;
- fprintf (stderr, "%d ('%s'): (%d %s of type %s) ", opt, name, num_items, num_items > 1 ? "elements" : "element", dbus_type_to_string (opt_type));
- for (i = 0; i < num_items; i++)
- {
- struct in_addr in;
- gboolean last = (i == num_items - 1) ? TRUE : FALSE;
-
- switch (opt_type)
- {
- case DBUS_TYPE_BYTE:
- fprintf (stderr, "%d%s", byte[i], last ? "" : ", ");
- break;
- case DBUS_TYPE_BOOLEAN:
- fprintf (stderr, "%d%s", bool[i], last ? "" : ", ");
- break;
- case DBUS_TYPE_UINT32:
- in.s_addr = uint32[i];
- fprintf (stderr, "%u (%s)%s", uint32[i], inet_ntoa(in), last ? "" : ", ");
- break;
- case DBUS_TYPE_STRING:
- fprintf (stderr, "'%s'%s", string[i], last ? "" : ", ");
- break;
-
- default:
- g_assert_not_reached ();
- break;
- }
- }
- fprintf (stderr, "\n");
- }
- else
- fprintf (stderr, "%d ('%s'): could not get option value\n", opt, name);
-}
-
-
-void print_each_dhcp_option (DBusConnection *connection)
-{
- DBusMessage *message;
- DBusMessage *reply;
- DBusMessageIter iter;
- DBusError error;
- int i;
- int opt_type;
- int ret;
-
- g_return_if_fail (connection != NULL);
-
- /* Loop through all available DHCP options and print each one. */
- for (i = 1; i < 62; i++)
- print_array (connection, i);
-}
-
-
-int main (int argc, char **argv)
-{
- DBusConnection *connection;
- DBusError error;
-
- g_type_init ();
-
- dbus_error_init (&error);
- connection = dbus_bus_get (DBUS_BUS_SYSTEM, &error);
- if (connection == NULL)
- {
- fprintf (stderr, "Error connecting to system bus: %s\n", error.message);
- dbus_error_free (&error);
- return 1;
- }
-
- print_each_dhcp_option (connection);
-
- exit (0);
-}
diff --git a/test/nminfotest.c b/test/nminfotest.c
deleted file mode 100644
index 3932aa0963..0000000000
--- a/test/nminfotest.c
+++ /dev/null
@@ -1,326 +0,0 @@
-/* nminfotest -- test app for NetworkManagerInfo
- *
- * Dan Williams <dcbw@redhat.com>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- *
- * (C) Copyright 2004 Red Hat, Inc.
- */
-
-#include <glib.h>
-#include <dbus/dbus.h>
-#include <dbus/dbus-glib-lowlevel.h>
-#include <dbus/dbus-glib.h>
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-
-#include "NetworkManager.h"
-
-
-static char * get_network_string_property (DBusConnection *connection, const char *network, const char *method, NMNetworkType type)
-{
- DBusMessage *message;
- DBusMessage *reply;
- DBusError error;
- char *string = NULL;
- char *ret_string = NULL;
- gint32 type_as_int;
-
- message = dbus_message_new_method_call (NMI_DBUS_SERVICE, NMI_DBUS_PATH, NMI_DBUS_INTERFACE, method);
- if (message == NULL)
- {
- fprintf (stderr, "Couldn't allocate the dbus message\n");
- return NULL;
- }
-
- type_as_int = (gint32) type;
- dbus_message_append_args (message, DBUS_TYPE_STRING, &network, DBUS_TYPE_INT32, &type_as_int, DBUS_TYPE_INVALID);
- dbus_error_init (&error);
- reply = dbus_connection_send_with_reply_and_block (connection, message, -1, &error);
- dbus_message_unref (message);
- if (dbus_error_is_set (&error))
- {
- fprintf (stderr, "%s raised:\n %s\n\n", error.name, error.message);
- dbus_error_free (&error);
- return NULL;
- }
-
- if (reply == NULL)
- {
- fprintf( stderr, "dbus reply message was NULL\n" );
- return NULL;
- }
-
- dbus_error_init (&error);
- if (dbus_message_get_args (reply, &error, DBUS_TYPE_STRING, &string, DBUS_TYPE_INVALID) && string)
- {
- ret_string = g_strdup (string);
- }
- dbus_message_unref (reply);
-
- if (!string)
- fprintf (stderr, "NetworkManagerInfo returned a NULL string for method '%s'", method );
-
- if (dbus_error_is_set (&error))
- dbus_error_free (&error);
-
- return (ret_string);
-}
-
-static gboolean get_network_trusted (DBusConnection *connection, const char *network, NMNetworkType type)
-{
- DBusMessage *message;
- DBusMessage *reply;
- DBusError error;
- gboolean trusted = FALSE;
- gint32 type_as_int;
-
- g_return_val_if_fail (connection != NULL, -1);
- g_return_val_if_fail (network != NULL, -1);
-
- message = dbus_message_new_method_call (NMI_DBUS_SERVICE, NMI_DBUS_PATH, NMI_DBUS_INTERFACE, "getNetworkTrusted");
- if (message == NULL)
- {
- fprintf (stderr, "Couldn't allocate the dbus message\n");
- return (-1);
- }
-
- dbus_error_init (&error);
- type_as_int = (gint32) type;
- dbus_message_append_args (message, DBUS_TYPE_STRING, &network, DBUS_TYPE_INT32, &type_as_int, DBUS_TYPE_INVALID);
- reply = dbus_connection_send_with_reply_and_block (connection, message, -1, &error);
- dbus_message_unref (message);
- if (dbus_error_is_set (&error))
- {
- fprintf (stderr, "%s raised:\n %s\n\n", error.name, error.message);
- dbus_error_free (&error);
- dbus_message_unref (reply);
- return (-1);
- }
-
- if (reply == NULL)
- {
- fprintf( stderr, "dbus reply message was NULL\n" );
- return (-1);
- }
-
- /* now analyze reply */
- dbus_error_init (&error);
- if (!dbus_message_get_args (reply, &error, DBUS_TYPE_BOOLEAN, &trusted, DBUS_TYPE_INVALID))
- trusted = FALSE;
- if (dbus_error_is_set (&error))
- dbus_error_free (&error);
-
- dbus_message_unref (reply);
-
- return (trusted);
-}
-
-
-static void get_networks_of_type (DBusConnection *connection, NMNetworkType type)
-{
- DBusMessage *message;
- DBusMessage *reply;
- DBusMessageIter iter;
- DBusError error;
- gint32 type_as_int;
- char **networks;
- int num_networks;
- int i;
-
- message = dbus_message_new_method_call (NMI_DBUS_SERVICE, NMI_DBUS_PATH, NMI_DBUS_INTERFACE, "getNetworks");
- if (message == NULL)
- {
- fprintf (stderr, "Couldn't allocate the dbus message\n");
- return;
- }
-
- dbus_error_init (&error);
- type_as_int = (gint32) type;
- dbus_message_append_args (message, DBUS_TYPE_INT32, &type_as_int, DBUS_TYPE_INVALID);
- reply = dbus_connection_send_with_reply_and_block (connection, message, -1, &error);
- dbus_message_unref (message);
- if (dbus_error_is_set (&error))
- {
- fprintf (stderr, "%s raised:\n %s\n\n", error.name, error.message);
- dbus_error_free (&error);
- return;
- }
-
- if (reply == NULL)
- {
- fprintf( stderr, "dbus reply message was NULL\n" );
- return;
- }
-
- /* now analyze reply */
- dbus_error_init (&error);
- if (!dbus_message_get_args (reply, &error, DBUS_TYPE_ARRAY, DBUS_TYPE_STRING,
- &networks, &num_networks, DBUS_TYPE_INVALID))
- {
- fprintf (stderr, "NetworkManagerInfo returned no network list" );
- dbus_message_unref (reply);
- return;
- }
-
- dbus_message_unref (reply);
-
- if (!networks)
- fprintf( stderr, "No networks found\n" );
-
- fprintf( stderr, "Networks of type %d:\n", type );
- for (i = 0; i < num_networks; i++)
- {
- if (strlen (networks[i]) == 0)
- {
- fprintf( stderr, " No networks found\n" );
- break;
- }
- else
- {
- char *essid = get_network_string_property (connection, networks[i], "getNetworkEssid", type);
- char *key = get_network_string_property (connection, networks[i], "getNetworkKey", type);
-
- fprintf(stderr, " %s\t%s\t%s\n", essid, key, get_network_trusted (connection, networks[i], type) ? "trusted" : "untrusted");
- }
- }
-
- g_strfreev (networks);
-}
-
-static void get_user_key_for_network (DBusConnection *connection)
-{
- DBusMessage *message;
-
- g_return_if_fail (connection != NULL);
-
- message = dbus_message_new_method_call (NMI_DBUS_SERVICE, NMI_DBUS_PATH, NMI_DBUS_INTERFACE, "getKeyForNetwork");
- if (message == NULL)
- {
- fprintf (stderr, "get_user_key_for_network(): Couldn't allocate the dbus message\n");
- return;
- }
-
- dbus_message_append_args (message, DBUS_TYPE_STRING, "eth1",
- DBUS_TYPE_STRING, "wireless-ap",
- DBUS_TYPE_INVALID);
-
- if (!dbus_connection_send (connection, message, NULL))
- fprintf (stderr, "get_user_key_for_network(): could not send dbus message\n");
-
- dbus_message_unref (message);
-}
-
-
-static void set_user_key_for_network (DBusConnection *connection, DBusMessage *message, GMainLoop *loop)
-{
- DBusError error;
- const char *device;
- const char *network;
- const char *passphrase;
- const char *key_type_string;
-
- g_return_if_fail (connection != NULL);
- g_return_if_fail (message != NULL);
-
- dbus_error_init (&error);
- if (dbus_message_get_args (message, &error,
- DBUS_TYPE_STRING, &device,
- DBUS_TYPE_STRING, &network,
- DBUS_TYPE_STRING, &passphrase,
- DBUS_TYPE_STRING, &key_type_string,
- DBUS_TYPE_INVALID))
- {
- fprintf( stderr, "Device was '%s'\nNetwork was '%s'\nPassphrase was '%s'\nKey type was '%s'\n", device, network, passphrase, key_type_string);
-
-
- g_main_loop_quit (loop);
- }
-}
-
-
-static DBusHandlerResult nm_message_handler (DBusConnection *connection, DBusMessage *message, void *user_data)
-{
- const char *method;
- const char *path;
- DBusMessage *reply_message = NULL;
- gboolean handled = TRUE;
-
- g_return_val_if_fail (connection != NULL, DBUS_HANDLER_RESULT_NOT_YET_HANDLED);
- g_return_val_if_fail (message != NULL, DBUS_HANDLER_RESULT_NOT_YET_HANDLED);
-
- method = dbus_message_get_member (message);
- path = dbus_message_get_path (message);
-
- fprintf (stderr, "nm_dbus_nm_message_handler() got method %s for path %s\n", method, path);
-
- if (strcmp ("setKeyForNetwork", method) == 0)
- set_user_key_for_network (connection, message, user_data);
- else
- handled = FALSE;
-
- return (handled ? DBUS_HANDLER_RESULT_HANDLED : DBUS_HANDLER_RESULT_NOT_YET_HANDLED);
-}
-
-
-int main( int argc, char *argv[] )
-{
- DBusConnection *connection;
- DBusConnection *connection2;
- DBusError error;
- DBusObjectPathVTable vtable = { NULL, &nm_message_handler, NULL, NULL, NULL, NULL };
- dbus_bool_t success = FALSE;
- GMainLoop *loop = NULL;
-
- loop = g_main_loop_new (NULL, FALSE);
-
- g_type_init ();
- if (!g_thread_supported ())
- g_thread_init (NULL);
-
- dbus_error_init (&error);
- connection = dbus_bus_get (DBUS_BUS_SYSTEM, &error);
- if (connection == NULL)
- {
- fprintf (stderr, "Error connecting to system bus: %s\n", error.message);
- dbus_error_free (&error);
- exit (1);
- }
-
- dbus_connection_setup_with_g_main (connection, NULL);
- dbus_error_init (&error);
- dbus_bus_request_name (connection, NM_DBUS_SERVICE, 0, &error);
- if (dbus_error_is_set (&error))
- {
- fprintf (stderr, "Could not acquire its service. dbus_bus_request_name() says: '%s'\n", error.message);
- exit (1);
- }
-
- success = dbus_connection_register_object_path (connection, NM_DBUS_PATH, &vtable, loop);
- if (!success)
- {
- fprintf (stderr, "Could not register a handler for NetworkManager. Not enough memory?\n");
- exit (1);
- }
-
- get_networks_of_type (connection, NETWORK_TYPE_ALLOWED);
- get_networks_of_type (connection, NETWORK_TYPE_DEVICE);
- get_user_key_for_network (connection);
-
- g_main_loop_run (loop);
-
- return 0;
-}
diff --git a/test/nmnetlinktest.c b/test/nmnetlinktest.c
deleted file mode 100644
index 582f1a68a2..0000000000
--- a/test/nmnetlinktest.c
+++ /dev/null
@@ -1,76 +0,0 @@
-#include <sys/types.h>
-
-#include <sys/socket.h>
-#include <asm/types.h>
-#include <linux/types.h>
-#include <linux/netlink.h>
-#include <linux/rtnetlink.h>
-#include <linux/if.h>
-#include <errno.h>
-
-#include <glib.h>
-#include <nm-netlink-monitor.h>
-
-static void
-device_added (NmNetlinkMonitor *monitor,
- const gchar *device_name)
-{
- g_print ("interface '%s' connected\n", device_name);
-}
-
-
-static void
-device_removed (NmNetlinkMonitor *monitor,
- const gchar *device_name)
-{
- g_print ("interface '%s' disconnected\n", device_name);
-}
-
-int
-main (void)
-{
- NmNetlinkMonitor *monitor;
- GMainLoop *loop;
- GError *error;
-
- g_type_init ();
-
- monitor = nm_netlink_monitor_new ();
-
- error = NULL;
- nm_netlink_monitor_open_connection (monitor, &error);
-
- if (error != NULL)
- {
- g_printerr ("could not open connection: %s\n",
- error->message);
- g_error_free (error);
- return 1;
- }
-
- loop = g_main_loop_new (NULL, FALSE);
-
- g_signal_connect (G_OBJECT (monitor),
- "interface-connected",
- G_CALLBACK (device_added), NULL);
-
- g_signal_connect (G_OBJECT (monitor),
- "interface-disconnected",
- G_CALLBACK (device_removed), NULL);
-
- nm_netlink_monitor_attach (monitor, NULL);
-
- nm_netlink_monitor_request_status (monitor, &error);
-
- if (error != NULL)
- {
- g_printerr ("could not request status of interfaces: %s\n",
- error->message);
- g_error_free (error);
- return 2;
- }
-
- g_main_loop_run (loop);
-
- return 0;
-}
diff --git a/test/nmtest.c b/test/nmtest.c
deleted file mode 100644
index c50a266012..0000000000
--- a/test/nmtest.c
+++ /dev/null
@@ -1,425 +0,0 @@
-/* nmclienttest - test app for NetworkManager
- *
- * Dan Williams <dcbw@redhat.com>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- *
- * (C) Copyright 2004 Red Hat, Inc.
- */
-
-#include <glib.h>
-#include <dbus/dbus.h>
-#include <dbus/dbus-glib.h>
-#include <stdio.h>
-#include <string.h>
-
-#include "NetworkManager.h"
-#include "nm-utils.h"
-
-
-/* Return codes for functions that use dbus */
-enum
-{
- RETURN_SUCCESS = 1,
- RETURN_FAILURE = 0,
- RETURN_NO_NM = -1
-};
-
-/* dbus doesn't define a DBUS_TYPE_STRING_ARRAY so we fake one here for consistency */
-/* FIXME: This just seems like a bad idea. The call_nm_method function
- * interface should just be changed to handle arrays better.
- */
-#define NM_DBUS_TYPE_STRING_ARRAY ((DBUS_TYPE_STRING << 8) | DBUS_TYPE_ARRAY)
-#define NM_DBUS_TYPE_OBJECT_PATH_ARRAY ((DBUS_TYPE_OBJECT_PATH << 8) | DBUS_TYPE_ARRAY)
-
-
-#define DBUS_NO_SERVICE_ERROR "org.freedesktop.DBus.Error.ServiceDoesNotExist"
-
-/*
- * nmwa_dbus_call_nm_method
- *
- * Do a method call on NetworkManager.
- *
- * Returns: RETURN_SUCCESS on success
- * RETURN_FAILURE on failure
- * RETURN_NO_NM if NetworkManager service no longer exists
- */
-static int nmwa_dbus_call_nm_method (DBusConnection *con, const char *path, const char *method, int arg_type, void **arg, int *item_count)
-{
- DBusMessage *message;
- DBusMessage *reply;
- DBusError error;
- char *dbus_string = NULL;
- int dbus_int = 0;
- gboolean dbus_bool = FALSE;
- char **dbus_array = NULL;
- int num_items = 0;
- dbus_bool_t ret = TRUE;
-
- g_return_val_if_fail (con != NULL, RETURN_FAILURE);
- g_return_val_if_fail (path != NULL, RETURN_FAILURE);
- g_return_val_if_fail (method != NULL, RETURN_FAILURE);
- g_return_val_if_fail (((arg_type == DBUS_TYPE_OBJECT_PATH) || (arg_type == DBUS_TYPE_STRING) || (arg_type == DBUS_TYPE_INT32) || (arg_type == DBUS_TYPE_UINT32) || (arg_type == DBUS_TYPE_BOOLEAN) || (arg_type == NM_DBUS_TYPE_STRING_ARRAY) || (arg_type == NM_DBUS_TYPE_OBJECT_PATH_ARRAY)), RETURN_FAILURE);
- g_return_val_if_fail (arg != NULL, RETURN_FAILURE);
-
- if ((arg_type == DBUS_TYPE_STRING) || (arg_type == NM_DBUS_TYPE_STRING_ARRAY) || (arg_type == DBUS_TYPE_OBJECT_PATH) || (arg_type == NM_DBUS_TYPE_OBJECT_PATH_ARRAY))
- g_return_val_if_fail (*arg == NULL, RETURN_FAILURE);
-
- if ((arg_type == NM_DBUS_TYPE_STRING_ARRAY) ||
- (arg_type == NM_DBUS_TYPE_OBJECT_PATH_ARRAY))
- {
- g_return_val_if_fail (item_count != NULL, RETURN_FAILURE);
- *item_count = 0;
- *((char **)arg) = NULL;
- }
-
- if (!(message = dbus_message_new_method_call (NM_DBUS_SERVICE, path, NM_DBUS_INTERFACE, method)))
- {
- fprintf (stderr, "nmwa_dbus_call_nm_method(): Couldn't allocate the dbus message\n");
- return (RETURN_FAILURE);
- }
-
- dbus_error_init (&error);
- reply = dbus_connection_send_with_reply_and_block (con, message, -1, &error);
- dbus_message_unref (message);
- if (dbus_error_is_set (&error))
- {
- int ret = RETURN_FAILURE;
-
- if (!strcmp (error.name, DBUS_NO_SERVICE_ERROR))
- ret = RETURN_NO_NM;
- else if (!strcmp (error.name, NM_DBUS_NO_ACTIVE_NET_ERROR))
- ret = RETURN_SUCCESS;
- else if (!strcmp (error.name, NM_DBUS_NO_ACTIVE_DEVICE_ERROR))
- ret = RETURN_SUCCESS;
- else if (!strcmp (error.name, NM_DBUS_NO_NETWORKS_ERROR))
- ret = RETURN_SUCCESS;
-
- if ((ret != RETURN_SUCCESS) && (ret != RETURN_NO_NM))
- fprintf (stderr, "nmwa_dbus_call_nm_method(): %s raised:\n %s\n\n", error.name, error.message);
-
- dbus_error_free (&error);
- return (ret);
- }
-
- if (reply == NULL)
- {
- fprintf (stderr, "nmwa_dbus_call_nm_method(): dbus reply message was NULL\n" );
- return (RETURN_FAILURE);
- }
-
- dbus_error_init (&error);
- switch (arg_type)
- {
- case DBUS_TYPE_OBJECT_PATH:
- ret = dbus_message_get_args (reply, &error, DBUS_TYPE_OBJECT_PATH, &dbus_string, DBUS_TYPE_INVALID);
- break;
- case DBUS_TYPE_STRING:
- ret = dbus_message_get_args (reply, &error, DBUS_TYPE_STRING, &dbus_string, DBUS_TYPE_INVALID);
- break;
- case NM_DBUS_TYPE_OBJECT_PATH_ARRAY:
- ret = dbus_message_get_args (reply, &error, DBUS_TYPE_ARRAY, DBUS_TYPE_OBJECT_PATH, &dbus_array, &num_items, DBUS_TYPE_INVALID);
- break;
- case NM_DBUS_TYPE_STRING_ARRAY:
- ret = dbus_message_get_args (reply, &error, DBUS_TYPE_ARRAY, DBUS_TYPE_STRING, &dbus_array, &num_items, DBUS_TYPE_INVALID);
- break;
- case DBUS_TYPE_INT32:
- ret = dbus_message_get_args (reply, &error, DBUS_TYPE_INT32, &dbus_int, DBUS_TYPE_INVALID);
- break;
- case DBUS_TYPE_UINT32:
- ret = dbus_message_get_args (reply, &error, DBUS_TYPE_UINT32, &dbus_int, DBUS_TYPE_INVALID);
- break;
- case DBUS_TYPE_BOOLEAN:
- ret = dbus_message_get_args (reply, &error, DBUS_TYPE_BOOLEAN, &dbus_bool, DBUS_TYPE_INVALID);
- break;
- default:
- fprintf (stderr, "nmwa_dbus_call_nm_method(): Unknown argument type!\n");
- ret = FALSE;
- break;
- }
-
- if (!ret)
- {
- fprintf (stderr, "nmwa_dbus_call_nm_method(): error while getting args: name='%s' message='%s'\n", error.name, error.message);
- if (dbus_error_is_set (&error))
- dbus_error_free (&error);
- dbus_message_unref (reply);
- return (RETURN_FAILURE);
- }
-
- switch (arg_type)
- {
- case DBUS_TYPE_OBJECT_PATH:
- *((char **)(arg)) = nm_dbus_unescape_object_path (dbus_string);
- break;
- case NM_DBUS_TYPE_OBJECT_PATH_ARRAY:
- {
- int i;
-
- *((char ***) (arg)) = g_new0 (char *, num_items + 1);
-
- for (i = 0; i < num_items; i++)
- (*((char ***) (arg)))[i] = nm_dbus_unescape_object_path (dbus_array[i]);
-
- *item_count = num_items;
- break;
- }
- case DBUS_TYPE_STRING:
- *((char **)(arg)) = g_strdup (dbus_string);
- break;
- case NM_DBUS_TYPE_STRING_ARRAY:
- *((char ***)(arg)) = g_strdupv (dbus_array);
- *item_count = num_items;
- g_strfreev (dbus_array);
- break;
- case DBUS_TYPE_INT32:
- case DBUS_TYPE_UINT32:
- *((int *)(arg)) = dbus_int;
- break;
- case DBUS_TYPE_BOOLEAN:
- *((gboolean *)(arg)) = dbus_bool;
- break;
- default:
- g_assert_not_reached ();
- break;
- }
-
- dbus_message_unref (reply);
- return (RETURN_SUCCESS);
-}
-
-char * get_active_device (DBusConnection *connection)
-{
- int ret;
- char *active_device = NULL;
-
- ret = nmwa_dbus_call_nm_method (connection, NM_DBUS_PATH, "getActiveDevice", DBUS_TYPE_OBJECT_PATH, (void *)(&active_device), NULL);
- if (ret == RETURN_SUCCESS)
- return (active_device);
-
- return (NULL);
-}
-
-
-char * get_object_name (DBusConnection *connection, char *path)
-{
- int ret;
- char *name = NULL;
- char *escaped_path = nm_dbus_escape_object_path (path);
-
- ret = nmwa_dbus_call_nm_method (connection, escaped_path, "getName", DBUS_TYPE_STRING, (void *)(&name), NULL);
- g_free (escaped_path);
- if (ret == RETURN_SUCCESS)
- return (name);
-
- return (NULL);
-}
-
-
-int get_object_signal_strength (DBusConnection *connection, char *path)
-{
- int ret;
- int strength = -1;
- char *escaped_path = nm_dbus_escape_object_path (path);
-
- ret = nmwa_dbus_call_nm_method (connection, escaped_path, "getStrength", DBUS_TYPE_INT32, (void *)(&strength), NULL);
- g_free (escaped_path);
- if (ret == RETURN_SUCCESS)
- return (strength);
-
- return (-1);
-}
-
-
-NMState get_nm_state (DBusConnection *connection)
-{
- int ret;
- NMState state;
-
- ret = nmwa_dbus_call_nm_method (connection, NM_DBUS_PATH, "state", DBUS_TYPE_UINT32, (void *)(&state), NULL);
- if (ret == RETURN_SUCCESS)
- return (state);
-
- return (NM_STATE_UNKNOWN);
-}
-
-
-char * get_device_active_network (DBusConnection *connection, char *path)
-{
- int ret;
- char *net = NULL;
-
- ret = nmwa_dbus_call_nm_method (connection, path, "getActiveNetwork", DBUS_TYPE_OBJECT_PATH, (void *)(&net), NULL);
- if (ret == RETURN_SUCCESS)
- return (net);
-
- return (NULL);
-}
-
-
-int get_device_type (DBusConnection *connection, char *path)
-{
- int ret;
- int type = -1;
-
- ret = nmwa_dbus_call_nm_method (connection, path, "getType", DBUS_TYPE_INT32, (void *)(&type), NULL);
- if (ret == RETURN_SUCCESS)
- return (type);
-
- return (-1);
-}
-
-
-void print_device_networks (DBusConnection *connection, const char *path)
-{
- int ret;
- char **networks = NULL;
- int num_networks = 0;
- int i;
-
- ret = nmwa_dbus_call_nm_method (connection, path, "getNetworks", NM_DBUS_TYPE_OBJECT_PATH_ARRAY, (void **)(&networks), &num_networks);
- if (ret != RETURN_SUCCESS)
- return;
-
- fprintf( stderr, " Networks:\n" );
- for (i = 0; i < num_networks; i++)
- {
- char *name = get_object_name (connection, networks[i]);
-
- fprintf( stderr, " %s (%s) Strength: %d%%\n", networks[i], name,
- get_object_signal_strength (connection, networks[i]) );
- g_free (name);
- }
-
- g_strfreev (networks);
-}
-
-
-void print_devices (DBusConnection *connection)
-{
- int ret;
- char **devices = NULL;
- int num_devices = 0;
- int i;
-
- ret = nmwa_dbus_call_nm_method (connection, NM_DBUS_PATH, "getDevices", NM_DBUS_TYPE_OBJECT_PATH_ARRAY, (void **)(&devices), &num_devices);
- if (ret != RETURN_SUCCESS)
- return;
-
- fprintf( stderr, "Devices:\n" );
- for (i = 0; i < num_devices; i++)
- {
- int type = get_device_type (connection, devices[i]);
-
- fprintf (stderr, " %s\n", devices[i]);
- if (type == DEVICE_TYPE_WIRELESS_ETHERNET)
- {
- char *active_network = get_device_active_network (connection, devices[i]);
-
- fprintf (stderr, " Device type: wireless\n");
- fprintf (stderr, " Strength: %d%%\n", get_object_signal_strength (connection, devices[i]));
- fprintf (stderr, " Active Network: '%s'\n", active_network);
- g_free (active_network);
-
- print_device_networks (connection, devices[i]);
- fprintf (stderr, "\n");
- }
- else if (type == DEVICE_TYPE_WIRED_ETHERNET)
- fprintf (stderr, " Device type: wired\n");
- else
- fprintf (stderr, " Device type: unknown\n");
- fprintf (stderr, "\n");
- }
- g_strfreev (devices);
-}
-
-
-void set_device_network (DBusConnection *connection, const char *path, const char *network)
-{
- DBusMessage *message;
- DBusMessage *reply;
- DBusError error;
-
- message = dbus_message_new_method_call (NM_DBUS_SERVICE, NM_DBUS_PATH, NM_DBUS_INTERFACE, "setActiveDevice");
- if (message == NULL)
- {
- fprintf (stderr, "Couldn't allocate the dbus message\n");
- return;
- }
-
- dbus_message_append_args (message, DBUS_TYPE_STRING, path,
- DBUS_TYPE_STRING, network, DBUS_TYPE_INVALID);
-
- dbus_error_init (&error);
- reply = dbus_connection_send_with_reply_and_block (connection, message, -1, &error);
- if (dbus_error_is_set (&error))
- {
- fprintf (stderr, "%s raised:\n %s\n\n", error.name, error.message);
- dbus_message_unref (message);
- dbus_error_free (&error);
- return;
- }
- else
- fprintf (stderr, "Success!!\n");
-}
-
-
-int main( int argc, char *argv[] )
-{
- DBusConnection *connection;
- DBusError error;
- char * path;
- NMState state;
-
- g_type_init ();
-
- dbus_error_init (&error);
- connection = dbus_bus_get (DBUS_BUS_SYSTEM, &error);
- if (connection == NULL)
- {
- fprintf (stderr, "Error connecting to system bus: %s\n", error.message);
- dbus_error_free (&error);
- return 1;
- }
-
- state = get_nm_state (connection);
- if (state == NM_STATE_UNKNOWN)
- {
- fprintf (stderr, "NetworkManager appears not to be running (could not get its state). Will exit.\n");
- return (1);
- }
- fprintf (stderr, "NM State: %u\n", state);
-
- path = get_active_device (connection);
- fprintf (stderr, "Active device: '%s'\n", path ? path : "(none)");
- if (path)
- {
- char *name = get_object_name (connection, path);
- fprintf (stderr, "Active device name: '%s'\n", name ? name : "(none)");
- g_free (name);
- }
-
- print_devices (connection);
-
- if (path && (argc == 2) && (get_device_type (connection, path) == DEVICE_TYPE_WIRELESS_ETHERNET))
- {
- fprintf (stderr, "Attempting to force AP '%s' for device '%s'\n", argv[1], path);
- set_device_network (connection, path, argv[1]);
- }
-
- g_free (path);
-
- return 0;
-}
diff --git a/test/nmtestdevices.c b/test/nmtestdevices.c
deleted file mode 100644
index 0515157e28..0000000000
--- a/test/nmtestdevices.c
+++ /dev/null
@@ -1,284 +0,0 @@
-/* nmtestdevices - Tool to create/delete/modify test devices for NetworkManager
- * (use when you are on a plane, don't have a wireless card, etc)
- *
- * Dan Williams <dcbw@redhat.com>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- *
- * (C) Copyright 2004 Red Hat, Inc.
- */
-
-#include <glib.h>
-#include <dbus/dbus.h>
-#include <dbus/dbus-glib.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <getopt.h>
-#include <string.h>
-
-#include "NetworkManager.h"
-
-void create_device (DBusConnection *connection, NMDeviceType type)
-{
- DBusMessage *message;
- DBusMessage *reply;
- DBusError error;
- char *string;
-
- g_return_if_fail (connection != NULL);
- g_return_if_fail (((type == DEVICE_TYPE_WIRED_ETHERNET) || (type == DEVICE_TYPE_WIRELESS_ETHERNET)));
-
- message = dbus_message_new_method_call (NM_DBUS_SERVICE, NM_DBUS_PATH, NM_DBUS_INTERFACE, "createTestDevice");
- if (message == NULL)
- {
- fprintf (stderr, "Couldn't allocate the dbus message\n");
- return;
- }
-
- dbus_error_init (&error);
- dbus_message_append_args (message, DBUS_TYPE_INT32, type, DBUS_TYPE_INVALID);
- reply = dbus_connection_send_with_reply_and_block (connection, message, -1, &error);
- dbus_message_unref (message);
- if (dbus_error_is_set (&error))
- {
- fprintf (stderr, "%s raised:\n %s\n\n", error.name, error.message);
- dbus_error_free (&error);
- return;
- }
-
- if (reply == NULL)
- {
- fprintf( stderr, "dbus reply message was NULL\n" );
- return;
- }
-
- dbus_error_init (&error);
- if (!dbus_message_get_args (reply, &error, DBUS_TYPE_STRING, &string, DBUS_TYPE_INVALID) || !string)
- {
- fprintf (stderr, "NetworkManager returned a NULL test device ID, test device could not be created." );
- dbus_message_unref (reply);
- if (dbus_error_is_set (&error))
- dbus_error_free (&error);
- return;
- }
-
- fprintf (stderr, "New test device ID: '%s'\n", string );
-
- dbus_message_unref (reply);
- dbus_free (string);
-}
-
-
-void remove_device (DBusConnection *connection, char *dev)
-{
- DBusMessage *message;
- DBusMessage *reply;
- DBusMessageIter iter;
- DBusError error;
-
- g_return_if_fail (connection != NULL);
- g_return_if_fail (dev != NULL);
-
- message = dbus_message_new_method_call (NM_DBUS_SERVICE, NM_DBUS_PATH, NM_DBUS_INTERFACE, "removeTestDevice");
- if (message == NULL)
- {
- fprintf (stderr, "Couldn't allocate the dbus message\n");
- return;
- }
-
- dbus_error_init (&error);
- dbus_message_append_args (message, DBUS_TYPE_STRING, dev, DBUS_TYPE_INVALID);
- reply = dbus_connection_send_with_reply_and_block (connection, message, -1, &error);
- if (dbus_error_is_set (&error))
- {
- fprintf (stderr, "%s raised:\n %s\n\n", error.name, error.message);
- dbus_error_free (&error);
- dbus_message_unref (message);
- return;
- }
-
- if (reply == NULL)
- {
- fprintf( stderr, "dbus reply message was NULL\n" );
- dbus_message_unref (message);
- return;
- }
-
- dbus_message_unref (message);
- dbus_message_unref (reply);
-}
-
-
-void set_link_active (DBusConnection *connection, char *dev, gboolean active)
-{
- DBusMessage *message;
- DBusMessage *reply;
- DBusMessageIter iter;
- DBusError error;
-
- g_return_if_fail (connection != NULL);
- g_return_if_fail (dev != NULL);
-
- message = dbus_message_new_method_call (NM_DBUS_SERVICE, dev, NM_DBUS_INTERFACE_DEVICES, "setLinkActive");
- if (message == NULL)
- {
- fprintf (stderr, "Couldn't allocate the dbus message\n");
- return;
- }
-
- dbus_message_append_args (message, DBUS_TYPE_BOOLEAN, active, DBUS_TYPE_INVALID);
-
- dbus_error_init (&error);
- reply = dbus_connection_send_with_reply_and_block (connection, message, -1, &error);
- if (dbus_error_is_set (&error))
- {
- fprintf (stderr, "%s raised:\n %s\n\n", error.name, error.message);
- dbus_error_free (&error);
- dbus_message_unref (message);
- return;
- }
-
- if (reply == NULL)
- {
- fprintf( stderr, "dbus reply message was NULL\n" );
- dbus_message_unref (message);
- return;
- }
-
- dbus_message_unref (message);
- dbus_message_unref (reply);
-}
-
-
-static void print_usage (void)
-{
- fprintf (stderr, "\n" "usage : nmtestdevices [options] [--help]\n");
- fprintf (stderr,
- "\n"
- " --create-device <wired | wireless> Creates a test device, returns the new device ID\n"
- " --remove-device <ID> Remove a test device (cannot remove real devices)\n"
- " --make-link-active <ID> Switch a test device's link ON\n"
- " --make-link-inactive <ID> Switch a test device's link OFF\n"
- " --help Show this information and exit\n"
- "\n"
- "This tool allows you to tell NetworkManager to create and manipulate fake 'test' devices. This\n"
- "is useful in sitation where you may not have a particular device but still want to test\n"
- "NetworkManager out with it (For example, you forgot your wireless card at home and now you're\n"
- "taking a trip and want to hack on NM, and you're on a plane so you could use the wireless\n"
- "card anyway).\n"
- "\n");
-}
-
-
-int main( int argc, char *argv[] )
-{
- DBusConnection *connection;
- DBusError error;
- char *dev = NULL;
- gboolean create = FALSE;
- gboolean remove = FALSE;
- gboolean make_link_active = FALSE;
- gboolean make_link_inactive = FALSE;
- NMDeviceType dev_type = DEVICE_TYPE_DONT_KNOW;
-
- /* Parse options */
- while (1)
- {
- int c;
- int option_index = 0;
- const char *opt;
-
- static struct option options[] = {
- {"create-device", 1, NULL, 0},
- {"remove-device", 1, NULL, 0},
- {"make-link-active", 1, NULL, 0},
- {"make-link-inactive", 1, NULL, 0},
- {"help", 0, NULL, 0},
- {NULL, 0, NULL, 0}
- };
-
- c = getopt_long (argc, argv, "", options, &option_index);
- if (c == -1)
- break;
-
- switch (c)
- {
- case 0:
- opt = options[option_index].name;
- if (strcmp (opt, "help") == 0)
- {
- print_usage ();
- exit (0);
- }
- else if (strcmp (opt, "create-device") == 0)
- {
- create = TRUE;
- if (optarg)
- {
- if (strcmp (optarg, "wired") == 0)
- dev_type = DEVICE_TYPE_WIRED_ETHERNET;
- else if (strcmp (optarg, "wireless") == 0)
- dev_type = DEVICE_TYPE_WIRELESS_ETHERNET;
- }
- }
- else if (strcmp (opt, "remove-device") == 0)
- {
- remove = TRUE;
- if (optarg)
- dev = g_strdup (optarg);
- }
- else if (strcmp (opt, "make-link-active") == 0)
- {
- make_link_active = TRUE;
- if (optarg)
- dev = g_strdup (optarg);
- }
- else if (strcmp (opt, "make-link-inactive") == 0)
- {
- make_link_inactive = TRUE;
- if (optarg)
- dev = g_strdup (optarg);
- }
- break;
-
- default:
- print_usage ();
- exit (1);
- break;
- }
- }
-
- g_type_init ();
-
- dbus_error_init (&error);
- connection = dbus_bus_get (DBUS_BUS_SYSTEM, &error);
- if (connection == NULL)
- {
- fprintf (stderr, "Error connecting to system bus: %s\n", error.message);
- dbus_error_free (&error);
- return 1;
- }
-
- if (create)
- create_device (connection, dev_type);
- else if (remove)
- remove_device (connection, dev);
- else if (make_link_active)
- set_link_active (connection, dev, TRUE);
- else if (make_link_inactive)
- set_link_active (connection, dev, FALSE);
-
- return 0;
-}
diff --git a/utils/.cvsignore b/utils/.cvsignore
deleted file mode 100644
index 3dda72986f..0000000000
--- a/utils/.cvsignore
+++ /dev/null
@@ -1,2 +0,0 @@
-Makefile.in
-Makefile
diff --git a/utils/Makefile.am b/utils/Makefile.am
deleted file mode 100644
index cf746e0922..0000000000
--- a/utils/Makefile.am
+++ /dev/null
@@ -1,19 +0,0 @@
-NULL=
-INCLUDES = -I${top_srcdir} -I${top_srcdir}/src
-
-noinst_LTLIBRARIES = libnmutils.la
-
-libnmutils_la_CFLAGS = \
- $(DBUS_CFLAGS) \
- $(GTHREAD_CFLAGS) \
- $(DBUS_GLIB_CFLAGS) \
- -DDBUS_API_SUBJECT_TO_CHANGE \
- -DG_DISABLE_DEPRECATED \
- -DGDK_DISABLE_DEPRECATED \
- -DGNOME_DISABLE_DEPRECATED \
- $(NULL)
-
-libnmutils_la_SOURCES = \
- nm-utils.c \
- nm-utils.h \
- $(NULL)
diff --git a/utils/nm-utils.c b/utils/nm-utils.c
deleted file mode 100644
index fbcabe912d..0000000000
--- a/utils/nm-utils.c
+++ /dev/null
@@ -1,132 +0,0 @@
-/* NetworkManager -- Network link manager
- *
- * Ray Strode <rstrode@redhat.com>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- *
- * (C) Copyright 2005 Red Hat, Inc.
- */
-
-#include <string.h>
-#include <stdlib.h>
-#include <errno.h>
-
-#include <glib.h>
-#include "nm-utils.h"
-
-gchar *nm_dbus_escape_object_path (const gchar *utf8_string)
-{
- const gchar *p;
- gchar *object_path;
- GString *string;
-
- g_return_val_if_fail (utf8_string != NULL, NULL);
- g_return_val_if_fail (g_utf8_validate (utf8_string, -1, NULL), NULL);
-
- string = g_string_sized_new ((strlen (utf8_string) + 1) * 6);
-
- for (p = utf8_string; *p != '\0'; p = g_utf8_next_char (p))
- {
- gunichar character;
-
- character = g_utf8_get_char (p);
-
- if (((character >= ((gunichar) 'a')) &&
- (character <= ((gunichar) 'z'))) ||
- ((character >= ((gunichar) 'A')) &&
- (character <= ((gunichar) 'Z'))) ||
- ((character >= ((gunichar) '0')) &&
- (character <= ((gunichar) '9'))) ||
- (character == ((gunichar) '/')))
- {
- g_string_append_c (string, (gchar) character);
- continue;
- }
-
- g_string_append_printf (string, "_%x_", character);
- }
-
- object_path = string->str;
-
- g_string_free (string, FALSE);
-
- return object_path;
-}
-
-gchar *nm_dbus_unescape_object_path (const gchar *object_path)
-{
- const gchar *p;
- gchar *utf8_string;
- GString *string;
-
- g_return_val_if_fail (object_path != NULL, NULL);
-
- string = g_string_sized_new (strlen (object_path) + 1);
-
- for (p = object_path; *p != '\0'; p++)
- {
- const gchar *q;
- gchar *hex_digits, *end, utf8_character[6] = { '\0' };
- gint utf8_character_size;
- gunichar character;
- gulong hex_value;
-
- if (*p != '_')
- {
- g_string_append_c (string, *p);
- continue;
- }
-
- q = strchr (p + 1, '_');
-
- if ((q == NULL) || (q == p + 1))
- {
- g_string_free (string, TRUE);
- return NULL;
- }
-
- hex_digits = g_strndup (p + 1, (q - 1) - p);
-
- hex_value = strtoul (hex_digits, &end, 16);
-
- character = (gunichar) hex_value;
-
- if (((hex_value == G_MAXLONG) && (errno == ERANGE)) ||
- (hex_value > G_MAXUINT32) ||
- (*end != '\0') ||
- (!g_unichar_validate (character)))
- {
- g_free (hex_digits);
- g_string_free (string, TRUE);
- return NULL;
- }
-
- utf8_character_size =
- g_unichar_to_utf8 (character, utf8_character);
-
- g_assert (utf8_character_size > 0);
-
- g_string_append_len (string, utf8_character,
- utf8_character_size);
-
- p = q;
- }
-
- utf8_string = string->str;
-
- g_string_free (string, FALSE);
-
- return utf8_string;
-}
diff --git a/utils/nm-utils.h b/utils/nm-utils.h
deleted file mode 100644
index 5c548ac186..0000000000
--- a/utils/nm-utils.h
+++ /dev/null
@@ -1,131 +0,0 @@
-/* NetworkManager -- Network link manager
- *
- * Ray Strode <rstrode@redhat.com>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- *
- * (C) Copyright 2005 Red Hat, Inc.
- */
-
-#ifndef NM_UTILS_H
-#define NM_UTILS_H
-
-#include <glib.h>
-#include <execinfo.h>
-
-#define nm_print_backtrace() \
-G_STMT_START \
-{ \
- void *_call_stack[512]; \
- int _call_stack_size; \
- char **_symbols; \
- _call_stack_size = backtrace (_call_stack, \
- G_N_ELEMENTS (_call_stack)); \
- _symbols = backtrace_symbols (_call_stack, _call_stack_size); \
- if (_symbols != NULL) \
- { \
- int _i; \
- _i = 0; \
- g_critical ("traceback:\n"); \
- while (_i < _call_stack_size) \
- { \
- g_critical ("\t%s\n", _symbols[_i]); \
- _i++; \
- } \
- free (_symbols); \
- } \
-} \
-G_STMT_END
-
-#define nm_get_timestamp(timestamp) \
-G_STMT_START \
-{ \
- GTimeVal _tv; \
- g_get_current_time (&_tv); \
- *timestamp = (_tv.tv_sec * (1.0 * G_USEC_PER_SEC) + \
- _tv.tv_usec) / G_USEC_PER_SEC; \
-} \
-G_STMT_END
-
-#define nm_info(fmt, args...) \
-G_STMT_START \
-{ \
- g_message ("<information>\t" fmt "\n", ##args); \
-} G_STMT_END
-
-#define nm_info_str(fmt_str, args...) \
-G_STMT_START \
-{ \
- g_message ("<information>\t%s\n", fmt_str, ##args); \
-} G_STMT_END
-
-#define nm_debug(fmt, args...) \
-G_STMT_START \
-{ \
- gdouble _timestamp; \
- nm_get_timestamp (&_timestamp); \
- g_debug ("<debug info>\t[%f] %s (): " fmt "\n", _timestamp, \
- G_GNUC_PRETTY_FUNCTION, ##args); \
-} G_STMT_END
-
-#define nm_debug_str(fmt_str, args...) \
-G_STMT_START \
-{ \
- gdouble _timestamp; \
- nm_get_timestamp (&_timestamp); \
- g_debug ("<debug info>\t[%f] %s (): %s\n", _timestamp, \
- G_GNUC_PRETTY_FUNCTION, fmt_str, ##args); \
-} G_STMT_END
-
-#define nm_warning(fmt, args...) \
-G_STMT_START \
-{ \
- g_warning ("<WARNING>\t %s (): " fmt "\n", \
- G_GNUC_PRETTY_FUNCTION, ##args); \
-} G_STMT_END
-
-#define nm_warning_str(fmt_str, args...) \
-G_STMT_START \
-{ \
- g_warning ("<WARNING>\t %s (): %s\n", \
- G_GNUC_PRETTY_FUNCTION, fmt_str, ##args); \
-} G_STMT_END
-
-#define nm_error(fmt, args...) \
-G_STMT_START \
-{ \
- gdouble _timestamp; \
- nm_get_timestamp (&_timestamp); \
- g_critical ("<ERROR>\t[%f] %s (): " fmt "\n", _timestamp, \
- G_GNUC_PRETTY_FUNCTION, ##args); \
- nm_print_backtrace (); \
- G_BREAKPOINT (); \
-} G_STMT_END
-
-#define nm_error_str(fmt_str, args...) \
-G_STMT_START \
-{ \
- gdouble _timestamp; \
- nm_get_timestamp (&_timestamp); \
- g_critical ("<ERROR>\t[%f] %s (): %s\n", _timestamp, \
- G_GNUC_PRETTY_FUNCTION, fmt_str, ##args); \
- nm_print_backtrace (); \
- G_BREAKPOINT (); \
-} G_STMT_END
-
-gchar *nm_dbus_escape_object_path (const gchar *utf8_string);
-gchar *nm_dbus_unescape_object_path (const gchar *object_path);
-
-#endif /* NM_UTILS_H */
diff --git a/vpn-daemons/.cvsignore b/vpn-daemons/.cvsignore
deleted file mode 100644
index 282522db03..0000000000
--- a/vpn-daemons/.cvsignore
+++ /dev/null
@@ -1,2 +0,0 @@
-Makefile
-Makefile.in
diff --git a/vpn-daemons/README b/vpn-daemons/README
deleted file mode 100644
index e571a1ab79..0000000000
--- a/vpn-daemons/README
+++ /dev/null
@@ -1,156 +0,0 @@
-
-0. Overview
------------
-
-NetworkManager features a set of extension points for integrating VPN
-software in a seamless way such that it integrates into the network
-selection code and the user interface.
-
-1. Design goals
----------------
-
-The goal is to have a vendor-independent interface so an ISV (which
-include prominent open source projects too) can easily integrate with
-NetworkManager whilst preserving a familiar user interface, behaviour
-and while being aware the automatic network switching enforced by
-NetworkManager.
-
-For example, if the user switches from e.g. a wired to a wireless
-connection (say, the user pulls out the network cable), routing tables
-needs to be reconfigured, DNS lookup services needs to be tweaked,
-interfaces may need to be brought or down and, often, the VPN
-connection needs to be restarted.
-
-Another useful feature is that the VPN software should be able to
-configure the DNS lookup service of the system to use name servers
-behind the VPN concentrator for only certain hostnames; e.g. it should
-be possible to say "For domain names of the form *.corp.company.biz
-use the DNS servers 10.1.2.3, 10.1.2.4 and 10.1.2.5".
-
-FIXME: write more stuff here
-
-2. Interface for configuring VPN connection settings
-----------------------------------------------------
-
-NetworkManager ships with nm-vpn-properties which is a GNOME
-application for adding, removing, importing, exporting and editing VPN
-connection details. For each VPN connection type, a shared library
-is loaded which must export the method
-
- NetworkManagerVpnUI* nm_vpn_properties_factory (void)
-
-which returns a pointer to a structure with function pointers set
-by the shared library. Each of these functions are defined and
-documented in
-
- /usr/include/NetworkManager/nm-vpn-ui-interface.h
-
-Basically, the idea is that the shared library can return a GtkWidget
-that is used for editing connection details such as gateway address,
-domain for authentication, what addresses to route and so forth. Note
-that nm-vpn-properties store this in the GConf2 configuration system
-so passwords and other sensitive information should not be stored
-here (see section 3.)
-
-FIXME: actually document the methods in NetworkManagerVpnUI
-
-3. Interface for retrieving authentication details
---------------------------------------------------
-
-In order to establish a VPN connection, sometimes one or more secrets
-are needed in order successfully connect. The secrets (what secret
-(password or one-time key, how many) are very dependent on both the
-VPN connection type and how it's configured.
-
-Each VPN type thus provides a binary that NetworkManager will launch
-to retrieve the passwords from the user. The communication protocol is
-very simple; if the binary can retrieve the passwords it writes them
-on stdout and exits with exit code 0. If the passwords cannot be
-retrieved, the auth dialog binary must exit with exit code 1. The
-auth-dialog may, at it's own discretion, store the secrets in e.g. the
-GNOME keyring (or any other secure location) thus not even needing to
-prompt the user for the secrets.
-
-However, NetworkManager may pass the --reprompt option to the
-auth-dialog to signal that the user must be reprompted for the
-secrets. This is useful when e.g. the secret needed for establishing
-the VPN connection changes on the server and the user needs to put in
-a new secret. At this time of writing, NetworkManager will
-automatically pass the --reprompt option if the connection was
-unsuccessful the last time.
-
-4. Interface for setting up and tearing down VPN connections
-------------------------------------------------------------
-
-FIXME: write this
-
-
-5. Summary of files needed for each VPN connection type
----------------------------------------------------------------
-
-The following files are needed for registering a new type of VPN
-connection. In the following, the notation <vpnname> is used in place
-of the actual name, e.g. vpnc, openvpn, openswan and so forth.
-
- a. /etc/NetworkManager/VPN/nm-<vpnname>-service.name
- This file describes the locations of the components implemented
- the interfaces described in section 2. through 4. Here's the
- example for vpnc with annotations
-
- [VPN Connection]
- name=vpnc # name of VPN connection type
- service=org.freedesktop.NetworkManager.vpnc # D-BUS service name
- program=/usr/bin/nm-vpnc-service # Binary for D-BUS service
-
- [GNOME]
- auth-dialog=/usr/libexec/nm-vpnc-auth-dialog # Binary for auth dialog
- properties=/usr/lib/libnm-vpnc-properties # Shared library for conn. prop
-
-
- - /etc/dbus-1/system.d/nm-<vpnname>-service.conf
- D-BUS policy file to allow ownership of the D-BUS service mentioned in a.
-
-6. Registering MIME-types for files with VPN connection details
----------------------------------------------------------------
-
-If the VPN connection type supports exporting/important connection settings
-it should register with the MIME-system. This is a multi-step process
-
- a. First, make sure that the freedesktop.org shared MIME info knows
- about the file-type
- (see e.g. https://bugs.freedesktop.org/show_bug.cgi?id=3560)
-
- b. Create and ship a .desktop file that associates the MIME type with
- the nm-vpn-properties program. Here's the example for vpnc
-
- [Desktop Entry]
- Encoding=UTF-8
- Name=VPN Connection Manager (vpnc)
- Exec=nm-vpn-properties --import-service org.freedesktop.NetworkManager.vpnc --import-file %f
- Terminal=false
- Type=Application
- DocPath=
- Categories=;
- MimeType=application/x-cisco-vpn-settings
-
-
-7. Status of the interfaces
----------------------------
-
-As of July 2005 the interfaces are UNSTABLE and can and will change in
-the future. At some point the interfaces will be freezed. To
-acknowledge that the interfaces are subject to change, developers will
-have to define NM_VPN_API_SUBJECT_TO_CHANGE to include the headers
-
-8. References
--------------
-
- - Screencast of vpnc integration with NM
- http://people.redhat.com/davidz/nm-vpn/nm-vpn.html
-
- - NetworkManager mailing list
- mailto:networkmanager-list@gnome.org
-
- - vpnc integration in NetworkManager CVS
- vpn-daemons/vpnc
-