From: Henrik Nordstrom Date: Sun, 2 May 2010 18:52:45 +0000 (+0200) Subject: Add ip/forward.h for forward declaration of Ip:: classes (Ip::Address) X-Git-Tag: SQUID_3_2_0_1~237^2~4 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=e06b8df839e3047878ab962b30fd9aba68417756;p=thirdparty%2Fsquid.git Add ip/forward.h for forward declaration of Ip:: classes (Ip::Address) --- diff --git a/src/client_side_reply.h b/src/client_side_reply.h index 760c86255e..60ca4d8494 100644 --- a/src/client_side_reply.h +++ b/src/client_side_reply.h @@ -38,7 +38,7 @@ #include "client_side_request.h" class ErrorState; -class Ip::Address; +#include "ip/forward.h" /* XXX make static method */ diff --git a/src/htcp.h b/src/htcp.h index f8856a563c..1e2e70ce4e 100644 --- a/src/htcp.h +++ b/src/htcp.h @@ -34,7 +34,7 @@ #include "HttpHeader.h" -class Ip::Address; +#include "ip/forward.h" /// \ingroup ServerProtocolHTCP class HtcpReplyData diff --git a/src/ident/Ident.h b/src/ident/Ident.h index 697908af5c..7253a4736d 100644 --- a/src/ident/Ident.h +++ b/src/ident/Ident.h @@ -15,7 +15,7 @@ #include "cbdata.h" -class Ip::Address; +#include "ip/forward.h" namespace Ident { diff --git a/src/ip/forward.h b/src/ip/forward.h new file mode 100644 index 0000000000..d771e142d5 --- /dev/null +++ b/src/ip/forward.h @@ -0,0 +1,44 @@ +/* + * DEBUG: section 14 IP Storage and Handling + * AUTHOR: Henrik Nordstrom + * + * SQUID Internet Object Cache http://squid.nlanr.net/Squid/ + * ---------------------------------------------------------- + * + * Squid is the result of efforts by numerous individuals from the + * Internet community. Development is led by Duane Wessels of the + * National Laboratory for Applied Network Research and funded by the + * National Science Foundation. Squid is Copyrighted (C) 1998 by + * the Regents of the University of California. Please see the + * COPYRIGHT file for full details. Squid incorporates software + * developed and/or copyrighted by other sources. Please see the + * CREDITS file for full details. + * + * This wrapper code is copyright (C) 2010 by Henrik Nordstrom + * It is published and Lisenced as an extension of squid under the + * same conditions as the main squid application. + * + * 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_IP_FORWARD_H +#define _SQUID_IP_FORWARD_H + +// Forward-declare Ip classes needed by reference in other parts of the code +// for passing objects around without actually touching them +namespace Ip { +class Address; +} +#endif /* _SQUID_IP_FORWARD_H */ diff --git a/src/pconn.h b/src/pconn.h index c540e76ae3..34e979a084 100644 --- a/src/pconn.h +++ b/src/pconn.h @@ -57,7 +57,8 @@ private: }; -class Ip::Address; +#include "ip/forward.h" + class StoreEntry; class IdleConnLimit;