Home | History | Annotate | Download | only in include
      1 /******************************************************************************
      2  *
      3  *  Copyright 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_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
     34  *                  server handle range ios to be added or removed.
     35  *
     36  * Parameter        is_add: true is to add a handle range; otherwise is to
     37  *                          delete.
     38  *                  p_hndl_range: handle range.
     39  *
     40  * Returns          void.
     41  *
     42  ******************************************************************************/
     43 extern void bta_gatts_co_update_handle_range(
     44     bool is_add, tBTA_GATTS_HNDL_RANGE* p_hndl_range);
     45 
     46 /*******************************************************************************
     47  *
     48  * Function         bta_gatts_co_srv_chg
     49  *
     50  * Description      This call-out is to read/write/remove service change related
     51  *                  informaiton. The request consists of the cmd and p_req and
     52  *                  the response is returned in p_rsp
     53  *
     54  * Parameter        cmd - request command
     55  *                  p_req - request paramters
     56  *                  p_rsp - response data for the request
     57  *
     58  * Returns          true - if the request is processed successfully and
     59  *                         the response is returned in p_rsp.
     60  *                  false - if the request can not be processed
     61  *
     62  ******************************************************************************/
     63 extern bool bta_gatts_co_srv_chg(tGATTS_SRV_CHG_CMD cmd,
     64                                  tGATTS_SRV_CHG_REQ* p_req,
     65                                  tGATTS_SRV_CHG_RSP* p_rsp);
     66 
     67 /*******************************************************************************
     68  *
     69  * Function         bta_gatts_co_load_handle_range
     70  *
     71  * Description      This callout function is executed by GATTS when a GATT
     72  *                  server handle range is requested to be loaded from NV.
     73  *
     74  * Parameter
     75  *
     76  * Returns          void.
     77  *
     78  ******************************************************************************/
     79 extern bool bta_gatts_co_load_handle_range(uint8_t index,
     80                                            tBTA_GATTS_HNDL_RANGE* p_handle);
     81 
     82 #endif /* BTA_GATTS_CO_H */
     83