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

Function browse_callback

tools/ippfind.c:1452–1480  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1450 */
1451
1452static void DNSSD_API
1453browse_callback(
1454 DNSServiceRef sdRef, /* I - Service reference */
1455 DNSServiceFlags flags, /* I - Option flags */
1456 uint32_t interfaceIndex, /* I - Interface number */
1457 DNSServiceErrorType errorCode, /* I - Error, if any */
1458 const char *serviceName, /* I - Name of service/device */
1459 const char *regtype, /* I - Type of service */
1460 const char *replyDomain, /* I - Service domain */
1461 void *context) /* I - Services array */
1462{
1463 /*
1464 * Only process "add" data...
1465 */
1466
1467 last_update = _cupsGetClock();
1468
1469 (void)sdRef;
1470 (void)interfaceIndex;
1471
1472 if (errorCode != kDNSServiceErr_NoError || !(flags & kDNSServiceFlagsAdd))
1473 return;
1474
1475 /*
1476 * Get the device...
1477 */
1478
1479 get_service((cups_array_t *)context, serviceName, regtype, replyDomain);
1480}
1481
1482
1483/*

Callers

nothing calls this directly

Calls 2

_cupsGetClockFunction · 0.85
get_serviceFunction · 0.85

Tested by

no test coverage detected