NetworkManager/src/NetworkManagerAPList.h
Dan Williams bbbd00d4c5 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.


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@477 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2005-02-27 06:11:16 +00:00

66 lines
2.8 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_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);
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);
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_update_network_from_nmi (NMAccessPointList *list, const char *network, NMData *data);
void nm_ap_list_populate_from_nmi (NMAccessPointList *list, NMData *data);
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);
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