--------------------- PatchSet 5225 Date: 2007/08/10 00:56:29 Author: amosjeffries Branch: docs Tag: (none) Log: Migrate Cache Manager docs. Members: doc/Programming-Guide/25_CacheManager.dox:1.1.2.1->1.1.2.2(DEAD) src/CacheManager.h:1.1.22.1->1.1.22.2 src/cache_manager.cc:1.20->1.20.2.1 --- squid3/doc/Programming-Guide/25_CacheManager.dox Sat Aug 11 00:21:16 2007 +++ /dev/null Sat Aug 11 00:21:16 2007 @@ -1,8 +0,0 @@ -/** -\page 25_CacheManager Cache Manager - -\section Infrastructure Infrastructure - -\todo Write documentation for Cache Manager - - */ Index: squid3/src/CacheManager.h =================================================================== RCS file: /cvsroot/squid-sf//squid3/src/CacheManager.h,v retrieving revision 1.1.22.1 retrieving revision 1.1.22.2 diff -u -r1.1.22.1 -r1.1.22.2 --- squid3/src/CacheManager.h 8 Aug 2007 02:59:44 -0000 1.1.22.1 +++ squid3/src/CacheManager.h 10 Aug 2007 00:56:29 -0000 1.1.22.2 @@ -1,6 +1,6 @@ /* - * $Id: CacheManager.h,v 1.1.22.1 2007/08/08 02:59:44 amosjeffries Exp $ + * $Id: CacheManager.h,v 1.1.22.2 2007/08/10 00:56:29 amosjeffries Exp $ * * * SQUID Web Proxy Cache http://www.squid-cache.org/ @@ -36,13 +36,18 @@ #include "squid.h" +/** + \defgroup CacheManagerAPI Cache Manager API + \ingroup Components + */ +/// \ingroup CacheManagerAPI extern void cachemgrStart(int fd, HttpRequest * request, StoreEntry * entry); /** + \ingroup CacheManagerAPI * A single menu item in the cache manager - an 'action'. */ - class CacheManagerAction { @@ -68,12 +73,12 @@ /** + \ingroup CacheManagerAPI * a CacheManager - the menu system for interacting with squid. * This is currently just an adapter to the global cachemgr* routines to * provide looser coupling between modules, but once fully transitioned, * an instance of this class will represent a single independent manager. */ - class CacheManager { Index: squid3/src/cache_manager.cc =================================================================== RCS file: /cvsroot/squid-sf//squid3/src/cache_manager.cc,v retrieving revision 1.20 retrieving revision 1.20.2.1 diff -u -r1.20 -r1.20.2.1 --- squid3/src/cache_manager.cc 28 Apr 2007 22:51:49 -0000 1.20 +++ squid3/src/cache_manager.cc 10 Aug 2007 00:56:29 -0000 1.20.2.1 @@ -1,6 +1,6 @@ /* - * $Id: cache_manager.cc,v 1.20 2007/04/28 22:51:49 squidadm Exp $ + * $Id: cache_manager.cc,v 1.20.2.1 2007/08/10 00:56:29 amosjeffries Exp $ * * DEBUG: section 16 Cache Manager Objects * AUTHOR: Duane Wessels @@ -42,8 +42,15 @@ #include "SquidTime.h" #include "wordlist.h" +/** + \defgroup CacheManagerInternal Cache Manager Internals + \ingroup CacheManagerAPI + */ + +/// \ingroup CacheManagerInternal #define MGR_PASSWD_SZ 128 +/// \ingroup CacheManagerInternal typedef struct { StoreEntry *entry; @@ -51,10 +58,8 @@ char *user_name; char *passwd; } - cachemgrStateData; - static CacheManagerAction *cachemgrFindAction(const char *action); static cachemgrStateData *cachemgrParseUrl(const char *url); static void cachemgrParseHeaders(cachemgrStateData * mgr, const HttpRequest * request); @@ -66,6 +71,7 @@ static OBJH cachemgrMenu; static OBJH cachemgrOfflineToggle; +/// \ingroup CacheManagerInternal CacheManagerAction *ActionTable = NULL; CacheManager::CacheManager() @@ -112,6 +118,7 @@ return cachemgrFindAction(action); } +/// \ingroup CacheManagerInternal static CacheManagerAction * cachemgrFindAction(const char *action) { @@ -125,6 +132,7 @@ return NULL; } +/// \ingroup CacheManagerInternal static cachemgrStateData * cachemgrParseUrl(const char *url) { @@ -172,6 +180,7 @@ return mgr; } +/// \ingroup CacheManagerInternal static void cachemgrParseHeaders(cachemgrStateData * mgr, const HttpRequest * request) { @@ -203,8 +212,12 @@ debugs(16, 9, "cachemgrParseHeaders: got user: '" << mgr->user_name << "' passwd: '" << mgr->passwd << "'"); } -/* - * return 0 if mgr->password is good +/** + \ingroup CacheManagerInternal + * + \retval 0 if mgr->password is good or "none" + \retval 1 if mgr->password is "disable" + \retval !0 if mgr->password does not match configured password */ static int cachemgrCheckPassword(cachemgrStateData * mgr) @@ -228,6 +241,7 @@ return strcmp(pwd, mgr->passwd); } +/// \ingroup CacheManagerInternal static void cachemgrStateFree(cachemgrStateData * mgr) { @@ -238,6 +252,7 @@ xfree(mgr); } +// API void cachemgrStart(int fd, HttpRequest * request, StoreEntry * entry) { @@ -341,6 +356,7 @@ cachemgrStateFree(mgr); } +/// \ingroup CacheManagerInternal static void cachemgrShutdown(StoreEntry * entryunused) { @@ -348,6 +364,7 @@ shut_down(0); } +/// \ingroup CacheManagerInternal static void cachemgrOfflineToggle(StoreEntry * sentry) { @@ -358,6 +375,7 @@ Config.onoff.offline ? "ON" : "OFF"); } +/// \ingroup CacheManagerInternal static const char * cachemgrActionProtection(const CacheManagerAction * at) { @@ -377,6 +395,7 @@ return "protected"; } +/// \ingroup CacheManagerInternal static void cachemgrMenu(StoreEntry * sentry) { @@ -388,6 +407,7 @@ } } +/// \ingroup CacheManagerInternal static char * cachemgrPasswdGet(cachemgr_passwd * a, const char *action) {