gi-gio-0.2.46.12: GI/Gio/Objects/InetAddress.hs
{- |
Copyright : Will Thompson, Iñaki García Etxebarria and Jonas Platte
License : LGPL-2.1
Maintainer : Iñaki García Etxebarria (garetxe@gmail.com)
-}
module GI.Gio.Objects.InetAddress
(
-- * Exported types
InetAddress(..) ,
InetAddressK ,
toInetAddress ,
noInetAddress ,
-- * Methods
-- ** inetAddressEqual
inetAddressEqual ,
-- ** inetAddressGetFamily
inetAddressGetFamily ,
-- ** inetAddressGetIsAny
inetAddressGetIsAny ,
-- ** inetAddressGetIsLinkLocal
inetAddressGetIsLinkLocal ,
-- ** inetAddressGetIsLoopback
inetAddressGetIsLoopback ,
-- ** inetAddressGetIsMcGlobal
inetAddressGetIsMcGlobal ,
-- ** inetAddressGetIsMcLinkLocal
inetAddressGetIsMcLinkLocal ,
-- ** inetAddressGetIsMcNodeLocal
inetAddressGetIsMcNodeLocal ,
-- ** inetAddressGetIsMcOrgLocal
inetAddressGetIsMcOrgLocal ,
-- ** inetAddressGetIsMcSiteLocal
inetAddressGetIsMcSiteLocal ,
-- ** inetAddressGetIsMulticast
inetAddressGetIsMulticast ,
-- ** inetAddressGetIsSiteLocal
inetAddressGetIsSiteLocal ,
-- ** inetAddressGetNativeSize
inetAddressGetNativeSize ,
-- ** inetAddressNewAny
inetAddressNewAny ,
-- ** inetAddressNewFromBytes
inetAddressNewFromBytes ,
-- ** inetAddressNewFromString
inetAddressNewFromString ,
-- ** inetAddressNewLoopback
inetAddressNewLoopback ,
-- ** inetAddressToString
inetAddressToString ,
-- * Properties
-- ** Bytes
InetAddressBytesPropertyInfo ,
constructInetAddressBytes ,
getInetAddressBytes ,
-- ** Family
InetAddressFamilyPropertyInfo ,
constructInetAddressFamily ,
getInetAddressFamily ,
-- ** IsAny
InetAddressIsAnyPropertyInfo ,
getInetAddressIsAny ,
-- ** IsLinkLocal
InetAddressIsLinkLocalPropertyInfo ,
getInetAddressIsLinkLocal ,
-- ** IsLoopback
InetAddressIsLoopbackPropertyInfo ,
getInetAddressIsLoopback ,
-- ** IsMcGlobal
InetAddressIsMcGlobalPropertyInfo ,
getInetAddressIsMcGlobal ,
-- ** IsMcLinkLocal
InetAddressIsMcLinkLocalPropertyInfo ,
getInetAddressIsMcLinkLocal ,
-- ** IsMcNodeLocal
InetAddressIsMcNodeLocalPropertyInfo ,
getInetAddressIsMcNodeLocal ,
-- ** IsMcOrgLocal
InetAddressIsMcOrgLocalPropertyInfo ,
getInetAddressIsMcOrgLocal ,
-- ** IsMcSiteLocal
InetAddressIsMcSiteLocalPropertyInfo ,
getInetAddressIsMcSiteLocal ,
-- ** IsMulticast
InetAddressIsMulticastPropertyInfo ,
getInetAddressIsMulticast ,
-- ** IsSiteLocal
InetAddressIsSiteLocalPropertyInfo ,
getInetAddressIsSiteLocal ,
) where
import Prelude ()
import Data.GI.Base.ShortPrelude
import qualified Data.Text as T
import qualified Data.ByteString.Char8 as B
import qualified Data.Map as Map
import GI.Gio.Types
import GI.Gio.Callbacks
import qualified GI.GObject as GObject
newtype InetAddress = InetAddress (ForeignPtr InetAddress)
foreign import ccall "g_inet_address_get_type"
c_g_inet_address_get_type :: IO GType
type instance ParentTypes InetAddress = InetAddressParentTypes
type InetAddressParentTypes = '[GObject.Object]
instance GObject InetAddress where
gobjectIsInitiallyUnowned _ = False
gobjectType _ = c_g_inet_address_get_type
class GObject o => InetAddressK o
instance (GObject o, IsDescendantOf InetAddress o) => InetAddressK o
toInetAddress :: InetAddressK o => o -> IO InetAddress
toInetAddress = unsafeCastTo InetAddress
noInetAddress :: Maybe InetAddress
noInetAddress = Nothing
-- VVV Prop "bytes"
-- Type: TBasicType TVoid
-- Flags: [PropertyReadable,PropertyWritable,PropertyConstructOnly]
getInetAddressBytes :: (MonadIO m, InetAddressK o) => o -> m (Ptr ())
getInetAddressBytes obj = liftIO $ getObjectPropertyPtr obj "bytes"
constructInetAddressBytes :: (Ptr ()) -> IO ([Char], GValue)
constructInetAddressBytes val = constructObjectPropertyPtr "bytes" val
data InetAddressBytesPropertyInfo
instance AttrInfo InetAddressBytesPropertyInfo where
type AttrAllowedOps InetAddressBytesPropertyInfo = '[ 'AttrConstruct, 'AttrGet]
type AttrSetTypeConstraint InetAddressBytesPropertyInfo = (~) (Ptr ())
type AttrBaseTypeConstraint InetAddressBytesPropertyInfo = InetAddressK
type AttrGetType InetAddressBytesPropertyInfo = (Ptr ())
type AttrLabel InetAddressBytesPropertyInfo = "InetAddress::bytes"
attrGet _ = getInetAddressBytes
attrSet _ = undefined
attrConstruct _ = constructInetAddressBytes
-- VVV Prop "family"
-- Type: TInterface "Gio" "SocketFamily"
-- Flags: [PropertyReadable,PropertyWritable,PropertyConstructOnly]
getInetAddressFamily :: (MonadIO m, InetAddressK o) => o -> m SocketFamily
getInetAddressFamily obj = liftIO $ getObjectPropertyEnum obj "family"
constructInetAddressFamily :: SocketFamily -> IO ([Char], GValue)
constructInetAddressFamily val = constructObjectPropertyEnum "family" val
data InetAddressFamilyPropertyInfo
instance AttrInfo InetAddressFamilyPropertyInfo where
type AttrAllowedOps InetAddressFamilyPropertyInfo = '[ 'AttrConstruct, 'AttrGet]
type AttrSetTypeConstraint InetAddressFamilyPropertyInfo = (~) SocketFamily
type AttrBaseTypeConstraint InetAddressFamilyPropertyInfo = InetAddressK
type AttrGetType InetAddressFamilyPropertyInfo = SocketFamily
type AttrLabel InetAddressFamilyPropertyInfo = "InetAddress::family"
attrGet _ = getInetAddressFamily
attrSet _ = undefined
attrConstruct _ = constructInetAddressFamily
-- VVV Prop "is-any"
-- Type: TBasicType TBoolean
-- Flags: [PropertyReadable]
getInetAddressIsAny :: (MonadIO m, InetAddressK 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 = InetAddressK
type AttrGetType InetAddressIsAnyPropertyInfo = Bool
type AttrLabel InetAddressIsAnyPropertyInfo = "InetAddress::is-any"
attrGet _ = getInetAddressIsAny
attrSet _ = undefined
attrConstruct _ = undefined
-- VVV Prop "is-link-local"
-- Type: TBasicType TBoolean
-- Flags: [PropertyReadable]
getInetAddressIsLinkLocal :: (MonadIO m, InetAddressK 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 = InetAddressK
type AttrGetType InetAddressIsLinkLocalPropertyInfo = Bool
type AttrLabel InetAddressIsLinkLocalPropertyInfo = "InetAddress::is-link-local"
attrGet _ = getInetAddressIsLinkLocal
attrSet _ = undefined
attrConstruct _ = undefined
-- VVV Prop "is-loopback"
-- Type: TBasicType TBoolean
-- Flags: [PropertyReadable]
getInetAddressIsLoopback :: (MonadIO m, InetAddressK 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 = InetAddressK
type AttrGetType InetAddressIsLoopbackPropertyInfo = Bool
type AttrLabel InetAddressIsLoopbackPropertyInfo = "InetAddress::is-loopback"
attrGet _ = getInetAddressIsLoopback
attrSet _ = undefined
attrConstruct _ = undefined
-- VVV Prop "is-mc-global"
-- Type: TBasicType TBoolean
-- Flags: [PropertyReadable]
getInetAddressIsMcGlobal :: (MonadIO m, InetAddressK 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 = InetAddressK
type AttrGetType InetAddressIsMcGlobalPropertyInfo = Bool
type AttrLabel InetAddressIsMcGlobalPropertyInfo = "InetAddress::is-mc-global"
attrGet _ = getInetAddressIsMcGlobal
attrSet _ = undefined
attrConstruct _ = undefined
-- VVV Prop "is-mc-link-local"
-- Type: TBasicType TBoolean
-- Flags: [PropertyReadable]
getInetAddressIsMcLinkLocal :: (MonadIO m, InetAddressK 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 = InetAddressK
type AttrGetType InetAddressIsMcLinkLocalPropertyInfo = Bool
type AttrLabel InetAddressIsMcLinkLocalPropertyInfo = "InetAddress::is-mc-link-local"
attrGet _ = getInetAddressIsMcLinkLocal
attrSet _ = undefined
attrConstruct _ = undefined
-- VVV Prop "is-mc-node-local"
-- Type: TBasicType TBoolean
-- Flags: [PropertyReadable]
getInetAddressIsMcNodeLocal :: (MonadIO m, InetAddressK 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 = InetAddressK
type AttrGetType InetAddressIsMcNodeLocalPropertyInfo = Bool
type AttrLabel InetAddressIsMcNodeLocalPropertyInfo = "InetAddress::is-mc-node-local"
attrGet _ = getInetAddressIsMcNodeLocal
attrSet _ = undefined
attrConstruct _ = undefined
-- VVV Prop "is-mc-org-local"
-- Type: TBasicType TBoolean
-- Flags: [PropertyReadable]
getInetAddressIsMcOrgLocal :: (MonadIO m, InetAddressK 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 = InetAddressK
type AttrGetType InetAddressIsMcOrgLocalPropertyInfo = Bool
type AttrLabel InetAddressIsMcOrgLocalPropertyInfo = "InetAddress::is-mc-org-local"
attrGet _ = getInetAddressIsMcOrgLocal
attrSet _ = undefined
attrConstruct _ = undefined
-- VVV Prop "is-mc-site-local"
-- Type: TBasicType TBoolean
-- Flags: [PropertyReadable]
getInetAddressIsMcSiteLocal :: (MonadIO m, InetAddressK 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 = InetAddressK
type AttrGetType InetAddressIsMcSiteLocalPropertyInfo = Bool
type AttrLabel InetAddressIsMcSiteLocalPropertyInfo = "InetAddress::is-mc-site-local"
attrGet _ = getInetAddressIsMcSiteLocal
attrSet _ = undefined
attrConstruct _ = undefined
-- VVV Prop "is-multicast"
-- Type: TBasicType TBoolean
-- Flags: [PropertyReadable]
getInetAddressIsMulticast :: (MonadIO m, InetAddressK 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 = InetAddressK
type AttrGetType InetAddressIsMulticastPropertyInfo = Bool
type AttrLabel InetAddressIsMulticastPropertyInfo = "InetAddress::is-multicast"
attrGet _ = getInetAddressIsMulticast
attrSet _ = undefined
attrConstruct _ = undefined
-- VVV Prop "is-site-local"
-- Type: TBasicType TBoolean
-- Flags: [PropertyReadable]
getInetAddressIsSiteLocal :: (MonadIO m, InetAddressK 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 = InetAddressK
type AttrGetType InetAddressIsSiteLocalPropertyInfo = Bool
type AttrLabel InetAddressIsSiteLocalPropertyInfo = "InetAddress::is-site-local"
attrGet _ = getInetAddressIsSiteLocal
attrSet _ = undefined
attrConstruct _ = undefined
type instance AttributeList InetAddress = InetAddressAttributeList
type InetAddressAttributeList = ('[ '("bytes", InetAddressBytesPropertyInfo), '("family", InetAddressFamilyPropertyInfo), '("is-any", InetAddressIsAnyPropertyInfo), '("is-link-local", InetAddressIsLinkLocalPropertyInfo), '("is-loopback", InetAddressIsLoopbackPropertyInfo), '("is-mc-global", InetAddressIsMcGlobalPropertyInfo), '("is-mc-link-local", InetAddressIsMcLinkLocalPropertyInfo), '("is-mc-node-local", InetAddressIsMcNodeLocalPropertyInfo), '("is-mc-org-local", InetAddressIsMcOrgLocalPropertyInfo), '("is-mc-site-local", InetAddressIsMcSiteLocalPropertyInfo), '("is-multicast", InetAddressIsMulticastPropertyInfo), '("is-site-local", InetAddressIsSiteLocalPropertyInfo)] :: [(Symbol, *)])
type instance SignalList InetAddress = InetAddressSignalList
type InetAddressSignalList = ('[ '("notify", GObject.ObjectNotifySignalInfo), '("notify::[property]", GObjectNotifySignalInfo)] :: [(Symbol, *)])
-- method InetAddress::new_any
-- method type : Constructor
-- Args : [Arg {argName = "family", argType = TInterface "Gio" "SocketFamily", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "family", argType = TInterface "Gio" "SocketFamily", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gio" "InetAddress"
-- throws : False
-- Skip return : False
foreign import ccall "g_inet_address_new_any" g_inet_address_new_any ::
CUInt -> -- family : TInterface "Gio" "SocketFamily"
IO (Ptr InetAddress)
inetAddressNewAny ::
(MonadIO m) =>
SocketFamily -> -- family
m InetAddress
inetAddressNewAny family = liftIO $ do
let family' = (fromIntegral . fromEnum) family
result <- g_inet_address_new_any family'
checkUnexpectedReturnNULL "g_inet_address_new_any" result
result' <- (wrapObject InetAddress) result
return result'
-- method InetAddress::new_from_bytes
-- method type : Constructor
-- Args : [Arg {argName = "bytes", argType = TCArray False (-1) (-1) (TBasicType TUInt8), direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "family", argType = TInterface "Gio" "SocketFamily", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "bytes", argType = TCArray False (-1) (-1) (TBasicType TUInt8), direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "family", argType = TInterface "Gio" "SocketFamily", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gio" "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 "Gio" "SocketFamily"
IO (Ptr InetAddress)
inetAddressNewFromBytes ::
(MonadIO m) =>
Ptr Word8 -> -- bytes
SocketFamily -> -- family
m InetAddress
inetAddressNewFromBytes bytes family = liftIO $ do
let family' = (fromIntegral . fromEnum) family
result <- g_inet_address_new_from_bytes bytes family'
checkUnexpectedReturnNULL "g_inet_address_new_from_bytes" result
result' <- (wrapObject InetAddress) result
return result'
-- method InetAddress::new_from_string
-- method type : Constructor
-- Args : [Arg {argName = "string", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "string", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gio" "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)
inetAddressNewFromString ::
(MonadIO m) =>
T.Text -> -- string
m InetAddress
inetAddressNewFromString string = liftIO $ do
string' <- textToCString string
result <- g_inet_address_new_from_string string'
checkUnexpectedReturnNULL "g_inet_address_new_from_string" result
result' <- (wrapObject InetAddress) result
freeMem string'
return result'
-- method InetAddress::new_loopback
-- method type : Constructor
-- Args : [Arg {argName = "family", argType = TInterface "Gio" "SocketFamily", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "family", argType = TInterface "Gio" "SocketFamily", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gio" "InetAddress"
-- throws : False
-- Skip return : False
foreign import ccall "g_inet_address_new_loopback" g_inet_address_new_loopback ::
CUInt -> -- family : TInterface "Gio" "SocketFamily"
IO (Ptr InetAddress)
inetAddressNewLoopback ::
(MonadIO m) =>
SocketFamily -> -- family
m InetAddress
inetAddressNewLoopback family = liftIO $ do
let family' = (fromIntegral . fromEnum) family
result <- g_inet_address_new_loopback family'
checkUnexpectedReturnNULL "g_inet_address_new_loopback" result
result' <- (wrapObject InetAddress) result
return result'
-- method InetAddress::equal
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gio" "InetAddress", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "other_address", argType = TInterface "Gio" "InetAddress", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gio" "InetAddress", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "other_address", argType = TInterface "Gio" "InetAddress", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False
foreign import ccall "g_inet_address_equal" g_inet_address_equal ::
Ptr InetAddress -> -- _obj : TInterface "Gio" "InetAddress"
Ptr InetAddress -> -- other_address : TInterface "Gio" "InetAddress"
IO CInt
inetAddressEqual ::
(MonadIO m, InetAddressK a, InetAddressK b) =>
a -> -- _obj
b -> -- other_address
m Bool
inetAddressEqual _obj other_address = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
let other_address' = unsafeManagedPtrCastPtr other_address
result <- g_inet_address_equal _obj' other_address'
let result' = (/= 0) result
touchManagedPtr _obj
touchManagedPtr other_address
return result'
-- method InetAddress::get_family
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gio" "InetAddress", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gio" "InetAddress", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gio" "SocketFamily"
-- throws : False
-- Skip return : False
foreign import ccall "g_inet_address_get_family" g_inet_address_get_family ::
Ptr InetAddress -> -- _obj : TInterface "Gio" "InetAddress"
IO CUInt
inetAddressGetFamily ::
(MonadIO m, InetAddressK a) =>
a -> -- _obj
m SocketFamily
inetAddressGetFamily _obj = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
result <- g_inet_address_get_family _obj'
let result' = (toEnum . fromIntegral) result
touchManagedPtr _obj
return result'
-- method InetAddress::get_is_any
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gio" "InetAddress", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gio" "InetAddress", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False
foreign import ccall "g_inet_address_get_is_any" g_inet_address_get_is_any ::
Ptr InetAddress -> -- _obj : TInterface "Gio" "InetAddress"
IO CInt
inetAddressGetIsAny ::
(MonadIO m, InetAddressK a) =>
a -> -- _obj
m Bool
inetAddressGetIsAny _obj = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
result <- g_inet_address_get_is_any _obj'
let result' = (/= 0) result
touchManagedPtr _obj
return result'
-- method InetAddress::get_is_link_local
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gio" "InetAddress", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gio" "InetAddress", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : 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 -> -- _obj : TInterface "Gio" "InetAddress"
IO CInt
inetAddressGetIsLinkLocal ::
(MonadIO m, InetAddressK a) =>
a -> -- _obj
m Bool
inetAddressGetIsLinkLocal _obj = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
result <- g_inet_address_get_is_link_local _obj'
let result' = (/= 0) result
touchManagedPtr _obj
return result'
-- method InetAddress::get_is_loopback
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gio" "InetAddress", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gio" "InetAddress", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False
foreign import ccall "g_inet_address_get_is_loopback" g_inet_address_get_is_loopback ::
Ptr InetAddress -> -- _obj : TInterface "Gio" "InetAddress"
IO CInt
inetAddressGetIsLoopback ::
(MonadIO m, InetAddressK a) =>
a -> -- _obj
m Bool
inetAddressGetIsLoopback _obj = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
result <- g_inet_address_get_is_loopback _obj'
let result' = (/= 0) result
touchManagedPtr _obj
return result'
-- method InetAddress::get_is_mc_global
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gio" "InetAddress", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gio" "InetAddress", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : 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 -> -- _obj : TInterface "Gio" "InetAddress"
IO CInt
inetAddressGetIsMcGlobal ::
(MonadIO m, InetAddressK a) =>
a -> -- _obj
m Bool
inetAddressGetIsMcGlobal _obj = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
result <- g_inet_address_get_is_mc_global _obj'
let result' = (/= 0) result
touchManagedPtr _obj
return result'
-- method InetAddress::get_is_mc_link_local
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gio" "InetAddress", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gio" "InetAddress", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : 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 -> -- _obj : TInterface "Gio" "InetAddress"
IO CInt
inetAddressGetIsMcLinkLocal ::
(MonadIO m, InetAddressK a) =>
a -> -- _obj
m Bool
inetAddressGetIsMcLinkLocal _obj = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
result <- g_inet_address_get_is_mc_link_local _obj'
let result' = (/= 0) result
touchManagedPtr _obj
return result'
-- method InetAddress::get_is_mc_node_local
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gio" "InetAddress", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gio" "InetAddress", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : 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 -> -- _obj : TInterface "Gio" "InetAddress"
IO CInt
inetAddressGetIsMcNodeLocal ::
(MonadIO m, InetAddressK a) =>
a -> -- _obj
m Bool
inetAddressGetIsMcNodeLocal _obj = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
result <- g_inet_address_get_is_mc_node_local _obj'
let result' = (/= 0) result
touchManagedPtr _obj
return result'
-- method InetAddress::get_is_mc_org_local
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gio" "InetAddress", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gio" "InetAddress", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : 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 -> -- _obj : TInterface "Gio" "InetAddress"
IO CInt
inetAddressGetIsMcOrgLocal ::
(MonadIO m, InetAddressK a) =>
a -> -- _obj
m Bool
inetAddressGetIsMcOrgLocal _obj = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
result <- g_inet_address_get_is_mc_org_local _obj'
let result' = (/= 0) result
touchManagedPtr _obj
return result'
-- method InetAddress::get_is_mc_site_local
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gio" "InetAddress", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gio" "InetAddress", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : 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 -> -- _obj : TInterface "Gio" "InetAddress"
IO CInt
inetAddressGetIsMcSiteLocal ::
(MonadIO m, InetAddressK a) =>
a -> -- _obj
m Bool
inetAddressGetIsMcSiteLocal _obj = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
result <- g_inet_address_get_is_mc_site_local _obj'
let result' = (/= 0) result
touchManagedPtr _obj
return result'
-- method InetAddress::get_is_multicast
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gio" "InetAddress", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gio" "InetAddress", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TBoolean
-- throws : False
-- Skip return : False
foreign import ccall "g_inet_address_get_is_multicast" g_inet_address_get_is_multicast ::
Ptr InetAddress -> -- _obj : TInterface "Gio" "InetAddress"
IO CInt
inetAddressGetIsMulticast ::
(MonadIO m, InetAddressK a) =>
a -> -- _obj
m Bool
inetAddressGetIsMulticast _obj = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
result <- g_inet_address_get_is_multicast _obj'
let result' = (/= 0) result
touchManagedPtr _obj
return result'
-- method InetAddress::get_is_site_local
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gio" "InetAddress", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gio" "InetAddress", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : 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 -> -- _obj : TInterface "Gio" "InetAddress"
IO CInt
inetAddressGetIsSiteLocal ::
(MonadIO m, InetAddressK a) =>
a -> -- _obj
m Bool
inetAddressGetIsSiteLocal _obj = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
result <- g_inet_address_get_is_site_local _obj'
let result' = (/= 0) result
touchManagedPtr _obj
return result'
-- method InetAddress::get_native_size
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gio" "InetAddress", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gio" "InetAddress", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUInt64
-- throws : False
-- Skip return : False
foreign import ccall "g_inet_address_get_native_size" g_inet_address_get_native_size ::
Ptr InetAddress -> -- _obj : TInterface "Gio" "InetAddress"
IO Word64
inetAddressGetNativeSize ::
(MonadIO m, InetAddressK a) =>
a -> -- _obj
m Word64
inetAddressGetNativeSize _obj = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
result <- g_inet_address_get_native_size _obj'
touchManagedPtr _obj
return result
-- method InetAddress::to_string
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gio" "InetAddress", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gio" "InetAddress", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUTF8
-- throws : False
-- Skip return : False
foreign import ccall "g_inet_address_to_string" g_inet_address_to_string ::
Ptr InetAddress -> -- _obj : TInterface "Gio" "InetAddress"
IO CString
inetAddressToString ::
(MonadIO m, InetAddressK a) =>
a -> -- _obj
m T.Text
inetAddressToString _obj = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
result <- g_inet_address_to_string _obj'
checkUnexpectedReturnNULL "g_inet_address_to_string" result
result' <- cstringToText result
freeMem result
touchManagedPtr _obj
return result'