blob: 49739a084dcca764535529cb7ada84c21fbf17b1 [file] [log] [blame]
// 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 as bt;
using fuchsia.bluetooth.avrcp as 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 (fxbug.dev/898): change peer_id to fuchsia.bluetooth.PeerId type after BrEdr profile service
/// switches.
GetControllerForTarget(bt.PeerIdString 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<avrcp.NotificationEvent>:avrcp.MAX_NOTIFICATIONS events_supported) error 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 avrcp.ControllerError;
};