{-# LINE 1 "Bindings/Libgit2/Push.hsc" #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# LINE 2 "Bindings/Libgit2/Push.hsc" #-}

{-# LINE 3 "Bindings/Libgit2/Push.hsc" #-}

{-# LINE 4 "Bindings/Libgit2/Push.hsc" #-}

{-# LINE 5 "Bindings/Libgit2/Push.hsc" #-}
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

{-# LINE 8 "Bindings/Libgit2/Push.hsc" #-}

import Bindings.Libgit2.Common
import Bindings.Libgit2.Types
{- typedef struct {
            unsigned int version; unsigned int pb_parallelism;
        } git_push_options; -}

{-# LINE 15 "Bindings/Libgit2/Push.hsc" #-}

{-# LINE 16 "Bindings/Libgit2/Push.hsc" #-}

{-# LINE 17 "Bindings/Libgit2/Push.hsc" #-}
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 ()

{-# LINE 18 "Bindings/Libgit2/Push.hsc" #-}
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))

{-# LINE 19 "Bindings/Libgit2/Push.hsc" #-}
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))

{-# LINE 20 "Bindings/Libgit2/Push.hsc" #-}
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))

{-# LINE 21 "Bindings/Libgit2/Push.hsc" #-}
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))

{-# LINE 22 "Bindings/Libgit2/Push.hsc" #-}
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))

{-# LINE 23 "Bindings/Libgit2/Push.hsc" #-}
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))

{-# LINE 24 "Bindings/Libgit2/Push.hsc" #-}
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))

{-# LINE 25 "Bindings/Libgit2/Push.hsc" #-}
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 ())

{-# LINE 26 "Bindings/Libgit2/Push.hsc" #-}