{-# LANGUAGE TypeApplications #-}
#if (MIN_VERSION_haskell_gi_overloading(1,0,0) && !defined(__HADDOCK_VERSION__))
#define ENABLE_OVERLOADING
#endif
module GI.NM.Objects.WimaxNsp
(
WimaxNsp(..) ,
IsWimaxNsp ,
toWimaxNsp ,
#if defined(ENABLE_OVERLOADING)
ResolveWimaxNspMethod ,
#endif
#if defined(ENABLE_OVERLOADING)
WimaxNspConnectionValidMethodInfo ,
#endif
wimaxNspConnectionValid ,
#if defined(ENABLE_OVERLOADING)
WimaxNspFilterConnectionsMethodInfo ,
#endif
wimaxNspFilterConnections ,
#if defined(ENABLE_OVERLOADING)
WimaxNspGetNameMethodInfo ,
#endif
wimaxNspGetName ,
#if defined(ENABLE_OVERLOADING)
WimaxNspGetNetworkTypeMethodInfo ,
#endif
wimaxNspGetNetworkType ,
#if defined(ENABLE_OVERLOADING)
WimaxNspGetSignalQualityMethodInfo ,
#endif
wimaxNspGetSignalQuality ,
#if defined(ENABLE_OVERLOADING)
WimaxNspNamePropertyInfo ,
#endif
getWimaxNspName ,
#if defined(ENABLE_OVERLOADING)
wimaxNspName ,
#endif
#if defined(ENABLE_OVERLOADING)
WimaxNspNetworkTypePropertyInfo ,
#endif
getWimaxNspNetworkType ,
#if defined(ENABLE_OVERLOADING)
wimaxNspNetworkType ,
#endif
#if defined(ENABLE_OVERLOADING)
WimaxNspSignalQualityPropertyInfo ,
#endif
getWimaxNspSignalQuality ,
#if defined(ENABLE_OVERLOADING)
wimaxNspSignalQuality ,
#endif
) 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.Enums as NM.Enums
import {-# SOURCE #-} qualified GI.NM.Interfaces.Connection as NM.Connection
import {-# SOURCE #-} qualified GI.NM.Objects.Object as NM.Object
#endif
newtype WimaxNsp = WimaxNsp (SP.ManagedPtr WimaxNsp)
deriving (WimaxNsp -> WimaxNsp -> Bool
(WimaxNsp -> WimaxNsp -> Bool)
-> (WimaxNsp -> WimaxNsp -> Bool) -> Eq WimaxNsp
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: WimaxNsp -> WimaxNsp -> Bool
== :: WimaxNsp -> WimaxNsp -> Bool
$c/= :: WimaxNsp -> WimaxNsp -> Bool
/= :: WimaxNsp -> WimaxNsp -> Bool
Eq)
instance SP.ManagedPtrNewtype WimaxNsp where
toManagedPtr :: WimaxNsp -> ManagedPtr WimaxNsp
toManagedPtr (WimaxNsp ManagedPtr WimaxNsp
p) = ManagedPtr WimaxNsp
p
foreign import ccall "nm_wimax_nsp_get_type"
c_nm_wimax_nsp_get_type :: IO B.Types.GType
instance B.Types.TypedObject WimaxNsp where
glibType :: IO GType
glibType = IO GType
c_nm_wimax_nsp_get_type
instance B.Types.GObject WimaxNsp
class (SP.GObject o, O.IsDescendantOf WimaxNsp o) => IsWimaxNsp o
instance (SP.GObject o, O.IsDescendantOf WimaxNsp o) => IsWimaxNsp o
instance O.HasParentTypes WimaxNsp
type instance O.ParentTypes WimaxNsp = '[NM.Object.Object, GObject.Object.Object]
toWimaxNsp :: (MIO.MonadIO m, IsWimaxNsp o) => o -> m WimaxNsp
toWimaxNsp :: forall (m :: * -> *) o.
(MonadIO m, IsWimaxNsp o) =>
o -> m WimaxNsp
toWimaxNsp = IO WimaxNsp -> m WimaxNsp
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO WimaxNsp -> m WimaxNsp)
-> (o -> IO WimaxNsp) -> o -> m WimaxNsp
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (ManagedPtr WimaxNsp -> WimaxNsp) -> o -> IO WimaxNsp
forall o o'.
(HasCallStack, ManagedPtrNewtype o, TypedObject o,
ManagedPtrNewtype o', TypedObject o') =>
(ManagedPtr o' -> o') -> o -> IO o'
B.ManagedPtr.unsafeCastTo ManagedPtr WimaxNsp -> WimaxNsp
WimaxNsp
instance B.GValue.IsGValue (Maybe WimaxNsp) where
gvalueGType_ :: IO GType
gvalueGType_ = IO GType
c_nm_wimax_nsp_get_type
gvalueSet_ :: Ptr GValue -> Maybe WimaxNsp -> IO ()
gvalueSet_ Ptr GValue
gv Maybe WimaxNsp
P.Nothing = Ptr GValue -> Ptr WimaxNsp -> IO ()
forall a. GObject a => Ptr GValue -> Ptr a -> IO ()
B.GValue.set_object Ptr GValue
gv (Ptr WimaxNsp
forall a. Ptr a
FP.nullPtr :: FP.Ptr WimaxNsp)
gvalueSet_ Ptr GValue
gv (P.Just WimaxNsp
obj) = WimaxNsp -> (Ptr WimaxNsp -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
B.ManagedPtr.withManagedPtr WimaxNsp
obj (Ptr GValue -> Ptr WimaxNsp -> IO ()
forall a. GObject a => Ptr GValue -> Ptr a -> IO ()
B.GValue.set_object Ptr GValue
gv)
gvalueGet_ :: Ptr GValue -> IO (Maybe WimaxNsp)
gvalueGet_ Ptr GValue
gv = do
Ptr WimaxNsp
ptr <- Ptr GValue -> IO (Ptr WimaxNsp)
forall a. GObject a => Ptr GValue -> IO (Ptr a)
B.GValue.get_object Ptr GValue
gv :: IO (FP.Ptr WimaxNsp)
if Ptr WimaxNsp
ptr Ptr WimaxNsp -> Ptr WimaxNsp -> Bool
forall a. Eq a => a -> a -> Bool
/= Ptr WimaxNsp
forall a. Ptr a
FP.nullPtr
then WimaxNsp -> Maybe WimaxNsp
forall a. a -> Maybe a
P.Just (WimaxNsp -> Maybe WimaxNsp) -> IO WimaxNsp -> IO (Maybe WimaxNsp)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (ManagedPtr WimaxNsp -> WimaxNsp) -> Ptr WimaxNsp -> IO WimaxNsp
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
B.ManagedPtr.newObject ManagedPtr WimaxNsp -> WimaxNsp
WimaxNsp Ptr WimaxNsp
ptr
else Maybe WimaxNsp -> IO (Maybe WimaxNsp)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe WimaxNsp
forall a. Maybe a
P.Nothing
#if defined(ENABLE_OVERLOADING)
type family ResolveWimaxNspMethod (t :: Symbol) (o :: DK.Type) :: DK.Type where
ResolveWimaxNspMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo
ResolveWimaxNspMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo
ResolveWimaxNspMethod "connectionValid" o = WimaxNspConnectionValidMethodInfo
ResolveWimaxNspMethod "filterConnections" o = WimaxNspFilterConnectionsMethodInfo
ResolveWimaxNspMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo
ResolveWimaxNspMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo
ResolveWimaxNspMethod "getv" o = GObject.Object.ObjectGetvMethodInfo
ResolveWimaxNspMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo
ResolveWimaxNspMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo
ResolveWimaxNspMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo
ResolveWimaxNspMethod "ref" o = GObject.Object.ObjectRefMethodInfo
ResolveWimaxNspMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo
ResolveWimaxNspMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo
ResolveWimaxNspMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo
ResolveWimaxNspMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo
ResolveWimaxNspMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo
ResolveWimaxNspMethod "unref" o = GObject.Object.ObjectUnrefMethodInfo
ResolveWimaxNspMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo
ResolveWimaxNspMethod "getClient" o = NM.Object.ObjectGetClientMethodInfo
ResolveWimaxNspMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo
ResolveWimaxNspMethod "getName" o = WimaxNspGetNameMethodInfo
ResolveWimaxNspMethod "getNetworkType" o = WimaxNspGetNetworkTypeMethodInfo
ResolveWimaxNspMethod "getPath" o = NM.Object.ObjectGetPathMethodInfo
ResolveWimaxNspMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo
ResolveWimaxNspMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo
ResolveWimaxNspMethod "getSignalQuality" o = WimaxNspGetSignalQualityMethodInfo
ResolveWimaxNspMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo
ResolveWimaxNspMethod "setDataFull" o = GObject.Object.ObjectSetDataFullMethodInfo
ResolveWimaxNspMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo
ResolveWimaxNspMethod l o = O.MethodResolutionFailed l o
instance (info ~ ResolveWimaxNspMethod t WimaxNsp, O.OverloadedMethod info WimaxNsp p) => OL.IsLabel t (WimaxNsp -> 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 ~ ResolveWimaxNspMethod t WimaxNsp, O.OverloadedMethod info WimaxNsp p, R.HasField t WimaxNsp p) => R.HasField t WimaxNsp p where
getField = O.overloadedMethod @info
#endif
instance (info ~ ResolveWimaxNspMethod t WimaxNsp, O.OverloadedMethodInfo info WimaxNsp) => OL.IsLabel t (O.MethodProxy info WimaxNsp) where
#if MIN_VERSION_base(4,10,0)
fromLabel = O.MethodProxy
#else
fromLabel _ = O.MethodProxy
#endif
#endif
getWimaxNspName :: (MonadIO m, IsWimaxNsp o) => o -> m T.Text
getWimaxNspName :: forall (m :: * -> *) o. (MonadIO m, IsWimaxNsp o) => o -> m Text
getWimaxNspName 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
"getWimaxNspName" (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
"name"
#if defined(ENABLE_OVERLOADING)
data WimaxNspNamePropertyInfo
instance AttrInfo WimaxNspNamePropertyInfo where
type AttrAllowedOps WimaxNspNamePropertyInfo = '[ 'AttrGet, 'AttrClear]
type AttrBaseTypeConstraint WimaxNspNamePropertyInfo = IsWimaxNsp
type AttrSetTypeConstraint WimaxNspNamePropertyInfo = (~) ()
type AttrTransferTypeConstraint WimaxNspNamePropertyInfo = (~) ()
type AttrTransferType WimaxNspNamePropertyInfo = ()
type AttrGetType WimaxNspNamePropertyInfo = T.Text
type AttrLabel WimaxNspNamePropertyInfo = "name"
type AttrOrigin WimaxNspNamePropertyInfo = WimaxNsp
attrGet = getWimaxNspName
attrSet = undefined
attrTransfer _ = undefined
attrConstruct = undefined
attrClear = undefined
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.NM.Objects.WimaxNsp.name"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Objects-WimaxNsp.html#g:attr:name"
})
#endif
getWimaxNspNetworkType :: (MonadIO m, IsWimaxNsp o) => o -> m NM.Enums.WimaxNspNetworkType
getWimaxNspNetworkType :: forall (m :: * -> *) o.
(MonadIO m, IsWimaxNsp o) =>
o -> m WimaxNspNetworkType
getWimaxNspNetworkType o
obj = IO WimaxNspNetworkType -> m WimaxNspNetworkType
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO WimaxNspNetworkType -> m WimaxNspNetworkType)
-> IO WimaxNspNetworkType -> m WimaxNspNetworkType
forall a b. (a -> b) -> a -> b
$ o -> String -> IO WimaxNspNetworkType
forall a b. (GObject a, Enum b, BoxedEnum b) => a -> String -> IO b
B.Properties.getObjectPropertyEnum o
obj String
"network-type"
#if defined(ENABLE_OVERLOADING)
data WimaxNspNetworkTypePropertyInfo
instance AttrInfo WimaxNspNetworkTypePropertyInfo where
type AttrAllowedOps WimaxNspNetworkTypePropertyInfo = '[ 'AttrGet]
type AttrBaseTypeConstraint WimaxNspNetworkTypePropertyInfo = IsWimaxNsp
type AttrSetTypeConstraint WimaxNspNetworkTypePropertyInfo = (~) ()
type AttrTransferTypeConstraint WimaxNspNetworkTypePropertyInfo = (~) ()
type AttrTransferType WimaxNspNetworkTypePropertyInfo = ()
type AttrGetType WimaxNspNetworkTypePropertyInfo = NM.Enums.WimaxNspNetworkType
type AttrLabel WimaxNspNetworkTypePropertyInfo = "network-type"
type AttrOrigin WimaxNspNetworkTypePropertyInfo = WimaxNsp
attrGet = getWimaxNspNetworkType
attrSet = undefined
attrTransfer _ = undefined
attrConstruct = undefined
attrClear = undefined
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.NM.Objects.WimaxNsp.networkType"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Objects-WimaxNsp.html#g:attr:networkType"
})
#endif
getWimaxNspSignalQuality :: (MonadIO m, IsWimaxNsp o) => o -> m Word32
getWimaxNspSignalQuality :: forall (m :: * -> *) o. (MonadIO m, IsWimaxNsp o) => o -> m Word32
getWimaxNspSignalQuality 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
"signal-quality"
#if defined(ENABLE_OVERLOADING)
data WimaxNspSignalQualityPropertyInfo
instance AttrInfo WimaxNspSignalQualityPropertyInfo where
type AttrAllowedOps WimaxNspSignalQualityPropertyInfo = '[ 'AttrGet]
type AttrBaseTypeConstraint WimaxNspSignalQualityPropertyInfo = IsWimaxNsp
type AttrSetTypeConstraint WimaxNspSignalQualityPropertyInfo = (~) ()
type AttrTransferTypeConstraint WimaxNspSignalQualityPropertyInfo = (~) ()
type AttrTransferType WimaxNspSignalQualityPropertyInfo = ()
type AttrGetType WimaxNspSignalQualityPropertyInfo = Word32
type AttrLabel WimaxNspSignalQualityPropertyInfo = "signal-quality"
type AttrOrigin WimaxNspSignalQualityPropertyInfo = WimaxNsp
attrGet = getWimaxNspSignalQuality
attrSet = undefined
attrTransfer _ = undefined
attrConstruct = undefined
attrClear = undefined
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.NM.Objects.WimaxNsp.signalQuality"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Objects-WimaxNsp.html#g:attr:signalQuality"
})
#endif
#if defined(ENABLE_OVERLOADING)
instance O.HasAttributeList WimaxNsp
type instance O.AttributeList WimaxNsp = WimaxNspAttributeList
type WimaxNspAttributeList = ('[ '("client", NM.Object.ObjectClientPropertyInfo), '("name", WimaxNspNamePropertyInfo), '("networkType", WimaxNspNetworkTypePropertyInfo), '("path", NM.Object.ObjectPathPropertyInfo), '("signalQuality", WimaxNspSignalQualityPropertyInfo)] :: [(Symbol, DK.Type)])
#endif
#if defined(ENABLE_OVERLOADING)
wimaxNspName :: AttrLabelProxy "name"
wimaxNspName = AttrLabelProxy
wimaxNspNetworkType :: AttrLabelProxy "networkType"
wimaxNspNetworkType = AttrLabelProxy
wimaxNspSignalQuality :: AttrLabelProxy "signalQuality"
wimaxNspSignalQuality = AttrLabelProxy
#endif
#if defined(ENABLE_OVERLOADING)
type instance O.SignalList WimaxNsp = WimaxNspSignalList
type WimaxNspSignalList = ('[ '("notify", GObject.Object.ObjectNotifySignalInfo)] :: [(Symbol, DK.Type)])
#endif
foreign import ccall "nm_wimax_nsp_connection_valid" nm_wimax_nsp_connection_valid ::
Ptr WimaxNsp ->
Ptr NM.Connection.Connection ->
IO CInt
{-# DEPRECATED wimaxNspConnectionValid ["(Since version 1.22)","WiMAX is no longer supported by NetworkManager since 1.2.0."] #-}
wimaxNspConnectionValid ::
(B.CallStack.HasCallStack, MonadIO m, IsWimaxNsp a, NM.Connection.IsConnection b) =>
a
-> b
-> m Bool
wimaxNspConnectionValid :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsWimaxNsp a, IsConnection b) =>
a -> b -> m Bool
wimaxNspConnectionValid a
nsp 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 WimaxNsp
nsp' <- a -> IO (Ptr WimaxNsp)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
nsp
Ptr Connection
connection' <- b -> IO (Ptr Connection)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
connection
CInt
result <- Ptr WimaxNsp -> Ptr Connection -> IO CInt
nm_wimax_nsp_connection_valid Ptr WimaxNsp
nsp' 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
nsp
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 WimaxNspConnectionValidMethodInfo
instance (signature ~ (b -> m Bool), MonadIO m, IsWimaxNsp a, NM.Connection.IsConnection b) => O.OverloadedMethod WimaxNspConnectionValidMethodInfo a signature where
overloadedMethod = wimaxNspConnectionValid
instance O.OverloadedMethodInfo WimaxNspConnectionValidMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.NM.Objects.WimaxNsp.wimaxNspConnectionValid",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Objects-WimaxNsp.html#v:wimaxNspConnectionValid"
})
#endif
foreign import ccall "nm_wimax_nsp_filter_connections" nm_wimax_nsp_filter_connections ::
Ptr WimaxNsp ->
Ptr (GPtrArray (Ptr NM.Connection.Connection)) ->
IO (Ptr (GPtrArray (Ptr NM.Connection.Connection)))
{-# DEPRECATED wimaxNspFilterConnections ["(Since version 1.22)","WiMAX is no longer supported by NetworkManager since 1.2.0."] #-}
wimaxNspFilterConnections ::
(B.CallStack.HasCallStack, MonadIO m, IsWimaxNsp a) =>
a
-> [NM.Connection.Connection]
-> m [NM.Connection.Connection]
wimaxNspFilterConnections :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWimaxNsp a) =>
a -> [Connection] -> m [Connection]
wimaxNspFilterConnections a
nsp [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 WimaxNsp
nsp' <- a -> IO (Ptr WimaxNsp)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
nsp
[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 WimaxNsp
-> Ptr (GPtrArray (Ptr Connection))
-> IO (Ptr (GPtrArray (Ptr Connection)))
nm_wimax_nsp_filter_connections Ptr WimaxNsp
nsp' Ptr (GPtrArray (Ptr Connection))
connections''
Text -> Ptr (GPtrArray (Ptr Connection)) -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"wimaxNspFilterConnections" 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
nsp
(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 WimaxNspFilterConnectionsMethodInfo
instance (signature ~ ([NM.Connection.Connection] -> m [NM.Connection.Connection]), MonadIO m, IsWimaxNsp a) => O.OverloadedMethod WimaxNspFilterConnectionsMethodInfo a signature where
overloadedMethod = wimaxNspFilterConnections
instance O.OverloadedMethodInfo WimaxNspFilterConnectionsMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.NM.Objects.WimaxNsp.wimaxNspFilterConnections",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Objects-WimaxNsp.html#v:wimaxNspFilterConnections"
})
#endif
foreign import ccall "nm_wimax_nsp_get_name" nm_wimax_nsp_get_name ::
Ptr WimaxNsp ->
IO CString
{-# DEPRECATED wimaxNspGetName ["(Since version 1.22)","WiMAX is no longer supported by NetworkManager since 1.2.0."] #-}
wimaxNspGetName ::
(B.CallStack.HasCallStack, MonadIO m, IsWimaxNsp a) =>
a
-> m T.Text
wimaxNspGetName :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWimaxNsp a) =>
a -> m Text
wimaxNspGetName a
nsp = 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 WimaxNsp
nsp' <- a -> IO (Ptr WimaxNsp)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
nsp
CString
result <- Ptr WimaxNsp -> IO CString
nm_wimax_nsp_get_name Ptr WimaxNsp
nsp'
Text -> CString -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"wimaxNspGetName" CString
result
Text
result' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
nsp
Text -> IO Text
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Text
result'
#if defined(ENABLE_OVERLOADING)
data WimaxNspGetNameMethodInfo
instance (signature ~ (m T.Text), MonadIO m, IsWimaxNsp a) => O.OverloadedMethod WimaxNspGetNameMethodInfo a signature where
overloadedMethod = wimaxNspGetName
instance O.OverloadedMethodInfo WimaxNspGetNameMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.NM.Objects.WimaxNsp.wimaxNspGetName",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Objects-WimaxNsp.html#v:wimaxNspGetName"
})
#endif
foreign import ccall "nm_wimax_nsp_get_network_type" nm_wimax_nsp_get_network_type ::
Ptr WimaxNsp ->
IO CUInt
{-# DEPRECATED wimaxNspGetNetworkType ["(Since version 1.22)","WiMAX is no longer supported by NetworkManager since 1.2.0."] #-}
wimaxNspGetNetworkType ::
(B.CallStack.HasCallStack, MonadIO m, IsWimaxNsp a) =>
a
-> m NM.Enums.WimaxNspNetworkType
wimaxNspGetNetworkType :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWimaxNsp a) =>
a -> m WimaxNspNetworkType
wimaxNspGetNetworkType a
nsp = IO WimaxNspNetworkType -> m WimaxNspNetworkType
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO WimaxNspNetworkType -> m WimaxNspNetworkType)
-> IO WimaxNspNetworkType -> m WimaxNspNetworkType
forall a b. (a -> b) -> a -> b
$ do
Ptr WimaxNsp
nsp' <- a -> IO (Ptr WimaxNsp)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
nsp
CUInt
result <- Ptr WimaxNsp -> IO CUInt
nm_wimax_nsp_get_network_type Ptr WimaxNsp
nsp'
let result' :: WimaxNspNetworkType
result' = (Int -> WimaxNspNetworkType
forall a. Enum a => Int -> a
toEnum (Int -> WimaxNspNetworkType)
-> (CUInt -> Int) -> CUInt -> WimaxNspNetworkType
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
nsp
WimaxNspNetworkType -> IO WimaxNspNetworkType
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return WimaxNspNetworkType
result'
#if defined(ENABLE_OVERLOADING)
data WimaxNspGetNetworkTypeMethodInfo
instance (signature ~ (m NM.Enums.WimaxNspNetworkType), MonadIO m, IsWimaxNsp a) => O.OverloadedMethod WimaxNspGetNetworkTypeMethodInfo a signature where
overloadedMethod = wimaxNspGetNetworkType
instance O.OverloadedMethodInfo WimaxNspGetNetworkTypeMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.NM.Objects.WimaxNsp.wimaxNspGetNetworkType",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Objects-WimaxNsp.html#v:wimaxNspGetNetworkType"
})
#endif
foreign import ccall "nm_wimax_nsp_get_signal_quality" nm_wimax_nsp_get_signal_quality ::
Ptr WimaxNsp ->
IO Word32
{-# DEPRECATED wimaxNspGetSignalQuality ["(Since version 1.22)","WiMAX is no longer supported by NetworkManager since 1.2.0."] #-}
wimaxNspGetSignalQuality ::
(B.CallStack.HasCallStack, MonadIO m, IsWimaxNsp a) =>
a
-> m Word32
wimaxNspGetSignalQuality :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsWimaxNsp a) =>
a -> m Word32
wimaxNspGetSignalQuality a
nsp = 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 WimaxNsp
nsp' <- a -> IO (Ptr WimaxNsp)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
nsp
Word32
result <- Ptr WimaxNsp -> IO Word32
nm_wimax_nsp_get_signal_quality Ptr WimaxNsp
nsp'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
nsp
Word32 -> IO Word32
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Word32
result
#if defined(ENABLE_OVERLOADING)
data WimaxNspGetSignalQualityMethodInfo
instance (signature ~ (m Word32), MonadIO m, IsWimaxNsp a) => O.OverloadedMethod WimaxNspGetSignalQualityMethodInfo a signature where
overloadedMethod = wimaxNspGetSignalQuality
instance O.OverloadedMethodInfo WimaxNspGetSignalQualityMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.NM.Objects.WimaxNsp.wimaxNspGetSignalQuality",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-nm-1.0.1/docs/GI-NM-Objects-WimaxNsp.html#v:wimaxNspGetSignalQuality"
})
#endif