Barracuda Application Server C/C++ Reference
Native APIs, integration guides, and platform interfaces
IoIntfCspReader.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: IoIntfCspReader.h 5978 2026-09-11 16:13:48Z wini $
15 *
16 * COPYRIGHT: Real Time Logic LLC, 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 __IoIntfCspReader_h
41#define __IoIntfCspReader_h
42
43#include <CspRunTm.h>
44#include <IoIntf.h>
45
50typedef struct IoIntfCspReader
51#ifdef __cplusplus
52: public CspReader
53{
56
65 IoIntfCspReader(IoIntf* io, const char* pathName);
66
71
78 int close();
79
80 private:
81#else
82{
83 CspReader reader;
84#endif
85 U32 currentOffset;
86 IoIntf_SeekAndRead seekAndReadFp;
87 ResIntfPtr fp;
89
90#ifdef __cplusplus
91extern "C" {
92#endif
99 IoIntf* io,
100 const char* pathName);
109#define IoIntfCspReader_destructor(o) IoIntfCspReader_close(o);
110#ifdef __cplusplus
111}
112inline IoIntfCspReader::IoIntfCspReader(IoIntf* io, const char* pathName) {
113 IoIntfCspReader_constructor(this, io, pathName); }
117 return IoIntfCspReader_close(this); }
118#endif
119
120
121#endif
BA_API void IoIntfCspReader_constructor(IoIntfCspReader *o, IoIntf *io, const char *pathName)
Initialize a CSP data reader; see IoIntfCspReader::IoIntfCspReader.
#define IoIntfCspReader_destructor(o)
Close without freeing the object itself.
Definition: IoIntfCspReader.h:109
BA_API int IoIntfCspReader_close(IoIntfCspReader *o)
Close the reader after all its users have stopped.
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
Abstract interface class for reading the "dat" file generated by HttpLink.
Definition: CspRunTm.h:126
The IoIntfCspReader, which implements the abstract CspReader interface, makes it possible to open a "...
Definition: IoIntfCspReader.h:53
int close()
Close and consume the file handle, even if closing fails.
Definition: IoIntfCspReader.h:116
~IoIntfCspReader()
Close an open file, ignoring the close status.
Definition: IoIntfCspReader.h:114
IoIntfCspReader()
Uninitialized storage; initialize before use or destruction.
Definition: IoIntfCspReader.h:55
The IoIntf class specifies an abstract file API, implementations include ZipIo, DiskIo,...
Definition: IoIntf.h:482