blob: 1ba671d1e2c187f19cde7f2508e2941fdcde858e [file] [log] [blame]
Brad Bishop4b916f12017-05-23 18:06:38 -04001#pragma once
2
3namespace phosphor
4{
5namespace dbus
6{
7namespace 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 */
20class 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