Add support for CUPS printer instances #34
Merged
+33
−10
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Don't just always use the
cups_dest_t
'sname
for the printer name, but also take it's
instance
member into account and if present, append that for the name used for the CPDB printer name, separated by a slash character.Since
PrinterCUPS::name
is now assigned a newlyallocated string in
get_new_PrinterCUPS
, freeit again in
free_PrinterCUPS
.While previously, CUPS printers instances were not available at all, they are now presented as separate printers.
For example, if there's a PDF printer, a printer instance with a different default resolution can be created using
and a
PDF/someinstance
printer now also shows up incpdb-text-frontend
from cpdb-libs, while itwasn't without this commit in place.
FWIW, the modified default value for the
option as set above currently doesn't show up with cpdb-libs git master as of commit cc51ac3c48c9e5cede90aaedb13dc1333bde3b60 when using the
command, but the same is true when changing a default value for the default instance, i.e. using
, so this seems to be a separate issue and unrelated to the added CUPS printer instance support.