mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-28 05:10:09 +01:00
* introspection/nm-ip4-config.xml: Implement. * libnm-glib/libnm-glib-test.c: Use new DBUS API in tests. * libnm-glib/nm-ip4-config.c: * libnm-glib/nm-ip4-config.c: Implement. * src/nm-ap-security[-*]: Remove circular dependencies between APs and AP securities. APs reference security. * src/nm-device-802-11-wireless.c: Implement missing properties that need to be exported over DBUS. * src/nm-device-802-3-ethernet.c: Ditto. * src/NetworkManagerAP.c: * src/NetworkManagerAP.h: - Convert to GObject, export over DBUS. * src/nm-ip4-config.h: * src/nm-ip4-config.h: - Convert to GObject, export over DBUS. git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2322 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
130 lines
4.9 KiB
C
130 lines
4.9 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 NM_ACCESS_POINT_H
|
|
#define NM_ACCESS_POINT_H
|
|
|
|
#include <glib.h>
|
|
#include <glib/gtypes.h>
|
|
#include <glib-object.h>
|
|
#include <time.h>
|
|
#include "NetworkManager.h"
|
|
#include "nm-ap-security.h"
|
|
|
|
#define NM_TYPE_AP (nm_ap_get_type ())
|
|
#define NM_AP(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), NM_TYPE_AP, NMAccessPoint))
|
|
#define NM_AP_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), NM_TYPE_AP, NMAccessPointClass))
|
|
#define NM_IS_AP(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), NM_TYPE_AP))
|
|
#define NM_IS_AP_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((obj), NM_TYPE_AP))
|
|
#define NM_AP_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), NM_TYPE_AP, NMAccessPointClass))
|
|
|
|
#define NM_AP_ADDRESS "address"
|
|
#define NM_AP_CAPABILITIES "capabilities"
|
|
#define NM_AP_ENCRYPTED "encrypted"
|
|
#define NM_AP_ESSID "essid"
|
|
#define NM_AP_FREQUENCY "frequency"
|
|
#define NM_AP_HWADDRESS "hwaddress"
|
|
#define NM_AP_MODE "mode"
|
|
#define NM_AP_RATE "rate"
|
|
#define NM_AP_STRENGTH "strength"
|
|
|
|
typedef struct {
|
|
GObject parent;
|
|
} NMAccessPoint;
|
|
|
|
typedef struct {
|
|
GObjectClass parent;
|
|
|
|
/* Signals */
|
|
void (*strength_changed) (NMAccessPoint *ap, gint8 strength);
|
|
} NMAccessPointClass;
|
|
|
|
GType nm_ap_get_type (void);
|
|
|
|
NMAccessPoint * nm_ap_new (void);
|
|
NMAccessPoint * nm_ap_new_from_ap (NMAccessPoint *ap);
|
|
NMAccessPoint * nm_ap_new_from_properties (GHashTable *properties);
|
|
|
|
const GTimeVal * nm_ap_get_timestamp (const NMAccessPoint *ap);
|
|
void nm_ap_set_timestamp (NMAccessPoint *ap, glong sec, glong usec);
|
|
void nm_ap_set_timestamp_via_timestamp (NMAccessPoint *ap, const GTimeVal *timestamp);
|
|
|
|
const char * nm_ap_get_essid (const NMAccessPoint *ap);
|
|
void nm_ap_set_essid (NMAccessPoint *ap, const char *essid);
|
|
/* Get essid in original over-the-air form */
|
|
const char * nm_ap_get_orig_essid (const NMAccessPoint *ap);
|
|
|
|
guint32 nm_ap_get_capabilities (NMAccessPoint *ap);
|
|
void nm_ap_set_capabilities (NMAccessPoint *ap, guint32 capabilities);
|
|
|
|
gboolean nm_ap_get_encrypted (NMAccessPoint *ap);
|
|
|
|
NMAPSecurity * nm_ap_get_security (const NMAccessPoint *ap);
|
|
void nm_ap_set_security (NMAccessPoint *ap, NMAPSecurity *security);
|
|
|
|
const struct ether_addr * nm_ap_get_address (const NMAccessPoint *ap);
|
|
void nm_ap_set_address (NMAccessPoint *ap, const struct ether_addr *addr);
|
|
|
|
int nm_ap_get_mode (NMAccessPoint *ap);
|
|
void nm_ap_set_mode (NMAccessPoint *ap, const int mode);
|
|
|
|
gint8 nm_ap_get_strength (NMAccessPoint *ap);
|
|
void nm_ap_set_strength (NMAccessPoint *ap, gint8 strength);
|
|
|
|
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 (const NMAccessPoint *ap);
|
|
void nm_ap_set_invalid (NMAccessPoint *ap, gboolean invalid);
|
|
|
|
gboolean nm_ap_get_fallback (const NMAccessPoint *ap);
|
|
void nm_ap_set_fallback (NMAccessPoint *ap, gboolean fallback);
|
|
|
|
gboolean nm_ap_get_artificial (const NMAccessPoint *ap);
|
|
void nm_ap_set_artificial (NMAccessPoint *ap, gboolean artificial);
|
|
|
|
gboolean nm_ap_get_broadcast (NMAccessPoint *ap);
|
|
void nm_ap_set_broadcast (NMAccessPoint *ap, gboolean broadcast);
|
|
|
|
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);
|
|
|
|
void nm_ap_add_capabilities_from_security (NMAccessPoint *ap, NMAPSecurity *security);
|
|
void nm_ap_add_capabilities_from_ie (NMAccessPoint *ap, const guint8 *wpa_ie, guint32 length);
|
|
void nm_ap_add_capabilities_for_wep (NMAccessPoint *ap);
|
|
|
|
/*
|
|
* NOTE:
|
|
* This is not intended to return true for all APs with manufacturer defaults. It is intended to return true for
|
|
* only the MOST COMMON manufacturing defaults.
|
|
*/
|
|
gboolean nm_ap_has_manufacturer_default_essid (NMAccessPoint *ap);
|
|
|
|
#endif /* NM_ACCESS_POINT_H */
|