{-# LINE 1 "Bindings/Libgit2/Status.hsc" #-}

{-# LINE 2 "Bindings/Libgit2/Status.hsc" #-}

{-# LINE 3 "Bindings/Libgit2/Status.hsc" #-}
module Bindings.Libgit2.Status where
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 5 "Bindings/Libgit2/Status.hsc" #-}

import Bindings.Libgit2.Common
import Bindings.Libgit2.Types
{- enum {
    GIT_STATUS_CURRENT = 0,
    GIT_STATUS_INDEX_NEW = 1 << 0,
    GIT_STATUS_INDEX_MODIFIED = 1 << 1,
    GIT_STATUS_INDEX_DELETED = 1 << 2,
    GIT_STATUS_WT_NEW = 1 << 3,
    GIT_STATUS_WT_MODIFIED = 1 << 4,
    GIT_STATUS_WT_DELETED = 1 << 5,
    GIT_STATUS_IGNORED = 1 << 6
}; -}
c'GIT_STATUS_CURRENT = 0
c'GIT_STATUS_CURRENT :: (Num a) => a

{-# LINE 19 "Bindings/Libgit2/Status.hsc" #-}
c'GIT_STATUS_INDEX_NEW = 1
c'GIT_STATUS_INDEX_NEW :: (Num a) => a

{-# LINE 20 "Bindings/Libgit2/Status.hsc" #-}
c'GIT_STATUS_INDEX_MODIFIED = 2
c'GIT_STATUS_INDEX_MODIFIED :: (Num a) => a

{-# LINE 21 "Bindings/Libgit2/Status.hsc" #-}
c'GIT_STATUS_INDEX_DELETED = 4
c'GIT_STATUS_INDEX_DELETED :: (Num a) => a

{-# LINE 22 "Bindings/Libgit2/Status.hsc" #-}
c'GIT_STATUS_WT_NEW = 8
c'GIT_STATUS_WT_NEW :: (Num a) => a

{-# LINE 23 "Bindings/Libgit2/Status.hsc" #-}
c'GIT_STATUS_WT_MODIFIED = 16
c'GIT_STATUS_WT_MODIFIED :: (Num a) => a

{-# LINE 24 "Bindings/Libgit2/Status.hsc" #-}
c'GIT_STATUS_WT_DELETED = 32
c'GIT_STATUS_WT_DELETED :: (Num a) => a

{-# LINE 25 "Bindings/Libgit2/Status.hsc" #-}
c'GIT_STATUS_IGNORED = 64
c'GIT_STATUS_IGNORED :: (Num a) => a

{-# LINE 26 "Bindings/Libgit2/Status.hsc" #-}
type C'git_status_foreach_callback = FunPtr (CString -> CUInt -> Ptr () -> IO CInt)
foreign import ccall "wrapper" mk'git_status_foreach_callback
  :: (CString -> CUInt -> Ptr () -> IO CInt) -> IO C'git_status_foreach_callback
foreign import ccall "dynamic" mK'git_status_foreach_callback
  :: C'git_status_foreach_callback -> (CString -> CUInt -> Ptr () -> IO CInt)

{-# LINE 27 "Bindings/Libgit2/Status.hsc" #-}
foreign import ccall "git_status_foreach" c'git_status_foreach
  :: Ptr C'git_repository -> C'git_status_foreach_callback -> Ptr () -> IO (CInt)
foreign import ccall "&git_status_foreach" p'git_status_foreach
  :: FunPtr (Ptr C'git_repository -> C'git_status_foreach_callback -> Ptr () -> IO (CInt))

{-# LINE 28 "Bindings/Libgit2/Status.hsc" #-}
{- typedef enum {
            GIT_STATUS_SHOW_INDEX_AND_WORKDIR = 0,
            GIT_STATUS_SHOW_INDEX_ONLY = 1,
            GIT_STATUS_SHOW_WORKDIR_ONLY = 2,
            GIT_STATUS_SHOW_INDEX_THEN_WORKDIR = 3
        } git_status_show_t; -}
type C'git_status_show_t = CUInt

{-# LINE 35 "Bindings/Libgit2/Status.hsc" #-}
c'GIT_STATUS_SHOW_INDEX_AND_WORKDIR = 0
c'GIT_STATUS_SHOW_INDEX_AND_WORKDIR :: (Num a) => a

{-# LINE 36 "Bindings/Libgit2/Status.hsc" #-}
c'GIT_STATUS_SHOW_INDEX_ONLY = 1
c'GIT_STATUS_SHOW_INDEX_ONLY :: (Num a) => a

{-# LINE 37 "Bindings/Libgit2/Status.hsc" #-}
c'GIT_STATUS_SHOW_WORKDIR_ONLY = 2
c'GIT_STATUS_SHOW_WORKDIR_ONLY :: (Num a) => a

{-# LINE 38 "Bindings/Libgit2/Status.hsc" #-}
c'GIT_STATUS_SHOW_INDEX_THEN_WORKDIR = 3
c'GIT_STATUS_SHOW_INDEX_THEN_WORKDIR :: (Num a) => a

{-# LINE 39 "Bindings/Libgit2/Status.hsc" #-}
{- enum {
    GIT_STATUS_OPT_INCLUDE_UNTRACKED = 1 << 0,
    GIT_STATUS_OPT_INCLUDE_IGNORED = 1 << 1,
    GIT_STATUS_OPT_INCLUDE_UNMODIFIED = 1 << 2,
    GIT_STATUS_OPT_EXCLUDE_SUBMODULED = 1 << 3,
    GIT_STATUS_OPT_RECURSE_UNTRACKED_DIRS = 1 << 4
}; -}
c'GIT_STATUS_OPT_INCLUDE_UNTRACKED = 1
c'GIT_STATUS_OPT_INCLUDE_UNTRACKED :: (Num a) => a

{-# LINE 47 "Bindings/Libgit2/Status.hsc" #-}
c'GIT_STATUS_OPT_INCLUDE_IGNORED = 2
c'GIT_STATUS_OPT_INCLUDE_IGNORED :: (Num a) => a

{-# LINE 48 "Bindings/Libgit2/Status.hsc" #-}
c'GIT_STATUS_OPT_INCLUDE_UNMODIFIED = 4
c'GIT_STATUS_OPT_INCLUDE_UNMODIFIED :: (Num a) => a

{-# LINE 49 "Bindings/Libgit2/Status.hsc" #-}
c'GIT_STATUS_OPT_EXCLUDE_SUBMODULED = 8
c'GIT_STATUS_OPT_EXCLUDE_SUBMODULED :: (Num a) => a

{-# LINE 50 "Bindings/Libgit2/Status.hsc" #-}
c'GIT_STATUS_OPT_RECURSE_UNTRACKED_DIRS = 16
c'GIT_STATUS_OPT_RECURSE_UNTRACKED_DIRS :: (Num a) => a

{-# LINE 51 "Bindings/Libgit2/Status.hsc" #-}
{- typedef struct {
            git_status_show_t show; unsigned int flags; git_strarray pathspec;
        } git_status_options; -}

{-# LINE 55 "Bindings/Libgit2/Status.hsc" #-}

{-# LINE 56 "Bindings/Libgit2/Status.hsc" #-}

{-# LINE 57 "Bindings/Libgit2/Status.hsc" #-}

{-# LINE 58 "Bindings/Libgit2/Status.hsc" #-}
data C'git_status_options = C'git_status_options{
  c'git_status_options'show :: C'git_status_show_t,
  c'git_status_options'flags :: CUInt,
  c'git_status_options'pathspec :: C'git_strarray
} deriving (Eq,Show)
p'git_status_options'show p = plusPtr p 0
p'git_status_options'show :: Ptr (C'git_status_options) -> Ptr (C'git_status_show_t)
p'git_status_options'flags p = plusPtr p 4
p'git_status_options'flags :: Ptr (C'git_status_options) -> Ptr (CUInt)
p'git_status_options'pathspec p = plusPtr p 8
p'git_status_options'pathspec :: Ptr (C'git_status_options) -> Ptr (C'git_strarray)
instance Storable C'git_status_options where
  sizeOf _ = 16
  alignment _ = 4
  peek p = do
    v0 <- peekByteOff p 0
    v1 <- peekByteOff p 4
    v2 <- peekByteOff p 8
    return $ C'git_status_options v0 v1 v2
  poke p (C'git_status_options v0 v1 v2) = do
    pokeByteOff p 0 v0
    pokeByteOff p 4 v1
    pokeByteOff p 8 v2
    return ()

{-# LINE 59 "Bindings/Libgit2/Status.hsc" #-}
type C'git_status_foreach_ext_callback = FunPtr (CString -> CUInt -> Ptr () -> IO CInt)
foreign import ccall "wrapper" mk'git_status_foreach_ext_callback
  :: (CString -> CUInt -> Ptr () -> IO CInt) -> IO C'git_status_foreach_ext_callback
foreign import ccall "dynamic" mK'git_status_foreach_ext_callback
  :: C'git_status_foreach_ext_callback -> (CString -> CUInt -> Ptr () -> IO CInt)

{-# LINE 60 "Bindings/Libgit2/Status.hsc" #-}
foreign import ccall "git_status_foreach_ext" c'git_status_foreach_ext
  :: Ptr C'git_repository -> Ptr C'git_status_options -> C'git_status_foreach_ext_callback -> Ptr () -> IO (CInt)
foreign import ccall "&git_status_foreach_ext" p'git_status_foreach_ext
  :: FunPtr (Ptr C'git_repository -> Ptr C'git_status_options -> C'git_status_foreach_ext_callback -> Ptr () -> IO (CInt))

{-# LINE 61 "Bindings/Libgit2/Status.hsc" #-}
foreign import ccall "git_status_file" c'git_status_file
  :: Ptr CUInt -> Ptr C'git_repository -> CString -> IO (CInt)
foreign import ccall "&git_status_file" p'git_status_file
  :: FunPtr (Ptr CUInt -> Ptr C'git_repository -> CString -> IO (CInt))

{-# LINE 62 "Bindings/Libgit2/Status.hsc" #-}
foreign import ccall "git_status_should_ignore" c'git_status_should_ignore
  :: Ptr CInt -> Ptr C'git_repository -> CString -> IO (CInt)
foreign import ccall "&git_status_should_ignore" p'git_status_should_ignore
  :: FunPtr (Ptr CInt -> Ptr C'git_repository -> CString -> IO (CInt))

{-# LINE 63 "Bindings/Libgit2/Status.hsc" #-}