|
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950 |
- // mdconfiguration.hpp
- // SNF MDaemon Plugin: Platform Configuration Module
- // Copyright (C) 2007-2008, ARM Research Labs, LLC.
-
- // This module handles the platform specific configuration for the MDaemon
- // plugin. The rulebase is passed to the object when constructed. Each call to
- // get a parameter from the object causes a quick check to the generation data.
- // If the generation is still valid then the data is provided as is. If not then
- // the configuration is updated before it is returned. All of this is protected
- // by a mutex.
-
- #ifndef included_mdconfiguration_hpp
- #define included_mdconfiguration_hpp
-
-
- #include <winsock2.h>
- #include <windows.h>
- #include "SNFMulti/SNFMulti.hpp"
- #include "CodeDweller/configuration.hpp"
- #include "CodeDweller/threading.hpp"
-
-
- class MDConfiguration {
- private:
-
- Mutex MyMutex; // Protects configuration.
- ConfigurationElement MyCFGReader; // This is how we read our cfg data.
-
- string& MyConfigurationPath; // Configuration file path.
- snf_RulebaseHandler& MyRulebase; // Rulebase manager at startup.
-
- volatile int MyGeneration; // Numeric Generation Tag.
- bool MyMessageIPFuncOn; // Message IP test on/off switch.
- string MyConfiguratorCommand; // Config editor command string.
- bool MyAppendConfigurationFileOn; // Append config file path to command?
-
- void updateConfig(); // Update config if needed.
-
- public:
-
- MDConfiguration(snf_RulebaseHandler& R, string& C); // Default constructor.
-
- int Generation(); // Numeric generation tag.
- bool MessageIPFuncOn(); // Message IP test on/off switch.
- string ConfiguratorCommand(); // Configure function command string.
-
- };
-
- #endif
-
|