blob: 9c35e49f97e727527896b7b1952b2ee305a2e54a [file] [log] [blame]
// Copyright 2020 The Chromium OS 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 "image-burner/daemon.h"
#include <utility>
#include "image-burner/image_burn_service.h"
namespace imageburn {
Daemon::Daemon() : brillo::DBusServiceDaemon(kImageBurnServiceName) {}
Daemon::~Daemon() = default;
void Daemon::RegisterDBusObjectsAsync(
brillo::dbus_utils::AsyncEventSequencer* sequencer) {
service_ = std::make_unique<ImageBurnService>(bus_, &burner_);
burner_.InitSignalSender(service_.get());
service_->RegisterAsync(sequencer->GetHandler(
"Failed to export image-burner service.", true /* failure_is_fatal */));
}
} // namespace imageburn