blob: 662d4b7432286b8211919a96018c62d4986b88a9 [file] [log] [blame] [edit]
// Copyright 2020 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.developer.remotecontrol;
using fuchsia.diagnostics as diagnostics;
const MAX_COMPONENT_SUBDIR_LEN uint16 = 10;
const MAX_SERVICE_NAME_LEN uint16 = 150;
const MAX_MONIKER_SEGMENT_LENGTH uint16 = 100;
type ConnectError = strict enum : uint32 {
// Selector did not match any services.
NO_MATCHING_SERVICES = 1;
// Selector matched multiple services.
MULTIPLE_MATCHING_SERVICES = 2;
// There was an error when trying to find matching services.
SERVICE_DISCOVERY_FAILED = 3;
// A single service was matched, but connecting to it failed.
SERVICE_CONNECT_FAILED = 4;
// Attempting to reroute the requested service via a selector map failed.
SERVICE_REROUTE_FAILED = 5;
};
type ConnectCapabilityError = flexible enum : uint32 {
// The given moniker wasn't valid.
INVALID_MONIKER = 1;
// No capability of the given name was found.
NO_MATCHING_CAPABILITIES = 2;
// No component at the given moniker was found.
NO_MATCHING_COMPONENT = 3;
// A single capability was matched, but connecting to it failed.
CAPABILITY_CONNECT_FAILED = 4;
};
type ServiceMatch = struct {
moniker vector<string:diagnostics.MAX_STRING_SELECTOR_LENGTH>:diagnostics.MAX_MONIKER_SEGMENTS;
subdir string:MAX_COMPONENT_SUBDIR_LEN;
service string:MAX_SERVICE_NAME_LEN;
};