1 /****************************************************************************** 2 * 3 * Copyright (C) 2010-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 BTA GATT server call-out functions. 22 * 23 ******************************************************************************/ 24 #ifndef BTA_GATTS_CO_H 25 #define BTA_GATTS_CO_H 26 27 #include "bta/bta_gatt_api.h" 28 29 /******************************************************************************* 30 ** 31 ** Function bta_gatts_co_update_handle_range 32 ** 33 ** Description This callout function is executed by GATTS when a GATT server 34 ** handle range ios to be added or removed. 35 ** 36 ** Parameter is_add: true is to add a handle range; otherwise is to delete. 37 ** p_hndl_range: handle range. 38 ** 39 ** Returns void. 40 ** 41 *******************************************************************************/ 42 extern void bta_gatts_co_update_handle_range(BOOLEAN is_add, tBTA_GATTS_HNDL_RANGE *p_hndl_range); 43 44 /******************************************************************************* 45 ** 46 ** Function bta_gatts_co_srv_chg 47 ** 48 ** Description This call-out is to read/write/remove service change related 49 ** informaiton. The request consists of the cmd and p_req and the 50 ** response is returned in p_rsp 51 ** 52 ** Parameter cmd - request command 53 ** p_req - request paramters 54 ** p_rsp - response data for the request 55 ** 56 ** Returns TRUE - if the request is processed successfully and 57 ** the response is returned in p_rsp. 58 ** FALSE - if the request can not be processed 59 ** 60 *******************************************************************************/ 61 extern BOOLEAN bta_gatts_co_srv_chg(tBTA_GATTS_SRV_CHG_CMD cmd, 62 tBTA_GATTS_SRV_CHG_REQ *p_req, 63 tBTA_GATTS_SRV_CHG_RSP *p_rsp); 64 65 /******************************************************************************* 66 ** 67 ** Function bta_gatts_co_load_handle_range 68 ** 69 ** Description This callout function is executed by GATTS when a GATT server 70 ** handle range is requested to be loaded from NV. 71 ** 72 ** Parameter 73 ** 74 ** Returns void. 75 ** 76 *******************************************************************************/ 77 extern BOOLEAN bta_gatts_co_load_handle_range(UINT8 index, 78 tBTA_GATTS_HNDL_RANGE *p_handle); 79 80 81 #endif /* BTA_GATTS_CO_H */ 82