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.

MainClass.h 854B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  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 <memory>
  8. #include <vector>
  9. #include "libmilter/mfapi.h"
  10. #include "libmilter/mfdef.h"
  11. class MainClass {
  12. public:
  13. static MainClass* getInstance();
  14. MainClass(int argc, char* argv[]);
  15. virtual ~MainClass();
  16. int main();
  17. sfsistat mlfiHeader(SMFICTX *ctx);
  18. std::string randomizeString(const std::string& str);
  19. protected:
  20. int loadConfig(const std::string& filePath);
  21. int launchMilter(const std::string& socket);
  22. int launchDecrypt(const std::vector<std::string> values);
  23. private:
  24. int _argc;
  25. char** _argv;
  26. std::shared_ptr<CryptoBusiness> _cryptoBusiness;
  27. std::string _defaultSocket;
  28. static MainClass* _instance;
  29. };
  30. #endif //PDNS_SLAVE_MAINCLASS_H