SQUIDCEXTERN void xprof_start(xprof_type type, const char *timer);
SQUIDCEXTERN void xprof_stop(xprof_type type, const char *timer);
SQUIDCEXTERN void xprof_event(void *data);
-#if __cplusplus
-extern void xprofRegisterWithCacheManager(void);
-#endif
#define PROF_start(type) xprof_start(XPROF_##type, #type)
#define PROF_stop(type) xprof_stop(XPROF_##type, #type)
#include "ACLChecklist.h"
#include "IPAddress.h"
-/* forward decls */
-
-class CacheManager;
-
SQUIDCEXTERN int asnMatchIp(CbDataList<int> *, IPAddress &);
/// \ingroup ACLAPI
#include "HttpRequestMethod.h"
/* forward decls */
-class CacheManager;
class HttpReply;
class HttpRequest;
class StoreEntry;
class HttpReply;
class HttpRequest;
-class CacheManager;
/* for http_hdr_type parameters-by-value */
#include "HttpHeader.h"
};
/* forward decls */
-class CacheManager;
class DelayPool;
class Updateable;
class StoreEntry;
public:
static void Init();
- static void RegisterWithCacheManager(void);
static void Update(void *);
static unsigned short pools();
static void pools (u_short pools);
static unsigned short pools_;
static void FreeDelayData ();
static Vector<Updateable *> toUpdate;
+ static void RegisterWithCacheManager(void);
};
#endif /* SQUID_DELAYPOOLS_H */
{
public:
- static void RegisterAllModulesWithCacheManager(void);
static void SetupAllModules();
static void ModuleAdd(DiskIOModule &);
static void FreeAllModules();
protected:
//bool initialised;
+ static void RegisterAllModulesWithCacheManager(void);
private:
static Vector<DiskIOModule*> &GetModules();
MEMPROXY_CLASS_INLINE(ACLExternal);
-extern void externalAclRegisterWithCacheManager(void);
-
#endif /* SQUID_EXTERNALACL_H */
* Module initialization routines
*/
+static void
+httpHeaderRegisterWithCacheManager(void)
+{
+ CacheManager::GetInstance()->
+ registerAction("http_headers",
+ "HTTP Header Statistics",
+ httpHeaderStoreReport, 0, 1);
+}
+
void
httpHeaderInitModule(void)
{
httpHeaderRegisterWithCacheManager();
}
-void
-httpHeaderRegisterWithCacheManager(void)
-{
- CacheManager::GetInstance()->
- registerAction("http_headers",
- "HTTP Header Statistics",
- httpHeaderStoreReport, 0, 1);
-}
-
void
httpHeaderCleanModule(void)
{
#ifndef SQUID_HTTPHEADER_H
#define SQUID_HTTPHEADER_H
-/* forward decls */
-
-class CacheManager;
/* because we pass a spec by value */
#include "HttpHeaderRange.h"
};
-extern void httpHeaderRegisterWithCacheManager(void);
extern int httpHeaderParseQuotedString (const char *start, String *val);
SQUIDCEXTERN int httpHeaderHasByNameListMember(const HttpHeader * hdr, const char *name, const char *member, const char separator);
SQUIDCEXTERN void httpHeaderUpdate(HttpHeader * old, const HttpHeader * fresh, const HttpHeaderMask * denied_mask);
#ifndef SQUID_MEM
#define SQUID_MEM
-class CacheManager;
class StoreEntry;
class MemPoolStats;
class MemPoolMeter;
}
}
+static void
+xprofRegisterWithCacheManager(void)
+{
+ CacheManager::GetInstance()->
+ registerAction("cpu_profile", "CPU Profiling Stats", xprof_summary, 0, 1);
+}
+
// FIXME:
// this gets colled once per event. This doesn't seem to make much sense,
// does it?
xprofRegisterWithCacheManager(); //moved here so it's not double-init'ed
}
-void
-xprofRegisterWithCacheManager(void)
-{
- CacheManager::GetInstance()->
- registerAction("cpu_profile", "CPU Profiling Stats", xprof_summary, 0, 1);
-}
-
void
xprof_event(void *data)
{
#include "config.h"
-/* forward decls */
-
-class CacheManager;
-
/** todo checks to wrap this include properly */
#include <ostream>
/// \ingroup StoreAPI
SQUIDCEXTERN void storeInit(void);
-/// \ingroup StoreAPI
-extern void storeRegisterWithCacheManager(void);
-
/// \ingroup StoreAPI
SQUIDCEXTERN void storeConfigure(void);
* given StoreEntry. A maxobjsize of -1 means 'any size'.
*/
-class CacheManager;
class SwapDir;
/**
{
public:
- static void RegisterAllFsWithCacheManager(void);
static void SetupAllFs();
static void FsAdd(StoreFileSystem &);
static void FreeAllFs();
virtual char const *type () const = 0;
virtual SwapDir *createSwapDir() = 0;
virtual void done() = 0;
- virtual void registerWithCacheManager(void);
virtual void setup() = 0;
// Not implemented
StoreFileSystem(StoreFileSystem const &);
protected:
bool initialised;
+ virtual void registerWithCacheManager(void);
private:
static Vector<StoreFileSystem*> &GetFileSystems();
static Vector<StoreFileSystem*> *_FileSystems;
+ static void RegisterAllFsWithCacheManager(void);
};
// TODO: Kill this typedef!
unsigned short DelayPools::pools_ (0);
void
-DelayPools::Init()
+DelayPools::RegisterWithCacheManager(void)
{
- LastUpdate = getCurrentTime();
- RegisterWithCacheManager();
+ CacheManager::GetInstance()->
+ registerAction("delay", "Delay Pool Levels", Stats, 0, 1);
}
void
-DelayPools::RegisterWithCacheManager(void)
+DelayPools::Init()
{
- CacheManager::GetInstance()->
- registerAction("delay", "Delay Pool Levels", Stats, 0, 1);
+ LastUpdate = getCurrentTime();
+ RegisterWithCacheManager();
}
+
void
DelayPools::InitDelayData()
{
helperStats(sentry, dnsservers);
}
+static void
+dnsRegisterWithCacheManager(void)
+{
+ CacheManager::GetInstance->
+ registerAction("dns", "Dnsserver Statistics", dnsStats, 0, 1);
+}
+
void
dnsInit(void)
{
helperOpenServers(dnsservers);
}
-void
-dnsRegisterWithCacheManager(void)
-{
- CacheManager::GetInstance->
- registerAction("dns", "Dnsserver Statistics", dnsStats, 0, 1);
-}
-
void
dnsShutdown(void)
{
}
}
+static void
+externalAclRegisterWithCacheManager(void)
+{
+ CacheManager::GetInstance()->
+ registerAction("external_acl",
+ "External ACL stats",
+ externalAclStats, 0, 1);
+}
+
void
externalAclInit(void)
{
externalAclRegisterWithCacheManager();
}
-void
-externalAclRegisterWithCacheManager(void)
-{
- CacheManager::GetInstance()->
- registerAction("external_acl",
- "External ACL stats",
- externalAclStats, 0, 1);
-}
-
void
externalAclShutdown(void)
{
/* forward decls */
-class CacheManager;
class ErrorState;
#include "comm.h"
* coexist.
*/
- //clientdbRegisterWithCacheManager(); //moved to clientdbInit()
-#if DELAY_POOLS
-
- //DelayPools::RegisterWithCacheManager(); //moved to DelayPools::Init()
-#endif
-
- //DiskIOModule::RegisterAllModulesWithCacheManager();
- // moved to each module's init() function
-#if USE_DNSSERVERS
-
- // dnsRegisterWithCacheManager(); //moved to dnsInit()
-#endif
-
eventInit();
- // externalAclRegisterWithCacheManager(); //moved to externalAclInit()
- // fqdncacheRegisterWithCacheManager(); //moved to fqdncache_init()
- // FwdState::RegisterWithCacheManager(); //moved to FwdState::initModule
- // httpHeaderRegisterWithCacheManager(); //moved to httpHeaderInitModule
-#if !USE_DNSSERVERS
- //TODO: remove cache manager registration functions from namespace
- // (protos.h and make them static where appropriate)
- // idnsRegisterWithCacheManager(); // moved to idnsInit()
-#endif
-
- // ipcacheRegisterWithCacheManager(); //moved to ipcache_init()
- // Mem::RegisterWithCacheManager(); //moved to Mem::Init()
- // netdbRegisterWitHCacheManager(); //moved to netdbInit()
+
// TODO: pconn is a good candidate for new-style registration
// PconnModule::GetInstance()->registerWithCacheManager();
// moved to PconnModule::PconnModule()
- // redirectRegisterWithCacheManager(); //moved to redirectInit()
- // refreshRegisterWithCacheManager(); //moved to refreshInit()
- // statRegisterWithCacheManager(); //moved to statInit()
- // storeDigestRegisterWithCacheManager(); //moved to storeDigestInit()
- // StoreFileSystem::RegisterAllFsWithCacheManager();
- // storeRegisterWithCacheManager(); //moved to storeInit()
- // storeLogRegisterWithCacheManager(); //moved to storeLogOpen()
-#if DEBUGSTRINGS
- // cpu_prStringRegistry::Instance().registerWithCacheManager();
- // moved to class constructor
-#endif
-
-#if USE_XPROF_STATS
- // xprofRegisterWithCacheManager(); //moved to xprof_init()
-#endif
-
}
#if USE_WCCP
\todo CLEANUP: Break multiple classes out of the generic pconn.h header
*/
-class CacheManager;
class PconnPool;
/* for CBDATA_CLASS2() macros */
};
-class CacheManager;
class StoreEntry;
class PconnPool;
/* some parameters stil need this */
#include "wordlist.h"
-class CacheManager;
class HttpRequestMethod;
return 0;
}
+static void
+storeRegisterWithCacheManager(void)
+{
+ CacheManager *manager=CacheManager::GetInstance();
+ manager->registerAction("storedir", "Store Directory Stats", Store::Stats, 0, 1);
+ manager->registerAction("store_io", "Store IO Interface Stats", storeIOStats, 0, 1);
+ manager->registerAction("store_check_cachable_stats", "storeCheckCachable() Stats",
+ storeCheckCachableStats, 0, 1);
+}
+
void
storeInit(void)
{
storeRegisterWithCacheManager();
}
-void
-storeRegisterWithCacheManager(void)
-{
- CacheManager *manager=CacheManager::GetInstance();
- manager->registerAction("storedir", "Store Directory Stats", Store::Stats, 0, 1);
- manager->registerAction("store_io", "Store IO Interface Stats", storeIOStats, 0, 1);
- manager->registerAction("store_check_cachable_stats", "storeCheckCachable() Stats",
- storeCheckCachableStats, 0, 1);
-}
-
void
storeConfigure(void)
{