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

Function httpURIStatusString

cups/http-support.c:1609–1665  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1607 */
1608
1609const char * /* O - Localized status string */
1610httpURIStatusString(
1611 http_uri_status_t status) /* I - URI status code */
1612{
1613 const char *s; /* Status string */
1614 _cups_globals_t *cg = _cupsGlobals(); /* Global data */
1615
1616
1617 if (!cg->lang_default)
1618 cg->lang_default = cupsLangDefault();
1619
1620 switch (status)
1621 {
1622 case HTTP_URI_STATUS_OVERFLOW :
1623 s = _("URI too large");
1624 break;
1625 case HTTP_URI_STATUS_BAD_ARGUMENTS :
1626 s = _("Bad arguments to function");
1627 break;
1628 case HTTP_URI_STATUS_BAD_RESOURCE :
1629 s = _("Bad resource in URI");
1630 break;
1631 case HTTP_URI_STATUS_BAD_PORT :
1632 s = _("Bad port number in URI");
1633 break;
1634 case HTTP_URI_STATUS_BAD_HOSTNAME :
1635 s = _("Bad hostname/address in URI");
1636 break;
1637 case HTTP_URI_STATUS_BAD_USERNAME :
1638 s = _("Bad username in URI");
1639 break;
1640 case HTTP_URI_STATUS_BAD_SCHEME :
1641 s = _("Bad scheme in URI");
1642 break;
1643 case HTTP_URI_STATUS_BAD_URI :
1644 s = _("Bad/empty URI");
1645 break;
1646 case HTTP_URI_STATUS_OK :
1647 s = _("OK");
1648 break;
1649 case HTTP_URI_STATUS_MISSING_SCHEME :
1650 s = _("Missing scheme in URI");
1651 break;
1652 case HTTP_URI_STATUS_UNKNOWN_SCHEME :
1653 s = _("Unknown scheme in URI");
1654 break;
1655 case HTTP_URI_STATUS_MISSING_RESOURCE :
1656 s = _("Missing resource in URI");
1657 break;
1658
1659 default:
1660 s = _("Unknown");
1661 break;
1662 }
1663
1664 return (_cupsLangString(cg->lang_default, s));
1665}
1666

Callers 3

finish_document_uriFunction · 0.85
add_printerFunction · 0.85
ippValidateAttributeFunction · 0.85

Calls 3

_cupsGlobalsFunction · 0.85
cupsLangDefaultFunction · 0.85
_cupsLangStringFunction · 0.85

Tested by

no test coverage detected