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

Function mimeType

scheduler/type.c:692–724  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

690 */
691
692mime_type_t * /* O - Matching file type definition */
693mimeType(mime_t *mime, /* I - MIME database */
694 const char *super, /* I - Super-type name */
695 const char *type) /* I - Type name */
696{
697 mime_type_t key, /* MIME type search key */
698 *mt; /* Matching type */
699
700
701 DEBUG_printf(("mimeType(mime=%p, super=\"%s\", type=\"%s\")", mime, super,
702 type));
703
704 /*
705 * Range check input...
706 */
707
708 if (!mime || !super || !type)
709 {
710 DEBUG_puts("1mimeType: Returning NULL.");
711 return (NULL);
712 }
713
714 /*
715 * Lookup the type in the array...
716 */
717
718 strlcpy(key.super, super, sizeof(key.super));
719 strlcpy(key.type, type, sizeof(key.type));
720
721 mt = (mime_type_t *)cupsArrayFind(mime->types, &key);
722 DEBUG_printf(("1mimeType: Returning %p.", mt));
723 return (mt);
724}
725
726
727/*

Callers 15

mime_load_convsFunction · 0.85
mainFunction · 0.85
add_printer_filterFunction · 0.85
print_jobFunction · 0.85
send_documentFunction · 0.85
validate_jobFunction · 0.85
mimeAddTypeFunction · 0.85
cupsdContinueJobFunction · 0.85
cupsdLoadJobFunction · 0.85
load_job_cacheFunction · 0.85
cupsdReadConfigurationFunction · 0.85
mainFunction · 0.85

Calls 1

cupsArrayFindFunction · 0.85

Tested by 3

mainFunction · 0.68
add_ppd_filterFunction · 0.68
type_dirFunction · 0.68