return "directBackendCmd not supported for this backend\n";
}
+ //! 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;
+ }
+
const string& getPrefix() { return d_prefix; };
protected:
bool mustDo(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 DNSName &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:
pthread_t tid;
handle d_handle;