From: Francesco Chemolli Date: Mon, 20 Aug 2012 10:50:41 +0000 (+0200) Subject: Moved Internal functions to internal.h X-Git-Tag: sourceformat-review-1~90 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=308e60bea07a40c601997119925698984864cf2a;p=thirdparty%2Fsquid.git Moved Internal functions to internal.h --- diff --git a/src/Makefile.am b/src/Makefile.am index bce5b68773..d9b2f6bd24 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -388,6 +388,7 @@ squid_SOURCES = \ icp_v2.cc \ icp_v3.cc \ int.cc \ + internal.h \ internal.cc \ $(IPC_SOURCE) \ ipcache.cc \ @@ -1368,6 +1369,7 @@ tests_testCacheManager_SOURCES = \ $(IPC_SOURCE) \ ipcache.cc \ int.cc \ + internal.h \ internal.cc \ list.cc \ multicast.cc \ @@ -1561,6 +1563,7 @@ tests_testDiskIO_SOURCES = \ tests/stub_HttpRequest.cc \ tests/stub_http.cc \ tests/stub_icp.cc \ + internal.h \ tests/stub_internal.cc \ tests/stub_ipc.cc \ tests/stub_ipcache.cc \ @@ -1712,6 +1715,7 @@ tests_testEvent_SOURCES = \ $(IPC_SOURCE) \ ipcache.cc \ int.cc \ + internal.h \ internal.cc \ list.cc \ mem.cc \ @@ -1913,6 +1917,7 @@ tests_testEventLoop_SOURCES = \ $(IPC_SOURCE) \ ipcache.cc \ int.cc \ + internal.h \ internal.cc \ list.cc \ MemBuf.cc \ @@ -2108,6 +2113,7 @@ tests_test_http_range_SOURCES = \ icp_v2.cc \ icp_v3.cc \ int.cc \ + internal.h \ internal.cc \ $(IPC_SOURCE) \ ipcache.cc \ @@ -2348,6 +2354,7 @@ tests_testHttpRequest_SOURCES = \ $(IPC_SOURCE) \ ipcache.cc \ int.cc \ + internal.h \ internal.cc \ list.cc \ multicast.cc \ @@ -2671,6 +2678,7 @@ tests_testUfs_SOURCES = \ tests/stub_pconn.cc \ tests/stub_Port.cc \ tests/stub_UdsOp.cc \ + internal.h \ tests/stub_internal.cc \ tests/stub_libformat.cc \ tests/stub_store_rebuild.cc \ @@ -2948,6 +2956,7 @@ tests_testCoss_SOURCES = \ tests/stub_client_db.cc \ tests/stub_debug.cc \ tests/stub_HelperChildConfig.cc \ + internal.h \ tests/stub_internal.cc \ tests/stub_ipc.cc \ tests/stub_pconn.cc \ @@ -3087,6 +3096,7 @@ tests_testNull_SOURCES = \ tests/testNull.cc \ tests/testMain.cc \ tests/testNull.h \ + internal.h \ tests/stub_internal.cc \ tests/stub_store_rebuild.cc \ tests/stub_store_stats.cc \ @@ -3288,6 +3298,7 @@ tests_testURL_SOURCES = \ $(IPC_SOURCE) \ ipcache.cc \ int.cc \ + internal.h \ internal.cc \ list.cc \ multicast.cc \ diff --git a/src/client_side.cc b/src/client_side.cc index 656e8d36f2..bcb7f6d89f 100644 --- a/src/client_side.cc +++ b/src/client_side.cc @@ -82,7 +82,6 @@ */ #include "squid.h" - #include "acl/FilledChecklist.h" #include "anyp/PortCfg.h" #include "base/Subscription.h" @@ -110,6 +109,7 @@ #include "HttpRequest.h" #include "ident/Config.h" #include "ident/Ident.h" +#include "internal.h" #include "ipc/FdNotes.h" #include "ipc/StartListening.h" #include "MemBuf.h" diff --git a/src/forward.cc b/src/forward.cc index f3abfe250c..5da0ede1ab 100644 --- a/src/forward.cc +++ b/src/forward.cc @@ -52,6 +52,7 @@ #include "HttpReply.h" #include "HttpRequest.h" #include "icmp/net_db.h" +#include "internal.h" #include "ip/Intercept.h" #include "ip/QosConfig.h" #include "ip/tools.h" diff --git a/src/icmp/net_db.cc b/src/icmp/net_db.cc index 0b633bcb28..8f956ec517 100644 --- a/src/icmp/net_db.cc +++ b/src/icmp/net_db.cc @@ -51,6 +51,7 @@ #include "MemObject.h" #include "fde.h" #include "forward.h" +#include "internal.h" #include "protos.h" #include "SquidTime.h" #include "wordlist.h" diff --git a/src/internal.h b/src/internal.h new file mode 100644 index 0000000000..7595f93f03 --- /dev/null +++ b/src/internal.h @@ -0,0 +1,51 @@ +/* + * DEBUG: section 76 Internal Squid Object handling + * AUTHOR: Duane, Alex, Henrik + * + * 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_INTERNAL_H_ +#define SQUID_INTERNAL_H_ + +#include "comm/forward.h" +class HttpRequest; +class StoreEntry; + +extern void internalStart(const Comm::ConnectionPointer &clientConn, HttpRequest *, StoreEntry *); +extern int internalCheck(const char *urlpath); +extern int internalStaticCheck(const char *urlpath); +extern char *internalLocalUri(const char *dir, const char *name); +extern char *internalRemoteUri(const char *, unsigned short, const char *, const char *); +extern const char *internalHostname(void); +extern int internalHostnameIs(const char *); + + + +#endif /* SQUID_INTERNAL_H_ */ diff --git a/src/mime.cc b/src/mime.cc index 8e06998d35..b7254d7d15 100644 --- a/src/mime.cc +++ b/src/mime.cc @@ -39,6 +39,7 @@ #include "HttpHdrCc.h" #include "HttpReply.h" #include "HttpRequest.h" +#include "internal.h" #include "MemBuf.h" #include "MemObject.h" #include "protos.h" diff --git a/src/peer_digest.cc b/src/peer_digest.cc index 6319f74a1e..ad50fd09f5 100644 --- a/src/peer_digest.cc +++ b/src/peer_digest.cc @@ -40,6 +40,7 @@ #include "forward.h" #include "HttpReply.h" #include "HttpRequest.h" +#include "internal.h" #include "MemObject.h" #include "neighbors.h" #include "PeerDigest.h" diff --git a/src/protos.h b/src/protos.h index b56e64e3cf..359fc99b55 100644 --- a/src/protos.h +++ b/src/protos.h @@ -468,13 +468,6 @@ SQUIDCEXTERN pid_t ipcCreate(int type, int *wfd, void **hIpc); -SQUIDCEXTERN void internalStart(const Comm::ConnectionPointer &clientConn, HttpRequest *, StoreEntry *); -SQUIDCEXTERN int internalCheck(const char *urlpath); -SQUIDCEXTERN int internalStaticCheck(const char *urlpath); -SQUIDCEXTERN char *internalLocalUri(const char *dir, const char *name); -SQUIDCEXTERN char *internalRemoteUri(const char *, unsigned short, const char *, const char *); -SQUIDCEXTERN const char *internalHostname(void); -SQUIDCEXTERN int internalHostnameIs(const char *); SQUIDCEXTERN void carpInit(void); SQUIDCEXTERN peer *carpSelectParent(HttpRequest *); diff --git a/src/store_digest.cc b/src/store_digest.cc index d2ff1eeb22..ac2e6ad417 100644 --- a/src/store_digest.cc +++ b/src/store_digest.cc @@ -51,6 +51,7 @@ #include "CacheDigest.h" #include "HttpReply.h" #include "HttpRequest.h" +#include "internal.h" #include "MemObject.h" #include "PeerDigest.h" #include "refresh.h"