New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add new API for generic printer options/IPP attributes #3925
Comments
CUPS.org User: mike Doing development on cups-api-1.6 branch... The new PPD replacement APIs address the standard option names and values (all /* Number of copies; option values are integers as strings */ #define CUPS_COPIES "copies" /* Finishings; applied to the job as a whole, also see IPP_FINISHINGS_xxx in #define CUPS_FINISHINGS "finishings" /* Media (size); when looking up supported values, CUPS_MEDIA contains all of #define CUPS_MEDIA "media" /* Media source; "auto" is the default */ #define CUPS_MEDIA_SOURCE "media-source" /* Media type; "auto" is the default */ #define CUPS_MEDIA_TYPE "media-type" /* Number-up; option values are integers as strings */ #define CUPS_NUMBER_UP "number-up" /* Orientation; also see the ipp_orient_t values in <cups/ipp.h> */ #define CUPS_ORIENTATION "orientation-requested" /* Color mode; "auto" is the default, "monochrome" and "color" force the #define CUPS_PRINT_COLOR_MODE "print-color-mode" /* Print quality; also see the IPP_QUALITY_xxx values in <cups/ipp.h> */ #define CUPS_PRINT_QUALITY "print-quality" /* Duplex mode; long-edge is typically for portrait output and short-edge for #define CUPS_SIDES "sides" /* Get the supported values/capabilities for the destination as an IPP Replaces ppdOpen */ ipp_t *cupsCopyDestSupported(http_t *http, cups_dest_t *dest); /* Get media names, dimensions, and margins - replaces ppdPageSize and others. CUPS_MEDIA_FLAGS_DEFAULT = find the closest size supported by the printer The matching result (if any) is returned in the "cups_size_t" structure. Returns 1 when there is a match and 0 if there is not a match. #define CUPS_MEDIA_FLAGS_DEFAULT 0 typedef struct _cups_size_s int cupsGetDestMediaByName(http_t *http, cups_dest_t *dest, ipp_t *supported, /* Check that the option and value are supported by the destination - replaces int cupsCheckDestSupported(http_t *http, cups_dest_t *dest, ipp_t *supported, /* Get conflicts and resolutions for a new option/value pair. This single API "num_options" and "options" represent the currently selected options by the Returns 1 if there is a conflict and 0 otherwise. If "num_conflicts" and "conflicts" are not NULL, they are set to contain the If cupsCopyDestConflicts returns 1 but "num_resolved" and "resolved" are set int cupsCopyDestConflicts(http_t _http, cups_dest_t *dest, ipp_t *supported, /* Get localization information for the current locale from the destination, The caller must call cupsArrayDelete on the returned array. */ cups_array_t *cupsCopyDestLocalizations(http_t *http, cups_dest_t *dest); /* Get the localized string for a destination option - replaces ppdLocalize and The returned string is stored in the localization array and will become const char *cupsLocalizeDestOption(http_t *http, cups_dest_t *dest, /* Get the localized string for a destination option+value pair - replaces The returned string is stored in the localization array and will become const char *cupsLocalizeDestValue(http_t *http, cups_dest_t *dest, |
CUPS.org User: mike The primary focus of the new print job APIs is to use a cups_dest_t pointer /* Cancel a job on a destination - replaces cupsCancelJob/cupsCancelJob2. Returns IPP_OK on success and IPP_NOT_AUTHORIZED or IPP_FORBIDDEN on ipp_status_t cupsCancelDestJob(http_t *http, cups_dest_t *dest, int job_id, /* Create a job on a destination - replaces cupsCreateJob*. Returns IPP_OK or IPP_OK_SUBST on success, saving the job ID in the variable ipp_status_t cupsCreateDestJob(http_t *http, cups_dest_t *dest, int *job_id, /* Start a new document - replaces cupsStartDocument. "job_id" is the job ID http_status_t cupsStartDestDocument(http_t *http, cups_dest_t *dest, int job_id, /* Finish the current document - replaces cupsFinishDocument. Returns IPP_OK ipp_status_t cupsFinishDestDocument(http_t *http, cups_dest_t *dest); /* Close a job and start printing - used when the last call to cupsStartDocument ipp_status_t cupsCloseDestJob(http_t *http, cups_dest_t *dest, int job_id); |
CUPS.org User: mike Remaining to implement: dest-job.c: Everything |
CUPS.org User: mike dest-job.c is done. |
CUPS.org User: mike Fixed in Subversion repository. |
Version: 1.6-feature
CUPS.org User: mike
In the continuing march towards IPP Everywhere, we need an API that exposes the supported and default job template attributes along with the constraints.
Initially this will be provided by the existing PPD mapping code, but long term we should be able to simply discover what a printer can handle and act accordingly.
The text was updated successfully, but these errors were encountered: