summaryrefslogtreecommitdiffstats
path: root/elog_entry.cpp
blob: 74fcc4b7d70d4c8f4f95fe985661c11505229e63 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#include "elog_entry.hpp"
#include "log_manager.hpp"
#include "elog_serialize.hpp"

namespace phosphor
{
namespace logging
{

// TODO Add interfaces to handle the error log id numbering

void Entry::delete_()
{
    parent.erase(id());
}

bool Entry::resolved(bool value)
{
    auto current = sdbusplus::xyz::openbmc_project::
                       Logging::server::Entry::resolved();
    if (value != current)
    {
        value ?
            associations({}) :
            associations(assocs);
        current = sdbusplus::xyz::openbmc_project::
                      Logging::server::Entry::resolved(value);
        serialize(*this);
    }

    return current;
}

} // namespace logging
} // namepsace phosphor
OpenPOWER on IntegriCloud