next up previous
Next: Return Values Up: The UUDeview Decoding Library Previous: Filename Filter


The File List

While scanning the input files, a linked list is built. Each node is of type uulist and describes one file, possibly composed of several parts. This section describes the members of the structure that may be of interest to an application.

state
Describes the state of this file. Either the value UUFILE-_READ5 or a bitfield of the following values:
UUFILE_MISPART
The file is missing at least one part. This bit is set if the part numbers are non-sequential. Usually results in incorrect decoding.
UUFILE_NOBEGIN
No ``begin'' line was detected. Since Base64 files do not have begin lines, this bit is never set on them. For BinHex files, the initial colon is used.
UUFILE_NOEND
No ``end'' line was detected. Since Base64 files do not have end lines, this bit is never set on them. A missing end on uuencoded or xxencoded files usually means that the file is incomplete. For BinHex, the trailing colon is used as end marker.
UUFILE_NODATA
No encoded data was found within these parts.
UUFILE_OK
This file appears to be okay, and decoding is likely to be successful.
UUFILE_ERROR
A decode operation was attempted, but failed, usually because of an I/O error.
UUFILE_DECODED
This file has already been successfully decoded.
UUFILE_TMPFILE
The file has been decoded into a temporary file, which can be found using the binfile member (see below). This flag gets removed if the temporary file is deleted.
mode
For uuencoded and xxencoded files, this is the file mode found on the ``begin'' line, Base64 and BinHex files receive a default of 0644. A decode operation will try to restore this mode.
uudet
The type of encoding this file uses. May be 0 if UUFILE-_NODATA or one of the following values:
UU_ENCODED
for uuencoded data,
B64ENCODED
for Base64 encoded data,
XX_ENCODED
for xxencoded data,
BH_ENCODED
for BinHex data,
PT_ENCODED
for plain-text ``data'', or
QT_ENCODED
for MIME quoted-printable encoded text.
size
The approximate size of the resulting file. It is an estimated value and can be a few percent off the final value, hence the suggestion to display the size in kilobytes only.
filename
The filename. For uuencoded and xxencoded files, it is extracted from the ``begin'' line. The name of BinHex files is encoded in the first data bytes. Base64 files have the filename given in the ``Content-Type'' header. This field may be NULL if state!=UUFILE-_OK.
subfname
A unique identifier for this group of parts, usually derived from the ``Subject'' header of each part. It is possible that two nodes with the same identifier exist in the file list: If a group of files is considered ``complete'', a new node is opened up for more parts with the same Id.
mimeid
Stores the ``id'' field from the ``Content-Type'' information if available. Actually, this Id is the first choice for grouping of files, but not surprisingly, non-MIME mails or articles do not have this information.
mimetype
Stores this part's ``Content-Type'' if available.
binfile
After decoding, this is the name of the temporary file the data was decoded to and stored in. This value is non-NULL if the flag UUFILE-_TMPFILE is set in the state member above.
haveparts
The part numbers found for this group of files as a zero-terminated ordered integer array. Some extra care must be taken, because a file may have a zeroth part as its first part. Thus if haveparts[0] is zero, it indicates a zeroth part, and the list of parts continues. A file may have at most one zeroth part, so if both haveparts[0] and haveparts[1] are zero, the zeroth part is the only part of this file.

No more than 256 parts are listed here.

misparts
Similar to haveparts; a zero-terminated ordered integer array of missing parts, or simply NULL if no parts are missing. Since we don't mind if a file doesn't have a zeroth part, this array does not have the above problems.


next up previous
Next: Return Values Up: The UUDeview Decoding Library Previous: Filename Filter
Build Daemon 2002-04-14