The Android Open Source Project | 5738f83 | 2012-12-12 16:00:35 -0800 | [diff] [blame] | 1 | /****************************************************************************** |
| 2 | * |
| 3 | * Copyright (C) 2004-2012 Broadcom Corporation |
| 4 | * |
| 5 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 6 | * you may not use this file except in compliance with the License. |
| 7 | * You may obtain a copy of the License at: |
| 8 | * |
| 9 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 10 | * |
| 11 | * Unless required by applicable law or agreed to in writing, software |
| 12 | * distributed under the License is distributed on an "AS IS" BASIS, |
| 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 14 | * See the License for the specific language governing permissions and |
| 15 | * limitations under the License. |
| 16 | * |
| 17 | ******************************************************************************/ |
| 18 | |
| 19 | /****************************************************************************** |
| 20 | * |
| 21 | * This is the interface file for pan call-in functions. |
| 22 | * |
| 23 | ******************************************************************************/ |
| 24 | #ifndef BTA_PAN_CI_H |
| 25 | #define BTA_PAN_CI_H |
| 26 | |
| 27 | #include "bta_pan_api.h" |
| 28 | |
| 29 | /***************************************************************************** |
| 30 | ** Function Declarations |
| 31 | *****************************************************************************/ |
| 32 | #ifdef __cplusplus |
| 33 | extern "C" |
| 34 | { |
| 35 | #endif |
| 36 | |
| 37 | /******************************************************************************* |
| 38 | ** |
| 39 | ** Function bta_pan_ci_tx_ready |
| 40 | ** |
| 41 | ** Description This function sends an event to PAN indicating the phone is |
| 42 | ** ready for more data and PAN should call bta_pan_co_tx_path(). |
| 43 | ** This function is used when the TX data path is configured |
| 44 | ** to use a pull interface. |
| 45 | ** |
| 46 | ** |
| 47 | ** Returns void |
| 48 | ** |
| 49 | *******************************************************************************/ |
Marie Janssen | e9e58ce | 2016-06-17 14:12:17 -0700 | [diff] [blame^] | 50 | extern void bta_pan_ci_tx_ready(uint16_t handle); |
The Android Open Source Project | 5738f83 | 2012-12-12 16:00:35 -0800 | [diff] [blame] | 51 | |
| 52 | /******************************************************************************* |
| 53 | ** |
| 54 | ** Function bta_pan_ci_rx_ready |
| 55 | ** |
| 56 | ** Description This function sends an event to PAN indicating the phone |
| 57 | ** has data available to send to PAN and PAN should call |
| 58 | ** bta_pan_co_rx_path(). This function is used when the RX |
| 59 | ** data path is configured to use a pull interface. |
| 60 | ** |
| 61 | ** |
| 62 | ** Returns void |
| 63 | ** |
| 64 | *******************************************************************************/ |
Marie Janssen | e9e58ce | 2016-06-17 14:12:17 -0700 | [diff] [blame^] | 65 | extern void bta_pan_ci_rx_ready(uint16_t handle); |
The Android Open Source Project | 5738f83 | 2012-12-12 16:00:35 -0800 | [diff] [blame] | 66 | |
| 67 | /******************************************************************************* |
| 68 | ** |
| 69 | ** Function bta_pan_ci_tx_flow |
| 70 | ** |
| 71 | ** Description This function is called to enable or disable data flow on |
| 72 | ** the TX path. The phone should call this function to |
| 73 | ** disable data flow when it is congested and cannot handle |
| 74 | ** any more data sent by bta_pan_co_tx_write() or |
| 75 | ** bta_pan_co_tx_writebuf(). This function is used when the |
| 76 | ** TX data path is configured to use a push interface. |
| 77 | ** |
| 78 | ** |
| 79 | ** Returns void |
| 80 | ** |
| 81 | *******************************************************************************/ |
Marie Janssen | e9e58ce | 2016-06-17 14:12:17 -0700 | [diff] [blame^] | 82 | extern void bta_pan_ci_tx_flow(uint16_t handle, bool enable); |
The Android Open Source Project | 5738f83 | 2012-12-12 16:00:35 -0800 | [diff] [blame] | 83 | |
| 84 | /******************************************************************************* |
| 85 | ** |
| 86 | ** Function bta_pan_ci_rx_writebuf |
| 87 | ** |
| 88 | ** Description This function is called to send data to the phone when |
| 89 | ** the RX path is configured to use a push interface with |
| 90 | ** zero copy. The function sends an event to PAN containing |
Pavlin Radoslavov | cceb430 | 2016-02-05 13:54:43 -0800 | [diff] [blame] | 91 | ** the data buffer. The buffer will be freed by BTA; the |
| 92 | ** phone must not free the buffer. |
The Android Open Source Project | 5738f83 | 2012-12-12 16:00:35 -0800 | [diff] [blame] | 93 | ** |
| 94 | ** |
Marie Janssen | e9e58ce | 2016-06-17 14:12:17 -0700 | [diff] [blame^] | 95 | ** Returns true if flow enabled |
The Android Open Source Project | 5738f83 | 2012-12-12 16:00:35 -0800 | [diff] [blame] | 96 | ** |
| 97 | *******************************************************************************/ |
Marie Janssen | e9e58ce | 2016-06-17 14:12:17 -0700 | [diff] [blame^] | 98 | extern void bta_pan_ci_rx_writebuf(uint16_t handle, BD_ADDR src, BD_ADDR dst, uint16_t protocol, BT_HDR *p_buf, bool ext); |
The Android Open Source Project | 5738f83 | 2012-12-12 16:00:35 -0800 | [diff] [blame] | 99 | |
| 100 | /******************************************************************************* |
| 101 | ** |
| 102 | ** Function bta_pan_ci_readbuf |
| 103 | ** |
| 104 | ** Description This function is called by the phone to read data from PAN |
| 105 | ** when the TX path is configured to use a pull interface. |
Pavlin Radoslavov | cceb430 | 2016-02-05 13:54:43 -0800 | [diff] [blame] | 106 | ** The caller must free the buffer when it is through |
| 107 | ** processing the buffer. |
The Android Open Source Project | 5738f83 | 2012-12-12 16:00:35 -0800 | [diff] [blame] | 108 | ** |
| 109 | ** |
| 110 | ** Returns void |
| 111 | ** |
| 112 | *******************************************************************************/ |
Marie Janssen | e9e58ce | 2016-06-17 14:12:17 -0700 | [diff] [blame^] | 113 | extern BT_HDR * bta_pan_ci_readbuf(uint16_t handle, BD_ADDR src, BD_ADDR dst, uint16_t *p_protocol, |
| 114 | bool* p_ext, bool* p_forward); |
The Android Open Source Project | 5738f83 | 2012-12-12 16:00:35 -0800 | [diff] [blame] | 115 | |
| 116 | /******************************************************************************* |
| 117 | ** |
| 118 | ** Function bta_pan_ci_set_pfilters |
| 119 | ** |
| 120 | ** Description This function is called to set protocol filters |
| 121 | ** |
| 122 | ** |
| 123 | ** Returns void |
| 124 | ** |
| 125 | *******************************************************************************/ |
Marie Janssen | e9e58ce | 2016-06-17 14:12:17 -0700 | [diff] [blame^] | 126 | extern void bta_pan_ci_set_pfilters(uint16_t handle, uint16_t num_filters, uint16_t *p_start_array, uint16_t *p_end_array); |
The Android Open Source Project | 5738f83 | 2012-12-12 16:00:35 -0800 | [diff] [blame] | 127 | |
| 128 | |
| 129 | /******************************************************************************* |
| 130 | ** |
| 131 | ** Function bta_pan_ci_set_mfilters |
| 132 | ** |
| 133 | ** Description This function is called to set multicast filters |
| 134 | ** |
| 135 | ** |
| 136 | ** Returns void |
| 137 | ** |
| 138 | *******************************************************************************/ |
Marie Janssen | e9e58ce | 2016-06-17 14:12:17 -0700 | [diff] [blame^] | 139 | extern void bta_pan_ci_set_mfilters(uint16_t handle, uint16_t num_mcast_filters, uint8_t *p_start_array, |
| 140 | uint8_t *p_end_array); |
The Android Open Source Project | 5738f83 | 2012-12-12 16:00:35 -0800 | [diff] [blame] | 141 | |
| 142 | #ifdef __cplusplus |
| 143 | } |
| 144 | #endif |
| 145 | |
| 146 | #endif /* BTA_PAN_CI_H */ |