Retrieve string value from attributes
Cherif YAYA
yayachrif at yahoo.fr
Wed Aug 27 07:51:41 PDT 2008
After a call to cupsDoRequest(), one can retrieve response attributes from the response ipp_t object.
For instance to retrieve all integers :
...
ipp_t* resp = cupsDoRequest(...)
ipp_attribute_t* attr;
for(attr = resp->attrs;attr;attr = attr->next){
if(attr->value_tag == IPP_TAG_INTEGER)
int i = attr->value[0].integer;
}
...
But the ipp_value_u doesn't have a field for char values. (as far as I can tell).
So, can we retrieve the value when the attribute is string valued one (IPP_TAG_STRING,IPP_TAG_URI...)?
Thanks for your help.
More information about the cups
mailing list