printing: Fix build with CUPS older than 1.6

Define missing functions ippFirstAttribute(), ippNextAttribute()
and macro ippGetCollection(). These were added in CUPS 1.6.

https://bugzilla.gnome.org/show_bug.cgi?id=740358
This commit is contained in:
Marek Kasik 2014-11-27 17:04:47 +01:00
parent c85c3510e7
commit 059fc5d3d9

View File

@ -297,6 +297,7 @@ pb_module_create (void)
#define ippGetName(attr) attr->name
#define ippGetCount(attr) attr->num_values
#define ippGetGroupTag(attr) attr->group_tag
#define ippGetCollection(attr, index) attr->values[index].collection
static int
ippGetRange (ipp_attribute_t *attr,
@ -306,6 +307,24 @@ ippGetRange (ipp_attribute_t *attr,
*upper = attr->values[element].range.upper;
return (attr->values[element].range.lower);
}
static ipp_attribute_t *
ippFirstAttribute (ipp_t *ipp)
{
if (!ipp)
return (NULL);
return (ipp->current = ipp->attrs);
}
static ipp_attribute_t *
ippNextAttribute (ipp_t *ipp)
{
if (!ipp || !ipp->current)
return (NULL);
return (ipp->current = ipp->current->next);
}
#endif
/*
* GtkPrintBackendCups