1 /****************************************************************************** 2 * 3 * Copyright (C) 2016 The Android Open Source Project 4 * Copyright (C) 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 // |p_av_start| is the data associated with the request - see |tBTA_AV_START|. 33 // |pending_start| should be set to true if the BTIF state machine is in 34 // 'pending start' state. 35 // Returns true if an ACK for the local command was sent, otherwise false. 36 bool btif_a2dp_on_started(tBTA_AV_START* p_av_start, bool pending_start); 37 38 // Process 'stop' request from the BTIF state machine to stop A2DP streaming. 39 // |p_av_suspend| is the data associated with the request - see 40 // |tBTA_AV_SUSPEND|. 41 void btif_a2dp_on_stopped(tBTA_AV_SUSPEND* p_av_suspend); 42 43 // Process 'suspend' request from the BTIF state machine to suspend A2DP 44 // streaming. 45 // |p_av_suspend| is the data associated with the request - see 46 // |tBTA_AV_SUSPEND|. 47 void btif_a2dp_on_suspended(tBTA_AV_SUSPEND* p_av_suspend); 48 49 // Process 'offload start' request from the BTIF state machine to start 50 // offloading of the A2DP streaming. 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(tBTA_AV_STATUS status); 55 56 // Dump debug-related information for the A2DP module. 57 // |fd| is the file descriptor to use for writing the ASCII formatted 58 // information. 59 void btif_debug_a2dp_dump(int fd); 60 61 #endif /* BTIF_A2DP_H */ 62