There are no logical changes in this patch.
* Make MEMPROXY_CLASS() macro inline its definitions.
* Remove MEMPROXY_CLASS_INLINE
* Remove last remaining mention of obsolete MEMPROXY_CLASS_INIT
* Adjust MEMPROXY_CLASS() to control its private/public definitions
appropriate to their needs.
* Shuffle all MEMPROXY_CLASS() macro uses to the top of the relevant
classes (in some cases renaming struct to class with public members
if necessary) such that the new terminal private: does not affect
existing class definitions.
/* help for classes */
/**
- \ingroup MemPoolsAPI
- \hideinitializer
+ * \ingroup MemPoolsAPI
+ * \hideinitializer
*
+ * Pool and account the memory used for the CLASS object.
* This macro is intended for use within the declaration of a class.
*/
#define MEMPROXY_CLASS(CLASS) \
- inline void *operator new(size_t); \
- inline void operator delete(void *); \
- static inline MemAllocatorProxy &Pool()
-
-/**
- \ingroup MemPoolsAPI
- \hideinitializer
- *
- * This macro is intended for use within the .h or .cci of a class as appropriate.
- */
-#define MEMPROXY_CLASS_INLINE(CLASS) \
-MemAllocatorProxy& CLASS::Pool() \
-{ \
- static MemAllocatorProxy thePool(#CLASS, sizeof (CLASS)); \
- return thePool; \
-} \
-\
-void * \
-CLASS::operator new (size_t byteCount) \
-{ \
- /* derived classes with different sizes must implement their own new */ \
- assert (byteCount == sizeof (CLASS)); \
-\
- return Pool().alloc(); \
-} \
-\
-void \
-CLASS::operator delete (void *address) \
-{ \
- Pool().freeOne(address); \
-}
+ private: \
+ static inline MemAllocatorProxy &Pool() { \
+ static MemAllocatorProxy thePool(#CLASS, sizeof(CLASS)); \
+ return thePool; \
+ } \
+ public: \
+ void *operator new(size_t byteCount) { \
+ /* derived classes with different sizes must implement their own new */ \
+ assert (byteCount == sizeof(CLASS)); \
+ return Pool().alloc(); \
+ } \
+ void operator delete(void *address) {Pool().freeOne(address);} \
+ private:
/// \ingroup MemPoolsAPI
class MemImplementingAllocator : public MemAllocator
CBDATA_CLASS2 \
CBDATA_CLASS_INIT \
CBDATA_NAMESPACED_CLASS_INIT \
- MEMPROXY_CLASS_INLINE \
MEMPROXY_CLASS \
- MEMPROXY_CLASS_INIT \
STUB \
STUB_NOP \
STUB_RETVAL
class ACLExternal : public ACL
{
-
-public:
MEMPROXY_CLASS(ACLExternal);
+public:
static void ExternalAclLookup(ACLChecklist * ch, ACLExternal *);
ACLExternal(char const *);
char const *class_;
};
-MEMPROXY_CLASS_INLINE(ACLExternal);
-
void parse_externalAclHelper(external_acl **);
void dump_externalAclHelper(StoreEntry * sentry, const char *name, const external_acl *);
void free_externalAclHelper(external_acl **);
/*******************************************************************
* external_acl cache entry
- * Used opaqueue in the interface
+ * Used opaque in the interface
*/
class ExternalACLEntry: public hash_link, public RefCountable
{
+ MEMPROXY_CLASS(ExternalACLEntry);
+
public:
ExternalACLEntry();
~ExternalACLEntry();
String tag;
String log;
external_acl *def;
-
- MEMPROXY_CLASS(ExternalACLEntry);
};
-MEMPROXY_CLASS_INLINE(ExternalACLEntry);
-
#endif
*/
class HttpHdrCc
{
+ MEMPROXY_CLASS(HttpHdrCc);
public:
static const int32_t MAX_AGE_UNKNOWN=-1; //max-age is unset
void packInto(Packer * p) const;
- MEMPROXY_CLASS(HttpHdrCc);
-
/** bit-mask representing what header values are set among those
* recognized by squid.
*
String other;
};
-MEMPROXY_CLASS_INLINE(HttpHdrCc);
-
class StatHist;
class StoreEntry;
class HttpHdrSc
{
+ MEMPROXY_CLASS(HttpHdrSc);
public:
HttpHdrSc(const HttpHdrSc &);
dlinkAddTail (t, &t->node, &targets);
}
- MEMPROXY_CLASS(HttpHdrSc);
dlink_list targets;
private:
HttpHdrScTarget * findTarget (const char *target);
};
-MEMPROXY_CLASS_INLINE(HttpHdrSc);
-
/* Http Surrogate Control Header Field */
void httpHdrScStatDumper(StoreEntry * sentry, int idx, double val, double size, int count);
void httpHdrScInitModule (void);
*/
class HttpHdrScTarget
{
+ MEMPROXY_CLASS(HttpHdrScTarget);
+
// parsing is done in HttpHdrSc, need to grant them access.
friend class HttpHdrSc;
public:
void packInto (Packer *p) const;
void updateStats(StatHist *) const;
- MEMPROXY_CLASS(HttpHdrScTarget);
private:
bool isSet(http_hdr_sc_type id) const {
assert (id >= SC_NO_STORE && id < SC_ENUM_END);
dlink_node node;
};
-MEMPROXY_CLASS_INLINE(HttpHdrScTarget);
-
void httpHdrScTargetStatDumper(StoreEntry * sentry, int idx, double val, double size, int count);
#endif /* SQUID_HTTPHDRSURROGATECONTROLTARGET_H */
class HttpHeaderEntry
{
+ MEMPROXY_CLASS(HttpHeaderEntry);
public:
HttpHeaderEntry(http_hdr_type id, const char *name, const char *value);
void packInto(Packer *p) const;
int getInt() const;
int64_t getInt64() const;
- MEMPROXY_CLASS(HttpHeaderEntry);
+
http_hdr_type id;
String name;
String value;
};
-MEMPROXY_CLASS_INLINE(HttpHeaderEntry);
-
class ETag;
class TimeOrTag;
class HttpHdrRangeSpec
{
+ MEMPROXY_CLASS(HttpHdrRangeSpec);
public:
- MEMPROXY_CLASS(HttpHdrRangeSpec);
typedef Range<int64_t, uint64_t> HttpRange;
static int64_t const UnknownPosition;
int64_t length;
};
-MEMPROXY_CLASS_INLINE(HttpHdrRangeSpec);
-
/**
* There may be more than one byte range specified in the request.
* This object holds all range specs in order of their appearence
*/
class HttpHdrRange
{
-
-public:
MEMPROXY_CLASS(HttpHdrRange);
+public:
static size_t ParsedCount;
/* Http Range Header Field */
static HttpHdrRange *ParseCreate(const String * range_spec);
int64_t clen;
};
-MEMPROXY_CLASS_INLINE(HttpHdrRange);
-
/**
* Data for iterating thru range specs
*/
class HttpReply: public HttpMsg
{
+ MEMPROXY_CLASS(HttpReply);
public:
typedef RefCount<HttpReply> Pointer;
- MEMPROXY_CLASS(HttpReply);
HttpReply();
~HttpReply();
virtual bool parseFirstLine(const char *start, const char *end);
};
-MEMPROXY_CLASS_INLINE(HttpReply);
-
#endif /* SQUID_HTTPREPLY_H */
class HttpRequest: public HttpMsg
{
+ MEMPROXY_CLASS(HttpRequest);
public:
typedef RefCount<HttpRequest> Pointer;
- MEMPROXY_CLASS(HttpRequest);
HttpRequest();
HttpRequest(const HttpRequestMethod& aMethod, AnyP::ProtocolType aProtocol, const char *aUrlpath);
~HttpRequest();
virtual bool inheritProperties(const HttpMsg *aMsg);
};
-MEMPROXY_CLASS_INLINE(HttpRequest);
-
#endif /* SQUID_HTTPREQUEST_H */
*/
class MemBlob: public RefCountable
{
+ MEMPROXY_CLASS(MemBlob);
+
public:
typedef RefCount<MemBlob> Pointer;
typedef uint32_t size_type;
- MEMPROXY_CLASS(MemBlob);
-
/// obtain a const view of class-wide statistics
static const MemBlobStats& GetStats();
MemBlob& operator =(const MemBlob &);
};
-MEMPROXY_CLASS_INLINE(MemBlob);
-
#endif /* SQUID_MEMBLOB_H_ */
class MemObject
{
+ MEMPROXY_CLASS(MemObject);
public:
static size_t inUseCount();
- MEMPROXY_CLASS(MemObject);
void dump() const;
MemObject();
DeferredReadManager deferredReads;
};
-MEMPROXY_CLASS_INLINE(MemObject);
-
/** global current memory removal policy */
extern RemovalPolicy *mem_policy;
*/
class Entry
{
+ MEMPROXY_CLASS(Entry);
public:
Entry(const char *aKey, const char *aValue): name(aKey), value(aValue) {}
String name;
String value;
- MEMPROXY_CLASS(Entry);
};
NotePairs() {}
NotePairs(NotePairs const &); // Not implemented
};
-MEMPROXY_CLASS_INLINE(NotePairs::Entry);
-
class AccessLogEntry;
/**
* Keep in sync HttpRequest and the corresponding AccessLogEntry objects
#ifndef SQUID_STOREMETAMD5_H
#define SQUID_STOREMETAMD5_H
-/* for inheritance */
#include "StoreMeta.h"
-/* for MEMPROXY_CLASS() macros */
#include "MemPool.h"
/* for STORE_META_KEY_MD5 */
#include "enums.h"
class StoreMetaMD5 : public StoreMeta
{
-
-public:
MEMPROXY_CLASS(StoreMetaMD5);
+public:
char getType() const {return STORE_META_KEY_MD5;}
bool validLength(int) const;
static int md5_mismatches;
};
-MEMPROXY_CLASS_INLINE(StoreMetaMD5);
-
#endif /* SQUID_STOREMETAMD5_H */
class StoreMetaObjSize : public StoreMeta
{
-
-public:
MEMPROXY_CLASS(StoreMetaObjSize);
+public:
char getType() const {return STORE_META_OBJSIZE;}
};
-MEMPROXY_CLASS_INLINE(StoreMetaObjSize);
-
#endif /* SQUID_STOREMETAOBJSIZE_H */
#define SQUID_STOREMETASTD_H
#include "StoreMeta.h"
-/* for MEMPROXY_CLASS() macros */
#include "MemPool.h"
class StoreMetaSTD : public StoreMeta
{
-
-public:
MEMPROXY_CLASS(StoreMetaSTD);
+public:
char getType() const {return STORE_META_STD;}
bool validLength(int) const;
// bool checkConsistency(StoreEntry *) const;
};
-MEMPROXY_CLASS_INLINE(StoreMetaSTD);
-
#endif /* SQUID_STOREMETASTD_H */
#ifndef SQUID_STOREMETASTDLFS_H
#define SQUID_STOREMETASTDLFS_H
-/* for inheritance */
#include "StoreMeta.h"
-/* for MEMPROXY() macros */
#include "MemPool.h"
class StoreMetaSTDLFS : public StoreMeta
{
-public:
MEMPROXY_CLASS(StoreMetaSTDLFS);
+public:
char getType() const {return STORE_META_STD_LFS;}
bool validLength(int) const;
// bool checkConsistency(StoreEntry *) const;
};
-MEMPROXY_CLASS_INLINE(StoreMetaSTDLFS);
-
#endif /* SQUID_STOREMETASTDLFS_H */
#ifndef SQUID_STOREMETAURL_H
#define SQUID_STOREMETAURL_H
-/* for inheritance */
#include "StoreMeta.h"
-/* for MEMPROXY_CLASS() macros */
#include "MemPool.h"
class StoreMetaURL : public StoreMeta
{
-public:
MEMPROXY_CLASS(StoreMetaURL);
+public:
char getType() const {return STORE_META_URL;}
bool checkConsistency(StoreEntry *) const;
};
-MEMPROXY_CLASS_INLINE(StoreMetaURL);
-
#endif /* SQUID_STOREMETAURL_H */
#ifndef SQUID_STOREMETAVARY_H
#define SQUID_STOREMETAVARY_H
-/* for inheritance */
#include "StoreMeta.h"
-/* for MEMPROXY_CLASS() macros */
#include "MemPool.h"
class StoreMetaVary : public StoreMeta
{
-public:
MEMPROXY_CLASS(StoreMetaVary);
+public:
char getType() const {return STORE_META_VARY_HEADERS;}
bool checkConsistency(StoreEntry *) const;
};
-MEMPROXY_CLASS_INLINE(StoreMetaVary);
-
#endif /* SQUID_STOREMETAVARY_H */
*/
class StoreSwapLogData
{
-
-public:
MEMPROXY_CLASS(StoreSwapLogData);
+public:
/// type to use for storing time-related members; must be signed
typedef int64_t SwappedTime;
unsigned char key[SQUID_MD5_DIGEST_LENGTH];
};
-MEMPROXY_CLASS_INLINE(StoreSwapLogData);
-
/// \ingroup FileFormatSwapStateAPI
/// Swap log starts with this binary structure.
class StoreSwapLogHeader
#include "MemPool.h"
/**
- \ingroup POD
- *
* The URL class represents a Uniform Resource Location
*/
class URL
{
-public:
MEMPROXY_CLASS(URL);
+
+public:
URL() : scheme_() {}
URL(AnyP::UriScheme const &aScheme) : scheme_(aScheme) {}
AnyP::UriScheme scheme_;
};
-MEMPROXY_CLASS_INLINE(URL);
-
class HttpRequest;
class HttpRequestMethod;
/// \ingroup ACLAPI
class acl_proxy_auth_match_cache
{
+ MEMPROXY_CLASS(acl_proxy_auth_match_cache);
public:
- MEMPROXY_CLASS(acl_proxy_auth_match_cache);
dlink_node link;
int matchrv;
void *acl_data;
};
-MEMPROXY_CLASS_INLINE(acl_proxy_auth_match_cache);
-
/// \ingroup ACLAPI
/// XXX: find a way to remove or at least use a refcounted ACL pointer
extern const char *AclMatchedName; /* NULL */
/// acl all-of lines are always ORed together.
class AllOf: public Acl::InnerNode
{
-public:
MEMPROXY_CLASS(AllOf);
+public:
/* ACL API */
virtual char const *typeString() const;
virtual ACL *clone() const;
static Prototype RegistryProtoype;
static AllOf RegistryEntry_;
};
-MEMPROXY_CLASS_INLINE(Acl::AllOf);
} // namespace Acl
/// Configurable any-of ACL. Each ACL line is a disjuction of ACLs.
class AnyOf: public Acl::OrNode
{
-public:
MEMPROXY_CLASS(AnyOf);
+public:
/* ACL API */
virtual char const *typeString() const;
virtual ACL *clone() const;
static Prototype RegistryProtoype;
static AnyOf RegistryEntry_;
};
-MEMPROXY_CLASS_INLINE(Acl::AnyOf);
} // namespace Acl
/// \ingroup ACLAPI
class ACLARP : public ACL
{
-
-public:
MEMPROXY_CLASS(ACLARP);
+public:
ACLARP(char const *);
ACLARP(ACLARP const &);
~ACLARP();
char const *class_;
};
-MEMPROXY_CLASS_INLINE(ACLARP);
-
#endif /* SQUID_ACLARP_H */
/// \ingroup ACLAPI
class ACLASN : public ACLData<Ip::Address>
{
-
-public:
MEMPROXY_CLASS(ACLASN);
+public:
virtual ~ACLASN();
virtual bool match(Ip::Address);
CbDataList<int> *data;
};
-MEMPROXY_CLASS_INLINE(ACLASN);
-
#endif /* SQUID_ACLASN_H */
class ACLAtStepData : public ACLData<Ssl::BumpStep>
{
-
-public:
MEMPROXY_CLASS(ACLAtStepData);
+public:
ACLAtStepData();
ACLAtStepData(ACLAtStepData const &);
ACLAtStepData &operator= (ACLAtStepData const &);
std::list<Ssl::BumpStep> values;
};
-MEMPROXY_CLASS_INLINE(ACLAtStepData);
-
#endif /* USE_OPENSSL */
#endif /* SQUID_ACLSSL_ERRORDATA_H */
/// Implements the "not" or "!" operator.
class NotNode: public InnerNode
{
-public:
MEMPROXY_CLASS(NotNode);
+public:
explicit NotNode(ACL *acl);
private:
/* Acl::InnerNode API */
virtual int doMatch(ACLChecklist *checklist, Nodes::const_iterator start) const;
};
-MEMPROXY_CLASS_INLINE(Acl::NotNode);
/// An inner ACL expression tree node representing a boolean conjuction (AND)
/// operator applied to a list of child tree nodes.
/// For example, conditions expressed on a single http_access line are ANDed.
class AndNode: public InnerNode
{
-public:
MEMPROXY_CLASS(AndNode);
+public:
/* ACL API */
virtual char const *typeString() const;
virtual ACL *clone() const;
private:
virtual int doMatch(ACLChecklist *checklist, Nodes::const_iterator start) const;
};
-MEMPROXY_CLASS_INLINE(Acl::AndNode);
/// An inner ACL expression tree node representing a boolean disjuction (OR)
/// operator applied to a list of child tree nodes.
/// For example, conditions expressed by multiple http_access lines are ORed.
class OrNode: public InnerNode
{
-public:
MEMPROXY_CLASS(OrNode);
+public:
/* ACL API */
virtual char const *typeString() const;
virtual ACL *clone() const;
private:
virtual int doMatch(ACLChecklist *checklist, Nodes::const_iterator start) const;
};
-MEMPROXY_CLASS_INLINE(Acl::OrNode);
} // namespace Acl
/// \ingroup ACLAPI
class ACLCertificateData : public ACLData<X509 *>
{
-
-public:
MEMPROXY_CLASS(ACLCertificateData);
+public:
ACLCertificateData(Ssl::GETX509ATTRIBUTE *, const char *attributes, bool optionalAttr = false);
ACLCertificateData(ACLCertificateData const &);
ACLCertificateData &operator= (ACLCertificateData const &);
Ssl::GETX509ATTRIBUTE *sslAttributeCall;
};
-MEMPROXY_CLASS_INLINE(ACLCertificateData);
-
#endif /* SQUID_ACLCERTIFICATEDATA_H */
#ifndef SQUID_ACLDESTINATIONIP_H
#define SQUID_ACLDESTINATIONIP_H
+
#include "acl/Checklist.h"
#include "acl/Ip.h"
#include "ipcache.h"
class ACLDestinationIP : public ACLIP
{
-
-public:
MEMPROXY_CLASS(ACLDestinationIP);
+public:
ACLDestinationIP(): ACLIP(ACLDestinationIP::SupportedFlags) {}
virtual char const *typeString() const;
virtual int match(ACLChecklist *checklist);
static ACLDestinationIP RegistryEntry_;
};
-MEMPROXY_CLASS_INLINE(ACLDestinationIP);
-
#endif /* SQUID_ACLDESTINATIONIP_H */
#include "acl/Data.h"
#include "splay.h"
-/// \ingroup ACLAPI
class ACLDomainData : public ACLData<char const *>
{
-
-public:
MEMPROXY_CLASS(ACLDomainData);
+public:
virtual ~ACLDomainData();
bool match(char const *);
virtual SBufList dump() const;
SplayNode<char *> *domains;
};
-MEMPROXY_CLASS_INLINE(ACLDomainData);
-
#endif /* SQUID_ACLDOMAINDATA_H */
class Eui64;
};
-/// \ingroup ACLAPI
class ACLEui64 : public ACL
{
+ MEMPROXY_CLASS(ACLEui64);
public:
- MEMPROXY_CLASS(ACLEUI64);
-
ACLEui64(char const *);
ACLEui64(ACLEui64 const &);
~ACLEui64();
char const *class_;
};
-MEMPROXY_CLASS_INLINE(ACLEui64);
-
#endif /* SQUID_ACLEUI64_H */
#include "acl/Checklist.h"
#include "acl/Data.h"
-/// \ingroup ACLAPI
class ACLExtUser : public ACL
{
-
-public:
MEMPROXY_CLASS(ACLExtUser);
+public:
ACLExtUser(ACLData<char const *> *newData, char const *);
ACLExtUser (ACLExtUser const &old);
ACLExtUser & operator= (ACLExtUser const &rhs);
char const *type_;
};
-MEMPROXY_CLASS_INLINE(ACLExtUser);
-
#endif /* USE_AUTH */
#endif /* SQUID_EXTUSER_H */
/// \ingroup ACLAPI
class ACLHierCodeData : public ACLData<hier_code>
{
-
-public:
MEMPROXY_CLASS(ACLHierCodeData);
+public:
ACLHierCodeData();
ACLHierCodeData(ACLHierCodeData const &);
ACLHierCodeData &operator= (ACLHierCodeData const &);
bool values[HIER_MAX];
};
-MEMPROXY_CLASS_INLINE(ACLHierCodeData);
-
#endif /* SQUID_ACLHIERCODEDATA_H */
#ifndef SQUID_ACLHTTPHEADERDATA_H
#define SQUID_ACLHTTPHEADERDATA_H
-class HttpHeader;
-class wordlist;
-
-/* becaue we inherit from it */
#include "acl/Data.h"
-/* for String field */
#include "SquidString.h"
-/* for http_hdr_type field */
#include "HttpHeader.h"
-/* because weuse its MEMPROXY_CLASS() macros */
#include "MemPool.h"
-/// \ingroup ACLAPI
class ACLHTTPHeaderData : public ACLData<HttpHeader*>
{
-
-public:
MEMPROXY_CLASS(ACLHTTPHeaderData);
+public:
ACLHTTPHeaderData();
virtual ~ACLHTTPHeaderData();
virtual bool match(HttpHeader* hdr);
ACLData<char const *> * regex_rule;
};
-MEMPROXY_CLASS_INLINE(ACLHTTPHeaderData);
-
#endif /* SQUID_ACLHTTPHEADERDATA_H */
/// \ingroup ACLAPI
class ACLHTTPStatus : public ACL
{
-
-public:
MEMPROXY_CLASS(ACLHTTPStatus);
+public:
ACLHTTPStatus(char const *);
ACLHTTPStatus(ACLHTTPStatus const &);
~ACLHTTPStatus();
char const *class_;
};
-MEMPROXY_CLASS_INLINE(ACLHTTPStatus);
-
#endif /* SQUID_ACLHTTPSTATUS_H */
#include "ip/Address.h"
#include "splay.h"
-/// \ingroup ACLAPI
class acl_ip_data
{
+ MEMPROXY_CLASS(acl_ip_data);
public:
- MEMPROXY_CLASS(acl_ip_data);
static acl_ip_data *FactoryParse(char const *);
static int NetworkCompare(acl_ip_data * const & a, acl_ip_data * const &b);
static bool DecodeMask(const char *asc, Ip::Address &mask, int string_format_type);
};
-MEMPROXY_CLASS_INLINE(acl_ip_data);
-
-/// \ingroup ACLAPI
class ACLIP : public ACL
{
-
public:
void *operator new(size_t);
void operator delete(void *);
/// \ingroup ACLAPI
class ACLLocalIP : public ACLIP
{
+ MEMPROXY_CLASS(ACLLocalIP);
public:
- MEMPROXY_CLASS(ACLLocalIP);
static ACLLocalIP const &RegistryEntry();
virtual char const *typeString() const;
static ACLLocalIP RegistryEntry_;
};
-MEMPROXY_CLASS_INLINE(ACLLocalIP);
-
#endif /* SQUID_ACLLOCALIP_H */
/// \ingroup ACLAPI
class ACLMaxConnection : public ACL
{
-
-public:
MEMPROXY_CLASS(ACLMaxConnection);
+public:
ACLMaxConnection(char const *);
ACLMaxConnection(ACLMaxConnection const &);
~ACLMaxConnection();
int limit;
};
-MEMPROXY_CLASS_INLINE(ACLMaxConnection);
-
#endif /* SQUID_ACLMAXCONNECTION_H */
#include "CbDataList.h"
#include "HttpRequestMethod.h"
-/// \ingroup ACLAPI
class ACLMethodData : public ACLData<HttpRequestMethod>
{
-
-public:
MEMPROXY_CLASS(ACLMethodData);
+public:
ACLMethodData();
ACLMethodData(ACLMethodData const &);
ACLMethodData &operator= (ACLMethodData const &);
static int ThePurgeCount; ///< PURGE methods seen by parse()
};
-MEMPROXY_CLASS_INLINE(ACLMethodData);
-
#endif /* SQUID_ACLMETHODDATA_H */
/// \ingroup ACLAPI
class ACLNoteData : public ACLData<HttpRequest *>
{
-public:
MEMPROXY_CLASS(ACLNoteData);
+public:
ACLNoteData();
virtual ~ACLNoteData();
virtual bool match(HttpRequest* request);
ACLData<char const *> *values; ///< if set, at least one value must match
};
-MEMPROXY_CLASS_INLINE(ACLNoteData);
-
#endif /* SQUID_ACLNOTEDATA_H */
class ACLProtocolData : public ACLData<AnyP::ProtocolType>
{
-
-public:
MEMPROXY_CLASS(ACLProtocolData);
+public:
ACLProtocolData();
ACLProtocolData(ACLProtocolData const &);
ACLProtocolData &operator= (ACLProtocolData const &);
CbDataList<AnyP::ProtocolType> *values;
};
-MEMPROXY_CLASS_INLINE(ACLProtocolData);
-
#endif /* SQUID_ACLPROTOCOLDATA_H */
#include "acl/Acl.h"
#include "acl/Checklist.h"
-/// \ingroup ACLAPI
class ACLRandom : public ACL
{
-
-public:
MEMPROXY_CLASS(ACLRandom);
+public:
ACLRandom(char const *);
ACLRandom(ACLRandom const &);
~ACLRandom();
char const *class_;
};
-MEMPROXY_CLASS_INLINE(ACLRandom);
-
#endif /* SQUID_ACL_RANDOM_H */
class ACLRegexData : public ACLData<char const *>
{
-
-public:
MEMPROXY_CLASS(ACLRegexData);
+public:
virtual ~ACLRegexData();
virtual bool match(char const *user);
virtual SBufList dump() const;
RegexList *data;
};
-MEMPROXY_CLASS_INLINE(ACLRegexData);
-
#endif /* SQUID_ACLREGEXDATA_H */
#ifndef SQUID_ACLSOURCEIP_H
#define SQUID_ACLSOURCEIP_H
+
#include "acl/Ip.h"
class ACLSourceIP : public ACLIP
{
-
-public:
MEMPROXY_CLASS(ACLSourceIP);
+public:
virtual char const *typeString() const;
virtual int match(ACLChecklist *checklist);
virtual ACL *clone()const;
static ACLSourceIP RegistryEntry_;
};
-MEMPROXY_CLASS_INLINE(ACLSourceIP);
-
#endif /* SQUID_ACLSOURCEIP_H */
#ifndef SQUID_ACLSSL_ERRORDATA_H
#define SQUID_ACLSSL_ERRORDATA_H
+
#include "acl/Acl.h"
#include "acl/Data.h"
#include "CbDataList.h"
class ACLSslErrorData : public ACLData<const Ssl::CertErrors *>
{
-
-public:
MEMPROXY_CLASS(ACLSslErrorData);
+public:
ACLSslErrorData();
ACLSslErrorData(ACLSslErrorData const &);
ACLSslErrorData &operator= (ACLSslErrorData const &);
Ssl::Errors *values;
};
-MEMPROXY_CLASS_INLINE(ACLSslErrorData);
-
#endif /* SQUID_ACLSSL_ERRORDATA_H */
#ifndef SQUID_ACLSTRINGDATA_H
#define SQUID_ACLSTRINGDATA_H
+
#include "acl/Acl.h"
#include "acl/Data.h"
#include "splay.h"
class ACLStringData : public ACLData<char const *>
{
-
-public:
MEMPROXY_CLASS(ACLStringData);
+public:
ACLStringData();
ACLStringData(ACLStringData const &);
ACLStringData &operator= (ACLStringData const &);
SplayNode<char *> *values;
};
-/* TODO move into .cci files */
-
-MEMPROXY_CLASS_INLINE(ACLStringData);
-
#endif /* SQUID_ACLSTRINGDATA_H */
#ifndef SQUID_ACLTIMEDATA_H
#define SQUID_ACLTIMEDATA_H
+
#include "acl/Acl.h"
#include "acl/Data.h"
#include "splay.h"
class ACLTimeData : public ACLData<time_t>
{
-
-public:
MEMPROXY_CLASS(ACLTimeData);
+public:
ACLTimeData();
ACLTimeData(ACLTimeData const &);
ACLTimeData&operator=(ACLTimeData const &);
ACLTimeData *next;
};
-MEMPROXY_CLASS_INLINE(ACLTimeData);
-
#endif /* SQUID_ACLTIMEDATA_H */
#ifndef SQUID_ACLUSERDATA_H
#define SQUID_ACLUSERDATA_H
+
#include "acl/Acl.h"
#include "acl/Data.h"
#include "splay.h"
class ACLUserData : public ACLData<char const *>
{
-
-public:
MEMPROXY_CLASS(ACLUserData);
+public:
virtual ~ACLUserData();
bool match(char const *user);
virtual SBufList dump() const;
} flags;
};
-MEMPROXY_CLASS_INLINE(ACLUserData);
-
#endif /* SQUID_ACLUSERDATA_H */
#include "acl/Checklist.h"
#include "auth/UserRequest.h"
-/// \ingroup ACLAPI
class ACLMaxUserIP : public ACL
{
-public:
MEMPROXY_CLASS(ACLMaxUserIP);
+public:
ACLMaxUserIP(char const *theClass);
ACLMaxUserIP(ACLMaxUserIP const &old);
~ACLMaxUserIP();
int maximum;
};
-MEMPROXY_CLASS_INLINE(ACLMaxUserIP);
-
#endif /* USE_AUTH */
#endif /* SQUID_ACLMAXUSERIP_H */
class ACLProxyAuth : public ACL
{
-public:
MEMPROXY_CLASS(ACLProxyAuth);
+public:
~ACLProxyAuth();
ACLProxyAuth(ACLData<char const *> *, char const *);
ACLProxyAuth(ACLProxyAuth const &);
char const *type_;
};
-MEMPROXY_CLASS_INLINE(ACLProxyAuth);
-
#endif /* USE_AUTH */
#endif /* SQUID_ACLPROXYAUTH_H */
*/
class AuthUserHashPointer : public hash_link
{
- /* first two items must be same as hash_link */
-
-public:
MEMPROXY_CLASS(AuthUserHashPointer);
+public:
AuthUserHashPointer(Auth::User::Pointer);
~AuthUserHashPointer() { auth_user = NULL; };
Auth::User::Pointer auth_user;
};
-MEMPROXY_CLASS_INLINE(AuthUserHashPointer);
-
namespace Auth
{
class Scheme;
*/
class QueueNode
{
+ MEMPROXY_CLASS(Auth::QueueNode);
private:
// we store CBDATA here, copy is not safe
Auth::UserRequest::Pointer auth_user_request;
AUTHCB *handler;
void *data;
-
- MEMPROXY_CLASS(Auth::QueueNode);
};
-MEMPROXY_CLASS_INLINE(Auth::QueueNode);
-
} // namespace Auth
#endif /* SQUID_SRC_AUTH_QUEUENODE_H */
*/
class AuthUserIP
{
+ MEMPROXY_CLASS(AuthUserIP);
+
public:
AuthUserIP(const Ip::Address &ip, time_t t) : ipaddr(ip), ip_expiretime(t) {}
* (user,IP) pair plus authenticate_ip_ttl seconds
*/
time_t ip_expiretime;
-
- MEMPROXY_CLASS(AuthUserIP);
};
-MEMPROXY_CLASS_INLINE(AuthUserIP);
-
// TODO: make auth schedule AsyncCalls?
typedef void AUTHCB(void*);
/** User credentials for the Basic authentication protocol */
class User : public Auth::User
{
-public:
MEMPROXY_CLASS(Auth::Basic::User);
+public:
User(Auth::Config *, const char *requestRealm);
~User();
bool authenticated() const;
Auth::UserRequest::Pointer currentRequest;
};
-MEMPROXY_CLASS_INLINE(Auth::Basic::User);
-
} // namespace Basic
} // namespace Auth
class UserRequest : public Auth::UserRequest
{
-public:
MEMPROXY_CLASS(Auth::Basic::UserRequest);
+public:
UserRequest() {}
virtual ~UserRequest() { assert(LockCount()==0); }
} // namespace Basic
} // namespace Auth
-MEMPROXY_CLASS_INLINE(Auth::Basic::UserRequest);
-
#endif /* _SQUID_SRC_AUTH_BASIC_USERREQUEST_H */
/** User credentials for the Digest authentication protocol */
class User : public Auth::User
{
-public:
MEMPROXY_CLASS(Auth::Digest::User);
+public:
User(Auth::Config *, const char *requestRealm);
~User();
int authenticated() const;
digest_nonce_h * currentNonce();
};
-MEMPROXY_CLASS_INLINE(Auth::Digest::User);
-
} // namespace Digest
} // namespace Auth
*/
class UserRequest : public Auth::UserRequest
{
-
-public:
MEMPROXY_CLASS(Auth::Digest::UserRequest);
+public:
UserRequest();
virtual ~UserRequest();
} // namespace Digest
} // namespace Auth
-MEMPROXY_CLASS_INLINE(Auth::Digest::UserRequest);
-
#endif /* _SQUID_SRC_AUTH_DIGEST_USERREQUEST_H */
/** User credentials for the Negotiate authentication protocol */
class User : public Auth::User
{
-public:
MEMPROXY_CLASS(Auth::Negotiate::User);
+
+public:
User(Auth::Config *, const char *requestRealm);
~User();
virtual int32_t ttl() const;
dlink_list proxy_auth_list;
};
-MEMPROXY_CLASS_INLINE(Auth::Negotiate::User);
-
} // namespace Negotiate
} // namespace Auth
/// \ingroup AuthNegotiateAPI
class UserRequest : public Auth::UserRequest
{
-
-public:
MEMPROXY_CLASS(Auth::Negotiate::UserRequest);
+public:
UserRequest();
virtual ~UserRequest();
virtual int authenticated() const;
} // namespace Negotiate
} // namespace Auth
-MEMPROXY_CLASS_INLINE(Auth::Negotiate::UserRequest);
-
#endif /* _SQUID_SRC_AUTH_NEGOTIATE_USERREQUEST_H */
/** User credentials for the NTLM authentication protocol */
class User : public Auth::User
{
-public:
MEMPROXY_CLASS(Auth::Ntlm::User);
+
+public:
User(Auth::Config *, const char *requestRealm);
~User();
dlink_list proxy_auth_list;
};
-MEMPROXY_CLASS_INLINE(Auth::Ntlm::User);
-
} // namespace Ntlm
} // namespace Auth
class UserRequest : public Auth::UserRequest
{
-
-public:
MEMPROXY_CLASS(Auth::Ntlm::UserRequest);
+public:
UserRequest();
virtual ~UserRequest();
virtual int authenticated() const;
} // namespace Ntlm
} // namespace Auth
-MEMPROXY_CLASS_INLINE(Auth::Ntlm::UserRequest);
-
#endif /* _SQUID_SRC_AUTH_NTLM_USERREQUEST_H */
/// \ingroup CBDATAInternal
class cbdata
{
+#if !HASHED_CBDATA
+public:
+ void *operator new(size_t size, void *where);
+ void operator delete(void *where, void *where2);
+#else
+ MEMPROXY_CLASS(cndata);
+#endif
+
/** \todo examine making cbdata templated on this - so we get type
* safe access to data - RBC 20030902 */
public:
void dump(StoreEntry *)const;
#endif
-#if !HASHED_CBDATA
- void *operator new(size_t size, void *where);
- void operator delete(void *where, void *where2);
-#else
- MEMPROXY_CLASS(cndata);
-#endif
-
~cbdata();
int valid;
int32_t locks;
void **dataOffset = &zero->data;
return (long)dataOffset;
}
-#else
-MEMPROXY_CLASS_INLINE(cbdata);
#endif
static OBJH cbdataDump;
*/
class Connection : public RefCountable
{
-public:
MEMPROXY_CLASS(Comm::Connection);
+public:
Connection();
/** Clear the connection properties and close any open socket. */
}; // namespace Comm
-MEMPROXY_CLASS_INLINE(Comm::Connection);
-
// NP: Order and namespace here is very important.
// * The second define inlines the first.
// * Stream inheritance overloading is searched in the global scope first.
#include "esi/VarState.h"
#include "SquidString.h"
-/* ESIVariableExpression */
-/* This is a variable that is itself and expression */
-
+/** This is a variable that is itself an expression */
class ESIVariableExpression : public ESIVarState::Variable
{
-
public:
~ESIVariableExpression();
ESIVariableExpression (String const &value);
String expression;
};
-/* ESIAssign */
-
class ESIContext;
class ESIAssign : public ESIElement
{
+ MEMPROXY_CLASS(ESIAssign);
public:
- MEMPROXY_CLASS(ESIAssign);
ESIAssign (esiTreeParentPtr, int, const char **, ESIContext *);
ESIAssign (ESIAssign const &);
ESIAssign &operator=(ESIAssign const &);
String unevaluatedVariable;
};
-MEMPROXY_CLASS_INLINE(ESIAssign);
-
#endif /* SQUID_ESIASSIGN_H */
/* some core operators */
-/* esiComment */
-
-struct esiComment : public ESIElement {
+class esiComment : public ESIElement
+{
MEMPROXY_CLASS(esiComment);
+
+public:
~esiComment();
esiComment();
Pointer makeCacheable() const;
void finish();
};
-MEMPROXY_CLASS_INLINE(esiComment);
-
#include "esi/Literal.h"
#include "esi/Sequence.h"
static FREE esiRemoveFree;
static ESIElement * esiRemoveNew(void);
-/* esiTry */
-
-struct esiTry : public ESIElement {
+class esiTry : public ESIElement
+{
MEMPROXY_CLASS(esiTry);
+public:
esiTry(esiTreeParentPtr aParent);
~esiTry();
esiProcessResult_t bestAttemptRV() const;
};
-MEMPROXY_CLASS_INLINE(esiTry);
-
#include "esi/Var.h"
-/* esiChoose */
-
-struct esiChoose : public ESIElement {
+class esiChoose : public ESIElement
+{
MEMPROXY_CLASS(esiChoose);
+public:
esiChoose(esiTreeParentPtr);
~esiChoose();
void selectElement();
};
-MEMPROXY_CLASS_INLINE(esiChoose);
-
-/* esiWhen */
-
-struct esiWhen : public esiSequence {
+class esiWhen : public esiSequence
+{
MEMPROXY_CLASS(esiWhen);
+
+public:
esiWhen(esiTreeParentPtr aParent, int attributes, const char **attr, ESIVarState *);
~esiWhen();
Pointer makeCacheable() const;
void evaluate();
};
-MEMPROXY_CLASS_INLINE(esiWhen);
-
-/* esiOtherwise */
-
struct esiOtherwise : public esiSequence {
// void *operator new (size_t byteCount);
// void operator delete (void *address);
CBDATA_CLASS2(ESIStreamContext);
};
-/* ESIInclude */
-
class ESIInclude : public ESIElement
{
-
-public:
MEMPROXY_CLASS(ESIInclude);
+public:
ESIInclude(esiTreeParentPtr, int attributes, const char **attr, ESIContext *);
~ESIInclude();
void render(ESISegment::Pointer);
void prepareRequestHeaders(HttpHeader &tempheaders, ESIVarState *vars);
};
-MEMPROXY_CLASS_INLINE(ESIInclude);
-
#endif /* SQUID_ESIINCLUDE_H */
#include "esi/Element.h"
class ESIContext;
-/* esiLiteral */
-struct esiLiteral : public ESIElement {
+class esiLiteral : public ESIElement
+{
MEMPROXY_CLASS(esiLiteral);
+public:
esiLiteral(ESISegment::Pointer);
esiLiteral(ESIContext *, const char *s, int len);
~esiLiteral();
esiLiteral(esiLiteral const &);
};
-MEMPROXY_CLASS_INLINE(esiLiteral);
-
#endif /* SQUID_ESILITERAL_H */
class esiSequence : public ESIElement
{
-
-public:
MEMPROXY_CLASS(esiSequence);
+public:
esiSequence(esiTreeParentPtr, bool = false);
~esiSequence();
void processStep(int dovars);
};
-MEMPROXY_CLASS_INLINE(esiSequence);
-
#endif /* SQUID_ESISEQUENCE_H */
class ev_entry
{
+ MEMPROXY_CLASS(ev_entry);
public:
ev_entry(char const * name, EVH * func, void *arg, double when, int weight, bool cbdata=true);
~ev_entry();
- MEMPROXY_CLASS(ev_entry);
const char *name;
EVH *func;
void *arg;
ev_entry *next;
};
-MEMPROXY_CLASS_INLINE(ev_entry);
-
// manages time-based events
class EventScheduler : public AsyncEngine
{
class external_acl_format : public RefCountable
{
+ MEMPROXY_CLASS(external_acl_format);
+
public:
typedef RefCount<external_acl_format> Pointer;
- MEMPROXY_CLASS(external_acl_format);
external_acl_format() : type(Format::LFT_NONE), header(NULL), member(NULL), separator(' '), header_id(HDR_BAD_HDR) {}
~external_acl_format() {
http_hdr_type header_id;
};
-MEMPROXY_CLASS_INLINE(external_acl_format);
-
class external_acl
{
/// \ingroup Rock
class IoState: public ::StoreIOState
{
+ MEMPROXY_CLASS(IoState);
+
public:
typedef RefCount<IoState> Pointer;
/// called by SwapDir::writeCompleted() after the last write and on error
void finishedWriting(const int errFlag);
- MEMPROXY_CLASS(IoState);
-
/* one and only one of these will be set and locked; access via *Anchor() */
const Ipc::StoreMapAnchor *readableAnchor_; ///< starting point for reading
Ipc::StoreMapAnchor *writeableAnchor_; ///< starting point for writing
MemBlob theBuf; // use for write content accumulation only
};
-MEMPROXY_CLASS_INLINE(IoState);
-
} // namespace Rock
#endif /* SQUID_FS_ROCK_IO_STATE_H */
class _queued_read
{
- public:
MEMPROXY_CLASS(UFSStoreState::_queued_read);
+ public:
char *buf;
size_t size;
off_t offset;
class _queued_write
{
- public:
MEMPROXY_CLASS(UFSStoreState::_queued_write);
+ public:
char const *buf;
size_t size;
off_t offset;
CBDATA_CLASS2(UFSStoreState);
};
-MEMPROXY_CLASS_INLINE(UFSStoreState::_queued_read);
-MEMPROXY_CLASS_INLINE(UFSStoreState::_queued_write);
-
} //namespace Ufs
} //namespace Fs
class Request
{
+ MEMPROXY_CLASS(Helper::Request);
+
public:
Request(HLPCB *c, void *d, const char *b) :
buf(b ? xstrdup(b) : NULL),
xfree(buf);
}
- MEMPROXY_CLASS(Helper::Request);
char *buf;
HLPCB *callback;
void *data;
} // namespace Helper
-MEMPROXY_CLASS_INLINE(Helper::Request);
-
#endif /* _SQUID_SRC_HELPER_REQUEST_H */
class htcpSpecifier : public StoreClient
{
-
-public:
MEMPROXY_CLASS(htcpSpecifier);
+public:
void created (StoreEntry *newEntry);
void checkHit();
void checkedHit(StoreEntry *e);
htcpDataHeader *dhdr;
};
-MEMPROXY_CLASS_INLINE(htcpSpecifier);
-
struct _htcpDetail {
char *resp_hdrs;
char *entity_hdrs;
/// \ingroup ACLAPI
class ACLIdent : public ACL
{
-
-public:
MEMPROXY_CLASS(ACLIdent);
+public:
ACLIdent(ACLData<char const *> *newData, char const *);
ACLIdent (ACLIdent const &old);
ACLIdent & operator= (ACLIdent const &rhs);
char const *type_;
};
-MEMPROXY_CLASS_INLINE(ACLIdent);
-
#endif /* USE_IDENT */
#endif /* SQUID_IDENT_ACLIDENT_H */
class mem_node
{
+ MEMPROXY_CLASS(mem_node);
public:
static size_t InUseCount();
static size_t StoreMemSize();
- MEMPROXY_CLASS(mem_node);
mem_node(int64_t);
~mem_node();
size_t space() const;
bool write_pending;
};
-MEMPROXY_CLASS_INLINE(mem_node);
-
inline std::ostream &
operator << (std::ostream &os, mem_node &aNode)
{
class MimeIcon : public StoreClient
{
+ MEMPROXY_CLASS(MimeIcon);
+
public:
explicit MimeIcon(const char *aName);
~MimeIcon();
char const * getName() const;
void load();
void created(StoreEntry *newEntry);
- MEMPROXY_CLASS(MimeIcon);
private:
const char *icon_;
char *url_;
};
-MEMPROXY_CLASS_INLINE(MimeIcon);
class MimeEntry
{
+ MEMPROXY_CLASS(MimeEntry);
+
public:
explicit MimeEntry(const char *aPattern, const regex_t &compiledPattern,
const char *aContentType,
bool optionViewEnable, bool optionDownloadEnable,
const char *anIconName);
~MimeEntry();
- MEMPROXY_CLASS(MimeEntry);
const char *pattern;
regex_t compiled_pattern;
MimeIcon theIcon;
MimeEntry *next;
};
-MEMPROXY_CLASS_INLINE(MimeEntry);
static MimeEntry *MimeTable = NULL;
static MimeEntry **MimeTableTail = &MimeTable;
class CapturingStoreEntry : public StoreEntry
{
-
-public:
MEMPROXY_CLASS(CapturingStoreEntry);
+public:
CapturingStoreEntry() : _buffer_calls(0), _flush_calls(0) {}
String _appended_text;
}
};
-MEMPROXY_CLASS_INLINE(CapturingStoreEntry);
-
#endif
// ev_entry::ev_entry(char const * name, EVH * func, void *arg, double when, int weight, bool cbdata) STUB
// ev_entry::~ev_entry() STUB
-// MEMPROXY_CLASS(ev_entry);
// EVH *func;
-//MEMPROXY_CLASS_INLINE(ev_entry);
-
EventScheduler::EventScheduler() STUB
EventScheduler::~EventScheduler() STUB
void EventScheduler::cancel(EVH * func, void * arg) STUB
*/
class wordlist
{
-public:
MEMPROXY_CLASS(wordlist);
+
+public:
char *key;
wordlist *next;
};
-MEMPROXY_CLASS_INLINE(wordlist);
-
class MemBuf;
/** Add a null-terminated c-string to a wordlist