1 #pragma once 2 3 #include <sdbusplus/async.hpp> 4 #include <sdbusplus/exception.hpp> 5 6 namespace lg2 7 { 8 /** Commit a generated event/error. 9 * 10 * @param e - The event to commit. 11 * @return The object path of the resulting event. 12 * 13 * Note: Similar to elog(), this will use the default dbus connection to 14 * perform the operation. 15 */ 16 auto commit(sdbusplus::exception::generated_event_base&& e) 17 -> sdbusplus::message::object_path; 18 19 /** Resolve an existing event/error. 20 * 21 * @param logPath - The object path of the event to resolve. 22 * @return None. 23 * 24 * Note: Similar to elog(), this will use the default dbus connection to 25 * perform the operation. 26 */ 27 void resolve(const sdbusplus::message::object_path& logPath); 28 29 /** Commit a generated event/error (using async context). 30 * 31 * @param ctx - The async context to use. 32 * @param e - The event to commit. 33 * @return The object path of the resulting event. 34 */ 35 auto commit(sdbusplus::async::context& ctx, 36 sdbusplus::exception::generated_event_base&& e) 37 -> sdbusplus::async::task<sdbusplus::message::object_path>; 38 39 /** Resolve an existing event/error (using async context). 40 * 41 * @param ctx - The async context to use. 42 * @param logPath - The object path of the event to resolve. 43 * @return None 44 */ 45 auto resolve(sdbusplus::async::context& ctx, 46 const sdbusplus::message::object_path& logPath) 47 -> sdbusplus::async::task<>; 48 49 } // namespace lg2 50