]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Shortened action classes' names. Since they're private members now, there's
authorFrancesco Chemolli <kinkie@squid-cache.org>
Fri, 4 Jul 2008 17:25:20 +0000 (19:25 +0200)
committerFrancesco Chemolli <kinkie@squid-cache.org>
Fri, 4 Jul 2008 17:25:20 +0000 (19:25 +0200)
really no need to keep them long.

src/CacheManager.h
src/cache_manager.cc

index 8839239c44cbb113981eb1fb431edf0b984ab883..9394761d029336da004e1cfd60da4b79be523fb6 100644 (file)
@@ -121,20 +121,20 @@ protected:
     // command classes. They are private to the cachemanager because they
     // may require access to local data sources, plus we avoid polluting
     // the namespace more than needed.
-    class CacheManagerShutdownAction : public CacheManagerAction {
+    class ShutdownAction : public CacheManagerAction {
     public:
          virtual void run (StoreEntry *sentry);
-         CacheManagerShutdownAction();
+         ShutdownAction();
     };
-    class CacheManagerReconfigureAction : public CacheManagerAction {
+    class ReconfigureAction : public CacheManagerAction {
     public:
          virtual void run (StoreEntry *sentry);
-         CacheManagerReconfigureAction();
+         ReconfigureAction();
     };
-    class CacheManagerOfflineToggleAction : public CacheManagerAction {
+    class OfflineToggleAction : public CacheManagerAction {
     public:
          virtual void run (StoreEntry *sentry);
-         CacheManagerOfflineToggleAction();
+         OfflineToggleAction();
     };
 
 
@@ -147,7 +147,6 @@ private:
     //TODO: fix so that ActionTable uses a Command pattern and thus
     //      function calls are properly object-wrapped
     static void MenuCommand(StoreEntry *sentry);
-    static void OfflineToggleCommand(StoreEntry *sentry);
 
     void StateFree(cachemgrStateData * mgr);
 
index 03fc82f3725636904b030d885ab920a648cde6f2..5b7b76778dd31d3760fe121e44fb60ced5cea101 100644 (file)
@@ -62,9 +62,9 @@ CacheManager::CacheManager()
     ActionsList = new CacheManagerActionList;
     registerAction("menu", "This Cachemanager Menu", MenuCommand, 0, 1);
     //registerAction("offline_toggle", "Toggle offline_mode setting", OfflineToggleCommand, 1, 1);
-    registerAction(new CacheManagerOfflineToggleAction);
-    registerAction(new CacheManagerShutdownAction);
-    registerAction(new CacheManagerReconfigureAction);
+    registerAction(new OfflineToggleAction);
+    registerAction(new ShutdownAction);
+    registerAction(new ReconfigureAction);
 }
 
 void
@@ -334,25 +334,25 @@ CacheManager::Start(int fd, HttpRequest * request, StoreEntry * entry)
     StateFree(mgr);
 }
 
-void CacheManager::CacheManagerShutdownAction::run(StoreEntry *sentry)
+void CacheManager::ShutdownAction::run(StoreEntry *sentry)
 {
     debugs(16, 0, "Shutdown by command.");
     shut_down(0);
 }
-CacheManager::CacheManagerShutdownAction::CacheManagerShutdownAction() : CacheManagerAction("shutdown","Shut Down the Squid Process", 1, 1) { }
+CacheManager::ShutdownAction::ShutdownAction() : CacheManagerAction("shutdown","Shut Down the Squid Process", 1, 1) { }
 
 void
-CacheManager::CacheManagerReconfigureAction::run(StoreEntry * sentry)
+CacheManager::ReconfigureAction::run(StoreEntry * sentry)
 {
     debug(16, 0) ("Reconfigure by command.\n");
     storeAppendPrintf(sentry, "Reconfiguring Squid Process ....");
     reconfigure(SIGHUP);
 }
-CacheManager::CacheManagerReconfigureAction::CacheManagerReconfigureAction() : CacheManagerAction("reconfigure","Reconfigure Squid", 1, 1) { }
+CacheManager::ReconfigureAction::ReconfigureAction() : CacheManagerAction("reconfigure","Reconfigure Squid", 1, 1) { }
 
 /// \ingroup CacheManagerInternal
 void
-CacheManager::CacheManagerOfflineToggleAction::run(StoreEntry * sentry)
+CacheManager::OfflineToggleAction::run(StoreEntry * sentry)
 {
     Config.onoff.offline = !Config.onoff.offline;
     debugs(16, 0, "offline_mode now " << (Config.onoff.offline ? "ON" : "OFF") << ".");
@@ -360,7 +360,7 @@ CacheManager::CacheManagerOfflineToggleAction::run(StoreEntry * sentry)
     storeAppendPrintf(sentry, "offline_mode is now %s\n",
                       Config.onoff.offline ? "ON" : "OFF");
 }
-CacheManager::CacheManagerOfflineToggleAction::CacheManagerOfflineToggleAction() : CacheManagerAction ("offline_toggle", "Toggle offline_mode setting", 1, 1) { }
+CacheManager::OfflineToggleAction::OfflineToggleAction() : CacheManagerAction ("offline_toggle", "Toggle offline_mode setting", 1, 1) { }
 
 /// \ingroup CacheManagerInternal
 const char *