Limiting list of printers seen by user?

Michael Sweet mike at easysw.com
Mon Oct 31 03:37:36 PST 2005


Erik Forsberg wrote:
> Michael Sweet <mike at easysw.com> writes:
> 
>>> program and openoffice, but not for kprinter. I've filed STR 1335 with
>>> a patch that corrects this.
>> cupsGetPrinters() is deprecated, and has been since CUPS 1.1 was
>> released.  cupsGetDests() and the newer cupsGetDests2() are the
>> recommended functions to use.
> 
> Deprecated or not - would it harm to add the patch? I'd very much like
> the limit-list-of-printers functionality to work for old software that
> uses cupsGetPrinters as well. 

We could just as easily break existing applications that depend on
cupsGetPrinters() to return all printers, not just the ones visible
to the current user.  cupsGetDests() is already user-specific (i.e.
it returns the user's printer instances and defaults), so adding
requesting-user-name was "safe" there.

I'd much rather just tag cupsGetPrinters() and cupsGetClasses() as
deprecated in the library to encourage developers to switch - changing
the behavior of a function only invites problems.

-- 
______________________________________________________________________
Michael Sweet, Easy Software Products           mike at easysw dot com
Internet Printing and Publishing Software        http://www.easysw.com




More information about the cups mailing list