1/* SPDX-License-Identifier: LGPL-2.1-or-later */
2/*
3 * Copyright (C) 2018 Red Hat, Inc.
4 */
5
6#ifndef __NM_AUTOPTR_H__
7#define __NM_AUTOPTR_H__
8
9/*
10 * Note that you might use this header with older versions of libnm
11 * that do not yet ship this header. In that case, copy the header
12 * into your source tree.
13 */
14
15#include <glib.h>
16#include <NetworkManager.h>
17
18#ifdef G_DEFINE_AUTOPTR_CLEANUP_FUNC
19
20G_DEFINE_AUTOPTR_CLEANUP_FUNC(NMClient, g_object_unref)
21
22G_DEFINE_AUTOPTR_CLEANUP_FUNC(NMAccessPoint, g_object_unref)
23G_DEFINE_AUTOPTR_CLEANUP_FUNC(NMActiveConnection, g_object_unref)
24G_DEFINE_AUTOPTR_CLEANUP_FUNC(NMCheckpoint, g_object_unref)
25G_DEFINE_AUTOPTR_CLEANUP_FUNC(NMConnection, g_object_unref)
26G_DEFINE_AUTOPTR_CLEANUP_FUNC(NMDevice, g_object_unref)
27G_DEFINE_AUTOPTR_CLEANUP_FUNC(NMDhcpConfig, g_object_unref)
28G_DEFINE_AUTOPTR_CLEANUP_FUNC(NMIPConfig, g_object_unref)
29G_DEFINE_AUTOPTR_CLEANUP_FUNC(NMObject, g_object_unref)
30G_DEFINE_AUTOPTR_CLEANUP_FUNC(NMRemoteConnection, g_object_unref)
31G_DEFINE_AUTOPTR_CLEANUP_FUNC(NMSetting, g_object_unref)
32G_DEFINE_AUTOPTR_CLEANUP_FUNC(NMSimpleConnection, g_object_unref)
33G_DEFINE_AUTOPTR_CLEANUP_FUNC(NMWifiP2PPeer, g_object_unref)
34G_DEFINE_AUTOPTR_CLEANUP_FUNC(NMWimaxNsp, g_object_unref)
35
36G_DEFINE_AUTOPTR_CLEANUP_FUNC(NMDevice6Lowpan, g_object_unref)
37G_DEFINE_AUTOPTR_CLEANUP_FUNC(NMDeviceAdsl, g_object_unref)
38G_DEFINE_AUTOPTR_CLEANUP_FUNC(NMDeviceBond, g_object_unref)
39G_DEFINE_AUTOPTR_CLEANUP_FUNC(NMDeviceBridge, g_object_unref)
40G_DEFINE_AUTOPTR_CLEANUP_FUNC(NMDeviceBt, g_object_unref)
41G_DEFINE_AUTOPTR_CLEANUP_FUNC(NMDeviceDummy, g_object_unref)
42G_DEFINE_AUTOPTR_CLEANUP_FUNC(NMDeviceEthernet, g_object_unref)
43G_DEFINE_AUTOPTR_CLEANUP_FUNC(NMDeviceGeneric, g_object_unref)
44G_DEFINE_AUTOPTR_CLEANUP_FUNC(NMDeviceIPTunnel, g_object_unref)
45G_DEFINE_AUTOPTR_CLEANUP_FUNC(NMDeviceInfiniband, g_object_unref)
46G_DEFINE_AUTOPTR_CLEANUP_FUNC(NMDeviceMacsec, g_object_unref)
47G_DEFINE_AUTOPTR_CLEANUP_FUNC(NMDeviceMacvlan, g_object_unref)
48G_DEFINE_AUTOPTR_CLEANUP_FUNC(NMDeviceModem, g_object_unref)
49G_DEFINE_AUTOPTR_CLEANUP_FUNC(NMDeviceOlpcMesh, g_object_unref)
50G_DEFINE_AUTOPTR_CLEANUP_FUNC(NMDeviceOvsBridge, g_object_unref)
51G_DEFINE_AUTOPTR_CLEANUP_FUNC(NMDeviceOvsInterface, g_object_unref)
52G_DEFINE_AUTOPTR_CLEANUP_FUNC(NMDeviceOvsPort, g_object_unref)
53G_DEFINE_AUTOPTR_CLEANUP_FUNC(NMDevicePpp, g_object_unref)
54G_DEFINE_AUTOPTR_CLEANUP_FUNC(NMDeviceTeam, g_object_unref)
55G_DEFINE_AUTOPTR_CLEANUP_FUNC(NMDeviceTun, g_object_unref)
56G_DEFINE_AUTOPTR_CLEANUP_FUNC(NMDeviceVeth, g_object_unref)
57G_DEFINE_AUTOPTR_CLEANUP_FUNC(NMDeviceVlan, g_object_unref)
58G_DEFINE_AUTOPTR_CLEANUP_FUNC(NMDeviceVxlan, g_object_unref)
59G_DEFINE_AUTOPTR_CLEANUP_FUNC(NMDeviceWifi, g_object_unref)
60G_DEFINE_AUTOPTR_CLEANUP_FUNC(NMDeviceWifiP2P, g_object_unref)
61G_DEFINE_AUTOPTR_CLEANUP_FUNC(NMDeviceWimax, g_object_unref)
62G_DEFINE_AUTOPTR_CLEANUP_FUNC(NMDeviceWireGuard, g_object_unref)
63G_DEFINE_AUTOPTR_CLEANUP_FUNC(NMDeviceWpan, g_object_unref)
64
65G_DEFINE_AUTOPTR_CLEANUP_FUNC(NMSetting6Lowpan, g_object_unref)
66G_DEFINE_AUTOPTR_CLEANUP_FUNC(NMSetting8021x, g_object_unref)
67G_DEFINE_AUTOPTR_CLEANUP_FUNC(NMSettingAdsl, g_object_unref)
68G_DEFINE_AUTOPTR_CLEANUP_FUNC(NMSettingBluetooth, g_object_unref)
69G_DEFINE_AUTOPTR_CLEANUP_FUNC(NMSettingBond, g_object_unref)
70G_DEFINE_AUTOPTR_CLEANUP_FUNC(NMSettingBondPort, g_object_unref)
71G_DEFINE_AUTOPTR_CLEANUP_FUNC(NMSettingBridge, g_object_unref)
72G_DEFINE_AUTOPTR_CLEANUP_FUNC(NMSettingBridgePort, g_object_unref)
73G_DEFINE_AUTOPTR_CLEANUP_FUNC(NMSettingCdma, g_object_unref)
74G_DEFINE_AUTOPTR_CLEANUP_FUNC(NMSettingConnection, g_object_unref)
75G_DEFINE_AUTOPTR_CLEANUP_FUNC(NMSettingDcb, g_object_unref)
76G_DEFINE_AUTOPTR_CLEANUP_FUNC(NMSettingDummy, g_object_unref)
77G_DEFINE_AUTOPTR_CLEANUP_FUNC(NMSettingEthtool, g_object_unref)
78G_DEFINE_AUTOPTR_CLEANUP_FUNC(NMSettingGeneric, g_object_unref)
79G_DEFINE_AUTOPTR_CLEANUP_FUNC(NMSettingGsm, g_object_unref)
80G_DEFINE_AUTOPTR_CLEANUP_FUNC(NMSettingIP4Config, g_object_unref)
81G_DEFINE_AUTOPTR_CLEANUP_FUNC(NMSettingIP6Config, g_object_unref)
82G_DEFINE_AUTOPTR_CLEANUP_FUNC(NMSettingIPConfig, g_object_unref)
83G_DEFINE_AUTOPTR_CLEANUP_FUNC(NMSettingIPTunnel, g_object_unref)
84G_DEFINE_AUTOPTR_CLEANUP_FUNC(NMSettingInfiniband, g_object_unref)
85G_DEFINE_AUTOPTR_CLEANUP_FUNC(NMSettingMacsec, g_object_unref)
86G_DEFINE_AUTOPTR_CLEANUP_FUNC(NMSettingMacvlan, g_object_unref)
87G_DEFINE_AUTOPTR_CLEANUP_FUNC(NMSettingMatch, g_object_unref)
88G_DEFINE_AUTOPTR_CLEANUP_FUNC(NMSettingOlpcMesh, g_object_unref)
89G_DEFINE_AUTOPTR_CLEANUP_FUNC(NMSettingOvsBridge, g_object_unref)
90G_DEFINE_AUTOPTR_CLEANUP_FUNC(NMSettingOvsInterface, g_object_unref)
91G_DEFINE_AUTOPTR_CLEANUP_FUNC(NMSettingOvsPatch, g_object_unref)
92G_DEFINE_AUTOPTR_CLEANUP_FUNC(NMSettingOvsPort, g_object_unref)
93G_DEFINE_AUTOPTR_CLEANUP_FUNC(NMSettingPpp, g_object_unref)
94G_DEFINE_AUTOPTR_CLEANUP_FUNC(NMSettingPppoe, g_object_unref)
95G_DEFINE_AUTOPTR_CLEANUP_FUNC(NMSettingProxy, g_object_unref)
96G_DEFINE_AUTOPTR_CLEANUP_FUNC(NMSettingSerial, g_object_unref)
97G_DEFINE_AUTOPTR_CLEANUP_FUNC(NMSettingSriov, g_object_unref)
98G_DEFINE_AUTOPTR_CLEANUP_FUNC(NMSettingTCConfig, g_object_unref)
99G_DEFINE_AUTOPTR_CLEANUP_FUNC(NMSettingTeam, g_object_unref)
100G_DEFINE_AUTOPTR_CLEANUP_FUNC(NMSettingTeamPort, g_object_unref)
101G_DEFINE_AUTOPTR_CLEANUP_FUNC(NMSettingTun, g_object_unref)
102G_DEFINE_AUTOPTR_CLEANUP_FUNC(NMSettingUser, g_object_unref)
103G_DEFINE_AUTOPTR_CLEANUP_FUNC(NMSettingVeth, g_object_unref)
104G_DEFINE_AUTOPTR_CLEANUP_FUNC(NMSettingVlan, g_object_unref)
105G_DEFINE_AUTOPTR_CLEANUP_FUNC(NMSettingVpn, g_object_unref)
106G_DEFINE_AUTOPTR_CLEANUP_FUNC(NMSettingVxlan, g_object_unref)
107G_DEFINE_AUTOPTR_CLEANUP_FUNC(NMSettingWifiP2P, g_object_unref)
108G_DEFINE_AUTOPTR_CLEANUP_FUNC(NMSettingWimax, g_object_unref)
109G_DEFINE_AUTOPTR_CLEANUP_FUNC(NMSettingWired, g_object_unref)
110G_DEFINE_AUTOPTR_CLEANUP_FUNC(NMSettingWireGuard, g_object_unref)
111G_DEFINE_AUTOPTR_CLEANUP_FUNC(NMSettingWireless, g_object_unref)
112G_DEFINE_AUTOPTR_CLEANUP_FUNC(NMSettingWirelessSecurity, g_object_unref)
113G_DEFINE_AUTOPTR_CLEANUP_FUNC(NMSettingWpan, g_object_unref)
114
115G_DEFINE_AUTOPTR_CLEANUP_FUNC(NMVpnConnection, g_object_unref)
116G_DEFINE_AUTOPTR_CLEANUP_FUNC(NMVpnEditor, g_object_unref)
117G_DEFINE_AUTOPTR_CLEANUP_FUNC(NMVpnEditorPlugin, g_object_unref)
118G_DEFINE_AUTOPTR_CLEANUP_FUNC(NMVpnPluginInfo, g_object_unref)
119G_DEFINE_AUTOPTR_CLEANUP_FUNC(NMVpnServicePlugin, g_object_unref)
120
121#endif
122
123#endif /* __NM_AUTOPTR_H__ */
124

source code of include/libnm/nm-autoptr.h