{-# LANGUAGE 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.AccessPoint
    ( 

-- * Exported types
    AccessPoint(..)                         ,
    IsAccessPoint                           ,
    toAccessPoint                           ,


 -- * 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"), [connectionValid]("GI.NM.Objects.AccessPoint#g:method:connectionValid"), [filterConnections]("GI.NM.Objects.AccessPoint#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"), [notify]("GI.GObject.Objects.Object#g:method:notify"), [notifyByPspec]("GI.GObject.Objects.Object#g:method:notifyByPspec"), [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
-- [getBandwidth]("GI.NM.Objects.AccessPoint#g:method:getBandwidth"), [getBssid]("GI.NM.Objects.AccessPoint#g:method:getBssid"), [getClient]("GI.NM.Objects.Object#g:method:getClient"), [getData]("GI.GObject.Objects.Object#g:method:getData"), [getFlags]("GI.NM.Objects.AccessPoint#g:method:getFlags"), [getFrequency]("GI.NM.Objects.AccessPoint#g:method:getFrequency"), [getLastSeen]("GI.NM.Objects.AccessPoint#g:method:getLastSeen"), [getMaxBitrate]("GI.NM.Objects.AccessPoint#g:method:getMaxBitrate"), [getMode]("GI.NM.Objects.AccessPoint#g:method:getMode"), [getPath]("GI.NM.Objects.Object#g:method:getPath"), [getProperty]("GI.GObject.Objects.Object#g:method:getProperty"), [getQdata]("GI.GObject.Objects.Object#g:method:getQdata"), [getRsnFlags]("GI.NM.Objects.AccessPoint#g:method:getRsnFlags"), [getSsid]("GI.NM.Objects.AccessPoint#g:method:getSsid"), [getStrength]("GI.NM.Objects.AccessPoint#g:method:getStrength"), [getWpaFlags]("GI.NM.Objects.AccessPoint#g:method:getWpaFlags").
-- 
-- ==== Setters
-- [setData]("GI.GObject.Objects.Object#g:method:setData"), [setDataFull]("GI.GObject.Objects.Object#g:method:setDataFull"), [setProperty]("GI.GObject.Objects.Object#g:method:setProperty").

#if defined(ENABLE_OVERLOADING)
    ResolveAccessPointMethod                ,
#endif

-- ** connectionValid #method:connectionValid#

#if defined(ENABLE_OVERLOADING)
    AccessPointConnectionValidMethodInfo    ,
#endif
    accessPointConnectionValid              ,


-- ** filterConnections #method:filterConnections#

#if defined(ENABLE_OVERLOADING)
    AccessPointFilterConnectionsMethodInfo  ,
#endif
    accessPointFilterConnections            ,


-- ** getBandwidth #method:getBandwidth#

#if defined(ENABLE_OVERLOADING)
    AccessPointGetBandwidthMethodInfo       ,
#endif
    accessPointGetBandwidth                 ,


-- ** getBssid #method:getBssid#

#if defined(ENABLE_OVERLOADING)
    AccessPointGetBssidMethodInfo           ,
#endif
    accessPointGetBssid                     ,


-- ** getFlags #method:getFlags#

#if defined(ENABLE_OVERLOADING)
    AccessPointGetFlagsMethodInfo           ,
#endif
    accessPointGetFlags                     ,


-- ** getFrequency #method:getFrequency#

#if defined(ENABLE_OVERLOADING)
    AccessPointGetFrequencyMethodInfo       ,
#endif
    accessPointGetFrequency                 ,


-- ** getLastSeen #method:getLastSeen#

#if defined(ENABLE_OVERLOADING)
    AccessPointGetLastSeenMethodInfo        ,
#endif
    accessPointGetLastSeen                  ,


-- ** getMaxBitrate #method:getMaxBitrate#

#if defined(ENABLE_OVERLOADING)
    AccessPointGetMaxBitrateMethodInfo      ,
#endif
    accessPointGetMaxBitrate                ,


-- ** getMode #method:getMode#

#if defined(ENABLE_OVERLOADING)
    AccessPointGetModeMethodInfo            ,
#endif
    accessPointGetMode                      ,


-- ** getRsnFlags #method:getRsnFlags#

#if defined(ENABLE_OVERLOADING)
    AccessPointGetRsnFlagsMethodInfo        ,
#endif
    accessPointGetRsnFlags                  ,


-- ** getSsid #method:getSsid#

#if defined(ENABLE_OVERLOADING)
    AccessPointGetSsidMethodInfo            ,
#endif
    accessPointGetSsid                      ,


-- ** getStrength #method:getStrength#

#if defined(ENABLE_OVERLOADING)
    AccessPointGetStrengthMethodInfo        ,
#endif
    accessPointGetStrength                  ,


-- ** getWpaFlags #method:getWpaFlags#

#if defined(ENABLE_OVERLOADING)
    AccessPointGetWpaFlagsMethodInfo        ,
#endif
    accessPointGetWpaFlags                  ,




 -- * Properties


-- ** bandwidth #attr:bandwidth#
-- | The channel bandwidth announced by the AP in MHz.
-- 
-- /Since: 1.46/

#if defined(ENABLE_OVERLOADING)
    AccessPointBandwidthPropertyInfo        ,
#endif
#if defined(ENABLE_OVERLOADING)
    accessPointBandwidth                    ,
#endif
    getAccessPointBandwidth                 ,


-- ** bssid #attr:bssid#
-- | The BSSID of the access point.

#if defined(ENABLE_OVERLOADING)
    AccessPointBssidPropertyInfo            ,
#endif
#if defined(ENABLE_OVERLOADING)
    accessPointBssid                        ,
#endif
    getAccessPointBssid                     ,


-- ** flags #attr:flags#
-- | The flags of the access point.

#if defined(ENABLE_OVERLOADING)
    AccessPointFlagsPropertyInfo            ,
#endif
#if defined(ENABLE_OVERLOADING)
    accessPointFlags                        ,
#endif
    getAccessPointFlags                     ,


-- ** frequency #attr:frequency#
-- | The frequency of the access point.

#if defined(ENABLE_OVERLOADING)
    AccessPointFrequencyPropertyInfo        ,
#endif
#if defined(ENABLE_OVERLOADING)
    accessPointFrequency                    ,
#endif
    getAccessPointFrequency                 ,


-- ** hwAddress #attr:hwAddress#
-- | Alias for [AccessPoint:bssid]("GI.NM.Objects.AccessPoint#g:attr:bssid").

#if defined(ENABLE_OVERLOADING)
    AccessPointHwAddressPropertyInfo        ,
#endif
#if defined(ENABLE_OVERLOADING)
    accessPointHwAddress                    ,
#endif
    getAccessPointHwAddress                 ,


-- ** lastSeen #attr:lastSeen#
-- | The timestamp (in CLOCK_BOOTTIME seconds) for the last time the
-- access point was found in scan results.  A value of -1 means the
-- access point has not been found in a scan.
-- 
-- /Since: 1.2/

#if defined(ENABLE_OVERLOADING)
    AccessPointLastSeenPropertyInfo         ,
#endif
#if defined(ENABLE_OVERLOADING)
    accessPointLastSeen                     ,
#endif
    getAccessPointLastSeen                  ,


-- ** maxBitrate #attr:maxBitrate#
-- | The maximum bit rate of the access point in kbit\/s.

#if defined(ENABLE_OVERLOADING)
    AccessPointMaxBitratePropertyInfo       ,
#endif
#if defined(ENABLE_OVERLOADING)
    accessPointMaxBitrate                   ,
#endif
    getAccessPointMaxBitrate                ,


-- ** mode #attr:mode#
-- | The mode of the access point; either \"infrastructure\" (a central
-- coordinator of the wireless network allowing clients to connect) or
-- \"ad-hoc\" (a network with no central controller).

#if defined(ENABLE_OVERLOADING)
    AccessPointModePropertyInfo             ,
#endif
#if defined(ENABLE_OVERLOADING)
    accessPointMode                         ,
#endif
    getAccessPointMode                      ,


-- ** rsnFlags #attr:rsnFlags#
-- | The RSN flags of the access point.

#if defined(ENABLE_OVERLOADING)
    AccessPointRsnFlagsPropertyInfo         ,
#endif
#if defined(ENABLE_OVERLOADING)
    accessPointRsnFlags                     ,
#endif
    getAccessPointRsnFlags                  ,


-- ** ssid #attr:ssid#
-- | The SSID of the access point, or 'P.Nothing' if it is not known.

#if defined(ENABLE_OVERLOADING)
    AccessPointSsidPropertyInfo             ,
#endif
#if defined(ENABLE_OVERLOADING)
    accessPointSsid                         ,
#endif
    getAccessPointSsid                      ,


-- ** strength #attr:strength#

#if defined(ENABLE_OVERLOADING)
    AccessPointStrengthPropertyInfo         ,
#endif
#if defined(ENABLE_OVERLOADING)
    accessPointStrength                     ,
#endif


-- ** wpaFlags #attr:wpaFlags#
-- | The WPA flags of the access point.

#if defined(ENABLE_OVERLOADING)
    AccessPointWpaFlagsPropertyInfo         ,
#endif
#if defined(ENABLE_OVERLOADING)
    accessPointWpaFlags                     ,
#endif
    getAccessPointWpaFlags                  ,




    ) 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.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.GLib.Structs.Bytes as GLib.Bytes
import qualified GI.GObject.Objects.Object as GObject.Object
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.Object as NM.Object

#endif

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

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

foreign import ccall "nm_access_point_get_type"
    c_nm_access_point_get_type :: IO B.Types.GType

instance B.Types.TypedObject AccessPoint where
    glibType :: IO GType
glibType = IO GType
c_nm_access_point_get_type

instance B.Types.GObject AccessPoint

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

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

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

-- | Convert t'AccessPoint' 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 AccessPoint) where
    gvalueGType_ :: IO GType
gvalueGType_ = IO GType
c_nm_access_point_get_type
    gvalueSet_ :: Ptr GValue -> Maybe AccessPoint -> IO ()
gvalueSet_ Ptr GValue
gv Maybe AccessPoint
P.Nothing = Ptr GValue -> Ptr AccessPoint -> IO ()
forall a. GObject a => Ptr GValue -> Ptr a -> IO ()
B.GValue.set_object Ptr GValue
gv (Ptr AccessPoint
forall a. Ptr a
FP.nullPtr :: FP.Ptr AccessPoint)
    gvalueSet_ Ptr GValue
gv (P.Just AccessPoint
obj) = AccessPoint -> (Ptr AccessPoint -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
B.ManagedPtr.withManagedPtr AccessPoint
obj (Ptr GValue -> Ptr AccessPoint -> IO ()
forall a. GObject a => Ptr GValue -> Ptr a -> IO ()
B.GValue.set_object Ptr GValue
gv)
    gvalueGet_ :: Ptr GValue -> IO (Maybe AccessPoint)
gvalueGet_ Ptr GValue
gv = do
        Ptr AccessPoint
ptr <- Ptr GValue -> IO (Ptr AccessPoint)
forall a. GObject a => Ptr GValue -> IO (Ptr a)
B.GValue.get_object Ptr GValue
gv :: IO (FP.Ptr AccessPoint)
        if Ptr AccessPoint
ptr Ptr AccessPoint -> Ptr AccessPoint -> Bool
forall a. Eq a => a -> a -> Bool
/= Ptr AccessPoint
forall a. Ptr a
FP.nullPtr
        then AccessPoint -> Maybe AccessPoint
forall a. a -> Maybe a
P.Just (AccessPoint -> Maybe AccessPoint)
-> IO AccessPoint -> IO (Maybe AccessPoint)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (ManagedPtr AccessPoint -> AccessPoint)
-> Ptr AccessPoint -> IO AccessPoint
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
B.ManagedPtr.newObject ManagedPtr AccessPoint -> AccessPoint
AccessPoint Ptr AccessPoint
ptr
        else Maybe AccessPoint -> IO (Maybe AccessPoint)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe AccessPoint
forall a. Maybe a
P.Nothing
        
    

#if defined(ENABLE_OVERLOADING)
type family ResolveAccessPointMethod (t :: Symbol) (o :: DK.Type) :: DK.Type where
    ResolveAccessPointMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo
    ResolveAccessPointMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo
    ResolveAccessPointMethod "connectionValid" o = AccessPointConnectionValidMethodInfo
    ResolveAccessPointMethod "filterConnections" o = AccessPointFilterConnectionsMethodInfo
    ResolveAccessPointMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo
    ResolveAccessPointMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo
    ResolveAccessPointMethod "getv" o = GObject.Object.ObjectGetvMethodInfo
    ResolveAccessPointMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo
    ResolveAccessPointMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo
    ResolveAccessPointMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo
    ResolveAccessPointMethod "ref" o = GObject.Object.ObjectRefMethodInfo
    ResolveAccessPointMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo
    ResolveAccessPointMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo
    ResolveAccessPointMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo
    ResolveAccessPointMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo
    ResolveAccessPointMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo
    ResolveAccessPointMethod "unref" o = GObject.Object.ObjectUnrefMethodInfo
    ResolveAccessPointMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo
    ResolveAccessPointMethod "getBandwidth" o = AccessPointGetBandwidthMethodInfo
    ResolveAccessPointMethod "getBssid" o = AccessPointGetBssidMethodInfo
    ResolveAccessPointMethod "getClient" o = NM.Object.ObjectGetClientMethodInfo
    ResolveAccessPointMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo
    ResolveAccessPointMethod "getFlags" o = AccessPointGetFlagsMethodInfo
    ResolveAccessPointMethod "getFrequency" o = AccessPointGetFrequencyMethodInfo
    ResolveAccessPointMethod "getLastSeen" o = AccessPointGetLastSeenMethodInfo
    ResolveAccessPointMethod "getMaxBitrate" o = AccessPointGetMaxBitrateMethodInfo
    ResolveAccessPointMethod "getMode" o = AccessPointGetModeMethodInfo
    ResolveAccessPointMethod "getPath" o = NM.Object.ObjectGetPathMethodInfo
    ResolveAccessPointMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo
    ResolveAccessPointMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo
    ResolveAccessPointMethod "getRsnFlags" o = AccessPointGetRsnFlagsMethodInfo
    ResolveAccessPointMethod "getSsid" o = AccessPointGetSsidMethodInfo
    ResolveAccessPointMethod "getStrength" o = AccessPointGetStrengthMethodInfo
    ResolveAccessPointMethod "getWpaFlags" o = AccessPointGetWpaFlagsMethodInfo
    ResolveAccessPointMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo
    ResolveAccessPointMethod "setDataFull" o = GObject.Object.ObjectSetDataFullMethodInfo
    ResolveAccessPointMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo
    ResolveAccessPointMethod l o = O.MethodResolutionFailed l o

instance (info ~ ResolveAccessPointMethod t AccessPoint, O.OverloadedMethod info AccessPoint p) => OL.IsLabel t (AccessPoint -> 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 ~ ResolveAccessPointMethod t AccessPoint, O.OverloadedMethod info AccessPoint p, R.HasField t AccessPoint p) => R.HasField t AccessPoint p where
    getField = O.overloadedMethod @info

#endif

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

#endif

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

-- | Get the value of the “@bandwidth@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.get' accessPoint #bandwidth
-- @
getAccessPointBandwidth :: (MonadIO m, IsAccessPoint o) => o -> m Word32
getAccessPointBandwidth :: forall (m :: * -> *) o.
(MonadIO m, IsAccessPoint o) =>
o -> m Word32
getAccessPointBandwidth 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
"bandwidth"

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

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

-- | Get the value of the “@bssid@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.get' accessPoint #bssid
-- @
getAccessPointBssid :: (MonadIO m, IsAccessPoint o) => o -> m T.Text
getAccessPointBssid :: forall (m :: * -> *) o. (MonadIO m, IsAccessPoint o) => o -> m Text
getAccessPointBssid 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
"getAccessPointBssid" (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
"bssid"

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

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

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

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

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

-- | Get the value of the “@frequency@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.get' accessPoint #frequency
-- @
getAccessPointFrequency :: (MonadIO m, IsAccessPoint o) => o -> m Word32
getAccessPointFrequency :: forall (m :: * -> *) o.
(MonadIO m, IsAccessPoint o) =>
o -> m Word32
getAccessPointFrequency 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
"frequency"

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

-- VVV Prop "hw-address"
   -- Type: TBasicType TUTF8
   -- Flags: [PropertyReadable]
   -- Nullable: (Nothing,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' accessPoint #hwAddress
-- @
getAccessPointHwAddress :: (MonadIO m, IsAccessPoint o) => o -> m (Maybe T.Text)
getAccessPointHwAddress :: forall (m :: * -> *) o.
(MonadIO m, IsAccessPoint o) =>
o -> m (Maybe Text)
getAccessPointHwAddress 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
"hw-address"

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

-- VVV Prop "last-seen"
   -- Type: TBasicType TInt
   -- Flags: [PropertyReadable]
   -- Nullable: (Just False,Nothing)

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

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

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

-- | Get the value of the “@max-bitrate@” property.
-- When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
-- 
-- @
-- 'Data.GI.Base.Attributes.get' accessPoint #maxBitrate
-- @
getAccessPointMaxBitrate :: (MonadIO m, IsAccessPoint o) => o -> m Word32
getAccessPointMaxBitrate :: forall (m :: * -> *) o.
(MonadIO m, IsAccessPoint o) =>
o -> m Word32
getAccessPointMaxBitrate 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
"max-bitrate"

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

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

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

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

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

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

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

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

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

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

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

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

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

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

#if defined(ENABLE_OVERLOADING)
instance O.HasAttributeList AccessPoint
type instance O.AttributeList AccessPoint = AccessPointAttributeList
type AccessPointAttributeList = ('[ '("bandwidth", AccessPointBandwidthPropertyInfo), '("bssid", AccessPointBssidPropertyInfo), '("client", NM.Object.ObjectClientPropertyInfo), '("flags", AccessPointFlagsPropertyInfo), '("frequency", AccessPointFrequencyPropertyInfo), '("hwAddress", AccessPointHwAddressPropertyInfo), '("lastSeen", AccessPointLastSeenPropertyInfo), '("maxBitrate", AccessPointMaxBitratePropertyInfo), '("mode", AccessPointModePropertyInfo), '("path", NM.Object.ObjectPathPropertyInfo), '("rsnFlags", AccessPointRsnFlagsPropertyInfo), '("ssid", AccessPointSsidPropertyInfo), '("strength", AccessPointStrengthPropertyInfo), '("wpaFlags", AccessPointWpaFlagsPropertyInfo)] :: [(Symbol, DK.Type)])
#endif

#if defined(ENABLE_OVERLOADING)
accessPointBandwidth :: AttrLabelProxy "bandwidth"
accessPointBandwidth = AttrLabelProxy

accessPointBssid :: AttrLabelProxy "bssid"
accessPointBssid = AttrLabelProxy

accessPointFlags :: AttrLabelProxy "flags"
accessPointFlags = AttrLabelProxy

accessPointFrequency :: AttrLabelProxy "frequency"
accessPointFrequency = AttrLabelProxy

accessPointHwAddress :: AttrLabelProxy "hwAddress"
accessPointHwAddress = AttrLabelProxy

accessPointLastSeen :: AttrLabelProxy "lastSeen"
accessPointLastSeen = AttrLabelProxy

accessPointMaxBitrate :: AttrLabelProxy "maxBitrate"
accessPointMaxBitrate = AttrLabelProxy

accessPointMode :: AttrLabelProxy "mode"
accessPointMode = AttrLabelProxy

accessPointRsnFlags :: AttrLabelProxy "rsnFlags"
accessPointRsnFlags = AttrLabelProxy

accessPointSsid :: AttrLabelProxy "ssid"
accessPointSsid = AttrLabelProxy

accessPointStrength :: AttrLabelProxy "strength"
accessPointStrength = AttrLabelProxy

accessPointWpaFlags :: AttrLabelProxy "wpaFlags"
accessPointWpaFlags = AttrLabelProxy

#endif

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

#endif

-- method AccessPoint::connection_valid
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "ap"
--           , argType =
--               TInterface Name { namespace = "NM" , name = "AccessPoint" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText =
--                     Just "an #NMAccessPoint 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 @ap"
--                 , 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_access_point_connection_valid" nm_access_point_connection_valid :: 
    Ptr AccessPoint ->                      -- ap : TInterface (Name {namespace = "NM", name = "AccessPoint"})
    Ptr NM.Connection.Connection ->         -- connection : TInterface (Name {namespace = "NM", name = "Connection"})
    IO CInt

-- | Validates a given connection against a given Wi-Fi access point to ensure that
-- the connection may be activated with that AP.  The connection must match the
-- /@ap@/\'s SSID, (if given) BSSID, and other attributes like security settings,
-- channel, band, etc.
accessPointConnectionValid ::
    (B.CallStack.HasCallStack, MonadIO m, IsAccessPoint a, NM.Connection.IsConnection b) =>
    a
    -- ^ /@ap@/: an t'GI.NM.Objects.AccessPoint.AccessPoint' to validate /@connection@/ against
    -> b
    -- ^ /@connection@/: an t'GI.NM.Interfaces.Connection.Connection' to validate against /@ap@/
    -> m Bool
    -- ^ __Returns:__ 'P.True' if the connection may be activated with this Wi-Fi AP,
    -- 'P.False' if it cannot be.
accessPointConnectionValid :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsAccessPoint a, IsConnection b) =>
a -> b -> m Bool
accessPointConnectionValid a
ap 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 AccessPoint
ap' <- a -> IO (Ptr AccessPoint)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
ap
    Ptr Connection
connection' <- b -> IO (Ptr Connection)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
connection
    CInt
result <- Ptr AccessPoint -> Ptr Connection -> IO CInt
nm_access_point_connection_valid Ptr AccessPoint
ap' 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
ap
    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 AccessPointConnectionValidMethodInfo
instance (signature ~ (b -> m Bool), MonadIO m, IsAccessPoint a, NM.Connection.IsConnection b) => O.OverloadedMethod AccessPointConnectionValidMethodInfo a signature where
    overloadedMethod = accessPointConnectionValid

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


#endif

-- method AccessPoint::filter_connections
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "ap"
--           , argType =
--               TInterface Name { namespace = "NM" , name = "AccessPoint" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "an #NMAccessPoint 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\nfilter"
--                 , 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_access_point_filter_connections" nm_access_point_filter_connections :: 
    Ptr AccessPoint ->                      -- ap : TInterface (Name {namespace = "NM", name = "AccessPoint"})
    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.AccessPoint.AccessPoint' object and
-- returns connections which may be activated with the access point.  Any
-- returned connections will match the /@ap@/\'s SSID and (if given) BSSID and
-- other attributes like security settings, channel, etc.
-- 
-- To obtain the list of connections that are compatible with this access point,
-- use 'GI.NM.Objects.Client.clientGetConnections' and then filter the returned list for a given
-- t'GI.NM.Objects.Device.Device' using 'GI.NM.Objects.Device.deviceFilterConnections' and finally filter that list
-- with this function.
accessPointFilterConnections ::
    (B.CallStack.HasCallStack, MonadIO m, IsAccessPoint a) =>
    a
    -- ^ /@ap@/: an t'GI.NM.Objects.AccessPoint.AccessPoint' 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 /@ap@/.  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.AccessPoint.accessPointConnectionValid'.
accessPointFilterConnections :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsAccessPoint a) =>
a -> [Connection] -> m [Connection]
accessPointFilterConnections a
ap [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 AccessPoint
ap' <- a -> IO (Ptr AccessPoint)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
ap
    [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 AccessPoint
-> Ptr (GPtrArray (Ptr Connection))
-> IO (Ptr (GPtrArray (Ptr Connection)))
nm_access_point_filter_connections Ptr AccessPoint
ap' Ptr (GPtrArray (Ptr Connection))
connections''
    Text -> Ptr (GPtrArray (Ptr Connection)) -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"accessPointFilterConnections" 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
ap
    (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 AccessPointFilterConnectionsMethodInfo
instance (signature ~ ([NM.Connection.Connection] -> m [NM.Connection.Connection]), MonadIO m, IsAccessPoint a) => O.OverloadedMethod AccessPointFilterConnectionsMethodInfo a signature where
    overloadedMethod = accessPointFilterConnections

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


#endif

-- method AccessPoint::get_bandwidth
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "ap"
--           , argType =
--               TInterface Name { namespace = "NM" , name = "AccessPoint" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #NMAccessPoint" , 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_access_point_get_bandwidth" nm_access_point_get_bandwidth :: 
    Ptr AccessPoint ->                      -- ap : TInterface (Name {namespace = "NM", name = "AccessPoint"})
    IO Word32

-- | Gets the bandwidth advertised by the access point in MHz.
-- 
-- /Since: 1.46/
accessPointGetBandwidth ::
    (B.CallStack.HasCallStack, MonadIO m, IsAccessPoint a) =>
    a
    -- ^ /@ap@/: a t'GI.NM.Objects.AccessPoint.AccessPoint'
    -> m Word32
    -- ^ __Returns:__ the advertised bandwidth (MHz)
accessPointGetBandwidth :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsAccessPoint a) =>
a -> m Word32
accessPointGetBandwidth a
ap = 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 AccessPoint
ap' <- a -> IO (Ptr AccessPoint)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
ap
    Word32
result <- Ptr AccessPoint -> IO Word32
nm_access_point_get_bandwidth Ptr AccessPoint
ap'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
ap
    Word32 -> IO Word32
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Word32
result

#if defined(ENABLE_OVERLOADING)
data AccessPointGetBandwidthMethodInfo
instance (signature ~ (m Word32), MonadIO m, IsAccessPoint a) => O.OverloadedMethod AccessPointGetBandwidthMethodInfo a signature where
    overloadedMethod = accessPointGetBandwidth

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


#endif

-- method AccessPoint::get_bssid
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "ap"
--           , argType =
--               TInterface Name { namespace = "NM" , name = "AccessPoint" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #NMAccessPoint" , 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_access_point_get_bssid" nm_access_point_get_bssid :: 
    Ptr AccessPoint ->                      -- ap : TInterface (Name {namespace = "NM", name = "AccessPoint"})
    IO CString

-- | Gets the Basic Service Set ID (BSSID) of the Wi-Fi access point.
accessPointGetBssid ::
    (B.CallStack.HasCallStack, MonadIO m, IsAccessPoint a) =>
    a
    -- ^ /@ap@/: a t'GI.NM.Objects.AccessPoint.AccessPoint'
    -> m T.Text
    -- ^ __Returns:__ the BSSID of the access point. This is an internal string and must
    -- not be modified or freed.
accessPointGetBssid :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsAccessPoint a) =>
a -> m Text
accessPointGetBssid a
ap = 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 AccessPoint
ap' <- a -> IO (Ptr AccessPoint)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
ap
    CString
result <- Ptr AccessPoint -> IO CString
nm_access_point_get_bssid Ptr AccessPoint
ap'
    Text -> CString -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"accessPointGetBssid" CString
result
    Text
result' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
ap
    Text -> IO Text
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Text
result'

#if defined(ENABLE_OVERLOADING)
data AccessPointGetBssidMethodInfo
instance (signature ~ (m T.Text), MonadIO m, IsAccessPoint a) => O.OverloadedMethod AccessPointGetBssidMethodInfo a signature where
    overloadedMethod = accessPointGetBssid

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


#endif

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

foreign import ccall "nm_access_point_get_flags" nm_access_point_get_flags :: 
    Ptr AccessPoint ->                      -- ap : TInterface (Name {namespace = "NM", name = "AccessPoint"})
    IO CUInt

-- | Gets the flags of the access point.
accessPointGetFlags ::
    (B.CallStack.HasCallStack, MonadIO m, IsAccessPoint a) =>
    a
    -- ^ /@ap@/: a t'GI.NM.Objects.AccessPoint.AccessPoint'
    -> m [NM.Flags.NM80211ApFlags]
    -- ^ __Returns:__ the flags
accessPointGetFlags :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsAccessPoint a) =>
a -> m [NM80211ApFlags]
accessPointGetFlags a
ap = IO [NM80211ApFlags] -> m [NM80211ApFlags]
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO [NM80211ApFlags] -> m [NM80211ApFlags])
-> IO [NM80211ApFlags] -> m [NM80211ApFlags]
forall a b. (a -> b) -> a -> b
$ do
    Ptr AccessPoint
ap' <- a -> IO (Ptr AccessPoint)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
ap
    CUInt
result <- Ptr AccessPoint -> IO CUInt
nm_access_point_get_flags Ptr AccessPoint
ap'
    let result' :: [NM80211ApFlags]
result' = CUInt -> [NM80211ApFlags]
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
ap
    [NM80211ApFlags] -> IO [NM80211ApFlags]
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return [NM80211ApFlags]
result'

#if defined(ENABLE_OVERLOADING)
data AccessPointGetFlagsMethodInfo
instance (signature ~ (m [NM.Flags.NM80211ApFlags]), MonadIO m, IsAccessPoint a) => O.OverloadedMethod AccessPointGetFlagsMethodInfo a signature where
    overloadedMethod = accessPointGetFlags

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


#endif

-- method AccessPoint::get_frequency
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "ap"
--           , argType =
--               TInterface Name { namespace = "NM" , name = "AccessPoint" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #NMAccessPoint" , 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_access_point_get_frequency" nm_access_point_get_frequency :: 
    Ptr AccessPoint ->                      -- ap : TInterface (Name {namespace = "NM", name = "AccessPoint"})
    IO Word32

-- | Gets the frequency of the access point in MHz.
accessPointGetFrequency ::
    (B.CallStack.HasCallStack, MonadIO m, IsAccessPoint a) =>
    a
    -- ^ /@ap@/: a t'GI.NM.Objects.AccessPoint.AccessPoint'
    -> m Word32
    -- ^ __Returns:__ the frequency in MHz
accessPointGetFrequency :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsAccessPoint a) =>
a -> m Word32
accessPointGetFrequency a
ap = 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 AccessPoint
ap' <- a -> IO (Ptr AccessPoint)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
ap
    Word32
result <- Ptr AccessPoint -> IO Word32
nm_access_point_get_frequency Ptr AccessPoint
ap'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
ap
    Word32 -> IO Word32
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Word32
result

#if defined(ENABLE_OVERLOADING)
data AccessPointGetFrequencyMethodInfo
instance (signature ~ (m Word32), MonadIO m, IsAccessPoint a) => O.OverloadedMethod AccessPointGetFrequencyMethodInfo a signature where
    overloadedMethod = accessPointGetFrequency

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


#endif

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

foreign import ccall "nm_access_point_get_last_seen" nm_access_point_get_last_seen :: 
    Ptr AccessPoint ->                      -- ap : TInterface (Name {namespace = "NM", name = "AccessPoint"})
    IO Int32

-- | Returns the timestamp (in CLOCK_BOOTTIME seconds) for the last time the
-- access point was found in scan results.  A value of -1 means the access
-- point has not been found in a scan.
-- 
-- /Since: 1.2/
accessPointGetLastSeen ::
    (B.CallStack.HasCallStack, MonadIO m, IsAccessPoint a) =>
    a
    -- ^ /@ap@/: a t'GI.NM.Objects.AccessPoint.AccessPoint'
    -> m Int32
    -- ^ __Returns:__ the last seen time in seconds
accessPointGetLastSeen :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsAccessPoint a) =>
a -> m Int32
accessPointGetLastSeen a
ap = IO Int32 -> m Int32
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Int32 -> m Int32) -> IO Int32 -> m Int32
forall a b. (a -> b) -> a -> b
$ do
    Ptr AccessPoint
ap' <- a -> IO (Ptr AccessPoint)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
ap
    Int32
result <- Ptr AccessPoint -> IO Int32
nm_access_point_get_last_seen Ptr AccessPoint
ap'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
ap
    Int32 -> IO Int32
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Int32
result

#if defined(ENABLE_OVERLOADING)
data AccessPointGetLastSeenMethodInfo
instance (signature ~ (m Int32), MonadIO m, IsAccessPoint a) => O.OverloadedMethod AccessPointGetLastSeenMethodInfo a signature where
    overloadedMethod = accessPointGetLastSeen

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


#endif

-- method AccessPoint::get_max_bitrate
-- method type : OrdinaryMethod
-- Args: [ Arg
--           { argCName = "ap"
--           , argType =
--               TInterface Name { namespace = "NM" , name = "AccessPoint" }
--           , direction = DirectionIn
--           , mayBeNull = False
--           , argDoc =
--               Documentation
--                 { rawDocText = Just "a #NMAccessPoint" , 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_access_point_get_max_bitrate" nm_access_point_get_max_bitrate :: 
    Ptr AccessPoint ->                      -- ap : TInterface (Name {namespace = "NM", name = "AccessPoint"})
    IO Word32

-- | Gets the maximum bit rate of the access point in kbit\/s.
accessPointGetMaxBitrate ::
    (B.CallStack.HasCallStack, MonadIO m, IsAccessPoint a) =>
    a
    -- ^ /@ap@/: a t'GI.NM.Objects.AccessPoint.AccessPoint'
    -> m Word32
    -- ^ __Returns:__ the maximum bit rate (kbit\/s)
accessPointGetMaxBitrate :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsAccessPoint a) =>
a -> m Word32
accessPointGetMaxBitrate a
ap = 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 AccessPoint
ap' <- a -> IO (Ptr AccessPoint)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
ap
    Word32
result <- Ptr AccessPoint -> IO Word32
nm_access_point_get_max_bitrate Ptr AccessPoint
ap'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
ap
    Word32 -> IO Word32
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Word32
result

#if defined(ENABLE_OVERLOADING)
data AccessPointGetMaxBitrateMethodInfo
instance (signature ~ (m Word32), MonadIO m, IsAccessPoint a) => O.OverloadedMethod AccessPointGetMaxBitrateMethodInfo a signature where
    overloadedMethod = accessPointGetMaxBitrate

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


#endif

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

foreign import ccall "nm_access_point_get_mode" nm_access_point_get_mode :: 
    Ptr AccessPoint ->                      -- ap : TInterface (Name {namespace = "NM", name = "AccessPoint"})
    IO CUInt

-- | Gets the mode of the access point.
accessPointGetMode ::
    (B.CallStack.HasCallStack, MonadIO m, IsAccessPoint a) =>
    a
    -- ^ /@ap@/: a t'GI.NM.Objects.AccessPoint.AccessPoint'
    -> m NM.Enums.NM80211Mode
    -- ^ __Returns:__ the mode
accessPointGetMode :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsAccessPoint a) =>
a -> m NM80211Mode
accessPointGetMode a
ap = IO NM80211Mode -> m NM80211Mode
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO NM80211Mode -> m NM80211Mode)
-> IO NM80211Mode -> m NM80211Mode
forall a b. (a -> b) -> a -> b
$ do
    Ptr AccessPoint
ap' <- a -> IO (Ptr AccessPoint)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
ap
    CUInt
result <- Ptr AccessPoint -> IO CUInt
nm_access_point_get_mode Ptr AccessPoint
ap'
    let result' :: NM80211Mode
result' = (Int -> NM80211Mode
forall a. Enum a => Int -> a
toEnum (Int -> NM80211Mode) -> (CUInt -> Int) -> CUInt -> NM80211Mode
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
ap
    NM80211Mode -> IO NM80211Mode
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return NM80211Mode
result'

#if defined(ENABLE_OVERLOADING)
data AccessPointGetModeMethodInfo
instance (signature ~ (m NM.Enums.NM80211Mode), MonadIO m, IsAccessPoint a) => O.OverloadedMethod AccessPointGetModeMethodInfo a signature where
    overloadedMethod = accessPointGetMode

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


#endif

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

foreign import ccall "nm_access_point_get_rsn_flags" nm_access_point_get_rsn_flags :: 
    Ptr AccessPoint ->                      -- ap : TInterface (Name {namespace = "NM", name = "AccessPoint"})
    IO CUInt

-- | Gets the RSN (Robust Secure Network, ie WPA version 2) flags of the access
-- point.
accessPointGetRsnFlags ::
    (B.CallStack.HasCallStack, MonadIO m, IsAccessPoint a) =>
    a
    -- ^ /@ap@/: a t'GI.NM.Objects.AccessPoint.AccessPoint'
    -> m [NM.Flags.NM80211ApSecurityFlags]
    -- ^ __Returns:__ the RSN flags
accessPointGetRsnFlags :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsAccessPoint a) =>
a -> m [NM80211ApSecurityFlags]
accessPointGetRsnFlags a
ap = IO [NM80211ApSecurityFlags] -> m [NM80211ApSecurityFlags]
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO [NM80211ApSecurityFlags] -> m [NM80211ApSecurityFlags])
-> IO [NM80211ApSecurityFlags] -> m [NM80211ApSecurityFlags]
forall a b. (a -> b) -> a -> b
$ do
    Ptr AccessPoint
ap' <- a -> IO (Ptr AccessPoint)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
ap
    CUInt
result <- Ptr AccessPoint -> IO CUInt
nm_access_point_get_rsn_flags Ptr AccessPoint
ap'
    let result' :: [NM80211ApSecurityFlags]
result' = CUInt -> [NM80211ApSecurityFlags]
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
ap
    [NM80211ApSecurityFlags] -> IO [NM80211ApSecurityFlags]
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return [NM80211ApSecurityFlags]
result'

#if defined(ENABLE_OVERLOADING)
data AccessPointGetRsnFlagsMethodInfo
instance (signature ~ (m [NM.Flags.NM80211ApSecurityFlags]), MonadIO m, IsAccessPoint a) => O.OverloadedMethod AccessPointGetRsnFlagsMethodInfo a signature where
    overloadedMethod = accessPointGetRsnFlags

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


#endif

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

foreign import ccall "nm_access_point_get_ssid" nm_access_point_get_ssid :: 
    Ptr AccessPoint ->                      -- ap : TInterface (Name {namespace = "NM", name = "AccessPoint"})
    IO (Ptr GLib.Bytes.Bytes)

-- | Gets the SSID of the access point.
accessPointGetSsid ::
    (B.CallStack.HasCallStack, MonadIO m, IsAccessPoint a) =>
    a
    -- ^ /@ap@/: a t'GI.NM.Objects.AccessPoint.AccessPoint'
    -> m GLib.Bytes.Bytes
    -- ^ __Returns:__ the t'GI.GLib.Structs.Bytes.Bytes' containing the SSID, or 'P.Nothing' if the
    --   SSID is unknown.
accessPointGetSsid :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsAccessPoint a) =>
a -> m Bytes
accessPointGetSsid a
ap = IO Bytes -> m Bytes
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bytes -> m Bytes) -> IO Bytes -> m Bytes
forall a b. (a -> b) -> a -> b
$ do
    Ptr AccessPoint
ap' <- a -> IO (Ptr AccessPoint)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
ap
    Ptr Bytes
result <- Ptr AccessPoint -> IO (Ptr Bytes)
nm_access_point_get_ssid Ptr AccessPoint
ap'
    Text -> Ptr Bytes -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"accessPointGetSsid" Ptr Bytes
result
    Bytes
result' <- ((ManagedPtr Bytes -> Bytes) -> Ptr Bytes -> IO Bytes
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
newBoxed ManagedPtr Bytes -> Bytes
GLib.Bytes.Bytes) Ptr Bytes
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
ap
    Bytes -> IO Bytes
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Bytes
result'

#if defined(ENABLE_OVERLOADING)
data AccessPointGetSsidMethodInfo
instance (signature ~ (m GLib.Bytes.Bytes), MonadIO m, IsAccessPoint a) => O.OverloadedMethod AccessPointGetSsidMethodInfo a signature where
    overloadedMethod = accessPointGetSsid

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


#endif

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

foreign import ccall "nm_access_point_get_strength" nm_access_point_get_strength :: 
    Ptr AccessPoint ->                      -- ap : TInterface (Name {namespace = "NM", name = "AccessPoint"})
    IO Word8

-- | Gets the current signal strength of the access point as a percentage.
accessPointGetStrength ::
    (B.CallStack.HasCallStack, MonadIO m, IsAccessPoint a) =>
    a
    -- ^ /@ap@/: a t'GI.NM.Objects.AccessPoint.AccessPoint'
    -> m Word8
    -- ^ __Returns:__ the signal strength (0 to 100)
accessPointGetStrength :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsAccessPoint a) =>
a -> m Word8
accessPointGetStrength a
ap = IO Word8 -> m Word8
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Word8 -> m Word8) -> IO Word8 -> m Word8
forall a b. (a -> b) -> a -> b
$ do
    Ptr AccessPoint
ap' <- a -> IO (Ptr AccessPoint)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
ap
    Word8
result <- Ptr AccessPoint -> IO Word8
nm_access_point_get_strength Ptr AccessPoint
ap'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
ap
    Word8 -> IO Word8
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Word8
result

#if defined(ENABLE_OVERLOADING)
data AccessPointGetStrengthMethodInfo
instance (signature ~ (m Word8), MonadIO m, IsAccessPoint a) => O.OverloadedMethod AccessPointGetStrengthMethodInfo a signature where
    overloadedMethod = accessPointGetStrength

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


#endif

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

foreign import ccall "nm_access_point_get_wpa_flags" nm_access_point_get_wpa_flags :: 
    Ptr AccessPoint ->                      -- ap : TInterface (Name {namespace = "NM", name = "AccessPoint"})
    IO CUInt

-- | Gets the WPA (version 1) flags of the access point.
accessPointGetWpaFlags ::
    (B.CallStack.HasCallStack, MonadIO m, IsAccessPoint a) =>
    a
    -- ^ /@ap@/: a t'GI.NM.Objects.AccessPoint.AccessPoint'
    -> m [NM.Flags.NM80211ApSecurityFlags]
    -- ^ __Returns:__ the WPA flags
accessPointGetWpaFlags :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsAccessPoint a) =>
a -> m [NM80211ApSecurityFlags]
accessPointGetWpaFlags a
ap = IO [NM80211ApSecurityFlags] -> m [NM80211ApSecurityFlags]
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO [NM80211ApSecurityFlags] -> m [NM80211ApSecurityFlags])
-> IO [NM80211ApSecurityFlags] -> m [NM80211ApSecurityFlags]
forall a b. (a -> b) -> a -> b
$ do
    Ptr AccessPoint
ap' <- a -> IO (Ptr AccessPoint)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
ap
    CUInt
result <- Ptr AccessPoint -> IO CUInt
nm_access_point_get_wpa_flags Ptr AccessPoint
ap'
    let result' :: [NM80211ApSecurityFlags]
result' = CUInt -> [NM80211ApSecurityFlags]
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
ap
    [NM80211ApSecurityFlags] -> IO [NM80211ApSecurityFlags]
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return [NM80211ApSecurityFlags]
result'

#if defined(ENABLE_OVERLOADING)
data AccessPointGetWpaFlagsMethodInfo
instance (signature ~ (m [NM.Flags.NM80211ApSecurityFlags]), MonadIO m, IsAccessPoint a) => O.OverloadedMethod AccessPointGetWpaFlagsMethodInfo a signature where
    overloadedMethod = accessPointGetWpaFlags

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


#endif