srvc_dis_int.h revision 2e7fa68bfd9723b7ec7b6b0b128d89f31a2e06ee
1/*****************************************************************************
2**
3**  Name:          srvc_dis_int.h
4**
5**  Description:   this file contains the GAP internal interface
6**                 definitions.
7**
8**
9**  Copyright (c) 1999-2008, Broadcom Corp., All Rights Reserved.
10**  WIDCOMM Bluetooth Core. Proprietary and confidential.
11******************************************************************************/
12
13#ifndef SRVC_DIS_INT_H
14#define SRVC_DIS_INT_H
15
16#include "bt_target.h"
17#include "srvc_api.h"
18#include "gatt_api.h"
19
20#define DIS_MAX_CHAR_NUM            9
21
22
23typedef struct
24{
25    UINT16      uuid;
26    UINT16      handle;
27}tDIS_DB_ENTRY;
28
29#define DIS_SYSTEM_ID_SIZE      8
30#define DIS_PNP_ID_SIZE         7
31
32
33
34typedef struct
35{
36    tDIS_DB_ENTRY           dis_attr[DIS_MAX_CHAR_NUM];
37    tDIS_VALUE              dis_value;
38
39    tDIS_READ_CBACK         *p_read_dis_cback;
40
41    UINT16                  service_handle;
42    UINT16                  max_handle;
43
44    BOOLEAN                 enabled;
45
46    UINT8                   dis_read_uuid_idx;
47}tDIS_CB;
48
49
50
51#ifdef __cplusplus
52extern "C" {
53#endif
54
55/* Global GATT data */
56#if GATT_DYNAMIC_MEMORY == FALSE
57GATT_API extern tDIS_CB dis_cb;
58#else
59GATT_API extern tDIS_CB *dis_cb_ptr;
60#define dis_cb (*dis_cb_ptr)
61#endif
62
63
64extern BOOLEAN dis_valid_handle_range(UINT16 handle);
65extern UINT8 dis_read_attr_value (UINT8 clcb_idx, UINT16 handle, tGATT_VALUE *p_value,
66                           BOOLEAN is_long, tGATT_STATUS *p_status);
67extern UINT8 dis_write_attr_value(tGATT_WRITE_REQ * p_data, tGATT_STATUS *p_status);
68
69extern void dis_c_cmpl_cback (tSRVC_CLCB *p_clcb, tGATTC_OPTYPE op,
70                                    tGATT_STATUS status, tGATT_CL_COMPLETE *p_data);
71
72
73#ifdef __cplusplus
74}
75#endif
76#endif
77