1 | /* SPDX-License-Identifier: LGPL-2.1-or-later */ |
2 | /* |
3 | * Copyright (C) 2018 - 2019 Red Hat, Inc. |
4 | */ |
5 | |
6 | #ifndef __NM_DEVICE_WIFI_P2P_H__ |
7 | #define __NM_DEVICE_WIFI_P2P_H__ |
8 | |
9 | #if !defined(__NETWORKMANAGER_H_INSIDE__) && !defined(NETWORKMANAGER_COMPILATION) |
10 | #error "Only <NetworkManager.h> can be included directly." |
11 | #endif |
12 | |
13 | #include "nm-device.h" |
14 | |
15 | G_BEGIN_DECLS |
16 | |
17 | #define NM_TYPE_DEVICE_WIFI_P2P (nm_device_wifi_p2p_get_type()) |
18 | #define NM_DEVICE_WIFI_P2P(obj) \ |
19 | (G_TYPE_CHECK_INSTANCE_CAST((obj), NM_TYPE_DEVICE_WIFI_P2P, NMDeviceWifiP2P)) |
20 | #define NM_DEVICE_WIFI_P2P_CLASS(klass) \ |
21 | (G_TYPE_CHECK_CLASS_CAST((klass), NM_TYPE_DEVICE_WIFI_P2P, NMDeviceWifiP2PClass)) |
22 | #define NM_IS_DEVICE_WIFI_P2P(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), NM_TYPE_DEVICE_WIFI_P2P)) |
23 | #define NM_IS_DEVICE_WIFI_P2P_CLASS(klass) \ |
24 | (G_TYPE_CHECK_CLASS_TYPE((klass), NM_TYPE_DEVICE_WIFI_P2P)) |
25 | #define NM_DEVICE_WIFI_P2P_GET_CLASS(obj) \ |
26 | (G_TYPE_INSTANCE_GET_CLASS((obj), NM_TYPE_DEVICE_WIFI_P2P, NMDeviceWifiP2PClass)) |
27 | |
28 | #define NM_DEVICE_WIFI_P2P_HW_ADDRESS "hw-address" |
29 | #define NM_DEVICE_WIFI_P2P_PEERS "peers" |
30 | #define NM_DEVICE_WIFI_P2P_WFDIES "wfdies" |
31 | |
32 | /** |
33 | * NMDeviceWifiP2P: |
34 | * |
35 | * Since: 1.16 |
36 | */ |
37 | typedef struct _NMDeviceWifiP2PClass NMDeviceWifiP2PClass; |
38 | |
39 | NM_AVAILABLE_IN_1_16 |
40 | GType nm_device_wifi_p2p_get_type(void); |
41 | |
42 | NM_AVAILABLE_IN_1_16 |
43 | NM_DEPRECATED_IN_1_24_FOR(nm_device_get_hw_address) |
44 | const char *nm_device_wifi_p2p_get_hw_address(NMDeviceWifiP2P *device); |
45 | |
46 | NM_AVAILABLE_IN_1_16 |
47 | NMWifiP2PPeer *nm_device_wifi_p2p_get_peer_by_path(NMDeviceWifiP2P *device, const char *path); |
48 | |
49 | NM_AVAILABLE_IN_1_16 |
50 | const GPtrArray *nm_device_wifi_p2p_get_peers(NMDeviceWifiP2P *device); |
51 | |
52 | NM_AVAILABLE_IN_1_16 |
53 | void nm_device_wifi_p2p_start_find(NMDeviceWifiP2P *device, |
54 | GVariant *options, |
55 | GCancellable *cancellable, |
56 | GAsyncReadyCallback callback, |
57 | gpointer user_data); |
58 | NM_AVAILABLE_IN_1_16 |
59 | gboolean |
60 | nm_device_wifi_p2p_start_find_finish(NMDeviceWifiP2P *device, GAsyncResult *result, GError **error); |
61 | |
62 | NM_AVAILABLE_IN_1_16 |
63 | void nm_device_wifi_p2p_stop_find(NMDeviceWifiP2P *device, |
64 | GCancellable *cancellable, |
65 | GAsyncReadyCallback callback, |
66 | gpointer user_data); |
67 | NM_AVAILABLE_IN_1_16 |
68 | gboolean |
69 | nm_device_wifi_p2p_stop_find_finish(NMDeviceWifiP2P *device, GAsyncResult *result, GError **error); |
70 | |
71 | G_END_DECLS |
72 | |
73 | #endif /* __NM_DEVICE_WIFI_P2P_H__ */ |
74 | |