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

Function ippAddBoolean

cups/ipp.c:111–140  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

109 */
110
111ipp_attribute_t * /* O - New attribute */
112ippAddBoolean(ipp_t *ipp, /* I - IPP message */
113 ipp_tag_t group, /* I - IPP group */
114 const char *name, /* I - Name of attribute */
115 char value) /* I - Value of attribute */
116{
117 ipp_attribute_t *attr; /* New attribute */
118
119
120 DEBUG_printf(("ippAddBoolean(ipp=%p, group=%02x(%s), name=\"%s\", value=%d)", (void *)ipp, group, ippTagString(group), name, value));
121
122 /*
123 * Range check input...
124 */
125
126 if (!ipp || !name || group < IPP_TAG_ZERO ||
127 group == IPP_TAG_END || group >= IPP_TAG_UNSUPPORTED_VALUE)
128 return (NULL);
129
130 /*
131 * Create the attribute...
132 */
133
134 if ((attr = ipp_add_attr(ipp, name, group, IPP_TAG_BOOLEAN, 1)) == NULL)
135 return (NULL);
136
137 attr->values[0].boolean = value;
138
139 return (attr);
140}
141
142
143/*

Callers 15

create_printerFunction · 0.85
load_legacy_attributesFunction · 0.85
load_ppd_attributesFunction · 0.85
cupsdAddEventFunction · 0.85
copy_job_attrsFunction · 0.85
copy_printer_attrsFunction · 0.85
create_local_bg_threadFunction · 0.85
create_local_printerFunction · 0.85
print_fileFunction · 0.85
send_stateFunction · 0.85
cupsdCreateCommonDataFunction · 0.85
load_ppdFunction · 0.85

Calls 2

ippTagStringFunction · 0.85
ipp_add_attrFunction · 0.85

Tested by 1

run_clientFunction · 0.68