From: Peter van Dijk Date: Thu, 10 Apr 2014 14:14:12 +0000 (+0200) Subject: Merge pull request #1354 from zeha/api-consolidate-zone-update X-Git-Tag: rec-3.6.0-rc1~72 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f7676f61b3cefa3b2fab4a7d11df27033cc8ec97;p=pdns Merge pull request #1354 from zeha/api-consolidate-zone-update API: Consolidate zone update plus SOA-EDIT-API --- f7676f61b3cefa3b2fab4a7d11df27033cc8ec97 diff --cc pdns/dnsbackend.hh index 8e03d532b,620dba9fe..a76823779 --- a/pdns/dnsbackend.hh +++ b/pdns/dnsbackend.hh @@@ -134,12 -134,27 +134,30 @@@ public } // the DNSSEC related (getDomainMetadata has broader uses too) + bool isDnssecDomainMetadata (const string& name) { + return (name == "PRESIGNED" || name == "NSEC3PARAM" || name == "NSEC3NARROW"); + } virtual bool getAllDomainMetadata(const string& name, std::map >& meta) { return false; }; virtual bool getDomainMetadata(const string& name, const std::string& kind, std::vector& meta) { return false; } + virtual bool getDomainMetadataOne(const string& name, const std::string& kind, std::string& value) + { + std::vector meta; + if (getDomainMetadata(name, kind, meta)) { + if(!meta.empty()) { + value = *meta.begin(); + return true; + } + } + return false; + } + virtual bool setDomainMetadata(const string& name, const std::string& kind, const std::vector& meta) {return false;} + virtual bool setDomainMetadataOne(const string& name, const std::string& kind, const std::string& value) + { + const std::vector meta(1, value); + return setDomainMetadata(name, kind, meta); + } + virtual void getAllDomains(vector *domains, bool include_disabled=false) { }