Lines Matching refs:capabilities
48 static void parse_printerUris(ipp_t *response, printer_capabilities_t *capabilities);
748 printer_capabilities_t *capabilities) { in parse_getMediaSupported() argument
841 printer_capabilities_t *capabilities) { in get_supportedPrinterResolutions() argument
850 capabilities->supportedResolutions[idx] = xres; in get_supportedPrinterResolutions()
855 capabilities->numSupportedResolutions = idx; in get_supportedPrinterResolutions()
869 static void addMediaType(printer_capabilities_t *capabilities, media_type_t mediaType) { in addMediaType() argument
871 for (index = 0; index < capabilities->numSupportedMediaTypes; index++) { in addMediaType()
873 if (capabilities->supportedMediaTypes[index] == mediaType) return; in addMediaType()
877 if (capabilities->numSupportedMediaTypes < MAX_MEDIA_TYPES_SUPPORTED) { in addMediaType()
878 capabilities->supportedMediaTypes[capabilities->numSupportedMediaTypes++] = mediaType; in addMediaType()
884 void parse_printerAttributes(ipp_t *response, printer_capabilities_t *capabilities) { in parse_printerAttributes() argument
894 parse_getMediaSupported(response, &media_supported, capabilities); in parse_printerAttributes()
896 parse_printerUris(response, capabilities); in parse_printerAttributes()
900 capabilities->numSupportedMediaTypes = 0; in parse_printerAttributes()
903 capabilities->supportedMediaSizes[capabilities->numSupportedMediaSizes++] = in parse_printerAttributes()
912 strlcpy(capabilities->name, ippGetString(attrptr, 0, NULL), sizeof(capabilities->name)); in parse_printerAttributes()
915 if (!capabilities->name[0]) { in parse_printerAttributes()
917 strlcpy(capabilities->name, ippGetString(attrptr, 0, NULL), sizeof(capabilities->name)); in parse_printerAttributes()
921 if (!capabilities->name[0]) { in parse_printerAttributes()
923 strlcpy(capabilities->name, ippGetString(attrptr, 0, NULL), sizeof(capabilities->name)); in parse_printerAttributes()
928 strlcpy(capabilities->make, ippGetString(attrptr, 0, NULL), sizeof(capabilities->make)); in parse_printerAttributes()
932 strlcpy(capabilities->uuid, ippGetString(attrptr, 0, NULL), sizeof(capabilities->uuid)); in parse_printerAttributes()
936 strlcpy(capabilities->location, ippGetString(attrptr, 0, NULL), in parse_printerAttributes()
937 sizeof(capabilities->location)); in parse_printerAttributes()
941 strlcpy(capabilities->mediaDefault, ippGetString(attrptr, 0, NULL), in parse_printerAttributes()
942 sizeof(capabilities->mediaDefault)); in parse_printerAttributes()
947 capabilities->color = 1; in parse_printerAttributes()
956 capabilities->canCopy = 1; in parse_printerAttributes()
963 capabilities->color = 1; in parse_printerAttributes()
969 for (i = 0; i < ippGetCount(attrptr) && capabilities->numSupportedQuality in parse_printerAttributes()
972 capabilities->supportedQuality[capabilities->numSupportedQuality++] = in parse_printerAttributes()
986 capabilities->canPrintPDF = 1; in parse_printerAttributes()
988 capabilities->canPrintPDF = 1; in parse_printerAttributes()
990 capabilities->canPrintPCLm = 1; in parse_printerAttributes()
992 capabilities->canPrintPDF = 1; in parse_printerAttributes()
994 capabilities->canPrintPWG = 1; in parse_printerAttributes()
1002 capabilities->duplex = 1; in parse_printerAttributes()
1004 capabilities->duplex = 1; in parse_printerAttributes()
1010 capabilities->numSupportedMediaTypes = 0; in parse_printerAttributes()
1016 addMediaType(capabilities, MEDIA_PHOTO_GLOSSY); in parse_printerAttributes()
1018 addMediaType(capabilities, MEDIA_PHOTO); in parse_printerAttributes()
1020 addMediaType(capabilities, MEDIA_PLAIN); in parse_printerAttributes()
1022 addMediaType(capabilities, MEDIA_AUTO); in parse_printerAttributes()
1027 if (capabilities->numSupportedMediaTypes == 0) { in parse_printerAttributes()
1029 addMediaType(capabilities, MEDIA_PLAIN); in parse_printerAttributes()
1030 addMediaType(capabilities, MEDIA_PHOTO); in parse_printerAttributes()
1031 addMediaType(capabilities, MEDIA_PHOTO_GLOSSY); in parse_printerAttributes()
1034 capabilities->numSupportedResolutions = 0; in parse_printerAttributes()
1040 get_supportedPrinterResolutions(attrptr, capabilities); in parse_printerAttributes()
1043 get_supportedPrinterResolutions(attrptr, capabilities); in parse_printerAttributes()
1066 capabilities->ippVersionMajor = 2; in parse_printerAttributes()
1067 capabilities->ippVersionMinor = 0; in parse_printerAttributes()
1069 capabilities->ippVersionMajor = 1; in parse_printerAttributes()
1070 capabilities->ippVersionMinor = 1; in parse_printerAttributes()
1072 capabilities->ippVersionMajor = 1; in parse_printerAttributes()
1073 capabilities->ippVersionMinor = 0; in parse_printerAttributes()
1076 capabilities->ippVersionMajor = 1; in parse_printerAttributes()
1077 capabilities->ippVersionMinor = 0; in parse_printerAttributes()
1090 capabilities->ePclIppVersion = 1; in parse_printerAttributes()
1102 capabilities->ePclIppVersion = 1; in parse_printerAttributes()
1117 capabilities->printerTopMargin = ippGetInteger(attrptr, 0); in parse_printerAttributes()
1119 capabilities->printerBottomMargin = ippGetInteger(attrptr, 0); in parse_printerAttributes()
1121 capabilities->printerLeftMargin = ippGetInteger(attrptr, 0); in parse_printerAttributes()
1123 capabilities->printerRightMargin = ippGetInteger(attrptr, 0); in parse_printerAttributes()
1130 capabilities->isMediaSizeNameSupported = true; in parse_printerAttributes()
1132 capabilities->isMediaSizeNameSupported = false; in parse_printerAttributes()
1146 capabilities->stripHeight = STRIPE_HEIGHT; in parse_printerAttributes()
1148 capabilities->stripHeight = ippGetInteger(attrptr, 0); in parse_printerAttributes()
1151 capabilities->stripHeight = STRIPE_HEIGHT; in parse_printerAttributes()
1161 capabilities->canRotateDuplexBackPage = 0; in parse_printerAttributes()
1167 capabilities->canRotateDuplexBackPage = 1; in parse_printerAttributes()
1216 capabilities->borderless = 1; in parse_printerAttributes()
1223 capabilities->inkjet = 1; in parse_printerAttributes()
1225 } else if (capabilities->borderless == 1) { in parse_printerAttributes()
1226 capabilities->inkjet = 1; in parse_printerAttributes()
1230 capabilities->faceDownTray = 1; in parse_printerAttributes()
1233 capabilities->faceDownTray = 0; in parse_printerAttributes()
1241 capabilities->faceDownTray = 0; in parse_printerAttributes()
1251 capabilities->docSourceAppName = 1; in parse_printerAttributes()
1255 capabilities->docSourceAppVersion = 1; in parse_printerAttributes()
1257 capabilities->docSourceOsName = 1; in parse_printerAttributes()
1259 capabilities->docSourceOsVersion = 1; in parse_printerAttributes()
1263 debuglist_printerCapabilities(capabilities); in parse_printerAttributes()
1273 static void parse_printerUris(ipp_t *response, printer_capabilities_t *capabilities) { in parse_printerUris() argument
1302 if (uris[i].valid && strncmp(capabilities->printerUri, "ipps://", 7) != 0) { in parse_printerUris()
1304 strlcpy(capabilities->printerUri, uris[i].uri, sizeof(capabilities->printerUri)); in parse_printerUris()
1309 void debuglist_printerCapabilities(printer_capabilities_t *capabilities) { in debuglist_printerCapabilities() argument
1310 LOGD("printer make: %s", capabilities->make); in debuglist_printerCapabilities()
1311 LOGD("printer default media: %s", capabilities->mediaDefault); in debuglist_printerCapabilities()
1312 LOGD("canPrintPDF: %d", capabilities->canPrintPDF); in debuglist_printerCapabilities()
1313 LOGD("duplex: %d", capabilities->duplex); in debuglist_printerCapabilities()
1314 LOGD("canRotateDuplexBackPage: %d", capabilities->canRotateDuplexBackPage); in debuglist_printerCapabilities()
1315 LOGD("color: %d", capabilities->color); in debuglist_printerCapabilities()
1316 LOGD("canCopy: %d", capabilities->canCopy); in debuglist_printerCapabilities()
1317 LOGD("ippVersionMajor: %d", capabilities->ippVersionMajor); in debuglist_printerCapabilities()
1318 LOGD("ippVersionMinor: %d", capabilities->ippVersionMinor); in debuglist_printerCapabilities()
1319 LOGD("strip height: %d", capabilities->stripHeight); in debuglist_printerCapabilities()
1320 LOGD("faceDownTray: %d", capabilities->faceDownTray); in debuglist_printerCapabilities()