mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-02-08 12:40:36 +01:00
* 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. git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@477 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
80 lines
3 KiB
C
80 lines
3 KiB
C
/* 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_NOW_ACTIVE,
|
|
DEVICE_NO_LONGER_ACTIVE,
|
|
DEVICE_ACTIVATING,
|
|
DEVICE_ACTIVATION_FAILED,
|
|
DEVICE_ACTIVATION_CANCELED,
|
|
DEVICE_LIST_CHANGE,
|
|
DEVICE_STATUS_CHANGE
|
|
} DeviceStatus;
|
|
|
|
|
|
DBusConnection *nm_dbus_init (NMData *data);
|
|
|
|
gboolean nm_dbus_is_info_daemon_running (DBusConnection *connection);
|
|
|
|
void nm_dbus_schedule_device_status_change (NMDevice *dev, DeviceStatus status);
|
|
void nm_dbus_signal_device_status_change (DBusConnection *connection, NMDevice *dev, DeviceStatus status);
|
|
|
|
void nm_dbus_schedule_network_not_found_signal (NMData *data, const char *network);
|
|
|
|
void nm_dbus_signal_network_status_change (DBusConnection *connection, NMData *data);
|
|
|
|
void nm_dbus_signal_device_ip4_address_change(DBusConnection *connection, NMDevice *dev);
|
|
|
|
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, NMDevice *dev, NMAccessPoint *ap, int attempt);
|
|
|
|
void nm_dbus_cancel_get_user_key_for_network (DBusConnection *connection);
|
|
|
|
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_auth_method (DBusConnection *connection, const char *network, const NMDeviceAuthMethod auth_method);
|
|
|
|
gboolean nm_dbus_nmi_is_running (DBusConnection *connection);
|
|
|
|
char ** nm_dbus_get_networks (DBusConnection *connection, NMNetworkType type, int *num_networks);
|
|
|
|
DBusMessage * nm_dbus_create_error_message (DBusMessage *message, const char *exception_namespace,
|
|
const char *exception, const char *format, ...);
|
|
|
|
NMDevice * nm_dbus_get_device_from_object_path (NMData *data, const char *path);
|
|
|
|
char * nm_dbus_network_status_from_data (NMData *data);
|
|
|
|
#endif
|