summaryrefslogtreecommitdiffstats
path: root/bta/include/bta_sc_co.h
blob: a0888234fc8b63483d2b9ea506f48b7c303d4957 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
/*****************************************************************************
**
**  Name:           bta_sc_co.h
**
**  Description:    This is the interface file for the SIM access
**                  server call-out functions.
**
**  Copyright (c) 2003, Widcomm Inc., All Rights Reserved.
**  Widcomm Bluetooth Core. Proprietary and confidential.
**
*****************************************************************************/
#ifndef BTA_SC_CO_H
#define BTA_SC_CO_H

#include "bta_sc_api.h"

/*****************************************************************************
**  Constants and Data Types
*****************************************************************************/

/*****************************************************************************
**  Function Declarations
*****************************************************************************/
#ifdef __cplusplus
extern "C"
{
#endif

/*******************************************************************************
**
** Function     bta_sc_co_sim_opem
**
** Description  Called when client connection is opened, in case any special
**              handling or intialization of the SIM is required.
**
** Parameters  
**          None.
**
** Returns      void 
**
*******************************************************************************/
BTA_API extern void bta_sc_co_sim_open(void);

/*******************************************************************************
**
** Function     bta_sc_co_sim_close
**
** Description  Called when client connection is closed.
**
** Parameters  
**          None.
**
** Returns      void 
**
*******************************************************************************/
BTA_API extern void bta_sc_co_sim_close(void);

/*******************************************************************************
**
** Function     bta_sc_co_sim_reset
**
** Description  This function is called by BTA to reset the SIM card
**
**              Once SIM has been turned reset, call bta_sc_ci_sim_reset().
**
** Parameters  
**          None.
**
** Returns      void 
**
*******************************************************************************/
BTA_API extern void bta_sc_co_sim_reset(void);

/*******************************************************************************
**
** Function     bta_sc_co_sim_off
**
** Description  This function is called by BTA to turn the SIM card off
**
**              Once SIM has been turned on, call bta_sc_ci_sim_on().
**
** Parameters  
**          None.
**
** Returns      void 
**
*******************************************************************************/
BTA_API extern void bta_sc_co_sim_off(void);

/*******************************************************************************
**
** Function     bta_sc_co_sim_on
**
** Description  This function is called by BTA to turn the SIM card on
**
**              Once SIM has been turned on, call bta_sc_ci_sim_on().
**
** Parameters  
**          None.
**
** Returns      void 
**
*******************************************************************************/
BTA_API extern void bta_sc_co_sim_on(void);

/*******************************************************************************
**
** Function     bta_sc_co_atr
**
** Description  This function is called by BTA to retrieve ATR information 
**              (operational requirements of the SIM, as described in
**              section 5.8 of GSM 11.11)
**
**              Once the ATR information is retrieved, call bta_sc_ci_atr().
**
** Parameters  
**          None.
**
** Returns      void 
**
*******************************************************************************/
BTA_API extern void bta_sc_co_atr(void);

/*******************************************************************************
**
** Function     bta_sc_co_apdu
**
** Description  This function is called by BTA to to transfer APDU command
**              messages to the SIM. Generally used for selecting, storing
**              and retrieving data from the SIM.
**
**              Once the command has been completed, call bta_sc_ci_apdu()
**              with the result.
**
** Parameters  
**      p_apdu_req  Pointer to the APDU message from the client. Format
**                  is described in section 9 of GSM 11.11
**
**      req_len     Length of APDU message.
**
**      rsp_maxlen  Maximum length of response message allowed by client
**                  (negotiated during CONNECT_REQ)
**
** Returns      void 
**
*******************************************************************************/
BTA_API extern void bta_sc_co_apdu(UINT8 *p_apdu_req, UINT16 req_len, UINT16 rsp_maxlen, BOOLEAN is_apdu_7816);

#ifdef __cplusplus
}
#endif

#endif /* BTA_SC_CO_H */