{-# LANGUAGE TypeApplications #-}
#if (MIN_VERSION_haskell_gi_overloading(1,0,0) && !defined(__HADDOCK_VERSION__))
#define ENABLE_OVERLOADING
#endif
module GI.NM.Objects.DeviceAdsl
(
DeviceAdsl(..) ,
IsDeviceAdsl ,
toDeviceAdsl ,
#if defined(ENABLE_OVERLOADING)
ResolveDeviceAdslMethod ,
#endif
#if defined(ENABLE_OVERLOADING)
DeviceAdslGetCarrierMethodInfo ,
#endif
deviceAdslGetCarrier ,
#if defined(ENABLE_OVERLOADING)
DeviceAdslCarrierPropertyInfo ,
#endif
#if defined(ENABLE_OVERLOADING)
deviceAdslCarrier ,
#endif
getDeviceAdslCarrier ,
) 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
#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.Device as NM.Device
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 {-# SOURCE #-} qualified GI.NM.Objects.Device as NM.Device
import {-# SOURCE #-} qualified GI.NM.Objects.Object as NM.Object
#endif
newtype DeviceAdsl = DeviceAdsl (SP.ManagedPtr DeviceAdsl)
deriving (DeviceAdsl -> DeviceAdsl -> Bool
(DeviceAdsl -> DeviceAdsl -> Bool)
-> (DeviceAdsl -> DeviceAdsl -> Bool) -> Eq DeviceAdsl
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: DeviceAdsl -> DeviceAdsl -> Bool
== :: DeviceAdsl -> DeviceAdsl -> Bool
$c/= :: DeviceAdsl -> DeviceAdsl -> Bool
/= :: DeviceAdsl -> DeviceAdsl -> Bool
Eq)
instance SP.ManagedPtrNewtype DeviceAdsl where
toManagedPtr :: DeviceAdsl -> ManagedPtr DeviceAdsl
toManagedPtr (DeviceAdsl ManagedPtr DeviceAdsl
p) = ManagedPtr DeviceAdsl
p
foreign import ccall "nm_device_adsl_get_type"
c_nm_device_adsl_get_type :: IO B.Types.GType
instance B.Types.TypedObject DeviceAdsl where
glibType :: IO GType
glibType = IO GType
c_nm_device_adsl_get_type
instance B.Types.GObject DeviceAdsl
class (SP.GObject o, O.IsDescendantOf DeviceAdsl o) => IsDeviceAdsl o
instance (SP.GObject o, O.IsDescendantOf DeviceAdsl o) => IsDeviceAdsl o
instance O.HasParentTypes DeviceAdsl
type instance O.ParentTypes DeviceAdsl = '[NM.Device.Device, NM.Object.Object, GObject.Object.Object]
toDeviceAdsl :: (MIO.MonadIO m, IsDeviceAdsl o) => o -> m DeviceAdsl
toDeviceAdsl :: forall (m :: * -> *) o.
(MonadIO m, IsDeviceAdsl o) =>
o -> m DeviceAdsl
toDeviceAdsl = IO DeviceAdsl -> m DeviceAdsl
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO DeviceAdsl -> m DeviceAdsl)
-> (o -> IO DeviceAdsl) -> o -> m DeviceAdsl
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (ManagedPtr DeviceAdsl -> DeviceAdsl) -> o -> IO DeviceAdsl
forall o o'.
(HasCallStack, ManagedPtrNewtype o, TypedObject o,
ManagedPtrNewtype o', TypedObject o') =>
(ManagedPtr o' -> o') -> o -> IO o'
B.ManagedPtr.unsafeCastTo ManagedPtr DeviceAdsl -> DeviceAdsl
DeviceAdsl
instance B.GValue.IsGValue (Maybe DeviceAdsl) where
gvalueGType_ :: IO GType
gvalueGType_ = IO GType
c_nm_device_adsl_get_type
gvalueSet_ :: Ptr GValue -> Maybe DeviceAdsl -> IO ()
gvalueSet_ Ptr GValue
gv Maybe DeviceAdsl
P.Nothing = Ptr GValue -> Ptr DeviceAdsl -> IO ()
forall a. GObject a => Ptr GValue -> Ptr a -> IO ()
B.GValue.set_object Ptr GValue
gv (Ptr DeviceAdsl
forall a. Ptr a
FP.nullPtr :: FP.Ptr DeviceAdsl)
gvalueSet_ Ptr GValue
gv (P.Just DeviceAdsl
obj) = DeviceAdsl -> (Ptr DeviceAdsl -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
B.ManagedPtr.withManagedPtr DeviceAdsl
obj (Ptr GValue -> Ptr DeviceAdsl -> IO ()
forall a. GObject a => Ptr GValue -> Ptr a -> IO ()
B.GValue.set_object Ptr GValue
gv)
gvalueGet_ :: Ptr GValue -> IO (Maybe DeviceAdsl)
gvalueGet_ Ptr GValue
gv = do
Ptr DeviceAdsl
ptr <- Ptr GValue -> IO (Ptr DeviceAdsl)
forall a. GObject a => Ptr GValue -> IO (Ptr a)
B.GValue.get_object Ptr GValue
gv :: IO (FP.Ptr DeviceAdsl)
if Ptr DeviceAdsl
ptr Ptr DeviceAdsl -> Ptr DeviceAdsl -> Bool
forall a. Eq a => a -> a -> Bool
/= Ptr DeviceAdsl
forall a. Ptr a
FP.nullPtr
then DeviceAdsl -> Maybe DeviceAdsl
forall a. a -> Maybe a
P.Just (DeviceAdsl -> Maybe DeviceAdsl)
-> IO DeviceAdsl -> IO (Maybe DeviceAdsl)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (ManagedPtr DeviceAdsl -> DeviceAdsl)
-> Ptr DeviceAdsl -> IO DeviceAdsl
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
B.ManagedPtr.newObject ManagedPtr DeviceAdsl -> DeviceAdsl
DeviceAdsl Ptr DeviceAdsl
ptr
else Maybe DeviceAdsl -> IO (Maybe DeviceAdsl)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe DeviceAdsl
forall a. Maybe a
P.Nothing
#if defined(ENABLE_OVERLOADING)
type family ResolveDeviceAdslMethod (t :: Symbol) (o :: DK.Type) :: DK.Type where
ResolveDeviceAdslMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo
ResolveDeviceAdslMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo
ResolveDeviceAdslMethod "connectionCompatible" o = NM.Device.DeviceConnectionCompatibleMethodInfo
ResolveDeviceAdslMethod "connectionValid" o = NM.Device.DeviceConnectionValidMethodInfo
ResolveDeviceAdslMethod "delete" o = NM.Device.DeviceDeleteMethodInfo
ResolveDeviceAdslMethod "deleteAsync" o = NM.Device.DeviceDeleteAsyncMethodInfo
ResolveDeviceAdslMethod "deleteFinish" o = NM.Device.DeviceDeleteFinishMethodInfo
ResolveDeviceAdslMethod "disconnect" o = NM.Device.DeviceDisconnectMethodInfo
ResolveDeviceAdslMethod "disconnectAsync" o = NM.Device.DeviceDisconnectAsyncMethodInfo
ResolveDeviceAdslMethod "disconnectFinish" o = NM.Device.DeviceDisconnectFinishMethodInfo
ResolveDeviceAdslMethod "filterConnections" o = NM.Device.DeviceFilterConnectionsMethodInfo
ResolveDeviceAdslMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo
ResolveDeviceAdslMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo
ResolveDeviceAdslMethod "getv" o = GObject.Object.ObjectGetvMethodInfo
ResolveDeviceAdslMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo
ResolveDeviceAdslMethod "isReal" o = NM.Device.DeviceIsRealMethodInfo
ResolveDeviceAdslMethod "isSoftware" o = NM.Device.DeviceIsSoftwareMethodInfo
ResolveDeviceAdslMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo
ResolveDeviceAdslMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo
ResolveDeviceAdslMethod "reapply" o = NM.Device.DeviceReapplyMethodInfo
ResolveDeviceAdslMethod "reapplyAsync" o = NM.Device.DeviceReapplyAsyncMethodInfo
ResolveDeviceAdslMethod "reapplyFinish" o = NM.Device.DeviceReapplyFinishMethodInfo
ResolveDeviceAdslMethod "ref" o = GObject.Object.ObjectRefMethodInfo
ResolveDeviceAdslMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo
ResolveDeviceAdslMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo
ResolveDeviceAdslMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo
ResolveDeviceAdslMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo
ResolveDeviceAdslMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo
ResolveDeviceAdslMethod "unref" o = GObject.Object.ObjectUnrefMethodInfo
ResolveDeviceAdslMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo
ResolveDeviceAdslMethod "getActiveConnection" o = NM.Device.DeviceGetActiveConnectionMethodInfo
ResolveDeviceAdslMethod "getAppliedConnection" o = NM.Device.DeviceGetAppliedConnectionMethodInfo
ResolveDeviceAdslMethod "getAppliedConnectionAsync" o = NM.Device.DeviceGetAppliedConnectionAsyncMethodInfo
ResolveDeviceAdslMethod "getAppliedConnectionFinish" o = NM.Device.DeviceGetAppliedConnectionFinishMethodInfo
ResolveDeviceAdslMethod "getAutoconnect" o = NM.Device.DeviceGetAutoconnectMethodInfo
ResolveDeviceAdslMethod "getAvailableConnections" o = NM.Device.DeviceGetAvailableConnectionsMethodInfo
ResolveDeviceAdslMethod "getCapabilities" o = NM.Device.DeviceGetCapabilitiesMethodInfo
ResolveDeviceAdslMethod "getCarrier" o = DeviceAdslGetCarrierMethodInfo
ResolveDeviceAdslMethod "getClient" o = NM.Object.ObjectGetClientMethodInfo
ResolveDeviceAdslMethod "getConnectivity" o = NM.Device.DeviceGetConnectivityMethodInfo
ResolveDeviceAdslMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo
ResolveDeviceAdslMethod "getDescription" o = NM.Device.DeviceGetDescriptionMethodInfo
ResolveDeviceAdslMethod "getDeviceType" o = NM.Device.DeviceGetDeviceTypeMethodInfo
ResolveDeviceAdslMethod "getDhcp4Config" o = NM.Device.DeviceGetDhcp4ConfigMethodInfo
ResolveDeviceAdslMethod "getDhcp6Config" o = NM.Device.DeviceGetDhcp6ConfigMethodInfo
ResolveDeviceAdslMethod "getDriver" o = NM.Device.DeviceGetDriverMethodInfo
ResolveDeviceAdslMethod "getDriverVersion" o = NM.Device.DeviceGetDriverVersionMethodInfo
ResolveDeviceAdslMethod "getFirmwareMissing" o = NM.Device.DeviceGetFirmwareMissingMethodInfo
ResolveDeviceAdslMethod "getFirmwareVersion" o = NM.Device.DeviceGetFirmwareVersionMethodInfo
ResolveDeviceAdslMethod "getHwAddress" o = NM.Device.DeviceGetHwAddressMethodInfo
ResolveDeviceAdslMethod "getIface" o = NM.Device.DeviceGetIfaceMethodInfo
ResolveDeviceAdslMethod "getInterfaceFlags" o = NM.Device.DeviceGetInterfaceFlagsMethodInfo
ResolveDeviceAdslMethod "getIp4Config" o = NM.Device.DeviceGetIp4ConfigMethodInfo
ResolveDeviceAdslMethod "getIp6Config" o = NM.Device.DeviceGetIp6ConfigMethodInfo
ResolveDeviceAdslMethod "getIpIface" o = NM.Device.DeviceGetIpIfaceMethodInfo
ResolveDeviceAdslMethod "getLldpNeighbors" o = NM.Device.DeviceGetLldpNeighborsMethodInfo
ResolveDeviceAdslMethod "getManaged" o = NM.Device.DeviceGetManagedMethodInfo
ResolveDeviceAdslMethod "getMetered" o = NM.Device.DeviceGetMeteredMethodInfo
ResolveDeviceAdslMethod "getMtu" o = NM.Device.DeviceGetMtuMethodInfo
ResolveDeviceAdslMethod "getNmPluginMissing" o = NM.Device.DeviceGetNmPluginMissingMethodInfo
ResolveDeviceAdslMethod "getPath" o = NM.Device.DeviceGetPathMethodInfo
ResolveDeviceAdslMethod "getPhysicalPortId" o = NM.Device.DeviceGetPhysicalPortIdMethodInfo
ResolveDeviceAdslMethod "getPorts" o = NM.Device.DeviceGetPortsMethodInfo
ResolveDeviceAdslMethod "getProduct" o = NM.Device.DeviceGetProductMethodInfo
ResolveDeviceAdslMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo
ResolveDeviceAdslMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo
ResolveDeviceAdslMethod "getSettingType" o = NM.Device.DeviceGetSettingTypeMethodInfo
ResolveDeviceAdslMethod "getState" o = NM.Device.DeviceGetStateMethodInfo
ResolveDeviceAdslMethod "getStateReason" o = NM.Device.DeviceGetStateReasonMethodInfo
ResolveDeviceAdslMethod "getTypeDescription" o = NM.Device.DeviceGetTypeDescriptionMethodInfo
ResolveDeviceAdslMethod "getUdi" o = NM.Device.DeviceGetUdiMethodInfo
ResolveDeviceAdslMethod "getVendor" o = NM.Device.DeviceGetVendorMethodInfo
ResolveDeviceAdslMethod "setAutoconnect" o = NM.Device.DeviceSetAutoconnectMethodInfo
ResolveDeviceAdslMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo
ResolveDeviceAdslMethod "setDataFull" o = GObject.Object.ObjectSetDataFullMethodInfo
ResolveDeviceAdslMethod "setManaged" o = NM.Device.DeviceSetManagedMethodInfo
ResolveDeviceAdslMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo
ResolveDeviceAdslMethod l o = O.MethodResolutionFailed l o
instance (info ~ ResolveDeviceAdslMethod t DeviceAdsl, O.OverloadedMethod info DeviceAdsl p) => OL.IsLabel t (DeviceAdsl -> 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 ~ ResolveDeviceAdslMethod t DeviceAdsl, O.OverloadedMethod info DeviceAdsl p, R.HasField t DeviceAdsl p) => R.HasField t DeviceAdsl p where
getField = O.overloadedMethod @info
#endif
instance (info ~ ResolveDeviceAdslMethod t DeviceAdsl, O.OverloadedMethodInfo info DeviceAdsl) => OL.IsLabel t (O.MethodProxy info DeviceAdsl) where
#if MIN_VERSION_base(4,10,0)
fromLabel = O.MethodProxy
#else
fromLabel _ = O.MethodProxy
#endif
#endif
getDeviceAdslCarrier :: (MonadIO m, IsDeviceAdsl o) => o -> m Bool
getDeviceAdslCarrier :: forall (m :: * -> *) o. (MonadIO m, IsDeviceAdsl o) => o -> m Bool
getDeviceAdslCarrier 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
"carrier"
#if defined(ENABLE_OVERLOADING)
data DeviceAdslCarrierPropertyInfo
instance AttrInfo DeviceAdslCarrierPropertyInfo where
type AttrAllowedOps DeviceAdslCarrierPropertyInfo = '[ 'AttrGet]
type AttrBaseTypeConstraint DeviceAdslCarrierPropertyInfo = IsDeviceAdsl
type AttrSetTypeConstraint DeviceAdslCarrierPropertyInfo = (~) ()
type AttrTransferTypeConstraint DeviceAdslCarrierPropertyInfo = (~) ()
type AttrTransferType DeviceAdslCarrierPropertyInfo = ()
type AttrGetType DeviceAdslCarrierPropertyInfo = Bool
type AttrLabel DeviceAdslCarrierPropertyInfo = "carrier"
type AttrOrigin DeviceAdslCarrierPropertyInfo = DeviceAdsl
attrGet = getDeviceAdslCarrier
attrSet = undefined
attrTransfer _ = undefined
attrConstruct = undefined
attrClear = undefined
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.NM.Objects.DeviceAdsl.carrier"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Objects-DeviceAdsl.html#g:attr:carrier"
})
#endif
#if defined(ENABLE_OVERLOADING)
instance O.HasAttributeList DeviceAdsl
type instance O.AttributeList DeviceAdsl = DeviceAdslAttributeList
type DeviceAdslAttributeList = ('[ '("activeConnection", NM.Device.DeviceActiveConnectionPropertyInfo), '("autoconnect", NM.Device.DeviceAutoconnectPropertyInfo), '("availableConnections", NM.Device.DeviceAvailableConnectionsPropertyInfo), '("capabilities", NM.Device.DeviceCapabilitiesPropertyInfo), '("carrier", DeviceAdslCarrierPropertyInfo), '("client", NM.Object.ObjectClientPropertyInfo), '("deviceType", NM.Device.DeviceDeviceTypePropertyInfo), '("dhcp4Config", NM.Device.DeviceDhcp4ConfigPropertyInfo), '("dhcp6Config", NM.Device.DeviceDhcp6ConfigPropertyInfo), '("driver", NM.Device.DeviceDriverPropertyInfo), '("driverVersion", NM.Device.DeviceDriverVersionPropertyInfo), '("firmwareMissing", NM.Device.DeviceFirmwareMissingPropertyInfo), '("firmwareVersion", NM.Device.DeviceFirmwareVersionPropertyInfo), '("hwAddress", NM.Device.DeviceHwAddressPropertyInfo), '("interface", NM.Device.DeviceInterfacePropertyInfo), '("interfaceFlags", NM.Device.DeviceInterfaceFlagsPropertyInfo), '("ipInterface", NM.Device.DeviceIpInterfacePropertyInfo), '("ip4Config", NM.Device.DeviceIp4ConfigPropertyInfo), '("ip4Connectivity", NM.Device.DeviceIp4ConnectivityPropertyInfo), '("ip6Config", NM.Device.DeviceIp6ConfigPropertyInfo), '("ip6Connectivity", NM.Device.DeviceIp6ConnectivityPropertyInfo), '("lldpNeighbors", NM.Device.DeviceLldpNeighborsPropertyInfo), '("managed", NM.Device.DeviceManagedPropertyInfo), '("metered", NM.Device.DeviceMeteredPropertyInfo), '("mtu", NM.Device.DeviceMtuPropertyInfo), '("nmPluginMissing", NM.Device.DeviceNmPluginMissingPropertyInfo), '("path", NM.Device.DevicePathPropertyInfo), '("physicalPortId", NM.Device.DevicePhysicalPortIdPropertyInfo), '("ports", NM.Device.DevicePortsPropertyInfo), '("product", NM.Device.DeviceProductPropertyInfo), '("real", NM.Device.DeviceRealPropertyInfo), '("state", NM.Device.DeviceStatePropertyInfo), '("stateReason", NM.Device.DeviceStateReasonPropertyInfo), '("udi", NM.Device.DeviceUdiPropertyInfo), '("vendor", NM.Device.DeviceVendorPropertyInfo)] :: [(Symbol, DK.Type)])
#endif
#if defined(ENABLE_OVERLOADING)
deviceAdslCarrier :: AttrLabelProxy "carrier"
deviceAdslCarrier = AttrLabelProxy
#endif
#if defined(ENABLE_OVERLOADING)
type instance O.SignalList DeviceAdsl = DeviceAdslSignalList
type DeviceAdslSignalList = ('[ '("notify", GObject.Object.ObjectNotifySignalInfo), '("stateChanged", NM.Device.DeviceStateChangedSignalInfo)] :: [(Symbol, DK.Type)])
#endif
foreign import ccall "nm_device_adsl_get_carrier" nm_device_adsl_get_carrier ::
Ptr DeviceAdsl ->
IO CInt
deviceAdslGetCarrier ::
(B.CallStack.HasCallStack, MonadIO m, IsDeviceAdsl a) =>
a
-> m Bool
deviceAdslGetCarrier :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsDeviceAdsl a) =>
a -> m Bool
deviceAdslGetCarrier 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 DeviceAdsl
device' <- a -> IO (Ptr DeviceAdsl)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
device
CInt
result <- Ptr DeviceAdsl -> IO CInt
nm_device_adsl_get_carrier Ptr DeviceAdsl
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 DeviceAdslGetCarrierMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsDeviceAdsl a) => O.OverloadedMethod DeviceAdslGetCarrierMethodInfo a signature where
overloadedMethod = deviceAdslGetCarrier
instance O.OverloadedMethodInfo DeviceAdslGetCarrierMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.NM.Objects.DeviceAdsl.deviceAdslGetCarrier",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Objects-DeviceAdsl.html#v:deviceAdslGetCarrier"
})
#endif