module Bindings.Libgit2.Odb 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
import Bindings.Libgit2.Common
import Bindings.Libgit2.Types
import Bindings.Libgit2.Oid
import Bindings.Libgit2.OdbBackend
foreign import ccall "git_odb_new" c'git_odb_new
:: Ptr (Ptr C'git_odb) -> IO (CInt)
foreign import ccall "&git_odb_new" p'git_odb_new
:: FunPtr (Ptr (Ptr C'git_odb) -> IO (CInt))
foreign import ccall "git_odb_open" c'git_odb_open
:: Ptr (Ptr C'git_odb) -> CString -> IO (CInt)
foreign import ccall "&git_odb_open" p'git_odb_open
:: FunPtr (Ptr (Ptr C'git_odb) -> CString -> IO (CInt))
foreign import ccall "git_odb_add_backend" c'git_odb_add_backend
:: Ptr C'git_odb -> Ptr C'git_odb_backend -> CInt -> IO (CInt)
foreign import ccall "&git_odb_add_backend" p'git_odb_add_backend
:: FunPtr (Ptr C'git_odb -> Ptr C'git_odb_backend -> CInt -> IO (CInt))
foreign import ccall "git_odb_add_alternate" c'git_odb_add_alternate
:: Ptr C'git_odb -> Ptr C'git_odb_backend -> CInt -> IO (CInt)
foreign import ccall "&git_odb_add_alternate" p'git_odb_add_alternate
:: FunPtr (Ptr C'git_odb -> Ptr C'git_odb_backend -> CInt -> IO (CInt))
foreign import ccall "git_odb_free" c'git_odb_free
:: Ptr C'git_odb -> IO ()
foreign import ccall "&git_odb_free" p'git_odb_free
:: FunPtr (Ptr C'git_odb -> IO ())
foreign import ccall "git_odb_read" c'git_odb_read
:: Ptr (Ptr C'git_odb_object) -> Ptr C'git_odb -> Ptr C'git_oid -> IO (CInt)
foreign import ccall "&git_odb_read" p'git_odb_read
:: FunPtr (Ptr (Ptr C'git_odb_object) -> Ptr C'git_odb -> Ptr C'git_oid -> IO (CInt))
foreign import ccall "git_odb_read_prefix" c'git_odb_read_prefix
:: Ptr (Ptr C'git_odb_object) -> Ptr C'git_odb -> Ptr C'git_oid -> CUInt -> IO (CInt)
foreign import ccall "&git_odb_read_prefix" p'git_odb_read_prefix
:: FunPtr (Ptr (Ptr C'git_odb_object) -> Ptr C'git_odb -> Ptr C'git_oid -> CUInt -> IO (CInt))
foreign import ccall "git_odb_read_header" c'git_odb_read_header
:: Ptr CSize -> Ptr C'git_otype -> Ptr C'git_odb -> Ptr C'git_oid -> IO (CInt)
foreign import ccall "&git_odb_read_header" p'git_odb_read_header
:: FunPtr (Ptr CSize -> Ptr C'git_otype -> Ptr C'git_odb -> Ptr C'git_oid -> IO (CInt))
foreign import ccall "git_odb_exists" c'git_odb_exists
:: Ptr C'git_odb -> Ptr C'git_oid -> IO (CInt)
foreign import ccall "&git_odb_exists" p'git_odb_exists
:: FunPtr (Ptr C'git_odb -> Ptr C'git_oid -> IO (CInt))
foreign import ccall "git_odb_write" c'git_odb_write
:: Ptr C'git_oid -> Ptr C'git_odb -> Ptr () -> CSize -> C'git_otype -> IO (CInt)
foreign import ccall "&git_odb_write" p'git_odb_write
:: FunPtr (Ptr C'git_oid -> Ptr C'git_odb -> Ptr () -> CSize -> C'git_otype -> IO (CInt))
foreign import ccall "git_odb_open_wstream" c'git_odb_open_wstream
:: Ptr (Ptr C'git_odb_stream) -> Ptr C'git_odb -> CSize -> C'git_otype -> IO (CInt)
foreign import ccall "&git_odb_open_wstream" p'git_odb_open_wstream
:: FunPtr (Ptr (Ptr C'git_odb_stream) -> Ptr C'git_odb -> CSize -> C'git_otype -> IO (CInt))
foreign import ccall "git_odb_open_rstream" c'git_odb_open_rstream
:: Ptr (Ptr C'git_odb_stream) -> Ptr C'git_odb -> Ptr C'git_oid -> IO (CInt)
foreign import ccall "&git_odb_open_rstream" p'git_odb_open_rstream
:: FunPtr (Ptr (Ptr C'git_odb_stream) -> Ptr C'git_odb -> Ptr C'git_oid -> IO (CInt))
foreign import ccall "git_odb_hash" c'git_odb_hash
:: Ptr C'git_oid -> Ptr () -> CSize -> C'git_otype -> IO (CInt)
foreign import ccall "&git_odb_hash" p'git_odb_hash
:: FunPtr (Ptr C'git_oid -> Ptr () -> CSize -> C'git_otype -> IO (CInt))
foreign import ccall "git_odb_hashfile" c'git_odb_hashfile
:: Ptr C'git_oid -> CString -> C'git_otype -> IO (CInt)
foreign import ccall "&git_odb_hashfile" p'git_odb_hashfile
:: FunPtr (Ptr C'git_oid -> CString -> C'git_otype -> IO (CInt))
foreign import ccall "git_odb_object_free" c'git_odb_object_free
:: Ptr C'git_odb_object -> IO ()
foreign import ccall "&git_odb_object_free" p'git_odb_object_free
:: FunPtr (Ptr C'git_odb_object -> IO ())
foreign import ccall "git_odb_object_id" c'git_odb_object_id
:: Ptr C'git_odb_object -> IO (Ptr C'git_oid)
foreign import ccall "&git_odb_object_id" p'git_odb_object_id
:: FunPtr (Ptr C'git_odb_object -> IO (Ptr C'git_oid))
foreign import ccall "git_odb_object_data" c'git_odb_object_data
:: Ptr C'git_odb_object -> IO (Ptr ())
foreign import ccall "&git_odb_object_data" p'git_odb_object_data
:: FunPtr (Ptr C'git_odb_object -> IO (Ptr ()))
foreign import ccall "git_odb_object_size" c'git_odb_object_size
:: Ptr C'git_odb_object -> IO (CSize)
foreign import ccall "&git_odb_object_size" p'git_odb_object_size
:: FunPtr (Ptr C'git_odb_object -> IO (CSize))
foreign import ccall "git_odb_object_type" c'git_odb_object_type
:: Ptr C'git_odb_object -> IO (C'git_otype)
foreign import ccall "&git_odb_object_type" p'git_odb_object_type
:: FunPtr (Ptr C'git_odb_object -> IO (C'git_otype))