client.cc 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. // Copyright (C) 2012 Internet Systems Consortium, Inc. ("ISC")
  2. //
  3. // Permission to use, copy, modify, and/or distribute this software for any
  4. // purpose with or without fee is hereby granted, provided that the above
  5. // copyright notice and this permission notice appear in all copies.
  6. //
  7. // THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
  8. // REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
  9. // AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
  10. // INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
  11. // LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
  12. // OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
  13. // PERFORMANCE OF THIS SOFTWARE.
  14. #include <datasrc/client.h>
  15. #include <exceptions/exceptions.h>
  16. /// This file defines a few default implementations for methods.
  17. ///
  18. /// While some of the detail of the API are worked out, we define
  19. /// default implementations to ease development for some of the
  20. /// more tentative methods (those that are not (yet) pure virtual)
  21. /// They should all throw NotImplemented
  22. namespace isc {
  23. namespace datasrc {
  24. ZoneIteratorPtr
  25. DataSourceClient::getIterator(const isc::dns::Name&, bool) const {
  26. isc_throw(isc::NotImplemented, "Data source doesn't support iteration");
  27. }
  28. unsigned int
  29. DataSourceClient::getZoneCount() const {
  30. isc_throw(isc::NotImplemented, "Data source doesn't support getZoneCount");
  31. }
  32. bool
  33. DataSourceClient::createZone(const dns::Name&) {
  34. isc_throw(isc::NotImplemented, "Data source doesn't support createZone");
  35. }
  36. bool
  37. DataSourceClient::deleteZone(const dns::Name&) {
  38. isc_throw(isc::NotImplemented, "Data source doesn't support deleteZone");
  39. }
  40. } // end namespace datasrc
  41. } // end namespace isc