module Bindings.Libgit2.Transport where
import Foreign.Ptr
import Foreign.Ptr (Ptr,FunPtr,plusPtr)
import Foreign.Ptr (wordPtrToPtr,castPtrToFunPtr)
import Foreign.Storable
import Foreign.C.Types
import Foreign.C.String (CString,CStringLen,CWString,CWStringLen)
import Foreign.Marshal.Alloc (alloca)
import Foreign.Marshal.Array (peekArray,pokeArray)
import Data.Int
import Data.Word
import Bindings.Libgit2.Indexer
import Bindings.Libgit2.Net
import Bindings.Libgit2.Types
type C'git_credtype_t = CUInt
c'GIT_CREDTYPE_USERPASS_PLAINTEXT = 1
c'GIT_CREDTYPE_USERPASS_PLAINTEXT :: (Num a) => a
type C'git_cred_free_callback = FunPtr (Ptr C'git_cred -> IO ())
foreign import ccall "wrapper" mk'git_cred_free_callback
:: (Ptr C'git_cred -> IO ()) -> IO C'git_cred_free_callback
foreign import ccall "dynamic" mK'git_cred_free_callback
:: C'git_cred_free_callback -> (Ptr C'git_cred -> IO ())
data C'git_cred = C'git_cred{
c'git_cred'credtype :: C'git_credtype_t,
c'git_cred'free :: C'git_cred_free_callback
} deriving (Eq,Show)
p'git_cred'credtype p = plusPtr p 0
p'git_cred'credtype :: Ptr (C'git_cred) -> Ptr (C'git_credtype_t)
p'git_cred'free p = plusPtr p 8
p'git_cred'free :: Ptr (C'git_cred) -> Ptr (C'git_cred_free_callback)
instance Storable C'git_cred where
sizeOf _ = 16
alignment _ = 8
peek p = do
v0 <- peekByteOff p 0
v1 <- peekByteOff p 8
return $ C'git_cred v0 v1
poke p (C'git_cred v0 v1) = do
pokeByteOff p 0 v0
pokeByteOff p 8 v1
return ()
data C'git_cred_userpass_plaintext = C'git_cred_userpass_plaintext{
c'git_cred_userpass_plaintext'parent :: C'git_cred,
c'git_cred_userpass_plaintext'username :: CString,
c'git_cred_userpass_plaintext'password :: CString
} deriving (Eq,Show)
p'git_cred_userpass_plaintext'parent p = plusPtr p 0
p'git_cred_userpass_plaintext'parent :: Ptr (C'git_cred_userpass_plaintext) -> Ptr (C'git_cred)
p'git_cred_userpass_plaintext'username p = plusPtr p 16
p'git_cred_userpass_plaintext'username :: Ptr (C'git_cred_userpass_plaintext) -> Ptr (CString)
p'git_cred_userpass_plaintext'password p = plusPtr p 24
p'git_cred_userpass_plaintext'password :: Ptr (C'git_cred_userpass_plaintext) -> Ptr (CString)
instance Storable C'git_cred_userpass_plaintext where
sizeOf _ = 32
alignment _ = 8
peek p = do
v0 <- peekByteOff p 0
v1 <- peekByteOff p 16
v2 <- peekByteOff p 24
return $ C'git_cred_userpass_plaintext v0 v1 v2
poke p (C'git_cred_userpass_plaintext v0 v1 v2) = do
pokeByteOff p 0 v0
pokeByteOff p 16 v1
pokeByteOff p 24 v2
return ()
foreign import ccall "git_cred_userpass_plaintext_new" c'git_cred_userpass_plaintext_new
:: Ptr (Ptr C'git_cred) -> CString -> CString -> IO (CInt)
foreign import ccall "&git_cred_userpass_plaintext_new" p'git_cred_userpass_plaintext_new
:: FunPtr (Ptr (Ptr C'git_cred) -> CString -> CString -> IO (CInt))
type C'git_cred_acquire_cb = FunPtr (Ptr (Ptr (C'git_cred)) -> CString -> CString -> CUInt -> Ptr () -> IO CInt)
foreign import ccall "wrapper" mk'git_cred_acquire_cb
:: (Ptr (Ptr (C'git_cred)) -> CString -> CString -> CUInt -> Ptr () -> IO CInt) -> IO C'git_cred_acquire_cb
foreign import ccall "dynamic" mK'git_cred_acquire_cb
:: C'git_cred_acquire_cb -> (Ptr (Ptr (C'git_cred)) -> CString -> CString -> CUInt -> Ptr () -> IO CInt)
type C'git_transport_flags_t = CUInt
c'GIT_TRANSPORTFLAGS_NONE = 0
c'GIT_TRANSPORTFLAGS_NONE :: (Num a) => a
c'GIT_TRANSPORTFLAGS_NO_CHECK_CERT = 1
c'GIT_TRANSPORTFLAGS_NO_CHECK_CERT :: (Num a) => a
type C'git_transport_message_cb = FunPtr (CString -> CInt -> Ptr () -> IO ())
foreign import ccall "wrapper" mk'git_transport_message_cb
:: (CString -> CInt -> Ptr () -> IO ()) -> IO C'git_transport_message_cb
foreign import ccall "dynamic" mK'git_transport_message_cb
:: C'git_transport_message_cb -> (CString -> CInt -> Ptr () -> IO ())
type C'git_transport_set_callbacks_callback = FunPtr (Ptr C'git_transport -> C'git_transport_message_cb -> C'git_transport_message_cb -> Ptr () -> IO CInt)
foreign import ccall "wrapper" mk'git_transport_set_callbacks_callback
:: (Ptr C'git_transport -> C'git_transport_message_cb -> C'git_transport_message_cb -> Ptr () -> IO CInt) -> IO C'git_transport_set_callbacks_callback
foreign import ccall "dynamic" mK'git_transport_set_callbacks_callback
:: C'git_transport_set_callbacks_callback -> (Ptr C'git_transport -> C'git_transport_message_cb -> C'git_transport_message_cb -> Ptr () -> IO CInt)
type C'git_transport_connect_callback = FunPtr (Ptr C'git_transport -> CString -> C'git_cred_acquire_cb -> Ptr () -> CInt -> CInt -> IO CInt)
foreign import ccall "wrapper" mk'git_transport_connect_callback
:: (Ptr C'git_transport -> CString -> C'git_cred_acquire_cb -> Ptr () -> CInt -> CInt -> IO CInt) -> IO C'git_transport_connect_callback
foreign import ccall "dynamic" mK'git_transport_connect_callback
:: C'git_transport_connect_callback -> (Ptr C'git_transport -> CString -> C'git_cred_acquire_cb -> Ptr () -> CInt -> CInt -> IO CInt)
type C'git_transport_ls_callback = FunPtr (Ptr C'git_transport -> C'git_headlist_cb -> Ptr () -> IO CInt)
foreign import ccall "wrapper" mk'git_transport_ls_callback
:: (Ptr C'git_transport -> C'git_headlist_cb -> Ptr () -> IO CInt) -> IO C'git_transport_ls_callback
foreign import ccall "dynamic" mK'git_transport_ls_callback
:: C'git_transport_ls_callback -> (Ptr C'git_transport -> C'git_headlist_cb -> Ptr () -> IO CInt)
type C'git_transport_push_callback = FunPtr (Ptr C'git_transport -> Ptr C'git_push -> IO CInt)
foreign import ccall "wrapper" mk'git_transport_push_callback
:: (Ptr C'git_transport -> Ptr C'git_push -> IO CInt) -> IO C'git_transport_push_callback
foreign import ccall "dynamic" mK'git_transport_push_callback
:: C'git_transport_push_callback -> (Ptr C'git_transport -> Ptr C'git_push -> IO CInt)
type C'git_transport_negotiate_fetch_callback = FunPtr (Ptr C'git_transport -> Ptr C'git_repository -> Ptr (Ptr C'git_remote_head) -> CSize -> IO CInt)
foreign import ccall "wrapper" mk'git_transport_negotiate_fetch_callback
:: (Ptr C'git_transport -> Ptr C'git_repository -> Ptr (Ptr C'git_remote_head) -> CSize -> IO CInt) -> IO C'git_transport_negotiate_fetch_callback
foreign import ccall "dynamic" mK'git_transport_negotiate_fetch_callback
:: C'git_transport_negotiate_fetch_callback -> (Ptr C'git_transport -> Ptr C'git_repository -> Ptr (Ptr C'git_remote_head) -> CSize -> IO CInt)
type C'git_transport_download_pack_callback = FunPtr (Ptr C'git_transport -> Ptr C'git_repository -> Ptr C'git_transfer_progress -> C'git_transfer_progress_callback -> Ptr () -> IO CInt)
foreign import ccall "wrapper" mk'git_transport_download_pack_callback
:: (Ptr C'git_transport -> Ptr C'git_repository -> Ptr C'git_transfer_progress -> C'git_transfer_progress_callback -> Ptr () -> IO CInt) -> IO C'git_transport_download_pack_callback
foreign import ccall "dynamic" mK'git_transport_download_pack_callback
:: C'git_transport_download_pack_callback -> (Ptr C'git_transport -> Ptr C'git_repository -> Ptr C'git_transfer_progress -> C'git_transfer_progress_callback -> Ptr () -> IO CInt)
type C'git_transport_is_connected_callback = FunPtr (Ptr C'git_transport -> IO CInt)
foreign import ccall "wrapper" mk'git_transport_is_connected_callback
:: (Ptr C'git_transport -> IO CInt) -> IO C'git_transport_is_connected_callback
foreign import ccall "dynamic" mK'git_transport_is_connected_callback
:: C'git_transport_is_connected_callback -> (Ptr C'git_transport -> IO CInt)
type C'git_transport_read_flags_callback = FunPtr (Ptr C'git_transport -> Ptr CInt -> IO CInt)
foreign import ccall "wrapper" mk'git_transport_read_flags_callback
:: (Ptr C'git_transport -> Ptr CInt -> IO CInt) -> IO C'git_transport_read_flags_callback
foreign import ccall "dynamic" mK'git_transport_read_flags_callback
:: C'git_transport_read_flags_callback -> (Ptr C'git_transport -> Ptr CInt -> IO CInt)
type C'git_transport_cancel_callback = FunPtr (Ptr C'git_transport -> IO ())
foreign import ccall "wrapper" mk'git_transport_cancel_callback
:: (Ptr C'git_transport -> IO ()) -> IO C'git_transport_cancel_callback
foreign import ccall "dynamic" mK'git_transport_cancel_callback
:: C'git_transport_cancel_callback -> (Ptr C'git_transport -> IO ())
type C'git_transport_close_callback = FunPtr (Ptr C'git_transport -> IO CInt)
foreign import ccall "wrapper" mk'git_transport_close_callback
:: (Ptr C'git_transport -> IO CInt) -> IO C'git_transport_close_callback
foreign import ccall "dynamic" mK'git_transport_close_callback
:: C'git_transport_close_callback -> (Ptr C'git_transport -> IO CInt)
type C'git_transport_free_callback = FunPtr (Ptr C'git_transport -> IO ())
foreign import ccall "wrapper" mk'git_transport_free_callback
:: (Ptr C'git_transport -> IO ()) -> IO C'git_transport_free_callback
foreign import ccall "dynamic" mK'git_transport_free_callback
:: C'git_transport_free_callback -> (Ptr C'git_transport -> IO ())
data C'git_transport = C'git_transport{
c'git_transport'version :: CUInt,
c'git_transport'set_callbacks :: C'git_transport_set_callbacks_callback,
c'git_transport'connect :: C'git_transport_connect_callback,
c'git_transport'ls :: C'git_transport_ls_callback,
c'git_transport'push :: C'git_transport_push_callback,
c'git_transport'negotiate_fetch :: C'git_transport_negotiate_fetch_callback,
c'git_transport'download_pack :: C'git_transport_download_pack_callback,
c'git_transport'is_connected :: C'git_transport_is_connected_callback,
c'git_transport'read_flags :: C'git_transport_read_flags_callback,
c'git_transport'cancel :: C'git_transport_cancel_callback,
c'git_transport'close :: C'git_transport_close_callback,
c'git_transport'free :: C'git_transport_free_callback
} deriving (Eq,Show)
p'git_transport'version p = plusPtr p 0
p'git_transport'version :: Ptr (C'git_transport) -> Ptr (CUInt)
p'git_transport'set_callbacks p = plusPtr p 8
p'git_transport'set_callbacks :: Ptr (C'git_transport) -> Ptr (C'git_transport_set_callbacks_callback)
p'git_transport'connect p = plusPtr p 16
p'git_transport'connect :: Ptr (C'git_transport) -> Ptr (C'git_transport_connect_callback)
p'git_transport'ls p = plusPtr p 24
p'git_transport'ls :: Ptr (C'git_transport) -> Ptr (C'git_transport_ls_callback)
p'git_transport'push p = plusPtr p 32
p'git_transport'push :: Ptr (C'git_transport) -> Ptr (C'git_transport_push_callback)
p'git_transport'negotiate_fetch p = plusPtr p 40
p'git_transport'negotiate_fetch :: Ptr (C'git_transport) -> Ptr (C'git_transport_negotiate_fetch_callback)
p'git_transport'download_pack p = plusPtr p 48
p'git_transport'download_pack :: Ptr (C'git_transport) -> Ptr (C'git_transport_download_pack_callback)
p'git_transport'is_connected p = plusPtr p 56
p'git_transport'is_connected :: Ptr (C'git_transport) -> Ptr (C'git_transport_is_connected_callback)
p'git_transport'read_flags p = plusPtr p 64
p'git_transport'read_flags :: Ptr (C'git_transport) -> Ptr (C'git_transport_read_flags_callback)
p'git_transport'cancel p = plusPtr p 72
p'git_transport'cancel :: Ptr (C'git_transport) -> Ptr (C'git_transport_cancel_callback)
p'git_transport'close p = plusPtr p 80
p'git_transport'close :: Ptr (C'git_transport) -> Ptr (C'git_transport_close_callback)
p'git_transport'free p = plusPtr p 88
p'git_transport'free :: Ptr (C'git_transport) -> Ptr (C'git_transport_free_callback)
instance Storable C'git_transport where
sizeOf _ = 96
alignment _ = 8
peek p = do
v0 <- peekByteOff p 0
v1 <- peekByteOff p 8
v2 <- peekByteOff p 16
v3 <- peekByteOff p 24
v4 <- peekByteOff p 32
v5 <- peekByteOff p 40
v6 <- peekByteOff p 48
v7 <- peekByteOff p 56
v8 <- peekByteOff p 64
v9 <- peekByteOff p 72
v10 <- peekByteOff p 80
v11 <- peekByteOff p 88
return $ C'git_transport v0 v1 v2 v3 v4 v5 v6 v7 v8 v9 v10 v11
poke p (C'git_transport v0 v1 v2 v3 v4 v5 v6 v7 v8 v9 v10 v11) = do
pokeByteOff p 0 v0
pokeByteOff p 8 v1
pokeByteOff p 16 v2
pokeByteOff p 24 v3
pokeByteOff p 32 v4
pokeByteOff p 40 v5
pokeByteOff p 48 v6
pokeByteOff p 56 v7
pokeByteOff p 64 v8
pokeByteOff p 72 v9
pokeByteOff p 80 v10
pokeByteOff p 88 v11
return ()
foreign import ccall "git_transport_new" c'git_transport_new
:: Ptr (Ptr C'git_transport) -> Ptr C'git_remote -> CString -> IO (CInt)
foreign import ccall "&git_transport_new" p'git_transport_new
:: FunPtr (Ptr (Ptr C'git_transport) -> Ptr C'git_remote -> CString -> IO (CInt))
type C'git_transport_cb = FunPtr (Ptr (Ptr (C'git_transport)) -> Ptr (C'git_remote) -> Ptr () -> IO CInt)
foreign import ccall "wrapper" mk'git_transport_cb
:: (Ptr (Ptr (C'git_transport)) -> Ptr (C'git_remote) -> Ptr () -> IO CInt) -> IO C'git_transport_cb
foreign import ccall "dynamic" mK'git_transport_cb
:: C'git_transport_cb -> (Ptr (Ptr (C'git_transport)) -> Ptr (C'git_remote) -> Ptr () -> IO CInt)
foreign import ccall "git_transport_dummy" c'git_transport_dummy
:: Ptr (Ptr C'git_transport) -> Ptr C'git_remote -> Ptr () -> IO (CInt)
foreign import ccall "&git_transport_dummy" p'git_transport_dummy
:: FunPtr (Ptr (Ptr C'git_transport) -> Ptr C'git_remote -> Ptr () -> IO (CInt))
foreign import ccall "git_transport_local" c'git_transport_local
:: Ptr (Ptr C'git_transport) -> Ptr C'git_remote -> Ptr () -> IO (CInt)
foreign import ccall "&git_transport_local" p'git_transport_local
:: FunPtr (Ptr (Ptr C'git_transport) -> Ptr C'git_remote -> Ptr () -> IO (CInt))
foreign import ccall "git_transport_smart" c'git_transport_smart
:: Ptr (Ptr C'git_transport) -> Ptr C'git_remote -> Ptr () -> IO (CInt)
foreign import ccall "&git_transport_smart" p'git_transport_smart
:: FunPtr (Ptr (Ptr C'git_transport) -> Ptr C'git_remote -> Ptr () -> IO (CInt))
type C'git_smart_service_t = CUInt
c'GIT_SERVICE_UPLOADPACK_LS = 1
c'GIT_SERVICE_UPLOADPACK_LS :: (Num a) => a
c'GIT_SERVICE_UPLOADPACK = 2
c'GIT_SERVICE_UPLOADPACK :: (Num a) => a
c'GIT_SERVICE_RECEIVEPACK_LS = 3
c'GIT_SERVICE_RECEIVEPACK_LS :: (Num a) => a
c'GIT_SERVICE_RECEIVEPACK = 4
c'GIT_SERVICE_RECEIVEPACK :: (Num a) => a
type C'git_smart_subtransport_stream_read_callback = FunPtr (Ptr C'git_smart_subtransport_stream -> CString -> CSize -> Ptr CSize -> IO CInt)
foreign import ccall "wrapper" mk'git_smart_subtransport_stream_read_callback
:: (Ptr C'git_smart_subtransport_stream -> CString -> CSize -> Ptr CSize -> IO CInt) -> IO C'git_smart_subtransport_stream_read_callback
foreign import ccall "dynamic" mK'git_smart_subtransport_stream_read_callback
:: C'git_smart_subtransport_stream_read_callback -> (Ptr C'git_smart_subtransport_stream -> CString -> CSize -> Ptr CSize -> IO CInt)
type C'git_smart_subtransport_stream_write_callback = FunPtr (Ptr C'git_smart_subtransport_stream -> CString -> CSize -> IO CInt)
foreign import ccall "wrapper" mk'git_smart_subtransport_stream_write_callback
:: (Ptr C'git_smart_subtransport_stream -> CString -> CSize -> IO CInt) -> IO C'git_smart_subtransport_stream_write_callback
foreign import ccall "dynamic" mK'git_smart_subtransport_stream_write_callback
:: C'git_smart_subtransport_stream_write_callback -> (Ptr C'git_smart_subtransport_stream -> CString -> CSize -> IO CInt)
type C'git_smart_subtransport_stream_free_callback = FunPtr (Ptr C'git_smart_subtransport_stream -> IO ())
foreign import ccall "wrapper" mk'git_smart_subtransport_stream_free_callback
:: (Ptr C'git_smart_subtransport_stream -> IO ()) -> IO C'git_smart_subtransport_stream_free_callback
foreign import ccall "dynamic" mK'git_smart_subtransport_stream_free_callback
:: C'git_smart_subtransport_stream_free_callback -> (Ptr C'git_smart_subtransport_stream -> IO ())
data C'git_smart_subtransport_stream = C'git_smart_subtransport_stream{
c'git_smart_subtransport_stream'subtransport :: Ptr C'git_smart_subtransport,
c'git_smart_subtransport_stream'read :: C'git_smart_subtransport_stream_read_callback,
c'git_smart_subtransport_stream'write :: C'git_smart_subtransport_stream_write_callback,
c'git_smart_subtransport_stream'free :: C'git_smart_subtransport_stream_free_callback
} deriving (Eq,Show)
p'git_smart_subtransport_stream'subtransport p = plusPtr p 0
p'git_smart_subtransport_stream'subtransport :: Ptr (C'git_smart_subtransport_stream) -> Ptr (Ptr C'git_smart_subtransport)
p'git_smart_subtransport_stream'read p = plusPtr p 8
p'git_smart_subtransport_stream'read :: Ptr (C'git_smart_subtransport_stream) -> Ptr (C'git_smart_subtransport_stream_read_callback)
p'git_smart_subtransport_stream'write p = plusPtr p 16
p'git_smart_subtransport_stream'write :: Ptr (C'git_smart_subtransport_stream) -> Ptr (C'git_smart_subtransport_stream_write_callback)
p'git_smart_subtransport_stream'free p = plusPtr p 24
p'git_smart_subtransport_stream'free :: Ptr (C'git_smart_subtransport_stream) -> Ptr (C'git_smart_subtransport_stream_free_callback)
instance Storable C'git_smart_subtransport_stream where
sizeOf _ = 32
alignment _ = 8
peek p = do
v0 <- peekByteOff p 0
v1 <- peekByteOff p 8
v2 <- peekByteOff p 16
v3 <- peekByteOff p 24
return $ C'git_smart_subtransport_stream v0 v1 v2 v3
poke p (C'git_smart_subtransport_stream v0 v1 v2 v3) = do
pokeByteOff p 0 v0
pokeByteOff p 8 v1
pokeByteOff p 16 v2
pokeByteOff p 24 v3
return ()
type C'git_smart_subtransport_action_callback = FunPtr (Ptr (Ptr C'git_smart_subtransport_stream) -> Ptr C'git_smart_subtransport -> CString -> C'git_smart_service_t -> IO CInt)
foreign import ccall "wrapper" mk'git_smart_subtransport_action_callback
:: (Ptr (Ptr C'git_smart_subtransport_stream) -> Ptr C'git_smart_subtransport -> CString -> C'git_smart_service_t -> IO CInt) -> IO C'git_smart_subtransport_action_callback
foreign import ccall "dynamic" mK'git_smart_subtransport_action_callback
:: C'git_smart_subtransport_action_callback -> (Ptr (Ptr C'git_smart_subtransport_stream) -> Ptr C'git_smart_subtransport -> CString -> C'git_smart_service_t -> IO CInt)
type C'git_smart_subtransport_close_callback = FunPtr (Ptr C'git_smart_subtransport -> IO CInt)
foreign import ccall "wrapper" mk'git_smart_subtransport_close_callback
:: (Ptr C'git_smart_subtransport -> IO CInt) -> IO C'git_smart_subtransport_close_callback
foreign import ccall "dynamic" mK'git_smart_subtransport_close_callback
:: C'git_smart_subtransport_close_callback -> (Ptr C'git_smart_subtransport -> IO CInt)
type C'git_smart_subtransport_free_callback = FunPtr (Ptr C'git_smart_subtransport -> IO ())
foreign import ccall "wrapper" mk'git_smart_subtransport_free_callback
:: (Ptr C'git_smart_subtransport -> IO ()) -> IO C'git_smart_subtransport_free_callback
foreign import ccall "dynamic" mK'git_smart_subtransport_free_callback
:: C'git_smart_subtransport_free_callback -> (Ptr C'git_smart_subtransport -> IO ())
data C'git_smart_subtransport = C'git_smart_subtransport{
c'git_smart_subtransport'action :: C'git_smart_subtransport_action_callback,
c'git_smart_subtransport'close :: C'git_smart_subtransport_close_callback,
c'git_smart_subtransport'free :: C'git_smart_subtransport_free_callback
} deriving (Eq,Show)
p'git_smart_subtransport'action p = plusPtr p 0
p'git_smart_subtransport'action :: Ptr (C'git_smart_subtransport) -> Ptr (C'git_smart_subtransport_action_callback)
p'git_smart_subtransport'close p = plusPtr p 8
p'git_smart_subtransport'close :: Ptr (C'git_smart_subtransport) -> Ptr (C'git_smart_subtransport_close_callback)
p'git_smart_subtransport'free p = plusPtr p 16
p'git_smart_subtransport'free :: Ptr (C'git_smart_subtransport) -> Ptr (C'git_smart_subtransport_free_callback)
instance Storable C'git_smart_subtransport where
sizeOf _ = 24
alignment _ = 8
peek p = do
v0 <- peekByteOff p 0
v1 <- peekByteOff p 8
v2 <- peekByteOff p 16
return $ C'git_smart_subtransport v0 v1 v2
poke p (C'git_smart_subtransport v0 v1 v2) = do
pokeByteOff p 0 v0
pokeByteOff p 8 v1
pokeByteOff p 16 v2
return ()
type C'git_smart_subtransport_cb = FunPtr (Ptr (Ptr (C'git_smart_subtransport)) -> Ptr (C'git_transport) -> IO CInt)
foreign import ccall "wrapper" mk'git_smart_subtransport_cb
:: (Ptr (Ptr (C'git_smart_subtransport)) -> Ptr (C'git_transport) -> IO CInt) -> IO C'git_smart_subtransport_cb
foreign import ccall "dynamic" mK'git_smart_subtransport_cb
:: C'git_smart_subtransport_cb -> (Ptr (Ptr (C'git_smart_subtransport)) -> Ptr (C'git_transport) -> IO CInt)
data C'git_smart_subtransport_definition = C'git_smart_subtransport_definition{
c'git_smart_subtransport_definition'callback :: C'git_smart_subtransport_cb,
c'git_smart_subtransport_definition'rpc :: CUInt
} deriving (Eq,Show)
p'git_smart_subtransport_definition'callback p = plusPtr p 0
p'git_smart_subtransport_definition'callback :: Ptr (C'git_smart_subtransport_definition) -> Ptr (C'git_smart_subtransport_cb)
p'git_smart_subtransport_definition'rpc p = plusPtr p 8
p'git_smart_subtransport_definition'rpc :: Ptr (C'git_smart_subtransport_definition) -> Ptr (CUInt)
instance Storable C'git_smart_subtransport_definition where
sizeOf _ = 16
alignment _ = 8
peek p = do
v0 <- peekByteOff p 0
v1 <- peekByteOff p 8
return $ C'git_smart_subtransport_definition v0 v1
poke p (C'git_smart_subtransport_definition v0 v1) = do
pokeByteOff p 0 v0
pokeByteOff p 8 v1
return ()
foreign import ccall "git_smart_subtransport_http" c'git_smart_subtransport_http
:: Ptr (Ptr C'git_smart_subtransport) -> Ptr C'git_transport -> IO (CInt)
foreign import ccall "&git_smart_subtransport_http" p'git_smart_subtransport_http
:: FunPtr (Ptr (Ptr C'git_smart_subtransport) -> Ptr C'git_transport -> IO (CInt))
foreign import ccall "git_smart_subtransport_git" c'git_smart_subtransport_git
:: Ptr (Ptr C'git_smart_subtransport) -> Ptr C'git_transport -> IO (CInt)
foreign import ccall "&git_smart_subtransport_git" p'git_smart_subtransport_git
:: FunPtr (Ptr (Ptr C'git_smart_subtransport) -> Ptr C'git_transport -> IO (CInt))