Barracuda Application Server C/C++ Reference
Native APIs, integration guides, and platform interfaces
IoIntfZipReader.h
Go to the documentation of this file.
1/*
2 * ____ _________ __ _
3 * / __ \___ ____ _/ /_ __(_)___ ___ ___ / / ____ ____ _(_)____
4 * / /_/ / _ \/ __ `/ / / / / / __ `__ \/ _ \/ / / __ \/ __ `/ / ___/
5 * / _, _/ __/ /_/ / / / / / / / / / / / __/ /___/ /_/ / /_/ / / /__
6 * /_/ |_|\___/\__,_/_/ /_/ /_/_/ /_/ /_/\___/_____/\____/\__, /_/\___/
7 * /____/
8 *
9 * Barracuda Embedded Web-Server
10 *
11 ****************************************************************************
12 * HEADER
13 *
14 * $Id: IoIntfZipReader.h 5978 2026-09-11 16:13:48Z wini $
15 *
16 * COPYRIGHT: Real Time Logic LLC, 2006-2008
17 *
18 * This software is copyrighted by and is the sole property of Real
19 * Time Logic LLC. All rights, title, ownership, or other interests in
20 * the software remain the property of Real Time Logic LLC. This
21 * software may only be used in accordance with the terms and
22 * conditions stipulated in the corresponding license agreement under
23 * which the software has been supplied. Any unauthorized use,
24 * duplication, transmission, distribution, or disclosure of this
25 * software is expressly forbidden.
26 *
27 * This Copyright notice may not be removed or modified without prior
28 * written consent of Real Time Logic LLC.
29 *
30 * Real Time Logic LLC. reserves the right to modify this software
31 * without notice.
32 *
33 * http://www.realtimelogic.com
34 ****************************************************************************
35 *
36 *
37 */
40#ifndef __IoIntfZipReader_h
41#define __IoIntfZipReader_h
42
43#include <ZipFileIterator.h>
44#include <IoIntf.h>
45
51typedef struct IoIntfZipReader
52#ifdef __cplusplus
53: public ZipReader
54{
58
66 IoIntfZipReader(IoIntf* io, const char* pathName);
67
72
79 int close();
80
85 int getECode();
86
87 private:
88#else
89{
90 ZipReader reader;
91#endif
92 U32 currentOffset;
93 IoIntf_SeekAndRead seekAndReadFp;
94 ResIntfPtr fp;
95 int lastECode;
97
98#ifdef __cplusplus
99extern "C" {
100#endif
107 IoIntf* io,
108 const char* pathName);
116#define IoIntfZipReader_destructor(o) IoIntfZipReader_close(o);
120#define IoIntfZipReader_getECode(o) (o)->lastECode
121#ifdef __cplusplus
122}
123inline IoIntfZipReader::IoIntfZipReader(IoIntf* io, const char* pathName) {
124 IoIntfZipReader_constructor(this, io, pathName); }
128 return IoIntfZipReader_close(this); }
129
131 return IoIntfZipReader_getECode(this); }
132#endif
133
134
135#endif
BA_API void IoIntfZipReader_constructor(IoIntfZipReader *o, IoIntf *io, const char *pathName)
Initialize and open a ZIP reader; see IoIntfZipReader::IoIntfZipReader.
#define IoIntfZipReader_getECode(o)
Read the stored construction/read status.
Definition: IoIntfZipReader.h:120
#define IoIntfZipReader_destructor(o)
Close without freeing the object itself.
Definition: IoIntfZipReader.h:116
BA_API int IoIntfZipReader_close(IoIntfZipReader *o)
Close the reader; see IoIntfZipReader::close for lifetime requirements.
int(* IoIntf_SeekAndRead)(ResIntfPtr super, BaFileSize offset, void *buf, size_t maxSize, size_t *size)
Perform a combined seek and read on a resource.
Definition: IoIntf.h:461
uint32_t U32
Unsigned 32-bit integer.
Definition: GenPrimT.h:93
The IoIntfZipReader, which implements the abstract ZipReader interface, makes it possible for a ZipIo...
Definition: IoIntfZipReader.h:54
int getECode()
Definition: IoIntfZipReader.h:130
IoIntfZipReader()
Uninitialized storage; call IoIntfZipReader_constructor before use or destruction.
Definition: IoIntfZipReader.h:57
~IoIntfZipReader()
Close any open resource, ignoring the close status.
Definition: IoIntfZipReader.h:125
int close()
Close and consume the underlying resource, even if closing fails.
Definition: IoIntfZipReader.h:127
The IoIntf class specifies an abstract file API, implementations include ZipIo, DiskIo,...
Definition: IoIntf.h:482
Abstract interface class for reading a ZipFile.
Definition: ZipFileIterator.h:74