1 | /* SPDX-License-Identifier: LGPL-2.1-or-later */ |
2 | /* |
3 | * Copyright (C) 2007 - 2008 Novell, Inc. |
4 | * Copyright (C) 2007 - 2011 Red Hat, Inc. |
5 | */ |
6 | |
7 | #ifndef __NM_ACCESS_POINT_H__ |
8 | #define __NM_ACCESS_POINT_H__ |
9 | |
10 | #if !defined(__NETWORKMANAGER_H_INSIDE__) && !defined(NETWORKMANAGER_COMPILATION) |
11 | #error "Only <NetworkManager.h> can be included directly." |
12 | #endif |
13 | |
14 | #include "nm-object.h" |
15 | |
16 | G_BEGIN_DECLS |
17 | |
18 | #define NM_TYPE_ACCESS_POINT (nm_access_point_get_type()) |
19 | #define NM_ACCESS_POINT(obj) \ |
20 | (G_TYPE_CHECK_INSTANCE_CAST((obj), NM_TYPE_ACCESS_POINT, NMAccessPoint)) |
21 | #define NM_ACCESS_POINT_CLASS(klass) \ |
22 | (G_TYPE_CHECK_CLASS_CAST((klass), NM_TYPE_ACCESS_POINT, NMAccessPointClass)) |
23 | #define NM_IS_ACCESS_POINT(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), NM_TYPE_ACCESS_POINT)) |
24 | #define NM_IS_ACCESS_POINT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), NM_TYPE_ACCESS_POINT)) |
25 | #define NM_ACCESS_POINT_GET_CLASS(obj) \ |
26 | (G_TYPE_INSTANCE_GET_CLASS((obj), NM_TYPE_ACCESS_POINT, NMAccessPointClass)) |
27 | |
28 | #define NM_ACCESS_POINT_FLAGS "flags" |
29 | #define NM_ACCESS_POINT_WPA_FLAGS "wpa-flags" |
30 | #define NM_ACCESS_POINT_RSN_FLAGS "rsn-flags" |
31 | #define NM_ACCESS_POINT_SSID "ssid" |
32 | #define NM_ACCESS_POINT_BSSID "bssid" |
33 | #define NM_ACCESS_POINT_FREQUENCY "frequency" |
34 | #define NM_ACCESS_POINT_MODE "mode" |
35 | #define NM_ACCESS_POINT_MAX_BITRATE "max-bitrate" |
36 | #define NM_ACCESS_POINT_STRENGTH "strength" |
37 | #define NM_ACCESS_POINT_LAST_SEEN "last-seen" |
38 | |
39 | /* DEPRECATED */ |
40 | #define NM_ACCESS_POINT_HW_ADDRESS "hw-address" |
41 | |
42 | /** |
43 | * NMAccessPoint: |
44 | */ |
45 | typedef struct _NMAccessPointClass NMAccessPointClass; |
46 | |
47 | GType nm_access_point_get_type(void); |
48 | |
49 | NM80211ApFlags nm_access_point_get_flags(NMAccessPoint *ap); |
50 | NM80211ApSecurityFlags nm_access_point_get_wpa_flags(NMAccessPoint *ap); |
51 | NM80211ApSecurityFlags nm_access_point_get_rsn_flags(NMAccessPoint *ap); |
52 | GBytes *nm_access_point_get_ssid(NMAccessPoint *ap); |
53 | const char *nm_access_point_get_bssid(NMAccessPoint *ap); |
54 | guint32 nm_access_point_get_frequency(NMAccessPoint *ap); |
55 | NM80211Mode nm_access_point_get_mode(NMAccessPoint *ap); |
56 | guint32 nm_access_point_get_max_bitrate(NMAccessPoint *ap); |
57 | guint8 nm_access_point_get_strength(NMAccessPoint *ap); |
58 | NM_AVAILABLE_IN_1_2 |
59 | int nm_access_point_get_last_seen(NMAccessPoint *ap); |
60 | |
61 | GPtrArray *nm_access_point_filter_connections(NMAccessPoint *ap, const GPtrArray *connections); |
62 | |
63 | gboolean nm_access_point_connection_valid(NMAccessPoint *ap, NMConnection *connection); |
64 | |
65 | G_END_DECLS |
66 | |
67 | #endif /* __NM_ACCESS_POINT_H__ */ |
68 | |