summaryrefslogtreecommitdiffstats
path: root/mojo/shell/public/interfaces/shell_resolver.mojom
blob: 0c4e841858ccdf01b6b7321158971e0a77f153bf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
// Copyright 2016 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

module mojo.shell.mojom;

import "mojo/shell/public/interfaces/capabilities.mojom";

// The result of a Resolve operation via ShellResolver.
struct ResolveResult {
  // The mojo: name that was requested to be resolved.
  string name;

  // The mojo: name of the physical package supplying the requested name. This
  // could be the same name that was passed, or the name of a package that
  // contains it.
  string resolved_name;

  // An additional piece of metadata that identifies what instance |name| should
  // be run in. It's possible that |name| may provide several services that
  // should be run as different instances.
  string qualifier;

  // The set of capabilities provided and required by |name|.
  CapabilitySpec capabilities;

  // A file URL to the package specified by |name|.
  // TODO(beng): What if resolved_mojo_name needs to be re-resolved?
  string package_url;
};

// Implemented exclusively for the Mojo Shell's use in resolving mojo: names
// and reading static manifest information.
interface ShellResolver {
  // Resolves |mojo_name| and returns a ResolveResult containing metadata from
  // the catalog that the Shell uses to run an instance of it.
  ResolveMojoName(string mojo_name) => (ResolveResult result);
};