diff options
author | Andrei Pavel <andrei.pavel@qualitance.com> | 2017-08-17 19:54:15 +0200 |
---|---|---|
committer | Andrei Pavel <andrei.pavel@qualitance.com> | 2017-08-17 19:54:15 +0200 |
commit | a8f6403d1b44f62ebb3dd3085e401b46767003a0 (patch) | |
tree | 00df52bd413b27ed04097164021251f8e8ec6c80 /src/lib/dhcpsrv/parsers/expiration_config_parser.h | |
parent | Removed duplicate include (diff) | |
parent | [master] Added ChangeLog 1288 for trac 5315. (diff) | |
download | kea-a8f6403d1b44f62ebb3dd3085e401b46767003a0.tar.xz kea-a8f6403d1b44f62ebb3dd3085e401b46767003a0.zip |
Merge branch 'isc-master' into config-h
Diffstat (limited to 'src/lib/dhcpsrv/parsers/expiration_config_parser.h')
-rw-r--r-- | src/lib/dhcpsrv/parsers/expiration_config_parser.h | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/src/lib/dhcpsrv/parsers/expiration_config_parser.h b/src/lib/dhcpsrv/parsers/expiration_config_parser.h index cf3f2ac3f4..44ba77d6e0 100644 --- a/src/lib/dhcpsrv/parsers/expiration_config_parser.h +++ b/src/lib/dhcpsrv/parsers/expiration_config_parser.h @@ -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); }; |