 {-# LANGUAGE ForeignFunctionInterface #-}
 module Network.LibRSync.Internal where
+
+import Data.ByteString
 
 import System.IO
 import GHC.IO.Handle

-- {#pointer *rs_block_sig_t as BlockSigPtr -> BlockSig #}


type CSignature = Ptr CFile


-- | The Signature type
{#pointer *rs_signature_t as SignaturePtr -> CSignature #}

-- | The results type
{#enum rs_result as Result {underscoreToCase} deriving (Eq, Show)#}


--------------------------------------------------------------------------------
-- | Delta


cGenDelta :: Handle -> FilePath -> Handle -> IO (Handle, Result)
cGenDelta sigHandle p deltaHandle = undefined


{#fun unsafe genDelta as genDelta'
      { fromIntegral `Fd'
      , `String'
      , fromIntegral `Fd'
      } -> `Result' cIntToEnum

 #}

#c
// generate a delta, based on the implementation of rdiff
