| // 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 fuchsia.modular; |
| |
| using fuchsia.mem; |
| |
| /// Defines the attributes for a Link when the Link is created. |
| struct CreateLinkInfo { |
| /// Passed as root_json argument to StoryProvider.CreateStoryWithInfo() |
| /// Link.Set() to set the value in the root link of the new Story's primary |
| /// module. |
| fuchsia.mem.Buffer initial_data; |
| |
| /// If `allowed_types` is null, the Link contains JSON. No schema validation |
| /// is performed. |
| LinkAllowedTypes? allowed_types; |
| }; |
| |
| struct LinkAllowedTypes { |
| /// The Link must contain an Entity (see Link.SetEntity()) that has at least |
| /// one of `allowed_entity_types` in its `Entity.GetTypes()` return value. |
| /// |
| /// If empty, allows any Entity type. |
| vector<string> allowed_entity_types; |
| }; |