1/******************************************************************************
2 *
3 *  Copyright (C) 2009-2013 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 client call-out functions.
22 *
23 ******************************************************************************/
24#ifndef BTA_GATTC_CO_H
25#define BTA_GATTC_CO_H
26
27#include "bta_gatt_api.h"
28
29/*******************************************************************************
30**
31** Function         bta_gattc_co_cache_open
32**
33** Description      This callout function is executed by GATTC when a GATT server
34**                  cache is ready to be sent.
35**
36** Parameter        server_bda: server bd address of this cache belongs to
37**                  evt: call in event to be passed in when cache open is done.
38**                  conn_id: connection ID of this cache operation attach to.
39**                  to_save: open cache to save or to load.
40**
41** Returns          void.
42**
43*******************************************************************************/
44BTA_API extern void bta_gattc_co_cache_open(BD_ADDR server_bda, UINT16 evt,
45                                            UINT16 conn_id, BOOLEAN to_save);
46
47/*******************************************************************************
48**
49** Function         bta_gattc_co_cache_close
50**
51** Description      This callout function is executed by GATTC when a GATT server
52**                  cache is written completely.
53**
54** Parameter        server_bda: server bd address of this cache belongs to
55**                  conn_id: connection ID of this cache operation attach to.
56**
57** Returns          void.
58**
59*******************************************************************************/
60BTA_API extern void bta_gattc_co_cache_close(BD_ADDR server_bda, UINT16 conn_id);
61
62/*******************************************************************************
63**
64** Function         bta_gattc_co_cache_save
65**
66** Description      This callout function is executed by GATT when a server cache
67**                  is available to save.
68**
69** Parameter        server_bda: server bd address of this cache belongs to
70**                  evt: call in event to be passed in when cache save is done.
71**                  num_attr: number of attribute to be save.
72**                  p_attr: pointer to the list of attributes to save.
73**                  attr_index: starting attribute index of the save operation.
74**                  conn_id: connection ID of this cache operation attach to.
75** Returns
76**
77*******************************************************************************/
78BTA_API extern void bta_gattc_co_cache_save(BD_ADDR server_bda, UINT16 evt,
79                                          UINT16 num_attr, tBTA_GATTC_NV_ATTR *p_attr,
80                                          UINT16 attr_index, UINT16 conn_id);
81
82/*******************************************************************************
83**
84** Function         bta_gattc_co_cache_load
85**
86** Description      This callout function is executed by GATT when server cache
87**                  is required to load.
88**
89** Parameter        server_bda: server bd address of this cache belongs to
90**                  evt: call in event to be passed in when cache save is done.
91**                  num_attr: number of attribute to be save.
92**                  attr_index: starting attribute index of the save operation.
93**                  conn_id: connection ID of this cache operation attach to.
94** Returns
95**
96*******************************************************************************/
97BTA_API extern void bta_gattc_co_cache_load(BD_ADDR server_bda, UINT16 evt,
98                                            UINT16 start_index, UINT16 conn_id);
99
100/*******************************************************************************
101**
102** Function         bta_gattc_co_cache_reset
103**
104** Description      This callout function is executed by GATTC to reset cache in
105**                  application
106**
107** Parameter        server_bda: server bd address of this cache belongs to
108**
109** Returns          void.
110**
111*******************************************************************************/
112BTA_API extern void bta_gattc_co_cache_reset(BD_ADDR server_bda);
113
114#endif /* BTA_GATT_CO_H */
115
116