From: Francesco Chemolli Date: Tue, 18 Sep 2012 14:06:31 +0000 (+0200) Subject: Renamed CacheMgrPasswd to Mgr::ActionPasswordList X-Git-Tag: SQUID_3_3_0_1~33^2~29 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=613924ee11319fd2588a9e68db37d6c9f144c9a0;p=thirdparty%2Fsquid.git Renamed CacheMgrPasswd to Mgr::ActionPasswordList --- diff --git a/src/AccessLogEntry.h b/src/AccessLogEntry.h index 022ecac34d..ab642efbd8 100644 --- a/src/AccessLogEntry.h +++ b/src/AccessLogEntry.h @@ -49,6 +49,7 @@ /* forward decls */ class HttpReply; class HttpRequest; +class CustomLog; class AccessLogEntry: public RefCountable { diff --git a/src/CacheManager.h b/src/CacheManager.h index a5ea87d130..3a1aeb4a38 100644 --- a/src/CacheManager.h +++ b/src/CacheManager.h @@ -48,7 +48,9 @@ */ class HttpRequest; -class CacheMgrPasswd; +namespace Mgr { +class ActionPasswordList; +} //namespace Mgr /** \ingroup CacheManagerAPI * a CacheManager - the menu system for interacting with squid. @@ -84,7 +86,7 @@ protected: Mgr::CommandPointer ParseUrl(const char *url); void ParseHeaders(const HttpRequest * request, Mgr::ActionParams ¶ms); int CheckPassword(const Mgr::Command &cmd); - char *PasswdGet(CacheMgrPasswd *, const char *); + char *PasswdGet(Mgr::ActionPasswordList *, const char *); void registerProfile(const Mgr::ActionProfilePointer &profile); diff --git a/src/ExternalACL.h b/src/ExternalACL.h index 9e876e3629..8878f3e5c6 100644 --- a/src/ExternalACL.h +++ b/src/ExternalACL.h @@ -34,6 +34,8 @@ #include "acl/Checklist.h" +class external_acl; + /** \todo CLEANUP: kill this typedef. */ typedef struct _external_acl_data external_acl_data; diff --git a/src/ExternalACLEntry.h b/src/ExternalACLEntry.h index 48bf326e9e..5c3cd24208 100644 --- a/src/ExternalACLEntry.h +++ b/src/ExternalACLEntry.h @@ -45,6 +45,7 @@ #include "acl/Acl.h" #include "cbdata.h" +class external_acl; /****************************************************************** * ExternalACLEntryData * Core data that ExternalACLEntry manages. diff --git a/src/Makefile.am b/src/Makefile.am index 21eb44ec09..ca9c599d72 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -272,8 +272,6 @@ squid_SOURCES = \ YesNoNone.h \ YesNoNone.cc \ RefreshPattern.h \ - CacheMgrPasswd.h \ - CacheMgrPasswd.cc \ cache_cf.cc \ CacheDigest.h \ CacheDigest.cc \ @@ -1390,8 +1388,6 @@ tests_testCacheManager_SOURCES = \ YesNoNone.h \ YesNoNone.cc \ RefreshPattern.h \ - CacheMgrPasswd.h \ - CacheMgrPasswd.cc \ cache_cf.cc \ CacheDigest.h \ CacheDigest.cc \ @@ -1786,8 +1782,6 @@ tests_testEvent_SOURCES = \ YesNoNone.h \ YesNoNone.cc \ RefreshPattern.h \ - CacheMgrPasswd.h \ - CacheMgrPasswd.cc \ cache_cf.cc \ cache_manager.cc \ carp.h \ @@ -2029,8 +2023,6 @@ tests_testEventLoop_SOURCES = \ YesNoNone.h \ YesNoNone.cc \ RefreshPattern.h \ - CacheMgrPasswd.h \ - CacheMgrPasswd.cc \ cache_cf.cc \ carp.h \ carp.cc \ @@ -2267,8 +2259,6 @@ tests_test_http_range_SOURCES = \ YesNoNone.h \ YesNoNone.cc \ RefreshPattern.h \ - CacheMgrPasswd.h \ - CacheMgrPasswd.cc \ cache_cf.cc \ cache_manager.cc \ CacheDigest.h \ @@ -2563,8 +2553,6 @@ tests_testHttpRequest_SOURCES = \ YesNoNone.h \ YesNoNone.cc \ RefreshPattern.h \ - CacheMgrPasswd.h \ - CacheMgrPasswd.cc \ cache_cf.cc \ debug.cc \ CacheDigest.h \ @@ -3631,8 +3619,6 @@ tests_testURL_SOURCES = \ YesNoNone.h \ YesNoNone.cc \ RefreshPattern.h \ - CacheMgrPasswd.h \ - CacheMgrPasswd.cc \ cache_cf.cc \ cache_manager.cc \ CacheDigest.h \ diff --git a/src/SquidConfig.h b/src/SquidConfig.h index 278d54dcf3..8dc506ade6 100644 --- a/src/SquidConfig.h +++ b/src/SquidConfig.h @@ -46,7 +46,11 @@ class acl_access; class acl_size_t; class AclDenyInfoList; -class CacheMgrPasswd; +namespace Mgr { +class ActionPasswordList; +} // namespace Mgr +class CustomLog; +class external_acl; class HeaderManglers; class RefreshPattern; class RemovalPolicySettings; @@ -264,7 +268,7 @@ public: } fqdncache; int minDirectHops; int minDirectRtt; - CacheMgrPasswd *passwd_list; + Mgr::ActionPasswordList *passwd_list; struct { int objectsPerBucket; diff --git a/src/cache_cf.cc b/src/cache_cf.cc index d8cb234dde..9169b7d48f 100644 --- a/src/cache_cf.cc +++ b/src/cache_cf.cc @@ -40,7 +40,7 @@ #include "anyp/PortCfg.h" #include "AuthReg.h" #include "base/RunnersRegistry.h" -#include "CacheMgrPasswd.h" +#include "mgr/ActionPasswordList.h" #include "CachePeer.h" #include "cache_cf.h" #include "ConfigParser.h" @@ -2370,7 +2370,7 @@ free_peer(CachePeer ** P) } static void -dump_cachemgrpasswd(StoreEntry * entry, const char *name, CacheMgrPasswd * list) +dump_cachemgrpasswd(StoreEntry * entry, const char *name, Mgr::ActionPasswordList * list) { wordlist *w; @@ -2390,15 +2390,15 @@ dump_cachemgrpasswd(StoreEntry * entry, const char *name, CacheMgrPasswd * list) } static void -parse_cachemgrpasswd(CacheMgrPasswd ** head) +parse_cachemgrpasswd(Mgr::ActionPasswordList ** head) { char *passwd = NULL; wordlist *actions = NULL; - CacheMgrPasswd *p; - CacheMgrPasswd **P; + Mgr::ActionPasswordList *p; + Mgr::ActionPasswordList **P; parse_string(&passwd); parse_wordlist(&actions); - p = new CacheMgrPasswd; + p = new Mgr::ActionPasswordList; p->passwd = passwd; p->actions = actions; @@ -2407,7 +2407,7 @@ parse_cachemgrpasswd(CacheMgrPasswd ** head) * See if any of the actions from this line already have a * password from previous lines. The password checking * routines in cache_manager.c take the the password from - * the first CacheMgrPasswd struct that contains the + * the first Mgr::ActionPasswordList that contains the * requested action. Thus, we should warn users who might * think they can have two passwords for the same action. */ @@ -2428,9 +2428,9 @@ parse_cachemgrpasswd(CacheMgrPasswd ** head) } static void -free_cachemgrpasswd(CacheMgrPasswd ** head) +free_cachemgrpasswd(Mgr::ActionPasswordList ** head) { - CacheMgrPasswd *p; + Mgr::ActionPasswordList *p; while ((p = *head) != NULL) { *head = p->next; diff --git a/src/cache_manager.cc b/src/cache_manager.cc index 0b14abba7b..d5f8b3538a 100644 --- a/src/cache_manager.cc +++ b/src/cache_manager.cc @@ -32,7 +32,7 @@ #include "squid.h" #include "base/TextException.h" -#include "CacheMgrPasswd.h" +#include "mgr/ActionPasswordList.h" #include "CacheManager.h" #include "comm/Connection.h" #include "Debug.h" @@ -465,7 +465,7 @@ CacheManager::ActionProtection(const Mgr::ActionProfile::Pointer &profile) * for the action she queried */ char * -CacheManager::PasswdGet(CacheMgrPasswd * a, const char *action) +CacheManager::PasswdGet(Mgr::ActionPasswordList * a, const char *action) { wordlist *w; diff --git a/src/CacheMgrPasswd.cc b/src/mgr/ActionPasswordList.cc similarity index 97% rename from src/CacheMgrPasswd.cc rename to src/mgr/ActionPasswordList.cc index 8260d3bb4d..b480a4a80b 100644 --- a/src/CacheMgrPasswd.cc +++ b/src/mgr/ActionPasswordList.cc @@ -28,5 +28,5 @@ */ #include "squid.h" -#include "CacheMgrPasswd.h" +#include "mgr/ActionPasswordList.h" diff --git a/src/CacheMgrPasswd.h b/src/mgr/ActionPasswordList.h similarity index 84% rename from src/CacheMgrPasswd.h rename to src/mgr/ActionPasswordList.h index 99baa32296..c98cdcfe05 100644 --- a/src/CacheMgrPasswd.h +++ b/src/mgr/ActionPasswordList.h @@ -1,5 +1,5 @@ -#ifndef SQUID_CACHEMGRPASSWD_H_ -#define SQUID_CACHEMGRPASSWD_H_ +#ifndef SQUID_MGR_CACHEMGRPASSWD_H_ +#define SQUID_MGR_CACHEMGRPASSWD_H_ /* * SQUID Web Proxy Cache http://www.squid-cache.org/ * ---------------------------------------------------------- @@ -31,14 +31,16 @@ class wordlist; -//TODO: this class is misnamed and C-ish. Split into CacheMgrPasswd and -// CacheMgrPasswdList (std::list-derived) -class CacheMgrPasswd +namespace Mgr { +//TODO: refactor into a std::list-backed proper list. +class ActionPasswordList { public: char *passwd; wordlist *actions; - CacheMgrPasswd *next; + ActionPasswordList *next; }; -#endif /* SQUID_CACHEMGRPASSWD_H_ */ +} //namespace Mgr + +#endif /* SQUID_MGR_CACHEMGRPASSWD_H_ */ diff --git a/src/mgr/Makefile.am b/src/mgr/Makefile.am index 690ba6089e..118dfe5a0c 100644 --- a/src/mgr/Makefile.am +++ b/src/mgr/Makefile.am @@ -9,6 +9,8 @@ libmgr_la_SOURCES = \ Action.h \ ActionParams.cc \ ActionParams.h \ + ActionPasswordList.h \ + ActionPasswordList.cc \ ActionProfile.h \ ActionWriter.cc \ ActionWriter.h \ diff --git a/src/structs.h b/src/structs.h index 6a1f891d5c..b6ba14b444 100644 --- a/src/structs.h +++ b/src/structs.h @@ -101,16 +101,6 @@ struct acl_size_t { /* forward decl for SquidConfig, see RemovalPolicy.h */ class CpuAffinityMap; -class RemovalPolicySettings; -class external_acl; -class Store; -class CustomLog; -class CacheMgrPasswd; -namespace AnyP -{ -struct PortCfg; -} -class SwapDir; class close_handler {