FARGOS/VISTA Object Management Environment Core
..
|
Scan streams of data for start and end tags, invokes processDocument() on found content. More...
#include <read_file.hpp>
Public Member Functions | |
Extract_And_Process_Document_Stream (const char *docStart, const char *endTag, size_t maxDocSize=1024 *128) | |
virtual | ~Extract_And_Process_Document_Stream () |
int | scanAndProcessBuffer (const unsigned char *block, size_t blockLen) |
int | scanAndProcessBuffer (File_Buffer *bfrState) |
int | addIOblockThenProcess (SharedBufferAllocRecord *rec, IO_Processor *controller) |
Specialized interface to add incoming block from BufferRegion maintained by an IO_Processor. Block content is appended and then returned before any processing of the content is attempted. More... | |
virtual int | processDocument (unsigned char *docStart, size_t docLen)=0 |
User-exit to process extracted document. More... | |
virtual int_fast32_t | processBlock (unsigned char *blockStart, size_t blockLen) |
User-exit to process block of raw data. More... | |
Protected Types | |
enum | { FIND_NOTHING =0, FIND_DOC_START =1, FIND_END_TAG =2, FIND_BLOCK_LENGTH =3 } |
Protected Member Functions | |
int | scanForDocument () |
Protected Attributes | |
enum Extract_And_Process_Document_Stream:: { ... } | scanState |
enum Extract_And_Process_Document_Stream:: { ... } | restartScanState |
unsigned char | documentStartPrefix [64] |
unsigned char | documentEndTag [64] |
File_Buffer * | pendingContent |
ssize_t | neededBlockLen |
size_t | documentStartLen |
size_t | documentEndLen |
Scan streams of data for start and end tags, invokes processDocument() on found content.
|
inline |
|
inlinevirtual |
References pendingContent.
|
inline |
Specialized interface to add incoming block from BufferRegion maintained by an IO_Processor. Block content is appended and then returned before any processing of the content is attempted.
This interface exists to handle a very exotic scenario in which the BufferRegion will be taken over by a child routine invoked by scanForDocument() and the BufferRegion must have no blocks in use at the time of the call.
References app(), File_Buffer::appendDataToBuffer(), IO_Processor::bfrManager, IO_Processor::bufferAddress(), File_Buffer::discardInitialBytes(), LOG_COMPONENT_CERR, LOG_ENDLINE, OME_EXPECT_FALSE, pendingContent, BufferRegion::returnBlock(), scanForDocument(), and File_Buffer::spaceLeft().
Referenced by HTTPembeddedServerBase::readHTTPstream().
|
inlinevirtual |
User-exit to process block of raw data.
Will be invoked if processDocument() returns a value greater than 0.
Reimplemented in Parse_And_Process_HTTP_Stream, and HTTP_SessionRecord.
Referenced by scanForDocument().
|
pure virtual |
User-exit to process extracted document.
0 | indicates no block of raw data is required. |
-1 | indicates some error. |
Implemented in Parse_And_Process_HTTP_Stream.
|
inline |
References File_Buffer::appendDataToBuffer(), File_Buffer::discardInitialBytes(), OME_EXPECT_FALSE, pendingContent, scanForDocument(), and File_Buffer::spaceLeft().
Referenced by scanAndProcessBuffer().
|
inline |
|
protected |
References File_Buffer::discardInitialBytes(), documentEndLen, documentEndTag, documentStartLen, documentStartPrefix, FIND_BLOCK_LENGTH, FIND_DOC_START, FIND_END_TAG, LOG_CERR, LOG_ENDLINE, neededBlockLen, pendingContent, processBlock(), restartScanState, scanState, File_Buffer::spaceUsed(), and File_Buffer::startBufferLocation().
Referenced by addIOblockThenProcess(), and scanAndProcessBuffer().
|
protected |
Referenced by Extract_And_Process_Document_Stream(), and scanForDocument().
|
protected |
Referenced by Extract_And_Process_Document_Stream(), and scanForDocument().
|
protected |
Referenced by Extract_And_Process_Document_Stream(), and scanForDocument().
|
protected |
Referenced by Extract_And_Process_Document_Stream(), and scanForDocument().
|
protected |
Referenced by Extract_And_Process_Document_Stream(), and scanForDocument().
|
protected |
enum { ... } Extract_And_Process_Document_Stream::restartScanState |
Referenced by Extract_And_Process_Document_Stream(), and scanForDocument().
enum { ... } Extract_And_Process_Document_Stream::scanState |
Referenced by Extract_And_Process_Document_Stream(), and scanForDocument().
![]() | Generated: Fri Jul 31 2020 18:19:16
Support Information |