1 /******************************************************************************
3 * Copyright (C) 2003-2012 Broadcom Corporation
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:
9 * http://www.apache.org/licenses/LICENSE-2.0
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.
17 ******************************************************************************/
19 /******************************************************************************
21 * This is the interface file for GATT call-in functions.
23 ******************************************************************************/
24 #ifndef BTA_GATTC_CI_H
25 #define BTA_GATTC_CI_H
27 #include "bta_gatt_api.h"
29 /*****************************************************************************
30 ** Constants and data types
31 *****************************************************************************/
33 /* Open Complete Event */
37 tBTA_GATT_STATUS status;
40 #define BTA_GATTC_NV_LOAD_MAX 10
42 /* Read Ready Event */
46 tBTA_GATT_STATUS status;
48 tBTA_GATTC_NV_ATTR attr[BTA_GATTC_NV_LOAD_MAX];
52 /*****************************************************************************
53 ** Function Declarations
54 *****************************************************************************/
60 /*******************************************************************************
62 ** Function bta_gattc_ci_cache_open
64 ** Description This function sends an event to indicate server cache open
67 ** Parameters server_bda - server BDA of this cache.
68 ** status - BTA_GATT_OK if full buffer of data,
69 ** BTA_GATT_FAIL if an error has occurred.
73 *******************************************************************************/
74 extern void bta_gattc_ci_cache_open(BD_ADDR server_bda, UINT16 evt,
75 tBTA_GATT_STATUS status, UINT16 conn_id);
77 /*******************************************************************************
79 ** Function bta_gattc_ci_cache_load
81 ** Description This function sends an event to BTA indicating the phone has
82 ** load the servere cache and ready to send it to the stack.
84 ** Parameters server_bda - server BDA of this cache.
85 ** num_bytes_read - number of bytes read into the buffer
86 ** specified in the read callout-function.
87 ** status - BTA_GATT_OK if full buffer of data,
88 ** BTA_GATT_FAIL if an error has occurred.
92 *******************************************************************************/
93 extern void bta_gattc_ci_cache_load(BD_ADDR server_bda, UINT16 evt,
94 UINT16 num_attr, tBTA_GATTC_NV_ATTR *p_atrr,
95 tBTA_GATT_STATUS status, UINT16 conn_id);
97 /*******************************************************************************
99 ** Function bta_gattc_ci_save
101 ** Description This function sends an event to BTA indicating the phone has
102 ** save the server cache.
104 ** Parameters server_bda - server BDA of this cache.
105 ** status - BTA_GATT_OK if full buffer of data,
106 ** BTA_GATT_FAIL if an error has occurred.
110 *******************************************************************************/
111 extern void bta_gattc_ci_cache_save(BD_ADDR server_bda, UINT16 evt,
112 tBTA_GATT_STATUS status, UINT16 conn_id);
119 #endif /* BTA_GATTC_CI_H */