15738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project/******************************************************************************
25738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project *
35b790feeeb211c42bf78ca3ae9c26aa30e516765Jakub Pawlowski *  Copyright 2006-2012 Broadcom Corporation
45738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project *
55738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project *  Licensed under the Apache License, Version 2.0 (the "License");
65738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project *  you may not use this file except in compliance with the License.
75738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project *  You may obtain a copy of the License at:
85738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project *
95738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project *  http://www.apache.org/licenses/LICENSE-2.0
105738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project *
115738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project *  Unless required by applicable law or agreed to in writing, software
125738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project *  distributed under the License is distributed on an "AS IS" BASIS,
135738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
145738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project *  See the License for the specific language governing permissions and
155738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project *  limitations under the License.
165738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project *
175738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project ******************************************************************************/
185738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project
195738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project/******************************************************************************
205738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project *
215738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project *  This is the public interface file the BTA Java I/F
225738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project *
235738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project ******************************************************************************/
245738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project#ifndef BTA_JV_API_H
255738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project#define BTA_JV_API_H
265738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project
275738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project#include "bt_target.h"
285738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project#include "bt_types.h"
295738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project#include "bta_api.h"
305738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project#include "btm_api.h"
318372aa5fa535ee4f09c09981b6125b54ace31fe2Kim Schulz#include "l2c_api.h"
328372aa5fa535ee4f09c09981b6125b54ace31fe2Kim Schulz
335738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project/*****************************************************************************
348af480e24549ba51a3f6858d9d9af504715e0beaMyles Watson *  Constants and data types
358af480e24549ba51a3f6858d9d9af504715e0beaMyles Watson ****************************************************************************/
365738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project/* status values */
37cd1fd07f1306e08fe048682dd5918987e579f937Myles Watson#define BTA_JV_SUCCESS 0     /* Successful operation. */
38cd1fd07f1306e08fe048682dd5918987e579f937Myles Watson#define BTA_JV_FAILURE 1     /* Generic failure. */
39cd1fd07f1306e08fe048682dd5918987e579f937Myles Watson#define BTA_JV_BUSY 2        /* Temporarily can not handle this request. */
40cd1fd07f1306e08fe048682dd5918987e579f937Myles Watson#define BTA_JV_NO_DATA 3     /* no data. */
41cd1fd07f1306e08fe048682dd5918987e579f937Myles Watson#define BTA_JV_NO_RESOURCE 4 /* No more set pm control block */
425738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project
43e9e58ced195ec2c983c7723c9cbdabd45eb0f2fdMarie Janssentypedef uint8_t tBTA_JV_STATUS;
44cd1fd07f1306e08fe048682dd5918987e579f937Myles Watson#define BTA_JV_INTERNAL_ERR (-1) /* internal error. */
45cd1fd07f1306e08fe048682dd5918987e579f937Myles Watson
46cd1fd07f1306e08fe048682dd5918987e579f937Myles Watson#define BTA_JV_MAX_UUIDS SDP_MAX_UUID_FILTERS
47cd1fd07f1306e08fe048682dd5918987e579f937Myles Watson#define BTA_JV_MAX_ATTRS SDP_MAX_ATTR_FILTERS
48cd1fd07f1306e08fe048682dd5918987e579f937Myles Watson#define BTA_JV_MAX_SDP_REC SDP_MAX_RECORDS
49cd1fd07f1306e08fe048682dd5918987e579f937Myles Watson#define BTA_JV_MAX_L2C_CONN                                                    \
50cd1fd07f1306e08fe048682dd5918987e579f937Myles Watson  GAP_MAX_CONNECTIONS /* GAP handle is used as index, hence do not change this \
51cd1fd07f1306e08fe048682dd5918987e579f937Myles Watson                         value */
52cd1fd07f1306e08fe048682dd5918987e579f937Myles Watson#define BTA_JV_MAX_SCN \
53cd1fd07f1306e08fe048682dd5918987e579f937Myles Watson  PORT_MAX_RFC_PORTS /* same as BTM_MAX_SCN (in btm_int.h) */
54cd1fd07f1306e08fe048682dd5918987e579f937Myles Watson#define BTA_JV_MAX_RFC_CONN MAX_RFC_PORTS
555738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project
565738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project#ifndef BTA_JV_DEF_RFC_MTU
57cd1fd07f1306e08fe048682dd5918987e579f937Myles Watson#define BTA_JV_DEF_RFC_MTU (3 * 330)
585738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project#endif
595738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project
605738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project#ifndef BTA_JV_MAX_RFC_SR_SESSION
61cd1fd07f1306e08fe048682dd5918987e579f937Myles Watson#define BTA_JV_MAX_RFC_SR_SESSION MAX_BD_CONNECTIONS
625738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project#endif
635738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project
645738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project/* BTA_JV_MAX_RFC_SR_SESSION can not be bigger than MAX_BD_CONNECTIONS */
655738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project#if (BTA_JV_MAX_RFC_SR_SESSION > MAX_BD_CONNECTIONS)
665738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project#undef BTA_JV_MAX_RFC_SR_SESSION
67cd1fd07f1306e08fe048682dd5918987e579f937Myles Watson#define BTA_JV_MAX_RFC_SR_SESSION MAX_BD_CONNECTIONS
685738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project#endif
695738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project
705738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project#define BTA_JV_FIRST_SERVICE_ID BTA_FIRST_JV_SERVICE_ID
71cd1fd07f1306e08fe048682dd5918987e579f937Myles Watson#define BTA_JV_LAST_SERVICE_ID BTA_LAST_JV_SERVICE_ID
72cd1fd07f1306e08fe048682dd5918987e579f937Myles Watson#define BTA_JV_NUM_SERVICE_ID \
73cd1fd07f1306e08fe048682dd5918987e579f937Myles Watson  (BTA_LAST_JV_SERVICE_ID - BTA_FIRST_JV_SERVICE_ID + 1)
745738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project
755738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project/* Discoverable modes */
76cd1fd07f1306e08fe048682dd5918987e579f937Myles Watsonenum { BTA_JV_DISC_NONE, BTA_JV_DISC_LIMITED, BTA_JV_DISC_GENERAL };
77e9e58ced195ec2c983c7723c9cbdabd45eb0f2fdMarie Janssentypedef uint16_t tBTA_JV_DISC;
785738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project
79cd1fd07f1306e08fe048682dd5918987e579f937Myles Watson#define BTA_JV_ROLE_SLAVE BTM_ROLE_SLAVE
80cd1fd07f1306e08fe048682dd5918987e579f937Myles Watson#define BTA_JV_ROLE_MASTER BTM_ROLE_MASTER
81e9e58ced195ec2c983c7723c9cbdabd45eb0f2fdMarie Janssentypedef uint32_t tBTA_JV_ROLE;
825738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project
83cd1fd07f1306e08fe048682dd5918987e579f937Myles Watson#define BTA_JV_SERVICE_LMTD_DISCOVER                                       \
84cd1fd07f1306e08fe048682dd5918987e579f937Myles Watson  BTM_COD_SERVICE_LMTD_DISCOVER                                  /* 0x0020 \
85cd1fd07f1306e08fe048682dd5918987e579f937Myles Watson                                                                    */
86cd1fd07f1306e08fe048682dd5918987e579f937Myles Watson#define BTA_JV_SERVICE_POSITIONING BTM_COD_SERVICE_POSITIONING   /* 0x0100 */
87cd1fd07f1306e08fe048682dd5918987e579f937Myles Watson#define BTA_JV_SERVICE_NETWORKING BTM_COD_SERVICE_NETWORKING     /* 0x0200 */
88cd1fd07f1306e08fe048682dd5918987e579f937Myles Watson#define BTA_JV_SERVICE_RENDERING BTM_COD_SERVICE_RENDERING       /* 0x0400 */
89cd1fd07f1306e08fe048682dd5918987e579f937Myles Watson#define BTA_JV_SERVICE_CAPTURING BTM_COD_SERVICE_CAPTURING       /* 0x0800 */
90cd1fd07f1306e08fe048682dd5918987e579f937Myles Watson#define BTA_JV_SERVICE_OBJ_TRANSFER BTM_COD_SERVICE_OBJ_TRANSFER /* 0x1000 */
91cd1fd07f1306e08fe048682dd5918987e579f937Myles Watson#define BTA_JV_SERVICE_AUDIO BTM_COD_SERVICE_AUDIO               /* 0x2000 */
92cd1fd07f1306e08fe048682dd5918987e579f937Myles Watson#define BTA_JV_SERVICE_TELEPHONY BTM_COD_SERVICE_TELEPHONY       /* 0x4000 */
93cd1fd07f1306e08fe048682dd5918987e579f937Myles Watson#define BTA_JV_SERVICE_INFORMATION BTM_COD_SERVICE_INFORMATION   /* 0x8000 */
945738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project
952f338f25530d2aaab7acf45701c271d10b81d96dGanesh Ganapathi Batta/* JV ID type */
96cd1fd07f1306e08fe048682dd5918987e579f937Myles Watson#define BTA_JV_PM_ID_1 1     /* PM example profile 1 */
97cd1fd07f1306e08fe048682dd5918987e579f937Myles Watson#define BTA_JV_PM_ID_2 2     /* PM example profile 2 */
98cd1fd07f1306e08fe048682dd5918987e579f937Myles Watson#define BTA_JV_PM_ID_CLEAR 0 /* Special JV ID used to clear PM profile */
99cd1fd07f1306e08fe048682dd5918987e579f937Myles Watson#define BTA_JV_PM_ALL 0xFF   /* Generic match all id, see bta_dm_cfg.c */
100e9e58ced195ec2c983c7723c9cbdabd45eb0f2fdMarie Janssentypedef uint8_t tBTA_JV_PM_ID;
1015738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project
102cd1fd07f1306e08fe048682dd5918987e579f937Myles Watson#define BTA_JV_PM_HANDLE_CLEAR \
103cd1fd07f1306e08fe048682dd5918987e579f937Myles Watson  0xFF /* Special JV ID used to clear PM profile  */
1042f338f25530d2aaab7acf45701c271d10b81d96dGanesh Ganapathi Batta
105cd1fd07f1306e08fe048682dd5918987e579f937Myles Watson/* define maximum number of registered PM entities. should be in sync with bta
106cd1fd07f1306e08fe048682dd5918987e579f937Myles Watson * pm! */
1072f338f25530d2aaab7acf45701c271d10b81d96dGanesh Ganapathi Batta#ifndef BTA_JV_PM_MAX_NUM
1082f338f25530d2aaab7acf45701c271d10b81d96dGanesh Ganapathi Batta#define BTA_JV_PM_MAX_NUM 5
1092f338f25530d2aaab7acf45701c271d10b81d96dGanesh Ganapathi Batta#endif
1102f338f25530d2aaab7acf45701c271d10b81d96dGanesh Ganapathi Batta
1112f338f25530d2aaab7acf45701c271d10b81d96dGanesh Ganapathi Batta/* JV pm connection states */
112cd1fd07f1306e08fe048682dd5918987e579f937Myles Watsonenum {
113cd1fd07f1306e08fe048682dd5918987e579f937Myles Watson  BTA_JV_CONN_OPEN = 0, /* Connection opened state */
114cd1fd07f1306e08fe048682dd5918987e579f937Myles Watson  BTA_JV_CONN_CLOSE,    /* Connection closed state */
115cd1fd07f1306e08fe048682dd5918987e579f937Myles Watson  BTA_JV_APP_OPEN,      /* JV Application opened state */
116cd1fd07f1306e08fe048682dd5918987e579f937Myles Watson  BTA_JV_APP_CLOSE,     /* JV Application closed state */
117cd1fd07f1306e08fe048682dd5918987e579f937Myles Watson  BTA_JV_SCO_OPEN,      /* SCO connection opened state */
118cd1fd07f1306e08fe048682dd5918987e579f937Myles Watson  BTA_JV_SCO_CLOSE,     /* SCO connection opened state */
119cd1fd07f1306e08fe048682dd5918987e579f937Myles Watson  BTA_JV_CONN_IDLE,     /* Connection idle state */
120cd1fd07f1306e08fe048682dd5918987e579f937Myles Watson  BTA_JV_CONN_BUSY,     /* Connection busy state */
121cd1fd07f1306e08fe048682dd5918987e579f937Myles Watson  BTA_JV_MAX_CONN_STATE /* Max number of connection state */
1222f338f25530d2aaab7acf45701c271d10b81d96dGanesh Ganapathi Batta};
123e9e58ced195ec2c983c7723c9cbdabd45eb0f2fdMarie Janssentypedef uint8_t tBTA_JV_CONN_STATE;
1245738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project
1258372aa5fa535ee4f09c09981b6125b54ace31fe2Kim Schulz/* JV Connection types */
126cd1fd07f1306e08fe048682dd5918987e579f937Myles Watson#define BTA_JV_CONN_TYPE_RFCOMM 0
127cd1fd07f1306e08fe048682dd5918987e579f937Myles Watson#define BTA_JV_CONN_TYPE_L2CAP 1
128cd1fd07f1306e08fe048682dd5918987e579f937Myles Watson#define BTA_JV_CONN_TYPE_L2CAP_LE 2
1298372aa5fa535ee4f09c09981b6125b54ace31fe2Kim Schulz
1305738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project/* Java I/F callback events */
1315738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project/* events received by tBTA_JV_DM_CBACK */
132cd1fd07f1306e08fe048682dd5918987e579f937Myles Watson#define BTA_JV_ENABLE_EVT 0         /* JV enabled */
133cd1fd07f1306e08fe048682dd5918987e579f937Myles Watson#define BTA_JV_GET_SCN_EVT 6        /* Reserved an SCN */
134cd1fd07f1306e08fe048682dd5918987e579f937Myles Watson#define BTA_JV_GET_PSM_EVT 7        /* Reserved a PSM */
135cd1fd07f1306e08fe048682dd5918987e579f937Myles Watson#define BTA_JV_DISCOVERY_COMP_EVT 8 /* SDP discovery complete */
136cd1fd07f1306e08fe048682dd5918987e579f937Myles Watson#define BTA_JV_CREATE_RECORD_EVT 11 /* the result for BTA_JvCreateRecord */
1378372aa5fa535ee4f09c09981b6125b54ace31fe2Kim Schulz/* events received by tBTA_JV_L2CAP_CBACK */
138cd1fd07f1306e08fe048682dd5918987e579f937Myles Watson#define BTA_JV_L2CAP_OPEN_EVT 16     /* open status of L2CAP connection */
139cd1fd07f1306e08fe048682dd5918987e579f937Myles Watson#define BTA_JV_L2CAP_CLOSE_EVT 17    /* L2CAP connection closed */
140cd1fd07f1306e08fe048682dd5918987e579f937Myles Watson#define BTA_JV_L2CAP_START_EVT 18    /* L2CAP server started */
141cd1fd07f1306e08fe048682dd5918987e579f937Myles Watson#define BTA_JV_L2CAP_CL_INIT_EVT 19  /* L2CAP client initiated a connection */
142cd1fd07f1306e08fe048682dd5918987e579f937Myles Watson#define BTA_JV_L2CAP_DATA_IND_EVT 20 /* L2CAP connection received data */
143cd1fd07f1306e08fe048682dd5918987e579f937Myles Watson#define BTA_JV_L2CAP_CONG_EVT \
144cd1fd07f1306e08fe048682dd5918987e579f937Myles Watson  21 /* L2CAP connection congestion status changed */
145cd1fd07f1306e08fe048682dd5918987e579f937Myles Watson#define BTA_JV_L2CAP_READ_EVT 22  /* the result for BTA_JvL2capRead */
146cd1fd07f1306e08fe048682dd5918987e579f937Myles Watson#define BTA_JV_L2CAP_WRITE_EVT 24 /* the result for BTA_JvL2capWrite*/
147cd1fd07f1306e08fe048682dd5918987e579f937Myles Watson#define BTA_JV_L2CAP_WRITE_FIXED_EVT \
148cd1fd07f1306e08fe048682dd5918987e579f937Myles Watson  25 /* the result for BTA_JvL2capWriteFixed */
1495738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project
1505738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project/* events received by tBTA_JV_RFCOMM_CBACK */
151cd1fd07f1306e08fe048682dd5918987e579f937Myles Watson#define BTA_JV_RFCOMM_OPEN_EVT                                                \
152cd1fd07f1306e08fe048682dd5918987e579f937Myles Watson  26                               /* open status of RFCOMM Client connection \
153cd1fd07f1306e08fe048682dd5918987e579f937Myles Watson                                      */
154cd1fd07f1306e08fe048682dd5918987e579f937Myles Watson#define BTA_JV_RFCOMM_CLOSE_EVT 27 /* RFCOMM connection closed */
155cd1fd07f1306e08fe048682dd5918987e579f937Myles Watson#define BTA_JV_RFCOMM_START_EVT 28 /* RFCOMM server started */
156cd1fd07f1306e08fe048682dd5918987e579f937Myles Watson#define BTA_JV_RFCOMM_CL_INIT_EVT                                             \
157cd1fd07f1306e08fe048682dd5918987e579f937Myles Watson  29                                  /* RFCOMM client initiated a connection \
158cd1fd07f1306e08fe048682dd5918987e579f937Myles Watson                                         */
159cd1fd07f1306e08fe048682dd5918987e579f937Myles Watson#define BTA_JV_RFCOMM_DATA_IND_EVT 30 /* RFCOMM connection received data */
160cd1fd07f1306e08fe048682dd5918987e579f937Myles Watson#define BTA_JV_RFCOMM_CONG_EVT \
161cd1fd07f1306e08fe048682dd5918987e579f937Myles Watson  31 /* RFCOMM connection congestion status changed */
162cd1fd07f1306e08fe048682dd5918987e579f937Myles Watson#define BTA_JV_RFCOMM_WRITE_EVT 33 /* the result for BTA_JvRfcommWrite*/
163cd1fd07f1306e08fe048682dd5918987e579f937Myles Watson#define BTA_JV_RFCOMM_SRV_OPEN_EVT \
164cd1fd07f1306e08fe048682dd5918987e579f937Myles Watson  34                      /* open status of Server RFCOMM connection */
165cd1fd07f1306e08fe048682dd5918987e579f937Myles Watson#define BTA_JV_MAX_EVT 35 /* max number of JV events */
1665738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project
167e9e58ced195ec2c983c7723c9cbdabd45eb0f2fdMarie Janssentypedef uint16_t tBTA_JV_EVT;
1685738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project
1695738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project/* data associated with BTA_JV_SET_DISCOVER_EVT */
170cd1fd07f1306e08fe048682dd5918987e579f937Myles Watsontypedef struct {
171cd1fd07f1306e08fe048682dd5918987e579f937Myles Watson  tBTA_JV_STATUS status;  /* Whether the operation succeeded or failed. */
172cd1fd07f1306e08fe048682dd5918987e579f937Myles Watson  tBTA_JV_DISC disc_mode; /* The current discoverable mode */
1735738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project} tBTA_JV_SET_DISCOVER;
1745738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project
1755738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project/* data associated with BTA_JV_DISCOVERY_COMP_EVT_ */
176cd1fd07f1306e08fe048682dd5918987e579f937Myles Watsontypedef struct {
177cd1fd07f1306e08fe048682dd5918987e579f937Myles Watson  tBTA_JV_STATUS status; /* Whether the operation succeeded or failed. */
178cd1fd07f1306e08fe048682dd5918987e579f937Myles Watson  int scn;               /* channel # */
1795738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project} tBTA_JV_DISCOVERY_COMP;
1805738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project
1815738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project/* data associated with BTA_JV_CREATE_RECORD_EVT */
182cd1fd07f1306e08fe048682dd5918987e579f937Myles Watsontypedef struct {
183cd1fd07f1306e08fe048682dd5918987e579f937Myles Watson  tBTA_JV_STATUS status; /* Whether the operation succeeded or failed. */
1845738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project} tBTA_JV_CREATE_RECORD;
1855738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project
1868372aa5fa535ee4f09c09981b6125b54ace31fe2Kim Schulz/* data associated with BTA_JV_L2CAP_OPEN_EVT */
187cd1fd07f1306e08fe048682dd5918987e579f937Myles Watsontypedef struct {
188cd1fd07f1306e08fe048682dd5918987e579f937Myles Watson  tBTA_JV_STATUS status; /* Whether the operation succeeded or failed. */
189cd1fd07f1306e08fe048682dd5918987e579f937Myles Watson  uint32_t handle;       /* The connection handle */
190a484a888196ddf8bcbf1ad3226d6451bc735a94bJakub Pawlowski  RawAddress rem_bda;    /* The peer address */
191cd1fd07f1306e08fe048682dd5918987e579f937Myles Watson  int32_t tx_mtu;        /* The transmit MTU */
1928372aa5fa535ee4f09c09981b6125b54ace31fe2Kim Schulz} tBTA_JV_L2CAP_OPEN;
1938372aa5fa535ee4f09c09981b6125b54ace31fe2Kim Schulz
1948372aa5fa535ee4f09c09981b6125b54ace31fe2Kim Schulz/* data associated with BTA_JV_L2CAP_OPEN_EVT for LE sockets */
195cd1fd07f1306e08fe048682dd5918987e579f937Myles Watsontypedef struct {
196cd1fd07f1306e08fe048682dd5918987e579f937Myles Watson  tBTA_JV_STATUS status; /* Whether the operation succeeded or failed. */
197cd1fd07f1306e08fe048682dd5918987e579f937Myles Watson  uint32_t handle;       /* The connection handle */
198a484a888196ddf8bcbf1ad3226d6451bc735a94bJakub Pawlowski  RawAddress rem_bda;    /* The peer address */
199cd1fd07f1306e08fe048682dd5918987e579f937Myles Watson  int32_t tx_mtu;        /* The transmit MTU */
200cd1fd07f1306e08fe048682dd5918987e579f937Myles Watson  void** p_p_cback;      /* set them for new socket */
201cd1fd07f1306e08fe048682dd5918987e579f937Myles Watson  void** p_user_data;    /* set them for new socket */
2028372aa5fa535ee4f09c09981b6125b54ace31fe2Kim Schulz
2038372aa5fa535ee4f09c09981b6125b54ace31fe2Kim Schulz} tBTA_JV_L2CAP_LE_OPEN;
2048372aa5fa535ee4f09c09981b6125b54ace31fe2Kim Schulz
2058372aa5fa535ee4f09c09981b6125b54ace31fe2Kim Schulz/* data associated with BTA_JV_L2CAP_CLOSE_EVT */
206cd1fd07f1306e08fe048682dd5918987e579f937Myles Watsontypedef struct {
207cd1fd07f1306e08fe048682dd5918987e579f937Myles Watson  tBTA_JV_STATUS status; /* Whether the operation succeeded or failed. */
208cd1fd07f1306e08fe048682dd5918987e579f937Myles Watson  uint32_t handle;       /* The connection handle */
209cd1fd07f1306e08fe048682dd5918987e579f937Myles Watson  bool async;            /* false, if local initiates disconnect */
2108372aa5fa535ee4f09c09981b6125b54ace31fe2Kim Schulz} tBTA_JV_L2CAP_CLOSE;
2118372aa5fa535ee4f09c09981b6125b54ace31fe2Kim Schulz
2128372aa5fa535ee4f09c09981b6125b54ace31fe2Kim Schulz/* data associated with BTA_JV_L2CAP_START_EVT */
213cd1fd07f1306e08fe048682dd5918987e579f937Myles Watsontypedef struct {
214cd1fd07f1306e08fe048682dd5918987e579f937Myles Watson  tBTA_JV_STATUS status; /* Whether the operation succeeded or failed. */
215cd1fd07f1306e08fe048682dd5918987e579f937Myles Watson  uint32_t handle;       /* The connection handle */
216cd1fd07f1306e08fe048682dd5918987e579f937Myles Watson  uint8_t sec_id;        /* security ID used by this server */
2178372aa5fa535ee4f09c09981b6125b54ace31fe2Kim Schulz} tBTA_JV_L2CAP_START;
2188372aa5fa535ee4f09c09981b6125b54ace31fe2Kim Schulz
2198372aa5fa535ee4f09c09981b6125b54ace31fe2Kim Schulz/* data associated with BTA_JV_L2CAP_CL_INIT_EVT */
220cd1fd07f1306e08fe048682dd5918987e579f937Myles Watsontypedef struct {
221cd1fd07f1306e08fe048682dd5918987e579f937Myles Watson  tBTA_JV_STATUS status; /* Whether the operation succeeded or failed. */
222cd1fd07f1306e08fe048682dd5918987e579f937Myles Watson  uint32_t handle;       /* The connection handle */
223cd1fd07f1306e08fe048682dd5918987e579f937Myles Watson  uint8_t sec_id;        /* security ID used by this client */
2248372aa5fa535ee4f09c09981b6125b54ace31fe2Kim Schulz} tBTA_JV_L2CAP_CL_INIT;
2258372aa5fa535ee4f09c09981b6125b54ace31fe2Kim Schulz
2268372aa5fa535ee4f09c09981b6125b54ace31fe2Kim Schulz/* data associated with BTA_JV_L2CAP_CONG_EVT */
227cd1fd07f1306e08fe048682dd5918987e579f937Myles Watsontypedef struct {
228cd1fd07f1306e08fe048682dd5918987e579f937Myles Watson  tBTA_JV_STATUS status; /* Whether the operation succeeded or failed. */
229cd1fd07f1306e08fe048682dd5918987e579f937Myles Watson  uint32_t handle;       /* The connection handle */
230cd1fd07f1306e08fe048682dd5918987e579f937Myles Watson  bool cong;             /* true, congested. false, uncongested */
2318372aa5fa535ee4f09c09981b6125b54ace31fe2Kim Schulz} tBTA_JV_L2CAP_CONG;
2328372aa5fa535ee4f09c09981b6125b54ace31fe2Kim Schulz
2338372aa5fa535ee4f09c09981b6125b54ace31fe2Kim Schulz/* data associated with BTA_JV_L2CAP_READ_EVT */
234cd1fd07f1306e08fe048682dd5918987e579f937Myles Watsontypedef struct {
235cd1fd07f1306e08fe048682dd5918987e579f937Myles Watson  tBTA_JV_STATUS status; /* Whether the operation succeeded or failed. */
236cd1fd07f1306e08fe048682dd5918987e579f937Myles Watson  uint32_t handle;       /* The connection handle */
237cd1fd07f1306e08fe048682dd5918987e579f937Myles Watson  uint32_t req_id;       /* The req_id in the associated BTA_JvL2capRead() */
238cd1fd07f1306e08fe048682dd5918987e579f937Myles Watson  uint8_t* p_data;       /* This points the same location as the p_data
239cd1fd07f1306e08fe048682dd5918987e579f937Myles Watson                        * parameter in BTA_JvL2capRead () */
240cd1fd07f1306e08fe048682dd5918987e579f937Myles Watson  uint16_t len;          /* The length of the data read. */
2418372aa5fa535ee4f09c09981b6125b54ace31fe2Kim Schulz} tBTA_JV_L2CAP_READ;
2428372aa5fa535ee4f09c09981b6125b54ace31fe2Kim Schulz
2438372aa5fa535ee4f09c09981b6125b54ace31fe2Kim Schulz/* data associated with BTA_JV_L2CAP_WRITE_EVT */
244cd1fd07f1306e08fe048682dd5918987e579f937Myles Watsontypedef struct {
245cd1fd07f1306e08fe048682dd5918987e579f937Myles Watson  tBTA_JV_STATUS status; /* Whether the operation succeeded or failed. */
246cd1fd07f1306e08fe048682dd5918987e579f937Myles Watson  uint32_t handle;       /* The connection handle */
247a32cfc94062df66234894360dca39878c0735761Jakub Pawlowski  uint32_t req_id;       /* The req_id in the associated BTA_JvL2capWrite() */
248cd1fd07f1306e08fe048682dd5918987e579f937Myles Watson  uint16_t len;          /* The length of the data written. */
249cd1fd07f1306e08fe048682dd5918987e579f937Myles Watson  bool cong;             /* congestion status */
2508372aa5fa535ee4f09c09981b6125b54ace31fe2Kim Schulz} tBTA_JV_L2CAP_WRITE;
2518372aa5fa535ee4f09c09981b6125b54ace31fe2Kim Schulz
2528372aa5fa535ee4f09c09981b6125b54ace31fe2Kim Schulz/* data associated with BTA_JV_L2CAP_WRITE_FIXED_EVT */
253cd1fd07f1306e08fe048682dd5918987e579f937Myles Watsontypedef struct {
254cd1fd07f1306e08fe048682dd5918987e579f937Myles Watson  tBTA_JV_STATUS status; /* Whether the operation succeeded or failed. */
255cd1fd07f1306e08fe048682dd5918987e579f937Myles Watson  uint16_t channel;      /* The connection channel */
256a484a888196ddf8bcbf1ad3226d6451bc735a94bJakub Pawlowski  RawAddress addr;       /* The peer address */
257a32cfc94062df66234894360dca39878c0735761Jakub Pawlowski  uint32_t req_id;       /* The req_id in the associated BTA_JvL2capWrite() */
258cd1fd07f1306e08fe048682dd5918987e579f937Myles Watson  uint16_t len;          /* The length of the data written. */
259cd1fd07f1306e08fe048682dd5918987e579f937Myles Watson  bool cong;             /* congestion status */
2608372aa5fa535ee4f09c09981b6125b54ace31fe2Kim Schulz} tBTA_JV_L2CAP_WRITE_FIXED;
2618372aa5fa535ee4f09c09981b6125b54ace31fe2Kim Schulz
2625738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project/* data associated with BTA_JV_RFCOMM_OPEN_EVT */
263cd1fd07f1306e08fe048682dd5918987e579f937Myles Watsontypedef struct {
264cd1fd07f1306e08fe048682dd5918987e579f937Myles Watson  tBTA_JV_STATUS status; /* Whether the operation succeeded or failed. */
265cd1fd07f1306e08fe048682dd5918987e579f937Myles Watson  uint32_t handle;       /* The connection handle */
266a484a888196ddf8bcbf1ad3226d6451bc735a94bJakub Pawlowski  RawAddress rem_bda;    /* The peer address */
2675738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project} tBTA_JV_RFCOMM_OPEN;
2685738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project/* data associated with BTA_JV_RFCOMM_SRV_OPEN_EVT */
269cd1fd07f1306e08fe048682dd5918987e579f937Myles Watsontypedef struct {
270cd1fd07f1306e08fe048682dd5918987e579f937Myles Watson  tBTA_JV_STATUS status;      /* Whether the operation succeeded or failed. */
271cd1fd07f1306e08fe048682dd5918987e579f937Myles Watson  uint32_t handle;            /* The connection handle */
272cd1fd07f1306e08fe048682dd5918987e579f937Myles Watson  uint32_t new_listen_handle; /* The new listen handle */
273a484a888196ddf8bcbf1ad3226d6451bc735a94bJakub Pawlowski  RawAddress rem_bda;         /* The peer address */
2745738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project} tBTA_JV_RFCOMM_SRV_OPEN;
2755738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project
2765738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project/* data associated with BTA_JV_RFCOMM_CLOSE_EVT */
277cd1fd07f1306e08fe048682dd5918987e579f937Myles Watsontypedef struct {
278cd1fd07f1306e08fe048682dd5918987e579f937Myles Watson  tBTA_JV_STATUS status; /* Whether the operation succeeded or failed. */
279cd1fd07f1306e08fe048682dd5918987e579f937Myles Watson  uint32_t port_status;  /* PORT status */
280cd1fd07f1306e08fe048682dd5918987e579f937Myles Watson  uint32_t handle;       /* The connection handle */
281cd1fd07f1306e08fe048682dd5918987e579f937Myles Watson  bool async;            /* false, if local initiates disconnect */
2825738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project} tBTA_JV_RFCOMM_CLOSE;
2835738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project
2845738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project/* data associated with BTA_JV_RFCOMM_START_EVT */
285cd1fd07f1306e08fe048682dd5918987e579f937Myles Watsontypedef struct {
286cd1fd07f1306e08fe048682dd5918987e579f937Myles Watson  tBTA_JV_STATUS status; /* Whether the operation succeeded or failed. */
287cd1fd07f1306e08fe048682dd5918987e579f937Myles Watson  uint32_t handle;       /* The connection handle */
288cd1fd07f1306e08fe048682dd5918987e579f937Myles Watson  uint8_t sec_id;        /* security ID used by this server */
289cd1fd07f1306e08fe048682dd5918987e579f937Myles Watson  bool use_co;           /* true to use co_rfc_data */
2905738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project} tBTA_JV_RFCOMM_START;
2915738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project
2925738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project/* data associated with BTA_JV_RFCOMM_CL_INIT_EVT */
293cd1fd07f1306e08fe048682dd5918987e579f937Myles Watsontypedef struct {
294cd1fd07f1306e08fe048682dd5918987e579f937Myles Watson  tBTA_JV_STATUS status; /* Whether the operation succeeded or failed. */
295cd1fd07f1306e08fe048682dd5918987e579f937Myles Watson  uint32_t handle;       /* The connection handle */
296cd1fd07f1306e08fe048682dd5918987e579f937Myles Watson  uint8_t sec_id;        /* security ID used by this client */
297cd1fd07f1306e08fe048682dd5918987e579f937Myles Watson  bool use_co;           /* true to use co_rfc_data */
2985738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project} tBTA_JV_RFCOMM_CL_INIT;
2995738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project/*data associated with BTA_JV_L2CAP_DATA_IND_EVT & BTA_JV_RFCOMM_DATA_IND_EVT */
300cd1fd07f1306e08fe048682dd5918987e579f937Myles Watsontypedef struct {
301cd1fd07f1306e08fe048682dd5918987e579f937Myles Watson  uint32_t handle; /* The connection handle */
3025738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project} tBTA_JV_DATA_IND;
3035738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project
3048372aa5fa535ee4f09c09981b6125b54ace31fe2Kim Schulz/*data associated with BTA_JV_L2CAP_DATA_IND_EVT if used for LE */
305cd1fd07f1306e08fe048682dd5918987e579f937Myles Watsontypedef struct {
306cd1fd07f1306e08fe048682dd5918987e579f937Myles Watson  uint32_t handle; /* The connection handle */
307cd1fd07f1306e08fe048682dd5918987e579f937Myles Watson  BT_HDR* p_buf;   /* The incoming data */
3088372aa5fa535ee4f09c09981b6125b54ace31fe2Kim Schulz} tBTA_JV_LE_DATA_IND;
3098372aa5fa535ee4f09c09981b6125b54ace31fe2Kim Schulz
3105738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project/* data associated with BTA_JV_RFCOMM_CONG_EVT */
311cd1fd07f1306e08fe048682dd5918987e579f937Myles Watsontypedef struct {
312cd1fd07f1306e08fe048682dd5918987e579f937Myles Watson  tBTA_JV_STATUS status; /* Whether the operation succeeded or failed. */
313cd1fd07f1306e08fe048682dd5918987e579f937Myles Watson  uint32_t handle;       /* The connection handle */
314cd1fd07f1306e08fe048682dd5918987e579f937Myles Watson  bool cong;             /* true, congested. false, uncongested */
3155738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project} tBTA_JV_RFCOMM_CONG;
3165738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project
3175738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project/* data associated with BTA_JV_RFCOMM_WRITE_EVT */
318cd1fd07f1306e08fe048682dd5918987e579f937Myles Watsontypedef struct {
319cd1fd07f1306e08fe048682dd5918987e579f937Myles Watson  tBTA_JV_STATUS status; /* Whether the operation succeeded or failed. */
320cd1fd07f1306e08fe048682dd5918987e579f937Myles Watson  uint32_t handle;       /* The connection handle */
321cd1fd07f1306e08fe048682dd5918987e579f937Myles Watson  uint32_t req_id;       /* The req_id in the associated BTA_JvRfcommWrite() */
322cd1fd07f1306e08fe048682dd5918987e579f937Myles Watson  int len;               /* The length of the data written. */
323cd1fd07f1306e08fe048682dd5918987e579f937Myles Watson  bool cong;             /* congestion status */
3245738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project} tBTA_JV_RFCOMM_WRITE;
3255738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project
3262f338f25530d2aaab7acf45701c271d10b81d96dGanesh Ganapathi Batta/* data associated with BTA_JV_API_SET_PM_PROFILE_EVT */
327cd1fd07f1306e08fe048682dd5918987e579f937Myles Watsontypedef struct {
328cd1fd07f1306e08fe048682dd5918987e579f937Myles Watson  tBTA_JV_STATUS status; /* Status of the operation */
329cd1fd07f1306e08fe048682dd5918987e579f937Myles Watson  uint32_t handle;       /* Connection handle */
330cd1fd07f1306e08fe048682dd5918987e579f937Myles Watson  tBTA_JV_PM_ID app_id;  /* JV app ID */
3312f338f25530d2aaab7acf45701c271d10b81d96dGanesh Ganapathi Batta} tBTA_JV_SET_PM_PROFILE;
3322f338f25530d2aaab7acf45701c271d10b81d96dGanesh Ganapathi Batta
3332f338f25530d2aaab7acf45701c271d10b81d96dGanesh Ganapathi Batta/* data associated with BTA_JV_API_NOTIFY_PM_STATE_CHANGE_EVT */
334cd1fd07f1306e08fe048682dd5918987e579f937Myles Watsontypedef struct {
335cd1fd07f1306e08fe048682dd5918987e579f937Myles Watson  uint32_t handle;          /* Connection handle */
336cd1fd07f1306e08fe048682dd5918987e579f937Myles Watson  tBTA_JV_CONN_STATE state; /* JV connection stata */
3372f338f25530d2aaab7acf45701c271d10b81d96dGanesh Ganapathi Batta} tBTA_JV_NOTIFY_PM_STATE_CHANGE;
3382f338f25530d2aaab7acf45701c271d10b81d96dGanesh Ganapathi Batta
3395738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project/* union of data associated with JV callback */
340cd1fd07f1306e08fe048682dd5918987e579f937Myles Watsontypedef union {
341cd1fd07f1306e08fe048682dd5918987e579f937Myles Watson  tBTA_JV_STATUS status;                     /* BTA_JV_ENABLE_EVT */
342cd1fd07f1306e08fe048682dd5918987e579f937Myles Watson  tBTA_JV_DISCOVERY_COMP disc_comp;          /* BTA_JV_DISCOVERY_COMP_EVT */
343cd1fd07f1306e08fe048682dd5918987e579f937Myles Watson  tBTA_JV_SET_DISCOVER set_discover;         /* BTA_JV_SET_DISCOVER_EVT */
344cd1fd07f1306e08fe048682dd5918987e579f937Myles Watson  uint8_t scn;                               /* BTA_JV_GET_SCN_EVT */
345cd1fd07f1306e08fe048682dd5918987e579f937Myles Watson  uint16_t psm;                              /* BTA_JV_GET_PSM_EVT */
346cd1fd07f1306e08fe048682dd5918987e579f937Myles Watson  tBTA_JV_CREATE_RECORD create_rec;          /* BTA_JV_CREATE_RECORD_EVT */
347cd1fd07f1306e08fe048682dd5918987e579f937Myles Watson  tBTA_JV_L2CAP_OPEN l2c_open;               /* BTA_JV_L2CAP_OPEN_EVT */
348cd1fd07f1306e08fe048682dd5918987e579f937Myles Watson  tBTA_JV_L2CAP_CLOSE l2c_close;             /* BTA_JV_L2CAP_CLOSE_EVT */
349cd1fd07f1306e08fe048682dd5918987e579f937Myles Watson  tBTA_JV_L2CAP_START l2c_start;             /* BTA_JV_L2CAP_START_EVT */
350cd1fd07f1306e08fe048682dd5918987e579f937Myles Watson  tBTA_JV_L2CAP_CL_INIT l2c_cl_init;         /* BTA_JV_L2CAP_CL_INIT_EVT */
351cd1fd07f1306e08fe048682dd5918987e579f937Myles Watson  tBTA_JV_L2CAP_CONG l2c_cong;               /* BTA_JV_L2CAP_CONG_EVT */
352cd1fd07f1306e08fe048682dd5918987e579f937Myles Watson  tBTA_JV_L2CAP_READ l2c_read;               /* BTA_JV_L2CAP_READ_EVT */
353cd1fd07f1306e08fe048682dd5918987e579f937Myles Watson  tBTA_JV_L2CAP_WRITE l2c_write;             /* BTA_JV_L2CAP_WRITE_EVT */
354cd1fd07f1306e08fe048682dd5918987e579f937Myles Watson  tBTA_JV_RFCOMM_OPEN rfc_open;              /* BTA_JV_RFCOMM_OPEN_EVT */
355cd1fd07f1306e08fe048682dd5918987e579f937Myles Watson  tBTA_JV_RFCOMM_SRV_OPEN rfc_srv_open;      /* BTA_JV_RFCOMM_SRV_OPEN_EVT */
356cd1fd07f1306e08fe048682dd5918987e579f937Myles Watson  tBTA_JV_RFCOMM_CLOSE rfc_close;            /* BTA_JV_RFCOMM_CLOSE_EVT */
357cd1fd07f1306e08fe048682dd5918987e579f937Myles Watson  tBTA_JV_RFCOMM_START rfc_start;            /* BTA_JV_RFCOMM_START_EVT */
358cd1fd07f1306e08fe048682dd5918987e579f937Myles Watson  tBTA_JV_RFCOMM_CL_INIT rfc_cl_init;        /* BTA_JV_RFCOMM_CL_INIT_EVT */
359cd1fd07f1306e08fe048682dd5918987e579f937Myles Watson  tBTA_JV_RFCOMM_CONG rfc_cong;              /* BTA_JV_RFCOMM_CONG_EVT */
360cd1fd07f1306e08fe048682dd5918987e579f937Myles Watson  tBTA_JV_RFCOMM_WRITE rfc_write;            /* BTA_JV_RFCOMM_WRITE_EVT */
361cd1fd07f1306e08fe048682dd5918987e579f937Myles Watson  tBTA_JV_DATA_IND data_ind;                 /* BTA_JV_L2CAP_DATA_IND_EVT
362cd1fd07f1306e08fe048682dd5918987e579f937Myles Watson                                                BTA_JV_RFCOMM_DATA_IND_EVT */
363cd1fd07f1306e08fe048682dd5918987e579f937Myles Watson  tBTA_JV_LE_DATA_IND le_data_ind;           /* BTA_JV_L2CAP_LE_DATA_IND_EVT */
364cd1fd07f1306e08fe048682dd5918987e579f937Myles Watson  tBTA_JV_L2CAP_LE_OPEN l2c_le_open;         /* BTA_JV_L2CAP_OPEN_EVT */
365cd1fd07f1306e08fe048682dd5918987e579f937Myles Watson  tBTA_JV_L2CAP_WRITE_FIXED l2c_write_fixed; /* BTA_JV_L2CAP_WRITE_FIXED_EVT */
3665738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project} tBTA_JV;
3675738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project
3685738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project/* JAVA DM Interface callback */
369531fe1a8c1ca7edfdaf11bbbf3bd63d51bde9b33Ajay Panickertypedef void(tBTA_JV_DM_CBACK)(tBTA_JV_EVT event, tBTA_JV* p_data, uint32_t id);
3705738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project
3715738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project/* JAVA RFCOMM interface callback */
3728ab5e4dbb107be931381bca470c87db447e00881Ajay Panickertypedef uint32_t(tBTA_JV_RFCOMM_CBACK)(tBTA_JV_EVT event, tBTA_JV* p_data,
3738ab5e4dbb107be931381bca470c87db447e00881Ajay Panicker                                       uint32_t rfcomm_slot_id);
3745738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project
3758372aa5fa535ee4f09c09981b6125b54ace31fe2Kim Schulz/* JAVA L2CAP interface callback */
376cd1fd07f1306e08fe048682dd5918987e579f937Myles Watsontypedef void(tBTA_JV_L2CAP_CBACK)(tBTA_JV_EVT event, tBTA_JV* p_data,
377531fe1a8c1ca7edfdaf11bbbf3bd63d51bde9b33Ajay Panicker                                  uint32_t l2cap_socket_id);
3788372aa5fa535ee4f09c09981b6125b54ace31fe2Kim Schulz
3795738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project/* JV configuration structure */
380cd1fd07f1306e08fe048682dd5918987e579f937Myles Watsontypedef struct {
381cd1fd07f1306e08fe048682dd5918987e579f937Myles Watson  uint16_t sdp_raw_size;       /* The size of p_sdp_raw_data */
382cd1fd07f1306e08fe048682dd5918987e579f937Myles Watson  uint16_t sdp_db_size;        /* The size of p_sdp_db */
383cd1fd07f1306e08fe048682dd5918987e579f937Myles Watson  uint8_t* p_sdp_raw_data;     /* The data buffer to keep raw data */
384cd1fd07f1306e08fe048682dd5918987e579f937Myles Watson  tSDP_DISCOVERY_DB* p_sdp_db; /* The data buffer to keep SDP database */
3855738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project} tBTA_JV_CFG;
3865738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project
3875738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project/*******************************************************************************
3888af480e24549ba51a3f6858d9d9af504715e0beaMyles Watson *
3898af480e24549ba51a3f6858d9d9af504715e0beaMyles Watson * Function         BTA_JvEnable
3908af480e24549ba51a3f6858d9d9af504715e0beaMyles Watson *
3918af480e24549ba51a3f6858d9d9af504715e0beaMyles Watson * Description      Enable the Java I/F service. When the enable
3928af480e24549ba51a3f6858d9d9af504715e0beaMyles Watson *                  operation is complete the callback function will be
3938af480e24549ba51a3f6858d9d9af504715e0beaMyles Watson *                  called with a BTA_JV_ENABLE_EVT. This function must
3948af480e24549ba51a3f6858d9d9af504715e0beaMyles Watson *                  be called before other functions in the JV API are
3958af480e24549ba51a3f6858d9d9af504715e0beaMyles Watson *                  called.
3968af480e24549ba51a3f6858d9d9af504715e0beaMyles Watson *
3978af480e24549ba51a3f6858d9d9af504715e0beaMyles Watson * Returns          BTA_JV_SUCCESS if successful.
3988af480e24549ba51a3f6858d9d9af504715e0beaMyles Watson *                  BTA_JV_FAIL if internal failure.
3998af480e24549ba51a3f6858d9d9af504715e0beaMyles Watson *
4008af480e24549ba51a3f6858d9d9af504715e0beaMyles Watson ******************************************************************************/
401cd1fd07f1306e08fe048682dd5918987e579f937Myles WatsontBTA_JV_STATUS BTA_JvEnable(tBTA_JV_DM_CBACK* p_cback);
4025738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project
4035738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project/*******************************************************************************
4048af480e24549ba51a3f6858d9d9af504715e0beaMyles Watson *
4058af480e24549ba51a3f6858d9d9af504715e0beaMyles Watson * Function         BTA_JvDisable
4068af480e24549ba51a3f6858d9d9af504715e0beaMyles Watson *
4078af480e24549ba51a3f6858d9d9af504715e0beaMyles Watson * Description      Disable the Java I/F
4088af480e24549ba51a3f6858d9d9af504715e0beaMyles Watson *
4098af480e24549ba51a3f6858d9d9af504715e0beaMyles Watson * Returns          void
4108af480e24549ba51a3f6858d9d9af504715e0beaMyles Watson *
4118af480e24549ba51a3f6858d9d9af504715e0beaMyles Watson ******************************************************************************/
412547a2972e70021724f5638165a54da36d6a06198Sharvil Nanavativoid BTA_JvDisable(void);
4135738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project
4145738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project/*******************************************************************************
4158af480e24549ba51a3f6858d9d9af504715e0beaMyles Watson *
4168af480e24549ba51a3f6858d9d9af504715e0beaMyles Watson * Function         BTA_JvIsEncrypted
4178af480e24549ba51a3f6858d9d9af504715e0beaMyles Watson *
4188af480e24549ba51a3f6858d9d9af504715e0beaMyles Watson * Description      This function checks if the link to peer device is encrypted
4198af480e24549ba51a3f6858d9d9af504715e0beaMyles Watson *
4208af480e24549ba51a3f6858d9d9af504715e0beaMyles Watson * Returns          true if encrypted.
4218af480e24549ba51a3f6858d9d9af504715e0beaMyles Watson *                  false if not.
4228af480e24549ba51a3f6858d9d9af504715e0beaMyles Watson *
4238af480e24549ba51a3f6858d9d9af504715e0beaMyles Watson ******************************************************************************/
424a484a888196ddf8bcbf1ad3226d6451bc735a94bJakub Pawlowskibool BTA_JvIsEncrypted(const RawAddress& bd_addr);
4255738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project
4265738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project/*******************************************************************************
4278af480e24549ba51a3f6858d9d9af504715e0beaMyles Watson *
4288af480e24549ba51a3f6858d9d9af504715e0beaMyles Watson * Function         BTA_JvGetChannelId
4298af480e24549ba51a3f6858d9d9af504715e0beaMyles Watson *
4308af480e24549ba51a3f6858d9d9af504715e0beaMyles Watson * Description      This function reserves a SCN/PSM for applications running
4318af480e24549ba51a3f6858d9d9af504715e0beaMyles Watson *                  over RFCOMM or L2CAP. It is primarily called by
432cd1fd07f1306e08fe048682dd5918987e579f937Myles Watson *                  server profiles/applications to register their SCN/PSM into
4331baaae3f34a667058e7f0c5f778357d98320cf38Myles Watson *                  the SDP database. The SCN is reported by the
4341baaae3f34a667058e7f0c5f778357d98320cf38Myles Watson *                  tBTA_JV_DM_CBACK callback with a BTA_JV_GET_SCN_EVT.
435cd1fd07f1306e08fe048682dd5918987e579f937Myles Watson *                  If the SCN/PSM reported is 0, that means all SCN resources
4361baaae3f34a667058e7f0c5f778357d98320cf38Myles Watson *                  are exhausted.
4378af480e24549ba51a3f6858d9d9af504715e0beaMyles Watson *                  The channel parameter can be used to request a specific
4388af480e24549ba51a3f6858d9d9af504715e0beaMyles Watson *                  channel. If the request on the specific channel fails, the
439cd1fd07f1306e08fe048682dd5918987e579f937Myles Watson *                  SCN/PSM returned in the EVT will be 0 - no attempt to
4401baaae3f34a667058e7f0c5f778357d98320cf38Myles Watson *                  request a new channel will be made. set channel to <= 0 to
4411baaae3f34a667058e7f0c5f778357d98320cf38Myles Watson *                  automatically assign an channel ID.
4428af480e24549ba51a3f6858d9d9af504715e0beaMyles Watson *
443e5e2dd556b5f271a9425e526c66bf70efe4503a8Jakub Pawlowski * Returns          void
4448af480e24549ba51a3f6858d9d9af504715e0beaMyles Watson *
4458af480e24549ba51a3f6858d9d9af504715e0beaMyles Watson ******************************************************************************/
446e5e2dd556b5f271a9425e526c66bf70efe4503a8Jakub Pawlowskivoid BTA_JvGetChannelId(int conn_type, uint32_t id, int32_t channel);
4478372aa5fa535ee4f09c09981b6125b54ace31fe2Kim Schulz
4488372aa5fa535ee4f09c09981b6125b54ace31fe2Kim Schulz/*******************************************************************************
4498af480e24549ba51a3f6858d9d9af504715e0beaMyles Watson *
4508af480e24549ba51a3f6858d9d9af504715e0beaMyles Watson * Function         BTA_JvFreeChannel
4518af480e24549ba51a3f6858d9d9af504715e0beaMyles Watson *
4528af480e24549ba51a3f6858d9d9af504715e0beaMyles Watson * Description      This function frees a SCN/PSM that was used
4538af480e24549ba51a3f6858d9d9af504715e0beaMyles Watson *                  by an application running over RFCOMM or L2CAP.
4548af480e24549ba51a3f6858d9d9af504715e0beaMyles Watson *
4558af480e24549ba51a3f6858d9d9af504715e0beaMyles Watson * Returns          BTA_JV_SUCCESS, if the request is being processed.
4568af480e24549ba51a3f6858d9d9af504715e0beaMyles Watson *                  BTA_JV_FAILURE, otherwise.
4578af480e24549ba51a3f6858d9d9af504715e0beaMyles Watson *
4588af480e24549ba51a3f6858d9d9af504715e0beaMyles Watson ******************************************************************************/
459e9e58ced195ec2c983c7723c9cbdabd45eb0f2fdMarie JanssentBTA_JV_STATUS BTA_JvFreeChannel(uint16_t channel, int conn_type);
4608372aa5fa535ee4f09c09981b6125b54ace31fe2Kim Schulz
4618372aa5fa535ee4f09c09981b6125b54ace31fe2Kim Schulz/*******************************************************************************
4628af480e24549ba51a3f6858d9d9af504715e0beaMyles Watson *
4638af480e24549ba51a3f6858d9d9af504715e0beaMyles Watson * Function         BTA_JvStartDiscovery
4648af480e24549ba51a3f6858d9d9af504715e0beaMyles Watson *
4658af480e24549ba51a3f6858d9d9af504715e0beaMyles Watson * Description      This function performs service discovery for the services
4668af480e24549ba51a3f6858d9d9af504715e0beaMyles Watson *                  provided by the given peer device. When the operation is
4678af480e24549ba51a3f6858d9d9af504715e0beaMyles Watson *                  complete the tBTA_JV_DM_CBACK callback function will be
4688af480e24549ba51a3f6858d9d9af504715e0beaMyles Watson *                  called with a BTA_JV_DISCOVERY_COMP_EVT.
4698af480e24549ba51a3f6858d9d9af504715e0beaMyles Watson *
4708af480e24549ba51a3f6858d9d9af504715e0beaMyles Watson * Returns          BTA_JV_SUCCESS, if the request is being processed.
4718af480e24549ba51a3f6858d9d9af504715e0beaMyles Watson *                  BTA_JV_FAILURE, otherwise.
4728af480e24549ba51a3f6858d9d9af504715e0beaMyles Watson *
4738af480e24549ba51a3f6858d9d9af504715e0beaMyles Watson ******************************************************************************/
474a484a888196ddf8bcbf1ad3226d6451bc735a94bJakub PawlowskitBTA_JV_STATUS BTA_JvStartDiscovery(const RawAddress& bd_addr,
475819e2ecb84a22d6e03ec9ed67b3260c0dd7e8abaJakub Pawlowski                                    uint16_t num_uuid,
476819e2ecb84a22d6e03ec9ed67b3260c0dd7e8abaJakub Pawlowski                                    const bluetooth::Uuid* p_uuid_list,
47758d57a46cbe38e0ab70d4f2333dd381ff89342b0Ajay Panicker                                    uint32_t rfcomm_slot_id);
4785738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project
4795738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project/*******************************************************************************
4808af480e24549ba51a3f6858d9d9af504715e0beaMyles Watson *
4818af480e24549ba51a3f6858d9d9af504715e0beaMyles Watson * Function         BTA_JvCreateRecordByUser
4828af480e24549ba51a3f6858d9d9af504715e0beaMyles Watson *
4838af480e24549ba51a3f6858d9d9af504715e0beaMyles Watson * Description      Create a service record in the local SDP database by user in
4848af480e24549ba51a3f6858d9d9af504715e0beaMyles Watson *                  tBTA_JV_DM_CBACK callback with a BTA_JV_CREATE_RECORD_EVT.
4858af480e24549ba51a3f6858d9d9af504715e0beaMyles Watson *
4868af480e24549ba51a3f6858d9d9af504715e0beaMyles Watson * Returns          BTA_JV_SUCCESS, if the request is being processed.
4878af480e24549ba51a3f6858d9d9af504715e0beaMyles Watson *                  BTA_JV_FAILURE, otherwise.
4888af480e24549ba51a3f6858d9d9af504715e0beaMyles Watson *
4898af480e24549ba51a3f6858d9d9af504715e0beaMyles Watson ******************************************************************************/
4908ab5e4dbb107be931381bca470c87db447e00881Ajay PanickertBTA_JV_STATUS BTA_JvCreateRecordByUser(uint32_t rfcomm_slot_id);
4915738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project
4925738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project/*******************************************************************************
4938af480e24549ba51a3f6858d9d9af504715e0beaMyles Watson *
4948af480e24549ba51a3f6858d9d9af504715e0beaMyles Watson * Function         BTA_JvDeleteRecord
4958af480e24549ba51a3f6858d9d9af504715e0beaMyles Watson *
4968af480e24549ba51a3f6858d9d9af504715e0beaMyles Watson * Description      Delete a service record in the local SDP database.
4978af480e24549ba51a3f6858d9d9af504715e0beaMyles Watson *
4988af480e24549ba51a3f6858d9d9af504715e0beaMyles Watson * Returns          BTA_JV_SUCCESS, if the request is being processed.
4998af480e24549ba51a3f6858d9d9af504715e0beaMyles Watson *                  BTA_JV_FAILURE, otherwise.
5008af480e24549ba51a3f6858d9d9af504715e0beaMyles Watson *
5018af480e24549ba51a3f6858d9d9af504715e0beaMyles Watson ******************************************************************************/
502e9e58ced195ec2c983c7723c9cbdabd45eb0f2fdMarie JanssentBTA_JV_STATUS BTA_JvDeleteRecord(uint32_t handle);
5035738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project
5045738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project/*******************************************************************************
5058af480e24549ba51a3f6858d9d9af504715e0beaMyles Watson *
5068af480e24549ba51a3f6858d9d9af504715e0beaMyles Watson * Function         BTA_JvL2capConnectLE
5078af480e24549ba51a3f6858d9d9af504715e0beaMyles Watson *
5088af480e24549ba51a3f6858d9d9af504715e0beaMyles Watson * Description      Initiate a connection as an LE L2CAP client to the given BD
5098af480e24549ba51a3f6858d9d9af504715e0beaMyles Watson *                  Address.
5108af480e24549ba51a3f6858d9d9af504715e0beaMyles Watson *                  When the connection is initiated or failed to initiate,
5118af480e24549ba51a3f6858d9d9af504715e0beaMyles Watson *                  tBTA_JV_L2CAP_CBACK is called with BTA_JV_L2CAP_CL_INIT_EVT
5128af480e24549ba51a3f6858d9d9af504715e0beaMyles Watson *                  When the connection is established or failed,
5138af480e24549ba51a3f6858d9d9af504715e0beaMyles Watson *                  tBTA_JV_L2CAP_CBACK is called with BTA_JV_L2CAP_OPEN_EVT
5148af480e24549ba51a3f6858d9d9af504715e0beaMyles Watson *
5158af480e24549ba51a3f6858d9d9af504715e0beaMyles Watson ******************************************************************************/
5163538b64d9760d8b98900e768354e9f0c499db277Jakub Pawlowskivoid BTA_JvL2capConnectLE(uint16_t remote_chan, const RawAddress& peer_bd_addr,
5178ba543299b3f0d3320a91103af8e57094ae4321cJakub Pawlowski                          tBTA_JV_L2CAP_CBACK* p_cback,
5188ba543299b3f0d3320a91103af8e57094ae4321cJakub Pawlowski                          uint32_t l2cap_socket_id);
5198372aa5fa535ee4f09c09981b6125b54ace31fe2Kim Schulz
5208372aa5fa535ee4f09c09981b6125b54ace31fe2Kim Schulz/*******************************************************************************
5218af480e24549ba51a3f6858d9d9af504715e0beaMyles Watson *
5228af480e24549ba51a3f6858d9d9af504715e0beaMyles Watson * Function         BTA_JvL2capConnect
5238af480e24549ba51a3f6858d9d9af504715e0beaMyles Watson *
5248af480e24549ba51a3f6858d9d9af504715e0beaMyles Watson * Description      Initiate a connection as a L2CAP client to the given BD
5258af480e24549ba51a3f6858d9d9af504715e0beaMyles Watson *                  Address.
5268af480e24549ba51a3f6858d9d9af504715e0beaMyles Watson *                  When the connection is initiated or failed to initiate,
5278af480e24549ba51a3f6858d9d9af504715e0beaMyles Watson *                  tBTA_JV_L2CAP_CBACK is called with BTA_JV_L2CAP_CL_INIT_EVT
5288af480e24549ba51a3f6858d9d9af504715e0beaMyles Watson *                  When the connection is established or failed,
5298af480e24549ba51a3f6858d9d9af504715e0beaMyles Watson *                  tBTA_JV_L2CAP_CBACK is called with BTA_JV_L2CAP_OPEN_EVT
5308af480e24549ba51a3f6858d9d9af504715e0beaMyles Watson *
5318af480e24549ba51a3f6858d9d9af504715e0beaMyles Watson ******************************************************************************/
5328ba543299b3f0d3320a91103af8e57094ae4321cJakub Pawlowskivoid BTA_JvL2capConnect(int conn_type, tBTA_SEC sec_mask, tBTA_JV_ROLE role,
5333538b64d9760d8b98900e768354e9f0c499db277Jakub Pawlowski                        std::unique_ptr<tL2CAP_ERTM_INFO> ertm_info,
5343538b64d9760d8b98900e768354e9f0c499db277Jakub Pawlowski                        uint16_t remote_psm, uint16_t rx_mtu,
5353538b64d9760d8b98900e768354e9f0c499db277Jakub Pawlowski                        std::unique_ptr<tL2CAP_CFG_INFO> cfg,
5368ba543299b3f0d3320a91103af8e57094ae4321cJakub Pawlowski                        const RawAddress& peer_bd_addr,
5378ba543299b3f0d3320a91103af8e57094ae4321cJakub Pawlowski                        tBTA_JV_L2CAP_CBACK* p_cback, uint32_t l2cap_socket_id);
5388372aa5fa535ee4f09c09981b6125b54ace31fe2Kim Schulz
5398372aa5fa535ee4f09c09981b6125b54ace31fe2Kim Schulz/*******************************************************************************
5408af480e24549ba51a3f6858d9d9af504715e0beaMyles Watson *
5418af480e24549ba51a3f6858d9d9af504715e0beaMyles Watson * Function         BTA_JvL2capClose
5428af480e24549ba51a3f6858d9d9af504715e0beaMyles Watson *
5438af480e24549ba51a3f6858d9d9af504715e0beaMyles Watson * Description      This function closes an L2CAP client connection
5448af480e24549ba51a3f6858d9d9af504715e0beaMyles Watson *
5458af480e24549ba51a3f6858d9d9af504715e0beaMyles Watson * Returns          BTA_JV_SUCCESS, if the request is being processed.
5468af480e24549ba51a3f6858d9d9af504715e0beaMyles Watson *                  BTA_JV_FAILURE, otherwise.
5478af480e24549ba51a3f6858d9d9af504715e0beaMyles Watson *
5488af480e24549ba51a3f6858d9d9af504715e0beaMyles Watson ******************************************************************************/
549e9e58ced195ec2c983c7723c9cbdabd45eb0f2fdMarie JanssentBTA_JV_STATUS BTA_JvL2capClose(uint32_t handle);
5508372aa5fa535ee4f09c09981b6125b54ace31fe2Kim Schulz
5518372aa5fa535ee4f09c09981b6125b54ace31fe2Kim Schulz/*******************************************************************************
5528af480e24549ba51a3f6858d9d9af504715e0beaMyles Watson *
5538af480e24549ba51a3f6858d9d9af504715e0beaMyles Watson * Function         BTA_JvL2capCloseLE
5548af480e24549ba51a3f6858d9d9af504715e0beaMyles Watson *
555cd1fd07f1306e08fe048682dd5918987e579f937Myles Watson * Description      This function closes an L2CAP client connection for Fixed
5561baaae3f34a667058e7f0c5f778357d98320cf38Myles Watson *                  Channels Function is idempotent and no callbacks are called!
5578af480e24549ba51a3f6858d9d9af504715e0beaMyles Watson *
5588af480e24549ba51a3f6858d9d9af504715e0beaMyles Watson * Returns          BTA_JV_SUCCESS, if the request is being processed.
5598af480e24549ba51a3f6858d9d9af504715e0beaMyles Watson *                  BTA_JV_FAILURE, otherwise.
5608af480e24549ba51a3f6858d9d9af504715e0beaMyles Watson *
5618af480e24549ba51a3f6858d9d9af504715e0beaMyles Watson ******************************************************************************/
562e9e58ced195ec2c983c7723c9cbdabd45eb0f2fdMarie JanssentBTA_JV_STATUS BTA_JvL2capCloseLE(uint32_t handle);
5638372aa5fa535ee4f09c09981b6125b54ace31fe2Kim Schulz
5648372aa5fa535ee4f09c09981b6125b54ace31fe2Kim Schulz/*******************************************************************************
5658af480e24549ba51a3f6858d9d9af504715e0beaMyles Watson *
5668af480e24549ba51a3f6858d9d9af504715e0beaMyles Watson * Function         BTA_JvL2capStartServer
5678af480e24549ba51a3f6858d9d9af504715e0beaMyles Watson *
568cd1fd07f1306e08fe048682dd5918987e579f937Myles Watson * Description      This function starts an L2CAP server and listens for an
5691baaae3f34a667058e7f0c5f778357d98320cf38Myles Watson *                  L2CAP connection from a remote Bluetooth device.  When the
5701baaae3f34a667058e7f0c5f778357d98320cf38Myles Watson *                  server is started successfully, tBTA_JV_L2CAP_CBACK is
5711baaae3f34a667058e7f0c5f778357d98320cf38Myles Watson *                  called with BTA_JV_L2CAP_START_EVT.  When the connection is
5721baaae3f34a667058e7f0c5f778357d98320cf38Myles Watson *                  established, tBTA_JV_L2CAP_CBACK is called with
5731baaae3f34a667058e7f0c5f778357d98320cf38Myles Watson *                  BTA_JV_L2CAP_OPEN_EVT.
5748af480e24549ba51a3f6858d9d9af504715e0beaMyles Watson *
575e5e2dd556b5f271a9425e526c66bf70efe4503a8Jakub Pawlowski * Returns          void
5768af480e24549ba51a3f6858d9d9af504715e0beaMyles Watson *
5778af480e24549ba51a3f6858d9d9af504715e0beaMyles Watson ******************************************************************************/
578e5e2dd556b5f271a9425e526c66bf70efe4503a8Jakub Pawlowskivoid BTA_JvL2capStartServer(int conn_type, tBTA_SEC sec_mask, tBTA_JV_ROLE role,
579e5e2dd556b5f271a9425e526c66bf70efe4503a8Jakub Pawlowski                            std::unique_ptr<tL2CAP_ERTM_INFO> ertm_info,
580e5e2dd556b5f271a9425e526c66bf70efe4503a8Jakub Pawlowski                            uint16_t local_psm, uint16_t rx_mtu,
581e5e2dd556b5f271a9425e526c66bf70efe4503a8Jakub Pawlowski                            std::unique_ptr<tL2CAP_CFG_INFO> cfg,
582e5e2dd556b5f271a9425e526c66bf70efe4503a8Jakub Pawlowski                            tBTA_JV_L2CAP_CBACK* p_cback,
583e5e2dd556b5f271a9425e526c66bf70efe4503a8Jakub Pawlowski                            uint32_t l2cap_socket_id);
5848372aa5fa535ee4f09c09981b6125b54ace31fe2Kim Schulz
5858372aa5fa535ee4f09c09981b6125b54ace31fe2Kim Schulz/*******************************************************************************
5868af480e24549ba51a3f6858d9d9af504715e0beaMyles Watson *
5878af480e24549ba51a3f6858d9d9af504715e0beaMyles Watson * Function         BTA_JvL2capStartServerLE
5888af480e24549ba51a3f6858d9d9af504715e0beaMyles Watson *
589cd1fd07f1306e08fe048682dd5918987e579f937Myles Watson * Description      This function starts an LE L2CAP server and listens for an
5901baaae3f34a667058e7f0c5f778357d98320cf38Myles Watson *                  L2CAP connection from a remote Bluetooth device on a fixed
5911baaae3f34a667058e7f0c5f778357d98320cf38Myles Watson *                  channel over an LE link.  When the server
5928af480e24549ba51a3f6858d9d9af504715e0beaMyles Watson *                  is started successfully, tBTA_JV_L2CAP_CBACK is called with
5938af480e24549ba51a3f6858d9d9af504715e0beaMyles Watson *                  BTA_JV_L2CAP_START_EVT.  When the connection is established,
5948af480e24549ba51a3f6858d9d9af504715e0beaMyles Watson *                  tBTA_JV_L2CAP_CBACK is called with BTA_JV_L2CAP_OPEN_EVT.
5958af480e24549ba51a3f6858d9d9af504715e0beaMyles Watson *
596e5e2dd556b5f271a9425e526c66bf70efe4503a8Jakub Pawlowski * Returns          void
5978af480e24549ba51a3f6858d9d9af504715e0beaMyles Watson *
5988af480e24549ba51a3f6858d9d9af504715e0beaMyles Watson ******************************************************************************/
599e5e2dd556b5f271a9425e526c66bf70efe4503a8Jakub Pawlowskivoid BTA_JvL2capStartServerLE(uint16_t local_chan, tBTA_JV_L2CAP_CBACK* p_cback,
600e5e2dd556b5f271a9425e526c66bf70efe4503a8Jakub Pawlowski                              uint32_t l2cap_socket_id);
6018372aa5fa535ee4f09c09981b6125b54ace31fe2Kim Schulz
6028372aa5fa535ee4f09c09981b6125b54ace31fe2Kim Schulz/*******************************************************************************
6038af480e24549ba51a3f6858d9d9af504715e0beaMyles Watson *
6048af480e24549ba51a3f6858d9d9af504715e0beaMyles Watson * Function         BTA_JvL2capStopServerLE
6058af480e24549ba51a3f6858d9d9af504715e0beaMyles Watson *
606cd1fd07f1306e08fe048682dd5918987e579f937Myles Watson * Description      This function stops the LE L2CAP server. If the server has
6071baaae3f34a667058e7f0c5f778357d98320cf38Myles Watson *                  an active connection, it would be closed.
6088af480e24549ba51a3f6858d9d9af504715e0beaMyles Watson *
6098af480e24549ba51a3f6858d9d9af504715e0beaMyles Watson * Returns          BTA_JV_SUCCESS, if the request is being processed.
6108af480e24549ba51a3f6858d9d9af504715e0beaMyles Watson *                  BTA_JV_FAILURE, otherwise.
6118af480e24549ba51a3f6858d9d9af504715e0beaMyles Watson *
6128af480e24549ba51a3f6858d9d9af504715e0beaMyles Watson ******************************************************************************/
613531fe1a8c1ca7edfdaf11bbbf3bd63d51bde9b33Ajay PanickertBTA_JV_STATUS BTA_JvL2capStopServerLE(uint16_t local_chan,
614531fe1a8c1ca7edfdaf11bbbf3bd63d51bde9b33Ajay Panicker                                       uint32_t l2cap_socket_id);
6158372aa5fa535ee4f09c09981b6125b54ace31fe2Kim Schulz
6168372aa5fa535ee4f09c09981b6125b54ace31fe2Kim Schulz/*******************************************************************************
6178af480e24549ba51a3f6858d9d9af504715e0beaMyles Watson *
618531fe1a8c1ca7edfdaf11bbbf3bd63d51bde9b33Ajay Panicker * Function         BTA_JvL2capStopServer
6198af480e24549ba51a3f6858d9d9af504715e0beaMyles Watson *
620531fe1a8c1ca7edfdaf11bbbf3bd63d51bde9b33Ajay Panicker * Description      This function stops the L2CAP server. If the server has
6211baaae3f34a667058e7f0c5f778357d98320cf38Myles Watson *                  an active connection, it would be closed.
6228af480e24549ba51a3f6858d9d9af504715e0beaMyles Watson *
6238af480e24549ba51a3f6858d9d9af504715e0beaMyles Watson * Returns          BTA_JV_SUCCESS, if the request is being processed.
6248af480e24549ba51a3f6858d9d9af504715e0beaMyles Watson *                  BTA_JV_FAILURE, otherwise.
6258af480e24549ba51a3f6858d9d9af504715e0beaMyles Watson *
6268af480e24549ba51a3f6858d9d9af504715e0beaMyles Watson ******************************************************************************/
627531fe1a8c1ca7edfdaf11bbbf3bd63d51bde9b33Ajay PanickertBTA_JV_STATUS BTA_JvL2capStopServer(uint16_t local_psm,
628531fe1a8c1ca7edfdaf11bbbf3bd63d51bde9b33Ajay Panicker                                     uint32_t l2cap_socket_id);
6298372aa5fa535ee4f09c09981b6125b54ace31fe2Kim Schulz
6308372aa5fa535ee4f09c09981b6125b54ace31fe2Kim Schulz/*******************************************************************************
6318af480e24549ba51a3f6858d9d9af504715e0beaMyles Watson *
6328af480e24549ba51a3f6858d9d9af504715e0beaMyles Watson * Function         BTA_JvL2capRead
6338af480e24549ba51a3f6858d9d9af504715e0beaMyles Watson *
6348af480e24549ba51a3f6858d9d9af504715e0beaMyles Watson * Description      This function reads data from an L2CAP connection
6358af480e24549ba51a3f6858d9d9af504715e0beaMyles Watson *                  When the operation is complete, tBTA_JV_L2CAP_CBACK is
6368af480e24549ba51a3f6858d9d9af504715e0beaMyles Watson *                  called with BTA_JV_L2CAP_READ_EVT.
6378af480e24549ba51a3f6858d9d9af504715e0beaMyles Watson *
6388af480e24549ba51a3f6858d9d9af504715e0beaMyles Watson * Returns          BTA_JV_SUCCESS, if the request is being processed.
6398af480e24549ba51a3f6858d9d9af504715e0beaMyles Watson *                  BTA_JV_FAILURE, otherwise.
6408af480e24549ba51a3f6858d9d9af504715e0beaMyles Watson *
6418af480e24549ba51a3f6858d9d9af504715e0beaMyles Watson ******************************************************************************/
642e9e58ced195ec2c983c7723c9cbdabd45eb0f2fdMarie JanssentBTA_JV_STATUS BTA_JvL2capRead(uint32_t handle, uint32_t req_id,
643cd1fd07f1306e08fe048682dd5918987e579f937Myles Watson                               uint8_t* p_data, uint16_t len);
6448372aa5fa535ee4f09c09981b6125b54ace31fe2Kim Schulz
6458372aa5fa535ee4f09c09981b6125b54ace31fe2Kim Schulz/*******************************************************************************
6468af480e24549ba51a3f6858d9d9af504715e0beaMyles Watson *
6478af480e24549ba51a3f6858d9d9af504715e0beaMyles Watson * Function         BTA_JvL2capReady
6488af480e24549ba51a3f6858d9d9af504715e0beaMyles Watson *
6498af480e24549ba51a3f6858d9d9af504715e0beaMyles Watson * Description      This function determined if there is data to read from
6508af480e24549ba51a3f6858d9d9af504715e0beaMyles Watson *                  an L2CAP connection
6518af480e24549ba51a3f6858d9d9af504715e0beaMyles Watson *
6528af480e24549ba51a3f6858d9d9af504715e0beaMyles Watson * Returns          BTA_JV_SUCCESS, if data queue size is in *p_data_size.
6538af480e24549ba51a3f6858d9d9af504715e0beaMyles Watson *                  BTA_JV_FAILURE, if error.
6548af480e24549ba51a3f6858d9d9af504715e0beaMyles Watson *
6558af480e24549ba51a3f6858d9d9af504715e0beaMyles Watson ******************************************************************************/
656cd1fd07f1306e08fe048682dd5918987e579f937Myles WatsontBTA_JV_STATUS BTA_JvL2capReady(uint32_t handle, uint32_t* p_data_size);
6578372aa5fa535ee4f09c09981b6125b54ace31fe2Kim Schulz
6588372aa5fa535ee4f09c09981b6125b54ace31fe2Kim Schulz/*******************************************************************************
6598af480e24549ba51a3f6858d9d9af504715e0beaMyles Watson *
6608af480e24549ba51a3f6858d9d9af504715e0beaMyles Watson * Function         BTA_JvL2capWrite
6618af480e24549ba51a3f6858d9d9af504715e0beaMyles Watson *
6628af480e24549ba51a3f6858d9d9af504715e0beaMyles Watson * Description      This function writes data to an L2CAP connection
6638af480e24549ba51a3f6858d9d9af504715e0beaMyles Watson *                  When the operation is complete, tBTA_JV_L2CAP_CBACK is
6648af480e24549ba51a3f6858d9d9af504715e0beaMyles Watson *                  called with BTA_JV_L2CAP_WRITE_EVT. Works for
6658af480e24549ba51a3f6858d9d9af504715e0beaMyles Watson *                  PSM-based connections
6668af480e24549ba51a3f6858d9d9af504715e0beaMyles Watson *
6678af480e24549ba51a3f6858d9d9af504715e0beaMyles Watson * Returns          BTA_JV_SUCCESS, if the request is being processed.
6688af480e24549ba51a3f6858d9d9af504715e0beaMyles Watson *                  BTA_JV_FAILURE, otherwise.
6698af480e24549ba51a3f6858d9d9af504715e0beaMyles Watson *
6708af480e24549ba51a3f6858d9d9af504715e0beaMyles Watson ******************************************************************************/
67184519312368dfa4b12c1be5b8c6290d26f397cbfJakub PawlowskitBTA_JV_STATUS BTA_JvL2capWrite(uint32_t handle, uint32_t req_id, BT_HDR* msg,
672531fe1a8c1ca7edfdaf11bbbf3bd63d51bde9b33Ajay Panicker                                uint32_t user_id);
6738372aa5fa535ee4f09c09981b6125b54ace31fe2Kim Schulz
6748372aa5fa535ee4f09c09981b6125b54ace31fe2Kim Schulz/*******************************************************************************
6758af480e24549ba51a3f6858d9d9af504715e0beaMyles Watson *
6768af480e24549ba51a3f6858d9d9af504715e0beaMyles Watson * Function         BTA_JvL2capWriteFixed
6778af480e24549ba51a3f6858d9d9af504715e0beaMyles Watson *
6788af480e24549ba51a3f6858d9d9af504715e0beaMyles Watson * Description      This function writes data to an L2CAP connection
6798af480e24549ba51a3f6858d9d9af504715e0beaMyles Watson *                  When the operation is complete, tBTA_JV_L2CAP_CBACK is
6808af480e24549ba51a3f6858d9d9af504715e0beaMyles Watson *                  called with BTA_JV_L2CAP_WRITE_FIXED_EVT. Works for
6818af480e24549ba51a3f6858d9d9af504715e0beaMyles Watson *                  fixed-channel connections
6828af480e24549ba51a3f6858d9d9af504715e0beaMyles Watson *
6838af480e24549ba51a3f6858d9d9af504715e0beaMyles Watson ******************************************************************************/
68484519312368dfa4b12c1be5b8c6290d26f397cbfJakub Pawlowskivoid BTA_JvL2capWriteFixed(uint16_t channel, const RawAddress& addr,
68584519312368dfa4b12c1be5b8c6290d26f397cbfJakub Pawlowski                           uint32_t req_id, tBTA_JV_L2CAP_CBACK* p_cback,
68684519312368dfa4b12c1be5b8c6290d26f397cbfJakub Pawlowski                           BT_HDR* msg, uint32_t user_id);
6878372aa5fa535ee4f09c09981b6125b54ace31fe2Kim Schulz
6888372aa5fa535ee4f09c09981b6125b54ace31fe2Kim Schulz/*******************************************************************************
6898af480e24549ba51a3f6858d9d9af504715e0beaMyles Watson *
6908af480e24549ba51a3f6858d9d9af504715e0beaMyles Watson * Function         BTA_JvRfcommConnect
6918af480e24549ba51a3f6858d9d9af504715e0beaMyles Watson *
6928af480e24549ba51a3f6858d9d9af504715e0beaMyles Watson * Description      This function makes an RFCOMM conection to a remote BD
6938af480e24549ba51a3f6858d9d9af504715e0beaMyles Watson *                  Address.
6948af480e24549ba51a3f6858d9d9af504715e0beaMyles Watson *                  When the connection is initiated or failed to initiate,
695cd1fd07f1306e08fe048682dd5918987e579f937Myles Watson *                  tBTA_JV_RFCOMM_CBACK is called with
6961baaae3f34a667058e7f0c5f778357d98320cf38Myles Watson *                  BTA_JV_RFCOMM_CL_INIT_EVT
6978af480e24549ba51a3f6858d9d9af504715e0beaMyles Watson *                  When the connection is established or failed,
6988af480e24549ba51a3f6858d9d9af504715e0beaMyles Watson *                  tBTA_JV_RFCOMM_CBACK is called with BTA_JV_RFCOMM_OPEN_EVT
6998af480e24549ba51a3f6858d9d9af504715e0beaMyles Watson *
7008af480e24549ba51a3f6858d9d9af504715e0beaMyles Watson * Returns          BTA_JV_SUCCESS, if the request is being processed.
7018af480e24549ba51a3f6858d9d9af504715e0beaMyles Watson *                  BTA_JV_FAILURE, otherwise.
7028af480e24549ba51a3f6858d9d9af504715e0beaMyles Watson *
7038af480e24549ba51a3f6858d9d9af504715e0beaMyles Watson ******************************************************************************/
704cd1fd07f1306e08fe048682dd5918987e579f937Myles WatsontBTA_JV_STATUS BTA_JvRfcommConnect(tBTA_SEC sec_mask, tBTA_JV_ROLE role,
705a09c3482007047e852a40b67b86882e96ebede51Jakub Pawlowski                                   uint8_t remote_scn,
706a484a888196ddf8bcbf1ad3226d6451bc735a94bJakub Pawlowski                                   const RawAddress& peer_bd_addr,
707cd1fd07f1306e08fe048682dd5918987e579f937Myles Watson                                   tBTA_JV_RFCOMM_CBACK* p_cback,
7088ab5e4dbb107be931381bca470c87db447e00881Ajay Panicker                                   uint32_t rfcomm_slot_id);
7095738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project
7105738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project/*******************************************************************************
7118af480e24549ba51a3f6858d9d9af504715e0beaMyles Watson *
7128af480e24549ba51a3f6858d9d9af504715e0beaMyles Watson * Function         BTA_JvRfcommClose
7138af480e24549ba51a3f6858d9d9af504715e0beaMyles Watson *
7148af480e24549ba51a3f6858d9d9af504715e0beaMyles Watson * Description      This function closes an RFCOMM connection
7158af480e24549ba51a3f6858d9d9af504715e0beaMyles Watson *
7168af480e24549ba51a3f6858d9d9af504715e0beaMyles Watson * Returns          BTA_JV_SUCCESS, if the request is being processed.
7178af480e24549ba51a3f6858d9d9af504715e0beaMyles Watson *                  BTA_JV_FAILURE, otherwise.
7188af480e24549ba51a3f6858d9d9af504715e0beaMyles Watson *
7198af480e24549ba51a3f6858d9d9af504715e0beaMyles Watson ******************************************************************************/
7208ab5e4dbb107be931381bca470c87db447e00881Ajay PanickertBTA_JV_STATUS BTA_JvRfcommClose(uint32_t handle, uint32_t rfcomm_slot_id);
7215738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project
7225738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project/*******************************************************************************
7238af480e24549ba51a3f6858d9d9af504715e0beaMyles Watson *
7248af480e24549ba51a3f6858d9d9af504715e0beaMyles Watson * Function         BTA_JvRfcommStartServer
7258af480e24549ba51a3f6858d9d9af504715e0beaMyles Watson *
7268af480e24549ba51a3f6858d9d9af504715e0beaMyles Watson * Description      This function starts listening for an RFCOMM connection
7278af480e24549ba51a3f6858d9d9af504715e0beaMyles Watson *                  request from a remote Bluetooth device.  When the server is
7288af480e24549ba51a3f6858d9d9af504715e0beaMyles Watson *                  started successfully, tBTA_JV_RFCOMM_CBACK is called
7298af480e24549ba51a3f6858d9d9af504715e0beaMyles Watson *                  with BTA_JV_RFCOMM_START_EVT.
7308af480e24549ba51a3f6858d9d9af504715e0beaMyles Watson *                  When the connection is established, tBTA_JV_RFCOMM_CBACK
7318af480e24549ba51a3f6858d9d9af504715e0beaMyles Watson *                  is called with BTA_JV_RFCOMM_OPEN_EVT.
7328af480e24549ba51a3f6858d9d9af504715e0beaMyles Watson *
7338af480e24549ba51a3f6858d9d9af504715e0beaMyles Watson * Returns          BTA_JV_SUCCESS, if the request is being processed.
7348af480e24549ba51a3f6858d9d9af504715e0beaMyles Watson *                  BTA_JV_FAILURE, otherwise.
7358af480e24549ba51a3f6858d9d9af504715e0beaMyles Watson *
7368af480e24549ba51a3f6858d9d9af504715e0beaMyles Watson ******************************************************************************/
737cd1fd07f1306e08fe048682dd5918987e579f937Myles WatsontBTA_JV_STATUS BTA_JvRfcommStartServer(tBTA_SEC sec_mask, tBTA_JV_ROLE role,
738cd1fd07f1306e08fe048682dd5918987e579f937Myles Watson                                       uint8_t local_scn, uint8_t max_session,
739cd1fd07f1306e08fe048682dd5918987e579f937Myles Watson                                       tBTA_JV_RFCOMM_CBACK* p_cback,
7408ab5e4dbb107be931381bca470c87db447e00881Ajay Panicker                                       uint32_t rfcomm_slot_id);
7415738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project
7425738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project/*******************************************************************************
7438af480e24549ba51a3f6858d9d9af504715e0beaMyles Watson *
7448af480e24549ba51a3f6858d9d9af504715e0beaMyles Watson * Function         BTA_JvRfcommStopServer
7458af480e24549ba51a3f6858d9d9af504715e0beaMyles Watson *
7468af480e24549ba51a3f6858d9d9af504715e0beaMyles Watson * Description      This function stops the RFCOMM server. If the server has an
7478af480e24549ba51a3f6858d9d9af504715e0beaMyles Watson *                  active connection, it would be closed.
7488af480e24549ba51a3f6858d9d9af504715e0beaMyles Watson *
7498af480e24549ba51a3f6858d9d9af504715e0beaMyles Watson * Returns          BTA_JV_SUCCESS, if the request is being processed.
7508af480e24549ba51a3f6858d9d9af504715e0beaMyles Watson *                  BTA_JV_FAILURE, otherwise.
7518af480e24549ba51a3f6858d9d9af504715e0beaMyles Watson *
7528af480e24549ba51a3f6858d9d9af504715e0beaMyles Watson ******************************************************************************/
7538ab5e4dbb107be931381bca470c87db447e00881Ajay PanickertBTA_JV_STATUS BTA_JvRfcommStopServer(uint32_t handle, uint32_t rfcomm_slot_id);
7545738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project
7555738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project/*******************************************************************************
7568af480e24549ba51a3f6858d9d9af504715e0beaMyles Watson *
7578af480e24549ba51a3f6858d9d9af504715e0beaMyles Watson * Function         BTA_JvRfcommWrite
7588af480e24549ba51a3f6858d9d9af504715e0beaMyles Watson *
7598af480e24549ba51a3f6858d9d9af504715e0beaMyles Watson * Description      This function writes data to an RFCOMM connection
7608af480e24549ba51a3f6858d9d9af504715e0beaMyles Watson *                  When the operation is complete, tBTA_JV_RFCOMM_CBACK is
7618af480e24549ba51a3f6858d9d9af504715e0beaMyles Watson *                  called with BTA_JV_RFCOMM_WRITE_EVT.
7628af480e24549ba51a3f6858d9d9af504715e0beaMyles Watson *
7638af480e24549ba51a3f6858d9d9af504715e0beaMyles Watson * Returns          BTA_JV_SUCCESS, if the request is being processed.
7648af480e24549ba51a3f6858d9d9af504715e0beaMyles Watson *                  BTA_JV_FAILURE, otherwise.
7658af480e24549ba51a3f6858d9d9af504715e0beaMyles Watson *
7668af480e24549ba51a3f6858d9d9af504715e0beaMyles Watson ******************************************************************************/
767e9e58ced195ec2c983c7723c9cbdabd45eb0f2fdMarie JanssentBTA_JV_STATUS BTA_JvRfcommWrite(uint32_t handle, uint32_t req_id);
7685738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project
7692f338f25530d2aaab7acf45701c271d10b81d96dGanesh Ganapathi Batta/*******************************************************************************
7708af480e24549ba51a3f6858d9d9af504715e0beaMyles Watson *
7718af480e24549ba51a3f6858d9d9af504715e0beaMyles Watson * Function    BTA_JVSetPmProfile
7728af480e24549ba51a3f6858d9d9af504715e0beaMyles Watson *
773cd1fd07f1306e08fe048682dd5918987e579f937Myles Watson * Description This function set or free power mode profile for different JV
7741baaae3f34a667058e7f0c5f778357d98320cf38Myles Watson *             application
7758af480e24549ba51a3f6858d9d9af504715e0beaMyles Watson *
7768af480e24549ba51a3f6858d9d9af504715e0beaMyles Watson * Parameters:  handle,  JV handle from RFCOMM or L2CAP
777cd1fd07f1306e08fe048682dd5918987e579f937Myles Watson *              app_id:  app specific pm ID, can be BTA_JV_PM_ALL, see
7781baaae3f34a667058e7f0c5f778357d98320cf38Myles Watson *                       bta_dm_cfg.c for details
779cd1fd07f1306e08fe048682dd5918987e579f937Myles Watson *              BTA_JV_PM_ID_CLEAR: removes pm management on the handle. init_st
7801baaae3f34a667058e7f0c5f778357d98320cf38Myles Watson *                                  is ignored and BTA_JV_CONN_CLOSE is called
7811baaae3f34a667058e7f0c5f778357d98320cf38Myles Watson *                                  implicitly
7821baaae3f34a667058e7f0c5f778357d98320cf38Myles Watson *              init_st: state after calling this API. typically it should be
7831baaae3f34a667058e7f0c5f778357d98320cf38Myles Watson *                       BTA_JV_CONN_OPEN
7848af480e24549ba51a3f6858d9d9af504715e0beaMyles Watson *
7858af480e24549ba51a3f6858d9d9af504715e0beaMyles Watson * Returns      BTA_JV_SUCCESS, if the request is being processed.
7868af480e24549ba51a3f6858d9d9af504715e0beaMyles Watson *              BTA_JV_FAILURE, otherwise.
7878af480e24549ba51a3f6858d9d9af504715e0beaMyles Watson *
788cd1fd07f1306e08fe048682dd5918987e579f937Myles Watson * NOTE:        BTA_JV_PM_ID_CLEAR: In general no need to be called as jv pm
7891baaae3f34a667058e7f0c5f778357d98320cf38Myles Watson *                                  calls automatically
7908af480e24549ba51a3f6858d9d9af504715e0beaMyles Watson *              BTA_JV_CONN_CLOSE to remove in case of connection close!
7918af480e24549ba51a3f6858d9d9af504715e0beaMyles Watson *
792ee96a3c60fca590d38025925c072d264e06493c4Myles Watson ******************************************************************************/
793e9e58ced195ec2c983c7723c9cbdabd45eb0f2fdMarie JanssentBTA_JV_STATUS BTA_JvSetPmProfile(uint32_t handle, tBTA_JV_PM_ID app_id,
794cd1fd07f1306e08fe048682dd5918987e579f937Myles Watson                                  tBTA_JV_CONN_STATE init_st);
7955738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project
7965738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project/*******************************************************************************
7978af480e24549ba51a3f6858d9d9af504715e0beaMyles Watson *
7988af480e24549ba51a3f6858d9d9af504715e0beaMyles Watson * Function         BTA_JvRfcommGetPortHdl
7998af480e24549ba51a3f6858d9d9af504715e0beaMyles Watson *
8008af480e24549ba51a3f6858d9d9af504715e0beaMyles Watson * Description    This function fetches the rfcomm port handle
8018af480e24549ba51a3f6858d9d9af504715e0beaMyles Watson *
8028af480e24549ba51a3f6858d9d9af504715e0beaMyles Watson * Returns          BTA_JV_SUCCESS, if the request is being processed.
8038af480e24549ba51a3f6858d9d9af504715e0beaMyles Watson *                  BTA_JV_FAILURE, otherwise.
8048af480e24549ba51a3f6858d9d9af504715e0beaMyles Watson *
8058af480e24549ba51a3f6858d9d9af504715e0beaMyles Watson ******************************************************************************/
806e9e58ced195ec2c983c7723c9cbdabd45eb0f2fdMarie Janssenuint16_t BTA_JvRfcommGetPortHdl(uint32_t handle);
8075738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project
8085738f83aeb59361a0a2eda2460113f6dc919427The Android Open Source Project#endif /* BTA_JV_API_H */
809