module Bindings.Libgit2.Push 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.Common
import Bindings.Libgit2.Types
data C'git_push_options = C'git_push_options{
c'git_push_options'version :: CUInt,
c'git_push_options'pb_parallelism :: CUInt
} deriving (Eq,Show)
p'git_push_options'version p = plusPtr p 0
p'git_push_options'version :: Ptr (C'git_push_options) -> Ptr (CUInt)
p'git_push_options'pb_parallelism p = plusPtr p 4
p'git_push_options'pb_parallelism :: Ptr (C'git_push_options) -> Ptr (CUInt)
instance Storable C'git_push_options where
sizeOf _ = 8
alignment _ = 4
peek p = do
v0 <- peekByteOff p 0
v1 <- peekByteOff p 4
return $ C'git_push_options v0 v1
poke p (C'git_push_options v0 v1) = do
pokeByteOff p 0 v0
pokeByteOff p 4 v1
return ()
foreign import ccall "git_push_new" c'git_push_new
:: Ptr (Ptr C'git_push) -> Ptr C'git_remote -> IO (CInt)
foreign import ccall "&git_push_new" p'git_push_new
:: FunPtr (Ptr (Ptr C'git_push) -> Ptr C'git_remote -> IO (CInt))
foreign import ccall "git_push_set_options" c'git_push_set_options
:: Ptr C'git_push -> Ptr C'git_push_options -> IO (CInt)
foreign import ccall "&git_push_set_options" p'git_push_set_options
:: FunPtr (Ptr C'git_push -> Ptr C'git_push_options -> IO (CInt))
foreign import ccall "git_push_add_refspec" c'git_push_add_refspec
:: Ptr C'git_push -> CString -> IO (CInt)
foreign import ccall "&git_push_add_refspec" p'git_push_add_refspec
:: FunPtr (Ptr C'git_push -> CString -> IO (CInt))
foreign import ccall "git_push_update_tips" c'git_push_update_tips
:: Ptr C'git_push -> IO (CInt)
foreign import ccall "&git_push_update_tips" p'git_push_update_tips
:: FunPtr (Ptr C'git_push -> IO (CInt))
foreign import ccall "git_push_finish" c'git_push_finish
:: Ptr C'git_push -> IO (CInt)
foreign import ccall "&git_push_finish" p'git_push_finish
:: FunPtr (Ptr C'git_push -> IO (CInt))
foreign import ccall "git_push_unpack_ok" c'git_push_unpack_ok
:: Ptr C'git_push -> IO (CInt)
foreign import ccall "&git_push_unpack_ok" p'git_push_unpack_ok
:: FunPtr (Ptr C'git_push -> IO (CInt))
foreign import ccall "git_push_status_foreach" c'git_push_status_foreach
:: Ptr C'git_push -> FunPtr (CString -> CString -> Ptr () -> CInt) -> Ptr () -> IO (CInt)
foreign import ccall "&git_push_status_foreach" p'git_push_status_foreach
:: FunPtr (Ptr C'git_push -> FunPtr (CString -> CString -> Ptr () -> CInt) -> Ptr () -> IO (CInt))
foreign import ccall "git_push_free" c'git_push_free
:: Ptr C'git_push -> IO ()
foreign import ccall "&git_push_free" p'git_push_free
:: FunPtr (Ptr C'git_push -> IO ())