From 7855ab563513e35250b83777f24d4144d76d54a7 Mon Sep 17 00:00:00 2001 From: msweet Date: Fri, 18 Oct 2013 17:18:20 +0000 Subject: [PATCH] Drop old private APIs that are no longer used/supported. Sync up exports file for Windows. git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/trunk@11341 a1ca3aef-8c08-0410-bb20-df032aa958be --- cups/http-addr.c | 3 --- cups/http-private.h | 13 ------------- cups/http-support.c | 7 ------- cups/http.c | 10 ---------- cups/http.h | 4 ++-- cups/libcups2.def | 23 ++++++++++++++++++++++- scheduler/ipp.c | 4 ++-- scheduler/printers.c | 4 ++-- 8 files changed, 28 insertions(+), 40 deletions(-) diff --git a/cups/http-addr.c b/cups/http-addr.c index e5c3791cf..01eb74db5 100644 --- a/cups/http-addr.c +++ b/cups/http-addr.c @@ -470,9 +470,6 @@ httpAddrPort(http_addr_t *addr) /* I - Address */ return (0); } -/* For OS X 10.8 and earlier */ -int _httpAddrPort(http_addr_t *addr) { return (httpAddrPort(addr)); } - /* * '_httpAddrSetPort()' - Set the port number associated with an address. diff --git a/cups/http-private.h b/cups/http-private.h index 7c9b725cc..090c6f679 100644 --- a/cups/http-private.h +++ b/cups/http-private.h @@ -392,18 +392,7 @@ extern void _cups_freeifaddrs(struct ifaddrs *addrs); * Prototypes... */ -/* XXX */extern int _httpAddrPort(http_addr_t *addr) - _CUPS_INTERNAL_MSG("Use httpAddrPort instead."); extern void _httpAddrSetPort(http_addr_t *addr, int port); -/* XXX */extern char *_httpAssembleUUID(const char *server, int port, - const char *name, int number, - char *buffer, size_t bufsize) - _CUPS_INTERNAL_MSG("Use httpAssembleUUID instead."); -/* XXX */extern http_t *_httpCreate(const char *host, int port, - http_addrlist_t *addrlist, - http_encryption_t encryption, - 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, @@ -412,8 +401,6 @@ 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); -/* XXX */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), diff --git a/cups/http-support.c b/cups/http-support.c index 70838feff..bea6b7a79 100644 --- a/cups/http-support.c +++ b/cups/http-support.c @@ -538,13 +538,6 @@ httpAssembleUUID(const char *server, /* I - Server name */ return (buffer); } -/* For OS X 10.8 and earlier */ -char *_httpAssembleUUID(const char *server, int port, const char *name, - int number, char *buffer, size_t bufsize) -{ - return (httpAssembleUUID(server, port, name, number, buffer, bufsize)); -} - /* * 'httpDecode64()' - Base64-decode a string. diff --git a/cups/http.c b/cups/http.c index 36729b122..6e532c76b 100644 --- a/cups/http.c +++ b/cups/http.c @@ -1884,10 +1884,6 @@ httpPeek(http_t *http, /* I - HTTP connection */ return (bytes); } -/* For OS X 10.8 and earlier */ -ssize_t _httpPeek(http_t *http, char *buffer, size_t length) -{ return (httpPeek(http, buffer, length)); } - /* * 'httpPost()' - Send a POST request to the server. @@ -3933,12 +3929,6 @@ http_create( return (http); } -/* For OS X 10.8 and earlier */ -http_t *_httpCreate(const char *host, int port, http_addrlist_t *addrlist, - http_encryption_t encryption, int family) -{ return (http_create(host, port, addrlist, family, encryption, 1, - _HTTP_MODE_CLIENT)); } - #ifdef DEBUG /* diff --git a/cups/http.h b/cups/http.h index 9848514e9..93413d322 100644 --- a/cups/http.h +++ b/cups/http.h @@ -613,6 +613,8 @@ extern http_state_t httpWriteResponse(http_t *http, http_status_t status) _CUPS_API_1_7; /* New in CUPS 2.0 */ +extern int httpAddrClose(http_addr_t *addr, int fd) _CUPS_API_2_0; +extern int httpAddrFamily(http_addr_t *addr) _CUPS_API_2_0; extern int httpCompareCredentials(cups_array_t *cred1, cups_array_t *cred2) _CUPS_API_2_0; @@ -623,8 +625,6 @@ extern int httpCreateCredentials(const char *path, extern size_t httpCredentialsString(cups_array_t *credentials, char *buffer, size_t bufsize) _CUPS_API_2_0; -extern int httpAddrClose(http_addr_t *addr, int fd) _CUPS_API_2_0; -extern int httpAddrFamily(http_addr_t *addr) _CUPS_API_2_0; extern http_field_t httpFieldValue(const char *name) _CUPS_API_2_0; extern time_t httpGetActivity(http_t *http) _CUPS_API_2_0; extern http_addr_t *httpGetAddress(http_t *http) _CUPS_API_2_0; diff --git a/cups/libcups2.def b/cups/libcups2.def index ea525c150..5b7f9fc16 100644 --- a/cups/libcups2.def +++ b/cups/libcups2.def @@ -35,7 +35,6 @@ _cups_strcpy _cups_strlcat _cups_strlcpy _httpAddrSetPort -_httpAssembleUUID _httpEncodeURI _httpResolveURI _httpWait @@ -195,9 +194,11 @@ cupsWriteRequestData httpAcceptConnection httpAddCredential httpAddrAny +httpAddrClose httpAddrConnect httpAddrCopyList httpAddrEqual +httpAddrFamily httpAddrFreeList httpAddrGetList httpAddrLength @@ -214,10 +215,13 @@ httpCheck httpClearCookie httpClearFields httpClose +httpCompareCredentials httpConnect httpConnect2 httpConnectEncrypt httpCopyCredentials +httpCreateCredentials +httpCredentialsString httpDecode64 httpDecode64_2 httpDelete @@ -225,29 +229,40 @@ httpEncode64 httpEncode64_2 httpEncryption httpError +httpFieldValue httpFlush httpFlushWrite httpFreeCredentials httpGet +httpGetActivity +httpGetAddress httpGetBlocking httpGetContentEncoding httpGetCookie httpGetDateString httpGetDateString2 httpGetDateTime +httpGetEncryption httpGetExpect httpGetFd httpGetField httpGetHostByName httpGetHostname +httpGetKeepAlive httpGetLength httpGetLength2 +httpGetPending +httpGetReady +httpGetRemaining httpGetStatus httpGetSubField httpGetSubField2 httpGets httpHead httpInitialize +httpIsChunked +httpIsEncrypted +httpLoadCredentials httpMD5 httpMD5Final httpMD5String @@ -260,6 +275,8 @@ httpRead httpRead2 httpReadRequest httpReconnect +httpResolveHostname +httpSaveCredentials httpSeparate httpSeparate2 httpSeparateURI @@ -268,8 +285,11 @@ httpSetCredentials httpSetDefaultField httpSetExpect httpSetField +httpSetKeepAlive httpSetLength httpSetTimeout +httpShutdown +httpStateString httpStatus httpTrace httpUpdate @@ -359,6 +379,7 @@ ippSetStringf ippSetStringfv ippSetValueTag ippSetVersion +ippStateString ippTagString ippTagValue ippTimeToDate diff --git a/scheduler/ipp.c b/scheduler/ipp.c index fc6114128..5f53193b6 100644 --- a/scheduler/ipp.c +++ b/scheduler/ipp.c @@ -2184,8 +2184,8 @@ add_job_uuid(cupsd_job_t *job) /* I - Job */ if (!ippFindAttribute(job->attrs, "job-uuid", IPP_TAG_URI)) ippAddString(job->attrs, IPP_TAG_JOB, IPP_TAG_URI, "job-uuid", NULL, - _httpAssembleUUID(ServerName, RemotePort, job->dest, job->id, - uuid, sizeof(uuid))); + httpAssembleUUID(ServerName, RemotePort, job->dest, job->id, + uuid, sizeof(uuid))); } diff --git a/scheduler/printers.c b/scheduler/printers.c index 4a7d96876..b4781769e 100644 --- a/scheduler/printers.c +++ b/scheduler/printers.c @@ -131,8 +131,8 @@ cupsdAddPrinter(const char *name) /* I - Name of printer */ httpAssembleURIf(HTTP_URI_CODING_ALL, uri, sizeof(uri), "ipp", NULL, ServerName, RemotePort, "/printers/%s", name); cupsdSetString(&p->uri, uri); - cupsdSetString(&p->uuid, _httpAssembleUUID(ServerName, RemotePort, name, 0, - uuid, sizeof(uuid))); + cupsdSetString(&p->uuid, httpAssembleUUID(ServerName, RemotePort, name, 0, + uuid, sizeof(uuid))); cupsdSetDeviceURI(p, "file:///dev/null"); p->state = IPP_PRINTER_STOPPED; -- 2.39.2