1 | /* SPDX-License-Identifier: LGPL-2.1-or-later */ |
2 | /* |
3 | * Copyright (C) 2018 - 2019 Red Hat, Inc. |
4 | */ |
5 | |
6 | #ifndef __NM_WIFI_P2P_PEER_H__ |
7 | #define __NM_WIFI_P2P_PEER_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-object.h" |
14 | |
15 | G_BEGIN_DECLS |
16 | |
17 | #define NM_TYPE_WIFI_P2P_PEER (nm_wifi_p2p_peer_get_type()) |
18 | #define NM_WIFI_P2P_PEER(obj) \ |
19 | (G_TYPE_CHECK_INSTANCE_CAST((obj), NM_TYPE_WIFI_P2P_PEER, NMWifiP2PPeer)) |
20 | #define NM_WIFI_P2P_PEER_CLASS(klass) \ |
21 | (G_TYPE_CHECK_CLASS_CAST((klass), NM_TYPE_WIFI_P2P_PEER, NMWifiP2PPeerClass)) |
22 | #define NM_IS_WIFI_P2P_PEER(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), NM_TYPE_WIFI_P2P_PEER)) |
23 | #define NM_IS_WIFI_P2P_PEER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), NM_TYPE_WIFI_P2P_PEER)) |
24 | #define NM_WIFI_P2P_PEER_GET_CLASS(obj) \ |
25 | (G_TYPE_INSTANCE_GET_CLASS((obj), NM_TYPE_WIFI_P2P_PEER, NMWifiP2PPeerClass)) |
26 | |
27 | #define NM_WIFI_P2P_PEER_FLAGS "flags" |
28 | #define NM_WIFI_P2P_PEER_NAME "name" |
29 | #define NM_WIFI_P2P_PEER_MANUFACTURER "manufacturer" |
30 | #define NM_WIFI_P2P_PEER_MODEL "model" |
31 | #define NM_WIFI_P2P_PEER_MODEL_NUMBER "model-number" |
32 | #define NM_WIFI_P2P_PEER_SERIAL "serial" |
33 | #define NM_WIFI_P2P_PEER_WFD_IES "wfd-ies" |
34 | #define NM_WIFI_P2P_PEER_HW_ADDRESS "hw-address" |
35 | #define NM_WIFI_P2P_PEER_STRENGTH "strength" |
36 | #define NM_WIFI_P2P_PEER_LAST_SEEN "last-seen" |
37 | |
38 | /** |
39 | * NMWifiP2PPeer: |
40 | */ |
41 | typedef struct _NMWifiP2PPeerClass NMWifiP2PPeerClass; |
42 | |
43 | NM_AVAILABLE_IN_1_16 |
44 | GType nm_wifi_p2p_peer_get_type(void); |
45 | |
46 | NM_AVAILABLE_IN_1_16 |
47 | NM80211ApFlags nm_wifi_p2p_peer_get_flags(NMWifiP2PPeer *peer); |
48 | |
49 | NM_AVAILABLE_IN_1_16 |
50 | const char *nm_wifi_p2p_peer_get_name(NMWifiP2PPeer *peer); |
51 | NM_AVAILABLE_IN_1_16 |
52 | const char *nm_wifi_p2p_peer_get_manufacturer(NMWifiP2PPeer *peer); |
53 | NM_AVAILABLE_IN_1_16 |
54 | const char *nm_wifi_p2p_peer_get_model(NMWifiP2PPeer *peer); |
55 | NM_AVAILABLE_IN_1_16 |
56 | const char *nm_wifi_p2p_peer_get_model_number(NMWifiP2PPeer *peer); |
57 | NM_AVAILABLE_IN_1_16 |
58 | const char *nm_wifi_p2p_peer_get_serial(NMWifiP2PPeer *peer); |
59 | |
60 | NM_AVAILABLE_IN_1_16 |
61 | GBytes *nm_wifi_p2p_peer_get_wfd_ies(NMWifiP2PPeer *peer); |
62 | |
63 | NM_AVAILABLE_IN_1_16 |
64 | const char *nm_wifi_p2p_peer_get_hw_address(NMWifiP2PPeer *peer); |
65 | |
66 | NM_AVAILABLE_IN_1_16 |
67 | guint8 nm_wifi_p2p_peer_get_strength(NMWifiP2PPeer *peer); |
68 | NM_AVAILABLE_IN_1_16 |
69 | int nm_wifi_p2p_peer_get_last_seen(NMWifiP2PPeer *peer); |
70 | |
71 | NM_AVAILABLE_IN_1_16 |
72 | GPtrArray *nm_wifi_p2p_peer_filter_connections(NMWifiP2PPeer *peer, const GPtrArray *connections); |
73 | |
74 | NM_AVAILABLE_IN_1_16 |
75 | gboolean nm_wifi_p2p_peer_connection_valid(NMWifiP2PPeer *peer, NMConnection *connection); |
76 | |
77 | G_END_DECLS |
78 | |
79 | #endif /* __NM_WIFI_P2P_PEER_H__ */ |
80 | |