blob: 0e45b2f477bfddbd014c496db78ee268cf82d36a [file] [log] [blame]
// Copyright 2016 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.netconnector;
using fuchsia.sys;
// Special value for GetKnownDeviceNames version_last_seen parameter to
// get the current status immediately.
const uint64 kInitialKnownDeviceNames = 0;
// Primary netconnector service definition.
[Discoverable]
interface NetConnector {
// Registers a running responding service. |service_name| identifies the
// service and is the same name used in |ConnectToService|. |service_provider|
// provides the service. This method is provided so that responding services
// running in a user context can register with a |netconnector| running in a
// device context.
RegisterServiceProvider(string service_name,
fuchsia.sys.ServiceProvider service_provider);
// Gets a provider for services on the specified device. Services provided
// on the local device can be accessed by passing a |device_name| of "local"
// or the actual name of the local device.
GetDeviceServiceProvider(string device_name,
request<fuchsia.sys.ServiceProvider> service_provider);
// Gets the names of known devices. To get the list immediately, call
// |GetKnownDeviceNames(kInitialKnownDeviceNames)|. To get updates thereafter,
// pass the version sent in the previous callback.
GetKnownDeviceNames(uint64 version_last_seen)
-> (uint64 version, vector<string> devices);
};