#define ENABLE_OVERLOADING (MIN_VERSION_haskell_gi_overloading(1,0,0) \
&& !defined(__HADDOCK_VERSION__))
module GI.Gio.Interfaces.SocketConnectable
(
SocketConnectable(..) ,
noSocketConnectable ,
IsSocketConnectable ,
toSocketConnectable ,
#if ENABLE_OVERLOADING
SocketConnectableEnumerateMethodInfo ,
#endif
socketConnectableEnumerate ,
#if ENABLE_OVERLOADING
SocketConnectableProxyEnumerateMethodInfo,
#endif
socketConnectableProxyEnumerate ,
#if ENABLE_OVERLOADING
SocketConnectableToStringMethodInfo ,
#endif
socketConnectableToString ,
) 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.Objects.SocketAddressEnumerator as Gio.SocketAddressEnumerator
newtype SocketConnectable = SocketConnectable (ManagedPtr SocketConnectable)
noSocketConnectable :: Maybe SocketConnectable
noSocketConnectable = Nothing
#if ENABLE_OVERLOADING
type instance O.SignalList SocketConnectable = SocketConnectableSignalList
type SocketConnectableSignalList = ('[ '("notify", GObject.Object.ObjectNotifySignalInfo)] :: [(Symbol, *)])
#endif
foreign import ccall "g_socket_connectable_get_type"
c_g_socket_connectable_get_type :: IO GType
instance GObject SocketConnectable where
gobjectType _ = c_g_socket_connectable_get_type
class GObject o => IsSocketConnectable o
#if MIN_VERSION_base(4,9,0)
instance {-# OVERLAPPABLE #-} (GObject a, O.UnknownAncestorError SocketConnectable a) =>
IsSocketConnectable a
#endif
instance IsSocketConnectable SocketConnectable
instance GObject.Object.IsObject SocketConnectable
toSocketConnectable :: (MonadIO m, IsSocketConnectable o) => o -> m SocketConnectable
toSocketConnectable = liftIO . unsafeCastTo SocketConnectable
#if ENABLE_OVERLOADING
instance O.HasAttributeList SocketConnectable
type instance O.AttributeList SocketConnectable = SocketConnectableAttributeList
type SocketConnectableAttributeList = ('[ ] :: [(Symbol, *)])
#endif
#if ENABLE_OVERLOADING
#endif
#if ENABLE_OVERLOADING
type family ResolveSocketConnectableMethod (t :: Symbol) (o :: *) :: * where
ResolveSocketConnectableMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo
ResolveSocketConnectableMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo
ResolveSocketConnectableMethod "enumerate" o = SocketConnectableEnumerateMethodInfo
ResolveSocketConnectableMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo
ResolveSocketConnectableMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo
ResolveSocketConnectableMethod "getv" o = GObject.Object.ObjectGetvMethodInfo
ResolveSocketConnectableMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo
ResolveSocketConnectableMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo
ResolveSocketConnectableMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo
ResolveSocketConnectableMethod "proxyEnumerate" o = SocketConnectableProxyEnumerateMethodInfo
ResolveSocketConnectableMethod "ref" o = GObject.Object.ObjectRefMethodInfo
ResolveSocketConnectableMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo
ResolveSocketConnectableMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo
ResolveSocketConnectableMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo
ResolveSocketConnectableMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo
ResolveSocketConnectableMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo
ResolveSocketConnectableMethod "toString" o = SocketConnectableToStringMethodInfo
ResolveSocketConnectableMethod "unref" o = GObject.Object.ObjectUnrefMethodInfo
ResolveSocketConnectableMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo
ResolveSocketConnectableMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo
ResolveSocketConnectableMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo
ResolveSocketConnectableMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo
ResolveSocketConnectableMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo
ResolveSocketConnectableMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo
ResolveSocketConnectableMethod l o = O.MethodResolutionFailed l o
instance (info ~ ResolveSocketConnectableMethod t SocketConnectable, O.MethodInfo info SocketConnectable p) => O.IsLabelProxy t (SocketConnectable -> p) where
fromLabelProxy _ = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)
#if MIN_VERSION_base(4,9,0)
instance (info ~ ResolveSocketConnectableMethod t SocketConnectable, O.MethodInfo info SocketConnectable p) => O.IsLabel t (SocketConnectable -> 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
foreign import ccall "g_socket_connectable_enumerate" g_socket_connectable_enumerate ::
Ptr SocketConnectable ->
IO (Ptr Gio.SocketAddressEnumerator.SocketAddressEnumerator)
socketConnectableEnumerate ::
(B.CallStack.HasCallStack, MonadIO m, IsSocketConnectable a) =>
a
-> m Gio.SocketAddressEnumerator.SocketAddressEnumerator
socketConnectableEnumerate connectable = liftIO $ do
connectable' <- unsafeManagedPtrCastPtr connectable
result <- g_socket_connectable_enumerate connectable'
checkUnexpectedReturnNULL "socketConnectableEnumerate" result
result' <- (wrapObject Gio.SocketAddressEnumerator.SocketAddressEnumerator) result
touchManagedPtr connectable
return result'
#if ENABLE_OVERLOADING
data SocketConnectableEnumerateMethodInfo
instance (signature ~ (m Gio.SocketAddressEnumerator.SocketAddressEnumerator), MonadIO m, IsSocketConnectable a) => O.MethodInfo SocketConnectableEnumerateMethodInfo a signature where
overloadedMethod _ = socketConnectableEnumerate
#endif
foreign import ccall "g_socket_connectable_proxy_enumerate" g_socket_connectable_proxy_enumerate ::
Ptr SocketConnectable ->
IO (Ptr Gio.SocketAddressEnumerator.SocketAddressEnumerator)
socketConnectableProxyEnumerate ::
(B.CallStack.HasCallStack, MonadIO m, IsSocketConnectable a) =>
a
-> m Gio.SocketAddressEnumerator.SocketAddressEnumerator
socketConnectableProxyEnumerate connectable = liftIO $ do
connectable' <- unsafeManagedPtrCastPtr connectable
result <- g_socket_connectable_proxy_enumerate connectable'
checkUnexpectedReturnNULL "socketConnectableProxyEnumerate" result
result' <- (wrapObject Gio.SocketAddressEnumerator.SocketAddressEnumerator) result
touchManagedPtr connectable
return result'
#if ENABLE_OVERLOADING
data SocketConnectableProxyEnumerateMethodInfo
instance (signature ~ (m Gio.SocketAddressEnumerator.SocketAddressEnumerator), MonadIO m, IsSocketConnectable a) => O.MethodInfo SocketConnectableProxyEnumerateMethodInfo a signature where
overloadedMethod _ = socketConnectableProxyEnumerate
#endif
foreign import ccall "g_socket_connectable_to_string" g_socket_connectable_to_string ::
Ptr SocketConnectable ->
IO CString
socketConnectableToString ::
(B.CallStack.HasCallStack, MonadIO m, IsSocketConnectable a) =>
a
-> m T.Text
socketConnectableToString connectable = liftIO $ do
connectable' <- unsafeManagedPtrCastPtr connectable
result <- g_socket_connectable_to_string connectable'
checkUnexpectedReturnNULL "socketConnectableToString" result
result' <- cstringToText result
freeMem result
touchManagedPtr connectable
return result'
#if ENABLE_OVERLOADING
data SocketConnectableToStringMethodInfo
instance (signature ~ (m T.Text), MonadIO m, IsSocketConnectable a) => O.MethodInfo SocketConnectableToStringMethodInfo a signature where
overloadedMethod _ = socketConnectableToString
#endif