Ви не можете вибрати більше 25 тем Теми мають розпочинатися з літери або цифри, можуть містити дефіси (-) і не повинні перевищувати 35 символів.

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. //
  2. // Created by robin on 8/8/15.
  3. //
  4. #ifndef PDNS_SLAVE_PDNSSLAVE_H
  5. #define PDNS_SLAVE_PDNSSLAVE_H
  6. # include <string>
  7. # include <memory>
  8. # include "DBO/SqlConfiguration.h"
  9. # include "DBO/Actions/Action.h"
  10. class PdnsSlave
  11. {
  12. public:
  13. PdnsSlave(const std::string& filePath);
  14. BResult readConfig();
  15. BResult readDhcpdTemplate();
  16. Result<Actions> readHosts();
  17. BResult overridePdns();
  18. BResult overrideDhcp();
  19. private:
  20. std::string _filePath;
  21. std::string _dhcpdFilePath;
  22. std::string _dhcpdTemplatePath;
  23. std::string _hostsPath;
  24. std::string _dbType;
  25. SqlConfiguration _masterConfig;
  26. SqlConfiguration _slaveConfig;
  27. std::string _dhcpdTemplateContent;
  28. Actions _actions;
  29. };
  30. #endif //PDNS_SLAVE_PDNSSLAVE_H