packages feed

LibZip 0.1.0 → 0.2.0

raw patch · 7 files changed

+11/−255 lines, 7 filesdep +bindings-libzipdep −bindings-DSLsetup-changedPVP ok

version bump matches the API change (PVP)

Dependencies added: bindings-libzip

Dependencies removed: bindings-DSL

API changes (from Hackage documentation)

- Codec.Archive.LibZip.LowLevel: C'time_t :: C'time_t
- Codec.Archive.LibZip.LowLevel: C'zip :: C'zip
- Codec.Archive.LibZip.LowLevel: C'zip_file :: C'zip_file
- Codec.Archive.LibZip.LowLevel: C'zip_source :: C'zip_source
- Codec.Archive.LibZip.LowLevel: C'zip_stat :: Ptr CChar -> CInt -> CUInt -> CTime -> CSize -> CSize -> CUShort -> CUShort -> C'zip_stat
- Codec.Archive.LibZip.LowLevel: c'ZIP_AFL_TORRENT :: (Num a) => a
- Codec.Archive.LibZip.LowLevel: c'ZIP_CHECKCONS :: (Num a) => a
- Codec.Archive.LibZip.LowLevel: c'ZIP_CM_BZIP2 :: (Num a) => a
- Codec.Archive.LibZip.LowLevel: c'ZIP_CM_DEFAULT :: (Num a) => a
- Codec.Archive.LibZip.LowLevel: c'ZIP_CM_DEFLATE :: (Num a) => a
- Codec.Archive.LibZip.LowLevel: c'ZIP_CM_DEFLATE64 :: (Num a) => a
- Codec.Archive.LibZip.LowLevel: c'ZIP_CM_IMPLODE :: (Num a) => a
- Codec.Archive.LibZip.LowLevel: c'ZIP_CM_LZ77 :: (Num a) => a
- Codec.Archive.LibZip.LowLevel: c'ZIP_CM_LZMA :: (Num a) => a
- Codec.Archive.LibZip.LowLevel: c'ZIP_CM_PKWARE_IMPLODE :: (Num a) => a
- Codec.Archive.LibZip.LowLevel: c'ZIP_CM_PPMD :: (Num a) => a
- Codec.Archive.LibZip.LowLevel: c'ZIP_CM_REDUCE_1 :: (Num a) => a
- Codec.Archive.LibZip.LowLevel: c'ZIP_CM_REDUCE_2 :: (Num a) => a
- Codec.Archive.LibZip.LowLevel: c'ZIP_CM_REDUCE_3 :: (Num a) => a
- Codec.Archive.LibZip.LowLevel: c'ZIP_CM_REDUCE_4 :: (Num a) => a
- Codec.Archive.LibZip.LowLevel: c'ZIP_CM_SHRINK :: (Num a) => a
- Codec.Archive.LibZip.LowLevel: c'ZIP_CM_STORE :: (Num a) => a
- Codec.Archive.LibZip.LowLevel: c'ZIP_CM_TERSE :: (Num a) => a
- Codec.Archive.LibZip.LowLevel: c'ZIP_CM_WAVPACK :: (Num a) => a
- Codec.Archive.LibZip.LowLevel: c'ZIP_CREATE :: (Num a) => a
- Codec.Archive.LibZip.LowLevel: c'ZIP_EM_NONE :: (Num a) => a
- Codec.Archive.LibZip.LowLevel: c'ZIP_EM_TRAD_PKWARE :: (Num a) => a
- Codec.Archive.LibZip.LowLevel: c'ZIP_EM_UNKNOWN :: (Num a) => a
- Codec.Archive.LibZip.LowLevel: c'ZIP_ER_CHANGED :: (Num a) => a
- Codec.Archive.LibZip.LowLevel: c'ZIP_ER_CLOSE :: (Num a) => a
- Codec.Archive.LibZip.LowLevel: c'ZIP_ER_COMPNOTSUPP :: (Num a) => a
- Codec.Archive.LibZip.LowLevel: c'ZIP_ER_CRC :: (Num a) => a
- Codec.Archive.LibZip.LowLevel: c'ZIP_ER_DELETED :: (Num a) => a
- Codec.Archive.LibZip.LowLevel: c'ZIP_ER_EOF :: (Num a) => a
- Codec.Archive.LibZip.LowLevel: c'ZIP_ER_EXISTS :: (Num a) => a
- Codec.Archive.LibZip.LowLevel: c'ZIP_ER_INCONS :: (Num a) => a
- Codec.Archive.LibZip.LowLevel: c'ZIP_ER_INTERNAL :: (Num a) => a
- Codec.Archive.LibZip.LowLevel: c'ZIP_ER_INVAL :: (Num a) => a
- Codec.Archive.LibZip.LowLevel: c'ZIP_ER_MEMORY :: (Num a) => a
- Codec.Archive.LibZip.LowLevel: c'ZIP_ER_MULTIDISK :: (Num a) => a
- Codec.Archive.LibZip.LowLevel: c'ZIP_ER_NOENT :: (Num a) => a
- Codec.Archive.LibZip.LowLevel: c'ZIP_ER_NOZIP :: (Num a) => a
- Codec.Archive.LibZip.LowLevel: c'ZIP_ER_OK :: (Num a) => a
- Codec.Archive.LibZip.LowLevel: c'ZIP_ER_OPEN :: (Num a) => a
- Codec.Archive.LibZip.LowLevel: c'ZIP_ER_READ :: (Num a) => a
- Codec.Archive.LibZip.LowLevel: c'ZIP_ER_REMOVE :: (Num a) => a
- Codec.Archive.LibZip.LowLevel: c'ZIP_ER_RENAME :: (Num a) => a
- Codec.Archive.LibZip.LowLevel: c'ZIP_ER_SEEK :: (Num a) => a
- Codec.Archive.LibZip.LowLevel: c'ZIP_ER_TMPOPEN :: (Num a) => a
- Codec.Archive.LibZip.LowLevel: c'ZIP_ER_WRITE :: (Num a) => a
- Codec.Archive.LibZip.LowLevel: c'ZIP_ER_ZIPCLOSED :: (Num a) => a
- Codec.Archive.LibZip.LowLevel: c'ZIP_ER_ZLIB :: (Num a) => a
- Codec.Archive.LibZip.LowLevel: c'ZIP_ET_NONE :: (Num a) => a
- Codec.Archive.LibZip.LowLevel: c'ZIP_ET_SYS :: (Num a) => a
- Codec.Archive.LibZip.LowLevel: c'ZIP_ET_ZLIB :: (Num a) => a
- Codec.Archive.LibZip.LowLevel: c'ZIP_EXCL :: (Num a) => a
- Codec.Archive.LibZip.LowLevel: c'ZIP_FL_COMPRESSED :: (Num a) => a
- Codec.Archive.LibZip.LowLevel: c'ZIP_FL_NOCASE :: (Num a) => a
- Codec.Archive.LibZip.LowLevel: c'ZIP_FL_NODIR :: (Num a) => a
- Codec.Archive.LibZip.LowLevel: c'ZIP_FL_RECOMPRESS :: (Num a) => a
- Codec.Archive.LibZip.LowLevel: c'ZIP_FL_UNCHANGED :: (Num a) => a
- Codec.Archive.LibZip.LowLevel: c'ZIP_SOURCE_CLOSE :: (Num a) => a
- Codec.Archive.LibZip.LowLevel: c'ZIP_SOURCE_ERROR :: (Num a) => a
- Codec.Archive.LibZip.LowLevel: c'ZIP_SOURCE_FREE :: (Num a) => a
- Codec.Archive.LibZip.LowLevel: c'ZIP_SOURCE_OPEN :: (Num a) => a
- Codec.Archive.LibZip.LowLevel: c'ZIP_SOURCE_READ :: (Num a) => a
- Codec.Archive.LibZip.LowLevel: c'ZIP_SOURCE_STAT :: (Num a) => a
- Codec.Archive.LibZip.LowLevel: c'zip_add :: Ptr C'zip -> CString -> Ptr C'zip_source -> IO CInt
- Codec.Archive.LibZip.LowLevel: c'zip_add_dir :: Ptr C'zip -> CString -> IO CInt
- Codec.Archive.LibZip.LowLevel: c'zip_close :: Ptr C'zip -> IO CInt
- Codec.Archive.LibZip.LowLevel: c'zip_delete :: Ptr C'zip -> CInt -> IO CInt
- Codec.Archive.LibZip.LowLevel: c'zip_error_clear :: Ptr C'zip -> IO ()
- Codec.Archive.LibZip.LowLevel: c'zip_error_get :: Ptr C'zip -> Ptr CInt -> Ptr CInt -> IO ()
- Codec.Archive.LibZip.LowLevel: c'zip_error_get_sys_type :: CInt -> IO CInt
- Codec.Archive.LibZip.LowLevel: c'zip_error_to_str :: Ptr Char -> CSize -> CInt -> CInt -> IO CInt
- Codec.Archive.LibZip.LowLevel: c'zip_fclose :: Ptr C'zip_file -> IO CInt
- Codec.Archive.LibZip.LowLevel: c'zip_file_error_clear :: Ptr C'zip_file -> IO ()
- Codec.Archive.LibZip.LowLevel: c'zip_file_error_get :: Ptr C'zip_file -> Ptr CInt -> Ptr CInt -> IO ()
- Codec.Archive.LibZip.LowLevel: c'zip_file_strerror :: Ptr C'zip_file -> IO CString
- Codec.Archive.LibZip.LowLevel: c'zip_fopen :: Ptr C'zip -> CString -> CInt -> IO (Ptr C'zip_file)
- Codec.Archive.LibZip.LowLevel: c'zip_fopen_index :: Ptr C'zip -> CInt -> CInt -> IO (Ptr C'zip_file)
- Codec.Archive.LibZip.LowLevel: c'zip_fread :: Ptr C'zip_file -> Ptr () -> CSize -> IO CSize
- Codec.Archive.LibZip.LowLevel: c'zip_get_archive_comment :: Ptr C'zip -> Ptr CInt -> CInt -> IO CString
- Codec.Archive.LibZip.LowLevel: c'zip_get_archive_flag :: Ptr C'zip -> CInt -> CInt -> IO CInt
- Codec.Archive.LibZip.LowLevel: c'zip_get_file_comment :: Ptr C'zip -> CInt -> Ptr CInt -> CInt -> IO CString
- Codec.Archive.LibZip.LowLevel: c'zip_get_name :: Ptr C'zip -> CInt -> CInt -> IO CString
- Codec.Archive.LibZip.LowLevel: c'zip_get_num_files :: Ptr C'zip -> IO CInt
- Codec.Archive.LibZip.LowLevel: c'zip_name_locate :: Ptr C'zip -> CString -> CInt -> IO CInt
- Codec.Archive.LibZip.LowLevel: c'zip_open :: CString -> CInt -> Ptr CInt -> IO (Ptr C'zip)
- Codec.Archive.LibZip.LowLevel: c'zip_rename :: Ptr C'zip -> CInt -> CString -> IO CInt
- Codec.Archive.LibZip.LowLevel: c'zip_replace :: Ptr C'zip -> CInt -> Ptr C'zip_source -> IO CInt
- Codec.Archive.LibZip.LowLevel: c'zip_set_archive_comment :: Ptr C'zip -> CString -> CInt -> IO CInt
- Codec.Archive.LibZip.LowLevel: c'zip_set_archive_flag :: Ptr C'zip -> CInt -> CInt -> IO CInt
- Codec.Archive.LibZip.LowLevel: c'zip_set_file_comment :: Ptr C'zip -> CInt -> CString -> CInt -> IO CInt
- Codec.Archive.LibZip.LowLevel: c'zip_source_buffer :: Ptr C'zip -> Ptr () -> CSize -> CInt -> IO (Ptr C'zip_source)
- Codec.Archive.LibZip.LowLevel: c'zip_source_file :: Ptr C'zip -> CString -> CSize -> CSize -> IO (Ptr C'zip_source)
- Codec.Archive.LibZip.LowLevel: c'zip_source_filep :: Ptr C'zip -> Ptr CFile -> CSize -> CSize -> IO (Ptr C'zip_source)
- Codec.Archive.LibZip.LowLevel: c'zip_source_free :: Ptr C'zip_source -> IO ()
- Codec.Archive.LibZip.LowLevel: c'zip_source_function :: Ptr C'zip -> C'zip_source_callback -> Ptr () -> IO (Ptr C'zip_source)
- Codec.Archive.LibZip.LowLevel: c'zip_source_zip :: Ptr C'zip -> Ptr C'zip -> CInt -> CInt -> CSize -> CSize -> IO (Ptr C'zip_source)
- Codec.Archive.LibZip.LowLevel: c'zip_stat :: Ptr C'zip -> CString -> CInt -> Ptr C'zip_stat -> IO CInt
- Codec.Archive.LibZip.LowLevel: c'zip_stat'comp_method :: C'zip_stat -> CUShort
- Codec.Archive.LibZip.LowLevel: c'zip_stat'comp_size :: C'zip_stat -> CSize
- Codec.Archive.LibZip.LowLevel: c'zip_stat'crc :: C'zip_stat -> CUInt
- Codec.Archive.LibZip.LowLevel: c'zip_stat'encryption_method :: C'zip_stat -> CUShort
- Codec.Archive.LibZip.LowLevel: c'zip_stat'index :: C'zip_stat -> CInt
- Codec.Archive.LibZip.LowLevel: c'zip_stat'mtime :: C'zip_stat -> CTime
- Codec.Archive.LibZip.LowLevel: c'zip_stat'name :: C'zip_stat -> Ptr CChar
- Codec.Archive.LibZip.LowLevel: c'zip_stat'size :: C'zip_stat -> CSize
- Codec.Archive.LibZip.LowLevel: c'zip_stat_index :: Ptr C'zip -> CInt -> CInt -> Ptr C'zip_stat -> IO CInt
- Codec.Archive.LibZip.LowLevel: c'zip_stat_init :: Ptr C'zip_stat -> IO ()
- Codec.Archive.LibZip.LowLevel: c'zip_strerror :: Ptr C'zip -> IO CString
- Codec.Archive.LibZip.LowLevel: c'zip_unchange :: Ptr C'zip -> CInt -> IO CInt
- Codec.Archive.LibZip.LowLevel: c'zip_unchange_all :: Ptr C'zip -> IO CInt
- Codec.Archive.LibZip.LowLevel: c'zip_unchange_archive :: Ptr C'zip -> IO CInt
- Codec.Archive.LibZip.LowLevel: data C'time_t
- Codec.Archive.LibZip.LowLevel: data C'zip
- Codec.Archive.LibZip.LowLevel: data C'zip_file
- Codec.Archive.LibZip.LowLevel: data C'zip_source
- Codec.Archive.LibZip.LowLevel: data C'zip_stat
- Codec.Archive.LibZip.LowLevel: instance Eq C'zip_stat
- Codec.Archive.LibZip.LowLevel: instance Show C'zip_stat
- Codec.Archive.LibZip.LowLevel: instance Storable C'zip_stat
- Codec.Archive.LibZip.LowLevel: mK'zip_source_callback :: C'zip_source_callback -> (Ptr () -> Ptr () -> CSize -> C'zip_source_cmd -> IO CSize)
- Codec.Archive.LibZip.LowLevel: mk'zip_source_callback :: (Ptr () -> Ptr () -> CSize -> C'zip_source_cmd -> IO CSize) -> IO C'zip_source_callback
- Codec.Archive.LibZip.LowLevel: p'zip_add :: FunPtr (Ptr C'zip -> CString -> Ptr C'zip_source -> IO CInt)
- Codec.Archive.LibZip.LowLevel: p'zip_add_dir :: FunPtr (Ptr C'zip -> CString -> IO CInt)
- Codec.Archive.LibZip.LowLevel: p'zip_close :: FunPtr (Ptr C'zip -> IO CInt)
- Codec.Archive.LibZip.LowLevel: p'zip_delete :: FunPtr (Ptr C'zip -> CInt -> IO CInt)
- Codec.Archive.LibZip.LowLevel: p'zip_error_clear :: FunPtr (Ptr C'zip -> IO ())
- Codec.Archive.LibZip.LowLevel: p'zip_error_get :: FunPtr (Ptr C'zip -> Ptr CInt -> Ptr CInt -> IO ())
- Codec.Archive.LibZip.LowLevel: p'zip_error_get_sys_type :: FunPtr (CInt -> IO CInt)
- Codec.Archive.LibZip.LowLevel: p'zip_error_to_str :: FunPtr (Ptr Char -> CSize -> CInt -> CInt -> IO CInt)
- Codec.Archive.LibZip.LowLevel: p'zip_fclose :: FunPtr (Ptr C'zip_file -> IO CInt)
- Codec.Archive.LibZip.LowLevel: p'zip_file_error_clear :: FunPtr (Ptr C'zip_file -> IO ())
- Codec.Archive.LibZip.LowLevel: p'zip_file_error_get :: FunPtr (Ptr C'zip_file -> Ptr CInt -> Ptr CInt -> IO ())
- Codec.Archive.LibZip.LowLevel: p'zip_file_strerror :: FunPtr (Ptr C'zip_file -> IO CString)
- Codec.Archive.LibZip.LowLevel: p'zip_fopen :: FunPtr (Ptr C'zip -> CString -> CInt -> IO (Ptr C'zip_file))
- Codec.Archive.LibZip.LowLevel: p'zip_fopen_index :: FunPtr (Ptr C'zip -> CInt -> CInt -> IO (Ptr C'zip_file))
- Codec.Archive.LibZip.LowLevel: p'zip_fread :: FunPtr (Ptr C'zip_file -> Ptr () -> CSize -> IO CSize)
- Codec.Archive.LibZip.LowLevel: p'zip_get_archive_comment :: FunPtr (Ptr C'zip -> Ptr CInt -> CInt -> IO CString)
- Codec.Archive.LibZip.LowLevel: p'zip_get_archive_flag :: FunPtr (Ptr C'zip -> CInt -> CInt -> IO CInt)
- Codec.Archive.LibZip.LowLevel: p'zip_get_file_comment :: FunPtr (Ptr C'zip -> CInt -> Ptr CInt -> CInt -> IO CString)
- Codec.Archive.LibZip.LowLevel: p'zip_get_name :: FunPtr (Ptr C'zip -> CInt -> CInt -> IO CString)
- Codec.Archive.LibZip.LowLevel: p'zip_get_num_files :: FunPtr (Ptr C'zip -> IO CInt)
- Codec.Archive.LibZip.LowLevel: p'zip_name_locate :: FunPtr (Ptr C'zip -> CString -> CInt -> IO CInt)
- Codec.Archive.LibZip.LowLevel: p'zip_open :: FunPtr (CString -> CInt -> Ptr CInt -> IO (Ptr C'zip))
- Codec.Archive.LibZip.LowLevel: p'zip_rename :: FunPtr (Ptr C'zip -> CInt -> CString -> IO CInt)
- Codec.Archive.LibZip.LowLevel: p'zip_replace :: FunPtr (Ptr C'zip -> CInt -> Ptr C'zip_source -> IO CInt)
- Codec.Archive.LibZip.LowLevel: p'zip_set_archive_comment :: FunPtr (Ptr C'zip -> CString -> CInt -> IO CInt)
- Codec.Archive.LibZip.LowLevel: p'zip_set_archive_flag :: FunPtr (Ptr C'zip -> CInt -> CInt -> IO CInt)
- Codec.Archive.LibZip.LowLevel: p'zip_set_file_comment :: FunPtr (Ptr C'zip -> CInt -> CString -> CInt -> IO CInt)
- Codec.Archive.LibZip.LowLevel: p'zip_source_buffer :: FunPtr (Ptr C'zip -> Ptr () -> CSize -> CInt -> IO (Ptr C'zip_source))
- Codec.Archive.LibZip.LowLevel: p'zip_source_file :: FunPtr (Ptr C'zip -> CString -> CSize -> CSize -> IO (Ptr C'zip_source))
- Codec.Archive.LibZip.LowLevel: p'zip_source_filep :: FunPtr (Ptr C'zip -> Ptr CFile -> CSize -> CSize -> IO (Ptr C'zip_source))
- Codec.Archive.LibZip.LowLevel: p'zip_source_free :: FunPtr (Ptr C'zip_source -> IO ())
- Codec.Archive.LibZip.LowLevel: p'zip_source_function :: FunPtr (Ptr C'zip -> C'zip_source_callback -> Ptr () -> IO (Ptr C'zip_source))
- Codec.Archive.LibZip.LowLevel: p'zip_source_zip :: FunPtr (Ptr C'zip -> Ptr C'zip -> CInt -> CInt -> CSize -> CSize -> IO (Ptr C'zip_source))
- Codec.Archive.LibZip.LowLevel: p'zip_stat :: FunPtr (Ptr C'zip -> CString -> CInt -> Ptr C'zip_stat -> IO CInt)
- Codec.Archive.LibZip.LowLevel: p'zip_stat_index :: FunPtr (Ptr C'zip -> CInt -> CInt -> Ptr C'zip_stat -> IO CInt)
- Codec.Archive.LibZip.LowLevel: p'zip_stat_init :: FunPtr (Ptr C'zip_stat -> IO ())
- Codec.Archive.LibZip.LowLevel: p'zip_strerror :: FunPtr (Ptr C'zip -> IO CString)
- Codec.Archive.LibZip.LowLevel: p'zip_unchange :: FunPtr (Ptr C'zip -> CInt -> IO CInt)
- Codec.Archive.LibZip.LowLevel: p'zip_unchange_all :: FunPtr (Ptr C'zip -> IO CInt)
- Codec.Archive.LibZip.LowLevel: p'zip_unchange_archive :: FunPtr (Ptr C'zip -> IO CInt)
- Codec.Archive.LibZip.LowLevel: type C'zip_source_callback = FunPtr (Ptr () -> Ptr () -> CSize -> C'zip_source_cmd -> IO CSize)
- Codec.Archive.LibZip.LowLevel: type C'zip_source_cmd = CUInt

Files

Codec/Archive/LibZip.hs view
@@ -94,7 +94,7 @@     , lift     ) where -import Codec.Archive.LibZip.LowLevel+import Bindings.LibZip import Codec.Archive.LibZip.Types import Codec.Archive.LibZip.Errors 
Codec/Archive/LibZip/Errors.hs view
@@ -13,7 +13,7 @@ import Foreign.Storable (peek) import qualified Control.Exception as E -import Codec.Archive.LibZip.LowLevel+import Bindings.LibZip import Codec.Archive.LibZip.Types  errFromCInt :: CInt -> ZipError@@ -31,7 +31,7 @@     | otherwise = alloca $ \zep -> do          c'zip_file_error_get zf zep nullPtr          peek zep >>= return . errFromCInt-                                    + -- | Wrapper to catch library errors. catchZipError :: IO a -> (ZipError -> IO a) -> IO a catchZipError f h = E.catchJust ifZipError f h
Codec/Archive/LibZip/LegacyZeroZero.hsc view
@@ -1,5 +1,7 @@ -- | This module is a backwards compatible replacement for @Codec.Archive.LibZip@ module of LibZip 0.0.x. This API is deprecated, please don't use it in new code.-module Codec.Archive.LibZip.LegacyZeroZero (+module Codec.Archive.LibZip.LegacyZeroZero+  {-# DEPRECATED "Please upgrade to monadic Codec.Archive.LibZip" #-}+  (   -- * Types   Zip,ZipFile,OpenFlag(..),FileFlag(..),ZipError(..)   ,Word8@@ -24,7 +26,7 @@ import qualified Control.Exception as E import qualified Data.ByteString as B -import Codec.Archive.LibZip.LowLevel+import Bindings.LibZip import Codec.Archive.LibZip.Types import Codec.Archive.LibZip.Errors 
− Codec/Archive/LibZip/LowLevel.hsc
@@ -1,240 +0,0 @@-#include <bindings.dsl.h>-#include <zip.h>---- | This module provides automatic low-level bindings to @libzip@ library.--- See also:------   * @libzip@ documention: <http://nih.at/libzip/libzip.html> and @zip.h@------   * @bindings-DSL@ documentation:---     <http://bitbucket.org/mauricio/bindings-dsl/wiki/Home>--module Codec.Archive.LibZip.LowLevel where-#strict_import--#opaque_t zip-#opaque_t zip_file-#opaque_t zip_source---- flags for zip_open--#num ZIP_CREATE-#num ZIP_EXCL-#num ZIP_CHECKCONS---- flags for zip_name_locate, zip_fopen, zip_stat, ...--#num ZIP_FL_NOCASE-#num ZIP_FL_NODIR-#num ZIP_FL_COMPRESSED-#num ZIP_FL_UNCHANGED-#num ZIP_FL_RECOMPRESS---- archive global flags flags--#num ZIP_AFL_TORRENT---- libzip error codes--#num ZIP_ER_OK-#num ZIP_ER_MULTIDISK-#num ZIP_ER_RENAME-#num ZIP_ER_CLOSE-#num ZIP_ER_SEEK-#num ZIP_ER_READ-#num ZIP_ER_WRITE-#num ZIP_ER_CRC-#num ZIP_ER_ZIPCLOSED-#num ZIP_ER_NOENT-#num ZIP_ER_EXISTS-#num ZIP_ER_OPEN-#num ZIP_ER_TMPOPEN-#num ZIP_ER_ZLIB-#num ZIP_ER_MEMORY-#num ZIP_ER_CHANGED-#num ZIP_ER_COMPNOTSUPP-#num ZIP_ER_EOF-#num ZIP_ER_INVAL-#num ZIP_ER_NOZIP-#num ZIP_ER_INTERNAL-#num ZIP_ER_INCONS-#num ZIP_ER_REMOVE-#num ZIP_ER_DELETED---- type of system error value--#num ZIP_ET_NONE-#num ZIP_ET_SYS-#num ZIP_ET_ZLIB---- compression methods--#num ZIP_CM_DEFAULT-#num ZIP_CM_STORE-#num ZIP_CM_SHRINK-#num ZIP_CM_REDUCE_1-#num ZIP_CM_REDUCE_2-#num ZIP_CM_REDUCE_3-#num ZIP_CM_REDUCE_4-#num ZIP_CM_IMPLODE-#num ZIP_CM_DEFLATE-#num ZIP_CM_DEFLATE64-#num ZIP_CM_PKWARE_IMPLODE-#num ZIP_CM_BZIP2-#num ZIP_CM_LZMA-#num ZIP_CM_TERSE-#num ZIP_CM_LZ77-#num ZIP_CM_WAVPACK-#num ZIP_CM_PPMD---- encryption methods--#num ZIP_EM_NONE-#num ZIP_EM_TRAD_PKWARE-#num ZIP_EM_UNKNOWN--#integral_t enum zip_source_cmd-#num ZIP_SOURCE_OPEN-#num ZIP_SOURCE_READ-#num ZIP_SOURCE_CLOSE-#num ZIP_SOURCE_STAT-#num ZIP_SOURCE_ERROR-#num ZIP_SOURCE_FREE---- typedef ssize_t (*zip_source_callback)(void *state, void *data,---                                        size_t len, enum zip_source_cmd cmd);-#callback zip_source_callback , Ptr () -> Ptr () -> CSize -> <zip_source_cmd> -> IO CSize--#opaque_t time_t--#starttype struct zip_stat-#field name, Ptr CChar-#field index, CInt-#field crc, CUInt-#field mtime, CTime-#field size, CSize-#field comp_size, CSize-#field comp_method, CUShort-#field encryption_method, CUShort-#stoptype---- int zip_add(struct zip *, const char *, struct zip_source *);-#ccall zip_add , Ptr <zip> -> CString -> Ptr <zip_source> -> IO CInt---- int zip_add_dir(struct zip *, const char *);-#ccall zip_add_dir , Ptr <zip> -> CString -> IO CInt---- int zip_close(struct zip *);-#ccall zip_close , Ptr <zip> -> IO CInt---- int zip_delete(struct zip *, int);-#ccall zip_delete , Ptr <zip> -> CInt -> IO CInt---- void zip_error_clear(struct zip *);-#ccall zip_error_clear , Ptr <zip> -> IO ()---- void zip_error_get(struct zip *, int *, int *);-#ccall zip_error_get , Ptr <zip> -> Ptr CInt -> Ptr CInt -> IO ()---- int zip_error_get_sys_type(int);-#ccall zip_error_get_sys_type , CInt -> IO CInt---- int zip_error_to_str(char *, size_t, int, int);-#ccall zip_error_to_str , Ptr Char -> CSize -> CInt -> CInt -> IO CInt---- int zip_fclose(struct zip_file *);-#ccall zip_fclose , Ptr <zip_file> -> IO CInt---- void zip_file_error_clear(struct zip_file *);-#ccall zip_file_error_clear , Ptr <zip_file> -> IO ()---- void zip_file_error_get(struct zip_file *, int *, int *);-#ccall zip_file_error_get , Ptr <zip_file> -> Ptr CInt -> Ptr CInt -> IO ()---- const char *zip_file_strerror(struct zip_file *);-#ccall zip_file_strerror , Ptr <zip_file> -> IO CString---- struct zip_file *zip_fopen(struct zip *, const char *, int);-#ccall zip_fopen , Ptr <zip> -> CString -> CInt -> IO (Ptr <zip_file>)---- struct zip_file *zip_fopen_index(struct zip *, int, int);-#ccall zip_fopen_index , Ptr <zip> -> CInt -> CInt -> IO (Ptr <zip_file>)---- ssize_t zip_fread(struct zip_file *, void *, size_t);-#ccall zip_fread , Ptr <zip_file> -> Ptr () -> CSize -> IO CSize---- const char *zip_get_archive_comment(struct zip *, int *, int);-#ccall zip_get_archive_comment , Ptr <zip> -> Ptr CInt -> CInt -> IO CString---- int zip_get_archive_flag(struct zip *, int, int);-#ccall zip_get_archive_flag , Ptr <zip> -> CInt -> CInt -> IO CInt---- const char *zip_get_file_comment(struct zip *, int, int *, int);-#ccall zip_get_file_comment , Ptr <zip> -> CInt -> Ptr CInt -> CInt -> IO CString---- const char *zip_get_name(struct zip *, int, int);-#ccall zip_get_name , Ptr <zip> -> CInt -> CInt -> IO CString---- int zip_get_num_files(struct zip *);-#ccall zip_get_num_files , Ptr <zip> -> IO CInt---- int zip_name_locate(struct zip *, const char *, int);-#ccall zip_name_locate , Ptr <zip> -> CString -> CInt -> IO CInt---- struct zip *zip_open(const char *, int, int *);-#ccall zip_open , CString -> CInt -> Ptr CInt -> IO (Ptr <zip>)---- int zip_rename(struct zip *, int, const char *);-#ccall zip_rename , Ptr <zip> -> CInt -> CString -> IO CInt---- int zip_replace(struct zip *, int, struct zip_source *);-#ccall zip_replace , Ptr <zip> -> CInt -> Ptr <zip_source> -> IO CInt---- int zip_set_archive_comment(struct zip *, const char *, int);-#ccall zip_set_archive_comment , Ptr <zip> -> CString -> CInt -> IO CInt---- int zip_set_archive_flag(struct zip *, int, int);-#ccall zip_set_archive_flag , Ptr <zip> -> CInt -> CInt -> IO CInt---- int zip_set_file_comment(struct zip *, int, const char *, int);-#ccall zip_set_file_comment , Ptr <zip> -> CInt -> CString -> CInt -> IO CInt---- struct zip_source *zip_source_buffer(struct zip *, const void *, off_t, int);-#ccall zip_source_buffer , Ptr <zip> -> Ptr () -> CSize -> CInt -> IO (Ptr <zip_source>)---- struct zip_source *zip_source_file(struct zip *, const char *, off_t, off_t);-#ccall zip_source_file , Ptr <zip> -> CString -> CSize -> CSize -> IO (Ptr <zip_source>)---- struct zip_source *zip_source_filep(struct zip *, FILE *, off_t, off_t);-#ccall zip_source_filep , Ptr <zip> -> Ptr CFile -> CSize -> CSize -> IO (Ptr <zip_source>)---- void zip_source_free(struct zip_source *);-#ccall zip_source_free , Ptr <zip_source> -> IO ()---- struct zip_source *zip_source_function(struct zip *, zip_source_callback, void *);-#ccall zip_source_function , Ptr <zip> -> <zip_source_callback> -> Ptr () -> IO (Ptr <zip_source>)---- struct zip_source *zip_source_zip(struct zip *, struct zip *, int, int, off_t, off_t);-#ccall zip_source_zip , Ptr <zip> -> Ptr <zip> -> CInt -> CInt -> CSize -> CSize -> IO (Ptr <zip_source>)---- int zip_stat(struct zip *, const char *, int, struct zip_stat *);-#ccall zip_stat , Ptr <zip> -> CString -> CInt -> Ptr <zip_stat> -> IO CInt---- int zip_stat_index(struct zip *, int, int, struct zip_stat *);-#ccall zip_stat_index , Ptr <zip> -> CInt -> CInt -> Ptr <zip_stat> -> IO CInt---- void zip_stat_init(struct zip_stat *);-#ccall zip_stat_init , Ptr <zip_stat> -> IO ()---- const char *zip_strerror(struct zip *);-#ccall zip_strerror , Ptr <zip> -> IO CString---- int zip_unchange(struct zip *, int);-#ccall zip_unchange , Ptr <zip> -> CInt -> IO CInt---- int zip_unchange_all(struct zip *);-#ccall zip_unchange_all , Ptr <zip> -> IO CInt---- int zip_unchange_archive(struct zip *);-#ccall zip_unchange_archive , Ptr <zip> -> IO CInt-
Codec/Archive/LibZip/Types.hs view
@@ -24,7 +24,7 @@ import Foreign.Ptr (Ptr, nullPtr) import qualified Control.Exception as E -import Codec.Archive.LibZip.LowLevel+import Bindings.LibZip  -- | Handler of the open zip file. type Zip = Ptr C'zip
LibZip.cabal view
@@ -1,5 +1,5 @@ Name:          LibZip-Version:       0.1.0+Version:       0.2.0 License:       BSD3 License-File:  LICENSE Author:        Sergey Astanin@@ -23,25 +23,19 @@   , Tests/MonadicTests.hs, Tests/test.zip  Library-  Extensions:-      ForeignFunctionInterface   Exposed-Modules:       Codec.Archive.LibZip-      Codec.Archive.LibZip.LowLevel       Codec.Archive.LibZip.Types       Codec.Archive.LibZip.LegacyZeroZero   Other-Modules:       Codec.Archive.LibZip.Errors   Build-Depends:       base >= 4.0 && < 4.3-    , bindings-DSL >= 1.0 && < 1.1+    , bindings-libzip >= 0.1 && < 0.2     , bytestring     , filepath     , time     , mtl-  PkgConfig-Depends:-      libzip >= 0.9   GHC-Options:       -Wall- 
Setup.lhs view
@@ -10,7 +10,7 @@ > > > runUnitTests _ _ _ _ =->   system "runhaskell -lzip runTests.hs" >>=+>   system "runhaskell -lzip -fno-warn-warnings-deprecations runTests.hs" >>= >   onExit "\nSome tests did not pass." () > > onExit :: String -> a -> ExitCode -> IO a