Lines Matching refs:printer_cap
1534 static void _validate_supported_media_sizes(printer_capabilities_t *printer_cap) { in _validate_supported_media_sizes() argument
1535 if (printer_cap == NULL) return; in _validate_supported_media_sizes()
1537 if (printer_cap->numSupportedMediaSizes == 0) { in _validate_supported_media_sizes()
1539 printer_cap->supportedMediaSizes[i++] = ISO_A4; in _validate_supported_media_sizes()
1540 printer_cap->supportedMediaSizes[i++] = US_LETTER; in _validate_supported_media_sizes()
1541 printer_cap->supportedMediaSizes[i++] = INDEX_CARD_4X6; in _validate_supported_media_sizes()
1542 printer_cap->supportedMediaSizes[i++] = INDEX_CARD_5X7; in _validate_supported_media_sizes()
1543 printer_cap->numSupportedMediaSizes = i; in _validate_supported_media_sizes()
1546 for (read = write = 0; read < printer_cap->numSupportedMediaSizes; read++) { in _validate_supported_media_sizes()
1547 if (is_supported(printer_cap->supportedMediaSizes[read])) { in _validate_supported_media_sizes()
1548 printer_cap->supportedMediaSizes[write++] = in _validate_supported_media_sizes()
1549 printer_cap->supportedMediaSizes[read]; in _validate_supported_media_sizes()
1552 printer_cap->numSupportedMediaSizes = write; in _validate_supported_media_sizes()
1559 static void _validate_supported_media_trays(printer_capabilities_t *printer_cap) { in _validate_supported_media_trays() argument
1560 if (printer_cap == NULL) return; in _validate_supported_media_trays()
1562 if (printer_cap->numSupportedMediaTrays == 0) { in _validate_supported_media_trays()
1563 printer_cap->supportedMediaTrays[0] = TRAY_SRC_AUTO_SELECT; in _validate_supported_media_trays()
1564 printer_cap->numSupportedMediaTrays = 1; in _validate_supported_media_trays()
1593 const printer_capabilities_t *printer_cap) { in _findCloseResolutionSupported() argument
1597 for (index = 0; index < printer_cap->numSupportedResolutions; index++) { in _findCloseResolutionSupported()
1598 int resolution = printer_cap->supportedResolutions[index]; in _findCloseResolutionSupported()
1623 printer_capabilities_t *printer_cap) { in wprintGetCapabilities() argument
1630 memcpy(printer_cap, &_default_cap, sizeof(printer_capabilities_t)); in wprintGetCapabilities()
1636 printer_cap->duplex = 1; in wprintGetCapabilities()
1637 printer_cap->borderless = 1; in wprintGetCapabilities()
1638 printer_cap->canPrintPCLm = (_default_pcl_type == PCLm); in wprintGetCapabilities()
1639 printer_cap->canPrintPWG = (_default_pcl_type == PCLPWG); in wprintGetCapabilities()
1640 printer_cap->stripHeight = STRIPE_HEIGHT; in wprintGetCapabilities()
1649 result = caps_ifc->get_capabilities(caps_ifc, printer_cap); in wprintGetCapabilities()
1653 _validate_supported_media_sizes(printer_cap); in wprintGetCapabilities()
1654 _collect_supported_input_formats(printer_cap); in wprintGetCapabilities()
1655 _validate_supported_media_trays(printer_cap); in wprintGetCapabilities()
1657 printer_cap->isSupported = (printer_cap->canPrintPCLm || printer_cap->canPrintPDF || in wprintGetCapabilities()
1658 printer_cap->canPrintPWG); in wprintGetCapabilities()
1661 memcpy(&g_printer_caps, printer_cap, sizeof(printer_capabilities_t)); in wprintGetCapabilities()
1663 LOGD("\tmake: %s", printer_cap->make); in wprintGetCapabilities()
1664 LOGD("\thas color: %d", printer_cap->color); in wprintGetCapabilities()
1665 LOGD("\tcan duplex: %d", printer_cap->duplex); in wprintGetCapabilities()
1666 LOGD("\tcan rotate back page: %d", printer_cap->canRotateDuplexBackPage); in wprintGetCapabilities()
1667 LOGD("\tcan print borderless: %d", printer_cap->borderless); in wprintGetCapabilities()
1668 LOGD("\tcan print pdf: %d", printer_cap->canPrintPDF); in wprintGetCapabilities()
1669 LOGD("\tcan print pclm: %d", printer_cap->canPrintPCLm); in wprintGetCapabilities()
1670 LOGD("\tcan print pwg: %d", printer_cap->canPrintPWG); in wprintGetCapabilities()
1671 LOGD("\tsource application name supported: %d", printer_cap->docSourceAppName); in wprintGetCapabilities()
1672 LOGD("\tsource application version supported: %d", printer_cap->docSourceAppVersion); in wprintGetCapabilities()
1673 LOGD("\tsource os name supported: %d", printer_cap->docSourceOsName); in wprintGetCapabilities()
1674 LOGD("\tsource os version supported: %d", printer_cap->docSourceOsVersion); in wprintGetCapabilities()
1675 LOGD("\tprinter supported: %d", printer_cap->isSupported); in wprintGetCapabilities()
1676 LOGD("\tstrip height: %d", printer_cap->stripHeight); in wprintGetCapabilities()
1677 LOGD("\tinkjet: %d", printer_cap->inkjet); in wprintGetCapabilities()
1679 for (index = 0; index < printer_cap->numSupportedResolutions; index++) { in wprintGetCapabilities()
1680 LOGD("\t (%d dpi)", printer_cap->supportedResolutions[index]); in wprintGetCapabilities()
1747 const printer_capabilities_t *printer_cap) { in wprintGetFinalJobParams() argument
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()
1761 if (printer_cap->ePclIppVersion == 1) { in wprintGetFinalJobParams()
1765 if (printer_cap->canCopy) { in wprintGetFinalJobParams()
1769 if (printer_cap->ippVersionMajor == 2) { in wprintGetFinalJobParams()
1772 } else if (printer_cap->ippVersionMajor == 1) { in wprintGetFinalJobParams()
1777 if (!printer_cap->color) { in wprintGetFinalJobParams()
1781 if (printer_cap->canPrintPCLm || printer_cap->canPrintPDF) { in wprintGetFinalJobParams()
1784 if ( printer_cap->canPrintPWG) { in wprintGetFinalJobParams()
1788 } else if (printer_cap->canPrintPWG) { in wprintGetFinalJobParams()
1795 job_params->strip_height = printer_cap->stripHeight; in wprintGetFinalJobParams()
1804 printer_cap->supportedQuality, printer_cap->numSupportedQuality, IPP_QUALITY_HIGH)) { in wprintGetFinalJobParams()
1809 for (i = 0; i < printer_cap->numSupportedMediaSizes; i++) { in wprintGetFinalJobParams()
1810 if (job_params->media_size == printer_cap->supportedMediaSizes[i]) { in wprintGetFinalJobParams()
1815 if (i >= printer_cap->numSupportedMediaSizes) { in wprintGetFinalJobParams()
1821 for (i = 0; i < printer_cap->numSupportedMediaTrays; i++) { in wprintGetFinalJobParams()
1822 if (job_params->media_tray == printer_cap->supportedMediaTrays[i]) { in wprintGetFinalJobParams()
1828 if (i >= printer_cap->numSupportedMediaTrays) { in wprintGetFinalJobParams()
1832 if (printer_cap->isMediaSizeNameSupported == true) { in wprintGetFinalJobParams()
1839 if ((job_params->borderless == true) && !printer_cap->borderless) { in wprintGetFinalJobParams()
1852 if ((job_params->duplex != DUPLEX_MODE_NONE) && !printer_cap->duplex) { in wprintGetFinalJobParams()
1862 && !printer_cap->canRotateDuplexBackPage) { in wprintGetFinalJobParams()
1870 job_params->face_down_tray = printer_cap->faceDownTray; in wprintGetFinalJobParams()
1879 MAX_SUPPORTED_RESOLUTION, printer_cap); in wprintGetFinalJobParams()
1881 printable_area_get_default_margins(job_params, printer_cap, &margins[TOP_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()
1973 memcpy(jq->printer_uri, printer_cap->httpResource, in wprintStartJob()
1974 MIN(ARRAY_SIZE(printer_cap->httpResource), ARRAY_SIZE(jq->printer_uri))); in wprintStartJob()
2001 if (printer_cap->canPrintPCLm || printer_cap->canPrintPDF) { in wprintStartJob()
2009 if (printer_cap->canPrintPWG) { in wprintStartJob()
2299 const printer_capabilities_t *printer_cap) { in wprintBlankPageForPclm() argument
2301 ((job_params->num_copies > 1 && printer_cap->sidesSupported) || in wprintBlankPageForPclm()
2306 const printer_capabilities_t *printer_cap) { in wprintBlankPageForPwg() argument
2308 !(printer_cap->jobPagesPerSetSupported && in wprintBlankPageForPwg()