blob: a85704ab7f1308a77d5c0700120fab2d41533403 [file] [log] [blame]
// Copyright 2017 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 modular;
// import "lib/daisy/fidl/daisy.fidl";
// import "lib/module/fidl/link_path.fidl";
// import "lib/surface/fidl/surface.fidl";
// Information about modules in a Story.
struct ModuleData {
// The URL of the module application.
string module_url;
// The named path leading up to this module. The last name in this array is
// this module's name.
vector<string> module_path;
// Contains instructions for how to build a Chain at runtime.
ChainData chain_data;
// The name of the link the module was started with.
LinkPath link_path;
// The way in which this module was first started in the story.
ModuleSource module_source;
// The |surface_relation| that was used to start this module with. The same is
// used when re-inflating the module. A SurfaceRelation value of null
// represents an embedded module that is not managed by the story shell.
SurfaceRelation? surface_relation;
// True if an externally-started module has called ModuleContext.Done() and
// has been stopped by the story runner, or if an internally-started module
// was stopped by its parent module using ModuleController.Stop().
bool module_stopped;
// The daisy that was issued to start this module.
Daisy? daisy;
};
enum ModuleSource {
// Module that was started from within the story by another module via
// ModuleContext.StartModuleDeprecated() and ModuleContext.StartModuleInShell().
INTERNAL = 0;
// Module that was started from outside the story by Maxwell / UserShell via
// StoryController.AddModule() or StoryController.CreateStory() as first
// module.
EXTERNAL = 1;
};
struct ChainData {
// For each key in the Chain, what Link does it point to?
vector<ChainKeyToLinkData> key_to_link_map;
};
struct ChainKeyToLinkData {
// A null key is allowed for backwards compatibility with default links.
// MI4-739
string? key;
LinkPath link_path;
};