[sane-devel] proposal for enabling 1.1 features

Alessandro Zummo alessandro.zummo at towertech.it
Mon Feb 18 19:38:20 UTC 2008



 An 1.1 compliant frontend should:

 1) check for sane version >= 1.1 (a macro will be provided)

 2) call sane_control_option

	int supported_version = SOMEMACRO(1,1);

	sane_control_option(handle, 0, SANE_ACTION_XXXX, &supported_version, NULL);

 3) the backend can then expose sane 1.1 features.

 I can check every backend driver to see if they can handle
 a previously unknown SANE_ACTION_XXX and eventually fix them.
 

 A frontend that declares itself 1.1 capable should be able
 to handle unknown frame formats and, generally, be able
 to correctly use the default: label of any switch statement
 to handle an unknown condition.

 Especially when dealing with enums, it is a good practice
 to not assume that an enum will always have a fixed amount
 of entries.

-- 

 Best regards,

 Alessandro Zummo,
  Tower Technologies - Torino, Italy

  http://www.towertech.it




More information about the sane-devel mailing list