| // Copyright 2019 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.bluetooth.avrcp.test; |
| |
| using fuchsia.bluetooth.avrcp; |
| using zx; |
| |
| [Discoverable] |
| protocol PeerManagerExt { |
| /// Returns a test controller client to a remote target service at the peer specified by |
| /// `peer_id`. This client is to be used alongside the primary controller client. |
| /// The test protocol provides additional methods not exposed by primary controller protocol |
| /// that are designed to be used for PTS qualification testing and debugging purposes only. |
| /// WARNING: This test controller can cause breaking side-effects for other controller clients |
| /// connected to this the same peer. Use with caution and avoid having additional primary |
| /// controller clients interacting with the same remote peer while using the test controller. |
| /// TODO (BT-305): change peer_id to fuchsia.bluetooth.PeerId type after BrEdr profile service |
| /// switches. |
| GetControllerForTarget(string peer_id, request<ControllerExt> client) -> () error zx.status; |
| }; |
| |
| /// Provides additional methods not in `Controller` that are strictly for testing and debug. |
| protocol ControllerExt { |
| /// Returns whether there is an underlying connection open with the remote device currently. |
| IsConnected() -> (bool connected); |
| |
| /// Queries the target and returns what events are supported for notification. |
| /// Sends GetCapabilties(0x03 (`EVENTS_SUPPORTED`)) command for all events supported by |
| /// the negoitated version of AVRCP. |
| GetEventsSupported() -> (vector<fuchsia.bluetooth.avrcp.NotificationEvent> events_supported) error fuchsia.bluetooth.avrcp.ControllerError; |
| |
| /// Explicitly attempt to connect to the remote peer. |
| Connect(); |
| |
| /// Explicitly disconnect any L2CAP channels, if any, to the remote peer. |
| Disconnect(); |
| |
| /// Send raw vendor depedent "Control" command packet to a specific PDU on the remote peer. |
| /// Returns the entire response packet including the headers or error if the remote endpoint |
| /// disconnects or does not return a response in set amount of time. |
| SendRawVendorDependentCommand(uint8 pdu_id, bytes command) -> (bytes response) error fuchsia.bluetooth.avrcp.ControllerError; |
| }; |