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

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

{-# LINE 4 "Bindings/Libgit2/Refs.hsc" #-}
module Bindings.Libgit2.Refs 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 7 "Bindings/Libgit2/Refs.hsc" #-}

import Bindings.Libgit2.Common
import Bindings.Libgit2.Types
import Bindings.Libgit2.Oid
import Bindings.Libgit2.Strarray
foreign import ccall "git_reference_lookup" c'git_reference_lookup
  :: Ptr (Ptr C'git_reference) -> Ptr C'git_repository -> CString -> IO (CInt)
foreign import ccall "&git_reference_lookup" p'git_reference_lookup
  :: FunPtr (Ptr (Ptr C'git_reference) -> Ptr C'git_repository -> CString -> IO (CInt))

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

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

{-# LINE 15 "Bindings/Libgit2/Refs.hsc" #-}
foreign import ccall "git_reference_create" c'git_reference_create
  :: Ptr (Ptr C'git_reference) -> Ptr C'git_repository -> CString -> Ptr C'git_oid -> CInt -> IO (CInt)
foreign import ccall "&git_reference_create" p'git_reference_create
  :: FunPtr (Ptr (Ptr C'git_reference) -> Ptr C'git_repository -> CString -> Ptr C'git_oid -> CInt -> IO (CInt))

{-# LINE 16 "Bindings/Libgit2/Refs.hsc" #-}
foreign import ccall "git_reference_target" c'git_reference_target
  :: Ptr C'git_reference -> IO (Ptr C'git_oid)
foreign import ccall "&git_reference_target" p'git_reference_target
  :: FunPtr (Ptr C'git_reference -> IO (Ptr C'git_oid))

{-# LINE 17 "Bindings/Libgit2/Refs.hsc" #-}
foreign import ccall "git_reference_symbolic_target" c'git_reference_symbolic_target
  :: Ptr C'git_reference -> IO (CString)
foreign import ccall "&git_reference_symbolic_target" p'git_reference_symbolic_target
  :: FunPtr (Ptr C'git_reference -> IO (CString))

{-# LINE 18 "Bindings/Libgit2/Refs.hsc" #-}
foreign import ccall "git_reference_type" c'git_reference_type
  :: Ptr C'git_reference -> IO (C'git_ref_t)
foreign import ccall "&git_reference_type" p'git_reference_type
  :: FunPtr (Ptr C'git_reference -> IO (C'git_ref_t))

{-# LINE 19 "Bindings/Libgit2/Refs.hsc" #-}
foreign import ccall "git_reference_name" c'git_reference_name
  :: Ptr C'git_reference -> IO (CString)
foreign import ccall "&git_reference_name" p'git_reference_name
  :: FunPtr (Ptr C'git_reference -> IO (CString))

{-# LINE 20 "Bindings/Libgit2/Refs.hsc" #-}
foreign import ccall "git_reference_resolve" c'git_reference_resolve
  :: Ptr (Ptr C'git_reference) -> Ptr C'git_reference -> IO (CInt)
foreign import ccall "&git_reference_resolve" p'git_reference_resolve
  :: FunPtr (Ptr (Ptr C'git_reference) -> Ptr C'git_reference -> IO (CInt))

{-# LINE 21 "Bindings/Libgit2/Refs.hsc" #-}
foreign import ccall "git_reference_owner" c'git_reference_owner
  :: Ptr C'git_reference -> IO (Ptr C'git_repository)
foreign import ccall "&git_reference_owner" p'git_reference_owner
  :: FunPtr (Ptr C'git_reference -> IO (Ptr C'git_repository))

{-# LINE 22 "Bindings/Libgit2/Refs.hsc" #-}
foreign import ccall "git_reference_symbolic_set_target" c'git_reference_symbolic_set_target
  :: Ptr (Ptr C'git_reference) -> Ptr C'git_reference -> CString -> IO (CInt)
foreign import ccall "&git_reference_symbolic_set_target" p'git_reference_symbolic_set_target
  :: FunPtr (Ptr (Ptr C'git_reference) -> Ptr C'git_reference -> CString -> IO (CInt))

{-# LINE 23 "Bindings/Libgit2/Refs.hsc" #-}
foreign import ccall "git_reference_set_target" c'git_reference_set_target
  :: Ptr (Ptr C'git_reference) -> Ptr C'git_reference -> Ptr C'git_oid -> IO (CInt)
foreign import ccall "&git_reference_set_target" p'git_reference_set_target
  :: FunPtr (Ptr (Ptr C'git_reference) -> Ptr C'git_reference -> Ptr C'git_oid -> IO (CInt))

{-# LINE 24 "Bindings/Libgit2/Refs.hsc" #-}
foreign import ccall "git_reference_rename" c'git_reference_rename
  :: Ptr (Ptr C'git_reference) -> Ptr C'git_reference -> CString -> CInt -> IO (CInt)
foreign import ccall "&git_reference_rename" p'git_reference_rename
  :: FunPtr (Ptr (Ptr C'git_reference) -> Ptr C'git_reference -> CString -> CInt -> IO (CInt))

{-# LINE 25 "Bindings/Libgit2/Refs.hsc" #-}
foreign import ccall "git_reference_delete" c'git_reference_delete
  :: Ptr C'git_reference -> IO (CInt)
foreign import ccall "&git_reference_delete" p'git_reference_delete
  :: FunPtr (Ptr C'git_reference -> IO (CInt))

{-# LINE 26 "Bindings/Libgit2/Refs.hsc" #-}
foreign import ccall "git_reference_list" c'git_reference_list
  :: Ptr C'git_strarray -> Ptr C'git_repository -> CUInt -> IO (CInt)
foreign import ccall "&git_reference_list" p'git_reference_list
  :: FunPtr (Ptr C'git_strarray -> Ptr C'git_repository -> CUInt -> IO (CInt))

{-# LINE 27 "Bindings/Libgit2/Refs.hsc" #-}
{- typedef int (* git_reference_foreach_cb)(const char * refname,
                                         void * payload); -}
type C'git_reference_foreach_cb = FunPtr (CString -> Ptr () -> Ptr CInt)
foreign import ccall "wrapper" mk'git_reference_foreach_cb
  :: (CString -> Ptr () -> Ptr CInt) -> IO C'git_reference_foreach_cb
foreign import ccall "dynamic" mK'git_reference_foreach_cb
  :: C'git_reference_foreach_cb -> (CString -> Ptr () -> Ptr CInt)

{-# LINE 30 "Bindings/Libgit2/Refs.hsc" #-}
foreign import ccall "git_reference_foreach" c'git_reference_foreach
  :: Ptr C'git_repository -> CUInt -> C'git_reference_foreach_cb -> Ptr () -> IO (CInt)
foreign import ccall "&git_reference_foreach" p'git_reference_foreach
  :: FunPtr (Ptr C'git_repository -> CUInt -> C'git_reference_foreach_cb -> Ptr () -> IO (CInt))

{-# LINE 31 "Bindings/Libgit2/Refs.hsc" #-}
foreign import ccall "git_reference_free" c'git_reference_free
  :: Ptr C'git_reference -> IO ()
foreign import ccall "&git_reference_free" p'git_reference_free
  :: FunPtr (Ptr C'git_reference -> IO ())

{-# LINE 32 "Bindings/Libgit2/Refs.hsc" #-}
foreign import ccall "git_reference_cmp" c'git_reference_cmp
  :: Ptr C'git_reference -> Ptr C'git_reference -> IO (CInt)
foreign import ccall "&git_reference_cmp" p'git_reference_cmp
  :: FunPtr (Ptr C'git_reference -> Ptr C'git_reference -> IO (CInt))

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

{-# LINE 34 "Bindings/Libgit2/Refs.hsc" #-}
foreign import ccall "git_reference_has_log" c'git_reference_has_log
  :: Ptr C'git_reference -> IO (CInt)
foreign import ccall "&git_reference_has_log" p'git_reference_has_log
  :: FunPtr (Ptr C'git_reference -> IO (CInt))

{-# LINE 35 "Bindings/Libgit2/Refs.hsc" #-}
foreign import ccall "git_reference_is_branch" c'git_reference_is_branch
  :: Ptr C'git_reference -> IO (CInt)
foreign import ccall "&git_reference_is_branch" p'git_reference_is_branch
  :: FunPtr (Ptr C'git_reference -> IO (CInt))

{-# LINE 36 "Bindings/Libgit2/Refs.hsc" #-}
foreign import ccall "git_reference_is_remote" c'git_reference_is_remote
  :: Ptr C'git_reference -> IO (CInt)
foreign import ccall "&git_reference_is_remote" p'git_reference_is_remote
  :: FunPtr (Ptr C'git_reference -> IO (CInt))

{-# LINE 37 "Bindings/Libgit2/Refs.hsc" #-}
{- typedef enum {
            GIT_REF_FORMAT_NORMAL = 0,
            GIT_REF_FORMAT_ALLOW_ONELEVEL = 1 << 0,
            GIT_REF_FORMAT_REFSPEC_PATTERN = 1 << 1
        } git_reference_normalize_t; -}
type C'git_reference_normalize_t = CUInt

{-# LINE 43 "Bindings/Libgit2/Refs.hsc" #-}
c'GIT_REF_FORMAT_NORMAL = 0
c'GIT_REF_FORMAT_NORMAL :: (Num a) => a

{-# LINE 44 "Bindings/Libgit2/Refs.hsc" #-}
c'GIT_REF_FORMAT_ALLOW_ONELEVEL = 1
c'GIT_REF_FORMAT_ALLOW_ONELEVEL :: (Num a) => a

{-# LINE 45 "Bindings/Libgit2/Refs.hsc" #-}
c'GIT_REF_FORMAT_REFSPEC_PATTERN = 2
c'GIT_REF_FORMAT_REFSPEC_PATTERN :: (Num a) => a

{-# LINE 46 "Bindings/Libgit2/Refs.hsc" #-}
foreign import ccall "git_reference_normalize_name" c'git_reference_normalize_name
  :: CString -> CSize -> CString -> CUInt -> IO (CInt)
foreign import ccall "&git_reference_normalize_name" p'git_reference_normalize_name
  :: FunPtr (CString -> CSize -> CString -> CUInt -> IO (CInt))

{-# LINE 47 "Bindings/Libgit2/Refs.hsc" #-}
foreign import ccall "git_reference_peel" c'git_reference_peel
  :: Ptr (Ptr C'git_object) -> Ptr C'git_reference -> C'git_otype -> IO (CInt)
foreign import ccall "&git_reference_peel" p'git_reference_peel
  :: FunPtr (Ptr (Ptr C'git_object) -> Ptr C'git_reference -> C'git_otype -> IO (CInt))

{-# LINE 48 "Bindings/Libgit2/Refs.hsc" #-}
foreign import ccall "git_reference_is_valid_name" c'git_reference_is_valid_name
  :: CString -> IO (CInt)
foreign import ccall "&git_reference_is_valid_name" p'git_reference_is_valid_name
  :: FunPtr (CString -> IO (CInt))

{-# LINE 49 "Bindings/Libgit2/Refs.hsc" #-}