{-# LANGUAGE ImplicitParams, RankNTypes, TypeApplications #-}


-- | Copyright  : Will Thompson and Iñaki García Etxebarria
-- License    : LGPL-2.1
-- Maintainer : Iñaki García Etxebarria
-- 
-- /No description available in the introspection data./

#if (MIN_VERSION_haskell_gi_overloading(1,0,0) && !defined(__HADDOCK_VERSION__))
#define ENABLE_OVERLOADING
#endif

module GI.NM.Objects.Device
    ( 

-- * Exported types
    Device(..)                              ,
    IsDevice                                ,
    toDevice                                ,


 -- * Methods
-- | 
-- 
--  === __Click to display all available methods, including inherited ones__
-- ==== Methods
-- [bindProperty]("GI.GObject.Objects.Object#g:method:bindProperty"), [bindPropertyFull]("GI.GObject.Objects.Object#g:method:bindPropertyFull"), [connectionCompatible]("GI.NM.Objects.Device#g:method:connectionCompatible"), [connectionValid]("GI.NM.Objects.Device#g:method:connectionValid"), [delete]("GI.NM.Objects.Device#g:method:delete"), [deleteAsync]("GI.NM.Objects.Device#g:method:deleteAsync"), [deleteFinish]("GI.NM.Objects.Device#g:method:deleteFinish"), [disconnect]("GI.NM.Objects.Device#g:method:disconnect"), [disconnectAsync]("GI.NM.Objects.Device#g:method:disconnectAsync"), [disconnectFinish]("GI.NM.Objects.Device#g:method:disconnectFinish"), [filterConnections]("GI.NM.Objects.Device#g:method:filterConnections"), [forceFloating]("GI.GObject.Objects.Object#g:method:forceFloating"), [freezeNotify]("GI.GObject.Objects.Object#g:method:freezeNotify"), [getv]("GI.GObject.Objects.Object#g:method:getv"), [isFloating]("GI.GObject.Objects.Object#g:method:isFloating"), [isReal]("GI.NM.Objects.Device#g:method:isReal"), [isSoftware]("GI.NM.Objects.Device#g:method:isSoftware"), [notify]("GI.GObject.Objects.Object#g:method:notify"), [notifyByPspec]("GI.GObject.Objects.Object#g:method:notifyByPspec"), [reapply]("GI.NM.Objects.Device#g:method:reapply"), [reapplyAsync]("GI.NM.Objects.Device#g:method:reapplyAsync"), [reapplyFinish]("GI.NM.Objects.Device#g:method:reapplyFinish"), [ref]("GI.GObject.Objects.Object#g:method:ref"), [refSink]("GI.GObject.Objects.Object#g:method:refSink"), [runDispose]("GI.GObject.Objects.Object#g:method:runDispose"), [stealData]("GI.GObject.Objects.Object#g:method:stealData"), [stealQdata]("GI.GObject.Objects.Object#g:method:stealQdata"), [thawNotify]("GI.GObject.Objects.Object#g:method:thawNotify"), [unref]("GI.GObject.Objects.Object#g:method:unref"), [watchClosure]("GI.GObject.Objects.Object#g:method:watchClosure").
-- 
-- ==== Getters
-- [getActiveConnection]("GI.NM.Objects.Device#g:method:getActiveConnection"), [getAppliedConnection]("GI.NM.Objects.Device#g:method:getAppliedConnection"), [getAppliedConnectionAsync]("GI.NM.Objects.Device#g:method:getAppliedConnectionAsync"), [getAppliedConnectionFinish]("GI.NM.Objects.Device#g:method:getAppliedConnectionFinish"), [getAutoconnect]("GI.NM.Objects.Device#g:method:getAutoconnect"), [getAvailableConnections]("GI.NM.Objects.Device#g:method:getAvailableConnections"), [getCapabilities]("GI.NM.Objects.Device#g:method:getCapabilities"), [getClient]("GI.NM.Objects.Object#g:method:getClient"), [getConnectivity]("GI.NM.Objects.Device#g:method:getConnectivity"), [getData]("GI.GObject.Objects.Object#g:method:getData"), [getDescription]("GI.NM.Objects.Device#g:method:getDescription"), [getDeviceType]("GI.NM.Objects.Device#g:method:getDeviceType"), [getDhcp4Config]("GI.NM.Objects.Device#g:method:getDhcp4Config"), [getDhcp6Config]("GI.NM.Objects.Device#g:method:getDhcp6Config"), [getDriver]("GI.NM.Objects.Device#g:method:getDriver"), [getDriverVersion]("GI.NM.Objects.Device#g:method:getDriverVersion"), [getFirmwareMissing]("GI.NM.Objects.Device#g:method:getFirmwareMissing"), [getFirmwareVersion]("GI.NM.Objects.Device#g:method:getFirmwareVersion"), [getHwAddress]("GI.NM.Objects.Device#g:method:getHwAddress"), [getIface]("GI.NM.Objects.Device#g:method:getIface"), [getInterfaceFlags]("GI.NM.Objects.Device#g:method:getInterfaceFlags"), [getIp4Config]("GI.NM.Objects.Device#g:method:getIp4Config"), [getIp6Config]("GI.NM.Objects.Device#g:method:getIp6Config"), [getIpIface]("GI.NM.Objects.Device#g:method:getIpIface"), [getLldpNeighbors]("GI.NM.Objects.Device#g:method:getLldpNeighbors"), [getManaged]("GI.NM.Objects.Device#g:method:getManaged"), [getMetered]("GI.NM.Objects.Device#g:method:getMetered"), [getMtu]("GI.NM.Objects.Device#g:method:getMtu"), [getNmPluginMissing]("GI.NM.Objects.Device#g:method:getNmPluginMissing"), [getPath]("GI.NM.Objects.Device#g:method:getPath"), [getPhysicalPortId]("GI.NM.Objects.Device#g:method:getPhysicalPortId"), [getPorts]("GI.NM.Objects.Device#g:method:getPorts"), [getProduct]("GI.NM.Objects.Device#g:method:getProduct"), [getProperty]("GI.GObject.Objects.Object#g:method:getProperty"), [getQdata]("GI.GObject.Objects.Object#g:method:getQdata"), [getSettingType]("GI.NM.Objects.Device#g:method:getSettingType"), [getState]("GI.NM.Objects.Device#g:method:getState"), [getStateReason]("GI.NM.Objects.Device#g:method:getStateReason"), [getTypeDescription]("GI.NM.Objects.Device#g:method:getTypeDescription"), [getUdi]("GI.NM.Objects.Device#g:method:getUdi"), [getVendor]("GI.NM.Objects.Device#g:method:getVendor").
-- 
-- ==== Setters
-- [setAutoconnect]("GI.NM.Objects.Device#g:method:setAutoconnect"), [setData]("GI.GObject.Objects.Object#g:method:setData"), [setDataFull]("GI.GObject.Objects.Object#g:method:setDataFull"), [setManaged]("GI.NM.Objects.Device#g:method:setManaged"), [setProperty]("GI.GObject.Objects.Object#g:method:setProperty").

#if defined(ENABLE_OVERLOADING)
    ResolveDeviceMethod                     ,
#endif

-- ** connectionCompatible #method:connectionCompatible#

#if defined(ENABLE_OVERLOADING)
    DeviceConnectionCompatibleMethodInfo    ,
#endif
    deviceConnectionCompatible              ,


-- ** connectionValid #method:connectionValid#

#if defined(ENABLE_OVERLOADING)
    DeviceConnectionValidMethodInfo         ,
#endif
    deviceConnectionValid                   ,


-- ** delete #method:delete#

#if defined(ENABLE_OVERLOADING)
    DeviceDeleteMethodInfo                  ,
#endif
    deviceDelete                            ,


-- ** deleteAsync #method:deleteAsync#

#if defined(ENABLE_OVERLOADING)
    DeviceDeleteAsyncMethodInfo             ,
#endif
    deviceDeleteAsync                       ,


-- ** deleteFinish #method:deleteFinish#

#if defined(ENABLE_OVERLOADING)
    DeviceDeleteFinishMethodInfo            ,
#endif
    deviceDeleteFinish                      ,


-- ** disambiguateNames #method:disambiguateNames#

    deviceDisambiguateNames                 ,


-- ** disconnect #method:disconnect#

#if defined(ENABLE_OVERLOADING)
    DeviceDisconnectMethodInfo              ,
#endif
    deviceDisconnect                        ,


-- ** disconnectAsync #method:disconnectAsync#

#if defined(ENABLE_OVERLOADING)
    DeviceDisconnectAsyncMethodInfo         ,
#endif
    deviceDisconnectAsync                   ,


-- ** disconnectFinish #method:disconnectFinish#

#if defined(ENABLE_OVERLOADING)
    DeviceDisconnectFinishMethodInfo        ,
#endif
    deviceDisconnectFinish                  ,


-- ** filterConnections #method:filterConnections#

#if defined(ENABLE_OVERLOADING)
    DeviceFilterConnectionsMethodInfo       ,
#endif
    deviceFilterConnections                 ,


-- ** getActiveConnection #method:getActiveConnection#

#if defined(ENABLE_OVERLOADING)
    DeviceGetActiveConnectionMethodInfo     ,
#endif
    deviceGetActiveConnection               ,


-- ** getAppliedConnection #method:getAppliedConnection#

#if defined(ENABLE_OVERLOADING)
    DeviceGetAppliedConnectionMethodInfo    ,
#endif
    deviceGetAppliedConnection              ,


-- ** getAppliedConnectionAsync #method:getAppliedConnectionAsync#

#if defined(ENABLE_OVERLOADING)
    DeviceGetAppliedConnectionAsyncMethodInfo,
#endif
    deviceGetAppliedConnectionAsync         ,


-- ** getAppliedConnectionFinish #method:getAppliedConnectionFinish#

#if defined(ENABLE_OVERLOADING)
    DeviceGetAppliedConnectionFinishMethodInfo,
#endif
    deviceGetAppliedConnectionFinish        ,


-- ** getAutoconnect #method:getAutoconnect#

#if defined(ENABLE_OVERLOADING)
    DeviceGetAutoconnectMethodInfo          ,
#endif
    deviceGetAutoconnect                    ,


-- ** getAvailableConnections #method:getAvailableConnections#

#if defined(ENABLE_OVERLOADING)
    DeviceGetAvailableConnectionsMethodInfo ,
#endif
    deviceGetAvailableConnections           ,


-- ** getCapabilities #method:getCapabilities#

#if defined(ENABLE_OVERLOADING)
    DeviceGetCapabilitiesMethodInfo         ,
#endif
    deviceGetCapabilities                   ,


-- ** getConnectivity #method:getConnectivity#

#if defined(ENABLE_OVERLOADING)
    DeviceGetConnectivityMethodInfo         ,
#endif
    deviceGetConnectivity                   ,


-- ** getDescription #method:getDescription#

#if defined(ENABLE_OVERLOADING)
    DeviceGetDescriptionMethodInfo          ,
#endif
    deviceGetDescription                    ,


-- ** getDeviceType #method:getDeviceType#

#if defined(ENABLE_OVERLOADING)
    DeviceGetDeviceTypeMethodInfo           ,
#endif
    deviceGetDeviceType                     ,


-- ** getDhcp4Config #method:getDhcp4Config#

#if defined(ENABLE_OVERLOADING)
    DeviceGetDhcp4ConfigMethodInfo          ,
#endif
    deviceGetDhcp4Config                    ,


-- ** getDhcp6Config #method:getDhcp6Config#

#if defined(ENABLE_OVERLOADING)
    DeviceGetDhcp6ConfigMethodInfo          ,
#endif
    deviceGetDhcp6Config                    ,


-- ** getDriver #method:getDriver#

#if defined(ENABLE_OVERLOADING)
    DeviceGetDriverMethodInfo               ,
#endif
    deviceGetDriver                         ,


-- ** getDriverVersion #method:getDriverVersion#

#if defined(ENABLE_OVERLOADING)
    DeviceGetDriverVersionMethodInfo        ,
#endif
    deviceGetDriverVersion                  ,


-- ** getFirmwareMissing #method:getFirmwareMissing#

#if defined(ENABLE_OVERLOADING)
    DeviceGetFirmwareMissingMethodInfo      ,
#endif
    deviceGetFirmwareMissing                ,


-- ** getFirmwareVersion #method:getFirmwareVersion#

#if defined(ENABLE_OVERLOADING)
    DeviceGetFirmwareVersionMethodInfo      ,
#endif
    deviceGetFirmwareVersion                ,


-- ** getHwAddress #method:getHwAddress#

#if defined(ENABLE_OVERLOADING)
    DeviceGetHwAddressMethodInfo            ,
#endif
    deviceGetHwAddress                      ,


-- ** getIface #method:getIface#

#if defined(ENABLE_OVERLOADING)
    DeviceGetIfaceMethodInfo                ,
#endif
    deviceGetIface                          ,


-- ** getInterfaceFlags #method:getInterfaceFlags#

#if defined(ENABLE_OVERLOADING)
    DeviceGetInterfaceFlagsMethodInfo       ,
#endif
    deviceGetInterfaceFlags                 ,


-- ** getIp4Config #method:getIp4Config#

#if defined(ENABLE_OVERLOADING)
    DeviceGetIp4ConfigMethodInfo            ,
#endif
    deviceGetIp4Config                      ,


-- ** getIp6Config #method:getIp6Config#

#if defined(ENABLE_OVERLOADING)
    DeviceGetIp6ConfigMethodInfo            ,
#endif
    deviceGetIp6Config                      ,


-- ** getIpIface #method:getIpIface#

#if defined(ENABLE_OVERLOADING)
    DeviceGetIpIfaceMethodInfo              ,
#endif
    deviceGetIpIface                        ,


-- ** getLldpNeighbors #method:getLldpNeighbors#

#if defined(ENABLE_OVERLOADING)
    DeviceGetLldpNeighborsMethodInfo        ,
#endif
    deviceGetLldpNeighbors                  ,


-- ** getManaged #method:getManaged#

#if defined(ENABLE_OVERLOADING)
    DeviceGetManagedMethodInfo              ,
#endif
    deviceGetManaged                        ,


-- ** getMetered #method:getMetered#

#if defined(ENABLE_OVERLOADING)
    DeviceGetMeteredMethodInfo              ,
#endif
    deviceGetMetered                        ,


-- ** getMtu #method:getMtu#

#if defined(ENABLE_OVERLOADING)
    DeviceGetMtuMethodInfo                  ,
#endif
    deviceGetMtu                            ,


-- ** getNmPluginMissing #method:getNmPluginMissing#

#if defined(ENABLE_OVERLOADING)
    DeviceGetNmPluginMissingMethodInfo      ,
#endif
    deviceGetNmPluginMissing                ,


-- ** getPath #method:getPath#

#if defined(ENABLE_OVERLOADING)
    DeviceGetPathMethodInfo                 ,
#endif
    deviceGetPath                           ,


-- ** getPhysicalPortId #method:getPhysicalPortId#

#if defined(ENABLE_OVERLOADING)
    DeviceGetPhysicalPortIdMethodInfo       ,
#endif
    deviceGetPhysicalPortId                 ,


-- ** getPorts #method:getPorts#

#if defined(ENABLE_OVERLOADING)
    DeviceGetPortsMethodInfo                ,
#endif
    deviceGetPorts                          ,


-- ** getProduct #method:getProduct#

#if defined(ENABLE_OVERLOADING)
    DeviceGetProductMethodInfo              ,
#endif
    deviceGetProduct                        ,


-- ** getSettingType #method:getSettingType#

#if defined(ENABLE_OVERLOADING)
    DeviceGetSettingTypeMethodInfo          ,
#endif
    deviceGetSettingType                    ,


-- ** getState #method:getState#

#if defined(ENABLE_OVERLOADING)
    DeviceGetStateMethodInfo                ,
#endif
    deviceGetState                          ,


-- ** getStateReason #method:getStateReason#

#if defined(ENABLE_OVERLOADING)
    DeviceGetStateReasonMethodInfo          ,
#endif
    deviceGetStateReason                    ,


-- ** getTypeDescription #method:getTypeDescription#

#if defined(ENABLE_OVERLOADING)
    DeviceGetTypeDescriptionMethodInfo      ,
#endif
    deviceGetTypeDescription                ,


-- ** getUdi #method:getUdi#

#if defined(ENABLE_OVERLOADING)
    DeviceGetUdiMethodInfo                  ,
#endif
    deviceGetUdi                            ,


-- ** getVendor #method:getVendor#

#if defined(ENABLE_OVERLOADING)
    DeviceGetVendorMethodInfo               ,
#endif
    deviceGetVendor                         ,


-- ** isReal #method:isReal#

#if defined(ENABLE_OVERLOADING)
    DeviceIsRealMethodInfo                  ,
#endif
    deviceIsReal                            ,


-- ** isSoftware #method:isSoftware#

#if defined(ENABLE_OVERLOADING)
    DeviceIsSoftwareMethodInfo              ,
#endif
    deviceIsSoftware                        ,


-- ** reapply #method:reapply#

#if defined(ENABLE_OVERLOADING)
    DeviceReapplyMethodInfo                 ,
#endif
    deviceReapply                           ,


-- ** reapplyAsync #method:reapplyAsync#

#if defined(ENABLE_OVERLOADING)
    DeviceReapplyAsyncMethodInfo            ,
#endif
    deviceReapplyAsync                      ,


-- ** reapplyFinish #method:reapplyFinish#

#if defined(ENABLE_OVERLOADING)
    DeviceReapplyFinishMethodInfo           ,
#endif
    deviceReapplyFinish                     ,


-- ** setAutoconnect #method:setAutoconnect#

#if defined(ENABLE_OVERLOADING)
    DeviceSetAutoconnectMethodInfo          ,
#endif
    deviceSetAutoconnect                    ,


-- ** setManaged #method:setManaged#

#if defined(ENABLE_OVERLOADING)
    DeviceSetManagedMethodInfo              ,
#endif
    deviceSetManaged                        ,




 -- * Properties


-- ** activeConnection #attr:activeConnection#
-- | The t'GI.NM.Objects.ActiveConnection.ActiveConnection' object that \"owns\" this device during activation.

#if defined(ENABLE_OVERLOADING)
    DeviceActiveConnectionPropertyInfo      ,
#endif
#if defined(ENABLE_OVERLOADING)
    deviceActiveConnection                  ,
#endif
    getDeviceActiveConnection               ,


-- ** autoconnect #attr:autoconnect#
-- | Whether the device can auto-activate a connection.
-- 
-- The property setter is a synchronous D-Bus call. This is deprecated since 1.22.

#if defined(ENABLE_OVERLOADING)
    DeviceAutoconnectPropertyInfo           ,
#endif
    constructDeviceAutoconnect              ,
#if defined(ENABLE_OVERLOADING)
    deviceAutoconnect                       ,
#endif
    getDeviceAutoconnect                    ,
    setDeviceAutoconnect                    ,


-- ** availableConnections #attr:availableConnections#

#if defined(ENABLE_OVERLOADING)
    DeviceAvailableConnectionsPropertyInfo  ,
#endif
#if defined(ENABLE_OVERLOADING)
    deviceAvailableConnections              ,
#endif


-- ** capabilities #attr:capabilities#
-- | The capabilities of the device.

#if defined(ENABLE_OVERLOADING)
    DeviceCapabilitiesPropertyInfo          ,
#endif
#if defined(ENABLE_OVERLOADING)
    deviceCapabilities                      ,
#endif
    getDeviceCapabilities                   ,


-- ** deviceType #attr:deviceType#
-- | The numeric type of the device.

#if defined(ENABLE_OVERLOADING)
    DeviceDeviceTypePropertyInfo            ,
#endif
#if defined(ENABLE_OVERLOADING)
    deviceDeviceType                        ,
#endif
    getDeviceDeviceType                     ,


-- ** dhcp4Config #attr:dhcp4Config#
-- | The IPv4 t'GI.NM.Objects.DhcpConfig.DhcpConfig' of the device.

#if defined(ENABLE_OVERLOADING)
    DeviceDhcp4ConfigPropertyInfo           ,
#endif
#if defined(ENABLE_OVERLOADING)
    deviceDhcp4Config                       ,
#endif
    getDeviceDhcp4Config                    ,


-- ** dhcp6Config #attr:dhcp6Config#
-- | The IPv6 t'GI.NM.Objects.DhcpConfig.DhcpConfig' of the device.

#if defined(ENABLE_OVERLOADING)
    DeviceDhcp6ConfigPropertyInfo           ,
#endif
#if defined(ENABLE_OVERLOADING)
    deviceDhcp6Config                       ,
#endif
    getDeviceDhcp6Config                    ,


-- ** driver #attr:driver#
-- | The driver of the device.

#if defined(ENABLE_OVERLOADING)
    DeviceDriverPropertyInfo                ,
#endif
#if defined(ENABLE_OVERLOADING)
    deviceDriver                            ,
#endif
    getDeviceDriver                         ,


-- ** driverVersion #attr:driverVersion#
-- | The version of the device driver.

#if defined(ENABLE_OVERLOADING)
    DeviceDriverVersionPropertyInfo         ,
#endif
#if defined(ENABLE_OVERLOADING)
    deviceDriverVersion                     ,
#endif
    getDeviceDriverVersion                  ,


-- ** firmwareMissing #attr:firmwareMissing#
-- | When 'P.True' indicates the device is likely missing firmware required
-- for its operation.

#if defined(ENABLE_OVERLOADING)
    DeviceFirmwareMissingPropertyInfo       ,
#endif
#if defined(ENABLE_OVERLOADING)
    deviceFirmwareMissing                   ,
#endif
    getDeviceFirmwareMissing                ,


-- ** firmwareVersion #attr:firmwareVersion#
-- | The firmware version of the device.

#if defined(ENABLE_OVERLOADING)
    DeviceFirmwareVersionPropertyInfo       ,
#endif
#if defined(ENABLE_OVERLOADING)
    deviceFirmwareVersion                   ,
#endif
    getDeviceFirmwareVersion                ,


-- ** hwAddress #attr:hwAddress#
-- | The hardware address of the device.
-- 
-- /Since: 1.24/

#if defined(ENABLE_OVERLOADING)
    DeviceHwAddressPropertyInfo             ,
#endif
#if defined(ENABLE_OVERLOADING)
    deviceHwAddress                         ,
#endif
    getDeviceHwAddress                      ,


-- ** interface #attr:interface#
-- | The interface of the device.

#if defined(ENABLE_OVERLOADING)
    DeviceInterfacePropertyInfo             ,
#endif
#if defined(ENABLE_OVERLOADING)
    deviceInterface                         ,
#endif
    getDeviceInterface                      ,


-- ** interfaceFlags #attr:interfaceFlags#
-- | The interface flags.
-- 
-- /Since: 1.22/

#if defined(ENABLE_OVERLOADING)
    DeviceInterfaceFlagsPropertyInfo        ,
#endif
#if defined(ENABLE_OVERLOADING)
    deviceInterfaceFlags                    ,
#endif
    getDeviceInterfaceFlags                 ,


-- ** ip4Config #attr:ip4Config#
-- | The @/NMIP4Config/@ of the device.

#if defined(ENABLE_OVERLOADING)
    DeviceIp4ConfigPropertyInfo             ,
#endif
#if defined(ENABLE_OVERLOADING)
    deviceIp4Config                         ,
#endif
    getDeviceIp4Config                      ,


-- ** ip4Connectivity #attr:ip4Connectivity#
-- | The IPv4 connectivity state of the device.
-- 
-- /Since: 1.16/

#if defined(ENABLE_OVERLOADING)
    DeviceIp4ConnectivityPropertyInfo       ,
#endif
#if defined(ENABLE_OVERLOADING)
    deviceIp4Connectivity                   ,
#endif
    getDeviceIp4Connectivity                ,


-- ** ip6Config #attr:ip6Config#
-- | The IPv6 t'GI.NM.Objects.IPConfig.IPConfig' of the device.

#if defined(ENABLE_OVERLOADING)
    DeviceIp6ConfigPropertyInfo             ,
#endif
#if defined(ENABLE_OVERLOADING)
    deviceIp6Config                         ,
#endif
    getDeviceIp6Config                      ,


-- ** ip6Connectivity #attr:ip6Connectivity#
-- | The IPv6 connectivity state of the device.
-- 
-- /Since: 1.16/

#if defined(ENABLE_OVERLOADING)
    DeviceIp6ConnectivityPropertyInfo       ,
#endif
#if defined(ENABLE_OVERLOADING)
    deviceIp6Connectivity                   ,
#endif
    getDeviceIp6Connectivity                ,


-- ** ipInterface #attr:ipInterface#
-- | The IP interface of the device which should be used for all IP-related
-- operations like addressing and routing.

#if defined(ENABLE_OVERLOADING)
    DeviceIpInterfacePropertyInfo           ,
#endif
#if defined(ENABLE_OVERLOADING)
    deviceIpInterface                       ,
#endif
    getDeviceIpInterface                    ,


-- ** lldpNeighbors #attr:lldpNeighbors#

#if defined(ENABLE_OVERLOADING)
    DeviceLldpNeighborsPropertyInfo         ,
#endif
#if defined(ENABLE_OVERLOADING)
    deviceLldpNeighbors                     ,
#endif


-- ** managed #attr:managed#
-- | Whether the device is managed by NetworkManager.

#if defined(ENABLE_OVERLOADING)
    DeviceManagedPropertyInfo               ,
#endif
#if defined(ENABLE_OVERLOADING)
    deviceManaged                           ,
#endif
    getDeviceManaged                        ,


-- ** metered #attr:metered#
-- | Whether the device is metered.
-- 
-- /Since: 1.2/

#if defined(ENABLE_OVERLOADING)
    DeviceMeteredPropertyInfo               ,
#endif
#if defined(ENABLE_OVERLOADING)
    deviceMetered                           ,
#endif
    getDeviceMetered                        ,


-- ** mtu #attr:mtu#
-- | The MTU of the device.

#if defined(ENABLE_OVERLOADING)
    DeviceMtuPropertyInfo                   ,
#endif
#if defined(ENABLE_OVERLOADING)
    deviceMtu                               ,
#endif
    getDeviceMtu                            ,


-- ** nmPluginMissing #attr:nmPluginMissing#
-- | When 'P.True' indicates that the NetworkManager plugin for the device
-- is not installed.
-- 
-- /Since: 1.2/

#if defined(ENABLE_OVERLOADING)
    DeviceNmPluginMissingPropertyInfo       ,
#endif
#if defined(ENABLE_OVERLOADING)
    deviceNmPluginMissing                   ,
#endif
    getDeviceNmPluginMissing                ,


-- ** path #attr:path#
-- | The device path as exposed by the udev property ID_PATH.
-- 
-- The string is backslash escaped (C escaping) for invalid
-- characters. The escaping can be reverted with 'GI.GLib.Functions.strcompress',
-- however the result may not be valid UTF-8.
-- 
-- /Since: 1.26/

#if defined(ENABLE_OVERLOADING)
    DevicePathPropertyInfo                  ,
#endif
#if defined(ENABLE_OVERLOADING)
    devicePath                              ,
#endif
    getDevicePath                           ,


-- ** physicalPortId #attr:physicalPortId#
-- | The physical port ID of the device. (See
-- 'GI.NM.Objects.Device.deviceGetPhysicalPortId'.)

#if defined(ENABLE_OVERLOADING)
    DevicePhysicalPortIdPropertyInfo        ,
#endif
#if defined(ENABLE_OVERLOADING)
    devicePhysicalPortId                    ,
#endif
    getDevicePhysicalPortId                 ,


-- ** ports #attr:ports#

#if defined(ENABLE_OVERLOADING)
    DevicePortsPropertyInfo                 ,
#endif
#if defined(ENABLE_OVERLOADING)
    devicePorts                             ,
#endif


-- ** product #attr:product#
-- | The product string of the device.

#if defined(ENABLE_OVERLOADING)
    DeviceProductPropertyInfo               ,
#endif
#if defined(ENABLE_OVERLOADING)
    deviceProduct                           ,
#endif
    getDeviceProduct                        ,


-- ** real #attr:real#
-- | Whether the device is real or is a placeholder device that could
-- be created automatically by NetworkManager if one of its
-- [Device:availableConnections]("GI.NM.Objects.Device#g:attr:availableConnections") was activated.
-- 
-- /Since: 1.2/

#if defined(ENABLE_OVERLOADING)
    DeviceRealPropertyInfo                  ,
#endif
#if defined(ENABLE_OVERLOADING)
    deviceReal                              ,
#endif
    getDeviceReal                           ,


-- ** state #attr:state#
-- | The state of the device.

#if defined(ENABLE_OVERLOADING)
    DeviceStatePropertyInfo                 ,
#endif
#if defined(ENABLE_OVERLOADING)
    deviceState                             ,
#endif
    getDeviceState                          ,


-- ** stateReason #attr:stateReason#
-- | The reason for the device state.

#if defined(ENABLE_OVERLOADING)
    DeviceStateReasonPropertyInfo           ,
#endif
#if defined(ENABLE_OVERLOADING)
    deviceStateReason                       ,
#endif
    getDeviceStateReason                    ,


-- ** udi #attr:udi#
-- | An operating-system specific device hardware identifier; this is not
-- unique to a specific hardware device across reboots or hotplugs.  It
-- is an opaque string which for some device types (Bluetooth, Modem)
-- contains an identifier provided by the underlying hardware service daemon
-- such as Bluez or ModemManager, and clients can use this property to
-- request more information about the device from those services.

#if defined(ENABLE_OVERLOADING)
    DeviceUdiPropertyInfo                   ,
#endif
#if defined(ENABLE_OVERLOADING)
    deviceUdi                               ,
#endif
    getDeviceUdi                            ,


-- ** vendor #attr:vendor#
-- | The vendor string of the device.

#if defined(ENABLE_OVERLOADING)
    DeviceVendorPropertyInfo                ,
#endif
#if defined(ENABLE_OVERLOADING)
    deviceVendor                            ,
#endif
    getDeviceVendor                         ,




 -- * Signals


-- ** stateChanged #signal:stateChanged#

    DeviceStateChangedCallback              ,
#if defined(ENABLE_OVERLOADING)
    DeviceStateChangedSignalInfo            ,
#endif
    afterDeviceStateChanged                 ,
    onDeviceStateChanged                    ,




    ) where

import Data.GI.Base.ShortPrelude
import qualified Data.GI.Base.ShortPrelude as SP
import qualified Data.GI.Base.Overloading as O
import qualified Prelude as P

import qualified Data.GI.Base.Attributes as GI.Attributes
import qualified Data.GI.Base.BasicTypes as B.Types
import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr
import qualified Data.GI.Base.GArray as B.GArray
import qualified Data.GI.Base.GClosure as B.GClosure
import qualified Data.GI.Base.GError as B.GError
import qualified Data.GI.Base.GHashTable as B.GHT
import qualified Data.GI.Base.GVariant as B.GVariant
import qualified Data.GI.Base.GValue as B.GValue
import qualified Data.GI.Base.GParamSpec as B.GParamSpec
import qualified Data.GI.Base.CallStack as B.CallStack
import qualified Data.GI.Base.Properties as B.Properties
import qualified Data.GI.Base.Signals as B.Signals
import qualified Control.Monad.IO.Class as MIO
import qualified Data.Coerce as Coerce
import qualified Data.Text as T
import qualified Data.Kind as DK
import qualified Data.ByteString.Char8 as B
import qualified Data.Map as Map
import qualified Foreign.Ptr as FP
import qualified GHC.OverloadedLabels as OL
import qualified GHC.Records as R
import qualified Data.Word as DW
import qualified Data.Int as DI
import qualified System.Posix.Types as SPT
import qualified Foreign.C.Types as FCT

-- Workaround for https://gitlab.haskell.org/ghc/ghc/-/issues/23392
#if MIN_VERSION_base(4,18,0)
import qualified GI.GLib.Structs.Bytes as GLib.Bytes
import qualified GI.GLib.Structs.MainContext as GLib.MainContext
import qualified GI.GLib.Structs.VariantType as GLib.VariantType
import qualified GI.GObject.Objects.Object as GObject.Object
import qualified GI.Gio.Callbacks as Gio.Callbacks
import qualified GI.Gio.Interfaces.AsyncInitable as Gio.AsyncInitable
import qualified GI.Gio.Interfaces.AsyncResult as Gio.AsyncResult
import qualified GI.Gio.Interfaces.Initable as Gio.Initable
import qualified GI.Gio.Objects.Cancellable as Gio.Cancellable
import qualified GI.Gio.Objects.DBusConnection as Gio.DBusConnection
import qualified GI.NM.Callbacks as NM.Callbacks
import {-# SOURCE #-} qualified GI.NM.Enums as NM.Enums
import {-# SOURCE #-} qualified GI.NM.Flags as NM.Flags
import {-# SOURCE #-} qualified GI.NM.Interfaces.Connection as NM.Connection
import {-# SOURCE #-} qualified GI.NM.Objects.ActiveConnection as NM.ActiveConnection
import {-# SOURCE #-} qualified GI.NM.Objects.Checkpoint as NM.Checkpoint
import {-# SOURCE #-} qualified GI.NM.Objects.Client as NM.Client
import {-# SOURCE #-} qualified GI.NM.Objects.DhcpConfig as NM.DhcpConfig
import {-# SOURCE #-} qualified GI.NM.Objects.IPConfig as NM.IPConfig
import {-# SOURCE #-} qualified GI.NM.Objects.Object as NM.Object
import {-# SOURCE #-} qualified GI.NM.Objects.RemoteConnection as NM.RemoteConnection
import {-# SOURCE #-} qualified GI.NM.Objects.Setting as NM.Setting
import {-# SOURCE #-} qualified GI.NM.Objects.Setting8021x as NM.Setting8021x
import {-# SOURCE #-} qualified GI.NM.Objects.SettingAdsl as NM.SettingAdsl
import {-# SOURCE #-} qualified GI.NM.Objects.SettingBluetooth as NM.SettingBluetooth
import {-# SOURCE #-} qualified GI.NM.Objects.SettingBond as NM.SettingBond
import {-# SOURCE #-} qualified GI.NM.Objects.SettingBridge as NM.SettingBridge
import {-# SOURCE #-} qualified GI.NM.Objects.SettingBridgePort as NM.SettingBridgePort
import {-# SOURCE #-} qualified GI.NM.Objects.SettingCdma as NM.SettingCdma
import {-# SOURCE #-} qualified GI.NM.Objects.SettingConnection as NM.SettingConnection
import {-# SOURCE #-} qualified GI.NM.Objects.SettingDcb as NM.SettingDcb
import {-# SOURCE #-} qualified GI.NM.Objects.SettingDummy as NM.SettingDummy
import {-# SOURCE #-} qualified GI.NM.Objects.SettingGeneric as NM.SettingGeneric
import {-# SOURCE #-} qualified GI.NM.Objects.SettingGsm as NM.SettingGsm
import {-# SOURCE #-} qualified GI.NM.Objects.SettingIP4Config as NM.SettingIP4Config
import {-# SOURCE #-} qualified GI.NM.Objects.SettingIP6Config as NM.SettingIP6Config
import {-# SOURCE #-} qualified GI.NM.Objects.SettingIPConfig as NM.SettingIPConfig
import {-# SOURCE #-} qualified GI.NM.Objects.SettingIPTunnel as NM.SettingIPTunnel
import {-# SOURCE #-} qualified GI.NM.Objects.SettingInfiniband as NM.SettingInfiniband
import {-# SOURCE #-} qualified GI.NM.Objects.SettingMacsec as NM.SettingMacsec
import {-# SOURCE #-} qualified GI.NM.Objects.SettingMacvlan as NM.SettingMacvlan
import {-# SOURCE #-} qualified GI.NM.Objects.SettingOlpcMesh as NM.SettingOlpcMesh
import {-# SOURCE #-} qualified GI.NM.Objects.SettingOvsBridge as NM.SettingOvsBridge
import {-# SOURCE #-} qualified GI.NM.Objects.SettingOvsInterface as NM.SettingOvsInterface
import {-# SOURCE #-} qualified GI.NM.Objects.SettingOvsPatch as NM.SettingOvsPatch
import {-# SOURCE #-} qualified GI.NM.Objects.SettingOvsPort as NM.SettingOvsPort
import {-# SOURCE #-} qualified GI.NM.Objects.SettingPpp as NM.SettingPpp
import {-# SOURCE #-} qualified GI.NM.Objects.SettingPppoe as NM.SettingPppoe
import {-# SOURCE #-} qualified GI.NM.Objects.SettingProxy as NM.SettingProxy
import {-# SOURCE #-} qualified GI.NM.Objects.SettingSerial as NM.SettingSerial
import {-# SOURCE #-} qualified GI.NM.Objects.SettingTCConfig as NM.SettingTCConfig
import {-# SOURCE #-} qualified GI.NM.Objects.SettingTeam as NM.SettingTeam
import {-# SOURCE #-} qualified GI.NM.Objects.SettingTeamPort as NM.SettingTeamPort
import {-# SOURCE #-} qualified GI.NM.Objects.SettingTun as NM.SettingTun
import {-# SOURCE #-} qualified GI.NM.Objects.SettingVlan as NM.SettingVlan
import {-# SOURCE #-} qualified GI.NM.Objects.SettingVpn as NM.SettingVpn
import {-# SOURCE #-} qualified GI.NM.Objects.SettingVxlan as NM.SettingVxlan
import {-# SOURCE #-} qualified GI.NM.Objects.SettingWimax as NM.SettingWimax
import {-# SOURCE #-} qualified GI.NM.Objects.SettingWired as NM.SettingWired
import {-# SOURCE #-} qualified GI.NM.Objects.SettingWireless as NM.SettingWireless
import {-# SOURCE #-} qualified GI.NM.Objects.SettingWirelessSecurity as NM.SettingWirelessSecurity
import {-# SOURCE #-} qualified GI.NM.Structs.BridgeVlan as NM.BridgeVlan
import {-# SOURCE #-} qualified GI.NM.Structs.DnsEntry as NM.DnsEntry
import {-# SOURCE #-} qualified GI.NM.Structs.IPAddress as NM.IPAddress
import {-# SOURCE #-} qualified GI.NM.Structs.IPRoute as NM.IPRoute
import {-# SOURCE #-} qualified GI.NM.Structs.IPRoutingRule as NM.IPRoutingRule
import {-# SOURCE #-} qualified GI.NM.Structs.LldpNeighbor as NM.LldpNeighbor
import {-# SOURCE #-} qualified GI.NM.Structs.Range as NM.Range
import {-# SOURCE #-} qualified GI.NM.Structs.TCAction as NM.TCAction
import {-# SOURCE #-} qualified GI.NM.Structs.TCQdisc as NM.TCQdisc
import {-# SOURCE #-} qualified GI.NM.Structs.TCTfilter as NM.TCTfilter
import {-# SOURCE #-} qualified GI.NM.Structs.TeamLinkWatcher as NM.TeamLinkWatcher
import {-# SOURCE #-} qualified GI.NM.Structs.VariantAttributeSpec as NM.VariantAttributeSpec

#else
import qualified GI.GObject.Objects.Object as GObject.Object
import qualified GI.Gio.Callbacks as Gio.Callbacks
import qualified GI.Gio.Interfaces.AsyncResult as Gio.AsyncResult
import qualified GI.Gio.Objects.Cancellable as Gio.Cancellable
import {-# SOURCE #-} qualified GI.NM.Enums as NM.Enums
import {-# SOURCE #-} qualified GI.NM.Flags as NM.Flags
import {-# SOURCE #-} qualified GI.NM.Interfaces.Connection as NM.Connection
import {-# SOURCE #-} qualified GI.NM.Objects.ActiveConnection as NM.ActiveConnection
import {-# SOURCE #-} qualified GI.NM.Objects.DhcpConfig as NM.DhcpConfig
import {-# SOURCE #-} qualified GI.NM.Objects.IPConfig as NM.IPConfig
import {-# SOURCE #-} qualified GI.NM.Objects.Object as NM.Object
import {-# SOURCE #-} qualified GI.NM.Objects.RemoteConnection as NM.RemoteConnection
import {-# SOURCE #-} qualified GI.NM.Structs.LldpNeighbor as NM.LldpNeighbor

#endif

-- | Memory-managed wrapper type.
newtype Device = Device (SP.ManagedPtr Device)
    deriving (Device -> Device -> Bool
(Device -> Device -> Bool)
-> (Device -> Device -> Bool) -> Eq Device
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: Device -> Device -> Bool
== :: Device -> Device -> Bool
$c/= :: Device -> Device -> Bool
/= :: Device -> Device -> Bool
Eq)

instance SP.ManagedPtrNewtype Device where
    toManagedPtr :: Device -> ManagedPtr Device
toManagedPtr (Device ManagedPtr Device
p) = ManagedPtr Device
p

foreign import ccall "nm_device_get_type"
    c_nm_device_get_type :: IO B.Types.GType

instance B.Types.TypedObject Device where
    glibType :: IO GType
glibType = IO GType
c_nm_device_get_type

instance B.Types.GObject Device

-- | Type class for types which can be safely cast to t'Device', for instance with `toDevice`.
class (SP.GObject o, O.IsDescendantOf Device o) => IsDevice o
instance (SP.GObject o, O.IsDescendantOf Device o) => IsDevice o

instance O.HasParentTypes Device
type instance O.ParentTypes Device = '[NM.Object.Object, GObject.Object.Object]

-- | Cast to t'Device', for types for which this is known to be safe. For general casts, use 'Data.GI.Base.ManagedPtr.castTo'.
toDevice :: (MIO.MonadIO m, IsDevice o) => o -> m Device
toDevice :: forall (m :: * -> *) o. (MonadIO m, IsDevice o) => o -> m Device
toDevice = IO Device -> m Device
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO Device -> m Device) -> (o -> IO Device) -> o -> m Device
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (ManagedPtr Device -> Device) -> o -> IO Device
forall o o'.
(HasCallStack, ManagedPtrNewtype o, TypedObject o,
 ManagedPtrNewtype o', TypedObject o') =>
(ManagedPtr o' -> o') -> o -> IO o'
B.ManagedPtr.unsafeCastTo ManagedPtr Device -> Device
Device

-- | Convert t'Device' to and from t'Data.GI.Base.GValue.GValue'. See 'Data.GI.Base.GValue.toGValue' and 'Data.GI.Base.GValue.fromGValue'.
instance B.GValue.IsGValue (Maybe Device) where
    gvalueGType_ :: IO GType
gvalueGType_ = IO GType
c_nm_device_get_type
    gvalueSet_ :: Ptr GValue -> Maybe Device -> IO ()
gvalueSet_ Ptr GValue
gv Maybe Device
P.Nothing = Ptr GValue -> Ptr Device -> IO ()
forall a. GObject a => Ptr GValue -> Ptr a -> IO ()
B.GValue.set_object Ptr GValue
gv (Ptr Device
forall a. Ptr a
FP.nullPtr :: FP.Ptr Device)
    gvalueSet_ Ptr GValue
gv (P.Just Device
obj) = Device -> (Ptr Device -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
B.ManagedPtr.withManagedPtr Device
obj (Ptr GValue -> Ptr Device -> IO ()
forall a. GObject a => Ptr GValue -> Ptr a -> IO ()
B.GValue.set_object Ptr GValue
gv)
    gvalueGet_ :: Ptr GValue -> IO (Maybe Device)
gvalueGet_ Ptr GValue
gv = do
        Ptr Device
ptr <- Ptr GValue -> IO (Ptr Device)
forall a. GObject a => Ptr GValue -> IO (Ptr a)
B.GValue.get_object Ptr GValue
gv :: IO (FP.Ptr Device)
        if Ptr Device
ptr Ptr Device -> Ptr Device -> Bool
forall a. Eq a => a -> a -> Bool
/= Ptr Device
forall a. Ptr a
FP.nullPtr
        then Device -> Maybe Device
forall a. a -> Maybe a
P.Just (Device -> Maybe Device) -> IO Device -> IO (Maybe Device)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (ManagedPtr Device -> Device) -> Ptr Device -> IO Device
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
B.ManagedPtr.newObject ManagedPtr Device -> Device
Device Ptr Device
ptr
        else Maybe Device -> IO (Maybe Device)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Device
forall a. Maybe a
P.Nothing
        
    

#if defined(ENABLE_OVERLOADING)
type family ResolveDeviceMethod (t :: Symbol) (o :: DK.Type) :: DK.Type where
    ResolveDeviceMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo
    ResolveDeviceMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo
    ResolveDeviceMethod "connectionCompatible" o = DeviceConnectionCompatibleMethodInfo
    ResolveDeviceMethod "connectionValid" o = DeviceConnectionValidMethodInfo
    ResolveDeviceMethod "delete" o = DeviceDeleteMethodInfo
    ResolveDeviceMethod "deleteAsync" o = DeviceDeleteAsyncMethodInfo
    ResolveDeviceMethod "deleteFinish" o = DeviceDeleteFinishMethodInfo
    ResolveDeviceMethod "disconnect" o = DeviceDisconnectMethodInfo
    ResolveDeviceMethod "disconnectAsync" o = DeviceDisconnectAsyncMethodInfo
    ResolveDeviceMethod "disconnectFinish" o = DeviceDisconnectFinishMethodInfo
    ResolveDeviceMethod "filterConnections" o = DeviceFilterConnectionsMethodInfo
    ResolveDeviceMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo
    ResolveDeviceMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo
    ResolveDeviceMethod "getv" o = GObject.Object.ObjectGetvMethodInfo
    ResolveDeviceMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo
    ResolveDeviceMethod "isReal" o = DeviceIsRealMethodInfo
    ResolveDeviceMethod "isSoftware" o = DeviceIsSoftwareMethodInfo
    ResolveDeviceMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo
    ResolveDeviceMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo
    ResolveDeviceMethod "reapply" o = DeviceReapplyMethodInfo
    ResolveDeviceMethod "reapplyAsync" o = DeviceReapplyAsyncMethodInfo
    ResolveDeviceMethod "reapplyFinish" o = DeviceReapplyFinishMethodInfo
    ResolveDeviceMethod "ref" o = GObject.Object.ObjectRefMethodInfo
    ResolveDeviceMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo
    ResolveDeviceMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo
    ResolveDeviceMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo
    ResolveDeviceMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo
    ResolveDeviceMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo
    ResolveDeviceMethod "unref" o = GObject.Object.ObjectUnrefMethodInfo
    ResolveDeviceMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo
    ResolveDeviceMethod "getActiveConnection" o = DeviceGetActiveConnectionMethodInfo
    ResolveDeviceMethod "getAppliedConnection" o = DeviceGetAppliedConnectionMethodInfo
    ResolveDeviceMethod "getAppliedConnectionAsync" o = DeviceGetAppliedConnectionAsyncMethodInfo
    ResolveDeviceMethod "getAppliedConnectionFinish" o = DeviceGetAppliedConnectionFinishMethodInfo
    ResolveDeviceMethod "getAutoconnect" o = DeviceGetAutoconnectMethodInfo
    ResolveDeviceMethod "getAvailableConnections" o = DeviceGetAvailableConnectionsMethodInfo
    ResolveDeviceMethod "getCapabilities" o = DeviceGetCapabilitiesMethodInfo
    ResolveDeviceMethod "getClient" o = NM.Object.ObjectGetClientMethodInfo
    ResolveDeviceMethod "getConnectivity" o = DeviceGetConnectivityMethodInfo
    ResolveDeviceMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo
    ResolveDeviceMethod "getDescription" o = DeviceGetDescriptionMethodInfo
    ResolveDeviceMethod "getDeviceType" o = DeviceGetDeviceTypeMethodInfo
    ResolveDeviceMethod "getDhcp4Config" o = DeviceGetDhcp4ConfigMethodInfo
    ResolveDeviceMethod "getDhcp6Config" o = DeviceGetDhcp6ConfigMethodInfo
    ResolveDeviceMethod "getDriver" o = DeviceGetDriverMethodInfo
    ResolveDeviceMethod "getDriverVersion" o = DeviceGetDriverVersionMethodInfo
    ResolveDeviceMethod "getFirmwareMissing" o = DeviceGetFirmwareMissingMethodInfo
    ResolveDeviceMethod "getFirmwareVersion" o = DeviceGetFirmwareVersionMethodInfo
    ResolveDeviceMethod "getHwAddress" o = DeviceGetHwAddressMethodInfo
    ResolveDeviceMethod "getIface" o = DeviceGetIfaceMethodInfo
    ResolveDeviceMethod "getInterfaceFlags" o = DeviceGetInterfaceFlagsMethodInfo
    ResolveDeviceMethod "getIp4Config" o = DeviceGetIp4ConfigMethodInfo
    ResolveDeviceMethod "getIp6Config" o = DeviceGetIp6ConfigMethodInfo
    ResolveDeviceMethod "getIpIface" o = DeviceGetIpIfaceMethodInfo
    ResolveDeviceMethod "getLldpNeighbors" o = DeviceGetLldpNeighborsMethodInfo
    ResolveDeviceMethod "getManaged" o = DeviceGetManagedMethodInfo
    ResolveDeviceMethod "getMetered" o = DeviceGetMeteredMethodInfo
    ResolveDeviceMethod "getMtu" o = DeviceGetMtuMethodInfo
    ResolveDeviceMethod "getNmPluginMissing" o = DeviceGetNmPluginMissingMethodInfo
    ResolveDeviceMethod "getPath" o = DeviceGetPathMethodInfo
    ResolveDeviceMethod "getPhysicalPortId" o = DeviceGetPhysicalPortIdMethodInfo
    ResolveDeviceMethod "getPorts" o = DeviceGetPortsMethodInfo
    ResolveDeviceMethod "getProduct" o = DeviceGetProductMethodInfo
    ResolveDeviceMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo
    ResolveDeviceMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo
    ResolveDeviceMethod "getSettingType" o = DeviceGetSettingTypeMethodInfo
    ResolveDeviceMethod "getState" o = DeviceGetStateMethodInfo
    ResolveDeviceMethod "getStateReason" o = DeviceGetStateReasonMethodInfo
    ResolveDeviceMethod "getTypeDescription" o = DeviceGetTypeDescriptionMethodInfo
    ResolveDeviceMethod "getUdi" o = DeviceGetUdiMethodInfo
    ResolveDeviceMethod "getVendor" o = DeviceGetVendorMethodInfo
    ResolveDeviceMethod "setAutoconnect" o = DeviceSetAutoconnectMethodInfo
    ResolveDeviceMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo
    ResolveDeviceMethod "setDataFull" o = GObject.Object.ObjectSetDataFullMethodInfo
    ResolveDeviceMethod "setManaged" o = DeviceSetManagedMethodInfo
    ResolveDeviceMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo
    ResolveDeviceMethod l o = O.MethodResolutionFailed l o

instance (info ~ ResolveDeviceMethod t Device, O.OverloadedMethod info Device p) => OL.IsLabel t (Device -> p) where
#if MIN_VERSION_base(4,10,0)
    fromLabel = O.overloadedMethod @info
#else
    fromLabel _ = O.overloadedMethod @info
#endif

#if MIN_VERSION_base(4,13,0)
instance (info ~ ResolveDeviceMethod t Device, O.OverloadedMethod info Device p, R.HasField t Device p) => R.HasField t Device p where
    getField = O.overloadedMethod @info

#endif

instance (info ~ ResolveDeviceMethod t Device, O.OverloadedMethodInfo info Device) => OL.IsLabel t (O.MethodProxy info Device) where
#if MIN_VERSION_base(4,10,0)
    fromLabel = O.MethodProxy
#else
    fromLabel _ = O.MethodProxy
#endif

#endif

-- signal Device::state-changed
-- | Notifies the state change of a t'GI.NM.Objects.Device.Device'.
type DeviceStateChangedCallback =
    Word32
    -- ^ /@newState@/: the new state of the device
    -> Word32
    -- ^ /@oldState@/: the previous state of the device
    -> Word32
    -- ^ /@reason@/: the reason describing the state change
    -> IO ()

type C_DeviceStateChangedCallback =
    Ptr Device ->                           -- object
    Word32 ->
    Word32 ->
    Word32 ->
    Ptr () ->                               -- user_data
    IO ()

-- | Generate a function pointer callable from C code, from a `C_DeviceStateChangedCallback`.
foreign import ccall "wrapper"
    mk_DeviceStateChangedCallback :: C_DeviceStateChangedCallback -> IO (FunPtr C_DeviceStateChangedCallback)

wrap_DeviceStateChangedCallback :: 
    GObject a => (a -> DeviceStateChangedCallback) ->
    C_DeviceStateChangedCallback
wrap_DeviceStateChangedCallback :: forall a.
GObject a =>
(a -> DeviceStateChangedCallback) -> C_DeviceStateChangedCallback
wrap_DeviceStateChangedCallback a -> DeviceStateChangedCallback
gi'cb Ptr Device
gi'selfPtr Word32
newState Word32
oldState Word32
reason Ptr ()
_ = do
    Ptr Device -> (Device -> IO ()) -> IO ()
forall o b.
(HasCallStack, GObject o) =>
Ptr o -> (o -> IO b) -> IO b
B.ManagedPtr.withNewObject Ptr Device
gi'selfPtr ((Device -> IO ()) -> IO ()) -> (Device -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Device
gi'self -> a -> DeviceStateChangedCallback
gi'cb (Device -> a
forall a b. Coercible a b => a -> b
Coerce.coerce Device
gi'self)  Word32
newState Word32
oldState Word32
reason


-- | Connect a signal handler for the [stateChanged](#signal:stateChanged) signal, to be run before the default handler.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Signals.on' device #stateChanged callback
-- @
-- 
-- 
onDeviceStateChanged :: (IsDevice a, MonadIO m) => a -> ((?self :: a) => DeviceStateChangedCallback) -> m SignalHandlerId
onDeviceStateChanged :: forall a (m :: * -> *).
(IsDevice a, MonadIO m) =>
a
-> ((?self::a) => DeviceStateChangedCallback) -> m SignalHandlerId
onDeviceStateChanged a
obj (?self::a) => DeviceStateChangedCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
    let wrapped :: a -> DeviceStateChangedCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => DeviceStateChangedCallback
DeviceStateChangedCallback
cb
    let wrapped' :: C_DeviceStateChangedCallback
wrapped' = (a -> DeviceStateChangedCallback) -> C_DeviceStateChangedCallback
forall a.
GObject a =>
(a -> DeviceStateChangedCallback) -> C_DeviceStateChangedCallback
wrap_DeviceStateChangedCallback a -> DeviceStateChangedCallback
wrapped
    FunPtr C_DeviceStateChangedCallback
wrapped'' <- C_DeviceStateChangedCallback
-> IO (FunPtr C_DeviceStateChangedCallback)
mk_DeviceStateChangedCallback C_DeviceStateChangedCallback
wrapped'
    a
-> Text
-> FunPtr C_DeviceStateChangedCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"state-changed" FunPtr C_DeviceStateChangedCallback
wrapped'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing

-- | Connect a signal handler for the [stateChanged](#signal:stateChanged) signal, to be run after the default handler.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Signals.after' device #stateChanged callback
-- @
-- 
-- 
-- 
-- By default the object invoking the signal is not passed to the callback.
-- If you need to access it, you can use the implit @?self@ parameter.
-- Note that this requires activating the @ImplicitParams@ GHC extension.
-- 
afterDeviceStateChanged :: (IsDevice a, MonadIO m) => a -> ((?self :: a) => DeviceStateChangedCallback) -> m SignalHandlerId
afterDeviceStateChanged :: forall a (m :: * -> *).
(IsDevice a, MonadIO m) =>
a
-> ((?self::a) => DeviceStateChangedCallback) -> m SignalHandlerId
afterDeviceStateChanged a
obj (?self::a) => DeviceStateChangedCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
    let wrapped :: a -> DeviceStateChangedCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => DeviceStateChangedCallback
DeviceStateChangedCallback
cb
    let wrapped' :: C_DeviceStateChangedCallback
wrapped' = (a -> DeviceStateChangedCallback) -> C_DeviceStateChangedCallback
forall a.
GObject a =>
(a -> DeviceStateChangedCallback) -> C_DeviceStateChangedCallback
wrap_DeviceStateChangedCallback a -> DeviceStateChangedCallback
wrapped
    FunPtr C_DeviceStateChangedCallback
wrapped'' <- C_DeviceStateChangedCallback
-> IO (FunPtr C_DeviceStateChangedCallback)
mk_DeviceStateChangedCallback C_DeviceStateChangedCallback
wrapped'
    a
-> Text
-> FunPtr C_DeviceStateChangedCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"state-changed" FunPtr C_DeviceStateChangedCallback
wrapped'' SignalConnectMode
SignalConnectAfter Maybe Text
forall a. Maybe a
Nothing


#if defined(ENABLE_OVERLOADING)
data DeviceStateChangedSignalInfo
instance SignalInfo DeviceStateChangedSignalInfo where
    type HaskellCallbackType DeviceStateChangedSignalInfo = DeviceStateChangedCallback
    connectSignal obj cb connectMode detail = do
        let cb' = wrap_DeviceStateChangedCallback cb
        cb'' <- mk_DeviceStateChangedCallback cb'
        connectSignalFunPtr obj "state-changed" cb'' connectMode detail
    dbgSignalInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.NM.Objects.Device::state-changed"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Objects-Device.html#g:signal:stateChanged"})

#endif

--- XXX Duplicated object with different types:
  --- Name {namespace = "NM", name = "Device"} -> Property {propName = "path", propType = TBasicType TUTF8, propFlags = [PropertyReadable], propReadNullable = Just False, propWriteNullable = Nothing, propSetter = Nothing, propGetter = Just "get_path", propTransfer = TransferNothing, propDoc = Documentation {rawDocText = Just "The device path as exposed by the udev property ID_PATH.\n\nThe string is backslash escaped (C escaping) for invalid\ncharacters. The escaping can be reverted with g_strcompress(),\nhowever the result may not be valid UTF-8.", sinceVersion = Just "1.26"}, propDeprecated = Nothing}
  --- Name {namespace = "NM", name = "Object"} -> Property {propName = "path", propType = TBasicType TUTF8, propFlags = [PropertyReadable], propReadNullable = Just False, propWriteNullable = Nothing, propSetter = Nothing, propGetter = Just "get_path", propTransfer = TransferNothing, propDoc = Documentation {rawDocText = Just "The D-Bus object path.\n\nThe D-Bus path of an object instance never changes, even if the object\ngets removed from the cache. To see whether the object is still in the\ncache, check NMObject:client.", sinceVersion = Nothing}, propDeprecated = Nothing}
-- VVV Prop "active-connection"
   -- Type: TInterface (Name {namespace = "NM", name = "ActiveConnection"})
   -- Flags: [PropertyReadable]
   -- Nullable: (Just False,Nothing)

-- | Get the value of the “@active-connection@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.get' device #activeConnection
-- @
getDeviceActiveConnection :: (MonadIO m, IsDevice o) => o -> m NM.ActiveConnection.ActiveConnection
getDeviceActiveConnection :: forall (m :: * -> *) o.
(MonadIO m, IsDevice o) =>
o -> m ActiveConnection
getDeviceActiveConnection o
obj = IO ActiveConnection -> m ActiveConnection
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO ActiveConnection -> m ActiveConnection)
-> IO ActiveConnection -> m ActiveConnection
forall a b. (a -> b) -> a -> b
$ Text -> IO (Maybe ActiveConnection) -> IO ActiveConnection
forall a. HasCallStack => Text -> IO (Maybe a) -> IO a
checkUnexpectedNothing Text
"getDeviceActiveConnection" (IO (Maybe ActiveConnection) -> IO ActiveConnection)
-> IO (Maybe ActiveConnection) -> IO ActiveConnection
forall a b. (a -> b) -> a -> b
$ o
-> String
-> (ManagedPtr ActiveConnection -> ActiveConnection)
-> IO (Maybe ActiveConnection)
forall a b.
(GObject a, GObject b) =>
a -> String -> (ManagedPtr b -> b) -> IO (Maybe b)
B.Properties.getObjectPropertyObject o
obj String
"active-connection" ManagedPtr ActiveConnection -> ActiveConnection
NM.ActiveConnection.ActiveConnection

#if defined(ENABLE_OVERLOADING)
data DeviceActiveConnectionPropertyInfo
instance AttrInfo DeviceActiveConnectionPropertyInfo where
    type AttrAllowedOps DeviceActiveConnectionPropertyInfo = '[ 'AttrGet, 'AttrClear]
    type AttrBaseTypeConstraint DeviceActiveConnectionPropertyInfo = IsDevice
    type AttrSetTypeConstraint DeviceActiveConnectionPropertyInfo = (~) ()
    type AttrTransferTypeConstraint DeviceActiveConnectionPropertyInfo = (~) ()
    type AttrTransferType DeviceActiveConnectionPropertyInfo = ()
    type AttrGetType DeviceActiveConnectionPropertyInfo = NM.ActiveConnection.ActiveConnection
    type AttrLabel DeviceActiveConnectionPropertyInfo = "active-connection"
    type AttrOrigin DeviceActiveConnectionPropertyInfo = Device
    attrGet = getDeviceActiveConnection
    attrSet = undefined
    attrTransfer _ = undefined
    attrConstruct = undefined
    attrClear = undefined
    dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.NM.Objects.Device.activeConnection"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Objects-Device.html#g:attr:activeConnection"
        })
#endif

-- VVV Prop "autoconnect"
   -- Type: TBasicType TBoolean
   -- Flags: [PropertyReadable,PropertyWritable]
   -- Nullable: (Just False,Just False)

-- | Get the value of the “@autoconnect@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.get' device #autoconnect
-- @
getDeviceAutoconnect :: (MonadIO m, IsDevice o) => o -> m Bool
getDeviceAutoconnect :: forall (m :: * -> *) o. (MonadIO m, IsDevice o) => o -> m Bool
getDeviceAutoconnect o
obj = IO Bool -> m Bool
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ o -> String -> IO Bool
forall a. GObject a => a -> String -> IO Bool
B.Properties.getObjectPropertyBool o
obj String
"autoconnect"

-- | Set the value of the “@autoconnect@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.set' device [ #autoconnect 'Data.GI.Base.Attributes.:=' value ]
-- @
setDeviceAutoconnect :: (MonadIO m, IsDevice o) => o -> Bool -> m ()
setDeviceAutoconnect :: forall (m :: * -> *) o.
(MonadIO m, IsDevice o) =>
o -> Bool -> m ()
setDeviceAutoconnect o
obj Bool
val = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    o -> String -> Bool -> IO ()
forall a. GObject a => a -> String -> Bool -> IO ()
B.Properties.setObjectPropertyBool o
obj String
"autoconnect" Bool
val

-- | Construct a t'GValueConstruct' with valid value for the “@autoconnect@” property. This is rarely needed directly, but it is used by `Data.GI.Base.Constructible.new`.
constructDeviceAutoconnect :: (IsDevice o, MIO.MonadIO m) => Bool -> m (GValueConstruct o)
constructDeviceAutoconnect :: forall o (m :: * -> *).
(IsDevice o, MonadIO m) =>
Bool -> m (GValueConstruct o)
constructDeviceAutoconnect Bool
val = IO (GValueConstruct o) -> m (GValueConstruct o)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> m (GValueConstruct o))
-> IO (GValueConstruct o) -> m (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ do
    IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a. IO a -> IO a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> IO (GValueConstruct o))
-> IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ String -> Bool -> IO (GValueConstruct o)
forall o. String -> Bool -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyBool String
"autoconnect" Bool
val

#if defined(ENABLE_OVERLOADING)
data DeviceAutoconnectPropertyInfo
instance AttrInfo DeviceAutoconnectPropertyInfo where
    type AttrAllowedOps DeviceAutoconnectPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
    type AttrBaseTypeConstraint DeviceAutoconnectPropertyInfo = IsDevice
    type AttrSetTypeConstraint DeviceAutoconnectPropertyInfo = (~) Bool
    type AttrTransferTypeConstraint DeviceAutoconnectPropertyInfo = (~) Bool
    type AttrTransferType DeviceAutoconnectPropertyInfo = Bool
    type AttrGetType DeviceAutoconnectPropertyInfo = Bool
    type AttrLabel DeviceAutoconnectPropertyInfo = "autoconnect"
    type AttrOrigin DeviceAutoconnectPropertyInfo = Device
    attrGet = getDeviceAutoconnect
    attrSet = setDeviceAutoconnect
    attrTransfer _ v = do
        return v
    attrConstruct = constructDeviceAutoconnect
    attrClear = undefined
    dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.NM.Objects.Device.autoconnect"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Objects-Device.html#g:attr:autoconnect"
        })
#endif

-- XXX Generation of property "available-connections" of object "Device" failed.
-- Not implemented: Don't know how to handle properties of type TPtrArray (TInterface (Name {namespace = "NM", name = "RemoteConnection"}))
#if defined(ENABLE_OVERLOADING)
-- XXX Placeholder
data DeviceAvailableConnectionsPropertyInfo
instance AttrInfo DeviceAvailableConnectionsPropertyInfo where
    type AttrAllowedOps DeviceAvailableConnectionsPropertyInfo = '[]
    type AttrSetTypeConstraint DeviceAvailableConnectionsPropertyInfo = (~) ()
    type AttrTransferTypeConstraint DeviceAvailableConnectionsPropertyInfo = (~) ()
    type AttrTransferType DeviceAvailableConnectionsPropertyInfo = ()
    type AttrBaseTypeConstraint DeviceAvailableConnectionsPropertyInfo = (~) ()
    type AttrGetType DeviceAvailableConnectionsPropertyInfo = ()
    type AttrLabel DeviceAvailableConnectionsPropertyInfo = ""
    type AttrOrigin DeviceAvailableConnectionsPropertyInfo = Device
    attrGet = undefined
    attrSet = undefined
    attrConstruct = undefined
    attrClear = undefined
    attrTransfer = undefined
#endif

-- VVV Prop "capabilities"
   -- Type: TInterface (Name {namespace = "NM", name = "DeviceCapabilities"})
   -- Flags: [PropertyReadable]
   -- Nullable: (Just False,Nothing)

-- | Get the value of the “@capabilities@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.get' device #capabilities
-- @
getDeviceCapabilities :: (MonadIO m, IsDevice o) => o -> m [NM.Flags.DeviceCapabilities]
getDeviceCapabilities :: forall (m :: * -> *) o.
(MonadIO m, IsDevice o) =>
o -> m [DeviceCapabilities]
getDeviceCapabilities o
obj = IO [DeviceCapabilities] -> m [DeviceCapabilities]
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO [DeviceCapabilities] -> m [DeviceCapabilities])
-> IO [DeviceCapabilities] -> m [DeviceCapabilities]
forall a b. (a -> b) -> a -> b
$ o -> String -> IO [DeviceCapabilities]
forall a b.
(GObject a, IsGFlag b, BoxedFlags b) =>
a -> String -> IO [b]
B.Properties.getObjectPropertyFlags o
obj String
"capabilities"

#if defined(ENABLE_OVERLOADING)
data DeviceCapabilitiesPropertyInfo
instance AttrInfo DeviceCapabilitiesPropertyInfo where
    type AttrAllowedOps DeviceCapabilitiesPropertyInfo = '[ 'AttrGet]
    type AttrBaseTypeConstraint DeviceCapabilitiesPropertyInfo = IsDevice
    type AttrSetTypeConstraint DeviceCapabilitiesPropertyInfo = (~) ()
    type AttrTransferTypeConstraint DeviceCapabilitiesPropertyInfo = (~) ()
    type AttrTransferType DeviceCapabilitiesPropertyInfo = ()
    type AttrGetType DeviceCapabilitiesPropertyInfo = [NM.Flags.DeviceCapabilities]
    type AttrLabel DeviceCapabilitiesPropertyInfo = "capabilities"
    type AttrOrigin DeviceCapabilitiesPropertyInfo = Device
    attrGet = getDeviceCapabilities
    attrSet = undefined
    attrTransfer _ = undefined
    attrConstruct = undefined
    attrClear = undefined
    dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.NM.Objects.Device.capabilities"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Objects-Device.html#g:attr:capabilities"
        })
#endif

-- VVV Prop "device-type"
   -- Type: TInterface (Name {namespace = "NM", name = "DeviceType"})
   -- Flags: [PropertyReadable]
   -- Nullable: (Just False,Nothing)

-- | Get the value of the “@device-type@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.get' device #deviceType
-- @
getDeviceDeviceType :: (MonadIO m, IsDevice o) => o -> m NM.Enums.DeviceType
getDeviceDeviceType :: forall (m :: * -> *) o.
(MonadIO m, IsDevice o) =>
o -> m DeviceType
getDeviceDeviceType o
obj = IO DeviceType -> m DeviceType
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO DeviceType -> m DeviceType) -> IO DeviceType -> m DeviceType
forall a b. (a -> b) -> a -> b
$ o -> String -> IO DeviceType
forall a b. (GObject a, Enum b, BoxedEnum b) => a -> String -> IO b
B.Properties.getObjectPropertyEnum o
obj String
"device-type"

#if defined(ENABLE_OVERLOADING)
data DeviceDeviceTypePropertyInfo
instance AttrInfo DeviceDeviceTypePropertyInfo where
    type AttrAllowedOps DeviceDeviceTypePropertyInfo = '[ 'AttrGet]
    type AttrBaseTypeConstraint DeviceDeviceTypePropertyInfo = IsDevice
    type AttrSetTypeConstraint DeviceDeviceTypePropertyInfo = (~) ()
    type AttrTransferTypeConstraint DeviceDeviceTypePropertyInfo = (~) ()
    type AttrTransferType DeviceDeviceTypePropertyInfo = ()
    type AttrGetType DeviceDeviceTypePropertyInfo = NM.Enums.DeviceType
    type AttrLabel DeviceDeviceTypePropertyInfo = "device-type"
    type AttrOrigin DeviceDeviceTypePropertyInfo = Device
    attrGet = getDeviceDeviceType
    attrSet = undefined
    attrTransfer _ = undefined
    attrConstruct = undefined
    attrClear = undefined
    dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.NM.Objects.Device.deviceType"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Objects-Device.html#g:attr:deviceType"
        })
#endif

-- VVV Prop "dhcp4-config"
   -- Type: TInterface (Name {namespace = "NM", name = "DhcpConfig"})
   -- Flags: [PropertyReadable]
   -- Nullable: (Just False,Nothing)

-- | Get the value of the “@dhcp4-config@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.get' device #dhcp4Config
-- @
getDeviceDhcp4Config :: (MonadIO m, IsDevice o) => o -> m NM.DhcpConfig.DhcpConfig
getDeviceDhcp4Config :: forall (m :: * -> *) o.
(MonadIO m, IsDevice o) =>
o -> m DhcpConfig
getDeviceDhcp4Config o
obj = IO DhcpConfig -> m DhcpConfig
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO DhcpConfig -> m DhcpConfig) -> IO DhcpConfig -> m DhcpConfig
forall a b. (a -> b) -> a -> b
$ Text -> IO (Maybe DhcpConfig) -> IO DhcpConfig
forall a. HasCallStack => Text -> IO (Maybe a) -> IO a
checkUnexpectedNothing Text
"getDeviceDhcp4Config" (IO (Maybe DhcpConfig) -> IO DhcpConfig)
-> IO (Maybe DhcpConfig) -> IO DhcpConfig
forall a b. (a -> b) -> a -> b
$ o
-> String
-> (ManagedPtr DhcpConfig -> DhcpConfig)
-> IO (Maybe DhcpConfig)
forall a b.
(GObject a, GObject b) =>
a -> String -> (ManagedPtr b -> b) -> IO (Maybe b)
B.Properties.getObjectPropertyObject o
obj String
"dhcp4-config" ManagedPtr DhcpConfig -> DhcpConfig
NM.DhcpConfig.DhcpConfig

#if defined(ENABLE_OVERLOADING)
data DeviceDhcp4ConfigPropertyInfo
instance AttrInfo DeviceDhcp4ConfigPropertyInfo where
    type AttrAllowedOps DeviceDhcp4ConfigPropertyInfo = '[ 'AttrGet, 'AttrClear]
    type AttrBaseTypeConstraint DeviceDhcp4ConfigPropertyInfo = IsDevice
    type AttrSetTypeConstraint DeviceDhcp4ConfigPropertyInfo = (~) ()
    type AttrTransferTypeConstraint DeviceDhcp4ConfigPropertyInfo = (~) ()
    type AttrTransferType DeviceDhcp4ConfigPropertyInfo = ()
    type AttrGetType DeviceDhcp4ConfigPropertyInfo = NM.DhcpConfig.DhcpConfig
    type AttrLabel DeviceDhcp4ConfigPropertyInfo = "dhcp4-config"
    type AttrOrigin DeviceDhcp4ConfigPropertyInfo = Device
    attrGet = getDeviceDhcp4Config
    attrSet = undefined
    attrTransfer _ = undefined
    attrConstruct = undefined
    attrClear = undefined
    dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.NM.Objects.Device.dhcp4Config"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Objects-Device.html#g:attr:dhcp4Config"
        })
#endif

-- VVV Prop "dhcp6-config"
   -- Type: TInterface (Name {namespace = "NM", name = "DhcpConfig"})
   -- Flags: [PropertyReadable]
   -- Nullable: (Just False,Nothing)

-- | Get the value of the “@dhcp6-config@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.get' device #dhcp6Config
-- @
getDeviceDhcp6Config :: (MonadIO m, IsDevice o) => o -> m NM.DhcpConfig.DhcpConfig
getDeviceDhcp6Config :: forall (m :: * -> *) o.
(MonadIO m, IsDevice o) =>
o -> m DhcpConfig
getDeviceDhcp6Config o
obj = IO DhcpConfig -> m DhcpConfig
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO DhcpConfig -> m DhcpConfig) -> IO DhcpConfig -> m DhcpConfig
forall a b. (a -> b) -> a -> b
$ Text -> IO (Maybe DhcpConfig) -> IO DhcpConfig
forall a. HasCallStack => Text -> IO (Maybe a) -> IO a
checkUnexpectedNothing Text
"getDeviceDhcp6Config" (IO (Maybe DhcpConfig) -> IO DhcpConfig)
-> IO (Maybe DhcpConfig) -> IO DhcpConfig
forall a b. (a -> b) -> a -> b
$ o
-> String
-> (ManagedPtr DhcpConfig -> DhcpConfig)
-> IO (Maybe DhcpConfig)
forall a b.
(GObject a, GObject b) =>
a -> String -> (ManagedPtr b -> b) -> IO (Maybe b)
B.Properties.getObjectPropertyObject o
obj String
"dhcp6-config" ManagedPtr DhcpConfig -> DhcpConfig
NM.DhcpConfig.DhcpConfig

#if defined(ENABLE_OVERLOADING)
data DeviceDhcp6ConfigPropertyInfo
instance AttrInfo DeviceDhcp6ConfigPropertyInfo where
    type AttrAllowedOps DeviceDhcp6ConfigPropertyInfo = '[ 'AttrGet, 'AttrClear]
    type AttrBaseTypeConstraint DeviceDhcp6ConfigPropertyInfo = IsDevice
    type AttrSetTypeConstraint DeviceDhcp6ConfigPropertyInfo = (~) ()
    type AttrTransferTypeConstraint DeviceDhcp6ConfigPropertyInfo = (~) ()
    type AttrTransferType DeviceDhcp6ConfigPropertyInfo = ()
    type AttrGetType DeviceDhcp6ConfigPropertyInfo = NM.DhcpConfig.DhcpConfig
    type AttrLabel DeviceDhcp6ConfigPropertyInfo = "dhcp6-config"
    type AttrOrigin DeviceDhcp6ConfigPropertyInfo = Device
    attrGet = getDeviceDhcp6Config
    attrSet = undefined
    attrTransfer _ = undefined
    attrConstruct = undefined
    attrClear = undefined
    dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.NM.Objects.Device.dhcp6Config"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Objects-Device.html#g:attr:dhcp6Config"
        })
#endif

-- VVV Prop "driver"
   -- Type: TBasicType TUTF8
   -- Flags: [PropertyReadable]
   -- Nullable: (Just False,Nothing)

-- | Get the value of the “@driver@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.get' device #driver
-- @
getDeviceDriver :: (MonadIO m, IsDevice o) => o -> m T.Text
getDeviceDriver :: forall (m :: * -> *) o. (MonadIO m, IsDevice o) => o -> m Text
getDeviceDriver o
obj = IO Text -> m Text
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO Text -> m Text) -> IO Text -> m Text
forall a b. (a -> b) -> a -> b
$ Text -> IO (Maybe Text) -> IO Text
forall a. HasCallStack => Text -> IO (Maybe a) -> IO a
checkUnexpectedNothing Text
"getDeviceDriver" (IO (Maybe Text) -> IO Text) -> IO (Maybe Text) -> IO Text
forall a b. (a -> b) -> a -> b
$ o -> String -> IO (Maybe Text)
forall a. GObject a => a -> String -> IO (Maybe Text)
B.Properties.getObjectPropertyString o
obj String
"driver"

#if defined(ENABLE_OVERLOADING)
data DeviceDriverPropertyInfo
instance AttrInfo DeviceDriverPropertyInfo where
    type AttrAllowedOps DeviceDriverPropertyInfo = '[ 'AttrGet, 'AttrClear]
    type AttrBaseTypeConstraint DeviceDriverPropertyInfo = IsDevice
    type AttrSetTypeConstraint DeviceDriverPropertyInfo = (~) ()
    type AttrTransferTypeConstraint DeviceDriverPropertyInfo = (~) ()
    type AttrTransferType DeviceDriverPropertyInfo = ()
    type AttrGetType DeviceDriverPropertyInfo = T.Text
    type AttrLabel DeviceDriverPropertyInfo = "driver"
    type AttrOrigin DeviceDriverPropertyInfo = Device
    attrGet = getDeviceDriver
    attrSet = undefined
    attrTransfer _ = undefined
    attrConstruct = undefined
    attrClear = undefined
    dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.NM.Objects.Device.driver"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Objects-Device.html#g:attr:driver"
        })
#endif

-- VVV Prop "driver-version"
   -- Type: TBasicType TUTF8
   -- Flags: [PropertyReadable]
   -- Nullable: (Just False,Nothing)

-- | Get the value of the “@driver-version@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.get' device #driverVersion
-- @
getDeviceDriverVersion :: (MonadIO m, IsDevice o) => o -> m T.Text
getDeviceDriverVersion :: forall (m :: * -> *) o. (MonadIO m, IsDevice o) => o -> m Text
getDeviceDriverVersion o
obj = IO Text -> m Text
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO Text -> m Text) -> IO Text -> m Text
forall a b. (a -> b) -> a -> b
$ Text -> IO (Maybe Text) -> IO Text
forall a. HasCallStack => Text -> IO (Maybe a) -> IO a
checkUnexpectedNothing Text
"getDeviceDriverVersion" (IO (Maybe Text) -> IO Text) -> IO (Maybe Text) -> IO Text
forall a b. (a -> b) -> a -> b
$ o -> String -> IO (Maybe Text)
forall a. GObject a => a -> String -> IO (Maybe Text)
B.Properties.getObjectPropertyString o
obj String
"driver-version"

#if defined(ENABLE_OVERLOADING)
data DeviceDriverVersionPropertyInfo
instance AttrInfo DeviceDriverVersionPropertyInfo where
    type AttrAllowedOps DeviceDriverVersionPropertyInfo = '[ 'AttrGet, 'AttrClear]
    type AttrBaseTypeConstraint DeviceDriverVersionPropertyInfo = IsDevice
    type AttrSetTypeConstraint DeviceDriverVersionPropertyInfo = (~) ()
    type AttrTransferTypeConstraint DeviceDriverVersionPropertyInfo = (~) ()
    type AttrTransferType DeviceDriverVersionPropertyInfo = ()
    type AttrGetType DeviceDriverVersionPropertyInfo = T.Text
    type AttrLabel DeviceDriverVersionPropertyInfo = "driver-version"
    type AttrOrigin DeviceDriverVersionPropertyInfo = Device
    attrGet = getDeviceDriverVersion
    attrSet = undefined
    attrTransfer _ = undefined
    attrConstruct = undefined
    attrClear = undefined
    dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.NM.Objects.Device.driverVersion"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Objects-Device.html#g:attr:driverVersion"
        })
#endif

-- VVV Prop "firmware-missing"
   -- Type: TBasicType TBoolean
   -- Flags: [PropertyReadable]
   -- Nullable: (Just False,Nothing)

-- | Get the value of the “@firmware-missing@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.get' device #firmwareMissing
-- @
getDeviceFirmwareMissing :: (MonadIO m, IsDevice o) => o -> m Bool
getDeviceFirmwareMissing :: forall (m :: * -> *) o. (MonadIO m, IsDevice o) => o -> m Bool
getDeviceFirmwareMissing o
obj = IO Bool -> m Bool
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ o -> String -> IO Bool
forall a. GObject a => a -> String -> IO Bool
B.Properties.getObjectPropertyBool o
obj String
"firmware-missing"

#if defined(ENABLE_OVERLOADING)
data DeviceFirmwareMissingPropertyInfo
instance AttrInfo DeviceFirmwareMissingPropertyInfo where
    type AttrAllowedOps DeviceFirmwareMissingPropertyInfo = '[ 'AttrGet]
    type AttrBaseTypeConstraint DeviceFirmwareMissingPropertyInfo = IsDevice
    type AttrSetTypeConstraint DeviceFirmwareMissingPropertyInfo = (~) ()
    type AttrTransferTypeConstraint DeviceFirmwareMissingPropertyInfo = (~) ()
    type AttrTransferType DeviceFirmwareMissingPropertyInfo = ()
    type AttrGetType DeviceFirmwareMissingPropertyInfo = Bool
    type AttrLabel DeviceFirmwareMissingPropertyInfo = "firmware-missing"
    type AttrOrigin DeviceFirmwareMissingPropertyInfo = Device
    attrGet = getDeviceFirmwareMissing
    attrSet = undefined
    attrTransfer _ = undefined
    attrConstruct = undefined
    attrClear = undefined
    dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.NM.Objects.Device.firmwareMissing"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Objects-Device.html#g:attr:firmwareMissing"
        })
#endif

-- VVV Prop "firmware-version"
   -- Type: TBasicType TUTF8
   -- Flags: [PropertyReadable]
   -- Nullable: (Just False,Nothing)

-- | Get the value of the “@firmware-version@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.get' device #firmwareVersion
-- @
getDeviceFirmwareVersion :: (MonadIO m, IsDevice o) => o -> m T.Text
getDeviceFirmwareVersion :: forall (m :: * -> *) o. (MonadIO m, IsDevice o) => o -> m Text
getDeviceFirmwareVersion o
obj = IO Text -> m Text
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO Text -> m Text) -> IO Text -> m Text
forall a b. (a -> b) -> a -> b
$ Text -> IO (Maybe Text) -> IO Text
forall a. HasCallStack => Text -> IO (Maybe a) -> IO a
checkUnexpectedNothing Text
"getDeviceFirmwareVersion" (IO (Maybe Text) -> IO Text) -> IO (Maybe Text) -> IO Text
forall a b. (a -> b) -> a -> b
$ o -> String -> IO (Maybe Text)
forall a. GObject a => a -> String -> IO (Maybe Text)
B.Properties.getObjectPropertyString o
obj String
"firmware-version"

#if defined(ENABLE_OVERLOADING)
data DeviceFirmwareVersionPropertyInfo
instance AttrInfo DeviceFirmwareVersionPropertyInfo where
    type AttrAllowedOps DeviceFirmwareVersionPropertyInfo = '[ 'AttrGet, 'AttrClear]
    type AttrBaseTypeConstraint DeviceFirmwareVersionPropertyInfo = IsDevice
    type AttrSetTypeConstraint DeviceFirmwareVersionPropertyInfo = (~) ()
    type AttrTransferTypeConstraint DeviceFirmwareVersionPropertyInfo = (~) ()
    type AttrTransferType DeviceFirmwareVersionPropertyInfo = ()
    type AttrGetType DeviceFirmwareVersionPropertyInfo = T.Text
    type AttrLabel DeviceFirmwareVersionPropertyInfo = "firmware-version"
    type AttrOrigin DeviceFirmwareVersionPropertyInfo = Device
    attrGet = getDeviceFirmwareVersion
    attrSet = undefined
    attrTransfer _ = undefined
    attrConstruct = undefined
    attrClear = undefined
    dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.NM.Objects.Device.firmwareVersion"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Objects-Device.html#g:attr:firmwareVersion"
        })
#endif

-- VVV Prop "hw-address"
   -- Type: TBasicType TUTF8
   -- Flags: [PropertyReadable]
   -- Nullable: (Just False,Nothing)

-- | Get the value of the “@hw-address@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.get' device #hwAddress
-- @
getDeviceHwAddress :: (MonadIO m, IsDevice o) => o -> m T.Text
getDeviceHwAddress :: forall (m :: * -> *) o. (MonadIO m, IsDevice o) => o -> m Text
getDeviceHwAddress o
obj = IO Text -> m Text
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO Text -> m Text) -> IO Text -> m Text
forall a b. (a -> b) -> a -> b
$ Text -> IO (Maybe Text) -> IO Text
forall a. HasCallStack => Text -> IO (Maybe a) -> IO a
checkUnexpectedNothing Text
"getDeviceHwAddress" (IO (Maybe Text) -> IO Text) -> IO (Maybe Text) -> IO Text
forall a b. (a -> b) -> a -> b
$ o -> String -> IO (Maybe Text)
forall a. GObject a => a -> String -> IO (Maybe Text)
B.Properties.getObjectPropertyString o
obj String
"hw-address"

#if defined(ENABLE_OVERLOADING)
data DeviceHwAddressPropertyInfo
instance AttrInfo DeviceHwAddressPropertyInfo where
    type AttrAllowedOps DeviceHwAddressPropertyInfo = '[ 'AttrGet, 'AttrClear]
    type AttrBaseTypeConstraint DeviceHwAddressPropertyInfo = IsDevice
    type AttrSetTypeConstraint DeviceHwAddressPropertyInfo = (~) ()
    type AttrTransferTypeConstraint DeviceHwAddressPropertyInfo = (~) ()
    type AttrTransferType DeviceHwAddressPropertyInfo = ()
    type AttrGetType DeviceHwAddressPropertyInfo = T.Text
    type AttrLabel DeviceHwAddressPropertyInfo = "hw-address"
    type AttrOrigin DeviceHwAddressPropertyInfo = Device
    attrGet = getDeviceHwAddress
    attrSet = undefined
    attrTransfer _ = undefined
    attrConstruct = undefined
    attrClear = undefined
    dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.NM.Objects.Device.hwAddress"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Objects-Device.html#g:attr:hwAddress"
        })
#endif

-- VVV Prop "interface"
   -- Type: TBasicType TUTF8
   -- Flags: [PropertyReadable]
   -- Nullable: (Nothing,Nothing)

-- | Get the value of the “@interface@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.get' device #interface
-- @
getDeviceInterface :: (MonadIO m, IsDevice o) => o -> m (Maybe T.Text)
getDeviceInterface :: forall (m :: * -> *) o.
(MonadIO m, IsDevice o) =>
o -> m (Maybe Text)
getDeviceInterface o
obj = IO (Maybe Text) -> m (Maybe Text)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (Maybe Text) -> m (Maybe Text))
-> IO (Maybe Text) -> m (Maybe Text)
forall a b. (a -> b) -> a -> b
$ o -> String -> IO (Maybe Text)
forall a. GObject a => a -> String -> IO (Maybe Text)
B.Properties.getObjectPropertyString o
obj String
"interface"

#if defined(ENABLE_OVERLOADING)
data DeviceInterfacePropertyInfo
instance AttrInfo DeviceInterfacePropertyInfo where
    type AttrAllowedOps DeviceInterfacePropertyInfo = '[ 'AttrGet, 'AttrClear]
    type AttrBaseTypeConstraint DeviceInterfacePropertyInfo = IsDevice
    type AttrSetTypeConstraint DeviceInterfacePropertyInfo = (~) ()
    type AttrTransferTypeConstraint DeviceInterfacePropertyInfo = (~) ()
    type AttrTransferType DeviceInterfacePropertyInfo = ()
    type AttrGetType DeviceInterfacePropertyInfo = (Maybe T.Text)
    type AttrLabel DeviceInterfacePropertyInfo = "interface"
    type AttrOrigin DeviceInterfacePropertyInfo = Device
    attrGet = getDeviceInterface
    attrSet = undefined
    attrTransfer _ = undefined
    attrConstruct = undefined
    attrClear = undefined
    dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.NM.Objects.Device.interface"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Objects-Device.html#g:attr:interface"
        })
#endif

-- VVV Prop "interface-flags"
   -- Type: TBasicType TUInt
   -- Flags: [PropertyReadable]
   -- Nullable: (Nothing,Nothing)

-- | Get the value of the “@interface-flags@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.get' device #interfaceFlags
-- @
getDeviceInterfaceFlags :: (MonadIO m, IsDevice o) => o -> m Word32
getDeviceInterfaceFlags :: forall (m :: * -> *) o. (MonadIO m, IsDevice o) => o -> m Word32
getDeviceInterfaceFlags o
obj = IO Word32 -> m Word32
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO Word32 -> m Word32) -> IO Word32 -> m Word32
forall a b. (a -> b) -> a -> b
$ o -> String -> IO Word32
forall a. GObject a => a -> String -> IO Word32
B.Properties.getObjectPropertyUInt32 o
obj String
"interface-flags"

#if defined(ENABLE_OVERLOADING)
data DeviceInterfaceFlagsPropertyInfo
instance AttrInfo DeviceInterfaceFlagsPropertyInfo where
    type AttrAllowedOps DeviceInterfaceFlagsPropertyInfo = '[ 'AttrGet]
    type AttrBaseTypeConstraint DeviceInterfaceFlagsPropertyInfo = IsDevice
    type AttrSetTypeConstraint DeviceInterfaceFlagsPropertyInfo = (~) ()
    type AttrTransferTypeConstraint DeviceInterfaceFlagsPropertyInfo = (~) ()
    type AttrTransferType DeviceInterfaceFlagsPropertyInfo = ()
    type AttrGetType DeviceInterfaceFlagsPropertyInfo = Word32
    type AttrLabel DeviceInterfaceFlagsPropertyInfo = "interface-flags"
    type AttrOrigin DeviceInterfaceFlagsPropertyInfo = Device
    attrGet = getDeviceInterfaceFlags
    attrSet = undefined
    attrTransfer _ = undefined
    attrConstruct = undefined
    attrClear = undefined
    dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.NM.Objects.Device.interfaceFlags"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Objects-Device.html#g:attr:interfaceFlags"
        })
#endif

-- VVV Prop "ip-interface"
   -- Type: TBasicType TUTF8
   -- Flags: [PropertyReadable]
   -- Nullable: (Nothing,Nothing)

-- | Get the value of the “@ip-interface@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.get' device #ipInterface
-- @
getDeviceIpInterface :: (MonadIO m, IsDevice o) => o -> m (Maybe T.Text)
getDeviceIpInterface :: forall (m :: * -> *) o.
(MonadIO m, IsDevice o) =>
o -> m (Maybe Text)
getDeviceIpInterface o
obj = IO (Maybe Text) -> m (Maybe Text)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (Maybe Text) -> m (Maybe Text))
-> IO (Maybe Text) -> m (Maybe Text)
forall a b. (a -> b) -> a -> b
$ o -> String -> IO (Maybe Text)
forall a. GObject a => a -> String -> IO (Maybe Text)
B.Properties.getObjectPropertyString o
obj String
"ip-interface"

#if defined(ENABLE_OVERLOADING)
data DeviceIpInterfacePropertyInfo
instance AttrInfo DeviceIpInterfacePropertyInfo where
    type AttrAllowedOps DeviceIpInterfacePropertyInfo = '[ 'AttrGet, 'AttrClear]
    type AttrBaseTypeConstraint DeviceIpInterfacePropertyInfo = IsDevice
    type AttrSetTypeConstraint DeviceIpInterfacePropertyInfo = (~) ()
    type AttrTransferTypeConstraint DeviceIpInterfacePropertyInfo = (~) ()
    type AttrTransferType DeviceIpInterfacePropertyInfo = ()
    type AttrGetType DeviceIpInterfacePropertyInfo = (Maybe T.Text)
    type AttrLabel DeviceIpInterfacePropertyInfo = "ip-interface"
    type AttrOrigin DeviceIpInterfacePropertyInfo = Device
    attrGet = getDeviceIpInterface
    attrSet = undefined
    attrTransfer _ = undefined
    attrConstruct = undefined
    attrClear = undefined
    dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.NM.Objects.Device.ipInterface"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Objects-Device.html#g:attr:ipInterface"
        })
#endif

-- VVV Prop "ip4-config"
   -- Type: TInterface (Name {namespace = "NM", name = "IPConfig"})
   -- Flags: [PropertyReadable]
   -- Nullable: (Just False,Nothing)

-- | Get the value of the “@ip4-config@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.get' device #ip4Config
-- @
getDeviceIp4Config :: (MonadIO m, IsDevice o) => o -> m NM.IPConfig.IPConfig
getDeviceIp4Config :: forall (m :: * -> *) o. (MonadIO m, IsDevice o) => o -> m IPConfig
getDeviceIp4Config o
obj = IO IPConfig -> m IPConfig
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO IPConfig -> m IPConfig) -> IO IPConfig -> m IPConfig
forall a b. (a -> b) -> a -> b
$ Text -> IO (Maybe IPConfig) -> IO IPConfig
forall a. HasCallStack => Text -> IO (Maybe a) -> IO a
checkUnexpectedNothing Text
"getDeviceIp4Config" (IO (Maybe IPConfig) -> IO IPConfig)
-> IO (Maybe IPConfig) -> IO IPConfig
forall a b. (a -> b) -> a -> b
$ o
-> String
-> (ManagedPtr IPConfig -> IPConfig)
-> IO (Maybe IPConfig)
forall a b.
(GObject a, GObject b) =>
a -> String -> (ManagedPtr b -> b) -> IO (Maybe b)
B.Properties.getObjectPropertyObject o
obj String
"ip4-config" ManagedPtr IPConfig -> IPConfig
NM.IPConfig.IPConfig

#if defined(ENABLE_OVERLOADING)
data DeviceIp4ConfigPropertyInfo
instance AttrInfo DeviceIp4ConfigPropertyInfo where
    type AttrAllowedOps DeviceIp4ConfigPropertyInfo = '[ 'AttrGet, 'AttrClear]
    type AttrBaseTypeConstraint DeviceIp4ConfigPropertyInfo = IsDevice
    type AttrSetTypeConstraint DeviceIp4ConfigPropertyInfo = (~) ()
    type AttrTransferTypeConstraint DeviceIp4ConfigPropertyInfo = (~) ()
    type AttrTransferType DeviceIp4ConfigPropertyInfo = ()
    type AttrGetType DeviceIp4ConfigPropertyInfo = NM.IPConfig.IPConfig
    type AttrLabel DeviceIp4ConfigPropertyInfo = "ip4-config"
    type AttrOrigin DeviceIp4ConfigPropertyInfo = Device
    attrGet = getDeviceIp4Config
    attrSet = undefined
    attrTransfer _ = undefined
    attrConstruct = undefined
    attrClear = undefined
    dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.NM.Objects.Device.ip4Config"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Objects-Device.html#g:attr:ip4Config"
        })
#endif

-- VVV Prop "ip4-connectivity"
   -- Type: TInterface (Name {namespace = "NM", name = "ConnectivityState"})
   -- Flags: [PropertyReadable]
   -- Nullable: (Nothing,Nothing)

-- | Get the value of the “@ip4-connectivity@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.get' device #ip4Connectivity
-- @
getDeviceIp4Connectivity :: (MonadIO m, IsDevice o) => o -> m NM.Enums.ConnectivityState
getDeviceIp4Connectivity :: forall (m :: * -> *) o.
(MonadIO m, IsDevice o) =>
o -> m ConnectivityState
getDeviceIp4Connectivity o
obj = IO ConnectivityState -> m ConnectivityState
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO ConnectivityState -> m ConnectivityState)
-> IO ConnectivityState -> m ConnectivityState
forall a b. (a -> b) -> a -> b
$ o -> String -> IO ConnectivityState
forall a b. (GObject a, Enum b, BoxedEnum b) => a -> String -> IO b
B.Properties.getObjectPropertyEnum o
obj String
"ip4-connectivity"

#if defined(ENABLE_OVERLOADING)
data DeviceIp4ConnectivityPropertyInfo
instance AttrInfo DeviceIp4ConnectivityPropertyInfo where
    type AttrAllowedOps DeviceIp4ConnectivityPropertyInfo = '[ 'AttrGet]
    type AttrBaseTypeConstraint DeviceIp4ConnectivityPropertyInfo = IsDevice
    type AttrSetTypeConstraint DeviceIp4ConnectivityPropertyInfo = (~) ()
    type AttrTransferTypeConstraint DeviceIp4ConnectivityPropertyInfo = (~) ()
    type AttrTransferType DeviceIp4ConnectivityPropertyInfo = ()
    type AttrGetType DeviceIp4ConnectivityPropertyInfo = NM.Enums.ConnectivityState
    type AttrLabel DeviceIp4ConnectivityPropertyInfo = "ip4-connectivity"
    type AttrOrigin DeviceIp4ConnectivityPropertyInfo = Device
    attrGet = getDeviceIp4Connectivity
    attrSet = undefined
    attrTransfer _ = undefined
    attrConstruct = undefined
    attrClear = undefined
    dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.NM.Objects.Device.ip4Connectivity"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Objects-Device.html#g:attr:ip4Connectivity"
        })
#endif

-- VVV Prop "ip6-config"
   -- Type: TInterface (Name {namespace = "NM", name = "IPConfig"})
   -- Flags: [PropertyReadable]
   -- Nullable: (Just False,Nothing)

-- | Get the value of the “@ip6-config@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.get' device #ip6Config
-- @
getDeviceIp6Config :: (MonadIO m, IsDevice o) => o -> m NM.IPConfig.IPConfig
getDeviceIp6Config :: forall (m :: * -> *) o. (MonadIO m, IsDevice o) => o -> m IPConfig
getDeviceIp6Config o
obj = IO IPConfig -> m IPConfig
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO IPConfig -> m IPConfig) -> IO IPConfig -> m IPConfig
forall a b. (a -> b) -> a -> b
$ Text -> IO (Maybe IPConfig) -> IO IPConfig
forall a. HasCallStack => Text -> IO (Maybe a) -> IO a
checkUnexpectedNothing Text
"getDeviceIp6Config" (IO (Maybe IPConfig) -> IO IPConfig)
-> IO (Maybe IPConfig) -> IO IPConfig
forall a b. (a -> b) -> a -> b
$ o
-> String
-> (ManagedPtr IPConfig -> IPConfig)
-> IO (Maybe IPConfig)
forall a b.
(GObject a, GObject b) =>
a -> String -> (ManagedPtr b -> b) -> IO (Maybe b)
B.Properties.getObjectPropertyObject o
obj String
"ip6-config" ManagedPtr IPConfig -> IPConfig
NM.IPConfig.IPConfig

#if defined(ENABLE_OVERLOADING)
data DeviceIp6ConfigPropertyInfo
instance AttrInfo DeviceIp6ConfigPropertyInfo where
    type AttrAllowedOps DeviceIp6ConfigPropertyInfo = '[ 'AttrGet, 'AttrClear]
    type AttrBaseTypeConstraint DeviceIp6ConfigPropertyInfo = IsDevice
    type AttrSetTypeConstraint DeviceIp6ConfigPropertyInfo = (~) ()
    type AttrTransferTypeConstraint DeviceIp6ConfigPropertyInfo = (~) ()
    type AttrTransferType DeviceIp6ConfigPropertyInfo = ()
    type AttrGetType DeviceIp6ConfigPropertyInfo = NM.IPConfig.IPConfig
    type AttrLabel DeviceIp6ConfigPropertyInfo = "ip6-config"
    type AttrOrigin DeviceIp6ConfigPropertyInfo = Device
    attrGet = getDeviceIp6Config
    attrSet = undefined
    attrTransfer _ = undefined
    attrConstruct = undefined
    attrClear = undefined
    dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.NM.Objects.Device.ip6Config"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Objects-Device.html#g:attr:ip6Config"
        })
#endif

-- VVV Prop "ip6-connectivity"
   -- Type: TInterface (Name {namespace = "NM", name = "ConnectivityState"})
   -- Flags: [PropertyReadable]
   -- Nullable: (Nothing,Nothing)

-- | Get the value of the “@ip6-connectivity@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.get' device #ip6Connectivity
-- @
getDeviceIp6Connectivity :: (MonadIO m, IsDevice o) => o -> m NM.Enums.ConnectivityState
getDeviceIp6Connectivity :: forall (m :: * -> *) o.
(MonadIO m, IsDevice o) =>
o -> m ConnectivityState
getDeviceIp6Connectivity o
obj = IO ConnectivityState -> m ConnectivityState
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO ConnectivityState -> m ConnectivityState)
-> IO ConnectivityState -> m ConnectivityState
forall a b. (a -> b) -> a -> b
$ o -> String -> IO ConnectivityState
forall a b. (GObject a, Enum b, BoxedEnum b) => a -> String -> IO b
B.Properties.getObjectPropertyEnum o
obj String
"ip6-connectivity"

#if defined(ENABLE_OVERLOADING)
data DeviceIp6ConnectivityPropertyInfo
instance AttrInfo DeviceIp6ConnectivityPropertyInfo where
    type AttrAllowedOps DeviceIp6ConnectivityPropertyInfo = '[ 'AttrGet]
    type AttrBaseTypeConstraint DeviceIp6ConnectivityPropertyInfo = IsDevice
    type AttrSetTypeConstraint DeviceIp6ConnectivityPropertyInfo = (~) ()
    type AttrTransferTypeConstraint DeviceIp6ConnectivityPropertyInfo = (~) ()
    type AttrTransferType DeviceIp6ConnectivityPropertyInfo = ()
    type AttrGetType DeviceIp6ConnectivityPropertyInfo = NM.Enums.ConnectivityState
    type AttrLabel DeviceIp6ConnectivityPropertyInfo = "ip6-connectivity"
    type AttrOrigin DeviceIp6ConnectivityPropertyInfo = Device
    attrGet = getDeviceIp6Connectivity
    attrSet = undefined
    attrTransfer _ = undefined
    attrConstruct = undefined
    attrClear = undefined
    dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.NM.Objects.Device.ip6Connectivity"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Objects-Device.html#g:attr:ip6Connectivity"
        })
#endif

-- XXX Generation of property "lldp-neighbors" of object "Device" failed.
-- Not implemented: Don't know how to handle properties of type TPtrArray (TBasicType TPtr)
#if defined(ENABLE_OVERLOADING)
-- XXX Placeholder
data DeviceLldpNeighborsPropertyInfo
instance AttrInfo DeviceLldpNeighborsPropertyInfo where
    type AttrAllowedOps DeviceLldpNeighborsPropertyInfo = '[]
    type AttrSetTypeConstraint DeviceLldpNeighborsPropertyInfo = (~) ()
    type AttrTransferTypeConstraint DeviceLldpNeighborsPropertyInfo = (~) ()
    type AttrTransferType DeviceLldpNeighborsPropertyInfo = ()
    type AttrBaseTypeConstraint DeviceLldpNeighborsPropertyInfo = (~) ()
    type AttrGetType DeviceLldpNeighborsPropertyInfo = ()
    type AttrLabel DeviceLldpNeighborsPropertyInfo = ""
    type AttrOrigin DeviceLldpNeighborsPropertyInfo = Device
    attrGet = undefined
    attrSet = undefined
    attrConstruct = undefined
    attrClear = undefined
    attrTransfer = undefined
#endif

-- VVV Prop "managed"
   -- Type: TBasicType TBoolean
   -- Flags: [PropertyReadable]
   -- Nullable: (Just False,Just False)

-- | Get the value of the “@managed@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.get' device #managed
-- @
getDeviceManaged :: (MonadIO m, IsDevice o) => o -> m Bool
getDeviceManaged :: forall (m :: * -> *) o. (MonadIO m, IsDevice o) => o -> m Bool
getDeviceManaged o
obj = IO Bool -> m Bool
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ o -> String -> IO Bool
forall a. GObject a => a -> String -> IO Bool
B.Properties.getObjectPropertyBool o
obj String
"managed"

#if defined(ENABLE_OVERLOADING)
data DeviceManagedPropertyInfo
instance AttrInfo DeviceManagedPropertyInfo where
    type AttrAllowedOps DeviceManagedPropertyInfo = '[ 'AttrGet]
    type AttrBaseTypeConstraint DeviceManagedPropertyInfo = IsDevice
    type AttrSetTypeConstraint DeviceManagedPropertyInfo = (~) ()
    type AttrTransferTypeConstraint DeviceManagedPropertyInfo = (~) ()
    type AttrTransferType DeviceManagedPropertyInfo = ()
    type AttrGetType DeviceManagedPropertyInfo = Bool
    type AttrLabel DeviceManagedPropertyInfo = "managed"
    type AttrOrigin DeviceManagedPropertyInfo = Device
    attrGet = getDeviceManaged
    attrSet = undefined
    attrTransfer _ = undefined
    attrConstruct = undefined
    attrClear = undefined
    dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.NM.Objects.Device.managed"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Objects-Device.html#g:attr:managed"
        })
#endif

-- VVV Prop "metered"
   -- Type: TBasicType TUInt
   -- Flags: [PropertyReadable]
   -- Nullable: (Nothing,Nothing)

-- | Get the value of the “@metered@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.get' device #metered
-- @
getDeviceMetered :: (MonadIO m, IsDevice o) => o -> m Word32
getDeviceMetered :: forall (m :: * -> *) o. (MonadIO m, IsDevice o) => o -> m Word32
getDeviceMetered o
obj = IO Word32 -> m Word32
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO Word32 -> m Word32) -> IO Word32 -> m Word32
forall a b. (a -> b) -> a -> b
$ o -> String -> IO Word32
forall a. GObject a => a -> String -> IO Word32
B.Properties.getObjectPropertyUInt32 o
obj String
"metered"

#if defined(ENABLE_OVERLOADING)
data DeviceMeteredPropertyInfo
instance AttrInfo DeviceMeteredPropertyInfo where
    type AttrAllowedOps DeviceMeteredPropertyInfo = '[ 'AttrGet]
    type AttrBaseTypeConstraint DeviceMeteredPropertyInfo = IsDevice
    type AttrSetTypeConstraint DeviceMeteredPropertyInfo = (~) ()
    type AttrTransferTypeConstraint DeviceMeteredPropertyInfo = (~) ()
    type AttrTransferType DeviceMeteredPropertyInfo = ()
    type AttrGetType DeviceMeteredPropertyInfo = Word32
    type AttrLabel DeviceMeteredPropertyInfo = "metered"
    type AttrOrigin DeviceMeteredPropertyInfo = Device
    attrGet = getDeviceMetered
    attrSet = undefined
    attrTransfer _ = undefined
    attrConstruct = undefined
    attrClear = undefined
    dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.NM.Objects.Device.metered"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Objects-Device.html#g:attr:metered"
        })
#endif

-- VVV Prop "mtu"
   -- Type: TBasicType TUInt
   -- Flags: [PropertyReadable]
   -- Nullable: (Nothing,Nothing)

-- | Get the value of the “@mtu@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.get' device #mtu
-- @
getDeviceMtu :: (MonadIO m, IsDevice o) => o -> m Word32
getDeviceMtu :: forall (m :: * -> *) o. (MonadIO m, IsDevice o) => o -> m Word32
getDeviceMtu o
obj = IO Word32 -> m Word32
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO Word32 -> m Word32) -> IO Word32 -> m Word32
forall a b. (a -> b) -> a -> b
$ o -> String -> IO Word32
forall a. GObject a => a -> String -> IO Word32
B.Properties.getObjectPropertyUInt32 o
obj String
"mtu"

#if defined(ENABLE_OVERLOADING)
data DeviceMtuPropertyInfo
instance AttrInfo DeviceMtuPropertyInfo where
    type AttrAllowedOps DeviceMtuPropertyInfo = '[ 'AttrGet]
    type AttrBaseTypeConstraint DeviceMtuPropertyInfo = IsDevice
    type AttrSetTypeConstraint DeviceMtuPropertyInfo = (~) ()
    type AttrTransferTypeConstraint DeviceMtuPropertyInfo = (~) ()
    type AttrTransferType DeviceMtuPropertyInfo = ()
    type AttrGetType DeviceMtuPropertyInfo = Word32
    type AttrLabel DeviceMtuPropertyInfo = "mtu"
    type AttrOrigin DeviceMtuPropertyInfo = Device
    attrGet = getDeviceMtu
    attrSet = undefined
    attrTransfer _ = undefined
    attrConstruct = undefined
    attrClear = undefined
    dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.NM.Objects.Device.mtu"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Objects-Device.html#g:attr:mtu"
        })
#endif

-- VVV Prop "nm-plugin-missing"
   -- Type: TBasicType TBoolean
   -- Flags: [PropertyReadable]
   -- Nullable: (Just False,Nothing)

-- | Get the value of the “@nm-plugin-missing@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.get' device #nmPluginMissing
-- @
getDeviceNmPluginMissing :: (MonadIO m, IsDevice o) => o -> m Bool
getDeviceNmPluginMissing :: forall (m :: * -> *) o. (MonadIO m, IsDevice o) => o -> m Bool
getDeviceNmPluginMissing o
obj = IO Bool -> m Bool
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ o -> String -> IO Bool
forall a. GObject a => a -> String -> IO Bool
B.Properties.getObjectPropertyBool o
obj String
"nm-plugin-missing"

#if defined(ENABLE_OVERLOADING)
data DeviceNmPluginMissingPropertyInfo
instance AttrInfo DeviceNmPluginMissingPropertyInfo where
    type AttrAllowedOps DeviceNmPluginMissingPropertyInfo = '[ 'AttrGet]
    type AttrBaseTypeConstraint DeviceNmPluginMissingPropertyInfo = IsDevice
    type AttrSetTypeConstraint DeviceNmPluginMissingPropertyInfo = (~) ()
    type AttrTransferTypeConstraint DeviceNmPluginMissingPropertyInfo = (~) ()
    type AttrTransferType DeviceNmPluginMissingPropertyInfo = ()
    type AttrGetType DeviceNmPluginMissingPropertyInfo = Bool
    type AttrLabel DeviceNmPluginMissingPropertyInfo = "nm-plugin-missing"
    type AttrOrigin DeviceNmPluginMissingPropertyInfo = Device
    attrGet = getDeviceNmPluginMissing
    attrSet = undefined
    attrTransfer _ = undefined
    attrConstruct = undefined
    attrClear = undefined
    dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.NM.Objects.Device.nmPluginMissing"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Objects-Device.html#g:attr:nmPluginMissing"
        })
#endif

-- VVV Prop "path"
   -- Type: TBasicType TUTF8
   -- Flags: [PropertyReadable]
   -- Nullable: (Just False,Nothing)

-- | Get the value of the “@path@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.get' device #path
-- @
getDevicePath :: (MonadIO m, IsDevice o) => o -> m T.Text
getDevicePath :: forall (m :: * -> *) o. (MonadIO m, IsDevice o) => o -> m Text
getDevicePath o
obj = IO Text -> m Text
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO Text -> m Text) -> IO Text -> m Text
forall a b. (a -> b) -> a -> b
$ Text -> IO (Maybe Text) -> IO Text
forall a. HasCallStack => Text -> IO (Maybe a) -> IO a
checkUnexpectedNothing Text
"getDevicePath" (IO (Maybe Text) -> IO Text) -> IO (Maybe Text) -> IO Text
forall a b. (a -> b) -> a -> b
$ o -> String -> IO (Maybe Text)
forall a. GObject a => a -> String -> IO (Maybe Text)
B.Properties.getObjectPropertyString o
obj String
"path"

#if defined(ENABLE_OVERLOADING)
data DevicePathPropertyInfo
instance AttrInfo DevicePathPropertyInfo where
    type AttrAllowedOps DevicePathPropertyInfo = '[ 'AttrGet, 'AttrClear]
    type AttrBaseTypeConstraint DevicePathPropertyInfo = IsDevice
    type AttrSetTypeConstraint DevicePathPropertyInfo = (~) ()
    type AttrTransferTypeConstraint DevicePathPropertyInfo = (~) ()
    type AttrTransferType DevicePathPropertyInfo = ()
    type AttrGetType DevicePathPropertyInfo = T.Text
    type AttrLabel DevicePathPropertyInfo = "path"
    type AttrOrigin DevicePathPropertyInfo = Device
    attrGet = getDevicePath
    attrSet = undefined
    attrTransfer _ = undefined
    attrConstruct = undefined
    attrClear = undefined
    dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.NM.Objects.Device.path"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Objects-Device.html#g:attr:path"
        })
#endif

-- VVV Prop "physical-port-id"
   -- Type: TBasicType TUTF8
   -- Flags: [PropertyReadable]
   -- Nullable: (Just False,Nothing)

-- | Get the value of the “@physical-port-id@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.get' device #physicalPortId
-- @
getDevicePhysicalPortId :: (MonadIO m, IsDevice o) => o -> m T.Text
getDevicePhysicalPortId :: forall (m :: * -> *) o. (MonadIO m, IsDevice o) => o -> m Text
getDevicePhysicalPortId o
obj = IO Text -> m Text
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO Text -> m Text) -> IO Text -> m Text
forall a b. (a -> b) -> a -> b
$ Text -> IO (Maybe Text) -> IO Text
forall a. HasCallStack => Text -> IO (Maybe a) -> IO a
checkUnexpectedNothing Text
"getDevicePhysicalPortId" (IO (Maybe Text) -> IO Text) -> IO (Maybe Text) -> IO Text
forall a b. (a -> b) -> a -> b
$ o -> String -> IO (Maybe Text)
forall a. GObject a => a -> String -> IO (Maybe Text)
B.Properties.getObjectPropertyString o
obj String
"physical-port-id"

#if defined(ENABLE_OVERLOADING)
data DevicePhysicalPortIdPropertyInfo
instance AttrInfo DevicePhysicalPortIdPropertyInfo where
    type AttrAllowedOps DevicePhysicalPortIdPropertyInfo = '[ 'AttrGet, 'AttrClear]
    type AttrBaseTypeConstraint DevicePhysicalPortIdPropertyInfo = IsDevice
    type AttrSetTypeConstraint DevicePhysicalPortIdPropertyInfo = (~) ()
    type AttrTransferTypeConstraint DevicePhysicalPortIdPropertyInfo = (~) ()
    type AttrTransferType DevicePhysicalPortIdPropertyInfo = ()
    type AttrGetType DevicePhysicalPortIdPropertyInfo = T.Text
    type AttrLabel DevicePhysicalPortIdPropertyInfo = "physical-port-id"
    type AttrOrigin DevicePhysicalPortIdPropertyInfo = Device
    attrGet = getDevicePhysicalPortId
    attrSet = undefined
    attrTransfer _ = undefined
    attrConstruct = undefined
    attrClear = undefined
    dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.NM.Objects.Device.physicalPortId"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Objects-Device.html#g:attr:physicalPortId"
        })
#endif

-- XXX Generation of property "ports" of object "Device" failed.
-- Not implemented: Don't know how to handle properties of type TPtrArray (TBasicType TPtr)
#if defined(ENABLE_OVERLOADING)
-- XXX Placeholder
data DevicePortsPropertyInfo
instance AttrInfo DevicePortsPropertyInfo where
    type AttrAllowedOps DevicePortsPropertyInfo = '[]
    type AttrSetTypeConstraint DevicePortsPropertyInfo = (~) ()
    type AttrTransferTypeConstraint DevicePortsPropertyInfo = (~) ()
    type AttrTransferType DevicePortsPropertyInfo = ()
    type AttrBaseTypeConstraint DevicePortsPropertyInfo = (~) ()
    type AttrGetType DevicePortsPropertyInfo = ()
    type AttrLabel DevicePortsPropertyInfo = ""
    type AttrOrigin DevicePortsPropertyInfo = Device
    attrGet = undefined
    attrSet = undefined
    attrConstruct = undefined
    attrClear = undefined
    attrTransfer = undefined
#endif

-- VVV Prop "product"
   -- Type: TBasicType TUTF8
   -- Flags: [PropertyReadable]
   -- Nullable: (Just False,Nothing)

-- | Get the value of the “@product@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.get' device #product
-- @
getDeviceProduct :: (MonadIO m, IsDevice o) => o -> m T.Text
getDeviceProduct :: forall (m :: * -> *) o. (MonadIO m, IsDevice o) => o -> m Text
getDeviceProduct o
obj = IO Text -> m Text
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO Text -> m Text) -> IO Text -> m Text
forall a b. (a -> b) -> a -> b
$ Text -> IO (Maybe Text) -> IO Text
forall a. HasCallStack => Text -> IO (Maybe a) -> IO a
checkUnexpectedNothing Text
"getDeviceProduct" (IO (Maybe Text) -> IO Text) -> IO (Maybe Text) -> IO Text
forall a b. (a -> b) -> a -> b
$ o -> String -> IO (Maybe Text)
forall a. GObject a => a -> String -> IO (Maybe Text)
B.Properties.getObjectPropertyString o
obj String
"product"

#if defined(ENABLE_OVERLOADING)
data DeviceProductPropertyInfo
instance AttrInfo DeviceProductPropertyInfo where
    type AttrAllowedOps DeviceProductPropertyInfo = '[ 'AttrGet, 'AttrClear]
    type AttrBaseTypeConstraint DeviceProductPropertyInfo = IsDevice
    type AttrSetTypeConstraint DeviceProductPropertyInfo = (~) ()
    type AttrTransferTypeConstraint DeviceProductPropertyInfo = (~) ()
    type AttrTransferType DeviceProductPropertyInfo = ()
    type AttrGetType DeviceProductPropertyInfo = T.Text
    type AttrLabel DeviceProductPropertyInfo = "product"
    type AttrOrigin DeviceProductPropertyInfo = Device
    attrGet = getDeviceProduct
    attrSet = undefined
    attrTransfer _ = undefined
    attrConstruct = undefined
    attrClear = undefined
    dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.NM.Objects.Device.product"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Objects-Device.html#g:attr:product"
        })
#endif

-- VVV Prop "real"
   -- Type: TBasicType TBoolean
   -- Flags: [PropertyReadable]
   -- Nullable: (Just False,Nothing)

-- | Get the value of the “@real@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.get' device #real
-- @
getDeviceReal :: (MonadIO m, IsDevice o) => o -> m Bool
getDeviceReal :: forall (m :: * -> *) o. (MonadIO m, IsDevice o) => o -> m Bool
getDeviceReal o
obj = IO Bool -> m Bool
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ o -> String -> IO Bool
forall a. GObject a => a -> String -> IO Bool
B.Properties.getObjectPropertyBool o
obj String
"real"

#if defined(ENABLE_OVERLOADING)
data DeviceRealPropertyInfo
instance AttrInfo DeviceRealPropertyInfo where
    type AttrAllowedOps DeviceRealPropertyInfo = '[ 'AttrGet]
    type AttrBaseTypeConstraint DeviceRealPropertyInfo = IsDevice
    type AttrSetTypeConstraint DeviceRealPropertyInfo = (~) ()
    type AttrTransferTypeConstraint DeviceRealPropertyInfo = (~) ()
    type AttrTransferType DeviceRealPropertyInfo = ()
    type AttrGetType DeviceRealPropertyInfo = Bool
    type AttrLabel DeviceRealPropertyInfo = "real"
    type AttrOrigin DeviceRealPropertyInfo = Device
    attrGet = getDeviceReal
    attrSet = undefined
    attrTransfer _ = undefined
    attrConstruct = undefined
    attrClear = undefined
    dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.NM.Objects.Device.real"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Objects-Device.html#g:attr:real"
        })
#endif

-- VVV Prop "state"
   -- Type: TInterface (Name {namespace = "NM", name = "DeviceState"})
   -- Flags: [PropertyReadable]
   -- Nullable: (Just False,Nothing)

-- | Get the value of the “@state@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.get' device #state
-- @
getDeviceState :: (MonadIO m, IsDevice o) => o -> m NM.Enums.DeviceState
getDeviceState :: forall (m :: * -> *) o.
(MonadIO m, IsDevice o) =>
o -> m DeviceState
getDeviceState o
obj = IO DeviceState -> m DeviceState
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO DeviceState -> m DeviceState)
-> IO DeviceState -> m DeviceState
forall a b. (a -> b) -> a -> b
$ o -> String -> IO DeviceState
forall a b. (GObject a, Enum b, BoxedEnum b) => a -> String -> IO b
B.Properties.getObjectPropertyEnum o
obj String
"state"

#if defined(ENABLE_OVERLOADING)
data DeviceStatePropertyInfo
instance AttrInfo DeviceStatePropertyInfo where
    type AttrAllowedOps DeviceStatePropertyInfo = '[ 'AttrGet]
    type AttrBaseTypeConstraint DeviceStatePropertyInfo = IsDevice
    type AttrSetTypeConstraint DeviceStatePropertyInfo = (~) ()
    type AttrTransferTypeConstraint DeviceStatePropertyInfo = (~) ()
    type AttrTransferType DeviceStatePropertyInfo = ()
    type AttrGetType DeviceStatePropertyInfo = NM.Enums.DeviceState
    type AttrLabel DeviceStatePropertyInfo = "state"
    type AttrOrigin DeviceStatePropertyInfo = Device
    attrGet = getDeviceState
    attrSet = undefined
    attrTransfer _ = undefined
    attrConstruct = undefined
    attrClear = undefined
    dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.NM.Objects.Device.state"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Objects-Device.html#g:attr:state"
        })
#endif

-- VVV Prop "state-reason"
   -- Type: TBasicType TUInt
   -- Flags: [PropertyReadable]
   -- Nullable: (Nothing,Nothing)

-- | Get the value of the “@state-reason@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.get' device #stateReason
-- @
getDeviceStateReason :: (MonadIO m, IsDevice o) => o -> m Word32
getDeviceStateReason :: forall (m :: * -> *) o. (MonadIO m, IsDevice o) => o -> m Word32
getDeviceStateReason o
obj = IO Word32 -> m Word32
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO Word32 -> m Word32) -> IO Word32 -> m Word32
forall a b. (a -> b) -> a -> b
$ o -> String -> IO Word32
forall a. GObject a => a -> String -> IO Word32
B.Properties.getObjectPropertyUInt32 o
obj String
"state-reason"

#if defined(ENABLE_OVERLOADING)
data DeviceStateReasonPropertyInfo
instance AttrInfo DeviceStateReasonPropertyInfo where
    type AttrAllowedOps DeviceStateReasonPropertyInfo = '[ 'AttrGet]
    type AttrBaseTypeConstraint DeviceStateReasonPropertyInfo = IsDevice
    type AttrSetTypeConstraint DeviceStateReasonPropertyInfo = (~) ()
    type AttrTransferTypeConstraint DeviceStateReasonPropertyInfo = (~) ()
    type AttrTransferType DeviceStateReasonPropertyInfo = ()
    type AttrGetType DeviceStateReasonPropertyInfo = Word32
    type AttrLabel DeviceStateReasonPropertyInfo = "state-reason"
    type AttrOrigin DeviceStateReasonPropertyInfo = Device
    attrGet = getDeviceStateReason
    attrSet = undefined
    attrTransfer _ = undefined
    attrConstruct = undefined
    attrClear = undefined
    dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.NM.Objects.Device.stateReason"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Objects-Device.html#g:attr:stateReason"
        })
#endif

-- VVV Prop "udi"
   -- Type: TBasicType TUTF8
   -- Flags: [PropertyReadable]
   -- Nullable: (Just False,Nothing)

-- | Get the value of the “@udi@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.get' device #udi
-- @
getDeviceUdi :: (MonadIO m, IsDevice o) => o -> m T.Text
getDeviceUdi :: forall (m :: * -> *) o. (MonadIO m, IsDevice o) => o -> m Text
getDeviceUdi o
obj = IO Text -> m Text
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO Text -> m Text) -> IO Text -> m Text
forall a b. (a -> b) -> a -> b
$ Text -> IO (Maybe Text) -> IO Text
forall a. HasCallStack => Text -> IO (Maybe a) -> IO a
checkUnexpectedNothing Text
"getDeviceUdi" (IO (Maybe Text) -> IO Text) -> IO (Maybe Text) -> IO Text
forall a b. (a -> b) -> a -> b
$ o -> String -> IO (Maybe Text)
forall a. GObject a => a -> String -> IO (Maybe Text)
B.Properties.getObjectPropertyString o
obj String
"udi"

#if defined(ENABLE_OVERLOADING)
data DeviceUdiPropertyInfo
instance AttrInfo DeviceUdiPropertyInfo where
    type AttrAllowedOps DeviceUdiPropertyInfo = '[ 'AttrGet, 'AttrClear]
    type AttrBaseTypeConstraint DeviceUdiPropertyInfo = IsDevice
    type AttrSetTypeConstraint DeviceUdiPropertyInfo = (~) ()
    type AttrTransferTypeConstraint DeviceUdiPropertyInfo = (~) ()
    type AttrTransferType DeviceUdiPropertyInfo = ()
    type AttrGetType DeviceUdiPropertyInfo = T.Text
    type AttrLabel DeviceUdiPropertyInfo = "udi"
    type AttrOrigin DeviceUdiPropertyInfo = Device
    attrGet = getDeviceUdi
    attrSet = undefined
    attrTransfer _ = undefined
    attrConstruct = undefined
    attrClear = undefined
    dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.NM.Objects.Device.udi"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Objects-Device.html#g:attr:udi"
        })
#endif

-- VVV Prop "vendor"
   -- Type: TBasicType TUTF8
   -- Flags: [PropertyReadable]
   -- Nullable: (Just False,Nothing)

-- | Get the value of the “@vendor@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.get' device #vendor
-- @
getDeviceVendor :: (MonadIO m, IsDevice o) => o -> m T.Text
getDeviceVendor :: forall (m :: * -> *) o. (MonadIO m, IsDevice o) => o -> m Text
getDeviceVendor o
obj = IO Text -> m Text
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO Text -> m Text) -> IO Text -> m Text
forall a b. (a -> b) -> a -> b
$ Text -> IO (Maybe Text) -> IO Text
forall a. HasCallStack => Text -> IO (Maybe a) -> IO a
checkUnexpectedNothing Text
"getDeviceVendor" (IO (Maybe Text) -> IO Text) -> IO (Maybe Text) -> IO Text
forall a b. (a -> b) -> a -> b
$ o -> String -> IO (Maybe Text)
forall a. GObject a => a -> String -> IO (Maybe Text)
B.Properties.getObjectPropertyString o
obj String
"vendor"

#if defined(ENABLE_OVERLOADING)
data DeviceVendorPropertyInfo
instance AttrInfo DeviceVendorPropertyInfo where
    type AttrAllowedOps DeviceVendorPropertyInfo = '[ 'AttrGet, 'AttrClear]
    type AttrBaseTypeConstraint DeviceVendorPropertyInfo = IsDevice
    type AttrSetTypeConstraint DeviceVendorPropertyInfo = (~) ()
    type AttrTransferTypeConstraint DeviceVendorPropertyInfo = (~) ()
    type AttrTransferType DeviceVendorPropertyInfo = ()
    type AttrGetType DeviceVendorPropertyInfo = T.Text
    type AttrLabel DeviceVendorPropertyInfo = "vendor"
    type AttrOrigin DeviceVendorPropertyInfo = Device
    attrGet = getDeviceVendor
    attrSet = undefined
    attrTransfer _ = undefined
    attrConstruct = undefined
    attrClear = undefined
    dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.NM.Objects.Device.vendor"
        , O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Objects-Device.html#g:attr:vendor"
        })
#endif

#if defined(ENABLE_OVERLOADING)
instance O.HasAttributeList Device
type instance O.AttributeList Device = DeviceAttributeList
type DeviceAttributeList = ('[ '("activeConnection", DeviceActiveConnectionPropertyInfo), '("autoconnect", DeviceAutoconnectPropertyInfo), '("availableConnections", DeviceAvailableConnectionsPropertyInfo), '("capabilities", DeviceCapabilitiesPropertyInfo), '("client", NM.Object.ObjectClientPropertyInfo), '("deviceType", DeviceDeviceTypePropertyInfo), '("dhcp4Config", DeviceDhcp4ConfigPropertyInfo), '("dhcp6Config", DeviceDhcp6ConfigPropertyInfo), '("driver", DeviceDriverPropertyInfo), '("driverVersion", DeviceDriverVersionPropertyInfo), '("firmwareMissing", DeviceFirmwareMissingPropertyInfo), '("firmwareVersion", DeviceFirmwareVersionPropertyInfo), '("hwAddress", DeviceHwAddressPropertyInfo), '("interface", DeviceInterfacePropertyInfo), '("interfaceFlags", DeviceInterfaceFlagsPropertyInfo), '("ipInterface", DeviceIpInterfacePropertyInfo), '("ip4Config", DeviceIp4ConfigPropertyInfo), '("ip4Connectivity", DeviceIp4ConnectivityPropertyInfo), '("ip6Config", DeviceIp6ConfigPropertyInfo), '("ip6Connectivity", DeviceIp6ConnectivityPropertyInfo), '("lldpNeighbors", DeviceLldpNeighborsPropertyInfo), '("managed", DeviceManagedPropertyInfo), '("metered", DeviceMeteredPropertyInfo), '("mtu", DeviceMtuPropertyInfo), '("nmPluginMissing", DeviceNmPluginMissingPropertyInfo), '("path", DevicePathPropertyInfo), '("physicalPortId", DevicePhysicalPortIdPropertyInfo), '("ports", DevicePortsPropertyInfo), '("product", DeviceProductPropertyInfo), '("real", DeviceRealPropertyInfo), '("state", DeviceStatePropertyInfo), '("stateReason", DeviceStateReasonPropertyInfo), '("udi", DeviceUdiPropertyInfo), '("vendor", DeviceVendorPropertyInfo)] :: [(Symbol, DK.Type)])
#endif

#if defined(ENABLE_OVERLOADING)
deviceActiveConnection :: AttrLabelProxy "activeConnection"
deviceActiveConnection = AttrLabelProxy

deviceAutoconnect :: AttrLabelProxy "autoconnect"
deviceAutoconnect = AttrLabelProxy

deviceAvailableConnections :: AttrLabelProxy "availableConnections"
deviceAvailableConnections = AttrLabelProxy

deviceCapabilities :: AttrLabelProxy "capabilities"
deviceCapabilities = AttrLabelProxy

deviceDeviceType :: AttrLabelProxy "deviceType"
deviceDeviceType = AttrLabelProxy

deviceDhcp4Config :: AttrLabelProxy "dhcp4Config"
deviceDhcp4Config = AttrLabelProxy

deviceDhcp6Config :: AttrLabelProxy "dhcp6Config"
deviceDhcp6Config = AttrLabelProxy

deviceDriver :: AttrLabelProxy "driver"
deviceDriver = AttrLabelProxy

deviceDriverVersion :: AttrLabelProxy "driverVersion"
deviceDriverVersion = AttrLabelProxy

deviceFirmwareMissing :: AttrLabelProxy "firmwareMissing"
deviceFirmwareMissing = AttrLabelProxy

deviceFirmwareVersion :: AttrLabelProxy "firmwareVersion"
deviceFirmwareVersion = AttrLabelProxy

deviceHwAddress :: AttrLabelProxy "hwAddress"
deviceHwAddress = AttrLabelProxy

deviceInterface :: AttrLabelProxy "interface"
deviceInterface = AttrLabelProxy

deviceInterfaceFlags :: AttrLabelProxy "interfaceFlags"
deviceInterfaceFlags = AttrLabelProxy

deviceIpInterface :: AttrLabelProxy "ipInterface"
deviceIpInterface = AttrLabelProxy

deviceIp4Config :: AttrLabelProxy "ip4Config"
deviceIp4Config = AttrLabelProxy

deviceIp4Connectivity :: AttrLabelProxy "ip4Connectivity"
deviceIp4Connectivity = AttrLabelProxy

deviceIp6Config :: AttrLabelProxy "ip6Config"
deviceIp6Config = AttrLabelProxy

deviceIp6Connectivity :: AttrLabelProxy "ip6Connectivity"
deviceIp6Connectivity = AttrLabelProxy

deviceLldpNeighbors :: AttrLabelProxy "lldpNeighbors"
deviceLldpNeighbors = AttrLabelProxy

deviceManaged :: AttrLabelProxy "managed"
deviceManaged = AttrLabelProxy

deviceMetered :: AttrLabelProxy "metered"
deviceMetered = AttrLabelProxy

deviceMtu :: AttrLabelProxy "mtu"
deviceMtu = AttrLabelProxy

deviceNmPluginMissing :: AttrLabelProxy "nmPluginMissing"
deviceNmPluginMissing = AttrLabelProxy

devicePath :: AttrLabelProxy "path"
devicePath = AttrLabelProxy

devicePhysicalPortId :: AttrLabelProxy "physicalPortId"
devicePhysicalPortId = AttrLabelProxy

devicePorts :: AttrLabelProxy "ports"
devicePorts = AttrLabelProxy

deviceProduct :: AttrLabelProxy "product"
deviceProduct = AttrLabelProxy

deviceReal :: AttrLabelProxy "real"
deviceReal = AttrLabelProxy

deviceState :: AttrLabelProxy "state"
deviceState = AttrLabelProxy

deviceStateReason :: AttrLabelProxy "stateReason"
deviceStateReason = AttrLabelProxy

deviceUdi :: AttrLabelProxy "udi"
deviceUdi = AttrLabelProxy

deviceVendor :: AttrLabelProxy "vendor"
deviceVendor = AttrLabelProxy

#endif

#if defined(ENABLE_OVERLOADING)
type instance O.SignalList Device = DeviceSignalList
type DeviceSignalList = ('[ '("notify", GObject.Object.ObjectNotifySignalInfo), '("stateChanged", DeviceStateChangedSignalInfo)] :: [(Symbol, DK.Type)])

#endif

-- method Device::connection_compatible
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "device"
--           , argType = TInterface Name { namespace = "NM" , name = "Device" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "an #NMDevice to validate @connection against"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "connection"
--           , argType =
--               TInterface Name { namespace = "NM" , name = "Connection" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "an #NMConnection to validate against @device"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TBoolean)
-- throws : True
-- Skip return : False

foreign import ccall "nm_device_connection_compatible" nm_device_connection_compatible :: 
    Ptr Device ->                           -- device : TInterface (Name {namespace = "NM", name = "Device"})
    Ptr NM.Connection.Connection ->         -- connection : TInterface (Name {namespace = "NM", name = "Connection"})
    Ptr (Ptr GError) ->                     -- error
    IO CInt

-- | Validates a given connection for a given t'GI.NM.Objects.Device.Device' object and returns
-- whether the connection may be activated with the device. For example if
-- /@device@/ is a Wi-Fi device that supports only WEP encryption, the connection
-- will only be valid if it is a Wi-Fi connection which describes a WEP or open
-- network, and will not be valid if it describes a WPA network, or if it is
-- an Ethernet, Bluetooth, WWAN, etc connection that is incompatible with the
-- device.
-- 
-- This function does the same as 'GI.NM.Objects.Device.deviceConnectionValid', i.e. checking
-- compatibility of the given device and connection. But, in addition, it sets
-- GError when FALSE is returned.
deviceConnectionCompatible ::
    (B.CallStack.HasCallStack, MonadIO m, IsDevice a, NM.Connection.IsConnection b) =>
    a
    -- ^ /@device@/: an t'GI.NM.Objects.Device.Device' to validate /@connection@/ against
    -> b
    -- ^ /@connection@/: an t'GI.NM.Interfaces.Connection.Connection' to validate against /@device@/
    -> m ()
    -- ^ /(Can throw 'Data.GI.Base.GError.GError')/
deviceConnectionCompatible :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsDevice a, IsConnection b) =>
a -> b -> m ()
deviceConnectionCompatible a
device b
connection = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr Device
device' <- a -> IO (Ptr Device)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
device
    Ptr Connection
connection' <- b -> IO (Ptr Connection)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
connection
    IO () -> IO () -> IO ()
forall a b. IO a -> IO b -> IO a
onException (do
        CInt
_ <- (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO CInt) -> IO CInt)
-> (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ Ptr Device -> Ptr Connection -> Ptr (Ptr GError) -> IO CInt
nm_device_connection_compatible Ptr Device
device' Ptr Connection
connection'
        a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
device
        b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
connection
        () -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()
     ) (do
        () -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()
     )

#if defined(ENABLE_OVERLOADING)
data DeviceConnectionCompatibleMethodInfo
instance (signature ~ (b -> m ()), MonadIO m, IsDevice a, NM.Connection.IsConnection b) => O.OverloadedMethod DeviceConnectionCompatibleMethodInfo a signature where
    overloadedMethod = deviceConnectionCompatible

instance O.OverloadedMethodInfo DeviceConnectionCompatibleMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.NM.Objects.Device.deviceConnectionCompatible",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Objects-Device.html#v:deviceConnectionCompatible"
        })


#endif

-- method Device::connection_valid
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "device"
--           , argType = TInterface Name { namespace = "NM" , name = "Device" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "an #NMDevice to validate @connection against"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "connection"
--           , argType =
--               TInterface Name { namespace = "NM" , name = "Connection" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "an #NMConnection to validate against @device"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TBoolean)
-- throws : False
-- Skip return : False

foreign import ccall "nm_device_connection_valid" nm_device_connection_valid :: 
    Ptr Device ->                           -- device : TInterface (Name {namespace = "NM", name = "Device"})
    Ptr NM.Connection.Connection ->         -- connection : TInterface (Name {namespace = "NM", name = "Connection"})
    IO CInt

-- | Validates a given connection for a given t'GI.NM.Objects.Device.Device' object and returns
-- whether the connection may be activated with the device. For example if
-- /@device@/ is a Wi-Fi device that supports only WEP encryption, the connection
-- will only be valid if it is a Wi-Fi connection which describes a WEP or open
-- network, and will not be valid if it describes a WPA network, or if it is
-- an Ethernet, Bluetooth, WWAN, etc connection that is incompatible with the
-- device.
deviceConnectionValid ::
    (B.CallStack.HasCallStack, MonadIO m, IsDevice a, NM.Connection.IsConnection b) =>
    a
    -- ^ /@device@/: an t'GI.NM.Objects.Device.Device' to validate /@connection@/ against
    -> b
    -- ^ /@connection@/: an t'GI.NM.Interfaces.Connection.Connection' to validate against /@device@/
    -> m Bool
    -- ^ __Returns:__ 'P.True' if the connection may be activated with this device, 'P.False'
    -- if is incompatible with the device\'s capabilities and characteristics.
deviceConnectionValid :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsDevice a, IsConnection b) =>
a -> b -> m Bool
deviceConnectionValid a
device b
connection = IO Bool -> m Bool
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
    Ptr Device
device' <- a -> IO (Ptr Device)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
device
    Ptr Connection
connection' <- b -> IO (Ptr Connection)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
connection
    CInt
result <- Ptr Device -> Ptr Connection -> IO CInt
nm_device_connection_valid Ptr Device
device' Ptr Connection
connection'
    let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
device
    b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
connection
    Bool -> IO Bool
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'

#if defined(ENABLE_OVERLOADING)
data DeviceConnectionValidMethodInfo
instance (signature ~ (b -> m Bool), MonadIO m, IsDevice a, NM.Connection.IsConnection b) => O.OverloadedMethod DeviceConnectionValidMethodInfo a signature where
    overloadedMethod = deviceConnectionValid

instance O.OverloadedMethodInfo DeviceConnectionValidMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.NM.Objects.Device.deviceConnectionValid",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Objects-Device.html#v:deviceConnectionValid"
        })


#endif

-- method Device::delete
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "device"
--           , argType = TInterface Name { namespace = "NM" , name = "Device" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #NMDevice" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "cancellable"
--           , argType =
--               TInterface Name { namespace = "Gio" , name = "Cancellable" }
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GCancellable, or %NULL"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TBoolean)
-- throws : True
-- Skip return : False

foreign import ccall "nm_device_delete" nm_device_delete :: 
    Ptr Device ->                           -- device : TInterface (Name {namespace = "NM", name = "Device"})
    Ptr Gio.Cancellable.Cancellable ->      -- cancellable : TInterface (Name {namespace = "Gio", name = "Cancellable"})
    Ptr (Ptr GError) ->                     -- error
    IO CInt

{-# DEPRECATED deviceDelete ["(Since version 1.22)","Use 'GI.NM.Objects.Device.deviceDeleteAsync' or GDBusConnection."] #-}
-- | Deletes the software device. Hardware devices can\'t be deleted.
deviceDelete ::
    (B.CallStack.HasCallStack, MonadIO m, IsDevice a, Gio.Cancellable.IsCancellable b) =>
    a
    -- ^ /@device@/: a t'GI.NM.Objects.Device.Device'
    -> Maybe (b)
    -- ^ /@cancellable@/: a t'GI.Gio.Objects.Cancellable.Cancellable', or 'P.Nothing'
    -> m ()
    -- ^ /(Can throw 'Data.GI.Base.GError.GError')/
deviceDelete :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsDevice a, IsCancellable b) =>
a -> Maybe b -> m ()
deviceDelete a
device Maybe b
cancellable = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr Device
device' <- a -> IO (Ptr Device)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
device
    Ptr Cancellable
maybeCancellable <- case Maybe b
cancellable of
        Maybe b
Nothing -> Ptr Cancellable -> IO (Ptr Cancellable)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Cancellable
forall a. Ptr a
FP.nullPtr
        Just b
jCancellable -> do
            Ptr Cancellable
jCancellable' <- b -> IO (Ptr Cancellable)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
jCancellable
            Ptr Cancellable -> IO (Ptr Cancellable)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Cancellable
jCancellable'
    IO () -> IO () -> IO ()
forall a b. IO a -> IO b -> IO a
onException (do
        CInt
_ <- (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO CInt) -> IO CInt)
-> (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ Ptr Device -> Ptr Cancellable -> Ptr (Ptr GError) -> IO CInt
nm_device_delete Ptr Device
device' Ptr Cancellable
maybeCancellable
        a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
device
        Maybe b -> (b -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe b
cancellable b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
        () -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()
     ) (do
        () -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()
     )

#if defined(ENABLE_OVERLOADING)
data DeviceDeleteMethodInfo
instance (signature ~ (Maybe (b) -> m ()), MonadIO m, IsDevice a, Gio.Cancellable.IsCancellable b) => O.OverloadedMethod DeviceDeleteMethodInfo a signature where
    overloadedMethod = deviceDelete

instance O.OverloadedMethodInfo DeviceDeleteMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.NM.Objects.Device.deviceDelete",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Objects-Device.html#v:deviceDelete"
        })


#endif

-- method Device::delete_async
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "device"
--           , argType = TInterface Name { namespace = "NM" , name = "Device" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #NMDevice" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "cancellable"
--           , argType =
--               TInterface Name { namespace = "Gio" , name = "Cancellable" }
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GCancellable, or %NULL"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "callback"
--           , argType =
--               TInterface Name { namespace = "Gio" , name = "AsyncReadyCallback" }
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "callback to be called when delete operation completes"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeAsync
--           , argClosure = 3
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "user_data"
--           , argType = TBasicType TPtr
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "caller-specific data passed to @callback"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "nm_device_delete_async" nm_device_delete_async :: 
    Ptr Device ->                           -- device : TInterface (Name {namespace = "NM", name = "Device"})
    Ptr Gio.Cancellable.Cancellable ->      -- cancellable : TInterface (Name {namespace = "Gio", name = "Cancellable"})
    FunPtr Gio.Callbacks.C_AsyncReadyCallback -> -- callback : TInterface (Name {namespace = "Gio", name = "AsyncReadyCallback"})
    Ptr () ->                               -- user_data : TBasicType TPtr
    IO ()

-- | Asynchronously begins deleting the software device. Hardware devices can\'t
-- be deleted.
deviceDeleteAsync ::
    (B.CallStack.HasCallStack, MonadIO m, IsDevice a, Gio.Cancellable.IsCancellable b) =>
    a
    -- ^ /@device@/: a t'GI.NM.Objects.Device.Device'
    -> Maybe (b)
    -- ^ /@cancellable@/: a t'GI.Gio.Objects.Cancellable.Cancellable', or 'P.Nothing'
    -> Maybe (Gio.Callbacks.AsyncReadyCallback)
    -- ^ /@callback@/: callback to be called when delete operation completes
    -> m ()
deviceDeleteAsync :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsDevice a, IsCancellable b) =>
a -> Maybe b -> Maybe AsyncReadyCallback -> m ()
deviceDeleteAsync a
device Maybe b
cancellable Maybe AsyncReadyCallback
callback = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr Device
device' <- a -> IO (Ptr Device)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
device
    Ptr Cancellable
maybeCancellable <- case Maybe b
cancellable of
        Maybe b
Nothing -> Ptr Cancellable -> IO (Ptr Cancellable)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Cancellable
forall a. Ptr a
FP.nullPtr
        Just b
jCancellable -> do
            Ptr Cancellable
jCancellable' <- b -> IO (Ptr Cancellable)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
jCancellable
            Ptr Cancellable -> IO (Ptr Cancellable)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Cancellable
jCancellable'
    FunPtr C_AsyncReadyCallback
maybeCallback <- case Maybe AsyncReadyCallback
callback of
        Maybe AsyncReadyCallback
Nothing -> FunPtr C_AsyncReadyCallback -> IO (FunPtr C_AsyncReadyCallback)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return FunPtr C_AsyncReadyCallback
forall a. FunPtr a
FP.nullFunPtr
        Just AsyncReadyCallback
jCallback -> do
            Ptr (FunPtr C_AsyncReadyCallback)
ptrcallback <- IO (Ptr (FunPtr C_AsyncReadyCallback))
forall a. Storable a => IO (Ptr a)
callocMem :: IO (Ptr (FunPtr Gio.Callbacks.C_AsyncReadyCallback))
            FunPtr C_AsyncReadyCallback
jCallback' <- C_AsyncReadyCallback -> IO (FunPtr C_AsyncReadyCallback)
Gio.Callbacks.mk_AsyncReadyCallback (Maybe (Ptr (FunPtr C_AsyncReadyCallback))
-> AsyncReadyCallback_WithClosures -> C_AsyncReadyCallback
Gio.Callbacks.wrap_AsyncReadyCallback (Ptr (FunPtr C_AsyncReadyCallback)
-> Maybe (Ptr (FunPtr C_AsyncReadyCallback))
forall a. a -> Maybe a
Just Ptr (FunPtr C_AsyncReadyCallback)
ptrcallback) (AsyncReadyCallback -> AsyncReadyCallback_WithClosures
Gio.Callbacks.drop_closures_AsyncReadyCallback AsyncReadyCallback
jCallback))
            Ptr (FunPtr C_AsyncReadyCallback)
-> FunPtr C_AsyncReadyCallback -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke Ptr (FunPtr C_AsyncReadyCallback)
ptrcallback FunPtr C_AsyncReadyCallback
jCallback'
            FunPtr C_AsyncReadyCallback -> IO (FunPtr C_AsyncReadyCallback)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return FunPtr C_AsyncReadyCallback
jCallback'
    let userData :: Ptr a
userData = Ptr a
forall a. Ptr a
nullPtr
    Ptr Device
-> Ptr Cancellable
-> FunPtr C_AsyncReadyCallback
-> Ptr ()
-> IO ()
nm_device_delete_async Ptr Device
device' Ptr Cancellable
maybeCancellable FunPtr C_AsyncReadyCallback
maybeCallback Ptr ()
forall a. Ptr a
userData
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
device
    Maybe b -> (b -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe b
cancellable b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
    () -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data DeviceDeleteAsyncMethodInfo
instance (signature ~ (Maybe (b) -> Maybe (Gio.Callbacks.AsyncReadyCallback) -> m ()), MonadIO m, IsDevice a, Gio.Cancellable.IsCancellable b) => O.OverloadedMethod DeviceDeleteAsyncMethodInfo a signature where
    overloadedMethod = deviceDeleteAsync

instance O.OverloadedMethodInfo DeviceDeleteAsyncMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.NM.Objects.Device.deviceDeleteAsync",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Objects-Device.html#v:deviceDeleteAsync"
        })


#endif

-- method Device::delete_finish
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "device"
--           , argType = TInterface Name { namespace = "NM" , name = "Device" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #NMDevice" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "result"
--           , argType =
--               TInterface Name { namespace = "Gio" , name = "AsyncResult" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the result passed to the #GAsyncReadyCallback"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TBoolean)
-- throws : True
-- Skip return : False

foreign import ccall "nm_device_delete_finish" nm_device_delete_finish :: 
    Ptr Device ->                           -- device : TInterface (Name {namespace = "NM", name = "Device"})
    Ptr Gio.AsyncResult.AsyncResult ->      -- result : TInterface (Name {namespace = "Gio", name = "AsyncResult"})
    Ptr (Ptr GError) ->                     -- error
    IO CInt

-- | Gets the result of a call to 'GI.NM.Objects.Device.deviceDeleteAsync'.
deviceDeleteFinish ::
    (B.CallStack.HasCallStack, MonadIO m, IsDevice a, Gio.AsyncResult.IsAsyncResult b) =>
    a
    -- ^ /@device@/: a t'GI.NM.Objects.Device.Device'
    -> b
    -- ^ /@result@/: the result passed to the t'GI.Gio.Callbacks.AsyncReadyCallback'
    -> m ()
    -- ^ /(Can throw 'Data.GI.Base.GError.GError')/
deviceDeleteFinish :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsDevice a, IsAsyncResult b) =>
a -> b -> m ()
deviceDeleteFinish a
device b
result_ = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr Device
device' <- a -> IO (Ptr Device)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
device
    Ptr AsyncResult
result_' <- b -> IO (Ptr AsyncResult)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
result_
    IO () -> IO () -> IO ()
forall a b. IO a -> IO b -> IO a
onException (do
        CInt
_ <- (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO CInt) -> IO CInt)
-> (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ Ptr Device -> Ptr AsyncResult -> Ptr (Ptr GError) -> IO CInt
nm_device_delete_finish Ptr Device
device' Ptr AsyncResult
result_'
        a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
device
        b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
result_
        () -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()
     ) (do
        () -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()
     )

#if defined(ENABLE_OVERLOADING)
data DeviceDeleteFinishMethodInfo
instance (signature ~ (b -> m ()), MonadIO m, IsDevice a, Gio.AsyncResult.IsAsyncResult b) => O.OverloadedMethod DeviceDeleteFinishMethodInfo a signature where
    overloadedMethod = deviceDeleteFinish

instance O.OverloadedMethodInfo DeviceDeleteFinishMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.NM.Objects.Device.deviceDeleteFinish",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Objects-Device.html#v:deviceDeleteFinish"
        })


#endif

-- method Device::disconnect
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "device"
--           , argType = TInterface Name { namespace = "NM" , name = "Device" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #NMDevice" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "cancellable"
--           , argType =
--               TInterface Name { namespace = "Gio" , name = "Cancellable" }
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GCancellable, or %NULL"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TBoolean)
-- throws : True
-- Skip return : False

foreign import ccall "nm_device_disconnect" nm_device_disconnect :: 
    Ptr Device ->                           -- device : TInterface (Name {namespace = "NM", name = "Device"})
    Ptr Gio.Cancellable.Cancellable ->      -- cancellable : TInterface (Name {namespace = "Gio", name = "Cancellable"})
    Ptr (Ptr GError) ->                     -- error
    IO CInt

{-# DEPRECATED deviceDisconnect ["(Since version 1.22)","Use 'GI.NM.Objects.Device.deviceDisconnectAsync' or GDBusConnection."] #-}
-- | Disconnects the device if currently connected, and prevents the device from
-- automatically connecting to networks until the next manual network connection
-- request.
deviceDisconnect ::
    (B.CallStack.HasCallStack, MonadIO m, IsDevice a, Gio.Cancellable.IsCancellable b) =>
    a
    -- ^ /@device@/: a t'GI.NM.Objects.Device.Device'
    -> Maybe (b)
    -- ^ /@cancellable@/: a t'GI.Gio.Objects.Cancellable.Cancellable', or 'P.Nothing'
    -> m ()
    -- ^ /(Can throw 'Data.GI.Base.GError.GError')/
deviceDisconnect :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsDevice a, IsCancellable b) =>
a -> Maybe b -> m ()
deviceDisconnect a
device Maybe b
cancellable = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr Device
device' <- a -> IO (Ptr Device)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
device
    Ptr Cancellable
maybeCancellable <- case Maybe b
cancellable of
        Maybe b
Nothing -> Ptr Cancellable -> IO (Ptr Cancellable)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Cancellable
forall a. Ptr a
FP.nullPtr
        Just b
jCancellable -> do
            Ptr Cancellable
jCancellable' <- b -> IO (Ptr Cancellable)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
jCancellable
            Ptr Cancellable -> IO (Ptr Cancellable)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Cancellable
jCancellable'
    IO () -> IO () -> IO ()
forall a b. IO a -> IO b -> IO a
onException (do
        CInt
_ <- (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO CInt) -> IO CInt)
-> (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ Ptr Device -> Ptr Cancellable -> Ptr (Ptr GError) -> IO CInt
nm_device_disconnect Ptr Device
device' Ptr Cancellable
maybeCancellable
        a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
device
        Maybe b -> (b -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe b
cancellable b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
        () -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()
     ) (do
        () -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()
     )

#if defined(ENABLE_OVERLOADING)
data DeviceDisconnectMethodInfo
instance (signature ~ (Maybe (b) -> m ()), MonadIO m, IsDevice a, Gio.Cancellable.IsCancellable b) => O.OverloadedMethod DeviceDisconnectMethodInfo a signature where
    overloadedMethod = deviceDisconnect

instance O.OverloadedMethodInfo DeviceDisconnectMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.NM.Objects.Device.deviceDisconnect",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Objects-Device.html#v:deviceDisconnect"
        })


#endif

-- method Device::disconnect_async
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "device"
--           , argType = TInterface Name { namespace = "NM" , name = "Device" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #NMDevice" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "cancellable"
--           , argType =
--               TInterface Name { namespace = "Gio" , name = "Cancellable" }
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GCancellable, or %NULL"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "callback"
--           , argType =
--               TInterface Name { namespace = "Gio" , name = "AsyncReadyCallback" }
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just
--                       "callback to be called when the disconnect operation completes"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeAsync
--           , argClosure = 3
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "user_data"
--           , argType = TBasicType TPtr
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "caller-specific data passed to @callback"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "nm_device_disconnect_async" nm_device_disconnect_async :: 
    Ptr Device ->                           -- device : TInterface (Name {namespace = "NM", name = "Device"})
    Ptr Gio.Cancellable.Cancellable ->      -- cancellable : TInterface (Name {namespace = "Gio", name = "Cancellable"})
    FunPtr Gio.Callbacks.C_AsyncReadyCallback -> -- callback : TInterface (Name {namespace = "Gio", name = "AsyncReadyCallback"})
    Ptr () ->                               -- user_data : TBasicType TPtr
    IO ()

-- | Asynchronously begins disconnecting the device if currently connected, and
-- prevents the device from automatically connecting to networks until the next
-- manual network connection request.
deviceDisconnectAsync ::
    (B.CallStack.HasCallStack, MonadIO m, IsDevice a, Gio.Cancellable.IsCancellable b) =>
    a
    -- ^ /@device@/: a t'GI.NM.Objects.Device.Device'
    -> Maybe (b)
    -- ^ /@cancellable@/: a t'GI.Gio.Objects.Cancellable.Cancellable', or 'P.Nothing'
    -> Maybe (Gio.Callbacks.AsyncReadyCallback)
    -- ^ /@callback@/: callback to be called when the disconnect operation completes
    -> m ()
deviceDisconnectAsync :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsDevice a, IsCancellable b) =>
a -> Maybe b -> Maybe AsyncReadyCallback -> m ()
deviceDisconnectAsync a
device Maybe b
cancellable Maybe AsyncReadyCallback
callback = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr Device
device' <- a -> IO (Ptr Device)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
device
    Ptr Cancellable
maybeCancellable <- case Maybe b
cancellable of
        Maybe b
Nothing -> Ptr Cancellable -> IO (Ptr Cancellable)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Cancellable
forall a. Ptr a
FP.nullPtr
        Just b
jCancellable -> do
            Ptr Cancellable
jCancellable' <- b -> IO (Ptr Cancellable)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
jCancellable
            Ptr Cancellable -> IO (Ptr Cancellable)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Cancellable
jCancellable'
    FunPtr C_AsyncReadyCallback
maybeCallback <- case Maybe AsyncReadyCallback
callback of
        Maybe AsyncReadyCallback
Nothing -> FunPtr C_AsyncReadyCallback -> IO (FunPtr C_AsyncReadyCallback)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return FunPtr C_AsyncReadyCallback
forall a. FunPtr a
FP.nullFunPtr
        Just AsyncReadyCallback
jCallback -> do
            Ptr (FunPtr C_AsyncReadyCallback)
ptrcallback <- IO (Ptr (FunPtr C_AsyncReadyCallback))
forall a. Storable a => IO (Ptr a)
callocMem :: IO (Ptr (FunPtr Gio.Callbacks.C_AsyncReadyCallback))
            FunPtr C_AsyncReadyCallback
jCallback' <- C_AsyncReadyCallback -> IO (FunPtr C_AsyncReadyCallback)
Gio.Callbacks.mk_AsyncReadyCallback (Maybe (Ptr (FunPtr C_AsyncReadyCallback))
-> AsyncReadyCallback_WithClosures -> C_AsyncReadyCallback
Gio.Callbacks.wrap_AsyncReadyCallback (Ptr (FunPtr C_AsyncReadyCallback)
-> Maybe (Ptr (FunPtr C_AsyncReadyCallback))
forall a. a -> Maybe a
Just Ptr (FunPtr C_AsyncReadyCallback)
ptrcallback) (AsyncReadyCallback -> AsyncReadyCallback_WithClosures
Gio.Callbacks.drop_closures_AsyncReadyCallback AsyncReadyCallback
jCallback))
            Ptr (FunPtr C_AsyncReadyCallback)
-> FunPtr C_AsyncReadyCallback -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke Ptr (FunPtr C_AsyncReadyCallback)
ptrcallback FunPtr C_AsyncReadyCallback
jCallback'
            FunPtr C_AsyncReadyCallback -> IO (FunPtr C_AsyncReadyCallback)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return FunPtr C_AsyncReadyCallback
jCallback'
    let userData :: Ptr a
userData = Ptr a
forall a. Ptr a
nullPtr
    Ptr Device
-> Ptr Cancellable
-> FunPtr C_AsyncReadyCallback
-> Ptr ()
-> IO ()
nm_device_disconnect_async Ptr Device
device' Ptr Cancellable
maybeCancellable FunPtr C_AsyncReadyCallback
maybeCallback Ptr ()
forall a. Ptr a
userData
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
device
    Maybe b -> (b -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe b
cancellable b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
    () -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data DeviceDisconnectAsyncMethodInfo
instance (signature ~ (Maybe (b) -> Maybe (Gio.Callbacks.AsyncReadyCallback) -> m ()), MonadIO m, IsDevice a, Gio.Cancellable.IsCancellable b) => O.OverloadedMethod DeviceDisconnectAsyncMethodInfo a signature where
    overloadedMethod = deviceDisconnectAsync

instance O.OverloadedMethodInfo DeviceDisconnectAsyncMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.NM.Objects.Device.deviceDisconnectAsync",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Objects-Device.html#v:deviceDisconnectAsync"
        })


#endif

-- method Device::disconnect_finish
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "device"
--           , argType = TInterface Name { namespace = "NM" , name = "Device" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #NMDevice" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "result"
--           , argType =
--               TInterface Name { namespace = "Gio" , name = "AsyncResult" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the result passed to the #GAsyncReadyCallback"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TBoolean)
-- throws : True
-- Skip return : False

foreign import ccall "nm_device_disconnect_finish" nm_device_disconnect_finish :: 
    Ptr Device ->                           -- device : TInterface (Name {namespace = "NM", name = "Device"})
    Ptr Gio.AsyncResult.AsyncResult ->      -- result : TInterface (Name {namespace = "Gio", name = "AsyncResult"})
    Ptr (Ptr GError) ->                     -- error
    IO CInt

-- | Gets the result of a call to 'GI.NM.Objects.Device.deviceDisconnectAsync'.
deviceDisconnectFinish ::
    (B.CallStack.HasCallStack, MonadIO m, IsDevice a, Gio.AsyncResult.IsAsyncResult b) =>
    a
    -- ^ /@device@/: a t'GI.NM.Objects.Device.Device'
    -> b
    -- ^ /@result@/: the result passed to the t'GI.Gio.Callbacks.AsyncReadyCallback'
    -> m ()
    -- ^ /(Can throw 'Data.GI.Base.GError.GError')/
deviceDisconnectFinish :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsDevice a, IsAsyncResult b) =>
a -> b -> m ()
deviceDisconnectFinish a
device b
result_ = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr Device
device' <- a -> IO (Ptr Device)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
device
    Ptr AsyncResult
result_' <- b -> IO (Ptr AsyncResult)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
result_
    IO () -> IO () -> IO ()
forall a b. IO a -> IO b -> IO a
onException (do
        CInt
_ <- (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO CInt) -> IO CInt)
-> (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ Ptr Device -> Ptr AsyncResult -> Ptr (Ptr GError) -> IO CInt
nm_device_disconnect_finish Ptr Device
device' Ptr AsyncResult
result_'
        a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
device
        b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
result_
        () -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()
     ) (do
        () -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()
     )

#if defined(ENABLE_OVERLOADING)
data DeviceDisconnectFinishMethodInfo
instance (signature ~ (b -> m ()), MonadIO m, IsDevice a, Gio.AsyncResult.IsAsyncResult b) => O.OverloadedMethod DeviceDisconnectFinishMethodInfo a signature where
    overloadedMethod = deviceDisconnectFinish

instance O.OverloadedMethodInfo DeviceDisconnectFinishMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.NM.Objects.Device.deviceDisconnectFinish",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Objects-Device.html#v:deviceDisconnectFinish"
        })


#endif

-- method Device::filter_connections
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "device"
--           , argType = TInterface Name { namespace = "NM" , name = "Device" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "an #NMDevice to filter connections for"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "connections"
--           , argType =
--               TPtrArray
--                 (TInterface Name { namespace = "NM" , name = "Connection" })
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "an array of #NMConnections to filter"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just
--               (TPtrArray
--                  (TInterface Name { namespace = "NM" , name = "Connection" }))
-- throws : False
-- Skip return : False

foreign import ccall "nm_device_filter_connections" nm_device_filter_connections :: 
    Ptr Device ->                           -- device : TInterface (Name {namespace = "NM", name = "Device"})
    Ptr (GPtrArray (Ptr NM.Connection.Connection)) -> -- connections : TPtrArray (TInterface (Name {namespace = "NM", name = "Connection"}))
    IO (Ptr (GPtrArray (Ptr NM.Connection.Connection)))

-- | Filters a given array of connections for a given t'GI.NM.Objects.Device.Device' object and returns
-- connections which may be activated with the device. For example if /@device@/
-- is a Wi-Fi device that supports only WEP encryption, the returned array will
-- contain any Wi-Fi connections in /@connections@/ that allow connection to
-- unencrypted or WEP-enabled SSIDs.  The returned array will not contain
-- Ethernet, Bluetooth, Wi-Fi WPA connections, or any other connection that is
-- incompatible with the device. To get the full list of connections see
-- 'GI.NM.Objects.Client.clientGetConnections'.
deviceFilterConnections ::
    (B.CallStack.HasCallStack, MonadIO m, IsDevice a) =>
    a
    -- ^ /@device@/: an t'GI.NM.Objects.Device.Device' to filter connections for
    -> [NM.Connection.Connection]
    -- ^ /@connections@/: an array of @/NMConnections/@ to filter
    -> m [NM.Connection.Connection]
    -- ^ __Returns:__ an array of
    -- @/NMConnections/@ that could be activated with the given /@device@/.  The array
    -- should be freed with @/g_ptr_array_unref()/@ when it is no longer required.
    -- 
    -- WARNING: the transfer annotation for this function may not work correctly
    --   with bindings. See https:\/\/gitlab.gnome.org\/GNOME\/gobject-introspection\/-\/issues\/305.
    --   You can filter the list yourself with 'GI.NM.Objects.Device.deviceConnectionValid'.
deviceFilterConnections :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsDevice a) =>
a -> [Connection] -> m [Connection]
deviceFilterConnections a
device [Connection]
connections = IO [Connection] -> m [Connection]
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO [Connection] -> m [Connection])
-> IO [Connection] -> m [Connection]
forall a b. (a -> b) -> a -> b
$ do
    Ptr Device
device' <- a -> IO (Ptr Device)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
device
    [Ptr Connection]
connections' <- (Connection -> IO (Ptr Connection))
-> [Connection] -> IO [Ptr Connection]
forall (t :: * -> *) (m :: * -> *) a b.
(Traversable t, Monad m) =>
(a -> m b) -> t a -> m (t b)
forall (m :: * -> *) a b. Monad m => (a -> m b) -> [a] -> m [b]
mapM Connection -> IO (Ptr Connection)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr [Connection]
connections
    Ptr (GPtrArray (Ptr Connection))
connections'' <- [Ptr Connection] -> IO (Ptr (GPtrArray (Ptr Connection)))
forall a. [Ptr a] -> IO (Ptr (GPtrArray (Ptr a)))
packGPtrArray [Ptr Connection]
connections'
    Ptr (GPtrArray (Ptr Connection))
result <- Ptr Device
-> Ptr (GPtrArray (Ptr Connection))
-> IO (Ptr (GPtrArray (Ptr Connection)))
nm_device_filter_connections Ptr Device
device' Ptr (GPtrArray (Ptr Connection))
connections''
    Text -> Ptr (GPtrArray (Ptr Connection)) -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"deviceFilterConnections" Ptr (GPtrArray (Ptr Connection))
result
    [Ptr Connection]
result' <- Ptr (GPtrArray (Ptr Connection)) -> IO [Ptr Connection]
forall a. Ptr (GPtrArray (Ptr a)) -> IO [Ptr a]
unpackGPtrArray Ptr (GPtrArray (Ptr Connection))
result
    [Connection]
result'' <- (Ptr Connection -> IO Connection)
-> [Ptr Connection] -> IO [Connection]
forall (t :: * -> *) (m :: * -> *) a b.
(Traversable t, Monad m) =>
(a -> m b) -> t a -> m (t b)
forall (m :: * -> *) a b. Monad m => (a -> m b) -> [a] -> m [b]
mapM ((ManagedPtr Connection -> Connection)
-> Ptr Connection -> IO Connection
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr Connection -> Connection
NM.Connection.Connection) [Ptr Connection]
result'
    Ptr (GPtrArray (Ptr Connection)) -> IO ()
forall a. Ptr (GPtrArray a) -> IO ()
unrefPtrArray Ptr (GPtrArray (Ptr Connection))
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
device
    (Connection -> IO ()) -> [Connection] -> IO ()
forall (t :: * -> *) (m :: * -> *) a b.
(Foldable t, Monad m) =>
(a -> m b) -> t a -> m ()
mapM_ Connection -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr [Connection]
connections
    Ptr (GPtrArray (Ptr Connection)) -> IO ()
forall a. Ptr (GPtrArray a) -> IO ()
unrefPtrArray Ptr (GPtrArray (Ptr Connection))
connections''
    [Connection] -> IO [Connection]
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return [Connection]
result''

#if defined(ENABLE_OVERLOADING)
data DeviceFilterConnectionsMethodInfo
instance (signature ~ ([NM.Connection.Connection] -> m [NM.Connection.Connection]), MonadIO m, IsDevice a) => O.OverloadedMethod DeviceFilterConnectionsMethodInfo a signature where
    overloadedMethod = deviceFilterConnections

instance O.OverloadedMethodInfo DeviceFilterConnectionsMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.NM.Objects.Device.deviceFilterConnections",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Objects-Device.html#v:deviceFilterConnections"
        })


#endif

-- method Device::get_active_connection
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "device"
--           , argType = TInterface Name { namespace = "NM" , name = "Device" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #NMDevice" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just
--               (TInterface Name { namespace = "NM" , name = "ActiveConnection" })
-- throws : False
-- Skip return : False

foreign import ccall "nm_device_get_active_connection" nm_device_get_active_connection :: 
    Ptr Device ->                           -- device : TInterface (Name {namespace = "NM", name = "Device"})
    IO (Ptr NM.ActiveConnection.ActiveConnection)

-- | Gets the t'GI.NM.Objects.ActiveConnection.ActiveConnection' object which owns this device during activation.
deviceGetActiveConnection ::
    (B.CallStack.HasCallStack, MonadIO m, IsDevice a) =>
    a
    -- ^ /@device@/: a t'GI.NM.Objects.Device.Device'
    -> m NM.ActiveConnection.ActiveConnection
    -- ^ __Returns:__ the t'GI.NM.Objects.ActiveConnection.ActiveConnection' or 'P.Nothing' if the device is
    -- not part of an active connection
deviceGetActiveConnection :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsDevice a) =>
a -> m ActiveConnection
deviceGetActiveConnection a
device = IO ActiveConnection -> m ActiveConnection
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO ActiveConnection -> m ActiveConnection)
-> IO ActiveConnection -> m ActiveConnection
forall a b. (a -> b) -> a -> b
$ do
    Ptr Device
device' <- a -> IO (Ptr Device)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
device
    Ptr ActiveConnection
result <- Ptr Device -> IO (Ptr ActiveConnection)
nm_device_get_active_connection Ptr Device
device'
    Text -> Ptr ActiveConnection -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"deviceGetActiveConnection" Ptr ActiveConnection
result
    ActiveConnection
result' <- ((ManagedPtr ActiveConnection -> ActiveConnection)
-> Ptr ActiveConnection -> IO ActiveConnection
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr ActiveConnection -> ActiveConnection
NM.ActiveConnection.ActiveConnection) Ptr ActiveConnection
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
device
    ActiveConnection -> IO ActiveConnection
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ActiveConnection
result'

#if defined(ENABLE_OVERLOADING)
data DeviceGetActiveConnectionMethodInfo
instance (signature ~ (m NM.ActiveConnection.ActiveConnection), MonadIO m, IsDevice a) => O.OverloadedMethod DeviceGetActiveConnectionMethodInfo a signature where
    overloadedMethod = deviceGetActiveConnection

instance O.OverloadedMethodInfo DeviceGetActiveConnectionMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.NM.Objects.Device.deviceGetActiveConnection",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Objects-Device.html#v:deviceGetActiveConnection"
        })


#endif

-- method Device::get_applied_connection
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "device"
--           , argType = TInterface Name { namespace = "NM" , name = "Device" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #NMDevice" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "flags"
--           , argType = TBasicType TUInt32
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "the flags argument. See #NMDeviceReapplyFlags."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "version_id"
--           , argType = TBasicType TUInt64
--           , direction = DirectionOut
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "returns the current version id of\n  the applied connection"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferEverything
--           }
--       , Arg
--           { argCName = "cancellable"
--           , argType =
--               TInterface Name { namespace = "Gio" , name = "Cancellable" }
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GCancellable, or %NULL"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TInterface Name { namespace = "NM" , name = "Connection" })
-- throws : True
-- Skip return : False

foreign import ccall "nm_device_get_applied_connection" nm_device_get_applied_connection :: 
    Ptr Device ->                           -- device : TInterface (Name {namespace = "NM", name = "Device"})
    Word32 ->                               -- flags : TBasicType TUInt32
    Ptr Word64 ->                           -- version_id : TBasicType TUInt64
    Ptr Gio.Cancellable.Cancellable ->      -- cancellable : TInterface (Name {namespace = "Gio", name = "Cancellable"})
    Ptr (Ptr GError) ->                     -- error
    IO (Ptr NM.Connection.Connection)

{-# DEPRECATED deviceGetAppliedConnection ["(Since version 1.22)","Use 'GI.NM.Objects.Device.deviceGetAppliedConnectionAsync' or GDBusConnection."] #-}
-- | Fetch the currently applied connection on the device.
-- 
-- /Since: 1.2/
deviceGetAppliedConnection ::
    (B.CallStack.HasCallStack, MonadIO m, IsDevice a, Gio.Cancellable.IsCancellable b) =>
    a
    -- ^ /@device@/: a t'GI.NM.Objects.Device.Device'
    -> Word32
    -- ^ /@flags@/: the flags argument. See t'GI.NM.Flags.DeviceReapplyFlags'.
    -> Maybe (b)
    -- ^ /@cancellable@/: a t'GI.Gio.Objects.Cancellable.Cancellable', or 'P.Nothing'
    -> m ((NM.Connection.Connection, Word64))
    -- ^ __Returns:__ a @/NMConnection/@ with the currently applied settings
    --   or 'P.Nothing' on error.
    -- 
    -- The connection is as received from D-Bus and might not validate according
    -- to 'GI.NM.Interfaces.Connection.connectionVerify'. /(Can throw 'Data.GI.Base.GError.GError')/
deviceGetAppliedConnection :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsDevice a, IsCancellable b) =>
a -> Word32 -> Maybe b -> m (Connection, Word64)
deviceGetAppliedConnection a
device Word32
flags Maybe b
cancellable = IO (Connection, Word64) -> m (Connection, Word64)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Connection, Word64) -> m (Connection, Word64))
-> IO (Connection, Word64) -> m (Connection, Word64)
forall a b. (a -> b) -> a -> b
$ do
    Ptr Device
device' <- a -> IO (Ptr Device)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
device
    Ptr Word64
versionId <- IO (Ptr Word64)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr Word64)
    Ptr Cancellable
maybeCancellable <- case Maybe b
cancellable of
        Maybe b
Nothing -> Ptr Cancellable -> IO (Ptr Cancellable)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Cancellable
forall a. Ptr a
FP.nullPtr
        Just b
jCancellable -> do
            Ptr Cancellable
jCancellable' <- b -> IO (Ptr Cancellable)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
jCancellable
            Ptr Cancellable -> IO (Ptr Cancellable)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Cancellable
jCancellable'
    IO (Connection, Word64) -> IO () -> IO (Connection, Word64)
forall a b. IO a -> IO b -> IO a
onException (do
        Ptr Connection
result <- (Ptr (Ptr GError) -> IO (Ptr Connection)) -> IO (Ptr Connection)
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO (Ptr Connection)) -> IO (Ptr Connection))
-> (Ptr (Ptr GError) -> IO (Ptr Connection)) -> IO (Ptr Connection)
forall a b. (a -> b) -> a -> b
$ Ptr Device
-> Word32
-> Ptr Word64
-> Ptr Cancellable
-> Ptr (Ptr GError)
-> IO (Ptr Connection)
nm_device_get_applied_connection Ptr Device
device' Word32
flags Ptr Word64
versionId Ptr Cancellable
maybeCancellable
        Text -> Ptr Connection -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"deviceGetAppliedConnection" Ptr Connection
result
        Connection
result' <- ((ManagedPtr Connection -> Connection)
-> Ptr Connection -> IO Connection
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr Connection -> Connection
NM.Connection.Connection) Ptr Connection
result
        Word64
versionId' <- Ptr Word64 -> IO Word64
forall a. Storable a => Ptr a -> IO a
peek Ptr Word64
versionId
        a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
device
        Maybe b -> (b -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe b
cancellable b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
        Ptr Word64 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Word64
versionId
        (Connection, Word64) -> IO (Connection, Word64)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return (Connection
result', Word64
versionId')
     ) (do
        Ptr Word64 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Word64
versionId
     )

#if defined(ENABLE_OVERLOADING)
data DeviceGetAppliedConnectionMethodInfo
instance (signature ~ (Word32 -> Maybe (b) -> m ((NM.Connection.Connection, Word64))), MonadIO m, IsDevice a, Gio.Cancellable.IsCancellable b) => O.OverloadedMethod DeviceGetAppliedConnectionMethodInfo a signature where
    overloadedMethod = deviceGetAppliedConnection

instance O.OverloadedMethodInfo DeviceGetAppliedConnectionMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.NM.Objects.Device.deviceGetAppliedConnection",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Objects-Device.html#v:deviceGetAppliedConnection"
        })


#endif

-- method Device::get_applied_connection_async
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "device"
--           , argType = TInterface Name { namespace = "NM" , name = "Device" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #NMDevice" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "flags"
--           , argType = TBasicType TUInt32
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "the flags argument. See #NMDeviceReapplyFlags."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "cancellable"
--           , argType =
--               TInterface Name { namespace = "Gio" , name = "Cancellable" }
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GCancellable, or %NULL"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "callback"
--           , argType =
--               TInterface Name { namespace = "Gio" , name = "AsyncReadyCallback" }
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "callback to be called when the reapply operation completes"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeAsync
--           , argClosure = 4
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "user_data"
--           , argType = TBasicType TPtr
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "caller-specific data passed to @callback"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "nm_device_get_applied_connection_async" nm_device_get_applied_connection_async :: 
    Ptr Device ->                           -- device : TInterface (Name {namespace = "NM", name = "Device"})
    Word32 ->                               -- flags : TBasicType TUInt32
    Ptr Gio.Cancellable.Cancellable ->      -- cancellable : TInterface (Name {namespace = "Gio", name = "Cancellable"})
    FunPtr Gio.Callbacks.C_AsyncReadyCallback -> -- callback : TInterface (Name {namespace = "Gio", name = "AsyncReadyCallback"})
    Ptr () ->                               -- user_data : TBasicType TPtr
    IO ()

-- | Asynchronously begins and gets the currently applied connection.
-- 
-- /Since: 1.2/
deviceGetAppliedConnectionAsync ::
    (B.CallStack.HasCallStack, MonadIO m, IsDevice a, Gio.Cancellable.IsCancellable b) =>
    a
    -- ^ /@device@/: a t'GI.NM.Objects.Device.Device'
    -> Word32
    -- ^ /@flags@/: the flags argument. See t'GI.NM.Flags.DeviceReapplyFlags'.
    -> Maybe (b)
    -- ^ /@cancellable@/: a t'GI.Gio.Objects.Cancellable.Cancellable', or 'P.Nothing'
    -> Maybe (Gio.Callbacks.AsyncReadyCallback)
    -- ^ /@callback@/: callback to be called when the reapply operation completes
    -> m ()
deviceGetAppliedConnectionAsync :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsDevice a, IsCancellable b) =>
a -> Word32 -> Maybe b -> Maybe AsyncReadyCallback -> m ()
deviceGetAppliedConnectionAsync a
device Word32
flags Maybe b
cancellable Maybe AsyncReadyCallback
callback = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr Device
device' <- a -> IO (Ptr Device)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
device
    Ptr Cancellable
maybeCancellable <- case Maybe b
cancellable of
        Maybe b
Nothing -> Ptr Cancellable -> IO (Ptr Cancellable)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Cancellable
forall a. Ptr a
FP.nullPtr
        Just b
jCancellable -> do
            Ptr Cancellable
jCancellable' <- b -> IO (Ptr Cancellable)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
jCancellable
            Ptr Cancellable -> IO (Ptr Cancellable)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Cancellable
jCancellable'
    FunPtr C_AsyncReadyCallback
maybeCallback <- case Maybe AsyncReadyCallback
callback of
        Maybe AsyncReadyCallback
Nothing -> FunPtr C_AsyncReadyCallback -> IO (FunPtr C_AsyncReadyCallback)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return FunPtr C_AsyncReadyCallback
forall a. FunPtr a
FP.nullFunPtr
        Just AsyncReadyCallback
jCallback -> do
            Ptr (FunPtr C_AsyncReadyCallback)
ptrcallback <- IO (Ptr (FunPtr C_AsyncReadyCallback))
forall a. Storable a => IO (Ptr a)
callocMem :: IO (Ptr (FunPtr Gio.Callbacks.C_AsyncReadyCallback))
            FunPtr C_AsyncReadyCallback
jCallback' <- C_AsyncReadyCallback -> IO (FunPtr C_AsyncReadyCallback)
Gio.Callbacks.mk_AsyncReadyCallback (Maybe (Ptr (FunPtr C_AsyncReadyCallback))
-> AsyncReadyCallback_WithClosures -> C_AsyncReadyCallback
Gio.Callbacks.wrap_AsyncReadyCallback (Ptr (FunPtr C_AsyncReadyCallback)
-> Maybe (Ptr (FunPtr C_AsyncReadyCallback))
forall a. a -> Maybe a
Just Ptr (FunPtr C_AsyncReadyCallback)
ptrcallback) (AsyncReadyCallback -> AsyncReadyCallback_WithClosures
Gio.Callbacks.drop_closures_AsyncReadyCallback AsyncReadyCallback
jCallback))
            Ptr (FunPtr C_AsyncReadyCallback)
-> FunPtr C_AsyncReadyCallback -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke Ptr (FunPtr C_AsyncReadyCallback)
ptrcallback FunPtr C_AsyncReadyCallback
jCallback'
            FunPtr C_AsyncReadyCallback -> IO (FunPtr C_AsyncReadyCallback)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return FunPtr C_AsyncReadyCallback
jCallback'
    let userData :: Ptr a
userData = Ptr a
forall a. Ptr a
nullPtr
    Ptr Device
-> Word32
-> Ptr Cancellable
-> FunPtr C_AsyncReadyCallback
-> Ptr ()
-> IO ()
nm_device_get_applied_connection_async Ptr Device
device' Word32
flags Ptr Cancellable
maybeCancellable FunPtr C_AsyncReadyCallback
maybeCallback Ptr ()
forall a. Ptr a
userData
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
device
    Maybe b -> (b -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe b
cancellable b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
    () -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data DeviceGetAppliedConnectionAsyncMethodInfo
instance (signature ~ (Word32 -> Maybe (b) -> Maybe (Gio.Callbacks.AsyncReadyCallback) -> m ()), MonadIO m, IsDevice a, Gio.Cancellable.IsCancellable b) => O.OverloadedMethod DeviceGetAppliedConnectionAsyncMethodInfo a signature where
    overloadedMethod = deviceGetAppliedConnectionAsync

instance O.OverloadedMethodInfo DeviceGetAppliedConnectionAsyncMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.NM.Objects.Device.deviceGetAppliedConnectionAsync",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Objects-Device.html#v:deviceGetAppliedConnectionAsync"
        })


#endif

-- method Device::get_applied_connection_finish
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "device"
--           , argType = TInterface Name { namespace = "NM" , name = "Device" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #NMDevice" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "result"
--           , argType =
--               TInterface Name { namespace = "Gio" , name = "AsyncResult" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the result passed to the #GAsyncReadyCallback"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "version_id"
--           , argType = TBasicType TUInt64
--           , direction = DirectionOut
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "the current version id of the applied\n  connection."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferEverything
--           }
--       ]
-- Lengths: []
-- returnType: Just (TInterface Name { namespace = "NM" , name = "Connection" })
-- throws : True
-- Skip return : False

foreign import ccall "nm_device_get_applied_connection_finish" nm_device_get_applied_connection_finish :: 
    Ptr Device ->                           -- device : TInterface (Name {namespace = "NM", name = "Device"})
    Ptr Gio.AsyncResult.AsyncResult ->      -- result : TInterface (Name {namespace = "Gio", name = "AsyncResult"})
    Ptr Word64 ->                           -- version_id : TBasicType TUInt64
    Ptr (Ptr GError) ->                     -- error
    IO (Ptr NM.Connection.Connection)

-- | Gets the result of a call to 'GI.NM.Objects.Device.deviceGetAppliedConnectionAsync'.
-- 
-- /Since: 1.2/
deviceGetAppliedConnectionFinish ::
    (B.CallStack.HasCallStack, MonadIO m, IsDevice a, Gio.AsyncResult.IsAsyncResult b) =>
    a
    -- ^ /@device@/: a t'GI.NM.Objects.Device.Device'
    -> b
    -- ^ /@result@/: the result passed to the t'GI.Gio.Callbacks.AsyncReadyCallback'
    -> m ((NM.Connection.Connection, Word64))
    -- ^ __Returns:__ a currently applied @/NMConnection/@ or 'P.Nothing' in case
    --   of error.
    -- 
    -- The connection is as received from D-Bus and might not validate according
    -- to 'GI.NM.Interfaces.Connection.connectionVerify'. /(Can throw 'Data.GI.Base.GError.GError')/
deviceGetAppliedConnectionFinish :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsDevice a, IsAsyncResult b) =>
a -> b -> m (Connection, Word64)
deviceGetAppliedConnectionFinish a
device b
result_ = IO (Connection, Word64) -> m (Connection, Word64)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Connection, Word64) -> m (Connection, Word64))
-> IO (Connection, Word64) -> m (Connection, Word64)
forall a b. (a -> b) -> a -> b
$ do
    Ptr Device
device' <- a -> IO (Ptr Device)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
device
    Ptr AsyncResult
result_' <- b -> IO (Ptr AsyncResult)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
result_
    Ptr Word64
versionId <- IO (Ptr Word64)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr Word64)
    IO (Connection, Word64) -> IO () -> IO (Connection, Word64)
forall a b. IO a -> IO b -> IO a
onException (do
        Ptr Connection
result <- (Ptr (Ptr GError) -> IO (Ptr Connection)) -> IO (Ptr Connection)
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO (Ptr Connection)) -> IO (Ptr Connection))
-> (Ptr (Ptr GError) -> IO (Ptr Connection)) -> IO (Ptr Connection)
forall a b. (a -> b) -> a -> b
$ Ptr Device
-> Ptr AsyncResult
-> Ptr Word64
-> Ptr (Ptr GError)
-> IO (Ptr Connection)
nm_device_get_applied_connection_finish Ptr Device
device' Ptr AsyncResult
result_' Ptr Word64
versionId
        Text -> Ptr Connection -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"deviceGetAppliedConnectionFinish" Ptr Connection
result
        Connection
result' <- ((ManagedPtr Connection -> Connection)
-> Ptr Connection -> IO Connection
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr Connection -> Connection
NM.Connection.Connection) Ptr Connection
result
        Word64
versionId' <- Ptr Word64 -> IO Word64
forall a. Storable a => Ptr a -> IO a
peek Ptr Word64
versionId
        a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
device
        b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
result_
        Ptr Word64 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Word64
versionId
        (Connection, Word64) -> IO (Connection, Word64)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return (Connection
result', Word64
versionId')
     ) (do
        Ptr Word64 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Word64
versionId
     )

#if defined(ENABLE_OVERLOADING)
data DeviceGetAppliedConnectionFinishMethodInfo
instance (signature ~ (b -> m ((NM.Connection.Connection, Word64))), MonadIO m, IsDevice a, Gio.AsyncResult.IsAsyncResult b) => O.OverloadedMethod DeviceGetAppliedConnectionFinishMethodInfo a signature where
    overloadedMethod = deviceGetAppliedConnectionFinish

instance O.OverloadedMethodInfo DeviceGetAppliedConnectionFinishMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.NM.Objects.Device.deviceGetAppliedConnectionFinish",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Objects-Device.html#v:deviceGetAppliedConnectionFinish"
        })


#endif

-- method Device::get_autoconnect
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "device"
--           , argType = TInterface Name { namespace = "NM" , name = "Device" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #NMDevice" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TBoolean)
-- throws : False
-- Skip return : False

foreign import ccall "nm_device_get_autoconnect" nm_device_get_autoconnect :: 
    Ptr Device ->                           -- device : TInterface (Name {namespace = "NM", name = "Device"})
    IO CInt

-- | Whether the t'GI.NM.Objects.Device.Device' can be autoconnected.
deviceGetAutoconnect ::
    (B.CallStack.HasCallStack, MonadIO m, IsDevice a) =>
    a
    -- ^ /@device@/: a t'GI.NM.Objects.Device.Device'
    -> m Bool
    -- ^ __Returns:__ 'P.True' if the device is allowed to be autoconnected
deviceGetAutoconnect :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsDevice a) =>
a -> m Bool
deviceGetAutoconnect a
device = IO Bool -> m Bool
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
    Ptr Device
device' <- a -> IO (Ptr Device)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
device
    CInt
result <- Ptr Device -> IO CInt
nm_device_get_autoconnect Ptr Device
device'
    let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
device
    Bool -> IO Bool
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'

#if defined(ENABLE_OVERLOADING)
data DeviceGetAutoconnectMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsDevice a) => O.OverloadedMethod DeviceGetAutoconnectMethodInfo a signature where
    overloadedMethod = deviceGetAutoconnect

instance O.OverloadedMethodInfo DeviceGetAutoconnectMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.NM.Objects.Device.deviceGetAutoconnect",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Objects-Device.html#v:deviceGetAutoconnect"
        })


#endif

-- method Device::get_available_connections
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "device"
--           , argType = TInterface Name { namespace = "NM" , name = "Device" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #NMDevice" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just
--               (TPtrArray
--                  (TInterface Name { namespace = "NM" , name = "RemoteConnection" }))
-- throws : False
-- Skip return : False

foreign import ccall "nm_device_get_available_connections" nm_device_get_available_connections :: 
    Ptr Device ->                           -- device : TInterface (Name {namespace = "NM", name = "Device"})
    IO (Ptr (GPtrArray (Ptr NM.RemoteConnection.RemoteConnection)))

-- | Gets the @/NMRemoteConnections/@ currently known to the daemon that could
-- be activated on /@device@/.
deviceGetAvailableConnections ::
    (B.CallStack.HasCallStack, MonadIO m, IsDevice a) =>
    a
    -- ^ /@device@/: a t'GI.NM.Objects.Device.Device'
    -> m [NM.RemoteConnection.RemoteConnection]
    -- ^ __Returns:__ the t'GI.GLib.Structs.PtrArray.PtrArray'
    -- containing @/NMRemoteConnections/@. This is the internal copy used by
    -- the connection, and must not be modified.
deviceGetAvailableConnections :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsDevice a) =>
a -> m [RemoteConnection]
deviceGetAvailableConnections a
device = IO [RemoteConnection] -> m [RemoteConnection]
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO [RemoteConnection] -> m [RemoteConnection])
-> IO [RemoteConnection] -> m [RemoteConnection]
forall a b. (a -> b) -> a -> b
$ do
    Ptr Device
device' <- a -> IO (Ptr Device)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
device
    Ptr (GPtrArray (Ptr RemoteConnection))
result <- Ptr Device -> IO (Ptr (GPtrArray (Ptr RemoteConnection)))
nm_device_get_available_connections Ptr Device
device'
    Text -> Ptr (GPtrArray (Ptr RemoteConnection)) -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"deviceGetAvailableConnections" Ptr (GPtrArray (Ptr RemoteConnection))
result
    [Ptr RemoteConnection]
result' <- Ptr (GPtrArray (Ptr RemoteConnection)) -> IO [Ptr RemoteConnection]
forall a. Ptr (GPtrArray (Ptr a)) -> IO [Ptr a]
unpackGPtrArray Ptr (GPtrArray (Ptr RemoteConnection))
result
    [RemoteConnection]
result'' <- (Ptr RemoteConnection -> IO RemoteConnection)
-> [Ptr RemoteConnection] -> IO [RemoteConnection]
forall (t :: * -> *) (m :: * -> *) a b.
(Traversable t, Monad m) =>
(a -> m b) -> t a -> m (t b)
forall (m :: * -> *) a b. Monad m => (a -> m b) -> [a] -> m [b]
mapM ((ManagedPtr RemoteConnection -> RemoteConnection)
-> Ptr RemoteConnection -> IO RemoteConnection
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr RemoteConnection -> RemoteConnection
NM.RemoteConnection.RemoteConnection) [Ptr RemoteConnection]
result'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
device
    [RemoteConnection] -> IO [RemoteConnection]
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return [RemoteConnection]
result''

#if defined(ENABLE_OVERLOADING)
data DeviceGetAvailableConnectionsMethodInfo
instance (signature ~ (m [NM.RemoteConnection.RemoteConnection]), MonadIO m, IsDevice a) => O.OverloadedMethod DeviceGetAvailableConnectionsMethodInfo a signature where
    overloadedMethod = deviceGetAvailableConnections

instance O.OverloadedMethodInfo DeviceGetAvailableConnectionsMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.NM.Objects.Device.deviceGetAvailableConnections",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Objects-Device.html#v:deviceGetAvailableConnections"
        })


#endif

-- method Device::get_capabilities
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "device"
--           , argType = TInterface Name { namespace = "NM" , name = "Device" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #NMDevice" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just
--               (TInterface
--                  Name { namespace = "NM" , name = "DeviceCapabilities" })
-- throws : False
-- Skip return : False

foreign import ccall "nm_device_get_capabilities" nm_device_get_capabilities :: 
    Ptr Device ->                           -- device : TInterface (Name {namespace = "NM", name = "Device"})
    IO CUInt

-- | Gets the device\' capabilities.
deviceGetCapabilities ::
    (B.CallStack.HasCallStack, MonadIO m, IsDevice a) =>
    a
    -- ^ /@device@/: a t'GI.NM.Objects.Device.Device'
    -> m [NM.Flags.DeviceCapabilities]
    -- ^ __Returns:__ the capabilities
deviceGetCapabilities :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsDevice a) =>
a -> m [DeviceCapabilities]
deviceGetCapabilities a
device = IO [DeviceCapabilities] -> m [DeviceCapabilities]
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO [DeviceCapabilities] -> m [DeviceCapabilities])
-> IO [DeviceCapabilities] -> m [DeviceCapabilities]
forall a b. (a -> b) -> a -> b
$ do
    Ptr Device
device' <- a -> IO (Ptr Device)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
device
    CUInt
result <- Ptr Device -> IO CUInt
nm_device_get_capabilities Ptr Device
device'
    let result' :: [DeviceCapabilities]
result' = CUInt -> [DeviceCapabilities]
forall a b. (Storable a, Integral a, Bits a, IsGFlag b) => a -> [b]
wordToGFlags CUInt
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
device
    [DeviceCapabilities] -> IO [DeviceCapabilities]
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return [DeviceCapabilities]
result'

#if defined(ENABLE_OVERLOADING)
data DeviceGetCapabilitiesMethodInfo
instance (signature ~ (m [NM.Flags.DeviceCapabilities]), MonadIO m, IsDevice a) => O.OverloadedMethod DeviceGetCapabilitiesMethodInfo a signature where
    overloadedMethod = deviceGetCapabilities

instance O.OverloadedMethodInfo DeviceGetCapabilitiesMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.NM.Objects.Device.deviceGetCapabilities",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Objects-Device.html#v:deviceGetCapabilities"
        })


#endif

-- method Device::get_connectivity
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "device"
--           , argType = TInterface Name { namespace = "NM" , name = "Device" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #NMDevice" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "addr_family"
--           , argType = TBasicType TInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "network address family"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just
--               (TInterface Name { namespace = "NM" , name = "ConnectivityState" })
-- throws : False
-- Skip return : False

foreign import ccall "nm_device_get_connectivity" nm_device_get_connectivity :: 
    Ptr Device ->                           -- device : TInterface (Name {namespace = "NM", name = "Device"})
    Int32 ->                                -- addr_family : TBasicType TInt
    IO CUInt

-- | The connectivity state of the device for given address family.
-- Supported address families are @/AF_INET/@ for IPv4, @/AF_INET6/@
-- for IPv6 or @/AF_UNSPEC/@ for any.
-- 
-- /Since: 1.16/
deviceGetConnectivity ::
    (B.CallStack.HasCallStack, MonadIO m, IsDevice a) =>
    a
    -- ^ /@device@/: a t'GI.NM.Objects.Device.Device'
    -> Int32
    -- ^ /@addrFamily@/: network address family
    -> m NM.Enums.ConnectivityState
    -- ^ __Returns:__ the current connectivity state
deviceGetConnectivity :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsDevice a) =>
a -> Int32 -> m ConnectivityState
deviceGetConnectivity a
device Int32
addrFamily = IO ConnectivityState -> m ConnectivityState
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO ConnectivityState -> m ConnectivityState)
-> IO ConnectivityState -> m ConnectivityState
forall a b. (a -> b) -> a -> b
$ do
    Ptr Device
device' <- a -> IO (Ptr Device)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
device
    CUInt
result <- Ptr Device -> Int32 -> IO CUInt
nm_device_get_connectivity Ptr Device
device' Int32
addrFamily
    let result' :: ConnectivityState
result' = (Int -> ConnectivityState
forall a. Enum a => Int -> a
toEnum (Int -> ConnectivityState)
-> (CUInt -> Int) -> CUInt -> ConnectivityState
forall b c a. (b -> c) -> (a -> b) -> a -> c
. CUInt -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral) CUInt
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
device
    ConnectivityState -> IO ConnectivityState
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ConnectivityState
result'

#if defined(ENABLE_OVERLOADING)
data DeviceGetConnectivityMethodInfo
instance (signature ~ (Int32 -> m NM.Enums.ConnectivityState), MonadIO m, IsDevice a) => O.OverloadedMethod DeviceGetConnectivityMethodInfo a signature where
    overloadedMethod = deviceGetConnectivity

instance O.OverloadedMethodInfo DeviceGetConnectivityMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.NM.Objects.Device.deviceGetConnectivity",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Objects-Device.html#v:deviceGetConnectivity"
        })


#endif

-- method Device::get_description
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "device"
--           , argType = TInterface Name { namespace = "NM" , name = "Device" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "an #NMDevice" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TUTF8)
-- throws : False
-- Skip return : False

foreign import ccall "nm_device_get_description" nm_device_get_description :: 
    Ptr Device ->                           -- device : TInterface (Name {namespace = "NM", name = "Device"})
    IO CString

-- | Gets a description of /@device@/, based on its vendor and product names.
deviceGetDescription ::
    (B.CallStack.HasCallStack, MonadIO m, IsDevice a) =>
    a
    -- ^ /@device@/: an t'GI.NM.Objects.Device.Device'
    -> m T.Text
    -- ^ __Returns:__ a description of /@device@/. If either the vendor or the
    --   product name is unknown, this returns the interface name.
deviceGetDescription :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsDevice a) =>
a -> m Text
deviceGetDescription a
device = IO Text -> m Text
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Text -> m Text) -> IO Text -> m Text
forall a b. (a -> b) -> a -> b
$ do
    Ptr Device
device' <- a -> IO (Ptr Device)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
device
    CString
result <- Ptr Device -> IO CString
nm_device_get_description Ptr Device
device'
    Text -> CString -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"deviceGetDescription" CString
result
    Text
result' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
device
    Text -> IO Text
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Text
result'

#if defined(ENABLE_OVERLOADING)
data DeviceGetDescriptionMethodInfo
instance (signature ~ (m T.Text), MonadIO m, IsDevice a) => O.OverloadedMethod DeviceGetDescriptionMethodInfo a signature where
    overloadedMethod = deviceGetDescription

instance O.OverloadedMethodInfo DeviceGetDescriptionMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.NM.Objects.Device.deviceGetDescription",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Objects-Device.html#v:deviceGetDescription"
        })


#endif

-- method Device::get_device_type
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "device"
--           , argType = TInterface Name { namespace = "NM" , name = "Device" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #NMDevice" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TInterface Name { namespace = "NM" , name = "DeviceType" })
-- throws : False
-- Skip return : False

foreign import ccall "nm_device_get_device_type" nm_device_get_device_type :: 
    Ptr Device ->                           -- device : TInterface (Name {namespace = "NM", name = "Device"})
    IO CUInt

-- | Returns the numeric type of the t'GI.NM.Objects.Device.Device', ie Ethernet, Wi-Fi, etc.
deviceGetDeviceType ::
    (B.CallStack.HasCallStack, MonadIO m, IsDevice a) =>
    a
    -- ^ /@device@/: a t'GI.NM.Objects.Device.Device'
    -> m NM.Enums.DeviceType
    -- ^ __Returns:__ the device type
deviceGetDeviceType :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsDevice a) =>
a -> m DeviceType
deviceGetDeviceType a
device = IO DeviceType -> m DeviceType
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO DeviceType -> m DeviceType) -> IO DeviceType -> m DeviceType
forall a b. (a -> b) -> a -> b
$ do
    Ptr Device
device' <- a -> IO (Ptr Device)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
device
    CUInt
result <- Ptr Device -> IO CUInt
nm_device_get_device_type Ptr Device
device'
    let result' :: DeviceType
result' = (Int -> DeviceType
forall a. Enum a => Int -> a
toEnum (Int -> DeviceType) -> (CUInt -> Int) -> CUInt -> DeviceType
forall b c a. (b -> c) -> (a -> b) -> a -> c
. CUInt -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral) CUInt
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
device
    DeviceType -> IO DeviceType
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return DeviceType
result'

#if defined(ENABLE_OVERLOADING)
data DeviceGetDeviceTypeMethodInfo
instance (signature ~ (m NM.Enums.DeviceType), MonadIO m, IsDevice a) => O.OverloadedMethod DeviceGetDeviceTypeMethodInfo a signature where
    overloadedMethod = deviceGetDeviceType

instance O.OverloadedMethodInfo DeviceGetDeviceTypeMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.NM.Objects.Device.deviceGetDeviceType",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Objects-Device.html#v:deviceGetDeviceType"
        })


#endif

-- method Device::get_dhcp4_config
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "device"
--           , argType = TInterface Name { namespace = "NM" , name = "Device" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #NMDevice" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TInterface Name { namespace = "NM" , name = "DhcpConfig" })
-- throws : False
-- Skip return : False

foreign import ccall "nm_device_get_dhcp4_config" nm_device_get_dhcp4_config :: 
    Ptr Device ->                           -- device : TInterface (Name {namespace = "NM", name = "Device"})
    IO (Ptr NM.DhcpConfig.DhcpConfig)

-- | Gets the current IPv4 t'GI.NM.Objects.DhcpConfig.DhcpConfig' associated with the t'GI.NM.Objects.Device.Device'.
-- 
-- You can alternatively use 'GI.NM.Objects.ActiveConnection.activeConnectionGetDhcp4Config', which also
-- works with VPN connections.
deviceGetDhcp4Config ::
    (B.CallStack.HasCallStack, MonadIO m, IsDevice a) =>
    a
    -- ^ /@device@/: a t'GI.NM.Objects.Device.Device'
    -> m NM.DhcpConfig.DhcpConfig
    -- ^ __Returns:__ the IPv4 t'GI.NM.Objects.DhcpConfig.DhcpConfig', or 'P.Nothing' if the device is
    -- not activated or not using DHCP.
deviceGetDhcp4Config :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsDevice a) =>
a -> m DhcpConfig
deviceGetDhcp4Config a
device = IO DhcpConfig -> m DhcpConfig
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO DhcpConfig -> m DhcpConfig) -> IO DhcpConfig -> m DhcpConfig
forall a b. (a -> b) -> a -> b
$ do
    Ptr Device
device' <- a -> IO (Ptr Device)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
device
    Ptr DhcpConfig
result <- Ptr Device -> IO (Ptr DhcpConfig)
nm_device_get_dhcp4_config Ptr Device
device'
    Text -> Ptr DhcpConfig -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"deviceGetDhcp4Config" Ptr DhcpConfig
result
    DhcpConfig
result' <- ((ManagedPtr DhcpConfig -> DhcpConfig)
-> Ptr DhcpConfig -> IO DhcpConfig
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr DhcpConfig -> DhcpConfig
NM.DhcpConfig.DhcpConfig) Ptr DhcpConfig
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
device
    DhcpConfig -> IO DhcpConfig
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return DhcpConfig
result'

#if defined(ENABLE_OVERLOADING)
data DeviceGetDhcp4ConfigMethodInfo
instance (signature ~ (m NM.DhcpConfig.DhcpConfig), MonadIO m, IsDevice a) => O.OverloadedMethod DeviceGetDhcp4ConfigMethodInfo a signature where
    overloadedMethod = deviceGetDhcp4Config

instance O.OverloadedMethodInfo DeviceGetDhcp4ConfigMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.NM.Objects.Device.deviceGetDhcp4Config",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Objects-Device.html#v:deviceGetDhcp4Config"
        })


#endif

-- method Device::get_dhcp6_config
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "device"
--           , argType = TInterface Name { namespace = "NM" , name = "Device" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #NMDevice" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TInterface Name { namespace = "NM" , name = "DhcpConfig" })
-- throws : False
-- Skip return : False

foreign import ccall "nm_device_get_dhcp6_config" nm_device_get_dhcp6_config :: 
    Ptr Device ->                           -- device : TInterface (Name {namespace = "NM", name = "Device"})
    IO (Ptr NM.DhcpConfig.DhcpConfig)

-- | Gets the current IPv6 t'GI.NM.Objects.DhcpConfig.DhcpConfig' associated with the t'GI.NM.Objects.Device.Device'.
-- 
-- You can alternatively use 'GI.NM.Objects.ActiveConnection.activeConnectionGetDhcp6Config', which also
-- works with VPN connections.
deviceGetDhcp6Config ::
    (B.CallStack.HasCallStack, MonadIO m, IsDevice a) =>
    a
    -- ^ /@device@/: a t'GI.NM.Objects.Device.Device'
    -> m NM.DhcpConfig.DhcpConfig
    -- ^ __Returns:__ the IPv6 t'GI.NM.Objects.DhcpConfig.DhcpConfig', or 'P.Nothing' if the device is
    -- not activated or not using DHCPv6.
deviceGetDhcp6Config :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsDevice a) =>
a -> m DhcpConfig
deviceGetDhcp6Config a
device = IO DhcpConfig -> m DhcpConfig
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO DhcpConfig -> m DhcpConfig) -> IO DhcpConfig -> m DhcpConfig
forall a b. (a -> b) -> a -> b
$ do
    Ptr Device
device' <- a -> IO (Ptr Device)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
device
    Ptr DhcpConfig
result <- Ptr Device -> IO (Ptr DhcpConfig)
nm_device_get_dhcp6_config Ptr Device
device'
    Text -> Ptr DhcpConfig -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"deviceGetDhcp6Config" Ptr DhcpConfig
result
    DhcpConfig
result' <- ((ManagedPtr DhcpConfig -> DhcpConfig)
-> Ptr DhcpConfig -> IO DhcpConfig
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr DhcpConfig -> DhcpConfig
NM.DhcpConfig.DhcpConfig) Ptr DhcpConfig
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
device
    DhcpConfig -> IO DhcpConfig
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return DhcpConfig
result'

#if defined(ENABLE_OVERLOADING)
data DeviceGetDhcp6ConfigMethodInfo
instance (signature ~ (m NM.DhcpConfig.DhcpConfig), MonadIO m, IsDevice a) => O.OverloadedMethod DeviceGetDhcp6ConfigMethodInfo a signature where
    overloadedMethod = deviceGetDhcp6Config

instance O.OverloadedMethodInfo DeviceGetDhcp6ConfigMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.NM.Objects.Device.deviceGetDhcp6Config",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Objects-Device.html#v:deviceGetDhcp6Config"
        })


#endif

-- method Device::get_driver
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "device"
--           , argType = TInterface Name { namespace = "NM" , name = "Device" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #NMDevice" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TUTF8)
-- throws : False
-- Skip return : False

foreign import ccall "nm_device_get_driver" nm_device_get_driver :: 
    Ptr Device ->                           -- device : TInterface (Name {namespace = "NM", name = "Device"})
    IO CString

-- | Gets the driver of the t'GI.NM.Objects.Device.Device'.
deviceGetDriver ::
    (B.CallStack.HasCallStack, MonadIO m, IsDevice a) =>
    a
    -- ^ /@device@/: a t'GI.NM.Objects.Device.Device'
    -> m T.Text
    -- ^ __Returns:__ the driver of the device. This is the internal string used by the
    -- device, and must not be modified.
deviceGetDriver :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsDevice a) =>
a -> m Text
deviceGetDriver a
device = IO Text -> m Text
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Text -> m Text) -> IO Text -> m Text
forall a b. (a -> b) -> a -> b
$ do
    Ptr Device
device' <- a -> IO (Ptr Device)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
device
    CString
result <- Ptr Device -> IO CString
nm_device_get_driver Ptr Device
device'
    Text -> CString -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"deviceGetDriver" CString
result
    Text
result' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
device
    Text -> IO Text
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Text
result'

#if defined(ENABLE_OVERLOADING)
data DeviceGetDriverMethodInfo
instance (signature ~ (m T.Text), MonadIO m, IsDevice a) => O.OverloadedMethod DeviceGetDriverMethodInfo a signature where
    overloadedMethod = deviceGetDriver

instance O.OverloadedMethodInfo DeviceGetDriverMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.NM.Objects.Device.deviceGetDriver",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Objects-Device.html#v:deviceGetDriver"
        })


#endif

-- method Device::get_driver_version
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "device"
--           , argType = TInterface Name { namespace = "NM" , name = "Device" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #NMDevice" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TUTF8)
-- throws : False
-- Skip return : False

foreign import ccall "nm_device_get_driver_version" nm_device_get_driver_version :: 
    Ptr Device ->                           -- device : TInterface (Name {namespace = "NM", name = "Device"})
    IO CString

-- | Gets the driver version of the t'GI.NM.Objects.Device.Device'.
deviceGetDriverVersion ::
    (B.CallStack.HasCallStack, MonadIO m, IsDevice a) =>
    a
    -- ^ /@device@/: a t'GI.NM.Objects.Device.Device'
    -> m T.Text
    -- ^ __Returns:__ the version of the device driver. This is the internal string used by the
    -- device, and must not be modified.
deviceGetDriverVersion :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsDevice a) =>
a -> m Text
deviceGetDriverVersion a
device = IO Text -> m Text
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Text -> m Text) -> IO Text -> m Text
forall a b. (a -> b) -> a -> b
$ do
    Ptr Device
device' <- a -> IO (Ptr Device)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
device
    CString
result <- Ptr Device -> IO CString
nm_device_get_driver_version Ptr Device
device'
    Text -> CString -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"deviceGetDriverVersion" CString
result
    Text
result' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
device
    Text -> IO Text
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Text
result'

#if defined(ENABLE_OVERLOADING)
data DeviceGetDriverVersionMethodInfo
instance (signature ~ (m T.Text), MonadIO m, IsDevice a) => O.OverloadedMethod DeviceGetDriverVersionMethodInfo a signature where
    overloadedMethod = deviceGetDriverVersion

instance O.OverloadedMethodInfo DeviceGetDriverVersionMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.NM.Objects.Device.deviceGetDriverVersion",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Objects-Device.html#v:deviceGetDriverVersion"
        })


#endif

-- method Device::get_firmware_missing
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "device"
--           , argType = TInterface Name { namespace = "NM" , name = "Device" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #NMDevice" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TBoolean)
-- throws : False
-- Skip return : False

foreign import ccall "nm_device_get_firmware_missing" nm_device_get_firmware_missing :: 
    Ptr Device ->                           -- device : TInterface (Name {namespace = "NM", name = "Device"})
    IO CInt

-- | Indicates that firmware required for the device\'s operation is likely
-- to be missing.
deviceGetFirmwareMissing ::
    (B.CallStack.HasCallStack, MonadIO m, IsDevice a) =>
    a
    -- ^ /@device@/: a t'GI.NM.Objects.Device.Device'
    -> m Bool
    -- ^ __Returns:__ 'P.True' if firmware required for the device\'s operation is likely
    -- to be missing.
deviceGetFirmwareMissing :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsDevice a) =>
a -> m Bool
deviceGetFirmwareMissing a
device = IO Bool -> m Bool
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
    Ptr Device
device' <- a -> IO (Ptr Device)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
device
    CInt
result <- Ptr Device -> IO CInt
nm_device_get_firmware_missing Ptr Device
device'
    let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
device
    Bool -> IO Bool
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'

#if defined(ENABLE_OVERLOADING)
data DeviceGetFirmwareMissingMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsDevice a) => O.OverloadedMethod DeviceGetFirmwareMissingMethodInfo a signature where
    overloadedMethod = deviceGetFirmwareMissing

instance O.OverloadedMethodInfo DeviceGetFirmwareMissingMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.NM.Objects.Device.deviceGetFirmwareMissing",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Objects-Device.html#v:deviceGetFirmwareMissing"
        })


#endif

-- method Device::get_firmware_version
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "device"
--           , argType = TInterface Name { namespace = "NM" , name = "Device" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #NMDevice" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TUTF8)
-- throws : False
-- Skip return : False

foreign import ccall "nm_device_get_firmware_version" nm_device_get_firmware_version :: 
    Ptr Device ->                           -- device : TInterface (Name {namespace = "NM", name = "Device"})
    IO CString

-- | Gets the firmware version of the t'GI.NM.Objects.Device.Device'.
deviceGetFirmwareVersion ::
    (B.CallStack.HasCallStack, MonadIO m, IsDevice a) =>
    a
    -- ^ /@device@/: a t'GI.NM.Objects.Device.Device'
    -> m T.Text
    -- ^ __Returns:__ the firmware version of the device. This is the internal string used by the
    -- device, and must not be modified.
deviceGetFirmwareVersion :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsDevice a) =>
a -> m Text
deviceGetFirmwareVersion a
device = IO Text -> m Text
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Text -> m Text) -> IO Text -> m Text
forall a b. (a -> b) -> a -> b
$ do
    Ptr Device
device' <- a -> IO (Ptr Device)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
device
    CString
result <- Ptr Device -> IO CString
nm_device_get_firmware_version Ptr Device
device'
    Text -> CString -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"deviceGetFirmwareVersion" CString
result
    Text
result' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
device
    Text -> IO Text
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Text
result'

#if defined(ENABLE_OVERLOADING)
data DeviceGetFirmwareVersionMethodInfo
instance (signature ~ (m T.Text), MonadIO m, IsDevice a) => O.OverloadedMethod DeviceGetFirmwareVersionMethodInfo a signature where
    overloadedMethod = deviceGetFirmwareVersion

instance O.OverloadedMethodInfo DeviceGetFirmwareVersionMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.NM.Objects.Device.deviceGetFirmwareVersion",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Objects-Device.html#v:deviceGetFirmwareVersion"
        })


#endif

-- method Device::get_hw_address
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "device"
--           , argType = TInterface Name { namespace = "NM" , name = "Device" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #NMDevice" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TUTF8)
-- throws : False
-- Skip return : False

foreign import ccall "nm_device_get_hw_address" nm_device_get_hw_address :: 
    Ptr Device ->                           -- device : TInterface (Name {namespace = "NM", name = "Device"})
    IO CString

-- | Gets the current a hardware address (MAC) for the /@device@/.
deviceGetHwAddress ::
    (B.CallStack.HasCallStack, MonadIO m, IsDevice a) =>
    a
    -- ^ /@device@/: a t'GI.NM.Objects.Device.Device'
    -> m T.Text
    -- ^ __Returns:__ the current MAC of the device, or 'P.Nothing'.
    -- This is the internal string used by the device, and must not be modified.
deviceGetHwAddress :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsDevice a) =>
a -> m Text
deviceGetHwAddress a
device = IO Text -> m Text
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Text -> m Text) -> IO Text -> m Text
forall a b. (a -> b) -> a -> b
$ do
    Ptr Device
device' <- a -> IO (Ptr Device)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
device
    CString
result <- Ptr Device -> IO CString
nm_device_get_hw_address Ptr Device
device'
    Text -> CString -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"deviceGetHwAddress" CString
result
    Text
result' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
device
    Text -> IO Text
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Text
result'

#if defined(ENABLE_OVERLOADING)
data DeviceGetHwAddressMethodInfo
instance (signature ~ (m T.Text), MonadIO m, IsDevice a) => O.OverloadedMethod DeviceGetHwAddressMethodInfo a signature where
    overloadedMethod = deviceGetHwAddress

instance O.OverloadedMethodInfo DeviceGetHwAddressMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.NM.Objects.Device.deviceGetHwAddress",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Objects-Device.html#v:deviceGetHwAddress"
        })


#endif

-- method Device::get_iface
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "device"
--           , argType = TInterface Name { namespace = "NM" , name = "Device" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #NMDevice" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TUTF8)
-- throws : False
-- Skip return : False

foreign import ccall "nm_device_get_iface" nm_device_get_iface :: 
    Ptr Device ->                           -- device : TInterface (Name {namespace = "NM", name = "Device"})
    IO CString

-- | Gets the interface name of the t'GI.NM.Objects.Device.Device'.
deviceGetIface ::
    (B.CallStack.HasCallStack, MonadIO m, IsDevice a) =>
    a
    -- ^ /@device@/: a t'GI.NM.Objects.Device.Device'
    -> m T.Text
    -- ^ __Returns:__ the interface of the device. This is the internal string used by the
    -- device, and must not be modified.
deviceGetIface :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsDevice a) =>
a -> m Text
deviceGetIface a
device = IO Text -> m Text
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Text -> m Text) -> IO Text -> m Text
forall a b. (a -> b) -> a -> b
$ do
    Ptr Device
device' <- a -> IO (Ptr Device)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
device
    CString
result <- Ptr Device -> IO CString
nm_device_get_iface Ptr Device
device'
    Text -> CString -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"deviceGetIface" CString
result
    Text
result' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
device
    Text -> IO Text
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Text
result'

#if defined(ENABLE_OVERLOADING)
data DeviceGetIfaceMethodInfo
instance (signature ~ (m T.Text), MonadIO m, IsDevice a) => O.OverloadedMethod DeviceGetIfaceMethodInfo a signature where
    overloadedMethod = deviceGetIface

instance O.OverloadedMethodInfo DeviceGetIfaceMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.NM.Objects.Device.deviceGetIface",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Objects-Device.html#v:deviceGetIface"
        })


#endif

-- method Device::get_interface_flags
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "device"
--           , argType = TInterface Name { namespace = "NM" , name = "Device" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #NMDevice" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just
--               (TInterface
--                  Name { namespace = "NM" , name = "DeviceInterfaceFlags" })
-- throws : False
-- Skip return : False

foreign import ccall "nm_device_get_interface_flags" nm_device_get_interface_flags :: 
    Ptr Device ->                           -- device : TInterface (Name {namespace = "NM", name = "Device"})
    IO CUInt

-- | Gets the interface flags of the device.
-- 
-- /Since: 1.22/
deviceGetInterfaceFlags ::
    (B.CallStack.HasCallStack, MonadIO m, IsDevice a) =>
    a
    -- ^ /@device@/: a t'GI.NM.Objects.Device.Device'
    -> m [NM.Flags.DeviceInterfaceFlags]
    -- ^ __Returns:__ the flags
deviceGetInterfaceFlags :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsDevice a) =>
a -> m [DeviceInterfaceFlags]
deviceGetInterfaceFlags a
device = IO [DeviceInterfaceFlags] -> m [DeviceInterfaceFlags]
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO [DeviceInterfaceFlags] -> m [DeviceInterfaceFlags])
-> IO [DeviceInterfaceFlags] -> m [DeviceInterfaceFlags]
forall a b. (a -> b) -> a -> b
$ do
    Ptr Device
device' <- a -> IO (Ptr Device)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
device
    CUInt
result <- Ptr Device -> IO CUInt
nm_device_get_interface_flags Ptr Device
device'
    let result' :: [DeviceInterfaceFlags]
result' = CUInt -> [DeviceInterfaceFlags]
forall a b. (Storable a, Integral a, Bits a, IsGFlag b) => a -> [b]
wordToGFlags CUInt
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
device
    [DeviceInterfaceFlags] -> IO [DeviceInterfaceFlags]
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return [DeviceInterfaceFlags]
result'

#if defined(ENABLE_OVERLOADING)
data DeviceGetInterfaceFlagsMethodInfo
instance (signature ~ (m [NM.Flags.DeviceInterfaceFlags]), MonadIO m, IsDevice a) => O.OverloadedMethod DeviceGetInterfaceFlagsMethodInfo a signature where
    overloadedMethod = deviceGetInterfaceFlags

instance O.OverloadedMethodInfo DeviceGetInterfaceFlagsMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.NM.Objects.Device.deviceGetInterfaceFlags",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Objects-Device.html#v:deviceGetInterfaceFlags"
        })


#endif

-- method Device::get_ip4_config
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "device"
--           , argType = TInterface Name { namespace = "NM" , name = "Device" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #NMDevice" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TInterface Name { namespace = "NM" , name = "IPConfig" })
-- throws : False
-- Skip return : False

foreign import ccall "nm_device_get_ip4_config" nm_device_get_ip4_config :: 
    Ptr Device ->                           -- device : TInterface (Name {namespace = "NM", name = "Device"})
    IO (Ptr NM.IPConfig.IPConfig)

-- | Gets the current IPv4 t'GI.NM.Objects.IPConfig.IPConfig' associated with the t'GI.NM.Objects.Device.Device'.
-- 
-- You can alternatively use 'GI.NM.Objects.ActiveConnection.activeConnectionGetIp4Config', which also
-- works with VPN connections.
deviceGetIp4Config ::
    (B.CallStack.HasCallStack, MonadIO m, IsDevice a) =>
    a
    -- ^ /@device@/: a t'GI.NM.Objects.Device.Device'
    -> m NM.IPConfig.IPConfig
    -- ^ __Returns:__ the IPv4 t'GI.NM.Objects.IPConfig.IPConfig', or 'P.Nothing' if the device is not
    -- activated.
deviceGetIp4Config :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsDevice a) =>
a -> m IPConfig
deviceGetIp4Config a
device = IO IPConfig -> m IPConfig
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO IPConfig -> m IPConfig) -> IO IPConfig -> m IPConfig
forall a b. (a -> b) -> a -> b
$ do
    Ptr Device
device' <- a -> IO (Ptr Device)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
device
    Ptr IPConfig
result <- Ptr Device -> IO (Ptr IPConfig)
nm_device_get_ip4_config Ptr Device
device'
    Text -> Ptr IPConfig -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"deviceGetIp4Config" Ptr IPConfig
result
    IPConfig
result' <- ((ManagedPtr IPConfig -> IPConfig) -> Ptr IPConfig -> IO IPConfig
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr IPConfig -> IPConfig
NM.IPConfig.IPConfig) Ptr IPConfig
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
device
    IPConfig -> IO IPConfig
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return IPConfig
result'

#if defined(ENABLE_OVERLOADING)
data DeviceGetIp4ConfigMethodInfo
instance (signature ~ (m NM.IPConfig.IPConfig), MonadIO m, IsDevice a) => O.OverloadedMethod DeviceGetIp4ConfigMethodInfo a signature where
    overloadedMethod = deviceGetIp4Config

instance O.OverloadedMethodInfo DeviceGetIp4ConfigMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.NM.Objects.Device.deviceGetIp4Config",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Objects-Device.html#v:deviceGetIp4Config"
        })


#endif

-- method Device::get_ip6_config
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "device"
--           , argType = TInterface Name { namespace = "NM" , name = "Device" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #NMDevice" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TInterface Name { namespace = "NM" , name = "IPConfig" })
-- throws : False
-- Skip return : False

foreign import ccall "nm_device_get_ip6_config" nm_device_get_ip6_config :: 
    Ptr Device ->                           -- device : TInterface (Name {namespace = "NM", name = "Device"})
    IO (Ptr NM.IPConfig.IPConfig)

-- | Gets the current IPv6 t'GI.NM.Objects.IPConfig.IPConfig' associated with the t'GI.NM.Objects.Device.Device'.
-- 
-- You can alternatively use 'GI.NM.Objects.ActiveConnection.activeConnectionGetIp6Config', which also
-- works with VPN connections.
deviceGetIp6Config ::
    (B.CallStack.HasCallStack, MonadIO m, IsDevice a) =>
    a
    -- ^ /@device@/: a t'GI.NM.Objects.Device.Device'
    -> m NM.IPConfig.IPConfig
    -- ^ __Returns:__ the IPv6 t'GI.NM.Objects.IPConfig.IPConfig' or 'P.Nothing' if the device is not activated.
deviceGetIp6Config :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsDevice a) =>
a -> m IPConfig
deviceGetIp6Config a
device = IO IPConfig -> m IPConfig
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO IPConfig -> m IPConfig) -> IO IPConfig -> m IPConfig
forall a b. (a -> b) -> a -> b
$ do
    Ptr Device
device' <- a -> IO (Ptr Device)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
device
    Ptr IPConfig
result <- Ptr Device -> IO (Ptr IPConfig)
nm_device_get_ip6_config Ptr Device
device'
    Text -> Ptr IPConfig -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"deviceGetIp6Config" Ptr IPConfig
result
    IPConfig
result' <- ((ManagedPtr IPConfig -> IPConfig) -> Ptr IPConfig -> IO IPConfig
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr IPConfig -> IPConfig
NM.IPConfig.IPConfig) Ptr IPConfig
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
device
    IPConfig -> IO IPConfig
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return IPConfig
result'

#if defined(ENABLE_OVERLOADING)
data DeviceGetIp6ConfigMethodInfo
instance (signature ~ (m NM.IPConfig.IPConfig), MonadIO m, IsDevice a) => O.OverloadedMethod DeviceGetIp6ConfigMethodInfo a signature where
    overloadedMethod = deviceGetIp6Config

instance O.OverloadedMethodInfo DeviceGetIp6ConfigMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.NM.Objects.Device.deviceGetIp6Config",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Objects-Device.html#v:deviceGetIp6Config"
        })


#endif

-- method Device::get_ip_iface
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "device"
--           , argType = TInterface Name { namespace = "NM" , name = "Device" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #NMDevice" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TUTF8)
-- throws : False
-- Skip return : False

foreign import ccall "nm_device_get_ip_iface" nm_device_get_ip_iface :: 
    Ptr Device ->                           -- device : TInterface (Name {namespace = "NM", name = "Device"})
    IO CString

-- | Gets the IP interface name of the t'GI.NM.Objects.Device.Device' over which IP traffic flows
-- when the device is in the ACTIVATED state.
deviceGetIpIface ::
    (B.CallStack.HasCallStack, MonadIO m, IsDevice a) =>
    a
    -- ^ /@device@/: a t'GI.NM.Objects.Device.Device'
    -> m T.Text
    -- ^ __Returns:__ the IP traffic interface of the device. This is the internal string
    -- used by the device, and must not be modified.
deviceGetIpIface :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsDevice a) =>
a -> m Text
deviceGetIpIface a
device = IO Text -> m Text
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Text -> m Text) -> IO Text -> m Text
forall a b. (a -> b) -> a -> b
$ do
    Ptr Device
device' <- a -> IO (Ptr Device)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
device
    CString
result <- Ptr Device -> IO CString
nm_device_get_ip_iface Ptr Device
device'
    Text -> CString -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"deviceGetIpIface" CString
result
    Text
result' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
device
    Text -> IO Text
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Text
result'

#if defined(ENABLE_OVERLOADING)
data DeviceGetIpIfaceMethodInfo
instance (signature ~ (m T.Text), MonadIO m, IsDevice a) => O.OverloadedMethod DeviceGetIpIfaceMethodInfo a signature where
    overloadedMethod = deviceGetIpIface

instance O.OverloadedMethodInfo DeviceGetIpIfaceMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.NM.Objects.Device.deviceGetIpIface",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Objects-Device.html#v:deviceGetIpIface"
        })


#endif

-- method Device::get_lldp_neighbors
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "device"
--           , argType = TInterface Name { namespace = "NM" , name = "Device" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #NMDevice" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just
--               (TPtrArray
--                  (TInterface Name { namespace = "NM" , name = "LldpNeighbor" }))
-- throws : False
-- Skip return : False

foreign import ccall "nm_device_get_lldp_neighbors" nm_device_get_lldp_neighbors :: 
    Ptr Device ->                           -- device : TInterface (Name {namespace = "NM", name = "Device"})
    IO (Ptr (GPtrArray (Ptr NM.LldpNeighbor.LldpNeighbor)))

-- | Gets the list of neighbors discovered through LLDP.
-- 
-- /Since: 1.2/
deviceGetLldpNeighbors ::
    (B.CallStack.HasCallStack, MonadIO m, IsDevice a) =>
    a
    -- ^ /@device@/: a t'GI.NM.Objects.Device.Device'
    -> m [NM.LldpNeighbor.LldpNeighbor]
    -- ^ __Returns:__ the t'GI.GLib.Structs.PtrArray.PtrArray'
    -- containing t'GI.NM.Structs.LldpNeighbor.LldpNeighbor's. This is the internal copy used by the
    -- device and must not be modified. The library never modifies the returned
    -- array and thus it is safe for callers to reference and keep using it.
deviceGetLldpNeighbors :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsDevice a) =>
a -> m [LldpNeighbor]
deviceGetLldpNeighbors a
device = IO [LldpNeighbor] -> m [LldpNeighbor]
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO [LldpNeighbor] -> m [LldpNeighbor])
-> IO [LldpNeighbor] -> m [LldpNeighbor]
forall a b. (a -> b) -> a -> b
$ do
    Ptr Device
device' <- a -> IO (Ptr Device)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
device
    Ptr (GPtrArray (Ptr LldpNeighbor))
result <- Ptr Device -> IO (Ptr (GPtrArray (Ptr LldpNeighbor)))
nm_device_get_lldp_neighbors Ptr Device
device'
    Text -> Ptr (GPtrArray (Ptr LldpNeighbor)) -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"deviceGetLldpNeighbors" Ptr (GPtrArray (Ptr LldpNeighbor))
result
    [Ptr LldpNeighbor]
result' <- Ptr (GPtrArray (Ptr LldpNeighbor)) -> IO [Ptr LldpNeighbor]
forall a. Ptr (GPtrArray (Ptr a)) -> IO [Ptr a]
unpackGPtrArray Ptr (GPtrArray (Ptr LldpNeighbor))
result
    [LldpNeighbor]
result'' <- (Ptr LldpNeighbor -> IO LldpNeighbor)
-> [Ptr LldpNeighbor] -> IO [LldpNeighbor]
forall (t :: * -> *) (m :: * -> *) a b.
(Traversable t, Monad m) =>
(a -> m b) -> t a -> m (t b)
forall (m :: * -> *) a b. Monad m => (a -> m b) -> [a] -> m [b]
mapM ((ManagedPtr LldpNeighbor -> LldpNeighbor)
-> Ptr LldpNeighbor -> IO LldpNeighbor
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
newBoxed ManagedPtr LldpNeighbor -> LldpNeighbor
NM.LldpNeighbor.LldpNeighbor) [Ptr LldpNeighbor]
result'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
device
    [LldpNeighbor] -> IO [LldpNeighbor]
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return [LldpNeighbor]
result''

#if defined(ENABLE_OVERLOADING)
data DeviceGetLldpNeighborsMethodInfo
instance (signature ~ (m [NM.LldpNeighbor.LldpNeighbor]), MonadIO m, IsDevice a) => O.OverloadedMethod DeviceGetLldpNeighborsMethodInfo a signature where
    overloadedMethod = deviceGetLldpNeighbors

instance O.OverloadedMethodInfo DeviceGetLldpNeighborsMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.NM.Objects.Device.deviceGetLldpNeighbors",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Objects-Device.html#v:deviceGetLldpNeighbors"
        })


#endif

-- method Device::get_managed
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "device"
--           , argType = TInterface Name { namespace = "NM" , name = "Device" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #NMDevice" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TBoolean)
-- throws : False
-- Skip return : False

foreign import ccall "nm_device_get_managed" nm_device_get_managed :: 
    Ptr Device ->                           -- device : TInterface (Name {namespace = "NM", name = "Device"})
    IO CInt

-- | Whether the t'GI.NM.Objects.Device.Device' is managed by NetworkManager.
deviceGetManaged ::
    (B.CallStack.HasCallStack, MonadIO m, IsDevice a) =>
    a
    -- ^ /@device@/: a t'GI.NM.Objects.Device.Device'
    -> m Bool
    -- ^ __Returns:__ 'P.True' if the device is managed by NetworkManager
deviceGetManaged :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsDevice a) =>
a -> m Bool
deviceGetManaged a
device = IO Bool -> m Bool
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
    Ptr Device
device' <- a -> IO (Ptr Device)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
device
    CInt
result <- Ptr Device -> IO CInt
nm_device_get_managed Ptr Device
device'
    let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
device
    Bool -> IO Bool
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'

#if defined(ENABLE_OVERLOADING)
data DeviceGetManagedMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsDevice a) => O.OverloadedMethod DeviceGetManagedMethodInfo a signature where
    overloadedMethod = deviceGetManaged

instance O.OverloadedMethodInfo DeviceGetManagedMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.NM.Objects.Device.deviceGetManaged",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Objects-Device.html#v:deviceGetManaged"
        })


#endif

-- method Device::get_metered
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "device"
--           , argType = TInterface Name { namespace = "NM" , name = "Device" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #NMDevice" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TInterface Name { namespace = "NM" , name = "Metered" })
-- throws : False
-- Skip return : False

foreign import ccall "nm_device_get_metered" nm_device_get_metered :: 
    Ptr Device ->                           -- device : TInterface (Name {namespace = "NM", name = "Device"})
    IO CUInt

-- | Gets the metered setting of a t'GI.NM.Objects.Device.Device'.
-- 
-- /Since: 1.2/
deviceGetMetered ::
    (B.CallStack.HasCallStack, MonadIO m, IsDevice a) =>
    a
    -- ^ /@device@/: a t'GI.NM.Objects.Device.Device'
    -> m NM.Enums.Metered
    -- ^ __Returns:__ the metered setting.
deviceGetMetered :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsDevice a) =>
a -> m Metered
deviceGetMetered a
device = IO Metered -> m Metered
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Metered -> m Metered) -> IO Metered -> m Metered
forall a b. (a -> b) -> a -> b
$ do
    Ptr Device
device' <- a -> IO (Ptr Device)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
device
    CUInt
result <- Ptr Device -> IO CUInt
nm_device_get_metered Ptr Device
device'
    let result' :: Metered
result' = (Int -> Metered
forall a. Enum a => Int -> a
toEnum (Int -> Metered) -> (CUInt -> Int) -> CUInt -> Metered
forall b c a. (b -> c) -> (a -> b) -> a -> c
. CUInt -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral) CUInt
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
device
    Metered -> IO Metered
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Metered
result'

#if defined(ENABLE_OVERLOADING)
data DeviceGetMeteredMethodInfo
instance (signature ~ (m NM.Enums.Metered), MonadIO m, IsDevice a) => O.OverloadedMethod DeviceGetMeteredMethodInfo a signature where
    overloadedMethod = deviceGetMetered

instance O.OverloadedMethodInfo DeviceGetMeteredMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.NM.Objects.Device.deviceGetMetered",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Objects-Device.html#v:deviceGetMetered"
        })


#endif

-- method Device::get_mtu
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "device"
--           , argType = TInterface Name { namespace = "NM" , name = "Device" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #NMDevice" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TUInt32)
-- throws : False
-- Skip return : False

foreign import ccall "nm_device_get_mtu" nm_device_get_mtu :: 
    Ptr Device ->                           -- device : TInterface (Name {namespace = "NM", name = "Device"})
    IO Word32

-- | Gets the  MTU of the t'GI.NM.Objects.Device.Device'.
deviceGetMtu ::
    (B.CallStack.HasCallStack, MonadIO m, IsDevice a) =>
    a
    -- ^ /@device@/: a t'GI.NM.Objects.Device.Device'
    -> m Word32
    -- ^ __Returns:__ the MTU of the device in bytes.
deviceGetMtu :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsDevice a) =>
a -> m Word32
deviceGetMtu a
device = IO Word32 -> m Word32
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Word32 -> m Word32) -> IO Word32 -> m Word32
forall a b. (a -> b) -> a -> b
$ do
    Ptr Device
device' <- a -> IO (Ptr Device)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
device
    Word32
result <- Ptr Device -> IO Word32
nm_device_get_mtu Ptr Device
device'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
device
    Word32 -> IO Word32
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Word32
result

#if defined(ENABLE_OVERLOADING)
data DeviceGetMtuMethodInfo
instance (signature ~ (m Word32), MonadIO m, IsDevice a) => O.OverloadedMethod DeviceGetMtuMethodInfo a signature where
    overloadedMethod = deviceGetMtu

instance O.OverloadedMethodInfo DeviceGetMtuMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.NM.Objects.Device.deviceGetMtu",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Objects-Device.html#v:deviceGetMtu"
        })


#endif

-- method Device::get_nm_plugin_missing
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "device"
--           , argType = TInterface Name { namespace = "NM" , name = "Device" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #NMDevice" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TBoolean)
-- throws : False
-- Skip return : False

foreign import ccall "nm_device_get_nm_plugin_missing" nm_device_get_nm_plugin_missing :: 
    Ptr Device ->                           -- device : TInterface (Name {namespace = "NM", name = "Device"})
    IO CInt

-- | Indicates that the NetworkManager plugin for the device is not installed.
-- 
-- /Since: 1.2/
deviceGetNmPluginMissing ::
    (B.CallStack.HasCallStack, MonadIO m, IsDevice a) =>
    a
    -- ^ /@device@/: a t'GI.NM.Objects.Device.Device'
    -> m Bool
    -- ^ __Returns:__ 'P.True' if the device plugin not installed.
deviceGetNmPluginMissing :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsDevice a) =>
a -> m Bool
deviceGetNmPluginMissing a
device = IO Bool -> m Bool
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
    Ptr Device
device' <- a -> IO (Ptr Device)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
device
    CInt
result <- Ptr Device -> IO CInt
nm_device_get_nm_plugin_missing Ptr Device
device'
    let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
device
    Bool -> IO Bool
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'

#if defined(ENABLE_OVERLOADING)
data DeviceGetNmPluginMissingMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsDevice a) => O.OverloadedMethod DeviceGetNmPluginMissingMethodInfo a signature where
    overloadedMethod = deviceGetNmPluginMissing

instance O.OverloadedMethodInfo DeviceGetNmPluginMissingMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.NM.Objects.Device.deviceGetNmPluginMissing",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Objects-Device.html#v:deviceGetNmPluginMissing"
        })


#endif

-- method Device::get_path
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "device"
--           , argType = TInterface Name { namespace = "NM" , name = "Device" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #NMDevice" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TUTF8)
-- throws : False
-- Skip return : False

foreign import ccall "nm_device_get_path" nm_device_get_path :: 
    Ptr Device ->                           -- device : TInterface (Name {namespace = "NM", name = "Device"})
    IO CString

-- | Gets the path of the t'GI.NM.Objects.Device.Device' as exposed by the udev property ID_PATH.
-- 
-- /Since: 1.26/
deviceGetPath ::
    (B.CallStack.HasCallStack, MonadIO m, IsDevice a) =>
    a
    -- ^ /@device@/: a t'GI.NM.Objects.Device.Device'
    -> m T.Text
    -- ^ __Returns:__ the path of the device.
    -- 
    -- The string is backslash escaped (C escaping) for invalid characters. The escaping
    -- can be reverted with 'GI.GLib.Functions.strcompress', however the result may not be valid UTF-8.
deviceGetPath :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsDevice a) =>
a -> m Text
deviceGetPath a
device = IO Text -> m Text
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Text -> m Text) -> IO Text -> m Text
forall a b. (a -> b) -> a -> b
$ do
    Ptr Device
device' <- a -> IO (Ptr Device)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
device
    CString
result <- Ptr Device -> IO CString
nm_device_get_path Ptr Device
device'
    Text -> CString -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"deviceGetPath" CString
result
    Text
result' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
device
    Text -> IO Text
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Text
result'

#if defined(ENABLE_OVERLOADING)
data DeviceGetPathMethodInfo
instance (signature ~ (m T.Text), MonadIO m, IsDevice a) => O.OverloadedMethod DeviceGetPathMethodInfo a signature where
    overloadedMethod = deviceGetPath

instance O.OverloadedMethodInfo DeviceGetPathMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.NM.Objects.Device.deviceGetPath",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Objects-Device.html#v:deviceGetPath"
        })


#endif

-- method Device::get_physical_port_id
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "device"
--           , argType = TInterface Name { namespace = "NM" , name = "Device" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #NMDevice" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TUTF8)
-- throws : False
-- Skip return : False

foreign import ccall "nm_device_get_physical_port_id" nm_device_get_physical_port_id :: 
    Ptr Device ->                           -- device : TInterface (Name {namespace = "NM", name = "Device"})
    IO CString

-- | Gets the physical port ID of the t'GI.NM.Objects.Device.Device'. If non-'P.Nothing', this is
-- an opaque string that can be used to recognize when
-- seemingly-unrelated @/NMDevices/@ are actually just different virtual
-- ports on a single physical port. (Eg, NPAR \/ SR-IOV.)
deviceGetPhysicalPortId ::
    (B.CallStack.HasCallStack, MonadIO m, IsDevice a) =>
    a
    -- ^ /@device@/: a t'GI.NM.Objects.Device.Device'
    -> m T.Text
    -- ^ __Returns:__ the physical port ID of the device, or 'P.Nothing' if the port
    --   ID is unknown. This is the internal string used by the device and
    --   must not be modified.
deviceGetPhysicalPortId :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsDevice a) =>
a -> m Text
deviceGetPhysicalPortId a
device = IO Text -> m Text
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Text -> m Text) -> IO Text -> m Text
forall a b. (a -> b) -> a -> b
$ do
    Ptr Device
device' <- a -> IO (Ptr Device)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
device
    CString
result <- Ptr Device -> IO CString
nm_device_get_physical_port_id Ptr Device
device'
    Text -> CString -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"deviceGetPhysicalPortId" CString
result
    Text
result' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
device
    Text -> IO Text
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Text
result'

#if defined(ENABLE_OVERLOADING)
data DeviceGetPhysicalPortIdMethodInfo
instance (signature ~ (m T.Text), MonadIO m, IsDevice a) => O.OverloadedMethod DeviceGetPhysicalPortIdMethodInfo a signature where
    overloadedMethod = deviceGetPhysicalPortId

instance O.OverloadedMethodInfo DeviceGetPhysicalPortIdMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.NM.Objects.Device.deviceGetPhysicalPortId",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Objects-Device.html#v:deviceGetPhysicalPortId"
        })


#endif

-- method Device::get_ports
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "device"
--           , argType = TInterface Name { namespace = "NM" , name = "Device" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #NMDevice" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just
--               (TPtrArray
--                  (TInterface Name { namespace = "NM" , name = "Device" }))
-- throws : False
-- Skip return : False

foreign import ccall "nm_device_get_ports" nm_device_get_ports :: 
    Ptr Device ->                           -- device : TInterface (Name {namespace = "NM", name = "Device"})
    IO (Ptr (GPtrArray (Ptr Device)))

-- | Gets the devices currently set as port of /@device@/.
-- 
-- /Since: 1.34/
deviceGetPorts ::
    (B.CallStack.HasCallStack, MonadIO m, IsDevice a) =>
    a
    -- ^ /@device@/: a t'GI.NM.Objects.Device.Device'
    -> m [Device]
    -- ^ __Returns:__ the t'GI.GLib.Structs.PtrArray.PtrArray' containing @/NMDevices/@ that
    -- are ports of /@device@/. This is the internal copy used by the device and
    -- must not be modified.
deviceGetPorts :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsDevice a) =>
a -> m [Device]
deviceGetPorts a
device = IO [Device] -> m [Device]
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO [Device] -> m [Device]) -> IO [Device] -> m [Device]
forall a b. (a -> b) -> a -> b
$ do
    Ptr Device
device' <- a -> IO (Ptr Device)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
device
    Ptr (GPtrArray (Ptr Device))
result <- Ptr Device -> IO (Ptr (GPtrArray (Ptr Device)))
nm_device_get_ports Ptr Device
device'
    Text -> Ptr (GPtrArray (Ptr Device)) -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"deviceGetPorts" Ptr (GPtrArray (Ptr Device))
result
    [Ptr Device]
result' <- Ptr (GPtrArray (Ptr Device)) -> IO [Ptr Device]
forall a. Ptr (GPtrArray (Ptr a)) -> IO [Ptr a]
unpackGPtrArray Ptr (GPtrArray (Ptr Device))
result
    [Device]
result'' <- (Ptr Device -> IO Device) -> [Ptr Device] -> IO [Device]
forall (t :: * -> *) (m :: * -> *) a b.
(Traversable t, Monad m) =>
(a -> m b) -> t a -> m (t b)
forall (m :: * -> *) a b. Monad m => (a -> m b) -> [a] -> m [b]
mapM ((ManagedPtr Device -> Device) -> Ptr Device -> IO Device
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Device -> Device
Device) [Ptr Device]
result'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
device
    [Device] -> IO [Device]
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return [Device]
result''

#if defined(ENABLE_OVERLOADING)
data DeviceGetPortsMethodInfo
instance (signature ~ (m [Device]), MonadIO m, IsDevice a) => O.OverloadedMethod DeviceGetPortsMethodInfo a signature where
    overloadedMethod = deviceGetPorts

instance O.OverloadedMethodInfo DeviceGetPortsMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.NM.Objects.Device.deviceGetPorts",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Objects-Device.html#v:deviceGetPorts"
        })


#endif

-- method Device::get_product
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "device"
--           , argType = TInterface Name { namespace = "NM" , name = "Device" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #NMDevice" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TUTF8)
-- throws : False
-- Skip return : False

foreign import ccall "nm_device_get_product" nm_device_get_product :: 
    Ptr Device ->                           -- device : TInterface (Name {namespace = "NM", name = "Device"})
    IO CString

-- | Gets the product string of the t'GI.NM.Objects.Device.Device'.
deviceGetProduct ::
    (B.CallStack.HasCallStack, MonadIO m, IsDevice a) =>
    a
    -- ^ /@device@/: a t'GI.NM.Objects.Device.Device'
    -> m T.Text
    -- ^ __Returns:__ the product name of the device. This is the internal string used by the
    -- device, and must not be modified.
    -- 
    -- The string is backslash escaped (C escaping) for invalid characters. The escaping
    -- can be reverted with 'GI.GLib.Functions.strcompress', however the result may not be valid UTF-8.
deviceGetProduct :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsDevice a) =>
a -> m Text
deviceGetProduct a
device = IO Text -> m Text
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Text -> m Text) -> IO Text -> m Text
forall a b. (a -> b) -> a -> b
$ do
    Ptr Device
device' <- a -> IO (Ptr Device)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
device
    CString
result <- Ptr Device -> IO CString
nm_device_get_product Ptr Device
device'
    Text -> CString -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"deviceGetProduct" CString
result
    Text
result' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
device
    Text -> IO Text
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Text
result'

#if defined(ENABLE_OVERLOADING)
data DeviceGetProductMethodInfo
instance (signature ~ (m T.Text), MonadIO m, IsDevice a) => O.OverloadedMethod DeviceGetProductMethodInfo a signature where
    overloadedMethod = deviceGetProduct

instance O.OverloadedMethodInfo DeviceGetProductMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.NM.Objects.Device.deviceGetProduct",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Objects-Device.html#v:deviceGetProduct"
        })


#endif

-- method Device::get_setting_type
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "device"
--           , argType = TInterface Name { namespace = "NM" , name = "Device" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "an #NMDevice" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TGType)
-- throws : False
-- Skip return : False

foreign import ccall "nm_device_get_setting_type" nm_device_get_setting_type :: 
    Ptr Device ->                           -- device : TInterface (Name {namespace = "NM", name = "Device"})
    IO CGType

-- | Gets the (primary) t'GI.NM.Objects.Setting.Setting' subtype associated with connections
-- that can be used on /@device@/.
deviceGetSettingType ::
    (B.CallStack.HasCallStack, MonadIO m, IsDevice a) =>
    a
    -- ^ /@device@/: an t'GI.NM.Objects.Device.Device'
    -> m GType
    -- ^ __Returns:__ /@device@/\'s associated t'GI.NM.Objects.Setting.Setting' type
deviceGetSettingType :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsDevice a) =>
a -> m GType
deviceGetSettingType a
device = IO GType -> m GType
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO GType -> m GType) -> IO GType -> m GType
forall a b. (a -> b) -> a -> b
$ do
    Ptr Device
device' <- a -> IO (Ptr Device)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
device
    Word64
result <- Ptr Device -> IO Word64
nm_device_get_setting_type Ptr Device
device'
    let result' :: GType
result' = Word64 -> GType
GType Word64
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
device
    GType -> IO GType
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return GType
result'

#if defined(ENABLE_OVERLOADING)
data DeviceGetSettingTypeMethodInfo
instance (signature ~ (m GType), MonadIO m, IsDevice a) => O.OverloadedMethod DeviceGetSettingTypeMethodInfo a signature where
    overloadedMethod = deviceGetSettingType

instance O.OverloadedMethodInfo DeviceGetSettingTypeMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.NM.Objects.Device.deviceGetSettingType",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Objects-Device.html#v:deviceGetSettingType"
        })


#endif

-- method Device::get_state
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "device"
--           , argType = TInterface Name { namespace = "NM" , name = "Device" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #NMDevice" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TInterface Name { namespace = "NM" , name = "DeviceState" })
-- throws : False
-- Skip return : False

foreign import ccall "nm_device_get_state" nm_device_get_state :: 
    Ptr Device ->                           -- device : TInterface (Name {namespace = "NM", name = "Device"})
    IO CUInt

-- | Gets the current t'GI.NM.Objects.Device.Device' state.
deviceGetState ::
    (B.CallStack.HasCallStack, MonadIO m, IsDevice a) =>
    a
    -- ^ /@device@/: a t'GI.NM.Objects.Device.Device'
    -> m NM.Enums.DeviceState
    -- ^ __Returns:__ the current device state
deviceGetState :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsDevice a) =>
a -> m DeviceState
deviceGetState a
device = IO DeviceState -> m DeviceState
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO DeviceState -> m DeviceState)
-> IO DeviceState -> m DeviceState
forall a b. (a -> b) -> a -> b
$ do
    Ptr Device
device' <- a -> IO (Ptr Device)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
device
    CUInt
result <- Ptr Device -> IO CUInt
nm_device_get_state Ptr Device
device'
    let result' :: DeviceState
result' = (Int -> DeviceState
forall a. Enum a => Int -> a
toEnum (Int -> DeviceState) -> (CUInt -> Int) -> CUInt -> DeviceState
forall b c a. (b -> c) -> (a -> b) -> a -> c
. CUInt -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral) CUInt
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
device
    DeviceState -> IO DeviceState
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return DeviceState
result'

#if defined(ENABLE_OVERLOADING)
data DeviceGetStateMethodInfo
instance (signature ~ (m NM.Enums.DeviceState), MonadIO m, IsDevice a) => O.OverloadedMethod DeviceGetStateMethodInfo a signature where
    overloadedMethod = deviceGetState

instance O.OverloadedMethodInfo DeviceGetStateMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.NM.Objects.Device.deviceGetState",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Objects-Device.html#v:deviceGetState"
        })


#endif

-- method Device::get_state_reason
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "device"
--           , argType = TInterface Name { namespace = "NM" , name = "Device" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #NMDevice" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just
--               (TInterface Name { namespace = "NM" , name = "DeviceStateReason" })
-- throws : False
-- Skip return : False

foreign import ccall "nm_device_get_state_reason" nm_device_get_state_reason :: 
    Ptr Device ->                           -- device : TInterface (Name {namespace = "NM", name = "Device"})
    IO CUInt

-- | Gets the reason for entering the current t'GI.NM.Objects.Device.Device' state.
deviceGetStateReason ::
    (B.CallStack.HasCallStack, MonadIO m, IsDevice a) =>
    a
    -- ^ /@device@/: a t'GI.NM.Objects.Device.Device'
    -> m NM.Enums.DeviceStateReason
    -- ^ __Returns:__ the reason for entering the current device state
deviceGetStateReason :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsDevice a) =>
a -> m DeviceStateReason
deviceGetStateReason a
device = IO DeviceStateReason -> m DeviceStateReason
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO DeviceStateReason -> m DeviceStateReason)
-> IO DeviceStateReason -> m DeviceStateReason
forall a b. (a -> b) -> a -> b
$ do
    Ptr Device
device' <- a -> IO (Ptr Device)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
device
    CUInt
result <- Ptr Device -> IO CUInt
nm_device_get_state_reason Ptr Device
device'
    let result' :: DeviceStateReason
result' = (Int -> DeviceStateReason
forall a. Enum a => Int -> a
toEnum (Int -> DeviceStateReason)
-> (CUInt -> Int) -> CUInt -> DeviceStateReason
forall b c a. (b -> c) -> (a -> b) -> a -> c
. CUInt -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral) CUInt
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
device
    DeviceStateReason -> IO DeviceStateReason
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return DeviceStateReason
result'

#if defined(ENABLE_OVERLOADING)
data DeviceGetStateReasonMethodInfo
instance (signature ~ (m NM.Enums.DeviceStateReason), MonadIO m, IsDevice a) => O.OverloadedMethod DeviceGetStateReasonMethodInfo a signature where
    overloadedMethod = deviceGetStateReason

instance O.OverloadedMethodInfo DeviceGetStateReasonMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.NM.Objects.Device.deviceGetStateReason",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Objects-Device.html#v:deviceGetStateReason"
        })


#endif

-- method Device::get_type_description
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "device"
--           , argType = TInterface Name { namespace = "NM" , name = "Device" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #NMDevice" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TUTF8)
-- throws : False
-- Skip return : False

foreign import ccall "nm_device_get_type_description" nm_device_get_type_description :: 
    Ptr Device ->                           -- device : TInterface (Name {namespace = "NM", name = "Device"})
    IO CString

-- | Gets a (non-localized) description of the type of device that
-- /@device@/ is.
deviceGetTypeDescription ::
    (B.CallStack.HasCallStack, MonadIO m, IsDevice a) =>
    a
    -- ^ /@device@/: a t'GI.NM.Objects.Device.Device'
    -> m T.Text
    -- ^ __Returns:__ the type description of the device. This is the internal
    -- string used by the device, and must not be modified.
deviceGetTypeDescription :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsDevice a) =>
a -> m Text
deviceGetTypeDescription a
device = IO Text -> m Text
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Text -> m Text) -> IO Text -> m Text
forall a b. (a -> b) -> a -> b
$ do
    Ptr Device
device' <- a -> IO (Ptr Device)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
device
    CString
result <- Ptr Device -> IO CString
nm_device_get_type_description Ptr Device
device'
    Text -> CString -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"deviceGetTypeDescription" CString
result
    Text
result' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
device
    Text -> IO Text
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Text
result'

#if defined(ENABLE_OVERLOADING)
data DeviceGetTypeDescriptionMethodInfo
instance (signature ~ (m T.Text), MonadIO m, IsDevice a) => O.OverloadedMethod DeviceGetTypeDescriptionMethodInfo a signature where
    overloadedMethod = deviceGetTypeDescription

instance O.OverloadedMethodInfo DeviceGetTypeDescriptionMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.NM.Objects.Device.deviceGetTypeDescription",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Objects-Device.html#v:deviceGetTypeDescription"
        })


#endif

-- method Device::get_udi
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "device"
--           , argType = TInterface Name { namespace = "NM" , name = "Device" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #NMDevice" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TUTF8)
-- throws : False
-- Skip return : False

foreign import ccall "nm_device_get_udi" nm_device_get_udi :: 
    Ptr Device ->                           -- device : TInterface (Name {namespace = "NM", name = "Device"})
    IO CString

-- | Gets the Unique Device Identifier of the t'GI.NM.Objects.Device.Device'.
deviceGetUdi ::
    (B.CallStack.HasCallStack, MonadIO m, IsDevice a) =>
    a
    -- ^ /@device@/: a t'GI.NM.Objects.Device.Device'
    -> m T.Text
    -- ^ __Returns:__ the Unique Device Identifier of the device.  This identifier may be
    -- used to gather more information about the device from various operating
    -- system services like udev or sysfs.
deviceGetUdi :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsDevice a) =>
a -> m Text
deviceGetUdi a
device = IO Text -> m Text
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Text -> m Text) -> IO Text -> m Text
forall a b. (a -> b) -> a -> b
$ do
    Ptr Device
device' <- a -> IO (Ptr Device)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
device
    CString
result <- Ptr Device -> IO CString
nm_device_get_udi Ptr Device
device'
    Text -> CString -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"deviceGetUdi" CString
result
    Text
result' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
device
    Text -> IO Text
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Text
result'

#if defined(ENABLE_OVERLOADING)
data DeviceGetUdiMethodInfo
instance (signature ~ (m T.Text), MonadIO m, IsDevice a) => O.OverloadedMethod DeviceGetUdiMethodInfo a signature where
    overloadedMethod = deviceGetUdi

instance O.OverloadedMethodInfo DeviceGetUdiMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.NM.Objects.Device.deviceGetUdi",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Objects-Device.html#v:deviceGetUdi"
        })


#endif

-- method Device::get_vendor
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "device"
--           , argType = TInterface Name { namespace = "NM" , name = "Device" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #NMDevice" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TUTF8)
-- throws : False
-- Skip return : False

foreign import ccall "nm_device_get_vendor" nm_device_get_vendor :: 
    Ptr Device ->                           -- device : TInterface (Name {namespace = "NM", name = "Device"})
    IO CString

-- | Gets the vendor string of the t'GI.NM.Objects.Device.Device'.
deviceGetVendor ::
    (B.CallStack.HasCallStack, MonadIO m, IsDevice a) =>
    a
    -- ^ /@device@/: a t'GI.NM.Objects.Device.Device'
    -> m T.Text
    -- ^ __Returns:__ the vendor name of the device. This is the internal string used by the
    -- device, and must not be modified.
    -- 
    -- The string is backslash escaped (C escaping) for invalid characters. The escaping
    -- can be reverted with 'GI.GLib.Functions.strcompress', however the result may not be valid UTF-8.
deviceGetVendor :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsDevice a) =>
a -> m Text
deviceGetVendor a
device = IO Text -> m Text
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Text -> m Text) -> IO Text -> m Text
forall a b. (a -> b) -> a -> b
$ do
    Ptr Device
device' <- a -> IO (Ptr Device)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
device
    CString
result <- Ptr Device -> IO CString
nm_device_get_vendor Ptr Device
device'
    Text -> CString -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"deviceGetVendor" CString
result
    Text
result' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
device
    Text -> IO Text
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Text
result'

#if defined(ENABLE_OVERLOADING)
data DeviceGetVendorMethodInfo
instance (signature ~ (m T.Text), MonadIO m, IsDevice a) => O.OverloadedMethod DeviceGetVendorMethodInfo a signature where
    overloadedMethod = deviceGetVendor

instance O.OverloadedMethodInfo DeviceGetVendorMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.NM.Objects.Device.deviceGetVendor",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Objects-Device.html#v:deviceGetVendor"
        })


#endif

-- method Device::is_real
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "device"
--           , argType = TInterface Name { namespace = "NM" , name = "Device" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #NMDevice" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TBoolean)
-- throws : False
-- Skip return : False

foreign import ccall "nm_device_is_real" nm_device_is_real :: 
    Ptr Device ->                           -- device : TInterface (Name {namespace = "NM", name = "Device"})
    IO CInt

-- | /No description available in the introspection data./
-- 
-- /Since: 1.2/
deviceIsReal ::
    (B.CallStack.HasCallStack, MonadIO m, IsDevice a) =>
    a
    -- ^ /@device@/: a t'GI.NM.Objects.Device.Device'
    -> m Bool
    -- ^ __Returns:__ 'P.True' if the device exists, or 'P.False' if it is a placeholder device
    -- that could be automatically created by NetworkManager if one of its
    -- [Device:availableConnections]("GI.NM.Objects.Device#g:attr:availableConnections") was activated.
deviceIsReal :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsDevice a) =>
a -> m Bool
deviceIsReal a
device = IO Bool -> m Bool
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
    Ptr Device
device' <- a -> IO (Ptr Device)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
device
    CInt
result <- Ptr Device -> IO CInt
nm_device_is_real Ptr Device
device'
    let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
device
    Bool -> IO Bool
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'

#if defined(ENABLE_OVERLOADING)
data DeviceIsRealMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsDevice a) => O.OverloadedMethod DeviceIsRealMethodInfo a signature where
    overloadedMethod = deviceIsReal

instance O.OverloadedMethodInfo DeviceIsRealMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.NM.Objects.Device.deviceIsReal",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Objects-Device.html#v:deviceIsReal"
        })


#endif

-- method Device::is_software
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "device"
--           , argType = TInterface Name { namespace = "NM" , name = "Device" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #NMDevice" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TBoolean)
-- throws : False
-- Skip return : False

foreign import ccall "nm_device_is_software" nm_device_is_software :: 
    Ptr Device ->                           -- device : TInterface (Name {namespace = "NM", name = "Device"})
    IO CInt

-- | Whether the device is a software device.
deviceIsSoftware ::
    (B.CallStack.HasCallStack, MonadIO m, IsDevice a) =>
    a
    -- ^ /@device@/: a t'GI.NM.Objects.Device.Device'
    -> m Bool
    -- ^ __Returns:__ 'P.True' if /@device@/ is a software device, 'P.False' if it is a hardware device.
deviceIsSoftware :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsDevice a) =>
a -> m Bool
deviceIsSoftware a
device = IO Bool -> m Bool
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
    Ptr Device
device' <- a -> IO (Ptr Device)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
device
    CInt
result <- Ptr Device -> IO CInt
nm_device_is_software Ptr Device
device'
    let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
device
    Bool -> IO Bool
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'

#if defined(ENABLE_OVERLOADING)
data DeviceIsSoftwareMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsDevice a) => O.OverloadedMethod DeviceIsSoftwareMethodInfo a signature where
    overloadedMethod = deviceIsSoftware

instance O.OverloadedMethodInfo DeviceIsSoftwareMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.NM.Objects.Device.deviceIsSoftware",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Objects-Device.html#v:deviceIsSoftware"
        })


#endif

-- method Device::reapply
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "device"
--           , argType = TInterface Name { namespace = "NM" , name = "Device" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #NMDevice" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "connection"
--           , argType =
--               TInterface Name { namespace = "NM" , name = "Connection" }
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just
--                       "the #NMConnection to replace the applied\n  settings with or %NULL to reuse existing"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "version_id"
--           , argType = TBasicType TUInt64
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just
--                       "zero or the expected version id of the applied connection.\n  If specified and the version id mismatches, the call fails without\n  modification. This allows to catch concurrent accesses."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "flags"
--           , argType = TBasicType TUInt32
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "always set this to zero"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "cancellable"
--           , argType =
--               TInterface Name { namespace = "Gio" , name = "Cancellable" }
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GCancellable, or %NULL"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TBoolean)
-- throws : True
-- Skip return : False

foreign import ccall "nm_device_reapply" nm_device_reapply :: 
    Ptr Device ->                           -- device : TInterface (Name {namespace = "NM", name = "Device"})
    Ptr NM.Connection.Connection ->         -- connection : TInterface (Name {namespace = "NM", name = "Connection"})
    Word64 ->                               -- version_id : TBasicType TUInt64
    Word32 ->                               -- flags : TBasicType TUInt32
    Ptr Gio.Cancellable.Cancellable ->      -- cancellable : TInterface (Name {namespace = "Gio", name = "Cancellable"})
    Ptr (Ptr GError) ->                     -- error
    IO CInt

{-# DEPRECATED deviceReapply ["(Since version 1.22)","Use 'GI.NM.Objects.Device.deviceReapplyAsync' or GDBusConnection."] #-}
-- | Attempts to update device with changes to the currently active connection
-- made since it was last applied.
-- 
-- /Since: 1.2/
deviceReapply ::
    (B.CallStack.HasCallStack, MonadIO m, IsDevice a, NM.Connection.IsConnection b, Gio.Cancellable.IsCancellable c) =>
    a
    -- ^ /@device@/: a t'GI.NM.Objects.Device.Device'
    -> Maybe (b)
    -- ^ /@connection@/: the t'GI.NM.Interfaces.Connection.Connection' to replace the applied
    --   settings with or 'P.Nothing' to reuse existing
    -> Word64
    -- ^ /@versionId@/: zero or the expected version id of the applied connection.
    --   If specified and the version id mismatches, the call fails without
    --   modification. This allows to catch concurrent accesses.
    -> Word32
    -- ^ /@flags@/: always set this to zero
    -> Maybe (c)
    -- ^ /@cancellable@/: a t'GI.Gio.Objects.Cancellable.Cancellable', or 'P.Nothing'
    -> m ()
    -- ^ /(Can throw 'Data.GI.Base.GError.GError')/
deviceReapply :: forall (m :: * -> *) a b c.
(HasCallStack, MonadIO m, IsDevice a, IsConnection b,
 IsCancellable c) =>
a -> Maybe b -> Word64 -> Word32 -> Maybe c -> m ()
deviceReapply a
device Maybe b
connection Word64
versionId Word32
flags Maybe c
cancellable = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr Device
device' <- a -> IO (Ptr Device)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
device
    Ptr Connection
maybeConnection <- case Maybe b
connection of
        Maybe b
Nothing -> Ptr Connection -> IO (Ptr Connection)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Connection
forall a. Ptr a
FP.nullPtr
        Just b
jConnection -> do
            Ptr Connection
jConnection' <- b -> IO (Ptr Connection)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
jConnection
            Ptr Connection -> IO (Ptr Connection)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Connection
jConnection'
    Ptr Cancellable
maybeCancellable <- case Maybe c
cancellable of
        Maybe c
Nothing -> Ptr Cancellable -> IO (Ptr Cancellable)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Cancellable
forall a. Ptr a
FP.nullPtr
        Just c
jCancellable -> do
            Ptr Cancellable
jCancellable' <- c -> IO (Ptr Cancellable)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr c
jCancellable
            Ptr Cancellable -> IO (Ptr Cancellable)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Cancellable
jCancellable'
    IO () -> IO () -> IO ()
forall a b. IO a -> IO b -> IO a
onException (do
        CInt
_ <- (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO CInt) -> IO CInt)
-> (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ Ptr Device
-> Ptr Connection
-> Word64
-> Word32
-> Ptr Cancellable
-> Ptr (Ptr GError)
-> IO CInt
nm_device_reapply Ptr Device
device' Ptr Connection
maybeConnection Word64
versionId Word32
flags Ptr Cancellable
maybeCancellable
        a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
device
        Maybe b -> (b -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe b
connection b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
        Maybe c -> (c -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe c
cancellable c -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
        () -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()
     ) (do
        () -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()
     )

#if defined(ENABLE_OVERLOADING)
data DeviceReapplyMethodInfo
instance (signature ~ (Maybe (b) -> Word64 -> Word32 -> Maybe (c) -> m ()), MonadIO m, IsDevice a, NM.Connection.IsConnection b, Gio.Cancellable.IsCancellable c) => O.OverloadedMethod DeviceReapplyMethodInfo a signature where
    overloadedMethod = deviceReapply

instance O.OverloadedMethodInfo DeviceReapplyMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.NM.Objects.Device.deviceReapply",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Objects-Device.html#v:deviceReapply"
        })


#endif

-- method Device::reapply_async
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "device"
--           , argType = TInterface Name { namespace = "NM" , name = "Device" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #NMDevice" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "connection"
--           , argType =
--               TInterface Name { namespace = "NM" , name = "Connection" }
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just
--                       "the #NMConnection to replace the applied\n  settings with or %NULL to reuse existing"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "version_id"
--           , argType = TBasicType TUInt64
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just
--                       "zero or the expected version id of the applied\n  connection. If specified and the version id mismatches, the call\n  fails without modification. This allows to catch concurrent\n  accesses."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "flags"
--           , argType = TBasicType TUInt32
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "always set this to zero"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "cancellable"
--           , argType =
--               TInterface Name { namespace = "Gio" , name = "Cancellable" }
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #GCancellable, or %NULL"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "callback"
--           , argType =
--               TInterface Name { namespace = "Gio" , name = "AsyncReadyCallback" }
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "callback to be called when the reapply operation completes"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeAsync
--           , argClosure = 6
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "user_data"
--           , argType = TBasicType TPtr
--           , direction = DirectionIn
--           , mayBeNull = True
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "caller-specific data passed to @callback"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "nm_device_reapply_async" nm_device_reapply_async :: 
    Ptr Device ->                           -- device : TInterface (Name {namespace = "NM", name = "Device"})
    Ptr NM.Connection.Connection ->         -- connection : TInterface (Name {namespace = "NM", name = "Connection"})
    Word64 ->                               -- version_id : TBasicType TUInt64
    Word32 ->                               -- flags : TBasicType TUInt32
    Ptr Gio.Cancellable.Cancellable ->      -- cancellable : TInterface (Name {namespace = "Gio", name = "Cancellable"})
    FunPtr Gio.Callbacks.C_AsyncReadyCallback -> -- callback : TInterface (Name {namespace = "Gio", name = "AsyncReadyCallback"})
    Ptr () ->                               -- user_data : TBasicType TPtr
    IO ()

-- | Asynchronously begins an attempt to update device with changes to the
-- currently active connection made since it was last applied.
-- 
-- /Since: 1.2/
deviceReapplyAsync ::
    (B.CallStack.HasCallStack, MonadIO m, IsDevice a, NM.Connection.IsConnection b, Gio.Cancellable.IsCancellable c) =>
    a
    -- ^ /@device@/: a t'GI.NM.Objects.Device.Device'
    -> Maybe (b)
    -- ^ /@connection@/: the t'GI.NM.Interfaces.Connection.Connection' to replace the applied
    --   settings with or 'P.Nothing' to reuse existing
    -> Word64
    -- ^ /@versionId@/: zero or the expected version id of the applied
    --   connection. If specified and the version id mismatches, the call
    --   fails without modification. This allows to catch concurrent
    --   accesses.
    -> Word32
    -- ^ /@flags@/: always set this to zero
    -> Maybe (c)
    -- ^ /@cancellable@/: a t'GI.Gio.Objects.Cancellable.Cancellable', or 'P.Nothing'
    -> Maybe (Gio.Callbacks.AsyncReadyCallback)
    -- ^ /@callback@/: callback to be called when the reapply operation completes
    -> m ()
deviceReapplyAsync :: forall (m :: * -> *) a b c.
(HasCallStack, MonadIO m, IsDevice a, IsConnection b,
 IsCancellable c) =>
a
-> Maybe b
-> Word64
-> Word32
-> Maybe c
-> Maybe AsyncReadyCallback
-> m ()
deviceReapplyAsync a
device Maybe b
connection Word64
versionId Word32
flags Maybe c
cancellable Maybe AsyncReadyCallback
callback = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr Device
device' <- a -> IO (Ptr Device)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
device
    Ptr Connection
maybeConnection <- case Maybe b
connection of
        Maybe b
Nothing -> Ptr Connection -> IO (Ptr Connection)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Connection
forall a. Ptr a
FP.nullPtr
        Just b
jConnection -> do
            Ptr Connection
jConnection' <- b -> IO (Ptr Connection)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
jConnection
            Ptr Connection -> IO (Ptr Connection)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Connection
jConnection'
    Ptr Cancellable
maybeCancellable <- case Maybe c
cancellable of
        Maybe c
Nothing -> Ptr Cancellable -> IO (Ptr Cancellable)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Cancellable
forall a. Ptr a
FP.nullPtr
        Just c
jCancellable -> do
            Ptr Cancellable
jCancellable' <- c -> IO (Ptr Cancellable)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr c
jCancellable
            Ptr Cancellable -> IO (Ptr Cancellable)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Cancellable
jCancellable'
    FunPtr C_AsyncReadyCallback
maybeCallback <- case Maybe AsyncReadyCallback
callback of
        Maybe AsyncReadyCallback
Nothing -> FunPtr C_AsyncReadyCallback -> IO (FunPtr C_AsyncReadyCallback)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return FunPtr C_AsyncReadyCallback
forall a. FunPtr a
FP.nullFunPtr
        Just AsyncReadyCallback
jCallback -> do
            Ptr (FunPtr C_AsyncReadyCallback)
ptrcallback <- IO (Ptr (FunPtr C_AsyncReadyCallback))
forall a. Storable a => IO (Ptr a)
callocMem :: IO (Ptr (FunPtr Gio.Callbacks.C_AsyncReadyCallback))
            FunPtr C_AsyncReadyCallback
jCallback' <- C_AsyncReadyCallback -> IO (FunPtr C_AsyncReadyCallback)
Gio.Callbacks.mk_AsyncReadyCallback (Maybe (Ptr (FunPtr C_AsyncReadyCallback))
-> AsyncReadyCallback_WithClosures -> C_AsyncReadyCallback
Gio.Callbacks.wrap_AsyncReadyCallback (Ptr (FunPtr C_AsyncReadyCallback)
-> Maybe (Ptr (FunPtr C_AsyncReadyCallback))
forall a. a -> Maybe a
Just Ptr (FunPtr C_AsyncReadyCallback)
ptrcallback) (AsyncReadyCallback -> AsyncReadyCallback_WithClosures
Gio.Callbacks.drop_closures_AsyncReadyCallback AsyncReadyCallback
jCallback))
            Ptr (FunPtr C_AsyncReadyCallback)
-> FunPtr C_AsyncReadyCallback -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke Ptr (FunPtr C_AsyncReadyCallback)
ptrcallback FunPtr C_AsyncReadyCallback
jCallback'
            FunPtr C_AsyncReadyCallback -> IO (FunPtr C_AsyncReadyCallback)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return FunPtr C_AsyncReadyCallback
jCallback'
    let userData :: Ptr a
userData = Ptr a
forall a. Ptr a
nullPtr
    Ptr Device
-> Ptr Connection
-> Word64
-> Word32
-> Ptr Cancellable
-> FunPtr C_AsyncReadyCallback
-> Ptr ()
-> IO ()
nm_device_reapply_async Ptr Device
device' Ptr Connection
maybeConnection Word64
versionId Word32
flags Ptr Cancellable
maybeCancellable FunPtr C_AsyncReadyCallback
maybeCallback Ptr ()
forall a. Ptr a
userData
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
device
    Maybe b -> (b -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe b
connection b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
    Maybe c -> (c -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe c
cancellable c -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
    () -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data DeviceReapplyAsyncMethodInfo
instance (signature ~ (Maybe (b) -> Word64 -> Word32 -> Maybe (c) -> Maybe (Gio.Callbacks.AsyncReadyCallback) -> m ()), MonadIO m, IsDevice a, NM.Connection.IsConnection b, Gio.Cancellable.IsCancellable c) => O.OverloadedMethod DeviceReapplyAsyncMethodInfo a signature where
    overloadedMethod = deviceReapplyAsync

instance O.OverloadedMethodInfo DeviceReapplyAsyncMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.NM.Objects.Device.deviceReapplyAsync",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Objects-Device.html#v:deviceReapplyAsync"
        })


#endif

-- method Device::reapply_finish
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "device"
--           , argType = TInterface Name { namespace = "NM" , name = "Device" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #NMDevice" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "result"
--           , argType =
--               TInterface Name { namespace = "Gio" , name = "AsyncResult" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "the result passed to the #GAsyncReadyCallback"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Just (TBasicType TBoolean)
-- throws : True
-- Skip return : False

foreign import ccall "nm_device_reapply_finish" nm_device_reapply_finish :: 
    Ptr Device ->                           -- device : TInterface (Name {namespace = "NM", name = "Device"})
    Ptr Gio.AsyncResult.AsyncResult ->      -- result : TInterface (Name {namespace = "Gio", name = "AsyncResult"})
    Ptr (Ptr GError) ->                     -- error
    IO CInt

-- | Gets the result of a call to 'GI.NM.Objects.Device.deviceReapplyAsync'.
-- 
-- /Since: 1.2/
deviceReapplyFinish ::
    (B.CallStack.HasCallStack, MonadIO m, IsDevice a, Gio.AsyncResult.IsAsyncResult b) =>
    a
    -- ^ /@device@/: a t'GI.NM.Objects.Device.Device'
    -> b
    -- ^ /@result@/: the result passed to the t'GI.Gio.Callbacks.AsyncReadyCallback'
    -> m ()
    -- ^ /(Can throw 'Data.GI.Base.GError.GError')/
deviceReapplyFinish :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsDevice a, IsAsyncResult b) =>
a -> b -> m ()
deviceReapplyFinish a
device b
result_ = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr Device
device' <- a -> IO (Ptr Device)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
device
    Ptr AsyncResult
result_' <- b -> IO (Ptr AsyncResult)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
result_
    IO () -> IO () -> IO ()
forall a b. IO a -> IO b -> IO a
onException (do
        CInt
_ <- (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO CInt) -> IO CInt)
-> (Ptr (Ptr GError) -> IO CInt) -> IO CInt
forall a b. (a -> b) -> a -> b
$ Ptr Device -> Ptr AsyncResult -> Ptr (Ptr GError) -> IO CInt
nm_device_reapply_finish Ptr Device
device' Ptr AsyncResult
result_'
        a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
device
        b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
result_
        () -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()
     ) (do
        () -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()
     )

#if defined(ENABLE_OVERLOADING)
data DeviceReapplyFinishMethodInfo
instance (signature ~ (b -> m ()), MonadIO m, IsDevice a, Gio.AsyncResult.IsAsyncResult b) => O.OverloadedMethod DeviceReapplyFinishMethodInfo a signature where
    overloadedMethod = deviceReapplyFinish

instance O.OverloadedMethodInfo DeviceReapplyFinishMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.NM.Objects.Device.deviceReapplyFinish",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Objects-Device.html#v:deviceReapplyFinish"
        })


#endif

-- method Device::set_autoconnect
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "device"
--           , argType = TInterface Name { namespace = "NM" , name = "Device" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #NMDevice" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "autoconnect"
--           , argType = TBasicType TBoolean
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "%TRUE to enable autoconnecting"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "nm_device_set_autoconnect" nm_device_set_autoconnect :: 
    Ptr Device ->                           -- device : TInterface (Name {namespace = "NM", name = "Device"})
    CInt ->                                 -- autoconnect : TBasicType TBoolean
    IO ()

{-# DEPRECATED deviceSetAutoconnect ["(Since version 1.22)","Use the async command 'GI.NM.Objects.Client.clientDbusSetProperty' on","'GI.NM.Objects.Object.objectGetPath', @/NM_DBUS_INTERFACE_DEVICE/@ to set \\\"Autoconnect\\\" property to a \\\"(b)\\\" value.","This function is deprecated because it calls a synchronous D-Bus method","and modifies the content of the NMClient cache client side."] #-}
-- | Enables or disables automatic activation of the t'GI.NM.Objects.Device.Device'.
deviceSetAutoconnect ::
    (B.CallStack.HasCallStack, MonadIO m, IsDevice a) =>
    a
    -- ^ /@device@/: a t'GI.NM.Objects.Device.Device'
    -> Bool
    -- ^ /@autoconnect@/: 'P.True' to enable autoconnecting
    -> m ()
deviceSetAutoconnect :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsDevice a) =>
a -> Bool -> m ()
deviceSetAutoconnect a
device Bool
autoconnect = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr Device
device' <- a -> IO (Ptr Device)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
device
    let autoconnect' :: CInt
autoconnect' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
P.fromIntegral (Int -> CInt) -> (Bool -> Int) -> Bool -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Bool -> Int
forall a. Enum a => a -> Int
P.fromEnum) Bool
autoconnect
    Ptr Device -> CInt -> IO ()
nm_device_set_autoconnect Ptr Device
device' CInt
autoconnect'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
device
    () -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data DeviceSetAutoconnectMethodInfo
instance (signature ~ (Bool -> m ()), MonadIO m, IsDevice a) => O.OverloadedMethod DeviceSetAutoconnectMethodInfo a signature where
    overloadedMethod = deviceSetAutoconnect

instance O.OverloadedMethodInfo DeviceSetAutoconnectMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.NM.Objects.Device.deviceSetAutoconnect",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Objects-Device.html#v:deviceSetAutoconnect"
        })


#endif

-- method Device::set_managed
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "device"
--           , argType = TInterface Name { namespace = "NM" , name = "Device" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #NMDevice" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "managed"
--           , argType = TBasicType TBoolean
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "%TRUE to make the device managed by NetworkManager."
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: []
-- returnType: Nothing
-- throws : False
-- Skip return : False

foreign import ccall "nm_device_set_managed" nm_device_set_managed :: 
    Ptr Device ->                           -- device : TInterface (Name {namespace = "NM", name = "Device"})
    CInt ->                                 -- managed : TBasicType TBoolean
    IO ()

{-# DEPRECATED deviceSetManaged ["(Since version 1.22)","Use the async command 'GI.NM.Objects.Client.clientDbusSetProperty' on","'GI.NM.Objects.Object.objectGetPath', interface @/NM_DBUS_INTERFACE_DEVICE/@ to set the","\\\"Managed\\\" property to a \\\"(b)\\\" boolean value.","This function is deprecated because it calls a synchronous D-Bus method","and modifies the content of the NMClient cache client side. Also, it does","not emit a property changed signal."] #-}
-- | Enables or disables management of  t'GI.NM.Objects.Device.Device' by NetworkManager.
-- 
-- /Since: 1.2/
deviceSetManaged ::
    (B.CallStack.HasCallStack, MonadIO m, IsDevice a) =>
    a
    -- ^ /@device@/: a t'GI.NM.Objects.Device.Device'
    -> Bool
    -- ^ /@managed@/: 'P.True' to make the device managed by NetworkManager.
    -> m ()
deviceSetManaged :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsDevice a) =>
a -> Bool -> m ()
deviceSetManaged a
device Bool
managed = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr Device
device' <- a -> IO (Ptr Device)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
device
    let managed' :: CInt
managed' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
P.fromIntegral (Int -> CInt) -> (Bool -> Int) -> Bool -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Bool -> Int
forall a. Enum a => a -> Int
P.fromEnum) Bool
managed
    Ptr Device -> CInt -> IO ()
nm_device_set_managed Ptr Device
device' CInt
managed'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
device
    () -> IO ()
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return ()

#if defined(ENABLE_OVERLOADING)
data DeviceSetManagedMethodInfo
instance (signature ~ (Bool -> m ()), MonadIO m, IsDevice a) => O.OverloadedMethod DeviceSetManagedMethodInfo a signature where
    overloadedMethod = deviceSetManaged

instance O.OverloadedMethodInfo DeviceSetManagedMethodInfo a where
    overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
        O.resolvedSymbolName = "GI.NM.Objects.Device.deviceSetManaged",
        O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Objects-Device.html#v:deviceSetManaged"
        })


#endif

-- method Device::disambiguate_names
-- method type : MemberFunction
-- Args: [ Arg
--           { argCName = "devices"
--           , argType =
--               TCArray
--                 False
--                 (-1)
--                 1
--                 (TInterface Name { namespace = "NM" , name = "Device" })
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "an array of #NMDevice"
--                 , sinceVersion = Nothing
--                 }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       , Arg
--           { argCName = "num_devices"
--           , argType = TBasicType TInt
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "length of @devices" , sinceVersion = Nothing }
--           , argScope = ScopeTypeInvalid
--           , argClosure = -1
--           , argDestroy = -1
--           , argCallerAllocates = False
--           , argCallbackUserData = False
--           , transfer = TransferNothing
--           }
--       ]
-- Lengths: [ Arg
--              { argCName = "num_devices"
--              , argType = TBasicType TInt
--              , direction = DirectionIn
--              , mayBeNull = False
--              , argDoc =
--                  Documentation
--                    { rawDocText = Just "length of @devices" , sinceVersion = Nothing }
--              , argScope = ScopeTypeInvalid
--              , argClosure = -1
--              , argDestroy = -1
--              , argCallerAllocates = False
--              , argCallbackUserData = False
--              , transfer = TransferNothing
--              }
--          ]
-- returnType: Just (TCArray True (-1) (-1) (TBasicType TUTF8))
-- throws : False
-- Skip return : False

foreign import ccall "nm_device_disambiguate_names" nm_device_disambiguate_names :: 
    Ptr (Ptr Device) ->                     -- devices : TCArray False (-1) 1 (TInterface (Name {namespace = "NM", name = "Device"}))
    Int32 ->                                -- num_devices : TBasicType TInt
    IO (Ptr CString)

-- | Generates a list of short-ish unique presentation names for the
-- devices in /@devices@/.
deviceDisambiguateNames ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    [Device]
    -- ^ /@devices@/: an array of t'GI.NM.Objects.Device.Device'
    -> m [T.Text]
    -- ^ __Returns:__ the device names
deviceDisambiguateNames :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
[Device] -> m [Text]
deviceDisambiguateNames [Device]
devices = IO [Text] -> m [Text]
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO [Text] -> m [Text]) -> IO [Text] -> m [Text]
forall a b. (a -> b) -> a -> b
$ do
    let numDevices :: Int32
numDevices = Int -> Int32
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> Int32) -> Int -> Int32
forall a b. (a -> b) -> a -> b
$ [Device] -> Int
forall a. [a] -> Int
forall (t :: * -> *) a. Foldable t => t a -> Int
P.length [Device]
devices
    [Ptr Device]
devices' <- (Device -> IO (Ptr Device)) -> [Device] -> IO [Ptr Device]
forall (t :: * -> *) (m :: * -> *) a b.
(Traversable t, Monad m) =>
(a -> m b) -> t a -> m (t b)
forall (m :: * -> *) a b. Monad m => (a -> m b) -> [a] -> m [b]
mapM Device -> IO (Ptr Device)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr [Device]
devices
    Ptr (Ptr Device)
devices'' <- [Ptr Device] -> IO (Ptr (Ptr Device))
forall a. [Ptr a] -> IO (Ptr (Ptr a))
packPtrArray [Ptr Device]
devices'
    Ptr CString
result <- Ptr (Ptr Device) -> Int32 -> IO (Ptr CString)
nm_device_disambiguate_names Ptr (Ptr Device)
devices'' Int32
numDevices
    Text -> Ptr CString -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"deviceDisambiguateNames" Ptr CString
result
    [Text]
result' <- HasCallStack => Ptr CString -> IO [Text]
Ptr CString -> IO [Text]
unpackZeroTerminatedUTF8CArray Ptr CString
result
    (CString -> IO ()) -> Ptr CString -> IO ()
forall a b. (Ptr a -> IO b) -> Ptr (Ptr a) -> IO ()
mapZeroTerminatedCArray CString -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CString
result
    Ptr CString -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CString
result
    (Device -> IO ()) -> [Device] -> IO ()
forall (t :: * -> *) (m :: * -> *) a b.
(Foldable t, Monad m) =>
(a -> m b) -> t a -> m ()
mapM_ Device -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr [Device]
devices
    Ptr (Ptr Device) -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr (Ptr Device)
devices''
    [Text] -> IO [Text]
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return [Text]
result'

#if defined(ENABLE_OVERLOADING)
#endif