Get-Option ...

becka@sunserver1.rz.uni-duesseldorf.de
Fri, 24 Jan 1997 15:27:56 +0100 (MET)

Hi Folks !

I just noticed the cause for my problems to set an option with the
commandline scan program ...

I can only set the LAST option, as it seems the program relies on ALL
options to be kept valid, while netsane overwrites always the same
option-descriptor.

Well this is no problem, and I will change netsane accordingly, as it might
be necessary lateron anyway for descriptor caching, but we should state
that in the documentation just in case we get more backends that dynamically
generate their option-values.

Current documentation is :

\subsection{\code{sane\_get\_option\_descriptor}}

This function is used to access option descriptors. The function
returns the option descriptor for option number \code{n} of the device
represented by handle \code{h}. Option number 0 is guaranteed to be a
valid option. Its value is an integer that specifies the number of
options that are available for device handle \code{h} (the count
includes option 0). If $n$ is not a valid option index, the function
returns \code{NULL}.
\begin{quote}\index{sane\_get\_option\_descriptor}
\begin{verbatim}
const SANE_Option_Descriptor *
sane_get_option_descriptor (SANE_Handle h, SANE_Int n);
\end{verbatim}
\end{quote}

We probably should add :

The acquired option descriptor stays valid at the returned address until
a "reload-option" is requested or the device is closed.

CU,Andy

-- 
==============================================================================
Andreas Beck              |  Email :  <becka@sunserver1.rz.uni-duesseldorf.de>
===  World-Wide-Web URL :  http://sunserver1.rz.uni-duesseldorf.de/~becka  ===
==============================================================================

---
Source code, list archive, and docs: http://www.azstarnet.com/~axplinux/sane/
To unsubscribe:    echo unsubscribe sane-devel | mail majordomo@azstarnet.com