SCFeederGetFlags(3) Impressario SCFeederGetFlags(3)NAME
SCFeederGetFlags, SCFeederSetFlags, SCFeederAdvance, SCFeederReady -
scanner document feeder functions
SYNOPSIS
#include <stdio.h>
#include <scanner.h>
int SCFeederGetFlags(SCANNER *s, SCFEEDERFLAGS *flags);
int SCFeederSetFlags(SCANNER *s, SCFEEDERFLAGS flags);
int SCFeederAdvance(SCANNER *s);
int SCFeederReady(SCANNER *s);
DESCRIPTION
SCFeederGetFlags gets flags that describe a scanner's document feeding
capabilities. s specifies a connection to a scanner driver obtained by a
call to SCOpen(3), SCOpenFile(3), or SCOpenScreen(3).
SCFEEDERFLAGS and the values it can take on are defined in <scanner.h> as
follows:
typedef unsigned int SCFEEDERFLAGS;
#define SC_HASFEEDER 1
#define SC_AUTOFEED 2
#define SC_PROGFEED 4
The meanings of the flags are as follows:
SC_HASFEEDER: this flag is set if there is a document feeder attached to
the scanner.
SC_AUTOFEED: this flag is set if the feeder can operate such that each
call to SCScan(3) causes the next document to be loaded.
SC_PROGFEED: this flag is set if the feeder can operate such that
SCScan(3) can be called multiple times per document, with a call to
SCFeederAdvance being necessary to load the next document.
SCFeederSetFlags should be called before calling SCScan(3) for scanners
for which SCFeederGetFlags yields both SC_AUTOFEED and SC_PROGFEED set.
After calling
Page 1
SCFeederGetFlags(3) Impressario SCFeederGetFlags(3)
SCFeederSetFlags(s, SC_AUTOFEED);
the feeder will advance to the next document after every call to SCScan.
After calling
SCFeederSetFlags(s, SC_PROGFEED);
a call to SCFeederAdvance after each scan is necessary to advance to the
next document.
SCFeederAdvance advances the feeder to the next document. This call is
only valid if the scanner supports SC_PROGFEED mode. In addition, for
scanners that support both SC_AUTOFEED and SC_PROGFEED mode,
SCFeederSetFlags(s, SC_PROGFEED);
must have been called previously.
Use SCFeederReady to check if the feeder is ready for feeding.
RETURN VALUE
SCFeederGetFlags, SCFeederSetFlags, and SCFeederAdvance return 0 if
successful or -1 if an error occurs.
SCFeederReady returns 0 if the feeder is ready, and -1 with SCerrno set
to SCFEEDEREMPTY if the feeder is not ready. If any other error
conditions exist, SCerrno will be set appropriately.
EXECUTION ERROR CODES
These functions can all fail due to a communications error with the
scanner driver, in which case SCerrno will be set as follows.
SCECOMM Error communicating with scanner driver
Additionally, SCFeederSetFlags, SCFeederAdvance, and SCFeederReady will
fail under the following circumstances. circumstances.
SCENOFEEDER No feeder
SCEAUTOONLY Feeder only supports automatic usage
SCEFEEDEREMPTY Feeder empty
SCEFEEDERJAMMED Feeder jammed
SCEFEEDERERR Feeder error
Page 2
SCFeederGetFlags(3) Impressario SCFeederGetFlags(3)SEE ALSOlibscan(3), SCOpen(3), SCScan(3), SCScanFD(3).
Page 3