Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

mdconfiguration.hpp 2.2KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  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 <winsock2.h>
  13. #include <windows.h>
  14. #include "SNFMulti/SNFMulti.hpp"
  15. #include "CodeDweller/configuration.hpp"
  16. #include "CodeDweller/threading.hpp"
  17. class MDConfiguration {
  18. private:
  19. Mutex MyMutex; // Protects configuration.
  20. ConfigurationElement MyCFGReader; // This is how we read our cfg data.
  21. string& MyConfigurationPath; // Configuration file path.
  22. snf_RulebaseHandler& MyRulebase; // Rulebase manager at startup.
  23. volatile int MyGeneration; // Numeric Generation Tag.
  24. bool MyMessageIPFuncOn; // Message IP test on/off switch.
  25. string MyConfiguratorCommand; // Config editor command string.
  26. bool MyAppendConfigurationFileOn; // Append config file path to command?
  27. void updateConfig(); // Update config if needed.
  28. public:
  29. MDConfiguration(snf_RulebaseHandler& R, string& C); // Default constructor.
  30. int Generation(); // Numeric generation tag.
  31. bool MessageIPFuncOn(); // Message IP test on/off switch.
  32. string ConfiguratorCommand(); // Configure function command string.
  33. };
  34. #endif