Lines Matching refs:capabilities
48 static void parse_printerUris(ipp_t *response, printer_capabilities_t *capabilities);
741 printer_capabilities_t *capabilities) { in parse_getMediaSupported() argument
769 strlcpy(capabilities->make, ippGetString(attrptr, 0, NULL), sizeof(capabilities->make)); in parse_getMediaSupported()
770 LOGD("manufacturer_from_deviceid: %s", capabilities->make); in parse_getMediaSupported()
772 if (strcasestr(capabilities->make, optout_manufacture_list[iterate]) != NULL) { in parse_getMediaSupported()
773 LOGD("printer device id cmp: %s", strcasestr(capabilities->make, in parse_getMediaSupported()
904 printer_capabilities_t *capabilities) { in get_supportedPrinterResolutions() argument
913 capabilities->supportedResolutions[idx] = xres; in get_supportedPrinterResolutions()
918 capabilities->numSupportedResolutions = idx; in get_supportedPrinterResolutions()
932 static void addMediaType(printer_capabilities_t *capabilities, media_type_t mediaType) { in addMediaType() argument
934 for (index = 0; index < capabilities->numSupportedMediaTypes; index++) { in addMediaType()
936 if (capabilities->supportedMediaTypes[index] == mediaType) return; in addMediaType()
940 if (capabilities->numSupportedMediaTypes < MAX_MEDIA_TYPES_SUPPORTED) { in addMediaType()
941 capabilities->supportedMediaTypes[capabilities->numSupportedMediaTypes++] = mediaType; in addMediaType()
947 void parse_printerAttributes(ipp_t *response, printer_capabilities_t *capabilities) { in parse_printerAttributes() argument
957 parse_getMediaSupported(response, &media_supported, capabilities); in parse_printerAttributes()
959 parse_printerUris(response, capabilities); in parse_printerAttributes()
963 capabilities->numSupportedMediaTypes = 0; in parse_printerAttributes()
966 capabilities->supportedMediaSizes[capabilities->numSupportedMediaSizes++] = in parse_printerAttributes()
975 strlcpy(capabilities->name, ippGetString(attrptr, 0, NULL), sizeof(capabilities->name)); in parse_printerAttributes()
978 if (!capabilities->name[0]) { in parse_printerAttributes()
980 strlcpy(capabilities->name, ippGetString(attrptr, 0, NULL), sizeof(capabilities->name)); in parse_printerAttributes()
984 if (!capabilities->name[0]) { in parse_printerAttributes()
986 strlcpy(capabilities->name, ippGetString(attrptr, 0, NULL), sizeof(capabilities->name)); in parse_printerAttributes()
991 strlcpy(capabilities->make, ippGetString(attrptr, 0, NULL), sizeof(capabilities->make)); in parse_printerAttributes()
995 strlcpy(capabilities->uuid, ippGetString(attrptr, 0, NULL), sizeof(capabilities->uuid)); in parse_printerAttributes()
999 strlcpy(capabilities->location, ippGetString(attrptr, 0, NULL), in parse_printerAttributes()
1000 sizeof(capabilities->location)); in parse_printerAttributes()
1004 strlcpy(capabilities->mediaDefault, ippGetString(attrptr, 0, NULL), in parse_printerAttributes()
1005 sizeof(capabilities->mediaDefault)); in parse_printerAttributes()
1010 capabilities->color = 1; in parse_printerAttributes()
1019 capabilities->canCopy = 1; in parse_printerAttributes()
1026 capabilities->color = 1; in parse_printerAttributes()
1040 capabilities->canPrintPDF = 1; in parse_printerAttributes()
1042 capabilities->canPrintPDF = 1; in parse_printerAttributes()
1044 capabilities->canPrintPCLm = 1; in parse_printerAttributes()
1046 capabilities->canPrintPDF = 1; in parse_printerAttributes()
1048 capabilities->canPrintPWG = 1; in parse_printerAttributes()
1056 capabilities->duplex = 1; in parse_printerAttributes()
1058 capabilities->duplex = 1; in parse_printerAttributes()
1064 capabilities->numSupportedMediaTypes = 0; in parse_printerAttributes()
1070 addMediaType(capabilities, MEDIA_PHOTO_GLOSSY); in parse_printerAttributes()
1072 addMediaType(capabilities, MEDIA_PHOTO); in parse_printerAttributes()
1074 addMediaType(capabilities, MEDIA_PLAIN); in parse_printerAttributes()
1079 if (capabilities->numSupportedMediaTypes == 0) { in parse_printerAttributes()
1081 addMediaType(capabilities, MEDIA_PLAIN); in parse_printerAttributes()
1082 addMediaType(capabilities, MEDIA_PHOTO); in parse_printerAttributes()
1083 addMediaType(capabilities, MEDIA_PHOTO_GLOSSY); in parse_printerAttributes()
1086 capabilities->numSupportedResolutions = 0; in parse_printerAttributes()
1092 get_supportedPrinterResolutions(attrptr, capabilities); in parse_printerAttributes()
1095 get_supportedPrinterResolutions(attrptr, capabilities); in parse_printerAttributes()
1118 capabilities->ippVersionMajor = 2; in parse_printerAttributes()
1119 capabilities->ippVersionMinor = 0; in parse_printerAttributes()
1121 capabilities->ippVersionMajor = 1; in parse_printerAttributes()
1122 capabilities->ippVersionMinor = 1; in parse_printerAttributes()
1124 capabilities->ippVersionMajor = 1; in parse_printerAttributes()
1125 capabilities->ippVersionMinor = 0; in parse_printerAttributes()
1128 capabilities->ippVersionMajor = 1; in parse_printerAttributes()
1129 capabilities->ippVersionMinor = 0; in parse_printerAttributes()
1142 capabilities->ePclIppVersion = 1; in parse_printerAttributes()
1154 capabilities->ePclIppVersion = 1; in parse_printerAttributes()
1169 capabilities->printerTopMargin = ippGetInteger(attrptr, 0); in parse_printerAttributes()
1171 capabilities->printerBottomMargin = ippGetInteger(attrptr, 0); in parse_printerAttributes()
1173 capabilities->printerLeftMargin = ippGetInteger(attrptr, 0); in parse_printerAttributes()
1175 capabilities->printerRightMargin = ippGetInteger(attrptr, 0); in parse_printerAttributes()
1182 capabilities->isMediaSizeNameSupported = true; in parse_printerAttributes()
1184 capabilities->isMediaSizeNameSupported = false; in parse_printerAttributes()
1198 capabilities->stripHeight = STRIPE_HEIGHT; in parse_printerAttributes()
1200 capabilities->stripHeight = ippGetInteger(attrptr, 0); in parse_printerAttributes()
1203 capabilities->stripHeight = STRIPE_HEIGHT; in parse_printerAttributes()
1216 capabilities->canRotateDuplexBackPage = 0; in parse_printerAttributes()
1219 capabilities->canRotateDuplexBackPage = 1; in parse_printerAttributes()
1269 capabilities->borderless = 1; in parse_printerAttributes()
1276 capabilities->inkjet = 1; in parse_printerAttributes()
1278 } else if (capabilities->borderless == 1) { in parse_printerAttributes()
1279 capabilities->inkjet = 1; in parse_printerAttributes()
1283 capabilities->faceDownTray = 1; in parse_printerAttributes()
1286 capabilities->faceDownTray = 0; in parse_printerAttributes()
1295 capabilities->docSourceAppName = 1; in parse_printerAttributes()
1299 capabilities->docSourceAppVersion = 1; in parse_printerAttributes()
1301 capabilities->docSourceOsName = 1; in parse_printerAttributes()
1303 capabilities->docSourceOsVersion = 1; in parse_printerAttributes()
1307 debuglist_printerCapabilities(capabilities); in parse_printerAttributes()
1317 static void parse_printerUris(ipp_t *response, printer_capabilities_t *capabilities) { in parse_printerUris() argument
1358 strlcpy(capabilities->printerUri, uris[i].uri, sizeof(capabilities->printerUri)); in parse_printerUris()
1364 void debuglist_printerCapabilities(printer_capabilities_t *capabilities) { in debuglist_printerCapabilities() argument
1365 LOGD("printer make: %s", capabilities->make); in debuglist_printerCapabilities()
1366 LOGD("printer default media: %s", capabilities->mediaDefault); in debuglist_printerCapabilities()
1367 LOGD("canPrintPDF: %d", capabilities->canPrintPDF); in debuglist_printerCapabilities()
1368 LOGD("duplex: %d", capabilities->duplex); in debuglist_printerCapabilities()
1369 LOGD("canRotateDuplexBackPage: %d", capabilities->canRotateDuplexBackPage); in debuglist_printerCapabilities()
1370 LOGD("color: %d", capabilities->color); in debuglist_printerCapabilities()
1371 LOGD("canCopy: %d", capabilities->canCopy); in debuglist_printerCapabilities()
1372 LOGD("ippVersionMajor: %d", capabilities->ippVersionMajor); in debuglist_printerCapabilities()
1373 LOGD("ippVersionMinor: %d", capabilities->ippVersionMinor); in debuglist_printerCapabilities()
1374 LOGD("strip height: %d", capabilities->stripHeight); in debuglist_printerCapabilities()
1375 LOGD("faceDownTray: %d", capabilities->faceDownTray); in debuglist_printerCapabilities()