diff options
author | William A. Kennington III <wak@google.com> | 2018-05-11 16:10:12 -0700 |
---|---|---|
committer | William A. Kennington III <wak@google.com> | 2018-05-11 16:11:20 -0700 |
commit | 82c173a001399ba1c22de50ab53c4240e9e7edb0 (patch) | |
tree | 74b2f0f780f0ea7e16004a717663b66408398d1b /utils.hpp | |
parent | 54fa13068e049ac8fe866ad2d96f89f1623c6645 (diff) | |
download | phosphor-host-ipmid-82c173a001399ba1c22de50ab53c4240e9e7edb0.tar.gz phosphor-host-ipmid-82c173a001399ba1c22de50ab53c4240e9e7edb0.zip |
utils/ServiceCache: Make isValid public
Some of our apps may want to know if the ServiceCache was determined to
be valid prior to using it, so that they can retry their request in case
the cache was stale.
Change-Id: I106f11a18cd2290df9c18f29a8e779aacb5ef552
Signed-off-by: William A. Kennington III <wak@google.com>
Diffstat (limited to 'utils.hpp')
-rw-r--r-- | utils.hpp | 14 |
1 files changed, 7 insertions, 7 deletions
@@ -61,6 +61,13 @@ class ServiceCache { sdbusplus::message::message newMethodCall(sdbusplus::bus::bus& bus, const char *intf, const char *method); + + /** @brief Check to see if the current cache is valid + * + * @param[in] bus - The bus used for the service lookup + * @return True if the cache is valid false otherwise. + */ + bool isValid(sdbusplus::bus::bus& bus) const; private: /** @brief DBUS interface provided by the service */ const std::string intf; @@ -70,13 +77,6 @@ class ServiceCache { std::experimental::optional<std::string> cachedService; /** @brief The name of the bus used in the service lookup */ std::experimental::optional<std::string> cachedBusName; - - /** @brief Check to see if the current cache is valid - * - * @param[in] bus - The bus used for the service lookup - * @return True if the cache is valid false otherwise. - */ - bool isValid(sdbusplus::bus::bus& bus) const; }; /** |