#define ENABLE_OVERLOADING (MIN_VERSION_haskell_gi_overloading(1,0,0) \
&& !defined(__HADDOCK_VERSION__))
module GI.Gio.Objects.InetAddress
(
InetAddress(..) ,
IsInetAddress ,
toInetAddress ,
noInetAddress ,
#if ENABLE_OVERLOADING
InetAddressEqualMethodInfo ,
#endif
inetAddressEqual ,
#if ENABLE_OVERLOADING
InetAddressGetFamilyMethodInfo ,
#endif
inetAddressGetFamily ,
#if ENABLE_OVERLOADING
InetAddressGetIsAnyMethodInfo ,
#endif
inetAddressGetIsAny ,
#if ENABLE_OVERLOADING
InetAddressGetIsLinkLocalMethodInfo ,
#endif
inetAddressGetIsLinkLocal ,
#if ENABLE_OVERLOADING
InetAddressGetIsLoopbackMethodInfo ,
#endif
inetAddressGetIsLoopback ,
#if ENABLE_OVERLOADING
InetAddressGetIsMcGlobalMethodInfo ,
#endif
inetAddressGetIsMcGlobal ,
#if ENABLE_OVERLOADING
InetAddressGetIsMcLinkLocalMethodInfo ,
#endif
inetAddressGetIsMcLinkLocal ,
#if ENABLE_OVERLOADING
InetAddressGetIsMcNodeLocalMethodInfo ,
#endif
inetAddressGetIsMcNodeLocal ,
#if ENABLE_OVERLOADING
InetAddressGetIsMcOrgLocalMethodInfo ,
#endif
inetAddressGetIsMcOrgLocal ,
#if ENABLE_OVERLOADING
InetAddressGetIsMcSiteLocalMethodInfo ,
#endif
inetAddressGetIsMcSiteLocal ,
#if ENABLE_OVERLOADING
InetAddressGetIsMulticastMethodInfo ,
#endif
inetAddressGetIsMulticast ,
#if ENABLE_OVERLOADING
InetAddressGetIsSiteLocalMethodInfo ,
#endif
inetAddressGetIsSiteLocal ,
#if ENABLE_OVERLOADING
InetAddressGetNativeSizeMethodInfo ,
#endif
inetAddressGetNativeSize ,
inetAddressNewAny ,
inetAddressNewFromBytes ,
inetAddressNewFromString ,
inetAddressNewLoopback ,
#if ENABLE_OVERLOADING
InetAddressToStringMethodInfo ,
#endif
inetAddressToString ,
#if ENABLE_OVERLOADING
InetAddressBytesPropertyInfo ,
#endif
constructInetAddressBytes ,
getInetAddressBytes ,
#if ENABLE_OVERLOADING
inetAddressBytes ,
#endif
#if ENABLE_OVERLOADING
InetAddressFamilyPropertyInfo ,
#endif
constructInetAddressFamily ,
getInetAddressFamily ,
#if ENABLE_OVERLOADING
inetAddressFamily ,
#endif
#if ENABLE_OVERLOADING
InetAddressIsAnyPropertyInfo ,
#endif
getInetAddressIsAny ,
#if ENABLE_OVERLOADING
inetAddressIsAny ,
#endif
#if ENABLE_OVERLOADING
InetAddressIsLinkLocalPropertyInfo ,
#endif
getInetAddressIsLinkLocal ,
#if ENABLE_OVERLOADING
inetAddressIsLinkLocal ,
#endif
#if ENABLE_OVERLOADING
InetAddressIsLoopbackPropertyInfo ,
#endif
getInetAddressIsLoopback ,
#if ENABLE_OVERLOADING
inetAddressIsLoopback ,
#endif
#if ENABLE_OVERLOADING
InetAddressIsMcGlobalPropertyInfo ,
#endif
getInetAddressIsMcGlobal ,
#if ENABLE_OVERLOADING
inetAddressIsMcGlobal ,
#endif
#if ENABLE_OVERLOADING
InetAddressIsMcLinkLocalPropertyInfo ,
#endif
getInetAddressIsMcLinkLocal ,
#if ENABLE_OVERLOADING
inetAddressIsMcLinkLocal ,
#endif
#if ENABLE_OVERLOADING
InetAddressIsMcNodeLocalPropertyInfo ,
#endif
getInetAddressIsMcNodeLocal ,
#if ENABLE_OVERLOADING
inetAddressIsMcNodeLocal ,
#endif
#if ENABLE_OVERLOADING
InetAddressIsMcOrgLocalPropertyInfo ,
#endif
getInetAddressIsMcOrgLocal ,
#if ENABLE_OVERLOADING
inetAddressIsMcOrgLocal ,
#endif
#if ENABLE_OVERLOADING
InetAddressIsMcSiteLocalPropertyInfo ,
#endif
getInetAddressIsMcSiteLocal ,
#if ENABLE_OVERLOADING
inetAddressIsMcSiteLocal ,
#endif
#if ENABLE_OVERLOADING
InetAddressIsMulticastPropertyInfo ,
#endif
getInetAddressIsMulticast ,
#if ENABLE_OVERLOADING
inetAddressIsMulticast ,
#endif
#if ENABLE_OVERLOADING
InetAddressIsSiteLocalPropertyInfo ,
#endif
getInetAddressIsSiteLocal ,
#if ENABLE_OVERLOADING
inetAddressIsSiteLocal ,
#endif
) where
import Data.GI.Base.ShortPrelude
import qualified Data.GI.Base.ShortPrelude as SP
import qualified Data.GI.Base.Overloading as O
import qualified Prelude as P
import qualified Data.GI.Base.Attributes as GI.Attributes
import qualified Data.GI.Base.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.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.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 :: (MonadIO m, IsInetAddress o) => o -> m InetAddress
toInetAddress = liftIO . unsafeCastTo InetAddress
noInetAddress :: Maybe InetAddress
noInetAddress = Nothing
#if ENABLE_OVERLOADING
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 "getv" o = GObject.Object.ObjectGetvMethodInfo
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 "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
#if MIN_VERSION_base(4,10,0)
fromLabel = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)
#else
fromLabel _ = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)
#endif
#endif
#endif
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
#if ENABLE_OVERLOADING
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
#endif
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
#if ENABLE_OVERLOADING
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
#endif
getInetAddressIsAny :: (MonadIO m, IsInetAddress o) => o -> m Bool
getInetAddressIsAny obj = liftIO $ getObjectPropertyBool obj "is-any"
#if ENABLE_OVERLOADING
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
#endif
getInetAddressIsLinkLocal :: (MonadIO m, IsInetAddress o) => o -> m Bool
getInetAddressIsLinkLocal obj = liftIO $ getObjectPropertyBool obj "is-link-local"
#if ENABLE_OVERLOADING
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
#endif
getInetAddressIsLoopback :: (MonadIO m, IsInetAddress o) => o -> m Bool
getInetAddressIsLoopback obj = liftIO $ getObjectPropertyBool obj "is-loopback"
#if ENABLE_OVERLOADING
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
#endif
getInetAddressIsMcGlobal :: (MonadIO m, IsInetAddress o) => o -> m Bool
getInetAddressIsMcGlobal obj = liftIO $ getObjectPropertyBool obj "is-mc-global"
#if ENABLE_OVERLOADING
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
#endif
getInetAddressIsMcLinkLocal :: (MonadIO m, IsInetAddress o) => o -> m Bool
getInetAddressIsMcLinkLocal obj = liftIO $ getObjectPropertyBool obj "is-mc-link-local"
#if ENABLE_OVERLOADING
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
#endif
getInetAddressIsMcNodeLocal :: (MonadIO m, IsInetAddress o) => o -> m Bool
getInetAddressIsMcNodeLocal obj = liftIO $ getObjectPropertyBool obj "is-mc-node-local"
#if ENABLE_OVERLOADING
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
#endif
getInetAddressIsMcOrgLocal :: (MonadIO m, IsInetAddress o) => o -> m Bool
getInetAddressIsMcOrgLocal obj = liftIO $ getObjectPropertyBool obj "is-mc-org-local"
#if ENABLE_OVERLOADING
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
#endif
getInetAddressIsMcSiteLocal :: (MonadIO m, IsInetAddress o) => o -> m Bool
getInetAddressIsMcSiteLocal obj = liftIO $ getObjectPropertyBool obj "is-mc-site-local"
#if ENABLE_OVERLOADING
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
#endif
getInetAddressIsMulticast :: (MonadIO m, IsInetAddress o) => o -> m Bool
getInetAddressIsMulticast obj = liftIO $ getObjectPropertyBool obj "is-multicast"
#if ENABLE_OVERLOADING
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
#endif
getInetAddressIsSiteLocal :: (MonadIO m, IsInetAddress o) => o -> m Bool
getInetAddressIsSiteLocal obj = liftIO $ getObjectPropertyBool obj "is-site-local"
#if ENABLE_OVERLOADING
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
#endif
#if ENABLE_OVERLOADING
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, *)])
#endif
#if ENABLE_OVERLOADING
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
#endif
#if ENABLE_OVERLOADING
type instance O.SignalList InetAddress = InetAddressSignalList
type InetAddressSignalList = ('[ '("notify", GObject.Object.ObjectNotifySignalInfo)] :: [(Symbol, *)])
#endif
foreign import ccall "g_inet_address_new_any" g_inet_address_new_any ::
CUInt ->
IO (Ptr InetAddress)
inetAddressNewAny ::
(B.CallStack.HasCallStack, MonadIO m) =>
Gio.Enums.SocketFamily
-> m InetAddress
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'
#if ENABLE_OVERLOADING
#endif
foreign import ccall "g_inet_address_new_from_bytes" g_inet_address_new_from_bytes ::
Ptr Word8 ->
CUInt ->
IO (Ptr InetAddress)
inetAddressNewFromBytes ::
(B.CallStack.HasCallStack, MonadIO m) =>
Ptr Word8
-> Gio.Enums.SocketFamily
-> m InetAddress
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'
#if ENABLE_OVERLOADING
#endif
foreign import ccall "g_inet_address_new_from_string" g_inet_address_new_from_string ::
CString ->
IO (Ptr InetAddress)
inetAddressNewFromString ::
(B.CallStack.HasCallStack, MonadIO m) =>
T.Text
-> m InetAddress
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'
#if ENABLE_OVERLOADING
#endif
foreign import ccall "g_inet_address_new_loopback" g_inet_address_new_loopback ::
CUInt ->
IO (Ptr InetAddress)
inetAddressNewLoopback ::
(B.CallStack.HasCallStack, MonadIO m) =>
Gio.Enums.SocketFamily
-> m InetAddress
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'
#if ENABLE_OVERLOADING
#endif
foreign import ccall "g_inet_address_equal" g_inet_address_equal ::
Ptr InetAddress ->
Ptr InetAddress ->
IO CInt
inetAddressEqual ::
(B.CallStack.HasCallStack, MonadIO m, IsInetAddress a, IsInetAddress b) =>
a
-> b
-> m Bool
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'
#if ENABLE_OVERLOADING
data InetAddressEqualMethodInfo
instance (signature ~ (b -> m Bool), MonadIO m, IsInetAddress a, IsInetAddress b) => O.MethodInfo InetAddressEqualMethodInfo a signature where
overloadedMethod _ = inetAddressEqual
#endif
foreign import ccall "g_inet_address_get_family" g_inet_address_get_family ::
Ptr InetAddress ->
IO CUInt
inetAddressGetFamily ::
(B.CallStack.HasCallStack, MonadIO m, IsInetAddress a) =>
a
-> m Gio.Enums.SocketFamily
inetAddressGetFamily address = liftIO $ do
address' <- unsafeManagedPtrCastPtr address
result <- g_inet_address_get_family address'
let result' = (toEnum . fromIntegral) result
touchManagedPtr address
return result'
#if ENABLE_OVERLOADING
data InetAddressGetFamilyMethodInfo
instance (signature ~ (m Gio.Enums.SocketFamily), MonadIO m, IsInetAddress a) => O.MethodInfo InetAddressGetFamilyMethodInfo a signature where
overloadedMethod _ = inetAddressGetFamily
#endif
foreign import ccall "g_inet_address_get_is_any" g_inet_address_get_is_any ::
Ptr InetAddress ->
IO CInt
inetAddressGetIsAny ::
(B.CallStack.HasCallStack, MonadIO m, IsInetAddress a) =>
a
-> m Bool
inetAddressGetIsAny address = liftIO $ do
address' <- unsafeManagedPtrCastPtr address
result <- g_inet_address_get_is_any address'
let result' = (/= 0) result
touchManagedPtr address
return result'
#if ENABLE_OVERLOADING
data InetAddressGetIsAnyMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsInetAddress a) => O.MethodInfo InetAddressGetIsAnyMethodInfo a signature where
overloadedMethod _ = inetAddressGetIsAny
#endif
foreign import ccall "g_inet_address_get_is_link_local" g_inet_address_get_is_link_local ::
Ptr InetAddress ->
IO CInt
inetAddressGetIsLinkLocal ::
(B.CallStack.HasCallStack, MonadIO m, IsInetAddress a) =>
a
-> m Bool
inetAddressGetIsLinkLocal address = liftIO $ do
address' <- unsafeManagedPtrCastPtr address
result <- g_inet_address_get_is_link_local address'
let result' = (/= 0) result
touchManagedPtr address
return result'
#if ENABLE_OVERLOADING
data InetAddressGetIsLinkLocalMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsInetAddress a) => O.MethodInfo InetAddressGetIsLinkLocalMethodInfo a signature where
overloadedMethod _ = inetAddressGetIsLinkLocal
#endif
foreign import ccall "g_inet_address_get_is_loopback" g_inet_address_get_is_loopback ::
Ptr InetAddress ->
IO CInt
inetAddressGetIsLoopback ::
(B.CallStack.HasCallStack, MonadIO m, IsInetAddress a) =>
a
-> m Bool
inetAddressGetIsLoopback address = liftIO $ do
address' <- unsafeManagedPtrCastPtr address
result <- g_inet_address_get_is_loopback address'
let result' = (/= 0) result
touchManagedPtr address
return result'
#if ENABLE_OVERLOADING
data InetAddressGetIsLoopbackMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsInetAddress a) => O.MethodInfo InetAddressGetIsLoopbackMethodInfo a signature where
overloadedMethod _ = inetAddressGetIsLoopback
#endif
foreign import ccall "g_inet_address_get_is_mc_global" g_inet_address_get_is_mc_global ::
Ptr InetAddress ->
IO CInt
inetAddressGetIsMcGlobal ::
(B.CallStack.HasCallStack, MonadIO m, IsInetAddress a) =>
a
-> m Bool
inetAddressGetIsMcGlobal address = liftIO $ do
address' <- unsafeManagedPtrCastPtr address
result <- g_inet_address_get_is_mc_global address'
let result' = (/= 0) result
touchManagedPtr address
return result'
#if ENABLE_OVERLOADING
data InetAddressGetIsMcGlobalMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsInetAddress a) => O.MethodInfo InetAddressGetIsMcGlobalMethodInfo a signature where
overloadedMethod _ = inetAddressGetIsMcGlobal
#endif
foreign import ccall "g_inet_address_get_is_mc_link_local" g_inet_address_get_is_mc_link_local ::
Ptr InetAddress ->
IO CInt
inetAddressGetIsMcLinkLocal ::
(B.CallStack.HasCallStack, MonadIO m, IsInetAddress a) =>
a
-> m Bool
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'
#if ENABLE_OVERLOADING
data InetAddressGetIsMcLinkLocalMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsInetAddress a) => O.MethodInfo InetAddressGetIsMcLinkLocalMethodInfo a signature where
overloadedMethod _ = inetAddressGetIsMcLinkLocal
#endif
foreign import ccall "g_inet_address_get_is_mc_node_local" g_inet_address_get_is_mc_node_local ::
Ptr InetAddress ->
IO CInt
inetAddressGetIsMcNodeLocal ::
(B.CallStack.HasCallStack, MonadIO m, IsInetAddress a) =>
a
-> m Bool
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'
#if ENABLE_OVERLOADING
data InetAddressGetIsMcNodeLocalMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsInetAddress a) => O.MethodInfo InetAddressGetIsMcNodeLocalMethodInfo a signature where
overloadedMethod _ = inetAddressGetIsMcNodeLocal
#endif
foreign import ccall "g_inet_address_get_is_mc_org_local" g_inet_address_get_is_mc_org_local ::
Ptr InetAddress ->
IO CInt
inetAddressGetIsMcOrgLocal ::
(B.CallStack.HasCallStack, MonadIO m, IsInetAddress a) =>
a
-> m Bool
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'
#if ENABLE_OVERLOADING
data InetAddressGetIsMcOrgLocalMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsInetAddress a) => O.MethodInfo InetAddressGetIsMcOrgLocalMethodInfo a signature where
overloadedMethod _ = inetAddressGetIsMcOrgLocal
#endif
foreign import ccall "g_inet_address_get_is_mc_site_local" g_inet_address_get_is_mc_site_local ::
Ptr InetAddress ->
IO CInt
inetAddressGetIsMcSiteLocal ::
(B.CallStack.HasCallStack, MonadIO m, IsInetAddress a) =>
a
-> m Bool
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'
#if ENABLE_OVERLOADING
data InetAddressGetIsMcSiteLocalMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsInetAddress a) => O.MethodInfo InetAddressGetIsMcSiteLocalMethodInfo a signature where
overloadedMethod _ = inetAddressGetIsMcSiteLocal
#endif
foreign import ccall "g_inet_address_get_is_multicast" g_inet_address_get_is_multicast ::
Ptr InetAddress ->
IO CInt
inetAddressGetIsMulticast ::
(B.CallStack.HasCallStack, MonadIO m, IsInetAddress a) =>
a
-> m Bool
inetAddressGetIsMulticast address = liftIO $ do
address' <- unsafeManagedPtrCastPtr address
result <- g_inet_address_get_is_multicast address'
let result' = (/= 0) result
touchManagedPtr address
return result'
#if ENABLE_OVERLOADING
data InetAddressGetIsMulticastMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsInetAddress a) => O.MethodInfo InetAddressGetIsMulticastMethodInfo a signature where
overloadedMethod _ = inetAddressGetIsMulticast
#endif
foreign import ccall "g_inet_address_get_is_site_local" g_inet_address_get_is_site_local ::
Ptr InetAddress ->
IO CInt
inetAddressGetIsSiteLocal ::
(B.CallStack.HasCallStack, MonadIO m, IsInetAddress a) =>
a
-> m Bool
inetAddressGetIsSiteLocal address = liftIO $ do
address' <- unsafeManagedPtrCastPtr address
result <- g_inet_address_get_is_site_local address'
let result' = (/= 0) result
touchManagedPtr address
return result'
#if ENABLE_OVERLOADING
data InetAddressGetIsSiteLocalMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsInetAddress a) => O.MethodInfo InetAddressGetIsSiteLocalMethodInfo a signature where
overloadedMethod _ = inetAddressGetIsSiteLocal
#endif
foreign import ccall "g_inet_address_get_native_size" g_inet_address_get_native_size ::
Ptr InetAddress ->
IO Word64
inetAddressGetNativeSize ::
(B.CallStack.HasCallStack, MonadIO m, IsInetAddress a) =>
a
-> m Word64
inetAddressGetNativeSize address = liftIO $ do
address' <- unsafeManagedPtrCastPtr address
result <- g_inet_address_get_native_size address'
touchManagedPtr address
return result
#if ENABLE_OVERLOADING
data InetAddressGetNativeSizeMethodInfo
instance (signature ~ (m Word64), MonadIO m, IsInetAddress a) => O.MethodInfo InetAddressGetNativeSizeMethodInfo a signature where
overloadedMethod _ = inetAddressGetNativeSize
#endif
foreign import ccall "g_inet_address_to_string" g_inet_address_to_string ::
Ptr InetAddress ->
IO CString
inetAddressToString ::
(B.CallStack.HasCallStack, MonadIO m, IsInetAddress a) =>
a
-> m T.Text
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'
#if ENABLE_OVERLOADING
data InetAddressToStringMethodInfo
instance (signature ~ (m T.Text), MonadIO m, IsInetAddress a) => O.MethodInfo InetAddressToStringMethodInfo a signature where
overloadedMethod _ = inetAddressToString
#endif