Tizen 2.0 Release
[framework/api/nfc.git] / include / nfc_private.h
1 /*
2 * Copyright (c) 2012, 2013 Samsung Electronics Co., Ltd.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17 #ifndef __NFC_PRIVATE_H__
18 #define __NFC_PRIVATE_H__
19 #include <net_nfc.h>
20 #include <net_nfc_typedef_private.h>
21
22 #include <nfc.h>
23
24
25 typedef enum {
26         _NFC_CALLBACK_TYPE_RESULT=0,
27         _NFC_CALLBACK_TYPE_DATA=1,
28 } _nfc_callback_type;
29
30
31 typedef struct {
32         bool initialized;
33
34         nfc_tag_discovered_cb                   on_tag_discovered_cb;
35         void *                                          on_tag_discovered_user_data;
36         nfc_ndef_discovered_cb          on_ndef_discovered_cb;
37         void *                                          on_ndef_discovered_user_data;
38         net_nfc_target_info_s                   *current_tag;
39
40         //net_nfc_target_handle_s               current_target;
41         net_nfc_target_handle_h         current_target;
42
43         nfc_p2p_target_discovered_cb    on_p2p_discovered_cb;
44         void *                                          on_p2p_discovered_user_data;
45
46         nfc_se_event_cb                         on_se_event_cb;
47         void *                                          on_se_event_user_data;
48
49         nfc_p2p_send_completed_cb       on_p2p_send_completed_cb;
50         void *                                          on_p2p_send_completed_user_data;
51
52         nfc_p2p_data_recived_cb         on_p2p_recv_cb;
53         void *                                          on_p2p_recv_user_data;
54
55         nfc_p2p_connection_handover_completed_cb                on_p2p_connection_handover_completed_cb;
56         void *                                                                          on_p2p_connection_handover_completed_user_data;
57
58         nfc_initialize_completed_cb             on_initialize_completed_cb;
59
60         nfc_se_transaction_event_cb             on_se_transaction_event_cb;
61         void *                                          on_se_transaction_event_user_data;
62
63         nfc_activation_changed_cb       on_activation_changed_cb;
64         void *                                          on_activation_changed_user_data;
65
66         nfc_activation_completed_cb     on_activation_completed_cb;
67         void *                                          on_activation_completed_user_data;
68         bool                        on_activation_doing;
69
70 } _nfc_context_s;
71
72 typedef struct {
73         void * callback;
74         void * user_data;
75         int callback_type;
76 } _async_callback_data;
77
78 #endif // __NET_NFC_PRIVATE_H__