inkjar.h revision e68feaa695211d21d95a3b9dda731c51d7d69daf
#ifndef __INKJAR_JAR_H_
#define __INKJAR_JAR_H_
/*
* Copyright (C) 1999 Bryan Burns
* Copyright (C) 2004 Johan Ceuppens
* Released under GNU GPL, read the file 'COPYING' for more information
*/
#ifdef HAVE_CONFIG_H
# include "config.h"
#endif
# include <zlib.h>
#endif
#ifdef HAVE_ZLIB_H
# include <zlib.h>
#endif
#ifdef HAVE_INTTYPES_H
# include <inttypes.h>
#else
# ifdef HAVE_STDINT_H
# include <stdint.h>
# endif
#endif
#include <glib.h>
#include <cstdio>
unsigned const RDSZ = 4096;
//#define DEBUG 1 //uncommment for debug messages
//fixme: The following will be removed
#define CEN_MODTIME 12
#define CEN_MODDATE 14
#define CEN_CRC 16
#define CEN_CSIZE 20
#define CEN_USIZE 24
#define CEN_FNLEN 28
#define CEN_EFLEN 30
#define CEN_COMLEN 32
#define CEN_OFFSET 42
/* macros */
/*
* JarFile:
*
* This is a wrapper class for canonical jarfile functions like reading,
* writing, seeking etc. JarFile is a dumb class with no state information.
*
* All memory allocations are done with g_malloc.
*/
gchar *get_last_filename() const;
bool open();
bool close();
bool init_inflation();
bool read_signature();
unsigned int &file_length,
}; // class JarFile
/*
* JarFileReader:
*
* This provides some smarter functions for operating on a jarfile object
* It should be able to grep for files or return the contents of a specific
* file.
*/
//fixme return types are incorrect
}; // class JarFileReader
} // namespace Inkjar
#endif // header guard
/*
Local Variables:
mode:c++
c-file-style:"stroustrup"
c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
indent-tabs-mode:nil
fill-column:99
End:
*/
// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4 :