Register an external file parser. See File Parser API
struct dtsViewerInfo { char name[maxTypeNameLen]; unsigned short typeId; char version[maxTypeNameLen]; dtsRecognitionSignature signature; const char * filenamePattern; long filenameConfidence; unsigned long blockSize; int (* recognize)(dtsInputStream& aStream); dtsViewerHandle (* makeViewer)(dtsInputStream& aStream); void (* destroyViewer)(dtsViewerHandle handle); void (* readTextBlock)(dtsViewerHandle handle, dtsTextBlock& block); void (* gotoBookMark)(dtsViewerHandle handle, dtsBookMark& bookMark); void (* getFileInfo)(dtsViewerHandle handle, dtsFileInfo& info); long flags; long (* getCount)(dtsViewerHandle handle); int (* getFirst)(dtsViewerHandle handle, dtsContainerItemInfo& info); int (* getNext)(dtsViewerHandle handle, dtsContainerItemInfo& info); int (* getInfoByName)(dtsViewerHandle handle, const char *name, dtsContainerItemInfo& info); int (* getInfoByIndex)(dtsViewerHandle handle, long index, dtsContainerItemInfo& info); int (* extractToMem)(dtsViewerHandle handle, dtsContainerItemInfo& info, void *dest, long bufLen); int (* extractToFile)(dtsViewerHandle handle, dtsContainerItemInfo& info, const char *fileToCreate); char canExtractToMem; dtsViewerHandle (* makeViewer2)(dtsMakeViewerParams& params); };
dtsviewr.h
|
Data Member |
Description |
|
Size of the text blocks to pass to the readTextBlock function. | |
|
True if this file parser implements extractToMem | |
|
Delete the object represented by a handle previously returned by makeViewer. | |
|
Pointer to function that will extract an item from the container to a temporary file. | |
|
Pointer to function that will extract an item from the container to a memory buffer. | |
|
If the filename matches filenamePattern, identifies how confident the parser is that the file belongs to the parser. | |
|
Used to determine whether a file belongs to this file parser. | |
|
ViewerInfoFlags describing this file parser | |
|
Pointer to function that will return the number of files in the container. | |
|
Get basic information about the document associated with handle. | |
|
Pointer to function that will get information about the first item in the container. | |
|
Pointer to function that will get information about an item in the container, identified by its numerical index. | |
|
Pointer to function that will get information about a named item in the container. | |
|
Pointer to function that will get information about the next item in the container. | |
|
Reposition the parser's input pointer to the start of the text block identified by the dtsBookMark, or any earlier position in the file. | |
|
Create a file parser for a dtsInputStream. | |
|
Pointer to a function that will create a file parser for a dtsInputStream, using information provided in a dtsMakeViewerParams struct. | |
|
Name of the file format | |
|
read a block of text from the input and store it in a dtsTextBlock. | |
|
If not NULL, will be called to determine whether the a file has the format recognized by the parser. | |
|
A dtsRecognitionSignature that is used to determine whether a file belongs to this file parser. | |
|
Numeric identifier for the viewer. | |
|
For diagnostic purposes only, a string identifying the version of the parser. |
|
Data Member |
|
Method |
|
Copyright (c) 1995-2012 dtSearch Corp. All rights reserved.
|