summaryrefslogtreecommitdiff
path: root/src/nfa/int/nfa_ee_int.h
blob: 8165c13ce9407a9639976c083788db5d79facedc (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
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
/******************************************************************************
 *
 *  Copyright (C) 2010-2014 Broadcom Corporation
 *
 *  Licensed under the Apache License, Version 2.0 (the "License");
 *  you may not use this file except in compliance with the License.
 *  You may obtain a copy of the License at:
 *
 *  http://www.apache.org/licenses/LICENSE-2.0
 *
 *  Unless required by applicable law or agreed to in writing, software
 *  distributed under the License is distributed on an "AS IS" BASIS,
 *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *  See the License for the specific language governing permissions and
 *  limitations under the License.
 *
 ******************************************************************************/


/******************************************************************************
 *
 *  This is the private interface file for the NFA EE.
 *
 ******************************************************************************/
#ifndef NFA_EE_INT_H
#define NFA_EE_INT_H
#include "nfc_api.h"
#include "nfa_ee_api.h"
#include "nfa_sys.h"

/*****************************************************************************
**  Constants and data types
*****************************************************************************/
#define NFA_EE_DEBUG            BT_TRACE_VERBOSE
#define NFA_EE_NUM_ECBS         (NFA_EE_MAX_EE_SUPPORTED+1) /* the number of tNFA_EE_ECBs (for NFCEEs and DH) */
#define NFA_EE_CB_4_DH          NFA_EE_MAX_EE_SUPPORTED     /* The index for DH in nfa_ee_cb.ee_cb[] */
#define NFA_EE_INVALID          0xFF
#define NFA_EE_MAX_TECH_ROUTE   4 /* only A, B, F, Bprime are supported by UICC now */

#ifndef NFA_EE_AID_CFG_TAG_NAME
#define NFA_EE_AID_CFG_TAG_NAME         0x4F /* AID                             */
#endif

/* NFA EE events */
enum
{
    NFA_EE_API_DISCOVER_EVT  = NFA_SYS_EVT_START(NFA_ID_EE),
    NFA_EE_API_REGISTER_EVT,
    NFA_EE_API_DEREGISTER_EVT,
    NFA_EE_API_MODE_SET_EVT,
    NFA_EE_API_SET_TECH_CFG_EVT,
    NFA_EE_API_SET_PROTO_CFG_EVT,
    NFA_EE_API_ADD_AID_EVT,
    NFA_EE_API_REMOVE_AID_EVT,
    NFA_EE_API_LMRT_SIZE_EVT,
    NFA_EE_API_UPDATE_NOW_EVT,
    NFA_EE_API_CONNECT_EVT,
    NFA_EE_API_SEND_DATA_EVT,
    NFA_EE_API_DISCONNECT_EVT,

    NFA_EE_NCI_DISC_RSP_EVT,
    NFA_EE_NCI_DISC_NTF_EVT,
    NFA_EE_NCI_MODE_SET_RSP_EVT,
    NFA_EE_NCI_CONN_EVT,
    NFA_EE_NCI_DATA_EVT,
    NFA_EE_NCI_ACTION_NTF_EVT,
    NFA_EE_NCI_DISC_REQ_NTF_EVT,
    NFA_EE_NCI_WAIT_RSP_EVT,

    NFA_EE_ROUT_TIMEOUT_EVT,
    NFA_EE_DISCV_TIMEOUT_EVT,
    NFA_EE_CFG_TO_NFCC_EVT,
    NFA_EE_MAX_EVT

};


typedef UINT16 tNFA_EE_INT_EVT;
#define NFA_EE_AE_ROUTE             0x80        /* for listen mode routing table*/
#define NFA_EE_AE_VS                0x40


/* NFA EE Management state */
enum
{
    NFA_EE_EM_STATE_INIT = 0,
    NFA_EE_EM_STATE_INIT_DONE,
    NFA_EE_EM_STATE_RESTORING,
    NFA_EE_EM_STATE_DISABLING,
    NFA_EE_EM_STATE_DISABLED,

    NFA_EE_EM_STATE_MAX
};
typedef UINT8 tNFA_EE_EM_STATE;

/* NFA EE connection status */
enum
{
    NFA_EE_CONN_ST_NONE,    /* not connected */
    NFA_EE_CONN_ST_WAIT,    /* connection is initiated; waiting for ack */
    NFA_EE_CONN_ST_CONN,    /* connected; can send/receive data */
    NFA_EE_CONN_ST_DISC,    /* disconnecting; waiting for ack */
    NFA_EE_CONN_ST_MAX
};
typedef UINT8 tNFA_EE_CONN_ST;

#define NFA_EE_MAX_AID_CFG_LEN  (510)
#define NFA_EE_7816_STATUS_LEN  (2)

/* NFA EE control block flags:
 * use to indicate an API function has changed the configuration of the associated NFCEE
 * The flags are cleared when the routing table/VS is updated */
#define NFA_EE_ECB_FLAGS_TECH       0x02      /* technology routing changed         */
#define NFA_EE_ECB_FLAGS_PROTO      0x04      /* protocol routing changed           */
#define NFA_EE_ECB_FLAGS_AID        0x08      /* AID routing changed                */
#define NFA_EE_ECB_FLAGS_VS         0x10      /* VS changed                         */
#define NFA_EE_ECB_FLAGS_RESTORE    0x20      /* Restore related                    */
#define NFA_EE_ECB_FLAGS_ROUTING    0x0E      /* routing flags changed              */
#define NFA_EE_ECB_FLAGS_DISC_REQ   0x40      /* NFCEE Discover Request NTF is set  */
#define NFA_EE_ECB_FLAGS_ORDER      0x80      /* DISC_REQ N reported before DISC N  */
typedef UINT8 tNFA_EE_ECB_FLAGS;

/* part of tNFA_EE_STATUS; for internal use only  */
#define NFA_EE_STATUS_RESTORING 0x20      /* waiting for restore to full power mode to complete */
#define NFA_EE_STATUS_INT_MASK  0x20      /* this bit is in ee_status for internal use only */

/* NFA-EE information for a particular NFCEE Entity (including DH) */
typedef struct
{
    tNFA_TECHNOLOGY_MASK    tech_switch_on;     /* default routing - technologies switch_on  */
    tNFA_TECHNOLOGY_MASK    tech_switch_off;    /* default routing - technologies switch_off */
    tNFA_TECHNOLOGY_MASK    tech_battery_off;   /* default routing - technologies battery_off*/
    tNFA_PROTOCOL_MASK      proto_switch_on;    /* default routing - protocols switch_on     */
    tNFA_PROTOCOL_MASK      proto_switch_off;   /* default routing - protocols switch_off    */
    tNFA_PROTOCOL_MASK      proto_battery_off;  /* default routing - protocols battery_off   */
    tNFA_EE_CONN_ST         conn_st;            /* connection status */
    UINT8                   conn_id;            /* connection id */
    tNFA_EE_CBACK           *p_ee_cback;        /* the callback function */

    /* Each AID entry has an ssociated aid_len, aid_pwr_cfg, aid_rt_info.
     * aid_cfg[] contains AID and maybe some other VS information in TLV format
     * The first T is always NFA_EE_AID_CFG_TAG_NAME, the L is the actual AID length
     * the aid_len is the total length of all the TLVs associated with this AID entry
     */
    UINT8                   aid_len[NFA_EE_MAX_AID_ENTRIES];/* the actual lengths in aid_cfg */
    UINT8                   aid_pwr_cfg[NFA_EE_MAX_AID_ENTRIES];/* power configuration of this AID entry */
    UINT8                   aid_rt_info[NFA_EE_MAX_AID_ENTRIES];/* route/vs info for this AID entry */
    UINT8                   aid_cfg[NFA_EE_MAX_AID_CFG_LEN];/* routing entries based on AID */
    UINT8                   aid_entries;        /* The number of AID entries in aid_cfg */
    UINT8                   nfcee_id;           /* ID for this NFCEE */
    UINT8                   ee_status;          /* The NFCEE status */
    UINT8                   ee_old_status;      /* The NFCEE status before going to low power mode */
    tNFA_EE_INTERFACE       ee_interface[NFC_MAX_EE_INTERFACE];/* NFCEE supported interface */
    tNFA_EE_TLV             ee_tlv[NFC_MAX_EE_TLVS];/* the TLV */
    UINT8                   num_interface;      /* number of Target interface */
    UINT8                   num_tlvs;           /* number of TLVs */
    tNFA_EE_ECB_FLAGS       ecb_flags;          /* the flags of this control block */
    tNFA_EE_INTERFACE       use_interface;      /* NFCEE interface used for the connection */
    tNFA_NFC_PROTOCOL       la_protocol;        /* Listen A protocol    */
    tNFA_NFC_PROTOCOL       lb_protocol;        /* Listen B protocol    */
    tNFA_NFC_PROTOCOL       lf_protocol;        /* Listen F protocol    */
    tNFA_NFC_PROTOCOL       lbp_protocol;       /* Listen B' protocol   */
    UINT8                   size_mask;          /* the size for technology and protocol routing */
    UINT16                  size_aid;           /* the size for aid routing */
} tNFA_EE_ECB;

/* data type for NFA_EE_API_DISCOVER_EVT */
typedef struct
{
    BT_HDR              hdr;
    tNFA_EE_CBACK       *p_cback;
} tNFA_EE_API_DISCOVER;

/* data type for NFA_EE_API_REGISTER_EVT */
typedef struct
{
    BT_HDR              hdr;
    tNFA_EE_CBACK       *p_cback;
} tNFA_EE_API_REGISTER;

/* data type for NFA_EE_API_DEREGISTER_EVT */
typedef struct
{
    BT_HDR              hdr;
    int                 index;
} tNFA_EE_API_DEREGISTER;

/* data type for NFA_EE_API_MODE_SET_EVT */
typedef struct
{
    BT_HDR              hdr;
    tNFA_EE_ECB        *p_cb;
    UINT8               nfcee_id;
    UINT8               mode;
} tNFA_EE_API_MODE_SET;

/* data type for NFA_EE_API_SET_TECH_CFG_EVT */
typedef struct
{
    BT_HDR                  hdr;
    tNFA_EE_ECB            *p_cb;
    UINT8                   nfcee_id;
    tNFA_TECHNOLOGY_MASK    technologies_switch_on;
    tNFA_TECHNOLOGY_MASK    technologies_switch_off;
    tNFA_TECHNOLOGY_MASK    technologies_battery_off;
} tNFA_EE_API_SET_TECH_CFG;

/* data type for NFA_EE_API_SET_PROTO_CFG_EVT */
typedef struct
{
    BT_HDR              hdr;
    tNFA_EE_ECB        *p_cb;
    UINT8               nfcee_id;
    tNFA_PROTOCOL_MASK  protocols_switch_on;
    tNFA_PROTOCOL_MASK  protocols_switch_off;
    tNFA_PROTOCOL_MASK  protocols_battery_off;
} tNFA_EE_API_SET_PROTO_CFG;

/* data type for NFA_EE_API_ADD_AID_EVT */
typedef struct
{
    BT_HDR              hdr;
    tNFA_EE_ECB        *p_cb;
    UINT8               nfcee_id;
    UINT8               aid_len;
    UINT8               *p_aid;
    tNFA_EE_PWR_STATE   power_state;
} tNFA_EE_API_ADD_AID;

/* data type for NFA_EE_API_REMOVE_AID_EVT */
typedef struct
{
    BT_HDR              hdr;
    UINT8               aid_len;
    UINT8               *p_aid;
} tNFA_EE_API_REMOVE_AID;

/* data type for NFA_EE_API_LMRT_SIZE_EVT */
typedef  BT_HDR tNFA_EE_API_LMRT_SIZE;

/* data type for NFA_EE_API_CONNECT_EVT */
typedef struct
{
    BT_HDR              hdr;
    tNFA_EE_ECB        *p_cb;
    UINT8               nfcee_id;
    UINT8               ee_interface;
    tNFA_EE_CBACK       *p_cback;
} tNFA_EE_API_CONNECT;

/* data type for NFA_EE_API_SEND_DATA_EVT */
typedef struct
{
    BT_HDR              hdr;
    tNFA_EE_ECB        *p_cb;
    UINT8               nfcee_id;
    UINT16              data_len;
    UINT8               *p_data;
} tNFA_EE_API_SEND_DATA;

/* data type for NFA_EE_API_DISCONNECT_EVT */
typedef struct
{
    BT_HDR              hdr;
    tNFA_EE_ECB        *p_cb;
    UINT8               nfcee_id;
} tNFA_EE_API_DISCONNECT;


typedef struct
{
    BT_HDR              hdr;
    tNFC_STATUS         status;                 /* The event status. */
} tNFA_EE_MSG_STATUS;

/* common data type for internal events with nfa_ee_use_cfg_cb[] as TRUE */
typedef struct
{
    BT_HDR              hdr;
    tNFA_EE_ECB        *p_cb;
    UINT8               nfcee_id;
} tNFA_EE_CFG_HDR;

/* data type for tNFC_RESPONSE_EVT */
typedef struct
{
    BT_HDR                      hdr;
    void                        *p_data;
} tNFA_EE_NCI_RESPONSE;

/* data type for NFA_EE_NCI_DISC_RSP_EVT */
typedef struct
{
    BT_HDR                      hdr;
    tNFC_NFCEE_DISCOVER_REVT    *p_data;
} tNFA_EE_NCI_DISC_RSP;

/* data type for NFA_EE_NCI_DISC_NTF_EVT */
typedef struct
{
    BT_HDR                      hdr;
    tNFC_NFCEE_INFO_REVT        *p_data;
} tNFA_EE_NCI_DISC_NTF;

/* data type for NFA_EE_NCI_MODE_SET_RSP_EVT */
typedef struct
{
    BT_HDR                      hdr;
    tNFC_NFCEE_MODE_SET_REVT    *p_data;
} tNFA_EE_NCI_MODE_SET;

/* data type for NFA_EE_NCI_WAIT_RSP_EVT */
typedef struct
{
    BT_HDR                      hdr;
    void                        *p_data;
    UINT8                       opcode;
} tNFA_EE_NCI_WAIT_RSP;

/* data type for NFA_EE_NCI_CONN_EVT and NFA_EE_NCI_DATA_EVT */
typedef struct
{
    BT_HDR                      hdr;
    UINT8                       conn_id;
    tNFC_CONN_EVT               event;
    tNFC_CONN                   *p_data;
} tNFA_EE_NCI_CONN;

/* data type for NFA_EE_NCI_ACTION_NTF_EVT */
typedef struct
{
    BT_HDR                      hdr;
    tNFC_EE_ACTION_REVT         *p_data;
} tNFA_EE_NCI_ACTION;

/* data type for NFA_EE_NCI_DISC_REQ_NTF_EVT */
typedef struct
{
    BT_HDR                      hdr;
    tNFC_EE_DISCOVER_REQ_REVT   *p_data;
} tNFA_EE_NCI_DISC_REQ;

/* union of all event data types */
typedef union
{
    BT_HDR                      hdr;
    tNFA_EE_CFG_HDR             cfg_hdr;
    tNFA_EE_API_DISCOVER        ee_discover;
    tNFA_EE_API_REGISTER        ee_register;
    tNFA_EE_API_DEREGISTER      deregister;
    tNFA_EE_API_MODE_SET        mode_set;
    tNFA_EE_API_SET_TECH_CFG    set_tech;
    tNFA_EE_API_SET_PROTO_CFG   set_proto;
    tNFA_EE_API_ADD_AID         add_aid;
    tNFA_EE_API_REMOVE_AID      rm_aid;
    tNFA_EE_API_LMRT_SIZE       lmrt_size;
    tNFA_EE_API_CONNECT         connect;
    tNFA_EE_API_SEND_DATA       send_data;
    tNFA_EE_API_DISCONNECT      disconnect;
    tNFA_EE_NCI_DISC_RSP        disc_rsp;
    tNFA_EE_NCI_DISC_NTF        disc_ntf;
    tNFA_EE_NCI_MODE_SET        mode_set_rsp;
    tNFA_EE_NCI_WAIT_RSP        wait_rsp;
    tNFA_EE_NCI_CONN            conn;
    tNFA_EE_NCI_ACTION          act;
    tNFA_EE_NCI_DISC_REQ        disc_req;
} tNFA_EE_MSG;

/* type for State Machine (SM) action functions */
typedef void (*tNFA_EE_SM_ACT)(tNFA_EE_MSG *p_data);

/*****************************************************************************
**  control block
*****************************************************************************/
#define NFA_EE_CFGED_UPDATE_NOW         0x80
#define NFA_EE_CFGED_OFF_ROUTING        0x40    /* either switch off or battery off is configured */

/* the following status are the definition used in ee_cfg_sts */
#define NFA_EE_STS_CHANGED_ROUTING      0x01
#define NFA_EE_STS_CHANGED_VS           0x02
#define NFA_EE_STS_CHANGED              0x0f
#define NFA_EE_STS_PREV_ROUTING         0x10
#define NFA_EE_STS_PREV                 0xf0


#define NFA_EE_WAIT_UPDATE              0x10    /* need to report NFA_EE_UPDATED_EVT */
#define NFA_EE_WAIT_UPDATE_RSP          0x20    /* waiting for the rsp of set routing commands */
#define NFA_EE_WAIT_UPDATE_ALL          0xF0

typedef UINT8 tNFA_EE_WAIT;

#define NFA_EE_FLAG_WAIT_HCI            0x01    /* set this bit when waiting for HCI to finish the initialization process in NFA_EE_EM_STATE_RESTORING */
#define NFA_EE_FLAG_NOTIFY_HCI          0x02    /* set this bit when EE needs to notify the p_enable_cback at the end of NFCEE discover process in NFA_EE_EM_STATE_RESTORING */
#define NFA_EE_FLAG_WAIT_DISCONN        0x04    /* set this bit when gracefully disable with outstanding NCI connections */
typedef UINT8 tNFA_EE_FLAGS;


#define NFA_EE_DISC_STS_ON              0x00    /* NFCEE DISCOVER in progress       */
#define NFA_EE_DISC_STS_OFF             0x01    /* disable NFCEE DISCOVER           */
#define NFA_EE_DISC_STS_REQ             0x02    /* received NFCEE DISCOVER REQ NTF  */
typedef UINT8 tNFA_EE_DISC_STS;

typedef void (tNFA_EE_ENABLE_DONE_CBACK)(tNFA_EE_DISC_STS status);

/* NFA EE Management control block */
typedef struct
{
    tNFA_EE_ECB          ecb[NFA_EE_NUM_ECBS];   /* control block for DH and NFCEEs  */
    TIMER_LIST_ENT       timer;                  /* timer to send info to NFCC       */
    TIMER_LIST_ENT       discv_timer;            /* timer to end NFCEE discovery     */
    tNFA_EE_CBACK        *p_ee_cback[NFA_EE_MAX_CBACKS];/* to report EE events       */
    tNFA_EE_CBACK        *p_ee_disc_cback;       /* to report EE discovery result    */
    tNFA_EE_ENABLE_DONE_CBACK *p_enable_cback;   /* callback to notify on enable done*/
    tNFA_EE_EM_STATE     em_state;               /* NFA-EE state initialized or not  */
    UINT8                wait_rsp;               /* num of NCI rsp expected (update) */
    UINT8                num_ee_expecting;       /* number of ee_info still expecting*/
    UINT8                cur_ee;                 /* the number of ee_info in cb      */
    UINT8                ee_cfged;               /* the bit mask of configured ECBs  */
    UINT8                ee_cfg_sts;             /* configuration status             */
    tNFA_EE_WAIT         ee_wait_evt;            /* Pending event(s) to be reported  */
    tNFA_EE_FLAGS        ee_flags;               /* flags                            */
} tNFA_EE_CB;

/*****************************************************************************
**  External variables
*****************************************************************************/

/* NFA EE control block */
extern tNFA_EE_CB nfa_ee_cb;

/*****************************************************************************
**  External functions
*****************************************************************************/
/* function prototypes - exported from nfa_ee_main.c */
void nfa_ee_sys_enable (void);
void nfa_ee_sys_disable (void);

/* event handler function type */
BOOLEAN nfa_ee_evt_hdlr (BT_HDR *p_msg);
void nfa_ee_proc_nfcc_power_mode (UINT8 nfcc_power_mode);
#if (NFC_NFCEE_INCLUDED == TRUE)
void nfa_ee_get_tech_route (UINT8 power_state, UINT8 *p_handles);
#endif
void nfa_ee_proc_evt(tNFC_RESPONSE_EVT event, void *p_data);
tNFA_EE_ECB * nfa_ee_find_ecb (UINT8 nfcee_id);
tNFA_EE_ECB * nfa_ee_find_ecb_by_conn_id (UINT8 conn_id);
UINT8 nfa_ee_ecb_to_mask (tNFA_EE_ECB *p_cb);
void nfa_ee_restore_one_ecb (tNFA_EE_ECB *p_cb);
BOOLEAN nfa_ee_is_active (tNFA_HANDLE nfcee_id);

/* Action function prototypes - nfa_ee_act.c */
void nfa_ee_api_discover(tNFA_EE_MSG *p_data);
void nfa_ee_api_register(tNFA_EE_MSG *p_data);
void nfa_ee_api_deregister(tNFA_EE_MSG *p_data);
void nfa_ee_api_mode_set(tNFA_EE_MSG *p_data);
void nfa_ee_api_set_tech_cfg(tNFA_EE_MSG *p_data);
void nfa_ee_api_set_proto_cfg(tNFA_EE_MSG *p_data);
void nfa_ee_api_add_aid(tNFA_EE_MSG *p_data);
void nfa_ee_api_remove_aid(tNFA_EE_MSG *p_data);
void nfa_ee_api_lmrt_size(tNFA_EE_MSG *p_data);
void nfa_ee_api_update_now(tNFA_EE_MSG *p_data);
void nfa_ee_api_connect(tNFA_EE_MSG *p_data);
void nfa_ee_api_send_data(tNFA_EE_MSG *p_data);
void nfa_ee_api_disconnect(tNFA_EE_MSG *p_data);
void nfa_ee_report_disc_done(BOOLEAN notify_sys);
void nfa_ee_nci_disc_rsp(tNFA_EE_MSG *p_data);
void nfa_ee_nci_disc_ntf(tNFA_EE_MSG *p_data);
void nfa_ee_nci_mode_set_rsp(tNFA_EE_MSG *p_data);
void nfa_ee_nci_wait_rsp(tNFA_EE_MSG *p_data);
void nfa_ee_nci_conn(tNFA_EE_MSG *p_data);
void nfa_ee_nci_action_ntf(tNFA_EE_MSG *p_data);
void nfa_ee_nci_disc_req_ntf(tNFA_EE_MSG *p_data);
void nfa_ee_rout_timeout(tNFA_EE_MSG *p_data);
void nfa_ee_discv_timeout(tNFA_EE_MSG *p_data);
void nfa_ee_lmrt_to_nfcc(tNFA_EE_MSG *p_data);
void nfa_ee_update_rout(void);
void nfa_ee_report_event(tNFA_EE_CBACK *p_cback, tNFA_EE_EVT event, tNFA_EE_CBACK_DATA *p_data);
tNFA_EE_ECB * nfa_ee_find_aid_offset(UINT8 aid_len, UINT8 *p_aid, int *p_offset, int *p_entry);
void nfa_ee_remove_labels(void);
int nfa_ee_find_total_aid_len(tNFA_EE_ECB *p_cb, int start_entry);
void nfa_ee_start_timer(void);
void nfa_ee_reg_cback_enable_done (tNFA_EE_ENABLE_DONE_CBACK *p_cback);
void nfa_ee_report_update_evt (void);

extern void nfa_ee_proc_hci_info_cback (void);
void nfa_ee_check_disable (void);
BOOLEAN nfa_ee_restore_ntf_done(void);
void nfa_ee_check_restore_complete(void);


#endif /* NFA_P2P_INT_H */