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
15G_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 */
41typedef struct _NMWifiP2PPeerClass NMWifiP2PPeerClass;
42
43NM_AVAILABLE_IN_1_16
44GType nm_wifi_p2p_peer_get_type(void);
45
46NM_AVAILABLE_IN_1_16
47NM80211ApFlags nm_wifi_p2p_peer_get_flags(NMWifiP2PPeer *peer);
48
49NM_AVAILABLE_IN_1_16
50const char *nm_wifi_p2p_peer_get_name(NMWifiP2PPeer *peer);
51NM_AVAILABLE_IN_1_16
52const char *nm_wifi_p2p_peer_get_manufacturer(NMWifiP2PPeer *peer);
53NM_AVAILABLE_IN_1_16
54const char *nm_wifi_p2p_peer_get_model(NMWifiP2PPeer *peer);
55NM_AVAILABLE_IN_1_16
56const char *nm_wifi_p2p_peer_get_model_number(NMWifiP2PPeer *peer);
57NM_AVAILABLE_IN_1_16
58const char *nm_wifi_p2p_peer_get_serial(NMWifiP2PPeer *peer);
59
60NM_AVAILABLE_IN_1_16
61GBytes *nm_wifi_p2p_peer_get_wfd_ies(NMWifiP2PPeer *peer);
62
63NM_AVAILABLE_IN_1_16
64const char *nm_wifi_p2p_peer_get_hw_address(NMWifiP2PPeer *peer);
65
66NM_AVAILABLE_IN_1_16
67guint8 nm_wifi_p2p_peer_get_strength(NMWifiP2PPeer *peer);
68NM_AVAILABLE_IN_1_16
69int nm_wifi_p2p_peer_get_last_seen(NMWifiP2PPeer *peer);
70
71NM_AVAILABLE_IN_1_16
72GPtrArray *nm_wifi_p2p_peer_filter_connections(NMWifiP2PPeer *peer, const GPtrArray *connections);
73
74NM_AVAILABLE_IN_1_16
75gboolean nm_wifi_p2p_peer_connection_valid(NMWifiP2PPeer *peer, NMConnection *connection);
76
77G_END_DECLS
78
79#endif /* __NM_WIFI_P2P_PEER_H__ */
80

source code of include/libnm/nm-wifi-p2p-peer.h