Initial implementation of buttons relied on 'magic' names. Later, this was changed to use the 'cap' on the option. Look for options with these set:
SANE_CAP_SOFT_DETECT and SANE_CAP_HARD_SELECT TYPE_BUTTON is really only used to indicate a boolean software option that won't 'stick'. allan On Thu, Nov 18, 2010 at 6:00 AM, Florian Lohoff <f at zz.de> wrote: > > Hi, > i once wrote a little C app to poll my document scanner (Fujitu fi4120C) > for the buttons on the front (Function digit, "scan" and "send to"). > > I now tried to recompile it against libsane 1.0.21-5 (from 1.0.19-23) > and now my tool fails. > > After a bit debugging the buttons i found that from the results of > sane_get_option_descriptor the buttons got renamed > from e.g. "button-scan" to "scan" and the like. > > So i thought - well - lets see if there is an identifier and found > that there is "type" in the SANE_Option_Descriptor which in case > of the scan button is "bool" although there is a TYPE_BUTTON which > i thought would be a better fit. > > Although it is unclear how i could find the "function" button which itself is > not queriable but only the digit one can toggle through. > Its a button but also an integer. > > Hints? Bug? Feature? Incomplete transition in the backend? > > How am i supposed to automatically find the buttons? > > Flo > -- > Florian Lohoff ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? f at zz.de > ? ? ? ? ? ? ? ? Professionell gesehen bin ich zu haben .... > > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.4.9 (GNU/Linux) > > iQIVAwUBTOUHZpDdQSDLCfIvAQjfRw/9H1CszK9XgWOnr3IQbj1xIoxPBM1zaIGD > aZjT/2FpH+F0HZgJgESWeR23gX3x230T5MU39YPWVcAoQ3TZA9CoTl/7fOiMNzMj > 7wsCj6DyyBml0mYiggBksYQLt4o9ydiCZBigYbNRqhCAJf+KHRUDe32i2Deh6RDh > 42b42f5qFchlx9HkbOMzZOzTBvEQzIiTIp3ToC3yX0iVxuPiiSIT3GP2OP7vHX8M > k5a+WwZFx1soUEpNugAL3h+kyT2rgXdVvyga+tmAfIowY9o5V1bjFu8gCw09/BWu > P7CFUrr3VqLcK7tziFiW0sYirIftt5vASehKFluNi++uIWmBhafHTU75C76ZDN9n > 5Z4EQUs2D/6V93JWG4VqtYIuJaxy/O+MmAWEwfdd2mBEqaHx0TwirXGDwHdZ1hJT > thQcvQHF+RF6/bbUtGzY6cfDxzC2tTfhtrks00AIJmwpKwjjorybiu04l+WFln+M > 4K9SEOfqu08IId+u/T8KB1EDKtMxmFePKQkMKexCmiX8j0SVl7Daf+kwwwC1nUW0 > H0uqBtnCB64JuuwmNCkL0Q41GSC+BdbVe0VPyBklkje4ghye+3BOkgA3BM/fstB2 > ajS4IW+WZRlgjiUknEtL4BE/P/1QQZvbzb22m139ZurcEy/AhcdtdLyspNyaSKwN > 0VtwLxDSudg= > =9g1e > -----END PGP SIGNATURE----- > > -- > sane-devel mailing list: sane-devel at lists.alioth.debian.org > http://lists.alioth.debian.org/mailman/listinfo/sane-devel > Unsubscribe: Send mail with subject "unsubscribe your_password" > ? ? ? ? ? ? to sane-devel-request at lists.alioth.debian.org > -- "The truth is an offense, but not a sin"
