blob: 86c4db02b5df1a1a78fa069b4d5266a2cef991ac [file] [log] [blame]
// Copyright 2019 The Fuchsia Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include <stdlib.h>
#include <fuchsia/feedback/cpp/fidl.h>
#include <lib/async-loop/cpp/loop.h>
#include <lib/component/cpp/startup_context.h>
#include <lib/syslog/cpp/logger.h>
#include "feedback_agent.h"
int main(int argc, const char** argv) {
syslog::InitLogger({"feedback_agent"});
fuchsia::feedback::FeedbackAgent feedback_agent;
async::Loop loop(&kAsyncLoopConfigAttachToThread);
std::unique_ptr<component::StartupContext> app_context(
component::StartupContext::CreateFromStartupInfo());
fidl::BindingSet<fuchsia::feedback::DataProvider> bindings;
app_context->outgoing().AddPublicService(
bindings.GetHandler(&feedback_agent));
loop.Run();
return EXIT_SUCCESS;
}