Barracuda Application Server C/C++ Reference
NO
|
43 #include "BaServerLib.h"
44 #include "HttpServer.h"
48 typedef void (*HttpRdFilter_Service)(
struct HttpRdFilter* o,
59 HttpRdFilter_Service serviceFp;
63 BA_API
void HttpRdFilter_constructor(
64 HttpRdFilter* o,
const char* ext, HttpRdFilter_Service serviceFp);
241 DoubleList filterList;
257 BA_API
void HttpResRdr_constructor(
260 BA_API
void HttpResRdr_constructor2(
265 BA_API
void HttpResRdr_destructor(
HttpResRdr* o);
267 #define HttpResRdr_setMaxAge(o, maxAgeMA) (o)->maxAge=maxAgeMA
268 #define HttpResRdr_setAuthenticator(o, authenticator, realm) \
269 HttpDir_setAuthenticator((HttpDir*)o, authenticator, realm)
270 BA_API
void HttpResRdr_sendFile(
IoIntf* io,
const char* name,
277 #define HttpResRdr_getIo(o) (o)->io
280 inline HttpResRdr::HttpResRdr(
IoIntf* io,
const char* domain,
const char* p404,
282 HttpResRdr_constructor2(
this, io, domain, p404, alloc, priority);
284 inline HttpResRdr::HttpResRdr(
IoIntf* io,
const char* dirName,
286 HttpResRdr_constructor(
this, io, dirName, alloc, priority);
290 return HttpResRdr_insertPrologDir(
this, dir);
293 inline HttpResRdr::~HttpResRdr(){
294 HttpResRdr_destructor(
this);
297 return HttpResRdr_installFilter(
this, filter);
300 HttpResRdr_setMaxAge(
this, maxAge);
304 HttpResRdr_sendFile(io,name,st,cmd);
307 return HttpResRdr_getIo(
this);
Memory allocation and deallocation Interface class.
Definition: AllocatorIntf.h:83
int(* HttpDir_Service)(struct HttpDir *o, const char *relPath, HttpCommand *cmd)
The HttpDir service callback function.
Definition: HttpServer.h:2350
S64 BaTime
An arithmetic type representing calendar time with epoch of 1970-01-01 00:00:10 GMT – i....
Definition: GenPrimT.h:93
An instance of the HttpDir class, which is a collection of zero or more resources,...
Definition: HttpServer.h:2384
The IoIntf class specifies an abstract file API, implementations include ZipIo, DiskIo,...
Definition: IoIntf.h:377
Superclass for HttpResRdr filters.
Definition: HttpResRdr.h:57
IoIntf * getIo()
Returns the IoIntf used by the HttpResRdr.
Definition: HttpResRdr.h:306
void setMaxAge(BaTime maxAge)
Makes the HttpResRdr instance set the HTTP header "Cache-Control: max-age" for all resources.
Definition: HttpResRdr.h:299
ResIntfPtr(* IoIntf_DeflateGzip)(ResIntfPtr resPtr, const char *name, ThreadMutex *m, BaFileSize *size, BaBool *isCompressed)
Deflate a file or portion of a file to temporary storage.
Definition: IoIntf.h:269
The HttpCommand class is a container class for the HttpRequest and HttpResponse command pair.
Definition: HttpServer.h:1834
The HTTP resource reader searches and presents IoIntf resources to HTTP clients requesting such infor...
Definition: HttpResRdr.h:144
static void sendFile(IoIntf *io, const char *name, IoStat *st, HttpCommand *cmd)
Send resource to a client.
Definition: HttpResRdr.h:302
int insertPrologDir(HttpDir *dir)
Insert a prologue HttpDir.
Definition: HttpResRdr.h:289
Resource information.
Definition: IoIntf.h:168
int installFilter(HttpRdFilter *filter)
Install a filter.
Definition: HttpResRdr.h:296