blob: 0f6550f33ca0eb699d97dcc886995e744d4d4546 [file] [log] [blame]
Manojkiran Eda1b5ec9c2020-06-13 15:29:28 +05301#include "mock_network_manager.hpp"
2#include "types.hpp"
3
4#include <sdeventplus/event.hpp>
5
6namespace phosphor
7{
8
9namespace network
10{
11
12std::unique_ptr<MockManager> manager = nullptr;
13std::unique_ptr<Timer> refreshObjectTimer = nullptr;
William A. Kennington IIIc7cf25f2021-11-09 16:16:59 -080014std::unique_ptr<Timer> reloadTimer = nullptr;
Manojkiran Eda1b5ec9c2020-06-13 15:29:28 +053015
16/** @brief refresh the network objects. */
17void refreshObjects()
18{
19 if (manager)
20 {
21 manager->createChildObjects();
22 }
23}
24
25void initializeTimers()
26{
27 refreshObjectTimer = std::make_unique<Timer>(
28 sdeventplus::Event::get_default(), std::bind(refreshObjects));
29}
30
31} // namespace network
32} // namespace phosphor