diff options
author | Thomas Markwalder <tmark@isc.org> | 2016-08-23 20:16:46 +0200 |
---|---|---|
committer | Thomas Markwalder <tmark@isc.org> | 2016-08-23 20:16:46 +0200 |
commit | 86411b64adb0de8ce8b1bd6394c475b08afdb8db (patch) | |
tree | 5b214534092c28f5d4943a4b9195b8c0aab0281f /src/lib/dhcpsrv/lease.h | |
parent | [4294] Compilation fix for unused parameter (diff) | |
download | kea-86411b64adb0de8ce8b1bd6394c475b08afdb8db.tar.xz kea-86411b64adb0de8ce8b1bd6394c475b08afdb8db.zip |
[4294] Reverted Lease states back to uin32_t per review comments
I had replaced the uint32_t constants for lease states with an enum.
Tomek stated that they should remain uin32_t as they may eventually be bitmasks.
Diffstat (limited to 'src/lib/dhcpsrv/lease.h')
-rw-r--r-- | src/lib/dhcpsrv/lease.h | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/src/lib/dhcpsrv/lease.h b/src/lib/dhcpsrv/lease.h index 365cb06f53..c89ad523a3 100644 --- a/src/lib/dhcpsrv/lease.h +++ b/src/lib/dhcpsrv/lease.h @@ -40,19 +40,17 @@ struct Lease { /// @return text decription static std::string typeToText(Type type); - /// @name Enumeration of lease states + /// @name Common lease states constants. //@{ - typedef enum { - /// @brief A lease in the default (assigned) state. - STATE_DEFAULT, - /// @brief Declined lease. - STATE_DECLINED, - /// @brief Expired and reclaimed lease. - STATE_EXPIRED_RECLAIMED, - /// @brief The number of defined lease states. - NUM_LEASE_STATES - } LeaseState; - //@} + /// + /// @brief A lease in the default state. + static const uint32_t STATE_DEFAULT; + + /// @brief Declined lease. + static const uint32_t STATE_DECLINED; + + /// @brief Expired and reclaimed lease. + static const uint32_t STATE_EXPIRED_RECLAIMED; /// @brief Returns name(s) of the basic lease state(s). /// |