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

Function ippGetString

cups/ipp.c:2521–2546  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2519 */
2520
2521const char *
2522ippGetString(ipp_attribute_t *attr, /* I - IPP attribute */
2523 int element, /* I - Value number (0-based) */
2524 const char **language)/* O - Language code (@code NULL@ for don't care) */
2525{
2526 ipp_tag_t tag; /* Value tag */
2527
2528
2529 /*
2530 * Range check input...
2531 */
2532
2533 tag = ippGetValueTag(attr);
2534
2535 if (!attr || element < 0 || element >= attr->num_values || (tag != IPP_TAG_TEXTLANG && tag != IPP_TAG_NAMELANG && (tag < IPP_TAG_TEXT || tag > IPP_TAG_MIMETYPE)))
2536 return (NULL);
2537
2538 /*
2539 * Return the value...
2540 */
2541
2542 if (language)
2543 *language = attr->values[element].string.language;
2544
2545 return (attr->values[element].string.text);
2546}
2547
2548
2549/*

Callers 15

list_serviceFunction · 0.85
do_monitor_printer_stateFunction · 0.85
do_testFunction · 0.85
expect_matchesFunction · 0.85
get_stringFunction · 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
create_jobFunction · 0.85

Calls 1

ippGetValueTagFunction · 0.85

Tested by 5

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