                 <$> {#get inMemoryBuffer_t->buffer #} p
                 <*> liftM fromIntegral ({#get inMemoryBuffer_t->size #}   p)
                 <*> liftM fromIntegral ({#get inMemoryBuffer_t->inUse #}  p)
-   poke       = undefined
-
-
+    poke      = undefined
 
 getData                          :: CInMemoryBuffer -> IO ByteString
 getData (CInMemoryBuffer xs _ s) = packCStringLen (xs,fromIntegral s)

                                           , job :: Ptr CJob
                                           , buf :: Ptr CBuffers
                                           , inBuf :: Ptr CRSFileBuf
                                           , outputBuf :: CInMemoryBufferPtr
                                           }

instance Storable CRSyncSourceState where
    sizeOf    = const {#sizeof rsyncSourceState_t #}
    alignment = const 4
    peek      = undefined
    poke      = undefined


{#pointer *rsyncSourceState_t as CRSyncSourceStatePtr -> CRSyncSourceState #}


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

-- | Generating Signatures

type RSyncSourceState = CRSyncSourceStatePtr

outputBuf   :: RSyncSourceState -> IO CInMemoryBuffer
outputBuf p = (outputBuf' <$> peek p) >>= peek

type Signature = ByteString

