Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.

mdconfiguration.hpp 2.3KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. // mdconfiguration.hpp
  2. // SNF MDaemon Plugin: Platform Configuration Module
  3. // Copyright (C) 2007-2008, ARM Research Labs, LLC.
  4. // This module handles the platform specific configuration for the MDaemon
  5. // plugin. The rulebase is passed to the object when constructed. Each call to
  6. // get a parameter from the object causes a quick check to the generation data.
  7. // If the generation is still valid then the data is provided as is. If not then
  8. // the configuration is updated before it is returned. All of this is protected
  9. // by a mutex.
  10. #ifndef included_mdconfiguration_hpp
  11. #define included_mdconfiguration_hpp
  12. #include <windows.h>
  13. #include "../SNF_Service/SNFMulti.hpp"
  14. #include "../SNF_Service/configuration.hpp"
  15. #include "../SNF_Service/threading.hpp"
  16. class MDConfiguration {
  17. private:
  18. Mutex MyMutex; // Protects configuration.
  19. ConfigurationElement MyCFGReader; // This is how we read our cfg data.
  20. string& MyConfigurationPath; // Configuration file path.
  21. snf_RulebaseHandler& MyRulebase; // Rulebase manager at startup.
  22. volatile int MyGeneration; // Numeric Generation Tag.
  23. bool MyMessageIPFuncOn; // Message IP test on/off switch.
  24. string MyConfiguratorCommand; // Config editor command string.
  25. bool MyAppendConfigurationFileOn; // Append config file path to command?
  26. void updateConfig(); // Update config if needed.
  27. public:
  28. MDConfiguration(snf_RulebaseHandler& R, string& C); // Default constructor.
  29. int Generation(); // Numeric generation tag.
  30. bool MessageIPFuncOn(); // Message IP test on/off switch.
  31. string ConfiguratorCommand(); // Configure function command string.
  32. };
  33. #endif