CUPS and LSB

Michael Sweet mike at easysw.com
Mon Apr 3 10:22:30 PDT 2006


Todd Fujinaka wrote:
> I hope this is the right mailing list for this.

Yup, you found the right place.

> I am looking at libcups for inclusion in the Linux Standard Base,
> (http://www.linuxbase.org). What we would do is take the higher level
> printer interface and then create a stub library that only exports
> the current, non-deprecated interfaces. The stub library links to the
> system library. This is used to provide a consistent interface to
> ISVs across distros.

Sounds good!

> So, what I have to ask is whether my assumptions are correct from the
> docs I've read on cups.org. Is libcups what I'd use for a
> higher-level interface?

Both libcups and libcupsimage are required - libcups is the
application-level interface and libcupsimage is used for printer
drivers.  Both would need to be included to be really useful - think
drivers from the printer manufacturers...

 > Is cups.h where I find the interfaces to include?

You'll want to include all of the headers in the cups subdirectory.
"cups.h" is just the "include everything + define the convenience
functions" header file.

As for the interfaces to include, you'll want to include all of
the functions that do not start with an underscore (those are
private APIs) and are not marked deprecated (via GCC attribute).

I can provide you with a complete list if you'd like.

 > How stable has the API/ABI been (only additions, no changes
> in arg lists, etc)?

There was a minor change that required an ABI version bump between
1.0 and 1.1 (5 years ago), but since then we've remained fully
backwards-compatible.

In cases where we have needed to update the arguments to an
existing API, we've revved the API.  For example, httpRead has
been revved to httpRead2 to take a size_t argument instead of
int.

Binary compatibility is a big deal for us.

> Is http://www.cups.org/documentation.php/api-cups.html where I
 > find out what is being deprecated and what is current in the API?

All of the API documentation should be taken into account, but
probably the simplest thing to do is grep for DEPRECATED in the
headers - we define a macro that expands into the GCC __deprecated__
attribute when compiling with GCC.

Like I said, I'll be happy to provide you with a list of functions
(preferably via email, as the list will be rather long) that are
in CUPS 1.2.

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




More information about the cups mailing list