[Fix 64bit Build Error] Correctly type casting unsigned int to pointer using GLIB...
[platform/core/api/nfc.git] / src / net_nfc_client.c
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
17 #include <glib.h>
18 #include <gio/gio.h>
19
20 #include "net_nfc_typedef.h"
21 #include "net_nfc_util_gdbus_internal.h"
22 #include "net_nfc_client_se.h"
23 #include "net_nfc_client.h"
24 #include "net_nfc_client_manager.h"
25 #include "net_nfc_client_tag.h"
26 #include "net_nfc_client_ndef.h"
27 #include "net_nfc_client_transceive.h"
28 #include "net_nfc_client_llcp.h"
29 #include "net_nfc_client_snep.h"
30 #include "net_nfc_client_p2p.h"
31 #include "net_nfc_client_test.h"
32 #include "net_nfc_client_system_handler.h"
33 #include "net_nfc_client_handover.h"
34 #include "net_nfc_client_hce.h"
35
36 #ifndef NET_NFC_EXPORT_API
37 #define NET_NFC_EXPORT_API __attribute__((visibility("default")))
38 #endif
39
40 void __attribute__ ((constructor)) lib_init()
41 {
42 }
43
44 void __attribute__ ((destructor)) lib_fini()
45 {
46 }
47
48 void net_nfc_client_gdbus_init(void)
49 {
50 #if 0           /* change gdbus init time */
51         if (net_nfc_client_manager_init() != NET_NFC_OK)
52                 return;
53         if (net_nfc_client_tag_init() != NET_NFC_OK)
54                 return;
55         if (net_nfc_client_ndef_init() != NET_NFC_OK)
56                 return;
57         if (net_nfc_client_transceive_init() != NET_NFC_OK)
58                 return;
59         if (net_nfc_client_llcp_init() != NET_NFC_OK)
60                 return;
61         if (net_nfc_client_snep_init() != NET_NFC_OK)
62                 return;
63         if (net_nfc_client_p2p_init() != NET_NFC_OK)
64                 return;
65         if (net_nfc_client_sys_handler_init() != NET_NFC_OK)
66                 return;
67         if (net_nfc_client_se_init() != NET_NFC_OK)
68                 return;
69         if (net_nfc_client_test_init() != NET_NFC_OK)
70                 return;
71         if (net_nfc_client_handover_init() != NET_NFC_OK)
72                 return;
73         if (net_nfc_client_hce_init() != NET_NFC_OK)
74                 return;
75 #endif
76 }
77
78 void net_nfc_client_gdbus_deinit(void)
79 {
80         net_nfc_client_hce_deinit();
81         net_nfc_client_handover_deinit();
82         net_nfc_client_test_deinit();
83         net_nfc_client_se_deinit();
84         net_nfc_client_sys_handler_deinit();
85         net_nfc_client_p2p_deinit();
86         net_nfc_client_snep_deinit();
87         net_nfc_client_llcp_deinit();
88         net_nfc_client_transceive_deinit();
89         net_nfc_client_ndef_deinit();
90         net_nfc_client_tag_deinit();
91         net_nfc_client_manager_deinit();
92 }