|
C/C++ Reference
|
00001 /* 00002 * ____ _________ __ _ 00003 * / __ \___ ____ _/ /_ __(_)___ ___ ___ / / ____ ____ _(_)____ 00004 * / /_/ / _ \/ __ `/ / / / / / __ `__ \/ _ \/ / / __ \/ __ `/ / ___/ 00005 * / _, _/ __/ /_/ / / / / / / / / / / / __/ /___/ /_/ / /_/ / / /__ 00006 * /_/ |_|\___/\__,_/_/ /_/ /_/_/ /_/ /_/\___/_____/\____/\__, /_/\___/ 00007 * /____/ 00008 * 00009 * Barracuda Embedded Web-Server 00010 * 00011 **************************************************************************** 00012 * HEADER 00013 * 00014 * $Id: ZipIo.h 2316 2011-01-29 00:49:18Z wini $ 00015 * 00016 * COPYRIGHT: Real Time Logic LLC, 2006-2008 00017 * http://www.realtimelogic.com 00018 * 00019 * The copyright to the program herein is the property of 00020 * Real Time Logic. The program may be used or copied only 00021 * with the written permission from Real Time Logic LLC or 00022 * in accordance with the terms and conditions stipulated in 00023 * the agreement under which the program has been supplied. 00024 **************************************************************************** 00025 * 00026 * 00027 */ 00028 00029 #ifndef __ZipIo_h 00030 #define __ZipIo_h 00031 00032 #include "IoIntf.h" 00033 #include "VirDir.h" 00034 #include "ZipFileIterator.h" 00035 00082 typedef struct ZipIo 00083 #ifdef __cplusplus 00084 : public IoIntf 00085 { 00086 ZipIo() {} 00087 void *operator new(size_t s) { return ::baMalloc(s); } 00088 void operator delete(void* d) { if(d) ::baFree(d); } 00089 void *operator new(size_t, void *place) { return place; } 00090 void operator delete(void*, void *) { } 00091 00116 ZipIo(ZipReader* reader,size_t size=256,AllocatorIntf* alloc=0); 00117 00120 ~ZipIo(); 00121 00124 ZipErr getECode(); 00125 #if 0 00126 } 00127 #endif 00128 #else 00129 { 00130 IoIntf super; /* Inherits from IoIntf. */ 00131 #endif 00132 VirDirNode root; 00133 ZipContainer zc; 00134 AllocatorIntf* alloc; 00135 char* password; 00136 U16 passwordLen; 00137 ZipErr ecode; 00138 BaBool passwordRequired; 00139 BaBool passwordBin; 00140 } ZipIo; 00141 00142 #ifdef __cplusplus 00143 extern "C" { 00144 #endif 00145 BA_API void ZipIo_constructor( 00146 ZipIo* o, 00147 ZipReader* reader, 00148 size_t size, 00149 AllocatorIntf* alloc); 00150 BA_API void ZipIo_destructor(ZipIo* o); 00151 #define ZipIo_getECode(o) (o)->ecode 00152 #ifdef __cplusplus 00153 } 00154 inline ZipIo::ZipIo(ZipReader* reader,size_t size,AllocatorIntf* alloc) { 00155 ZipIo_constructor(this,reader,size,alloc); 00156 } 00157 inline ZipIo::~ZipIo() { 00158 ZipIo_destructor(this); 00159 } 00160 inline ZipErr ZipIo::getECode() { 00161 return ZipIo_getECode(this); 00162 } 00163 #endif 00164 /* end of IO */ 00166 00167 #endif