diff options
Diffstat (limited to 'item_updater.cpp')
-rw-r--r-- | item_updater.cpp | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/item_updater.cpp b/item_updater.cpp index 7d7df3f..4b8d534 100644 --- a/item_updater.cpp +++ b/item_updater.cpp @@ -441,6 +441,30 @@ void ItemUpdater::setBMCInventoryPath() } } +void ItemUpdater::createActiveAssociation(std::string path) +{ + assocs.emplace_back(std::make_tuple(ACTIVE_FWD_ASSOCIATION, + ACTIVE_REV_ASSOCIATION, + path)); + associations(assocs); +} + +void ItemUpdater::removeActiveAssociation(std::string path) +{ + for (auto iter = assocs.begin(); iter != assocs.end();) + { + if ((std::get<2>(*iter)).compare(path) == 0) + { + iter = assocs.erase(iter); + associations(assocs); + } + else + { + ++iter; + } + } +} + } // namespace updater } // namespace software } // namespace phosphor |