| // 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. |
| library fuchsia.modular; |
| |
| /// StoryShellFactory creates or returns an existing `StoryShell` for a particular story. |
| /// This is intended to be implemented by session shells that want to implement |
| /// StoryShell functionality themselves. |
| @discoverable |
| protocol StoryShellFactory { |
| /// Requests a StoryShell for the story with the given `story_id`. |
| AttachStory(resource struct { |
| story_id string:MAX; |
| story_shell server_end:StoryShell; |
| }); |
| |
| /// Instructs the session shell to teardown the story shell with the given `story_id`. |
| /// This will be called before the story is stopped. |
| DetachStory(struct { |
| story_id string:MAX; |
| }) -> (); |
| }; |