{- |
Copyright  : Will Thompson, Iñaki García Etxebarria and Jonas Platte
License    : LGPL-2.1
Maintainer : Iñaki García Etxebarria (garetxe@gmail.com)

'GI.Gio.Objects.InetAddress.InetAddress' represents an IPv4 or IPv6 internet address. Use
'GI.Gio.Objects.Resolver.resolverLookupByName' or 'GI.Gio.Objects.Resolver.resolverLookupByNameAsync' to
look up the 'GI.Gio.Objects.InetAddress.InetAddress' for a hostname. Use
'GI.Gio.Objects.Resolver.resolverLookupByAddress' or
'GI.Gio.Objects.Resolver.resolverLookupByAddressAsync' to look up the hostname for a
'GI.Gio.Objects.InetAddress.InetAddress'.

To actually connect to a remote host, you will need a
'GI.Gio.Objects.InetSocketAddress.InetSocketAddress' (which includes a 'GI.Gio.Objects.InetAddress.InetAddress' as well as a
port number).
-}

module GI.Gio.Objects.InetAddress
    ( 

-- * Exported types
    InetAddress(..)                         ,
    IsInetAddress                           ,
    toInetAddress                           ,
    noInetAddress                           ,


 -- * Methods
-- ** equal #method:equal#
    InetAddressEqualMethodInfo              ,
    inetAddressEqual                        ,


-- ** getFamily #method:getFamily#
    InetAddressGetFamilyMethodInfo          ,
    inetAddressGetFamily                    ,


-- ** getIsAny #method:getIsAny#
    InetAddressGetIsAnyMethodInfo           ,
    inetAddressGetIsAny                     ,


-- ** getIsLinkLocal #method:getIsLinkLocal#
    InetAddressGetIsLinkLocalMethodInfo     ,
    inetAddressGetIsLinkLocal               ,


-- ** getIsLoopback #method:getIsLoopback#
    InetAddressGetIsLoopbackMethodInfo      ,
    inetAddressGetIsLoopback                ,


-- ** getIsMcGlobal #method:getIsMcGlobal#
    InetAddressGetIsMcGlobalMethodInfo      ,
    inetAddressGetIsMcGlobal                ,


-- ** getIsMcLinkLocal #method:getIsMcLinkLocal#
    InetAddressGetIsMcLinkLocalMethodInfo   ,
    inetAddressGetIsMcLinkLocal             ,


-- ** getIsMcNodeLocal #method:getIsMcNodeLocal#
    InetAddressGetIsMcNodeLocalMethodInfo   ,
    inetAddressGetIsMcNodeLocal             ,


-- ** getIsMcOrgLocal #method:getIsMcOrgLocal#
    InetAddressGetIsMcOrgLocalMethodInfo    ,
    inetAddressGetIsMcOrgLocal              ,


-- ** getIsMcSiteLocal #method:getIsMcSiteLocal#
    InetAddressGetIsMcSiteLocalMethodInfo   ,
    inetAddressGetIsMcSiteLocal             ,


-- ** getIsMulticast #method:getIsMulticast#
    InetAddressGetIsMulticastMethodInfo     ,
    inetAddressGetIsMulticast               ,


-- ** getIsSiteLocal #method:getIsSiteLocal#
    InetAddressGetIsSiteLocalMethodInfo     ,
    inetAddressGetIsSiteLocal               ,


-- ** getNativeSize #method:getNativeSize#
    InetAddressGetNativeSizeMethodInfo      ,
    inetAddressGetNativeSize                ,


-- ** newAny #method:newAny#
    inetAddressNewAny                       ,


-- ** newFromBytes #method:newFromBytes#
    inetAddressNewFromBytes                 ,


-- ** newFromString #method:newFromString#
    inetAddressNewFromString                ,


-- ** newLoopback #method:newLoopback#
    inetAddressNewLoopback                  ,


-- ** toString #method:toString#
    InetAddressToStringMethodInfo           ,
    inetAddressToString                     ,




 -- * Properties
-- ** bytes #attr:bytes#
    InetAddressBytesPropertyInfo            ,
    constructInetAddressBytes               ,
    getInetAddressBytes                     ,
    inetAddressBytes                        ,


-- ** family #attr:family#
    InetAddressFamilyPropertyInfo           ,
    constructInetAddressFamily              ,
    getInetAddressFamily                    ,
    inetAddressFamily                       ,


-- ** isAny #attr:isAny#
    InetAddressIsAnyPropertyInfo            ,
    getInetAddressIsAny                     ,
    inetAddressIsAny                        ,


-- ** isLinkLocal #attr:isLinkLocal#
    InetAddressIsLinkLocalPropertyInfo      ,
    getInetAddressIsLinkLocal               ,
    inetAddressIsLinkLocal                  ,


-- ** isLoopback #attr:isLoopback#
    InetAddressIsLoopbackPropertyInfo       ,
    getInetAddressIsLoopback                ,
    inetAddressIsLoopback                   ,


-- ** isMcGlobal #attr:isMcGlobal#
    InetAddressIsMcGlobalPropertyInfo       ,
    getInetAddressIsMcGlobal                ,
    inetAddressIsMcGlobal                   ,


-- ** isMcLinkLocal #attr:isMcLinkLocal#
    InetAddressIsMcLinkLocalPropertyInfo    ,
    getInetAddressIsMcLinkLocal             ,
    inetAddressIsMcLinkLocal                ,


-- ** isMcNodeLocal #attr:isMcNodeLocal#
    InetAddressIsMcNodeLocalPropertyInfo    ,
    getInetAddressIsMcNodeLocal             ,
    inetAddressIsMcNodeLocal                ,


-- ** isMcOrgLocal #attr:isMcOrgLocal#
    InetAddressIsMcOrgLocalPropertyInfo     ,
    getInetAddressIsMcOrgLocal              ,
    inetAddressIsMcOrgLocal                 ,


-- ** isMcSiteLocal #attr:isMcSiteLocal#
    InetAddressIsMcSiteLocalPropertyInfo    ,
    getInetAddressIsMcSiteLocal             ,
    inetAddressIsMcSiteLocal                ,


-- ** isMulticast #attr:isMulticast#
    InetAddressIsMulticastPropertyInfo      ,
    getInetAddressIsMulticast               ,
    inetAddressIsMulticast                  ,


-- ** isSiteLocal #attr:isSiteLocal#
    InetAddressIsSiteLocalPropertyInfo      ,
    getInetAddressIsSiteLocal               ,
    inetAddressIsSiteLocal                  ,




    ) 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.ManagedPtr as B.ManagedPtr
import qualified Data.GI.Base.GError as B.GError
import qualified Data.GI.Base.GVariant as B.GVariant
import qualified Data.GI.Base.GParamSpec as B.GParamSpec
import qualified Data.GI.Base.CallStack as B.CallStack
import qualified Data.Text as T
import qualified Data.ByteString.Char8 as B
import qualified Data.Map as Map
import qualified Foreign.Ptr as FP

import qualified GI.GObject.Objects.Object as GObject.Object
import {-# SOURCE #-} qualified GI.Gio.Enums as Gio.Enums

newtype InetAddress = InetAddress (ManagedPtr InetAddress)
foreign import ccall "g_inet_address_get_type"
    c_g_inet_address_get_type :: IO GType

instance GObject InetAddress where
    gobjectType _ = c_g_inet_address_get_type
    

class GObject o => IsInetAddress o
#if MIN_VERSION_base(4,9,0)
instance {-# OVERLAPPABLE #-} (GObject a, O.UnknownAncestorError InetAddress a) =>
    IsInetAddress a
#endif
instance IsInetAddress InetAddress
instance GObject.Object.IsObject InetAddress

toInetAddress :: IsInetAddress o => o -> IO InetAddress
toInetAddress = unsafeCastTo InetAddress

noInetAddress :: Maybe InetAddress
noInetAddress = Nothing

type family ResolveInetAddressMethod (t :: Symbol) (o :: *) :: * where
    ResolveInetAddressMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo
    ResolveInetAddressMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo
    ResolveInetAddressMethod "equal" o = InetAddressEqualMethodInfo
    ResolveInetAddressMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo
    ResolveInetAddressMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo
    ResolveInetAddressMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo
    ResolveInetAddressMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo
    ResolveInetAddressMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo
    ResolveInetAddressMethod "ref" o = GObject.Object.ObjectRefMethodInfo
    ResolveInetAddressMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo
    ResolveInetAddressMethod "replaceData" o = GObject.Object.ObjectReplaceDataMethodInfo
    ResolveInetAddressMethod "replaceQdata" o = GObject.Object.ObjectReplaceQdataMethodInfo
    ResolveInetAddressMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo
    ResolveInetAddressMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo
    ResolveInetAddressMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo
    ResolveInetAddressMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo
    ResolveInetAddressMethod "toString" o = InetAddressToStringMethodInfo
    ResolveInetAddressMethod "unref" o = GObject.Object.ObjectUnrefMethodInfo
    ResolveInetAddressMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo
    ResolveInetAddressMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo
    ResolveInetAddressMethod "getFamily" o = InetAddressGetFamilyMethodInfo
    ResolveInetAddressMethod "getIsAny" o = InetAddressGetIsAnyMethodInfo
    ResolveInetAddressMethod "getIsLinkLocal" o = InetAddressGetIsLinkLocalMethodInfo
    ResolveInetAddressMethod "getIsLoopback" o = InetAddressGetIsLoopbackMethodInfo
    ResolveInetAddressMethod "getIsMcGlobal" o = InetAddressGetIsMcGlobalMethodInfo
    ResolveInetAddressMethod "getIsMcLinkLocal" o = InetAddressGetIsMcLinkLocalMethodInfo
    ResolveInetAddressMethod "getIsMcNodeLocal" o = InetAddressGetIsMcNodeLocalMethodInfo
    ResolveInetAddressMethod "getIsMcOrgLocal" o = InetAddressGetIsMcOrgLocalMethodInfo
    ResolveInetAddressMethod "getIsMcSiteLocal" o = InetAddressGetIsMcSiteLocalMethodInfo
    ResolveInetAddressMethod "getIsMulticast" o = InetAddressGetIsMulticastMethodInfo
    ResolveInetAddressMethod "getIsSiteLocal" o = InetAddressGetIsSiteLocalMethodInfo
    ResolveInetAddressMethod "getNativeSize" o = InetAddressGetNativeSizeMethodInfo
    ResolveInetAddressMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo
    ResolveInetAddressMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo
    ResolveInetAddressMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo
    ResolveInetAddressMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo
    ResolveInetAddressMethod l o = O.MethodResolutionFailed l o

instance (info ~ ResolveInetAddressMethod t InetAddress, O.MethodInfo info InetAddress p) => O.IsLabelProxy t (InetAddress -> p) where
    fromLabelProxy _ = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)

#if MIN_VERSION_base(4,9,0)
instance (info ~ ResolveInetAddressMethod t InetAddress, O.MethodInfo info InetAddress p) => O.IsLabel t (InetAddress -> p) where
    fromLabel _ = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)
#endif

-- VVV Prop "bytes"
   -- Type: TBasicType TPtr
   -- Flags: [PropertyReadable,PropertyWritable,PropertyConstructOnly]
   -- Nullable: (Nothing,Nothing)

getInetAddressBytes :: (MonadIO m, IsInetAddress o) => o -> m (Ptr ())
getInetAddressBytes obj = liftIO $ getObjectPropertyPtr obj "bytes"

constructInetAddressBytes :: (IsInetAddress o) => Ptr () -> IO (GValueConstruct o)
constructInetAddressBytes val = constructObjectPropertyPtr "bytes" val

data InetAddressBytesPropertyInfo
instance AttrInfo InetAddressBytesPropertyInfo where
    type AttrAllowedOps InetAddressBytesPropertyInfo = '[ 'AttrConstruct, 'AttrGet]
    type AttrSetTypeConstraint InetAddressBytesPropertyInfo = (~) (Ptr ())
    type AttrBaseTypeConstraint InetAddressBytesPropertyInfo = IsInetAddress
    type AttrGetType InetAddressBytesPropertyInfo = (Ptr ())
    type AttrLabel InetAddressBytesPropertyInfo = "bytes"
    type AttrOrigin InetAddressBytesPropertyInfo = InetAddress
    attrGet _ = getInetAddressBytes
    attrSet _ = undefined
    attrConstruct _ = constructInetAddressBytes
    attrClear _ = undefined

-- VVV Prop "family"
   -- Type: TInterface (Name {namespace = "Gio", name = "SocketFamily"})
   -- Flags: [PropertyReadable,PropertyWritable,PropertyConstructOnly]
   -- Nullable: (Just False,Nothing)

getInetAddressFamily :: (MonadIO m, IsInetAddress o) => o -> m Gio.Enums.SocketFamily
getInetAddressFamily obj = liftIO $ getObjectPropertyEnum obj "family"

constructInetAddressFamily :: (IsInetAddress o) => Gio.Enums.SocketFamily -> IO (GValueConstruct o)
constructInetAddressFamily val = constructObjectPropertyEnum "family" val

data InetAddressFamilyPropertyInfo
instance AttrInfo InetAddressFamilyPropertyInfo where
    type AttrAllowedOps InetAddressFamilyPropertyInfo = '[ 'AttrConstruct, 'AttrGet]
    type AttrSetTypeConstraint InetAddressFamilyPropertyInfo = (~) Gio.Enums.SocketFamily
    type AttrBaseTypeConstraint InetAddressFamilyPropertyInfo = IsInetAddress
    type AttrGetType InetAddressFamilyPropertyInfo = Gio.Enums.SocketFamily
    type AttrLabel InetAddressFamilyPropertyInfo = "family"
    type AttrOrigin InetAddressFamilyPropertyInfo = InetAddress
    attrGet _ = getInetAddressFamily
    attrSet _ = undefined
    attrConstruct _ = constructInetAddressFamily
    attrClear _ = undefined

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

getInetAddressIsAny :: (MonadIO m, IsInetAddress o) => o -> m Bool
getInetAddressIsAny obj = liftIO $ getObjectPropertyBool obj "is-any"

data InetAddressIsAnyPropertyInfo
instance AttrInfo InetAddressIsAnyPropertyInfo where
    type AttrAllowedOps InetAddressIsAnyPropertyInfo = '[ 'AttrGet]
    type AttrSetTypeConstraint InetAddressIsAnyPropertyInfo = (~) ()
    type AttrBaseTypeConstraint InetAddressIsAnyPropertyInfo = IsInetAddress
    type AttrGetType InetAddressIsAnyPropertyInfo = Bool
    type AttrLabel InetAddressIsAnyPropertyInfo = "is-any"
    type AttrOrigin InetAddressIsAnyPropertyInfo = InetAddress
    attrGet _ = getInetAddressIsAny
    attrSet _ = undefined
    attrConstruct _ = undefined
    attrClear _ = undefined

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

getInetAddressIsLinkLocal :: (MonadIO m, IsInetAddress o) => o -> m Bool
getInetAddressIsLinkLocal obj = liftIO $ getObjectPropertyBool obj "is-link-local"

data InetAddressIsLinkLocalPropertyInfo
instance AttrInfo InetAddressIsLinkLocalPropertyInfo where
    type AttrAllowedOps InetAddressIsLinkLocalPropertyInfo = '[ 'AttrGet]
    type AttrSetTypeConstraint InetAddressIsLinkLocalPropertyInfo = (~) ()
    type AttrBaseTypeConstraint InetAddressIsLinkLocalPropertyInfo = IsInetAddress
    type AttrGetType InetAddressIsLinkLocalPropertyInfo = Bool
    type AttrLabel InetAddressIsLinkLocalPropertyInfo = "is-link-local"
    type AttrOrigin InetAddressIsLinkLocalPropertyInfo = InetAddress
    attrGet _ = getInetAddressIsLinkLocal
    attrSet _ = undefined
    attrConstruct _ = undefined
    attrClear _ = undefined

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

getInetAddressIsLoopback :: (MonadIO m, IsInetAddress o) => o -> m Bool
getInetAddressIsLoopback obj = liftIO $ getObjectPropertyBool obj "is-loopback"

data InetAddressIsLoopbackPropertyInfo
instance AttrInfo InetAddressIsLoopbackPropertyInfo where
    type AttrAllowedOps InetAddressIsLoopbackPropertyInfo = '[ 'AttrGet]
    type AttrSetTypeConstraint InetAddressIsLoopbackPropertyInfo = (~) ()
    type AttrBaseTypeConstraint InetAddressIsLoopbackPropertyInfo = IsInetAddress
    type AttrGetType InetAddressIsLoopbackPropertyInfo = Bool
    type AttrLabel InetAddressIsLoopbackPropertyInfo = "is-loopback"
    type AttrOrigin InetAddressIsLoopbackPropertyInfo = InetAddress
    attrGet _ = getInetAddressIsLoopback
    attrSet _ = undefined
    attrConstruct _ = undefined
    attrClear _ = undefined

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

getInetAddressIsMcGlobal :: (MonadIO m, IsInetAddress o) => o -> m Bool
getInetAddressIsMcGlobal obj = liftIO $ getObjectPropertyBool obj "is-mc-global"

data InetAddressIsMcGlobalPropertyInfo
instance AttrInfo InetAddressIsMcGlobalPropertyInfo where
    type AttrAllowedOps InetAddressIsMcGlobalPropertyInfo = '[ 'AttrGet]
    type AttrSetTypeConstraint InetAddressIsMcGlobalPropertyInfo = (~) ()
    type AttrBaseTypeConstraint InetAddressIsMcGlobalPropertyInfo = IsInetAddress
    type AttrGetType InetAddressIsMcGlobalPropertyInfo = Bool
    type AttrLabel InetAddressIsMcGlobalPropertyInfo = "is-mc-global"
    type AttrOrigin InetAddressIsMcGlobalPropertyInfo = InetAddress
    attrGet _ = getInetAddressIsMcGlobal
    attrSet _ = undefined
    attrConstruct _ = undefined
    attrClear _ = undefined

-- VVV Prop "is-mc-link-local"
   -- Type: TBasicType TBoolean
   -- Flags: [PropertyReadable]
   -- Nullable: (Just False,Nothing)

getInetAddressIsMcLinkLocal :: (MonadIO m, IsInetAddress o) => o -> m Bool
getInetAddressIsMcLinkLocal obj = liftIO $ getObjectPropertyBool obj "is-mc-link-local"

data InetAddressIsMcLinkLocalPropertyInfo
instance AttrInfo InetAddressIsMcLinkLocalPropertyInfo where
    type AttrAllowedOps InetAddressIsMcLinkLocalPropertyInfo = '[ 'AttrGet]
    type AttrSetTypeConstraint InetAddressIsMcLinkLocalPropertyInfo = (~) ()
    type AttrBaseTypeConstraint InetAddressIsMcLinkLocalPropertyInfo = IsInetAddress
    type AttrGetType InetAddressIsMcLinkLocalPropertyInfo = Bool
    type AttrLabel InetAddressIsMcLinkLocalPropertyInfo = "is-mc-link-local"
    type AttrOrigin InetAddressIsMcLinkLocalPropertyInfo = InetAddress
    attrGet _ = getInetAddressIsMcLinkLocal
    attrSet _ = undefined
    attrConstruct _ = undefined
    attrClear _ = undefined

-- VVV Prop "is-mc-node-local"
   -- Type: TBasicType TBoolean
   -- Flags: [PropertyReadable]
   -- Nullable: (Just False,Nothing)

getInetAddressIsMcNodeLocal :: (MonadIO m, IsInetAddress o) => o -> m Bool
getInetAddressIsMcNodeLocal obj = liftIO $ getObjectPropertyBool obj "is-mc-node-local"

data InetAddressIsMcNodeLocalPropertyInfo
instance AttrInfo InetAddressIsMcNodeLocalPropertyInfo where
    type AttrAllowedOps InetAddressIsMcNodeLocalPropertyInfo = '[ 'AttrGet]
    type AttrSetTypeConstraint InetAddressIsMcNodeLocalPropertyInfo = (~) ()
    type AttrBaseTypeConstraint InetAddressIsMcNodeLocalPropertyInfo = IsInetAddress
    type AttrGetType InetAddressIsMcNodeLocalPropertyInfo = Bool
    type AttrLabel InetAddressIsMcNodeLocalPropertyInfo = "is-mc-node-local"
    type AttrOrigin InetAddressIsMcNodeLocalPropertyInfo = InetAddress
    attrGet _ = getInetAddressIsMcNodeLocal
    attrSet _ = undefined
    attrConstruct _ = undefined
    attrClear _ = undefined

-- VVV Prop "is-mc-org-local"
   -- Type: TBasicType TBoolean
   -- Flags: [PropertyReadable]
   -- Nullable: (Just False,Nothing)

getInetAddressIsMcOrgLocal :: (MonadIO m, IsInetAddress o) => o -> m Bool
getInetAddressIsMcOrgLocal obj = liftIO $ getObjectPropertyBool obj "is-mc-org-local"

data InetAddressIsMcOrgLocalPropertyInfo
instance AttrInfo InetAddressIsMcOrgLocalPropertyInfo where
    type AttrAllowedOps InetAddressIsMcOrgLocalPropertyInfo = '[ 'AttrGet]
    type AttrSetTypeConstraint InetAddressIsMcOrgLocalPropertyInfo = (~) ()
    type AttrBaseTypeConstraint InetAddressIsMcOrgLocalPropertyInfo = IsInetAddress
    type AttrGetType InetAddressIsMcOrgLocalPropertyInfo = Bool
    type AttrLabel InetAddressIsMcOrgLocalPropertyInfo = "is-mc-org-local"
    type AttrOrigin InetAddressIsMcOrgLocalPropertyInfo = InetAddress
    attrGet _ = getInetAddressIsMcOrgLocal
    attrSet _ = undefined
    attrConstruct _ = undefined
    attrClear _ = undefined

-- VVV Prop "is-mc-site-local"
   -- Type: TBasicType TBoolean
   -- Flags: [PropertyReadable]
   -- Nullable: (Just False,Nothing)

getInetAddressIsMcSiteLocal :: (MonadIO m, IsInetAddress o) => o -> m Bool
getInetAddressIsMcSiteLocal obj = liftIO $ getObjectPropertyBool obj "is-mc-site-local"

data InetAddressIsMcSiteLocalPropertyInfo
instance AttrInfo InetAddressIsMcSiteLocalPropertyInfo where
    type AttrAllowedOps InetAddressIsMcSiteLocalPropertyInfo = '[ 'AttrGet]
    type AttrSetTypeConstraint InetAddressIsMcSiteLocalPropertyInfo = (~) ()
    type AttrBaseTypeConstraint InetAddressIsMcSiteLocalPropertyInfo = IsInetAddress
    type AttrGetType InetAddressIsMcSiteLocalPropertyInfo = Bool
    type AttrLabel InetAddressIsMcSiteLocalPropertyInfo = "is-mc-site-local"
    type AttrOrigin InetAddressIsMcSiteLocalPropertyInfo = InetAddress
    attrGet _ = getInetAddressIsMcSiteLocal
    attrSet _ = undefined
    attrConstruct _ = undefined
    attrClear _ = undefined

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

getInetAddressIsMulticast :: (MonadIO m, IsInetAddress o) => o -> m Bool
getInetAddressIsMulticast obj = liftIO $ getObjectPropertyBool obj "is-multicast"

data InetAddressIsMulticastPropertyInfo
instance AttrInfo InetAddressIsMulticastPropertyInfo where
    type AttrAllowedOps InetAddressIsMulticastPropertyInfo = '[ 'AttrGet]
    type AttrSetTypeConstraint InetAddressIsMulticastPropertyInfo = (~) ()
    type AttrBaseTypeConstraint InetAddressIsMulticastPropertyInfo = IsInetAddress
    type AttrGetType InetAddressIsMulticastPropertyInfo = Bool
    type AttrLabel InetAddressIsMulticastPropertyInfo = "is-multicast"
    type AttrOrigin InetAddressIsMulticastPropertyInfo = InetAddress
    attrGet _ = getInetAddressIsMulticast
    attrSet _ = undefined
    attrConstruct _ = undefined
    attrClear _ = undefined

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

getInetAddressIsSiteLocal :: (MonadIO m, IsInetAddress o) => o -> m Bool
getInetAddressIsSiteLocal obj = liftIO $ getObjectPropertyBool obj "is-site-local"

data InetAddressIsSiteLocalPropertyInfo
instance AttrInfo InetAddressIsSiteLocalPropertyInfo where
    type AttrAllowedOps InetAddressIsSiteLocalPropertyInfo = '[ 'AttrGet]
    type AttrSetTypeConstraint InetAddressIsSiteLocalPropertyInfo = (~) ()
    type AttrBaseTypeConstraint InetAddressIsSiteLocalPropertyInfo = IsInetAddress
    type AttrGetType InetAddressIsSiteLocalPropertyInfo = Bool
    type AttrLabel InetAddressIsSiteLocalPropertyInfo = "is-site-local"
    type AttrOrigin InetAddressIsSiteLocalPropertyInfo = InetAddress
    attrGet _ = getInetAddressIsSiteLocal
    attrSet _ = undefined
    attrConstruct _ = undefined
    attrClear _ = undefined

instance O.HasAttributeList InetAddress
type instance O.AttributeList InetAddress = InetAddressAttributeList
type InetAddressAttributeList = ('[ '("bytes", InetAddressBytesPropertyInfo), '("family", InetAddressFamilyPropertyInfo), '("isAny", InetAddressIsAnyPropertyInfo), '("isLinkLocal", InetAddressIsLinkLocalPropertyInfo), '("isLoopback", InetAddressIsLoopbackPropertyInfo), '("isMcGlobal", InetAddressIsMcGlobalPropertyInfo), '("isMcLinkLocal", InetAddressIsMcLinkLocalPropertyInfo), '("isMcNodeLocal", InetAddressIsMcNodeLocalPropertyInfo), '("isMcOrgLocal", InetAddressIsMcOrgLocalPropertyInfo), '("isMcSiteLocal", InetAddressIsMcSiteLocalPropertyInfo), '("isMulticast", InetAddressIsMulticastPropertyInfo), '("isSiteLocal", InetAddressIsSiteLocalPropertyInfo)] :: [(Symbol, *)])

inetAddressBytes :: AttrLabelProxy "bytes"
inetAddressBytes = AttrLabelProxy

inetAddressFamily :: AttrLabelProxy "family"
inetAddressFamily = AttrLabelProxy

inetAddressIsAny :: AttrLabelProxy "isAny"
inetAddressIsAny = AttrLabelProxy

inetAddressIsLinkLocal :: AttrLabelProxy "isLinkLocal"
inetAddressIsLinkLocal = AttrLabelProxy

inetAddressIsLoopback :: AttrLabelProxy "isLoopback"
inetAddressIsLoopback = AttrLabelProxy

inetAddressIsMcGlobal :: AttrLabelProxy "isMcGlobal"
inetAddressIsMcGlobal = AttrLabelProxy

inetAddressIsMcLinkLocal :: AttrLabelProxy "isMcLinkLocal"
inetAddressIsMcLinkLocal = AttrLabelProxy

inetAddressIsMcNodeLocal :: AttrLabelProxy "isMcNodeLocal"
inetAddressIsMcNodeLocal = AttrLabelProxy

inetAddressIsMcOrgLocal :: AttrLabelProxy "isMcOrgLocal"
inetAddressIsMcOrgLocal = AttrLabelProxy

inetAddressIsMcSiteLocal :: AttrLabelProxy "isMcSiteLocal"
inetAddressIsMcSiteLocal = AttrLabelProxy

inetAddressIsMulticast :: AttrLabelProxy "isMulticast"
inetAddressIsMulticast = AttrLabelProxy

inetAddressIsSiteLocal :: AttrLabelProxy "isSiteLocal"
inetAddressIsSiteLocal = AttrLabelProxy

type instance O.SignalList InetAddress = InetAddressSignalList
type InetAddressSignalList = ('[ '("notify", GObject.Object.ObjectNotifySignalInfo)] :: [(Symbol, *)])

-- method InetAddress::new_any
-- method type : Constructor
-- Args : [Arg {argCName = "family", argType = TInterface (Name {namespace = "Gio", name = "SocketFamily"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the address family", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Just (TInterface (Name {namespace = "Gio", name = "InetAddress"}))
-- throws : False
-- Skip return : False

foreign import ccall "g_inet_address_new_any" g_inet_address_new_any :: 
    CUInt ->                                -- family : TInterface (Name {namespace = "Gio", name = "SocketFamily"})
    IO (Ptr InetAddress)

{- |
Creates a 'GI.Gio.Objects.InetAddress.InetAddress' for the \"any\" address (unassigned\/\"don\'t
care\") for /@family@/.

@since 2.22
-}
inetAddressNewAny ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    Gio.Enums.SocketFamily
    {- ^ /@family@/: the address family -}
    -> m InetAddress
    {- ^ __Returns:__ a new 'GI.Gio.Objects.InetAddress.InetAddress' corresponding to the \"any\" address
for /@family@/.
    Free the returned object with 'GI.GObject.Objects.Object.objectUnref'. -}
inetAddressNewAny family = liftIO $ do
    let family' = (fromIntegral . fromEnum) family
    result <- g_inet_address_new_any family'
    checkUnexpectedReturnNULL "inetAddressNewAny" result
    result' <- (wrapObject InetAddress) result
    return result'

-- method InetAddress::new_from_bytes
-- method type : Constructor
-- Args : [Arg {argCName = "bytes", argType = TCArray False (-1) (-1) (TBasicType TUInt8), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "raw address data", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "family", argType = TInterface (Name {namespace = "Gio", name = "SocketFamily"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the address family of @bytes", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Just (TInterface (Name {namespace = "Gio", name = "InetAddress"}))
-- throws : False
-- Skip return : False

foreign import ccall "g_inet_address_new_from_bytes" g_inet_address_new_from_bytes :: 
    Ptr Word8 ->                            -- bytes : TCArray False (-1) (-1) (TBasicType TUInt8)
    CUInt ->                                -- family : TInterface (Name {namespace = "Gio", name = "SocketFamily"})
    IO (Ptr InetAddress)

{- |
Creates a new 'GI.Gio.Objects.InetAddress.InetAddress' from the given /@family@/ and /@bytes@/.
/@bytes@/ should be 4 bytes for 'GI.Gio.Enums.SocketFamilyIpv4' and 16 bytes for
'GI.Gio.Enums.SocketFamilyIpv6'.

@since 2.22
-}
inetAddressNewFromBytes ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    Ptr Word8
    {- ^ /@bytes@/: raw address data -}
    -> Gio.Enums.SocketFamily
    {- ^ /@family@/: the address family of /@bytes@/ -}
    -> m InetAddress
    {- ^ __Returns:__ a new 'GI.Gio.Objects.InetAddress.InetAddress' corresponding to /@family@/ and /@bytes@/.
    Free the returned object with 'GI.GObject.Objects.Object.objectUnref'. -}
inetAddressNewFromBytes bytes family = liftIO $ do
    let family' = (fromIntegral . fromEnum) family
    result <- g_inet_address_new_from_bytes bytes family'
    checkUnexpectedReturnNULL "inetAddressNewFromBytes" result
    result' <- (wrapObject InetAddress) result
    return result'

-- method InetAddress::new_from_string
-- method type : Constructor
-- Args : [Arg {argCName = "string", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a string representation of an IP address", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Just (TInterface (Name {namespace = "Gio", name = "InetAddress"}))
-- throws : False
-- Skip return : False

foreign import ccall "g_inet_address_new_from_string" g_inet_address_new_from_string :: 
    CString ->                              -- string : TBasicType TUTF8
    IO (Ptr InetAddress)

{- |
Parses /@string@/ as an IP address and creates a new 'GI.Gio.Objects.InetAddress.InetAddress'.

@since 2.22
-}
inetAddressNewFromString ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    T.Text
    {- ^ /@string@/: a string representation of an IP address -}
    -> m InetAddress
    {- ^ __Returns:__ a new 'GI.Gio.Objects.InetAddress.InetAddress' corresponding to /@string@/, or 'Nothing' if
/@string@/ could not be parsed.
    Free the returned object with 'GI.GObject.Objects.Object.objectUnref'. -}
inetAddressNewFromString string = liftIO $ do
    string' <- textToCString string
    result <- g_inet_address_new_from_string string'
    checkUnexpectedReturnNULL "inetAddressNewFromString" result
    result' <- (wrapObject InetAddress) result
    freeMem string'
    return result'

-- method InetAddress::new_loopback
-- method type : Constructor
-- Args : [Arg {argCName = "family", argType = TInterface (Name {namespace = "Gio", name = "SocketFamily"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the address family", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Just (TInterface (Name {namespace = "Gio", name = "InetAddress"}))
-- throws : False
-- Skip return : False

foreign import ccall "g_inet_address_new_loopback" g_inet_address_new_loopback :: 
    CUInt ->                                -- family : TInterface (Name {namespace = "Gio", name = "SocketFamily"})
    IO (Ptr InetAddress)

{- |
Creates a 'GI.Gio.Objects.InetAddress.InetAddress' for the loopback address for /@family@/.

@since 2.22
-}
inetAddressNewLoopback ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    Gio.Enums.SocketFamily
    {- ^ /@family@/: the address family -}
    -> m InetAddress
    {- ^ __Returns:__ a new 'GI.Gio.Objects.InetAddress.InetAddress' corresponding to the loopback address
for /@family@/.
    Free the returned object with 'GI.GObject.Objects.Object.objectUnref'. -}
inetAddressNewLoopback family = liftIO $ do
    let family' = (fromIntegral . fromEnum) family
    result <- g_inet_address_new_loopback family'
    checkUnexpectedReturnNULL "inetAddressNewLoopback" result
    result' <- (wrapObject InetAddress) result
    return result'

-- method InetAddress::equal
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "address", argType = TInterface (Name {namespace = "Gio", name = "InetAddress"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "A #GInetAddress.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "other_address", argType = TInterface (Name {namespace = "Gio", name = "InetAddress"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "Another #GInetAddress.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Just (TBasicType TBoolean)
-- throws : False
-- Skip return : False

foreign import ccall "g_inet_address_equal" g_inet_address_equal :: 
    Ptr InetAddress ->                      -- address : TInterface (Name {namespace = "Gio", name = "InetAddress"})
    Ptr InetAddress ->                      -- other_address : TInterface (Name {namespace = "Gio", name = "InetAddress"})
    IO CInt

{- |
Checks if two 'GI.Gio.Objects.InetAddress.InetAddress' instances are equal, e.g. the same address.

@since 2.30
-}
inetAddressEqual ::
    (B.CallStack.HasCallStack, MonadIO m, IsInetAddress a, IsInetAddress b) =>
    a
    {- ^ /@address@/: A 'GI.Gio.Objects.InetAddress.InetAddress'. -}
    -> b
    {- ^ /@otherAddress@/: Another 'GI.Gio.Objects.InetAddress.InetAddress'. -}
    -> m Bool
    {- ^ __Returns:__ 'True' if /@address@/ and /@otherAddress@/ are equal, 'False' otherwise. -}
inetAddressEqual address otherAddress = liftIO $ do
    address' <- unsafeManagedPtrCastPtr address
    otherAddress' <- unsafeManagedPtrCastPtr otherAddress
    result <- g_inet_address_equal address' otherAddress'
    let result' = (/= 0) result
    touchManagedPtr address
    touchManagedPtr otherAddress
    return result'

data InetAddressEqualMethodInfo
instance (signature ~ (b -> m Bool), MonadIO m, IsInetAddress a, IsInetAddress b) => O.MethodInfo InetAddressEqualMethodInfo a signature where
    overloadedMethod _ = inetAddressEqual

-- method InetAddress::get_family
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "address", argType = TInterface (Name {namespace = "Gio", name = "InetAddress"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GInetAddress", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Just (TInterface (Name {namespace = "Gio", name = "SocketFamily"}))
-- throws : False
-- Skip return : False

foreign import ccall "g_inet_address_get_family" g_inet_address_get_family :: 
    Ptr InetAddress ->                      -- address : TInterface (Name {namespace = "Gio", name = "InetAddress"})
    IO CUInt

{- |
Gets /@address@/\'s family

@since 2.22
-}
inetAddressGetFamily ::
    (B.CallStack.HasCallStack, MonadIO m, IsInetAddress a) =>
    a
    {- ^ /@address@/: a 'GI.Gio.Objects.InetAddress.InetAddress' -}
    -> m Gio.Enums.SocketFamily
    {- ^ __Returns:__ /@address@/\'s family -}
inetAddressGetFamily address = liftIO $ do
    address' <- unsafeManagedPtrCastPtr address
    result <- g_inet_address_get_family address'
    let result' = (toEnum . fromIntegral) result
    touchManagedPtr address
    return result'

data InetAddressGetFamilyMethodInfo
instance (signature ~ (m Gio.Enums.SocketFamily), MonadIO m, IsInetAddress a) => O.MethodInfo InetAddressGetFamilyMethodInfo a signature where
    overloadedMethod _ = inetAddressGetFamily

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

foreign import ccall "g_inet_address_get_is_any" g_inet_address_get_is_any :: 
    Ptr InetAddress ->                      -- address : TInterface (Name {namespace = "Gio", name = "InetAddress"})
    IO CInt

{- |
Tests whether /@address@/ is the \"any\" address for its family.

@since 2.22
-}
inetAddressGetIsAny ::
    (B.CallStack.HasCallStack, MonadIO m, IsInetAddress a) =>
    a
    {- ^ /@address@/: a 'GI.Gio.Objects.InetAddress.InetAddress' -}
    -> m Bool
    {- ^ __Returns:__ 'True' if /@address@/ is the \"any\" address for its family. -}
inetAddressGetIsAny address = liftIO $ do
    address' <- unsafeManagedPtrCastPtr address
    result <- g_inet_address_get_is_any address'
    let result' = (/= 0) result
    touchManagedPtr address
    return result'

data InetAddressGetIsAnyMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsInetAddress a) => O.MethodInfo InetAddressGetIsAnyMethodInfo a signature where
    overloadedMethod _ = inetAddressGetIsAny

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

foreign import ccall "g_inet_address_get_is_link_local" g_inet_address_get_is_link_local :: 
    Ptr InetAddress ->                      -- address : TInterface (Name {namespace = "Gio", name = "InetAddress"})
    IO CInt

{- |
Tests whether /@address@/ is a link-local address (that is, if it
identifies a host on a local network that is not connected to the
Internet).

@since 2.22
-}
inetAddressGetIsLinkLocal ::
    (B.CallStack.HasCallStack, MonadIO m, IsInetAddress a) =>
    a
    {- ^ /@address@/: a 'GI.Gio.Objects.InetAddress.InetAddress' -}
    -> m Bool
    {- ^ __Returns:__ 'True' if /@address@/ is a link-local address. -}
inetAddressGetIsLinkLocal address = liftIO $ do
    address' <- unsafeManagedPtrCastPtr address
    result <- g_inet_address_get_is_link_local address'
    let result' = (/= 0) result
    touchManagedPtr address
    return result'

data InetAddressGetIsLinkLocalMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsInetAddress a) => O.MethodInfo InetAddressGetIsLinkLocalMethodInfo a signature where
    overloadedMethod _ = inetAddressGetIsLinkLocal

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

foreign import ccall "g_inet_address_get_is_loopback" g_inet_address_get_is_loopback :: 
    Ptr InetAddress ->                      -- address : TInterface (Name {namespace = "Gio", name = "InetAddress"})
    IO CInt

{- |
Tests whether /@address@/ is the loopback address for its family.

@since 2.22
-}
inetAddressGetIsLoopback ::
    (B.CallStack.HasCallStack, MonadIO m, IsInetAddress a) =>
    a
    {- ^ /@address@/: a 'GI.Gio.Objects.InetAddress.InetAddress' -}
    -> m Bool
    {- ^ __Returns:__ 'True' if /@address@/ is the loopback address for its family. -}
inetAddressGetIsLoopback address = liftIO $ do
    address' <- unsafeManagedPtrCastPtr address
    result <- g_inet_address_get_is_loopback address'
    let result' = (/= 0) result
    touchManagedPtr address
    return result'

data InetAddressGetIsLoopbackMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsInetAddress a) => O.MethodInfo InetAddressGetIsLoopbackMethodInfo a signature where
    overloadedMethod _ = inetAddressGetIsLoopback

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

foreign import ccall "g_inet_address_get_is_mc_global" g_inet_address_get_is_mc_global :: 
    Ptr InetAddress ->                      -- address : TInterface (Name {namespace = "Gio", name = "InetAddress"})
    IO CInt

{- |
Tests whether /@address@/ is a global multicast address.

@since 2.22
-}
inetAddressGetIsMcGlobal ::
    (B.CallStack.HasCallStack, MonadIO m, IsInetAddress a) =>
    a
    {- ^ /@address@/: a 'GI.Gio.Objects.InetAddress.InetAddress' -}
    -> m Bool
    {- ^ __Returns:__ 'True' if /@address@/ is a global multicast address. -}
inetAddressGetIsMcGlobal address = liftIO $ do
    address' <- unsafeManagedPtrCastPtr address
    result <- g_inet_address_get_is_mc_global address'
    let result' = (/= 0) result
    touchManagedPtr address
    return result'

data InetAddressGetIsMcGlobalMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsInetAddress a) => O.MethodInfo InetAddressGetIsMcGlobalMethodInfo a signature where
    overloadedMethod _ = inetAddressGetIsMcGlobal

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

foreign import ccall "g_inet_address_get_is_mc_link_local" g_inet_address_get_is_mc_link_local :: 
    Ptr InetAddress ->                      -- address : TInterface (Name {namespace = "Gio", name = "InetAddress"})
    IO CInt

{- |
Tests whether /@address@/ is a link-local multicast address.

@since 2.22
-}
inetAddressGetIsMcLinkLocal ::
    (B.CallStack.HasCallStack, MonadIO m, IsInetAddress a) =>
    a
    {- ^ /@address@/: a 'GI.Gio.Objects.InetAddress.InetAddress' -}
    -> m Bool
    {- ^ __Returns:__ 'True' if /@address@/ is a link-local multicast address. -}
inetAddressGetIsMcLinkLocal address = liftIO $ do
    address' <- unsafeManagedPtrCastPtr address
    result <- g_inet_address_get_is_mc_link_local address'
    let result' = (/= 0) result
    touchManagedPtr address
    return result'

data InetAddressGetIsMcLinkLocalMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsInetAddress a) => O.MethodInfo InetAddressGetIsMcLinkLocalMethodInfo a signature where
    overloadedMethod _ = inetAddressGetIsMcLinkLocal

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

foreign import ccall "g_inet_address_get_is_mc_node_local" g_inet_address_get_is_mc_node_local :: 
    Ptr InetAddress ->                      -- address : TInterface (Name {namespace = "Gio", name = "InetAddress"})
    IO CInt

{- |
Tests whether /@address@/ is a node-local multicast address.

@since 2.22
-}
inetAddressGetIsMcNodeLocal ::
    (B.CallStack.HasCallStack, MonadIO m, IsInetAddress a) =>
    a
    {- ^ /@address@/: a 'GI.Gio.Objects.InetAddress.InetAddress' -}
    -> m Bool
    {- ^ __Returns:__ 'True' if /@address@/ is a node-local multicast address. -}
inetAddressGetIsMcNodeLocal address = liftIO $ do
    address' <- unsafeManagedPtrCastPtr address
    result <- g_inet_address_get_is_mc_node_local address'
    let result' = (/= 0) result
    touchManagedPtr address
    return result'

data InetAddressGetIsMcNodeLocalMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsInetAddress a) => O.MethodInfo InetAddressGetIsMcNodeLocalMethodInfo a signature where
    overloadedMethod _ = inetAddressGetIsMcNodeLocal

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

foreign import ccall "g_inet_address_get_is_mc_org_local" g_inet_address_get_is_mc_org_local :: 
    Ptr InetAddress ->                      -- address : TInterface (Name {namespace = "Gio", name = "InetAddress"})
    IO CInt

{- |
Tests whether /@address@/ is an organization-local multicast address.

@since 2.22
-}
inetAddressGetIsMcOrgLocal ::
    (B.CallStack.HasCallStack, MonadIO m, IsInetAddress a) =>
    a
    {- ^ /@address@/: a 'GI.Gio.Objects.InetAddress.InetAddress' -}
    -> m Bool
    {- ^ __Returns:__ 'True' if /@address@/ is an organization-local multicast address. -}
inetAddressGetIsMcOrgLocal address = liftIO $ do
    address' <- unsafeManagedPtrCastPtr address
    result <- g_inet_address_get_is_mc_org_local address'
    let result' = (/= 0) result
    touchManagedPtr address
    return result'

data InetAddressGetIsMcOrgLocalMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsInetAddress a) => O.MethodInfo InetAddressGetIsMcOrgLocalMethodInfo a signature where
    overloadedMethod _ = inetAddressGetIsMcOrgLocal

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

foreign import ccall "g_inet_address_get_is_mc_site_local" g_inet_address_get_is_mc_site_local :: 
    Ptr InetAddress ->                      -- address : TInterface (Name {namespace = "Gio", name = "InetAddress"})
    IO CInt

{- |
Tests whether /@address@/ is a site-local multicast address.

@since 2.22
-}
inetAddressGetIsMcSiteLocal ::
    (B.CallStack.HasCallStack, MonadIO m, IsInetAddress a) =>
    a
    {- ^ /@address@/: a 'GI.Gio.Objects.InetAddress.InetAddress' -}
    -> m Bool
    {- ^ __Returns:__ 'True' if /@address@/ is a site-local multicast address. -}
inetAddressGetIsMcSiteLocal address = liftIO $ do
    address' <- unsafeManagedPtrCastPtr address
    result <- g_inet_address_get_is_mc_site_local address'
    let result' = (/= 0) result
    touchManagedPtr address
    return result'

data InetAddressGetIsMcSiteLocalMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsInetAddress a) => O.MethodInfo InetAddressGetIsMcSiteLocalMethodInfo a signature where
    overloadedMethod _ = inetAddressGetIsMcSiteLocal

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

foreign import ccall "g_inet_address_get_is_multicast" g_inet_address_get_is_multicast :: 
    Ptr InetAddress ->                      -- address : TInterface (Name {namespace = "Gio", name = "InetAddress"})
    IO CInt

{- |
Tests whether /@address@/ is a multicast address.

@since 2.22
-}
inetAddressGetIsMulticast ::
    (B.CallStack.HasCallStack, MonadIO m, IsInetAddress a) =>
    a
    {- ^ /@address@/: a 'GI.Gio.Objects.InetAddress.InetAddress' -}
    -> m Bool
    {- ^ __Returns:__ 'True' if /@address@/ is a multicast address. -}
inetAddressGetIsMulticast address = liftIO $ do
    address' <- unsafeManagedPtrCastPtr address
    result <- g_inet_address_get_is_multicast address'
    let result' = (/= 0) result
    touchManagedPtr address
    return result'

data InetAddressGetIsMulticastMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsInetAddress a) => O.MethodInfo InetAddressGetIsMulticastMethodInfo a signature where
    overloadedMethod _ = inetAddressGetIsMulticast

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

foreign import ccall "g_inet_address_get_is_site_local" g_inet_address_get_is_site_local :: 
    Ptr InetAddress ->                      -- address : TInterface (Name {namespace = "Gio", name = "InetAddress"})
    IO CInt

{- |
Tests whether /@address@/ is a site-local address such as 10.0.0.1
(that is, the address identifies a host on a local network that can
not be reached directly from the Internet, but which may have
outgoing Internet connectivity via a NAT or firewall).

@since 2.22
-}
inetAddressGetIsSiteLocal ::
    (B.CallStack.HasCallStack, MonadIO m, IsInetAddress a) =>
    a
    {- ^ /@address@/: a 'GI.Gio.Objects.InetAddress.InetAddress' -}
    -> m Bool
    {- ^ __Returns:__ 'True' if /@address@/ is a site-local address. -}
inetAddressGetIsSiteLocal address = liftIO $ do
    address' <- unsafeManagedPtrCastPtr address
    result <- g_inet_address_get_is_site_local address'
    let result' = (/= 0) result
    touchManagedPtr address
    return result'

data InetAddressGetIsSiteLocalMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsInetAddress a) => O.MethodInfo InetAddressGetIsSiteLocalMethodInfo a signature where
    overloadedMethod _ = inetAddressGetIsSiteLocal

-- method InetAddress::get_native_size
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "address", argType = TInterface (Name {namespace = "Gio", name = "InetAddress"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GInetAddress", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Just (TBasicType TUInt64)
-- throws : False
-- Skip return : False

foreign import ccall "g_inet_address_get_native_size" g_inet_address_get_native_size :: 
    Ptr InetAddress ->                      -- address : TInterface (Name {namespace = "Gio", name = "InetAddress"})
    IO Word64

{- |
Gets the size of the native raw binary address for /@address@/. This
is the size of the data that you get from @/g_inet_address_to_bytes()/@.

@since 2.22
-}
inetAddressGetNativeSize ::
    (B.CallStack.HasCallStack, MonadIO m, IsInetAddress a) =>
    a
    {- ^ /@address@/: a 'GI.Gio.Objects.InetAddress.InetAddress' -}
    -> m Word64
    {- ^ __Returns:__ the number of bytes used for the native version of /@address@/. -}
inetAddressGetNativeSize address = liftIO $ do
    address' <- unsafeManagedPtrCastPtr address
    result <- g_inet_address_get_native_size address'
    touchManagedPtr address
    return result

data InetAddressGetNativeSizeMethodInfo
instance (signature ~ (m Word64), MonadIO m, IsInetAddress a) => O.MethodInfo InetAddressGetNativeSizeMethodInfo a signature where
    overloadedMethod _ = inetAddressGetNativeSize

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

foreign import ccall "g_inet_address_to_string" g_inet_address_to_string :: 
    Ptr InetAddress ->                      -- address : TInterface (Name {namespace = "Gio", name = "InetAddress"})
    IO CString

{- |
Converts /@address@/ to string form.

@since 2.22
-}
inetAddressToString ::
    (B.CallStack.HasCallStack, MonadIO m, IsInetAddress a) =>
    a
    {- ^ /@address@/: a 'GI.Gio.Objects.InetAddress.InetAddress' -}
    -> m T.Text
    {- ^ __Returns:__ a representation of /@address@/ as a string, which should be
freed after use. -}
inetAddressToString address = liftIO $ do
    address' <- unsafeManagedPtrCastPtr address
    result <- g_inet_address_to_string address'
    checkUnexpectedReturnNULL "inetAddressToString" result
    result' <- cstringToText result
    freeMem result
    touchManagedPtr address
    return result'

data InetAddressToStringMethodInfo
instance (signature ~ (m T.Text), MonadIO m, IsInetAddress a) => O.MethodInfo InetAddressToStringMethodInfo a signature where
    overloadedMethod _ = inetAddressToString