<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Feb 24, 2015 at 11:51 AM, Ludovic Rousseau <span dir="ltr"><<a href="mailto:ludovic.rousseau@gmail.com" target="_blank">ludovic.rousseau@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">2015-02-24 19:13 GMT+01:00 William Roberts <<a href="mailto:bill.c.roberts@gmail.com">bill.c.roberts@gmail.com</a>>:<br>
> The worst part to me is the timeout. Which gets us back to polling right?<br>
<br>
</span>No.<br>
The timeout is 10 minutes in normal case or 5 seconds in case of auto<br>
power off [1] and then 10 minutes.<br>
<br>
You also need to support TAG_IFD_STOP_POLLING_THREAD so pcscd can stop<br>
your polling function either to switch to a 5 seconds timeout or to<br>
cleanly exit.<br>
<span class=""><br>
> Ideally we would want an event based system for this. Perhaps provide a<br>
> function pointer to my ifd I can call to trigger this event.<br>
<br>
</span>It _is_ event based. Just return from your polling/callback function<br>
on the event.<br>
You can whatever event based (or not) you want in your callback function.<br></blockquote><div><br></div><div>There is still a timeout, so the thread that is blocking on my function sleeps for</div><div>TIMEOUT, wakes up, and does what? Eventually some thread comed back around</div><div>and calls my fn again, and the process repeats. So doesn't that constitute polling?</div><div>While 10m is a long time, it should</div><div>just block indefinitley until some other thread calls stop().</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<span class=""><br>
> I'm assuming that the interface describes is compliant with pcsc spec? Is it<br>
> missing anything?<br>
<br>
</span>PC/SC does not describe the IFDHandler API [2], only the PC/SC API [3].<br>
<br>
Bye<br>
<br>
[1] <a href="http://ludovicrousseau.blogspot.fr/2010/10/card-auto-power-on-and-off.html" target="_blank">http://ludovicrousseau.blogspot.fr/2010/10/card-auto-power-on-and-off.html</a><br>
[2] <a href="http://pcsclite.alioth.debian.org/api/group__IFDHandler.html" target="_blank">http://pcsclite.alioth.debian.org/api/group__IFDHandler.html</a><br>
[3] <a href="http://pcsclite.alioth.debian.org/api/group__API.html" target="_blank">http://pcsclite.alioth.debian.org/api/group__API.html</a><br>
<div class="HOEnZb"><div class="h5"><br>
--<br>
Dr. Ludovic Rousseau<br>
<br>
_______________________________________________<br>
Pcsclite-muscle mailing list<br>
<a href="mailto:Pcsclite-muscle@lists.alioth.debian.org">Pcsclite-muscle@lists.alioth.debian.org</a><br>
<a href="http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pcsclite-muscle" target="_blank">http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pcsclite-muscle</a><br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature">Respectfully,<br><br>William C Roberts<br><br></div>
</div></div>