Barracuda Application Server C/C++ Reference
NO
|
C Server Pages make it possible to insert C or C++ code into HTML template files by using special tags.
The technology is similar to other server-side technologies such as JSP, PHP, ASP, etc.
See the CSP user manual for more information on CSP.
Classes | |
struct | CspReader |
Abstract interface class for reading the "dat" file generated byHttpLink. More... | |
struct | FileCspReader |
Example code that shows you how to write a CspReader driver object. More... | |
Typedefs | |
typedef void(* | CspInit) (struct HttpDir *cspRoot, struct CspReader *reader) |
Function prototype for the "initialize function" generated by CspLink. More... | |
typedef int(* | CspReader_Read) (struct CspReader *o, void *data, U32 offset, U32 size, int blockStart) |
Prototype for the CspReader callback function. More... | |
typedef struct CspReader | CspReader |
Abstract interface class for reading the "dat" file generated byHttpLink. More... | |
typedef FileCspReader | FileCspReader |
Example code that shows you how to write a CspReader driver object. More... | |
Function prototype for the "initialize function" generated by CspLink.
CspLink groups together CSP pages and generates a CspInit function. You must call the method at system startup.
cspRoot | the position in the virtual files system where you want the CSP to be installed. |
reader | the interface between the CSP data file and the generated CSP engine. |
Abstract interface class for reading the "dat" file generated byHttpLink.
typedef int(* CspReader_Read) (struct CspReader *o, void *data, U32 offset, U32 size, int blockStart) |
Prototype for the CspReader callback function.
o | CspReader |
data | a pointer to the data area where the data read should be copied. |
offset | the offset position into the "dat" file. |
size | number of bytes to read. |
blockStart | TRUE if this is the beginning of a block. All blocks are protected by a magic number. The httpDiskRead function can use this for integrity check. |
typedef FileCspReader FileCspReader |
Example code that shows you how to write a CspReader driver object.
The Web-Server uses the CspReader driver object when requesting data from the "dat" file generated by CspLink.
This example code uses the file system for reading the "dat" file. The constructor opens the "dat" file and method "diskRead" uses the Posix function fseek for setting the file pointer to the requested offset position and function fread for reading the actual data.