Brad Bishop | 4b916f1 | 2017-05-23 18:06:38 -0400 | [diff] [blame] | 1 | #pragma once |
| 2 | |
| 3 | namespace phosphor |
| 4 | { |
| 5 | namespace dbus |
| 6 | { |
| 7 | namespace monitoring |
| 8 | { |
| 9 | |
| 10 | /** @class Watch |
| 11 | * @brief Watch interface. |
| 12 | * |
| 13 | * The start method is invoked by main() on all watches of any type |
| 14 | * at application startup, to allow watches to perform custom setup |
| 15 | * or initialization. Typical implementations might register dbus |
| 16 | * callbacks or perform queries. |
| 17 | * |
| 18 | * Watches of any type can be started. |
| 19 | */ |
| 20 | class Watch |
| 21 | { |
| 22 | public: |
| 23 | Watch() = default; |
| 24 | Watch(const Watch&) = default; |
| 25 | Watch(Watch&&) = default; |
| 26 | Watch& operator=(const Watch&) = default; |
| 27 | Watch& operator=(Watch&&) = default; |
| 28 | virtual ~Watch() = default; |
| 29 | |
| 30 | /** @brief Start the watch. */ |
| 31 | virtual void start() = 0; |
| 32 | }; |
| 33 | |
| 34 | } // namespace monitoring |
| 35 | } // namespace dbus |
| 36 | } // namespace phosphor |