]> git.ipfire.org Git - thirdparty/cups.git/blobdiff - cups/http-private.h
<rdar://problem/13655599> Seed: Print queue JOBS disappear after computer Wakes up...
[thirdparty/cups.git] / cups / http-private.h
index a789917de0155d0bb16d110d3b46be434bfac42e..016dfe2ba756de6b74895eb8716aca2053e78bb4 100644 (file)
@@ -1,9 +1,9 @@
 /*
- * "$Id: http-private.h 7850 2008-08-20 00:07:25Z mike $"
+ * "$Id$"
  *
  *   Private HTTP definitions for CUPS.
  *
- *   Copyright 2007-2012 by Apple Inc.
+ *   Copyright 2007-2013 by Apple Inc.
  *   Copyright 1997-2007 by Easy Software Products, all rights reserved.
  *
  *   These coded instructions, statements, and computer programs are the
@@ -23,6 +23,7 @@
  */
 
 #  include "config.h"
+#  include <cups/language.h>
 #  include <stddef.h>
 #  include <stdlib.h>
 
 #  ifdef WIN32
 #    include <io.h>
 #    include <winsock2.h>
+#    define CUPS_SOCAST (const char *)
 #  else
 #    include <unistd.h>
 #    include <fcntl.h>
 #    include <sys/socket.h>
 #    define closesocket(f) close(f)
+#    define CUPS_SOCAST
 #  endif /* WIN32 */
 
 #  ifdef HAVE_GSSAPI
 #    ifdef HAVE_GSS_GSSAPI_H
 #      include <GSS/gssapi.h>
-#      ifdef HAVE_GSSAPI_GENERIC_H
-#        include <GSS/gssapi_generic.h>
-#      endif /* HAVE_GSSAPI_GENERIC_H */
-#      ifdef HAVE_GSSAPI_KRB5_H
-#        include <GSS/gssapi_krb5.h>
-#      endif /* HAVE_GSSAPI_KRB5_H */
 #    elif defined(HAVE_GSSAPI_GSSAPI_H)
 #      include <gssapi/gssapi.h>
-#      ifdef HAVE_GSSAPI_GENERIC_H
-#        include <gssapi/gssapi_generic.h>
-#      endif /* HAVE_GSSAPI_GENERIC_H */
-#      ifdef HAVE_GSSAPI_KRB5_H
-#        include <gssapi/gssapi_krb5.h>
-#      endif /* HAVE_GSSAPI_KRB5_H */
 #    elif defined(HAVE_GSSAPI_H)
 #      include <gssapi.h>
 #    endif /* HAVE_GSS_GSSAPI_H */
 #    ifndef HAVE_GSS_C_NT_HOSTBASED_SERVICE
 #      define GSS_C_NT_HOSTBASED_SERVICE gss_nt_service_name
 #    endif /* !HAVE_GSS_C_NT_HOSTBASED_SERVICE */
-#    ifdef HAVE_KRB5_H
-#      include <krb5.h>
-#    endif /* HAVE_KRB5_H */
 #  endif /* HAVE_GSSAPI */
 
 #  ifdef HAVE_AUTHORIZATION_H
@@ -329,6 +317,7 @@ struct _http_s                              /**** HTTP connection structure ****/
 #  endif /* HAVE_GSSAPI */
 
   /**** New in CUPS 1.7 ****/
+  int                  tls_upgrade;    /* Non-zero if we are doing an upgrade */
   _http_mode_t         mode;           /* _HTTP_MODE_CLIENT or _HTTP_MODE_SERVER */
   char                 *accept_encoding,
                                        /* Accept-Encoding field */
@@ -341,6 +330,7 @@ struct _http_s                              /**** HTTP connection structure ****/
 #  ifdef HAVE_LIBZ
   _http_coding_t       coding;         /* _HTTP_CODING_xxx */
   z_stream             stream;         /* (De)compression stream */
+  Bytef                        *dbuffer;       /* Decompression buffer */
 #  endif /* HAVE_LIBZ */
 };
 
@@ -407,14 +397,18 @@ extern void       _cups_freeifaddrs(struct ifaddrs *addrs);
  */
 
 #define                        _httpAddrFamily(addrp) (addrp)->addr.sa_family
+extern int             _httpAddrPort(http_addr_t *addr)
+                                     _CUPS_INTERNAL_MSG("Use httpAddrPort instead.");
 extern void            _httpAddrSetPort(http_addr_t *addr, int port);
 extern char            *_httpAssembleUUID(const char *server, int port,
                                           const char *name, int number,
-                                          char *buffer, size_t bufsize);
+                                          char *buffer, size_t bufsize)
+                                          _CUPS_INTERNAL_MSG("Use httpAssembleUUID instead.");
 extern http_t          *_httpCreate(const char *host, int port,
-                                    http_addrlist_t *addrlist, int family,
+                                    http_addrlist_t *addrlist,
                                     http_encryption_t encryption,
-                                    int blocking, _http_mode_t mode);
+                                    int family)
+                                    _CUPS_INTERNAL_MSG("Use httpConnect2 or httpAccept instead.");
 extern http_tls_credentials_t
                        _httpCreateCredentials(cups_array_t *credentials);
 extern char            *_httpDecodeURI(char *dst, const char *src,
@@ -423,10 +417,13 @@ extern void               _httpDisconnect(http_t *http);
 extern char            *_httpEncodeURI(char *dst, const char *src,
                                        size_t dstsize);
 extern void            _httpFreeCredentials(http_tls_credentials_t credentials);
+extern ssize_t         _httpPeek(http_t *http, char *buffer, size_t length)
+                                 _CUPS_INTERNAL_MSG("Use httpPeek instead.");
 extern const char      *_httpResolveURI(const char *uri, char *resolved_uri,
                                         size_t resolved_size, int options,
                                         int (*cb)(void *context),
                                         void *context);
+extern const char      *_httpStatus(cups_lang_t *lang, http_status_t status);
 extern int             _httpUpdate(http_t *http, http_status_t *status);
 extern int             _httpWait(http_t *http, int msec, int usessl);
 
@@ -442,5 +439,5 @@ extern int          _httpWait(http_t *http, int msec, int usessl);
 #endif /* !_CUPS_HTTP_PRIVATE_H_ */
 
 /*
- * End of "$Id: http-private.h 7850 2008-08-20 00:07:25Z mike $".
+ * End of "$Id$".
  */