| 53 | */ |
| 54 | |
| 55 | int /* O - New number of copies */ |
| 56 | _cupsConvertOptions( |
| 57 | ipp_t *request, /* I - IPP request */ |
| 58 | ppd_file_t *ppd, /* I - PPD file */ |
| 59 | _ppd_cache_t *pc, /* I - PPD cache info */ |
| 60 | ipp_attribute_t *media_col_sup, /* I - media-col-supported values */ |
| 61 | ipp_attribute_t *doc_handling_sup, /* I - multiple-document-handling-supported values */ |
| 62 | ipp_attribute_t *print_color_mode_sup, |
| 63 | /* I - Printer supports print-color-mode */ |
| 64 | const char *user, /* I - User info */ |
| 65 | const char *format, /* I - document-format value */ |
| 66 | int copies, /* I - Number of copies */ |
| 67 | int num_options, /* I - Number of options */ |
| 68 | cups_option_t *options) /* I - Options */ |
| 69 | { |
| 70 | int i; /* Looping var */ |
| 71 | const char *keyword, /* PWG keyword */ |
| 72 | *password; /* Password string */ |
| 73 | pwg_size_t *size; /* PWG media size */ |
| 74 | ipp_t *media_col, /* media-col value */ |
| 75 | *media_size; /* media-size value */ |
| 76 | const char *media_source, /* media-source value */ |
| 77 | *media_type, /* media-type value */ |
| 78 | *collate_str, /* multiple-document-handling value */ |
| 79 | *color_attr_name, /* Supported color attribute */ |
| 80 | *mandatory, /* Mandatory attributes */ |
| 81 | *finishing_template; /* Finishing template */ |
| 82 | int num_finishings = 0, /* Number of finishing values */ |
| 83 | finishings[10]; /* Finishing enum values */ |
| 84 | ppd_choice_t *choice; /* Marked choice */ |
| 85 | int finishings_copies = copies, |
| 86 | /* Number of copies for finishings */ |
| 87 | job_pages = 0, /* job-pages value */ |
| 88 | number_up = 1; /* number-up value */ |
| 89 | const char *value; /* Option value */ |
| 90 | |
| 91 | |
| 92 | /* |
| 93 | * Send standard IPP attributes... |
| 94 | */ |
| 95 | |
| 96 | if (pc->password && (password = cupsGetOption("job-password", num_options, options)) != NULL && ippGetOperation(request) != IPP_OP_VALIDATE_JOB) |
| 97 | { |
| 98 | ipp_attribute_t *attr = NULL; /* job-password attribute */ |
| 99 | |
| 100 | if ((keyword = cupsGetOption("job-password-encryption", num_options, options)) == NULL) |
| 101 | keyword = "none"; |
| 102 | |
| 103 | if (!strcmp(keyword, "none")) |
| 104 | { |
| 105 | /* |
| 106 | * Add plain-text job-password... |
| 107 | */ |
| 108 | |
| 109 | attr = ippAddOctetString(request, IPP_TAG_OPERATION, "job-password", password, (int)strlen(password)); |
| 110 | } |
| 111 | else |
| 112 | { |
no test coverage detected