![]() |
TECCreateSniffer |
||||
Header: | TextEncodingConverter.h | Carbon status: | Supported | |
Creates a sniffer object and returns a reference to it.
OSStatus TECCreateSniffer ( TECSnifferObjectRef *encodingSniffer, TextEncoding testEncodings[], ItemCount numTextEncodings );
A pointer to a sniffer object reference, which is of type TECSnifferObjectRef. On return, the reference pertains to the newly created sniffer object.
An array of text encoding specifications supplied by the caller; TECCreateSniffer creates a sniffer that can detect each of these encodings.
The number of text encoding specifications in the testEncodings[] array.
A result code.
The TECCreateSniffer function polls plug-ins for available sniffers, creates a sniffer object capable of sniffing each of the specified encodings that it can find a sniffer function for, and returns a reference to it. You use this sniffer object reference with sniffer functions such as TECSniffTextEncoding. If no sniffer function is available for an encoding, no error is returned and TECSniffTextEncoding indicates later that the encoding was not examined.
To remove a sniffer object, you must call the function TECDisposeSniffer.
Supported in Carbon. Available in Carbon 1.0.2 and later when running Mac OS 8.1 or later.
© 2000 Apple Computer, Inc. (Last Updated 7/17/2000)