]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Renamed CacheMgrPasswd to Mgr::ActionPasswordList
authorFrancesco Chemolli <kinkie@squid-cache.org>
Tue, 18 Sep 2012 14:06:31 +0000 (16:06 +0200)
committerFrancesco Chemolli <kinkie@squid-cache.org>
Tue, 18 Sep 2012 14:06:31 +0000 (16:06 +0200)
12 files changed:
src/AccessLogEntry.h
src/CacheManager.h
src/ExternalACL.h
src/ExternalACLEntry.h
src/Makefile.am
src/SquidConfig.h
src/cache_cf.cc
src/cache_manager.cc
src/mgr/ActionPasswordList.cc [moved from src/CacheMgrPasswd.cc with 97% similarity]
src/mgr/ActionPasswordList.h [moved from src/CacheMgrPasswd.h with 84% similarity]
src/mgr/Makefile.am
src/structs.h

index 022ecac34d2729f8a5029e5a118e9f4dbde770a7..ab642efbd84a71cc1741472de91b9eaebf12aaf3 100644 (file)
@@ -49,6 +49,7 @@
 /* forward decls */
 class HttpReply;
 class HttpRequest;
+class CustomLog;
 
 class AccessLogEntry: public RefCountable
 {
index a5ea87d1307b74ffb18ef5202d73d85b097f7290..3a1aeb4a3839b1dffd77f21526a8a2ee16230764 100644 (file)
@@ -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 &params);
     int CheckPassword(const Mgr::Command &cmd);
-    char *PasswdGet(CacheMgrPasswd *, const char *);
+    char *PasswdGet(Mgr::ActionPasswordList *, const char *);
 
     void registerProfile(const Mgr::ActionProfilePointer &profile);
 
index 9e876e36290324d106b3dfc914cd001c50aa67ee..8878f3e5c6ef149a0e9af64fc6a8f7be06812554 100644 (file)
@@ -34,6 +34,8 @@
 
 #include "acl/Checklist.h"
 
+class external_acl;
+
 /** \todo CLEANUP: kill this typedef. */
 typedef struct _external_acl_data external_acl_data;
 
index 48bf326e9ecf8e46148317fed46ccb81142c0b35..5c3cd2420845f96baccf0f4e803da38e07d52703 100644 (file)
@@ -45,6 +45,7 @@
 #include "acl/Acl.h"
 #include "cbdata.h"
 
+class external_acl;
 /******************************************************************
  * ExternalACLEntryData
  * Core data that ExternalACLEntry manages.
index 21eb44ec0957ef29d847dd3c90e7236640b51cf2..ca9c599d72ae230e497e151175b1b9f868cc88bd 100644 (file)
@@ -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 \
index 278d54dcf3c456ea8de77213e45da0dbdf9a24b0..8dc506ade65a83876cd451eea3af2fa56451ebfa 100644 (file)
 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;
index d8cb234dde462474b048e506875cf381769e45f3..9169b7d48feb7445fe4eb32b5b144a90ed18a059 100644 (file)
@@ -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;
index 0b14abba7b0a62010420d3d8834d38c20ab57616..d5f8b3538ae9ec68b810eb0e933e48d15c201429 100644 (file)
@@ -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;
 
similarity index 97%
rename from src/CacheMgrPasswd.cc
rename to src/mgr/ActionPasswordList.cc
index 8260d3bb4d0b5d8c57a862176f167656ebbd4196..b480a4a80bdeafe9995ea2d94a501b44f1513454 100644 (file)
@@ -28,5 +28,5 @@
  */
 
 #include "squid.h"
-#include "CacheMgrPasswd.h"
+#include "mgr/ActionPasswordList.h"
 
similarity index 84%
rename from src/CacheMgrPasswd.h
rename to src/mgr/ActionPasswordList.h
index 99baa322962b9431f60a1e5eb5c871ef138166c7..c98cdcfe05a2477fc14997c25cb7725caf0f0aef 100644 (file)
@@ -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/
  * ----------------------------------------------------------
 
 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_ */
index 690ba6089ebcd2fed87a1e20e3c7a5b192e996f8..118dfe5a0c7ef022bf8b987ddbad305bfcb3051c 100644 (file)
@@ -9,6 +9,8 @@ libmgr_la_SOURCES = \
        Action.h \
        ActionParams.cc \
        ActionParams.h \
+       ActionPasswordList.h \
+       ActionPasswordList.cc \
        ActionProfile.h \
        ActionWriter.cc \
        ActionWriter.h \
index 6a1f891d5cb179cca6bcac9c199f11108156863d..b6ba14b44435f763a9a9130a8a92d129d994997b 100644 (file)
@@ -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
 {