You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. //
  2. // Created by robin on 8/8/15.
  3. //
  4. #ifndef PDNS_SLAVE_MAINCLASS_H
  5. #define PDNS_SLAVE_MAINCLASS_H
  6. #include <Business/CryptoBusiness.h>
  7. #include <boost/shared_ptr.hpp>
  8. #include "libmilter/mfapi.h"
  9. #include "libmilter/mfdef.h"
  10. class MainClass {
  11. public:
  12. static MainClass* getInstance();
  13. MainClass(int argc, char* argv[]);
  14. virtual ~MainClass();
  15. int main();
  16. sfsistat mlfiHeader(SMFICTX *ctx);
  17. std::string randomizeString(const std::string& str);
  18. protected:
  19. int loadConfig(const std::string& filePath);
  20. int launchMilter(const std::string& socket);
  21. int launchDecrypt(const std::vector<std::string> values);
  22. private:
  23. int _argc;
  24. char** _argv;
  25. std::shared_ptr<CryptoBusiness> _cryptoBusiness;
  26. static MainClass* _instance;
  27. };
  28. #endif //PDNS_SLAVE_MAINCLASS_H