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

Function create_printer

tools/ippeveprinter.c:1412–2029  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1410 */
1411
1412static ippeve_printer_t * /* O - Printer */
1413create_printer(
1414 const char *servername, /* I - Server hostname (NULL for default) */
1415 int serverport, /* I - Server port */
1416 const char *name, /* I - printer-name */
1417 const char *location, /* I - printer-location */
1418 const char *icons, /* I - printer-icons */
1419 const char *strings, /* I - printer-strings-uri */
1420 cups_array_t *docformats, /* I - document-format-supported */
1421 const char *subtypes, /* I - DNS-SD service subtype(s) */
1422 const char *directory, /* I - Spool directory */
1423 const char *command, /* I - Command to run on job files, if any */
1424 const char *device_uri, /* I - Output device, if any */
1425 const char *output_format, /* I - Output format, if any */
1426 ipp_t *attrs) /* I - Capability attributes */
1427{
1428 ippeve_printer_t *printer; /* Printer */
1429 int i; /* Looping var */
1430#ifndef _WIN32
1431 char path[1024]; /* Full path to command */
1432#endif /* !_WIN32 */
1433 unsigned char sha256[32]; /* SHA-256 digest/sum */
1434 char uuid_data[1024],/* Data to hash for printer-uuid */
1435 uuid[128], /* printer-uuid */
1436 *iconsptr; /* Pointer into icons string */
1437 int k_supported; /* Maximum file size supported */
1438 int num_formats; /* Number of supported document formats */
1439 const char *formats[100], /* Supported document formats */
1440 *format; /* Current format */
1441 int num_sup_attrs; /* Number of supported attributes */
1442 const char *sup_attrs[100];/* Supported attributes */
1443 char xxx_supported[256];
1444 /* Name of -supported attribute */
1445 _cups_globals_t *cg = _cupsGlobals();
1446 /* Global path values */
1447#ifdef HAVE_STATVFS
1448 struct statvfs spoolinfo; /* FS info for spool directory */
1449 double spoolsize; /* FS size */
1450#elif defined(HAVE_STATFS)
1451 struct statfs spoolinfo; /* FS info for spool directory */
1452 double spoolsize; /* FS size */
1453#endif /* HAVE_STATVFS */
1454 static const char * const versions[] =/* ipp-versions-supported values */
1455 {
1456 "1.1",
1457 "2.0"
1458 };
1459 static const char * const features[] =/* ipp-features-supported values */
1460 {
1461 "ipp-everywhere"
1462 };
1463 static const int ops[] = /* operations-supported values */
1464 {
1465 IPP_OP_PRINT_JOB,
1466 IPP_OP_PRINT_URI,
1467 IPP_OP_VALIDATE_JOB,
1468 IPP_OP_CREATE_JOB,
1469 IPP_OP_SEND_DOCUMENT,

Callers 1

mainFunction · 0.85

Calls 15

_cupsGlobalsFunction · 0.85
_cupsLangPrintfFunction · 0.85
_cupsLangPrintErrorFunction · 0.85
cupsArrayNewFunction · 0.85
httpGetHostnameFunction · 0.85
_cupsRWInitFunction · 0.85
create_listenerFunction · 0.85
cupsHashDataFunction · 0.85
cupsArrayFindFunction · 0.85
cupsArrayAddFunction · 0.85
cupsArrayFirstFunction · 0.85
cupsArrayNextFunction · 0.85

Tested by

no test coverage detected