blob: 48d9f04550b83f83d4661f1701627daf21a1ab65 [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.
library fuchsia.modular.storymodel;
using fuchsia.modular;
/// IMPORTANT: StoryModel must only contain field types that are cloneable.
///
/// The `StoryModel` FIDL table is used to represent the state of a story.
/// `sessionmgr` keeps a separate `StoryModel` in memory for each running story,
/// and also persists changes to it onto storage.
table StoryModel {
/// The name of the story, set at story create time.
///
/// Always set. Immutable.
1: string:MAX_STORY_NAME_LENGTH name;
/// An enum describing if the story is RUNNING, STOPPING, STOPPED.
///
/// Always set. Defaults to StoryState::STOPPED.
2: fuchsia.modular.StoryState runtime_state;
/// An enum describing how the story should be displayed, when focused,
/// in the StoryShell.
///
/// Always set. Defaults to StoryVisibilityState::DEFAULT.
3: fuchsia.modular.StoryVisibilityState visibility_state;
/// A list of modules present in the story.
///
/// Always set. Defaults to an empty list.
4: vector<ModuleModel>:MAX_MODULES_PER_STORY modules;
};
table ModuleModel {
/// The name of the module, set by the client that requested creation
/// of the module. The name uniquely identifies this module within
/// the story.
///
/// Always set. Immutable.
1: string:MAX_MODULE_NAME_LENGTH name;
};