NetworkManagerAP.h 3.62 KB
Newer Older
Dan Williams's avatar
Dan Williams committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
/* 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>
27
#include "NetworkManager.h"
Dan Williams's avatar
Dan Williams committed
28
29
30

typedef struct NMAccessPoint NMAccessPoint;

31
NMAccessPoint *	nm_ap_new				(void);
32
NMAccessPoint *	nm_ap_new_from_ap		(NMAccessPoint *ap);
Dan Williams's avatar
Dan Williams committed
33

34
void				nm_ap_unref			(NMAccessPoint *ap);
35
void				nm_ap_ref				(NMAccessPoint *ap);
Dan Williams's avatar
Dan Williams committed
36

37
const GTimeVal *	nm_ap_get_timestamp		(const NMAccessPoint *ap);
38
void				nm_ap_set_timestamp		(NMAccessPoint *ap, const GTimeVal *timestamp);
Dan Williams's avatar
Dan Williams committed
39

40
char *			nm_ap_get_essid		(const NMAccessPoint *ap);
41
void				nm_ap_set_essid		(NMAccessPoint *ap, const char *essid);
Dan Williams's avatar
Dan Williams committed
42

43
44
char *			nm_ap_get_enc_key_source	(const NMAccessPoint *ap);
char *			nm_ap_get_enc_key_hashed	(const NMAccessPoint *ap);
45
void				nm_ap_set_enc_key_source	(NMAccessPoint *ap, const char *key, NMEncKeyType type);
46
NMEncKeyType	nm_ap_get_enc_type		(const NMAccessPoint *ap);
47
48
49

NMDeviceAuthMethod	nm_ap_get_auth_method	(const NMAccessPoint *ap);
void				nm_ap_set_auth_method	(NMAccessPoint *ap, const NMDeviceAuthMethod auth_method);
Dan Williams's avatar
Dan Williams committed
50

51
gboolean			nm_ap_get_encrypted		(const NMAccessPoint *ap);
52
void				nm_ap_set_encrypted		(NMAccessPoint *ap, gboolean encrypted);
53

54
struct ether_addr *	nm_ap_get_address		(const NMAccessPoint *ap);
55
void				nm_ap_set_address		(NMAccessPoint *ap, const struct ether_addr *addr);
Dan Williams's avatar
Dan Williams committed
56

57
NMNetworkMode		nm_ap_get_mode			(const NMAccessPoint *ap);
58
59
void				nm_ap_set_mode			(NMAccessPoint *ap, const NMNetworkMode mode);

60
gint8			nm_ap_get_strength		(const NMAccessPoint *ap);
61
void				nm_ap_set_strength		(NMAccessPoint *ap, gint8 strength);
Dan Williams's avatar
Dan Williams committed
62

63
double			nm_ap_get_freq			(const NMAccessPoint *ap);
64
void				nm_ap_set_freq			(NMAccessPoint *ap, double freq);
Dan Williams's avatar
Dan Williams committed
65

66
guint16			nm_ap_get_rate			(const NMAccessPoint *ap);
67
void				nm_ap_set_rate			(NMAccessPoint *ap, guint16 rate);
Dan Williams's avatar
Dan Williams committed
68

69
gboolean			nm_ap_get_invalid		(const NMAccessPoint *ap);
70
void				nm_ap_set_invalid		(NMAccessPoint *ap, gboolean invalid);
Dan Williams's avatar
Dan Williams committed
71

72
gboolean			nm_ap_get_matched		(const NMAccessPoint *ap);
73
void				nm_ap_set_matched		(NMAccessPoint *ap, gboolean matched);
74

75
gboolean			nm_ap_get_trusted		(const NMAccessPoint *ap);
76
void				nm_ap_set_trusted		(NMAccessPoint *ap, gboolean trusted);
77

78
gboolean			nm_ap_get_artificial	(const NMAccessPoint *ap);
79
80
void				nm_ap_set_artificial	(NMAccessPoint *ap, gboolean artificial);

81
82
83
84
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);
85
86
void				nm_ap_set_user_created	(NMAccessPoint *ap, gboolean user_created);

87
GSList *			nm_ap_get_user_addresses	(const NMAccessPoint *ap);
88
89
void				nm_ap_set_user_addresses (NMAccessPoint *ap, GSList *list);

90
91
92
93
/* Helper */
gboolean			nm_ap_is_enc_key_valid	(NMAccessPoint *ap);
gboolean			nm_is_enc_key_valid		(const char *key, NMEncKeyType key_type);

Dan Williams's avatar
Dan Williams committed
94
#endif