NetworkManager/src/NetworkManagerAP.h
Dan Williams 3151e9092e 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


git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@33 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2004-08-02 21:12:40 +00:00

80 lines
2.7 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_H
#define NETWORK_MANAGER_AP_H
#include <glib.h>
#include <time.h>
typedef struct NMAccessPoint NMAccessPoint;
#define NM_AP_PRIORITY_WORST 1000
typedef enum NMAPEncMethod
{
NM_AP_ENC_METHOD_NONE = 0,
NM_AP_ENC_METHOD_HEX_KEY,
NM_AP_ENC_METHOD_40_BIT_PASSPHRASE,
NM_AP_ENC_METHOD_104_BIT_PASSPHRASE
} NMAPEncMethod;
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);
guint nm_ap_get_priority (NMAccessPoint *ap);
void nm_ap_set_priority (NMAccessPoint *ap, guint priority);
gchar * nm_ap_get_essid (NMAccessPoint *ap);
void nm_ap_set_essid (NMAccessPoint *ap, gchar * essid);
gchar * nm_ap_get_wep_key (NMAccessPoint *ap);
void nm_ap_set_wep_key (NMAccessPoint *ap, gchar * wep_key);
gboolean nm_ap_get_encrypted (NMAccessPoint *ap);
void nm_ap_set_encrypted (NMAccessPoint *ap, gboolean encrypted);
struct ether_addr * nm_ap_get_address (NMAccessPoint *ap);
void nm_ap_set_address (NMAccessPoint *ap, const struct ether_addr *addr);
guint8 nm_ap_get_quality (NMAccessPoint *ap);
void nm_ap_set_quality (NMAccessPoint *ap, guint8 quality);
double nm_ap_get_freq (NMAccessPoint *ap);
void nm_ap_set_freq (NMAccessPoint *ap, double freq);
guint16 nm_ap_get_rate (NMAccessPoint *ap);
void nm_ap_set_rate (NMAccessPoint *ap, guint16 rate);
gboolean nm_ap_get_invalid (NMAccessPoint *ap);
void nm_ap_set_invalid (NMAccessPoint *ap, gboolean invalid);
gboolean nm_ap_get_matched (NMAccessPoint *ap);
void nm_ap_set_matched (NMAccessPoint *ap, gboolean matched);
NMAPEncMethod nm_ap_get_enc_method (NMAccessPoint *ap);
void nm_ap_set_enc_method (NMAccessPoint *ap, NMAPEncMethod enc_method);
#endif