blob: 9c64bd6d8f4848fd111d003b5e8ea9fdd71fcdc2 [file] [log] [blame]
// Copyright 2018 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.sys2;
using zx;
// An interface for resolving a URI to a component.
//
// This interface is implemented by components that provide support
// for loading components with a particular URI scheme. For example,
// the Fuchsia package component resolver exposes a service with this
// interface to resolve component URIs using the "fuchsia-pkg://" scheme.
//
// To use a resolver to resolve URIs within your realm, register it
// in your realm's manifest. (TODO: explain in more detail)
//
// Note: The component manager is the only intended direct client of this
// interface.
[Discoverable]
interface ComponentResolver {
// Resolves a component with the given URI.
//
// |component_uri| is the unescaped URI of the component to resolve.
//
// If successful, returns |ZX_OK| and information about the component
// that was resolved.
//
// On failure, returns null |info| and...
// - |ZX_ERR_INVALID_ARGS|: The component's URI was malformed.
// - |ZX_ERR_NOT_FOUND|: The component does not exist.
// - |ZX_ERR_UNAVAILABLE|: The resolver was unable to retrieve or parse
// the component's resources.
1: Resolve(string component_uri)
-> (zx.status status, Component component);
};