1 /****************************************************************************** 2 * 3 * Copyright 2016 The Android Open Source Project 4 * Copyright 2009-2012 Broadcom Corporation 5 * 6 * Licensed under the Apache License, Version 2.0 (the "License"); 7 * you may not use this file except in compliance with the License. 8 * You may obtain a copy of the License at: 9 * 10 * http://www.apache.org/licenses/LICENSE-2.0 11 * 12 * Unless required by applicable law or agreed to in writing, software 13 * distributed under the License is distributed on an "AS IS" BASIS, 14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 * See the License for the specific language governing permissions and 16 * limitations under the License. 17 * 18 ******************************************************************************/ 19 20 #ifndef BTIF_A2DP_H 21 #define BTIF_A2DP_H 22 23 #include <stdbool.h> 24 25 #include "bta_av_api.h" 26 27 // Process 'idle' request from the BTIF state machine during initialization. 28 void btif_a2dp_on_idle(void); 29 30 // Process 'start' request from the BTIF state machine to prepare for A2DP 31 // streaming. 32 // |peer_addr| is the peer address. 33 // |p_av_start| is the data associated with the request - see |tBTA_AV_START|. 34 // Returns true if an ACK for the local command was sent, otherwise false. 35 bool btif_a2dp_on_started(const RawAddress& peer_addr, tBTA_AV_START* p_av_start); 36 37 // Process 'stop' request from the BTIF state machine to stop A2DP streaming. 38 // |p_av_suspend| is the data associated with the request - see 39 // |tBTA_AV_SUSPEND|. 40 void btif_a2dp_on_stopped(tBTA_AV_SUSPEND* p_av_suspend); 41 42 // Process 'suspend' request from the BTIF state machine to suspend A2DP 43 // streaming. 44 // |p_av_suspend| is the data associated with the request - see 45 // |tBTA_AV_SUSPEND|. 46 void btif_a2dp_on_suspended(tBTA_AV_SUSPEND* p_av_suspend); 47 48 // Process 'offload start' request from the BTIF state machine to start 49 // offloading of the A2DP streaming. 50 // |peer_addr| is the peer address. 51 // |status| is the processing status of the request prior to this call. 52 // The value can be |BTA_AV_SUCCESS| if the processing has been successful 53 // so far, or |BTA_AV_FAIL*| if the request has already failed. 54 void btif_a2dp_on_offload_started(const RawAddress& peer_addr, 55 tBTA_AV_STATUS status); 56 57 // Dump debug-related information for the A2DP module. 58 // |fd| is the file descriptor to use for writing the ASCII formatted 59 // information. 60 void btif_debug_a2dp_dump(int fd); 61 62 #endif /* BTIF_A2DP_H */ 63