<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
Good afternoon,<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
<br>
I've been working on the MR for imprinter support for the canon_dr backend (MR: <a href="https://gitlab.com/sane-project/backends/-/merge_requests/706" id="LPlnkOWALinkPreview_1">
https://gitlab.com/sane-project/backends/-/merge_requests/706</a> )<br>
<div class="_Entity _EType_OWALinkPreview _EId_OWALinkPreview_1 _EReadonly_1">
<div id="LPBorder_GTaHR0cHM6Ly9naXRsYWIuY29tL3NhbmUtcHJvamVjdC9iYWNrZW5kcy8tL21lcmdlX3JlcXVlc3RzLzcwNg.." class="LPBorder113053" style="width: 100%; margin-top: 16px; margin-bottom: 16px; position: relative; max-width: 800px; min-width: 424px;">
<table id="LPContainer113053" role="presentation" style="padding: 12px 36px 12px 12px; width: 100%; border-width: 1px; border-style: solid; border-color: rgb(200, 200, 200); border-radius: 2px;">
<tbody>
<tr style="border-spacing: 0px;" valign="top">
<td>
<div id="LPImageContainer113053" style="position: relative; margin-right: 12px; height: 160px; overflow: hidden;">
<a target="_blank" id="LPImageAnchor113053" href="https://gitlab.com/sane-project/backends/-/merge_requests/706"><img id="LPThumbnailImageId113053" alt="" style="display: block;" width="160" height="160" src="https://gitlab.com/assets/twitter_card-570ddb06edf56a2312253c5872489847a0f385112ddbcd71ccfa1570febab5d2.jpg"></a></div>
</td>
<td style="width: 100%;">
<div id="LPTitle113053" style="font-size: 21px; font-weight: 300; margin-right: 8px; font-family: "wf_segoe-ui_light", "Segoe UI Light", "Segoe WP Light", "Segoe UI", "Segoe WP", Tahoma, Arial, sans-serif; margin-bottom: 12px;">
<a target="_blank" id="LPUrlAnchor113053" href="https://gitlab.com/sane-project/backends/-/merge_requests/706" style="text-decoration: none; color: var(--themePrimary);">canon_dr: add imprinting support for DR-X10C (!706) · Merge requests · sane-project / backends
 · GitLab</a></div>
<div id="LPDescription113053" style="font-size: 14px; max-height: 100px; color: rgb(102, 102, 102); font-family: "wf_segoe-ui_normal", "Segoe UI", "Segoe WP", Tahoma, Arial, sans-serif; margin-bottom: 12px; margin-right: 8px; overflow: hidden;">
enables all imprinting features exposed by the TWAIN driver: pre-imprinting and post-imprinting with all addon modes font size, orientation and spacing</div>
<div id="LPMetadata113053" style="font-size: 14px; font-weight: 400; color: rgb(166, 166, 166); font-family: "wf_segoe-ui_normal", "Segoe UI", "Segoe WP", Tahoma, Arial, sans-serif;">
gitlab.com</div>
</td>
</tr>
</tbody>
</table>
<div id="LPCloseButtonContainer113053" class="BteeSi3mQkoPXfEW9ZaJ" tabindex="0" title="Remove link preview" role="button">
<i data-icon-name="Cancel" aria-hidden="true" id="LPCloseButton113053" class="w6wS4cX3EBIEHJB2nUAm root-256"></i></div>
</div>
</div>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
<br>
<br>
Since imprinters are optional hardware modules, it makes sense to detect them at runtime and make the corresponding SANE options inactive. I have some implementation for runtime detection of the imprinters.<br>
<br>
My question is what would be the preferred place to do this runtime detection.<br>
<br>
My instinct would be to add the required read cmd inside the init_model function, specifically here:
<br>
<br>
<a href="https://gitlab.com/sane-project/backends/-/merge_requests/706/diffs#bd44e4ec108bed0a73ccda8521103ba2ba4b2a5b_1894_1905" id="LPlnkOWALinkPreview">https://gitlab.com/sane-project/backends/-/merge_requests/706/diffs#bd44e4ec108bed0a73ccda8521103ba2ba4b2a5b_1894_1905</a><br>
<div class="_Entity _EType_OWALinkPreview _EId_OWALinkPreview _EReadonly_1">
<div id="LPBorder_GTaHR0cHM6Ly9naXRsYWIuY29tL3NhbmUtcHJvamVjdC9iYWNrZW5kcy8tL21lcmdlX3JlcXVlc3RzLzcwNi9kaWZmcyNiZDQ0ZTRlYzEwOGJlZDBhNzNjY2RhODUyMTEwM2JhMmJhNGIyYTViXzE4OTRfMTkwNQ.." class="LPBorder175680" style="width: 100%; margin-top: 16px; margin-bottom: 16px; position: relative; max-width: 800px; min-width: 424px;">
<table id="LPContainer175680" role="presentation" style="padding: 12px 36px 12px 12px; width: 100%; border-width: 1px; border-style: solid; border-color: rgb(200, 200, 200); border-radius: 2px;">
<tbody>
<tr style="border-spacing: 0px;" valign="top">
<td>
<div id="LPImageContainer175680" style="position: relative; margin-right: 12px; height: 160px; overflow: hidden;">
<a target="_blank" id="LPImageAnchor175680" href="https://gitlab.com/sane-project/backends/-/merge_requests/706/diffs#bd44e4ec108bed0a73ccda8521103ba2ba4b2a5b_1894_1905"><img id="LPThumbnailImageId175680" alt="" style="display: block;" width="160" height="160" src="https://gitlab.com/assets/twitter_card-570ddb06edf56a2312253c5872489847a0f385112ddbcd71ccfa1570febab5d2.jpg"></a></div>
</td>
<td style="width: 100%;">
<div id="LPTitle175680" style="font-size: 21px; font-weight: 300; margin-right: 8px; font-family: "wf_segoe-ui_light", "Segoe UI Light", "Segoe WP Light", "Segoe UI", "Segoe WP", Tahoma, Arial, sans-serif; margin-bottom: 12px;">
<a target="_blank" id="LPUrlAnchor175680" href="https://gitlab.com/sane-project/backends/-/merge_requests/706/diffs#bd44e4ec108bed0a73ccda8521103ba2ba4b2a5b_1894_1905" style="text-decoration: none; color: var(--themePrimary);">canon_dr: add imprinting support
 for DR-X10C (!706) · Merge requests · sane-project / backends · GitLab</a></div>
<div id="LPDescription175680" style="font-size: 14px; max-height: 100px; color: rgb(102, 102, 102); font-family: "wf_segoe-ui_normal", "Segoe UI", "Segoe WP", Tahoma, Arial, sans-serif; margin-bottom: 12px; margin-right: 8px; overflow: hidden;">
enables all imprinting features exposed by the TWAIN driver: pre-imprinting and post-imprinting with all addon modes font size, orientation and spacing</div>
<div id="LPMetadata175680" style="font-size: 14px; font-weight: 400; color: rgb(166, 166, 166); font-family: "wf_segoe-ui_normal", "Segoe UI", "Segoe WP", Tahoma, Arial, sans-serif;">
gitlab.com</div>
</td>
</tr>
</tbody>
</table>
<div id="LPCloseButtonContainer175680" class="BteeSi3mQkoPXfEW9ZaJ" tabindex="0" title="Remove link preview" role="button">
<i data-icon-name="Cancel" aria-hidden="true" id="LPCloseButton175680" class="w6wS4cX3EBIEHJB2nUAm root-256"></i></div>
<div id="LPCloseButtonContainer175680" class="BteeSi3mQkoPXfEW9ZaJ" tabindex="0" title="Remove link preview" role="button">
<i data-icon-name="Cancel" aria-hidden="true" id="LPCloseButton175680" class="w6wS4cX3EBIEHJB2nUAm root-256"></i></div>
</div>
</div>
<br>
The reason I want to check with the backend maintainers first, is that I've not seen other usb/scsi commands done inside init_model, wondering if perhaps there is a good reason for that?<br>
<br>
Thanks for your help,<br>
<br>
Charles Quarra<br>
<br>
</div>
</body>
</html>