Skip to content
Snippets Groups Projects
Commit 3fbe1158 authored by Miguel Flores Ruiz de Eguino's avatar Miguel Flores Ruiz de Eguino Committed by CQ bot account: commit-bot@chromium.org
Browse files

[discover] Add DiscoverManager and ModuleOutput FIDL protocols

MI4-2399 #done

TESTED=build

Change-Id: I349581101aa35e29e14dee3058b62bcde963cbd9
parent 87f68e69
No related branches found
No related tags found
No related merge requests found
# 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.
import("//build/fidl/fidl.gni")
fidl("fuchsia.app.discover") {
sdk_category = "partner"
sources = [
"discover_manager.fidl",
"module_output.fidl",
]
deps = [
"//sdk/fidl/fuchsia.app",
]
}
miguelfrde@google.com
schilit@google.com
# Discover FIDL API
Experimental.
## DiscoverManager
Sessionmgr routes modules' requests for ModuleOutputWriter to discovermgr via
the DiscoverRegistry protocol. While doing so, it provides the discovermgr with
a unique identifier for the module.
This interface is meant to be used only by sessionmgr.
## ModuleOutputWriter
Provided to modules to write to output parameters. Entities written to these outputs
will be used in suggested action inputs by the discovermgr.
This interface is meant to be used by modules.
// 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;
using fuchsia.app;
/// Interface between sessionmgr and discovermgr to route service connections
/// requests that require module scoping.
[Discoverable]
protocol DiscoverRegistry {
/// Retrieves a module output writer for the module identified by |module|.
RegisterModuleOutputWriter(ModuleIdentifier module, request<ModuleOutputWriter> request);
};
table ModuleIdentifier {
/// The ID of the story to which the module belongs.
1: fuchsia.app.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: vector<string> module_path;
};
// 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;
[Discoverable]
protocol ModuleOutputWriter {
/// Writes the |entity_reference| to the module's |output_parameter_name|
/// output. If no entity is provided, the output will be unset.
/// Return happens upon completion of a successful write.
Write(string output_name, string? entity_reference) -> () error OutputError;
};
/// Errors that can occur when writing to an output.
enum OutputError : int32 {
/// If the output doesn't match a parameter defined in the module manifest
/// for the action currently being handled by the module.
UNKNOWN_NAME = 1;
/// If the entity reference couldn't be resolved.
UNKNOWN_ENTITY_REFERENCE = 2;
/// If the entity type written doesn't match the type defined in the module
/// manifest for the action currently being handled by the module..
INVALID_ENTITY_TYPE = 3;
};
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment