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

Function ippCopyAttributes

cups/ipp.c:1639–1669  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1637 */
1638
1639int /* O - 1 on success, 0 on error */
1640ippCopyAttributes(
1641 ipp_t *dst, /* I - Destination IPP message */
1642 ipp_t *src, /* I - Source IPP message */
1643 int quickcopy, /* I - 1 for a referenced copy, 0 for normal */
1644 ipp_copycb_t cb, /* I - Copy callback or @code NULL@ for none */
1645 void *context) /* I - Context pointer */
1646{
1647 ipp_attribute_t *srcattr; /* Source attribute */
1648
1649
1650 DEBUG_printf(("ippCopyAttributes(dst=%p, src=%p, quickcopy=%d, cb=%p, context=%p)", (void *)dst, (void *)src, quickcopy, (void *)cb, context));
1651
1652 /*
1653 * Range check input...
1654 */
1655
1656 if (!dst || !src)
1657 return (0);
1658
1659 /*
1660 * Loop through source attributes and copy as needed...
1661 */
1662
1663 for (srcattr = src->attrs; srcattr; srcattr = srcattr->next)
1664 if (!cb || (*cb)(context, dst, srcattr))
1665 if (!ippCopyAttribute(dst, srcattr, quickcopy))
1666 return (0);
1667
1668 return (1);
1669}
1670
1671
1672/*

Callers 1

copy_attributesFunction · 0.85

Calls 1

ippCopyAttributeFunction · 0.85

Tested by

no test coverage detected