| // 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.app.discover; |
| |
| /// Maximum length of a story id. |
| const uint32 STORY_ID_MAX_LENGTH = 1024; |
| |
| /// An ientifier for a story. |
| using StoryId = string:STORY_ID_MAX_LENGTH; |
| |
| /// Maximum length of a module path. |
| const uint32 MODULE_PATH_MAX_LENGTH = 512; |
| const uint32 MODULE_PATH_PART_MAX_LENGTH = 512; |
| |
| /// And identifier for a module. |
| using ModulePathPart = string:MODULE_PATH_PART_MAX_LENGTH; |
| using ModulePath = vector<ModulePathPart>:MODULE_PATH_MAX_LENGTH; |
| |
| /// Interface between sessionmgr and discovermgr to route service connections |
| /// requests that require module scoping. |
| [Discoverable] |
| protocol DiscoverRegistry { |
| /// Retrieves a story module controller for the module identified by `module`. |
| RegisterStoryModule(ModuleIdentifier module, request<StoryModule> request); |
| }; |
| |
| table ModuleIdentifier { |
| /// The ID of the story to which the module belongs. |
| 1: StoryId story_id; |
| |
| /// The named path leading up to this module instance. This path is a unique |
| /// identifier of the module in the story. |
| 2: ModulePath module_path; |
| }; |