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

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