* Internet Printing Protocol support functions for the Common UNIX
* Printing System (CUPS).
*
- * Copyright 2007-2008 by Apple Inc.
+ * Copyright 2007-2009 by Apple Inc.
* Copyright 1997-2007 by Easy Software Products, all rights reserved.
*
* These coded instructions, statements, and computer programs are the
"dateTime", /* 0x31 */
"resolution", /* 0x32 */
"rangeOfInteger", /* 0x33 */
- "begCollection", /* 0x34 */
+ "collection", /* 0x34 */
"textWithLanguage", /* 0x35 */
"nameWithLanguage", /* 0x36 */
"endCollection", /* 0x37 */
int /* O - Port number */
ippPort(void)
{
- const char *ipp_port; /* IPP_PORT environment variable */
- struct servent *port; /* Port number info */
- int portnum; /* Port number */
_cups_globals_t *cg = _cupsGlobals(); /* Pointer to library globals */
DEBUG_puts("ippPort()");
if (!cg->ipp_port)
- {
- /*
- * See if the server definition includes the port number...
- */
+ _cupsSetDefaults();
- DEBUG_puts("ippPort: Not initialized...");
-
- cupsServer();
-
-#ifdef DEBUG
- if (cg->ipp_port)
- DEBUG_puts(("ippPort: Set via cupsServer()..."));
-#endif /* DEBUG */
- }
-
- if (!cg->ipp_port)
- {
- if ((ipp_port = getenv("IPP_PORT")) != NULL)
- {
- DEBUG_puts("ippPort: Set via IPP_PORT...");
- portnum = atoi(ipp_port);
- }
- else if ((port = getservbyname("ipp", NULL)) == NULL)
- {
- DEBUG_puts("ippPort: Set via CUPS_DEFAULT_IPP_PORT...");
- portnum = CUPS_DEFAULT_IPP_PORT;
- }
- else
- {
- DEBUG_puts("ippPort: Set via ipp service entry...");
- portnum = ntohs(port->s_port);
- }
-
- if (portnum > 0)
- cg->ipp_port = portnum;
- }
-
- DEBUG_printf(("ippPort: Returning %d...\n", cg->ipp_port));
+ DEBUG_printf(("1ippPort: Returning %d...", cg->ipp_port));
return (cg->ipp_port);
}
void
ippSetPort(int p) /* I - Port number to use */
{
- DEBUG_printf(("ippSetPort(p=%d)\n", p));
+ DEBUG_printf(("ippSetPort(p=%d)", p));
_cupsGlobals()->ipp_port = p;
}
*
* The returned names are defined in RFC 2911 and 3382.
*
- * @since CUPS 1.4@
+ * @since CUPS 1.4/Mac OS X 10.6@
*/
const char * /* O - Tag name */
*
* The tag names are defined in RFC 2911 and 3382.
*
- * @since CUPS 1.4@
+ * @since CUPS 1.4/Mac OS X 10.6@
*/
ipp_tag_t /* O - Tag value */
return (IPP_TAG_JOB);
else if (!strcasecmp(name, "printer"))
return (IPP_TAG_PRINTER);
+ else if (!strcasecmp(name, "unsupported"))
+ return (IPP_TAG_UNSUPPORTED_GROUP);
else if (!strcasecmp(name, "subscription"))
return (IPP_TAG_SUBSCRIPTION);
+ else if (!strcasecmp(name, "event"))
+ return (IPP_TAG_EVENT_NOTIFICATION);
else if (!strcasecmp(name, "language"))
return (IPP_TAG_LANGUAGE);
else if (!strcasecmp(name, "mimetype"))
return (IPP_TAG_NAME);
else if (!strcasecmp(name, "text"))
return (IPP_TAG_TEXT);
+ else if (!strcasecmp(name, "begCollection"))
+ return (IPP_TAG_BEGIN_COLLECTION);
else
return (IPP_TAG_ZERO);
}