1/* SPDX-License-Identifier: LGPL-2.1-or-later */
2/*
3 * Copyright (C) 2007 - 2008 Novell, Inc.
4 * Copyright (C) 2007 - 2012 Red Hat, Inc.
5 */
6
7#ifndef __NM_DEVICE_WIFI_H__
8#define __NM_DEVICE_WIFI_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-device.h"
15
16G_BEGIN_DECLS
17
18#define NM_TYPE_DEVICE_WIFI (nm_device_wifi_get_type())
19#define NM_DEVICE_WIFI(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), NM_TYPE_DEVICE_WIFI, NMDeviceWifi))
20#define NM_DEVICE_WIFI_CLASS(klass) \
21 (G_TYPE_CHECK_CLASS_CAST((klass), NM_TYPE_DEVICE_WIFI, NMDeviceWifiClass))
22#define NM_IS_DEVICE_WIFI(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), NM_TYPE_DEVICE_WIFI))
23#define NM_IS_DEVICE_WIFI_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), NM_TYPE_DEVICE_WIFI))
24#define NM_DEVICE_WIFI_GET_CLASS(obj) \
25 (G_TYPE_INSTANCE_GET_CLASS((obj), NM_TYPE_DEVICE_WIFI, NMDeviceWifiClass))
26
27#define NM_DEVICE_WIFI_HW_ADDRESS "hw-address"
28#define NM_DEVICE_WIFI_PERMANENT_HW_ADDRESS "perm-hw-address"
29#define NM_DEVICE_WIFI_MODE "mode"
30#define NM_DEVICE_WIFI_BITRATE "bitrate"
31#define NM_DEVICE_WIFI_ACTIVE_ACCESS_POINT "active-access-point"
32#define NM_DEVICE_WIFI_CAPABILITIES "wireless-capabilities"
33#define NM_DEVICE_WIFI_ACCESS_POINTS "access-points"
34#define NM_DEVICE_WIFI_LAST_SCAN "last-scan"
35
36/**
37 * NMDeviceWifi:
38 */
39typedef struct _NMDeviceWifi NMDeviceWifi;
40typedef struct _NMDeviceWifiClass NMDeviceWifiClass;
41
42GType nm_device_wifi_get_type(void);
43
44NM_DEPRECATED_IN_1_24_FOR(nm_device_get_hw_address)
45const char *nm_device_wifi_get_hw_address(NMDeviceWifi *device);
46
47const char *nm_device_wifi_get_permanent_hw_address(NMDeviceWifi *device);
48NM80211Mode nm_device_wifi_get_mode(NMDeviceWifi *device);
49guint32 nm_device_wifi_get_bitrate(NMDeviceWifi *device);
50NMDeviceWifiCapabilities nm_device_wifi_get_capabilities(NMDeviceWifi *device);
51NMAccessPoint *nm_device_wifi_get_active_access_point(NMDeviceWifi *device);
52
53NMAccessPoint *nm_device_wifi_get_access_point_by_path(NMDeviceWifi *device, const char *path);
54
55const GPtrArray *nm_device_wifi_get_access_points(NMDeviceWifi *device);
56
57NM_AVAILABLE_IN_1_12
58gint64 nm_device_wifi_get_last_scan(NMDeviceWifi *device);
59
60_NM_DEPRECATED_SYNC_METHOD
61gboolean
62nm_device_wifi_request_scan(NMDeviceWifi *device, GCancellable *cancellable, GError **error);
63NM_AVAILABLE_IN_1_2
64_NM_DEPRECATED_SYNC_METHOD
65gboolean nm_device_wifi_request_scan_options(NMDeviceWifi *device,
66 GVariant *options,
67 GCancellable *cancellable,
68 GError **error);
69void nm_device_wifi_request_scan_async(NMDeviceWifi *device,
70 GCancellable *cancellable,
71 GAsyncReadyCallback callback,
72 gpointer user_data);
73NM_AVAILABLE_IN_1_2
74void nm_device_wifi_request_scan_options_async(NMDeviceWifi *device,
75 GVariant *options,
76 GCancellable *cancellable,
77 GAsyncReadyCallback callback,
78 gpointer user_data);
79gboolean
80nm_device_wifi_request_scan_finish(NMDeviceWifi *device, GAsyncResult *result, GError **error);
81
82G_END_DECLS
83
84#endif /* __NM_DEVICE_WIFI_H__ */
85

source code of include/libnm/nm-device-wifi.h