gi-gio-0.2.44.12: GI/Gio/Interfaces/SocketConnectable.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.Interfaces.SocketConnectable
(
-- * Exported types
SocketConnectable(..) ,
noSocketConnectable ,
SocketConnectableK ,
toSocketConnectable ,
-- * Methods
-- ** socketConnectableEnumerate
socketConnectableEnumerate ,
-- ** socketConnectableProxyEnumerate
socketConnectableProxyEnumerate ,
) 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
-- interface SocketConnectable
newtype SocketConnectable = SocketConnectable (ForeignPtr SocketConnectable)
noSocketConnectable :: Maybe SocketConnectable
noSocketConnectable = Nothing
type instance AttributeList SocketConnectable = SocketConnectableAttributeList
type SocketConnectableAttributeList = ('[ ] :: [(Symbol, *)])
type instance SignalList SocketConnectable = SocketConnectableSignalList
type SocketConnectableSignalList = ('[ '("notify", GObject.ObjectNotifySignalInfo), '("notify::[property]", GObjectNotifySignalInfo)] :: [(Symbol, *)])
foreign import ccall "g_socket_connectable_get_type"
c_g_socket_connectable_get_type :: IO GType
type instance ParentTypes SocketConnectable = SocketConnectableParentTypes
type SocketConnectableParentTypes = '[GObject.Object]
instance GObject SocketConnectable where
gobjectIsInitiallyUnowned _ = False
gobjectType _ = c_g_socket_connectable_get_type
class GObject o => SocketConnectableK o
instance (GObject o, IsDescendantOf SocketConnectable o) => SocketConnectableK o
toSocketConnectable :: SocketConnectableK o => o -> IO SocketConnectable
toSocketConnectable = unsafeCastTo SocketConnectable
-- method SocketConnectable::enumerate
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gio" "SocketConnectable", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gio" "SocketConnectable", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gio" "SocketAddressEnumerator"
-- throws : False
-- Skip return : False
foreign import ccall "g_socket_connectable_enumerate" g_socket_connectable_enumerate ::
Ptr SocketConnectable -> -- _obj : TInterface "Gio" "SocketConnectable"
IO (Ptr SocketAddressEnumerator)
socketConnectableEnumerate ::
(MonadIO m, SocketConnectableK a) =>
a -> -- _obj
m SocketAddressEnumerator
socketConnectableEnumerate _obj = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
result <- g_socket_connectable_enumerate _obj'
checkUnexpectedReturnNULL "g_socket_connectable_enumerate" result
result' <- (wrapObject SocketAddressEnumerator) result
touchManagedPtr _obj
return result'
-- method SocketConnectable::proxy_enumerate
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gio" "SocketConnectable", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gio" "SocketConnectable", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gio" "SocketAddressEnumerator"
-- throws : False
-- Skip return : False
foreign import ccall "g_socket_connectable_proxy_enumerate" g_socket_connectable_proxy_enumerate ::
Ptr SocketConnectable -> -- _obj : TInterface "Gio" "SocketConnectable"
IO (Ptr SocketAddressEnumerator)
socketConnectableProxyEnumerate ::
(MonadIO m, SocketConnectableK a) =>
a -> -- _obj
m SocketAddressEnumerator
socketConnectableProxyEnumerate _obj = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
result <- g_socket_connectable_proxy_enumerate _obj'
checkUnexpectedReturnNULL "g_socket_connectable_proxy_enumerate" result
result' <- (wrapObject SocketAddressEnumerator) result
touchManagedPtr _obj
return result'