--------------------- PatchSet 5004 Date: 2002/09/16 23:21:59 Author: rbcollins Branch: fixrange Tag: (none) Log: move all clientStream API declarations to clientStream.h Members: src/clientStream.h:1.1.2.4->1.1.2.5 src/client_side_request.c:1.3.6.4->1.3.6.5 src/client_side_request.h:1.1->1.1.2.1 src/protos.h:1.61.2.1->1.61.2.2 src/typedefs.h:1.28.2.1->1.28.2.2 Index: squid/src/clientStream.h =================================================================== RCS file: /cvsroot/squid-sf//squid/src/Attic/clientStream.h,v retrieving revision 1.1.2.4 retrieving revision 1.1.2.5 diff -u -r1.1.2.4 -r1.1.2.5 --- squid/src/clientStream.h 16 Sep 2002 23:02:52 -0000 1.1.2.4 +++ squid/src/clientStream.h 16 Sep 2002 23:21:59 -0000 1.1.2.5 @@ -1,6 +1,6 @@ /* - * $Id: clientStream.h,v 1.1.2.4 2002/09/16 23:02:52 rbcollins Exp $ + * $Id: clientStream.h,v 1.1.2.5 2002/09/16 23:21:59 rbcollins Exp $ * * * SQUID Web Proxy Cache http://www.squid-cache.org/ @@ -36,6 +36,16 @@ #include "StoreIOBuffer.h" +typedef struct _clientStreamNode clientStreamNode; +/* client stream read callback */ +typedef void CSCB(clientStreamNode *, clientHttpRequest *, HttpReply *, const char *, ssize_t); +/* client stream read */ +typedef void CSR(clientStreamNode *, clientHttpRequest *); +/* client stream detach */ +typedef void CSD(clientStreamNode *, clientHttpRequest *); +typedef clientStream_status_t CSS(clientStreamNode *, clientHttpRequest *); + + struct _clientStreamNode { dlink_node node; dlink_list *head; /* sucks I know, but hey, the interface is limited */ @@ -47,4 +57,14 @@ StoreIOBuffer readBuffer; /* what, where and how much this node wants */ }; +/* clientStream.c */ +extern void clientStreamInit(dlink_list *, CSR *, CSD *, CSS *, void *, CSCB *, CSD *, void *, char *, size_t); +extern void clientStreamInsertHead(dlink_list *, CSR *, CSCB *, CSD *, CSS *, void *); +extern clientStreamNode *clientStreamNew(CSR *, CSCB *, CSD *, CSS *, void *); +extern void clientStreamCallback(clientStreamNode *, clientHttpRequest *, HttpReply *, const char *, ssize_t); +extern void clientStreamRead(clientStreamNode *, clientHttpRequest *, off_t, size_t, char *); +extern void clientStreamDetach(clientStreamNode *, clientHttpRequest *); +extern void clientStreamAbort(clientStreamNode *, clientHttpRequest *); +extern clientStream_status_t clientStreamStatus(clientStreamNode *, clientHttpRequest *); + #endif /* SQUID_CLIENTSTREAM_H */ Index: squid/src/client_side_request.c =================================================================== RCS file: /cvsroot/squid-sf//squid/src/Attic/client_side_request.c,v retrieving revision 1.3.6.4 retrieving revision 1.3.6.5 diff -u -r1.3.6.4 -r1.3.6.5 --- squid/src/client_side_request.c 16 Sep 2002 23:02:54 -0000 1.3.6.4 +++ squid/src/client_side_request.c 16 Sep 2002 23:21:59 -0000 1.3.6.5 @@ -1,6 +1,6 @@ /* - * $Id: client_side_request.c,v 1.3.6.4 2002/09/16 23:02:54 rbcollins Exp $ + * $Id: client_side_request.c,v 1.3.6.5 2002/09/16 23:21:59 rbcollins Exp $ * * DEBUG: section 85 Client-side Request Routines * AUTHOR: Robert Collins (Originally Duane Wessels in client_side.c) @@ -43,6 +43,7 @@ #include "squid.h" #include "clientStream.h" +#include "client_side_request.h" #if LINGERING_CLOSE #define comm_close comm_lingering_close --- /dev/null Wed Feb 14 01:05:20 2007 +++ squid/src/client_side_request.h Wed Feb 14 01:06:35 2007 @@ -0,0 +1,40 @@ + +/* + * $Id: client_side_request.h,v 1.1.2.1 2002/09/16 23:21:59 rbcollins Exp $ + * + * + * SQUID Web Proxy Cache http://www.squid-cache.org/ + * ---------------------------------------------------------- + * + * Squid is the result of efforts by numerous individuals from + * the Internet community; see the CONTRIBUTORS file for full + * details. Many organizations have provided support for Squid's + * development; see the SPONSORS file for full details. Squid is + * Copyrighted (C) 2001 by the Regents of the University of + * California; see the COPYRIGHT file for full details. Squid + * incorporates software developed and/or copyrighted by other + * sources; see the CREDITS file for full details. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA. + * + */ + +#ifndef SQUID_CLIENTSIDEREQUEST_H +#define SQUID_CLIENTSIDEREQUEST_H + +/* client_side_request.c - client side request related routines (pure logic) */ +extern int clientBeginRequest(method_t, char const *, CSCB *, CSD *, void *, HttpHeader const *, char *, size_t); + +#endif /* SQUID_CLIENTSIDEREQUEST_H */ Index: squid/src/protos.h =================================================================== RCS file: /cvsroot/squid-sf//squid/src/protos.h,v retrieving revision 1.61.2.1 retrieving revision 1.61.2.2 diff -u -r1.61.2.1 -r1.61.2.2 --- squid/src/protos.h 16 Sep 2002 13:27:46 -0000 1.61.2.1 +++ squid/src/protos.h 16 Sep 2002 23:21:59 -0000 1.61.2.2 @@ -1,6 +1,6 @@ /* - * $Id: protos.h,v 1.61.2.1 2002/09/16 13:27:46 rbcollins Exp $ + * $Id: protos.h,v 1.61.2.2 2002/09/16 23:21:59 rbcollins Exp $ * * * SQUID Web Proxy Cache http://www.squid-cache.org/ @@ -143,25 +143,12 @@ extern int clientAbortBody(request_t * req); extern void httpRequestFree(void *); -/* client_side_request.c - client side request related routines (pure logic) */ -extern int clientBeginRequest(method_t, char const *, CSCB *, CSD *, void *, HttpHeader const *, char *, size_t); - /* client_side_reply.c - client side reply related routines (pure logic, no comms) */ extern int clientCheckTransferDone(clientHttpRequest const *); extern void *clientReplyNewContext(clientHttpRequest *); extern int clientHttpRequestStatus(int fd, clientHttpRequest const *http); extern void clientSetReplyToError(void *, err_type, http_status, method_t, char const *, struct in_addr *, request_t *, char *, auth_user_request_t * auth_user_request); -/* clientStream.c */ -extern void clientStreamInit(dlink_list *, CSR *, CSD *, CSS *, void *, CSCB *, CSD *, void *, char *, size_t); -extern void clientStreamInsertHead(dlink_list *, CSR *, CSCB *, CSD *, CSS *, void *); -extern clientStreamNode *clientStreamNew(CSR *, CSCB *, CSD *, CSS *, void *); -extern void clientStreamCallback(clientStreamNode *, clientHttpRequest *, HttpReply *, const char *, ssize_t); -extern void clientStreamRead(clientStreamNode *, clientHttpRequest *, off_t, size_t, char *); -extern void clientStreamDetach(clientStreamNode *, clientHttpRequest *); -extern void clientStreamAbort(clientStreamNode *, clientHttpRequest *); -extern clientStream_status_t clientStreamStatus(clientStreamNode *, clientHttpRequest *); - extern int commSetNonBlocking(int fd); extern int commUnsetNonBlocking(int fd); extern void commSetCloseOnExec(int fd); Index: squid/src/typedefs.h =================================================================== RCS file: /cvsroot/squid-sf//squid/src/typedefs.h,v retrieving revision 1.28.2.1 retrieving revision 1.28.2.2 diff -u -r1.28.2.1 -r1.28.2.2 --- squid/src/typedefs.h 16 Sep 2002 13:27:48 -0000 1.28.2.1 +++ squid/src/typedefs.h 16 Sep 2002 23:21:59 -0000 1.28.2.2 @@ -1,6 +1,6 @@ /* - * $Id: typedefs.h,v 1.28.2.1 2002/09/16 13:27:48 rbcollins Exp $ + * $Id: typedefs.h,v 1.28.2.2 2002/09/16 23:21:59 rbcollins Exp $ * * * SQUID Web Proxy Cache http://www.squid-cache.org/ @@ -108,7 +108,6 @@ typedef struct _HttpReply HttpReply; typedef struct _HttpStateData HttpStateData; typedef struct _icpUdpData icpUdpData; -typedef struct _clientStreamNode clientStreamNode; typedef struct _clientHttpRequest clientHttpRequest; typedef struct _ConnStateData ConnStateData; typedef struct _ConnCloseHelperData ConnCloseHelperData; @@ -199,15 +198,6 @@ typedef struct _delaySpec delaySpec; #endif -/* client_side.c callbacks and callforwards */ -/* client stream read callback */ -typedef void CSCB(clientStreamNode *, clientHttpRequest *, HttpReply *, const char *, ssize_t); -/* client stream read */ -typedef void CSR(clientStreamNode *, clientHttpRequest *); -/* client stream detach */ -typedef void CSD(clientStreamNode *, clientHttpRequest *); -typedef clientStream_status_t CSS(clientStreamNode *, clientHttpRequest *); - typedef void CWCB(int fd, char *, size_t size, comm_err_t flag, void *data); typedef void CNCB(int fd, comm_err_t status, void *);