PHDC P2P Handling
[platform/core/connectivity/nfc-manager-neard.git] / client / include / net_nfc_client_phdc.h
1 /*
2  * Copyright (c) 2012, 2013 Samsung Electronics Co., Ltd.
3  *
4  * Licensed under the Flora License, Version 1.1 (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://floralicense.org/license/
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 #ifndef __NET_NFC_CLIENT_PHDC_H__
17 #define __NET_NFC_CLIENT_PHDC_H__
18
19 #include "net_nfc_typedef.h"
20
21 /* PHDC callbacks */
22
23 typedef void (*net_nfc_client_phdc_send_completed)(net_nfc_error_e result,
24                 void *user_data);
25
26 typedef void (*net_nfc_client_phdc_transport_connect_indication)(
27                 net_nfc_phdc_handle_h handle_info,void *user_data);
28
29 typedef void (*net_nfc_client_phdc_transport_disconnect_indication)(void *user_data);
30
31 typedef void (*net_nfc_client_phdc_data_received)(data_s *phdc_data,
32                 void *user_data);
33
34 typedef void (*net_nfc_client_phdc_event_cb)( net_nfc_error_e result,
35                 net_nfc_llcp_state_t event, void *user_data);
36
37 /* PHDC client API's*/
38 net_nfc_error_e net_nfc_client_phdc_send(net_nfc_phdc_handle_h handle,
39                 data_s *data, net_nfc_client_phdc_send_completed callback, void *user_data);
40
41 net_nfc_error_e net_nfc_client_phdc_send_sync(net_nfc_phdc_handle_h handle,
42                 data_s *data);
43
44 /* PHDC client API's - used for registering callbacks*/
45 void net_nfc_client_phdc_set_transport_connect_indication(
46                 net_nfc_client_phdc_transport_connect_indication callback, void *user_data);
47
48 void net_nfc_client_phdc_set_transport_disconnect_indication(
49                 net_nfc_client_phdc_transport_disconnect_indication callback, void *user_data);
50
51 void net_nfc_client_phdc_set_data_received(
52                 net_nfc_client_phdc_data_received callback, void *user_data);
53
54 net_nfc_error_e net_nfc_client_phdc_register(net_nfc_phdc_role_e role,
55                 const char *san,net_nfc_client_phdc_event_cb callback, void *user_data);
56
57 net_nfc_error_e net_nfc_client_phdc_unregister( net_nfc_phdc_role_e role,
58                 const char *san);
59
60
61 /* PHDC client API's - used for unregistering callbacks*/
62 void net_nfc_client_phdc_unset_transport_connect_indication(void);
63
64 void net_nfc_client_phdc_unset_transport_disconnect_indication(void);
65
66 void net_nfc_client_phdc_unset_data_received(void);
67
68 /* Init/Deint function calls*/
69 net_nfc_error_e net_nfc_client_phdc_init(void);
70
71 void net_nfc_client_phdc_deinit(void);
72
73 #endif //__NET_NFC_CLIENT_PHDC_H__
74
75