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
15G_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 */
37typedef struct _NMDeviceWifiP2PClass NMDeviceWifiP2PClass;
38
39NM_AVAILABLE_IN_1_16
40GType nm_device_wifi_p2p_get_type(void);
41
42NM_AVAILABLE_IN_1_16
43NM_DEPRECATED_IN_1_24_FOR(nm_device_get_hw_address)
44const char *nm_device_wifi_p2p_get_hw_address(NMDeviceWifiP2P *device);
45
46NM_AVAILABLE_IN_1_16
47NMWifiP2PPeer *nm_device_wifi_p2p_get_peer_by_path(NMDeviceWifiP2P *device, const char *path);
48
49NM_AVAILABLE_IN_1_16
50const GPtrArray *nm_device_wifi_p2p_get_peers(NMDeviceWifiP2P *device);
51
52NM_AVAILABLE_IN_1_16
53void nm_device_wifi_p2p_start_find(NMDeviceWifiP2P *device,
54 GVariant *options,
55 GCancellable *cancellable,
56 GAsyncReadyCallback callback,
57 gpointer user_data);
58NM_AVAILABLE_IN_1_16
59gboolean
60nm_device_wifi_p2p_start_find_finish(NMDeviceWifiP2P *device, GAsyncResult *result, GError **error);
61
62NM_AVAILABLE_IN_1_16
63void nm_device_wifi_p2p_stop_find(NMDeviceWifiP2P *device,
64 GCancellable *cancellable,
65 GAsyncReadyCallback callback,
66 gpointer user_data);
67NM_AVAILABLE_IN_1_16
68gboolean
69nm_device_wifi_p2p_stop_find_finish(NMDeviceWifiP2P *device, GAsyncResult *result, GError **error);
70
71G_END_DECLS
72
73#endif /* __NM_DEVICE_WIFI_P2P_H__ */
74

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