/*
- * $Id: ACLARP.cc,v 1.13 2005/05/06 01:57:55 hno Exp $
+ * $Id: ACLARP.cc,v 1.14 2005/05/08 06:36:45 hno Exp $
*
* DEBUG: section 28 Access Control
* AUTHOR: Duane Wessels
bool
ACLARP::empty () const
{
- return data != NULL;
+ return data == NULL;
}
/* ==== BEGIN ARP ACL SUPPORT ============================================= */
/*
- * $Id: ACLCertificateData.cc,v 1.7 2004/08/30 05:12:31 robertc Exp $
+ * $Id: ACLCertificateData.cc,v 1.8 2005/05/08 06:36:45 hno Exp $
*
* DEBUG: section 28 Access Control
* AUTHOR: Duane Wessels
values.parse();
}
+bool
+ACLCertificateData::empty() const
+{
+ return values.empty();
+}
ACLData<SSL *> *
ACLCertificateData::clone() const
/*
- * $Id: ACLCertificateData.h,v 1.6 2004/08/30 05:12:31 robertc Exp $
+ * $Id: ACLCertificateData.h,v 1.7 2005/05/08 06:36:45 hno Exp $
*
*
* SQUID Web Proxy Cache http://www.squid-cache.org/
bool match(SSL *);
wordlist *dump();
void parse();
+ bool empty() const;
virtual ACLData<SSL *> *clone() const;
char *attribute;
/*
- * $Id: ACLData.h,v 1.5 2003/08/04 22:14:38 robertc Exp $
+ * $Id: ACLData.h,v 1.6 2005/05/08 06:36:45 hno Exp $
*
*
* SQUID Web Proxy Cache http://www.squid-cache.org/
virtual wordlist *dump() =0;
virtual void parse() =0;
virtual ACLData *clone() const =0;
- virtual void prepareForUse() {}}
+ virtual void prepareForUse() {}
-;
+ virtual bool empty() const =0;
+};
#endif /* SQUID_ACLDATA_H */
/*
- * $Id: ACLDestinationDomain.cc,v 1.8 2005/05/06 01:57:55 hno Exp $
+ * $Id: ACLDestinationDomain.cc,v 1.9 2005/05/08 06:36:45 hno Exp $
*
* DEBUG: section 28 Access Control
* AUTHOR: Duane Wessels
bool
ACLDestinationDomain::empty () const
{
- return data != NULL;
+ return data == NULL;
}
DestinationDomainLookup DestinationDomainLookup::instance_;
/*
- * $Id: ACLDomainData.cc,v 1.9 2004/12/20 16:30:32 robertc Exp $
+ * $Id: ACLDomainData.cc,v 1.10 2005/05/08 06:36:45 hno Exp $
*
* DEBUG: section 28 Access Control
* AUTHOR: Duane Wessels
}
}
+bool
+ACLDomainData::empty() const
+{
+ return domains == NULL;
+}
+
ACLData<char const *> *
ACLDomainData::clone() const
/*
- * $Id: ACLDomainData.h,v 1.5 2004/08/30 05:12:31 robertc Exp $
+ * $Id: ACLDomainData.h,v 1.6 2005/05/08 06:36:45 hno Exp $
*
*
* SQUID Web Proxy Cache http://www.squid-cache.org/
bool match(char const *);
wordlist *dump();
void parse();
+ bool empty() const;
virtual ACLData<char const *> *clone() const;
SplayNode<char *> *domains;
/*
- * $Id: ACLExtUser.cc,v 1.6 2005/05/06 01:57:55 hno Exp $
+ * $Id: ACLExtUser.cc,v 1.7 2005/05/08 06:36:45 hno Exp $
*
* DEBUG: section 28 Access Control
* AUTHOR: Duane Wessels
bool
ACLExtUser::empty () const
{
- return data != NULL;
+ return data == NULL;
}
ACL *
bool
ACLIP::empty () const
{
- return data != NULL;
+ return data == NULL;
}
int
bool
ACLIdent::empty () const
{
- return data != NULL;
+ return data == NULL;
}
ACL *
/*
- * $Id: ACLIntRange.cc,v 1.3 2003/10/20 12:33:01 robertc Exp $
+ * $Id: ACLIntRange.cc,v 1.4 2005/05/08 06:36:45 hno Exp $
*
* DEBUG: section 28 Access Control
* AUTHOR: Robert Collins
}
}
+bool
+ACLIntRange::empty() const
+{
+ return ranges != NULL;
+}
+
bool
ACLIntRange::match(int i)
{
/*
- * $Id: ACLIntRange.h,v 1.2 2003/08/04 22:14:38 robertc Exp $
+ * $Id: ACLIntRange.h,v 1.3 2005/05/08 06:36:45 hno Exp $
*
*
* SQUID Web Proxy Cache http://www.squid-cache.org/
virtual bool match(int);
virtual wordlist *dump();
virtual void parse();
+ virtual bool empty() const;
virtual ACLData<int> *clone() const;
private:
/*
- * $Id: ACLMethodData.cc,v 1.5 2004/08/30 05:12:31 robertc Exp $
+ * $Id: ACLMethodData.cc,v 1.6 2005/05/08 06:36:45 hno Exp $
*
* DEBUG: section 28 Access Control
* AUTHOR: Duane Wessels
}
}
+bool
+ACLMethodData::empty() const
+{
+ return values != NULL;
+}
+
ACLData<method_t> *
ACLMethodData::clone() const
{
/*
- * $Id: ACLMethodData.h,v 1.3 2004/08/30 05:12:31 robertc Exp $
+ * $Id: ACLMethodData.h,v 1.4 2005/05/08 06:36:45 hno Exp $
*
*
* SQUID Web Proxy Cache http://www.squid-cache.org/
bool match(method_t);
wordlist *dump();
void parse();
+ bool empty() const;
virtual ACLData<method_t> *clone() const;
List<method_t> *values;
/*
- * $Id: ACLProtocolData.cc,v 1.5 2004/08/30 05:12:31 robertc Exp $
+ * $Id: ACLProtocolData.cc,v 1.6 2005/05/08 06:36:45 hno Exp $
*
* DEBUG: section 28 Access Control
* AUTHOR: Duane Wessels
}
}
+bool
+ACLProtocolData::empty() const
+{
+ return values == NULL;
+}
+
ACLData<protocol_t> *
ACLProtocolData::clone() const
{
/*
- * $Id: ACLProtocolData.h,v 1.3 2004/08/30 05:12:31 robertc Exp $
+ * $Id: ACLProtocolData.h,v 1.4 2005/05/08 06:36:45 hno Exp $
*
*
* SQUID Web Proxy Cache http://www.squid-cache.org/
bool match(protocol_t);
wordlist *dump();
void parse();
+ bool empty() const;
virtual ACLData<protocol_t> *clone() const;
List<protocol_t> *values;
bool
ACLProxyAuth::empty () const
{
- return data != NULL;
+ return data == NULL;
}
bool
/*
- * $Id: ACLRegexData.cc,v 1.7 2004/08/30 05:12:31 robertc Exp $
+ * $Id: ACLRegexData.cc,v 1.8 2005/05/08 06:36:45 hno Exp $
*
* DEBUG: section 28 Access Control
* AUTHOR: Duane Wessels
aclParseRegexList(&data);
}
+bool
+ACLRegexData::empty() const
+{
+ return data == NULL;
+}
ACLData<char const *> *
ACLRegexData::clone() const
/*
- * $Id: ACLRegexData.h,v 1.5 2004/08/30 05:12:31 robertc Exp $
+ * $Id: ACLRegexData.h,v 1.6 2005/05/08 06:36:45 hno Exp $
*
*
* SQUID Web Proxy Cache http://www.squid-cache.org/
virtual bool match(char const *user);
virtual wordlist *dump();
virtual void parse();
+ virtual bool empty() const;
virtual ACLData<char const *> *clone() const;
private:
/*
- * $Id: ACLStrategised.h,v 1.9 2005/05/06 01:57:55 hno Exp $
+ * $Id: ACLStrategised.h,v 1.10 2005/05/08 06:36:45 hno Exp $
*
*
* SQUID Web Proxy Cache http://www.squid-cache.org/
virtual int match (M const &);
virtual wordlist *dump() const;
virtual bool empty () const;
+ virtual bool valid () const;
virtual ACL *clone()const;
private:
data->parse();
}
+template <class MatchType>
+bool
+ACLStrategised<MatchType>::empty() const
+{
+ return data->empty();
+}
+
template <class MatchType>
int
ACLStrategised<MatchType>::match(ACLChecklist *checklist)
template <class MatchType>
bool
-ACLStrategised<MatchType>::empty () const
+ACLStrategised<MatchType>::valid () const
{
- return data == NULL;
+ return matcher->valid();
}
template <class MatchType>
/*
- * $Id: ACLStrategy.h,v 1.2 2004/12/24 08:57:59 robertc Exp $
+ * $Id: ACLStrategy.h,v 1.3 2005/05/08 06:36:45 hno Exp $
*
*
* SQUID Web Proxy Cache http://www.squid-cache.org/
virtual bool requiresReply() const {return false;}
+ virtual bool valid() const {return true;}
+
virtual ~ACLStrategy(){}}
;
/*
- * $Id: ACLStringData.cc,v 1.5 2004/08/30 05:12:31 robertc Exp $
+ * $Id: ACLStringData.cc,v 1.6 2005/05/08 06:36:45 hno Exp $
*
* DEBUG: section 28 Access Control
* AUTHOR: Duane Wessels
values = values->insert(xstrdup(t), splaystrcmp);
}
+bool
+ACLStringData::empty() const
+{
+ return values == NULL;
+}
+
ACLData<char const *> *
ACLStringData::clone() const
{
/*
- * $Id: ACLStringData.h,v 1.3 2004/08/30 05:12:31 robertc Exp $
+ * $Id: ACLStringData.h,v 1.4 2005/05/08 06:36:45 hno Exp $
*
*
* SQUID Web Proxy Cache http://www.squid-cache.org/
bool match(char const *);
wordlist *dump();
void parse();
+ bool empty() const;
virtual ACLData<char const *> *clone() const;
SplayNode<char *> *values;
/*
- * $Id: ACLTimeData.cc,v 1.9 2005/05/06 01:57:55 hno Exp $
+ * $Id: ACLTimeData.cc,v 1.10 2005/05/08 06:36:45 hno Exp $
*
* DEBUG: section 28 Access Control
* AUTHOR: Duane Wessels
}
}
+bool
+ACLTimeData::empty() const
+{
+ return false;
+}
ACLData<time_t> *
ACLTimeData::clone() const
/*
- * $Id: ACLTimeData.h,v 1.4 2004/08/30 05:12:31 robertc Exp $
+ * $Id: ACLTimeData.h,v 1.5 2005/05/08 06:36:45 hno Exp $
*
*
* SQUID Web Proxy Cache http://www.squid-cache.org/
bool match(time_t);
wordlist *dump();
void parse();
+ bool empty() const;
virtual ACLData<time_t> *clone() const;
private:
}
+bool
+ACLUserData::empty() const
+{
+ return names == NULL;
+}
+
ACLData<char const *> *
ACLUserData::clone() const
{
bool match(char const *user);
wordlist *dump();
void parse();
+ bool empty() const;
virtual ACLData<char const *> *clone() const;
SplayNode<char *> *names;