- /** Add a callback fired when any machine is turned on or off (called AFTER the change) */
- static void on_state_change_cb(const std::function<void(Host const&)>& cb) { on_state_change.connect(cb); }
+ /** \static Add a callback fired when any machine is turned on or off (called AFTER the change) */
+ static void on_onoff_cb(const std::function<void(Host const&)>& cb)
+ {
+ on_onoff.connect(cb);
+ }
+ XBT_ATTRIB_DEPRECATED_v337("Please use on_onoff_cb() instead") static void on_state_change_cb(
+ const std::function<void(Host const&)>& cb)
+ {
+ on_onoff.connect(cb);
+ }