/*
* "$Id: http.h 148 2006-04-25 16:54:17Z njacobs $"
*
* Hyper-Text Transport Protocol definitions for the Common UNIX Printing
* System (CUPS).
*
* Copyright 1997-2005 by Easy Software Products, all rights reserved.
*
* These coded instructions, statements, and computer programs are the
* property of Easy Software Products and are protected by Federal
* copyright law. Distribution and use rights are outlined in the file
* "LICENSE.txt" which should have been included with this file. If this
* file is missing or damaged please contact Easy Software Products
* at:
*
* Attn: CUPS Licensing Information
* Easy Software Products
* 44141 Airport View Drive, Suite 204
* Hollywood, Maryland 20636 USA
*
* Voice: (301) 373-9600
* EMail: cups-info@cups.org
* WWW: http://www.cups.org
*
* This file is subject to the Apple OS-Developed Software exception.
*/
#ifndef _CUPS_HTTP_H_
#define _CUPS_HTTP_H_
#pragma ident "%Z%%M% %I% %E% SMI"
/*
* Include necessary headers...
*/
# include <string.h>
# include <time.h>
# ifdef WIN32
# include <winsock.h>
# else
# include <unistd.h>
# include <netdb.h>
# include <netinet/in_systm.h>
# if !defined(__APPLE__) || !defined(TCP_NODELAY)
# endif /* !__APPLE__ || !TCP_NODELAY */
# ifdef AF_LOCAL
# endif /* AF_LOCAL */
# endif /* WIN32 */
/*
* C++ magic...
*/
#ifdef __cplusplus
extern "C" {
#endif
/*
* Oh, the wonderful world of IPv6 compatibility. Apparently some
* implementations expose the (more logical) 32-bit address parts
* to everyone, while others only expose it to kernel code... To
* make supporting IPv6 even easier, each vendor chose different
* core structure and union names, so the same defines or code
* can't be used on all platforms.
*
* The following will likely need tweeking on new platforms that
* support IPv6 - the "s6_addr32" define maps to the 32-bit integer
* array in the in6_addr union, which is named differently on various
* platforms.
*/
# if defined(__sun)
# endif /* __sun */
#endif /* AF_INET6 && !s6_addr32 */
/*
* Limits...
*/
/*
* HTTP state values...
*/
typedef enum /* States are server-oriented */
{
} http_state_t;
/*
* HTTP version numbers...
*/
typedef enum
{
/*
* HTTP keep-alive values...
*/
typedef enum
{
HTTP_KEEPALIVE_OFF = 0,
/*
* HTTP transfer encoding values...
*/
typedef enum
{
/*
* HTTP encryption values...
*/
typedef enum
{
/*
* HTTP authentication types...
*/
typedef enum
{
} http_auth_t;
/*
* HTTP status codes...
*/
typedef enum
{
/*
* HTTP field names...
*/
typedef enum
{
} http_field_t;
/*
* HTTP address structure (makes using IPv6 a little easier and more portable.)
*/
typedef union
{
#ifdef AF_INET6
#endif /* AF_INET6 */
#ifdef AF_LOCAL
#endif /* AF_LOCAL */
} http_addr_t;
/*
* HTTP connection structure...
*/
typedef struct
{
/* Name of connected host */
/* Field values */
/* Buffer for messages */
/* Nonce value */
/**** New in CUPS 1.1.19 ****/
/**** New in CUPS 1.1.20 ****/
/* Current Authentication value */
/* Username:password string */
/**** New in CUPS 1.2 ****/
} http_t;
/*
* Prototypes...
*/
extern const char *httpGetDateString(time_t t);
extern time_t httpGetDateTime(const char *s);
extern void httpInitialize(void);
# ifdef __GNUC__
# endif /* __GNUC__ */
;
char *resource);
const char *value);
extern char *httpMD5(const char *, const char *, const char *,
char [33]);
extern char *httpMD5Final(const char *, const char *, const char *,
char [33]);
extern char *httpMD5String(const unsigned char *, char [33]);
/**** New in CUPS 1.1.19 ****/
/**** New in CUPS 1.1.21 ****/
int inlen);
extern void httpSeparate2(const char *uri,
char *username, int usernamelen,
char *resource, int resourcelen);
/**** New in CUPS 1.2 ****/
const http_addr_t *addr2);
int n, http_addr_t *addr);
char *s, int slen);
#include <stdio.h>
extern void httpDumpData(FILE *, const char *, const char *, int);
/*
* C++ magic...
*/
#ifdef __cplusplus
}
#endif
#endif /* !_CUPS_HTTP_H_ */
/*
* End of "$Id: http.h 148 2006-04-25 16:54:17Z njacobs $"
*/