return false;
}
+ //! Search for records, returns true if search was done successfully.
+ virtual bool searchRecords(const string &pattern, int maxResults, vector<DNSResourceRecord>& result)
+ {
+ return false;
+ }
+
+ //! Search for comments, returns true if search was done successfully.
+ virtual bool searchComments(const string &pattern, int maxResults, vector<Comment>& result)
+ {
+ return false;
+ }
+
protected:
bool mustDo(const string &key);
const string &getArg(const string &key);
return false;
}
+bool UeberBackend::searchRecords(const string& pattern, int maxResults, vector<DNSResourceRecord>& result)
+{
+ bool rc = false;
+ for ( vector< DNSBackend * >::iterator i = backends.begin(); result.size() < static_cast<vector<DNSResourceRecord>::size_type>(maxResults) && i != backends.end(); ++i )
+ if ((*i)->searchRecords(pattern, maxResults - result.size(), result)) rc = true;
+ return rc;
+}
+
+bool UeberBackend::searchComments(const string& pattern, int maxResults, vector<Comment>& result)
+{
+ bool rc = false;
+ for ( vector< DNSBackend * >::iterator i = backends.begin(); result.size() < static_cast<vector<Comment>::size_type>(maxResults) && i != backends.end(); ++i )
+ if ((*i)->searchComments(pattern, maxResults - result.size(), result)) rc = true;
+ return rc;
+}
AtomicCounter UeberBackend::handle::instances(0);
void alsoNotifies(const string &domain, set<string> *ips);
void rediscover(string* status=0);
void reload();
+
+ bool searchRecords(const string &pattern, int maxResults, vector<DNSResourceRecord>& result);
+ bool searchComments(const string &pattern, int maxResults, vector<Comment>& result);
private:
unsigned int d_cache_ttl, d_negcache_ttl;