/**
 * Copyright © 2017 IBM Corporation
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
#include "generated.hpp"
#include "sdbusplus.hpp"
#include "sdevent.hpp"


int main(void)
{
    using namespace phosphor::fan;

    auto& event = util::SDEvent::getEvent();
    event.attach(util::SDBusPlus::getBus());

    for (auto& p: presence::ConfigPolicy::get())
    {
        p->monitor();
    }

    event.loop();

    // The loop should never exit.  Exit with
    // non zero status just in case.
    return 1;
}
