| // 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. |
| |
| module netconnector; |
| |
| import "lib/app/fidl/service_provider.fidl"; |
| |
| // Primary netconnector service definition. |
| [ServiceName="netconnector::NetConnector"] |
| interface NetConnector { |
| // Special value for GetKnownDeviceNames version_last_seen parameter to |
| // get the current status immediately. |
| const uint64 kInitialKnownDeviceNames = 0; |
| |
| // 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, |
| app.ServiceProvider service_provider); |
| |
| // Gets a provider for services on the specified device. |
| GetDeviceServiceProvider(string device_name, |
| app.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, array<string> devices); |
| }; |