<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">The proper way to do this is to write a CUPS filter that communicates with the printer (via the backend) and then your app can just sent control commands as print jobs that are interpreted by your filter.  This method also has the advantage of allowing your normal print filters to provide status back to your user app.<div><br></div><div>If you *must* communicate directly, IOKit will only allow 1 program to claim an interface at any given time, so you don't need to add any additional protections.</div><div><br></div><div><div><div>On Jun 25, 2009, at 1:49 AM, Justin Huang wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div>Hi Experts,<br>We plan to develop a Mac application to do something that requires communicating with printer via printer bulk. I think it is necessary to do some protection to prevent the application from accessing the printer while there are print jobs.<br><br>Are there any methods I can do for this purpose?<br><br>Thanks~<br>_______________________________________________<br>cups-dev mailing list<br><a href="mailto:cups-dev@easysw.com">cups-dev@easysw.com</a><br>http://lists.easysw.com/mailman/listinfo/cups-dev<br></div></blockquote></div><br><div>
<span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Monaco; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><div>________________________________________</div><div>Michael R Sweet, Senior Printing System Engineer</div></div></div></span></span>
</div>
<br></div></body></html>