Lines Matching refs:job_params

148     wprint_job_params_t job_params;  member
482 if (jq->job_params.useragent != NULL) { in _recycle_handle()
483 free((void *) jq->job_params.useragent); in _recycle_handle()
485 if (jq->job_params.certificate != NULL) { in _recycle_handle()
486 free((void *) jq->job_params.certificate); in _recycle_handle()
690 jq->job_params.cancelled = true; in _print_job_state_callback()
764 if (jq->job_params.certificate && jq->certificate) { in _is_certificate_allowed()
765 if (jq->job_params.certificate_len != jq->certificate_len) { in _is_certificate_allowed()
767 jq->job_params.certificate_len, jq->certificate_len); in _is_certificate_allowed()
769 } else if (0 != memcmp(jq->job_params.certificate, jq->certificate, jq->certificate_len)) { in _is_certificate_allowed()
774 jq->job_params.certificate_len); in _is_certificate_allowed()
873 jq->job_params.plugin_data = NULL; in _job_thread()
925 } else if (!jq->job_params.cancelled) { in _job_thread()
952 if (jq->job_params.cancelled) { in _job_thread()
986 jq->job_params.page_num = -1; in _job_thread()
991 job_result = jq->print_ifc->validate_job(jq->print_ifc, &jq->job_params, in _job_thread()
1008 (strcmp(jq->job_params.print_format, PRINT_FORMAT_PDF) != 0)) { in _job_thread()
1009 jq->print_ifc->start_job(jq->print_ifc, &jq->job_params, &printer_caps); in _job_thread()
1016 (void *) jq->print_ifc, &(jq->job_params)); in _job_thread()
1021 jq->job_params.page_num = 0; in _job_thread()
1027 for (i = 0; (i < jq->job_params.num_copies) && in _job_thread()
1029 (!jq->job_params.cancelled); i++) { in _job_thread()
1031 jq->job_params.copies_supported && in _job_thread()
1032 (strcmp(jq->job_params.print_format, PRINT_FORMAT_PDF) == 0)) { in _job_thread()
1038 (strcmp(jq->job_params.print_format, PRINT_FORMAT_PDF) == 0)) { in _job_thread()
1039 jq->print_ifc->start_job(jq->print_ifc, &jq->job_params, &printer_caps); in _job_thread()
1065 if (page.last_page && ((i == jq->job_params.num_copies - 1) || in _job_thread()
1066 (jq->job_params.copies_supported && in _job_thread()
1067 strcmp(jq->job_params.print_format, in _job_thread()
1069 jq->job_params.last_page = page.last_page; in _job_thread()
1071 jq->job_params.last_page = false; in _job_thread()
1074 bool printBlankPage = (strcmp(jq->job_params.print_format, in _job_thread()
1076 &jq->job_params, &printer_caps) : wprintBlankPageForPwg( in _job_thread()
1077 &jq->job_params, &printer_caps); in _job_thread()
1084 jq->job_params.page_num++; in _job_thread()
1087 jq->job_params.page_num = page.page_num; in _job_thread()
1089 jq->job_params.page_num = per_copy_page_num; in _job_thread()
1093 jq->job_params.print_top_margin += page.top_margin; in _job_thread()
1094 jq->job_params.print_left_margin += page.left_margin; in _job_thread()
1095 jq->job_params.print_right_margin += page.right_margin; in _job_thread()
1096 jq->job_params.print_bottom_margin += page.bottom_margin; in _job_thread()
1098 jq->job_params.copy_num = (i + 1); in _job_thread()
1099 jq->job_params.copy_page_num = page.page_num; in _job_thread()
1100 jq->job_params.page_backside = !(page.page_num & 0x1); in _job_thread()
1101 jq->job_params.page_corrupted = (page.corrupted ? 1 : 0); in _job_thread()
1102 jq->job_params.page_printing = true; in _job_thread()
1110 if ((page.page_num == jq->job_params.job_pages_per_set) && in _job_thread()
1111 !(jq->job_params.face_down_tray) && printBlankPage) { in _job_thread()
1112 jq->plugin->print_blank_page(job_handle, &(jq->job_params), in _job_thread()
1116 if (strcmp(jq->job_params.print_format, PRINT_FORMAT_PDF) != 0) { in _job_thread()
1117 job_result = jq->plugin->print_page(&(jq->job_params), in _job_thread()
1123 job_result = jq->plugin->print_page(&(jq->job_params), in _job_thread()
1132 if ((jq->job_params.duplex != DUPLEX_MODE_NONE) && in _job_thread()
1134 jq->plugin->print_blank_page(job_handle, &(jq->job_params), in _job_thread()
1140 jq->job_params.print_top_margin -= page.top_margin; in _job_thread()
1141 jq->job_params.print_left_margin -= page.left_margin; in _job_thread()
1142 jq->job_params.print_right_margin -= page.right_margin; in _job_thread()
1143 jq->job_params.print_bottom_margin -= page.bottom_margin; in _job_thread()
1144 jq->job_params.page_printing = false; in _job_thread()
1154 if (page.last_page && (jq->job_params.face_down_tray) && in _job_thread()
1155 !(jq->job_params.page_backside) && printBlankPage) { in _job_thread()
1157 jq->plugin->print_blank_page(job_handle, &(jq->job_params), in _job_thread()
1163 if (jq->saveQ && !jq->job_params.cancelled && (job_result != ERROR)) { in _job_thread()
1168 if (page.last_page && !jq->job_params.last_page) { in _job_thread()
1182 if (page.last_page || jq->job_params.cancelled) { in _job_thread()
1191 if ((strcmp(jq->job_params.print_format, PRINT_FORMAT_PDF) == 0) && in _job_thread()
1205 for (i = 0; ((i < jq->job_params.num_copies) && (job_result == OK)); i++) { in _job_thread()
1206 if ((i > 0) && jq->job_params.copies_supported && in _job_thread()
1207 (strcmp(jq->job_params.print_format, PRINT_FORMAT_PDF) == 0)) { in _job_thread()
1221 jq->job_params.page_num++; in _job_thread()
1222 jq->job_params.last_page = (i == (jq->job_params.num_copies - 1)); in _job_thread()
1223 jq->job_params.copy_num = (i + 1); in _job_thread()
1224 jq->job_params.copy_page_num = 1; in _job_thread()
1225 jq->job_params.page_corrupted = (job_result == CORRUPT); in _job_thread()
1226 jq->job_params.page_printing = true; in _job_thread()
1229 job_result = jq->plugin->print_page(&(jq->job_params), jq->mime_type, in _job_thread()
1232 if ((jq->job_params.duplex != DUPLEX_MODE_NONE) in _job_thread()
1235 &(jq->job_params), jq->mime_type, page.filename); in _job_thread()
1239 jq->job_params.page_printing = false; in _job_thread()
1246 if (jq->job_params.page_num >= 0) { in _job_thread()
1248 if ((jq->job_params.page_num == 0) && (jq->plugin->print_blank_page != NULL)) { in _job_thread()
1249 jq->plugin->print_blank_page(job_handle, &(jq->job_params), jq->mime_type, in _job_thread()
1253 jq->plugin->end_job(&(jq->job_params)); in _job_thread()
1256 (strcmp(jq->job_params.print_format, PRINT_FORMAT_PDF) != 0)) { in _job_thread()
1271 if ((jq->job_params.page_num > 0) && (jq->status_ifc != NULL)) { in _job_thread()
1288 if (jq->job_params.cancelled && !jq->cancel_ok) { in _job_thread()
1300 if (!jq->job_params.cancelled && in _job_thread()
1319 jq->job_params.page_num = MAX(0, jq->job_params.page_num); in _job_thread()
1333 if (!jq->job_params.cancelled) { in _job_thread()
1360 jq->mime_type, jq->job_params.print_format); in _job_thread()
1690 char *_get_print_format(const char *mime_type, const wprint_job_params_t *job_params, in _get_print_format() argument
1699 if (job_params && (strcasecmp(job_params->docCategory, "photo") == 0) && in _get_print_format()
1727 status_t wprintGetDefaultJobParams(wprint_job_params_t *job_params) { in wprintGetDefaultJobParams() argument
1739 if (job_params == NULL) return result; in wprintGetDefaultJobParams()
1741 memcpy(job_params, &_default_job_params, sizeof(_default_job_params)); in wprintGetDefaultJobParams()
1746 status_t wprintGetFinalJobParams(wprint_job_params_t *job_params, in wprintGetFinalJobParams() argument
1752 if (job_params == NULL) { in wprintGetFinalJobParams()
1757 job_params->accepts_pclm = printer_cap->canPrintPCLm; in wprintGetFinalJobParams()
1758 job_params->accepts_pdf = printer_cap->canPrintPDF; in wprintGetFinalJobParams()
1759 job_params->media_default = printer_cap->mediaDefault; in wprintGetFinalJobParams()
1762 job_params->epcl_ipp_supported = true; in wprintGetFinalJobParams()
1766 job_params->copies_supported = true; in wprintGetFinalJobParams()
1770 job_params->ipp_1_0_supported = true; in wprintGetFinalJobParams()
1771 job_params->ipp_2_0_supported = true; in wprintGetFinalJobParams()
1773 job_params->ipp_1_0_supported = true; in wprintGetFinalJobParams()
1774 job_params->ipp_2_0_supported = false; in wprintGetFinalJobParams()
1778 job_params->color_space = COLOR_SPACE_MONO; in wprintGetFinalJobParams()
1782 job_params->pcl_type = PCLm; in wprintGetFinalJobParams()
1785 job_params->pcl_type = PCLPWG; in wprintGetFinalJobParams()
1789 job_params->pcl_type = PCLPWG; in wprintGetFinalJobParams()
1792 LOGD("wprintGetFinalJobParams: Using PCL Type %s", getPCLTypeString(job_params->pcl_type)); in wprintGetFinalJobParams()
1795 job_params->strip_height = printer_cap->stripHeight; in wprintGetFinalJobParams()
1798 if (job_params->num_copies <= 0) { in wprintGetFinalJobParams()
1799 job_params->num_copies = 1; in wprintGetFinalJobParams()
1803 if (strcasecmp(job_params->docCategory, "photo") == 0 && int_array_contains( in wprintGetFinalJobParams()
1805 job_params->print_quality = IPP_QUALITY_HIGH; in wprintGetFinalJobParams()
1810 if (job_params->media_size == printer_cap->supportedMediaSizes[i]) { in wprintGetFinalJobParams()
1816 job_params->media_size = ISO_A4; in wprintGetFinalJobParams()
1817 job_params->media_tray = TRAY_SRC_AUTO_SELECT; in wprintGetFinalJobParams()
1822 if (job_params->media_tray == printer_cap->supportedMediaTrays[i]) { in wprintGetFinalJobParams()
1829 job_params->media_tray = TRAY_SRC_AUTO_SELECT; in wprintGetFinalJobParams()
1833 job_params->media_size_name = true; in wprintGetFinalJobParams()
1835 job_params->media_size_name = false; in wprintGetFinalJobParams()
1839 if ((job_params->borderless == true) && !printer_cap->borderless) { in wprintGetFinalJobParams()
1840 job_params->borderless = false; in wprintGetFinalJobParams()
1844 if (job_params->borderless && in wprintGetFinalJobParams()
1845 ((job_params->job_top_margin > 0.0f) || (job_params->job_left_margin > 0.0f) || in wprintGetFinalJobParams()
1846 (job_params->job_right_margin > 0.0f) in wprintGetFinalJobParams()
1847 || (job_params->job_bottom_margin > 0.0f))) { in wprintGetFinalJobParams()
1848 job_params->borderless = false; in wprintGetFinalJobParams()
1852 if ((job_params->duplex != DUPLEX_MODE_NONE) && !printer_cap->duplex) { in wprintGetFinalJobParams()
1853 job_params->duplex = DUPLEX_MODE_NONE; in wprintGetFinalJobParams()
1857 if (job_params->borderless && (job_params->duplex != DUPLEX_MODE_NONE)) { in wprintGetFinalJobParams()
1858 job_params->duplex = DUPLEX_MODE_NONE; in wprintGetFinalJobParams()
1861 if ((job_params->duplex == DUPLEX_MODE_BOOK) in wprintGetFinalJobParams()
1863 job_params->render_flags |= RENDER_FLAG_ROTATE_BACK_PAGE; in wprintGetFinalJobParams()
1866 if (job_params->render_flags & RENDER_FLAG_ROTATE_BACK_PAGE) { in wprintGetFinalJobParams()
1870 job_params->face_down_tray = printer_cap->faceDownTray; in wprintGetFinalJobParams()
1872 if (job_params->render_flags & RENDER_FLAG_AUTO_SCALE) { in wprintGetFinalJobParams()
1873 job_params->render_flags |= AUTO_SCALE_RENDER_FLAGS; in wprintGetFinalJobParams()
1874 } else if (job_params->render_flags & RENDER_FLAG_AUTO_FIT) { in wprintGetFinalJobParams()
1875 job_params->render_flags |= AUTO_FIT_RENDER_FLAGS; in wprintGetFinalJobParams()
1878 job_params->pixel_units = _findCloseResolutionSupported(DEFAULT_RESOLUTION, in wprintGetFinalJobParams()
1881 printable_area_get_default_margins(job_params, printer_cap, &margins[TOP_MARGIN], in wprintGetFinalJobParams()
1883 printable_area_get(job_params, margins[TOP_MARGIN], margins[LEFT_MARGIN], in wprintGetFinalJobParams()
1886 job_params->accepts_app_name = printer_cap->docSourceAppName; in wprintGetFinalJobParams()
1887 job_params->accepts_app_version = printer_cap->docSourceAppVersion; in wprintGetFinalJobParams()
1888 job_params->accepts_os_name = printer_cap->docSourceOsName; in wprintGetFinalJobParams()
1889 job_params->accepts_os_version = printer_cap->docSourceOsVersion; in wprintGetFinalJobParams()
1895 const wprint_job_params_t *job_params, const printer_capabilities_t *printer_cap, in wprintStartJob() argument
1912 print_format = _get_print_format(mime_type, job_params, printer_cap); in wprintStartJob()
1929 if (job_params == NULL) { in wprintStartJob()
1978 memcpy((char *) &(jq->job_params), job_params, sizeof(wprint_job_params_t)); in wprintStartJob()
1982 size_t useragent_len = strlen(USERAGENT_PREFIX) + strlen(jq->job_params.docCategory) + 1; in wprintStartJob()
1985 snprintf(useragent, useragent_len, USERAGENT_PREFIX "%s", jq->job_params.docCategory); in wprintStartJob()
1986 jq->job_params.useragent = useragent; in wprintStartJob()
1990 if (job_params->certificate) { in wprintStartJob()
1991 jq->job_params.certificate = malloc(job_params->certificate_len); in wprintStartJob()
1992 if (jq->job_params.certificate) { in wprintStartJob()
1993 memcpy(jq->job_params.certificate, job_params->certificate, in wprintStartJob()
1994 job_params->certificate_len); in wprintStartJob()
1998 jq->job_params.page_num = 0; in wprintStartJob()
1999 jq->job_params.print_format = print_format; in wprintStartJob()
2002 jq->job_params.pcl_type = PCLm; in wprintStartJob()
2004 jq->job_params.pcl_type = PCLNONE; in wprintStartJob()
2010 jq->job_params.pcl_type = PCLPWG; in wprintStartJob()
2012 jq->job_params.pcl_type = PCLNONE; in wprintStartJob()
2025 if (jq->job_params.num_copies > 1) { in wprintStartJob()
2183 jq->job_params.cancelled = true; in wprintCancelJob()
2187 if ((jq->job_state != JOB_STATE_BLOCKED) || (jq->job_params.page_num != 0)) { in wprintCancelJob()
2190 jq->job_params.job_originating_user_name) == 0); in wprintCancelJob()
2213 jq->job_params.cancelled = true; in wprintCancelJob()
2298 bool wprintBlankPageForPclm(const wprint_job_params_t *job_params, in wprintBlankPageForPclm() argument
2300 return ((job_params->job_pages_per_set % 2) && in wprintBlankPageForPclm()
2301 ((job_params->num_copies > 1 && printer_cap->sidesSupported) || in wprintBlankPageForPclm()
2302 (job_params->num_copies == 1)) && (job_params->duplex != DUPLEX_MODE_NONE)); in wprintBlankPageForPclm()
2305 bool wprintBlankPageForPwg(const wprint_job_params_t *job_params, in wprintBlankPageForPwg() argument
2307 return ((job_params->job_pages_per_set % 2) && (job_params->duplex != DUPLEX_MODE_NONE) && in wprintBlankPageForPwg()
2309 strcmp(job_params->print_format, PRINT_FORMAT_PWG) == 0)); in wprintBlankPageForPwg()