blob: b37a5715b2949c7c3cb660164fd81007f9d5670c [file] [log] [blame]
// Copyright 2018 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 "peridot/bin/sessionmgr/story/model/story_model_storage.h"
#include <lib/fxl/logging.h>
namespace modular {
StoryModelStorage::StoryModelStorage() = default;
StoryModelStorage::~StoryModelStorage() = default;
void StoryModelStorage::SetObserveCallback(
fit::function<
void(std::vector<fuchsia::modular::storymodel::StoryModelMutation>)>
callback) {
observe_callback_ = std::move(callback);
}
void StoryModelStorage::Observe(
std::vector<fuchsia::modular::storymodel::StoryModelMutation> commands) {
FXL_DCHECK(observe_callback_);
observe_callback_(std::move(commands));
}
} // namespace modular