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 _NMDeviceWifiClass NMDeviceWifiClass;
40
41GType nm_device_wifi_get_type(void);
42
43NM_DEPRECATED_IN_1_24_FOR(nm_device_get_hw_address)
44const char *nm_device_wifi_get_hw_address(NMDeviceWifi *device);
45
46const char *nm_device_wifi_get_permanent_hw_address(NMDeviceWifi *device);
47NM80211Mode nm_device_wifi_get_mode(NMDeviceWifi *device);
48guint32 nm_device_wifi_get_bitrate(NMDeviceWifi *device);
49NMDeviceWifiCapabilities nm_device_wifi_get_capabilities(NMDeviceWifi *device);
50NMAccessPoint *nm_device_wifi_get_active_access_point(NMDeviceWifi *device);
51
52NMAccessPoint *nm_device_wifi_get_access_point_by_path(NMDeviceWifi *device, const char *path);
53
54const GPtrArray *nm_device_wifi_get_access_points(NMDeviceWifi *device);
55
56NM_AVAILABLE_IN_1_12
57gint64 nm_device_wifi_get_last_scan(NMDeviceWifi *device);
58
59_NM_DEPRECATED_SYNC_METHOD
60gboolean
61nm_device_wifi_request_scan(NMDeviceWifi *device, GCancellable *cancellable, GError **error);
62NM_AVAILABLE_IN_1_2
63_NM_DEPRECATED_SYNC_METHOD
64gboolean nm_device_wifi_request_scan_options(NMDeviceWifi *device,
65 GVariant *options,
66 GCancellable *cancellable,
67 GError **error);
68void nm_device_wifi_request_scan_async(NMDeviceWifi *device,
69 GCancellable *cancellable,
70 GAsyncReadyCallback callback,
71 gpointer user_data);
72NM_AVAILABLE_IN_1_2
73void nm_device_wifi_request_scan_options_async(NMDeviceWifi *device,
74 GVariant *options,
75 GCancellable *cancellable,
76 GAsyncReadyCallback callback,
77 gpointer user_data);
78gboolean
79nm_device_wifi_request_scan_finish(NMDeviceWifi *device, GAsyncResult *result, GError **error);
80
81G_END_DECLS
82
83#endif /* __NM_DEVICE_WIFI_H__ */
84

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