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

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

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

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

import Bindings.Libgit2.Common
import Bindings.Libgit2.Types
{- typedef enum {
            GIT_TRACE_NONE = 0,
            GIT_TRACE_FATAL = 1,
            GIT_TRACE_ERROR = 2,
            GIT_TRACE_WARN = 3,
            GIT_TRACE_INFO = 4,
            GIT_TRACE_DEBUG = 5,
            GIT_TRACE_TRACE = 6
        } git_trace_level_t; -}
type C'git_trace_level_t = CUInt

{-# LINE 21 "Bindings/Libgit2/Trace.hsc" #-}
c'GIT_TRACE_NONE = 0
c'GIT_TRACE_NONE :: (Num a) => a

{-# LINE 22 "Bindings/Libgit2/Trace.hsc" #-}
c'GIT_TRACE_FATAL = 1
c'GIT_TRACE_FATAL :: (Num a) => a

{-# LINE 23 "Bindings/Libgit2/Trace.hsc" #-}
c'GIT_TRACE_ERROR = 2
c'GIT_TRACE_ERROR :: (Num a) => a

{-# LINE 24 "Bindings/Libgit2/Trace.hsc" #-}
c'GIT_TRACE_WARN = 3
c'GIT_TRACE_WARN :: (Num a) => a

{-# LINE 25 "Bindings/Libgit2/Trace.hsc" #-}
c'GIT_TRACE_INFO = 4
c'GIT_TRACE_INFO :: (Num a) => a

{-# LINE 26 "Bindings/Libgit2/Trace.hsc" #-}
c'GIT_TRACE_DEBUG = 5
c'GIT_TRACE_DEBUG :: (Num a) => a

{-# LINE 27 "Bindings/Libgit2/Trace.hsc" #-}
c'GIT_TRACE_TRACE = 6
c'GIT_TRACE_TRACE :: (Num a) => a

{-# LINE 28 "Bindings/Libgit2/Trace.hsc" #-}
{- typedef void (* git_trace_callback)(git_trace_level_t level,
                                    const char * msg); -}
type C'git_trace_callback = FunPtr (C'git_trace_level_t -> CString -> IO ())
foreign import ccall "wrapper" mk'git_trace_callback
  :: (C'git_trace_level_t -> CString -> IO ()) -> IO C'git_trace_callback
foreign import ccall "dynamic" mK'git_trace_callback
  :: C'git_trace_callback -> (C'git_trace_level_t -> CString -> IO ())

{-# LINE 31 "Bindings/Libgit2/Trace.hsc" #-}
foreign import ccall "git_trace_set" c'git_trace_set
  :: C'git_trace_level_t -> C'git_trace_callback -> IO (CInt)
foreign import ccall "&git_trace_set" p'git_trace_set
  :: FunPtr (C'git_trace_level_t -> C'git_trace_callback -> IO (CInt))

{-# LINE 32 "Bindings/Libgit2/Trace.hsc" #-}