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

-- * Exported types
    DeviceOlpcMesh(..)                      ,
    IsDeviceOlpcMesh                        ,
    toDeviceOlpcMesh                        ,


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

#if defined(ENABLE_OVERLOADING)
    ResolveDeviceOlpcMeshMethod             ,
#endif

-- ** getActiveChannel #method:getActiveChannel#

#if defined(ENABLE_OVERLOADING)
    DeviceOlpcMeshGetActiveChannelMethodInfo,
#endif
    deviceOlpcMeshGetActiveChannel          ,


-- ** getCompanion #method:getCompanion#

#if defined(ENABLE_OVERLOADING)
    DeviceOlpcMeshGetCompanionMethodInfo    ,
#endif
    deviceOlpcMeshGetCompanion              ,




 -- * Properties


-- ** activeChannel #attr:activeChannel#
-- | The device\'s active channel.

#if defined(ENABLE_OVERLOADING)
    DeviceOlpcMeshActiveChannelPropertyInfo ,
#endif
#if defined(ENABLE_OVERLOADING)
    deviceOlpcMeshActiveChannel             ,
#endif
    getDeviceOlpcMeshActiveChannel          ,


-- ** companion #attr:companion#
-- | The companion device.

#if defined(ENABLE_OVERLOADING)
    DeviceOlpcMeshCompanionPropertyInfo     ,
#endif
#if defined(ENABLE_OVERLOADING)
    deviceOlpcMeshCompanion                 ,
#endif
    getDeviceOlpcMeshCompanion              ,




    ) 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.AccessPoint as NM.AccessPoint
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.DeviceWifi as NM.DeviceWifi
import {-# SOURCE #-} qualified GI.NM.Objects.DhcpConfig as NM.DhcpConfig
import {-# SOURCE #-} qualified GI.NM.Objects.IPConfig as NM.IPConfig
import {-# SOURCE #-} qualified GI.NM.Objects.Object as NM.Object
import {-# SOURCE #-} qualified GI.NM.Objects.RemoteConnection as NM.RemoteConnection
import {-# SOURCE #-} qualified GI.NM.Objects.Setting as NM.Setting
import {-# SOURCE #-} qualified GI.NM.Objects.Setting8021x as NM.Setting8021x
import {-# SOURCE #-} qualified GI.NM.Objects.SettingAdsl as NM.SettingAdsl
import {-# SOURCE #-} qualified GI.NM.Objects.SettingBluetooth as NM.SettingBluetooth
import {-# SOURCE #-} qualified GI.NM.Objects.SettingBond as NM.SettingBond
import {-# SOURCE #-} qualified GI.NM.Objects.SettingBridge as NM.SettingBridge
import {-# SOURCE #-} qualified GI.NM.Objects.SettingBridgePort as NM.SettingBridgePort
import {-# SOURCE #-} qualified GI.NM.Objects.SettingCdma as NM.SettingCdma
import {-# SOURCE #-} qualified GI.NM.Objects.SettingConnection as NM.SettingConnection
import {-# SOURCE #-} qualified GI.NM.Objects.SettingDcb as NM.SettingDcb
import {-# SOURCE #-} qualified GI.NM.Objects.SettingDummy as NM.SettingDummy
import {-# SOURCE #-} qualified GI.NM.Objects.SettingGeneric as NM.SettingGeneric
import {-# SOURCE #-} qualified GI.NM.Objects.SettingGsm as NM.SettingGsm
import {-# SOURCE #-} qualified GI.NM.Objects.SettingIP4Config as NM.SettingIP4Config
import {-# SOURCE #-} qualified GI.NM.Objects.SettingIP6Config as NM.SettingIP6Config
import {-# SOURCE #-} qualified GI.NM.Objects.SettingIPConfig as NM.SettingIPConfig
import {-# SOURCE #-} qualified GI.NM.Objects.SettingIPTunnel as NM.SettingIPTunnel
import {-# SOURCE #-} qualified GI.NM.Objects.SettingInfiniband as NM.SettingInfiniband
import {-# SOURCE #-} qualified GI.NM.Objects.SettingMacsec as NM.SettingMacsec
import {-# SOURCE #-} qualified GI.NM.Objects.SettingMacvlan as NM.SettingMacvlan
import {-# SOURCE #-} qualified GI.NM.Objects.SettingOlpcMesh as NM.SettingOlpcMesh
import {-# SOURCE #-} qualified GI.NM.Objects.SettingOvsBridge as NM.SettingOvsBridge
import {-# SOURCE #-} qualified GI.NM.Objects.SettingOvsInterface as NM.SettingOvsInterface
import {-# SOURCE #-} qualified GI.NM.Objects.SettingOvsPatch as NM.SettingOvsPatch
import {-# SOURCE #-} qualified GI.NM.Objects.SettingOvsPort as NM.SettingOvsPort
import {-# SOURCE #-} qualified GI.NM.Objects.SettingPpp as NM.SettingPpp
import {-# SOURCE #-} qualified GI.NM.Objects.SettingPppoe as NM.SettingPppoe
import {-# SOURCE #-} qualified GI.NM.Objects.SettingProxy as NM.SettingProxy
import {-# SOURCE #-} qualified GI.NM.Objects.SettingSerial as NM.SettingSerial
import {-# SOURCE #-} qualified GI.NM.Objects.SettingTCConfig as NM.SettingTCConfig
import {-# SOURCE #-} qualified GI.NM.Objects.SettingTeam as NM.SettingTeam
import {-# SOURCE #-} qualified GI.NM.Objects.SettingTeamPort as NM.SettingTeamPort
import {-# SOURCE #-} qualified GI.NM.Objects.SettingTun as NM.SettingTun
import {-# SOURCE #-} qualified GI.NM.Objects.SettingVlan as NM.SettingVlan
import {-# SOURCE #-} qualified GI.NM.Objects.SettingVpn as NM.SettingVpn
import {-# SOURCE #-} qualified GI.NM.Objects.SettingVxlan as NM.SettingVxlan
import {-# SOURCE #-} qualified GI.NM.Objects.SettingWimax as NM.SettingWimax
import {-# SOURCE #-} qualified GI.NM.Objects.SettingWired as NM.SettingWired
import {-# SOURCE #-} qualified GI.NM.Objects.SettingWireless as NM.SettingWireless
import {-# SOURCE #-} qualified GI.NM.Objects.SettingWirelessSecurity as NM.SettingWirelessSecurity
import {-# SOURCE #-} qualified GI.NM.Structs.BridgeVlan as NM.BridgeVlan
import {-# SOURCE #-} qualified GI.NM.Structs.DnsEntry as NM.DnsEntry
import {-# SOURCE #-} qualified GI.NM.Structs.IPAddress as NM.IPAddress
import {-# SOURCE #-} qualified GI.NM.Structs.IPRoute as NM.IPRoute
import {-# SOURCE #-} qualified GI.NM.Structs.IPRoutingRule as NM.IPRoutingRule
import {-# SOURCE #-} qualified GI.NM.Structs.LldpNeighbor as NM.LldpNeighbor
import {-# SOURCE #-} qualified GI.NM.Structs.Range as NM.Range
import {-# SOURCE #-} qualified GI.NM.Structs.TCAction as NM.TCAction
import {-# SOURCE #-} qualified GI.NM.Structs.TCQdisc as NM.TCQdisc
import {-# SOURCE #-} qualified GI.NM.Structs.TCTfilter as NM.TCTfilter
import {-# SOURCE #-} qualified GI.NM.Structs.TeamLinkWatcher as NM.TeamLinkWatcher
import {-# SOURCE #-} qualified GI.NM.Structs.VariantAttributeSpec as NM.VariantAttributeSpec

#else
import qualified GI.GObject.Objects.Object as GObject.Object
import {-# SOURCE #-} qualified GI.NM.Objects.Device as NM.Device
import {-# SOURCE #-} qualified GI.NM.Objects.DeviceWifi as NM.DeviceWifi
import {-# SOURCE #-} qualified GI.NM.Objects.Object as NM.Object

#endif

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

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

foreign import ccall "nm_device_olpc_mesh_get_type"
    c_nm_device_olpc_mesh_get_type :: IO B.Types.GType

instance B.Types.TypedObject DeviceOlpcMesh where
    glibType :: IO GType
glibType = IO GType
c_nm_device_olpc_mesh_get_type

instance B.Types.GObject DeviceOlpcMesh

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

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

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

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

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

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

#endif

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

#endif

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

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

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

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

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

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

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

#if defined(ENABLE_OVERLOADING)
deviceOlpcMeshActiveChannel :: AttrLabelProxy "activeChannel"
deviceOlpcMeshActiveChannel = AttrLabelProxy

deviceOlpcMeshCompanion :: AttrLabelProxy "companion"
deviceOlpcMeshCompanion = AttrLabelProxy

#endif

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

#endif

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

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

-- | Returns the active channel of the t'GI.NM.Objects.DeviceOlpcMesh.DeviceOlpcMesh' device.
deviceOlpcMeshGetActiveChannel ::
    (B.CallStack.HasCallStack, MonadIO m, IsDeviceOlpcMesh a) =>
    a
    -- ^ /@device@/: a t'GI.NM.Objects.DeviceOlpcMesh.DeviceOlpcMesh'
    -> m Word32
    -- ^ __Returns:__ active channel of the device
deviceOlpcMeshGetActiveChannel :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsDeviceOlpcMesh a) =>
a -> m Word32
deviceOlpcMeshGetActiveChannel a
device = IO Word32 -> m Word32
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Word32 -> m Word32) -> IO Word32 -> m Word32
forall a b. (a -> b) -> a -> b
$ do
    Ptr DeviceOlpcMesh
device' <- a -> IO (Ptr DeviceOlpcMesh)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
device
    Word32
result <- Ptr DeviceOlpcMesh -> IO Word32
nm_device_olpc_mesh_get_active_channel Ptr DeviceOlpcMesh
device'
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
device
    Word32 -> IO Word32
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Word32
result

#if defined(ENABLE_OVERLOADING)
data DeviceOlpcMeshGetActiveChannelMethodInfo
instance (signature ~ (m Word32), MonadIO m, IsDeviceOlpcMesh a) => O.OverloadedMethod DeviceOlpcMeshGetActiveChannelMethodInfo a signature where
    overloadedMethod = deviceOlpcMeshGetActiveChannel

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


#endif

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

foreign import ccall "nm_device_olpc_mesh_get_companion" nm_device_olpc_mesh_get_companion :: 
    Ptr DeviceOlpcMesh ->                   -- device : TInterface (Name {namespace = "NM", name = "DeviceOlpcMesh"})
    IO (Ptr NM.DeviceWifi.DeviceWifi)

-- | Gets the companion device of the t'GI.NM.Objects.DeviceOlpcMesh.DeviceOlpcMesh'.
deviceOlpcMeshGetCompanion ::
    (B.CallStack.HasCallStack, MonadIO m, IsDeviceOlpcMesh a) =>
    a
    -- ^ /@device@/: a t'GI.NM.Objects.DeviceOlpcMesh.DeviceOlpcMesh'
    -> m NM.DeviceWifi.DeviceWifi
    -- ^ __Returns:__ the companion of the device of 'P.Nothing'
deviceOlpcMeshGetCompanion :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsDeviceOlpcMesh a) =>
a -> m DeviceWifi
deviceOlpcMeshGetCompanion a
device = IO DeviceWifi -> m DeviceWifi
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO DeviceWifi -> m DeviceWifi) -> IO DeviceWifi -> m DeviceWifi
forall a b. (a -> b) -> a -> b
$ do
    Ptr DeviceOlpcMesh
device' <- a -> IO (Ptr DeviceOlpcMesh)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
device
    Ptr DeviceWifi
result <- Ptr DeviceOlpcMesh -> IO (Ptr DeviceWifi)
nm_device_olpc_mesh_get_companion Ptr DeviceOlpcMesh
device'
    Text -> Ptr DeviceWifi -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"deviceOlpcMeshGetCompanion" Ptr DeviceWifi
result
    DeviceWifi
result' <- ((ManagedPtr DeviceWifi -> DeviceWifi)
-> Ptr DeviceWifi -> IO DeviceWifi
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr DeviceWifi -> DeviceWifi
NM.DeviceWifi.DeviceWifi) Ptr DeviceWifi
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
device
    DeviceWifi -> IO DeviceWifi
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return DeviceWifi
result'

#if defined(ENABLE_OVERLOADING)
data DeviceOlpcMeshGetCompanionMethodInfo
instance (signature ~ (m NM.DeviceWifi.DeviceWifi), MonadIO m, IsDeviceOlpcMesh a) => O.OverloadedMethod DeviceOlpcMeshGetCompanionMethodInfo a signature where
    overloadedMethod = deviceOlpcMeshGetCompanion

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


#endif