Barracuda Application Server C/C++ Reference
Native APIs, integration guides, and platform interfaces
CspReader Struct Reference

Detailed Description

Abstract interface class for reading the "dat" file generated by HttpLink.

See also
FileCspReader
CspReader_Read

#include <CspRunTm.h>

Inheritance diagram for CspReader:

Public Member Functions

bool isValid ()
 
int read (void *data, U32 offset, U32 size, bool blockStart)
 Invoke the installed CspReader_Read callback synchronously. More...
 
void setIsValid ()
 Mark the implementation initialized after opening/checking its data. More...
 

Member Function Documentation

◆ isValid()

bool CspReader::isValid ( )
Returns
True when readCB is non-NULL and the initialization marker is set. This checks object initialization, not whether a file remains open or readable. Derived readers must manage their resource state.

◆ read()

int CspReader::read ( void *  data,
U32  offset,
U32  size,
bool  blockStart 
)

Invoke the installed CspReader_Read callback synchronously.

Parameters
dataWritable destination for size bytes.
offsetAbsolute byte offset in the backing data.
sizeExact byte count.
blockStartTrue identifies the start of a CSP data block.
Returns
Zero on a complete read, negative on failure; no partial count. The reader must be initialized with a non-NULL callback.

◆ setIsValid()

void CspReader::setIsValid ( )

Mark the implementation initialized after opening/checking its data.

This does not install a callback or validate the backing file.