Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ ilEFSGetTyp(3X) — HP-UX ANSI C A.10.11

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

ilAddEFSFileType(3X)

ilEFSOpen(3X)

ilerror(3X)

IL_EFS_TIFF_READ_TAGS(3X)

IL_EFS_TIFF_WRITE_IMAGE_WITH_TAGS(3X)

ilEFSGetFileTypeInfo(3X)

NAME

ilEFSGetFileTypeInfo() − return information on a file type

SYNOPSIS

ilBool
ilEFSGetFileTypeInfo (

ilEFSFileType fileType,

ilEFSFileTypeInfo *pInfo);

DESCRIPTION

ilEFSGetFileTypeInfo() returns information on the identified fileType. 

fileType is the type of file for which information is needed. 

*pInfo receives a pointer to an ilEFSFileTypeInfo structure containing the following fields:

name is a short name for the file type.  This name uniquely identifies this file type.  It should contain no spaces.  It has a maximum length of IL_EFS_MAX_NAME_CHARS, including a trailing NULL. 

displayName
is a name for the file type that can be displayed, for example in a menu that displays the file types.  This name is not necessarily unique and may contain spaces.   It has a maximum length of IL_EFS_MAX_DISPLAY_NAME_CHARS, including a trailing NULL. 

checkOrder if zero (0), indicates that the IL_EFS_BY_CHECKING was not used for this file type when the searchOptions parameter was supplied to ilEFSOpen().  If not zero (0), checkOrder is a number from 1 to 100 indicating the order in which IL_EFS_BY_CHECKING searches are done.  File types with higher checkOrder values are searched first. 

nExtensions
is a number of extensions in the field. The maximum number of extensions allowed is IL_EFS_MAX_EXTENSIONS. 

extensions is an array of the typical extensions used for this file type.  The array is nExtensions long.  Each extension has a maximum length of IL_EFS_MAX_EXTENSION_CHARS, including a trailing NULL.  If the actual file extension is longer, the first IL_EFS_MAX_EXTENSION_CHARS - 1 characters of the file extension are matched to the extensions listed in this array.  The dot (".") must not be included as part of the extension. 

openModes is a set of bits of the openModes supported by this file type.  Use the value (1 << IL_EFS_READ) to test for read open support; use the value (1 << IL_EFS_WRITE) to test for write open support.  ilEFSOpen() returns the error IL_ERROR_EFS_OPEN_MODE, if the caller attempts to open a file of this type using an openMode that is not part of this set. 

attributes is a set of bits of overall attributes for this file type. This is the same field as attributes in ilEFSFileInfo returned by ilEFSGetFileTypeInfo().  The following masks are defined:

IL_EFS_MULTI_PAGE_READS
indicates reading multiple pages is supported.

IL_EFS_MULTI_PAGE_WRITES
indicates writing multiple pages is supported.

IL_EFS_MASK_READS
indicates reading mask images is supported.

IL_EFS_MASK_WRITES
indicates writing mask images is supported.

IL_EFS_SCALEABLE_READS
indicates images can be read at different sizes.

*Escape() is either a pointer to a function that implements file type specific functionality, or NULL if that functionality is not supported.  The parameters for Escape() are defined by the file type implementation.  To correctly use Escape(), the caller must know that this file type supports Escape() and the parameters for the file type. The recommended parameters for Escape() are:

ilBool
(*Escape) (

ilEFSFileType fileType,

unsigned int option,

void *pOptionData);

pOptionData
points to data dependent on option. 

*Open(), *Seek(), *GetPageInfo(), *ReadImage(), *WriteImage(),

*Close(), *Destroy()
are pointers to functions used to implement file type support.  These functions are used only by file type handlers that are adding support for a new file type. See ilEFSAddFileType(3X) for information about adding support for new file types. 

reserved is reserved for future use. 

RETURN VALUE

Upon successful completion, ilEFSGetFileTypeInfo() returns TRUE. 

EXAMPLE

The following example uses ilEFSGetFileInfo() to get information about a file opened by ilEFSOpen(), and then uses ilEFSGetFileTypeInfo() to get information about the file type. 

ilEFSFile file;

ilEFSFileInfo info;

ilEFSFileTypeInfo
.
.
.

if (!ilEFSGetFileInfo(file, &info))

return (context->error);

if (!ilEFSGetFileTypeInfo (info.fileType, &tinfo))

return (context->error);

ERRORS

If the call fails, context->error receives a non-zero error code. 

AUTHOR

ilEFSGetFileTypeInfo() was developed by HP. 

SEE ALSO

ilAddEFSFileType(3X), ilEFSOpen(3X), ilerror(3X), IL_EFS_TIFF_READ_TAGS(3X), IL_EFS_TIFF_WRITE_IMAGE_WITH_TAGS(3X). 

Using the Image Developer’s Kit.

Hewlett-Packard Company  —  Image Library: February, 1995

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026