2 * Copyright (c) 2012, 2013 Samsung Electronics Co., Ltd.
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
8 * http://floralicense.org/license/
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.
16 #ifndef __NET_NFC_CLIENT_PHDC_H__
17 #define __NET_NFC_CLIENT_PHDC_H__
19 #include "net_nfc_typedef.h"
23 typedef void (*net_nfc_client_phdc_send_completed)(net_nfc_error_e result,
26 typedef void (*net_nfc_client_phdc_transport_connect_indication)(
27 net_nfc_phdc_handle_h handle_info,void *user_data);
29 typedef void (*net_nfc_client_phdc_transport_disconnect_indication)(void *user_data);
31 typedef void (*net_nfc_client_phdc_data_received)(data_s *phdc_data,
34 typedef void (*net_nfc_client_phdc_event_cb)( net_nfc_error_e result,
35 net_nfc_llcp_state_t event, void *user_data);
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);
41 net_nfc_error_e net_nfc_client_phdc_send_sync(net_nfc_phdc_handle_h handle,
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);
48 void net_nfc_client_phdc_set_transport_disconnect_indication(
49 net_nfc_client_phdc_transport_disconnect_indication callback, void *user_data);
51 void net_nfc_client_phdc_set_data_received(
52 net_nfc_client_phdc_data_received callback, void *user_data);
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);
57 net_nfc_error_e net_nfc_client_phdc_unregister( net_nfc_phdc_role_e role,
61 /* PHDC client API's - used for unregistering callbacks*/
62 void net_nfc_client_phdc_unset_transport_connect_indication(void);
64 void net_nfc_client_phdc_unset_transport_disconnect_indication(void);
66 void net_nfc_client_phdc_unset_data_received(void);
68 /* Init/Deint function calls*/
69 net_nfc_error_e net_nfc_client_phdc_init(void);
71 void net_nfc_client_phdc_deinit(void);
73 #endif //__NET_NFC_CLIENT_PHDC_H__