44#ifndef SharkSslStandalone
45#include "CspCompileCommon.h"
68__attribute__((__packed__))
72typedef struct GzipHeader GzipHeader;
75#define FLG_FTEXT ( 1 << 0 )
76#define FLG_FHCRC ( 1 << 1 )
77#define FLG_FEXTRA ( 1 << 2 )
78#define FLG_FNAME ( 1 << 3 )
79#define FLG_FCOMMENT ( 1 << 4 )
85 U8 uncompressedSize[4];
88__attribute__((__packed__))
92typedef struct GzipTrailer GzipTrailer;
116 struct CspReader* o,
void* data,
U32 offset,
U32 size,
int blockStart);
118#define CspReader_validFlag 0xA503
129 void operator delete(
void* d) {
if(d)
::baFree(d); }
130 void *
operator new(size_t,
void *place) {
return place; }
131 void operator delete(
void*,
void *) { }
144 int read(
void* data,
U32 offset,
U32 size,
bool blockStart);
162#define CspReader_constructor(o, httpDiskRead) do {\
163 (o)->readCB = httpDiskRead; \
164 (o)->validFlag = (U16)~CspReader_validFlag; \
170#define CspReader_isValid(o) (((CspReader*)o)->readCB != 0 && \
171 ((CspReader*)o)->validFlag == CspReader_validFlag)
175#define CspReader_setIsValid(o) ((CspReader*)o)->validFlag=CspReader_validFlag
179#define CspReader_read(httpData, data, offset, size, blockStart) \
180 (*((CspReader*)httpData)->readCB)((CspReader*)httpData, data, \
181 offset, size, blockStart)
192#ifndef SharkSslStandalone
195typedef struct HttpStaticMemPage
200 HttpDiskBlock mimeBlock;
201 HttpDiskBlock payloadBlock;
209BA_API
int httpWriteSection(
211BA_API
int httpUnzipAndWrite(
CspReader* data,
227BA_API
void HttpStaticMemPage_loadAndInit(HttpStaticMemPage* o,
229 U32 nameOffset,
U32 nameSize,
230 U32 mimeOffset,
U32 mimeSize,
231 U32 payloadOffset,
U32 payloadSize,
232 char isCompressed,
HttpDir* parent);
234BA_API
void HttpDynamicMemPage_loadAndInit(
237 U32 nameOffset,
U32 nameSize);
#define CspReader_isValid(o)
Definition: CspRunTm.h:170
struct CspReader CspReader
Abstract interface class for reading the "dat" file generated by HttpLink.
#define CspReader_read(httpData, data, offset, size, blockStart)
Invoke the installed CspReader_Read callback synchronously.
Definition: CspRunTm.h:179
int(* CspReader_Read)(struct CspReader *o, void *data, U32 offset, U32 size, int blockStart)
Prototype for the CspReader callback function.
Definition: CspRunTm.h:115
void * baMalloc(size_t size)
Allocate uninitialized storage using the target's configured allocator.
void baFree(void *p)
Release storage using the target's configured allocator.
void(* HttpPage_Service)(struct HttpPage *page, HttpRequest *request, HttpResponse *response)
The HttpPage service function.
Definition: HttpServer.h:2589
uint16_t U16
Unsigned 16-bit integer.
Definition: GenPrimT.h:91
uint32_t U32
Unsigned 32-bit integer.
Definition: GenPrimT.h:93
uint8_t U8
Unsigned 8-bit integer.
Definition: GenPrimT.h:89
Abstract interface class for reading the "dat" file generated by HttpLink.
Definition: CspRunTm.h:126
void setIsValid()
Mark the implementation initialized after opening/checking its data.
Definition: CspRunTm.h:147
bool isValid()
Definition: CspRunTm.h:184
int read(void *data, U32 offset, U32 size, bool blockStart)
Invoke the installed CspReader_Read callback synchronously.
Definition: CspRunTm.h:187
An instance of the HttpDir class, which is a collection of zero or more resources,...
Definition: HttpServer.h:2777
An HttpPage, which is typically created by the CSP compiler, is similar to a Java servlet.
Definition: HttpServer.h:2656
The HttpServer creates an HttpRequest object when the HttpServer parses a client request.
Definition: HttpServer.h:950
This object is used when sending response messages back to the client.
Definition: HttpServer.h:1379