diff options
author | Marri Devender Rao <devenrao@in.ibm.com> | 2018-04-12 01:11:48 -0500 |
---|---|---|
committer | Brad Bishop <bradleyb@fuzziesquirrel.com> | 2018-06-05 02:10:49 +0000 |
commit | 70aafbb58d98c6ca5a049433db87493784ec587a (patch) | |
tree | 917eab2118ec28d990de0b80714481fe8c5a0989 /src/callback.hpp | |
parent | ee4c6ebfd9e1697501b6fa0225d684867796a637 (diff) | |
download | phosphor-dbus-monitor-70aafbb58d98c6ca5a049433db87493784ec587a.tar.gz phosphor-dbus-monitor-70aafbb58d98c6ca5a049433db87493784ec587a.zip |
Add SNMP event callback for error notification
Added callback support for SNMP events.
Parse the callback message and raise SNMP trap
Clients specify the object paths to watch and callbacks
to invoke in the config yaml.
Change-Id: I105652f65e4e1c5354c934c88e4d59866540f71c
Signed-off-by: Marri Devender Rao <devenrao@in.ibm.com>
Diffstat (limited to 'src/callback.hpp')
-rw-r--r-- | src/callback.hpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/callback.hpp b/src/callback.hpp index 26cd2a1..e1e2325 100644 --- a/src/callback.hpp +++ b/src/callback.hpp @@ -33,6 +33,15 @@ class Callback * */ virtual void operator()(Context ctx) = 0; + + /** @brief Run the callback. + * @param[in] ctx - caller context + * Context could be Startup or Signal + * Startup: Callback is called as part of process startup. + * Signal: Callback is called as part of watch condition has been met. + * @param[in] msg - The sdbusplus signal message + */ + virtual void operator()(Context ctx, sdbusplus::message::message& msg){}; }; /** @class Conditional |