Adriana Kobylak | 88d7cf8 | 2017-01-24 12:30:15 -0600 | [diff] [blame] | 1 | #include "elog_entry.hpp" |
Patrick Venture | f18bf83 | 2018-10-26 18:14:00 -0700 | [diff] [blame^] | 2 | |
Deepak Kodihalli | 9743189 | 2017-06-12 09:14:57 -0500 | [diff] [blame] | 3 | #include "elog_serialize.hpp" |
Patrick Venture | f18bf83 | 2018-10-26 18:14:00 -0700 | [diff] [blame^] | 4 | #include "log_manager.hpp" |
Adriana Kobylak | 88d7cf8 | 2017-01-24 12:30:15 -0600 | [diff] [blame] | 5 | |
| 6 | namespace phosphor |
| 7 | { |
| 8 | namespace logging |
| 9 | { |
| 10 | |
Adriana Kobylak | 88d7cf8 | 2017-01-24 12:30:15 -0600 | [diff] [blame] | 11 | // TODO Add interfaces to handle the error log id numbering |
| 12 | |
Deepak Kodihalli | 36db46c | 2017-03-31 06:28:44 -0500 | [diff] [blame] | 13 | void Entry::delete_() |
| 14 | { |
| 15 | parent.erase(id()); |
| 16 | } |
| 17 | |
Deepak Kodihalli | 9743189 | 2017-06-12 09:14:57 -0500 | [diff] [blame] | 18 | bool Entry::resolved(bool value) |
| 19 | { |
Patrick Venture | f18bf83 | 2018-10-26 18:14:00 -0700 | [diff] [blame^] | 20 | auto current = |
| 21 | sdbusplus::xyz::openbmc_project::Logging::server::Entry::resolved(); |
Deepak Kodihalli | 9743189 | 2017-06-12 09:14:57 -0500 | [diff] [blame] | 22 | if (value != current) |
| 23 | { |
Patrick Venture | f18bf83 | 2018-10-26 18:14:00 -0700 | [diff] [blame^] | 24 | value ? associations({}) : associations(assocs); |
| 25 | current = |
| 26 | sdbusplus::xyz::openbmc_project::Logging::server::Entry::resolved( |
| 27 | value); |
Deepak Kodihalli | 9743189 | 2017-06-12 09:14:57 -0500 | [diff] [blame] | 28 | serialize(*this); |
| 29 | } |
| 30 | |
| 31 | return current; |
| 32 | } |
| 33 | |
Adriana Kobylak | 88d7cf8 | 2017-01-24 12:30:15 -0600 | [diff] [blame] | 34 | } // namespace logging |
Patrick Venture | f18bf83 | 2018-10-26 18:14:00 -0700 | [diff] [blame^] | 35 | } // namespace phosphor |