| // Copyright 2023 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.hardware.display; |
| |
| using zx; |
| |
| /// Provider for display coordinators. |
| /// |
| /// The driver supports two simultaneous clients - a main client and a virtcon |
| /// client. In some cases, the provider service may provide access to only one or |
| /// the other; if the client tries to open the other then `ZX_ERR_NOT_SUPPORTED` will |
| /// be returned. |
| @discoverable |
| closed protocol Provider { |
| /// Opens a Virtcon client connection to the display coordinator. |
| /// |
| /// On success, `coordinator` and `coordinator_listener` will be bound to |
| /// the display coordinator, as the Virtcon client. |
| /// |
| /// No event will be dispatched to the `Coordinator` protocol. |
| /// |
| /// Returns `ZX_ERR_ALREADY_BOUND` if the display coordinator already has a |
| /// connected Virtcon client. |
| strict OpenCoordinatorWithListenerForVirtcon(resource table { |
| /// Required. |
| 1: coordinator server_end:Coordinator; |
| |
| /// Required. |
| 2: coordinator_listener client_end:CoordinatorListener; |
| }) -> () error zx.Status; |
| |
| /// Opens a primary client connection to the display coordinator. |
| /// |
| /// On success, `coordinator` and `coordinator_listener` will be bound to |
| /// the display coordinator, as the primary client. |
| /// |
| /// No event will be dispatched to the `Coordinator` protocol. |
| /// |
| /// Returns `ZX_ERR_ALREADY_BOUND` if the display coordinator already has a |
| /// connected primary client. |
| strict OpenCoordinatorWithListenerForPrimary(resource table { |
| /// Required. |
| 1: coordinator server_end:Coordinator; |
| |
| /// Required. |
| 2: coordinator_listener client_end:CoordinatorListener; |
| }) -> () error zx.Status; |
| }; |
| |
| // Added to allow service connection to replace devfs |
| service Service { |
| provider client_end:Provider; |
| }; |