MCPcopy Create free account
hub / github.com/OpenPrinting/cups / ippGetResolution

Function ippGetResolution

cups/ipp.c:2427–2461  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2425 */
2426
2427int /* O - Horizontal/cross feed resolution or 0 */
2428ippGetResolution(
2429 ipp_attribute_t *attr, /* I - IPP attribute */
2430 int element, /* I - Value number (0-based) */
2431 int *yres, /* O - Vertical/feed resolution */
2432 ipp_res_t *units) /* O - Units for resolution */
2433{
2434 /*
2435 * Range check input...
2436 */
2437
2438 if (!attr || attr->value_tag != IPP_TAG_RESOLUTION ||
2439 element < 0 || element >= attr->num_values)
2440 {
2441 if (yres)
2442 *yres = 0;
2443
2444 if (units)
2445 *units = (ipp_res_t)0;
2446
2447 return (0);
2448 }
2449
2450 /*
2451 * Return the value...
2452 */
2453
2454 if (yres)
2455 *yres = attr->values[element].resolution.yres;
2456
2457 if (units)
2458 *units = attr->values[element].resolution.units;
2459
2460 return (attr->values[element].resolution.xres);
2461}
2462
2463
2464/*

Callers 15

do_testFunction · 0.85
print_attrFunction · 0.85
print_ippserver_attrFunction · 0.85
print_json_attrFunction · 0.85
with_distinct_valuesFunction · 0.85
with_valueFunction · 0.85
with_value_fromFunction · 0.85
valid_job_attributesFunction · 0.85
_ppdCreateFromIPP2Function · 0.85
pwg_ppdize_resolutionFunction · 0.85
localizeFunction · 0.85
show_supportedFunction · 0.85

Calls

no outgoing calls

Tested by 4

localizeFunction · 0.68
show_supportedFunction · 0.68
make_raster_fileFunction · 0.68
show_supportedFunction · 0.68