Browse Source

[trac930] Add prototypes of validator_typea and registerStatisticsValidator
- validator_type -- a type of statistics validation function
- registerStatisticsValidator -- the function to register the validation function

Naoki Kambe 13 years ago
parent
commit
d0d5a67123
1 changed files with 20 additions and 0 deletions
  1. 20 0
      src/bin/auth/statistics.h

+ 20 - 0
src/bin/auth/statistics.h

@@ -131,6 +131,26 @@ public:
     /// \return the value of the counter specified by \a type.
     ///
     uint64_t getCounter(const AuthCounters::CounterType type) const;
+
+    /// \brief A type of validation function for the specification in
+    /// isc::config::ModuleSpec.
+    ///
+    /// This type might be useful for not only statistics
+    /// specificatoin but also for config_data specification and for
+    /// commnad.
+    ///
+    typedef boost::function<bool(const isc::data::ConstElementPtr&)>
+    validator_type;
+
+    /// \brief Register a function type of the statistics validation
+    /// function for AuthCounters.
+    ///
+    /// This method never throws an exception.
+    ///
+    /// \param validator A function type of the validation of
+    /// statistics specification.
+    ///
+    void registerStatisticsValidator(AuthCounters::validator_type validator) const;
 };
 
 #endif // __STATISTICS_H