]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Documentation.
authorFrancesco Chemolli <kinkie@squid-cache.org>
Sat, 5 Jul 2008 23:26:10 +0000 (01:26 +0200)
committerFrancesco Chemolli <kinkie@squid-cache.org>
Sat, 5 Jul 2008 23:26:10 +0000 (01:26 +0200)
src/CacheManager.h
src/cache_manager.cc

index 4ff2675e29af0de718f0fc98bb75bdac8e184aa1..cda942690911ab2b82ab44b5a5bb4a91e7617115 100644 (file)
 /**
  \defgroup CacheManagerAPI Cache Manager API
  \ingroup Components
+
+ \defgroup CacheManagerInternal Cache Manager intenal API (not for public use)
+ \ingroup CacheManagerAPI
  */
 
+/**
+ \ingroup CacheManagerInternal
+ * The basic action handler. Its virtual method run(StoreEntry *) is invoked
+ * to perform the actual action.
+ */
 class CacheManagerAction {
 public:    
      virtual void run(StoreEntry *sentry) = 0;
@@ -58,9 +66,10 @@ public:
 };
 
 /**
- \ingroup CacheManagerAPI
+ \ingroup CacheManagerInternal
  * wrapper allowing c-style callbacks to be used. Arguments are supposed to
- * managed by the caller, as they will be copied over by the constructor.
+ * managed by the caller.
+ * This object is generated by CacheManager::registerAction
  */
 class CacheManagerActionLegacy : public CacheManagerAction {
 public:
index 4eed8ad3a6d4c4e094d1bc923ee65922866bd5c6..4db2e558ecf6b71ab5a263207abd3b2b3242a226 100644 (file)
 #define MGR_PASSWD_SZ 128
 
 
-
+/**
+ \ingroup CacheManagerInternals
+ * Constructor. Its purpose is to register internal commands
+ */
 CacheManager::CacheManager()
 {
-    //if (ActionsList != NULL)
-    //     delete(ActionsList); //TODO: Laaazy. Will be moved to class member
-    //ActionsList = new CacheManagerActionList;
     registerAction(new OfflineToggleAction);
     registerAction(new ShutdownAction);
     registerAction(new ReconfigureAction);
     registerAction(new MenuAction(this));
 }
 
+/**
+ \ingroup CacheManagerAPI
+ * Registers a C-style action, which is implemented as a pointer to a function
+ * taking as argument a pointer to a StoreEntry and returning void.
+ * Implemented via CacheManagerActionLegacy.
+ */
 void
 CacheManager::registerAction(char const * action, char const * desc, OBJH * handler, int pw_req_flag, int atomic)
 {
@@ -70,6 +76,12 @@ CacheManager::registerAction(char const * action, char const * desc, OBJH * hand
     registerAction(new CacheManagerActionLegacy(action,desc,pw_req_flag,atomic,handler));
 }
 
+/**
+ \ingroup CacheManagerAPI
+ * Registers a C++-style action, via a poiner to a subclass of 
+ * a CacheManagerAction object, whose run() method will be invoked when
+ * CacheManager identifies that the user has requested the action.
+ */
 void
 CacheManager::registerAction(CacheManagerAction *anAction)
 {
@@ -87,7 +99,12 @@ CacheManager::registerAction(CacheManagerAction *anAction)
 }
 
 
-/// \ingroup CacheManagerInternal
+/**
+ \ingroup CacheManagerInternal
+ * Locates an action in the actions registry ActionsList.
+\retval NULL  if Action not found
+\retval CacheManagerAction* if the action was found
+ */
 CacheManagerAction *
 CacheManager::findAction(char const * action)
 {