#include "HttpServer.h"
#include "CspCompileCommon.h"
Go to the source code of this file.
◆ CspReader_constructor
| #define CspReader_constructor |
( |
|
o, |
|
|
|
httpDiskRead |
|
) |
| |
Value: do {\
(o)->readCB = httpDiskRead; \
(o)->validFlag = (
U16)~CspReader_validFlag; \
}while(0)
uint16_t U16
Unsigned 16-bit integer.
Definition: GenPrimT.h:91
Initialize an invalid reader interface; does not open a file.
- Parameters
-
| o | Required storage to initialize. |
| httpDiskRead | Required CspReader_Read callback, retained for future calls. Call setIsValid() only after the derived implementation initializes successfully. |
◆ CspReader_isValid
| #define CspReader_isValid |
( |
|
o | ) |
|
Value:
((
CspReader*)o)->validFlag == CspReader_validFlag)
Abstract interface class for reading the "dat" file generated by HttpLink.
Definition: CspRunTm.h:126
- 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.
- Parameters
-
| o | Required initialized reader. |
◆ CspReader_read
| #define CspReader_read |
( |
|
httpData, |
|
|
|
data, |
|
|
|
offset, |
|
|
|
size, |
|
|
|
blockStart |
|
) |
| |
Value:
offset, size, blockStart)
Invoke the installed CspReader_Read callback synchronously.
- Parameters
-
| data | Writable destination for size bytes. |
| offset | Absolute byte offset in the backing data. |
| size | Exact byte count. |
| blockStart | True 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.
- Parameters
-
| httpData | Required initialized reader with a non-NULL callback. |
◆ CspReader_setIsValid
| #define CspReader_setIsValid |
( |
|
o | ) |
((CspReader*)o)->validFlag=CspReader_validFlag |
Mark the implementation initialized after opening/checking its data.
This does not install a callback or validate the backing file.
- Parameters
-
| o | Required initialized reader. |
◆ CspReader