|
@@ -1,4 +1,4 @@
|
|
|
-// Copyright (C) 2015 Internet Systems Consortium, Inc. ("ISC")
|
|
|
+// Copyright (C) 2015,2017 Internet Systems Consortium, Inc. ("ISC")
|
|
|
//
|
|
|
// This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
// License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
@@ -7,7 +7,8 @@
|
|
|
#ifndef EXPIRATION_CONFIG_PARSER_H
|
|
|
#define EXPIRATION_CONFIG_PARSER_H
|
|
|
|
|
|
-#include <dhcpsrv/parsers/dhcp_config_parser.h>
|
|
|
+#include <cc/data.h>
|
|
|
+#include <cc/simple_parser.h>
|
|
|
|
|
|
namespace isc {
|
|
|
namespace dhcp {
|
|
@@ -32,26 +33,23 @@ namespace dhcp {
|
|
|
/// those that aren't specified.
|
|
|
///
|
|
|
/// The parser checks if the values of the specified parameters are within
|
|
|
-/// the allowed ranges and throws exception if they are. Each parameter
|
|
|
+/// the allowed ranges and throws exception if they aren't. Each parameter
|
|
|
/// has a corresponding maximum value defined in the @c CfgExpiration class.
|
|
|
/// None of them may be negative.
|
|
|
-class ExpirationConfigParser : public DhcpConfigParser {
|
|
|
+class ExpirationConfigParser : public isc::data::SimpleParser {
|
|
|
public:
|
|
|
|
|
|
- /// @brief Constructor
|
|
|
- ExpirationConfigParser();
|
|
|
+ /// @brief Destructor.
|
|
|
+ virtual ~ExpirationConfigParser() { }
|
|
|
|
|
|
/// @brief Parses parameters in the JSON map, pertaining to the processing
|
|
|
/// of the expired leases.
|
|
|
///
|
|
|
- /// @param value pointer to the content of parsed values
|
|
|
+ /// @param expiration_config pointer to the content of parsed values
|
|
|
///
|
|
|
/// @throw DhcpConfigError if unknown parameter specified or the
|
|
|
/// parameter contains invalid value..
|
|
|
- virtual void build(isc::data::ConstElementPtr value);
|
|
|
-
|
|
|
- /// @brief Does nothing.
|
|
|
- virtual void commit();
|
|
|
+ void parse(isc::data::ConstElementPtr expiration_config);
|
|
|
|
|
|
};
|
|
|
|