blob: 04aa9171c1933a7a4b3543db8061865e18945805 [file] [log] [blame]
Adriana Kobylak88d7cf82017-01-24 12:30:15 -06001#include "elog_entry.hpp"
Patrick Venturef18bf832018-10-26 18:14:00 -07002
Deepak Kodihalli97431892017-06-12 09:14:57 -05003#include "elog_serialize.hpp"
Patrick Venturef18bf832018-10-26 18:14:00 -07004#include "log_manager.hpp"
Adriana Kobylak88d7cf82017-01-24 12:30:15 -06005
6namespace phosphor
7{
8namespace logging
9{
10
Adriana Kobylak88d7cf82017-01-24 12:30:15 -060011// TODO Add interfaces to handle the error log id numbering
12
Deepak Kodihalli36db46c2017-03-31 06:28:44 -050013void Entry::delete_()
14{
15 parent.erase(id());
16}
17
Deepak Kodihalli97431892017-06-12 09:14:57 -050018bool Entry::resolved(bool value)
19{
Patrick Venturef18bf832018-10-26 18:14:00 -070020 auto current =
21 sdbusplus::xyz::openbmc_project::Logging::server::Entry::resolved();
Deepak Kodihalli97431892017-06-12 09:14:57 -050022 if (value != current)
23 {
Patrick Venturef18bf832018-10-26 18:14:00 -070024 value ? associations({}) : associations(assocs);
25 current =
26 sdbusplus::xyz::openbmc_project::Logging::server::Entry::resolved(
27 value);
Deepak Kodihalli97431892017-06-12 09:14:57 -050028 serialize(*this);
29 }
30
31 return current;
32}
33
Adriana Kobylak88d7cf82017-01-24 12:30:15 -060034} // namespace logging
Patrick Venturef18bf832018-10-26 18:14:00 -070035} // namespace phosphor