remove unused files 11/71811/1 accepted/tizen/common/20160527.153658 accepted/tizen/ivi/20160527.123019 accepted/tizen/mobile/20160527.121241 accepted/tizen/tv/20160527.122059 accepted/tizen/wearable/20160527.122615 submit/tizen/20160527.074303
authorJihoon Jung <jh8801.jung@samsung.com>
Fri, 27 May 2016 07:19:15 +0000 (16:19 +0900)
committerJihoon Jung <jh8801.jung@samsung.com>
Fri, 27 May 2016 07:19:56 +0000 (16:19 +0900)
Signed-off-by: Jihoon Jung <jh8801.jung@samsung.com>
Change-Id: I2bb7c29dd375d0f360c988c1e43d04546f361edd

73 files changed:
CMakeLists.txt
test/AUTHORS [deleted file]
test/CMakeLists.txt [deleted file]
test/LICENSE.APLv2 [deleted file]
test/NOTICE [deleted file]
test/capi-network-nfc.manifest [deleted file]
test/capi-network-nfc.pc.in [deleted file]
test/doc/nfc_doc.h [deleted file]
test/include/net_nfc.h [deleted file]
test/include/net_nfc_client.h [deleted file]
test/include/net_nfc_client_context.h [deleted file]
test/include/net_nfc_client_handover.h [deleted file]
test/include/net_nfc_client_hce.h [deleted file]
test/include/net_nfc_client_hce_ipc.h [deleted file]
test/include/net_nfc_client_llcp.h [deleted file]
test/include/net_nfc_client_manager.h [deleted file]
test/include/net_nfc_client_ndef.h [deleted file]
test/include/net_nfc_client_p2p.h [deleted file]
test/include/net_nfc_client_se.h [deleted file]
test/include/net_nfc_client_snep.h [deleted file]
test/include/net_nfc_client_system_handler.h [deleted file]
test/include/net_nfc_client_tag.h [deleted file]
test/include/net_nfc_client_tag_felica.h [deleted file]
test/include/net_nfc_client_tag_internal.h [deleted file]
test/include/net_nfc_client_tag_jewel.h [deleted file]
test/include/net_nfc_client_test.h [deleted file]
test/include/net_nfc_client_transceive.h [deleted file]
test/include/net_nfc_client_util_internal.h [deleted file]
test/include/net_nfc_data.h [deleted file]
test/include/net_nfc_ndef_message.h [deleted file]
test/include/net_nfc_ndef_message_handover.h [deleted file]
test/include/net_nfc_ndef_record.h [deleted file]
test/include/net_nfc_sign_record.h [deleted file]
test/include/net_nfc_tag_mifare.h [deleted file]
test/include/net_nfc_target_info.h [deleted file]
test/include/nfc.h [deleted file]
test/include/nfc_common.h [deleted file]
test/include/nfc_internal.h [deleted file]
test/nfc_unit_test.c [deleted file]
test/packaging/capi-network-nfc [deleted file]
test/packaging/capi-network-nfc.spec [deleted file]
test/src/net_nfc_client.c [deleted file]
test/src/net_nfc_client_context.c [deleted file]
test/src/net_nfc_client_data.c [deleted file]
test/src/net_nfc_client_handover.c [deleted file]
test/src/net_nfc_client_hce.c [deleted file]
test/src/net_nfc_client_hce_ipc.c [deleted file]
test/src/net_nfc_client_llcp.c [deleted file]
test/src/net_nfc_client_manager.c [deleted file]
test/src/net_nfc_client_ndef.c [deleted file]
test/src/net_nfc_client_ndef_message.c [deleted file]
test/src/net_nfc_client_ndef_message_handover.c [deleted file]
test/src/net_nfc_client_ndef_record.c [deleted file]
test/src/net_nfc_client_p2p.c [deleted file]
test/src/net_nfc_client_se.c [deleted file]
test/src/net_nfc_client_sign_record.c [deleted file]
test/src/net_nfc_client_snep.c [deleted file]
test/src/net_nfc_client_system_handler.c [deleted file]
test/src/net_nfc_client_tag.c [deleted file]
test/src/net_nfc_client_tag_felica.c [deleted file]
test/src/net_nfc_client_tag_jewel.c [deleted file]
test/src/net_nfc_client_tag_mifare.c [deleted file]
test/src/net_nfc_client_target_info.c [deleted file]
test/src/net_nfc_client_test.c [deleted file]
test/src/net_nfc_client_transceive.c [deleted file]
test/src/net_nfc_client_util.c [deleted file]
test/src/nfc_card_emulation.c [deleted file]
test/src/nfc_common.c [deleted file]
test/src/nfc_manager.c [deleted file]
test/src/nfc_ndef.c [deleted file]
test/src/nfc_p2p.c [deleted file]
test/src/nfc_p2p_handover.c [deleted file]
test/src/nfc_tag.c [deleted file]

index 7a0c016..bf845a0 100644 (file)
@@ -88,8 +88,6 @@ CONFIGURE_FILE(
 )
 INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/${fw_name}.pc DESTINATION ${LIBDIR}/pkgconfig)
 
-#ADD_SUBDIRECTORY(test)
-
 IF(UNIX)
 
 ADD_CUSTOM_TARGET (distclean @echo cleaning for source distribution)
diff --git a/test/AUTHORS b/test/AUTHORS
deleted file mode 100644 (file)
index 9596a93..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-Lee Sangsoo <constant.lee at samsung dot com>
-Junyong Sim <junyong.sim at samsung dot com>
-Wonkyu Kwon <wonkyu.kwon at samsung dot com>
-Sungjae Lim <neueziel.lim at samsung dot com>
-Sechang Sohn <sc.sohn at samsung dot com>
-Jinmin Chung <jinmin at samsung dot com>
-Jaekyun Lee <jkyun.lee at samsung dot com>
-Seungkeun Lee <sngn.lee at samsung dot com>
-Kangho Hur <kanho.hur at samsung dot com>
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
deleted file mode 100644 (file)
index 7a0c016..0000000
+++ /dev/null
@@ -1,122 +0,0 @@
-CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
-
-SET(Services
-        "application"
-        "base"
-        "content"
-        "location"
-        "media"
-        "messaging"
-        "network"
-        "social"
-        "telephony"
-        "system"
-   )
-
-# project
-SET(project_prefix "capi")
-SET(prefix "/usr")
-SET(version "0.0.3")
-SET(maintainer "Seungkeun Lee <sngn.lee@samsung.com>, Kangho Hur<kagho.hur@samsung.com>")
-SET(description "A NFC library in Tizen Native API")
-SET(service "network")
-SET(submodule "nfc")
-
-# for package file
-SET(dependents "dlog glib-2.0 gio-2.0 nfc-common-lib capi-base-common vconf capi-system-info")
-SET(pc_dependents "capi-base-common")
-
-SET(fw_name "${project_prefix}-${service}-${submodule}")
-
-PROJECT(${fw_name})
-
-SET(CMAKE_INSTALL_PREFIX ${prefix})
-SET(PREFIX ${CMAKE_INSTALL_PREFIX})
-SET(LIBDIR ${CMAKE_LIB_DIR})
-SET(VERSION ${version})
-
-SET(INC_DIR include)
-INCLUDE_DIRECTORIES(${INC_DIR})
-
-INCLUDE(FindPkgConfig)
-pkg_check_modules(${fw_name} REQUIRED ${dependents})
-FOREACH(flag ${${fw_name}_CFLAGS})
-    SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}")
-ENDFOREACH(flag)
-
-SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS} -fPIC -Wall -Werror")
-SET(CMAKE_C_FLAGS_DEBUG "-O0 -g")
-
-IF("${ARCH}" STREQUAL "arm")
-    ADD_DEFINITIONS("-DTARGET")
-ENDIF("${ARCH}" STREQUAL "arm")
-
-ADD_DEFINITIONS("-DPREFIX=\"${CMAKE_INSTALL_PREFIX}\"")
-ADD_DEFINITIONS("-DTIZEN_DEBUG")
-
-SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed -Wl,--rpath=${LIBDIR}")
-
-AUX_SOURCE_DIRECTORY(${CMAKE_CURRENT_SOURCE_DIR}/src SOURCES)
-
-ADD_LIBRARY(${fw_name} SHARED ${SOURCES})
-
-TARGET_LINK_LIBRARIES(${fw_name} ${${fw_name}_LDFLAGS})
-
-SET_TARGET_PROPERTIES(${fw_name}
-     PROPERTIES
-     VERSION ${FULLVER}
-     SOVERSION ${MAJORVER}
-     CLEAN_DIRECT_OUTPUT 1
-)
-
-INSTALL(TARGETS ${fw_name} DESTINATION ${LIBDIR})
-INSTALL(
-        DIRECTORY ${INC_DIR}/ DESTINATION include/${service}
-        FILES_MATCHING
-        PATTERN "*_common.h" EXCLUDE
-        PATTERN "${INC_DIR}/*.h"
-        )
-
-SET(PC_NAME ${fw_name})
-SET(PC_REQUIRED ${pc_dependents})
-SET(PC_LDFLAGS -l${fw_name})
-
-CONFIGURE_FILE(
-    ${fw_name}.pc.in
-    ${CMAKE_CURRENT_SOURCE_DIR}/${fw_name}.pc
-    @ONLY
-)
-INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/${fw_name}.pc DESTINATION ${LIBDIR}/pkgconfig)
-
-#ADD_SUBDIRECTORY(test)
-
-IF(UNIX)
-
-ADD_CUSTOM_TARGET (distclean @echo cleaning for source distribution)
-ADD_CUSTOM_COMMAND(
-        DEPENDS clean
-        COMMENT "distribution clean"
-        COMMAND find
-        ARGS    .
-        -not -name config.cmake -and \(
-        -name tester.c -or
-        -name Testing -or
-        -name CMakeFiles -or
-        -name cmake.depends -or
-        -name cmake.check_depends -or
-        -name CMakeCache.txt -or
-        -name cmake.check_cache -or
-        -name *.cmake -or
-        -name Makefile -or
-        -name core -or
-        -name core.* -or
-        -name gmon.out -or
-        -name install_manifest.txt -or
-        -name *.pc -or
-        -name *~ \)
-        | grep -v TC | xargs rm -rf
-        TARGET  distclean
-        VERBATIM
-)
-
-ENDIF(UNIX)
diff --git a/test/LICENSE.APLv2 b/test/LICENSE.APLv2
deleted file mode 100644 (file)
index 2e43946..0000000
+++ /dev/null
@@ -1,206 +0,0 @@
-Copyright (c) 2000 - 2012 Samsung Electronics Co., Ltd. All rights reserved.
-
-                                 Apache License
-                           Version 2.0, January 2004
-                        http://www.apache.org/licenses/
-
-   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
-   1. Definitions.
-
-      "License" shall mean the terms and conditions for use, reproduction,
-      and distribution as defined by Sections 1 through 9 of this document.
-
-      "Licensor" shall mean the copyright owner or entity authorized by
-      the copyright owner that is granting the License.
-
-      "Legal Entity" shall mean the union of the acting entity and all
-      other entities that control, are controlled by, or are under common
-      control with that entity. For the purposes of this definition,
-      "control" means (i) the power, direct or indirect, to cause the
-      direction or management of such entity, whether by contract or
-      otherwise, or (ii) ownership of fifty percent (50%) or more of the
-      outstanding shares, or (iii) beneficial ownership of such entity.
-
-      "You" (or "Your") shall mean an individual or Legal Entity
-      exercising permissions granted by this License.
-
-      "Source" form shall mean the preferred form for making modifications,
-      including but not limited to software source code, documentation
-      source, and configuration files.
-
-      "Object" form shall mean any form resulting from mechanical
-      transformation or translation of a Source form, including but
-      not limited to compiled object code, generated documentation,
-      and conversions to other media types.
-
-      "Work" shall mean the work of authorship, whether in Source or
-      Object form, made available under the License, as indicated by a
-      copyright notice that is included in or attached to the work
-      (an example is provided in the Appendix below).
-
-      "Derivative Works" shall mean any work, whether in Source or Object
-      form, that is based on (or derived from) the Work and for which the
-      editorial revisions, annotations, elaborations, or other modifications
-      represent, as a whole, an original work of authorship. For the purposes
-      of this License, Derivative Works shall not include works that remain
-      separable from, or merely link (or bind by name) to the interfaces of,
-      the Work and Derivative Works thereof.
-
-      "Contribution" shall mean any work of authorship, including
-      the original version of the Work and any modifications or additions
-      to that Work or Derivative Works thereof, that is intentionally
-      submitted to Licensor for inclusion in the Work by the copyright owner
-      or by an individual or Legal Entity authorized to submit on behalf of
-      the copyright owner. For the purposes of this definition, "submitted"
-      means any form of electronic, verbal, or written communication sent
-      to the Licensor or its representatives, including but not limited to
-      communication on electronic mailing lists, source code control systems,
-      and issue tracking systems that are managed by, or on behalf of, the
-      Licensor for the purpose of discussing and improving the Work, but
-      excluding communication that is conspicuously marked or otherwise
-      designated in writing by the copyright owner as "Not a Contribution."
-
-      "Contributor" shall mean Licensor and any individual or Legal Entity
-      on behalf of whom a Contribution has been received by Licensor and
-      subsequently incorporated within the Work.
-
-   2. Grant of Copyright License. Subject to the terms and conditions of
-      this License, each Contributor hereby grants to You a perpetual,
-      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-      copyright license to reproduce, prepare Derivative Works of,
-      publicly display, publicly perform, sublicense, and distribute the
-      Work and such Derivative Works in Source or Object form.
-
-   3. Grant of Patent License. Subject to the terms and conditions of
-      this License, each Contributor hereby grants to You a perpetual,
-      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-      (except as stated in this section) patent license to make, have made,
-      use, offer to sell, sell, import, and otherwise transfer the Work,
-      where such license applies only to those patent claims licensable
-      by such Contributor that are necessarily infringed by their
-      Contribution(s) alone or by combination of their Contribution(s)
-      with the Work to which such Contribution(s) was submitted. If You
-      institute patent litigation against any entity (including a
-      cross-claim or counterclaim in a lawsuit) alleging that the Work
-      or a Contribution incorporated within the Work constitutes direct
-      or contributory patent infringement, then any patent licenses
-      granted to You under this License for that Work shall terminate
-      as of the date such litigation is filed.
-
-   4. Redistribution. You may reproduce and distribute copies of the
-      Work or Derivative Works thereof in any medium, with or without
-      modifications, and in Source or Object form, provided that You
-      meet the following conditions:
-
-      (a) You must give any other recipients of the Work or
-          Derivative Works a copy of this License; and
-
-      (b) You must cause any modified files to carry prominent notices
-          stating that You changed the files; and
-
-      (c) You must retain, in the Source form of any Derivative Works
-          that You distribute, all copyright, patent, trademark, and
-          attribution notices from the Source form of the Work,
-          excluding those notices that do not pertain to any part of
-          the Derivative Works; and
-
-      (d) If the Work includes a "NOTICE" text file as part of its
-          distribution, then any Derivative Works that You distribute must
-          include a readable copy of the attribution notices contained
-          within such NOTICE file, excluding those notices that do not
-          pertain to any part of the Derivative Works, in at least one
-          of the following places: within a NOTICE text file distributed
-          as part of the Derivative Works; within the Source form or
-          documentation, if provided along with the Derivative Works; or,
-          within a display generated by the Derivative Works, if and
-          wherever such third-party notices normally appear. The contents
-          of the NOTICE file are for informational purposes only and
-          do not modify the License. You may add Your own attribution
-          notices within Derivative Works that You distribute, alongside
-          or as an addendum to the NOTICE text from the Work, provided
-          that such additional attribution notices cannot be construed
-          as modifying the License.
-
-      You may add Your own copyright statement to Your modifications and
-      may provide additional or different license terms and conditions
-      for use, reproduction, or distribution of Your modifications, or
-      for any such Derivative Works as a whole, provided Your use,
-      reproduction, and distribution of the Work otherwise complies with
-      the conditions stated in this License.
-
-   5. Submission of Contributions. Unless You explicitly state otherwise,
-      any Contribution intentionally submitted for inclusion in the Work
-      by You to the Licensor shall be under the terms and conditions of
-      this License, without any additional terms or conditions.
-      Notwithstanding the above, nothing herein shall supersede or modify
-      the terms of any separate license agreement you may have executed
-      with Licensor regarding such Contributions.
-
-   6. Trademarks. This License does not grant permission to use the trade
-      names, trademarks, service marks, or product names of the Licensor,
-      except as required for reasonable and customary use in describing the
-      origin of the Work and reproducing the content of the NOTICE file.
-
-   7. Disclaimer of Warranty. Unless required by applicable law or
-      agreed to in writing, Licensor provides the Work (and each
-      Contributor provides its Contributions) on an "AS IS" BASIS,
-      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
-      implied, including, without limitation, any warranties or conditions
-      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
-      PARTICULAR PURPOSE. You are solely responsible for determining the
-      appropriateness of using or redistributing the Work and assume any
-      risks associated with Your exercise of permissions under this License.
-
-   8. Limitation of Liability. In no event and under no legal theory,
-      whether in tort (including negligence), contract, or otherwise,
-      unless required by applicable law (such as deliberate and grossly
-      negligent acts) or agreed to in writing, shall any Contributor be
-      liable to You for damages, including any direct, indirect, special,
-      incidental, or consequential damages of any character arising as a
-      result of this License or out of the use or inability to use the
-      Work (including but not limited to damages for loss of goodwill,
-      work stoppage, computer failure or malfunction, or any and all
-      other commercial damages or losses), even if such Contributor
-      has been advised of the possibility of such damages.
-
-   9. Accepting Warranty or Additional Liability. While redistributing
-      the Work or Derivative Works thereof, You may choose to offer,
-      and charge a fee for, acceptance of support, warranty, indemnity,
-      or other liability obligations and/or rights consistent with this
-      License. However, in accepting such obligations, You may act only
-      on Your own behalf and on Your sole responsibility, not on behalf
-      of any other Contributor, and only if You agree to indemnify,
-      defend, and hold each Contributor harmless for any liability
-      incurred by, or claims asserted against, such Contributor by reason
-      of your accepting any such warranty or additional liability.
-
-   END OF TERMS AND CONDITIONS
-
-   APPENDIX: How to apply the Apache License to your work.
-
-      To apply the Apache License to your work, attach the following
-      boilerplate notice, with the fields enclosed by brackets "[]"
-      replaced with your own identifying information. (Don't include
-      the brackets!)  The text should be enclosed in the appropriate
-      comment syntax for the file format. We also recommend that a
-      file or class name and description of purpose be included on the
-      same "printed page" as the copyright notice for easier
-      identification within third-party archives.
-
-   Copyright [yyyy] [name of copyright owner]
-
-   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.
-
-
-
diff --git a/test/NOTICE b/test/NOTICE
deleted file mode 100644 (file)
index 0e0f016..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-Copyright (c) Samsung Electronics Co., Ltd. All rights reserved.
-Except as noted, this software is licensed under Apache License, Version 2.
-Please, see the LICENSE.APLv2 file for Apache License terms and conditions.
diff --git a/test/capi-network-nfc.manifest b/test/capi-network-nfc.manifest
deleted file mode 100644 (file)
index ca37499..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-<manifest>
-       <request>
-               <domain name="_" />
-       </request>
-</manifest>
-
diff --git a/test/capi-network-nfc.pc.in b/test/capi-network-nfc.pc.in
deleted file mode 100644 (file)
index 8792e0a..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-
-# Package Information for pkg-config
-
-prefix=@PREFIX@
-exec_prefix=/usr
-libdir=/usr/lib
-includedir=/usr/include/network
-
-Name: @PC_NAME@
-Description: @PACKAGE_DESCRIPTION@
-Version: @VERSION@
-Requires: @PC_REQUIRED@ 
-Libs: -L${libdir} @PC_LDFLAGS@
-Cflags: -I${includedir}
-
diff --git a/test/doc/nfc_doc.h b/test/doc/nfc_doc.h
deleted file mode 100755 (executable)
index 2cb660d..0000000
+++ /dev/null
@@ -1,297 +0,0 @@
-/*
- * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved
- *
- * 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.
- */
-
-
- /**
- * @file nfc_doc.h
- * @brief  This file contains high level documentation the NFC API.
- */
-
-/**
- * @defgroup CAPI_NETWORK_NFC_MODULE NFC
- * @brief The NFC API provides very short-range radio communication technology.
- * @ingroup CAPI_NETWORK_FRAMEWORK
- *
- * @par
- * @section CAPI_NETWORK_NFC_MODULE_HEADER     Required Header
- * \#include <nfc.h>
- * @section CAPI_NETWORK_NFC_MODULE_OVERVIEW Overview
- * NFC Service enables applications to\n
- * - set up nfc manager\n
- * - read / write ndef message or raw data and get attribute of tag\n
- * - create NDEF(NFC Data Exchange Format) message or NDEF record\n
- * - receive/send ndef message to the peer target\n
- * - read / write data to the Secure Element for Card Emulation mode\n
- *
- * @subsection CAPI_NETWORK_NFC_MANAGER_MODULE_DESCRIPTION nfc-manager
- * The nfc manager api provides functions to connect nfc-server and register event listener\n
- * - control connection with nfc-server. \n
- * - register / deregister event listeners for detecting tag, ndef, llcp, secure element \n
- * - set / unset tag filter to be listened only in case of specific tag. \n
- *
- * @subsection CAPI_NETWORK_NFC_NDEF_MODULE_DESCRIPTION NDEF(NFC Data Exchange Format)
- *  The NDEF(NFC Data Exchange Format) api provides functions to make NDEF record and NDEF message.\n
- * - create NDEF record and retrieve specific field of NDEF record\n
- * - create NDEF message with NDEF records\n
- *
- * @subsection CAPI_NETWORK_NFC_TAG_MODULE_DESCRIPTION TAG
- * The TAG api provide functions to read or write NDEF(NFC Data Exchange Format) and also low level transaction API with Non NDEF tag. \n
- * - read NDEF from NDEF compatible TAG\n
- * - write NDEF to NDEF compatible TAG\n
- * - check whether tag has NDEF or not\n
- * - format NFC forum tag to be compatible with NDEF\n
- * - read specific attributes from tag by ISO14443\n
- * - low level api of MIFARE classic and MIFARE ultra light\n
- *
- * @subsection CAPI_NETWORK_NFC_P2P_MODULE_DESCRIPTION Peer to Peer
- * The Peer to Peer api provide functions to exchange NDEF data with peer target.
- * - send ndef message\n
- * - receive ndef message\n
- *
- * @subsection CAPI_NETWORK_NFC_SE_MODULE_DESCRIPTION Card Emulation
- * The Card Emulation api provide functions to exchange data with Secure Element.
- * - send apdu to secure element\n
- * - get atr from secure element\n
- */
-
-/**
- * @defgroup CAPI_NETWORK_NFC_MANAGER_MODULE Manager
- * @brief NFC Manager API provides access to NFC Events.
- * @ingroup CAPI_NETWORK_NFC_MODULE
- *
- * @section CAPI_NETWORK_NFC_MANAGER_MODULE_HEADER     Required Header
- * \#include <nfc.h>
- * @section CAPI_NETWORK_NFC_MANAGER_MODULE_OVERVIEW Overview
- * The nfc manager api provides functions to connect nfc-server and register event listener\n
- * - control connection with nfc-server. \n
- * - register / deregister event listeners for detecting tag, ndef, llcp, secure element \n
- * - set / unset tag filter to be listened only in case of specific tag. \n
- * @section CAPI_NETWORK_NFC_MANAGER_MODULE_FEATURE Related Features
- * This API is related with the following features:\n
- * - http://tizen.org/feature/network.nfc\n
- * - http://tizen.org/feature/network.nfc.tag\n
- * - http://tizen.org/feature/network.nfc.p2p\n
- * - http://tizen.org/feature/network.nfc.card_emulation\n
- * - http://tizen.org/feature/network.secure_element.uicc\n
- * - http://tizen.org/feature/network.secure_element.ese\n
- *
- * It is recommended to design feature related codes in your application for reliability.\n
- *
- * You can check if a devrice supports the related features for this API by using @ref CAPI_SYSTEM_SYSTEM_INFO_MODULE, thereby controlling the procedure of your application.\n
- *
- * To ensure your application is only running on the device with specific features, please define the features in your manifest file using the manifest editor in the SDK.\n
- *
- * More details on featuring your application can be found from <a href="../org.tizen.mobile.native.appprogramming/html/ide_sdk_tools/feature_element.htm"><b>Feature Element</b>.</a>
- *
- */
-
-
-/**
- * @defgroup CAPI_NETWORK_NFC_NDEF_MODULE NDEF
- * @brief The NDEF api provides functions to make NDEF record and NDEF message.
- * @ingroup CAPI_NETWORK_NFC_MODULE
- * @section CAPI_NETWORK_NFC_NDEF_MODULE_HEADER        Required Header
- * \#include <nfc.h>
- * @section CAPI_NETWORK_NFC_NDEF_MODULE_OVERVIEW Overview
- *  The NDEF api provides functions to make NDEF record and NDEF message.\n
- * - create NDEF record and retrieve specific field of NDEF record\n
- * - create NDEF message with NDEF records\n
- *
- * <table>
- * <tr>
- *  <th> APIs </th>
- *  <th> Description </th>
- * </tr>
- * <tr>
- *  <td> @ref CAPI_NETWORK_NFC_NDEF_RECORD_MODULE </td>
- *  <td> Record API provides NDEF record and retrieve specific field of NDEF record </td>
- * </tr>
- * <tr>
- *  <td>  @ref CAPI_NETWORK_NFC_NDEF_MESSAGE_MODULE  </td>
- *  <td>Message API provides functions to create NDEF message and insert/remove records in NDEF message</td>
- * </tr>
- * </table>
- *
- */
-
-/**
- * @defgroup CAPI_NETWORK_NFC_NDEF_RECORD_MODULE Record
- * @ingroup CAPI_NETWORK_NFC_NDEF_MODULE
- * @brief Record API provides an NDEF record.
- * @section CAPI_NETWORK_NFC_NDEF_RECORD_MODULE_HEADER Required Header
- * \#include <nfc.h>
- *
- * @section CAPI_NETWORK_NFC_NDEF_RECORD_MODULE_OVERVIEW Overview
- * The NDEF record api provides functions to make NDEF record\n
- * - create / destroy NDEF record\n
- * - set / get elements from NDEF record\n
- *
- * @section CAPI_NETWORK_NFC_NDEF_RECORD_MODULE_FEATURE Related Features
- * This API is related with the following features:\n
- * - http://tizen.org/feature/network.nfc\n
- *
- * It is recommended to design feature related codes in your application for reliability.\n
- *
- * You can check if a devrice supports the related features for this API by using @ref CAPI_SYSTEM_SYSTEM_INFO_MODULE, thereby controlling the procedure of your application.\n
- *
- * To ensure your application is only running on the device with specific features, please define the features in your manifest file using the manifest editor in the SDK.\n
- *
- * More details on featuring your application can be found from <a href="../org.tizen.mobile.native.appprogramming/html/ide_sdk_tools/feature_element.htm"><b>Feature Element</b>.</a>
- *
- */
-
-/**
- * @defgroup CAPI_NETWORK_NFC_NDEF_MESSAGE_MODULE Message
- * @ingroup CAPI_NETWORK_NFC_NDEF_MODULE
- * @brief Message API provides functions to create NDEF message and insert/remove records in NDEF message
- * @section CAPI_NETWORK_NFC_NDEF_MESSAGE_MODULE_HEADER        Required Header
- * \#include <nfc.h>
- *
- * @section CAPI_NETWORK_NFC_NDEF_MESSAGE_MODULE_OVERVIEW Overview
- * The NDEF message api provides functions to make NDEF message\n
- * - create / destroy NDEF message\n
- * - insert / remove NDEF record\n
- * - get NDEF record from NDEF message\n
- *
- * @section CAPI_NETWORK_NFC_NDEF_MESSAGE_MODULE_FEATURE Related Features
- * This API is related with the following features:\n
- * - http://tizen.org/feature/network.nfc\n
- *
- * It is recommended to design feature related codes in your application for reliability.\n
- *
- * You can check if a devrice supports the related features for this API by using @ref CAPI_SYSTEM_SYSTEM_INFO_MODULE, thereby controlling the procedure of your application.\n
- *
- * To ensure your application is only running on the device with specific features, please define the features in your manifest file using the manifest editor in the SDK.\n
- *
- * More details on featuring your application can be found from <a href="../org.tizen.mobile.native.appprogramming/html/ide_sdk_tools/feature_element.htm"><b>Feature Element</b>.</a>
- *
- */
-
-/**
- * @defgroup CAPI_NETWORK_NFC_TAG_MODULE TAG
- * @ingroup CAPI_NETWORK_NFC_MODULE
- * @brief TAG API provide functions for read/write operation on NDEF and also provide low level API of Mifare
- * @section CAPI_NETWORK_NFC_TAG_MODULE_HEADER Required Header
- * \#include <nfc.h>
- * @section CAPI_NETWORK_NFC_TAG_MODULE_OVERVIEW Overview
- * The TAG api provides functions to read or write NDEF and low level transaction APIs with Non NDEF tag. \n
- * - read NDEF from NDEF compatible TAG\n
- * - write NDEF to NDEF compatible TAG\n
- * - check whether tag has NDEF or not\n
- * - format NFC forum tag to be compatible with NDEF\n
- * - read specific attributes from tag by ISO14443\n
- * - low level api of MIFARE classic and MIFARE ultra light\n
- * @section CAPI_NETWORK_NFC_TAG_MODULE_FEATURE Related Features
- * This API is related with the following features:\n
- * - http://tizen.org/feature/network.nfc\n
- * - http://tizen.org/feature/network.nfc.tag\n
- *
- * It is recommended to design feature related codes in your application for reliability.\n
- *
- * You can check if a devrice supports the related features for this API by using @ref CAPI_SYSTEM_SYSTEM_INFO_MODULE, thereby controlling the procedure of your application.\n
- *
- * To ensure your application is only running on the device with specific features, please define the features in your manifest file using the manifest editor in the SDK.\n
- *
- * More details on featuring your application can be found from <a href="../org.tizen.mobile.native.appprogramming/html/ide_sdk_tools/feature_element.htm"><b>Feature Element</b>.</a>
- *
- */
-
-/**
- * @defgroup CAPI_NETWORK_NFC_TAG_MIFARE_MODULE Mifare
- * @ingroup CAPI_NETWORK_NFC_TAG_MODULE
- * @brief API provides access to MIFARE specific I/O operations on a Tag.
- * @section CAPI_NETWORK_NFC_TAG_MIFARE_MODULE_HEADER  Required Header
- * \#include <nfc.h>
- * @section CAPI_NETWORK_NFC_TAG_MIFARE_MODULE_OVERVIEW Overview
-
-       MIFARE Classic is also known as MIFARE Standard.\n
-       MIFARE Classic tags are divided into sectors, and each sector is sub-divided into blocks. Block size is always 16 bytes.\n
-
-       MIFARE Classic Mini are 320 bytes (SIZE_MINI), with 5 sectors each of 4 blocks.\n
-       MIFARE Classic 1k are 1024 bytes (SIZE_1K), with 16 sectors each of 4 blocks.\n
-       MIFARE Classic 2k are 2048 bytes (SIZE_2K), with 32 sectors each of 4 blocks.\n
-       MIFARE Classic 4k are 4096 bytes (SIZE_4K). The first 32 sectors contain 4 blocks and the last 8 sectors contain 16 blocks.\n
-
-       MIFARE Classic tags require authentication on a per-sector basis before any other I/O operations on that sector can be performed. \n
-       There are two keys per sector, and ACL bits determine what I/O operations are allowed on that sector after authenticating with a key\n
- * @section CAPI_NETWORK_NFC_TAG_MIFARE_MODULE_FEATURE Related Features
- * This API is related with the following features:\n
- * - http://tizen.org/feature/network.nfc\n
- * - http://tizen.org/feature/network.nfc.tag\n
- *
- * It is recommended to design feature related codes in your application for reliability.\n
- *
- * You can check if a devrice supports the related features for this API by using @ref CAPI_SYSTEM_SYSTEM_INFO_MODULE, thereby controlling the procedure of your application.\n
- *
- * To ensure your application is only running on the device with specific features, please define the features in your manifest file using the manifest editor in the SDK.\n
- *
- * More details on featuring your application can be found from <a href="../org.tizen.mobile.native.appprogramming/html/ide_sdk_tools/feature_element.htm"><b>Feature Element</b>.</a>
- *
- */
-
-
- /**
- * @defgroup CAPI_NETWORK_NFC_P2P_MODULE Peer to Peer
- * @ingroup CAPI_NETWORK_NFC_MODULE
- * @brief The peer to peer api provide functions to exchange NDEF data with peer target.
- * @section CAPI_NETWORK_NFC_P2P_MODULE_HEADER Required Header
- * \#include <nfc.h>
- * @section CAPI_NETWORK_NFC_P2P_MODULE_OVERVIEW Overview
- * The peer to peer api provides functions to exchange NDEF data with the peer target. \n
- * - send ndef message
- * - receive ndef message
- * @section CAPI_NETWORK_NFC_P2P_MODULE_FEATURE Related Features
- * This API is related with the following features:\n
- * - http://tizen.org/feature/network.nfc\n
- * - http://tizen.org/feature/network.nfc.p2p\n
- *
- * It is recommended to design feature related codes in your application for reliability.\n
- *
- * You can check if a devrice supports the related features for this API by using @ref CAPI_SYSTEM_SYSTEM_INFO_MODULE, thereby controlling the procedure of your application.\n
- *
- * To ensure your application is only running on the device with specific features, please define the features in your manifest file using the manifest editor in the SDK.\n
- *
- * More details on featuring your application can be found from <a href="../org.tizen.mobile.native.appprogramming/html/ide_sdk_tools/feature_element.htm"><b>Feature Element</b>.</a>
- *
- */
-
- /**
- * @defgroup CAPI_NETWORK_NFC_SE_MODULE Card Emulation
- * @ingroup CAPI_NETWORK_NFC_MODULE
- * @brief The Card Emulation api provide functions to exchange data with Secure Element.
- * @section CAPI_NETWORK_NFC_SE_MODULE_HEADER  Required Header
- * \#include <nfc.h>
- * @section CAPI_NETWORK_NFC_SE_MODULE_OVERVIEW Overview
- * The Card Emulation api provide functions to exchange data with Secure Element. \n
- * - send apdu to secure element
- * - get atr from secure element
- * @section CAPI_NETWORK_NFC_SE_MODULE_FEATURE Related Features
- * This API is related with the following features:\n
- * - http://tizen.org/feature/network.nfc\n
- * - http://tizen.org/feature/network.nfc.card_emulation\n
- * - http://tizen.org/feature/network.nfc.card_emulation.hce\n
- * - http://tizen.org/feature/network.secure_element.uicc\n
- * - http://tizen.org/feature/network.secure_element.ese\n
- *
- * It is recommended to design feature related codes in your application for reliability.\n
- *
- * You can check if a devrice supports the related features for this API by using @ref CAPI_SYSTEM_SYSTEM_INFO_MODULE, thereby controlling the procedure of your application.\n
- *
- * To ensure your application is only running on the device with specific features, please define the features in your manifest file using the manifest editor in the SDK.\n
- *
- * More details on featuring your application can be found from <a href="../org.tizen.mobile.native.appprogramming/html/ide_sdk_tools/feature_element.htm"><b>Feature Element</b>.</a>
- *
- */
diff --git a/test/include/net_nfc.h b/test/include/net_nfc.h
deleted file mode 100755 (executable)
index 1e97731..0000000
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * Copyright (c) 2012, 2013 Samsung Electronics Co., Ltd.
- *
- * Licensed under the Flora License, Version 1.1 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://floralicense.org/license/
- *
- * 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.
- */
-
-#ifndef __NET_NFC_H__
-#define __NET_NFC_H__
-
-#include "net_nfc_typedef.h"
-#include "net_nfc_data.h"
-#include "net_nfc_target_info.h"
-#include "net_nfc_ndef_message.h"
-#include "net_nfc_ndef_record.h"
-#include "net_nfc_sign_record.h"
-#include "net_nfc_ndef_message_handover.h"
-
-#include "net_nfc_client_context.h"
-#include "net_nfc_client_manager.h"
-#include "net_nfc_client_system_handler.h"
-#include "net_nfc_client_transceive.h"
-#include "net_nfc_client_tag.h"
-#include "net_nfc_client_ndef.h"
-#include "net_nfc_client_llcp.h"
-#include "net_nfc_client_p2p.h"
-#include "net_nfc_client_snep.h"
-#include "net_nfc_client_handover.h"
-#include "net_nfc_client_se.h"
-#include "net_nfc_client_tag_felica.h"
-#include "net_nfc_client_tag_jewel.h"
-#include "net_nfc_tag_mifare.h"
-#include "net_nfc_client_test.h"
-#include "net_nfc_client_hce.h"
-
-
-#endif //__NET_NFC_H__
diff --git a/test/include/net_nfc_client.h b/test/include/net_nfc_client.h
deleted file mode 100755 (executable)
index b32bb72..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * Copyright (c) 2012, 2013 Samsung Electronics Co., Ltd.
- *
- * Licensed under the Flora License, Version 1.1 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://floralicense.org/license/
- *
- * 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.
- */
-#ifndef __NET_NFC_CLIENT_H__
-#define __NET_NFC_CLIENT_H__
-
-#include <glib.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/* TODO : change to internal header */
-void net_nfc_client_gdbus_init(void);
-
-void net_nfc_client_gdbus_deinit(void);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif //__NET_NFC_CLIENT_H__
diff --git a/test/include/net_nfc_client_context.h b/test/include/net_nfc_client_context.h
deleted file mode 100755 (executable)
index 36b9864..0000000
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * Copyright (c) 2012, 2013 Samsung Electronics Co., Ltd.
- *
- * Licensed under the Flora License, Version 1.1 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://floralicense.org/license/
- *
- * 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.
- */
-#ifndef __NET_NFC_CLIENT_CONTEXT_H__
-#define __NET_NFC_CLIENT_CONTEXT_H__
-
-#include "net_nfc_typedef.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#define NET_NFC_SERVICE_EMPTY_TYPE     \
-       "http://tizen.org/appcontrol/operation/nfc/empty"
-#define NET_NFC_SERVICE_WELL_KNOWN_TYPE        \
-       "http://tizen.org/appcontrol/operation/nfc/wellknown"
-#define NET_NFC_SERVICE_EXTERNAL_TYPE  \
-       "http://tizen.org/appcontrol/operation/nfc/external"
-#define NET_NFC_SERVICE_MIME_TYPE      \
-       "http://tizen.org/appcontrol/operation/nfc/mime"
-#define NET_NFC_SERVICE_URI_TYPE       \
-       "http://tizen.org/appcontrol/operation/nfc/uri"
-
-
-net_nfc_error_e net_nfc_client_initialize();
-
-net_nfc_error_e net_nfc_client_deinitialize();
-
-net_nfc_error_e net_nfc_client_is_nfc_supported(int *state);
-
-net_nfc_error_e net_nfc_client_get_nfc_state(int *state);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif //__NET_NFC_CLIENT_CONTEXT_H__
diff --git a/test/include/net_nfc_client_handover.h b/test/include/net_nfc_client_handover.h
deleted file mode 100755 (executable)
index 52aaf98..0000000
+++ /dev/null
@@ -1,90 +0,0 @@
-/*
- * Copyright (c) 2012, 2013 Samsung Electronics Co., Ltd.
- *
- * Licensed under the Flora License, Version 1.1 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://floralicense.org/license/
- *
- * 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.
- */
-#ifndef __NET_NFC_CLIENT_HANDOVER_H__
-#define __NET_NFC_CLIENT_HANDOVER_H__
-
-#include "net_nfc_typedef.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-typedef enum
-{
-       NET_NFC_HANDOVER_START,
-       NET_NFC_HANDOVER_FINISH,
-}
-net_nfc_handover_event_e;
-
-typedef void (*net_nfc_p2p_connection_handover_completed_cb)(
-               net_nfc_error_e result,
-               net_nfc_conn_handover_carrier_type_e carrier,
-               data_h ac_data,
-               void *user_data);
-
-typedef void (*net_nfc_connection_handover_event_cb)(
-       net_nfc_handover_event_e event,
-       net_nfc_error_e result,
-       net_nfc_conn_handover_carrier_type_e carrier,
-       data_h ac_data,
-       data_h ndef_message,
-       void *user_data);
-
-net_nfc_error_e net_nfc_client_handover_free_alternative_carrier_data(
-               net_nfc_connection_handover_info_h info_handle);
-
-
-net_nfc_error_e net_nfc_client_handover_get_alternative_carrier_type(
-               net_nfc_connection_handover_info_h info_handle,
-               net_nfc_conn_handover_carrier_type_e *type);
-
-
-net_nfc_error_e net_nfc_client_handover_get_alternative_carrier_data(
-               net_nfc_connection_handover_info_h info_handle,
-               data_h *data);
-
-
-net_nfc_error_e net_nfc_client_p2p_connection_handover(
-               net_nfc_target_handle_h handle,
-               net_nfc_conn_handover_carrier_type_e arg_type,
-               net_nfc_p2p_connection_handover_completed_cb callback,
-               void *cb_data);
-
-
-net_nfc_error_e net_nfc_client_p2p_connection_handover_sync(
-               net_nfc_target_handle_h handle,
-               net_nfc_conn_handover_carrier_type_e arg_type,
-               net_nfc_conn_handover_carrier_type_e *out_carrier,
-               data_h *out_ac_data);
-
-
-void net_nfc_client_handover_set_handover_event_cb(
-       net_nfc_connection_handover_event_cb callback,
-       void *user_data);
-
-void net_nfc_client_handover_unset_handover_event_cb(void);
-
-
-/* TODO : move to internal header */
-net_nfc_error_e net_nfc_client_handover_init(void);
-
-void net_nfc_client_handover_deinit(void);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif //__NET_NFC_CLIENT_HANDOVER_H__
diff --git a/test/include/net_nfc_client_hce.h b/test/include/net_nfc_client_hce.h
deleted file mode 100755 (executable)
index d4b8d38..0000000
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * Copyright (c) 2012, 2013 Samsung Electronics Co., Ltd.
- *
- * Licensed under the Flora License, Version 1.1 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://floralicense.org/license/
- *
- * 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.
- */
-
-#ifndef __NET_NFC_CLIENT_HCE_H__
-#define __NET_NFC_CLIENT_HCE_H__
-
-#include "net_nfc_typedef.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*************Hce Callbacks*********/
-
-typedef void (*net_nfc_client_hce_event_cb)(
-       net_nfc_target_handle_h handle,
-       net_nfc_hce_event_t event,
-       data_h apdu,
-       void *user_data);
-
-/************* Hce API's*************/
-
-net_nfc_error_e net_nfc_client_hce_set_event_received_cb(
-       net_nfc_client_hce_event_cb callback, void *user_data);
-net_nfc_error_e net_nfc_client_hce_unset_event_received_cb(void);
-
-net_nfc_error_e net_nfc_client_hce_response_apdu_sync(
-       net_nfc_target_handle_h handle, data_h resp_apdu_data);
-
-
-/* internal */
-net_nfc_error_e net_nfc_client_hce_init(void);
-void net_nfc_client_hce_deinit(void);
-
-void net_nfc_client_hce_process_received_event(int event,
-       net_nfc_target_handle_h handle, data_h data);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif //__NET_NFC_CLIENT_HCE_H__
diff --git a/test/include/net_nfc_client_hce_ipc.h b/test/include/net_nfc_client_hce_ipc.h
deleted file mode 100755 (executable)
index cc5ca6d..0000000
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * Copyright (c) 2012, 2013 Samsung Electronics Co., Ltd.
- *
- * Licensed under the Flora License, Version 1.1 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://floralicense.org/license/
- *
- * 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.
- */
-
-#ifndef __NET_NFC_CLIENT_HCE_IPC_H__
-#define __NET_NFC_CLIENT_HCE_IPC_H__
-
-#include "net_nfc_typedef.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/* internal */
-net_nfc_error_e net_nfc_client_hce_ipc_init();
-void net_nfc_client_hce_ipc_deinit();
-bool net_nfc_client_hce_ipc_is_initialized();
-
-bool net_nfc_server_hce_ipc_send_to_server(int type,
-       net_nfc_target_handle_s *handle, data_s *data);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif //__NET_NFC_CLIENT_HCE_IPC_H__
diff --git a/test/include/net_nfc_client_llcp.h b/test/include/net_nfc_client_llcp.h
deleted file mode 100755 (executable)
index a8204e7..0000000
+++ /dev/null
@@ -1,276 +0,0 @@
-/*
- * Copyright (c) 2012, 2013 Samsung Electronics Co., Ltd.
- *
- * Licensed under the Flora License, Version 1.1 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://floralicense.org/license/
- *
- * 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.
- */
-#ifndef __NET_NFC_CLIENT_LLCP_H__
-#define __NET_NFC_CLIENT_LLCP_H__
-
-#include "net_nfc_typedef.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-typedef void (*net_nfc_client_llcp_config_completed)(net_nfc_error_e result,
-       void *user_data);
-
-typedef void (*net_nfc_client_llcp_listen_completed)(net_nfc_error_e result,
-       net_nfc_llcp_socket_t client_socket,
-       void *user_data);
-
-typedef void (*net_nfc_client_llcp_accept_completed)(net_nfc_error_e result,
-       void *user_data);
-
-typedef void (*net_nfc_client_llcp_reject_completed)(net_nfc_error_e result,
-       void *user_data);
-
-typedef void (*net_nfc_client_llcp_connect_completed)(net_nfc_error_e result,
-       net_nfc_llcp_socket_t client_socket,
-       void *user_data);
-
-typedef void (*net_nfc_client_llcp_connect_sap_completed)(
-       net_nfc_error_e result,
-       net_nfc_llcp_socket_t client_socket,
-       void *user_data);
-
-typedef void (*net_nfc_client_llcp_send_completed)(net_nfc_error_e result,
-       void *user_data);
-
-typedef void (*net_nfc_client_llcp_send_to_completed)(net_nfc_error_e result,
-       void *user_data);
-
-typedef void (*net_nfc_client_llcp_receive_completed)(net_nfc_error_e result,
-       data_h data,
-       void *user_data);
-
-typedef void (*net_nfc_client_llcp_receive_from_completed)(
-       net_nfc_error_e result,
-       sap_t sap,
-       data_h data,
-       void *user_data);
-
-typedef void (*net_nfc_client_llcp_close_completed)(net_nfc_error_e result,
-       void *user_data);
-
-typedef void (*net_nfc_client_llcp_disconnect_completed)(
-       net_nfc_error_e result,
-       void *user_data);
-
-net_nfc_error_e net_nfc_client_llcp_config(net_nfc_llcp_config_info_h config,
-       net_nfc_client_llcp_config_completed callback,
-       void *user_data);
-
-net_nfc_error_e net_nfc_client_llcp_config_sync
-                                       (net_nfc_llcp_config_info_h config);
-
-net_nfc_error_e net_nfc_client_llcp_get_config
-                                       (net_nfc_llcp_config_info_h *config);
-
-net_nfc_error_e net_nfc_client_llcp_listen(net_nfc_llcp_socket_t socket,
-               const char *service_name,
-               sap_t sap,
-               net_nfc_client_llcp_listen_completed callback,
-               void *user_data);
-
-net_nfc_error_e net_nfc_client_llcp_listen_sync(net_nfc_llcp_socket_t socket,
-               const char *service_name,
-               sap_t sap,
-               net_nfc_llcp_socket_t *out_socket);
-
-net_nfc_error_e net_nfc_client_llcp_accept(net_nfc_llcp_socket_t socket,
-               net_nfc_client_llcp_accept_completed callback,
-               void *user_data);
-
-net_nfc_error_e net_nfc_client_llcp_accept_sync(net_nfc_llcp_socket_t socket);
-
-net_nfc_error_e net_nfc_client_llcp_reject(net_nfc_llcp_socket_t socket,
-               net_nfc_client_llcp_reject_completed callback,
-               void *user_data);
-
-net_nfc_error_e net_nfc_client_llcp_reject_sync(net_nfc_llcp_socket_t socket);
-
-net_nfc_error_e net_nfc_client_llcp_connect(net_nfc_llcp_socket_t socket,
-               const char *service_name,
-               net_nfc_client_llcp_connect_completed callback,
-               void *user_data);
-
-net_nfc_error_e net_nfc_client_llcp_connect_sync(net_nfc_llcp_socket_t socket,
-               const char *service_name,
-               net_nfc_llcp_socket_t *out_socket);
-
-net_nfc_error_e net_nfc_client_llcp_send(net_nfc_llcp_socket_t socket,
-       data_h data,
-       net_nfc_client_llcp_send_completed callback,
-       void *user_data);
-
-net_nfc_error_e net_nfc_client_llcp_send_sync(net_nfc_llcp_socket_t socket,
-       data_h data);
-
-net_nfc_error_e net_nfc_client_llcp_send_to(net_nfc_llcp_socket_t socket,
-       sap_t sap,
-       data_h data,
-       net_nfc_client_llcp_send_to_completed callback,
-       void *user_data);
-
-net_nfc_error_e net_nfc_client_llcp_send_to_sync(net_nfc_llcp_socket_t socket,
-       sap_t sap,
-       data_h data);
-
-net_nfc_error_e net_nfc_client_llcp_receive(net_nfc_llcp_socket_t socket,
-       size_t request_length,
-       net_nfc_client_llcp_receive_completed callback,
-       void *user_data);
-
-net_nfc_error_e net_nfc_client_llcp_receive_sync(net_nfc_llcp_socket_t socket,
-       size_t request_length,
-       data_h *out_data);
-
-net_nfc_error_e net_nfc_client_llcp_receive_from(net_nfc_llcp_socket_t socket,
-       size_t request_length,
-       net_nfc_client_llcp_receive_from_completed callback,
-       void *user_data);
-
-net_nfc_error_e net_nfc_client_llcp_receive_from_sync(
-       net_nfc_llcp_socket_t socket,
-       size_t request_length,
-       sap_t *out_sap,
-       data_h *out_data);
-
-net_nfc_error_e net_nfc_client_llcp_close(net_nfc_llcp_socket_t socket,
-       net_nfc_client_llcp_close_completed callback,
-       void *user_data);
-
-net_nfc_error_e net_nfc_client_llcp_close_sync(net_nfc_llcp_socket_t socket);
-
-net_nfc_error_e net_nfc_client_llcp_disconnect(net_nfc_llcp_socket_t socket,
-       net_nfc_client_llcp_disconnect_completed callback,
-       void *user_data);
-
-net_nfc_error_e net_nfc_client_llcp_disconnect_sync(
-       net_nfc_llcp_socket_t socket);
-
-void net_nfc_client_llcp_create_socket(net_nfc_llcp_socket_t *socket,
-               net_nfc_llcp_socket_option_h option);
-
-net_nfc_error_e net_nfc_client_llcp_get_local_config(
-               net_nfc_llcp_config_info_h *config);
-
-net_nfc_error_e net_nfc_client_llcp_get_local_socket_option(
-               net_nfc_llcp_socket_t socket,
-               net_nfc_llcp_socket_option_h *option);
-
-net_nfc_error_e net_nfc_client_llcp_create_socket_option(
-               net_nfc_llcp_socket_option_h *option,
-               uint16_t miu,
-               uint8_t rw,
-               net_nfc_socket_type_e type);
-
-net_nfc_error_e net_nfc_client_llcp_socket_option_default(
-       net_nfc_llcp_socket_option_h *option);
-
-net_nfc_error_e net_nfc_client_llcp_get_socket_option_miu(
-       net_nfc_llcp_socket_option_h option,
-       uint16_t *miu);
-
-net_nfc_error_e net_nfc_client_llcp_set_socket_option_miu(
-       net_nfc_llcp_socket_option_h option,
-       uint16_t miu);
-
-net_nfc_error_e net_nfc_client_llcp_get_socket_option_rw(
-       net_nfc_llcp_socket_option_h option,
-       uint8_t *rt);
-
-net_nfc_error_e net_nfc_client_llcp_set_socket_option_rw(
-       net_nfc_llcp_socket_option_h option,
-       uint8_t rt);
-
-net_nfc_error_e net_nfc_client_llcp_get_socket_option_type(
-       net_nfc_llcp_socket_option_h option,
-       net_nfc_socket_type_e *type);
-
-net_nfc_error_e net_nfc_client_llcp_set_socket_option_type(
-       net_nfc_llcp_socket_option_h option,
-       net_nfc_socket_type_e type);
-
-net_nfc_error_e net_nfc_client_llcp_free_socket_option(
-       net_nfc_llcp_socket_option_h option);
-
-net_nfc_error_e net_nfc_client_llcp_create_config(
-       net_nfc_llcp_config_info_h *config,
-       uint16_t miu,
-       uint16_t wks,
-       uint8_t lto,
-       uint8_t option);
-
-net_nfc_error_e net_nfc_client_llcp_create_config_default(
-       net_nfc_llcp_config_info_h *config);
-
-net_nfc_error_e net_nfc_client_llcp_get_config_miu(
-       net_nfc_llcp_config_info_h config,
-       uint16_t *miu);
-
-net_nfc_error_e net_nfc_client_llcp_get_config_wks(
-       net_nfc_llcp_config_info_h config,
-       uint16_t *wks);
-
-net_nfc_error_e net_nfc_client_llcp_get_config_lto(
-       net_nfc_llcp_config_info_h config,
-       uint8_t *lto);
-
-net_nfc_error_e net_nfc_client_llcp_get_config_option(
-       net_nfc_llcp_config_info_h config,
-       uint8_t *option);
-
-net_nfc_error_e net_nfc_client_llcp_set_config_miu(
-       net_nfc_llcp_config_info_h config,
-       uint16_t miu);
-
-net_nfc_error_e net_nfc_client_llcp_set_config_wks(
-       net_nfc_llcp_config_info_h config,
-       uint16_t wks);
-
-net_nfc_error_e net_nfc_client_llcp_set_config_lto(
-       net_nfc_llcp_config_info_h config,
-       uint8_t lto);
-
-net_nfc_error_e net_nfc_client_llcp_set_config_option(
-       net_nfc_llcp_config_info_h config,
-       uint8_t option);
-
-net_nfc_error_e net_nfc_client_llcp_free_config(
-       net_nfc_llcp_config_info_h config);
-
-net_nfc_error_e net_nfc_client_llcp_create_socket_option_default(
-                                       net_nfc_llcp_socket_option_h *option);
-
-net_nfc_error_e net_nfc_client_llcp_connect_sap(net_nfc_llcp_socket_t socket,
-                                       sap_t sap,
-                                       net_nfc_client_llcp_connect_sap_completed callback,
-                                       void *user_data);
-
-net_nfc_error_e net_nfc_client_llcp_connect_sap_sync(
-                                       net_nfc_llcp_socket_t socket,
-                                       sap_t sap,
-                                       net_nfc_llcp_socket_t *out_socket);
-
-
-net_nfc_error_e net_nfc_client_llcp_init(void);
-
-void net_nfc_client_llcp_deinit(void);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif //__NET_NFC_CLIENT_LLCP_H__
diff --git a/test/include/net_nfc_client_manager.h b/test/include/net_nfc_client_manager.h
deleted file mode 100755 (executable)
index 094d437..0000000
+++ /dev/null
@@ -1,67 +0,0 @@
-/*
- * Copyright (c) 2012, 2013 Samsung Electronics Co., Ltd.
- *
- * Licensed under the Flora License, Version 1.1 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://floralicense.org/license/
- *
- * 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.
- */
-#ifndef __NET_NFC_CLIENT_MANAGER_H__
-#define __NET_NFC_CLIENT_MANAGER_H__
-
-#include "net_nfc_typedef.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-typedef void (*net_nfc_client_manager_set_active_completed)(
-               net_nfc_error_e result,
-               void *user_data);
-
-typedef void (*net_nfc_client_manager_get_server_state_completed)(
-               net_nfc_error_e result,
-               unsigned int state,
-               void *user_data);
-
-typedef void (*net_nfc_client_manager_activated)(bool state,
-               void *user_data);
-
-void net_nfc_client_manager_set_activated(
-               net_nfc_client_manager_activated callback,
-               void *user_data);
-
-void net_nfc_client_manager_unset_activated(void);
-
-net_nfc_error_e net_nfc_client_manager_set_active(int state,
-               net_nfc_client_manager_set_active_completed callback,
-               void *user_data);
-
-net_nfc_error_e net_nfc_client_manager_set_active_sync(int state);
-
-net_nfc_error_e net_nfc_client_manager_get_server_state(
-               net_nfc_client_manager_get_server_state_completed callback,
-               void *user_data);
-
-net_nfc_error_e net_nfc_client_manager_get_server_state_sync(
-               unsigned int *state);
-
-bool net_nfc_client_manager_is_activated(void);
-
-/* TODO : move to internal header */
-net_nfc_error_e net_nfc_client_manager_init(void);
-
-void net_nfc_client_manager_deinit(void);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif //__NET_NFC_CLIENT_MANAGER_H__
diff --git a/test/include/net_nfc_client_ndef.h b/test/include/net_nfc_client_ndef.h
deleted file mode 100755 (executable)
index cdaf312..0000000
+++ /dev/null
@@ -1,81 +0,0 @@
-/*
- * Copyright (c) 2012, 2013 Samsung Electronics Co., Ltd.
- *
- * Licensed under the Flora License, Version 1.1 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://floralicense.org/license/
- *
- * 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.
- */
-
-#ifndef __NET_NFC_CLIENT_NDEF_H__
-#define __NET_NFC_CLIENT_NDEF_H__
-
-#include "net_nfc_typedef.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-typedef void (*net_nfc_client_ndef_read_completed)(net_nfc_error_e result,
-               ndef_message_h message,
-               void *user_data);
-
-typedef void (*net_nfc_client_ndef_write_completed)(net_nfc_error_e result,
-               void *user_data);
-
-typedef void (*net_nfc_client_ndef_make_read_only_completed)(
-               net_nfc_error_e result,
-               void *user_data);
-
-typedef void (*net_nfc_client_ndef_format_completed)(net_nfc_error_e result,
-               void *user_data);
-
-net_nfc_error_e net_nfc_client_ndef_read(net_nfc_target_handle_h handle,
-               net_nfc_client_ndef_read_completed callback,
-               void *user_data);
-
-net_nfc_error_e net_nfc_client_ndef_read_sync(net_nfc_target_handle_h handle,
-               ndef_message_h *message);
-
-net_nfc_error_e net_nfc_client_ndef_write(net_nfc_target_handle_h handle,
-               ndef_message_h message,
-               net_nfc_client_ndef_write_completed callback,
-               void *user_data);
-
-net_nfc_error_e net_nfc_client_ndef_write_sync(net_nfc_target_handle_h handle,
-               ndef_message_h message);
-
-net_nfc_error_e net_nfc_client_ndef_make_read_only(
-               net_nfc_target_handle_h handle,
-               net_nfc_client_ndef_make_read_only_completed callback,
-               void *user_data);
-
-net_nfc_error_e net_nfc_client_ndef_make_read_only_sync(
-               net_nfc_target_handle_h handle);
-
-net_nfc_error_e net_nfc_client_ndef_format(net_nfc_target_handle_h handle,
-               data_h key,
-               net_nfc_client_ndef_format_completed callback,
-               void *user_data);
-
-net_nfc_error_e net_nfc_client_ndef_format_sync(
-               net_nfc_target_handle_h handle,
-               data_h key);
-
-/* TODO : move to internal header */
-net_nfc_error_e net_nfc_client_ndef_init(void);
-
-void net_nfc_client_ndef_deinit(void);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif //__NET_NFC_CLIENT_NDEF_H__
diff --git a/test/include/net_nfc_client_p2p.h b/test/include/net_nfc_client_p2p.h
deleted file mode 100755 (executable)
index 58b97aa..0000000
+++ /dev/null
@@ -1,79 +0,0 @@
-/*
- * Copyright (c) 2012, 2013 Samsung Electronics Co., Ltd.
- *
- * Licensed under the Flora License, Version 1.1 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://floralicense.org/license/
- *
- * 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.
- */
-#ifndef __NET_NFC_CLIENT_P2P_H__
-#define __NET_NFC_CLIENT_P2P_H__
-
-#include "net_nfc_typedef.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/* p2p callbacks */
-
-typedef void (*net_nfc_client_p2p_send_completed)(net_nfc_error_e result,
-       void *user_data);
-
-typedef void (*net_nfc_client_p2p_device_discovered)(
-       net_nfc_target_handle_h handle_info,
-       void *user_data);
-
-typedef void (*net_nfc_client_p2p_device_detached)(void *user_data);
-
-typedef void (*net_nfc_client_p2p_data_received)(data_h p2p_data,
-       void *user_data);
-
-/* P2P client API's*/
-net_nfc_error_e net_nfc_client_p2p_send(net_nfc_target_handle_h handle,
-       data_h data,
-       net_nfc_client_p2p_send_completed callback,
-       void *user_data);
-
-net_nfc_error_e net_nfc_client_p2p_send_sync(net_nfc_target_handle_h handle,
-       data_h data);
-
-
-/* P2P client API's - used for registering callbacks*/
-void net_nfc_client_p2p_set_data_received(
-       net_nfc_client_p2p_data_received callback,
-       void *user_data);
-
-void net_nfc_client_p2p_set_device_detached(
-       net_nfc_client_p2p_device_detached callback,
-       void *user_data);
-
-void net_nfc_client_p2p_set_device_discovered(
-       net_nfc_client_p2p_device_discovered callback,
-       void *user_data);
-
-/* P2P client API's - used for unregistering callbacks*/
-void net_nfc_client_p2p_unset_data_received(void);
-
-void net_nfc_client_p2p_unset_device_detached(void);
-
-void net_nfc_client_p2p_unset_device_discovered(void);
-
-/* TODO : move to internal header */
-/* Init/Deint function calls*/
-net_nfc_error_e net_nfc_client_p2p_init(void);
-
-void net_nfc_client_p2p_deinit(void);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif //__NET_NFC_CLIENT_P2P_H__
diff --git a/test/include/net_nfc_client_se.h b/test/include/net_nfc_client_se.h
deleted file mode 100755 (executable)
index 6e01c5d..0000000
+++ /dev/null
@@ -1,240 +0,0 @@
-/*
- * Copyright (c) 2012, 2013 Samsung Electronics Co., Ltd.
- *
- * Licensed under the Flora License, Version 1.1 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://floralicense.org/license/
- *
- * 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.
- */
-
-#ifndef __NET_NFC_CLIENT_SE_H__
-#define __NET_NFC_CLIENT_SE_H__
-
-#include "net_nfc_typedef.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*************Secure Element Callbacks*********/
-typedef void (*net_nfc_se_set_se_cb)(
-       net_nfc_error_e result,
-       void *user_data);
-
-typedef void (*net_nfc_se_get_se_cb)(
-       net_nfc_error_e result,
-       net_nfc_se_type_e se_type,
-       void *user_data);
-
-typedef void (*net_nfc_se_set_card_emulation_cb)(
-       net_nfc_error_e result,
-       void *user_data);
-
-typedef void (*net_nfc_se_open_se_cb)(
-       net_nfc_error_e result,
-       net_nfc_target_handle_h handle,
-       void *user_data);
-
-typedef void (*net_nfc_se_close_se_cb)(
-       net_nfc_error_e result,
-       void *user_data);
-
-typedef void (*net_nfc_se_get_atr_cb)(
-       net_nfc_error_e result,
-       data_h data,
-       void *user_data);
-
-typedef void (*net_nfc_se_send_apdu_cb)(
-       net_nfc_error_e result,
-       data_h data,
-       void *user_data);
-
-typedef void (*net_nfc_client_se_event)(
-       net_nfc_message_e event,
-       void *user_data);
-
-typedef void (*net_nfc_client_se_transaction_event)(
-                                       net_nfc_se_type_e se_type,
-                                       data_h aid,
-                                       data_h param,
-                                       void *user_data);
-
-typedef void (*net_nfc_client_se_ese_detected_event)(
-                                       net_nfc_target_handle_h handle,
-                                       int dev_type,
-                                       data_h data,
-                                       void *user_data);
-
-typedef bool (*net_nfc_client_se_registered_aid_cb)(net_nfc_se_type_e se_type,
-       const char *aid, bool readonly, void *user_data);
-
-typedef bool (*net_nfc_client_se_registered_handler_cb)(const char *package,
-       int count, void *user_data);
-
-/************* Secure Element API's*************/
-
-net_nfc_error_e net_nfc_client_se_set_secure_element_type(
-                                       net_nfc_se_type_e se_type,
-                                       net_nfc_se_set_se_cb callback,
-                                       void *user_data);
-
-
-net_nfc_error_e net_nfc_client_se_set_secure_element_type_sync(
-                                       net_nfc_se_type_e se_type);
-
-net_nfc_error_e net_nfc_client_se_get_secure_element_type_sync(
-       net_nfc_se_type_e *se_type);
-
-net_nfc_error_e net_nfc_set_card_emulation_mode_sync(
-       net_nfc_card_emulation_mode_t mode);
-
-net_nfc_error_e net_nfc_get_card_emulation_mode_sync(
-       net_nfc_card_emulation_mode_t *se_type);
-
-net_nfc_error_e net_nfc_client_se_open_internal_secure_element(
-                                       net_nfc_se_type_e se_type,
-                                       net_nfc_se_open_se_cb callback,
-                                       void *user_data);
-
-
-net_nfc_error_e net_nfc_client_se_open_internal_secure_element_sync(
-                                       net_nfc_se_type_e se_type,
-                                       net_nfc_target_handle_h *handle);
-
-
-net_nfc_error_e net_nfc_client_se_close_internal_secure_element(
-                                       net_nfc_target_handle_h handle,
-                                       net_nfc_se_close_se_cb callback,
-                                       void *user_data);
-
-
-net_nfc_error_e net_nfc_client_se_close_internal_secure_element_sync(
-                                       net_nfc_target_handle_h handle);
-
-
-net_nfc_error_e net_nfc_client_se_get_atr(
-                               net_nfc_target_handle_h handle,
-                               net_nfc_se_get_atr_cb callback,
-                               void *user_data);
-
-
-net_nfc_error_e net_nfc_client_se_get_atr_sync(
-                               net_nfc_target_handle_h handle,
-                               data_h *atr);
-
-
-net_nfc_error_e net_nfc_client_se_send_apdu(
-                               net_nfc_target_handle_h handle,
-                               data_h apdu_data,
-                               net_nfc_se_send_apdu_cb callback,
-                               void *user_data);
-
-
-net_nfc_error_e net_nfc_client_se_send_apdu_sync(
-                               net_nfc_target_handle_h handle,
-                               data_h apdu_data,
-                               data_h *response);
-
-
-/************* Secure Element CallBack Register/Deregister functions*************/
-
-void net_nfc_client_se_set_ese_detection_cb(
-                       net_nfc_client_se_ese_detected_event callback,
-                       void *user_data);
-
-void net_nfc_client_se_unset_ese_detection_cb(void);
-
-void net_nfc_client_se_set_transaction_event_cb(
-                       net_nfc_se_type_e se_type,
-                       net_nfc_client_se_transaction_event callback,
-                       void *user_data);
-
-void net_nfc_client_se_unset_transaction_event_cb(net_nfc_se_type_e type);
-
-void net_nfc_client_se_set_event_cb(net_nfc_client_se_event callback,
-                               void *user_data);
-
-void net_nfc_client_se_unset_event_cb(void);
-
-net_nfc_error_e net_nfc_client_se_set_transaction_fg_dispatch(int mode);
-
-
-/* new card emulation */
-net_nfc_error_e net_nfc_client_se_is_activated_aid_handler_sync(
-       net_nfc_se_type_e se_type, const char *aid, bool *activated);
-
-net_nfc_error_e net_nfc_client_se_is_activated_category_handler_sync(
-       net_nfc_se_type_e se_type,
-       net_nfc_card_emulation_category_t category, bool *activated);
-
-net_nfc_error_e net_nfc_client_se_get_registered_aids_count_sync(
-       net_nfc_se_type_e se_type,
-       net_nfc_card_emulation_category_t category,
-       size_t *count);
-
-net_nfc_error_e net_nfc_client_se_foreach_registered_aids_sync(
-       net_nfc_se_type_e se_type,
-       net_nfc_card_emulation_category_t category,
-       net_nfc_client_se_registered_aid_cb callback,
-       void *user_data);
-
-net_nfc_error_e net_nfc_client_se_register_aids_sync(net_nfc_se_type_e se_type,
-       net_nfc_card_emulation_category_t category, const char *aid, ...);
-net_nfc_error_e net_nfc_client_se_unregister_aid_sync(net_nfc_se_type_e se_type,
-       net_nfc_card_emulation_category_t category, const char *aid);
-net_nfc_error_e net_nfc_client_se_unregister_aids_sync(net_nfc_se_type_e se_type,
-       net_nfc_card_emulation_category_t category);
-
-
-net_nfc_error_e net_nfc_client_se_set_default_route_sync(
-       net_nfc_se_type_e switch_on, net_nfc_se_type_e switch_off,
-       net_nfc_se_type_e battery_off);
-
-/* internal */
-net_nfc_error_e net_nfc_client_se_add_route_aid_sync(
-       const char *package, net_nfc_se_type_e se_type,
-       net_nfc_card_emulation_category_t category, const char *aid,
-       bool unlock_required, int power);
-
-net_nfc_error_e net_nfc_client_se_remove_route_aid_sync(
-       const char *package, const char *aid);
-
-net_nfc_error_e net_nfc_client_se_remove_package_aids_sync(
-       const char *package);
-
-net_nfc_error_e net_nfc_client_se_foreach_registered_handlers_sync(
-       net_nfc_card_emulation_category_t category,
-       net_nfc_client_se_registered_handler_cb callback,
-       void *user_data);
-
-net_nfc_error_e net_nfc_client_se_get_handler_storage_info_sync(
-       net_nfc_card_emulation_category_t category, int *used, int *max);
-
-net_nfc_error_e net_nfc_client_se_get_conflict_handlers_sync(
-       const char *package, net_nfc_card_emulation_category_t category,
-       const char *aid, char ***handlers);
-
-net_nfc_error_e net_nfc_client_se_set_preferred_handler_sync(bool state);
-
-//net_nfc_error_e net_nfc_client_hce_get_route_table_sync(data_h arg_aid);
-
-
-/* TODO : move to internal header */
-/************* Secure Element Init/Deint*************/
-
-net_nfc_error_e net_nfc_client_se_init(void);
-
-void net_nfc_client_se_deinit(void);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif //__NET_NFC_CLIENT_SE_H__
diff --git a/test/include/net_nfc_client_snep.h b/test/include/net_nfc_client_snep.h
deleted file mode 100755 (executable)
index 25c925e..0000000
+++ /dev/null
@@ -1,88 +0,0 @@
-/*
- * Copyright (c) 2012, 2013 Samsung Electronics Co., Ltd.
- *
- * Licensed under the Flora License, Version 1.1 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://floralicense.org/license/
- *
- * 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.
- */
-
-#ifndef __NET_NFC_CLIENT_SNEP_H__
-#define __NET_NFC_CLIENT_SNEP_H__
-
-#include "net_nfc_typedef.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-typedef void (*net_nfc_client_snep_event_cb) (
-                       net_nfc_snep_handle_h target,
-                       net_nfc_snep_type_t event,
-                       net_nfc_error_e result,
-                       ndef_message_h msg,
-                       void *user_data);
-
-net_nfc_error_e net_nfc_client_snep_start_server(
-                       net_nfc_target_handle_h target,
-                       const char *san,
-                       sap_t sap,
-                       net_nfc_client_snep_event_cb callback,
-                       void *user_data);
-
-net_nfc_error_e net_nfc_client_snep_start_client(
-                       net_nfc_target_handle_h target,
-                       const char *san,
-                       sap_t sap,
-                       net_nfc_client_snep_event_cb callback,
-                       void *user_data);
-
-net_nfc_error_e net_nfc_client_snep_send_client_request(
-                       net_nfc_snep_handle_h handle,
-                       net_nfc_snep_type_t snep_type,
-                       ndef_message_h msg,
-                       net_nfc_client_snep_event_cb callback,
-                       void *user_data);
-
-net_nfc_error_e net_nfc_client_snep_send_client_request_sync(
-                       net_nfc_target_handle_h target,
-                       net_nfc_snep_type_t snep_type,
-                       ndef_message_h msg,
-                       net_nfc_snep_type_t *resp_type,
-                       ndef_message_h *response);
-
-net_nfc_error_e net_nfc_client_snep_stop_service(
-                       net_nfc_target_handle_h target,
-                       net_nfc_snep_handle_h service,
-                       net_nfc_client_snep_event_cb callback,
-                       void *user_data);
-
-net_nfc_error_e net_nfc_client_snep_stop_service_sync(
-                       net_nfc_target_handle_h target,
-                       net_nfc_snep_handle_h service);
-
-net_nfc_error_e net_nfc_client_snep_register_server(const char *san,
-       sap_t sap,
-       net_nfc_client_snep_event_cb callback,
-       void *user_data);
-
-net_nfc_error_e net_nfc_client_snep_unregister_server(const char *san,
-       sap_t sap);
-
-/* TODO : move to internal header */
-net_nfc_error_e net_nfc_client_snep_init(void);
-
-void net_nfc_client_snep_deinit(void);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif //__NET_NFC_CLIENT_SNEP_H__
diff --git a/test/include/net_nfc_client_system_handler.h b/test/include/net_nfc_client_system_handler.h
deleted file mode 100755 (executable)
index b384fa6..0000000
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * Copyright (c) 2012, 2013 Samsung Electronics Co., Ltd.
- *
- * Licensed under the Flora License, Version 1.1 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://floralicense.org/license/
- *
- * 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.
- */
-
-#ifndef __NET_NFC_CLIENT_SYSTEM_HANDLER_H__
-#define __NET_NFC_CLIENT_SYSTEM_HANDLER_H__
-
-#include "net_nfc_typedef.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-typedef void (*net_nfc_client_popup_set_state_callback)(
-       net_nfc_error_e result,
-       void *user_data);
-
-net_nfc_error_e net_nfc_client_sys_handler_set_state(int state,
-       net_nfc_client_popup_set_state_callback callback,
-       void *user_data);
-
-net_nfc_error_e net_nfc_client_sys_handler_set_state_force(int state,
-       net_nfc_client_popup_set_state_callback callback,
-       void *user_data);
-
-net_nfc_error_e net_nfc_client_sys_handler_set_state_sync(int state);
-
-net_nfc_error_e net_nfc_client_sys_handler_set_state_force_sync(int state);
-
-net_nfc_error_e net_nfc_client_sys_handler_set_launch_popup_state(int enable);
-
-net_nfc_error_e net_nfc_client_sys_handler_set_launch_popup_state_force(
-       int enable);
-
-net_nfc_error_e net_nfc_client_sys_handler_get_launch_popup_state(int *state);
-
-/* TODO : move to internal header */
-net_nfc_error_e net_nfc_client_sys_handler_init(void);
-
-void net_nfc_client_sys_handler_deinit(void);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif //__NET_NFC_CLIENT_SYSTEM_HANDLER_H__
diff --git a/test/include/net_nfc_client_tag.h b/test/include/net_nfc_client_tag.h
deleted file mode 100755 (executable)
index 3f67bf1..0000000
+++ /dev/null
@@ -1,99 +0,0 @@
-/*
- * Copyright (c) 2012, 2013 Samsung Electronics Co., Ltd.
- *
- * Licensed under the Flora License, Version 1.1 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://floralicense.org/license/
- *
- * 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.
- */
-
-#ifndef __NET_NFC_CLIENT_TAG_H__
-#define __NET_NFC_CLIENT_TAG_H__
-
-#include "net_nfc_typedef.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#if 0
-typedef void (*net_nfc_client_tag_is_tag_connected_completed)(
-                                               net_nfc_error_e result,
-                                               net_nfc_target_type_e dev_type,
-                                               void *user_data);
-
-typedef void (*net_nfc_client_tag_get_current_tag_info_completed)(
-                                               net_nfc_error_e result,
-                                               net_nfc_target_info_h info,
-                                               void *user_data);
-
-typedef void (*net_nfc_client_tag_get_current_target_handle_completed)(
-                                       net_nfc_error_e result,
-                                       net_nfc_target_handle_h handle,
-                                       void *user_data);
-#endif
-typedef void (*net_nfc_client_tag_tag_discovered)(net_nfc_target_info_h info,
-                                               void *user_data);
-
-typedef void (*net_nfc_client_tag_tag_detached)(void *user_data);
-
-#if 0
-net_nfc_error_e net_nfc_client_tag_is_tag_connected(
-                       net_nfc_client_tag_is_tag_connected_completed callback,
-                       void *user_data);
-
-net_nfc_error_e net_nfc_client_tag_get_current_tag_info(
-               net_nfc_client_tag_get_current_tag_info_completed callback,
-               void *user_data);
-
-net_nfc_error_e net_nfc_client_tag_get_current_target_handle(
-       net_nfc_client_tag_get_current_target_handle_completed callback,
-       void *user_data);
-#endif
-net_nfc_error_e net_nfc_client_tag_is_tag_connected_sync(
-                                       net_nfc_target_type_e *dev_type);
-
-net_nfc_error_e net_nfc_client_tag_get_current_tag_info_sync(
-                                               net_nfc_target_info_h *info);
-
-net_nfc_error_e net_nfc_client_barcode_get_barcode_sync(
-                                               unsigned char **barcode, int* barcode_len);
-
-net_nfc_error_e net_nfc_client_tag_get_current_target_handle_sync(
-                                       net_nfc_target_handle_h *handle);
-
-void net_nfc_client_tag_set_tag_discovered(
-                       net_nfc_client_tag_tag_discovered callback,
-                       void *user_data);
-
-void net_nfc_client_tag_unset_tag_discovered(void);
-
-void net_nfc_client_tag_set_tag_detached(
-                       net_nfc_client_tag_tag_detached callback,
-                       void *user_data);
-
-void net_nfc_client_tag_unset_tag_detached(void);
-
-
-/* internal function */
-void net_nfc_client_tag_set_filter(net_nfc_event_filter_e filter);
-
-net_nfc_event_filter_e net_nfc_client_tag_get_filter(void);
-
-/* TODO : move to internal header */
-net_nfc_error_e net_nfc_client_tag_init(void);
-
-void net_nfc_client_tag_deinit(void);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif //__NET_NFC_CLIENT_TAG_H__
diff --git a/test/include/net_nfc_client_tag_felica.h b/test/include/net_nfc_client_tag_felica.h
deleted file mode 100755 (executable)
index 29231bf..0000000
+++ /dev/null
@@ -1,266 +0,0 @@
-/*
- * Copyright (c) 2012, 2013 Samsung Electronics Co., Ltd.
- *
- * Licensed under the Flora License, Version 1.1 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://floralicense.org/license/
- *
- * 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.
- */
-#ifndef __NET_NFC_CLIENT_TAG_FELICA_H__
-#define __NET_NFC_CLIENT_TAG_FELICA_H__
-
-#include "net_nfc_typedef.h"
-#include "net_nfc_client_transceive.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/**
-
-@addtogroup NET_NFC_MANAGER_TAG
-@{
-
-       send poll request to felica tag.
-       Use this command to acquire and identify a card. Acqusition of IDm and PMm is possible with this command.
-       By specifying a request code , you can acquire system code or communication performance of the system.
-       By specifying a time slot, you can designate the maximum number of time slots possible to return response.
-
-       NET_NFC_FELICA_POLL_NO_REQUEST = 0x00
-       NET_NFC_FELICA_POLL_SYSTEM_CODE_REQUEST = 0x01
-       NET_NFC_FELICA_POLL_COMM_SPEED_REQUEST= 0x02
-
-       time slot
-
-       Time slot               Max number of slots
-       0x00,           1
-       0x01,           2
-       0x03,           4
-       0x07,           8
-       0x0f,           16
-
-       \par Sync (or) Async: Sync
-       This is a Asynchronous API
-
-       @param[in]      handle          target handle of detected tag
-       @param[in]      req_code                request code with this command
-       @param[in]      time_slot               time slot value
-
-       @return         return the result of the calling the function
-
-       @exception NET_NFC_NULL_PARAMETER       parameter has illigal NULL pointer
-       @exception NET_NFC_ALLOC_FAIL   memory allocation is failed
-       @exception NET_NFC_NOT_INITIALIZED      Try to operate without initialization
-       @exception NET_NFC_BUSY         Device is too busy to handle your request
-       @exception NET_NFC_OPERATION_FAIL       Operation is failed because of the internal oal error
-       @exception NET_NFC_RF_TIMEOUT   Timeout is raised while communicate with tag
-       @exception NET_NFC_NOT_SUPPORTED        you may recieve this error if you request not supported command
-       @exception NET_NFC_INVALID_HANDLE       target handle is not valid
-       @exception NET_NFC_TAG_READ_FAILED      received chunked data is not valied (damaged data is recieved) or error ack is recieved
-       @exception NET_NFC_NO_DATA_FOUND        mendantory tag info (SYSTEM_CODE, etc) is not founded
-
-*/
-
-net_nfc_error_e net_nfc_client_felica_poll(net_nfc_target_handle_h handle,
-                                       net_nfc_felica_poll_request_code_e req_code,
-                                       uint8_t time_slote,
-                                       nfc_transceive_data_callback callback,
-                                       void *user_data);
-
-/**
-       Use this command to check for the existence of Area / Service specified by Area Code / Service Code
-       If the specified Area / Service exists, the card returns version information of the key known as "Key Version" (2 Bytes)
-       If the specified Area / Service does not exist, the card returns 0xffff as it s Key Version
-
-       \par Sync (or) Async: Sync
-       This is a Asynchronous API
-
-       @param[in]      handle                                          target handle of detected tag
-       @param[in]      number_of_area_service          the number of specified Area / Service list
-       @param[in]      area_service_list                               specified Area / Service list
-
-       @return         return the result of the calling the function
-
-       @exception NET_NFC_NULL_PARAMETER       parameter has illigal NULL pointer
-       @exception NET_NFC_ALLOC_FAIL   memory allocation is failed
-       @exception NET_NFC_NOT_INITIALIZED      Try to operate without initialization
-       @exception NET_NFC_BUSY         Device is too busy to handle your request
-       @exception NET_NFC_OPERATION_FAIL       Operation is failed because of the internal oal error
-       @exception NET_NFC_RF_TIMEOUT   Timeout is raised while communicate with tag
-       @exception NET_NFC_NOT_SUPPORTED        you may recieve this error if you request not supported command
-       @exception NET_NFC_INVALID_HANDLE       target handle is not valid
-       @exception NET_NFC_TAG_READ_FAILED      received chunked data is not valied (damaged data is recieved) or error ack is recieved
-       @exception NET_NFC_NO_DATA_FOUND        mendantory tag info (IDm, etc) is not founded
-       @exception NET_NFC_OUT_OF_BOUND         the length of IDm is not correct. number of services exceed max value
-
-*/
-
-net_nfc_error_e net_nfc_client_felica_request_service(
-                                       net_nfc_target_handle_h handle,
-                                       uint8_t number_of_area_service,
-                                       uint16_t area_service_list[],
-                                       uint8_t number_of_services,
-                                       nfc_transceive_data_callback callback,
-                                       void *user_data);
-
-/**
-       Use this command to check whether a card exist
-       the Current mode of the card is returned.
-
-       Mode
-
-       0x00    Mode0
-       0x01    Mode1
-       0x02    Mode2
-       0x03    Mode3
-
-       \par Sync (or) Async: Sync
-       This is a Asynchronous API
-
-       @param[in]      handle                                          target handle of detected tag
-
-       @return         return the result of the calling the function
-
-       @exception NET_NFC_NULL_PARAMETER       parameter has illigal NULL pointer
-       @exception NET_NFC_ALLOC_FAIL   memory allocation is failed
-       @exception NET_NFC_NOT_INITIALIZED      Try to operate without initialization
-       @exception NET_NFC_BUSY         Device is too busy to handle your request
-       @exception NET_NFC_OPERATION_FAIL       Operation is failed because of the internal oal error
-       @exception NET_NFC_RF_TIMEOUT   Timeout is raised while communicate with tag
-       @exception NET_NFC_NOT_SUPPORTED        you may recieve this error if you request not supported command
-       @exception NET_NFC_INVALID_HANDLE       target handle is not valid
-       @exception NET_NFC_TAG_READ_FAILED      received chunked data is not valied (damaged data is recieved) or error ack is recieved
-       @exception NET_NFC_NO_DATA_FOUND        mendantory tag info (IDm, etc) is not founded
-       @exception NET_NFC_OUT_OF_BOUND         the length of IDm is not correct
-
-*/
-
-net_nfc_error_e net_nfc_client_felica_request_response(
-                                       net_nfc_target_handle_h handle,
-                                       nfc_transceive_data_callback callback,
-                                       void *user_data);
-
-/**
-       Use this command to read block data from a Service that requires no authentification
-
-       \par Sync (or) Async: Sync
-       This is a Asynchronous API
-
-       @param[in]      handle                                  target handle of detected tag
-       @param[in]      number_of_service                       the number of service list to read
-       @param[in]      service_list                            specified Service list to read
-       @param[in]      number_of_blocks                        the number of blocks to read
-       @param[in]      block_list                                      the blocks to read
-
-       @return         return the result of the calling the function
-
-       @exception NET_NFC_NULL_PARAMETER       parameter has illigal NULL pointer
-       @exception NET_NFC_ALLOC_FAIL   memory allocation is failed
-       @exception NET_NFC_NOT_INITIALIZED      Try to operate without initialization
-       @exception NET_NFC_BUSY         Device is too busy to handle your request
-       @exception NET_NFC_OPERATION_FAIL       Operation is failed because of the internal oal error
-       @exception NET_NFC_RF_TIMEOUT   Timeout is raised while communicate with tag
-       @exception NET_NFC_NOT_SUPPORTED        you may recieve this error if you request not supported command
-       @exception NET_NFC_INVALID_HANDLE       target handle is not valid
-       @exception NET_NFC_TAG_READ_FAILED      received chunked data is not valied (damaged data is recieved) or error ack is recieved
-       @exception NET_NFC_NO_DATA_FOUND        mendantory tag info (IDm, etc) is not founded
-       @exception NET_NFC_OUT_OF_BOUND         the length of IDm is not correct
-
-*/
-
-net_nfc_error_e net_nfc_client_felica_read_without_encryption(
-                                       net_nfc_target_handle_h handle,
-                                       uint8_t number_of_services,
-                                       uint16_t service_list[],
-                                       uint8_t number_of_blocks,
-                                       uint8_t block_list[],
-                                       nfc_transceive_data_callback callback,
-                                       void *user_data);
-
-/**
-       Use this command to write block data to a Service that requires no authentification
-
-       \par Sync (or) Async: Sync
-       This is a Asynchronous API
-
-       @param[in]      handle                                  target handle of detected tag
-       @param[in]      number_of_service                       the number of service list to write
-       @param[in]      service_list                            specified Service list to write
-       @param[in]      number_of_blocks                        the number of blocks to write
-       @param[in]      block_list                                      the blocks to write
-       @param[in]      data                                            the data to write
-
-       @return         return the result of the calling the function
-
-       @exception NET_NFC_NULL_PARAMETER       parameter has illigal NULL pointer
-       @exception NET_NFC_ALLOC_FAIL   memory allocation is failed
-       @exception NET_NFC_NOT_INITIALIZED      Try to operate without initialization
-       @exception NET_NFC_BUSY         Device is too busy to handle your request
-       @exception NET_NFC_OPERATION_FAIL       Operation is failed because of the internal oal error
-       @exception NET_NFC_RF_TIMEOUT   Timeout is raised while communicate with tag
-       @exception NET_NFC_NOT_SUPPORTED        you may recieve this error if you request not supported command
-       @exception NET_NFC_INVALID_HANDLE       target handle is not valid
-       @exception NET_NFC_TAG_READ_FAILED      received chunked data is not valied (damaged data is recieved) or error ack is recieved
-       @exception NET_NFC_NO_DATA_FOUND        mendantory tag info (IDm, etc) is not founded
-       @exception NET_NFC_OUT_OF_BOUND         the length of IDm is not correct. number of services exceed max value, the data length to write is exceed the limitation. It should be less than number_of_blocks * 16 bytes
-
-*/
-
-net_nfc_error_e net_nfc_client_felica_write_without_encryption(
-                                       net_nfc_target_handle_h handle,
-                                       uint8_t number_of_services,
-                                       uint16_t service_list[],
-                                       uint8_t number_of_blocks,
-                                       uint8_t block_list[],
-                                       data_h data,
-                                       nfc_transceive_data_callback callback,
-                                       void *user_data);
-
-/**
-       Use this command to acquire system code of the system located on a card
-       If a card is divided into mutiple system, this command acquires system code of all the system existing in the card
-
-       \par Sync (or) Async: Sync
-       This is a Asynchronous API
-
-       @param[in]      handle                                  target handle of detected tag
-
-       @return         return the result of the calling the function
-
-       @exception NET_NFC_NULL_PARAMETER       parameter has illigal NULL pointer
-       @exception NET_NFC_ALLOC_FAIL   memory allocation is failed
-       @exception NET_NFC_NOT_INITIALIZED      Try to operate without initialization
-       @exception NET_NFC_BUSY         Device is too busy to handle your request
-       @exception NET_NFC_OPERATION_FAIL       Operation is failed because of the internal oal error
-       @exception NET_NFC_RF_TIMEOUT   Timeout is raised while communicate with tag
-       @exception NET_NFC_NOT_SUPPORTED        you may recieve this error if you request not supported command
-       @exception NET_NFC_INVALID_HANDLE       target handle is not valid
-       @exception NET_NFC_TAG_READ_FAILED      received chunked data is not valied (damaged data is recieved) or error ack is recieved
-       @exception NET_NFC_NO_DATA_FOUND        mendantory tag info (IDm, etc) is not founded
-       @exception NET_NFC_OUT_OF_BOUND         the length of IDm is not correct.
-
-*/
-
-net_nfc_error_e net_nfc_client_felica_request_system_code(
-                                       net_nfc_target_handle_h handle,
-                                       nfc_transceive_data_callback callback,
-                                       void* trans_param);
-
-/**
-@}
-*/
-
-
-#ifdef __cplusplus
-}
-#endif
-
-
-#endif //__NET_NFC_CLIENT_TAG_FELICA_H__
diff --git a/test/include/net_nfc_client_tag_internal.h b/test/include/net_nfc_client_tag_internal.h
deleted file mode 100755 (executable)
index 11220d9..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * Copyright (c) 2012, 2013 Samsung Electronics Co., Ltd.
- *
- * Licensed under the Flora License, Version 1.1 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://floralicense.org/license/
- *
- * 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.
- */
-#ifndef __NET_NFC_CLIENT_TAG_INTERNAL_H__
-#define __NET_NFC_CLIENT_TAG_INTERNAL_H__
-
-#include <glib.h>
-
-#include "net_nfc_typedef_internal.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-gboolean net_nfc_client_tag_is_connected(void);
-
-net_nfc_target_info_s *net_nfc_client_tag_get_client_target_info(void);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif //__NET_NFC_CLIENT_TAG_INTERNAL_H__
diff --git a/test/include/net_nfc_client_tag_jewel.h b/test/include/net_nfc_client_tag_jewel.h
deleted file mode 100755 (executable)
index 04774cb..0000000
+++ /dev/null
@@ -1,202 +0,0 @@
-/*
- * Copyright (c) 2012, 2013 Samsung Electronics Co., Ltd.
- *
- * Licensed under the Flora License, Version 1.1 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://floralicense.org/license/
- *
- * 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.
- */
-#ifndef __NET_NFC_CLIENT_TAG_JEWEL_H__
-#define __NET_NFC_CLIENT_TAG_JEWEL_H__
-
-#include "net_nfc_typedef.h"
-#include "net_nfc_client_transceive.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/**
-
-@addtogroup NET_NFC_MANAGER_TAG
-@{
-
-       read uid from jewel tag.
-
-       \par Sync (or) Async: Sync
-       This is a Asynchronous API
-
-       @param[in]      handle          target handle of detected tag
-
-       @return         return the result of the calling the function
-
-       @exception NET_NFC_NULL_PARAMETER       parameter has illigal NULL pointer
-       @exception NET_NFC_ALLOC_FAIL   memory allocation is failed
-       @exception NET_NFC_NOT_INITIALIZED      Try to operate without initialization
-       @exception NET_NFC_BUSY         Device is too busy to handle your request
-       @exception NET_NFC_OPERATION_FAIL       Operation is failed because of the internal oal error
-       @exception NET_NFC_RF_TIMEOUT   Timeout is raised while communicate with tag
-       @exception NET_NFC_NOT_SUPPORTED        you may recieve this error if you request not supported command
-       @exception NET_NFC_INVALID_HANDLE       target handle is not valid
-       @exception NET_NFC_TAG_READ_FAILED      received chunked data is not valied (damaged data is recieved) or error ack is recieved
-       @exception NET_NFC_NO_DATA_FOUND        mendantory tag info (UID, etc) is not founded
-
-*/
-
-net_nfc_error_e net_nfc_client_jewel_read_id(net_nfc_target_handle_h handle,
-                                       nfc_transceive_data_callback callback,
-                                       void *user_data);
-
-/**
-       read one byte of specific address .
-
-       \par Sync (or) Async: Sync
-       This is a Asynchronous API
-
-       @param[in]      handle          target handle of detected tag
-       @param[in]      block           block number. (block 0 ~ block E)
-       @param[in]      byte                    byte number. Each block has 8 bytes. (byte 0 ~ byte 7)
-
-       @return         return the result of the calling the function
-
-       @exception NET_NFC_NULL_PARAMETER       parameter has illigal NULL pointer
-       @exception NET_NFC_ALLOC_FAIL   memory allocation is failed
-       @exception NET_NFC_NOT_INITIALIZED      Try to operate without initialization
-       @exception NET_NFC_BUSY         Device is too busy to handle your request
-       @exception NET_NFC_OPERATION_FAIL       Operation is failed because of the internal oal error
-       @exception NET_NFC_RF_TIMEOUT   Timeout is raised while communicate with tag
-       @exception NET_NFC_NOT_SUPPORTED        you may recieve this error if you request not supported command
-       @exception NET_NFC_INVALID_HANDLE       target handle is not valid
-       @exception NET_NFC_TAG_READ_FAILED      received chunked data is not valied (damaged data is recieved) or error ack is recieved
-       @exception NET_NFC_NO_DATA_FOUND        mendantory tag info (UID, etc) is not founded
-
-*/
-
-net_nfc_error_e net_nfc_client_jewel_read_byte(net_nfc_target_handle_h handle,
-                                       uint8_t block,
-                                       uint8_t byte,
-                                       nfc_transceive_data_callback callback,
-                                       void *user_data);
-
-/**
-       read all byte from tag .
-
-       \par Sync (or) Async: Sync
-       This is a Asynchronous API
-
-       @param[in]      handle          target handle of detected tag
-
-       @return         return the result of the calling the function
-
-       @exception NET_NFC_NULL_PARAMETER       parameter has illigal NULL pointer
-       @exception NET_NFC_ALLOC_FAIL   memory allocation is failed
-       @exception NET_NFC_NOT_INITIALIZED      Try to operate without initialization
-       @exception NET_NFC_BUSY         Device is too busy to handle your request
-       @exception NET_NFC_OPERATION_FAIL       Operation is failed because of the internal oal error
-       @exception NET_NFC_RF_TIMEOUT   Timeout is raised while communicate with tag
-       @exception NET_NFC_NOT_SUPPORTED        you may recieve this error if you request not supported command
-       @exception NET_NFC_INVALID_HANDLE       target handle is not valid
-       @exception NET_NFC_TAG_READ_FAILED      received chunked data is not valied (damaged data is recieved) or error ack is recieved
-       @exception NET_NFC_NO_DATA_FOUND        mendantory tag info (UID, etc) is not founded
-
-*/
-
-
-net_nfc_error_e net_nfc_client_jewel_read_all(net_nfc_target_handle_h handle,
-                                       nfc_transceive_data_callback callback,
-                                       void *user_data);
-
-
-/**
-       operate erase and write cycle . If any of BLOCK-0 to BLOCK-D is locked then write with erase is barred form thoes blocks.
-       Additionally 0, D, E blocks are automatically in the lock condition. so write with erase is always barred from thoes blocks.
-
-       \par Sync (or) Async: Sync
-       This is a Asynchronous API
-
-       @param[in]      handle          target handle of detected tag
-       @param[in]      block           block number. (block 0 ~ block E)
-       @param[in]      data                    the data to write
-       @param[in]      byte                    byte number. Each block has 8 bytes. (byte 0 ~ byte 7)
-
-       @return         return the result of the calling the function
-
-       @exception NET_NFC_NULL_PARAMETER       parameter has illigal NULL pointer
-       @exception NET_NFC_ALLOC_FAIL   memory allocation is failed
-       @exception NET_NFC_NOT_INITIALIZED      Try to operate without initialization
-       @exception NET_NFC_BUSY         Device is too busy to handle your request
-       @exception NET_NFC_OPERATION_FAIL       Operation is failed because of the internal oal error
-       @exception NET_NFC_RF_TIMEOUT   Timeout is raised while communicate with tag
-       @exception NET_NFC_NOT_SUPPORTED        you may recieve this error if you request not supported command
-       @exception NET_NFC_INVALID_HANDLE       target handle is not valid
-       @exception NET_NFC_TAG_WRITE_FAILED     read only tag, or error ack is received from tag
-       @exception NET_NFC_NO_DATA_FOUND        mendantory tag info (UID, etc) is not founded
-
-*/
-
-net_nfc_error_e net_nfc_client_jewel_write_with_erase(
-                                       net_nfc_target_handle_h handle,
-                                       uint8_t block,
-                                       uint8_t byte,
-                                       uint8_t data,
-                                       nfc_transceive_callback callback,
-                                       void *user_data);
-
-
-/**
-       operate no erase and write cycle .
-
-       The WRITE-NE command is available for three main purposes
-               - Lock . to set the ï¿½ï¿½lock bit�� for a block
-               - OTP . to set One-Time-Programmable bits (bytes 2 . 7 of Block-E), where between one and eight OTP bits can be set with a singleWRITE-NE command
-               - A fast-write in order to reduce overall time to write data to memory blocks for the first time given that the original condition of memory is zero
-
-       \par Sync (or) Async: Sync
-       This is a Asynchronous API
-
-       @param[in]      handle          target handle of detected tag
-       @param[in]      block           block number. (block 0 ~ block E)
-       @param[in]      data                    the data to write
-       @param[in]      byte                    byte number. Each block has 8 bytes. (byte 0 ~ byte 7)
-
-       @return         return the result of the calling the function
-
-       @exception NET_NFC_NULL_PARAMETER       parameter has illigal NULL pointer
-       @exception NET_NFC_ALLOC_FAIL   memory allocation is failed
-       @exception NET_NFC_NOT_INITIALIZED      Try to operate without initialization
-       @exception NET_NFC_BUSY         Device is too busy to handle your request
-       @exception NET_NFC_OPERATION_FAIL       Operation is failed because of the internal oal error
-       @exception NET_NFC_RF_TIMEOUT   Timeout is raised while communicate with tag
-       @exception NET_NFC_NOT_SUPPORTED        you may recieve this error if you request not supported command
-       @exception NET_NFC_INVALID_HANDLE       target handle is not valid
-       @exception NET_NFC_TAG_WRITE_FAILED     read only tag, or error ack is received from tag
-       @exception NET_NFC_NO_DATA_FOUND        mendantory tag info (UID, etc) is not founded
-
-*/
-
-net_nfc_error_e net_nfc_client_jewel_write_with_no_erase(
-                                       net_nfc_target_handle_h handle,
-                                       uint8_t block,
-                                       uint8_t byte,
-                                       uint8_t data,
-                                       nfc_transceive_callback callback,
-                                       void *user_data);
-
-/**
-@}
- */
-
-
-#ifdef __cplusplus
-}
-#endif
-
-
-#endif //__NET_NFC_CLIENT_TAG_JEWEL_H__
diff --git a/test/include/net_nfc_client_test.h b/test/include/net_nfc_client_test.h
deleted file mode 100755 (executable)
index 418f8bd..0000000
+++ /dev/null
@@ -1,97 +0,0 @@
-/*
- * Copyright (c) 2012, 2013 Samsung Electronics Co., Ltd.
- *
- * Licensed under the Flora License, Version 1.1 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://floralicense.org/license/
- *
- * 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.
- */
-
-#ifndef __NET_NFC_CLIENT_TEST_H__
-#define __NET_NFC_CLIENT_TEST_H__
-
-#include "net_nfc_typedef.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-typedef void (*net_nfc_client_test_sim_test_completed)(net_nfc_error_e result,
-                                                       void *user_data);
-
-typedef void (*net_nfc_client_test_prbs_test_completed)(
-                                                       net_nfc_error_e result,
-                                                       void *user_data);
-
-typedef void (*net_nfc_client_test_get_firmware_version_completed)(
-                                                       net_nfc_error_e result,
-                                                       char *version,
-                                                       void *user_data);
-typedef void (*net_nfc_client_test_set_ee_data_completed)(
-                                                       net_nfc_error_e result,
-                                                       void *user_data);
-
-typedef void (*net_nfc_client_test_ese_test_completed)(net_nfc_error_e result,
-                                                       void *user_data);
-
-
-net_nfc_error_e net_nfc_client_test_sim_test(
-                       net_nfc_client_test_sim_test_completed callback,
-                       void *user_data);
-
-net_nfc_error_e net_nfc_client_test_sim_test_sync(void);
-
-net_nfc_error_e net_nfc_client_test_prbs_test(uint32_t tech,
-                       uint32_t rate,
-                       net_nfc_client_test_prbs_test_completed callback,
-                       void *user_data);
-
-net_nfc_error_e net_nfc_client_test_prbs_test_sync(uint32_t tech,
-                                               uint32_t rate);
-
-net_nfc_error_e net_nfc_client_test_get_firmware_version(
-               net_nfc_client_test_get_firmware_version_completed callback,
-               void *user_data);
-
-net_nfc_error_e net_nfc_client_test_get_firmware_version_sync(char **version);
-
-net_nfc_error_e net_nfc_client_test_set_ee_data(int mode,
-                       int reg_id,
-                       data_h data,
-                       net_nfc_client_test_set_ee_data_completed callback,
-                       void *user_data);
-
-net_nfc_error_e net_nfc_client_test_set_ee_data_sync(int mode,
-                                               int reg_id,
-                                               data_h data);
-
-net_nfc_error_e net_nfc_client_test_ese_test(
-                       net_nfc_client_test_sim_test_completed callback,
-                       void *user_data);
-
-net_nfc_error_e net_nfc_client_test_ese_test_sync(void);
-
-
-
-net_nfc_error_e net_nfc_client_test_set_se_tech_type_sync(net_nfc_se_type_e type, int tech);
-
-/* TODO : move to internal header */
-net_nfc_error_e net_nfc_client_test_init(void);
-
-void net_nfc_client_test_deinit(void);
-
-net_nfc_error_e net_nfc_client_test_set_listen_tech_mask_sync(uint32_t tech);
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif //__NET_NFC_CLIENT_TEST_H__
diff --git a/test/include/net_nfc_client_transceive.h b/test/include/net_nfc_client_transceive.h
deleted file mode 100755 (executable)
index 95bfb75..0000000
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- * Copyright (c) 2012, 2013 Samsung Electronics Co., Ltd.
- *
- * Licensed under the Flora License, Version 1.1 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://floralicense.org/license/
- *
- * 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.
- */
-
-#ifndef __NET_NFC_CLIENT_TRANSCEIVE_H__
-#define __NET_NFC_CLIENT_TRANSCEIVE_H__
-
-#include "net_nfc_typedef.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-typedef void (*nfc_transceive_callback)(net_nfc_error_e result,
-                                       void *user_data);
-
-typedef void (*nfc_transceive_data_callback)(net_nfc_error_e result,
-                                       data_h data,
-                                       void *user_data);
-
-net_nfc_error_e net_nfc_client_transceive(net_nfc_target_handle_h handle,
-                                       data_h rawdata,
-                                       nfc_transceive_callback callback,
-                                       void *user_data);
-
-net_nfc_error_e net_nfc_client_transceive_data(net_nfc_target_handle_h handle,
-                                       data_h rawdata,
-                                       nfc_transceive_data_callback callback,
-                                       void *user_data);
-
-net_nfc_error_e net_nfc_client_transceive_sync(net_nfc_target_handle_h handle,
-                                       data_h rawdata);
-
-net_nfc_error_e net_nfc_client_transceive_data_sync(
-                                               net_nfc_target_handle_h handle,
-                                               data_h rawdata,
-                                               data_h *response);
-
-/* TODO : move to internal header */
-net_nfc_error_e net_nfc_client_transceive_init(void);
-
-void net_nfc_client_transceive_deinit(void);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif //__NET_NFC_CLIENT_TRANSCEIVE_H__
diff --git a/test/include/net_nfc_client_util_internal.h b/test/include/net_nfc_client_util_internal.h
deleted file mode 100755 (executable)
index 54bc92f..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * Copyright (c) 2012, 2013 Samsung Electronics Co., Ltd.
- *
- * Licensed under the Flora License, Version 1.1 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://floralicense.org/license/
- *
- * 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.
- */
-
-#ifndef __NET_NFC_CLIENT_UTIL_INTERNAL_H__
-#define __NET_NFC_CLIENT_UTIL_INTERNAL_H__
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-typedef struct _NetNfcCallback
-{
-       void *callback;
-       void *user_data;
-}
-NetNfcCallback;
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif //__NET_NFC_CLIENT_UTIL_INTERNAL_H__
diff --git a/test/include/net_nfc_data.h b/test/include/net_nfc_data.h
deleted file mode 100755 (executable)
index 07c2a73..0000000
+++ /dev/null
@@ -1,139 +0,0 @@
-/*
- * Copyright (c) 2012, 2013 Samsung Electronics Co., Ltd.
- *
- * Licensed under the Flora License, Version 1.1 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://floralicense.org/license/
- *
- * 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.
- */
-
-#ifndef __NET_NFC_DATA_H__
-#define __NET_NFC_DATA_H__
-
-#include <net_nfc_typedef.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-/**
-
-@addtogroup NET_NFC_MANAGER_INFO
-@{
-       This document is for the APIs reference document
-
-        NFC Manager defines are defined in <nfc-manager-def.h>
-
-        @li @c #net_nfc_initialize                  Initialize the nfc device.
-
-*/
-
-/**
-       create data handler only.
-
-       @param[out]     data    data handler
-
-       @return         return  the result of this operation
-
-       @exception NET_NFC_NULL_PARAMETER               parameter(s) has(have) illegal NULL pointer(s)
-       @exception NET_NFC_ALLOC_FAIL                   memory allocation is failed
-*/
-
-net_nfc_error_e net_nfc_create_data_only(data_h *data);
-
-/**
-       create data handler with initial values, bytes will be copied into the data handler.
-
-       @param[out]     data    data handler
-       @param[in]      bytes   binary data
-       @param[in]      length  size of binary data;
-
-       @return         return the result of this operation
-
-       @exception NET_NFC_NULL_PARAMETER               parameter(s) has(have) illegal NULL pointer(s)
-       @exception NET_NFC_ALLOC_FAIL                   memory allocation is failed
-*/
-net_nfc_error_e net_nfc_create_data(data_h *data, const uint8_t *bytes, size_t length);
-
-/**
-       get the byes and length from data handler. data handler assume bytes may have '0x0' value.
-       that's why this function also provides the length.
-
-       @param[in]      data    data handler
-       @param[out]     bytes   binary pointer (it returns the direct pointer of handler's data) do not free this
-       @param[out]     length  length of the binary data;
-
-       @return         return the result of this operation
-
-       @exception NET_NFC_NULL_PARAMETER               parameter(s) has(have) illegal NULL pointer(s)
-*/
-net_nfc_error_e net_nfc_get_data(const data_h data, uint8_t **bytes, size_t *length);
-
-/**
-       replace the data handler with given bytes. binary data (bytes) will be copied to data hander.
-       application should free or use local variable for given byte pointer.
-
-       @param[in]      data    data handler
-       @param[in]      bytes   binary data
-       @param[in]      length  size of binary data
-
-       @return         return the result of this operation
-
-       @exception NET_NFC_NULL_PARAMETER               parameter(s) has(have) illegal NULL pointer(s)
-*/
-
-net_nfc_error_e net_nfc_set_data(data_h data, const uint8_t *bytes, size_t length);
-
-/**
-       get length of data handler's bytes.
-
-       @param[in]      data    data handler
-
-       @return         return the length of bytes
-
-       @exception      0 is returned if data is NULL
-*/
-
-size_t net_nfc_get_data_length(const data_h data);
-
-/**
-       get pointer of the handler's bytes (do not free this. it should be freed when the application call "net_nfc_free_data" function)
-
-       @param[in]      data    data handler
-
-       @return         return the pointer of bytes.
-
-       @exception      NULL is returned if data is NULL
-*/
-
-uint8_t *net_nfc_get_data_buffer(const data_h data);
-
-/**
-       free data handler. (it also free the copied bytes)
-
-       @param[in]      data    data handler
-
-       @return         return the result of this operation
-
-       @exception NET_NFC_NULL_PARAMETER               parameter(s) has(have) illegal NULL pointer(s)
-*/
-
-net_nfc_error_e net_nfc_free_data(data_h data);
-
-
-/**
-@}
-*/
-#ifdef __cplusplus
-}
-#endif
-
-#endif //__NET_NFC_DATA_H__
diff --git a/test/include/net_nfc_ndef_message.h b/test/include/net_nfc_ndef_message.h
deleted file mode 100755 (executable)
index a6b608a..0000000
+++ /dev/null
@@ -1,444 +0,0 @@
-/*
- * Copyright (c) 2012, 2013 Samsung Electronics Co., Ltd.
- *
- * Licensed under the Flora License, Version 1.1 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://floralicense.org/license/
- *
- * 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.
- */
-
-#ifndef __NET_NFC_NDEF_MESSAGE_H__
-#define __NET_NFC_NDEF_MESSAGE_H__
-
-#include "net_nfc_typedef.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-/**
-
-@addtogroup NET_NFC_MANAGER_NDEF
-@{
-       This document is for the APIs reference document
-
-        NFC Manager defines are defined in <nfc-manager-def.h>
-
-        @li @c #net_nfc_initialize                  Initialize the nfc device.
-
-*/
-
-/**
-       create ndef message handler. this function allocate the ndef message handler and initialize.
-
-       \par Sync (or) Async: sync
-       This is a Synchronous API
-
-       @param[out]     ndef_message            instance of the ndef_message is retuened
-
-       @return         return the result of the calling the function
-
-       @exception NET_NFC_NULL_PARAMETER               parameter(s) has(have) illigal NULL pointer(s)
-       @exception NET_NFC_ALLOC_FAIL                   memory allocation is failed
-
-       @code
-
-       net_nfc_error_e result = NET_NFC_OK;
-       ndef_message_h msg = NULL;
-       ndef_record_h record = NULL;
-
-       result = net_nfc_create_ndef_message (&msg);
-       if (result != NET_NFC_OK) return result;
-
-       result = net_nfc_create_uri_type_record (&record , "http://www.samsung.com" ,NET_NFC_SCHEMA_FULL_URI);
-       if (result != NET_NFC_OK) return result;
-
-       result = net_nfc_append_record_to_ndef_message (msg ,record);
-       if (result != NET_NFC_OK) return result;
-
-       net_nfc_write_ndef(id, msg, &user_context);
-
-       net_nfc_free_ndef_message (msg);
-
-       @endcode
-*/
-
-
-net_nfc_error_e net_nfc_create_ndef_message(ndef_message_h *ndef_message);
-
-/**
-       this APIs is the getter of  record counts
-
-       \par Sync (or) Async: sync
-       This is a Synchronous API
-
-       @param[in]      ndef_message    output structure to get the record
-       @param[out]     count                   number of record count
-
-
-       @return         return the result of the calling the function
-
-       @exception NET_NFC_NULL_PARAMETER               parameter(s) has(have) illigal NULL pointer(s)
-
-       @code
-
-       static void net_nfc_cb(net_nfc_message_e message, net_nfc_error_e result, void* data , void* userContext)
-       {
-               switch (message)
-               {
-                       case NET_NFC_MESSAGE_READ_NDEF:
-                               {
-                                       if(data != NULL)
-                                       {
-                                               int count = 0;
-                                               ndef_message_h ndef = (ndef_message_h)(data);
-                                               net_nfc_get_ndef_message_record_count (ndef, &count);
-                                               printf ("record count = %d\n", count);
-                                       }
-                               }
-                       break;
-               }
-       }
-       @endcode
-*/
-net_nfc_error_e net_nfc_get_ndef_message_record_count(ndef_message_h ndef_message, int *count);
-
-/**
-       This function converts the NDEF Message structure to serial bytes of ndef message.
-
-       it gets copy of the rawdata bytes from ndef_message. ndef_message has no effect after free rawdata
-       Application should free rawdata.
-
-       \par Sync (or) Async: sync
-       This is a Synchronous API
-
-       @param[in]      ndef_message    output structure to get the record
-       @param[out]     rawdata                 this is the raw data that will be formed into the
-
-       @return         return the result of the calling the function
-
-       @exception NET_NFC_NULL_PARAMETER               parameter(s) has(have) illigal NULL pointer(s)
-       @exception NET_NFC_ALLOC_FAIL                   memory allocation is failed
-       @exception NET_NFC_NDEF_BUF_END_WITHOUT_ME      Wrong formatted NDEF message
-
-       @code
-
-       net_nfc_error_e result = NET_NFC_OK;
-       data_h rawdata;
-       ndef_message_h msg = NULL;
-       ndef_record_h record = NULL;
-       int idx;
-       uint8_t * buffer = NULL;
-
-       result = net_nfc_create_ndef_message (&msg);
-       if (result != NET_NFC_OK) return result;
-
-       result = net_nfc_create_uri_type_record (&record , "http://www.samsung.com" ,NET_NFC_SCHEMA_FULL_URI);
-       if (result != NET_NFC_OK) return result;
-
-       result = net_nfc_append_record_to_ndef_message (msg ,record);
-       if (result != NET_NFC_OK) return result;
-
-       net_nfc_create_rawdata_from_ndef_message (msg, &rawdata);
-
-       buffer = net_nfc_get_data_buffer (rawdata) ;
-
-       for (idx = 0; idx < net_nfc_get_data_length (rawdata) ; idx++)
-       {
-               printf (" %02X", buffer[idx]);
-               if (idx % 16 == 0) printf ("\n");
-       }
-
-       net_nfc_free_ndef_message (msg);
-
-       @endcode
-
-
-*/
-
-net_nfc_error_e net_nfc_create_rawdata_from_ndef_message(ndef_message_h ndef_message, data_h *rawdata);
-
-/**
-       This function return the structure of ndef_message from serial format of ndef message.
-       You may say create ndef handler from raw serial bytes
-       it cunsumes the bytes array until get the (ME==1). it retunrs error if the bytes array does not have ME flag.
-       if the array has two NDEF Message serially (not recursive case - like smart poster). the first NDEF message
-       will be converted to ndef_message handler, and other messages will be ignored.
-
-       \par Sync (or) Async: sync
-       This is a Synchronous API
-
-       @param[out]     ndef_message            ndef message handler that will be returned
-       @param[in]      rawdata                         ndef message that formed in bytes array
-
-       @return         return the result of the calling the function
-
-       @exception NET_NFC_NULL_PARAMETER               parameter(s) has(have) illigal NULL pointer(s)
-       @exception NET_NFC_ALLOC_FAIL                   memory allocation is failed
-       @exception NET_NFC_NDEF_BUF_END_WITHOUT_ME      Wrong formatted NDEF message
-
-       @code
-
-       static void net_nfc_cb(net_nfc_message_e message, net_nfc_error_e result, void* data , void* userContext)
-       {
-               switch (message)
-               {
-                       case NET_NFC_MESSAGE_READ_NDEF:
-                               {
-                                       if(data != NULL)
-                                       {
-                                               record_h record;
-                                               ndef_message_h url;
-                                               data_h ndef_type;
-                                               data_h payload;
-
-                                               ndef_message_h ndef = (ndef_message_h)(data);
-                                               net_nfc_get_record_by_index (ndef, 0, &record);
-                                               net_nfc_get_record_type (record, &ndef_type);
-                                               if (strncmp (ndef_type.buffer, "Sp", ndef_type.length)){
-                                                       net_nfc_get_record_payload (record, &payload);
-                                                       net_nfc_create_ndef_message_from_rawdata (&url, payload);
-                                                       printf_ndef_massage (url);
-                                               }
-                                       }
-                               }
-                       break;
-               }
-       }
-       @endcode
-
-*/
-
-
-net_nfc_error_e net_nfc_create_ndef_message_from_rawdata(ndef_message_h *ndef_message, data_h rawdata);
-
-/**
-       it returns the total size of ndef message bytes. parse the structure data and count the bytes
-       to know the length of bytes required to store the NDEF message.
-
-       it calculates the length every time application calls this function. it does not cache inside.
-       TODO: do we need to cache the value inside of ndef_message_h
-
-       \par Sync (or) Async: sync
-       This is a Synchronous API
-
-       @param[in]      ndef_message            this is the raw data that will be formed into the
-       @param[out]     length                  number of bytes required to create ndef message serial format
-
-       @return         return the result of the calling the function
-
-       @exception NET_NFC_NULL_PARAMETER               parameter(s) has(have) illigal NULL pointer(s)
-
-*/
-
-net_nfc_error_e net_nfc_get_ndef_message_byte_length(ndef_message_h ndef_message, uint32_t *length);
-/**
-       Append a record to ndef message structure.
-       This API help to create NDEF message and it control Record flags to follow the NDEF forum specification
-
-       \par Sync (or) Async: sync
-       This is a Synchronous API
-
-       @param[in]      ndef_message            NDEF message structure
-       @param[in]      record                  a record will be added into the ndef message
-
-       @return         return the result of the calling the function
-
-       @exception NET_NFC_NULL_PARAMETER               parameter(s) has(have) illigal NULL pointer(s)
-
-       @code
-
-       net_nfc_error_e result = NET_NFC_OK;
-       data_h rawdata;
-       ndef_message_h msg = NULL;
-       ndef_record_h record = NULL;
-       int idx;
-       uint8_t * buffer = NULL;
-
-       result = net_nfc_create_ndef_message (&msg);
-       if (result != NET_NFC_OK) return result;
-
-       result = net_nfc_create_uri_type_record (&record , "http://www.samsung.com" ,NET_NFC_SCHEMA_FULL_URI);
-       if (result != NET_NFC_OK) return result;
-
-       result = net_nfc_append_record_to_ndef_message (msg ,record);
-       if (result != NET_NFC_OK) return result;
-
-       net_nfc_create_rawdata_from_ndef_message (msg, &rawdata);
-
-       buffer = net_nfc_get_data_buffer (rawdata) ;
-
-       for (idx = 0; idx < net_nfc_get_data_length (rawdata) ; idx++)
-       {
-               printf (" %02X", buffer[idx]);
-               if (idx % 16 == 0) printf ("\n");
-       }
-
-       net_nfc_free_ndef_message (msg);
-
-       @endcode
-
-
-*/
-net_nfc_error_e net_nfc_append_record_to_ndef_message(ndef_message_h ndef_message, ndef_record_h record);
-
-/**
-       remove the record that indicated by index number.
-       and this deleted record will be freed.
-
-       \par Sync (or) Async: sync
-       This is a Synchronous API
-
-       @param[in]      ndef_message    the message wil be freed
-       @param[in]      index                   index of record
-
-       @return         return the result of the calling the function
-
-       @exception NET_NFC_NULL_PARAMETER               parameter(s) has(have) illigal NULL pointer(s)
-       @exception NET_NFC_OUT_OF_BOUND                 index is out of bound
-       @exception NET_NFC_INVALID_FORMAT               Wrong formatted ndef message
-
-*/
-
-net_nfc_error_e net_nfc_remove_record_by_index(ndef_message_h ndef_message, int index);
-
-/**
-       get record by index. this function just return the pointer of record.
-       if you change the record value it directly affected to NDEF message
-
-       \par Sync (or) Async: sync
-       This is a Synchronous API
-
-       @param[in]      ndef_message            the message wil be freed
-       @param[in]      index                   index of record
-       @param[in]      record                  record pointer
-
-       @return         return the result of the calling the function
-
-       @exception NET_NFC_NULL_PARAMETER               parameter(s) has(have) illigal NULL pointer(s)
-       @exception NET_NFC_OUT_OF_BOUND                 index is out of bound
-
-*/
-net_nfc_error_e net_nfc_get_record_by_index(ndef_message_h ndef_message, int index, ndef_record_h *record);
-
-/**
-       Add a record by index. This API help to add record by index. MB or ME bits will automatically assained.
-
-       \par Sync (or) Async: sync
-       This is a Synchronous API
-
-       @param[in]      ndef_message            the message wil be freed
-       @param[in]      index                   index of record
-       @param[in]      record                  record pointer
-
-       @return         return the result of the calling the function
-
-       @exception NET_NFC_NULL_PARAMETER               parameter(s) has(have) illigal NULL pointer(s)
-       @exception NET_NFC_OUT_OF_BOUND                 index is out of bound
-       @exception NET_NFC_INVALID_FORMAT               Wrong formatted ndef message
-*/
-
-net_nfc_error_e net_nfc_append_record_by_index(ndef_message_h ndef_message, int index, ndef_record_h record);
-
-
-/**
-       search the specific type in the NDEF message. this function return the first record that holds the type.
-       if the type has "urn:nfc:wkt:" or "urn:nfc:ext:", these prefix will be removed automatically.
-
-       @param[in]              ndef_message            NDEF message handler
-       @param[in]              tnf                             TNF value
-       @param[in]              type                            Record type , include type length
-       @param[out]             record                  record handle
-
-       @return         return the result of the calling the function
-
-       @exception NET_NFC_NULL_PARAMETER               parameter(s) has(have) illigal NULL pointer(s)
-       @exception NET_NFC_NO_DATA_FOUND                        search is failed
-       @exception NET_NFC_INVALID_FORMAT               Wrong formatted ndef message
-
-       @code
-
-       static void net_nfc_cb(net_nfc_message_e message, net_nfc_error_e result, void* data , void* userContext)
-       {
-               switch (message)
-               {
-                       case NET_NFC_MESSAGE_READ_NDEF:
-                               {
-                                       if(data != NULL)
-                                       {
-                                               date_h type;
-                                               int count = 0;
-                                               ndef_message_h ndef = (ndef_message_h)(data);
-                                               ndef_record_h record;
-                                               net_nfc_create_data (&type, "Sp", 2);
-                                               net_nfc_search_record_by_type (ndef, NET_NFC_RECORD_WELL_KNOWN_TYPE, type, &record);
-                                       }
-                               }
-                       break;
-               }
-       }
-
-       @endcode
-
-*/
-net_nfc_error_e net_nfc_search_record_by_type(ndef_message_h ndef_message, net_nfc_record_tnf_e tnf, data_h type, ndef_record_h *record);
-
-
-/**
-       this function helps to free the ndef_message_s type structure.
-       it has multiple ndef_record_s with linked list form and each record has own pointer.
-       this function free these memory in one shot!
-       don't worry about the record handler. these handlers also freed.
-
-       \par Sync (or) Async: sync
-       This is a Synchronous API
-
-       @param[in]      ndef_message            the message wil be freed
-
-       @return         return the result of the calling the function
-
-       @exception NET_NFC_NULL_PARAMETER               parameter(s) has(have) illigal NULL pointer(s)
-
-*/
-
-net_nfc_error_e net_nfc_free_ndef_message(ndef_message_h ndef_message);
-
-
-/**
-       retreive ndef message which is read by nfc-manager .
-       after reading message, it will be removed from nfc-manager storage
-
-       \par Sync (or) Async: sync
-       This is a Synchronous API
-
-       @param[in]      ndef_message            the message wil be retrieved
-
-       @return         return the result of the calling the function
-
-       @exception NET_NFC_NULL_PARAMETER               parameter(s) has(have) illigal NULL pointer(s)
-       @exception NET_NFC_NO_NDEF_MESSAGE              No ndef message is found
-       @exception NET_NFC_INVALID_FORMAT               Wrong formatted ndef message
-       @exception NET_NFC_ALLOC_FAIL                   memory allocation is failed
-
-*/
-
-net_nfc_error_e net_nfc_retrieve_current_ndef_message(ndef_message_h *ndef_message);
-
-
-/**
-@} */
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif //__NET_NFC_NDEF_MESSAGE_H__
diff --git a/test/include/net_nfc_ndef_message_handover.h b/test/include/net_nfc_ndef_message_handover.h
deleted file mode 100755 (executable)
index 55d1705..0000000
+++ /dev/null
@@ -1,331 +0,0 @@
-/*
- * Copyright (c) 2012, 2013 Samsung Electronics Co., Ltd.
- *
- * Licensed under the Flora License, Version 1.1 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://floralicense.org/license/
- *
- * 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.
- */
-#ifndef __NET_NFC_NDEF_MESSAGE_HANDOVER_H__
-#define __NET_NFC_NDEF_MESSAGE_HANDOVER_H__
-
-#include "net_nfc_typedef.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/**
-       This function create carrier configure handler instance.
-
-       @param[out]     config                  instance handler
-       @param[in]      type                    Carrier types. It would be BT or WPS or etc.
-
-       @return         return the result of the calling the function
-
-       @exception NET_NFC_NULL_PARAMETER               parameter(s) has(have) illegal NULL pointer(s)
-       @exception NET_NFC_OUT_OF_BOUND                 type value is not enum value
-       @exception NET_NFC_ALLOC_FAIL                   allocation is failed
-*/
-net_nfc_error_e net_nfc_create_carrier_config(net_nfc_carrier_config_h *config, net_nfc_conn_handover_carrier_type_e type);
-
-/**
-       Add property key and value for configuration.
-       the data will be copied to config handle, you should free used data array.
-
-       @param[in]      config                  instance handler
-       @param[in]      attribute               attribute key for value.
-       @param[in]      size                    size of value
-       @param[in]      data                    value array (binary type)
-
-       @return         return the result of the calling the function
-
-       @exception NET_NFC_NULL_PARAMETER               parameter(s) has(have) illegal NULL pointer(s)
-       @exception NET_NFC_ALLOC_FAIL                   allocation is failed
-*/
-net_nfc_error_e net_nfc_add_carrier_config_property(net_nfc_carrier_config_h config, uint16_t attribute, uint16_t size, uint8_t *data);
-
-/**
-       Remove the key and value from configuration, you can also remove the group with CREDENTIAL key.
-       The the attribute is exist then it will be removed and also freed automatically.
-
-       @param[in]      config                  instance handler
-       @param[in]      attribute               attribute key for value.
-
-       @return         return the result of the calling the function
-
-       @exception NET_NFC_NULL_PARAMETER               parameter(s) has(have) illegal NULL pointer(s)
-       @exception NET_NFC_NO_DATA_FOUND                the given key is not found
-       @exception NET_NFC_ALREADY_REGISTERED           the given attribute is already registered
-*/
-net_nfc_error_e net_nfc_remove_carrier_config_property(net_nfc_carrier_config_h config, uint16_t attribute);
-
-/**
-       Get the property value by attribute.
-
-       @param[in]      config                  instance handler
-       @param[in]      attribute               attribute key for value.
-       @param[out]     size                    size of value
-       @param[out]     data                    value array (binary type)
-
-       @return         return the result of the calling the function
-
-       @exception NET_NFC_NULL_PARAMETER               parameter(s) has(have) illegal NULL pointer(s)
-       @exception NET_NFC_NO_DATA_FOUND                The given key is not found
-*/
-net_nfc_error_e net_nfc_get_carrier_config_property(net_nfc_carrier_config_h config, uint16_t attribute, uint16_t *size, uint8_t **data);
-
-/**
-       The group will be joined into the configure
-
-       @param[in]      config                  instance handler
-       @param[in]      group                   group handle
-
-       @return         return the result of the calling the function
-
-       @exception NET_NFC_NULL_PARAMETER               parameter(s) has(have) illegal NULL pointer(s)
-       @exception NET_NFC_ALREADY_REGISTERED           The given group is already registered
-*/
-net_nfc_error_e net_nfc_append_carrier_config_group(net_nfc_carrier_config_h config, net_nfc_property_group_h group);
-
-/**
-       Remove the group from configure handle
-
-       @param[in]      config                  instance handler
-       @param[in]      group                   group handle
-
-       @return         return the result of the calling the function
-
-       @exception NET_NFC_NULL_PARAMETER               parameter(s) has(have) illegal NULL pointer(s)
-       @exception NET_NFC_NO_DATA_FOUND                given handle pointer is not exist in the configure handle
-*/
-net_nfc_error_e net_nfc_remove_carrier_config_group(net_nfc_carrier_config_h config, net_nfc_property_group_h group);
-
-/**
-       Get the group from configure handle by index
-
-       @param[in]      config                  instance handler
-       @param[in]      attribute               group attribute
-       @param[out]     group                   group handle
-
-       @return         return the result of the calling the function
-
-       @exception NET_NFC_NULL_PARAMETER               parameter(s) has(have) illegal NULL pointer(s)
-       @exception NET_NFC_OUT_OF_BOUND                 the index number is not bound of the max count
-       @exception NET_NFC_NO_DATA_FOUND                this is should be happened if the configure handle is damaged
-*/
-net_nfc_error_e net_nfc_get_carrier_config_group(net_nfc_carrier_config_h config, uint16_t attribute, net_nfc_property_group_h *group);
-
-/**
-       free the configure handle
-
-       @param[in]      config                  instance handler
-
-       @return         return the result of the calling the function
-
-       @exception NET_NFC_NULL_PARAMETER               parameter(s) has(have) illegal NULL pointer(s)
-*/
-net_nfc_error_e net_nfc_free_carrier_config(net_nfc_carrier_config_h config);
-
-/**
-       create the group handle
-
-       @param[out]     group                   instance group handler
-       @param[in]      attribute               attribute of the property
-
-       @return         return the result of the calling the function
-
-       @exception NET_NFC_NULL_PARAMETER               parameter(s) has(have) illegal NULL pointer(s)
-       @exception NET_NFC_ALLOC_FAIL                   allocation is failed
-*/
-net_nfc_error_e net_nfc_create_carrier_config_group(net_nfc_property_group_h *group, uint16_t attribute);
-
-/**
-       add property into the group
-
-       @param[in]      group                   instance group handler
-       @param[in]      attribute               attribute of the property
-       @param[in]      size                    size of data (value)
-       @param[in]      data                    data of the property
-
-       @return         return the result of the calling the function
-
-       @exception NET_NFC_NULL_PARAMETER               parameter(s) has(have) illegal NULL pointer(s)
-       @exception NET_NFC_ALLOC_FAIL                   allocation is failed
-       @exception NET_NFC_ALREADY_REGISTERED           the given key is already registered
-*/
-net_nfc_error_e net_nfc_add_carrier_config_group_property(net_nfc_property_group_h group, uint16_t attribute, uint16_t size, uint8_t *data);
-
-/**
-       get property from group handle
-
-       @param[in]      group           instance group handler
-       @param[in]      attribute       attribute of the property
-       @param[out]     size            size of data (value)
-       @param[out]     data            data of the property
-
-       @return         return the result of the calling the function
-
-       @exception NET_NFC_NULL_PARAMETER               parameter(s) has(have) illegal NULL pointer(s)
-       @exception NET_NFC_NO_DATA_FOUND                the attribute does not exist in the group
-*/
-net_nfc_error_e net_nfc_get_carrier_config_group_property(net_nfc_property_group_h group, uint16_t attribute, uint16_t *size, uint8_t **data);
-
-/**
-       remove the property from the group
-
-       @param[in]      group           instance group handler
-       @param[in]      attribute       attribute of the property
-
-       @return         return the result of the calling the function
-
-       @exception NET_NFC_NULL_PARAMETER               parameter(s) has(have) illegal NULL pointer(s)
-       @exception NET_NFC_NO_DATA_FOUND                the attribute does not exist in the group
-*/
-net_nfc_error_e net_nfc_remove_carrier_config_group_property(net_nfc_property_group_h group, uint16_t attribute);
-
-
-/**
-       free the group
-
-       @param[in]      group           instance group handler
-
-       @return         return the result of the calling the function
-
-       @exception NET_NFC_NULL_PARAMETER               parameter(s) has(have) illegal NULL pointer(s)
-*/
-net_nfc_error_e net_nfc_free_carrier_group(net_nfc_property_group_h group);
-
-/**
-       Create record handler with config.
-
-       @param[out]     record          record handler
-       @param[in]      config          the carrier configure handle
-
-       @return         return the result of the calling the function
-
-       @exception NET_NFC_NULL_PARAMETER               parameter(s) has(have) illegal NULL pointer(s)
-       @exception NET_NFC_ALLOC_FAIL                   allocation is failed
-*/
-net_nfc_error_e net_nfc_create_ndef_record_with_carrier_config(ndef_record_h *record, net_nfc_carrier_config_h config);
-
-
-/**
-       create configure from the ndef record. the record must contained the configuration.
-       config should be freed after using
-
-       @param[out]     config          the configure handle
-       @param[in]      record          record handler
-
-       @return         return the result of the calling the function
-
-       @exception NET_NFC_NULL_PARAMETER               parameter(s) has(have) illegal NULL pointer(s)
-       @exception NET_NFC_ALLOC_FAIL                   allocation is failed
-       @exception NET_NFC_INVALID_FORMAT               if the record does not contained the valid format.
-*/
-net_nfc_error_e net_nfc_create_carrier_config_from_config_record(net_nfc_carrier_config_h *config, ndef_record_h record);
-
-net_nfc_error_e net_nfc_create_carrier_config_from_carrier(
-       net_nfc_carrier_config_h *config, net_nfc_ch_carrier_h carrier);
-
-net_nfc_error_e net_nfc_create_handover_carrier(net_nfc_ch_carrier_h *carrier,
-       net_nfc_conn_handover_carrier_state_e cps);
-
-net_nfc_error_e net_nfc_duplicate_handover_carrier(net_nfc_ch_carrier_h *dest,
-       net_nfc_ch_carrier_h src);
-
-net_nfc_error_e net_nfc_free_handover_carrier(net_nfc_ch_carrier_h carrier);
-
-net_nfc_error_e net_nfc_set_handover_carrier_cps(
-       net_nfc_ch_carrier_h carrier,
-       net_nfc_conn_handover_carrier_state_e cps);
-
-net_nfc_error_e net_nfc_get_handover_carrier_cps(
-       net_nfc_ch_carrier_h carrier,
-       net_nfc_conn_handover_carrier_state_e *cps);
-
-net_nfc_error_e net_nfc_set_handover_carrier_type(
-       net_nfc_ch_carrier_h carrier,
-       net_nfc_conn_handover_carrier_type_e type);
-
-net_nfc_error_e net_nfc_get_handover_carrier_type(
-       net_nfc_ch_carrier_h carrier,
-       net_nfc_conn_handover_carrier_type_e *type);
-
-net_nfc_error_e net_nfc_append_handover_carrier_record(
-       net_nfc_ch_carrier_h carrier, ndef_record_h record);
-
-net_nfc_error_e net_nfc_get_handover_carrier_record(
-       net_nfc_ch_carrier_h carrier, ndef_record_h *record);
-
-net_nfc_error_e net_nfc_remove_handover_carrier_record(
-       net_nfc_ch_carrier_h carrier);
-
-net_nfc_error_e net_nfc_append_handover_auxiliary_record(
-       net_nfc_ch_carrier_h carrier, ndef_record_h record);
-
-net_nfc_error_e net_nfc_get_handover_auxiliary_record_count(
-       net_nfc_ch_carrier_h carrier, uint32_t *count);
-
-net_nfc_error_e net_nfc_get_handover_auxiliary_record(
-       net_nfc_ch_carrier_h carrier, int index, ndef_record_h *record);
-
-net_nfc_error_e net_nfc_remove_handover_auxiliary_record(
-       net_nfc_ch_carrier_h carrier, ndef_record_h record);
-
-
-net_nfc_error_e net_nfc_create_handover_message(net_nfc_ch_message_h *message);
-
-net_nfc_error_e net_nfc_free_handover_message(net_nfc_ch_message_h message);
-
-net_nfc_error_e net_nfc_get_handover_random_number(net_nfc_ch_message_h message,
-       uint16_t *random_number);
-
-net_nfc_error_e net_nfc_append_handover_carrier(net_nfc_ch_message_h message,
-       net_nfc_ch_carrier_h carrier);
-
-net_nfc_error_e net_nfc_get_handover_carrier_count(net_nfc_ch_message_h message,
-       uint32_t *count);
-
-net_nfc_error_e net_nfc_get_handover_carrier(net_nfc_ch_message_h message,
-       int index, net_nfc_ch_carrier_h *carrier);
-
-net_nfc_error_e net_nfc_get_handover_carrier_by_type(
-       net_nfc_ch_message_h message,
-       net_nfc_conn_handover_carrier_type_e type,
-       net_nfc_ch_carrier_h *carrier);
-
-net_nfc_error_e net_nfc_export_handover_to_ndef_message(
-       net_nfc_ch_message_h message, ndef_message_h *result);
-
-net_nfc_error_e net_nfc_import_handover_from_ndef_message(
-       ndef_message_h msg, net_nfc_ch_message_h *result);
-
-/**
-       create the connection handover error record message
-
-       @param[out]     record                  connection handover carrier info handler
-       @param[in]      reason                  error codes (reason)
-       @param[in]      data                    extra data for each error codes
-
-       @return         return the result of the calling the function
-
-       @exception NET_NFC_NULL_PARAMETER               parameter(s) has(have) illegal NULL pointer(s)
-       @exception NET_NFC_ALLOC_FAIL                   allocation is failed
-*/
-net_nfc_error_e net_nfc_create_handover_error_record(ndef_record_h * record, uint8_t reason, uint32_t data);
-
-
-#ifdef __cplusplus
-}
-#endif
-
-
-#endif //__NET_NFC_NDEF_MESSAGE_HANDOVER_H__
diff --git a/test/include/net_nfc_ndef_record.h b/test/include/net_nfc_ndef_record.h
deleted file mode 100755 (executable)
index 36957c3..0000000
+++ /dev/null
@@ -1,369 +0,0 @@
-/*
- * Copyright (c) 2012, 2013 Samsung Electronics Co., Ltd.
- *
- * Licensed under the Flora License, Version 1.1 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://floralicense.org/license/
- *
- * 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.
- */
-
-#ifndef __NET_NFC_NDEF_RECORD_H__
-#define __NET_NFC_NDEF_RECORD_H__
-
-#include "net_nfc_typedef.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-/**
-
-@addtogroup NET_NFC_MANAGER_RECORD
-@{
-       This document is for the APIs reference document
-
-        NFC Manager defines are defined in <nfc-typedef.h>
-
-*/
-
-
-/**
-       This define gives you Message Begin from the flag byte
-
-       @param[in]      flag            flag that comes from "net_nfc_get_record_flags" function
-       @return                 the mb flag
-
-       @exception NONE
-*/
-uint8_t net_nfc_get_record_mb(uint8_t flag);
-/**
-       This define gives you Message end from the flag byte
-
-       @param[in]      flag            flag that comes from "net_nfc_get_record_flags" function
-       @return                 the me flag
-
-       @exception NONE
-*/
-uint8_t net_nfc_get_record_me(uint8_t flag);
-/**
-       This define gives you Chun Flag  that indicate that either the first record chunk or a middle record chunk of a chunked payload
-
-       @param[in]      flag            flag that comes from "net_nfc_get_record_flags" function
-       @return                 the chunk flag
-
-       @exception NONE
-*/
-uint8_t net_nfc_get_record_cf(uint8_t flag);
-/**
-       This define gives you ID length present flag
-
-       @param[in]      flag            flag that comes from "net_nfc_get_record_flags" function
-       @return                 the  il (id length flag) flag
-
-       @exception NONE
-
-*/
-uint8_t net_nfc_get_record_il(uint8_t flag);
-/**
-       This define gives you short record flag. This flag indicates that the payload length filed is a single octet
-
-       @param[in]      flag            flag that comes from "net_nfc_get_record_flags" function
-       @return                 the short record flag
-
-       @exception NONE
-*/
-uint8_t net_nfc_get_record_sr(uint8_t flag);
-
-
-
-/**
-       creat a record with given parameter value. this function automatically set the NDEF record flags
-
-       @param[out]     record                  Record handler
-       @param[in]      tnf                             record type (TNF value) empty, well known, mime type, URI, external, or unchanged
-       @param[in]      typeName                specify type name ex) Sp, U, or Hr ...
-       @param[in]      id                              record id
-       @param[in]      payload                         payload of this record
-
-       @return         return the result of the calling the function
-
-       @exception NET_NFC_OUT_OF_BOUND                 tnf value is out of range
-       @exception NET_NFC_NULL_PARAMETER               parameter(s) has(have) illigal NULL pointer(s)
-       @exception NET_NFC_ALLOC_FAIL                   memory allocation is failed
-
-       @code
-               char uri[] = " yahoo.com";
-               ndef_record_s uriRecord;
-
-               data_h payload;
-
-               net_nfc_create_data (&payload, uri, strlen (uri));
-               uri[0] = 0x01;
-
-               if((result = net_nfc_create_record( &uriRecord, NET_NFC_RECORD_WELL_KNOWN_TYPE, "U" , NULL, payload, )) != NET_NFC_OK)
-               {
-                       printf("U record is failed [%d]\n", result);
-               }
-       @endcode
-*/
-net_nfc_error_e net_nfc_create_record(ndef_record_h *record, net_nfc_record_tnf_e tnf, data_h typeName, data_h id, data_h payload);
-
-
-/**
-       this function helps to create text type payload
-       please, refer the NDEF forum specification "Text Record Type Definition"
-       it creates byte array payload can be used in text type record
-
-       this function does not encode the text. The paramter "text" will be asuumed as that it is already encoded with encode type.
-       this function  just helps to create text records.
-
-       @param[out]     record                          Record handler
-       @param[in]      text                                    encoded text (this should be text not binary)
-       @param[in]      language_code_str               language_code_str ex) en-US
-       @param[in]      encode                          text concoding type such as "utf8"
-
-       @return         return the result of the calling the function
-
-       @exception NET_NFC_NULL_PARAMETER               parameter(s) has(have) illigal NULL pointer(s)
-       @exception NET_NFC_ALLOC_FAIL                   memory allocation is failed
-
-
-       @code
-               net_nfc_error_e result = NET_NFC_OK;
-               ndef_message_h msg = NULL;
-               ndef_record_h record = NULL;
-
-               char* message = "Hello, NFC World";
-
-               net_nfc_create_ndef_message (&msg);
-               net_nfc_create_text_type_record (&record , message, "en-US", NET_NFC_ENCODE_UTF_8);
-               net_nfc_append_record_to_ndef_message (msg ,record);
-
-       @endcode
-
-*/
-net_nfc_error_e net_nfc_create_text_type_record(ndef_record_h *record, const char *text, const char *language_code_str, net_nfc_encode_type_e encode);
-
-/**
-       this function helps to create URI type payload
-       please refer the NFC forum specification "URI Record type Definition"
-       it creates byte array payload.
-
-       @param[out]     record                          Record handler
-       @param[in]      uri                                     string uri that will be stored in the payload
-       @param[in]      protocol_schema         protocol schema that is specified in NFC Forum
-
-
-       @return         return the result of the calling the function
-
-       @exception NET_NFC_NULL_PARAMETER               parameter(s) has(have) illigal NULL pointer(s)
-       @exception NET_NFC_ALLOC_FAIL                   memory allocation is failed
-
-       @code
-               net_nfc_error_e result = NET_NFC_OK;
-               ndef_message_h msg = NULL;
-               ndef_record_h record = NULL;
-
-               net_nfc_create_ndef_message (&msg);
-               net_nfc_create_uri_type_record (&record ,"http://www.samsung.com" ,NET_NFC_SCHEMA_FULL_URI);
-               net_nfc_append_record_to_ndef_message (msg ,record);
-       @endcode
-*/
-
-net_nfc_error_e net_nfc_create_uri_type_record(ndef_record_h *record, const char *uri, net_nfc_schema_type_e protocol_schema);
-
-/**
-       this function is getter of record payload.
-       this function gives you  the pointer of pyaload that is contained by record.
-       Do not free the payload. it will be freed when the record is freed
-
-       @param[in]      record          Record handler
-       @param[out]     payload         data_h type payload pointer (it gives you the pointer of payload; not copied)
-
-       @return         return the result of the calling the function
-
-       @exception NET_NFC_NULL_PARAMETER               parameter(s) has(have) illigal NULL pointer(s)
-
-*/
-net_nfc_error_e net_nfc_get_record_payload(ndef_record_h record, data_h *payload);
-
-/**
-       this function is getter of record type.
-       this function gives you  the pointer of record type that is contained by record.
-       Do not free the type. it will be freed when the record is freed
-
-       @param[in]      record          Record handler
-       @param[out]     type                    dat_h type pointer (it gives you the pointer of type; not copied)
-
-       @return         return the result of the calling the function
-
-       @exception NET_NFC_NULL_PARAMETER               parameter(s) has(have) illigal NULL pointer(s)
-
-*/
-net_nfc_error_e net_nfc_get_record_type(ndef_record_h record, data_h *type);
-
-/**
-       this function is getter of record ID.
-       this function gives you  the pointer of ID that is contained by record.
-       it may return NULL pointer if the ID is not exist
-       Do not free the type. it will be freed when the record is freed.
-
-       @param[in]      record          Record handler
-       @param[out]     id                      dat_h type ID pointer (it gives you the pointer of payload not copied)
-
-       @return         return the result of the calling the function
-
-       @exception NET_NFC_NULL_PARAMETER               parameter(s) has(have) illigal NULL pointer(s)
-*/
-net_nfc_error_e net_nfc_get_record_id(ndef_record_h record, data_h *id);
-
-/**
-       this function is getter of record TNF value.
-
-       @param[in]      record          Record handler
-       @param[out]     tnf                     TNF value
-
-       @return         return the result of the calling the function
-
-       @exception NET_NFC_NULL_PARAMETER               parameter(s) has(have) illigal NULL pointer(s)
-
-
-*/
-net_nfc_error_e net_nfc_get_record_tnf(ndef_record_h record, net_nfc_record_tnf_e *tnf);
-
-/**
-       this function is getter of record flags.
-       you can get the each flag value by using defines "RECORD_GET_XX"
-
-       @param[in]      record          Record handler
-       @param[out]     flag                    flag value (it gives you the pointer of payload not copied)
-
-       @return         return the result of the calling the function
-
-       @exception NET_NFC_NULL_PARAMETER               parameter(s) has(have) illigal NULL pointer(s)
-
-       @code
-
-               ndef_record_h    record;
-               uint8_t flag;
-
-               net_nfc_get_record_by_index (msg, 0, &record);
-               if (record != NULL){
-                       net_nfc_get_record_flags (record, &flag);
-                       printf ("MB:%d, ME:%d, CF:%d, IL:%d, SR:%d\n",
-                               net_nfc_get_record_mb(flag),
-                               net_nfc_get_record_me(flag),
-                               net_nfc_get_record_cf(flag),
-                               net_nfc_get_record_il(flag),
-                               net_nfc_get_record_sr(flag));
-               }
-
-       @endcode
-
-*/
-net_nfc_error_e net_nfc_get_record_flags(ndef_record_h record, uint8_t *flag);
-
-
-/**
-       you can set record ID with this function
-
-       @param[in]      record          Record handler
-       @param[in]      id                      Record ID
-
-       @return         return the result of the calling the function
-
-       @exception NET_NFC_NULL_PARAMETER               parameter(s) has(have) illigal NULL pointer(s)
-
-*/
-net_nfc_error_e net_nfc_set_record_id(ndef_record_h record, data_h id);
-
-/**
-       this function free the record handler. do not use this function after appending the ndef message
-
-       @param[in]      record          Record handler
-
-       @return         return the result of the calling the function
-
-       @exception NET_NFC_NULL_PARAMETER               parameter(s) has(have) illigal NULL pointer(s)
-
-*/
-net_nfc_error_e net_nfc_free_record(ndef_record_h record);
-
-
-/**
-       this function get text from text record. it allocate buffer char and store the text string. you should free this string.
-
-       @param[in]      record          Record handler
-       @param[out]     buffer          text string
-
-       @return         return the result of the calling the function
-
-       @exception NET_NFC_ALLOC_FAIL                   memory allocation is failed
-       @exception NET_NFC_NDEF_RECORD_IS_NOT_EXPECTED_TYPE             record is not text record
-       @exception NET_NFC_NULL_PARAMETER               parameter(s) has(have) illigal NULL pointer(s)
-
-*/
-
-net_nfc_error_e net_nfc_create_text_string_from_text_record(ndef_record_h record, char **buffer);
-
-/**
-       this function get language code from text record. (ex: US-en)
-
-       @param[in]      record                  Record handler
-       @param[out]     lang_code_str   lang code string value followed by IANA
-
-       @return         return the result of the calling the function
-
-       @exception NET_NFC_NDEF_RECORD_IS_NOT_EXPECTED_TYPE             record is not text record
-       @exception NET_NFC_NULL_PARAMETER               parameter(s) has(have) illigal NULL pointer(s)
-
-*/
-
-net_nfc_error_e net_nfc_get_languange_code_string_from_text_record(ndef_record_h record, char **lang_code_str);
-
-
-/**
-       this function get encoding type from text record (ex: UTF-8)
-
-       @param[in]      record          Record handler
-       @param[out]     encoding        encoding type
-
-       @return         return the result of the calling the function
-
-       @exception NET_NFC_NDEF_RECORD_IS_NOT_EXPECTED_TYPE             record is not text record
-       @exception NET_NFC_NULL_PARAMETER               parameter(s) has(have) illigal NULL pointer(s)
-
-*/
-
-net_nfc_error_e net_nfc_get_encoding_type_from_text_record(ndef_record_h record, net_nfc_encode_type_e *encoding);
-
-
-/**
-       this function get URI from uri record. you should free the uri string.
-
-       @param[in]      record          Record handler
-       @param[out]     uri                     uri text string
-
-       @return         return the result of the calling the function
-
-       @exception NET_NFC_NDEF_RECORD_IS_NOT_EXPECTED_TYPE             record is not uri record
-       @exception NET_NFC_NULL_PARAMETER               parameter(s) has(have) illigal NULL pointer(s)
-
-*/
-
-net_nfc_error_e net_nfc_create_uri_string_from_uri_record(ndef_record_h record, char **uri);
-
-#ifdef __cplusplus
-}
-#endif
-
-
-#endif //__NET_NFC_NDEF_RECORD_H__
diff --git a/test/include/net_nfc_sign_record.h b/test/include/net_nfc_sign_record.h
deleted file mode 100755 (executable)
index b1ab6c2..0000000
+++ /dev/null
@@ -1,148 +0,0 @@
-/*
- * Copyright (c) 2012, 2013 Samsung Electronics Co., Ltd.
- *
- * Licensed under the Flora License, Version 1.1 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://floralicense.org/license/
- *
- * 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.
- */
-#ifndef __NET_NFC_SIGN_RECORD_H__
-#define __NET_NFC_SIGN_RECORD_H__
-
-#include "net_nfc_typedef.h"
-
-#ifdef __cplusplus
-extern "C"
-{
-#endif
-
-
-/**
-
-@addtogroup NET_NFC_MANAGER_RECORD
-@{
-       This document is for the APIs reference document
-
-        NFC Manager defines are defined in <nfc-typedef.h>
-
-*/
-
-/**
-       this function make the signature of some continuous records
-       please refer the NFC forum specification "Signature Record type Definition"
-
-       @param[in/out]  msg                                     NDEF message handler. After executing this function, a signature record will be added.
-       @param[in]              begin_index                     the index of beginning record that will be signed.
-       @param[in]              end_index                       the last index of record that will be signed.
-       @param[in]              cert_file                       PKCS #12 type certificate file (.p12). And the file should be encoded in DER type. (NOT PEM type)
-       @param[in]              passowrd                        the password of cert_file
-
-       @return         return the result of the calling the function
-
-       @exception NET_NFC_NULL_PARAMETER               parameter(s) has(have) illegal NULL pointer(s)
-       @exception NET_NFC_ALLOC_FAIL                   memory allocation is failed
-
-       @code
-               ndef_message_h msg = NULL;
-
-               // create a ndef message and add some records
-               // ...
-
-               net_nfc_sign_records(msg, 0, 1, "/tmp/cert.p12", "abcdef");
-       @endcode
-*/
-net_nfc_error_e net_nfc_sign_records(ndef_message_h msg, int begin_index, int end_index, char *cert_file, char *password);
-
-/**
-       this function make the signature of whole records in NDEF message
-
-       @param[in/out]  msg                                     NDEF message handler. After executing this function, a signature record will be added.
-       @param[in]              cert_file                       PKCS #12 type certificate file (.p12). And the file should be encoded in DER type. (NOT PEM type)
-       @param[in]              passowrd                        the password of cert_file
-
-       @return         return the result of the calling the function
-
-       @exception NET_NFC_NULL_PARAMETER               parameter(s) has(have) illegal NULL pointer(s)
-       @exception NET_NFC_ALLOC_FAIL                   memory allocation is failed
-
-       @code
-               ndef_message_h msg = NULL;
-
-               // create a ndef message and add some records
-               // ...
-
-               net_nfc_sign_ndef_message(msg, "/tmp/cert.p12", "abcdef");
-       @endcode
-*/
-net_nfc_error_e net_nfc_sign_ndef_message(ndef_message_h msg, char *cert_file, char *password);
-
-/**
-       This function does verify signature of records
-       record MUST be continuous.
-
-       @param[in]      begin_record                            the handle of beginning record that will be verified
-       @param[in]      sign_record                                     the handle of signature record
-
-       @return         return the result of the calling the function
-
-       @exception NET_NFC_NULL_PARAMETER               parameter(s) has(have) illegal NULL pointer(s)
-       @exception NET_NFC_ALLOC_FAIL                   memory allocation is failed
-
-       @code
-               net_nfc_error_e error = NET_NFC_OK;
-               ndef_message_h msg = NULL;
-               ndef_record_h begin_record = NULL;
-               ndef_record_h sign_record = NULL;
-
-               // import NDEF message including the signature record.
-               // ...
-
-               net_nfc_get_record_by_index(msg, 0, &begin_record);
-               net_nfc_get_record_by_index(msg, 2, &sign_record);
-
-               error = net_nfc_verify_signature_records(begin_record, sign_record);
-
-               return (error == NET_NFC_OK);
-       @endcode
-*/
-net_nfc_error_e net_nfc_verify_signature_records(ndef_record_h begin_record, ndef_record_h sign_record);
-
-/**
-       This function does verify signature in NDEF message
-       If message has 2 or more signature record, it should do verify every signatures and return result.
-       (Despite of failing only one signature record, this function will return error.)
-
-       @param[in]      msg                             NDEF message that will be verified.
-
-       @return         return the result of the calling the function
-
-       @exception NET_NFC_NULL_PARAMETER               parameter(s) has(have) illegal NULL pointer(s)
-       @exception NET_NFC_ALLOC_FAIL                   memory allocation is failed
-
-       @code
-               net_nfc_error_e error = NET_NFC_OK;
-               ndef_message_h msg = NULL;
-
-               // import NDEF message including the signature record.
-               // ...
-
-               error = net_nfc_verify_signature_ndef_message(msg);
-
-               return (error == NET_NFC_OK);
-       @endcode
-*/
-net_nfc_error_e net_nfc_verify_signature_ndef_message(ndef_message_h msg);
-
-#ifdef __cplusplus
-}
-#endif
-
-
-#endif //__NET_NFC_SIGN_RECORD_H__
diff --git a/test/include/net_nfc_tag_mifare.h b/test/include/net_nfc_tag_mifare.h
deleted file mode 100755 (executable)
index 6bca641..0000000
+++ /dev/null
@@ -1,423 +0,0 @@
-/*
- * Copyright (c) 2012, 2013 Samsung Electronics Co., Ltd.
- *
- * Licensed under the Flora License, Version 1.1 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://floralicense.org/license/
- *
- * 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.
- */
-#ifndef __NET_NFC_TAG_MIFARE_H__
-#define __NET_NFC_TAG_MIFARE_H__
-
-#include "net_nfc_typedef.h"
-
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/**
-
-@addtogroup NET_NFC_MANAGER_TAG
-@{
-       Authenticate a sector with key A. I/O operation. e.g. read / write /
-       increment / decrement will be available after successful authentication.
-       This API is only available for MIFARE classic
-
-       MIFARE CLASSIC MINI
-               => 0 ~ 4 : 5 sector and 4 block with 16 bytes
-
-       MIFARE CLASSIC 1K
-               => 0 ~ 15 : 16 sector and 4 block with 16 bytes
-
-       MIFARE CLASSIC 4K
-               => 0 ~ 31 : 32 sector and 4 block with 16 bytes
-               => 32 ~ 39 : 8 sector and 16 block with 16 bytes
-
-       \par Sync (or) Async: Sync
-       This is a Asynchronous API
-
-       @param[in]      handle          target handle of detected tag
-       @param[in]      sector          sector to authenticate with key A
-       @param[in]      auth_key        6 byte key to authenticate the sector
-
-       @return         return the result of the calling the function
-
-       @exception NET_NFC_NULL_PARAMETER       parameter has illigal NULL pointer
-       @exception NET_NFC_ALLOC_FAIL   memory allocation is failed
-       @exception NET_NFC_NOT_INITIALIZED      Try to operate without initialization
-       @exception NET_NFC_BUSY         Device is too busy to handle your request
-       @exception NET_NFC_OPERATION_FAIL       Operation is failed because of the
-                                               internal oal error
-       @exception NET_NFC_RF_TIMEOUT   Timeout raised while communicate with tag
-       @exception NET_NFC_NOT_SUPPORTED        you may recieve this error if you
-                                               request not supported command
-       @exception NET_NFC_INVALID_HANDLE       target handle is not valid
-       @exception NET_NFC_NO_DATA_FOUND        mendantory tag info (UID, etc) is not
-                                               founded
-
-*/
-
-net_nfc_error_e net_nfc_client_mifare_authenticate_with_keyA(
-                                               net_nfc_target_handle_h handle,
-                                               uint8_t sector,
-                                               data_h auth_key,
-                                               void *callback,
-                                               void *user_data);
-
-/**
-       Authenticate a sector with key B. I/O operation. e.g. read / write /
-       increment / decrement will be available after successful authentication.
-       This API is only available for MIFARE classic
-
-       MIFARE CLASSIC MINI
-               => 0 ~ 4 : 5 sector and 4 block with 16 bytes
-
-       MIFARE CLASSIC 1K
-               => 0 ~ 15 : 16 sector and 4 block with 16 bytes
-
-       MIFARE CLASSIC 4K
-               => 0 ~ 31 : 32 sector and 4 block with 16 bytes
-               => 32 ~ 39 : 8 sector and 16 block with 16 bytes
-
-       \par Sync (or) Async: Sync
-       This is a Asynchronous API
-
-       @param[in]      handle          target handle of detected tag
-       @param[in]      sector          sector to authenticate with key B
-       @param[in]      auth_key        6 byte key to authenticate the sector
-
-       @return         return the result of the calling the function
-
-       @exception NET_NFC_NULL_PARAMETER       parameter has illigal NULL pointer
-       @exception NET_NFC_ALLOC_FAIL   memory allocation is failed
-       @exception NET_NFC_NOT_INITIALIZED      Try to operate without initialization
-       @exception NET_NFC_BUSY         Device is too busy to handle your request
-       @exception NET_NFC_OPERATION_FAIL       Operation is failed because of the
-                                               internal oal error
-       @exception NET_NFC_RF_TIMEOUT   Timeout raised while communicate with tag
-       @exception NET_NFC_NOT_SUPPORTED        you may recieve this error if you
-                                               request not supported command
-       @exception NET_NFC_INVALID_HANDLE       target handle is not valid
-       @exception NET_NFC_NO_DATA_FOUND        mendantory tag info (UID, etc) is not
-                                               founded
-
-*/
-
-
-net_nfc_error_e net_nfc_client_mifare_authenticate_with_keyB(
-                                               net_nfc_target_handle_h handle,
-                                               uint8_t sector,
-                                               data_h auth_key,
-                                               void *callback,
-                                               void *user_data);
-
-/**
-       read block or read page. If detected card is MIFARE classic, then It will
-       read a block (16 byte). If detected card is Ultra light, then It will read
-       4 page (16 block)
-
-       \par Sync (or) Async: Sync
-       This is a Asynchronous API
-
-       @param[in]      handle          target handle of detected tag
-       @param[in]      addr            block or starting page number
-
-       @return         return the result of the calling the function
-
-       @exception NET_NFC_NULL_PARAMETER       parameter has illigal NULL pointer
-       @exception NET_NFC_ALLOC_FAIL   memory allocation is failed
-       @exception NET_NFC_NOT_INITIALIZED      Try to operate without initialization
-       @exception NET_NFC_BUSY         Device is too busy to handle your request
-       @exception NET_NFC_OPERATION_FAIL       Operation is failed because of the
-                                               internal oal error
-       @exception NET_NFC_RF_TIMEOUT   Timeout raised while communicate with tag
-       @exception NET_NFC_NOT_SUPPORTED        you may recieve this error if you
-                                               request not supported command
-       @exception NET_NFC_INVALID_HANDLE       target handle is not valid
-       @exception NET_NFC_TAG_READ_FAILED      received chunked data is not valied
-                                               (damaged data is recieved) or error ack
-                                               is recieved
-
-*/
-
-net_nfc_error_e net_nfc_client_mifare_read(net_nfc_target_handle_h handle,
-                                       uint8_t addr,
-                                       void *callback,
-                                       void *user_data);
-
-/**
-       write block (16 byte) to addr. Only 4 bytes will be written when tag is
-       ultra light
-
-       \par Sync (or) Async: Sync
-       This is a Asynchronous API
-
-       @param[in]      handle          target handle of detected tag
-       @param[in]      addr            block or starting page number
-       @param[in]      data            data to write
-
-       @return         return the result of the calling the function
-
-       @exception NET_NFC_NULL_PARAMETER       parameter has illigal NULL pointer
-       @exception NET_NFC_ALLOC_FAIL   memory allocation is failed
-       @exception NET_NFC_NOT_INITIALIZED      Try to operate without initialization
-       @exception NET_NFC_BUSY         Device is too busy to handle your request
-       @exception NET_NFC_OPERATION_FAIL       Operation is failed because of the
-                                               internal oal error
-       @exception NET_NFC_RF_TIMEOUT   Timeout raised while communicate with tag
-       @exception NET_NFC_NOT_SUPPORTED        you may recieve this error if you
-                                               request not supported command
-       @exception NET_NFC_INVALID_HANDLE       target handle is not valid
-       @exception NET_NFC_TAG_WRITE_FAILED     read only tag, or error ack is received
-                                               from tag
-
-*/
-
-
-net_nfc_error_e net_nfc_client_mifare_write_block(
-                                               net_nfc_target_handle_h handle,
-                                               uint8_t addr,
-                                               data_h data,
-                                               void *callback,
-                                               void *user_data);
-
-/**
-       write page (4 byte) to addr. Only 4 bytes will be written when tag is
-       MIFARE classic
-
-       \par Sync (or) Async: Sync
-       This is a Asynchronous API
-
-       @param[in]      handle          target handle of detected tag
-       @param[in]      addr            block or starting page number
-       @param[in]      data            data to write
-
-       @return         return the result of the calling the function
-
-       @exception NET_NFC_NULL_PARAMETER       parameter has illigal NULL pointer
-       @exception NET_NFC_ALLOC_FAIL   memory allocation is failed
-       @exception NET_NFC_NOT_INITIALIZED      Try to operate without initialization
-       @exception NET_NFC_BUSY         Device is too busy to handle your request
-       @exception NET_NFC_OPERATION_FAIL       Operation is failed because of the
-                                               internal oal error
-       @exception NET_NFC_RF_TIMEOUT   Timeout raised while communicate with tag
-       @exception NET_NFC_NOT_SUPPORTED        you may recieve this error if you
-                                               request not supported command
-       @exception NET_NFC_INVALID_HANDLE       target handle is not valid
-       @exception NET_NFC_TAG_WRITE_FAILED     read only tag, or error ack is
-                                               received from tag
-
-*/
-
-net_nfc_error_e net_nfc_client_mifare_write_page(
-                                               net_nfc_target_handle_h handle,
-                                               uint8_t addr,
-                                               data_h data,
-                                               void *callback,
-                                               void *user_data);
-
-
-/**
-       Increase a value block, storing the result in the temporary block on the
-       tag
-       This API is only available for MIFARE classic
-
-       \par Sync (or) Async: Sync
-       This is a Asynchronous API
-
-       @param[in]      handle          target handle of detected tag
-       @param[in]      addr            block
-       @param[in]      value           index of block to increase, starting from 0
-
-       @return         return the result of the calling the function
-
-       @exception NET_NFC_NULL_PARAMETER       parameter has illigal NULL pointer
-       @exception NET_NFC_ALLOC_FAIL   memory allocation is failed
-       @exception NET_NFC_NOT_INITIALIZED      Try to operate without initialization
-       @exception NET_NFC_BUSY         Device is too busy to handle your request
-       @exception NET_NFC_OPERATION_FAIL       Operation is failed because of the
-                                               internal oal error
-       @exception NET_NFC_RF_TIMEOUT   Timeout raised while communicate with tag
-       @exception NET_NFC_NOT_SUPPORTED        you may recieve this error if you
-                                               request not supported command
-       @exception NET_NFC_INVALID_HANDLE       target handle is not valid
-       @exception NET_NFC_TAG_WRITE_FAILED     read only tag, or error ack is received
-                                               from tag
-
-*/
-
-net_nfc_error_e net_nfc_client_mifare_increment(net_nfc_target_handle_h handle,
-                                               uint8_t addr,
-                                               int value,
-                                               void *callback,
-                                               void *user_data);
-
-/**
-       Decrease a value block, storing the result in the temporary block on the
-       tag
-       This API is only available for MIFARE classic
-
-       \par Sync (or) Async: Sync
-       This is a Asynchronous API
-
-       @param[in]      handle          target handle of detected tag
-       @param[in]      addr            block
-       @param[in]      value           index of block to decrease, starting from 0
-
-       @return         return the result of the calling the function
-
-       @exception NET_NFC_NULL_PARAMETER       parameter has illigal NULL pointer
-       @exception NET_NFC_ALLOC_FAIL   memory allocation is failed
-       @exception NET_NFC_NOT_INITIALIZED      Try to operate without initialization
-       @exception NET_NFC_BUSY         Device is too busy to handle your request
-       @exception NET_NFC_OPERATION_FAIL       Operation is failed because of the
-                                               internal oal error
-       @exception NET_NFC_RF_TIMEOUT   Timeout raised while communicate with tag
-       @exception NET_NFC_NOT_SUPPORTED        you may recieve this error if you
-                                               request not supported command
-       @exception NET_NFC_INVALID_HANDLE       target handle is not valid
-       @exception NET_NFC_TAG_WRITE_FAILED     read only tag, or error ack is received
-                                               from tag
-
-*/
-
-net_nfc_error_e net_nfc_client_mifare_decrement(net_nfc_target_handle_h handle,
-                                               uint8_t addr,
-                                               int value,
-                                               void *callback,
-                                               void *user_data);
-
-/**
-       Copy from the temporary block to a value block.
-       This API is only available for MIFARE classic
-
-       \par Sync (or) Async: Sync
-       This is a Asynchronous API
-
-       @param[in]      handle          target handle of detected tag
-       @param[in]      addr            block
-       @param[in]      value           index of block to decrease, starting from 0
-
-       @return         return the result of the calling the function
-
-       @exception NET_NFC_NULL_PARAMETER       parameter has illigal NULL pointer
-       @exception NET_NFC_ALLOC_FAIL   memory allocation is failed
-       @exception NET_NFC_NOT_INITIALIZED      Try to operate without initialization
-       @exception NET_NFC_BUSY         Device is too busy to handle your request
-       @exception NET_NFC_OPERATION_FAIL       Operation is failed because of the
-                                               internal oal error
-       @exception NET_NFC_RF_TIMEOUT   Timeout raised while communicate with tag
-       @exception NET_NFC_NOT_SUPPORTED        you may recieve this error if you
-                                               request not supported command
-       @exception NET_NFC_INVALID_HANDLE       target handle is not valid
-       @exception NET_NFC_TAG_WRITE_FAILED     read only tag, or error ack is received
-                                               from tag
-
-*/
-
-net_nfc_error_e net_nfc_client_mifare_transfer(net_nfc_target_handle_h handle,
-                                       uint8_t addr,
-                                       void *callback,
-                                       void *user_data);
-
-/**
-       Copy from a value block to the temporary block.
-       This API is only available for MIFARE classic
-
-       \par Sync (or) Async: Sync
-       This is a Asynchronous API
-
-       @param[in]      handle          target handle of detected tag
-       @param[in]      addr            block
-       @param[in]      value           index of block to decrease, starting from 0
-
-       @return         return the result of the calling the function
-
-       @exception NET_NFC_NULL_PARAMETER       parameter has illigal NULL pointer
-       @exception NET_NFC_ALLOC_FAIL   memory allocation is failed
-       @exception NET_NFC_NOT_INITIALIZED      Try to operate without initialization
-       @exception NET_NFC_BUSY         Device is too busy to handle your request
-       @exception NET_NFC_OPERATION_FAIL       Operation is failed because of the
-                                               internal oal error
-       @exception NET_NFC_RF_TIMEOUT   Timeout raised while communicate with tag
-       @exception NET_NFC_NOT_SUPPORTED        you may recieve this error if you
-                                               request not supported command
-       @exception NET_NFC_INVALID_HANDLE       target handle is not valid
-       @exception NET_NFC_TAG_WRITE_FAILED     read only tag, or error ack is received
-                                               from tag
-
-*/
-
-net_nfc_error_e net_nfc_client_mifare_restore(net_nfc_target_handle_h handle,
-                                       uint8_t addr,
-                                       void *callback,
-                                       void *user_data);
-
-/**
-       create default factory key. The key is 0xff, 0xff, 0xff, 0xff, 0xff, 0xff
-
-       \par Sync (or) Async: Sync
-       This is a Asynchronous API
-
-       @param[in]      key                     the handle to create key
-
-       @return         return the result of the calling the function
-
-       @exception NET_NFC_NULL_PARAMETER               parameter(s) has(have) illigal NULL pointer(s)
-       @exception NET_NFC_ALLOC_FAIL                   memory allocation is failed
-
-*/
-
-net_nfc_error_e net_nfc_client_mifare_create_default_key(data_h* key);
-
-/**
-       create mifare application directory key. The key is 0xA0, 0xA1, 0xA2, 0xA3, 0xA4, 0xA5
-
-       \par Sync (or) Async: Sync
-       This is a Asynchronous API
-
-       @param[in]      key                     the handle to create key
-
-       @return         return the result of the calling the function
-
-       @exception NET_NFC_NULL_PARAMETER               parameter(s) has(have) illigal NULL pointer(s)
-       @exception NET_NFC_ALLOC_FAIL                   memory allocation is failed
-
-*/
-
-net_nfc_error_e net_nfc_client_mifare_create_application_directory_key(
-                                                               data_h* key);
-
-/**
-       create nfc forum key. The key is 0xD3, 0xF7, 0xD3, 0xF7, 0xD3, 0xF7
-
-       \par Sync (or) Async: Sync
-       This is a Asynchronous API
-
-       @param[in]      key                     the handle to create key
-
-       @return         return the result of the calling the function
-
-       @exception NET_NFC_NULL_PARAMETER               parameter(s) has(have) illigal NULL pointer(s)
-       @exception NET_NFC_ALLOC_FAIL                   memory allocation is failed
-
-*/
-
-net_nfc_error_e net_nfc_client_mifare_create_net_nfc_forum_key(data_h* key);
-
-/**
-@} */
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif //__NET_NFC_TAG_MIFARE_H__
diff --git a/test/include/net_nfc_target_info.h b/test/include/net_nfc_target_info.h
deleted file mode 100755 (executable)
index 914a040..0000000
+++ /dev/null
@@ -1,346 +0,0 @@
-/*
- * Copyright (c) 2012, 2013 Samsung Electronics Co., Ltd.
- *
- * Licensed under the Flora License, Version 1.1 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://floralicense.org/license/
- *
- * 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.
- */
-
-#ifndef __NET_NFC_TARGET_INFO_H__
-#define __NET_NFC_TARGET_INFO_H__
-
-#include "net_nfc_typedef.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/**
-
-@addtogroup NET_NFC_MANAGER_INFO
-@{
-       This document is for the APIs reference document
-
-        NFC Manager defines are defined in <nfc-typedef.h>
-
-        These APIs help to get information of detected target. these target info handler holds
-        - type of target
-        - target ID
-        - ndef message supporting
-        - max data size  (if this tag is ndef message tag)
-        - actual data size (if this tag is ndef message tag)
-*/
-
-/**
-       type getter from target info handler
-
-       \par Sync (or) Async: Sync
-       This is a Synchronous API
-
-       @param[in]      target_info     target info handler
-       @param[out]     type                    tag type these type is one of the enum "net_nfc_target_type_e" defined
-
-       @return         return the result of calling this functions
-
-       @exception      NET_NFC_NULL_PARAMETER          parameter(s) has(have) illegal NULL pointer(s)
-
-*/
-
-net_nfc_error_e net_nfc_get_tag_type(net_nfc_target_info_h target_info, net_nfc_target_type_e *type);
-
-/**
-       type getter from target info handler
-
-       \par Sync (or) Async: Sync
-       This is a Synchronous API
-
-       @param[in]      target_info     target info handler
-       @param[out]     handle          target handle  that is generated by nfc-manager
-
-       @return         return the result of calling this functions
-
-       @exception      NET_NFC_NULL_PARAMETER          parameter(s) has(have) illegal NULL pointer(s)
-
-*/
-
-net_nfc_error_e net_nfc_get_tag_handle(net_nfc_target_info_h target_info, net_nfc_target_handle_h *handle);
-
-/**
-       this API returns the NDEF support boolean value.
-       The TRUE value will be returned if the detected target is support NDEF, or return FALSE
-
-       \par Sync (or) Async: Sync
-       This is a Synchronous API
-
-       @param[in]      target_info     target info handler
-       @param[out]     is_support      boolean value of NDEF supporting
-
-       @return         return the result of calling this functions
-
-       @exception      NET_NFC_NULL_PARAMETER          parameter(s) has(have) illegal NULL pointer(s)
-
-*/
-
-net_nfc_error_e net_nfc_get_tag_ndef_support(net_nfc_target_info_h target_info, bool *is_support);
-
-/**
-       Get current ndef tag state
-
-       \par Sync (or) Async: Sync
-       This is a Synchronous API
-
-       @param[in]      target_info     target info handler
-       @param[out]     state           ndef tag state
-
-       @return         return the result of calling this functions
-
-       @exception      NET_NFC_NULL_PARAMETER          parameter(s) has(have) illegal NULL pointer(s)
-*/
-
-net_nfc_error_e net_nfc_get_tag_ndef_state(net_nfc_target_info_h target_info, net_nfc_ndef_card_state_e *state);
-
-/**
-       The max size getter from target info handler. This max size indicates the maximum size of NDEF message that can be stored in this detected tag.
-
-       \par Sync (or) Async: Sync
-       This is a Synchronous API
-
-       @param[in]      target_info     target info handler
-       @param[out]     max_size                max size of NDEF message that can be stored in this detected tag.
-
-       @return         return the result of calling this functions
-
-       @exception      NET_NFC_NULL_PARAMETER          parameter(s) has(have) illegal NULL pointer(s)
-
-*/
-
-net_nfc_error_e net_nfc_get_tag_max_data_size(net_nfc_target_info_h target_info, uint32_t *max_size);
-
-/**
-       this function return the actual NDEF message size that stored in the tag
-
-       \par Sync (or) Async: Sync
-       This is a Synchronous API
-
-       @param[in]      target_info             target info handler
-       @param[out]     actual_data             the actual NDEF message size that stored in the tag
-
-       @return         return the result of calling this functions
-
-       @exception      NET_NFC_NULL_PARAMETER          parameter(s) has(have) illegal NULL pointer(s)
-
-*/
-
-net_nfc_error_e net_nfc_get_tag_actual_data_size(net_nfc_target_info_h target_info, uint32_t *actual_data);
-
-
-/**
-       this function return keys which will be used to get a tag information
-
-       \par Sync (or) Async: Sync
-       This is a Synchronous API. keys will be freed by user.
-
-       @param[in]      target_info             target info handler
-       @param[out]     keys                    pointer of double array. it will be array of string.
-       @param[out]     number_of_keys  length of array.
-
-       @exception      NET_NFC_NULL_PARAMETER          parameter(s) has(have) illegal NULL pointer(s)
-       @exception      NET_NFC_ALLOC_FAIL                      memory allocation is failed
-       @exception      NET_NFC_NO_DATA_FOUND           No data is returned
-
-       @code
-       void    user_cb(net_nfc_message_e message, net_nfc_error_e result, void* data, void* trans_param)
-       {
-
-               switch(message)
-               {
-                       case NET_NFC_MESSAGE_TAG_DISCOVERED:
-                       {
-                               if(info != NULL)
-                               {
-                                       net_nfc_target_info_h target_info = (net_nfc_target_info_h)data;
-
-                                       char **keys;
-                                       int keys_length;
-
-                                       if(net_nfc_get_tag_info_keys(target_info, &keys, &keys_length) == true)
-                                       {
-                                               int index = 0;
-                                               for(; index < keys_length; index++)
-                                               {
-                                                       char* key = keys[index];
-                                               }
-                                       }
-
-                                       free(keys);
-                               }
-                       }
-               }
-
-       }
-       @endcode
-
-       @return         return the result of calling this functions
-
-*/
-
-net_nfc_error_e net_nfc_get_tag_info_keys(net_nfc_target_info_h target_info, char ***keys, int *number_of_keys);
-
-/**
-       this function return value which is matched key
-
-       \par Sync (or) Async: Sync
-       This is a Synchronous API
-
-       @param[in]      target_info             target info handler
-       @param[in]      key                             key to retrieve
-       @param[out]     value                   value which is matched with key
-
-       @code
-       void    user_cb(net_nfc_message_e message, net_nfc_error_e result, void* data, void* trans_param)
-       {
-
-               switch(message)
-               {
-                       case NET_NFC_MESSAGE_TAG_DISCOVERED:
-                       {
-                               if(info != NULL)
-                               {
-                                       net_nfc_target_info_h target_info = (net_nfc_target_info_h)data;
-
-                                       char** keys;
-                                       int keys_length;
-
-                                       if(net_nfc_get_tag_info_keys(target_info, &keys, &keys_length) == NET_NFC_OK)
-                                       {
-                                               int index = 0;
-                                               for(; index < keys_length; index++)
-                                               {
-                                                       char* key = keys[index];
-                                                       data_h value;
-                                                       net_nfc_get_tag_info_value(target_info, key, &value);
-                                                       net_nfc_free_data(value);
-                                               }
-                                       }
-                               }
-                       }
-               }
-
-       }
-       @endcode
-
-       @return         return the result of calling this functions
-
-       @exception      NET_NFC_NULL_PARAMETER          parameter(s) has(have) illegal NULL pointer(s)
-       @exception      NET_NFC_NO_DATA_FOUND           No data is returned
-*/
-
-net_nfc_error_e net_nfc_get_tag_info_value(net_nfc_target_info_h target_info, const char *key, data_h *value);
-
-/**
-       Get ndef message of current tag
-
-       @remark This data can be expired because it is snapshot when tag was attached. If you want to get updated data, call @net_nfc_client_ndef_read function.
-       @remark @msg must be release by caller with @net_nfc_free_ndef_message
-
-       \par Sync (or) Async: Sync
-       This is a Synchronous API
-
-       @param[in]      target_info     target info handler
-       @param[out]     msg             ndef message
-
-       @return         return the result of calling this functions
-
-       @exception      NET_NFC_NULL_PARAMETER          parameter(s) has(have) illegal NULL pointer(s)
-*/
-
-net_nfc_error_e net_nfc_get_tag_ndef_message(net_nfc_target_info_h target_info, ndef_message_h *msg);
-
-/**
-       Duplicate a handle of target information
-
-       ** IMPORTANT : After using duplicated handle, you should release a handle returned from this function.
-       **             You can release a handle by net_nfc_release_tag_info function.
-
-       \par Sync (or) Async: Sync
-       This is a Synchronous API
-
-       @param[in]      origin          The original handle you want to duplicate
-       @param[out]     result          The result of this function.
-
-       @code
-       void user_cb(net_nfc_message_e message, net_nfc_error_e result, void *data, void *trans_param)
-       {
-               switch(message)
-               {
-               case NET_NFC_MESSAGE_TAG_DISCOVERED:
-                       {
-                               net_nfc_target_info_h target_info = (net_nfc_target_info_h)data;
-                               net_nfc_target_info_h handle = NULL;
-
-                               net_nfc_duplicate_target_info(target_info, &handle);
-
-                               // do something...
-
-                               net_nfc_release_tag_info(handle);
-                       }
-                       break;
-               }
-
-       }
-       @endcode
-
-       @return         return the result of calling this functions
-
-       @exception      NET_NFC_NULL_PARAMETER          parameter(s) has(have) illegal NULL pointer(s)
-*/
-
-net_nfc_error_e net_nfc_duplicate_target_info(net_nfc_target_info_h origin, net_nfc_target_info_h *result);
-
-/**
-       After using net_nfc_target_info_h handle, you should release its resource by this function.
-
-       ** IMPORTANT : Never use this function in user callback you registered by net_nfc_set_response_callback function
-       **             This function is for the result of net_nfc_duplicate_target_info or net_nfc_get_current_tag_info_sync
-
-       \par Sync (or) Async: Sync
-       This is a Synchronous API
-
-       @param[in]      target_info             target info handle
-
-       @code
-       net_nfc_target_info_h handle;
-
-       net_nfc_get_current_tag_info_sync(&handle);
-
-       // do something...
-
-       net_nfc_release_tag_info(handle);
-       @endcode
-
-       @return         return the result of calling this functions
-
-       @exception      NET_NFC_NULL_PARAMETER          parameter(s) has(have) illegal NULL pointer(s)
-*/
-
-net_nfc_error_e net_nfc_release_tag_info(net_nfc_target_info_h target_info);
-
-
-/**
-@} */
-
-
-#ifdef __cplusplus
-}
-#endif
-
-
-#endif //__NET_NFC_TARGET_INFO_H__
diff --git a/test/include/nfc.h b/test/include/nfc.h
deleted file mode 100755 (executable)
index 0a5648c..0000000
+++ /dev/null
@@ -1,3112 +0,0 @@
-/*
- * Copyright (c) 2012, 2013 Samsung Electronics Co., Ltd.
- *
- * 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.
- */
-
-
-#ifndef __NFC_H__
-#define __NFC_H__
-
-#include <tizen.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/**
- * @file nfc.h
- * @brief This file contains the NFC API.
- */
-
-#define NFC_ERROR_CLASS TIZEN_ERROR_NFC
-
-/**
- * @brief Error codes reported by the NFC API.
- * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
- * @ingroup CAPI_NETWORK_NFC_MANAGER_MODULE
- */
-typedef enum {
-       NFC_ERROR_NONE = TIZEN_ERROR_NONE,      /**< Successful */
-       NFC_ERROR_OUT_OF_MEMORY = TIZEN_ERROR_OUT_OF_MEMORY,    /**< Out of memory */
-       NFC_ERROR_OPERATION_FAILED = NFC_ERROR_CLASS | 0x01,    /**< Operation failed*/
-       NFC_ERROR_INVALID_PARAMETER = TIZEN_ERROR_INVALID_PARAMETER,    /**< Invalid parameter */
-       NFC_ERROR_INVALID_NDEF_MESSAGE = NFC_ERROR_CLASS | 0x02,        /**< Invalid NDEF message */
-       NFC_ERROR_INVALID_RECORD_TYPE  = NFC_ERROR_CLASS | 0x03,        /**< Invalid record type*/
-       NFC_ERROR_TIMED_OUT = TIZEN_ERROR_TIMED_OUT,    /**< Timeout error, no answer */
-       NFC_ERROR_DEVICE_BUSY = TIZEN_ERROR_RESOURCE_BUSY,      /**< Previous operation is not finished still busy */
-       NFC_ERROR_NO_DEVICE = NFC_ERROR_CLASS | 0x04, /**< no device */
-       NFC_ERROR_NOT_ACTIVATED = NFC_ERROR_CLASS | 0x05, /**< NFC is not activated */
-       NFC_ERROR_NOT_SUPPORTED = TIZEN_ERROR_NOT_SUPPORTED, /**< Not supported */
-       NFC_ERROR_ALREADY_ACTIVATED = NFC_ERROR_CLASS | 0x06, /**< Already activated */
-       NFC_ERROR_ALREADY_DEACTIVATED = NFC_ERROR_CLASS | 0x07, /**< Already deactivated */
-       NFC_ERROR_READ_ONLY_NDEF = NFC_ERROR_CLASS | 0x08, /**< Read only tag */
-       NFC_ERROR_NO_SPACE_ON_NDEF = NFC_ERROR_CLASS | 0x09, /**< No enough space on tag */
-       NFC_ERROR_NO_NDEF_MESSAGE = NFC_ERROR_CLASS | 0x0a, /**< No NDEF Message on Tag */
-       NFC_ERROR_NOT_NDEF_FORMAT = NFC_ERROR_CLASS | 0x0b, /**< Not NDEF format Tag */
-       NFC_ERROR_SECURITY_RESTRICTED = NFC_ERROR_CLASS | 0x0c, /**<  Restricted by access control */
-       NFC_ERROR_PERMISSION_DENIED = TIZEN_ERROR_PERMISSION_DENIED, /**< Restricted by Smack */
-       NFC_ERROR_ILLEGAL_STATE = NFC_ERROR_CLASS | 0x0d, /**<  The state is wrong */
-       NFC_ERROR_NOT_INITIALIZED = NFC_ERROR_CLASS | 0x0e, /**< NFC is not initialized */
-       NFC_ERROR_TAG_NOT_SUPPORTED = NFC_ERROR_CLASS | 0x0f, /**< Tag is not supported */
-       NFC_ERROR_AID_ALREADY_REGISTERED = NFC_ERROR_CLASS | 0x10 /**< AID already registered (@b Since: 2.3.1) */
-} nfc_error_e;
-
-/**
- * @brief Enumerations for record TNF (Type Name Format)
- * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
- * @details It is indicate format of type field
- * @ingroup CAPI_NETWORK_NFC_NDEF_RECORD_MODULE
- */
-typedef enum {
-       NFC_RECORD_TNF_EMPTY = 0x00,    /**< Empty */
-       NFC_RECORD_TNF_WELL_KNOWN = 0x01,       /**< RTD(Record Type Definition) type format [NFC RTD] */
-       NFC_RECORD_TNF_MIME_MEDIA = 0x02,       /**< MIME Media types in RFC 2046 [RFC 2046] */
-       NFC_RECORD_TNF_URI = 0x03,      /**< Absolute URI as defined in RFC 3986 [RFC 3986] */
-       NFC_RECORD_TNF_EXTERNAL_RTD = 0x04,     /**< NFC Forum external type [NFC RTD] */
-       NFC_RECORD_TNF_UNKNOWN = 0x05,  /**< Unknown\n The payload type is unknown */
-       NFC_RECORD_TNF_UNCHANGED = 0x06,        /**< It means the payload is an intermediate or final chunk of a chunked NDEF Record */
-} nfc_record_tnf_e;
-
-
-/**
- * @brief Enumerations for NFC encode types
- * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
- * @ingroup CAPI_NETWORK_NFC_NDEF_RECORD_MODULE
- */
-typedef enum {
-       NFC_ENCODE_UTF_8 = 0x00,        /**< UTF-8 */
-       NFC_ENCODE_UTF_16,      /**< UTF-16 */
-} nfc_encode_type_e;
-
-/**
- * @brief Enumerations for NFC tag types
- * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
- * @ingroup CAPI_NETWORK_NFC_TAG_MODULE
- */
-typedef enum {
-       NFC_UNKNOWN_TARGET = 0x00U,     /**< Unknown target */
-       NFC_GENERIC_PICC,       /**< GENERIC PICC*/
-       NFC_ISO14443_A_PICC,    /**< ISO14443_A PICC */
-       NFC_ISO14443_4A_PICC,   /**< ISO14443_4A PICC */
-       NFC_ISO14443_3A_PICC,   /**< ISO14443_3A PICC */
-       NFC_MIFARE_MINI_PICC,   /**< MIFARE_MINI_PICC */
-       NFC_MIFARE_1K_PICC,     /**< MIFARE_1K_PICC */
-       NFC_MIFARE_4K_PICC,     /**< MIFARE_4K_PICC */
-       NFC_MIFARE_ULTRA_PICC,  /**< MIFARE_ULTRA_PICC */
-       NFC_MIFARE_DESFIRE_PICC,        /**< MIFARE_DESFIRE_PICC */
-       NFC_ISO14443_B_PICC,    /**< ISO14443_B PICC */
-       NFC_ISO14443_4B_PICC,   /**< ISO14443_4B PICC */
-       NFC_ISO14443_BPRIME_PICC,       /**< ISO14443_BPRIME PICC */
-       NFC_FELICA_PICC,        /**< FELICA PICC */
-       NFC_JEWEL_PICC, /**< JEWEL PICC */
-       NFC_ISO15693_PICC,      /**< ISO15693 PICC */
-       NFC_BARCODE_128_PICC, /**< BARCODE_128 PICC */
-       NFC_BARCODE_256_PICC, /**< BARCODE_256 PICC */
-
-       NFC_NFCIP1_TARGET,      /**< NFCIP1_TARGET */
-       NFC_NFCIP1_INITIATOR,   /**< NFCIP1_INITIATOR */
-} nfc_tag_type_e;
-
-/**
- * @brief Enumerations for NFC Tag filter
- * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
- * @ingroup CAPI_NETWORK_NFC_MANAGER_MODULE
- */
-typedef enum {
-       NFC_TAG_FILTER_ALL_DISABLE = 0x0000,    /**< All disable */
-       NFC_TAG_FILTER_ISO14443A_ENABLE = 0x0001,       /**< ISO14443A enable */
-       NFC_TAG_FILTER_ISO14443B_ENABLE = 0x0002,       /**< ISO14443B enable */
-       NFC_TAG_FILTER_ISO15693_ENABLE = 0x0004,        /**< ISO15693 enable */
-       NFC_TAG_FILTER_FELICA_ENABLE = 0x0008,  /**< FELICA enable */
-       NFC_TAG_FILTER_JEWEL_ENABLE = 0x0010,   /**< JEWEL enable */
-       NFC_TAG_FILTER_IP_ENABLE = 0x0020,      /**< IP enable */
-       NFC_TAG_FILTER_ALL_ENABLE = ~0, /**< All enable */
-} nfc_tag_filter_e;
-
-/**
- * @brief Enumerations for NFC discovered type
- * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
- * @ingroup CAPI_NETWORK_NFC_MANAGER_MODULE
- */
-typedef enum {
-       NFC_DISCOVERED_TYPE_ATTACHED,   /**< Attached, discovered, activated event*/
-       NFC_DISCOVERED_TYPE_DETACHED,   /**< detached, disappeared, deactivated event*/
-} nfc_discovered_type_e;
-
-/**
- * @brief Enumerations for NFC Secure Element (SIM/UICC(Universal Integrated Circuit Card)) event
- * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
- * @ingroup CAPI_NETWORK_NFC_MANAGER_MODULE
- */
-typedef enum {
-       NFC_SE_EVENT_START_TRANSACTION, /**< This event notifies the terminal host that it shall launch an application associated to an NFC application in a UICC(Universal Integrated Circuit Card) host. */
-       NFC_SE_EVENT_END_TRANSACTION,   /**< This event notifies the terminal host that current transaction in process was ended. */
-       NFC_SE_EVENT_CONNECTIVITY, /**< It's ready signal to communicate UICC(Universal Integrated Circuit Card) with terminal host. UICC(Universal Integrated Circuit Card) create pipe and open the pipe chanel. Then it sends the signal to terminal host or host controller. */
-       NFC_SE_EVENT_FIELD_ON, /**< When the CLF(Contactless Front-end) detects a RF field, the card RF gate sends the event #NFC_SE_EVENT_FIELD_ON to the card application gate. When there are multiple open card RF gates the CLF shall send the #NFC_SE_EVENT_FIELD_ON on all open pipes to these gates.Next the CLF starts the initialization and anti-collision process as defined in ISO/IEC 14443-3 [6]*/
-       NFC_SE_EVENT_FIELD_OFF, /**< When the CLF(Contactless Front-end) detects that the RF field is off, the card RF gate shall send #NFC_SE_EVENT_FIELD_OFF to the card application gate. When there are multiple open card RF gates the CLF shall send the #NFC_SE_EVENT_FIELD_OFF to one gate only.*/
-       NFC_SE_EVENT_TRANSACTION, /**< This event  notifies , external reader trys to access secure element */
-       NFC_SE_EVENT_SE_TYPE_CHANGED, /**< This event notifies, changing the emulated secure element type */
-       NFC_SE_EVENT_CARD_EMULATION_CHANGED, /**< This event notifies, changing the card emulation mode */
-} nfc_se_event_e;
-
-/**
- * @brief Enumerations for NFC Secure Element (SIM/UICC(Universal Integrated Circuit Card)) type
- * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
- * @ingroup CAPI_NETWORK_NFC_MANAGER_MODULE
- */
-typedef enum {
-       NFC_SE_TYPE_DISABLE = 0x00, /**< Disable card emulation */
-       NFC_SE_TYPE_ESE = 0x01, /**< SmartMX type card emulation */
-       NFC_SE_TYPE_UICC = 0x02, /**< UICC type card emulation */
-       NFC_SE_TYPE_SDCARD = 0x03, /**< SDCARD card emulation (Not yet supported on Tizen) (@b Since: 2.3.1)  */
-       NFC_SE_TYPE_HCE = 0x04 /**< Host based card emulation (@b Since: 2.3.1) */
-} nfc_se_type_e;
-
-/**
- * @brief Enumerations for NFC Card Emulation Mode type
- * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
- * @ingroup CAPI_NETWORK_NFC_MANAGER_MODULE
- */
-typedef enum {
-       NFC_SE_CARD_EMULATION_MODE_OFF = 0x00, /**< Card Emulation mode OFF */
-       NFC_SE_CARD_EMULATION_MODE_ON = 0x01, /**< Card Emulation mode ON */
-} nfc_se_card_emulation_mode_type_e;
-
-/**
- * @brief Enumerations for SNEP event
- * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
- * @ingroup CAPI_NETWORK_NFC_P2P_MODULE
- */
-typedef enum {
-       NFC_SNEP_EVENT_STOP = 0x00, /**< server or client stopped */
-       NFC_SNEP_EVENT_START = 0x01, /**< server started or client connected */
-       NFC_SNEP_EVENT_GET = 0x02, /**< server received get request */
-       NFC_SNEP_EVENT_PUT = 0x03, /**< server received put request */
-       NFC_SNEP_EVENT_REGISTER = 0x04, /**< service registered */
-       NFC_SNEP_EVENT_UNREGISTER = 0x05, /**< service unregistered */
-} nfc_snep_event_e;
-
-/**
- * @brief Enumerations for SNEP request type
- * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
- * @ingroup CAPI_NETWORK_NFC_P2P_MODULE
- */
-typedef enum {
-       NFC_SNEP_GET = 0x01, /**< get request */
-       NFC_SNEP_PUT = 0x02, /**< put request */
-} nfc_snep_type_e;
-
-/**
- * @brief Enumerations for NFC Card Emulation Category type
- * @since_tizen 2.3.1
- * @ingroup CAPI_NETWORK_NFC_SE_MODULE
- */
-typedef enum {
-       NFC_CARD_EMULATION_CATEGORY_PAYMENT = 0x01, /**< Category used for NFC payment services */
-       NFC_CARD_EMULATION_CATEGORY_OTHER = 0x02, /**< Category that can be used for all other card emulation services */
-} nfc_card_emulation_category_type_e;
-
-/**
- * @brief Enumerations for NFC Card Emulation HCE event type
- * @since_tizen 2.3.1
- * @ingroup CAPI_NETWORK_NFC_SE_MODULE
- */
-typedef enum {
-       NFC_HCE_EVENT_DEACTIVATED = 0x00, /**< HCE Deactivated */
-       NFC_HCE_EVENT_ACTIVATED = 0x01, /**< HCE Activated */
-       NFC_HCE_EVENT_APDU_RECEIVED = 0x02, /**< HCE APDU Received */
-} nfc_hce_event_type_e;
-
-/**
- * @brief The handle to the NDEF record
- * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
- * @ingroup CAPI_NETWORK_NFC_NDEF_RECORD_MODULE
- */
-typedef struct _ndef_record_s *nfc_ndef_record_h;
-
-/**
- * @brief The handle to the NDEF message
- * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
- * @ingroup CAPI_NETWORK_NFC_NDEF_MESSAGE_MODULE
- */
-typedef struct _ndef_message_s *nfc_ndef_message_h;
-
-/**
- * @brief The handle to the NFC tag
- * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
- * @ingroup CAPI_NETWORK_NFC_TAG_MODULE
- */
-typedef struct _net_nfc_target_info_s *nfc_tag_h;
-
-/**
- * @brief The handle to NFC p2p target
- * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
- * @ingroup CAPI_NETWORK_NFC_P2P_MODULE
- */
-typedef void *nfc_p2p_target_h;
-
-/**
- * @brief The handle to NFC p2p snep instance
- * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
- * @ingroup CAPI_NETWORK_NFC_P2P_MODULE
- */
-typedef struct _nfc_p2p_snep_s *nfc_p2p_snep_h;
-
-/**
- * @brief The handle to NFC secure element instance
- * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
- * @ingroup CAPI_NETWORK_NFC_SE_MODULE
- */
-typedef void *nfc_se_h;
-
-/**
- * @brief The default factory key.
- * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
- * @details The key is 0xff, 0xff, 0xff, 0xff, 0xff, 0xff
- * @ingroup CAPI_NETWORK_NFC_TAG_MIFARE_MODULE
- */
-extern const unsigned char NFC_TAG_MIFARE_KEY_DEFAULT[6];
-
-/**
- * @brief The well-known key for tags formatted according to the MIFARE Application Directory (MAD) specification.
- * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
- * @details The key is 0xA0, 0xA1, 0xA2, 0xA3, 0xA4, 0xA5
- * @ingroup CAPI_NETWORK_NFC_TAG_MIFARE_MODULE
- */
-extern const unsigned char NFC_TAG_MIFARE_KEY_APPLICATION_DIRECTORY[6];
-
-/**
- * @brief The well-known key for tags formatted according to the NDEF on Mifare Classic specification.
- * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
- * @details The key is 0xD3, 0xF7, 0xD3, 0xF7, 0xD3, 0xF7
- * @ingroup CAPI_NETWORK_NFC_TAG_MIFARE_MODULE
- */
-extern const unsigned char NFC_TAG_MIFARE_KEY_NFC_FORUM[6];
-
-
-/**
- * @brief RTD(Record type definition) Type - Smart Poster type.
- * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
- * @ingroup CAPI_NETWORK_NFC_NDEF_RECORD_MODULE
- */
-extern const unsigned char NFC_RECORD_SMART_POSTER_TYPE[2];
-
-/**
- * @brief  RTD(Record type definition) Type - Text type.
- * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
- * @ingroup CAPI_NETWORK_NFC_NDEF_RECORD_MODULE
- */
-extern const unsigned char NFC_RECORD_TEXT_TYPE[1];
-/**
- * @brief  RTD(Record type definition) Type - URI type.
- * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
- * @ingroup CAPI_NETWORK_NFC_NDEF_RECORD_MODULE
- */
-extern const unsigned char NFC_RECORD_URI_TYPE[1];
-/**
- * @brief  RTD(Record type definition) Type - Alternative Carrier type.
- * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
- * @ingroup CAPI_NETWORK_NFC_NDEF_RECORD_MODULE
- */
-extern const unsigned char NFC_RECORD_ALTERNATIVE_CARRIER_TYPE[2];
-/**
- * @brief  RTD(Record type definition) Type - Handover Carrier type.
- * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
- * @ingroup CAPI_NETWORK_NFC_NDEF_RECORD_MODULE
- */
-extern const unsigned char NFC_RECORD_HANDOVER_CARRIER_TYPE[2];
-/**
- * @brief  RTD(Record type definition) Type - Handover Request type.
- * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
- * @ingroup CAPI_NETWORK_NFC_NDEF_RECORD_MODULE
- */
-extern const unsigned char NFC_RECORD_HANDOVER_REQUEST_TYPE[2];
-/**
- * @brief  RTD(Record type definition) Type - Handover Select type.
- * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
- * @ingroup CAPI_NETWORK_NFC_NDEF_RECORD_MODULE
- */
-extern const unsigned char NFC_RECORD_HANDOVER_SELECT_TYPE[2];
-
-/**
- * @brief Called after nfc_manager_set_activation() has completed.
- * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
- * @platform
- * @ingroup CAPI_NETWORK_NFC_MANAGER_MODULE
- *
- * @param [in] error The result
- * @param [in] user_data The user data passed from the callback registration function
- *
- * @see nfc_manager_set_activation()
- */
-typedef void (*nfc_activation_completed_cb)(nfc_error_e error, void *user_data);
-
-/**
- * @brief Called when nfc activation state is changed.
- * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
- * @ingroup CAPI_NETWORK_NFC_MANAGER_MODULE
- *
- * @param [in] activated The activation state
- * @param [in] user_data The user data passed from the callback registration function
- *
- * @see nfc_manager_set_activation_changed_cb()
- */
-typedef void (*nfc_activation_changed_cb)(bool activated , void *user_data);
-
-/**
- * @brief Called when an NFC tag appears or disappears
- * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
- * @ingroup CAPI_NETWORK_NFC_MANAGER_MODULE
- *
- * @remarks  The tag handle does not have detail target info when an NFC tag disappeared.\n
- *     So then do not use tag functions which use tag handle.
- *
- * @param [in] type The discovered type attached or detached
- * @param [in] tag The handle to NFC tag
- * @param [in] user_data The user data passed from the callback registration function
- *
- * @see nfc_manager_set_tag_discovered_cb()
- * @see nfc_manager_unset_tag_discovered_cb()
- * @see nfc_manager_set_tag_filter()
- */
-typedef void (*nfc_tag_discovered_cb)(nfc_discovered_type_e type, nfc_tag_h tag, void *user_data);
-
-/**
- * @brief Called when an NDEF Message is discovered
- * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
- * @ingroup CAPI_NETWORK_NFC_MANAGER_MODULE
- *
- * @remarks @a message will be automatically destroyed when the callback function returns. (Do not release @a message.)
- *
- * @param [in] message The handle to NDEF message
- * @param [in] user_data The user data passed from the callback registration function
- *
- * @see nfc_manager_set_ndef_discovered_cb()
- * @see nfc_manager_unset_ndef_discovered_cb()
- */
-typedef void (*nfc_ndef_discovered_cb)(nfc_ndef_message_h message, void *user_data);
-
-
-/**
- * @brief Called once for each tag information.
- * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
- * @ingroup CAPI_NETWORK_NFC_TAG_MODULE
- *
- * @remarks @a key and value will be automatically destroyed when the callback function returns. (Do not release @a key and value.)
- *
- * @param[in] key The key of information
- * @param[in] value The value of information
- * @param[in] value_size The data size in bytes
- * @param[in] user_data The user data passed from the foreach function
- *
- * @return @c true to continue with the next iteration of the loop, \n @c false to break out of the loop.
- * @pre nfc_tag_foreach_information() invokes this callback.
- *
- * @see        nfc_tag_foreach_information()
- */
-
-typedef bool (*nfc_tag_information_cb)(const char *key, const unsigned char *value, int value_size, void *user_data);
-
-
-/**
- * @brief Called after nfc_tag_transceive() has completed.
- * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
- * @ingroup CAPI_NETWORK_NFC_TAG_MODULE
- *
- * @remarks @a buffer will be automatically destroyed when the callback function returns. (Do not release @a buffer.)
- *
- * @param [in] result The result of function call
- * @param [in] buffer The result data
- * @param [in] buffer_size The size of buffer in bytes
- * @param [in] user_data The user data passed from nfc_tag_transceive()
- *
- * @see nfc_tag_transceive()
- */
-typedef void (*nfc_tag_transceive_completed_cb)(nfc_error_e result, unsigned char *buffer, int buffer_size, void *user_data);
-
-/**
- * @brief Called after the nfc_tag_write_ndef() has completed.
- * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
- * @ingroup CAPI_NETWORK_NFC_TAG_MODULE
- *
- * @param [in] result The result of function call
- * @param [in] user_data The user data passed from nfc_manager_initialize()
- *
- * @see nfc_tag_write_ndef()
- */
-typedef void (*nfc_tag_write_completed_cb)(nfc_error_e result, void *user_data);
-
-/**
- * @brief Called after the nfc_tag_read_ndef() has completed.
- * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
- * @ingroup CAPI_NETWORK_NFC_TAG_MODULE
- *
- * @remarks @a message will be automatically destroyed when the callback function returns. (Do not release @a message.)
- *
- * @param [in] result The result of function call
- * @param [in] message The NDEF message
- * @param [in] user_data The user data passed from nfc_tag_read_ndef()
- *
- * @see nfc_tag_read_ndef()
- */
-typedef void (*nfc_tag_read_completed_cb)(nfc_error_e result, nfc_ndef_message_h message, void *user_data);
-
-/**
- * @brief   Called after the nfc_tag_format_ndef() has completed.
- * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
- * @ingroup CAPI_NETWORK_NFC_TAG_MODULE
- *
- * @param [in] result The result of function call
- * @param [in] user_data The user data passed from nfc_tag_format_ndef()
- *
- * @see nfc_tag_format_ndef()
- */
-typedef void (*nfc_tag_format_completed_cb)(nfc_error_e result, void *user_data);
-
-
-/**
- * @brief Called after nfc_mifare_authenticate_with_keyA() has completed
- * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
- * @ingroup CAPI_NETWORK_NFC_TAG_MIFARE_MODULE
- *
- * @param [in] result The result of nfc_mifare_authenticate_with_keyA()
- * @param [in] user_data The user data passed from nfc_mifare_authenticate_with_keyA()
- *
- * @see nfc_mifare_authenticate_with_keyA()
- */
-typedef void (*nfc_mifare_authenticate_with_keyA_completed_cb)(nfc_error_e result, void *user_data);
-
-/**
- * @brief Called after nfc_mifare_authenticate_with_keyB() has completed
- * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
- * @ingroup CAPI_NETWORK_NFC_TAG_MIFARE_MODULE
- *
- * @param [in] result The result of function call
- * @param [in] user_data The user data passed from nfc_mifare_authenticate_with_keyB()
- *
- * @see nfc_mifare_authenticate_with_keyB()
- */
-typedef void (*nfc_mifare_authenticate_with_keyB_completed_cb)(nfc_error_e result, void *user_data);
-
-/**
- * @brief Called after nfc_mifare_write_block() has completed
- * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
- * @ingroup CAPI_NETWORK_NFC_TAG_MIFARE_MODULE
- *
- * @param [in] result The result of nfc_mifare_write_block()
- * @param [in] user_data The user data passed from nfc_mifare_write_block()
- *
- * @see nfc_mifare_write_block()
- */
-typedef void (*nfc_mifare_write_block_completed_cb)(nfc_error_e result, void *user_data);
-
-/**
- * @brief Called after nfc_mifare_write_page() has completed
- * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
- * @ingroup CAPI_NETWORK_NFC_TAG_MIFARE_MODULE
- *
- * @param [in] result The result of function call
- * @param [in] user_data The user data passed from nfc_mifare_write_page()
- *
- * @see nfc_mifare_write_page()
- */
-typedef void (*nfc_mifare_write_page_completed_cb)(nfc_error_e result, void *user_data);
-
-/**
- * @brief Called after nfc_mifare_read_block() has completed
- * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
- * @ingroup CAPI_NETWORK_NFC_TAG_MIFARE_MODULE
- *
- * @remarks @a buffer will be automatically destroyed when the callback function returns. (Do not release @a buffer.)
- *
- * @param [in] result The result of function call
- * @param [in] buffer The read buffer
- * @param [in] size The size of buffer in bytes
- * @param [in] user_data The user data passed from nfc_mifare_read_block()
- *
- * @see nfc_mifare_read_block()
- */
-typedef void (*nfc_mifare_read_block_completed_cb)(nfc_error_e result, unsigned char *buffer, int bufer_size, void *user_data);
-
-/**
- * @brief Called after nfc_mifare_read_page() has completed
- * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
- * @ingroup CAPI_NETWORK_NFC_TAG_MIFARE_MODULE
- *
- * @remarks @a buffer will be automatically destroyed when the callback function returns. (Do not release @a buffer.)
- *
- * @param [in] result The result of nfc_mifare_read_page()
- * @param [in] buffer The read buffer
- * @param [in] size The size of read buffer in bytes
- * @param [in] user_data The user data passed from nfc_mifare_read_page()
- *
- * @see nfc_mifare_read_page()
- */
-typedef void (*nfc_mifare_read_page_completed_cb)(nfc_error_e result, unsigned char *buffer, int bufer_size, void *user_data);
-
-/**
- * @brief Called after nfc_mifare_increment() has completed
- * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
- * @ingroup CAPI_NETWORK_NFC_TAG_MIFARE_MODULE
- *
- * @param [in] result The result of nfc_mifare_increment()
- * @param [in] user_data The user data passed from nfc_mifare_increment()
- *
- * @see nfc_mifare_increment()
- */
-typedef void (*nfc_mifare_increment_completed_cb)(nfc_error_e result, void *user_data);
-
-/**
- * @brief Called after nfc_mifare_decrement() has completed
- * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
- * @ingroup CAPI_NETWORK_NFC_TAG_MIFARE_MODULE
- *
- * @param [in] result The result of nfc_mifare_decrement()
- * @param [in] user_data The user data passed from nfc_mifare_decrement()
- *
- * @see nfc_mifare_decrement()
- */
-typedef void (*nfc_mifare_decrement_completed_cb)(nfc_error_e result, void *user_data);
-
-/**
- * @brief Called after nfc_mifare_transfer() has completed
- * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
- * @ingroup CAPI_NETWORK_NFC_TAG_MIFARE_MODULE
- *
- * @param [in] result The result of nfc_mifare_transfer()
- * @param [in] user_data The user data passed from nfc_mifare_transfer()
- *
- * @see nfc_mifare_transfer()
- */
-typedef void (*nfc_mifare_transfer_completed_cb)(nfc_error_e result, void *user_data);
-
-/**
- * @brief Called after nfc_mifare_restore() has completed
- * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
- * @ingroup CAPI_NETWORK_NFC_TAG_MIFARE_MODULE
- *
- * @param [in] result The result of nfc_mifare_restore()
- * @param [in] user_data The user data passed from nfc_mifare_restore()
- *
- * @see nfc_mifare_restore()
- */
-typedef void (*nfc_mifare_restore_completed_cb)(nfc_error_e result, void *user_data);
-
-
-
-/**
- * @brief Called when NFC peer-to-peer target appeared or disappeared
- * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
- * @ingroup CAPI_NETWORK_NFC_MANAGER_MODULE
- *
- * @param [in] type The discovered type attached or detached
- * @param [in] target The handle to p2p target
- * @param [in] user_data The user data passed from nfc_manager_set_p2p_target_discovered_cb()
- *
- * @see nfc_manager_set_p2p_target_discovered_cb()
- * @see nfc_manager_unset_p2p_target_discovered_cb()
- */
-typedef void (*nfc_p2p_target_discovered_cb)(nfc_discovered_type_e type, nfc_p2p_target_h target, void *user_data);
-
-/**
- * @brief Called when receiving  Secure Element (SIM/UICC(Universal Integrated Circuit Card)) event.
- * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
- * @ingroup CAPI_NETWORK_NFC_MANAGER_MODULE
- *
- * @param [in] event The Secure Element event
- * @param [in] user_data The user data passed from nfc_manager_set_se_event_cb()
- *
- * @see nfc_manager_set_se_event_cb()
- * @see nfc_manager_unset_se_event_cb()
- */
-typedef void (*nfc_se_event_cb)(nfc_se_event_e event , void *user_data);
-
-
-/**
- * @brief Called when receiving Secure Element(SIM/UICC(Universal Integrated Circuit Card)) transaction event data
- * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
- * @remarks This event  notifies , external reader trys to access secure element.
- * @ingroup CAPI_NETWORK_NFC_MANAGER_MODULE
- *
- * @param [in] se type
- * @param [in] aid Application Id, specified in ISO/IEC 7816-4
- * @param [in] aid_size The size of aid (5~16)
- * @param [in] param The parameter list, specified in ISO/IEC 8825-1
- * @param [in] param The size of param (0~65535)
- * @param [in] user_data The user data passed from nfc_manager_set_se_transaction_event_cb()
- *
- * @see nfc_manager_set_se_transaction_event_cb()
- * @see nfc_manager_unset_se_transaction_event_cb()
- */
-typedef void (*nfc_se_transaction_event_cb)(nfc_se_type_e se_type, unsigned char* aid, int aid_size , unsigned char* param, int param_size,  void *user_data);
-
-
-
-/**
- * @brief Called after nfc_p2p_send() has completed.
- * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
- * @ingroup CAPI_NETWORK_NFC_P2P_MODULE
- *
- * @param [in] result The result of function call
- * @param [in] user_data The user data passed from nfc_p2p_send()
- *
- * @see nfc_p2p_send()
- */
-typedef void (*nfc_p2p_send_completed_cb)(nfc_error_e result, void *user_data);
-
-
-/**
- * @brief Called after nfc_p2p_send() has completed.
- * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
- * @ingroup CAPI_NETWORK_NFC_P2P_MODULE
- *
- * @remarks @a message will be automatically destroyed when the callback function returns. (Do not release @a message.)
- *
- * @param [in] target The handle to p2p target
- * @param [in] message The received message
- * @param [in] user_data The user data passed from nfc_p2p_set_recv_cb()
- *
- * @see nfc_p2p_set_data_received_cb()
- * @see nfc_p2p_unset_data_received_cb()
- */
-typedef void (*nfc_p2p_data_received_cb)(nfc_p2p_target_h target, nfc_ndef_message_h message, void *user_data);
-
-/**
- * @brief Called when SNEP event is raised
- * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
- * @ingroup CAPI_NETWORK_NFC_P2P_MODULE
- *
- * @param [in] handle The handle of current snep instance
- * @param [in] event The kind of snep event
- * @param [in] result The result of snep event
- * @param [in] msg The ndef message which received from client or result of get request
- * @param [in] user_data The user data passed from snep apis.
- *
- * @see nfc_snep_start_server()
- * @see nfc_snep_send_client_request()
- */
-typedef void (*nfc_snep_event_cb)(nfc_p2p_snep_h handle,
-       nfc_snep_event_e event, nfc_error_e result,
-       nfc_ndef_message_h msg, void *user_data);
-
-/**
- * @brief Called when receiving HCE(Host Card Emulation) event.
- * @since_tizen 2.3.1
- * @ingroup CAPI_NETWORK_NFC_SE_MODULE
- * @remarks If the event type is NFC_HCE_EVENT_DEACTIVATED or NFC_HCE_EVENT_ACTIVATED, then apdu and apdu_len is NULL and 0.
- *
- * @param [in] handle The handle of connected secure element
- * @param [in] event The HCE event type
- * @param [in] apdu The bytes array of apdu command data
- * @param [in] apdu_len The size of apdu command bytes array
- * @param [in] user_data The user data passed from nfc_manager_set_hce_event_cb()
- *
- * @see nfc_manager_set_hce_event_cb()
- * @see nfc_manager_unset_hce_event_cb()
- */
-typedef void (*nfc_hce_event_cb)(nfc_se_h handle, nfc_hce_event_type_e event, unsigned char *apdu, unsigned int apdu_len, void *user_data);
-
-/**
- * @brief Called once for each registered AID.
- * @since_tizen 2.3.1
- * @ingroup CAPI_NETWORK_NFC_SE_MODULE
- *
- * @param [in] se_type The type of Secure Element
- * @param [in] aid Application Id, specified in ISO/IEC 7816-4
- * @param [in] read_only @c true an aid is on read only mode, otherwise @c false
- * @param [in] user_data The user data passed from the foreach function
- *
- * @see nfc_se_foreach_registered_aids()
- */
-typedef void (*nfc_se_registered_aid_cb)(nfc_se_type_e se_type,        const char *aid, bool read_only, void *user_data);
-
-/**
- * @brief Gets the value that indicates whether NFC is supported.
- * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
- * @ingroup CAPI_NETWORK_NFC_MANAGER_MODULE
- *
- * @remarks The specific error code can be obtained using the get_last_result() method. Error codes are described in Exception section.
- * @remarks This function can executed Regardless of nfc_manager_initialize state.
- *
- * @return true on NFC supported,  otherwise false
- * @exception #NFC_ERROR_NONE Success
- * @exception #NFC_ERROR_NOT_SUPPORTED Not supported NFC
- * @exception #NFC_ERROR_ILLEGAL_STATE Illegal state
- * @exception #NFC_ERROR_OPERATION_FAILED Operation fail
- */
-bool nfc_manager_is_supported(void);
-
-/**
- * @brief Set NFC Activation state changed callback
- * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
- * @ingroup CAPI_NETWORK_NFC_MANAGER_MODULE
- *
- * @param [in] callback The callback function to invoke when activation state is changed.
- * @param [in] user_data The user data to be passed to the callback function
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #NFC_ERROR_NONE Successful
- * @retval #NFC_ERROR_NOT_SUPPORTED Not supported NFC
- * @retval #NFC_ERROR_NOT_INITIALIZED Not initialized NFC
- * @retval #NFC_ERROR_INVALID_PARAMETER Invalid parameter
- *
- * @see nfc_activation_changed_cb()
- * @see nfc_manager_unset_activation_changed_cb()
- * @see nfc_manager_initialize()
- */
-int nfc_manager_set_activation_changed_cb(nfc_activation_changed_cb callback , void *user_data);
-
-/**
- * @brief Unregisters the callback function.
- * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
- * @ingroup CAPI_NETWORK_NFC_MANAGER_MODULE
- *
- * @remarks The specific error code can be obtained using the get_last_result() method. Error codes are described in Exception section.
- *
- * @exception #NFC_ERROR_NONE Success
- * @exception #NFC_ERROR_NOT_SUPPORTED Not supported NFC
- * @exception #NFC_ERROR_NOT_INITIALIZED Not initialized NFC
- *
- * @see nfc_manager_set_activation_changed_cb()
- * @see nfc_activation_changed_cb()
- * @see nfc_manager_initialize()
- */
-void nfc_manager_unset_activation_changed_cb(void);
-
-/**
- * @brief Sets NFC Activation
- * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
- * @privlevel platform
- * @privilege %http://tizen.org/privilege/nfc.admin
- * @platform
- * @ingroup CAPI_NETWORK_NFC_MANAGER_MODULE
-
- * @param [in] activation The NFC state for setting
- * @param [in] callback The callback function to invoke after this function has completed\n It can be null if notification is not required
- * @param [in] user_data The user data to be passed to the callback function
- *
- * @post It invokes nfc_activation_completed_cb() when it has completed to set activation.\n
- * The Callback can receive error code when process is done.
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #NFC_ERROR_NONE Successful
- * @retval #NFC_ERROR_NOT_SUPPORTED Not supported NFC
- * @retval #NFC_ERROR_NOT_INITIALIZED Not initialized NFC
- * @retval #NFC_ERROR_ALREADY_ACTIVATED Already activated
- * @retval #NFC_ERROR_ALREADY_DEACTIVATED Already deactivated
- * @retval #NFC_ERROR_OUT_OF_MEMORY Out of memory
- * @retval #NFC_ERROR_OPERATION_FAILED Operation fail
- *
- * @see nfc_manager_is_activated()
- * @see nfc_activation_completed_cb()
- * @see nfc_manager_initialize()
-*/
-int nfc_manager_set_activation(bool activation, nfc_activation_completed_cb callback, void *user_data);
-
-/**
- * @brief Gets NFC Activation state
- * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
- * @ingroup CAPI_NETWORK_NFC_MANAGER_MODULE
- * @remarks The specific error code can be obtained using the get_last_result() method. Error codes are described in Exception section.
- * @remarks This function can executed Regardless of nfc_manager_initialize state.
- *
- * @return true on NFC activated,  otherwise false
- * @exception #NFC_ERROR_NONE Success
- * @exception #NFC_ERROR_NOT_SUPPORTED Not supported NFC
- * @exception #NFC_ERROR_ILLEGAL_STATE Illegal state
- * @exception #NFC_ERROR_OPERATION_FAILED Operation fail
- */
-bool nfc_manager_is_activated(void);
-
-/**
- * @brief Initializes NFC Manager.
- * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
- * @ingroup CAPI_NETWORK_NFC_MANAGER_MODULE
- * @remarks This function must be called before proceeding any other nfc functions\n
- *     When an application crashes or exits without the deinitialization. NFC manager automatically deinitializes the process itself.\n
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #NFC_ERROR_NONE Successful
- * @retval #NFC_ERROR_NOT_SUPPORTED Not supported NFC
- * @retval #NFC_ERROR_OPERATION_FAILED Operation fail
- *
- * @see nfc_manager_deinitialize()
- */
-int nfc_manager_initialize(void);
-
-/**
- * @brief Releases all the resource of the NFC Manager and disconnect the session between an application and NFC Manager.
- * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
- * @ingroup CAPI_NETWORK_NFC_MANAGER_MODULE
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #NFC_ERROR_NONE Successful
- * @retval #NFC_ERROR_NOT_SUPPORTED Not supported NFC
- * @retval #NFC_ERROR_OPERATION_FAILED Operation fail
- *
- * @see nfc_manager_initialize()
- */
-int nfc_manager_deinitialize(void);
-
-/**
- * @brief Registers a callback function for receiving tag discovered notification.
- * @ingroup CAPI_NETWORK_NFC_MANAGER_MODULE
- *
- * @param [in] callback The callback function called when a tag is appeared or disappeared
- * @param [in] user_data The user data to be passed to the callback function
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #NFC_ERROR_NONE Successful
- * @retval #NFC_ERROR_NOT_SUPPORTED Not supported NFC
- * @retval #NFC_ERROR_NOT_INITIALIZED Not initialized NFC
- * @retval #NFC_ERROR_INVALID_PARAMETER        Invalid parameter
- *
- * @see nfc_manager_unset_tag_discovered_cb()
- * @see nfc_tag_discovered_cb()
- * @see nfc_manager_initialize()
- */
-int nfc_manager_set_tag_discovered_cb(nfc_tag_discovered_cb callback, void *user_data);
-
-/**
- * @brief Unregisters the callback function.
- * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
- * @ingroup CAPI_NETWORK_NFC_MANAGER_MODULE
- *
- * @remarks The specific error code can be obtained using the get_last_result() method. Error codes are described in Exception section.
- *
- * @exception #NFC_ERROR_NONE Success
- * @exception #NFC_ERROR_NOT_SUPPORTED Not supported NFC
- * @exception #NFC_ERROR_NOT_INITIALIZED Not initialized NFC
- *
- * @see nfc_manager_set_tag_discovered_cb()
- * @see nfc_tag_discovered_cb()
- * @see nfc_manager_initialize()
- */
-void nfc_manager_unset_tag_discovered_cb(void);
-
-/**
- * @brief Registers a callback function for receiving NDEF Message discovered notification
- * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
- * @ingroup CAPI_NETWORK_NFC_MANAGER_MODULE
- *
- * @param [in] callback The callback function called when NDEF Message is discovered
- * @param [in] user_data The user data to be passed to the callback function
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #NFC_ERROR_NONE Successful
- * @retval #NFC_ERROR_NOT_SUPPORTED Not supported NFC
- * @retval #NFC_ERROR_NOT_INITIALIZED Not initialized NFC
- * @retval #NFC_ERROR_INVALID_PARAMETER        Invalid parameter
- *
- * @see nfc_manager_unset_ndef_discovered_cb()
- * @see nfc_ndef_discovered_cb()
- * @see nfc_manager_initialize()
- */
-int nfc_manager_set_ndef_discovered_cb(nfc_ndef_discovered_cb callback, void *user_data);
-
-/**
- * @brief Unregisters the callback function.
- * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
- * @ingroup CAPI_NETWORK_NFC_MANAGER_MODULE
- *
- * @remarks The specific error code can be obtained using the get_last_result() method. Error codes are described in Exception section.
- *
- * @exception #NFC_ERROR_NONE Success
- * @exception #NFC_ERROR_NOT_SUPPORTED Not supported NFC
- * @exception #NFC_ERROR_NOT_INITIALIZED Not initialized NFC
- *
- * @see nfc_manager_set_ndef_discovered_cb()
- * @see nfc_ndef_discovered_cb()
- * @see nfc_manager_initialize()
- */
-void nfc_manager_unset_ndef_discovered_cb(void);
-
-/**
- * @brief Registers a callback function for receiving NFC peer-to-peer target discovered notification.
- * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
- * @ingroup CAPI_NETWORK_NFC_MANAGER_MODULE
- *
- * @param [in] callback The callback function called when NFC peer-to-peer target is discovered
- * @param [in] user_data The user data to be passed to the callback function
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #NFC_ERROR_NONE Successful
- * @retval #NFC_ERROR_NOT_SUPPORTED Not supported NFC
- * @retval #NFC_ERROR_NOT_INITIALIZED Not initialized NFC
- * @retval #NFC_ERROR_INVALID_PARAMETER        Invalid parameter
- *
- * @see nfc_manager_unset_ndef_discovered_cb()
- * @see nfc_p2p_target_discovered_cb()
- * @see nfc_manager_initialize()
- */
-int nfc_manager_set_p2p_target_discovered_cb(nfc_p2p_target_discovered_cb callback, void *user_data);
-
-/**
- * @brief Unregisters the callback function.
- * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
- * @ingroup CAPI_NETWORK_NFC_MANAGER_MODULE
- *
- * @remarks The specific error code can be obtained using the get_last_result() method. Error codes are described in Exception section.
- *
- * @exception #NFC_ERROR_NONE Success
- * @exception #NFC_ERROR_NOT_SUPPORTED Not supported NFC
- * @exception #NFC_ERROR_NOT_INITIALIZED Not initialized NFC
- *
- * @see nfc_manager_set_p2p_target_discovered_cb()
- * @see nfc_p2p_target_discovered_cb()
- * @see nfc_manager_initialize()
- */
-void nfc_manager_unset_p2p_target_discovered_cb(void);
-
-
-/**
- * @brief Registers a callback function for receiving  Secure Element (SIM/UICC(Universal Integrated Circuit Card)) event.
- * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
- * @ingroup CAPI_NETWORK_NFC_MANAGER_MODULE
- *
- * @param [in] callback The callback function called when occurred Secure Element (SIM/UICC(Universal Integrated Circuit Card)) event.
- * @param [in] user_data The user data to be passed to the callback function
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #NFC_ERROR_NONE Successful
- * @retval #NFC_ERROR_NOT_SUPPORTED Not supported NFC
- * @retval #NFC_ERROR_NOT_INITIALIZED Not initialized NFC
- * @retval #NFC_ERROR_INVALID_PARAMETER        Invalid parameter
- *
- * @see nfc_se_event_cb()
- * @see nfc_manager_unset_se_event_cb()
- * @see nfc_manager_initialize()
- */
-
-int nfc_manager_set_se_event_cb(nfc_se_event_cb callback, void *user_data);
-
-/**
- * @brief Unregisters the callback function.
- * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
- * @ingroup CAPI_NETWORK_NFC_MANAGER_MODULE
- *
- * @remarks The specific error code can be obtained using the get_last_result() method. Error codes are described in Exception section.
- *
- * @exception #NFC_ERROR_NONE Success
- * @exception #NFC_ERROR_NOT_SUPPORTED Not supported NFC
- * @exception #NFC_ERROR_NOT_INITIALIZED Not initialized NFC
- *
- * @see nfc_se_event_cb()
- * @see nfc_manager_set_se_event_cb()
- * @see nfc_manager_initialize()
- */
-void nfc_manager_unset_se_event_cb(void);
-
-/**
- * @brief Registers a callback function for receiving  Secure Element (SIM/UICC(Universal Integrated Circuit Card)) transaction event(#NFC_SE_EVENT_TRANSACTION) data.
- * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
- * @ingroup CAPI_NETWORK_NFC_MANAGER_MODULE
- *
- * @param [in] se_type The type of secure element.
- * @param [in] callback The callback function called when occurred SE transaction event.
- * @param [in] user_data The user data to be passed to the callback function
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #NFC_ERROR_NONE Successful
- * @retval #NFC_ERROR_NOT_SUPPORTED Not supported NFC
- * @retval #NFC_ERROR_NOT_INITIALIZED Not initialized NFC
- * @retval #NFC_ERROR_INVALID_PARAMETER        Invalid parameter
- *
- * @see nfc_se_transaction_event_cb()
- * @see nfc_manager_unset_se_transaction_event_cb()
- * @see nfc_manager_initialize()
- */
-int nfc_manager_set_se_transaction_event_cb(nfc_se_type_e se_type, nfc_se_transaction_event_cb callback, void *user_data);
-
-/**
- * @brief Unregisters the callback function.
- * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
- * @ingroup CAPI_NETWORK_NFC_MANAGER_MODULE
- *
- * @param [in] se_type The type of secure element.
- *
- * @remarks The specific error code can be obtained using the get_last_result() method. Error codes are described in Exception section.
- *
- * @exception #NFC_ERROR_NONE Success
- * @exception #NFC_ERROR_NOT_SUPPORTED Not supported NFC
- * @exception #NFC_ERROR_NOT_INITIALIZED Not initialized NFC
- *
- * @see nfc_se_transaction_event_cb()
- * @see nfc_manager_set_se_transaction_event_cb()
- * @see nfc_manager_initialize()
- */
-void nfc_manager_unset_se_transaction_event_cb(nfc_se_type_e se_type);
-
-/**
- * @brief Registers a callback function for receiving HCE(Host Card Emulation) event.
- * @since_tizen 2.3.1
- * @privlevel   public
- * @privilege   %http://tizen.org/privilege/nfc.cardemulation
- * @ingroup CAPI_NETWORK_NFC_MANAGER_MODULE
- *
- * @param [in] callback The callback function called when HCE(Host Card Emulation) event occurred.
- * @param [in] user_data The user data to be passed to the callback function
- *
- * @retval #NFC_ERROR_NONE Successful
- * @retval #NFC_ERROR_NOT_SUPPORTED Not supported NFC
- * @retval #NFC_ERROR_NOT_INITIALIZED Not initialized NFC
- * @retval #NFC_ERROR_INVALID_PARAMETER        Invalid parameter
- * @retval #NFC_ERROR_PERMISSION_DENIED        Permission denied
- *
- * @see nfc_hce_event_cb()
- * @see nfc_manager_unset_hce_event_cb()
- * @see nfc_manager_initialize()
- */
-int nfc_manager_set_hce_event_cb(nfc_hce_event_cb callback, void *user_data);
-
-/**
- * @brief Unregisters the callback function.
- * @since_tizen 2.3.1
- * @privlevel   public
- * @privilege   %http://tizen.org/privilege/nfc.cardemulation
- * @ingroup CAPI_NETWORK_NFC_MANAGER_MODULE
- *
- * @remarks The specific error code can be obtained using the get_last_result() method. Error codes are described in Exception section.
- *
- * @exception #NFC_ERROR_NONE Success
- * @exception #NFC_ERROR_NOT_SUPPORTED Not supported NFC
- * @exception #NFC_ERROR_NOT_INITIALIZED Not initialized NFC
- * @exception #NFC_ERROR_PERMISSION_DENIED     Permission denied
- *
- * @see nfc_hce_event_cb()
- * @see nfc_manager_set_hce_event_cb()
- * @see nfc_manager_initialize()
- */
-void nfc_manager_unset_hce_event_cb(void);
-
-/**
- * @brief give the priority to the foreground application when dispatching transaction event.
- * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
- * @privlevel public
- * @privilege %http://tizen.org/privilege/nfc.cardemulation
- * @ingroup CAPI_NETWORK_NFC_MANAGER_MODULE
- * @remarks This function must be called only when the application is in the foreground. \n
- *     If the application go out from foreground, application must call "nfc_manager_disable_transaction_fg_dispatch" to disable foreground dispatch \n\n
- * @remarks Security level can be determined by the manufacturer usage.\n
- * If a security issue is occurred, contact with the manufacturer of the product.\n
- * If you want to know about security level in detail, See the GSMA specification.\n
- * (http://www.gsma.com/digitalcommerce/wp-content/uploads/2013/12/GSMA-NFC05-NFC-Handset-APIs-Requirement-Specification-version-4-1.pdf)
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #NFC_ERROR_NONE Successful
- * @retval #NFC_ERROR_NOT_SUPPORTED Not supported NFC
- * @retval #NFC_ERROR_NOT_INITIALIZED Not initialized NFC
- * @retval #NFC_ERROR_PERMISSION_DENIED Security restricted by SMACK
- * @retval #NFC_ERROR_OUT_OF_MEMORY Out of memory
- * @retval #NFC_ERROR_DEVICE_BUSY Device is too busy to handle your request
- * @retval #NFC_ERROR_SECURITY_RESTRICTED Security restricted by Access Control
- * @retval #NFC_ERROR_ILLEGAL_STATE Illegal state
- * @retval #NFC_ERROR_OPERATION_FAILED IPC fail
- *
- * @see nfc_manager_disable_transaction_fg_dispatch()
- * @see nfc_manager_initialize()
- */
-int nfc_manager_enable_transaction_fg_dispatch(void);
-
-/**
- * @brief disable foreground dispatch for "EVT_TRANSACTION" to the givin application.
- * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
- * @privlevel public
- * @privilege %http://tizen.org/privilege/nfc.cardemulation
- * @ingroup CAPI_NETWORK_NFC_MANAGER_MODULE
- * @remarks After calling "nfc_manager_enable_transaction_fg_dispatch", an application must call this api when it go out from foureground.  \n\n
- * @remarks Security level can be determined by the manufacturer usage.\n
- * If a security issue is occurred, contact with the manufacturer of the product.\n
- * If you want to know about security level in detail, See the GSMA specification.\n
- * (http://www.gsma.com/digitalcommerce/wp-content/uploads/2013/12/GSMA-NFC05-NFC-Handset-APIs-Requirement-Specification-version-4-1.pdf)
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #NFC_ERROR_NONE Successful
- * @retval #NFC_ERROR_NOT_SUPPORTED Not supported NFC
- * @retval #NFC_ERROR_NOT_INITIALIZED Not initialized NFC
- * @retval #NFC_ERROR_PERMISSION_DENIED Security restricted by SMACK
- * @retval #NFC_ERROR_OUT_OF_MEMORY Out of memory
- * @retval #NFC_ERROR_DEVICE_BUSY Device is too busy to handle your request
- * @retval #NFC_ERROR_SECURITY_RESTRICTED Security restricted by Access Control
- * @retval #NFC_ERROR_ILLEGAL_STATE Illegal state
- * @retval #NFC_ERROR_OPERATION_FAILED IPC fail
- *
- * @see nfc_manager_enable_transaction_fg_dispatch()
- * @see nfc_manager_initialize()
- */
-int nfc_manager_disable_transaction_fg_dispatch(void);
-
-/**
- * @brief Gets NDEF message cached when the tag is detected or when data received from NFC peer-to-peer target.
- * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
- * @ingroup CAPI_NETWORK_NFC_MANAGER_MODULE
- *
- * @remarks This function is used to get the ndef message that was read before launched your application.
- * @param [out] ndef_message The cached NDEF message
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #NFC_ERROR_NONE Successful
- * @retval #NFC_ERROR_NOT_SUPPORTED Not supported NFC
- * @retval #NFC_ERROR_NOT_INITIALIZED Not initialized NFC
- * @retval #NFC_ERROR_OUT_OF_MEMORY Out of memory
- * @retval #NFC_ERROR_INVALID_PARAMETER        Invalid parameter
- * @retval #NFC_ERROR_NO_NDEF_MESSAGE The cached message does not exist
- * @retval #NFC_ERROR_OPERATION_FAILED Operation failed
- *
- * @see nfc_manager_initialize()
- *
- */
-int nfc_manager_get_cached_message(nfc_ndef_message_h *ndef_message);
-
-/**
- * @brief Sets filter of target types.
- * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
- * @ingroup CAPI_NETWORK_NFC_MANAGER_MODULE
- * @remarks Bit operator OR(|) can be used in the configure parameter (like  NFC_TAG_FILTER_ISO14443A_ENABLE | NFC_TAG_FILTER_ISO14443B_ENABLE)
- *     or you may choose "NFC_TAG_ALL_ENABLE" enum value to get all result.
- *     It prevent getting tag types from RF level.
- *     If the client api does call this function, default is always NFC_TAG_ALL_ENABLE.
- *
- * @param [in] filter The filter value with bits operation #nfc_tag_filter_e
- *
- * @remarks The specific error code can be obtained using the get_last_result() method. Error codes are described in Exception section.
- *
- * @exception #NFC_ERROR_NONE Success
- * @exception #NFC_ERROR_NOT_SUPPORTED Not supported NFC
- * @exception #NFC_ERROR_NOT_INITIALIZED Not initialized NFC
- * @exception #NFC_ERROR_INVALID_PARAMETER Invalid parameter
- *
- * @see nfc_manager_get_tag_filter()
- * @see nfc_tag_discovered_cb()
- * @see nfc_manager_initialize()
- */
-void nfc_manager_set_tag_filter(int filter);
-
-/**
- * @brief Gets the current filter status.
- * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
- * @ingroup CAPI_NETWORK_NFC_MANAGER_MODULE
- *
- * @remarks Bit operation OR(|) is used in return data\n
- * The default value is NFC_TAG_FILTER_ALL_ENABLE
- * @remarks The specific error code can be obtained using the get_last_result() method. Error codes are described in Exception section.
- *
- * @return The filter which is set #nfc_tag_filter_e
- *
- * @exception #NFC_ERROR_NONE Success
- * @exception #NFC_ERROR_NOT_SUPPORTED Not supported NFC
- * @exception #NFC_ERROR_NOT_INITIALIZED Not initialized NFC
- *
- * @see nfc_manager_set_tag_filter()
- * @see nfc_manager_initialize()
- */
-int nfc_manager_get_tag_filter(void);
-
-/**
- * @brief Gets current connected tag.
- * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
- * @privlevel public
- * @privilege %http://tizen.org/privilege/nfc
- * @ingroup CAPI_NETWORK_NFC_MANAGER_MODULE
- *
- * @param [out] tag The connected tag
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #NFC_ERROR_NONE Successful
- * @retval #NFC_ERROR_NOT_SUPPORTED Not supported NFC
- * @retval #NFC_ERROR_NOT_INITIALIZED Not initialized NFC
- * @retval #NFC_ERROR_INVALID_PARAMETER        Invalid parameter
- * @retval #NFC_ERROR_NOT_ACTIVATED NFC is not activated
- * @retval #NFC_ERROR_NO_DEVICE There is no connected target
- * @retval #NFC_ERROR_PERMISSION_DENIED Security restricted by SMACK
- * @retval #NFC_ERROR_OUT_OF_MEMORY Out of memory
- * @retval #NFC_ERROR_DEVICE_BUSY Device is too busy to handle your request
- * @retval #NFC_ERROR_NO_DEVICE There is no connected tag
- * @retval #NFC_ERROR_OPERATION_FAILED Operation failed
- *
- * @see nfc_manager_initialize()
- */
-int nfc_manager_get_connected_tag(nfc_tag_h *tag);
-
-/**
- * @brief Gets current connected p2p target
- * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
- * @privlevel public
- * @privilege %http://tizen.org/privilege/nfc
- * @ingroup CAPI_NETWORK_NFC_MANAGER_MODULE
- *
- * @param [out] target The connected target
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #NFC_ERROR_NONE Successful
- * @retval #NFC_ERROR_NOT_SUPPORTED Not supported NFC
- * @retval #NFC_ERROR_NOT_INITIALIZED Not initialized NFC
- * @retval #NFC_ERROR_INVALID_PARAMETER        Invalid parameter
- * @retval #NFC_ERROR_NOT_ACTIVATED NFC is not activated
- * @retval #NFC_ERROR_NO_DEVICE There is no connected target
- * @retval #NFC_ERROR_PERMISSION_DENIED Security restricted by SMACK
- * @retval #NFC_ERROR_OUT_OF_MEMORY Out of memory
- * @retval #NFC_ERROR_DEVICE_BUSY Device is too busy to handle your request
- * @retval #NFC_ERROR_NO_DEVICE There is no connected tag
- * @retval #NFC_ERROR_OPERATION_FAILED Operation failed
- *
- * @see nfc_manager_initialize()
- */
-int nfc_manager_get_connected_target(nfc_p2p_target_h *target);
-
-
-/**
- * @brief Enable or disable the system handling for tag and target discovered event
- * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
- * @privlevel public
- * @privilege %http://tizen.org/privilege/nfc
- * @ingroup CAPI_NETWORK_NFC_MANAGER_MODULE
- * @remarks In default, The system handling is enabled.
- *
- * @param [in] enable The state of enable
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #NFC_ERROR_NONE Successful
- * @retval #NFC_ERROR_NOT_SUPPORTED Not supported NFC
- * @retval #NFC_ERROR_NOT_INITIALIZED Not initialized NFC
- * @retval #NFC_ERROR_NOT_ACTIVATED NFC is not activated
- * @retval #NFC_ERROR_PERMISSION_DENIED Security restricted by SMACK
- * @retval #NFC_ERROR_OPERATION_FAILED Operation failed
- *
- * @see nfc_manager_is_system_handler_enabled()
- * @see nfc_manager_initialize()
- */
-int nfc_manager_set_system_handler_enable(bool enable);
-
-/**
- * @brief Gets the state of the system handler
- * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
- * @privlevel public
- * @privilege %http://tizen.org/privilege/nfc
- * @ingroup CAPI_NETWORK_NFC_MANAGER_MODULE
- * @remarks In default, The system handling is enabled.
- * @remarks The specific error code can be obtained using the get_last_result() method. Error codes are described in Exception section.
- *
- * @return true on enabled, otherwise false.
- *
- * @exception #NFC_ERROR_NONE Success
- * @exception #NFC_ERROR_NOT_SUPPORTED Not supported NFC
- * @exception #NFC_ERROR_NOT_INITIALIZED Not initialized NFC
- * @exception #NFC_ERROR_INVALID_PARAMETER Invalid parameter
- * @exception #NFC_ERROR_NOT_ACTIVATED NFC is not activated
- * @exception #NFC_ERROR_PERMISSION_DENIED Security restricted by SMACK
- * @exception #NFC_ERROR_OPERATION_FAILED Operation failed
- *
- * @see nfc_manager_set_system_handler_enable()
- * @see nfc_manager_initialize()
- */
-bool nfc_manager_is_system_handler_enabled(void);
-
-/**
- * @brief Sets the card emulation Secure Element type
- * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
- * @privlevel public
- * @privilege %http://tizen.org/privilege/nfc.cardemulation
- * @ingroup CAPI_NETWORK_NFC_MANAGER_MODULE
- * @remarks Security level can be determined by the manufacturer usage.\n
- * If a security issue is occurred, contact with the manufacturer of the product.\n
- * If you want to know about security level in detail, See the GSMA specification.\n
- * (http://www.gsma.com/digitalcommerce/wp-content/uploads/2013/12/GSMA-NFC05-NFC-Handset-APIs-Requirement-Specification-version-4-1.pdf)
- *
- * @param [in] type The type of Secure Element
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #NFC_ERROR_NONE Successful
- * @retval #NFC_ERROR_NOT_SUPPORTED Not supported NFC
- * @retval #NFC_ERROR_NOT_INITIALIZED Not initialized NFC
- * @retval #NFC_ERROR_INVALID_PARAMETER        Invalid parameter
- * @retval #NFC_ERROR_NOT_ACTIVATED NFC is not activated
- * @retval #NFC_ERROR_PERMISSION_DENIED Security restricted by SMACK
- * @retval #NFC_ERROR_OUT_OF_MEMORY Out of memory
- * @retval #NFC_ERROR_DEVICE_BUSY Device is too busy to handle your request
- * @retval #NFC_ERROR_SECURITY_RESTRICTED Security restricted by Access Control
- * @retval #NFC_ERROR_ILLEGAL_STATE Illegal state
- * @retval #NFC_ERROR_OPERATION_FAILED Operation failed
- *
- * @see nfc_manager_initialize()
- */
-int nfc_manager_set_se_type(nfc_se_type_e type);
-
-/**
- * @brief Gets the card emulation Secure Element type
- * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
- * @privlevel public
- * @privilege %http://tizen.org/privilege/nfc.cardemulation
- * @ingroup CAPI_NETWORK_NFC_MANAGER_MODULE
- *
- * @param [out] type The type of Secure Element
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #NFC_ERROR_NONE Successful
- * @retval #NFC_ERROR_NOT_SUPPORTED Not supported NFC
- * @retval #NFC_ERROR_NOT_INITIALIZED Not initialized NFC
- * @retval #NFC_ERROR_INVALID_PARAMETER        Invalid parameter
- * @retval #NFC_ERROR_NOT_ACTIVATED NFC is not activated
- * @retval #NFC_ERROR_PERMISSION_DENIED Security restricted by SMACK
- * @retval #NFC_ERROR_OUT_OF_MEMORY Out of memory
- * @retval #NFC_ERROR_DEVICE_BUSY Device is too busy to handle your request
- * @retval #NFC_ERROR_OPERATION_FAILED Operation failed
- *
- * @see nfc_manager_initialize()
- */
-int nfc_manager_get_se_type(nfc_se_type_e *type);
-
-/**
- * @brief Creates a record with given parameter value.
- * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
- * @ingroup CAPI_NETWORK_NFC_NDEF_RECORD_MODULE
- *
- * @remarks Every data buffer is deeply copied.\n
- * Every data is a byte array(binary data).
- *
- * @param [out] record A handle to record
- * @param [in] tnf The type name format
- * @param [in] type The specified type name
- * @param [in] type_size The byte size of type
- * @param [in] id The record ID
- * @param [in] id_size The byte size of ID
- * @param [in] payload The payload of this record
- * @param [in] payload_size The byte size of payload
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #NFC_ERROR_NONE Successful
- * @retval #NFC_ERROR_NOT_SUPPORTED Not supported NFC
- * @retval #NFC_ERROR_NOT_INITIALIZED Not initialized NFC
- * @retval #NFC_ERROR_INVALID_PARAMETER        Invalid parameter
- * @retval #NFC_ERROR_OUT_OF_MEMORY Out of memory
- *
- * @see nfc_ndef_record_create_text()
- * @see nfc_ndef_record_create_uri()
- * @see nfc_ndef_record_create_mime()
- * @see nfc_ndef_record_destroy()
- * @see nfc_manager_initialize()
- */
-int nfc_ndef_record_create(nfc_ndef_record_h *record, nfc_record_tnf_e tnf, const unsigned char *type, int type_size, const unsigned char *id, int id_size, const unsigned char *payload, unsigned int payload_size);
-
-
-/**
- * @brief Creates a record with text type payload
- * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
- * @ingroup CAPI_NETWORK_NFC_NDEF_RECORD_MODULE
- *
- * @remarks This function does not encode the text. @a text will be assumed as that it is already encoded with encode type.\n
- * The text buffer will be deeply copied.\n
- * The record is created in this format\n
- * - TNF : NFC_RECORD_TNF_WELL_KNOWN\n
- * - type : "T"\n
- * - payload : encode and header information + language code + text \n
- * Defined in Record Type Definition Technical Specifications.
- *
- * @param [out] record A handle to record
- * @param [in] text The encoded text
- * @param [in] lang_code The language code string value followed by IANA[RFC 3066] (ex: en-US, ko-KR)
- * @param [in] encode The encoding type
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #NFC_ERROR_NONE Successful
- * @retval #NFC_ERROR_NOT_SUPPORTED Not supported NFC
- * @retval #NFC_ERROR_NOT_INITIALIZED Not initialized NFC
- * @retval #NFC_ERROR_INVALID_PARAMETER        Invalid parameter
- * @retval #NFC_ERROR_OUT_OF_MEMORY Out of memory
- *
- * @see nfc_ndef_record_create()
- * @see nfc_ndef_record_create_uri()
- * @see nfc_ndef_record_create_mime()
- * @see nfc_ndef_record_destroy()
- * @see nfc_ndef_record_get_text()
- * @see nfc_ndef_record_get_langcode()
- * @see nfc_ndef_record_get_encode_type()
- * @see nfc_manager_initialize()
- */
-int nfc_ndef_record_create_text(nfc_ndef_record_h *record, const char *text, const char *lang_code, nfc_encode_type_e encode);
-
-/**
- * @brief Creates a record with URI type payload
- * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
- * @ingroup CAPI_NETWORK_NFC_NDEF_RECORD_MODULE
- *
- * @remarks The uri string will be deep copied.\n
- * The record is created in this format\n
- * - TNF : NFC_RECORD_TNF_WELL_KNOWN\n
- * - type : "U"\n
- * - payload : protocol scheme + uri\n
- * Defined in Record Type Definition Technical Specifications.
- *
- * @param [out] record A handle to record
- * @param [in] uri     The URI string that will be stored in the payload
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #NFC_ERROR_NONE Successful
- * @retval #NFC_ERROR_NOT_SUPPORTED Not supported NFC
- * @retval #NFC_ERROR_NOT_INITIALIZED Not initialized NFC
- * @retval #NFC_ERROR_INVALID_PARAMETER        Invalid parameter
- * @retval #NFC_ERROR_OUT_OF_MEMORY Out of memory
- *
- * @see nfc_ndef_record_create()
- * @see nfc_ndef_record_create_text()
- * @see nfc_ndef_record_create_mime()
- * @see nfc_ndef_record_destroy()
- * @see nfc_ndef_record_get_uri()
- * @see nfc_manager_initialize()
- */
-int nfc_ndef_record_create_uri(nfc_ndef_record_h* record, const char *uri);
-
-
-/**
- * @brief Creates a record with MIME type payload
- * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
- * @ingroup CAPI_NETWORK_NFC_NDEF_RECORD_MODULE
- *
- * @remarks The data buffer will be deep copied.\n
- * The data are bytes array(binary data).\n
- * The mime_type string will deep copied.\n
- * The record is created in this format\n
- * - TNF : NFC_RECORD_TNF_MIME_MEDIA\n
- * - type : mime type\n
- * - payload : data\n
- * Defined in Record Type Definition Technical Specifications.
- *
- * @param [out] record A handle to record
- * @param [in] mime_type       The mime type [RFC 2046] (ex. text/plain, image/jpeg ) This value is stored in type field
- * @param [in] data    The pointer of data
- * @param [in] data_size       The size of data
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #NFC_ERROR_NONE Successful
- * @retval #NFC_ERROR_NOT_SUPPORTED Not supported NFC
- * @retval #NFC_ERROR_NOT_INITIALIZED Not initialized NFC
- * @retval #NFC_ERROR_INVALID_PARAMETER        Invalid parameter
- * @retval #NFC_ERROR_OUT_OF_MEMORY Out of memory
- *
- * @see nfc_ndef_record_create()
- * @see nfc_ndef_record_create_uri()
- * @see nfc_ndef_record_create_text()
- * @see nfc_ndef_record_destroy()
- * @see nfc_ndef_record_get_mime_type()
- * @see nfc_manager_initialize()
- */
-int nfc_ndef_record_create_mime(nfc_ndef_record_h* record, const char *mime_type, const unsigned char *data, unsigned int data_size);
-
-
-/**
- * @brief Destroys the record handle
- * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
- * @ingroup CAPI_NETWORK_NFC_NDEF_RECORD_MODULE
- *
- * @param [in] record The handle to record
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #NFC_ERROR_NONE Successful
- * @retval #NFC_ERROR_NOT_SUPPORTED Not supported NFC
- * @retval #NFC_ERROR_NOT_INITIALIZED Not initialized NFC
- * @retval #NFC_ERROR_INVALID_PARAMETER        Invalid parameter
- *
- * @see nfc_ndef_record_create()
- * @see nfc_ndef_record_create_text()
- * @see nfc_ndef_record_create_uri()
- * @see nfc_ndef_record_create_mime()
- * @see nfc_manager_initialize()
- */
-int nfc_ndef_record_destroy(nfc_ndef_record_h record);
-
-/**
- * @brief Sets record ID
- * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
- * @ingroup CAPI_NETWORK_NFC_NDEF_RECORD_MODULE
- *
- * @remarks The ID buffer are deep copied.
- *
- * @param [in] record The handle to record
- * @param [in] id The record ID
- * @param [in] id_size The size of ID in bytes
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #NFC_ERROR_NONE Successful
- * @retval #NFC_ERROR_NOT_SUPPORTED Not supported NFC
- * @retval #NFC_ERROR_NOT_INITIALIZED Not initialized NFC
- * @retval #NFC_ERROR_INVALID_PARAMETER        Invalid parameter
- *
- * @see nfc_ndef_record_get_id()
- * @see nfc_manager_initialize()
- */
-int nfc_ndef_record_set_id(nfc_ndef_record_h record, unsigned char *id, int id_size);
-
-/**
- * @brief Gets record ID
- * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
- * @ingroup CAPI_NETWORK_NFC_NDEF_RECORD_MODULE
- *
- * @remarks It may return NULL pointer if the ID is not exist\n
- *  This function gives you  the pointer of ID that is contained by record\n
- *  Do not free the ID. It will be released when @a record is destroyed by nfc_ndef_record_destroy().
- *
- * @param [in] record The handle to record
- * @param [out] id The record ID ( do not free )
- * @param [out] size The size of ID in bytes
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #NFC_ERROR_NONE Successful
- * @retval #NFC_ERROR_NOT_SUPPORTED Not supported NFC
- * @retval #NFC_ERROR_NOT_INITIALIZED Not initialized NFC
- * @retval #NFC_ERROR_INVALID_PARAMETER        Invalid parameter
- *
- * @see nfc_ndef_record_set_id()
- * @see nfc_manager_initialize()
- */
-int nfc_ndef_record_get_id(nfc_ndef_record_h record, unsigned char **id, int *size);
-
-/**
- * @brief Gets record payload.
- * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
- * @ingroup CAPI_NETWORK_NFC_NDEF_RECORD_MODULE
- *
- * @remarks This function gives you  the pointer of payload that is contained by record\n
- * Do not free the payload. it will be freed when @a record is destroyed by nfc_ndef_record_destroy().
- *
- * @param [in] record The handle to record
- * @param [out] payload        The payload  ( do not free this pointer )
- * @param [out] size the size of payload in byte
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #NFC_ERROR_NONE Successful
- * @retval #NFC_ERROR_NOT_SUPPORTED Not supported NFC
- * @retval #NFC_ERROR_NOT_INITIALIZED Not initialized NFC
- * @retval #NFC_ERROR_INVALID_PARAMETER        Invalid parameter
- *
- * @see nfc_manager_initialize()
- */
-int nfc_ndef_record_get_payload(nfc_ndef_record_h record, unsigned char ** payload, unsigned int *size);
-
-/**
- * @brief Gets record type.
- * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
- * @ingroup CAPI_NETWORK_NFC_NDEF_RECORD_MODULE
- *
- * @remarks This function gives you  the pointer of type that is contained by record.\n
- * Do not free the type. it will be freed when the record is freed.
- *
- * @param [in] record The handle to record
- * @param [out] type   The record type  ( do not free this pointer )
- * @param [out] size The size of type in byte
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #NFC_ERROR_NONE Successful
- * @retval #NFC_ERROR_NOT_SUPPORTED Not supported NFC
- * @retval #NFC_ERROR_NOT_INITIALIZED Not initialized NFC
- * @retval #NFC_ERROR_INVALID_PARAMETER        Invalid parameter
- *
- * @see nfc_manager_initialize()
- */
-int nfc_ndef_record_get_type(nfc_ndef_record_h record, unsigned char **type, int *size);
-
-/**
- * @brief Gets record TNF(Type Name Format) value.
- * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
- * @ingroup CAPI_NETWORK_NFC_NDEF_RECORD_MODULE
- *
- * @param [in] record The handle to record
- * @param [out] tnf The TNF(Type Name Format) value
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #NFC_ERROR_NONE Successful
- * @retval #NFC_ERROR_NOT_SUPPORTED Not supported NFC
- * @retval #NFC_ERROR_NOT_INITIALIZED Not initialized NFC
- * @retval #NFC_ERROR_INVALID_PARAMETER        Invalid parameter
- *
- * @see nfc_manager_initialize()
- */
-int nfc_ndef_record_get_tnf(nfc_ndef_record_h record, nfc_record_tnf_e *tnf);
-
-/**
- * @brief Gets text from text record
- * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
- * @ingroup CAPI_NETWORK_NFC_NDEF_RECORD_MODULE
- *
- * @remarks This function returns newly allocated string, this value must be deallocated by caller.\n
- * This function is valid only for text type record.\n
- * The text type record 's tnf is NFC_RECORD_TNF_WELL_KNOWN and it's type is "T"
- *
- * @param [in] record The handle to record
- * @param [out] text The text in record payload ( should be freed by caller )
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #NFC_ERROR_NONE Successful
- * @retval #NFC_ERROR_NOT_SUPPORTED Not supported NFC
- * @retval #NFC_ERROR_NOT_INITIALIZED Not initialized NFC
- * @retval #NFC_ERROR_INVALID_PARAMETER        Invalid parameter
- * @retval #NFC_ERROR_INVALID_RECORD_TYPE Invalid record type
- *
- * @see nfc_ndef_record_create_text()
- * @see nfc_manager_initialize()
- */
-int nfc_ndef_record_get_text(nfc_ndef_record_h record, char **text);
-
-/**
- * @brief Gets language code from text record
- * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
- * @ingroup CAPI_NETWORK_NFC_NDEF_RECORD_MODULE
- * @remarks This function returns newly allocated string, this value must be deallocated by caller.\n
- * This function is valid only for text type record.\n
- * The text type record 's tnf is NFC_RECORD_TNF_WELL_KNOWN and it's type is "T"
- *
- * @param [in] record  The handle to record
- * @param [out] lang_code lang code ( should be freed by caller )
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #NFC_ERROR_NONE Successful
- * @retval #NFC_ERROR_NOT_SUPPORTED Not supported NFC
- * @retval #NFC_ERROR_NOT_INITIALIZED Not initialized NFC
- * @retval #NFC_ERROR_INVALID_PARAMETER        Invalid parameter
- * @retval #NFC_ERROR_INVALID_RECORD_TYPE Invalid record type
- *
- * @see nfc_ndef_record_create_text()
- * @see nfc_manager_initialize()
- */
-int nfc_ndef_record_get_langcode(nfc_ndef_record_h record, char **lang_code);
-
-/**
- * @brief Gets encoding type from text record
- * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
- * @ingroup CAPI_NETWORK_NFC_NDEF_RECORD_MODULE
- *
- * @remarks  This function is valid only for text type record.\n
- * The text type record 's tnf is NFC_RECORD_TNF_WELL_KNOWN and it's type is "T"
- *
- * @param [in] record  The handle to record
- * @param [out] encode encode type #nfc_encode_type_e
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #NFC_ERROR_NONE Successful
- * @retval #NFC_ERROR_NOT_SUPPORTED Not supported NFC
- * @retval #NFC_ERROR_NOT_INITIALIZED Not initialized NFC
- * @retval #NFC_ERROR_INVALID_PARAMETER        Invalid parameter
- * @retval #NFC_ERROR_INVALID_RECORD_TYPE Invalid record type
- *
- * @see nfc_ndef_record_create_text()
- * @see nfc_manager_initialize()
- */
-int nfc_ndef_record_get_encode_type(nfc_ndef_record_h record, nfc_encode_type_e *encode);
-
-/**
- * @brief Gets URI from uri record
- * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
- * @ingroup CAPI_NETWORK_NFC_NDEF_RECORD_MODULE
- *
- * @remarks The function returns newly allocated string, this value must be deallocated by caller.\n
- * This function is valid only for uri type record.
- * The uri type record 's tnf is NFC_RECORD_TNF_WELL_KNOWN and it's type is "U"
- *
- * @param [in] record  The handle to record
- * @param [out] uri    The uri in record payload ( should be freed by caller )
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #NFC_ERROR_NONE Successful
- * @retval #NFC_ERROR_NOT_SUPPORTED Not supported NFC
- * @retval #NFC_ERROR_NOT_INITIALIZED Not initialized NFC
- * @retval #NFC_ERROR_INVALID_PARAMETER        Invalid parameter
- * @retval #NFC_ERROR_INVALID_RECORD_TYPE Invalid record type
- *
- * @see nfc_ndef_record_create_uri()
- * @see nfc_manager_initialize()
- */
-int nfc_ndef_record_get_uri(nfc_ndef_record_h record, char **uri);
-
-
-/**
- * @brief Gets mime type from mime type record
- * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
- * @ingroup CAPI_NETWORK_NFC_NDEF_RECORD_MODULE
- *
- * @remarks The function returns newly allocated string, this value must be deallocated by caller.\n
- * This function is valid only for mime type record.\n
- * The uri type record 's tnf is NFC_RECORD_TNF_MIME_MEDIA.
- *
- * @param [in] record  The handle to record
- * @param [out] mime_type      The mime type in record payload ( should be freed by caller )
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #NFC_ERROR_NONE Successful
- * @retval #NFC_ERROR_NOT_SUPPORTED Not supported NFC
- * @retval #NFC_ERROR_NOT_INITIALIZED Not initialized NFC
- * @retval #NFC_ERROR_INVALID_PARAMETER        Invalid parameter
- * @retval #NFC_ERROR_INVALID_RECORD_TYPE Invalid record type
- *
- * @see nfc_ndef_record_create_mime()
- * @see nfc_manager_initialize()
- */
-int nfc_ndef_record_get_mime_type(nfc_ndef_record_h record, char **mime_type);
-
-
-/**
- * @brief Creates NDEF message handle
- * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
- * @ingroup CAPI_NETWORK_NFC_NDEF_MESSAGE_MODULE
- *
- * @param [out] ndef_message A handle to NDEF message
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #NFC_ERROR_NONE Successful
- * @retval #NFC_ERROR_NOT_SUPPORTED Not supported NFC
- * @retval #NFC_ERROR_NOT_INITIALIZED Not initialized NFC
- * @retval #NFC_ERROR_INVALID_PARAMETER        Invalid parameter
- * @retval #NFC_ERROR_OUT_OF_MEMORY Out of memory
- *
- * @see nfc_ndef_message_create_from_rawdata()
- * @see nfc_ndef_message_destroy()
- * @see nfc_manager_initialize()
- */
-int nfc_ndef_message_create(nfc_ndef_message_h *ndef_message);
-
-/**
- * @brief Creates NDEF message handle from raw serial bytes.
- * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
- * @ingroup CAPI_NETWORK_NFC_NDEF_MESSAGE_MODULE
- *
- * @remarks It consumes the bytes array until get the ME(Message End) flag*. It returns error if the bytes array does not have ME flag.\n
- * *The ME flag is a 1-bit field that when set indicates the end of an NDEF message.
- *
- * @param [out] ndef_message The handle to NDEF message
- * @param [in] rawdata The NDEF message in form of bytes array
- * @param [in] rawdata_size The size of bytes array
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #NFC_ERROR_NONE Successful
- * @retval #NFC_ERROR_NOT_SUPPORTED Not supported NFC
- * @retval #NFC_ERROR_NOT_INITIALIZED Not initialized NFC
- * @retval #NFC_ERROR_INVALID_PARAMETER        Invalid parameter
- * @retval #NFC_ERROR_OUT_OF_MEMORY Out of memory
- *
- * @see nfc_ndef_message_create()
- * @see nfc_ndef_message_destroy()
- * @see nfc_ndef_message_get_rawdata()
- * @see nfc_manager_initialize()
- */
-int nfc_ndef_message_create_from_rawdata(nfc_ndef_message_h *ndef_message, const unsigned char *rawdata, unsigned int rawdata_size);
-
-/**
- * @brief Destroys NDEF message handle
- * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
- * @ingroup CAPI_NETWORK_NFC_NDEF_MESSAGE_MODULE
- *
- * @remarks This function will free all these memory including record handles.
- *
- * @param [in] ndef_message The handle to NDEF message to destroy
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #NFC_ERROR_NONE Successful
- * @retval #NFC_ERROR_NOT_SUPPORTED Not supported NFC
- * @retval #NFC_ERROR_NOT_INITIALIZED Not initialized NFC
- * @retval #NFC_ERROR_INVALID_PARAMETER        Invalid parameter
- *
- * @see nfc_ndef_message_create()
- * @see nfc_ndef_message_create_from_rawdata()
- * @see nfc_manager_initialize()
- */
-int nfc_ndef_message_destroy(nfc_ndef_message_h ndef_message);
-
-/**
- * @brief Gets the number of record in NDEF message
- * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
- * @ingroup CAPI_NETWORK_NFC_NDEF_MESSAGE_MODULE
- *
- * @param [in] ndef_message The handle to NDEF message
- * @param [out] count The number of record
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #NFC_ERROR_NONE Successful
- * @retval #NFC_ERROR_NOT_SUPPORTED Not supported NFC
- * @retval #NFC_ERROR_NOT_INITIALIZED Not initialized NFC
- * @retval #NFC_ERROR_INVALID_PARAMETER        Invalid parameter
- *
- * @see nfc_manager_initialize()
- */
-int nfc_ndef_message_get_record_count(nfc_ndef_message_h ndef_message, int *count);
-
-/**
- * @brief Gets serial bytes array of NDEF message.
- * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
- * @ingroup CAPI_NETWORK_NFC_NDEF_MESSAGE_MODULE
- *
- * @remarks It gets copy of the bytes array from NDEF message. @a rawdata must be released with free() by you.
- *
- * @param [in] ndef_message The handle to NDEF message
- * @param [out] rawdata The bytes array of bytes array
- * @param [out] rawdata_size The size of bytes array in byte
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #NFC_ERROR_NONE Successful
- * @retval #NFC_ERROR_NOT_SUPPORTED Not supported NFC
- * @retval #NFC_ERROR_NOT_INITIALIZED Not initialized NFC
- * @retval #NFC_ERROR_INVALID_PARAMETER        Invalid parameter
- * @retval #NFC_ERROR_OUT_OF_MEMORY Out of memory
- * @retval #NFC_ERROR_INVALID_NDEF_MESSAGE Invalid NDEF message
- *
- * @see nfc_ndef_message_create_from_rawdata()
- * @see nfc_manager_initialize()
- */
-int nfc_ndef_message_get_rawdata(nfc_ndef_message_h ndef_message, unsigned char **rawdata, unsigned int *rawdata_size);
-
-/**
- * @brief Appends a record into NDEF message
- * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
- * @ingroup CAPI_NETWORK_NFC_NDEF_MESSAGE_MODULE
- *
- * @remarks Appended record is handled by frameworks. The record is released by frameworks when message is released.
- *
- * @param [in] ndef_message The handle to NDEF message
- * @param [in] record The record that will be appended into NDEF message
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #NFC_ERROR_NONE Successful
- * @retval #NFC_ERROR_NOT_SUPPORTED Not supported NFC
- * @retval #NFC_ERROR_NOT_INITIALIZED Not initialized NFC
- * @retval #NFC_ERROR_INVALID_PARAMETER        Invalid parameter
- *
- * @see nfc_ndef_message_insert_record()
- * @see nfc_ndef_message_remove_record()
- * @see nfc_manager_initialize()
- */
-int nfc_ndef_message_append_record(nfc_ndef_message_h ndef_message, nfc_ndef_record_h record);
-
-/**
- * @brief Inserts a record at index into NDEF message
- * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
- * @ingroup CAPI_NETWORK_NFC_NDEF_MESSAGE_MODULE
- *
- * @remarks Appended record is handled by frameworks. The record is released by frameworks when message is released.\n
- * The index value should not bigger than nfc_ndef_message_get_record_count()
- *
- * @param [in] ndef_message The handle to NDEF message
- * @param [in] index The index of record ( starts from 0 )
- * @param [in] record The record that will be appended into NDEF message
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #NFC_ERROR_NONE Successful
- * @retval #NFC_ERROR_NOT_SUPPORTED Not supported NFC
- * @retval #NFC_ERROR_NOT_INITIALIZED Not initialized NFC
- * @retval #NFC_ERROR_INVALID_PARAMETER        Invalid parameter
- * @retval #NFC_ERROR_INVALID_NDEF_MESSAGE     Invalid NDEF message
- *
- * @see nfc_ndef_message_append_record()
- * @see nfc_ndef_message_remove_record()
- * @see nfc_manager_initialize()
- */
-int nfc_ndef_message_insert_record(nfc_ndef_message_h ndef_message, int index, nfc_ndef_record_h record);
-
-/**
- * @brief Removes the record that indicated by index number and this deleted record will be freed.
- * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
- * @ingroup CAPI_NETWORK_NFC_NDEF_MESSAGE_MODULE
- *
- * @param [in] ndef_message The handle to NDEF message
- * @param [in] index   The index of record ( starts from 0 )
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #NFC_ERROR_NONE Successful
- * @retval #NFC_ERROR_NOT_SUPPORTED Not supported NFC
- * @retval #NFC_ERROR_NOT_INITIALIZED Not initialized NFC
- * @retval #NFC_ERROR_INVALID_PARAMETER        Invalid parameter
- * @retval #NFC_ERROR_INVALID_NDEF_MESSAGE     Invalid NDEF message
- *
- * @see nfc_ndef_message_append_record()
- * @see nfc_ndef_message_insert_record()
- * @see nfc_manager_initialize()
- */
-int nfc_ndef_message_remove_record(nfc_ndef_message_h ndef_message, int index);
-
-/**
- * @brief Gets record by index.
- * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
- * @ingroup CAPI_NETWORK_NFC_NDEF_MESSAGE_MODULE
- *
- * @remarks This function just return the pointer of record. if you change the record value it directly affects the NDEF message
- *
- * @param [in] ndef_message The handle to NDEF message
- * @param [in] index The index of record ( starts from 0 )
- * @param [out] record The handle to record
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #NFC_ERROR_NONE Successful
- * @retval #NFC_ERROR_NOT_SUPPORTED Not supported NFC
- * @retval #NFC_ERROR_NOT_INITIALIZED Not initialized NFC
- * @retval #NFC_ERROR_INVALID_PARAMETER        Invalid parameter
- *
- * @see nfc_manager_initialize()
- */
-int nfc_ndef_message_get_record(nfc_ndef_message_h ndef_message, int index, nfc_ndef_record_h *record);
-
-/**
- * @brief Gets the type of NFC tag
- * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
- * @ingroup CAPI_NETWORK_NFC_TAG_MODULE
- *
- * @param [in] tag The handle to NFC tag
- * @param [out] type The type of NFC tag
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #NFC_ERROR_NONE Successful
- * @retval #NFC_ERROR_NOT_SUPPORTED Not supported NFC
- * @retval #NFC_ERROR_NOT_INITIALIZED Not initialized NFC
- * @retval #NFC_ERROR_INVALID_PARAMETER        Invalid parameter
- * @retval #NFC_ERROR_OPERATION_FAILED Operation failed
- *
- * @see nfc_manager_initialize()
- */
-int nfc_tag_get_type(nfc_tag_h tag, nfc_tag_type_e *type);
-
-/**
- * @brief Checks whether the given NFC tag supports NDEF messages.
- * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
- * @ingroup CAPI_NETWORK_NFC_TAG_MODULE
- *
- * @param [in] tag The handle to NFC tag
- * @param [out] is_supported @c true when NFC tag supports NDEF messages, otherwise @c false
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #NFC_ERROR_NONE Successful
- * @retval #NFC_ERROR_NOT_SUPPORTED Not supported NFC
- * @retval #NFC_ERROR_NOT_INITIALIZED Not initialized NFC
- * @retval #NFC_ERROR_INVALID_PARAMETER        Invalid parameter
- *
- * @see nfc_tag_read_ndef()
- * @see nfc_manager_initialize()
- */
-int nfc_tag_is_support_ndef(nfc_tag_h tag, bool *is_supported);
-
-/**
- * @brief Gets the maximum NDEF message size that can be stored in NFC tag.
- * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
- * @ingroup CAPI_NETWORK_NFC_TAG_MODULE
- *
- * @remarks This max size indicates the maximum size of NDEF message that can be stored in this detected tag.
- *
- * @param [in] tag The handle to NFC tag
- * @param [out] maximum_ndef_bytes_size The maximum bytes size of NDEF message that can be stored in this detected tag.
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #NFC_ERROR_NONE Successful
- * @retval #NFC_ERROR_NOT_SUPPORTED Not supported NFC
- * @retval #NFC_ERROR_NOT_INITIALIZED Not initialized NFC
- * @retval #NFC_ERROR_INVALID_PARAMETER        Invalid parameter
- *
- * @see nfc_manager_initialize()
- */
-int nfc_tag_get_maximum_ndef_size(nfc_tag_h tag, unsigned int *maximum_ndef_bytes_size);
-
-/**
- * @brief Gets size of NDEF message that stored in the tag
- * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
- * @ingroup CAPI_NETWORK_NFC_TAG_MODULE
- *
- * @param [in] tag The handle to NFC tag
- * @param [out] ndef_bytes_size The NDEF message bytes size that stored in the tag
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #NFC_ERROR_NONE Successful
- * @retval #NFC_ERROR_NOT_SUPPORTED Not supported NFC
- * @retval #NFC_ERROR_NOT_INITIALIZED Not initialized NFC
- * @retval #NFC_ERROR_INVALID_PARAMETER        Invalid parameter
- *
- * @see nfc_manager_initialize()
- */
-int nfc_tag_get_ndef_size(nfc_tag_h tag, unsigned int *ndef_bytes_size);
-
-
-/**
- * @brief Retrieves all tag information
- * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
- * @ingroup CAPI_NETWORK_NFC_TAG_MODULE
- *
- * @param[in] tag The handle to NFC tag
- * @param[in] callback The callback function to invoke
- * @param[in] user_data        The user data to be passed to the callback function
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #NFC_ERROR_NONE Successful
- * @retval #NFC_ERROR_NOT_SUPPORTED Not supported NFC
- * @retval #NFC_ERROR_NOT_INITIALIZED Not initialized NFC
- * @retval #NFC_ERROR_INVALID_PARAMETER        Invalid parameter
- * @retval #NFC_ERROR_OUT_OF_MEMORY Out of memory
- *
- * @see nfc_manager_initialize()
- */
-int nfc_tag_foreach_information(nfc_tag_h tag, nfc_tag_information_cb callback, void *user_data);
-
-
-/**
- * @brief Transceives the data of the raw format card.
- * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
- * @privlevel public
- * @privilege %http://tizen.org/privilege/nfc
- * @details This function is the only way to access the raw format card (not formated),
-       each tag type requires own command to access tags. \n
-       This function provides the low level access of tag operation and you require the knowledge of each tag technology.
-* @ingroup CAPI_NETWORK_NFC_TAG_MODULE
-*
-* @param [in] tag The handle to NFC tag
-* @param [in] buffer The binary data for parameter or additional commands
-* @param [in] buffer_size The size of buffer in bytes
-* @param [in] callback The callback function to invoke after this function has completed\n It can be null if a notification is not required
-* @param [in] user_data        The user data to be passed to the callback function
-*
-* @return 0 on success, otherwise a negative error value.
-* @retval #NFC_ERROR_NONE Successful
-* @retval #NFC_ERROR_NOT_SUPPORTED Not supported NFC
-* @retval #NFC_ERROR_NOT_INITIALIZED Not initialized NFC
-* @retval #NFC_ERROR_OUT_OF_MEMORY Out of memory
-* @retval #NFC_ERROR_INVALID_PARAMETER Invalid parameter
-* @retval #NFC_ERROR_DEVICE_BUSY Device is too busy to handle your request
-* @retval #NFC_ERROR_TIMED_OUT Timeout is reached while communicating with tag
-* @retval #NFC_ERROR_NOT_ACTIVATED NFC is not activated
-* @retval #NFC_ERROR_OPERATION_FAILED Operation failed
-*
-* @post It invokes nfc_tag_transceive_completed_cb() when it has completed to transceive data.\n
-* The Callback can receive error code when process is done.
-*
-* @see nfc_tag_read_ndef()
-* @see nfc_tag_is_support_ndef()
-* @see nfc_manager_initialize()
-*/
-int nfc_tag_transceive(nfc_tag_h tag, unsigned char *buffer, int buffer_size, nfc_tag_transceive_completed_cb callback, void *user_data);
-
-/**
- * @brief Reads NDEF formatted data from NFC tag.
- * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
- * @privlevel public
- * @privilege %http://tizen.org/privilege/nfc
- * @ingroup CAPI_NETWORK_NFC_TAG_MODULE
- *
- * @param [in] tag The handle to NFC tag
- * @param [in] callback The callback function to invoke after this function has completed\n It can be null if notification is not required
- * @param [in] user_data The user data to be passed to the callback function
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #NFC_ERROR_NONE Successful
- * @retval #NFC_ERROR_NOT_SUPPORTED Not supported NFC
- * @retval #NFC_ERROR_NOT_INITIALIZED Not initialized NFC
- * @retval #NFC_ERROR_OUT_OF_MEMORY Out of memory
- * @retval #NFC_ERROR_INVALID_PARAMETER        Invalid parameter
- * @retval #NFC_ERROR_DEVICE_BUSY Device is too busy to handle your request
- * @retval #NFC_ERROR_TIMED_OUT Timeout is reached while communicating with tag
- * @retval #NFC_ERROR_NOT_ACTIVATED NFC is not activated
- * @retval #NFC_ERROR_NOT_NDEF_FORMAT Not ndef format tag
- * @retval #NFC_ERROR_OPERATION_FAILED Operation failed
- *
- * @post It invokes nfc_tag_read_completed_cb() when it has completed to read NDEF formatted data.\n
- * The Callback can receive error code when process is done.
- *
- * @see nfc_tag_transceive()
- * @see nfc_tag_is_support_ndef()
- * @see nfc_tag_write_ndef()
- * @see nfc_manager_initialize()
- */
-int nfc_tag_read_ndef(nfc_tag_h tag, nfc_tag_read_completed_cb callback, void *user_data);
-
-/**
- * @brief Writes NDEF formatted data.
- * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
- * @privlevel public
- * @privilege %http://tizen.org/privilege/nfc
- * @ingroup CAPI_NETWORK_NFC_TAG_MODULE
- *
- * @param [in] tag The handle to NFC tag
- * @param [in] msg The message will be write to the tag
- * @param [in] callback The callback function to invoke after this function has completed\n It can be null if notification is not required
- * @param [in] user_data The user data to be passed to the callback function
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #NFC_ERROR_NONE Successful
- * @retval #NFC_ERROR_NOT_SUPPORTED Not supported NFC
- * @retval #NFC_ERROR_NOT_INITIALIZED Not initialized NFC
- * @retval #NFC_ERROR_OUT_OF_MEMORY Out of memory
- * @retval #NFC_ERROR_INVALID_PARAMETER        Invalid parameter
- * @retval #NFC_ERROR_DEVICE_BUSY Device is too busy to handle your request
- * @retval #NFC_ERROR_TIMED_OUT Timeout is reached while communicating with tag
- * @retval #NFC_ERROR_NOT_ACTIVATED NFC is not activated
- * @retval #NFC_ERROR_NOT_NDEF_FORMAT Not ndef format tag
- * @retval #NFC_ERROR_OPERATION_FAILED Operation failed
- *
- * @post It invokes nfc_tag_write_completed_cb() when it has completed to write NDEF data.\n
- * The Callback can receive error code when process is done.
- *
- * @see nfc_tag_is_support_ndef()
- * @see nfc_tag_read_ndef()
- * @see nfc_manager_initialize()
- */
-int nfc_tag_write_ndef(nfc_tag_h tag, nfc_ndef_message_h msg, nfc_tag_write_completed_cb callback, void *user_data);
-
-/**
- * @brief Formats the detected tag that can store NDEF message.
- * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
- * @privlevel public
- * @privilege %http://tizen.org/privilege/nfc
- * @details Some tags are required authentication. If the detected target doesn't need authentication, @a key can be NULL.
- * @ingroup CAPI_NETWORK_NFC_TAG_MODULE
- *
- * @param [in] tag The handle to NFC tag
- * @param [in] key The key value that may need to format the tag
- * @param [in] key_size The size of key in byte
- * @param [in] callback The callback function to invoke after this function has completed\n It can be null if notification is not required
- * @param [in] user_data The user data to be passed to the callback function
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #NFC_ERROR_NONE Successful
- * @retval #NFC_ERROR_NOT_SUPPORTED Not supported NFC
- * @retval #NFC_ERROR_NOT_INITIALIZED Not initialized NFC
- * @retval #NFC_ERROR_OUT_OF_MEMORY Out of memory
- * @retval #NFC_ERROR_INVALID_PARAMETER        Invalid parameter
- * @retval #NFC_ERROR_DEVICE_BUSY Device is too busy to handle your request
- * @retval #NFC_ERROR_TIMED_OUT Timeout is reached while communicating with tag
- * @retval #NFC_ERROR_NOT_ACTIVATED NFC is not activated
- * @retval #NFC_ERROR_NOT_NDEF_FORMAT Not ndef format tag
- * @retval #NFC_ERROR_OPERATION_FAILED Operation failed
- *
- * @post It invokes nfc_tag_format_completed_cb() when it has completed to format the NFC tag.\n
- * The Callback can receive error code when process is done.
- *
- * @see nfc_tag_is_support_ndef()
- * @see nfc_manager_initialize()
- */
-int nfc_tag_format_ndef(nfc_tag_h tag, unsigned char *key, int key_size, nfc_tag_format_completed_cb callback, void *user_data);
-
-/**
- * @ingroup CAPI_NETWORK_NFC_TAG_MIFARE_MODULE
- * @brief Authenticates a sector with key A.
- * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
- * @privlevel public
- * @privilege %http://tizen.org/privilege/nfc
- * @remarks I/O operations(read / write / increment / decrement / transfer / restore) will be available after successful authentication.\n
- * This function is only available for MIFARE classic.\n
- *     \n
- *     MIFARE CLASSIC MINI \n
- *             => 0 ~ 4 : 5 sectors having 4 block each with block size of 16 bytes \n
- *     \n
- *     MIFARE CLASSIC 1K \n
- *             => 0 ~ 15 : 16 sectors having 4 block each with block size of 16 bytes \n
- *     \n
- *     MIFARE CLASSIC 4K \n
- *             => 0 ~ 31 : 32 sectors having 4 block each with block size of 16 bytes  \n
- *             => 32 ~ 39 : 8 sectors having 16 block each with block size of 16 bytes
- *
- * @param[in] tag The handle to NFC tag
- * @param[in] sector_index The index of sector to authenticate with key A, starting from 0
- * @param[in] auth_key 6-byte authentication key
- * @param[in] callback The callback function to invoke after this function has completed\n It can be null if notification is not required
- * @param[in] user_data        The user data to be passed to the callback function
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #NFC_ERROR_NONE Successful
- * @retval #NFC_ERROR_NOT_SUPPORTED Not supported NFC
- * @retval #NFC_ERROR_NOT_INITIALIZED Not initialized NFC
- * @retval #NFC_ERROR_OUT_OF_MEMORY Out of memory
- * @retval #NFC_ERROR_INVALID_PARAMETER        Invalid parameter
- * @retval #NFC_ERROR_DEVICE_BUSY Device is too busy to handle your request
- * @retval #NFC_ERROR_TIMED_OUT Timeout is reached while communicating with tag
- * @retval #NFC_ERROR_NOT_ACTIVATED NFC is not activated
- * @retval #NFC_ERROR_OPERATION_FAILED Operation failed
- *
- * @post It invokes nfc_mifare_authenticate_with_keyA_completed_cb() when it has completed to authenticate the given sector with key A.\n
- * The Callback can receive error code when process is done.
- *
- * @see nfc_mifare_authenticate_with_keyB()
- * @see nfc_mifare_read_block()
- * @see nfc_mifare_read_page()
- * @see nfc_mifare_write_block()
- * @see nfc_mifare_write_page()
- * @see nfc_mifare_increment()
- * @see nfc_mifare_decrement()
- * @see nfc_manager_initialize()
-*/
-int nfc_mifare_authenticate_with_keyA(nfc_tag_h tag, int sector_index, unsigned char *auth_key, nfc_mifare_authenticate_with_keyA_completed_cb callback, void *user_data);
-
-/**
- * @ingroup CAPI_NETWORK_NFC_TAG_MIFARE_MODULE
- * @brief Authenticates a sector with key B.
- * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
- * @privlevel public
- * @privilege %http://tizen.org/privilege/nfc
- * @remarks I/O operations(read / write / increment / decrement / transfer / restore) will be available after successful authentication.\n
- * This function is only available for MIFARE classic.\n
- *     \n
- *     MIFARE CLASSIC MINI\n
- *             => 0 ~ 4 : 5 sector and 4 block with 16 bytes\n
- *     \n
- *     MIFARE CLASSIC 1K \n
- *             => 0 ~ 15 : 16 sector and 4 block with 16 bytes\n
- *     \n
- *     MIFARE CLASSIC 4K\n
- *             => 0 ~ 31 : 32 sector and 4 block with 16 bytes \n
- *             => 32 ~ 39 : 8 sector and 16 block with 16 bytes
- *
- * @param [in] tag The handle to NFC tag
- * @param [in] sector_index The index of sector to authenticate with key B, starting from 0
- * @param [in] auth_key 6-byte authentication key
- * @param [in] callback The callback function to invoke after this function has completed\n It can be null if notification is not required
- * @param [in] user_data The user data to be passed to the callback function
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #NFC_ERROR_NONE Successful
- * @retval #NFC_ERROR_NOT_SUPPORTED Not supported NFC
- * @retval #NFC_ERROR_NOT_INITIALIZED Not initialized NFC
- * @retval #NFC_ERROR_OUT_OF_MEMORY Out of memory
- * @retval #NFC_ERROR_INVALID_PARAMETER        Invalid parameter
- * @retval #NFC_ERROR_DEVICE_BUSY Device is too busy to handle your request
- * @retval #NFC_ERROR_TIMED_OUT Timeout is reached while communicating with tag
- * @retval #NFC_ERROR_NOT_ACTIVATED NFC is not activated
- * @retval #NFC_ERROR_OPERATION_FAILED Operation failed
- *
- * @post It invokes nfc_mifare_authenticate_with_keyB_completed_cb() when it has completed to authenticate the given sector with key B.\n
- * The Callback can receive error code when process is done.
- *
- * @see nfc_mifare_authenticate_with_keyA()
- * @see nfc_mifare_read_block()
- * @see nfc_mifare_read_page()
- * @see nfc_mifare_write_block()
- * @see nfc_mifare_write_page()
- * @see nfc_mifare_increment()
- * @see nfc_mifare_decrement()
- * @see nfc_manager_initialize()
-*/
-int nfc_mifare_authenticate_with_keyB(nfc_tag_h tag, int sector_index, unsigned char *auth_key, nfc_mifare_authenticate_with_keyB_completed_cb callback, void *user_data);
-
-
-/**
- * @ingroup CAPI_NETWORK_NFC_TAG_MIFARE_MODULE
- * @brief Reads a 16-byte block.
- * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
- * @privlevel public
- * @privilege %http://tizen.org/privilege/nfc
- * @remarks This function is only available for MIFARE classic.
- *
- * @param [in] tag The handle to NFC tag
- * @param [in] block_index The block or starting page number
- * @param [in] callback        The callback function to invoke after this function has completed\n It can be null if notification is not required
- * @param [in] user_data The user data to be passed to the callback function
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #NFC_ERROR_NONE Successful
- * @retval #NFC_ERROR_NOT_SUPPORTED Not supported NFC
- * @retval #NFC_ERROR_NOT_INITIALIZED Not initialized NFC
- * @retval #NFC_ERROR_OUT_OF_MEMORY Out of memory
- * @retval #NFC_ERROR_INVALID_PARAMETER        Invalid parameter
- * @retval #NFC_ERROR_DEVICE_BUSY Device is too busy to handle your request
- * @retval #NFC_ERROR_TIMED_OUT Timeout is reached while communicating with tag
- * @retval #NFC_ERROR_NOT_ACTIVATED NFC is not activated
- * @retval #NFC_ERROR_OPERATION_FAILED Operation failed
- *
- * @post It invokes nfc_mifare_read_block_completed_cb() when it has completed to read a block.\n
- * The Callback can receive error code when process is done.
- *
- * @see nfc_mifare_read_page()
- * @see nfc_mifare_write_block()
- * @see nfc_manager_initialize()
-*/
-int nfc_mifare_read_block(nfc_tag_h tag, int block_index, nfc_mifare_read_block_completed_cb callback, void *user_data);
-
-/**
- * @ingroup CAPI_NETWORK_NFC_TAG_MIFARE_MODULE
- * @brief Reads 4 pages(16 bytes).
- * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
- * @privlevel public
- * @privilege %http://tizen.org/privilege/nfc
- * @remarks This function is only available for MIFARE Ultra light.\n
- * The MIFARE Ultralight protocol always reads 4 pages at a time, to reduce the number of commands required to read an entire tag.
- *
- * @param [in] tag The handle to NFC tag
- * @param [in] page_index  The index of page to read, starting from 0
- * @param [in] callback        The callback function to invoke after this function has completed\n It can be null if notification is not required
- * @param [in] user_data The user data to be passed to the callback function
- *
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #NFC_ERROR_NONE Successful
- * @retval #NFC_ERROR_NOT_SUPPORTED Not supported NFC
- * @retval #NFC_ERROR_NOT_INITIALIZED Not initialized NFC
- * @retval #NFC_ERROR_OUT_OF_MEMORY Out of memory
- * @retval #NFC_ERROR_INVALID_PARAMETER        Invalid parameter
- * @retval #NFC_ERROR_DEVICE_BUSY Device is too busy to handle your request
- * @retval #NFC_ERROR_TIMED_OUT Timeout is reached while communicating with tag
- * @retval #NFC_ERROR_NOT_ACTIVATED NFC is not activated
- * @retval #NFC_ERROR_OPERATION_FAILED Operation failed
- *
- * @post It invokes nfc_mifare_read_page_completed_cb() when it has completed to read a page.\n
- * The Callback can receive error code when process is done.
- *
- * @see nfc_mifare_read_block()
- * @see nfc_mifare_write_page()
- * @see nfc_manager_initialize()
-*/
-int nfc_mifare_read_page(nfc_tag_h tag, int page_index, nfc_mifare_read_page_completed_cb callback, void *user_data);
-
-/**
- * @ingroup CAPI_NETWORK_NFC_TAG_MIFARE_MODULE
- * @brief Writes block (16 byte) of data to the tag at a given block index.
- * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
- * @privlevel public
- * @privilege %http://tizen.org/privilege/nfc
- * @remarks This function is only available for MIFARE classic.
- *
- * @param [in] tag The handle to NFC tag
- * @param [in] block_index The index of block to read, starting from 0
- * @param [in] buffer 16 bytes of data to write
- * @param [in] buffer_size The size of buffer in bytes
- * @param [in] callback The callback function to invoke after this function has completed\n It can be null if notification is not required
- * @param [in] user_data The user data to be passed to the callback function
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #NFC_ERROR_NONE Successful
- * @retval #NFC_ERROR_NOT_SUPPORTED Not supported NFC
- * @retval #NFC_ERROR_NOT_INITIALIZED Not initialized NFC
- * @retval #NFC_ERROR_OUT_OF_MEMORY Out of memory
- * @retval #NFC_ERROR_INVALID_PARAMETER        Invalid parameter
- * @retval #NFC_ERROR_NOT_INITIALIZED Not initialized
- * @retval #NFC_ERROR_DEVICE_BUSY Device is too busy to handle your request
- * @retval #NFC_ERROR_TIMED_OUT Timeout is reached while communicating with tag
- * @retval #NFC_ERROR_NOT_ACTIVATED NFC is not activated
- * @retval #NFC_ERROR_OPERATION_FAILED Operation failed
- *
- * @post It invokes nfc_mifare_write_block_completed_cb() when it has completed to write a block.\n The Callback can receive error code when process is done.
- *
- * @see nfc_mifare_write_page()
- * @see nfc_mifare_read_block()
- * @see nfc_manager_initialize()
-*/
-int nfc_mifare_write_block(nfc_tag_h tag, int block_index, unsigned char *buffer, int buffer_size, nfc_mifare_write_block_completed_cb callback, void *user_data);
-
-/**
- * @ingroup CAPI_NETWORK_NFC_TAG_MIFARE_MODULE
- * @brief Writes a page (4 bytes) of data to the tag at a given page index
- * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
- * @privlevel public
- * @privilege %http://tizen.org/privilege/nfc
- * @remarks This function is only available for MIFARE Ultra light
- *
- * @param [in] tag The handle to NFC tag
- * @param [in] page_index The index of page to write, starting from 0
- * @param [in] buffer 4 bytes of data to write
- * @param [in] buffer_size The size of buffer in bytes
- * @param [in] callback The callback function to invoke after this function has completed\n It can be null if notification is not required
- * @param [in] user_data The user data to be passed to the callback function
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #NFC_ERROR_NONE Successful
- * @retval #NFC_ERROR_NOT_SUPPORTED Not supported NFC
- * @retval #NFC_ERROR_NOT_INITIALIZED Not initialized NFC
- * @retval #NFC_ERROR_OUT_OF_MEMORY Out of memory
- * @retval #NFC_ERROR_INVALID_PARAMETER        Invalid parameter
- * @retval #NFC_ERROR_DEVICE_BUSY Device is too busy to handle your request
- * @retval #NFC_ERROR_TIMED_OUT Timeout is reached while communicating with tag
- * @retval #NFC_ERROR_NOT_ACTIVATED NFC is not activated
- * @retval #NFC_ERROR_OPERATION_FAILED Operation failed
- *
- * @post It invokes nfc_mifare_write_page_completed_cb() when it has completed to write a page.\n
- * The Callback can receive error code when process is done.
- *
- * @see nfc_mifare_write_block()
- * @see nfc_mifare_read_page()
- * @see nfc_manager_initialize()
-*/
-int nfc_mifare_write_page(nfc_tag_h tag, int page_index, unsigned char *buffer, int buffer_size, nfc_mifare_write_page_completed_cb callback, void *user_data);
-
-/**
- * @ingroup CAPI_NETWORK_NFC_TAG_MIFARE_MODULE
- * @brief Increases a value block, storing the result in the temporary block on the tag.
- * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
- * @privlevel public
- * @privilege %http://tizen.org/privilege/nfc
- * @remarks This function is only available for MIFARE classic
- *
- * @param [in] tag The handle to NFC tag
- * @param [in] block_index The index of block to increase, starting from 0
- * @param [in] value Non-negative to increment by
- * @param [in] callback The callback function to invoke after this function has completed\n It can be null if notification is not required
- * @param [in] user_data The user data to be passed to the callback function
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #NFC_ERROR_NONE Successful
- * @retval #NFC_ERROR_NOT_SUPPORTED Not supported NFC
- * @retval #NFC_ERROR_NOT_INITIALIZED Not initialized NFC
- * @retval #NFC_ERROR_OUT_OF_MEMORY Out of memory
- * @retval #NFC_ERROR_INVALID_PARAMETER        Invalid parameter
- * @retval #NFC_ERROR_NOT_INITIALIZED Not initialized
- * @retval #NFC_ERROR_DEVICE_BUSY Device is too busy to handle your request
- * @retval #NFC_ERROR_TIMED_OUT Timeout is reached while communicating with tag
- * @retval #NFC_ERROR_NOT_ACTIVATED NFC is not activated
- * @retval #NFC_ERROR_OPERATION_FAILED Operation failed
- *
- * @post It invokes nfc_mifare_increment_completed_cb() when it has completed to increment.\n
- * The Callback can receive error code when process is done.
- *
- * @see nfc_mifare_decrement()
- * @see nfc_mifare_write_block()
- * @see nfc_manager_initialize()
-*/
-int nfc_mifare_increment(nfc_tag_h tag, int block_index, int value, nfc_mifare_increment_completed_cb callback, void *user_data);
-
-/**
- * @ingroup CAPI_NETWORK_NFC_TAG_MIFARE_MODULE
- * @brief Decreases a value block, storing the result in the temporary block on the tag.
- * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
- * @privlevel public
- * @privilege %http://tizen.org/privilege/nfc
- * @remarks  This function is only available for MIFARE classic
- *
- * @param [in] tag The handle to NFC tag
- * @param [in] block_index The index of block to decrease, starting from 0
- * @param [in] value non-negative to decrement by
- * @param [in] callback The callback function to invoke after this function has completed\n It can be null if notification is not required
- * @param [in] user_data The user data to be passed to the callback function
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #NFC_ERROR_NONE Successful
- * @retval #NFC_ERROR_NOT_SUPPORTED Not supported NFC
- * @retval #NFC_ERROR_NOT_INITIALIZED Not initialized NFC
- * @retval #NFC_ERROR_OUT_OF_MEMORY Out of memory
- * @retval #NFC_ERROR_INVALID_PARAMETER        Invalid parameter
- * @retval #NFC_ERROR_DEVICE_BUSY Device is too busy to handle your request
- * @retval #NFC_ERROR_TIMED_OUT Timeout is reached while communicating with tag
- * @retval #NFC_ERROR_NOT_ACTIVATED NFC is not activated
- * @retval #NFC_ERROR_OPERATION_FAILED Operation failed
- *
- * @post It invokes nfc_mifare_decrement_completed_cb() when it has completed to decrement.\n
- * The Callback can receive error code when process is done.
- *
- * @see nfc_mifare_increment()
- * @see nfc_mifare_write_block()
- * @see nfc_manager_initialize()
-*/
-int nfc_mifare_decrement(nfc_tag_h tag, int block_index, int value, nfc_mifare_decrement_completed_cb callback, void *user_data);
-
-/**
- * @ingroup CAPI_NETWORK_NFC_TAG_MIFARE_MODULE
- * @brief Copy from the temporary block to the specified block.
- * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
- * @privlevel public
- * @privilege %http://tizen.org/privilege/nfc
- * @remarks This function is only available for MIFARE classic
- *
- * @param [in] tag The handle to NFC tag
- * @param [in] block_index The index of block to copy to, starting from 0
- * @param [in] callback The callback function to invoke after this function has completed\n It can be null if notification is not required
- * @param [in] user_data The user data to be passed to the callback function
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #NFC_ERROR_NONE Successful
- * @retval #NFC_ERROR_NOT_SUPPORTED Not supported NFC
- * @retval #NFC_ERROR_NOT_INITIALIZED Not initialized NFC
- * @retval #NFC_ERROR_OUT_OF_MEMORY Out of memory
- * @retval #NFC_ERROR_INVALID_PARAMETER        Invalid parameter
- * @retval #NFC_ERROR_DEVICE_BUSY Device is too busy to handle your request
- * @retval #NFC_ERROR_TIMED_OUT Timeout is reached while communicating with tag
- * @retval #NFC_ERROR_NOT_ACTIVATED NFC is not activated
- * @retval #NFC_ERROR_OPERATION_FAILED Operation failed
- *
- * @post It invokes nfc_mifare_transfer_completed_cb() when it has completed to transfer.\n
- * The Callback can receive error code when process is done.
- *
- * @see nfc_mifare_restore()
- * @see nfc_manager_initialize()
-*/
-int nfc_mifare_transfer(nfc_tag_h tag, int block_index, nfc_mifare_transfer_completed_cb callback, void *user_data);
-
-/**
- * @ingroup CAPI_NETWORK_NFC_TAG_MIFARE_MODULE
- * @brief Copy from a value block to the temporary block.
- * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
- * @privlevel public
- * @privilege %http://tizen.org/privilege/nfc
- * @remarks This function is only available for MIFARE classic
- *
- * @param [in] tag The handle to NFC tag
- * @param [in] block_index The index of block to copy from, starting from 0
- * @param [in] callback The callback function to invoke after this function has completed\n It can be null if notification is not required
- * @param [in] user_data The user data to be passed to the callback function
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #NFC_ERROR_NONE Successful
- * @retval #NFC_ERROR_NOT_SUPPORTED Not supported NFC
- * @retval #NFC_ERROR_NOT_INITIALIZED Not initialized NFC
- * @retval #NFC_ERROR_OUT_OF_MEMORY Out of memory
- * @retval #NFC_ERROR_INVALID_PARAMETER        Invalid parameter
- * @retval #NFC_ERROR_DEVICE_BUSY Device is too busy to handle your request
- * @retval #NFC_ERROR_TIMED_OUT Timeout is reached while communicating with tag
- * @retval #NFC_ERROR_NOT_ACTIVATED NFC is not activated
- * @retval #NFC_ERROR_OPERATION_FAILED Operation failed
- *
- * @post It invokes nfc_mifare_restore_completed_cb() when it has completed to restore.\n
- * The Callback can receive error code when process is done.
- *
- * @see nfc_mifare_transfer()
- * @see nfc_manager_initialize()
-*/
-int nfc_mifare_restore(nfc_tag_h tag, int block_index, nfc_mifare_restore_completed_cb callback, void *user_data);
-
-/**
- * @brief Registers a callback function for receiving data from NFC peer-to-peer target.
- * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
- * @ingroup CAPI_NETWORK_NFC_P2P_MODULE
- *
- * @param [in] target The handle to peer target
- * @param [in] callback The callback function to invoke when an NDEF Message is discovered
- * @param [in] user_data The user data to be passed to the callback function
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #NFC_ERROR_NONE Successful
- * @retval #NFC_ERROR_NOT_SUPPORTED Not supported NFC
- * @retval #NFC_ERROR_NOT_INITIALIZED Not initialized NFC
- * @retval #NFC_ERROR_INVALID_PARAMETER        Invalid parameter
- *
- * @see nfc_p2p_set_data_received_cb()
- * @see nfc_p2p_unset_data_received_cb()
- * @see nfc_p2p_target_discovered_cb()
- * @see nfc_manager_initialize()
- */
-int nfc_p2p_set_data_received_cb(nfc_p2p_target_h target, nfc_p2p_data_received_cb callback, void *user_data);
-
-/**
- * @brief Unregisters the callback function.
- * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
- * @ingroup CAPI_NETWORK_NFC_P2P_MODULE
- *
- * @param [in] target The handle to peer target
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #NFC_ERROR_NONE Successful
- * @retval #NFC_ERROR_NOT_SUPPORTED Not supported NFC
- * @retval #NFC_ERROR_NOT_INITIALIZED Not initialized NFC
- * @retval #NFC_ERROR_INVALID_PARAMETER        Invalid parameter
- *
- * @see nfc_p2p_set_data_received_cb()
- * @see nfc_p2p_unset_data_received_cb()
- * @see nfc_p2p_target_discovered_cb()
- * @see nfc_manager_initialize()
- */
-int nfc_p2p_unset_data_received_cb(nfc_p2p_target_h target);
-
-/**
- * @brief Sends data to NFC peer-to-peer target
- * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
- * @privlevel public
- * @privilege %http://tizen.org/privilege/nfc
- * @ingroup CAPI_NETWORK_NFC_P2P_MODULE
- *
- * @param [in] target The handle to peer target
- * @param [in] message The message to send
- * @param [in] callback The callback function to invoke after this function has completed\n It can be null if notification is not required
- * @param [in] user_data The user data to be passed to the callback function
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #NFC_ERROR_NONE Successful
- * @retval #NFC_ERROR_NOT_SUPPORTED Not supported NFC
- * @retval #NFC_ERROR_NOT_INITIALIZED Not initialized NFC
- * @retval #NFC_ERROR_OUT_OF_MEMORY Out of memory
- * @retval #NFC_ERROR_OPERATION_FAILED Operation failed
- * @retval #NFC_ERROR_INVALID_PARAMETER        Invalid parameter
- * @retval #NFC_ERROR_DEVICE_BUSY Device is too busy to handle your request
- * @retval #NFC_ERROR_NOT_ACTIVATED NFC is not activated
- *
- * @post It invokes nfc_p2p_send_completed_cb() when it has completed to p2p send.\n
- * The Callback can receive error code when process is done.
- *
- * @see nfc_p2p_send_completed_cb()
- * @see nfc_p2p_target_discovered_cb()
- * @see nfc_manager_initialize()
-*/
-int nfc_p2p_send(nfc_p2p_target_h target, nfc_ndef_message_h message, nfc_p2p_send_completed_cb callback, void *user_data);
-
-/**
- * @brief Start peer-to-peer server using SNEP protocol
- * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
- * @privlevel public
- * @privilege %http://tizen.org/privilege/nfc
- * @ingroup CAPI_NETWORK_NFC_P2P_MODULE
- *
- * @param [in] target The handle to peer target
- * @param [in] san The name of service (service access name)
- * @param [in] sap The number of service (service access point)
- * @param [in] callback The callback function to invoke after this function has completed\n It can be null if notification is not required
- * @param [in] user_data The user data to be passed to the callback function
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #NFC_ERROR_NONE Successful
- * @retval #NFC_ERROR_NOT_SUPPORTED Not supported NFC
- * @retval #NFC_ERROR_NOT_INITIALIZED Not initialized NFC
- * @retval #NFC_ERROR_OUT_OF_MEMORY Out of memory
- * @retval #NFC_ERROR_OPERATION_FAILED Operation failed
- * @retval #NFC_ERROR_INVALID_PARAMETER        Invalid parameter
- * @retval #NFC_ERROR_DEVICE_BUSY Device is too busy to handle your request
- * @retval #NFC_ERROR_NOT_ACTIVATED NFC is not activated
- *
- * @post It invokes nfc_snep_event_cb() when snep event is occured.\n
- * The Callback can receive error code when process is done.
- *
- * @see nfc_snep_event_cb()
- * @see nfc_manager_initialize()
-*/
-int nfc_snep_start_server(nfc_p2p_target_h target, const char *san, int sap, nfc_snep_event_cb callback, void *user_data);
-
-/**
- * @brief Start peer-to-peer client using SNEP protocol
- * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
- * @privlevel public
- * @privilege %http://tizen.org/privilege/nfc
- * @ingroup CAPI_NETWORK_NFC_P2P_MODULE
- *
- * @param [in] target The handle to peer target
- * @param [in] san The name of service (service access name)
- * @param [in] sap The number of service (service access point)
- * @param [in] callback The callback function to invoke after this function has completed\n It can be null if notification is not required
- * @param [in] user_data The user data to be passed to the callback function
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #NFC_ERROR_NONE Successful
- * @retval #NFC_ERROR_NOT_SUPPORTED Not supported NFC
- * @retval #NFC_ERROR_NOT_INITIALIZED Not initialized NFC
- * @retval #NFC_ERROR_OUT_OF_MEMORY Out of memory
- * @retval #NFC_ERROR_OPERATION_FAILED Operation failed
- * @retval #NFC_ERROR_INVALID_PARAMETER        Invalid parameter
- * @retval #NFC_ERROR_DEVICE_BUSY Device is too busy to handle your request
- * @retval #NFC_ERROR_NOT_ACTIVATED NFC is not activated
- *
- * @post It invokes nfc_snep_event_cb() when snep event is occured.\n
- * The Callback can receive error code when process is done.
- *
- * @see nfc_snep_event_cb()
- * @see nfc_snep_send_client_request()
- * @see nfc_snep_stop_service()
- * @see nfc_manager_initialize()
-*/
-int nfc_snep_start_client(nfc_p2p_target_h target, const char *san, int sap, nfc_snep_event_cb callback, void *user_data);
-
-/**
- * @brief Send request message to peer-to-peer client using SNEP protocol
- * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
- * @privlevel public
- * @privilege %http://tizen.org/privilege/nfc
- * @ingroup CAPI_NETWORK_NFC_P2P_MODULE
- *
- * @param [in] handle The handle to connected snep instance
- * @param [in] type The request type of snep protocol
- * @param [in] msg The ndef message which will be sent
- * @param [in] callback The callback function to invoke after this function has completed\n It can be null if notification is not required
- * @param [in] user_data The user data to be passed to the callback function
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #NFC_ERROR_NONE Successful
- * @retval #NFC_ERROR_NOT_SUPPORTED Not supported NFC
- * @retval #NFC_ERROR_NOT_INITIALIZED Not initialized NFC
- * @retval #NFC_ERROR_OUT_OF_MEMORY Out of memory
- * @retval #NFC_ERROR_OPERATION_FAILED Operation failed
- * @retval #NFC_ERROR_INVALID_PARAMETER        Invalid parameter
- * @retval #NFC_ERROR_DEVICE_BUSY Device is too busy to handle your request
- * @retval #NFC_ERROR_NOT_ACTIVATED NFC is not activated
- *
- * @post It invokes nfc_snep_event_cb() when snep event is occured.\n
- * The Callback can receive error code when process is done.
- *
- * @see nfc_snep_event_cb()
- * @see nfc_manager_initialize()
-*/
-int nfc_snep_send_client_request(nfc_p2p_snep_h handle, nfc_snep_type_e type, nfc_ndef_message_h msg, nfc_snep_event_cb callback, void *user_data);
-
-/**
- * @brief Stop snep server or client
- * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
- * @privlevel public
- * @privilege %http://tizen.org/privilege/nfc
- * @ingroup CAPI_NETWORK_NFC_P2P_MODULE
- *
- * @param [in] target The handle to peer target
- * @param [in] service The handle which will be stopped
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #NFC_ERROR_NONE Successful
- * @retval #NFC_ERROR_NOT_SUPPORTED Not supported NFC
- * @retval #NFC_ERROR_NOT_INITIALIZED Not initialized NFC
- * @retval #NFC_ERROR_OPERATION_FAILED Operation failed
- * @retval #NFC_ERROR_INVALID_PARAMETER        Invalid parameter
- * @retval #NFC_ERROR_NOT_ACTIVATED NFC is not activated
- *
- * @see nfc_snep_event_cb()
- * @see nfc_manager_initialize()
-*/
-int nfc_snep_stop_service(nfc_p2p_target_h target, nfc_p2p_snep_h service);
-
-/**
- * @brief Register peer-to-peer server using SNEP protocol
- * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
- * @privlevel public
- * @privilege %http://tizen.org/privilege/nfc
- * @ingroup CAPI_NETWORK_NFC_P2P_MODULE
- *
- * @param [in] san The name of service (service access name)
- * @param [in] sap The number of service (service access point)
- * @param [in] callback The callback function to invoke after this function has completed\n It can be null if notification is not required
- * @param [in] user_data The user data to be passed to the callback function
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #NFC_ERROR_NONE Successful
- * @retval #NFC_ERROR_NOT_SUPPORTED Not supported NFC
- * @retval #NFC_ERROR_NOT_INITIALIZED Not initialized NFC
- * @retval #NFC_ERROR_OUT_OF_MEMORY Out of memory
- * @retval #NFC_ERROR_OPERATION_FAILED Operation failed
- * @retval #NFC_ERROR_INVALID_PARAMETER        Invalid parameter
- * @retval #NFC_ERROR_DEVICE_BUSY Device is too busy to handle your request
- * @retval #NFC_ERROR_NOT_ACTIVATED NFC is not activated
- *
- * @post It invokes nfc_snep_event_cb() when snep event is occured.\n
- * The Callback can receive error code when process is done.
- *
- * @see nfc_snep_event_cb()
- * @see nfc_manager_initialize()
-*/
-int nfc_snep_register_server(const char *san, int sap, nfc_snep_event_cb callback, void *user_data);
-
-/**
- * @brief Unregister snep server or client
- * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
- * @privlevel public
- * @privilege %http://tizen.org/privilege/nfc
- * @ingroup CAPI_NETWORK_NFC_P2P_MODULE
- *
- * @param [in] san The name of service (service access name)
- * @param [in] sap The number of service (service access point)
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #NFC_ERROR_NONE Successful
- * @retval #NFC_ERROR_NOT_SUPPORTED Not supported NFC
- * @retval #NFC_ERROR_NOT_INITIALIZED Not initialized NFC
- * @retval #NFC_ERROR_OPERATION_FAILED Operation failed
- * @retval #NFC_ERROR_INVALID_PARAMETER        Invalid parameter
- * @retval #NFC_ERROR_NOT_ACTIVATED NFC is not activated
- *
- * @see nfc_snep_event_cb()
- * @see nfc_manager_initialize()
-*/
-int nfc_snep_unregister_server(const char *san, int sap);
-
-/**
- * @brief Enable card emulation mode.
- * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
- * @privlevel public
- * @privilege %http://tizen.org/privilege/nfc.cardemulation
- * @ingroup CAPI_NETWORK_NFC_SE_MODULE
- * @remarks Security level can be determined by the manufacturer usage.\n
- * If a security issue is occurred, contact with the manufacturer of the product.\n
- * If you want to know about security level in detail, See the GSMA specification.\n
- * (http://www.gsma.com/digitalcommerce/wp-content/uploads/2013/12/GSMA-NFC05-NFC-Handset-APIs-Requirement-Specification-version-4-1.pdf)
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #NFC_ERROR_NONE Successful
- * @retval #NFC_ERROR_NOT_SUPPORTED Not supported NFC
- * @retval #NFC_ERROR_NOT_INITIALIZED Not intialized NFC
- * @retval #NFC_ERROR_NOT_ACTIVATED NFC is not activated
- * @retval #NFC_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #NFC_ERROR_OPERATION_FAILED Operation failed
- * @retval #NFC_ERROR_PERMISSION_DENIED Security Restricted by SMACK
- * @retval #NFC_ERROR_SECURITY_RESTRICTED Security Restricted
- * @retval #NFC_ERROR_DEVICE_BUSY Device is too busy to handle your request
- * @retval #NFC_ERROR_OUT_OF_MEMORY Out of memory
- *
- * @see nfc_se_disable_card_emulation()
- * @see nfc_manager_initialize()
- */
-int nfc_se_enable_card_emulation(void);
-
-/**
- * @brief Disable card emulation mode.
- * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
- * @privlevel public
- * @privilege %http://tizen.org/privilege/nfc.cardemulation
- * @ingroup CAPI_NETWORK_NFC_SE_MODULE
- * @remarks Security level can be determined by the manufacturer usage.\n
- * If a security issue is occurred, contact with the manufacturer of the product.\n
- * If you want to know about security level in detail, See the GSMA specification.\n
- * (http://www.gsma.com/digitalcommerce/wp-content/uploads/2013/12/GSMA-NFC05-NFC-Handset-APIs-Requirement-Specification-version-4-1.pdf)
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #NFC_ERROR_NONE Successful
- * @retval #NFC_ERROR_NOT_SUPPORTED Not supported NFC
- * @retval #NFC_ERROR_NOT_INITIALIZED Not intialized NFC
- * @retval #NFC_ERROR_NOT_ACTIVATED NFC is not activated
- * @retval #NFC_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #NFC_ERROR_OPERATION_FAILED Operation failed
- * @retval #NFC_ERROR_PERMISSION_DENIED Security Restricted by SMACK
- * @retval #NFC_ERROR_SECURITY_RESTRICTED Security Restricted
- * @retval #NFC_ERROR_DEVICE_BUSY Device is too busy to handle your request
- * @retval #NFC_ERROR_OUT_OF_MEMORY Out of memory
- *
- * @see nfc_se_enable_card_emulation()
- * @see nfc_manager_initialize()
- */
-int nfc_se_disable_card_emulation(void);
-
-/**
- * @brief Get the current card emulation mode.
- * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
- * @privlevel public
- * @privilege %http://tizen.org/privilege/nfc.cardemulation
- * @ingroup CAPI_NETWORK_NFC_SE_MODULE
- *
- * @param [out]  type   The current card emulation mode type
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #NFC_ERROR_NONE Successful
- * @retval #NFC_ERROR_NOT_SUPPORTED Not supported NFC
- * @retval #NFC_ERROR_NOT_INITIALIZED Not intialized NFC
- * @retval #NFC_ERROR_NOT_ACTIVATED NFC is not activated
- * @retval #NFC_ERROR_OPERATION_FAILED Operation failed
- * @retval #NFC_ERROR_PERMISSION_DENIED Security Restricted by SMACK
- * @retval #NFC_ERROR_DEVICE_BUSY Device is too busy to handle your request
- * @retval #NFC_ERROR_OUT_OF_MEMORY Out of memory
- *
- * @see nfc_se_enable_card_emulation()
- * @see nfc_se_disable_card_emulation()
- * @see nfc_manager_initialize()
- */
-int nfc_se_get_card_emulation_mode(nfc_se_card_emulation_mode_type_e *type);
-
-/**
- * @brief Send APDU(Application Protocol Data Unit) response to CLF(Contactless Front-end).
- * @since_tizen 2.3.1
- * @privlevel   public
- * @privilege   %http://tizen.org/privilege/nfc.cardemulation
- * @ingroup CAPI_NETWORK_NFC_SE_MODULE
- *
- * @param [in]  handle   The handle of connected secure element
- * @param [in] resp     The bytes array of response data
- * @param [in] resp_len The size of response bytes array
- *
- * @retval #NFC_ERROR_NONE Successful
- * @retval #NFC_ERROR_NOT_SUPPORTED Not supported NFC
- * @retval #NFC_ERROR_NOT_INITIALIZED Not initialized NFC
- * @retval #NFC_ERROR_NOT_ACTIVATED NFC is not activated
- * @retval #NFC_ERROR_ILLEGAL_STATE Illegal state
- * @retval #NFC_ERROR_INVALID_PARAMETER        Invalid parameter
- * @retval #NFC_ERROR_OUT_OF_MEMORY Out of memory
- * @retval #NFC_ERROR_PERMISSION_DENIED        Permission denied
- *
- * @see nfc_manager_set_hce_event_cb()
- * @see nfc_manager_unset_hce_event_cb()
- * @see nfc_manager_initialize()
- */
-int nfc_hce_send_apdu_response(nfc_se_h handle, unsigned char *resp, unsigned int resp_len);
-
-/**
- * @brief Set the default route for each device status.
- * @since_tizen 2.3.1
- * @privlevel   public
- * @privilege   %http://tizen.org/privilege/nfc.cardemulation
- * @ingroup CAPI_NETWORK_NFC_SE_MODULE
- *
- * @param [in] powered_on_status The type of default Secure Element when device is powered on
- * @param [in] powered_off_status The type of default Secure Element when device is powered off
- * @param [in] low_battery_status The type of default Secure Element when battery is low
- *
- * @retval #NFC_ERROR_NONE Successful
- * @retval #NFC_ERROR_NOT_SUPPORTED Not supported NFC
- * @retval #NFC_ERROR_NOT_INITIALIZED Not initialized NFC
- * @retval #NFC_ERROR_NOT_ACTIVATED NFC is not activated
- * @retval #NFC_ERROR_ILLEGAL_STATE Illegal state
- * @retval #NFC_ERROR_INVALID_PARAMETER        Invalid parameter
- * @retval #NFC_ERROR_OUT_OF_MEMORY Out of memory
- * @retval #NFC_ERROR_PERMISSION_DENIED        Permission denied
- *
- * @see nfc_manager_initialize()
- */
-int nfc_se_set_default_route(nfc_se_type_e powered_on_status, nfc_se_type_e powered_off_status, nfc_se_type_e low_battery_status);
-
-/**
- * @brief Gets the state whether an application to call this api is currently the activated handler for specific AID.
- * @since_tizen 2.3.1
- * @privlevel   public
- * @privilege   %http://tizen.org/privilege/nfc.cardemulation
- * @ingroup CAPI_NETWORK_NFC_SE_MODULE
- *
- * @param [in] se_type The type of Secure Element
- * @param [in] aid Application Id, specified in ISO/IEC 7816-4
- * @param [out] is_activated_handler @c true when application is currently the activated handler, otherwise @c false
- *
- * @retval #NFC_ERROR_NONE Successful
- * @retval #NFC_ERROR_NOT_SUPPORTED Not supported NFC
- * @retval #NFC_ERROR_NOT_INITIALIZED Not initialized NFC
- * @retval #NFC_ERROR_NOT_ACTIVATED NFC is not activated
- * @retval #NFC_ERROR_ILLEGAL_STATE Illegal state
- * @retval #NFC_ERROR_INVALID_PARAMETER        Invalid parameter
- * @retval #NFC_ERROR_OUT_OF_MEMORY Out of memory
- * @retval #NFC_ERROR_PERMISSION_DENIED        Permission denied
- *
- * @see nfc_manager_initialize()
- */
-int nfc_se_is_activated_handler_for_aid(nfc_se_type_e se_type, const char *aid, bool *is_activated_handler);
-
-/**
- * @brief Gets the state whether an application to call this api is currently the activated handler for category.
- * @since_tizen 2.3.1
- * @privlevel   public
- * @privilege   %http://tizen.org/privilege/nfc.cardemulation
- * @ingroup CAPI_NETWORK_NFC_SE_MODULE
- *
- * @param [in] se_type The type of Secure Element
- * @param [in] category The category
- * @param [out] is_activated_handler @c true when application is currently the activated handler, otherwise @c false
- *
- * @retval #NFC_ERROR_NONE Successful
- * @retval #NFC_ERROR_NOT_SUPPORTED Not supported NFC
- * @retval #NFC_ERROR_NOT_INITIALIZED Not initialized NFC
- * @retval #NFC_ERROR_NOT_ACTIVATED NFC is not activated
- * @retval #NFC_ERROR_ILLEGAL_STATE Illegal state
- * @retval #NFC_ERROR_INVALID_PARAMETER        Invalid parameter
- * @retval #NFC_ERROR_OUT_OF_MEMORY Out of memory
- * @retval #NFC_ERROR_PERMISSION_DENIED        Permission denied
- *
- * @see nfc_manager_initialize()
- */
-int nfc_se_is_activated_handler_for_category(nfc_se_type_e se_type, nfc_card_emulation_category_type_e category, bool *is_activated_handler);
-
-/**
- * @brief Registers a AID for a specific category.
- * @since_tizen 2.3.1
- * @privlevel   public
- * @privilege   %http://tizen.org/privilege/nfc.cardemulation
- * @ingroup CAPI_NETWORK_NFC_SE_MODULE
- *
- * @param [in] se_type The type of Secure Element
- * @param [in] category The category
- * @param [in] aid Application Id, specified in ISO/IEC 7816-4
- *
- * @retval #NFC_ERROR_NONE Successful
- * @retval #NFC_ERROR_NOT_SUPPORTED Not supported NFC
- * @retval #NFC_ERROR_NOT_INITIALIZED Not initialized NFC
- * @retval #NFC_ERROR_NOT_ACTIVATED NFC is not activated
- * @retval #NFC_ERROR_ILLEGAL_STATE Illegal state
- * @retval #NFC_ERROR_INVALID_PARAMETER        Invalid parameter
- * @retval #NFC_ERROR_OUT_OF_MEMORY Out of memory
- * @retval #NFC_ERROR_AID_ALREADY_REGISTERED AID is already registered
- * @retval #NFC_ERROR_PERMISSION_DENIED        Permission denied
- *
- * @see nfc_se_unregister_aid()
- * @see nfc_manager_initialize()
- */
-int nfc_se_register_aid(nfc_se_type_e se_type, nfc_card_emulation_category_type_e category, const char *aid);
-
-/**
- * @brief Unregisters a previously registered AID for the specified category.
- * @details You can unregister aid only you registered. If you try to release the aid what you are not registered, then the api return error.
- * @since_tizen 2.3.1
- * @privlevel   public
- * @privilege   %http://tizen.org/privilege/nfc.cardemulation
- * @ingroup CAPI_NETWORK_NFC_SE_MODULE
- *
- * @param [in] se_type The type of Secure Element
- * @param [in] category The category
- * @param [in] aid Application Id, specified in ISO/IEC 7816-4
- *
- * @retval #NFC_ERROR_NONE Successful
- * @retval #NFC_ERROR_NOT_SUPPORTED Not supported NFC
- * @retval #NFC_ERROR_NOT_INITIALIZED Not initialized NFC
- * @retval #NFC_ERROR_NOT_ACTIVATED NFC is not activated
- * @retval #NFC_ERROR_ILLEGAL_STATE Illegal state
- * @retval #NFC_ERROR_INVALID_PARAMETER        Invalid parameter
- * @retval #NFC_ERROR_OUT_OF_MEMORY Out of memory
- * @retval #NFC_ERROR_PERMISSION_DENIED        Permission denied
- *
- * @see nfc_se_register_aid()
- * @see nfc_manager_initialize()
- */
-int nfc_se_unregister_aid(nfc_se_type_e se_type, nfc_card_emulation_category_type_e category, const char *aid);
-
-/**
- * @brief Retrieves all registered AID.
- * @details You can retrives aid only you registered. If you try to retrives the aid what you are not registered, then the api return error.
- * @since_tizen 2.3.1
- * @privlevel   public
- * @privilege   %http://tizen.org/privilege/nfc.cardemulation
- * @ingroup CAPI_NETWORK_NFC_SE_MODULE
- *
- * @param [in] se_type The type of Secure Element
- * @param [in] category The category
- * @param [in] callback        The callback function to invoke
- * @param [in] user_data The user data to be passed to the callback function
- *
- * @retval #NFC_ERROR_NONE Successful
- * @retval #NFC_ERROR_NOT_SUPPORTED Not supported NFC
- * @retval #NFC_ERROR_NOT_INITIALIZED Not initialized NFC
- * @retval #NFC_ERROR_NOT_ACTIVATED NFC is not activated
- * @retval #NFC_ERROR_ILLEGAL_STATE Illegal state
- * @retval #NFC_ERROR_INVALID_PARAMETER        Invalid parameter
- * @retval #NFC_ERROR_OUT_OF_MEMORY Out of memory
- *
- * @see nfc_manager_initialize()
- *
- */
-int nfc_se_foreach_registered_aids(nfc_se_type_e se_type, nfc_card_emulation_category_type_e category, nfc_se_registered_aid_cb callback, void *user_data);
-
-/**
- * @brief Sets the application as a preferred handler.
- * @since_tizen 3.0
- * @details This api is possible to call when your application is in the foreground.\n
- * We recommend that you call api when the app state is resume.
- * @privlevel   public
- * @privilege   %http://tizen.org/privilege/nfc.cardemulation
- * @ingroup CAPI_NETWORK_NFC_SE_MODULE
- *
- * @retval #NFC_ERROR_NONE Successful
- * @retval #NFC_ERROR_NOT_SUPPORTED Not supported NFC
- * @retval #NFC_ERROR_NOT_INITIALIZED Not initialized NFC
- * @retval #NFC_ERROR_NOT_ACTIVATED NFC is not activated
- * @retval #NFC_ERROR_OPERATION_FAILED Operation failed
- * @retval #NFC_ERROR_PERMISSION_DENIED Permission denied
- *
- * @see nfc_manager_initialize()
- * @see nfc_se_unset_preferred_handler()
- *
- */
-int nfc_se_set_preferred_handler(void);
-
-
-/**
- * @brief Unsets the application as a preferred handler.
- * @since_tizen 3.0
- * @details We recommend that you call api when the app state is pause.\n
- * If you do not call the api, Tizen will initialize the preferred app properly.\n
- * But there may be a problem with the performance, we recommend your explicit call.
- *
- * @privlevel   public
- * @privilege   %http://tizen.org/privilege/nfc.cardemulation
- * @ingroup CAPI_NETWORK_NFC_SE_MODULE
- *
- * @retval #NFC_ERROR_NONE Successful
- * @retval #NFC_ERROR_NOT_SUPPORTED Not supported NFC
- * @retval #NFC_ERROR_NOT_INITIALIZED Not initialized NFC
- * @retval #NFC_ERROR_NOT_ACTIVATED NFC is not activated
- * @retval #NFC_ERROR_OPERATION_FAILED Operation failed
- * @retval #NFC_ERROR_PERMISSION_DENIED Permission denied
- *
- * @see nfc_manager_initialize()
- * @see nfc_se_set_preferred_handler()
- *
- */
-int nfc_se_unset_preferred_handler(void);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __NFC_H__ */
diff --git a/test/include/nfc_common.h b/test/include/nfc_common.h
deleted file mode 100644 (file)
index f592d1e..0000000
+++ /dev/null
@@ -1,157 +0,0 @@
-/*
-* Copyright (c) 2012, 2013 Samsung Electronics Co., Ltd.
-*
-* 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.
-*/
-
-#ifndef __NFC_LOG_H__
-#define __NFC_LOG_H__
-
-#include <unistd.h>
-#include <glib.h>
-#include <gio/gio.h>
-
-#include <dlog.h>
-#include <vconf.h>
-#include <system_info.h>
-
-#include "net_nfc.h"
-#include "nfc.h"
-#include "nfc_internal.h"
-
-#define COLOR_RED              "\033[0;31m"
-#define COLOR_GREEN            "\033[0;32m"
-#define COLOR_BROWN            "\033[0;33m"
-#define COLOR_BLUE             "\033[0;34m"
-#define COLOR_PURPLE           "\033[0;35m"
-#define COLOR_CYAN             "\033[0;36m"
-#define COLOR_LIGHTBLUE                "\033[0;37m"
-#define COLOR_END              "\033[0;m"
-
-#define NFC_FEATURE "http://tizen.org/feature/network.nfc"
-#define NFC_TAG_FEATURE "http://tizen.org/feature/network.nfc.tag"
-#define NFC_P2P_FEATURE "http://tizen.org/feature/network.nfc.p2p"
-#define NFC_CE_FEATURE "http://tizen.org/feature/network.nfc.card_emulation"
-#define NFC_CE_HCE_FEATURE "http://tizen.org/feature/network.nfc.card_emulation.hce"
-
-#define CHECK_INIT() \
-               do { \
-                       if (nfc_common_is_initialized() == false) { \
-                               LOG_ERR("[ERROR][%s] NFC not initialized", __func__); \
-                               return NFC_ERROR_NOT_INITIALIZED; \
-                       } \
-               } while (0)
-
-#define CHECK_SUPPORTED(str) \
-               do { \
-                       if (nfc_common_is_supported(str) == false) { \
-                               LOG_ERR("[ERROR][%s] NFC not supported", __func__); \
-                               return NFC_ERROR_NOT_SUPPORTED; \
-                       } \
-               } while (0)
-
-#define CHECK_ACTIVATED() \
-               do { \
-                       if (!nfc_manager_is_activated()) { \
-                               LOG_ERR("[ERROR][%s] NFC not activated", __func__); \
-                               return NFC_ERROR_NOT_ACTIVATED; \
-                       } \
-               } while (0)
-
-#define CHECK_INVALID(expr) \
-               do { \
-                       if (expr) { \
-                               LOG_ERR("[ERROR][%s] INVALID PARAMETER (%s)", __func__, #expr); \
-                               return NFC_ERROR_INVALID_PARAMETER; \
-                       } \
-               } while (0)
-
-#define CHECK_APP_PERMISSION() \
-               do {\
-                       if (nfc_common_check_app_permission() == false) { \
-                               LOG_ERR("[ERROR][%s] Permission check fail", __func__); \
-                               return NFC_ERROR_SECURITY_RESTRICTED; \
-                       } \
-               } while (0)
-
-#ifdef LOG_TAG
-#undef LOG_TAG
-#endif
-
-#define LOG_TAG "NFC_CAPI"
-
-#define LOG_DEBUG(fmt, ...) \
-       do { \
-               LOGD(COLOR_BROWN" " fmt COLOR_END, ##__VA_ARGS__); \
-       } while (0)
-#define LOG_ERR(fmt, ...) \
-       do { \
-               LOGE(COLOR_RED" " fmt COLOR_END, ##__VA_ARGS__); \
-       } while (0)
-#define LOG_BEGIN() \
-       do { \
-               LOGD(COLOR_BLUE"BEGIN >>>>"COLOR_END); \
-       } while (0)
-#define LOG_END() \
-       do { \
-               LOGD(COLOR_BLUE"END <<<<"COLOR_END); \
-       } while (0)
-
-typedef struct {
-       bool                            initialized;
-       bool                            on_activation_doing;
-
-       net_nfc_target_info_h           current_tag;
-
-       net_nfc_target_handle_h         current_target;
-
-       nfc_tag_discovered_cb           on_tag_discovered_cb;
-       void                            *on_tag_discovered_user_data;
-
-       nfc_ndef_discovered_cb          on_ndef_discovered_cb;
-       void                            *on_ndef_discovered_user_data;
-
-       nfc_p2p_target_discovered_cb    on_p2p_target_discovered_cb;
-       void                            *on_p2p_target_discovered_user_data;
-
-       nfc_p2p_data_received_cb                on_p2p_recv_cb;
-       void                            *on_p2p_recv_user_data;
-
-       nfc_se_event_cb                 on_se_event_cb;
-       void                            *on_se_event_user_data;
-
-       nfc_se_transaction_event_cb     on_se_transaction_event_cb;
-       void                            *on_se_transaction_event_user_data;
-
-       nfc_connection_handover_event_cb on_handover_event_cb;
-       void                            *on_handover_event_user_data;
-
-       nfc_hce_event_cb on_hce_event_cb;
-       void                            *on_hce_event_user_data;
-
-       nfc_se_registered_aid_cb on_se_registered_aid_cb;
-       void                            *on_se_registered_aid_cb_user_data;
-}
-_nfc_context_s;
-
-extern _nfc_context_s gdbus_nfc_context;
-
-pid_t nfc_common_get_focus_app_pid();
-char * nfc_common_get_bt_address_string(data_h data);
-bool nfc_common_check_app_permission();
-int nfc_common_convert_error_code(const char *func, int native_error_code);
-bool nfc_common_is_initialized();
-bool nfc_common_is_supported(char *str);
-int nfc_common_get_rawdata_size(nfc_ndef_message_h ndef_message, unsigned int *byte_size);
-
-#endif /* __NFC_LOG_H__ */
diff --git a/test/include/nfc_internal.h b/test/include/nfc_internal.h
deleted file mode 100755 (executable)
index 8b79a81..0000000
+++ /dev/null
@@ -1,562 +0,0 @@
-/*
- * Copyright (c) 2012, 2013 Samsung Electronics Co., Ltd.
- *
- * 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.
- */
-
-
-#ifndef __NFC_INTERNAL_H__
-#define __NFC_INTERNAL_H__
-
-#include "nfc.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/**
- * @brief Enumerations for Handover event
- * @ingroup CAPI_NETWORK_NFC_HANDOVER_MODULE
- */
-typedef enum {
-       NFC_HANDOVER_EVENT_START = 0x00, /**< handover started */
-       NFC_HANDOVER_EVENT_FINISH = 0x01, /**< handover finished */
-} nfc_handover_event_e;
-
-/**
- * @brief Enumerations for NFC AC(Alternative Carrier)
- * @ingroup CAPI_NETWORK_NFC_HANDOVER_MODULE
- */
-typedef enum {
-       NFC_AC_TYPE_BT = 0x00, /**< Bluetooth AC*/
-       NFC_AC_TYPE_WIFI, /**<Wifi AC*/
-       NFC_AC_TYPE_WIFI_DIRECT,/**<Wifi-direct AC*/
-       NFC_AC_TYPE_UNKNOWN, /* No selected preferred AC */
-} nfc_ac_type_e ;
-
-/**
- * @brief Enumerations for NFC AC(Alternative Carrier) state
- * @ingroup CAPI_NETWORK_NFC_HANDOVER_MODULE
- */
-typedef enum {
-       NFC_AC_STATE_INACTIVATE = 0x00, /**< inactivate */
-       NFC_AC_STATE_ACTIVATE, /**<  activated */
-       NFC_AC_STATE_ACTIVATING,/**< now activating */
-       NFC_AC_STATE_UNKNOWN, /**< unknown */
-} nfc_ac_state_e;
-
-typedef enum {
-       NFC_SE_POWER_MODE_SLEEP = 0x00, /**< sleep mode */
-       NFC_SE_POWER_MODE_ON = 0x01, /**< Power On */
-       NFC_SE_POWER_MODE_OFF = 0x02, /**< Power Off */
-} nfc_se_power_type_e;
-
-/**
- * @brief The handle to the Connection Handover message
- * @ingroup CAPI_NETWORK_NFC_HANDOVER_MODULE
- */
-typedef struct _net_nfc_ch_message_s *nfc_handover_message_h;
-
-/**
- * @brief The handle to the Connection Handover carrier
- * @ingroup CAPI_NETWORK_NFC_HANDOVER_MODULE
- */
-typedef struct _net_nfc_ch_carrier_s *nfc_handover_carrier_h;
-
-/**
- * @brief The handle to the Connection Handover carrier configuration
- * @ingroup CAPI_NETWORK_NFC_HANDOVER_MODULE
- */
-typedef struct _net_nfc_carrier_config_s *nfc_handover_config_h;
-
-/**
- * @brief Called after nfc_p2p_connection_handover() has completed.
- * @ingroup CAPI_NETWORK_NFC_HANDOVER_MODULE
- *
- * @remark To use the @a ac_data outside this function, copy the @a ac_data.
- * @remark @a ac_data could be NULL, if nfc_p2p_connection_handover failed.
- * @remark If @a carrier is #NFC_AC_TYPE_BT, @ac_data should be converted to 'char *' type. This is bluetooth address information.
- *
- * @param [in] result The result of function call
- * @param [in] carrier The type of Alternative Carrier
- * @param [in] ac_data The connected remote device AC(Alternative Carrier) information data
- * @param [in] ac_data_size The connected remote device AC(Alternative Carrier) information data size
- * @param [in] user_data The user data passed from nfc_p2p_connection_handover()
- *
- * @see nfc_p2p_connection_handover()
- */
-typedef void (*nfc_p2p_connection_handover_completed_cb)(nfc_error_e result, nfc_ac_type_e carrier, void *ac_data, int ac_data_size, void *user_data);
-
-
-/**
- * @brief Called when connection handover is started or finished.
- * @ingroup CAPI_NETWORK_NFC_HANDOVER_MODULE
- *
- * @remark To use the @a address outside this function, copy the @a address.
- * @remark @a address is NULL when is called by start event
- *
- * @param [in] result  The result of function call
- * @param [in] event   The event type of current invocation
- * @param [in] carrier The type of Alternative Carrier
- * @param [in] address The unique id of connected remote device
- * @param [in] msg     The original ndef message of current handover operation
- * @param [in] user_data The user data passed from nfc_connection_handover_set_event_cb()
- *
- * @see nfc_connection_handover_set_event_cb()
- * @see nfc_connection_handover_unset_event_cb()
- */
-typedef void (*nfc_connection_handover_event_cb)(nfc_error_e result, nfc_handover_event_e event, nfc_ac_type_e carrier, char *address, nfc_ndef_message_h msg, void *user_data);
-
-
-/**
- * @brief NFC Connection handover between NFC peer-to-peer target
- * @since_tizen 2.3
- * @ingroup CAPI_NETWORK_NFC_HANDOVER_MODULE
- *
- * @param [in] target The handle to NFC device
- * @param [in] type Preferred Alternative Carrier
- * @param [in] callback The callback function to invoke after this function has completed\n It can be null if notification is not required
- * @param [in] user_data The user data to be passed to the callback function *
- * @return 0 on success, otherwise a negative error value.
- * @retval #NFC_ERROR_NONE Successful
- * @retval #NFC_ERROR_OUT_OF_MEMORY Out of memory
- * @retval #NFC_ERROR_OPERATION_FAILED Operation failed
- * @retval #NFC_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #NFC_ERROR_DEVICE_BUSY Device is too busy to handle your request
- * @retval #NFC_ERROR_NOT_ACTIVATED NFC is not activated
- *
- * @see nfc_p2p_connection_handover_completed_cb()
-*/
-int nfc_p2p_connection_handover(nfc_p2p_target_h target , nfc_ac_type_e type, nfc_p2p_connection_handover_completed_cb callback, void *user_data);
-
-/**
- * @brief Check available Alternative Carrier(AC) for NFC handover
- * @since_tizen 2.3
- * @ingroup CAPI_NETWORK_NFC_HANDOVER_MODULE
- *
- * @param [in] carrier Alternative Carrier when to be checked whether supported or not
- *
- * @retval #true Supported
- * @retval #false Not Supported
- *
- * @see nfc_p2p_is_supported_ac_type()
-*/
-bool nfc_p2p_is_supported_ac_type(nfc_ac_type_e carrier);
-
-/**
- * @brief Registers a callback function for receiving event of connection handover.
- * @since_tizen 2.3
- * @ingroup CAPI_NETWORK_NFC_HANDOVER_MODULE
- *
- * @param [in] callback The callback function to invoke when handover event occurs
- * @param [in] user_data The user data to be passed to the callback function
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #NFC_ERROR_NONE Successful
- * @retval #NFC_ERROR_INVALID_PARAMETER Invalid parameter
- *
- * @see nfc_connection_handover_unset_event_cb()
- * @see nfc_connection_handover_event_cb()
- */
-int nfc_connection_handover_set_event_cb(nfc_connection_handover_event_cb callback, void *user_data);
-
-
-/**
- * @brief Unregisters the callback function
- * @since_tizen 2.3
- * @ingroup CAPI_NETWORK_NFC_HANDOVER_MODULE
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #NFC_ERROR_NONE Successful
- *
- * @see nfc_connection_handover_set_event_cb()
- * @see nfc_connection_handover_event_cb()
- */
-int nfc_connection_handover_unset_event_cb(void);
-
-/**
- * @brief create handover message instance from ndef message
- * @since_tizen 2.3
- * @ingroup CAPI_NETWORK_NFC_HANDOVER_MODULE
- *
- * @remarks There is no relation or memory share between @a msg and @a result.
- * @remarks After using handover message, @a result must be destroyed by nfc_handover_message_destroy()
- *
- * @param [out] result The instance of created handover message
- * @param [in]  msg    The instance of source ndef message
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #NFC_ERROR_NONE Successful
- * @retval #NFC_ERROR_INVALID_PARAMETER Invalid parameter
- *
- * @see nfc_handover_message_get_random_number()
- * @see nfc_handover_message_get_carrier_count()
- * @see nfc_handover_message_get_carrier()
- * @see nfc_handover_message_get_carrier_by_type()
- * @see nfc_handover_message_destroy()
- */
-int nfc_handover_message_import_from_ndef_message(nfc_handover_message_h *result, nfc_ndef_message_h msg);
-
-/**
- * @brief extract random number of handover message
- * @since_tizen 2.3
- * @ingroup CAPI_NETWORK_NFC_HANDOVER_MODULE
- *
- * @param [in]  message The instance of handover message
- * @param [out] random_number The random number of current message
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #NFC_ERROR_NONE Successful
- * @retval #NFC_ERROR_INVALID_PARAMETER Invalid parameter
- *
- * @see nfc_handover_message_import_from_ndef_message()
- * @see nfc_handover_message_destroy()
- */
-int nfc_handover_message_get_random_number(nfc_handover_message_h message, unsigned short *random_number);
-
-/**
- * @brief get number of carriers in handover message
- * @since_tizen 2.3
- * @ingroup CAPI_NETWORK_NFC_HANDOVER_MODULE
- *
- * @param [in]  message The instance of handover message
- * @param [out] count The number of carriers in handover message
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #NFC_ERROR_NONE Successful
- * @retval #NFC_ERROR_INVALID_PARAMETER Invalid parameter
- *
- * @see nfc_handover_message_import_from_ndef_message()
- * @see nfc_handover_message_destroy()
- */
-int nfc_handover_message_get_carrier_count(nfc_handover_message_h message, unsigned int *count);
-
-/**
- * @brief get instance of specific carrier in handover message by index
- * @since_tizen 2.3
- * @ingroup CAPI_NETWORK_NFC_HANDOVER_MODULE
- *
- * @remarks Do not destroy carrier instance returned from this function. (It managed by handover message)
-
- * @param [in]  message The instance of handover message
- * @param [in]  index The index of specific carrier
- * @param [out] carrier The instance of indexed carrier
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #NFC_ERROR_NONE Successful
- * @retval #NFC_ERROR_INVALID_PARAMETER Invalid parameter
- *
- * @see nfc_handover_message_import_from_ndef_message()
- * @see nfc_handover_message_destroy()
- */
-int nfc_handover_message_get_carrier(nfc_handover_message_h message, int index, nfc_handover_carrier_h *carrier);
-
-/**
- * @brief get instance of specific carrier in handover message by carrier type
- * @since_tizen 2.3
- * @ingroup CAPI_NETWORK_NFC_HANDOVER_MODULE
- *
- * @remarks Do not destroy carrier instance returned from this function. (It managed by handover message)
- *
- * @param [in]  message The instance of handover message
- * @param [in]  type The type of specific carrier
- * @param [out] carrier The instance of indexed carrier
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #NFC_ERROR_NONE Successful
- * @retval #NFC_ERROR_INVALID_PARAMETER Invalid parameter
- *
- * @see nfc_handover_message_import_from_ndef_message()
- * @see nfc_handover_message_destroy()
- */
-int nfc_handover_message_get_carrier_by_type(nfc_handover_message_h message, nfc_ac_type_e type, nfc_handover_carrier_h *carrier);
-
-/**
- * @brief destroy handover message instance
- * @since_tizen 2.3
- * @ingroup CAPI_NETWORK_NFC_HANDOVER_MODULE
- *
- * @param [in]  message The instance of handover message
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #NFC_ERROR_NONE Successful
- * @retval #NFC_ERROR_INVALID_PARAMETER Invalid parameter
- *
- * @see nfc_handover_message_import_from_ndef_message()
- */
-int nfc_handover_message_destroy(nfc_handover_message_h message);
-
-/**
- * @brief get CPS(Carrier Power Status) value of handover carrier
- * @since_tizen 2.3
- * @ingroup CAPI_NETWORK_NFC_HANDOVER_MODULE
- *
- * @param [in]  carrier The instance of handover carrier
- * @param [out] cps The CPS of handover carrier
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #NFC_ERROR_NONE Successful
- * @retval #NFC_ERROR_INVALID_PARAMETER Invalid parameter
- *
- * @see nfc_handover_message_get_carrier()
- * @see nfc_handover_message_get_carrier_by_type()
- */
-int nfc_handover_carrier_get_cps(nfc_handover_carrier_h carrier, nfc_ac_state_e *cps);
-
-/**
- * @brief get type of handover carrier
- * @since_tizen 2.3
- * @ingroup CAPI_NETWORK_NFC_HANDOVER_MODULE
- *
- * @param [in]  carrier The instance of handover carrier
- * @param [out] type The type of handover carrier
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #NFC_ERROR_NONE Successful
- * @retval #NFC_ERROR_INVALID_PARAMETER Invalid parameter
- *
- * @see nfc_handover_message_get_carrier()
- * @see nfc_handover_message_get_carrier_by_type()
- */
-
-int nfc_handover_carrier_get_type(nfc_handover_carrier_h carrier, nfc_ac_type_e *type);
-/**
- * @brief get carrier record of handover carrier
- * @since_tizen 2.3
- * @ingroup CAPI_NETWORK_NFC_HANDOVER_MODULE
- *
- * @remarks Do not destroy ndef record instance returned from this function. (It managed by handover carrier)
- *
- * @param [in]  carrier The instance of handover carrier
- * @param [out] record The ndef record of current handover carrier
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #NFC_ERROR_NONE Successful
- * @retval #NFC_ERROR_INVALID_PARAMETER Invalid parameter
- *
- * @see nfc_handover_message_get_carrier()
- * @see nfc_handover_message_get_carrier_by_type()
- */
-int nfc_handover_carrier_get_carrier_record(nfc_handover_carrier_h carrier, nfc_ndef_record_h *record);
-
-/**
- * @brief get number of auxiliary records in handover carrier
- * @since_tizen 2.3
- * @ingroup CAPI_NETWORK_NFC_HANDOVER_MODULE
- *
- * @param [in]  carrier The instance of handover carrier
- * @param [out] count The number of auxiliary records in handover carrier
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #NFC_ERROR_NONE Successful
- * @retval #NFC_ERROR_INVALID_PARAMETER Invalid parameter
- *
- * @see nfc_handover_message_get_carrier()
- * @see nfc_handover_message_get_carrier_by_type()
- */
-int nfc_handover_carrier_get_auxiliary_record_count(nfc_handover_carrier_h carrier, unsigned int *count);
-
-/**
- * @brief get specific auxiliary record in handover carrier by index
- * @since_tizen 2.3
- * @ingroup CAPI_NETWORK_NFC_HANDOVER_MODULE
- *
- * @remarks Do not destroy ndef record instance returned from this function. (It managed by handover carrier)
- *
- * @param [in]  carrier The instance of handover carrier
- * @param [in]  index The index of specific record
- * @param [out] record The ndef record of current handover carrier
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #NFC_ERROR_NONE Successful
- * @retval #NFC_ERROR_INVALID_PARAMETER Invalid parameter
- *
- * @see nfc_handover_message_get_carrier()
- * @see nfc_handover_message_get_carrier_by_type()
- */
-int nfc_handover_carrier_get_auxiliary_record(nfc_handover_carrier_h carrier, int index, nfc_ndef_record_h *record);
-
-/**
- * @brief get instance of handover configuration from handover carrier
- * @since_tizen 2.3
- * @ingroup CAPI_NETWORK_NFC_HANDOVER_MODULE
- *
- * @remarks There is no relation or memory share between @a carrier and @a config.
- * @remarks After using handover config, @a config must be destroyed by nfc_handover_config_destroy()
- *
- * @param [in]  carrier The instance of handover carrier
- * @param [out] config The instance of handover config
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #NFC_ERROR_NONE Successful
- * @retval #NFC_ERROR_INVALID_PARAMETER Invalid parameter
- *
- * @see nfc_handover_message_get_carrier()
- * @see nfc_handover_message_get_carrier_by_type()
- * @see nfc_handover_config_destroy()
- */
-int nfc_handover_carrier_get_handover_config(nfc_handover_carrier_h carrier, nfc_handover_config_h *config);
-
-/**
- * @brief destroy handover carrier instance
- * @since_tizen 2.3
- * @ingroup CAPI_NETWORK_NFC_HANDOVER_MODULE
- *
- * @param [in]  carrier The instance of handover carrier
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #NFC_ERROR_NONE Successful
- * @retval #NFC_ERROR_INVALID_PARAMETER Invalid parameter
- *
- * @see nfc_handover_carrier_duplicate()
- */
-int nfc_handover_carrier_destroy(nfc_handover_carrier_h carrier);
-
-/**
- * @brief get attribute property from handover configuration
- * @since_tizen 2.3
- * @ingroup CAPI_NETWORK_NFC_HANDOVER_MODULE
- *
- * @remarks Do not destroy @a data returned from this function. (It managed by handover config)
- *
- * @param [in]  config The instance of handover config
- * @param [in]  attribute The id of specific attribute
- * @param [out] size The length of returned buffer
- * @param [out] data The data buffer of specific attribute
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #NFC_ERROR_NONE Successful
- * @retval #NFC_ERROR_INVALID_PARAMETER Invalid parameter
- *
- * @see nfc_handover_message_get_carrier()
- * @see nfc_handover_message_get_carrier_by_type()
- */
-int nfc_handover_config_get_property(nfc_handover_config_h config, unsigned short attribute, unsigned short *size, unsigned char **data);
-
-/**
- * @brief destroy handover config instance
- * @since_tizen 2.3
- * @ingroup CAPI_NETWORK_NFC_HANDOVER_MODULE
- *
- * @param [in]  config The instance of handover config
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #NFC_ERROR_NONE Successful
- * @retval #NFC_ERROR_INVALID_PARAMETER Invalid parameter
- *
- * @see nfc_handover_carrier_get_handover_config()
- */
-int nfc_handover_config_destroy(nfc_handover_config_h config);
-
-int nfc_manager_set_system_handler_enable_force(bool enable);
-int nfc_p2p_send_no_permission(nfc_p2p_target_h target, nfc_ndef_message_h message, nfc_p2p_send_completed_cb callback, void *user_data);
-
-int nfc_se_open_secure_element_internal(nfc_se_type_e se_type, nfc_se_h *handle);
-int nfc_se_send_apdu_internal(nfc_se_h handle, unsigned char *cmd, unsigned int cmd_len, unsigned char **resp, unsigned int *resp_len);
-int nfc_se_close_secure_element_internal(nfc_se_h handle);
-int nfc_se_get_atr_internal(nfc_se_h handle, unsigned char **atr, unsigned int *atr_len);
-
-/**
- * @brief Add a route for the specific AID.
- * @since_tizen 2.3.0.1
- * @ingroup CAPI_NETWORK_NFC_SE_MODULE
- *
- * @param [in] aid The AID
- * @param [in] se_type The type of Secure Element
- * @param [in] pkg_name The package name
- * @param [in] unlock_required @c true when enabling routing only in device unlock state, otherwise @c false
- * @param [in] power The device power state
- * @param [in] category The category which the AID associated with
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #NFC_ERROR_NONE Successful
- * @retval #NFC_ERROR_NOT_SUPPORTED Not supported NFC
- * @retval #NFC_ERROR_INVALID_PARAMETER        Invalid parameter
- * @retval #NFC_ERROR_OUT_OF_MEMORY Out of memory
- * @retval #NFC_ERROR_PERMISSION_DENIED        Permission denied
- *
- * @see nfc_se_remove_route_for_aid()
- */
-int nfc_se_add_route_for_aid_internal(const char *aid, nfc_se_type_e se_type, const char* pkg_name, bool unlock_required, nfc_se_power_type_e power, nfc_card_emulation_category_type_e category);
-
-/**
- * @brief Remove a route for the specific AID.
- * @since_tizen 2.3.0.1
- * @ingroup CAPI_NETWORK_NFC_SE_MODULE
- *
- * @param [in] pkg_name The package name
- * @param [in] aid The AID
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #NFC_ERROR_NONE Successful
- * @retval #NFC_ERROR_NOT_SUPPORTED Not supported NFC
- * @retval #NFC_ERROR_INVALID_PARAMETER        Invalid parameter
- * @retval #NFC_ERROR_OUT_OF_MEMORY Out of memory
- * @retval #NFC_ERROR_PERMISSION_DENIED        Permission denied
- * @retval #NFC_ERROR_OPERATION_FAILED Operation failed
- *
- * @see nfc_se_add_route_for_aid()
- */
-int nfc_se_remove_route_for_aid_internal(const char* pkg_name, const char *aid);
-
-/**
- * @brief Initializes NFC Manager.
- * @since_tizen 2.3
- * @ingroup CAPI_NETWORK_NFC_MANAGER_MODULE
- * @remarks This function must be called before proceeding any other nfc functions\n
- *     When an application crashes or exits without the deinitialization. NFC manager automatically deinitializes the process itself.\n
- *     This function is synchronous.
- *
- * @return 0 on success, otherwise a negative error value.
- * @retval #NFC_ERROR_NONE Successful
- * @retval #NFC_ERROR_NOT_SUPPORTED Not supported NFC
- * @retval #NFC_ERROR_OPERATION_FAILED Operation fail
- *
- * @see nfc_manager_deinitialize()
- */
-int nfc_manager_initialize_sync(void);
-
-/**
- * @brief Get number of all registered AID.
- * @since_tizen 2.4
- * @privlevel public
- * @privilege   %http://tizen.org/privilege/nfc.cardemulation
- * @ingroup CAPI_NETWORK_NFC_SE_MODULE
- *
- * @remarks You can get number of aids only you registered.
- *
- * @param [in] se_type The type of Secure Element
- * @param [in] category The category
- * @param [out] count Number of registered aids
- *
- * @retval #NFC_ERROR_NONE Successful
- * @retval #NFC_ERROR_NOT_SUPPORTED Not supported NFC
- * @retval #NFC_ERROR_NOT_INITIALIZED Not initialized NFC
- * @retval #NFC_ERROR_NOT_ACTIVATED NFC is not activated
- * @retval #NFC_ERROR_ILLEGAL_STATE Illegal state
- * @retval #NFC_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #NFC_ERROR_OUT_OF_MEMORY Out of memory
- *
- * @see nfc_se_register_aid()
- * @see nfc_se_unregister_aid()
- * @see nfc_se_foreach_registered_aids()
- *
- */
-int nfc_se_get_registered_aids_count(nfc_se_type_e se_type, nfc_card_emulation_category_type_e category, int *count);
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __NFC_INTERNAL_H__ */
diff --git a/test/nfc_unit_test.c b/test/nfc_unit_test.c
deleted file mode 100644 (file)
index 775bbc7..0000000
+++ /dev/null
@@ -1,168 +0,0 @@
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-#include <glib.h>
-
-#include <nfc.h>
-
-#define BUFFER_LEN 10
-#define PRT(format, args...) printf("%s:%d() "format, __FUNCTION__, __LINE__, ##args)
-#define TC_PRT(format, args...) PRT(format"\n", ##args)
-
-
-GMainLoop *main_loop = NULL;
-
-typedef struct {
-       const char *tc_name;
-       int tc_code;
-} tc_table_t;
-
-tc_table_t tc_table[] = {
-       {"nfc_manager_initialize", 1},
-       {"nfc_snep_register_server", 2},
-       {"Finish"               , 0x00ff},
-       {NULL                   , 0x0000},
-};
-
-void tc_usage_print(void)
-{
-       int i = 0;
-
-       while (tc_table[i].tc_name) {
-               if (tc_table[i].tc_code != 0x00ff)
-                       TC_PRT("Key %d : usage %s", tc_table[i].tc_code, tc_table[i].tc_name);
-               else
-                       TC_PRT("Key %d : usage %s\n\n", 0x00ff, tc_table[i].tc_name);
-
-               i++;
-       }
-}
-
-void _nfc_snep_event_cb(nfc_p2p_snep_h handle, nfc_snep_event_e event, nfc_error_e result, nfc_ndef_message_h msg, void *user_data)
-{
-       TC_PRT("Inside _nfc_snep_event_cb");
-       switch (event) {
-       case NFC_SNEP_EVENT_STOP:
-               TC_PRT("NFC_SNEP_EVENT_STOP");
-               break;
-       case NFC_SNEP_EVENT_START:
-               TC_PRT("NFC_SNEP_EVENT_START");
-               break;
-       case NFC_SNEP_EVENT_GET:
-               TC_PRT("NFC_SNEP_EVENT_GET");
-               break;
-       case NFC_SNEP_EVENT_PUT:
-               TC_PRT("NFC_SNEP_EVENT_PUT");
-               break;
-       case NFC_SNEP_EVENT_REGISTER:
-               TC_PRT("NFC_SNEP_EVENT_REGISTER");
-               break;
-       case NFC_SNEP_EVENT_UNREGISTER:
-               TC_PRT("NFC_SNEP_EVENT_UNREGISTER");
-               break;
-       }
-}
-
-void _nfc_p2p_target_discovered_cb(nfc_discovered_type_e type, nfc_p2p_target_h target, void *user_data)
-{
-       int result;
-
-       TC_PRT("Inside server");
-       result = nfc_snep_register_server("default", 4, _nfc_snep_event_cb, NULL);
-       TC_PRT("nfc_snep_register_server %d", result);
-
-       result = nfc_snep_start_server(target, "default", 4, _nfc_snep_event_cb, NULL);
-       TC_PRT("nfc_snep_start_server %d", result);
-}
-
-int test_input_callback(void *data)
-{
-       long test_id = (long)data;
-
-       switch (test_id) {
-       case 0x00ff:
-               TC_PRT("Finished");
-               g_main_loop_quit(main_loop);
-               break;
-       case 1:
-               {
-                       int ret;
-                       ret = nfc_manager_initialize();
-
-                       if (ret == NFC_ERROR_NONE)
-                               TC_PRT("nfc initialize success");
-                       else
-                               TC_PRT("nfc initialize failed");
-               }
-               break;
-       case 2:
-               {
-                       int ret;
-                       ret = nfc_manager_initialize();
-
-                       if (ret == NFC_ERROR_NONE) {
-                               TC_PRT("register cb");
-                               nfc_manager_set_p2p_target_discovered_cb(_nfc_p2p_target_discovered_cb, NULL);
-                       }
-               }
-       case 3:
-               {
-                       int ret;
-                       ret = nfc_snep_register_server("default", 4, NULL, NULL);
-
-                       if (ret == NFC_ERROR_NONE)
-                               TC_PRT("success");
-                       else
-                               TC_PRT("failed");
-               }
-       default:
-               break;
-       }
-
-       return 0;
-}
-
-static gboolean key_event_cb(GIOChannel *chan,
-               GIOCondition cond,
-               gpointer data)
-{
-       char buf[BUFFER_LEN] = { 0 };
-
-       gsize len = 0;
-       long test_id;
-
-       memset(buf, 0, sizeof(buf));
-
-       if (g_io_channel_read_chars(chan, buf, sizeof(buf), &len, NULL) == G_IO_STATUS_ERROR)
-               return FALSE;
-
-       tc_usage_print();
-       test_id = atoi(buf);
-
-       if (test_id)
-               g_idle_add(test_input_callback, (void *)test_id);
-
-       return TRUE;
-}
-
-
-int main(int argc, char ** argv)
-{
-       GIOChannel *key_io;
-
-       key_io = g_io_channel_unix_new(fileno(stdin));
-
-       g_io_channel_set_encoding(key_io, NULL, NULL);
-       g_io_channel_set_flags(key_io, G_IO_FLAG_NONBLOCK, NULL);
-
-       g_io_add_watch(key_io, G_IO_IN | G_IO_HUP | G_IO_ERR | G_IO_NVAL,
-               key_event_cb, NULL);
-
-       g_io_channel_unref(key_io);
-
-       main_loop = g_main_loop_new(NULL, FALSE);
-
-       g_main_loop_run(main_loop);
-
-       return 0;
-}
diff --git a/test/packaging/capi-network-nfc b/test/packaging/capi-network-nfc
deleted file mode 100644 (file)
index ec68963..0000000
+++ /dev/null
@@ -1,206 +0,0 @@
-Copyright (c) 2000 - 2012 Samsung Electronics Co., Ltd. All rights reserved.\r
-\r
-                                 Apache License\r
-                           Version 2.0, January 2004\r
-                        http://www.apache.org/licenses/\r
-\r
-   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION\r
-\r
-   1. Definitions.\r
-\r
-      "License" shall mean the terms and conditions for use, reproduction,\r
-      and distribution as defined by Sections 1 through 9 of this document.\r
-\r
-      "Licensor" shall mean the copyright owner or entity authorized by\r
-      the copyright owner that is granting the License.\r
-\r
-      "Legal Entity" shall mean the union of the acting entity and all\r
-      other entities that control, are controlled by, or are under common\r
-      control with that entity. For the purposes of this definition,\r
-      "control" means (i) the power, direct or indirect, to cause the\r
-      direction or management of such entity, whether by contract or\r
-      otherwise, or (ii) ownership of fifty percent (50%) or more of the\r
-      outstanding shares, or (iii) beneficial ownership of such entity.\r
-\r
-      "You" (or "Your") shall mean an individual or Legal Entity\r
-      exercising permissions granted by this License.\r
-\r
-      "Source" form shall mean the preferred form for making modifications,\r
-      including but not limited to software source code, documentation\r
-      source, and configuration files.\r
-\r
-      "Object" form shall mean any form resulting from mechanical\r
-      transformation or translation of a Source form, including but\r
-      not limited to compiled object code, generated documentation,\r
-      and conversions to other media types.\r
-\r
-      "Work" shall mean the work of authorship, whether in Source or\r
-      Object form, made available under the License, as indicated by a\r
-      copyright notice that is included in or attached to the work\r
-      (an example is provided in the Appendix below).\r
-\r
-      "Derivative Works" shall mean any work, whether in Source or Object\r
-      form, that is based on (or derived from) the Work and for which the\r
-      editorial revisions, annotations, elaborations, or other modifications\r
-      represent, as a whole, an original work of authorship. For the purposes\r
-      of this License, Derivative Works shall not include works that remain\r
-      separable from, or merely link (or bind by name) to the interfaces of,\r
-      the Work and Derivative Works thereof.\r
-\r
-      "Contribution" shall mean any work of authorship, including\r
-      the original version of the Work and any modifications or additions\r
-      to that Work or Derivative Works thereof, that is intentionally\r
-      submitted to Licensor for inclusion in the Work by the copyright owner\r
-      or by an individual or Legal Entity authorized to submit on behalf of\r
-      the copyright owner. For the purposes of this definition, "submitted"\r
-      means any form of electronic, verbal, or written communication sent\r
-      to the Licensor or its representatives, including but not limited to\r
-      communication on electronic mailing lists, source code control systems,\r
-      and issue tracking systems that are managed by, or on behalf of, the\r
-      Licensor for the purpose of discussing and improving the Work, but\r
-      excluding communication that is conspicuously marked or otherwise\r
-      designated in writing by the copyright owner as "Not a Contribution."\r
-\r
-      "Contributor" shall mean Licensor and any individual or Legal Entity\r
-      on behalf of whom a Contribution has been received by Licensor and\r
-      subsequently incorporated within the Work.\r
-\r
-   2. Grant of Copyright License. Subject to the terms and conditions of\r
-      this License, each Contributor hereby grants to You a perpetual,\r
-      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\r
-      copyright license to reproduce, prepare Derivative Works of,\r
-      publicly display, publicly perform, sublicense, and distribute the\r
-      Work and such Derivative Works in Source or Object form.\r
-\r
-   3. Grant of Patent License. Subject to the terms and conditions of\r
-      this License, each Contributor hereby grants to You a perpetual,\r
-      worldwide, non-exclusive, no-charge, royalty-free, irrevocable\r
-      (except as stated in this section) patent license to make, have made,\r
-      use, offer to sell, sell, import, and otherwise transfer the Work,\r
-      where such license applies only to those patent claims licensable\r
-      by such Contributor that are necessarily infringed by their\r
-      Contribution(s) alone or by combination of their Contribution(s)\r
-      with the Work to which such Contribution(s) was submitted. If You\r
-      institute patent litigation against any entity (including a\r
-      cross-claim or counterclaim in a lawsuit) alleging that the Work\r
-      or a Contribution incorporated within the Work constitutes direct\r
-      or contributory patent infringement, then any patent licenses\r
-      granted to You under this License for that Work shall terminate\r
-      as of the date such litigation is filed.\r
-\r
-   4. Redistribution. You may reproduce and distribute copies of the\r
-      Work or Derivative Works thereof in any medium, with or without\r
-      modifications, and in Source or Object form, provided that You\r
-      meet the following conditions:\r
-\r
-      (a) You must give any other recipients of the Work or\r
-          Derivative Works a copy of this License; and\r
-\r
-      (b) You must cause any modified files to carry prominent notices\r
-          stating that You changed the files; and\r
-\r
-      (c) You must retain, in the Source form of any Derivative Works\r
-          that You distribute, all copyright, patent, trademark, and\r
-          attribution notices from the Source form of the Work,\r
-          excluding those notices that do not pertain to any part of\r
-          the Derivative Works; and\r
-\r
-      (d) If the Work includes a "NOTICE" text file as part of its\r
-          distribution, then any Derivative Works that You distribute must\r
-          include a readable copy of the attribution notices contained\r
-          within such NOTICE file, excluding those notices that do not\r
-          pertain to any part of the Derivative Works, in at least one\r
-          of the following places: within a NOTICE text file distributed\r
-          as part of the Derivative Works; within the Source form or\r
-          documentation, if provided along with the Derivative Works; or,\r
-          within a display generated by the Derivative Works, if and\r
-          wherever such third-party notices normally appear. The contents\r
-          of the NOTICE file are for informational purposes only and\r
-          do not modify the License. You may add Your own attribution\r
-          notices within Derivative Works that You distribute, alongside\r
-          or as an addendum to the NOTICE text from the Work, provided\r
-          that such additional attribution notices cannot be construed\r
-          as modifying the License.\r
-\r
-      You may add Your own copyright statement to Your modifications and\r
-      may provide additional or different license terms and conditions\r
-      for use, reproduction, or distribution of Your modifications, or\r
-      for any such Derivative Works as a whole, provided Your use,\r
-      reproduction, and distribution of the Work otherwise complies with\r
-      the conditions stated in this License.\r
-\r
-   5. Submission of Contributions. Unless You explicitly state otherwise,\r
-      any Contribution intentionally submitted for inclusion in the Work\r
-      by You to the Licensor shall be under the terms and conditions of\r
-      this License, without any additional terms or conditions.\r
-      Notwithstanding the above, nothing herein shall supersede or modify\r
-      the terms of any separate license agreement you may have executed\r
-      with Licensor regarding such Contributions.\r
-\r
-   6. Trademarks. This License does not grant permission to use the trade\r
-      names, trademarks, service marks, or product names of the Licensor,\r
-      except as required for reasonable and customary use in describing the\r
-      origin of the Work and reproducing the content of the NOTICE file.\r
-\r
-   7. Disclaimer of Warranty. Unless required by applicable law or\r
-      agreed to in writing, Licensor provides the Work (and each\r
-      Contributor provides its Contributions) on an "AS IS" BASIS,\r
-      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or\r
-      implied, including, without limitation, any warranties or conditions\r
-      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A\r
-      PARTICULAR PURPOSE. You are solely responsible for determining the\r
-      appropriateness of using or redistributing the Work and assume any\r
-      risks associated with Your exercise of permissions under this License.\r
-\r
-   8. Limitation of Liability. In no event and under no legal theory,\r
-      whether in tort (including negligence), contract, or otherwise,\r
-      unless required by applicable law (such as deliberate and grossly\r
-      negligent acts) or agreed to in writing, shall any Contributor be\r
-      liable to You for damages, including any direct, indirect, special,\r
-      incidental, or consequential damages of any character arising as a\r
-      result of this License or out of the use or inability to use the\r
-      Work (including but not limited to damages for loss of goodwill,\r
-      work stoppage, computer failure or malfunction, or any and all\r
-      other commercial damages or losses), even if such Contributor\r
-      has been advised of the possibility of such damages.\r
-\r
-   9. Accepting Warranty or Additional Liability. While redistributing\r
-      the Work or Derivative Works thereof, You may choose to offer,\r
-      and charge a fee for, acceptance of support, warranty, indemnity,\r
-      or other liability obligations and/or rights consistent with this\r
-      License. However, in accepting such obligations, You may act only\r
-      on Your own behalf and on Your sole responsibility, not on behalf\r
-      of any other Contributor, and only if You agree to indemnify,\r
-      defend, and hold each Contributor harmless for any liability\r
-      incurred by, or claims asserted against, such Contributor by reason\r
-      of your accepting any such warranty or additional liability.\r
-\r
-   END OF TERMS AND CONDITIONS\r
-\r
-   APPENDIX: How to apply the Apache License to your work.\r
-\r
-      To apply the Apache License to your work, attach the following\r
-      boilerplate notice, with the fields enclosed by brackets "[]"\r
-      replaced with your own identifying information. (Don't include\r
-      the brackets!)  The text should be enclosed in the appropriate\r
-      comment syntax for the file format. We also recommend that a\r
-      file or class name and description of purpose be included on the\r
-      same "printed page" as the copyright notice for easier\r
-      identification within third-party archives.\r
-\r
-   Copyright [yyyy] [name of copyright owner]\r
-\r
-   Licensed under the Apache License, Version 2.0 (the "License");\r
-   you may not use this file except in compliance with the License.\r
-   You may obtain a copy of the License at\r
-\r
-       http://www.apache.org/licenses/LICENSE-2.0\r
-\r
-   Unless required by applicable law or agreed to in writing, software\r
-   distributed under the License is distributed on an "AS IS" BASIS,\r
-   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
-   See the License for the specific language governing permissions and\r
-   limitations under the License.\r
-\r
-\r
-\r
diff --git a/test/packaging/capi-network-nfc.spec b/test/packaging/capi-network-nfc.spec
deleted file mode 100644 (file)
index 5512f2a..0000000
+++ /dev/null
@@ -1,66 +0,0 @@
-Name:       capi-network-nfc
-Summary:    A NFC library in Native API
-Version:    0.2.4
-Release:    0
-Group:      Network & Connectivity/NFC
-License:    Apache-2.0
-Source0:    %{name}-%{version}.tar.gz
-BuildRequires:  cmake
-BuildRequires:  pkgconfig(dlog)
-BuildRequires:  pkgconfig(glib-2.0)
-BuildRequires:  pkgconfig(gobject-2.0)
-BuildRequires:  pkgconfig(capi-base-common)
-BuildRequires:  pkgconfig(vconf)
-BuildRequires:  pkgconfig(capi-system-info)
-BuildRequires:  pkgconfig(nfc-common-lib)
-
-Requires(post): /sbin/ldconfig
-Requires(postun): /sbin/ldconfig
-
-%description
-A library for Tizen NFC Native API.
-
-%package devel
-Summary:  A NFC library in Native API (Development)
-Group:    Network & Connectivity/Development
-Requires: %{name} = %{version}-%{release}
-
-%description devel
-This package contains the development files for %{name}.
-
-
-%prep
-%setup -q
-
-
-%build
-export CFLAGS="$CFLAGS -DTIZEN_ENGINEER_MODE"
-export CXXFLAGS="$CXXFLAGS -DTIZEN_ENGINEER_MODE"
-export FFLAGS="$FFLAGS -DTIZEN_ENGINEER_MODE"
-
-MAJORVER=`echo %{version} | awk 'BEGIN {FS="."}{print $1}'`
-cmake . -DCMAKE_INSTALL_PREFIX=/usr -DFULLVER=%{version} -DMAJORVER=${MAJORVER} -DCMAKE_LIB_DIR=%{_libdir}
-
-make %{?jobs:-j%jobs}
-
-%install
-rm -rf %{buildroot}
-mkdir -p %{buildroot}/usr/share/license
-cp -af %{_builddir}/%{name}-%{version}/packaging/capi-network-nfc %{buildroot}/usr/share/license/
-
-%make_install
-
-%post -p /sbin/ldconfig
-
-%postun -p /sbin/ldconfig
-
-
-%files
-%manifest capi-network-nfc.manifest
-%{_libdir}/libcapi-network-nfc.so*
-/usr/share/license/capi-network-nfc
-
-%files devel
-%{_includedir}/network/*.h
-%{_libdir}/pkgconfig/*.pc
-%{_libdir}/libcapi-network-nfc.so
diff --git a/test/src/net_nfc_client.c b/test/src/net_nfc_client.c
deleted file mode 100755 (executable)
index 74da6d5..0000000
+++ /dev/null
@@ -1,92 +0,0 @@
-/*
- * Copyright (c) 2012, 2013 Samsung Electronics Co., Ltd.
- *
- * Licensed under the Flora License, Version 1.1 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://floralicense.org/license/
- *
- * 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.
- */
-
-#include <glib.h>
-#include <gio/gio.h>
-
-#include "net_nfc_typedef.h"
-#include "net_nfc_util_gdbus_internal.h"
-#include "net_nfc_client_se.h"
-#include "net_nfc_client.h"
-#include "net_nfc_client_manager.h"
-#include "net_nfc_client_tag.h"
-#include "net_nfc_client_ndef.h"
-#include "net_nfc_client_transceive.h"
-#include "net_nfc_client_llcp.h"
-#include "net_nfc_client_snep.h"
-#include "net_nfc_client_p2p.h"
-#include "net_nfc_client_test.h"
-#include "net_nfc_client_system_handler.h"
-#include "net_nfc_client_handover.h"
-#include "net_nfc_client_hce.h"
-
-#ifndef NET_NFC_EXPORT_API
-#define NET_NFC_EXPORT_API __attribute__((visibility("default")))
-#endif
-
-void __attribute__ ((constructor)) lib_init()
-{
-}
-
-void __attribute__ ((destructor)) lib_fini()
-{
-}
-
-void net_nfc_client_gdbus_init(void)
-{
-#if 0          /* change gdbus init time */
-       if (net_nfc_client_manager_init() != NET_NFC_OK)
-               return;
-       if (net_nfc_client_tag_init() != NET_NFC_OK)
-               return;
-       if (net_nfc_client_ndef_init() != NET_NFC_OK)
-               return;
-       if (net_nfc_client_transceive_init() != NET_NFC_OK)
-               return;
-       if (net_nfc_client_llcp_init() != NET_NFC_OK)
-               return;
-       if (net_nfc_client_snep_init() != NET_NFC_OK)
-               return;
-       if (net_nfc_client_p2p_init() != NET_NFC_OK)
-               return;
-       if (net_nfc_client_sys_handler_init() != NET_NFC_OK)
-               return;
-       if (net_nfc_client_se_init() != NET_NFC_OK)
-               return;
-       if (net_nfc_client_test_init() != NET_NFC_OK)
-               return;
-       if (net_nfc_client_handover_init() != NET_NFC_OK)
-               return;
-       if (net_nfc_client_hce_init() != NET_NFC_OK)
-               return;
-#endif
-}
-
-void net_nfc_client_gdbus_deinit(void)
-{
-       net_nfc_client_hce_deinit();
-       net_nfc_client_handover_deinit();
-       net_nfc_client_test_deinit();
-       net_nfc_client_se_deinit();
-       net_nfc_client_sys_handler_deinit();
-       net_nfc_client_p2p_deinit();
-       net_nfc_client_snep_deinit();
-       net_nfc_client_llcp_deinit();
-       net_nfc_client_transceive_deinit();
-       net_nfc_client_ndef_deinit();
-       net_nfc_client_tag_deinit();
-       net_nfc_client_manager_deinit();
-}
diff --git a/test/src/net_nfc_client_context.c b/test/src/net_nfc_client_context.c
deleted file mode 100755 (executable)
index f151390..0000000
+++ /dev/null
@@ -1,96 +0,0 @@
-/*
- * Copyright (c) 2012, 2013 Samsung Electronics Co., Ltd.
- *
- * Licensed under the Flora License, Version 1.1 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://floralicense.org/license/
- *
- * 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.
- */
-
-#include "vconf.h"
-
-#include "net_nfc_typedef.h"
-#include "net_nfc_client.h"
-
-#ifndef NET_NFC_EXPORT_API
-#define NET_NFC_EXPORT_API __attribute__((visibility("default")))
-#endif
-
-
-NET_NFC_EXPORT_API
-net_nfc_error_e net_nfc_client_initialize()
-{
-       net_nfc_error_e result = NET_NFC_OK;
-
-       net_nfc_client_gdbus_init();
-
-       return result;
-}
-
-
-NET_NFC_EXPORT_API
-net_nfc_error_e net_nfc_client_deinitialize()
-{
-       net_nfc_error_e result = NET_NFC_OK;
-
-       net_nfc_client_gdbus_deinit();
-
-       return result;
-}
-
-
-NET_NFC_EXPORT_API
-net_nfc_error_e net_nfc_client_is_nfc_supported(int *state)
-{
-       net_nfc_error_e ret;
-
-       if (state != NULL)
-       {
-               if (vconf_get_bool(VCONFKEY_NFC_FEATURE, state) == 0)
-               {
-                       ret = NET_NFC_OK;
-               }
-               else
-               {
-                       ret = NET_NFC_INVALID_STATE;
-               }
-       }
-       else
-       {
-               ret = NET_NFC_NULL_PARAMETER;
-       }
-
-       return ret;
-}
-
-
-NET_NFC_EXPORT_API
-net_nfc_error_e net_nfc_client_get_nfc_state(int *state)
-{
-       net_nfc_error_e ret;
-
-       if (state != NULL)
-       {
-               if (vconf_get_bool(VCONFKEY_NFC_STATE, state) == 0)
-               {
-                       ret = NET_NFC_OK;
-               }
-               else
-               {
-                       ret = NET_NFC_INVALID_STATE;
-               }
-       }
-       else
-       {
-               ret = NET_NFC_NULL_PARAMETER;
-       }
-
-       return ret;
-}
diff --git a/test/src/net_nfc_client_data.c b/test/src/net_nfc_client_data.c
deleted file mode 100755 (executable)
index 0e97fd4..0000000
+++ /dev/null
@@ -1,150 +0,0 @@
-/*
- * Copyright (c) 2012, 2013 Samsung Electronics Co., Ltd.
- *
- * Licensed under the Flora License, Version 1.1 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://floralicense.org/license/
- *
- * 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.
- */
-
-#include <string.h>
-
-#include "net_nfc_data.h"
-#include "net_nfc_typedef_internal.h"
-#include "net_nfc_util_internal.h"
-
-#ifndef NET_NFC_EXPORT_API
-#define NET_NFC_EXPORT_API __attribute__((visibility("default")))
-#endif
-
-NET_NFC_EXPORT_API net_nfc_error_e net_nfc_create_data_only(data_h *data)
-{
-       return net_nfc_create_data(data, NULL, 0);
-}
-
-NET_NFC_EXPORT_API net_nfc_error_e net_nfc_create_data(data_h *data,
-       const uint8_t *bytes, size_t length)
-{
-       data_s *tmp_data = NULL;
-
-       if (data == NULL)
-       {
-               return NET_NFC_NULL_PARAMETER;
-       }
-
-       *data = NULL;
-
-       tmp_data = net_nfc_util_create_data(length);
-       if (tmp_data == NULL)
-               return NET_NFC_ALLOC_FAIL;
-
-       if (length > 0 && bytes != NULL)
-       {
-               memcpy(tmp_data->buffer, bytes, length);
-       }
-
-       *data = (data_h)tmp_data;
-
-       return NET_NFC_OK;
-}
-
-NET_NFC_EXPORT_API net_nfc_error_e net_nfc_get_data(const data_h data,
-       uint8_t **bytes, size_t *length)
-{
-       data_s *tmp_data = (data_s *)data;
-
-       if (bytes == NULL || length == NULL)
-               return NET_NFC_NULL_PARAMETER;
-
-       *bytes = NULL;
-       *length = 0;
-
-       if (data == NULL)
-       {
-               return NET_NFC_NULL_PARAMETER;
-       }
-
-       *bytes = tmp_data->buffer;
-       *length = tmp_data->length;
-
-       return NET_NFC_OK;
-}
-
-NET_NFC_EXPORT_API net_nfc_error_e net_nfc_set_data(data_h data,
-       const uint8_t *bytes, size_t length)
-{
-       data_s *tmp_data = (data_s *)data;
-
-       if (data == NULL)
-       {
-               return NET_NFC_NULL_PARAMETER;
-       }
-
-       if (tmp_data->buffer == bytes && tmp_data->length == length)
-       {
-               return NET_NFC_OK;
-       }
-
-       net_nfc_util_clear_data(tmp_data);
-
-       if (length > 0)
-       {
-               net_nfc_util_init_data(tmp_data, length);
-
-               if (bytes != NULL)
-               {
-                       memcpy(tmp_data->buffer, bytes, length);
-               }
-       }
-
-       return NET_NFC_OK;
-}
-
-NET_NFC_EXPORT_API size_t net_nfc_get_data_length(const data_h data)
-{
-       data_s *tmp_data = (data_s *)data;
-
-       if (data == NULL)
-       {
-               return 0;
-       }
-
-       return tmp_data->length;
-}
-
-NET_NFC_EXPORT_API uint8_t *net_nfc_get_data_buffer(const data_h data)
-{
-       data_s *tmp_data = (data_s *)data;
-
-       if (data == NULL)
-       {
-               return NULL;
-       }
-
-       return tmp_data->buffer;
-}
-
-NET_NFC_EXPORT_API net_nfc_error_e net_nfc_free_data(data_h data)
-{
-       data_s *tmp_data = (data_s *)data;
-
-       if (data == NULL)
-       {
-               return NET_NFC_NULL_PARAMETER;
-       }
-
-       if (tmp_data->buffer != NULL)
-       {
-               _net_nfc_util_free_mem(tmp_data->buffer);
-       }
-       _net_nfc_util_free_mem(tmp_data);
-
-       return NET_NFC_OK;
-}
diff --git a/test/src/net_nfc_client_handover.c b/test/src/net_nfc_client_handover.c
deleted file mode 100755 (executable)
index 7bcd49c..0000000
+++ /dev/null
@@ -1,368 +0,0 @@
-/*
- * Copyright (c) 2012, 2013 Samsung Electronics Co., Ltd.
- *
- * Licensed under the Flora License, Version 1.1 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://floralicense.org/license/
- *
- * 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.
- */
-
-#include "net_nfc_typedef_internal.h"
-#include "net_nfc_debug_internal.h"
-#include "net_nfc_util_internal.h"
-#include "net_nfc_util_ndef_message.h"
-#include "net_nfc_util_gdbus_internal.h"
-#include "net_nfc_gdbus.h"
-#include "net_nfc_data.h"
-#include "net_nfc_client.h"
-#include "net_nfc_client_util_internal.h"
-#include "net_nfc_client_manager.h"
-#include "net_nfc_client_handover.h"
-
-#ifndef NET_NFC_EXPORT_API
-#define NET_NFC_EXPORT_API __attribute__((visibility("default")))
-#endif
-
-typedef struct _handover_handler_t
-{
-       net_nfc_connection_handover_event_cb handover_event_cb;
-       gpointer handover_event_data;
-}
-handover_handler_t;
-
-static NetNfcGDbusHandover *handover_proxy = NULL;
-static handover_handler_t handover_callbacks;
-
-static void p2p_connection_handover(GObject *source_object,
-                               GAsyncResult *res,
-                               gpointer user_data);
-
-static void __started(NetNfcGDbusHandover *object,
-       GVariant *arg_message)
-{
-       data_s message;
-
-       INFO_MSG(">>> SIGNAL arrived");
-
-       net_nfc_util_gdbus_variant_to_data_s(arg_message, &message);
-
-       if (handover_callbacks.handover_event_cb != NULL) {
-               handover_callbacks.handover_event_cb(NET_NFC_HANDOVER_START,
-                       NET_NFC_OK, NET_NFC_CONN_HANDOVER_CARRIER_UNKNOWN,
-                       NULL, &message,
-                       handover_callbacks.handover_event_data);
-       }
-
-       net_nfc_util_clear_data(&message);
-}
-
-static void __finished(NetNfcGDbusHandover *object,
-       gint arg_result,
-       gint arg_type,
-       GVariant *arg_address,
-       GVariant *arg_message)
-{
-       data_s address, message;
-
-       INFO_MSG(">>> SIGNAL arrived");
-
-       net_nfc_util_gdbus_variant_to_data_s(arg_address, &address);
-       net_nfc_util_gdbus_variant_to_data_s(arg_message, &message);
-
-       if (handover_callbacks.handover_event_cb != NULL) {
-               handover_callbacks.handover_event_cb(NET_NFC_HANDOVER_FINISH,
-                       arg_result, arg_type, &address, &message,
-                       handover_callbacks.handover_event_data);
-       }
-
-       net_nfc_util_clear_data(&message);
-       net_nfc_util_clear_data(&address);
-}
-
-static void p2p_connection_handover(GObject *source_object,
-                               GAsyncResult *res,
-                               gpointer user_data)
-{
-       NetNfcCallback *func_data = (NetNfcCallback *)user_data;
-       net_nfc_error_e result;
-       GVariant *data = NULL;
-       net_nfc_conn_handover_carrier_type_e type =
-               NET_NFC_CONN_HANDOVER_CARRIER_UNKNOWN;
-       GError *error = NULL;
-       data_s arg_data;
-
-       g_assert(user_data != NULL);
-
-       if (handover_proxy == NULL)
-       {
-               if (net_nfc_client_handover_init() != NET_NFC_OK)
-               {
-                       DEBUG_ERR_MSG("handover_proxy fail");
-                       /* FIXME : return result of this error */
-                       return;
-               }
-       }
-
-       if (net_nfc_gdbus_handover_call_request_finish(handover_proxy,
-                                               (gint *)&result,
-                                               (gint *)&type,
-                                               &data,
-                                               res,
-                                               &error) == FALSE)
-       {
-               DEBUG_ERR_MSG("Can not finish"
-                        " connection handover: %s", error->message);
-               result = NET_NFC_IPC_FAIL;
-
-               g_error_free(error);
-       }
-
-       if (func_data->callback != NULL)
-       {
-               net_nfc_p2p_connection_handover_completed_cb callback =
-                       (net_nfc_p2p_connection_handover_completed_cb)func_data->callback;
-
-               net_nfc_util_gdbus_variant_to_data_s(data, &arg_data);
-
-               callback(result,
-                       type,
-                       &arg_data,
-                       func_data->user_data);
-
-               net_nfc_util_clear_data(&arg_data);
-       }
-
-       g_free(func_data);
-}
-
-
-NET_NFC_EXPORT_API
-net_nfc_error_e net_nfc_client_handover_free_alternative_carrier_data(
-                       net_nfc_connection_handover_info_h info_handle)
-{
-       net_nfc_connection_handover_info_s *info =
-               (net_nfc_connection_handover_info_s *)info_handle;
-
-       if (info_handle == NULL)
-               return NET_NFC_NULL_PARAMETER;
-
-       if (info->data.buffer != NULL)
-       {
-               _net_nfc_util_free_mem(info->data.buffer);
-       }
-
-       _net_nfc_util_free_mem(info);
-
-       return NET_NFC_OK;
-}
-
-
-NET_NFC_EXPORT_API
-net_nfc_error_e net_nfc_client_handover_get_alternative_carrier_type(
-                       net_nfc_connection_handover_info_h info_handle,
-                       net_nfc_conn_handover_carrier_type_e *type)
-{
-       net_nfc_connection_handover_info_s *info =
-               (net_nfc_connection_handover_info_s *)info_handle;
-
-       if (info_handle == NULL || type == NULL)
-               return NET_NFC_NULL_PARAMETER;
-
-       *type = info->type;
-
-       return NET_NFC_OK;
-}
-
-NET_NFC_EXPORT_API
-net_nfc_error_e net_nfc_client_handover_get_alternative_carrier_data(
-                       net_nfc_connection_handover_info_h info_handle,
-                       data_h *data)
-{
-       net_nfc_connection_handover_info_s *info =
-               (net_nfc_connection_handover_info_s *)info_handle;
-
-       if (info_handle == NULL || data == NULL)
-               return NET_NFC_NULL_PARAMETER;
-
-       return net_nfc_create_data(data, info->data.buffer, info->data.length);
-}
-
-
-NET_NFC_EXPORT_API
-net_nfc_error_e net_nfc_client_p2p_connection_handover(
-                       net_nfc_target_handle_h handle,
-                       net_nfc_conn_handover_carrier_type_e arg_type,
-                       net_nfc_p2p_connection_handover_completed_cb callback,
-                       void *cb_data)
-{
-
-       net_nfc_target_handle_s *tag_handle = (net_nfc_target_handle_s *)handle;
-       NetNfcCallback *funcdata;
-
-       if (handover_proxy == NULL)
-       {
-               if(net_nfc_client_handover_init() != NET_NFC_OK)
-               {
-                       DEBUG_ERR_MSG("handover_proxy fail");
-                       return NET_NFC_NOT_INITIALIZED;
-               }
-       }
-
-       /* prevent executing daemon when nfc is off */
-       if (net_nfc_client_manager_is_activated() == false) {
-               return NET_NFC_NOT_ACTIVATED;
-       }
-
-       funcdata = g_try_new0(NetNfcCallback, 1);
-       if (funcdata == NULL) {
-               return NET_NFC_ALLOC_FAIL;
-       }
-
-       funcdata->callback = (gpointer)callback;
-       funcdata->user_data = cb_data;
-
-       net_nfc_gdbus_handover_call_request(handover_proxy,
-                                       GPOINTER_TO_UINT(tag_handle),
-                                       arg_type,
-                                       NULL,
-                                       p2p_connection_handover,
-                                       funcdata);
-
-       return NET_NFC_OK;
-}
-
-
-NET_NFC_EXPORT_API
-net_nfc_error_e net_nfc_client_p2p_connection_handover_sync(
-       net_nfc_target_handle_h handle,
-       net_nfc_conn_handover_carrier_type_e arg_type,
-       net_nfc_conn_handover_carrier_type_e *out_carrier,
-       data_h *out_ac_data)
-{
-       net_nfc_target_handle_s *tag_handle = (net_nfc_target_handle_s *)handle;
-       GVariant *out_data = NULL;
-       net_nfc_error_e out_result = NET_NFC_OK;
-       net_nfc_conn_handover_carrier_type_e out_type =
-               NET_NFC_CONN_HANDOVER_CARRIER_UNKNOWN;
-       GError *error = NULL;
-
-       if (handover_proxy == NULL)
-       {
-               if(net_nfc_client_handover_init() != NET_NFC_OK)
-               {
-                       DEBUG_ERR_MSG("handover_proxy fail");
-                       return NET_NFC_NOT_INITIALIZED;
-               }
-       }
-
-       /* prevent executing daemon when nfc is off */
-       if (net_nfc_client_manager_is_activated() == false) {
-               return NET_NFC_NOT_ACTIVATED;
-       }
-
-       if (net_nfc_gdbus_handover_call_request_sync(handover_proxy,
-               GPOINTER_TO_UINT(tag_handle),
-               arg_type,
-               (gint32 *)&out_result,
-               (gint32 *)&out_type,
-               &out_data,
-               NULL,
-               &error) == TRUE) {
-               if (out_carrier) {
-                       *out_carrier = out_type;
-               }
-
-               if (out_ac_data) {
-                       *out_ac_data = net_nfc_util_gdbus_variant_to_data(out_data);
-               }
-       } else {
-               DEBUG_ERR_MSG("handover (sync call) failed: %s",error->message);
-               out_result = NET_NFC_IPC_FAIL;
-
-               g_error_free(error);
-       }
-
-       return out_result;
-}
-
-NET_NFC_EXPORT_API
-void net_nfc_client_handover_set_handover_event_cb(
-       net_nfc_connection_handover_event_cb callback,
-       void *user_data)
-{
-       if (callback == NULL)
-               return;
-
-       if (handover_proxy == NULL)
-       {
-               if (net_nfc_client_handover_init() != NET_NFC_OK)
-               {
-                       DEBUG_ERR_MSG("handover_proxy fail");
-                       return;
-               }
-       }
-
-       handover_callbacks.handover_event_cb = callback;
-       handover_callbacks.handover_event_data = user_data;
-}
-
-
-NET_NFC_EXPORT_API
-void net_nfc_client_handover_unset_handover_event_cb(void)
-{
-       handover_callbacks.handover_event_cb = NULL;
-       handover_callbacks.handover_event_data = NULL;
-}
-
-
-net_nfc_error_e net_nfc_client_handover_init(void)
-{
-       GError *error = NULL;
-
-       if (handover_proxy)
-       {
-               DEBUG_CLIENT_MSG("Already initialized");
-
-               return NET_NFC_OK;
-       }
-
-       handover_proxy = net_nfc_gdbus_handover_proxy_new_for_bus_sync(
-                                       G_BUS_TYPE_SYSTEM,
-                                       G_DBUS_PROXY_FLAGS_DO_NOT_AUTO_START,
-                                       "org.tizen.NetNfcService",
-                                       "/org/tizen/NetNfcService/Handover",
-                                       NULL,
-                                       &error);
-       if (handover_proxy == NULL)
-       {
-               DEBUG_ERR_MSG("Can not create proxy : %s", error->message);
-               g_error_free(error);
-
-               return NET_NFC_UNKNOWN_ERROR;
-       }
-
-       g_signal_connect(handover_proxy, "started",
-               G_CALLBACK(__started), NULL);
-
-       g_signal_connect(handover_proxy, "finished",
-               G_CALLBACK(__finished), NULL);
-
-       return NET_NFC_OK;
-}
-
-
-void net_nfc_client_handover_deinit(void)
-{
-       if (handover_proxy)
-       {
-               g_object_unref(handover_proxy);
-               handover_proxy = NULL;
-       }
-}
diff --git a/test/src/net_nfc_client_hce.c b/test/src/net_nfc_client_hce.c
deleted file mode 100755 (executable)
index a95b969..0000000
+++ /dev/null
@@ -1,295 +0,0 @@
-/*
- * Copyright (c) 2012, 2013 Samsung Electronics Co., Ltd.
- *
- * Licensed under the Flora License, Version 1.1 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://floralicense.org/license/
- *
- * 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.
- */
-
-#include "vconf.h"
-
-#include "net_nfc_typedef_internal.h"
-#include "net_nfc_debug_internal.h"
-#include "net_nfc_util_internal.h"
-#include "net_nfc_util_ndef_message.h"
-#include "net_nfc_util_gdbus_internal.h"
-#include "net_nfc_gdbus.h"
-#include "net_nfc_client.h"
-#include "net_nfc_client_util_internal.h"
-#include "net_nfc_client_manager.h"
-#include "net_nfc_client_hce_ipc.h"
-#include "net_nfc_client_hce.h"
-
-
-#ifndef NET_NFC_EXPORT_API
-#define NET_NFC_EXPORT_API __attribute__((visibility("default")))
-#endif
-
-typedef struct _HceHandler HceHandler;
-
-struct _HceHandler
-{
-       net_nfc_client_hce_event_cb hce_event_cb;
-       gpointer hce_data;
-};
-
-static NetNfcGDbusHce *hce_proxy = NULL;
-
-static HceHandler hce_handler;
-static char package_name[1024];
-
-static void __load_package_name()
-{
-       if (net_nfc_util_get_pkgid_by_pid(getpid(),
-               package_name, sizeof(package_name)) == false) {
-               DEBUG_ERR_MSG("failed to get package name, pid [%d]", getpid());
-       }
-}
-
-static void hce_event_received(GObject *source_object, guint arg_handle,
-       guint arg_event, GVariant *arg_apdu, gchar *arg_package)
-{
-       INFO_MSG(">>> SIGNAL arrived");
-
-       if (hce_handler.hce_event_cb != NULL) {
-
-               data_s apdu = { NULL, 0 };
-
-               net_nfc_util_gdbus_variant_to_data_s(arg_apdu, &apdu);
-
-               hce_handler.hce_event_cb((net_nfc_target_handle_h)arg_handle,
-                       (net_nfc_hce_event_t)arg_event, &apdu,
-                       hce_handler.hce_data);
-
-               net_nfc_util_clear_data(&apdu);
-       }
-}
-
-void net_nfc_client_hce_process_received_event(int event,
-       net_nfc_target_handle_h handle, data_h data)
-{
-       INFO_MSG(">>> SIGNAL arrived");
-
-       if (hce_handler.hce_event_cb != NULL) {
-               hce_handler.hce_event_cb(handle,
-                       (net_nfc_hce_event_t)event, data,
-                       hce_handler.hce_data);
-       }
-}
-
-
-
-NET_NFC_EXPORT_API
-net_nfc_error_e net_nfc_client_hce_set_event_received_cb(
-       net_nfc_client_hce_event_cb callback, void *user_data)
-{
-       net_nfc_error_e result = NET_NFC_OK;
-       GError *error = NULL;
-
-       if (callback == NULL) {
-               return net_nfc_client_hce_unset_event_received_cb();
-       }
-
-       if (hce_proxy == NULL)
-       {
-               result = net_nfc_client_hce_init();
-               if (result != NET_NFC_OK)
-               {
-                       DEBUG_ERR_MSG("net_nfc_client_hce_init failed, [%d]", result);
-
-                       return result;
-               }
-       }
-
-       if (net_nfc_gdbus_hce_call_start_hce_handler_sync(hce_proxy,
-               &result, NULL, &error) == true) {
-               hce_handler.hce_event_cb = callback;
-               hce_handler.hce_data = user_data;
-
-               if (net_nfc_client_hce_ipc_is_initialized() == false) {
-                       result = net_nfc_client_hce_ipc_init();
-                       if (result != NET_NFC_OK) {
-                               DEBUG_ERR_MSG("net_nfc_client_hce_ipc_init failed");
-
-                               result = NET_NFC_IPC_FAIL;
-                       }
-               }
-       } else {
-               DEBUG_ERR_MSG("net_nfc_gdbus_hce_call_start_hce_handler_sync failed: %s", error->message);
-               g_error_free(error);
-
-               result = NET_NFC_IPC_FAIL;
-       }
-
-       return result;
-}
-
-NET_NFC_EXPORT_API
-net_nfc_error_e net_nfc_client_hce_unset_event_received_cb(void)
-{
-       net_nfc_error_e result = NET_NFC_OK;
-       GError *error = NULL;
-
-       if (hce_proxy == NULL) {
-               DEBUG_ERR_MSG("not initialized!!!");
-
-               return NET_NFC_NOT_INITIALIZED;
-       }
-
-       if (net_nfc_gdbus_hce_call_stop_hce_handler_sync(hce_proxy,
-               &result, NULL, &error) == true) {
-               hce_handler.hce_event_cb = NULL;
-               hce_handler.hce_data = NULL;
-
-               net_nfc_client_hce_ipc_deinit();
-       } else {
-               DEBUG_ERR_MSG("net_nfc_gdbus_hce_call_stop_hce_handler_sync failed: %s", error->message);
-               g_error_free(error);
-
-               result = NET_NFC_IPC_FAIL;
-       }
-
-       return result;
-}
-#if 0
-NET_NFC_EXPORT_API
-net_nfc_error_e net_nfc_client_hce_response_apdu_sync(
-                               net_nfc_target_handle_h handle,
-                               data_h resp_apdu_data)
-{
-       net_nfc_error_e result = NET_NFC_OK;
-       GError *error = NULL;
-       GVariant *arg_data = NULL;
-
-       INFO_MSG(">>> net_nfc_client_hce_response_apdu_sync!!");
-
-       if (hce_proxy == NULL)
-       {
-               result = net_nfc_client_hce_init();
-               if (result != NET_NFC_OK)
-               {
-                       DEBUG_ERR_MSG("net_nfc_client_hce_init failed, [%d]", result);
-
-                       return result;
-               }
-       }
-
-       arg_data = net_nfc_util_gdbus_data_to_variant((data_s *)resp_apdu_data);
-       if (arg_data == NULL)
-       {
-
-               INFO_MSG(">>> resp_apdu_data is null !!");
-               return NET_NFC_INVALID_PARAM;
-       }
-
-       if (net_nfc_gdbus_hce_call_response_apdu_sync(
-               hce_proxy,
-               GPOINTER_TO_UINT(handle),
-               arg_data,
-               &result,
-               NULL,
-               &error) == true) {
-       } else {
-               DEBUG_ERR_MSG("Response APDU failed: %s", error->message);
-               result = NET_NFC_IPC_FAIL;
-
-               g_error_free(error);
-       }
-
-       return result;
-}
-#else
-NET_NFC_EXPORT_API
-net_nfc_error_e net_nfc_client_hce_response_apdu_sync(
-                               net_nfc_target_handle_h handle,
-                               data_h resp_apdu_data)
-{
-       net_nfc_error_e result;
-
-       DEBUG_CLIENT_MSG(">>> net_nfc_client_hce_response_apdu_sync!!");
-
-       if (hce_proxy == NULL) {
-               result = net_nfc_client_hce_init();
-               if (result != NET_NFC_OK) {
-                       DEBUG_ERR_MSG("net_nfc_client_hce_init failed, [%d]", result);
-
-                       return result;
-               }
-       }
-
-       if (net_nfc_client_hce_ipc_is_initialized() == false) {
-               if (net_nfc_client_hce_ipc_init() == false) {
-                       DEBUG_ERR_MSG("net_nfc_client_hce_ipc_init failed");
-
-                       return NET_NFC_NOT_INITIALIZED;
-               }
-       }
-
-       if (net_nfc_server_hce_ipc_send_to_server(0, handle, resp_apdu_data) == true) {
-               result = NET_NFC_OK;
-       } else {
-               DEBUG_ERR_MSG("net_nfc_server_hce_ipc_send_to_server failed");
-
-               result = NET_NFC_IPC_FAIL;
-       }
-
-       return result;
-}
-#endif
-net_nfc_error_e net_nfc_client_hce_init(void)
-{
-       GError *error = NULL;
-
-       DEBUG_CLIENT_MSG("net_nfc_client_hce_init call");
-
-       if (hce_proxy)
-       {
-               DEBUG_CLIENT_MSG("Already initialized");
-
-               return NET_NFC_OK;
-       }
-
-       hce_proxy = net_nfc_gdbus_hce_proxy_new_for_bus_sync(
-                               G_BUS_TYPE_SYSTEM,
-                               G_DBUS_PROXY_FLAGS_DO_NOT_AUTO_START,
-                               "org.tizen.NetNfcService",
-                               "/org/tizen/NetNfcService/Hce",
-                               NULL,
-                               &error);
-
-       if (hce_proxy == NULL)
-       {
-               DEBUG_ERR_MSG("Can not create proxy : %s", error->message);
-
-               g_error_free(error);
-
-               return NET_NFC_UNKNOWN_ERROR;
-       }
-
-       g_signal_connect(hce_proxy, "event-received",
-               G_CALLBACK(hce_event_received), NULL);
-
-       /* get package name */
-       __load_package_name();
-
-       return NET_NFC_OK;
-}
-
-void net_nfc_client_hce_deinit(void)
-{
-       if (hce_proxy != NULL)
-       {
-               net_nfc_client_hce_ipc_deinit();
-
-               g_object_unref(hce_proxy);
-               hce_proxy = NULL;
-       }
-}
diff --git a/test/src/net_nfc_client_hce_ipc.c b/test/src/net_nfc_client_hce_ipc.c
deleted file mode 100755 (executable)
index 5850a6f..0000000
+++ /dev/null
@@ -1,364 +0,0 @@
-/*
- * Copyright (c) 2012, 2013 Samsung Electronics Co., Ltd.
- *
- * Licensed under the Flora License, Version 1.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://floralicense.org/license/
- *
- * 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.
- */
-
-#include <sys/socket.h>
-#include <netinet/in.h>
-#include <arpa/inet.h>
-#include <sys/un.h>
-#include <sys/types.h>
-#include <fcntl.h>
-#include <sys/epoll.h>
-#include <unistd.h>
-#include <string.h>
-#include <stdlib.h>
-#include <pthread.h>
-#include <errno.h>
-#include <sys/time.h>
-#include <stdarg.h>
-#include <signal.h>
-#include <glib-object.h>
-
-#include "net_nfc_typedef_internal.h"
-#include "net_nfc_debug_internal.h"
-#include "net_nfc_util_defines.h"
-#include "net_nfc_util_internal.h"
-#include "net_nfc_util_hce.h"
-#include "net_nfc_client_hce.h"
-#include "net_nfc_client_hce_ipc.h"
-
-/* static variable */
-static pthread_mutex_t g_client_ipc_mutex = PTHREAD_MUTEX_INITIALIZER;
-static pthread_mutex_t cb_lock = PTHREAD_MUTEX_INITIALIZER;
-
-static int hce_client_socket = -1;
-static GIOChannel *hce_client_channel = NULL;
-static guint hce_client_src_id = 0;
-
-/* static function */
-
-/////////////////////
-static void __set_non_block_socket(int socket)
-{
-       int flags;
-
-       flags = fcntl(socket, F_GETFL);
-       flags |= O_NONBLOCK;
-
-       if (fcntl(socket, F_SETFL, flags) < 0) {
-               DEBUG_ERR_MSG("fcntl, executing nonblock error");
-       }
-}
-
-static bool __receive_data_from_server(int socket, data_s *data)
-{
-       bool result;
-       ssize_t ret;
-       uint32_t len;
-
-       /* first, receive length */
-       ret = recv(socket, (void *)&len, sizeof(len), 0);
-       if (ret != sizeof(len)) {
-               DEBUG_ERR_MSG("recv failed, socket [%d], result [%d]", socket, ret);
-
-               return false;
-       }
-
-       if (len > 1024) {
-               DEBUG_ERR_MSG("too large message, socket [%d], len [%d]", socket, len);
-
-               return false;
-       }
-
-       result = net_nfc_util_init_data(data, len);
-       if (result == true) {
-               ssize_t offset = 0;
-
-               /* second, receive buffer */
-               do {
-                       ret = recv(socket, data->buffer + offset, data->length - offset, 0);
-                       if (ret == -1) {
-                               break;
-                       }
-
-                       offset += ret;
-               } while (offset < len);
-
-               if (offset != len) {
-                       DEBUG_ERR_MSG("recv failed, socket [%d], offset [%d], len [%d]", socket, offset, len);
-
-                       net_nfc_util_clear_data(data);
-
-                       result = false;
-               } else {
-                       DEBUG_CLIENT_MSG("recv success, length [%d]", offset);
-               }
-       } else {
-               DEBUG_ERR_MSG("net_nfc_util_init_data failed");
-       }
-
-       return result;
-}
-
-static bool __process_server_message()
-{
-       bool result;
-       data_s data;
-
-       if (__receive_data_from_server(hce_client_socket, &data) == true) {
-               net_nfc_hce_data_t *header;
-               data_s temp;
-
-               header = (net_nfc_hce_data_t *)data.buffer;
-
-               temp.buffer = header->data;
-               temp.length = data.length - sizeof(net_nfc_hce_data_t);
-
-               net_nfc_client_hce_process_received_event(header->type,
-                       (net_nfc_target_handle_h)header->handle, (data_h)&temp);
-
-               result = true;
-       } else {
-               DEBUG_ERR_MSG("__receive_data_from_client failed");
-
-               result = false;
-       }
-
-       return result;
-}
-
-static bool __send_data_to_server(int socket, data_s *data)
-{
-       ssize_t ret;
-
-       ret = send(socket, data->buffer, data->length, 0);
-       if (ret == -1) {
-               DEBUG_ERR_MSG("send failed, socket [%d]", socket);
-
-               return false;
-       }
-
-       return true;
-}
-
-bool net_nfc_server_hce_ipc_send_to_server(int type,
-       net_nfc_target_handle_s *handle, data_s *data)
-{
-       bool ret;
-       data_s temp;
-       uint32_t len = sizeof(net_nfc_hce_data_t);
-
-       if (data != NULL && data->length > 0) {
-               len += data->length;
-       }
-
-       ret = net_nfc_util_init_data(&temp, len + sizeof(len));
-       if (ret == true) {
-               net_nfc_hce_data_t *header;
-
-               *(uint32_t *)(temp.buffer) = len;
-               header = (net_nfc_hce_data_t *)(temp.buffer + sizeof(len));
-
-               header->type = type;
-               header->handle = (int)handle;
-
-               if (data != NULL && data->length > 0) {
-                       memcpy(header->data, data->buffer, data->length);
-               }
-
-               ret = __send_data_to_server(hce_client_socket, &temp);
-
-               net_nfc_util_clear_data(&temp);
-       } else {
-               DEBUG_ERR_MSG("net_nfc_util_init_data failed");
-       }
-
-       return ret;
-}
-
-/******************************************************************************/
-
-inline void net_nfc_client_ipc_lock()
-{
-       pthread_mutex_lock(&g_client_ipc_mutex);
-}
-
-inline void net_nfc_client_ipc_unlock()
-{
-       pthread_mutex_unlock(&g_client_ipc_mutex);
-}
-
-bool net_nfc_client_hce_ipc_is_initialized()
-{
-       return (hce_client_socket != -1 && hce_client_channel != NULL);
-}
-
-static net_nfc_error_e _finalize_client_socket()
-{
-       net_nfc_error_e result = NET_NFC_OK;
-
-       net_nfc_client_ipc_lock();
-
-       if (hce_client_src_id > 0) {
-               g_source_remove(hce_client_src_id);
-               hce_client_src_id = 0;
-       }
-
-       if (hce_client_channel != NULL) {
-               g_io_channel_unref(hce_client_channel);
-               hce_client_channel = NULL;
-       }
-
-       if (hce_client_socket != -1) {
-               shutdown(hce_client_socket, SHUT_WR);
-               close(hce_client_socket);
-               hce_client_socket = -1;
-
-               INFO_MSG("client socket closed");
-       }
-
-       net_nfc_client_ipc_unlock();
-
-       return result;
-}
-
-static gboolean __on_io_event_cb(GIOChannel *channel, GIOCondition condition,
-       gpointer data)
-{
-       if ((G_IO_ERR & condition) || (G_IO_HUP & condition)) {
-               DEBUG_CLIENT_MSG("client socket is closed");
-
-               /* clean up client context */
-               net_nfc_client_hce_ipc_deinit();
-
-               return FALSE;
-       } else if (G_IO_NVAL & condition) {
-               DEBUG_CLIENT_MSG("INVALID socket");
-
-               return FALSE;
-       } else if (G_IO_IN & condition) {
-               if(channel != hce_client_channel) {
-                       DEBUG_CLIENT_MSG("unknown channel");
-
-                       return FALSE;
-               }
-
-               DEBUG_CLIENT_MSG("message from server to client socket");
-
-               if (__process_server_message() == false) {
-                       DEBUG_ERR_MSG("__process_server_message failed");
-
-                       net_nfc_client_hce_ipc_deinit();
-
-                       return FALSE;
-               }
-       } else {
-               DEBUG_CLIENT_MSG("IO ERROR. socket is closed ");
-
-               /* clean up client context */
-               net_nfc_client_hce_ipc_deinit();
-
-               return FALSE;
-       }
-
-       return TRUE;
-}
-
-net_nfc_error_e net_nfc_client_hce_ipc_init()
-{
-       net_nfc_error_e result = NET_NFC_OK;
-       struct sockaddr_un saddrun_rv;
-       socklen_t len_saddr = 0;
-       pthread_mutexattr_t attr;
-
-       if (net_nfc_client_hce_ipc_is_initialized() == true)
-       {
-               DEBUG_CLIENT_MSG("client is already initialized");
-
-               return NET_NFC_ALREADY_INITIALIZED;
-       }
-
-       pthread_mutexattr_init(&attr);
-       pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE_NP);
-       pthread_mutex_init(&cb_lock, &attr);
-
-       memset(&saddrun_rv, 0, sizeof(struct sockaddr_un));
-
-       net_nfc_client_ipc_lock();
-
-       hce_client_socket = socket(AF_UNIX, SOCK_STREAM, 0);
-       if (hce_client_socket == -1)
-       {
-               DEBUG_ERR_MSG("get socket is failed");
-
-               result = NET_NFC_IPC_FAIL;
-               goto ERROR;
-       }
-
-       __set_non_block_socket(hce_client_socket);
-
-       saddrun_rv.sun_family = AF_UNIX;
-       strncpy(saddrun_rv.sun_path, NET_NFC_HCE_SERVER_DOMAIN, sizeof(saddrun_rv.sun_path) - 1);
-
-       len_saddr = sizeof(saddrun_rv.sun_family) + strlen(NET_NFC_HCE_SERVER_DOMAIN);
-
-       if (connect(hce_client_socket, (struct sockaddr *)&saddrun_rv, len_saddr) < 0) {
-               DEBUG_ERR_MSG("error is occured");
-               result = NET_NFC_IPC_FAIL;
-
-               goto ERROR;
-       }
-
-       GIOCondition condition = (GIOCondition)(G_IO_ERR | G_IO_HUP | G_IO_IN);
-
-       hce_client_channel = g_io_channel_unix_new(hce_client_socket);
-       if (hce_client_channel == NULL) {
-               DEBUG_ERR_MSG(" g_io_channel_unix_new is failed ");
-               result = NET_NFC_IPC_FAIL;
-
-               goto ERROR;
-       }
-
-       hce_client_src_id = g_io_add_watch(hce_client_channel, condition,
-               __on_io_event_cb, NULL);
-       if (hce_client_src_id < 1) {
-               DEBUG_ERR_MSG(" g_io_add_watch is failed ");
-               result = NET_NFC_IPC_FAIL;
-
-               goto ERROR;
-       }
-
-       DEBUG_CLIENT_MSG("client socket is ready");
-
-       net_nfc_client_ipc_unlock();
-
-       return NET_NFC_OK;
-
-ERROR :
-       DEBUG_ERR_MSG("error while initializing client ipc");
-
-       net_nfc_client_ipc_unlock();
-
-       _finalize_client_socket();
-
-       return result;
-}
-
-void net_nfc_client_hce_ipc_deinit()
-{
-       if (net_nfc_client_hce_ipc_is_initialized() == true) {
-               _finalize_client_socket();
-       }
-}
diff --git a/test/src/net_nfc_client_llcp.c b/test/src/net_nfc_client_llcp.c
deleted file mode 100755 (executable)
index 12d8b04..0000000
+++ /dev/null
@@ -1,2509 +0,0 @@
-/*
- * Copyright (c) 2012, 2013 Samsung Electronics Co., Ltd.
- *
- * Licensed under the Flora License, Version 1.1 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://floralicense.org/license/
- *
- * 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.
- */
-
-#include "net_nfc_typedef_internal.h"
-#include "net_nfc_debug_internal.h"
-#include "net_nfc_util_internal.h"
-#include "net_nfc_util_gdbus_internal.h"
-#include "net_nfc_gdbus.h"
-#include "net_nfc_client.h"
-#include "net_nfc_client_manager.h"
-#include "net_nfc_client_llcp.h"
-
-#ifndef NET_NFC_EXPORT_API
-#define NET_NFC_EXPORT_API __attribute__((visibility("default")))
-#endif
-
-typedef struct _LlcpFuncData LlcpFuncData;
-
-struct _LlcpFuncData
-{
-       gpointer callback;
-       gpointer user_data;
-};
-
-static NetNfcGDbusLlcp *llcp_proxy = NULL;
-static net_nfc_llcp_config_info_s llcp_config = { 128, 0, 0, 1 };
-static net_nfc_target_handle_s *llcp_handle = NULL;
-static GList *socket_data_list = NULL;
-static guint socket_handle = 0;
-
-
-void llcp_socket_data_append(net_nfc_llcp_internal_socket_s *socket_data);
-
-void llcp_socket_data_remove(net_nfc_llcp_internal_socket_s *socket_data);
-
-net_nfc_llcp_internal_socket_s *llcp_socket_data_find
-                                               (net_nfc_llcp_socket_t socket);
-
-/* aysnc callback */
-static void llcp_call_config(GObject *source_object,
-                       GAsyncResult *res,
-                       gpointer user_data);
-
-static void llcp_call_listen(GObject *source_object,
-       GAsyncResult *res,
-       gpointer user_data);
-
-static void llcp_call_connect(GObject *source_object,
-       GAsyncResult *res,
-       gpointer user_data);
-
-static void llcp_call_connect_sap(GObject *source_object,
-       GAsyncResult *res,
-       gpointer user_data);
-
-static void llcp_call_send(GObject *source_object,
-       GAsyncResult *res,
-       gpointer user_data);
-
-static void llcp_call_send_to(GObject *source_object,
-       GAsyncResult *res,
-       gpointer user_data);
-
-static void llcp_call_receive(GObject *source_object,
-       GAsyncResult *res,
-       gpointer user_data);
-
-static void llcp_call_receive_from(GObject *source_object,
-       GAsyncResult *res,
-       gpointer user_data);
-
-static void llcp_call_close(GObject *source_object,
-       GAsyncResult *res,
-       gpointer user_data);
-
-static void llcp_call_disconnect(GObject *source_object,
-       GAsyncResult *res,
-       gpointer user_data);
-
-/* signal callback */
-static void llcp_error(NetNfcGDbusLlcp *object,
-       guint arg_handle,
-       guint client_socket,
-       gint error,
-       gpointer user_data);
-
-static void llcp_incoming(NetNfcGDbusLlcp *object,
-       guint arg_handle,
-       guint client_socket,
-       guint incoming_socket,
-       gpointer user_data);
-
-void llcp_socket_data_append(net_nfc_llcp_internal_socket_s *socket_data)
-{
-       if (socket_data_list == NULL)
-               return;
-
-       if (socket_data)
-       {
-               socket_data_list = g_list_append(socket_data_list,
-                                               socket_data);
-       }
-}
-
-void llcp_socket_data_remove(net_nfc_llcp_internal_socket_s *socket_data)
-{
-       if (socket_data_list == NULL)
-               return;
-
-       if (socket_data)
-       {
-               socket_data_list = g_list_remove(socket_data_list,
-                                               socket_data);
-
-               g_free(socket_data->service_name);
-               g_free(socket_data);
-       }
-}
-
-net_nfc_llcp_internal_socket_s *llcp_socket_data_find
-                                               (net_nfc_llcp_socket_t socket)
-{
-       GList *pos;
-
-       if (socket_data_list == NULL)
-               return NULL;
-
-
-       for (pos = g_list_first(socket_data_list); pos ; pos = pos->data)
-       {
-               net_nfc_llcp_internal_socket_s *data;
-
-               data = pos->data;
-               if (data == NULL)
-                       continue;
-
-               if (data->client_socket == socket)
-                       break;
-       }
-
-       if (pos == NULL)
-               return NULL;
-
-       return pos->data;
-}
-
-static void llcp_call_config(GObject *source_object,
-                       GAsyncResult *res,
-                       gpointer user_data)
-{
-       LlcpFuncData *func_data = user_data;
-       net_nfc_error_e result;
-       GError *error = NULL;
-
-       g_assert(func_data != NULL);
-
-       if (net_nfc_gdbus_llcp_call_config_finish(
-               NET_NFC_GDBUS_LLCP(source_object),
-               &result,
-               res,
-               &error) == FALSE)
-       {
-               DEBUG_ERR_MSG("Can not finish config: %s",
-                               error->message);
-               result = NET_NFC_IPC_FAIL;
-
-               g_error_free(error);
-       }
-
-       if (func_data->callback != NULL)
-       {
-               net_nfc_client_llcp_config_completed callback =
-                       (net_nfc_client_llcp_config_completed)func_data->callback;
-
-               callback(result, func_data->user_data);
-       }
-
-       g_free(func_data);
-}
-
-static void llcp_call_listen(GObject *source_object,
-       GAsyncResult *res,
-       gpointer user_data)
-{
-       LlcpFuncData *func_data = user_data;
-       net_nfc_error_e result;
-       guint32 out_client_socket = -1;
-       GError *error = NULL;
-       guint32 out_oal_socket = -1;
-       net_nfc_llcp_internal_socket_s *socket_data = NULL;
-
-       g_assert(func_data != NULL);
-
-       if (net_nfc_gdbus_llcp_call_listen_finish(
-               NET_NFC_GDBUS_LLCP(source_object),
-               &result,
-               &out_client_socket,
-               res,
-               &error) == FALSE)
-       {
-               DEBUG_ERR_MSG("Can not finish listen: %s",
-                               error->message);
-               result = NET_NFC_IPC_FAIL;
-
-               g_error_free(error);
-       }
-
-       socket_data = llcp_socket_data_find(out_client_socket);
-       if (socket_data == NULL)
-       {
-               DEBUG_ERR_MSG("Wrong client socket is returned");
-               return;
-       }
-
-       socket_data->oal_socket = out_oal_socket;
-
-       if (func_data->callback != NULL)
-       {
-               net_nfc_client_llcp_listen_completed callback =
-                       (net_nfc_client_llcp_listen_completed)func_data->callback;
-
-               callback(result, out_client_socket, func_data->user_data);
-       }
-
-       /* TODO : release resource when socket is closed */
-//     g_free(func_data);
-}
-
-static void llcp_call_accept(GObject *source_object,
-       GAsyncResult *res,
-       gpointer user_data)
-{
-       LlcpFuncData *func_data = user_data;
-       net_nfc_error_e result;
-       GError *error = NULL;
-
-       g_assert(func_data != NULL);
-
-       if (net_nfc_gdbus_llcp_call_accept_finish(
-               NET_NFC_GDBUS_LLCP(source_object),
-               &result,
-               res,
-               &error) == FALSE)
-       {
-               DEBUG_ERR_MSG("Can not finish accept: %s",
-                               error->message);
-               result = NET_NFC_IPC_FAIL;
-
-               g_error_free(error);
-       }
-
-       if (func_data->callback != NULL)
-       {
-               net_nfc_client_llcp_accept_completed callback =
-                       (net_nfc_client_llcp_accept_completed)func_data->callback;
-
-               callback(result, func_data->user_data);
-       }
-
-       g_free(func_data);
-}
-
-static void llcp_call_reject(GObject *source_object,
-       GAsyncResult *res,
-       gpointer user_data)
-{
-       LlcpFuncData *func_data = user_data;
-       net_nfc_error_e result;
-       GError *error = NULL;
-
-       g_assert(func_data != NULL);
-
-       if (net_nfc_gdbus_llcp_call_reject_finish(
-               NET_NFC_GDBUS_LLCP(source_object),
-               &result,
-               res,
-               &error) == FALSE)
-       {
-               DEBUG_ERR_MSG("Can not finish reject: %s",
-                               error->message);
-               result = NET_NFC_IPC_FAIL;
-
-               g_error_free(error);
-       }
-
-       if (func_data->callback != NULL)
-       {
-               net_nfc_client_llcp_reject_completed callback =
-                       (net_nfc_client_llcp_reject_completed)func_data->callback;
-
-               callback(result, func_data->user_data);
-       }
-
-       g_free(func_data);
-}
-
-static void llcp_call_connect(GObject *source_object,
-       GAsyncResult *res,
-       gpointer user_data)
-{
-       LlcpFuncData *func_data = user_data;
-       net_nfc_error_e result;
-       guint32 out_client_socket = -1;
-       GError *error = NULL;
-       guint32 out_oal_socket = -1;
-       net_nfc_llcp_internal_socket_s *socket_data = NULL;
-
-       g_assert(func_data != NULL);
-
-       if (net_nfc_gdbus_llcp_call_connect_finish(
-               NET_NFC_GDBUS_LLCP(source_object),
-               &result,
-               &out_client_socket,
-               res,
-               &error) == FALSE)
-       {
-               DEBUG_ERR_MSG("Can not finish connect: %s", error->message);
-               result = NET_NFC_IPC_FAIL;
-
-               g_error_free(error);
-       }
-
-       socket_data = llcp_socket_data_find(out_client_socket);
-       if (socket_data == NULL)
-       {
-               DEBUG_ERR_MSG("Wrong client socket is returned");
-               return;
-       }
-
-       socket_data->oal_socket = out_oal_socket;
-
-       if (func_data->callback != NULL)
-       {
-               net_nfc_client_llcp_connect_completed callback =
-                       (net_nfc_client_llcp_connect_completed)func_data->callback;
-
-               callback(result, out_client_socket, func_data->user_data);
-       }
-
-       /* TODO : release resource when socket is closed */
-//     g_free(func_data);
-}
-
-static void llcp_call_connect_sap(GObject *source_object,
-                               GAsyncResult *res,
-                               gpointer user_data)
-{
-       LlcpFuncData *func_data = user_data;
-       net_nfc_error_e result;
-       guint32 out_client_socket = -1;
-       GError *error = NULL;
-       guint32 out_oal_socket = -1;
-       net_nfc_llcp_internal_socket_s *socket_data = NULL;
-
-       g_assert(func_data != NULL);
-
-       if (net_nfc_gdbus_llcp_call_connect_sap_finish(
-               NET_NFC_GDBUS_LLCP(source_object),
-               &result,
-               &out_client_socket,
-               res,
-               &error) == FALSE)
-       {
-               DEBUG_ERR_MSG("Can not finish connect sap: %s", error->message);
-               result = NET_NFC_IPC_FAIL;
-
-               g_error_free(error);
-       }
-
-       socket_data = llcp_socket_data_find(out_client_socket);
-       if (socket_data == NULL)
-       {
-               DEBUG_ERR_MSG("Wrong client socket is returned");
-               return;
-       }
-
-       socket_data->oal_socket = out_oal_socket;
-
-       if (func_data->callback != NULL)
-       {
-               net_nfc_client_llcp_connect_sap_completed callback =
-                       (net_nfc_client_llcp_connect_sap_completed)func_data->callback;
-
-               callback(result, out_client_socket, func_data->user_data);
-       }
-
-       /* TODO : release resource when socket is closed */
-//     g_free(func_data);
-}
-
-static void llcp_call_send(GObject *source_object,
-       GAsyncResult *res,
-       gpointer user_data)
-{
-       LlcpFuncData *func_data = user_data;
-       net_nfc_error_e result;
-       guint32 out_client_socket = -1;
-       GError *error = NULL;
-
-       g_assert(func_data != NULL);
-
-       if (net_nfc_gdbus_llcp_call_send_finish(
-               NET_NFC_GDBUS_LLCP(source_object),
-               &result,
-               &out_client_socket,
-               res,
-               &error) == FALSE)
-       {
-               DEBUG_ERR_MSG("Can not finish send: %s",
-                       error->message);
-               result = NET_NFC_IPC_FAIL;
-
-               g_error_free(error);
-       }
-
-       if (func_data->callback != NULL)
-       {
-               net_nfc_client_llcp_send_completed callback =
-                       (net_nfc_client_llcp_send_completed)func_data->callback;
-
-               callback(result, func_data->user_data);
-       }
-
-       g_free(func_data);
-}
-
-static void llcp_call_send_to(GObject *source_object,
-       GAsyncResult *res,
-       gpointer user_data)
-{
-       LlcpFuncData *func_data = user_data;
-       net_nfc_error_e result;
-       guint32 out_client_socket = -1;
-       GError *error = NULL;
-
-       g_assert(func_data != NULL);
-
-       if (net_nfc_gdbus_llcp_call_send_to_finish(
-               NET_NFC_GDBUS_LLCP(source_object),
-               &result,
-               &out_client_socket,
-               res,
-               &error) == FALSE)
-       {
-               DEBUG_ERR_MSG("Can not finish send to: %s", error->message);
-               result = NET_NFC_IPC_FAIL;
-
-               g_error_free(error);
-       }
-
-       if (func_data->callback != NULL)
-       {
-               net_nfc_client_llcp_send_to_completed callback =
-                       (net_nfc_client_llcp_send_to_completed)func_data->callback;
-
-               callback(result, func_data->user_data);
-       }
-
-       g_free(func_data);
-}
-
-static void llcp_call_receive(GObject *source_object,
-       GAsyncResult *res,
-       gpointer user_data)
-{
-       LlcpFuncData *func_data = user_data;
-       net_nfc_error_e result;
-       GVariant *variant = NULL;
-       GError *error = NULL;
-
-       g_assert(func_data != NULL);
-
-       if (net_nfc_gdbus_llcp_call_receive_finish(
-               NET_NFC_GDBUS_LLCP(source_object),
-               &result,
-               &variant,
-               res,
-               &error) == FALSE)
-       {
-               DEBUG_ERR_MSG("Can not finish receive: %s", error->message);
-               result = NET_NFC_IPC_FAIL;
-
-               g_error_free(error);
-       }
-
-       if (func_data->callback != NULL)
-       {
-               net_nfc_client_llcp_receive_completed callback =
-                       (net_nfc_client_llcp_receive_completed)func_data->callback;
-               data_s data = { NULL, 0 };
-
-               net_nfc_util_gdbus_variant_to_data_s(variant, &data);
-
-               callback(result, &data, func_data->user_data);
-
-               net_nfc_util_clear_data(&data);
-       }
-
-       g_free(func_data);
-}
-
-static void llcp_call_receive_from(GObject *source_object,
-                               GAsyncResult *res,
-                               gpointer user_data)
-{
-       LlcpFuncData *func_data = user_data;
-       net_nfc_error_e result;
-       sap_t sap = 0;
-       GVariant *variant = NULL;
-       GError *error = NULL;
-
-       g_assert(func_data != NULL);
-
-       if (net_nfc_gdbus_llcp_call_receive_from_finish(
-               NET_NFC_GDBUS_LLCP(source_object),
-               &result,
-               &sap,
-               &variant,
-               res,
-               &error) == FALSE)
-       {
-               DEBUG_ERR_MSG("Can not finish receive from: %s",
-                               error->message);
-               result = NET_NFC_IPC_FAIL;
-
-               g_error_free(error);
-       }
-
-       if (func_data->callback != NULL)
-       {
-               net_nfc_client_llcp_receive_from_completed callback =
-                       (net_nfc_client_llcp_receive_from_completed)func_data->callback;
-               data_s data = { NULL, 0 };
-
-               net_nfc_util_gdbus_variant_to_data_s(variant, &data);
-
-               callback(result, sap, &data, func_data->user_data);
-
-               net_nfc_util_clear_data(&data);
-       }
-
-       g_free(func_data);
-}
-
-static void llcp_call_close(GObject *source_object,
-       GAsyncResult *res,
-       gpointer user_data)
-{
-       LlcpFuncData *func_data = user_data;
-       net_nfc_error_e result;
-       guint32 out_client_socket = -1;
-       GError *error = NULL;
-
-       net_nfc_llcp_internal_socket_s *socket_data = NULL;
-
-       g_assert(func_data != NULL);
-
-       if (net_nfc_gdbus_llcp_call_close_finish(
-               NET_NFC_GDBUS_LLCP(source_object),
-               &result,
-               &out_client_socket,
-               res,
-               &error) == FALSE)
-       {
-               DEBUG_ERR_MSG("Can not finish close: %s", error->message);
-               result = NET_NFC_IPC_FAIL;
-
-               g_error_free(error);
-       }
-
-       socket_data = llcp_socket_data_find(out_client_socket);
-       if (socket_data == NULL)
-       {
-               DEBUG_ERR_MSG("Wrong client socket is returned");
-               return;
-       }
-
-       if (func_data->callback != NULL)
-       {
-               net_nfc_client_llcp_close_completed callback =
-                       (net_nfc_client_llcp_close_completed)func_data->callback;
-
-               callback(result, func_data->user_data);
-       }
-
-       g_free(func_data);
-}
-
-static void llcp_call_disconnect(GObject *source_object,
-       GAsyncResult *res,
-       gpointer user_data)
-{
-       LlcpFuncData *func_data = user_data;
-       net_nfc_error_e result;
-       guint32 out_client_socket = -1;
-       GError *error = NULL;
-
-       net_nfc_llcp_internal_socket_s *socket_data = NULL;
-
-       g_assert(func_data != NULL);
-
-       if (net_nfc_gdbus_llcp_call_disconnect_finish(
-               NET_NFC_GDBUS_LLCP(source_object),
-               &result,
-               &out_client_socket,
-               res,
-               &error) == FALSE)
-       {
-               DEBUG_ERR_MSG("Can not finish disconnect: %s", error->message);
-               result = NET_NFC_IPC_FAIL;
-
-               g_error_free(error);
-       }
-
-       socket_data = llcp_socket_data_find(out_client_socket);
-       if (socket_data == NULL)
-       {
-               DEBUG_ERR_MSG("Wrong client socket is returned");
-               return;
-       }
-
-       if (func_data->callback != NULL) {
-               net_nfc_client_llcp_disconnect_completed callback =
-                       (net_nfc_client_llcp_disconnect_completed)func_data->callback;
-
-               callback(result, func_data->user_data);
-       }
-
-       g_free(func_data);
-}
-
-static void llcp_error(NetNfcGDbusLlcp *object,
-       guint arg_handle,
-       guint client_socket,
-       gint error,
-       gpointer user_data)
-{
-       INFO_MSG(">>> SIGNAL arrived");
-}
-
-static void llcp_incoming(NetNfcGDbusLlcp *object,
-       guint arg_handle,
-       guint client_socket,
-       guint incoming_socket,
-       gpointer user_data)
-{
-       INFO_MSG(">>> SIGNAL arrived");
-}
-
-/* Public APIs */
-NET_NFC_EXPORT_API
-net_nfc_error_e net_nfc_client_llcp_config(net_nfc_llcp_config_info_h config,
-                               net_nfc_client_llcp_config_completed callback,
-                               void *user_data)
-{
-       LlcpFuncData *func_data;
-       GVariant *variant;
-
-       if (config == NULL) {
-               return NET_NFC_NULL_PARAMETER;
-       }
-
-       if (llcp_proxy == NULL)
-       {
-               if(net_nfc_client_llcp_init() != NET_NFC_OK)
-               {
-                       DEBUG_ERR_MSG("llcp_proxy fail");
-                       return NET_NFC_NOT_INITIALIZED;
-               }
-       }
-
-       /* prevent executing daemon when nfc is off */
-       if (net_nfc_client_manager_is_activated() == false) {
-               return NET_NFC_NOT_ACTIVATED;
-       }
-
-       func_data = g_new0(LlcpFuncData, 1);
-       if (func_data == NULL) {
-               DEBUG_ERR_MSG("g_new0 failed");
-
-               return NET_NFC_ALLOC_FAIL;
-       }
-
-       func_data->callback = (gpointer)callback;
-       func_data->user_data = user_data;
-
-       memcpy(&llcp_config, config, sizeof(net_nfc_llcp_config_info_s));
-
-       variant = g_variant_new("(qqyy)",
-                               config->miu,
-                               config->wks,
-                               config->lto,
-                               config->option);
-
-       net_nfc_gdbus_llcp_call_config(llcp_proxy,
-                               variant,
-                               NULL,
-                               llcp_call_config,
-                               func_data);
-
-       return NET_NFC_OK;
-}
-
-NET_NFC_EXPORT_API
-net_nfc_error_e net_nfc_client_llcp_config_sync
-                                       (net_nfc_llcp_config_info_h config)
-{
-       net_nfc_error_e result;
-       GVariant *variant = NULL;
-       GError *error = NULL;
-
-       if (llcp_proxy == NULL)
-       {
-               if(net_nfc_client_llcp_init() != NET_NFC_OK)
-               {
-                       DEBUG_ERR_MSG("llcp_proxy fail");
-                       return NET_NFC_NOT_INITIALIZED;
-               }
-       }
-
-       /* prevent executing daemon when nfc is off */
-       if (net_nfc_client_manager_is_activated() == false) {
-               return NET_NFC_NOT_ACTIVATED;
-       }
-
-       memcpy(&llcp_config, config, sizeof(net_nfc_llcp_config_info_s));
-
-       variant = g_variant_new("(qqyy)",
-                               config->miu,
-                               config->wks,
-                               config->lto,
-                               config->option);
-
-       if (net_nfc_gdbus_llcp_call_config_sync(llcp_proxy,
-               variant,
-               &result,
-               NULL,
-               &error) == FALSE)
-       {
-               DEBUG_ERR_MSG("can not config: %s", error->message);
-               result = NET_NFC_IPC_FAIL;
-
-               g_error_free(error);
-       }
-
-       return result;
-}
-
-NET_NFC_EXPORT_API
-net_nfc_error_e net_nfc_client_llcp_get_config
-                                       (net_nfc_llcp_config_info_h *config)
-{
-       if (config == NULL)
-               return NET_NFC_NULL_PARAMETER;
-
-       *config = (net_nfc_llcp_config_info_h)&llcp_config;
-
-       return NET_NFC_OK;
-}
-
-NET_NFC_EXPORT_API
-net_nfc_error_e net_nfc_client_llcp_listen(net_nfc_llcp_socket_t socket,
-                               const char *service_name,
-                               sap_t sap,
-                               net_nfc_client_llcp_listen_completed callback,
-                               void *user_data)
-{
-       LlcpFuncData *func_data;
-       net_nfc_llcp_internal_socket_s *socket_data = NULL;
-
-       if (llcp_proxy == NULL)
-       {
-               if(net_nfc_client_llcp_init() != NET_NFC_OK)
-               {
-                       DEBUG_ERR_MSG("llcp_proxy fail");
-                       return NET_NFC_NOT_INITIALIZED;
-               }
-       }
-
-       socket_data = llcp_socket_data_find(socket);
-       if (socket_data == NULL)
-       {
-               DEBUG_ERR_MSG("can not get socket_data");
-               return NET_NFC_LLCP_INVALID_SOCKET;
-       }
-
-       /* FIXME: temporary typecast to (uint8_t *) */
-       socket_data->service_name = (uint8_t *)g_strdup(service_name);
-       socket_data->sap = sap;
-
-       /* prevent executing daemon when nfc is off */
-       if (net_nfc_client_manager_is_activated() == false) {
-               return NET_NFC_NOT_ACTIVATED;
-       }
-
-       func_data = g_new0(LlcpFuncData, 1);
-       if (func_data == NULL) {
-               DEBUG_ERR_MSG("g_new0 failed");
-
-               return NET_NFC_ALLOC_FAIL;
-       }
-
-       func_data->callback = (gpointer)callback;
-       func_data->user_data = user_data;
-
-       net_nfc_gdbus_llcp_call_listen(llcp_proxy,
-                               GPOINTER_TO_UINT(llcp_handle),
-                               socket_data->client_socket,
-                               socket_data->miu,
-                               socket_data->rw,
-                               socket_data->type,
-                               socket_data->sap,
-                               service_name,
-                               NULL,
-                               llcp_call_listen,
-                               func_data);
-
-       return NET_NFC_OK;
-}
-
-NET_NFC_EXPORT_API
-net_nfc_error_e net_nfc_client_llcp_listen_sync(net_nfc_llcp_socket_t socket,
-                                       const char *service_name,
-                                       sap_t sap,
-                                       net_nfc_llcp_socket_t *out_socket)
-{
-       net_nfc_error_e result;
-       GError *error = NULL;
-       guint32 out_client_socket;
-
-       net_nfc_llcp_internal_socket_s *socket_data = NULL;
-       net_nfc_llcp_internal_socket_s *out_socket_data = NULL;
-
-       if (out_socket == NULL) {
-               return NET_NFC_NULL_PARAMETER;
-       }
-
-       if (llcp_proxy == NULL)
-       {
-               if(net_nfc_client_llcp_init() != NET_NFC_OK)
-               {
-                       DEBUG_ERR_MSG("llcp_proxy fail");
-                       return NET_NFC_NOT_INITIALIZED;
-               }
-       }
-
-       if (service_name == NULL)
-       {
-               DEBUG_ERR_MSG("service_name is empty");
-               return NET_NFC_UNKNOWN_ERROR;
-       }
-
-       socket_data = llcp_socket_data_find(socket);
-       if (socket_data == NULL)
-       {
-               DEBUG_ERR_MSG("can not get socket_data");
-               return NET_NFC_LLCP_INVALID_SOCKET;
-       }
-
-       /* FIXME: temporary typecast to (uint8_t *) */
-       socket_data->service_name = (uint8_t *)g_strdup(service_name);
-       socket_data->sap = sap;
-
-       /* prevent executing daemon when nfc is off */
-       if (net_nfc_client_manager_is_activated() == false) {
-               return NET_NFC_NOT_ACTIVATED;
-       }
-
-       if (net_nfc_gdbus_llcp_call_listen_sync(llcp_proxy,
-                                       GPOINTER_TO_UINT(llcp_handle),
-                                       socket_data->client_socket,
-                                       socket_data->miu,
-                                       socket_data->rw,
-                                       socket_data->type,
-                                       socket_data->sap,
-                                       service_name,
-                                       &result,
-                                       &out_client_socket,
-                                       NULL,
-                                       &error) == true) {
-               out_socket_data = llcp_socket_data_find(out_client_socket);
-               if (out_socket_data == NULL || out_socket_data != socket_data)
-               {
-                       DEBUG_ERR_MSG("Wrong client socket is returned");
-                       return NET_NFC_UNKNOWN_ERROR;
-               }
-
-//             out_socket_data->oal_socket = out_oal_socket;
-
-               if (out_socket)
-                       *out_socket = out_client_socket;
-       } else {
-               DEBUG_ERR_MSG("can not listen: %s", error->message);
-               result = NET_NFC_IPC_FAIL;
-
-               g_error_free(error);
-       }
-
-       return result;
-}
-
-NET_NFC_EXPORT_API
-net_nfc_error_e net_nfc_client_llcp_accept(net_nfc_llcp_socket_t socket,
-       net_nfc_client_llcp_accept_completed callback,
-       void *user_data)
-{
-       LlcpFuncData *func_data;
-
-       if (llcp_proxy == NULL)
-       {
-               if(net_nfc_client_llcp_init() != NET_NFC_OK)
-               {
-                       DEBUG_ERR_MSG("llcp_proxy fail");
-                       return NET_NFC_NOT_INITIALIZED;
-               }
-       }
-
-       /* prevent executing daemon when nfc is off */
-       if (net_nfc_client_manager_is_activated() == false) {
-               return NET_NFC_NOT_ACTIVATED;
-       }
-
-       func_data = g_new0(LlcpFuncData, 1);
-       if (func_data == NULL) {
-               DEBUG_ERR_MSG("g_new0 failed");
-
-               return NET_NFC_ALLOC_FAIL;
-       }
-
-       func_data->callback = (gpointer)callback;
-       func_data->user_data = user_data;
-
-       net_nfc_gdbus_llcp_call_accept(llcp_proxy,
-               GPOINTER_TO_UINT(llcp_handle),
-               socket,
-               NULL,
-               llcp_call_accept,
-               func_data);
-
-       return NET_NFC_OK;
-}
-
-NET_NFC_EXPORT_API
-net_nfc_error_e net_nfc_client_llcp_accept_sync(net_nfc_llcp_socket_t socket)
-{
-       net_nfc_error_e result;
-       GError *error = NULL;
-
-       if (llcp_proxy == NULL)
-       {
-               if(net_nfc_client_llcp_init() != NET_NFC_OK)
-               {
-                       DEBUG_ERR_MSG("llcp_proxy fail");
-                       return NET_NFC_NOT_INITIALIZED;
-               }
-       }
-
-       /* prevent executing daemon when nfc is off */
-       if (net_nfc_client_manager_is_activated() == false) {
-               return NET_NFC_NOT_ACTIVATED;
-       }
-
-       if (net_nfc_gdbus_llcp_call_accept_sync(llcp_proxy,
-               GPOINTER_TO_UINT(llcp_handle),
-               socket,
-               &result,
-               NULL,
-               &error) == false) {
-               DEBUG_ERR_MSG("can not connect: %s", error->message);
-               result = NET_NFC_IPC_FAIL;
-
-               g_error_free(error);
-       }
-
-       return result;
-}
-
-NET_NFC_EXPORT_API
-net_nfc_error_e net_nfc_client_llcp_reject(net_nfc_llcp_socket_t socket,
-               net_nfc_client_llcp_reject_completed callback,
-               void *user_data)
-{
-       LlcpFuncData *func_data;
-
-       if (llcp_proxy == NULL)
-       {
-               if(net_nfc_client_llcp_init() != NET_NFC_OK)
-               {
-                       DEBUG_ERR_MSG("llcp_proxy fail");
-                       return NET_NFC_NOT_INITIALIZED;
-               }
-       }
-
-       /* prevent executing daemon when nfc is off */
-       if (net_nfc_client_manager_is_activated() == false) {
-               return NET_NFC_NOT_ACTIVATED;
-       }
-
-       func_data = g_new0(LlcpFuncData, 1);
-       if (func_data == NULL) {
-               DEBUG_ERR_MSG("g_new0 failed");
-
-               return NET_NFC_ALLOC_FAIL;
-       }
-
-       func_data->callback = (gpointer)callback;
-       func_data->user_data = user_data;
-
-       net_nfc_gdbus_llcp_call_reject(llcp_proxy,
-               GPOINTER_TO_UINT(llcp_handle),
-               socket,
-               NULL,
-               llcp_call_reject,
-               func_data);
-
-       return NET_NFC_OK;
-}
-
-NET_NFC_EXPORT_API
-net_nfc_error_e net_nfc_client_llcp_reject_sync(net_nfc_llcp_socket_t socket)
-{
-       net_nfc_error_e result;
-       GError *error = NULL;
-
-       if (llcp_proxy == NULL)
-       {
-               if(net_nfc_client_llcp_init() != NET_NFC_OK)
-               {
-                       DEBUG_ERR_MSG("llcp_proxy fail");
-                       return NET_NFC_NOT_INITIALIZED;
-               }
-       }
-
-       /* prevent executing daemon when nfc is off */
-       if (net_nfc_client_manager_is_activated() == false) {
-               return NET_NFC_NOT_ACTIVATED;
-       }
-
-       if (net_nfc_gdbus_llcp_call_reject_sync(llcp_proxy,
-               GPOINTER_TO_UINT(llcp_handle),
-               socket,
-               &result,
-               NULL,
-               &error) == false) {
-               DEBUG_ERR_MSG("can not connect: %s", error->message);
-               result = NET_NFC_IPC_FAIL;
-
-               g_error_free(error);
-       }
-
-       return result;
-}
-
-NET_NFC_EXPORT_API
-net_nfc_error_e net_nfc_client_llcp_connect(net_nfc_llcp_socket_t socket,
-                               const char *service_name,
-                               net_nfc_client_llcp_connect_completed callback,
-                               void *user_data)
-{
-       LlcpFuncData *func_data;
-       net_nfc_llcp_internal_socket_s *socket_data = NULL;
-
-       if (service_name == NULL) {
-               return NET_NFC_NULL_PARAMETER;
-       }
-
-       if (llcp_proxy == NULL)
-       {
-               if(net_nfc_client_llcp_init() != NET_NFC_OK)
-               {
-                       DEBUG_ERR_MSG("llcp_proxy fail");
-                       return NET_NFC_NOT_INITIALIZED;
-               }
-       }
-
-       socket_data = llcp_socket_data_find(socket);
-       if (socket_data == NULL)
-       {
-               DEBUG_ERR_MSG("can not get socket_data");
-               return NET_NFC_LLCP_INVALID_SOCKET;
-       }
-
-       /* prevent executing daemon when nfc is off */
-       if (net_nfc_client_manager_is_activated() == false) {
-               return NET_NFC_NOT_ACTIVATED;
-       }
-
-       func_data = g_new0(LlcpFuncData, 1);
-       if (func_data == NULL) {
-               DEBUG_ERR_MSG("g_new0 failed");
-
-               return NET_NFC_ALLOC_FAIL;
-       }
-
-       func_data->callback = (gpointer)callback;
-       func_data->user_data = user_data;
-
-       net_nfc_gdbus_llcp_call_connect(llcp_proxy,
-                               GPOINTER_TO_UINT(llcp_handle),
-                               socket_data->client_socket,
-                               socket_data->miu,
-                               socket_data->rw,
-                               socket_data->type,
-                               service_name,
-                               NULL,
-                               llcp_call_connect,
-                               func_data);
-
-       return NET_NFC_OK;
-}
-
-NET_NFC_EXPORT_API
-net_nfc_error_e net_nfc_client_llcp_connect_sync(net_nfc_llcp_socket_t socket,
-                                       const char *service_name,
-                                       net_nfc_llcp_socket_t *out_socket)
-{
-       net_nfc_error_e result;
-       GError *error = NULL;
-       guint32 out_client_socket;
-
-       net_nfc_llcp_internal_socket_s *socket_data = NULL;
-       net_nfc_llcp_internal_socket_s *out_socket_data = NULL;
-
-       if (service_name == NULL || out_socket == NULL) {
-               return NET_NFC_NULL_PARAMETER;
-       }
-
-       if (llcp_proxy == NULL)
-       {
-               if(net_nfc_client_llcp_init() != NET_NFC_OK)
-               {
-                       DEBUG_ERR_MSG("llcp_proxy fail");
-                       return NET_NFC_NOT_INITIALIZED;
-               }
-       }
-
-       socket_data = llcp_socket_data_find(socket);
-       if (socket_data == NULL)
-       {
-               DEBUG_ERR_MSG("can not get socket_data");
-               return NET_NFC_LLCP_INVALID_SOCKET;
-       }
-
-       /* prevent executing daemon when nfc is off */
-       if (net_nfc_client_manager_is_activated() == false) {
-               return NET_NFC_NOT_ACTIVATED;
-       }
-
-       if (net_nfc_gdbus_llcp_call_connect_sync(llcp_proxy,
-                                       GPOINTER_TO_UINT(llcp_handle),
-                                       socket_data->client_socket,
-                                       socket_data->miu,
-                                       socket_data->rw,
-                                       socket_data->type,
-                                       service_name,
-                                       &result,
-                                       &out_client_socket,
-                                       NULL,
-                                       &error) == true) {
-               out_socket_data = llcp_socket_data_find(out_client_socket);
-               if (out_socket_data == NULL || out_socket_data !=  socket_data)
-               {
-                       DEBUG_ERR_MSG("Wrong client socket is returned");
-                       return NET_NFC_UNKNOWN_ERROR;
-               }
-
-//             out_socket_data->oal_socket = out_oal_socket;
-
-               if (out_socket)
-                       *out_socket = out_client_socket;
-       } else {
-               DEBUG_ERR_MSG("can not connect: %s", error->message);
-               result = NET_NFC_IPC_FAIL;
-
-               g_error_free(error);
-       }
-
-       return result;
-}
-
-NET_NFC_EXPORT_API
-net_nfc_error_e net_nfc_client_llcp_connect_sap(net_nfc_llcp_socket_t socket,
-                       sap_t sap,
-                       net_nfc_client_llcp_connect_sap_completed callback,
-                       void *user_data)
-{
-       LlcpFuncData *func_data;
-       net_nfc_llcp_internal_socket_s *socket_data = NULL;
-
-       if (sap == 0) {
-               return NET_NFC_INVALID_PARAM;
-       }
-
-       if (llcp_proxy == NULL)
-       {
-               if(net_nfc_client_llcp_init() != NET_NFC_OK)
-               {
-                       DEBUG_ERR_MSG("llcp_proxy fail");
-                       return NET_NFC_NOT_INITIALIZED;
-               }
-       }
-
-       socket_data = llcp_socket_data_find(socket);
-       if (socket_data == NULL)
-       {
-               DEBUG_ERR_MSG("can not get socket_data");
-               return NET_NFC_LLCP_INVALID_SOCKET;
-       }
-
-       /* prevent executing daemon when nfc is off */
-       if (net_nfc_client_manager_is_activated() == false) {
-               return NET_NFC_NOT_ACTIVATED;
-       }
-
-       func_data = g_new0(LlcpFuncData, 1);
-       if (func_data == NULL) {
-               DEBUG_ERR_MSG("g_new0 failed");
-
-               return NET_NFC_ALLOC_FAIL;
-       }
-
-       func_data->callback = (gpointer)callback;
-       func_data->user_data = user_data;
-
-       net_nfc_gdbus_llcp_call_connect_sap(llcp_proxy,
-                               GPOINTER_TO_UINT(llcp_handle),
-                               socket_data->client_socket,
-                               socket_data->miu,
-                               socket_data->rw,
-                               socket_data->type,
-                               sap,
-                               NULL,
-                               llcp_call_connect_sap,
-                               func_data);
-
-       return NET_NFC_OK;
-}
-
-NET_NFC_EXPORT_API
-net_nfc_error_e net_nfc_client_llcp_connect_sap_sync(
-                                       net_nfc_llcp_socket_t socket,
-                                       sap_t sap,
-                                       net_nfc_llcp_socket_t *out_socket)
-{
-       net_nfc_error_e result;
-       GError *error = NULL;
-       guint32 out_client_socket;
-
-       net_nfc_llcp_internal_socket_s *socket_data = NULL;
-       net_nfc_llcp_internal_socket_s *out_socket_data = NULL;
-
-       if (out_socket == NULL) {
-               return NET_NFC_NULL_PARAMETER;
-       }
-
-       if (sap == 0) {
-               return NET_NFC_INVALID_PARAM;
-       }
-
-       if (llcp_proxy == NULL)
-       {
-               if(net_nfc_client_llcp_init() != NET_NFC_OK)
-               {
-                       DEBUG_ERR_MSG("llcp_proxy fail");
-                       return NET_NFC_NOT_INITIALIZED;
-               }
-       }
-
-       socket_data = llcp_socket_data_find(socket);
-       if (socket_data == NULL)
-       {
-               DEBUG_ERR_MSG("can not get socket_data");
-               return NET_NFC_LLCP_INVALID_SOCKET;
-       }
-
-       /* prevent executing daemon when nfc is off */
-       if (net_nfc_client_manager_is_activated() == false) {
-               return NET_NFC_NOT_ACTIVATED;
-       }
-
-       if (net_nfc_gdbus_llcp_call_connect_sap_sync(llcp_proxy,
-                                       GPOINTER_TO_UINT(llcp_handle),
-                                       socket_data->client_socket,
-                                       socket_data->miu,
-                                       socket_data->rw,
-                                       socket_data->type,
-                                       sap,
-                                       &result,
-                                       &out_client_socket,
-                                       NULL,
-                                       &error) == true) {
-               out_socket_data = llcp_socket_data_find(out_client_socket);
-               if (out_socket_data == NULL || out_socket_data !=  socket_data)
-               {
-                       DEBUG_ERR_MSG("Wrong client socket is returned");
-                       return NET_NFC_UNKNOWN_ERROR;
-               }
-
-//             out_socket_data->oal_socket = out_oal_socket;
-
-               if (out_socket)
-                       *out_socket = out_client_socket;
-       } else {
-               DEBUG_ERR_MSG("can not connect: %s", error->message);
-               result = NET_NFC_IPC_FAIL;
-
-               g_error_free(error);
-       }
-
-       return result;
-}
-
-NET_NFC_EXPORT_API
-net_nfc_error_e net_nfc_client_llcp_send(net_nfc_llcp_socket_t socket,
-                               data_h data,
-                               net_nfc_client_llcp_send_completed callback,
-                               void *user_data)
-{
-       LlcpFuncData *func_data;
-       GVariant *variant;
-       net_nfc_llcp_internal_socket_s *socket_data = NULL;
-
-       if (data == NULL) {
-               return NET_NFC_NULL_PARAMETER;
-       }
-
-       if (socket <= 0) {
-               return NET_NFC_INVALID_PARAM;
-       }
-
-       if (llcp_proxy == NULL)
-       {
-               if(net_nfc_client_llcp_init() != NET_NFC_OK)
-               {
-                       DEBUG_ERR_MSG("llcp_proxy fail");
-                       return NET_NFC_NOT_INITIALIZED;
-               }
-       }
-
-       /* prevent executing daemon when nfc is off */
-       if (net_nfc_client_manager_is_activated() == false) {
-               return NET_NFC_NOT_ACTIVATED;
-       }
-
-       socket_data = llcp_socket_data_find(socket);
-       if (socket_data == NULL)
-       {
-               DEBUG_ERR_MSG("can not get socket_data");
-               return NET_NFC_LLCP_INVALID_SOCKET;
-       }
-
-       func_data = g_new0(LlcpFuncData, 1);
-       if (func_data == NULL) {
-               DEBUG_ERR_MSG("g_new0 failed");
-
-               return NET_NFC_ALLOC_FAIL;
-       }
-
-       func_data->callback = (gpointer)callback;
-       func_data->user_data = user_data;
-
-       variant = net_nfc_util_gdbus_data_to_variant(data);
-
-       net_nfc_gdbus_llcp_call_send(llcp_proxy,
-                               GPOINTER_TO_UINT(llcp_handle),
-                               socket_data->client_socket,
-                               variant,
-                               NULL,
-                               llcp_call_send,
-                               func_data);
-
-       return NET_NFC_OK;
-}
-
-NET_NFC_EXPORT_API
-net_nfc_error_e net_nfc_client_llcp_send_sync(net_nfc_llcp_socket_t socket,
-                                       data_h data)
-{
-       net_nfc_error_e result;
-       GVariant *variant;
-       GError *error = NULL;
-       guint32 out_client_socket;
-
-       net_nfc_llcp_internal_socket_s *socket_data;
-       net_nfc_llcp_internal_socket_s *out_socket_data;
-
-       if (data == NULL) {
-               return NET_NFC_NULL_PARAMETER;
-       }
-
-       if (socket <= 0) {
-               return NET_NFC_INVALID_PARAM;
-       }
-
-       if (llcp_proxy == NULL)
-       {
-               if(net_nfc_client_llcp_init() != NET_NFC_OK)
-               {
-                       DEBUG_ERR_MSG("llcp_proxy fail");
-                       return NET_NFC_NOT_INITIALIZED;
-               }
-       }
-
-       socket_data = llcp_socket_data_find(socket);
-       if (socket_data == NULL)
-       {
-               DEBUG_ERR_MSG("can not get socket_data");
-               return NET_NFC_LLCP_INVALID_SOCKET;
-       }
-
-       /* prevent executing daemon when nfc is off */
-       if (net_nfc_client_manager_is_activated() == false) {
-               return NET_NFC_NOT_ACTIVATED;
-       }
-
-       variant = net_nfc_util_gdbus_data_to_variant(data);
-
-       if (net_nfc_gdbus_llcp_call_send_sync(llcp_proxy,
-               GPOINTER_TO_UINT(llcp_handle),
-               socket_data->client_socket,
-               variant,
-               &result,
-               &out_client_socket,
-               NULL,
-               &error) == true) {
-               out_socket_data = llcp_socket_data_find(out_client_socket);
-               if (out_socket_data == NULL)
-               {
-                       DEBUG_ERR_MSG("can not find socket_data");
-                       return NET_NFC_UNKNOWN_ERROR;
-               }
-       } else {
-               DEBUG_ERR_MSG("can not call send: %s", error->message);
-               result = NET_NFC_IPC_FAIL;
-
-               g_error_free(error);
-       }
-
-       return result;
-}
-
-
-NET_NFC_EXPORT_API
-net_nfc_error_e net_nfc_client_llcp_send_to(net_nfc_llcp_socket_t socket,
-       sap_t sap,
-       data_h data,
-       net_nfc_client_llcp_send_to_completed callback,
-       void *user_data)
-{
-       LlcpFuncData *func_data;
-       GVariant *variant;
-       net_nfc_llcp_internal_socket_s *socket_data = NULL;
-
-       if (data == NULL) {
-               return NET_NFC_NULL_PARAMETER;
-       }
-
-       if (socket <= 0 || sap == 0) {
-               return NET_NFC_INVALID_PARAM;
-       }
-
-       if (llcp_proxy == NULL)
-       {
-               if(net_nfc_client_llcp_init() != NET_NFC_OK)
-               {
-                       DEBUG_ERR_MSG("llcp_proxy fail");
-                       return NET_NFC_NOT_INITIALIZED;
-               }
-       }
-
-       socket_data = llcp_socket_data_find(socket);
-       if (socket_data == NULL)
-       {
-               DEBUG_ERR_MSG("can not get socket_data");
-               return NET_NFC_LLCP_INVALID_SOCKET;
-       }
-
-       /* prevent executing daemon when nfc is off */
-       if (net_nfc_client_manager_is_activated() == false) {
-               return NET_NFC_NOT_ACTIVATED;
-       }
-
-       func_data = g_new0(LlcpFuncData, 1);
-       if (func_data == NULL) {
-               DEBUG_ERR_MSG("g_new0 failed");
-
-               return NET_NFC_ALLOC_FAIL;
-       }
-
-       func_data->callback = (gpointer)callback;
-       func_data->user_data = user_data;
-
-       variant = net_nfc_util_gdbus_data_to_variant(data);
-
-       net_nfc_gdbus_llcp_call_send_to(llcp_proxy,
-               GPOINTER_TO_UINT(llcp_handle),
-               socket_data->client_socket,
-               sap,
-               variant,
-               NULL,
-               llcp_call_send_to,
-               func_data);
-
-       return NET_NFC_OK;
-}
-
-NET_NFC_EXPORT_API
-net_nfc_error_e net_nfc_client_llcp_send_to_sync(net_nfc_llcp_socket_t socket,
-       sap_t sap,
-       data_h data)
-{
-       net_nfc_error_e result;
-       GVariant *variant;
-       GError *error = NULL;
-       guint32 out_client_socket;
-
-       net_nfc_llcp_internal_socket_s *socket_data;
-       net_nfc_llcp_internal_socket_s *out_socket_data;
-
-       if (data == NULL) {
-               return NET_NFC_NULL_PARAMETER;
-       }
-
-       if (socket <= 0 || sap == 0) {
-               return NET_NFC_INVALID_PARAM;
-       }
-
-       if (llcp_proxy == NULL)
-       {
-               if(net_nfc_client_llcp_init() != NET_NFC_OK)
-               {
-                       DEBUG_ERR_MSG("llcp_proxy fail");
-                       return NET_NFC_NOT_INITIALIZED;
-               }
-       }
-
-       socket_data = llcp_socket_data_find(socket);
-       if (socket_data == NULL)
-       {
-               DEBUG_ERR_MSG("can not get socket_data");
-               return NET_NFC_LLCP_INVALID_SOCKET;
-       }
-
-       /* prevent executing daemon when nfc is off */
-       if (net_nfc_client_manager_is_activated() == false) {
-               return NET_NFC_NOT_ACTIVATED;
-       }
-
-       variant = net_nfc_util_gdbus_data_to_variant(data);
-
-       if (net_nfc_gdbus_llcp_call_send_to_sync(llcp_proxy,
-               GPOINTER_TO_UINT(llcp_handle),
-               socket_data->client_socket,
-               sap,
-               variant,
-               &result,
-               &out_client_socket,
-               NULL,
-               &error) == true) {
-               out_socket_data = llcp_socket_data_find(out_client_socket);
-               if (out_socket_data == NULL)
-               {
-                       DEBUG_ERR_MSG("can not find socket_data");
-                       return NET_NFC_UNKNOWN_ERROR;
-               }
-       } else {
-               DEBUG_ERR_MSG("can not call send to: %s", error->message);
-               result = NET_NFC_IPC_FAIL;
-
-               g_error_free(error);
-       }
-
-       return result;
-}
-
-NET_NFC_EXPORT_API
-net_nfc_error_e net_nfc_client_llcp_receive(net_nfc_llcp_socket_t socket,
-       size_t request_length,
-       net_nfc_client_llcp_receive_completed callback,
-       void *user_data)
-{
-       LlcpFuncData *func_data;
-       net_nfc_llcp_internal_socket_s *socket_data = NULL;
-
-       if (socket <= 0 || request_length == 0) {
-               return NET_NFC_INVALID_PARAM;
-       }
-
-       if (llcp_proxy == NULL)
-       {
-               if(net_nfc_client_llcp_init() != NET_NFC_OK)
-               {
-                       DEBUG_ERR_MSG("llcp_proxy fail");
-                       return NET_NFC_NOT_INITIALIZED;
-               }
-       }
-
-       socket_data = llcp_socket_data_find(socket);
-       if (socket_data == NULL)
-       {
-               DEBUG_ERR_MSG("can not get socket_data");
-               return NET_NFC_LLCP_INVALID_SOCKET;
-       }
-
-       /* prevent executing daemon when nfc is off */
-       if (net_nfc_client_manager_is_activated() == false) {
-               return NET_NFC_NOT_ACTIVATED;
-       }
-
-       func_data = g_new0(LlcpFuncData, 1);
-       if (func_data == NULL) {
-               DEBUG_ERR_MSG("g_new0 failed");
-
-               return NET_NFC_ALLOC_FAIL;
-       }
-
-       func_data->callback = (gpointer)callback;
-       func_data->user_data = user_data;
-
-       net_nfc_gdbus_llcp_call_receive(llcp_proxy,
-                               GPOINTER_TO_UINT(llcp_handle),
-                               socket_data->client_socket,
-                               request_length,
-                               NULL,
-                               llcp_call_receive,
-                               func_data);
-
-       return NET_NFC_OK;
-}
-
-NET_NFC_EXPORT_API
-net_nfc_error_e net_nfc_client_llcp_receive_sync(net_nfc_llcp_socket_t socket,
-       size_t request_length,
-       data_h *out_data)
-{
-       net_nfc_error_e result;
-       GVariant *variant;
-       GError *error = NULL;
-       net_nfc_llcp_internal_socket_s *socket_data;
-
-       if (out_data == NULL) {
-               return NET_NFC_NULL_PARAMETER;
-       }
-
-       *out_data = NULL;
-
-       if (socket <= 0 || request_length == 0) {
-               return NET_NFC_INVALID_PARAM;
-       }
-
-       if (llcp_proxy == NULL)
-       {
-               if(net_nfc_client_llcp_init() != NET_NFC_OK)
-               {
-                       DEBUG_ERR_MSG("llcp_proxy fail");
-                       return NET_NFC_NOT_INITIALIZED;
-               }
-       }
-
-       socket_data = llcp_socket_data_find(socket);
-       if (socket_data == NULL)
-       {
-               DEBUG_ERR_MSG("can not get socket_data");
-               return NET_NFC_LLCP_INVALID_SOCKET;
-       }
-
-       /* prevent executing daemon when nfc is off */
-       if (net_nfc_client_manager_is_activated() == false) {
-               return NET_NFC_NOT_ACTIVATED;
-       }
-
-       if (net_nfc_gdbus_llcp_call_receive_sync(llcp_proxy,
-               GPOINTER_TO_UINT(llcp_handle),
-               socket_data->client_socket,
-               request_length,
-               &result,
-               &variant,
-               NULL,
-               &error) == true) {
-               *out_data = net_nfc_util_gdbus_variant_to_data(variant);
-       } else {
-               DEBUG_ERR_MSG("can not call receive: %s", error->message);
-               result = NET_NFC_IPC_FAIL;
-
-               g_error_free(error);
-       }
-
-       return result;
-}
-
-NET_NFC_EXPORT_API
-net_nfc_error_e net_nfc_client_llcp_receive_from(net_nfc_llcp_socket_t socket,
-       size_t request_length,
-       net_nfc_client_llcp_receive_from_completed callback,
-       void *user_data)
-{
-       LlcpFuncData *func_data;
-       net_nfc_llcp_internal_socket_s *socket_data = NULL;
-
-       if (socket <= 0 || request_length == 0) {
-               return NET_NFC_INVALID_PARAM;
-       }
-
-       if (llcp_proxy == NULL)
-       {
-               if(net_nfc_client_llcp_init() != NET_NFC_OK)
-               {
-                       DEBUG_ERR_MSG("llcp_proxy fail");
-                       return NET_NFC_NOT_INITIALIZED;
-               }
-       }
-
-       socket_data = llcp_socket_data_find(socket);
-       if (socket_data == NULL)
-       {
-               DEBUG_ERR_MSG("can not get socket_data");
-               return NET_NFC_LLCP_INVALID_SOCKET;
-       }
-
-       func_data = g_new0(LlcpFuncData, 1);
-       if (func_data == NULL) {
-               DEBUG_ERR_MSG("g_new0 failed");
-
-               return NET_NFC_ALLOC_FAIL;
-       }
-
-       func_data->callback = (gpointer)callback;
-       func_data->user_data = user_data;
-
-       net_nfc_gdbus_llcp_call_receive_from(llcp_proxy,
-                               GPOINTER_TO_UINT(llcp_handle),
-                               socket_data->client_socket,
-                               request_length,
-                               NULL,
-                               llcp_call_receive_from,
-                               func_data);
-
-       return NET_NFC_OK;
-}
-
-NET_NFC_EXPORT_API
-net_nfc_error_e net_nfc_client_llcp_receive_from_sync(
-       net_nfc_llcp_socket_t socket,
-       size_t request_length,
-       sap_t *out_sap,
-       data_h *out_data)
-{
-       net_nfc_error_e result;
-       GError *error = NULL;
-       GVariant *variant;
-       sap_t sap;
-
-       net_nfc_llcp_internal_socket_s *socket_data;
-
-       if (out_sap == NULL || out_data == NULL) {
-               return NET_NFC_NULL_PARAMETER;
-       }
-
-       *out_data = NULL;
-       *out_sap = 0;
-
-       if (socket <= 0 || request_length == 0) {
-               return NET_NFC_INVALID_PARAM;
-       }
-
-       if (llcp_proxy == NULL)
-       {
-               if(net_nfc_client_llcp_init() != NET_NFC_OK)
-               {
-                       DEBUG_ERR_MSG("llcp_proxy fail");
-                       return NET_NFC_NOT_INITIALIZED;
-               }
-       }
-
-       socket_data = llcp_socket_data_find(socket);
-       if (socket_data == NULL)
-       {
-               DEBUG_ERR_MSG("can not get socket_data");
-               return NET_NFC_LLCP_INVALID_SOCKET;
-       }
-
-       /* prevent executing daemon when nfc is off */
-       if (net_nfc_client_manager_is_activated() == false) {
-               return NET_NFC_NOT_ACTIVATED;
-       }
-
-       if (net_nfc_gdbus_llcp_call_receive_from_sync(llcp_proxy,
-               GPOINTER_TO_UINT(llcp_handle),
-               socket_data->client_socket,
-               request_length,
-               &result,
-               &sap,
-               &variant,
-               NULL,
-               &error) == true) {
-               *out_sap = sap;
-               *out_data = net_nfc_util_gdbus_variant_to_data(variant);
-       } else {
-               DEBUG_ERR_MSG("can not call receive from: %s", error->message);
-               result = NET_NFC_IPC_FAIL;
-
-               g_error_free(error);
-       }
-
-       return result;
-}
-
-NET_NFC_EXPORT_API
-net_nfc_error_e net_nfc_client_llcp_close(net_nfc_llcp_socket_t socket,
-                               net_nfc_client_llcp_close_completed callback,
-                               void *user_data)
-{
-       LlcpFuncData *func_data;
-       net_nfc_llcp_internal_socket_s *socket_data = NULL;
-
-       if (socket <= 0) {
-               return NET_NFC_INVALID_PARAM;
-       }
-
-       if (llcp_proxy == NULL)
-       {
-               if(net_nfc_client_llcp_init() != NET_NFC_OK)
-               {
-                       DEBUG_ERR_MSG("llcp_proxy fail");
-                       return NET_NFC_NOT_INITIALIZED;
-               }
-       }
-
-       socket_data = llcp_socket_data_find(socket);
-       if (socket_data == NULL)
-       {
-               DEBUG_ERR_MSG("can not get socket_data");
-               return NET_NFC_LLCP_INVALID_SOCKET;
-       }
-
-       /* prevent executing daemon when nfc is off */
-       if (net_nfc_client_manager_is_activated() == false) {
-               return NET_NFC_NOT_ACTIVATED;
-       }
-
-       func_data = g_new0(LlcpFuncData, 1);
-       if (func_data == NULL) {
-               DEBUG_ERR_MSG("g_new0 failed");
-
-               return NET_NFC_ALLOC_FAIL;
-       }
-
-       func_data->callback = (gpointer)callback;
-       func_data->user_data = user_data;
-
-       net_nfc_gdbus_llcp_call_close(llcp_proxy,
-                               GPOINTER_TO_UINT(llcp_handle),
-                               socket_data->client_socket,
-                               NULL,
-                               llcp_call_close,
-                               func_data);
-
-       return NET_NFC_OK;
-}
-
-NET_NFC_EXPORT_API
-net_nfc_error_e net_nfc_client_llcp_close_sync(net_nfc_llcp_socket_t socket)
-{
-       net_nfc_error_e result;
-       GError *error = NULL;
-       guint32 out_client_socket;
-
-       net_nfc_llcp_internal_socket_s *socket_data = NULL;
-       net_nfc_llcp_internal_socket_s *out_socket_data = NULL;
-
-       if (socket <= 0) {
-               return NET_NFC_INVALID_PARAM;
-       }
-
-       if (llcp_proxy == NULL)
-       {
-               if(net_nfc_client_llcp_init() != NET_NFC_OK)
-               {
-                       DEBUG_ERR_MSG("llcp_proxy fail");
-                       return NET_NFC_NOT_INITIALIZED;
-               }
-       }
-
-       socket_data = llcp_socket_data_find(socket);
-       if (socket_data == NULL)
-       {
-               DEBUG_ERR_MSG("can not get socket_data");
-               return NET_NFC_LLCP_INVALID_SOCKET;
-       }
-
-       /* prevent executing daemon when nfc is off */
-       if (net_nfc_client_manager_is_activated() == false) {
-               return NET_NFC_NOT_ACTIVATED;
-       }
-
-       if (net_nfc_gdbus_llcp_call_close_sync(llcp_proxy,
-               GPOINTER_TO_UINT(llcp_handle),
-               socket_data->client_socket,
-               &result,
-               &out_client_socket,
-               NULL,
-               &error) == true) {
-               out_socket_data = llcp_socket_data_find(out_client_socket);
-               if (out_socket_data == NULL || out_socket_data !=  socket_data)
-               {
-                       DEBUG_ERR_MSG("Wrong client socket is returned");
-                       return NET_NFC_UNKNOWN_ERROR;
-               }
-       } else {
-               DEBUG_ERR_MSG("can not close: %s", error->message);
-               result = NET_NFC_IPC_FAIL;
-
-               g_error_free(error);
-       }
-
-       return result;
-}
-
-NET_NFC_EXPORT_API
-net_nfc_error_e net_nfc_client_llcp_disconnect(net_nfc_llcp_socket_t socket,
-       net_nfc_client_llcp_disconnect_completed callback,
-       void *user_data)
-{
-       LlcpFuncData *func_data;
-       net_nfc_llcp_internal_socket_s *socket_data = NULL;
-
-       if (socket <= 0) {
-               return NET_NFC_INVALID_PARAM;
-       }
-
-       if (llcp_proxy == NULL)
-       {
-               if(net_nfc_client_llcp_init() != NET_NFC_OK)
-               {
-                       DEBUG_ERR_MSG("llcp_proxy fail");
-                       return NET_NFC_NOT_INITIALIZED;
-               }
-       }
-
-       socket_data = llcp_socket_data_find(socket);
-       if (socket_data == NULL)
-       {
-               DEBUG_ERR_MSG("can not get socket_data");
-               return NET_NFC_LLCP_INVALID_SOCKET;
-       }
-
-       /* prevent executing daemon when nfc is off */
-       if (net_nfc_client_manager_is_activated() == false) {
-               return NET_NFC_NOT_ACTIVATED;
-       }
-
-       func_data = g_new0(LlcpFuncData, 1);
-       if (func_data == NULL) {
-               DEBUG_ERR_MSG("g_new0 failed");
-
-               return NET_NFC_ALLOC_FAIL;
-       }
-
-       func_data->callback = (gpointer)callback;
-       func_data->user_data = user_data;
-
-       net_nfc_gdbus_llcp_call_disconnect(llcp_proxy,
-                               GPOINTER_TO_UINT(llcp_handle),
-                               socket_data->client_socket,
-                               NULL,
-                               llcp_call_disconnect,
-                               func_data);
-
-       return NET_NFC_OK;
-}
-
-NET_NFC_EXPORT_API
-net_nfc_error_e net_nfc_client_llcp_disconnect_sync(
-       net_nfc_llcp_socket_t socket)
-{
-       net_nfc_error_e result;
-       GError *error = NULL;
-       guint32 out_client_socket;
-
-       net_nfc_llcp_internal_socket_s *socket_data = NULL;
-       net_nfc_llcp_internal_socket_s *out_socket_data = NULL;
-
-       if (socket <= 0) {
-               return NET_NFC_INVALID_PARAM;
-       }
-
-       if (llcp_proxy == NULL)
-       {
-               if(net_nfc_client_llcp_init() != NET_NFC_OK)
-               {
-                       DEBUG_ERR_MSG("llcp_proxy fail");
-                       return NET_NFC_NOT_INITIALIZED;
-               }
-       }
-
-       socket_data = llcp_socket_data_find(socket);
-       if (socket_data == NULL)
-       {
-               DEBUG_ERR_MSG("can not get socket_data");
-               return NET_NFC_LLCP_INVALID_SOCKET;
-       }
-
-       /* prevent executing daemon when nfc is off */
-       if (net_nfc_client_manager_is_activated() == false) {
-               return NET_NFC_NOT_ACTIVATED;
-       }
-
-       if (net_nfc_gdbus_llcp_call_disconnect_sync(llcp_proxy,
-               GPOINTER_TO_UINT(llcp_handle),
-               socket_data->client_socket,
-               &result,
-               &out_client_socket,
-               NULL,
-               &error) == true) {
-               out_socket_data = llcp_socket_data_find(out_client_socket);
-               if (out_socket_data == NULL || out_socket_data !=  socket_data)
-               {
-                       DEBUG_ERR_MSG("Wrong client socket is returned");
-                       return NET_NFC_UNKNOWN_ERROR;
-               }
-       } else {
-               DEBUG_ERR_MSG("can not disconnect: %s", error->message);
-               result = NET_NFC_IPC_FAIL;
-
-               g_error_free(error);
-       }
-
-       return result;
-}
-
-NET_NFC_EXPORT_API
-void net_nfc_client_llcp_create_socket(net_nfc_llcp_socket_t *socket,
-                               net_nfc_llcp_socket_option_h option)
-{
-       net_nfc_llcp_internal_socket_s *socket_data = NULL;
-
-       socket_data = g_new0(net_nfc_llcp_internal_socket_s, 1);
-
-       socket_data->client_socket = socket_handle++;
-
-       if (option)
-       {
-               socket_data->miu = option->miu;
-               socket_data->rw = option->rw;
-               socket_data->type = option->type;
-       }
-       else
-       {
-               socket_data->miu = 128;
-               socket_data->rw = 1;
-               socket_data->type =
-                       NET_NFC_LLCP_SOCKET_TYPE_CONNECTIONORIENTED;
-       }
-
-       socket_data->device_id = llcp_handle;
-       socket_data->close_requested = false;
-
-
-       if (socket)
-               *socket = socket_data->client_socket;
-}
-
-
-NET_NFC_EXPORT_API
-net_nfc_error_e net_nfc_client_llcp_get_local_config(
-                                       net_nfc_llcp_config_info_h *config)
-{
-       if (config == NULL)
-       {
-               return NET_NFC_NULL_PARAMETER;
-       }
-
-       *config = (net_nfc_llcp_config_info_h)&llcp_config;
-
-       return NET_NFC_OK;
-}
-
-NET_NFC_EXPORT_API
-net_nfc_error_e net_nfc_client_llcp_get_local_socket_option(
-                                       net_nfc_llcp_socket_t socket,
-                                       net_nfc_llcp_socket_option_h *info)
-{
-       net_nfc_llcp_internal_socket_s *socket_data = NULL;
-
-       DEBUG_CLIENT_MSG("function %s is called", __func__);
-
-       socket_data = llcp_socket_data_find(socket);
-       if (socket_data == NULL)
-               return NET_NFC_LLCP_INVALID_SOCKET;
-
-       *info = (net_nfc_llcp_socket_option_h)socket_data;
-
-       return NET_NFC_OK;
-}
-
-NET_NFC_EXPORT_API
-net_nfc_error_e net_nfc_client_llcp_create_socket_option(
-                                       net_nfc_llcp_socket_option_h *option,
-                                       uint16_t miu,
-                                       uint8_t rw,
-                                       net_nfc_socket_type_e type)
-{
-       net_nfc_llcp_socket_option_s *struct_option = NULL;
-
-       if (option == NULL)
-       {
-               return NET_NFC_NULL_PARAMETER;
-       }
-
-       if (miu < 128 || miu > 1152 ||
-               rw < 1 || rw > 15 ||
-               type < NET_NFC_LLCP_SOCKET_TYPE_CONNECTIONORIENTED ||
-               type > NET_NFC_LLCP_SOCKET_TYPE_CONNECTIONLESS)
-       {
-               return NET_NFC_OUT_OF_BOUND;
-       }
-
-       _net_nfc_util_alloc_mem(struct_option, sizeof(net_nfc_llcp_socket_option_s));
-       if (struct_option != NULL)
-       {
-               struct_option->miu = miu;
-               struct_option->rw = rw;
-               struct_option->type = type;
-
-               *option = (net_nfc_llcp_socket_option_h)struct_option;
-
-               return NET_NFC_OK;
-       }
-       else
-       {
-               return NET_NFC_ALLOC_FAIL;
-       }
-}
-
-NET_NFC_EXPORT_API
-net_nfc_error_e net_nfc_client_llcp_create_socket_option_default(
-                                       net_nfc_llcp_socket_option_h *option)
-{
-       return net_nfc_client_llcp_create_socket_option(
-                                       option,
-                                       128,
-                                       1,
-                                       NET_NFC_LLCP_SOCKET_TYPE_CONNECTIONORIENTED);
-}
-
-NET_NFC_EXPORT_API
-net_nfc_error_e net_nfc_client_llcp_get_socket_option_miu(
-       net_nfc_llcp_socket_option_h option,
-       uint16_t *miu)
-{
-       net_nfc_llcp_socket_option_s *struct_option =
-               (net_nfc_llcp_socket_option_s *)option;
-
-       if (option == NULL || miu == NULL)
-       {
-               return NET_NFC_NULL_PARAMETER;
-       }
-
-       *miu = struct_option->miu;
-
-       return NET_NFC_OK;
-}
-
-NET_NFC_EXPORT_API
-net_nfc_error_e net_nfc_client_llcp_set_socket_option_miu(
-       net_nfc_llcp_socket_option_h option,
-       uint16_t miu)
-{
-       net_nfc_llcp_socket_option_s *struct_option =
-               (net_nfc_llcp_socket_option_s *)option;
-
-       if (option == NULL)
-       {
-               return NET_NFC_NULL_PARAMETER;
-       }
-
-       struct_option->miu = miu;
-
-       return NET_NFC_OK;
-}
-
-NET_NFC_EXPORT_API
-net_nfc_error_e net_nfc_client_llcp_get_socket_option_rw(
-                                       net_nfc_llcp_socket_option_h option,
-                                       uint8_t *rw)
-{
-       if (option == NULL || rw == NULL)
-       {
-               return NET_NFC_NULL_PARAMETER;
-       }
-       net_nfc_llcp_socket_option_s *struct_option = (net_nfc_llcp_socket_option_s *)option;
-
-       *rw = struct_option->rw;
-       return NET_NFC_OK;
-}
-
-NET_NFC_EXPORT_API
-net_nfc_error_e net_nfc_client_llcp_set_socket_option_rw(
-                                       net_nfc_llcp_socket_option_h option,
-                                       uint8_t rw)
-{
-       if (option == NULL)
-       {
-               return NET_NFC_NULL_PARAMETER;
-       }
-       net_nfc_llcp_socket_option_s *struct_option = (net_nfc_llcp_socket_option_s *)option;
-
-       struct_option->rw = rw;
-       return NET_NFC_OK;
-}
-
-NET_NFC_EXPORT_API
-net_nfc_error_e net_nfc_client_llcp_get_socket_option_type(
-                                       net_nfc_llcp_socket_option_h option,
-                                       net_nfc_socket_type_e * type)
-{
-       if (option == NULL || type == NULL)
-       {
-               return NET_NFC_NULL_PARAMETER;
-       }
-       net_nfc_llcp_socket_option_s *struct_option = (net_nfc_llcp_socket_option_s *)option;
-
-       *type = struct_option->type;
-       return NET_NFC_OK;
-}
-
-NET_NFC_EXPORT_API
-net_nfc_error_e net_nfc_client_llcp_set_socket_option_type(
-                                       net_nfc_llcp_socket_option_h option,
-                                       net_nfc_socket_type_e type)
-{
-       if (option == NULL)
-       {
-               return NET_NFC_NULL_PARAMETER;
-       }
-       net_nfc_llcp_socket_option_s *struct_option = (net_nfc_llcp_socket_option_s *)option;
-
-       struct_option->type = type;
-       return NET_NFC_OK;
-}
-
-NET_NFC_EXPORT_API
-net_nfc_error_e net_nfc_client_llcp_free_socket_option(
-                                       net_nfc_llcp_socket_option_h option)
-{
-       if (option == NULL)
-       {
-               return NET_NFC_NULL_PARAMETER;
-       }
-
-       _net_nfc_util_free_mem(option);
-
-       return NET_NFC_OK;
-}
-
-NET_NFC_EXPORT_API
-net_nfc_error_e net_nfc_client_llcp_create_config(
-                                       net_nfc_llcp_config_info_h *config,
-                                       uint16_t miu,
-                                       uint16_t wks,
-                                       uint8_t lto,
-                                       uint8_t option)
-{
-       if (config == NULL)
-       {
-               return NET_NFC_NULL_PARAMETER;
-       }
-
-       net_nfc_llcp_config_info_s **tmp_config =
-                                               (net_nfc_llcp_config_info_s **)config;
-
-       _net_nfc_util_alloc_mem(*tmp_config,
-                                       sizeof(net_nfc_llcp_config_info_s));
-
-       if (*tmp_config == NULL)
-               return NET_NFC_ALLOC_FAIL;
-
-       (*tmp_config)->miu = miu;
-       (*tmp_config)->wks = wks;
-       (*tmp_config)->lto = lto;
-       (*tmp_config)->option = option;
-
-       return NET_NFC_OK;
-}
-
-NET_NFC_EXPORT_API
-net_nfc_error_e net_nfc_client_llcp_create_config_default(net_nfc_llcp_config_info_h *config)
-{
-       return net_nfc_client_llcp_create_config(config, 128, 1, 10, 0);
-}
-
-NET_NFC_EXPORT_API
-net_nfc_error_e net_nfc_client_llcp_get_config_miu(
-                                       net_nfc_llcp_config_info_h config,
-                                       uint16_t *miu)
-{
-       if (config == NULL || miu == NULL)
-       {
-               return NET_NFC_NULL_PARAMETER;
-       }
-
-       net_nfc_llcp_config_info_s *tmp_config =
-                                               (net_nfc_llcp_config_info_s *)config;
-
-       *miu = tmp_config->miu;
-
-       return NET_NFC_OK;
-}
-
-NET_NFC_EXPORT_API
-net_nfc_error_e net_nfc_client_llcp_get_config_wks(
-                                       net_nfc_llcp_config_info_h config,
-                                       uint16_t *wks)
-{
-       if (config == NULL || wks == NULL)
-       {
-               return NET_NFC_NULL_PARAMETER;
-       }
-
-       net_nfc_llcp_config_info_s *tmp_config =
-                                               (net_nfc_llcp_config_info_s *)config;
-
-       *wks = tmp_config->wks;
-
-       return NET_NFC_OK;
-}
-
-NET_NFC_EXPORT_API
-net_nfc_error_e net_nfc_client_llcp_get_config_lto(
-                                               net_nfc_llcp_config_info_h config,
-                                               uint8_t *lto)
-{
-       if (config == NULL || lto == NULL)
-       {
-               return NET_NFC_NULL_PARAMETER;
-       }
-
-       net_nfc_llcp_config_info_s *tmp_config =
-                                               (net_nfc_llcp_config_info_s *)config;
-
-       *lto = tmp_config->lto;
-
-       return NET_NFC_OK;
-}
-
-NET_NFC_EXPORT_API
-net_nfc_error_e net_nfc_client_llcp_get_config_option(
-                                       net_nfc_llcp_config_info_h config,
-                                       uint8_t *option)
-{
-       if (config == NULL || option == NULL)
-       {
-               return NET_NFC_NULL_PARAMETER;
-       }
-
-       net_nfc_llcp_config_info_s *tmp_config =
-                                               (net_nfc_llcp_config_info_s *)config;
-
-       *option = tmp_config->option;
-
-       return NET_NFC_OK;
-}
-
-NET_NFC_EXPORT_API
-net_nfc_error_e net_nfc_client_llcp_set_config_miu(
-                                       net_nfc_llcp_config_info_h config,
-                                       uint16_t miu)
-{
-       if (config == NULL)
-       {
-               return NET_NFC_NULL_PARAMETER;
-       }
-
-       if (miu < 128 || miu > 1152)
-       {
-               return NET_NFC_OUT_OF_BOUND;
-       }
-
-       net_nfc_llcp_config_info_s * tmp_config =
-                                               (net_nfc_llcp_config_info_s *)config;
-
-       tmp_config->miu = miu;
-
-       return NET_NFC_OK;
-}
-
-NET_NFC_EXPORT_API
-net_nfc_error_e net_nfc_client_llcp_set_config_wks(
-                                       net_nfc_llcp_config_info_h config,
-                                       uint16_t wks)
-{
-       if (config == NULL)
-       {
-               return NET_NFC_NULL_PARAMETER;
-       }
-
-       net_nfc_llcp_config_info_s *tmp_config =
-                                               (net_nfc_llcp_config_info_s *)config;
-
-       tmp_config->wks = wks;
-
-       return NET_NFC_OK;
-}
-
-NET_NFC_EXPORT_API
-net_nfc_error_e net_nfc_client_llcp_set_config_lto(
-                                       net_nfc_llcp_config_info_h config,
-                                       uint8_t lto)
-{
-       if (config == NULL)
-       {
-               return NET_NFC_NULL_PARAMETER;
-       }
-
-       net_nfc_llcp_config_info_s *tmp_config =
-                                               (net_nfc_llcp_config_info_s *)config;
-
-       tmp_config->lto = lto;
-
-       return NET_NFC_OK;
-}
-
-NET_NFC_EXPORT_API
-net_nfc_error_e net_nfc_client_llcp_set_config_option(
-                                       net_nfc_llcp_config_info_h config,
-                                       uint8_t option)
-{
-       if (config == NULL)
-       {
-               return NET_NFC_NULL_PARAMETER;
-       }
-
-       net_nfc_llcp_config_info_s * tmp_config =
-                                               (net_nfc_llcp_config_info_s *)config;
-
-       tmp_config->option = option;
-
-       return NET_NFC_OK;
-}
-
-NET_NFC_EXPORT_API
-net_nfc_error_e net_nfc_client_llcp_free_config(net_nfc_llcp_config_info_h config)
-{
-       if (config == NULL)
-       {
-               return NET_NFC_NULL_PARAMETER;
-       }
-
-       _net_nfc_util_free_mem(config);
-       return NET_NFC_OK;
-}
-
-net_nfc_error_e net_nfc_client_llcp_init(void)
-{
-       GError *error = NULL;
-
-       if (llcp_proxy)
-       {
-               DEBUG_CLIENT_MSG("Already initialized");
-
-               return NET_NFC_OK;
-       }
-
-       llcp_proxy = net_nfc_gdbus_llcp_proxy_new_for_bus_sync(
-                       G_BUS_TYPE_SYSTEM,
-                       G_DBUS_PROXY_FLAGS_DO_NOT_AUTO_START,
-                       "org.tizen.NetNfcService",
-                       "/org/tizen/NetNfcService/Llcp",
-                       NULL,
-                       &error);
-       if (llcp_proxy == NULL)
-       {
-               DEBUG_ERR_MSG("Can not create proxy : %s", error->message);
-
-               g_error_free(error);
-
-               return NET_NFC_UNKNOWN_ERROR;
-       }
-
-       g_signal_connect(llcp_proxy, "error",
-                       G_CALLBACK(llcp_error), NULL);
-
-       g_signal_connect(llcp_proxy, "incoming",
-                       G_CALLBACK(llcp_incoming), NULL);
-
-       return NET_NFC_OK;
-}
-
-void net_nfc_client_llcp_deinit(void)
-{
-       if (llcp_proxy)
-       {
-               g_object_unref(llcp_proxy);
-               llcp_proxy = NULL;
-       }
-}
diff --git a/test/src/net_nfc_client_manager.c b/test/src/net_nfc_client_manager.c
deleted file mode 100755 (executable)
index 2958ccf..0000000
+++ /dev/null
@@ -1,451 +0,0 @@
-/*
- * Copyright (c) 2012, 2013 Samsung Electronics Co., Ltd.
- *
- * Licensed under the Flora License, Version 1.1 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://floralicense.org/license/
- *
- * 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.
- */
-
-#include "net_nfc_debug_internal.h"
-
-#include "net_nfc_gdbus.h"
-#include "net_nfc_client.h"
-#include "net_nfc_client_util_internal.h"
-#include "net_nfc_client_context.h"
-#include "net_nfc_client_manager.h"
-
-#ifndef NET_NFC_EXPORT_API
-#define NET_NFC_EXPORT_API __attribute__((visibility("default")))
-#endif
-
-#define DEACTIVATE_DELAY       500 /* ms */
-#define ACTIVATE_DELAY 100 /* ms */
-
-typedef struct _ManagerFuncData ManagerFuncData;
-
-struct _ManagerFuncData
-{
-       gpointer callback;
-       gpointer user_data;
-       net_nfc_error_e result;
-};
-
-static NetNfcGDbusManager *manager_proxy = NULL;
-static NetNfcGDbusManager *auto_start_proxy = NULL;
-static ManagerFuncData activated_func_data;
-static int is_activated = -1;
-static guint timeout_id[2];
-
-static void manager_call_set_active_callback(GObject *source_object,
-                                       GAsyncResult *res,
-                                       gpointer user_data);
-
-static void manager_call_get_server_state_callback(GObject *source_object,
-                                               GAsyncResult *res,
-                                               gpointer user_data);
-
-
-static void manager_activated(NetNfcGDbusManager *manager,
-                               gboolean activated,
-                               gpointer user_data);
-
-
-static gboolean _set_activate_time_elapsed_callback(gpointer user_data)
-{
-       ManagerFuncData *func_data = (ManagerFuncData *)user_data;
-       net_nfc_client_manager_set_active_completed callback;
-
-       if (timeout_id[0] > 0) {
-               g_assert(func_data != NULL);
-
-               g_source_remove(timeout_id[0]);
-               timeout_id[0] = 0;
-
-               callback = (net_nfc_client_manager_set_active_completed)func_data->callback;
-
-               callback(func_data->result, func_data->user_data);
-
-               g_free(func_data);
-       }
-
-       return false;
-}
-
-static void manager_call_set_active_callback(GObject *source_object,
-                                       GAsyncResult *res,
-                                       gpointer user_data)
-{
-       ManagerFuncData *func_data = (ManagerFuncData *)user_data;
-       net_nfc_error_e result;
-       GError *error = NULL;
-
-       g_assert(user_data != NULL);
-
-       if (net_nfc_gdbus_manager_call_set_active_finish(
-                               NET_NFC_GDBUS_MANAGER(source_object),
-                               &result,
-                               res,
-                               &error) == FALSE)
-       {
-               DEBUG_ERR_MSG("Can not finish call_set_active: %s",
-                       error->message);
-               result = NET_NFC_IPC_FAIL;
-
-               g_error_free(error);
-       }
-
-       func_data->result = result;
-       net_nfc_client_get_nfc_state(&is_activated);
-
-       if (is_activated == false) {
-               /* FIXME : wait several times */
-               timeout_id[0] = g_timeout_add(DEACTIVATE_DELAY,
-                       _set_activate_time_elapsed_callback,
-                       func_data);
-       } else {
-               timeout_id[0] = g_timeout_add(ACTIVATE_DELAY,
-                       _set_activate_time_elapsed_callback,
-                       func_data);
-       }
-}
-
-static void manager_call_get_server_state_callback(GObject *source_object,
-                                               GAsyncResult *res,
-                                               gpointer user_data)
-{
-       NetNfcCallback *func_data = (NetNfcCallback *)user_data;
-       net_nfc_error_e result;
-       guint out_state = 0;
-       GError *error = NULL;
-
-       g_assert(user_data != NULL);
-
-       if (net_nfc_gdbus_manager_call_get_server_state_finish(
-                               NET_NFC_GDBUS_MANAGER(source_object),
-                               &result,
-                               &out_state,
-                               res,
-                               &error) == FALSE)
-       {
-               DEBUG_ERR_MSG("Can not finish get_server_state: %s",
-                       error->message);
-               result = NET_NFC_IPC_FAIL;
-
-               g_error_free(error);
-       }
-
-       if (func_data->callback != NULL)
-       {
-               net_nfc_client_manager_get_server_state_completed callback =
-                       (net_nfc_client_manager_get_server_state_completed)func_data->callback;
-
-               callback(result, out_state, func_data->user_data);
-       }
-
-       g_free(func_data);
-}
-
-static gboolean _activated_time_elapsed_callback(gpointer user_data)
-{
-       net_nfc_client_manager_activated callback =
-               (net_nfc_client_manager_activated)activated_func_data.callback;
-
-       if (timeout_id[1] > 0) {
-               g_source_remove(timeout_id[1]);
-               timeout_id[1] = 0;
-
-               callback(is_activated, activated_func_data.user_data);
-       }
-
-       return false;
-}
-
-static void manager_activated(NetNfcGDbusManager *manager,
-                               gboolean activated,
-                               gpointer user_data)
-{
-       INFO_MSG(">>> SIGNAL arrived");
-       DEBUG_CLIENT_MSG("activated %d", activated);
-
-       /* update current state */
-       is_activated = (int)activated;
-
-       if (activated_func_data.callback != NULL)
-       {
-               if (is_activated == false) {
-                       /* FIXME : wait several times */
-                       timeout_id[1] = g_timeout_add(DEACTIVATE_DELAY,
-                               _activated_time_elapsed_callback,
-                               NULL);
-               } else {
-                       timeout_id[1] = g_timeout_add(ACTIVATE_DELAY,
-                               _activated_time_elapsed_callback,
-                               NULL);
-               }
-       }
-}
-
-NET_NFC_EXPORT_API
-void net_nfc_client_manager_set_activated(
-                       net_nfc_client_manager_activated callback,
-                       void *user_data)
-{
-       if (callback == NULL)
-               return;
-
-       if (manager_proxy == NULL)
-       {
-               if (net_nfc_client_manager_init() != NET_NFC_OK)
-               {
-                       DEBUG_ERR_MSG("manager_proxy fail");
-                       /* FIXME : return result of this error */
-                       return;
-               }
-       }
-
-       activated_func_data.callback = callback;
-       activated_func_data.user_data = user_data;
-}
-
-NET_NFC_EXPORT_API
-void net_nfc_client_manager_unset_activated(void)
-{
-       activated_func_data.callback = NULL;
-       activated_func_data.user_data = NULL;
-}
-
-NET_NFC_EXPORT_API
-net_nfc_error_e net_nfc_client_manager_set_active(int state,
-                       net_nfc_client_manager_set_active_completed callback,
-                       void *user_data)
-{
-       gboolean active = FALSE;
-       ManagerFuncData *func_data;
-
-       if (auto_start_proxy == NULL) {
-               GError *error = NULL;
-
-               auto_start_proxy = net_nfc_gdbus_manager_proxy_new_for_bus_sync(
-                       G_BUS_TYPE_SYSTEM,
-                       G_DBUS_PROXY_FLAGS_NONE,
-                       "org.tizen.NetNfcService",
-                       "/org/tizen/NetNfcService/Manager",
-                       NULL,
-                       &error);
-               if (auto_start_proxy == NULL)
-               {
-                       DEBUG_ERR_MSG("Can not create proxy : %s", error->message);
-                       g_error_free(error);
-
-                       return NET_NFC_UNKNOWN_ERROR;
-               }
-       }
-
-       /* allow this function even nfc is off */
-
-       func_data = g_try_new0(ManagerFuncData, 1);
-       if (func_data == NULL)
-               return NET_NFC_ALLOC_FAIL;
-
-       func_data->callback = (gpointer)callback;
-       func_data->user_data = user_data;
-
-       if (state == true)
-               active = TRUE;
-
-       net_nfc_gdbus_manager_call_set_active(auto_start_proxy,
-               active,
-               NULL,
-               manager_call_set_active_callback,
-               func_data);
-
-       return NET_NFC_OK;
-}
-
-NET_NFC_EXPORT_API
-net_nfc_error_e net_nfc_client_manager_set_active_sync(int state)
-{
-       net_nfc_error_e out_result = NET_NFC_OK;
-       GError *error = NULL;
-
-       if (auto_start_proxy == NULL) {
-               GError *error = NULL;
-
-               auto_start_proxy = net_nfc_gdbus_manager_proxy_new_for_bus_sync(
-                       G_BUS_TYPE_SYSTEM,
-                       G_DBUS_PROXY_FLAGS_NONE,
-                       "org.tizen.NetNfcService",
-                       "/org/tizen/NetNfcService/Manager",
-                       NULL,
-                       &error);
-               if (auto_start_proxy == NULL)
-               {
-                       DEBUG_ERR_MSG("Can not create proxy : %s", error->message);
-                       g_error_free(error);
-
-                       return NET_NFC_UNKNOWN_ERROR;
-               }
-       }
-
-       /* allow this function even nfc is off */
-
-       if (net_nfc_gdbus_manager_call_set_active_sync(auto_start_proxy,
-               (gboolean)state,
-               &out_result,
-               NULL,
-               &error) == FALSE)
-       {
-               DEBUG_ERR_MSG("can not call SetActive: %s",
-                               error->message);
-               out_result = NET_NFC_IPC_FAIL;
-
-               g_error_free(error);
-       }
-
-       return out_result;
-}
-
-NET_NFC_EXPORT_API
-net_nfc_error_e net_nfc_client_manager_get_server_state(
-               net_nfc_client_manager_get_server_state_completed callback,
-               void *user_data)
-{
-       NetNfcCallback *func_data;
-
-       if (manager_proxy == NULL)
-               return NET_NFC_NOT_INITIALIZED;
-
-       /* prevent executing daemon when nfc is off */
-       if (net_nfc_client_manager_is_activated() == false) {
-               return NET_NFC_NOT_ACTIVATED;
-       }
-
-       func_data = g_try_new0(NetNfcCallback, 1);
-       if (func_data == NULL)
-               return NET_NFC_ALLOC_FAIL;
-
-       func_data->callback = (gpointer) callback;
-       func_data->user_data = user_data;
-
-       net_nfc_gdbus_manager_call_get_server_state(manager_proxy,
-                                       NULL,
-                                       manager_call_get_server_state_callback,
-                                       func_data);
-
-       return NET_NFC_OK;
-}
-
-NET_NFC_EXPORT_API
-net_nfc_error_e net_nfc_client_manager_get_server_state_sync(
-                                                       unsigned int *state)
-{
-       net_nfc_error_e out_result = NET_NFC_OK;
-       guint out_state = 0;
-       GError *error = NULL;
-
-       if (state == NULL)
-               return NET_NFC_NULL_PARAMETER;
-
-       *state = 0;
-
-       if (manager_proxy == NULL)
-               return NET_NFC_NOT_INITIALIZED;
-
-       /* prevent executing daemon when nfc is off */
-       if (net_nfc_client_manager_is_activated() == false) {
-               return NET_NFC_NOT_ACTIVATED;
-       }
-
-       if (net_nfc_gdbus_manager_call_get_server_state_sync(manager_proxy,
-                                       &out_result,
-                                       &out_state,
-                                       NULL,
-                                       &error) == TRUE)
-       {
-               *state = out_state;
-       }
-       else
-       {
-               DEBUG_ERR_MSG("can not call GetServerState: %s",
-                               error->message);
-               out_result = NET_NFC_IPC_FAIL;
-
-               g_error_free(error);
-       }
-
-       return out_result;
-
-}
-
-net_nfc_error_e net_nfc_client_manager_init(void)
-{
-       GError *error = NULL;
-
-       if (manager_proxy)
-       {
-               DEBUG_CLIENT_MSG("Already initialized");
-
-               return NET_NFC_OK;
-       }
-
-       manager_proxy = net_nfc_gdbus_manager_proxy_new_for_bus_sync(
-               G_BUS_TYPE_SYSTEM,
-               G_DBUS_PROXY_FLAGS_DO_NOT_AUTO_START,
-               "org.tizen.NetNfcService",
-               "/org/tizen/NetNfcService/Manager",
-               NULL,
-               &error);
-       if (manager_proxy == NULL)
-       {
-               DEBUG_ERR_MSG("Can not create proxy : %s", error->message);
-               g_error_free(error);
-
-               return NET_NFC_UNKNOWN_ERROR;
-       }
-
-       g_signal_connect(manager_proxy, "activated",
-                       G_CALLBACK(manager_activated), NULL);
-
-       return NET_NFC_OK;
-}
-
-void net_nfc_client_manager_deinit(void)
-{
-       if (manager_proxy)
-       {
-               int i;
-
-               for (i = 0; i < 2; i++) {
-                       if (timeout_id[i] > 0) {
-                               g_source_remove(timeout_id[i]);
-                               timeout_id[i] = 0;
-                       }
-               }
-
-               g_object_unref(manager_proxy);
-               manager_proxy = NULL;
-       }
-
-       if (auto_start_proxy) {
-               g_object_unref(auto_start_proxy);
-               auto_start_proxy = NULL;
-       }
-}
-
-/* internal function */
-bool net_nfc_client_manager_is_activated()
-{
-       if (is_activated < 0) {
-               net_nfc_client_get_nfc_state(&is_activated);
-       }
-
-       return is_activated;
-}
diff --git a/test/src/net_nfc_client_ndef.c b/test/src/net_nfc_client_ndef.c
deleted file mode 100755 (executable)
index 0b7316e..0000000
+++ /dev/null
@@ -1,641 +0,0 @@
-/*
- * Copyright (c) 2012, 2013 Samsung Electronics Co., Ltd.
- *
- * Licensed under the Flora License, Version 1.1 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://floralicense.org/license/
- *
- * 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.
- */
-
-#include "net_nfc_typedef_internal.h"
-#include "net_nfc_debug_internal.h"
-#include "net_nfc_util_internal.h"
-#include "net_nfc_util_ndef_message.h"
-#include "net_nfc_util_gdbus_internal.h"
-#include "net_nfc_gdbus.h"
-#include "net_nfc_data.h"
-#include "net_nfc_ndef_message.h"
-#include "net_nfc_client.h"
-#include "net_nfc_client_util_internal.h"
-#include "net_nfc_client_manager.h"
-#include "net_nfc_client_ndef.h"
-#include "net_nfc_client_tag_internal.h"
-
-#ifndef NET_NFC_EXPORT_API
-#define NET_NFC_EXPORT_API __attribute__((visibility("default")))
-#endif
-
-static NetNfcGDbusNdef *ndef_proxy = NULL;
-
-static gboolean ndef_is_supported_tag(void);
-
-static void ndef_call_read(GObject *source_object,
-                       GAsyncResult *res,
-                       gpointer user_data);
-
-static void ndef_call_write(GObject *source_object,
-                       GAsyncResult *res,
-                       gpointer user_data);
-
-static void ndef_call_make_read_only(GObject *source_object,
-                               GAsyncResult *res,
-                               gpointer user_data);
-
-static void ndef_call_format(GObject *source_object,
-                       GAsyncResult *res,
-                       gpointer user_data);
-
-static gboolean ndef_is_supported_tag(void)
-{
-       net_nfc_target_info_s *target_info = NULL;
-
-       target_info = net_nfc_client_tag_get_client_target_info();
-       if (target_info == NULL)
-       {
-               DEBUG_ERR_MSG("target_info does not exist");
-
-               return FALSE;
-       }
-
-       switch (target_info->devType)
-       {
-               case NET_NFC_ISO14443_A_PICC :
-               case NET_NFC_MIFARE_MINI_PICC :
-               case NET_NFC_MIFARE_1K_PICC :
-               case NET_NFC_MIFARE_4K_PICC :
-               case NET_NFC_MIFARE_ULTRA_PICC :
-               case NET_NFC_JEWEL_PICC :
-                       return TRUE;
-                       break;
-               default:
-                       DEBUG_CLIENT_MSG(
-                               "not supported tag for read only tag");
-                       return FALSE;
-       }
-}
-
-static void ndef_call_read(GObject *source_object,
-                       GAsyncResult *res,
-                       gpointer user_data)
-{
-       NetNfcCallback *func_data = (NetNfcCallback *)user_data;
-       net_nfc_error_e out_result;
-       GVariant *out_data = NULL;
-       GError *error = NULL;
-
-       g_assert(user_data != NULL);
-
-       if (net_nfc_gdbus_ndef_call_read_finish(
-                               NET_NFC_GDBUS_NDEF(source_object),
-                               (gint *)&out_result,
-                               &out_data,
-                               res,
-                               &error) == FALSE)
-       {
-               DEBUG_ERR_MSG("Can not finish read: %s", error->message);
-               out_result = NET_NFC_IPC_FAIL;
-
-               g_error_free(error);
-       }
-
-       if (func_data->callback != NULL)
-       {
-               net_nfc_client_ndef_read_completed callback =
-                       (net_nfc_client_ndef_read_completed)func_data->callback;
-               ndef_message_h message;
-
-               message = net_nfc_util_gdbus_variant_to_ndef_message(out_data);
-
-               callback(out_result, message, func_data->user_data);
-
-               net_nfc_util_free_ndef_message(message);
-       }
-
-       g_free(func_data);
-}
-
-static void ndef_call_write(GObject *source_object,
-                       GAsyncResult *res,
-                       gpointer user_data)
-{
-       NetNfcCallback *func_data = (NetNfcCallback *)user_data;
-       net_nfc_error_e out_result;
-       GError *error = NULL;
-
-       g_assert(user_data != NULL);
-
-       if (net_nfc_gdbus_ndef_call_write_finish(
-                               NET_NFC_GDBUS_NDEF(source_object),
-                               (gint *)&out_result,
-                               res,
-                               &error) == FALSE)
-       {
-               DEBUG_ERR_MSG("Can not finish write: %s", error->message);
-               out_result = NET_NFC_IPC_FAIL;
-
-               g_error_free(error);
-       }
-
-       if (func_data->callback != NULL)
-       {
-               net_nfc_client_ndef_write_completed callback =
-                       (net_nfc_client_ndef_write_completed)func_data->callback;
-
-               callback(out_result, func_data->user_data);
-       }
-
-       g_free(func_data);
-}
-
-static void ndef_call_make_read_only(GObject *source_object,
-                               GAsyncResult *res,
-                               gpointer user_data)
-{
-       NetNfcCallback *func_data = (NetNfcCallback *)user_data;
-       net_nfc_error_e out_result;
-       GError *error = NULL;
-
-       g_assert(user_data != NULL);
-
-       if (net_nfc_gdbus_ndef_call_make_read_only_finish(
-                               NET_NFC_GDBUS_NDEF(source_object),
-                               (gint *)&out_result,
-                               res,
-                               &error) == FALSE)
-       {
-               DEBUG_ERR_MSG("Can not finish make read only: %s",
-                               error->message);
-               out_result = NET_NFC_IPC_FAIL;
-
-               g_error_free(error);
-       }
-
-       if (func_data->callback != NULL)
-       {
-               net_nfc_client_ndef_make_read_only_completed callback =
-                       (net_nfc_client_ndef_make_read_only_completed)func_data->callback;
-
-               callback(out_result, func_data->user_data);
-       }
-
-       g_free(func_data);
-}
-
-static void ndef_call_format(GObject *source_object,
-                       GAsyncResult *res,
-                       gpointer user_data)
-{
-       NetNfcCallback *func_data = (NetNfcCallback *)user_data;
-       net_nfc_error_e out_result;
-       GError *error = NULL;
-
-       g_assert(user_data != NULL);
-
-       if (net_nfc_gdbus_ndef_call_format_finish(
-                               NET_NFC_GDBUS_NDEF(source_object),
-                               (gint *)&out_result,
-                               res,
-                               &error) == FALSE)
-       {
-               DEBUG_ERR_MSG("Can not finish format: %s", error->message);
-               out_result = NET_NFC_IPC_FAIL;
-
-               g_error_free(error);
-       }
-
-       if (func_data->callback != NULL)
-       {
-               net_nfc_client_ndef_format_completed callback =
-                       (net_nfc_client_ndef_format_completed)func_data->callback;
-
-               callback(out_result, func_data->user_data);
-       }
-
-       g_free(func_data);
-}
-
-NET_NFC_EXPORT_API
-net_nfc_error_e net_nfc_client_ndef_read(net_nfc_target_handle_h handle,
-                               net_nfc_client_ndef_read_completed callback,
-                               void *user_data)
-{
-       NetNfcCallback *func_data;
-
-       if (handle == NULL)
-               return NET_NFC_NULL_PARAMETER;
-
-       if (ndef_proxy == NULL)
-       {
-               if(net_nfc_client_ndef_init() != NET_NFC_OK)
-               {
-                       DEBUG_ERR_MSG("tag_proxy fail");
-                       return NET_NFC_NOT_INITIALIZED;
-               }
-       }
-
-       /* prevent executing daemon when nfc is off */
-       if (net_nfc_client_manager_is_activated() == false) {
-               return NET_NFC_NOT_ACTIVATED;
-       }
-
-       if (net_nfc_client_tag_is_connected() == FALSE)
-               return NET_NFC_NOT_CONNECTED;
-
-       DEBUG_CLIENT_MSG("send request :: read ndef = [%p]", handle);
-
-       func_data = g_try_new0(NetNfcCallback, 1);
-       if (func_data == NULL) {
-               return NET_NFC_ALLOC_FAIL;
-       }
-
-       func_data->callback = (gpointer)callback;
-       func_data->user_data = user_data;
-
-       net_nfc_gdbus_ndef_call_read(ndef_proxy,
-                       GPOINTER_TO_UINT(handle),
-                       NULL,
-                       ndef_call_read,
-                       func_data);
-
-       return NET_NFC_OK;
-}
-
-NET_NFC_EXPORT_API
-net_nfc_error_e net_nfc_client_ndef_read_sync(net_nfc_target_handle_h handle,
-                                       ndef_message_h *message)
-{
-       net_nfc_error_e out_result = NET_NFC_OK;
-       GVariant *out_data = NULL;
-       GError *error = NULL;
-
-       if (handle == NULL)
-               return NET_NFC_NULL_PARAMETER;
-
-       if (ndef_proxy == NULL)
-       {
-               if(net_nfc_client_ndef_init() != NET_NFC_OK)
-               {
-                       DEBUG_ERR_MSG("tag_proxy fail");
-                       return NET_NFC_NOT_INITIALIZED;
-               }
-       }
-
-       /* prevent executing daemon when nfc is off */
-       if (net_nfc_client_manager_is_activated() == false) {
-               return NET_NFC_NOT_ACTIVATED;
-       }
-
-       if (net_nfc_client_tag_is_connected() == FALSE)
-               return NET_NFC_NOT_CONNECTED;
-
-       DEBUG_CLIENT_MSG("send request :: read ndef = [%p]", handle);
-
-       if (net_nfc_gdbus_ndef_call_read_sync(ndef_proxy,
-                                       GPOINTER_TO_UINT(handle),
-                                       (gint *)&out_result,
-                                       &out_data,
-                                       NULL,
-                                       &error) == TRUE) {
-               *message = net_nfc_util_gdbus_variant_to_ndef_message(out_data);
-       } else {
-               DEBUG_ERR_MSG("can not call read: %s",
-                               error->message);
-               out_result = NET_NFC_IPC_FAIL;
-
-               g_error_free(error);
-       }
-
-       return out_result;
-}
-
-NET_NFC_EXPORT_API
-net_nfc_error_e net_nfc_client_ndef_write(net_nfc_target_handle_h handle,
-                               ndef_message_h message,
-                               net_nfc_client_ndef_write_completed callback,
-                               void *user_data)
-{
-       NetNfcCallback *func_data;
-       GVariant *arg_data;
-
-       if (handle == NULL || message == NULL)
-               return NET_NFC_NULL_PARAMETER;
-
-       if (ndef_proxy == NULL)
-       {
-               if(net_nfc_client_ndef_init() != NET_NFC_OK)
-               {
-                       DEBUG_ERR_MSG("tag_proxy fail");
-                       return NET_NFC_NOT_INITIALIZED;
-               }
-       }
-
-       /* prevent executing daemon when nfc is off */
-       if (net_nfc_client_manager_is_activated() == false) {
-               return NET_NFC_NOT_ACTIVATED;
-       }
-
-       if (net_nfc_client_tag_is_connected() == FALSE)
-               return NET_NFC_NOT_CONNECTED;
-
-       func_data = g_try_new0(NetNfcCallback, 1);
-       if (func_data == NULL) {
-               return NET_NFC_ALLOC_FAIL;
-       }
-
-       func_data->callback = (gpointer)callback;
-       func_data->user_data = user_data;
-
-       arg_data = net_nfc_util_gdbus_ndef_message_to_variant(message);
-
-       net_nfc_gdbus_ndef_call_write(ndef_proxy,
-                               GPOINTER_TO_UINT(handle),
-                               arg_data,
-                               NULL,
-                               ndef_call_write,
-                               func_data);
-
-       return NET_NFC_OK;
-}
-
-NET_NFC_EXPORT_API
-net_nfc_error_e net_nfc_client_ndef_write_sync(net_nfc_target_handle_h handle,
-                                       ndef_message_h message)
-{
-       net_nfc_error_e out_result = NET_NFC_OK;
-       GError *error = NULL;
-       GVariant *arg_data;
-
-       if (handle == NULL || message == NULL)
-               return NET_NFC_NULL_PARAMETER;
-
-       if (ndef_proxy == NULL)
-       {
-               if(net_nfc_client_ndef_init() != NET_NFC_OK)
-               {
-                       DEBUG_ERR_MSG("tag_proxy fail");
-                       return NET_NFC_NOT_INITIALIZED;
-               }
-       }
-
-       /* prevent executing daemon when nfc is off */
-       if (net_nfc_client_manager_is_activated() == false) {
-               return NET_NFC_NOT_ACTIVATED;
-       }
-
-       if (net_nfc_client_tag_is_connected() == FALSE)
-               return NET_NFC_NOT_CONNECTED;
-
-       arg_data = net_nfc_util_gdbus_ndef_message_to_variant(message);
-
-       if (net_nfc_gdbus_ndef_call_write_sync(ndef_proxy ,
-                                       GPOINTER_TO_UINT(handle),
-                                       arg_data,
-                                       (gint *)&out_result,
-                                       NULL,
-                                       &error) == FALSE)
-       {
-               DEBUG_ERR_MSG("can not call write: %s",
-                               error->message);
-               out_result = NET_NFC_IPC_FAIL;
-
-               g_error_free(error);
-       }
-
-       return out_result;
-}
-
-NET_NFC_EXPORT_API
-net_nfc_error_e net_nfc_client_ndef_make_read_only(
-                       net_nfc_target_handle_h handle,
-                       net_nfc_client_ndef_make_read_only_completed callback,
-                       void *user_data)
-{
-       NetNfcCallback *func_data;
-
-       if (handle == NULL)
-               return NET_NFC_NULL_PARAMETER;
-
-       if (ndef_proxy == NULL)
-       {
-               if(net_nfc_client_ndef_init() != NET_NFC_OK)
-               {
-                       DEBUG_ERR_MSG("tag_proxy fail");
-                       return NET_NFC_NOT_INITIALIZED;
-               }
-       }
-
-       /* prevent executing daemon when nfc is off */
-       if (net_nfc_client_manager_is_activated() == false) {
-               return NET_NFC_NOT_ACTIVATED;
-       }
-
-       if (net_nfc_client_tag_is_connected() == FALSE)
-               return NET_NFC_NOT_CONNECTED;
-
-       if (ndef_is_supported_tag() == FALSE)
-               return NET_NFC_NOT_SUPPORTED;
-
-       func_data = g_try_new0(NetNfcCallback, 1);
-       if (func_data == NULL) {
-               return NET_NFC_ALLOC_FAIL;
-       }
-
-       func_data->callback = (gpointer)callback;
-       func_data->user_data = user_data;
-
-       net_nfc_gdbus_ndef_call_make_read_only(ndef_proxy,
-                               GPOINTER_TO_UINT(handle),
-                               NULL,
-                               ndef_call_make_read_only,
-                               func_data);
-
-       return NET_NFC_OK;
-}
-
-NET_NFC_EXPORT_API
-net_nfc_error_e net_nfc_client_ndef_make_read_only_sync(
-                                       net_nfc_target_handle_h handle)
-{
-       net_nfc_error_e out_result = NET_NFC_OK;
-       GError *error = NULL;
-
-       if (handle == NULL)
-               return NET_NFC_NULL_PARAMETER;
-
-       if (ndef_proxy == NULL)
-       {
-               if(net_nfc_client_ndef_init() != NET_NFC_OK)
-               {
-                       DEBUG_ERR_MSG("tag_proxy fail");
-                       return NET_NFC_NOT_INITIALIZED;
-               }
-       }
-
-       /* prevent executing daemon when nfc is off */
-       if (net_nfc_client_manager_is_activated() == false) {
-               return NET_NFC_NOT_ACTIVATED;
-       }
-
-       if (net_nfc_client_tag_is_connected() == FALSE)
-               return NET_NFC_NOT_CONNECTED;
-
-       if (ndef_is_supported_tag() == FALSE)
-               return NET_NFC_NOT_SUPPORTED;
-
-       if (net_nfc_gdbus_ndef_call_make_read_only_sync(ndef_proxy,
-                                       GPOINTER_TO_UINT(handle),
-                                       (gint *)&out_result,
-                                       NULL,
-                                       &error) == FALSE)
-       {
-               DEBUG_ERR_MSG("can not make read only: %s",
-                               error->message);
-               out_result = NET_NFC_IPC_FAIL;
-
-               g_error_free(error);
-       }
-
-       return out_result;
-}
-
-NET_NFC_EXPORT_API
-net_nfc_error_e net_nfc_client_ndef_format(net_nfc_target_handle_h handle,
-                               data_h key,
-                               net_nfc_client_ndef_format_completed callback,
-                               void *user_data)
-{
-       NetNfcCallback *func_data;
-       GVariant *arg_data;
-
-       if (handle == NULL)
-               return NET_NFC_NULL_PARAMETER;
-
-       if (ndef_proxy == NULL)
-       {
-               if(net_nfc_client_ndef_init() != NET_NFC_OK)
-               {
-                       DEBUG_ERR_MSG("tag_proxy fail");
-                       return NET_NFC_NOT_INITIALIZED;
-               }
-       }
-
-       /* prevent executing daemon when nfc is off */
-       if (net_nfc_client_manager_is_activated() == false) {
-               return NET_NFC_NOT_ACTIVATED;
-       }
-
-       if (net_nfc_client_tag_is_connected() == FALSE)
-               return NET_NFC_NOT_CONNECTED;
-
-       func_data = g_try_new0(NetNfcCallback, 1);
-       if (func_data == NULL) {
-               return NET_NFC_ALLOC_FAIL;
-       }
-
-       func_data->callback = (gpointer)callback;
-       func_data->user_data = user_data;
-
-       arg_data = net_nfc_util_gdbus_data_to_variant((data_s *)key);
-
-       net_nfc_gdbus_ndef_call_format(ndef_proxy ,
-                               GPOINTER_TO_UINT(handle),
-                               arg_data,
-                               NULL,
-                               ndef_call_format,
-                               func_data);
-
-       return NET_NFC_OK;
-}
-
-NET_NFC_EXPORT_API
-net_nfc_error_e net_nfc_client_ndef_format_sync(
-                                       net_nfc_target_handle_h handle,
-                                       data_h key)
-{
-       net_nfc_error_e out_result = NET_NFC_OK;
-       GVariant *arg_data;
-       GError *error = NULL;
-
-       if (handle == NULL)
-               return NET_NFC_NULL_PARAMETER;
-
-       if (ndef_proxy == NULL)
-       {
-               if(net_nfc_client_ndef_init() != NET_NFC_OK)
-               {
-                       DEBUG_ERR_MSG("tag_proxy fail");
-                       return NET_NFC_NOT_INITIALIZED;
-               }
-       }
-
-       /* prevent executing daemon when nfc is off */
-       if (net_nfc_client_manager_is_activated() == false) {
-               return NET_NFC_NOT_ACTIVATED;
-       }
-
-       if (net_nfc_client_tag_is_connected() == FALSE)
-               return NET_NFC_NOT_CONNECTED;
-
-       arg_data = net_nfc_util_gdbus_data_to_variant((data_s *)key);
-
-       if (net_nfc_gdbus_ndef_call_format_sync(ndef_proxy ,
-                                       GPOINTER_TO_UINT(handle),
-                                       arg_data,
-                                       (gint *)&out_result,
-                                       NULL,
-                                       &error) == FALSE)
-       {
-               DEBUG_ERR_MSG("can not call format: %s",
-                               error->message);
-               out_result = NET_NFC_IPC_FAIL;
-
-               g_error_free(error);
-       }
-
-       return out_result;
-}
-
-net_nfc_error_e net_nfc_client_ndef_init(void)
-{
-       GError *error = NULL;
-
-       if (ndef_proxy)
-       {
-               DEBUG_CLIENT_MSG("Already initialized");
-
-               return NET_NFC_OK;
-       }
-
-       ndef_proxy = net_nfc_gdbus_ndef_proxy_new_for_bus_sync(
-                               G_BUS_TYPE_SYSTEM,
-                               G_DBUS_PROXY_FLAGS_DO_NOT_AUTO_START,
-                               "org.tizen.NetNfcService",
-                               "/org/tizen/NetNfcService/Ndef",
-                               NULL,
-                               &error);
-       if (ndef_proxy == NULL)
-       {
-               DEBUG_ERR_MSG("Can not create proxy : %s", error->message);
-               g_error_free(error);
-
-               return NET_NFC_UNKNOWN_ERROR;
-       }
-
-       return NET_NFC_OK;
-}
-
-void net_nfc_client_ndef_deinit(void)
-{
-       if (ndef_proxy)
-       {
-               g_object_unref(ndef_proxy);
-               ndef_proxy = NULL;
-       }
-}
diff --git a/test/src/net_nfc_client_ndef_message.c b/test/src/net_nfc_client_ndef_message.c
deleted file mode 100755 (executable)
index d8e3f74..0000000
+++ /dev/null
@@ -1,288 +0,0 @@
-/*
-  * Copyright (c) 2012, 2013 Samsung Electronics Co., Ltd.
-  *
-  * Licensed under the Flora License, Version 1.1 (the "License");
-  * you may not use this file except in compliance with the License.
-  * You may obtain a copy of the License at
-
-  *     http://floralicense.org/license/
-  *
-  * 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.
-  */
-
-#include <linux/limits.h>
-
-#include "net_nfc_debug_internal.h"
-#include "net_nfc_util_internal.h"
-#include "net_nfc_util_ndef_message.h"
-#include "net_nfc_ndef_message.h"
-#include "net_nfc_data.h"
-
-#ifndef NET_NFC_EXPORT_API
-#define NET_NFC_EXPORT_API __attribute__((visibility("default")))
-#endif
-
-
-#ifndef NET_NFC_MANAGER_DATA_PATH
-#define NET_NFC_MANAGER_DATA_PATH              "/opt/usr/share/nfc-manager-daemon"
-#endif
-
-#ifndef NET_NFC_MANAGER_DATA_PATH_MESSAGE
-#define NET_NFC_MANAGER_DATA_PATH_MESSAGE      "message"
-#endif
-
-#ifndef NET_NFC_MANAGER_NDEF_FILE_NAME
-#define NET_NFC_MANAGER_NDEF_FILE_NAME         "ndef-message.txt"
-#endif
-
-
-/* public functions */
-NET_NFC_EXPORT_API
-net_nfc_error_e net_nfc_create_ndef_message(ndef_message_h *ndef_message)
-{
-       return net_nfc_util_create_ndef_message(
-               (ndef_message_s **)ndef_message);
-}
-
-NET_NFC_EXPORT_API
-net_nfc_error_e net_nfc_create_rawdata_from_ndef_message(
-       ndef_message_h ndef_message, data_h *rawdata)
-{
-       uint32_t count;
-       net_nfc_error_e result;
-       data_h data;
-
-       if (ndef_message == NULL || rawdata == NULL) {
-               return NET_NFC_NULL_PARAMETER;
-       }
-
-       *rawdata = NULL;
-
-       result = net_nfc_get_ndef_message_byte_length(ndef_message, &count);
-       if (result != NET_NFC_OK) {
-               return result;
-       }
-
-       result = net_nfc_create_data(&data ,NULL, count);
-       if (result != NET_NFC_OK) {
-               return result;
-       }
-
-       result = net_nfc_util_convert_ndef_message_to_rawdata(
-               (ndef_message_s *)ndef_message, (data_s *)data);
-       if (result == NET_NFC_OK) {
-               *rawdata = data;
-       } else {
-               net_nfc_free_data(data);
-       }
-
-       return result;
-}
-
-NET_NFC_EXPORT_API
-net_nfc_error_e net_nfc_create_ndef_message_from_rawdata(
-       ndef_message_h *ndef_message, data_h rawdata)
-{
-       net_nfc_error_e result;
-       ndef_message_h msg;
-
-       if (ndef_message == NULL || rawdata == NULL) {
-               return NET_NFC_NULL_PARAMETER;
-       }
-
-       *ndef_message = NULL;
-
-       result = net_nfc_create_ndef_message(&msg);
-       if (result != NET_NFC_OK) {
-               return result;
-       }
-
-       result = net_nfc_util_convert_rawdata_to_ndef_message(
-               (data_s *)rawdata, (ndef_message_s *)msg);
-       if (result == NET_NFC_OK) {
-               *ndef_message = msg;
-       } else {
-               net_nfc_free_ndef_message(msg);
-       }
-
-       return result;
-}
-
-NET_NFC_EXPORT_API
-net_nfc_error_e net_nfc_get_ndef_message_byte_length(
-       ndef_message_h ndef_message, uint32_t *length)
-{
-       net_nfc_error_e result;
-
-       if (ndef_message == NULL || length == NULL){
-               return NET_NFC_NULL_PARAMETER;
-       }
-
-       *length = net_nfc_util_get_ndef_message_length(
-               (ndef_message_s *)ndef_message);
-       if (*length > 0) {
-               result = NET_NFC_OK;
-       } else {
-               result = NET_NFC_INVALID_PARAM;
-       }
-
-       return result;
-}
-
-NET_NFC_EXPORT_API
-net_nfc_error_e net_nfc_append_record_to_ndef_message(
-       ndef_message_h ndef_message, ndef_record_h record)
-{
-       if (ndef_message == NULL || record == NULL) {
-               return NET_NFC_NULL_PARAMETER;
-       }
-
-       return net_nfc_util_append_record((ndef_message_s *)ndef_message,
-               (ndef_record_s *)record);
-}
-
-NET_NFC_EXPORT_API
-net_nfc_error_e net_nfc_free_ndef_message(ndef_message_h ndef_message)
-{
-       if (ndef_message == NULL) {
-               return NET_NFC_NULL_PARAMETER;
-       }
-
-       return net_nfc_util_free_ndef_message((ndef_message_s *)ndef_message);
-}
-
-NET_NFC_EXPORT_API
-net_nfc_error_e net_nfc_get_ndef_message_record_count(
-       ndef_message_h ndef_message, int *count)
-{
-       ndef_message_s *msg = (ndef_message_s *)ndef_message;
-
-       if (ndef_message == NULL || count == NULL) {
-               return NET_NFC_NULL_PARAMETER;
-       }
-
-       *count = msg->recordCount;
-
-       return NET_NFC_OK;
-}
-
-NET_NFC_EXPORT_API void net_nfc_ndef_print_message(ndef_message_h ndef_message)
-{
-       net_nfc_util_print_ndef_message((ndef_message_s *)ndef_message);
-}
-
-
-NET_NFC_EXPORT_API
-net_nfc_error_e net_nfc_search_record_by_type(ndef_message_h ndef_message,
-       net_nfc_record_tnf_e tnf, data_h type, ndef_record_h *record)
-{
-       return net_nfc_util_search_record_by_type(
-               (ndef_message_s *)ndef_message, tnf,
-               (data_s *)type, (ndef_record_s **)record);
-}
-
-NET_NFC_EXPORT_API
-net_nfc_error_e net_nfc_append_record_by_index(ndef_message_h ndef_message,
-       int index, ndef_record_h record)
-{
-       return net_nfc_util_append_record_by_index(
-               (ndef_message_s *)ndef_message, index,
-               (ndef_record_s *) record);
-}
-
-NET_NFC_EXPORT_API
-net_nfc_error_e net_nfc_get_record_by_index(ndef_message_h ndef_message,
-       int index, ndef_record_h *record)
-{
-       return net_nfc_util_get_record_by_index(
-               (ndef_message_s *)ndef_message, index,
-               (ndef_record_s **)record);
-}
-
-NET_NFC_EXPORT_API
-net_nfc_error_e net_nfc_remove_record_by_index(ndef_message_h ndef_message,
-       int index)
-{
-       return net_nfc_util_remove_record_by_index(
-               (ndef_message_s*)ndef_message, index);
-}
-
-NET_NFC_EXPORT_API
-net_nfc_error_e net_nfc_retrieve_current_ndef_message(
-       ndef_message_h *ndef_message)
-{
-       net_nfc_error_e result = NET_NFC_UNKNOWN_ERROR;
-       char file_path[PATH_MAX] = { 0, };
-       FILE *fp = NULL;
-
-       if (ndef_message == NULL)
-       {
-               return NET_NFC_NULL_PARAMETER;
-       }
-
-       snprintf(file_path, sizeof(file_path), "%s/%s/%s",
-               NET_NFC_MANAGER_DATA_PATH,
-               NET_NFC_MANAGER_DATA_PATH_MESSAGE,
-               NET_NFC_MANAGER_NDEF_FILE_NAME);
-
-       if ((fp = fopen(file_path, "r")) != NULL)
-       {
-               long int size = 0;
-
-               /* rewind to start of file */
-               fseek(fp, 0, SEEK_END);
-               size = ftell(fp);
-               fseek(fp, 0, SEEK_SET);
-
-               DEBUG_CLIENT_MSG("message length = [%ld]", size);
-
-               if (size > 0)
-               {
-                       data_s data = { NULL, 0 };
-
-                       if (net_nfc_util_init_data(&data, size) == true)
-                       {
-                               int current;
-                               size_t offset = 0;
-
-                               /* read fully */
-                               do {
-                                       current = fread(data.buffer + offset, 1,
-                                               data.length - offset, fp);
-                                       if (current > 0)
-                                               offset += current;
-                                       else
-                                               break;
-                               } while (offset < data.length);
-
-                               if (offset == data.length) {
-                                       result = net_nfc_create_ndef_message_from_rawdata(ndef_message, &data);
-                               } else {
-                                       DEBUG_ERR_MSG("failed to read ndef message");
-                               }
-
-                               net_nfc_util_clear_data(&data);
-                       }
-                       else
-                       {
-                               result = NET_NFC_ALLOC_FAIL;
-                       }
-               }
-               else
-               {
-                       result = NET_NFC_NO_NDEF_MESSAGE;
-               }
-
-               fclose(fp);
-       }
-       else
-       {
-               result = NET_NFC_NO_NDEF_MESSAGE;
-       }
-
-       return result;
-}
diff --git a/test/src/net_nfc_client_ndef_message_handover.c b/test/src/net_nfc_client_ndef_message_handover.c
deleted file mode 100755 (executable)
index 1b90231..0000000
+++ /dev/null
@@ -1,371 +0,0 @@
-/*
- * Copyright (c) 2012, 2013 Samsung Electronics Co., Ltd.
- *
- * Licensed under the Flora License, Version 1.1 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
-
- *     http://floralicense.org/license/
- *
- * 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.
- */
-
-#include <glib.h>
-
-#include "net_nfc_typedef_internal.h"
-#include "net_nfc_debug_internal.h"
-#include "net_nfc_util_internal.h"
-#include "net_nfc_util_handover.h"
-#include "net_nfc_ndef_message_handover.h"
-
-#ifndef NET_NFC_EXPORT_API
-#define NET_NFC_EXPORT_API __attribute__((visibility("default")))
-#endif
-
-NET_NFC_EXPORT_API
-net_nfc_error_e net_nfc_create_carrier_config(net_nfc_carrier_config_h *config,
-       net_nfc_conn_handover_carrier_type_e type)
-{
-       return net_nfc_util_create_carrier_config(
-               (net_nfc_carrier_config_s **)config, type);
-}
-
-NET_NFC_EXPORT_API
-net_nfc_error_e net_nfc_add_carrier_config_property(
-       net_nfc_carrier_config_h config, uint16_t attribute, uint16_t size,
-       uint8_t * data)
-{
-       return net_nfc_util_add_carrier_config_property(
-               (net_nfc_carrier_config_s *)config, attribute, size, data);
-}
-
-NET_NFC_EXPORT_API
-net_nfc_error_e net_nfc_remove_carrier_config_property(
-       net_nfc_carrier_config_h config, uint16_t attribute)
-{
-       return net_nfc_util_remove_carrier_config_property(
-               (net_nfc_carrier_config_s *)config, attribute);
-}
-
-NET_NFC_EXPORT_API
-net_nfc_error_e net_nfc_get_carrier_config_property(
-       net_nfc_carrier_config_h config, uint16_t attribute,
-       uint16_t *size, uint8_t **data)
-{
-       return net_nfc_util_get_carrier_config_property(
-               (net_nfc_carrier_config_s *)config, attribute, size, data);
-}
-
-
-NET_NFC_EXPORT_API
-net_nfc_error_e net_nfc_append_carrier_config_group(
-       net_nfc_carrier_config_h config, net_nfc_property_group_h group)
-{
-       return net_nfc_util_append_carrier_config_group(
-               (net_nfc_carrier_config_s *)config,
-               (net_nfc_carrier_property_s *)group);
-}
-
-NET_NFC_EXPORT_API
-net_nfc_error_e net_nfc_remove_carrier_config_group(
-       net_nfc_carrier_config_h config, net_nfc_property_group_h group)
-{
-       return net_nfc_util_remove_carrier_config_group(
-               (net_nfc_carrier_config_s *)config,
-               (net_nfc_carrier_property_s *)group);
-}
-
-NET_NFC_EXPORT_API
-net_nfc_error_e net_nfc_get_carrier_config_group(
-       net_nfc_carrier_config_h config, uint16_t attribute,
-       net_nfc_property_group_h *group)
-{
-       return net_nfc_util_get_carrier_config_group(
-               (net_nfc_carrier_config_s *)config, attribute,
-               (net_nfc_carrier_property_s **)group);
-}
-
-NET_NFC_EXPORT_API
-net_nfc_error_e net_nfc_free_carrier_config(net_nfc_carrier_config_h config)
-{
-       return net_nfc_util_free_carrier_config(
-               (net_nfc_carrier_config_s *)config);
-}
-
-
-
-NET_NFC_EXPORT_API
-net_nfc_error_e net_nfc_create_carrier_config_group(
-       net_nfc_property_group_h *group, uint16_t attribute)
-{
-       return net_nfc_util_create_carrier_config_group(
-               (net_nfc_carrier_property_s **)group, attribute);
-}
-
-NET_NFC_EXPORT_API
-net_nfc_error_e net_nfc_add_carrier_config_group_property(
-       net_nfc_property_group_h group, uint16_t attribute, uint16_t size,
-       uint8_t *data)
-{
-       return net_nfc_util_add_carrier_config_group_property(
-               (net_nfc_carrier_property_s *)group, attribute, size, data);
-}
-
-NET_NFC_EXPORT_API
-net_nfc_error_e net_nfc_get_carrier_config_group_property(
-       net_nfc_property_group_h group, uint16_t attribute, uint16_t *size,
-       uint8_t **data)
-{
-       return net_nfc_util_get_carrier_config_group_property(
-               (net_nfc_carrier_property_s *)group, attribute, size, data);
-}
-
-NET_NFC_EXPORT_API
-net_nfc_error_e net_nfc_remove_carrier_config_group_property(
-       net_nfc_property_group_h group, uint16_t attribute)
-{
-       return net_nfc_util_remove_carrier_config_group_property(
-               (net_nfc_carrier_property_s *)group, attribute);
-}
-
-NET_NFC_EXPORT_API
-net_nfc_error_e net_nfc_free_carrier_group(net_nfc_property_group_h group)
-{
-       return net_nfc_util_free_carrier_group(
-               (net_nfc_carrier_property_s *)group);
-}
-
-
-
-NET_NFC_EXPORT_API
-net_nfc_error_e net_nfc_create_ndef_record_with_carrier_config(
-       ndef_record_h *record, net_nfc_carrier_config_h config)
-{
-       return net_nfc_util_create_ndef_record_with_carrier_config(
-               (ndef_record_s**)record, (net_nfc_carrier_config_s *)config);
-}
-
-NET_NFC_EXPORT_API
-net_nfc_error_e net_nfc_create_carrier_config_from_config_record(
-       net_nfc_carrier_config_h *config, ndef_record_h record)
-{
-       return net_nfc_util_create_carrier_config_from_config_record(
-               (net_nfc_carrier_config_s **)config, (ndef_record_s *)record);
-
-}
-
-NET_NFC_EXPORT_API
-net_nfc_error_e net_nfc_create_carrier_config_from_carrier(
-       net_nfc_carrier_config_h *config, net_nfc_ch_carrier_h carrier)
-{
-       return net_nfc_util_create_carrier_config_from_carrier(
-               (net_nfc_carrier_config_s **)config, (net_nfc_ch_carrier_s *)carrier);
-
-}
-
-
-NET_NFC_EXPORT_API
-net_nfc_error_e net_nfc_create_handover_carrier(net_nfc_ch_carrier_h *carrier,
-       net_nfc_conn_handover_carrier_state_e cps)
-{
-       return net_nfc_util_create_handover_carrier(
-               (net_nfc_ch_carrier_s **)carrier, cps);
-}
-
-NET_NFC_EXPORT_API
-net_nfc_error_e net_nfc_duplicate_handover_carrier(net_nfc_ch_carrier_h *dest,
-       net_nfc_ch_carrier_h src)
-{
-       return net_nfc_util_duplicate_handover_carrier(
-               (net_nfc_ch_carrier_s **)dest,
-               (net_nfc_ch_carrier_s *)src);
-}
-
-NET_NFC_EXPORT_API
-net_nfc_error_e net_nfc_free_handover_carrier(net_nfc_ch_carrier_h carrier)
-{
-       return net_nfc_util_free_handover_carrier(
-               (net_nfc_ch_carrier_s *)carrier);
-}
-
-NET_NFC_EXPORT_API
-net_nfc_error_e net_nfc_set_handover_carrier_cps(
-       net_nfc_ch_carrier_h carrier,
-       net_nfc_conn_handover_carrier_state_e cps)
-{
-       return net_nfc_util_set_handover_carrier_cps(
-               (net_nfc_ch_carrier_s *)carrier, cps);
-}
-
-NET_NFC_EXPORT_API
-net_nfc_error_e net_nfc_get_handover_carrier_cps(
-       net_nfc_ch_carrier_h carrier,
-       net_nfc_conn_handover_carrier_state_e *cps)
-{
-       return net_nfc_util_get_handover_carrier_cps(
-               (net_nfc_ch_carrier_s *)carrier, cps);
-}
-
-NET_NFC_EXPORT_API
-net_nfc_error_e net_nfc_set_handover_carrier_type(
-       net_nfc_ch_carrier_h carrier,
-       net_nfc_conn_handover_carrier_type_e type)
-{
-       return net_nfc_util_set_handover_carrier_type(
-               (net_nfc_ch_carrier_s *)carrier, type);
-}
-
-NET_NFC_EXPORT_API
-net_nfc_error_e net_nfc_get_handover_carrier_type(
-       net_nfc_ch_carrier_h carrier,
-       net_nfc_conn_handover_carrier_type_e *type)
-{
-       return net_nfc_util_get_handover_carrier_type(
-               (net_nfc_ch_carrier_s *)carrier, type);
-}
-
-NET_NFC_EXPORT_API
-net_nfc_error_e net_nfc_append_handover_carrier_record(
-       net_nfc_ch_carrier_h carrier, ndef_record_h record)
-{
-       return net_nfc_util_append_handover_carrier_record(
-               (net_nfc_ch_carrier_s *)carrier, (ndef_record_s *)record);
-}
-
-NET_NFC_EXPORT_API
-net_nfc_error_e net_nfc_get_handover_carrier_record(
-       net_nfc_ch_carrier_h carrier, ndef_record_h *record)
-{
-       return net_nfc_util_get_handover_carrier_record(
-               (net_nfc_ch_carrier_s *)carrier, (ndef_record_s **)record);
-}
-
-NET_NFC_EXPORT_API
-net_nfc_error_e net_nfc_remove_handover_carrier_record(
-       net_nfc_ch_carrier_h carrier)
-{
-       return net_nfc_util_remove_handover_carrier_record(
-               (net_nfc_ch_carrier_s *)carrier);
-}
-
-NET_NFC_EXPORT_API
-net_nfc_error_e net_nfc_append_handover_auxiliary_record(
-       net_nfc_ch_carrier_h carrier, ndef_record_h record)
-{
-       return net_nfc_util_append_handover_auxiliary_record(
-               (net_nfc_ch_carrier_s *)carrier, (ndef_record_s *)record);
-}
-
-NET_NFC_EXPORT_API
-net_nfc_error_e net_nfc_get_handover_auxiliary_record_count(
-       net_nfc_ch_carrier_h carrier, uint32_t *count)
-{
-       return net_nfc_util_get_handover_auxiliary_record_count(
-               (net_nfc_ch_carrier_s *)carrier, count);
-}
-
-NET_NFC_EXPORT_API
-net_nfc_error_e net_nfc_get_handover_auxiliary_record(
-       net_nfc_ch_carrier_h carrier, int index, ndef_record_h *record)
-{
-       return net_nfc_util_get_handover_auxiliary_record(
-               (net_nfc_ch_carrier_s *)carrier, index, (ndef_record_s **)record);
-}
-
-NET_NFC_EXPORT_API
-net_nfc_error_e net_nfc_remove_handover_auxiliary_record(
-       net_nfc_ch_carrier_h carrier, ndef_record_h record)
-{
-       return net_nfc_util_remove_handover_auxiliary_record(
-               (net_nfc_ch_carrier_s *)carrier, (ndef_record_s *)record);
-}
-
-
-
-NET_NFC_EXPORT_API
-net_nfc_error_e net_nfc_create_handover_message(
-       net_nfc_ch_message_h *message)
-{
-       return net_nfc_util_create_handover_message(
-               (net_nfc_ch_message_s **)message);
-}
-
-NET_NFC_EXPORT_API
-net_nfc_error_e net_nfc_free_handover_message(
-       net_nfc_ch_message_h message)
-{
-       return net_nfc_util_free_handover_message(
-               (net_nfc_ch_message_s *)message);
-}
-
-NET_NFC_EXPORT_API
-net_nfc_error_e net_nfc_get_handover_random_number(
-       net_nfc_ch_message_h message, uint16_t *random_number)
-{
-       return net_nfc_util_get_handover_random_number(
-               (net_nfc_ch_message_s *)message, random_number);
-}
-
-NET_NFC_EXPORT_API
-net_nfc_error_e net_nfc_append_handover_carrier(
-       net_nfc_ch_message_h message, net_nfc_ch_carrier_h carrier)
-{
-       return net_nfc_util_append_handover_carrier(
-               (net_nfc_ch_message_s *)message,
-               (net_nfc_ch_carrier_s *)carrier);
-}
-
-NET_NFC_EXPORT_API
-net_nfc_error_e net_nfc_get_handover_carrier_count(
-       net_nfc_ch_message_h message, uint32_t *count)
-{
-       return net_nfc_util_get_handover_carrier_count(
-               (net_nfc_ch_message_s *)message, count);
-}
-
-NET_NFC_EXPORT_API
-net_nfc_error_e net_nfc_get_handover_carrier(
-       net_nfc_ch_message_h message, int index,
-       net_nfc_ch_carrier_h *carrier)
-{
-       return net_nfc_util_get_handover_carrier(
-               (net_nfc_ch_message_s *)message, index,
-               (net_nfc_ch_carrier_s **)carrier);
-}
-
-NET_NFC_EXPORT_API
-net_nfc_error_e net_nfc_get_handover_carrier_by_type(
-       net_nfc_ch_message_h message,
-       net_nfc_conn_handover_carrier_type_e type,
-       net_nfc_ch_carrier_h *carrier)
-{
-       return net_nfc_util_get_handover_carrier_by_type(
-               (net_nfc_ch_message_s *)message, type,
-               (net_nfc_ch_carrier_s **)carrier);
-}
-
-NET_NFC_EXPORT_API
-net_nfc_error_e net_nfc_export_handover_to_ndef_message(
-       net_nfc_ch_message_h message, ndef_message_h *result)
-{
-       return net_nfc_util_export_handover_to_ndef_message(
-               (net_nfc_ch_message_s *)message, (ndef_message_s **)result);
-}
-
-NET_NFC_EXPORT_API
-net_nfc_error_e net_nfc_import_handover_from_ndef_message(
-       ndef_message_h msg, net_nfc_ch_message_h *result)
-{
-       return net_nfc_util_import_handover_from_ndef_message(
-               (ndef_message_s *)msg, (net_nfc_ch_message_s **)result);
-}
-
-NET_NFC_EXPORT_API
-net_nfc_error_e net_nfc_create_handover_error_record(ndef_record_h *record, uint8_t reason, uint32_t data)
-{
-       return net_nfc_util_create_handover_error_record((ndef_record_s **)record, reason, data);
-}
diff --git a/test/src/net_nfc_client_ndef_record.c b/test/src/net_nfc_client_ndef_record.c
deleted file mode 100755 (executable)
index 9079710..0000000
+++ /dev/null
@@ -1,343 +0,0 @@
-/*
- * Copyright (c) 2012, 2013 Samsung Electronics Co., Ltd.
- *
- * Licensed under the Flora License, Version 1.1 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
-
- *     http://floralicense.org/license/
- *
- * 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.
- */
-
-#include "net_nfc_ndef_record.h"
-#include "net_nfc_ndef_message.h"
-#include "net_nfc_data.h"
-#include "net_nfc_debug_internal.h"
-#include "net_nfc_util_internal.h"
-#include "net_nfc_util_ndef_record.h"
-
-#ifndef NET_NFC_EXPORT_API
-#define NET_NFC_EXPORT_API __attribute__((visibility("default")))
-#endif
-
-NET_NFC_EXPORT_API
-net_nfc_error_e net_nfc_create_record(ndef_record_h *record,
-       net_nfc_record_tnf_e tnf, data_h typeName, data_h id, data_h payload)
-{
-       return net_nfc_util_create_record(tnf, (data_s *)typeName,
-               (data_s *)id, (data_s *)payload, (ndef_record_s **)record);
-}
-
-NET_NFC_EXPORT_API
-net_nfc_error_e net_nfc_create_text_type_record(ndef_record_h *record,
-       const char *text, const char *language_code_str,
-       net_nfc_encode_type_e encode)
-{
-       return net_nfc_util_create_text_type_record(text, language_code_str,
-               encode, (ndef_record_s **)record);
-}
-
-NET_NFC_EXPORT_API
-net_nfc_error_e net_nfc_create_uri_type_record(ndef_record_h *record,
-       const char *uri, net_nfc_schema_type_e protocol_schema)
-{
-       return net_nfc_util_create_uri_type_record(uri, protocol_schema,
-               (ndef_record_s **)record);
-}
-
-NET_NFC_EXPORT_API
-net_nfc_error_e net_nfc_free_record(ndef_record_h record)
-{
-       return net_nfc_util_free_record((ndef_record_s *)record);
-}
-
-NET_NFC_EXPORT_API
-net_nfc_error_e net_nfc_get_record_payload(ndef_record_h record,
-       data_h *payload)
-{
-       ndef_record_s *struct_record = (ndef_record_s *)record;
-
-       if (record == NULL || payload == NULL)
-       {
-               return NET_NFC_NULL_PARAMETER;
-       }
-
-       *payload = (data_h)&(struct_record->payload_s);
-
-       return NET_NFC_OK;
-}
-
-NET_NFC_EXPORT_API
-net_nfc_error_e net_nfc_get_record_type(ndef_record_h record, data_h *type)
-{
-       ndef_record_s *struct_record = (ndef_record_s *)record;
-
-       if (record == NULL || type == NULL)
-       {
-               return NET_NFC_NULL_PARAMETER;
-       }
-
-       *type = (data_h)&(struct_record->type_s);
-
-       return NET_NFC_OK;
-}
-
-NET_NFC_EXPORT_API
-net_nfc_error_e net_nfc_get_record_id(ndef_record_h record, data_h *id)
-{
-       ndef_record_s *struct_record = (ndef_record_s *)record;
-
-       if (record == NULL || id == NULL)
-       {
-               return NET_NFC_NULL_PARAMETER;
-       }
-
-       *id = (data_h)&(struct_record->id_s);
-
-       return NET_NFC_OK;
-}
-
-NET_NFC_EXPORT_API
-net_nfc_error_e net_nfc_get_record_tnf(ndef_record_h record,
-       net_nfc_record_tnf_e *TNF)
-{
-       ndef_record_s *struct_record = (ndef_record_s *)record;
-
-       if (record == NULL || TNF == NULL)
-       {
-               return NET_NFC_NULL_PARAMETER;
-       }
-
-       *TNF = (net_nfc_record_tnf_e)struct_record->TNF;
-
-       return NET_NFC_OK;
-}
-
-NET_NFC_EXPORT_API
-net_nfc_error_e net_nfc_set_record_id(ndef_record_h record, data_h id)
-{
-       data_s *tmp_id = (data_s *)id;
-
-       if (record == NULL || tmp_id == NULL)
-       {
-               return NET_NFC_NULL_PARAMETER;
-       }
-
-       return net_nfc_util_set_record_id((ndef_record_s *)record,
-               tmp_id->buffer, tmp_id->length);
-}
-
-NET_NFC_EXPORT_API
-net_nfc_error_e net_nfc_get_record_flags(ndef_record_h record, uint8_t *flag)
-{
-       ndef_record_s *struct_record = (ndef_record_s *)record;
-
-       if (record == NULL || flag == NULL)
-       {
-               return NET_NFC_NULL_PARAMETER;
-       }
-
-       *flag = struct_record->MB;
-       *flag <<= 1;
-       *flag += struct_record->ME;
-       *flag <<= 1;
-       *flag += struct_record->CF;
-       *flag <<= 1;
-       *flag += struct_record->SR;
-       *flag <<= 1;
-       *flag += struct_record->IL;
-       *flag <<= 3;
-       *flag += struct_record->TNF;
-
-       return NET_NFC_OK;
-}
-
-NET_NFC_EXPORT_API uint8_t net_nfc_get_record_mb(uint8_t flag)
-{
-       return ((flag >> 7) & 0x01);
-}
-
-NET_NFC_EXPORT_API uint8_t net_nfc_get_record_me(uint8_t flag)
-{
-       return ((flag >> 6) & 0x01);
-}
-
-NET_NFC_EXPORT_API uint8_t net_nfc_get_record_cf(uint8_t flag)
-{
-       return ((flag >> 5) & 0x01);
-}
-
-NET_NFC_EXPORT_API uint8_t net_nfc_get_record_sr(uint8_t flag)
-{
-       return ((flag >> 4) & 0x01);
-}
-
-NET_NFC_EXPORT_API uint8_t net_nfc_get_record_il(uint8_t flag)
-{
-       return ((flag >> 3) & 0x01);
-}
-
-static bool _is_text_record(ndef_record_h record)
-{
-       bool result = false;
-       data_h type;
-
-       if ((net_nfc_get_record_type(record, &type) == NET_NFC_OK) &&
-               (strncmp((char *)net_nfc_get_data_buffer(type),
-                       TEXT_RECORD_TYPE,
-                       net_nfc_get_data_length(type)) == 0))
-               result = true;
-
-       return result;
-}
-
-NET_NFC_EXPORT_API
-net_nfc_error_e net_nfc_create_text_string_from_text_record(
-       ndef_record_h record, char **buffer)
-{
-       net_nfc_error_e result;
-       data_h payload;
-
-       if (record == NULL || buffer == NULL)
-       {
-               return NET_NFC_NULL_PARAMETER;
-       }
-
-       *buffer = NULL;
-
-       if (_is_text_record(record) == false)
-       {
-               DEBUG_ERR_MSG("record type is not matched");
-
-               return NET_NFC_NDEF_RECORD_IS_NOT_EXPECTED_TYPE;
-       }
-
-       result = net_nfc_get_record_payload(record, &payload);
-       if (result == NET_NFC_OK)
-       {
-               uint8_t *buffer_temp = net_nfc_get_data_buffer(payload);
-               uint32_t buffer_length = net_nfc_get_data_length(payload);
-
-               int controllbyte = buffer_temp[0];
-               int lang_code_length = controllbyte & 0x3F;
-               int index = lang_code_length + 1;
-               int text_length = buffer_length - (lang_code_length + 1);
-
-               char *temp = NULL;
-
-               _net_nfc_util_alloc_mem(temp, text_length + 1);
-               if (temp != NULL)
-               {
-                       memcpy(temp, &(buffer_temp[index]), text_length);
-
-                       DEBUG_CLIENT_MSG("text = [%s]", temp);
-
-                       *buffer = temp;
-               }
-               else
-               {
-                       result = NET_NFC_ALLOC_FAIL;
-               }
-       }
-
-       return result;
-}
-
-NET_NFC_EXPORT_API
-net_nfc_error_e net_nfc_get_languange_code_string_from_text_record(
-       ndef_record_h record, char **lang_code_str)
-{
-       net_nfc_error_e result;
-       data_h payload;
-
-       if (record == NULL || lang_code_str == NULL)
-       {
-               return NET_NFC_NULL_PARAMETER;
-       }
-
-       *lang_code_str = NULL;
-
-       if (_is_text_record(record) == false)
-       {
-               DEBUG_ERR_MSG("record type is not matched");
-
-               return NET_NFC_NDEF_RECORD_IS_NOT_EXPECTED_TYPE;
-       }
-
-       result = net_nfc_get_record_payload(record, &payload);
-       if (result == NET_NFC_OK)
-       {
-               uint8_t *buffer_temp = net_nfc_get_data_buffer(payload);
-               char *buffer = NULL;
-
-               int controllbyte = buffer_temp[0];
-               int lang_code_length = controllbyte & 0x3F;
-               int index = 1;
-
-               _net_nfc_util_alloc_mem(buffer, lang_code_length + 1);
-               if (buffer != NULL)
-               {
-                       memcpy(buffer, &(buffer_temp[index]), lang_code_length);
-
-                       DEBUG_CLIENT_MSG("language code = [%s]", buffer);
-
-                       *lang_code_str = buffer;
-               }
-               else
-               {
-                       result = NET_NFC_ALLOC_FAIL;
-               }
-       }
-
-       return result;
-}
-
-NET_NFC_EXPORT_API
-net_nfc_error_e net_nfc_get_encoding_type_from_text_record(ndef_record_h record,
-       net_nfc_encode_type_e *encoding)
-{
-       net_nfc_error_e result;
-       data_h payload;
-
-       if (record == NULL || encoding == NULL)
-       {
-               return NET_NFC_NULL_PARAMETER;
-       }
-
-       *encoding = NET_NFC_ENCODE_UTF_8;
-
-       if (_is_text_record(record) == false)
-       {
-               DEBUG_ERR_MSG("record type is not matched");
-
-               return NET_NFC_NDEF_RECORD_IS_NOT_EXPECTED_TYPE;
-       }
-
-       result = net_nfc_get_record_payload(record, &payload);
-       if (result == NET_NFC_OK)
-       {
-               uint8_t *buffer_temp = net_nfc_get_data_buffer(payload);
-
-               int controllbyte = buffer_temp[0];
-
-               if ((controllbyte & 0x80) == 0x80)
-               {
-                       *encoding = NET_NFC_ENCODE_UTF_16;
-               }
-       }
-
-       return result;
-}
-
-NET_NFC_EXPORT_API
-net_nfc_error_e net_nfc_create_uri_string_from_uri_record(ndef_record_h record,
-       char **uri)
-{
-       return net_nfc_util_create_uri_string_from_uri_record(
-               (ndef_record_s *)record, uri);
-}
diff --git a/test/src/net_nfc_client_p2p.c b/test/src/net_nfc_client_p2p.c
deleted file mode 100755 (executable)
index 6997d15..0000000
+++ /dev/null
@@ -1,376 +0,0 @@
-/*
- * Copyright (c) 2012, 2013 Samsung Electronics Co., Ltd.
- *
- * Licensed under the Flora License, Version 1.1 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://floralicense.org/license/
- *
- * 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.
- */
-
-#include "net_nfc_typedef_internal.h"
-#include "net_nfc_debug_internal.h"
-#include "net_nfc_util_internal.h"
-#include "net_nfc_util_ndef_message.h"
-#include "net_nfc_util_gdbus_internal.h"
-#include "net_nfc_gdbus.h"
-#include "net_nfc_client.h"
-#include "net_nfc_client_util_internal.h"
-#include "net_nfc_client_manager.h"
-#include "net_nfc_client_p2p.h"
-
-#ifndef NET_NFC_EXPORT_API
-#define NET_NFC_EXPORT_API __attribute__((visibility("default")))
-#endif
-
-typedef struct _P2p_SignalHandler P2pSignalHandler;
-
-struct _P2p_SignalHandler
-{
-       net_nfc_client_p2p_device_discovered p2p_device_discovered_cb;
-       net_nfc_client_p2p_device_detached p2p_device_detached_cb;
-       net_nfc_client_p2p_data_received p2p_data_received_cb;
-
-       gpointer p2p_device_discovered_data;
-       gpointer p2p_device_detached_data;
-       gpointer p2p_data_received_data;
-};
-
-static NetNfcGDbusP2p *p2p_proxy = NULL;
-static P2pSignalHandler p2p_signal_handler;
-
-static void p2p_device_detached(GObject *source_object,
-       gpointer user_data);
-
-static void p2p_device_discovered(GObject *source_object,
-       guint arg_handle,
-       gpointer user_data);
-
-static void p2p_device_data_received(GObject *source_object,
-       GVariant *arg_data,
-       gpointer user_data);
-
-static void p2p_call_send(GObject *source_object,
-       GAsyncResult *res,
-       gpointer user_data);
-
-static void p2p_device_detached(GObject *source_object,
-       gpointer user_data)
-{
-       INFO_MSG(">>> SIGNAL arrived");
-
-       /*llcp client function to set/unset the current target id needs to be implemented*/
-       /*net_nfc_client_llcp_current_target_id(NULL);*/
-
-       if (p2p_signal_handler.p2p_device_detached_cb)
-       {
-               p2p_signal_handler.p2p_device_detached_cb(
-                       p2p_signal_handler.p2p_device_detached_data);
-       }
-
-       /*llcp client function to close all socket needs to be implemented*/
-       /*net_nfc_client_llcp_close_all_socket();*/
-}
-
-static void p2p_device_discovered(GObject *source_object,
-       guint arg_handle,
-       gpointer user_data)
-{
-       net_nfc_target_handle_s *handle_info = NULL;
-
-       INFO_MSG(">>> SIGNAL arrived");
-
-       handle_info = GUINT_TO_POINTER(arg_handle);
-
-       if (p2p_signal_handler.p2p_device_discovered_cb)
-       {
-               p2p_signal_handler.p2p_device_discovered_cb(handle_info,
-                               p2p_signal_handler.p2p_device_discovered_data);
-       }
-}
-
-static void p2p_device_data_received(GObject *source_object,
-       GVariant *arg_data,
-       gpointer user_data)
-{
-       INFO_MSG(">>> SIGNAL arrived");
-
-       if (p2p_signal_handler.p2p_data_received_cb)
-       {
-               data_s p2p_data = { NULL, };
-
-               net_nfc_util_gdbus_variant_to_data_s(arg_data, &p2p_data);
-
-               p2p_signal_handler.p2p_data_received_cb(&p2p_data,
-                               p2p_signal_handler.p2p_data_received_data);
-
-               net_nfc_util_clear_data(&p2p_data);
-       }
-}
-
-static void p2p_call_send(GObject *source_object,
-                       GAsyncResult *res,
-                       gpointer user_data)
-{
-       NetNfcCallback *func_data = (NetNfcCallback *)user_data;
-       net_nfc_error_e out_result;
-       GError *error = NULL;
-
-       g_assert(user_data != NULL);
-
-       if (net_nfc_gdbus_p2p_call_send_finish(
-               NET_NFC_GDBUS_P2P(source_object),
-               (gint *)&out_result,
-               res,
-               &error) == FALSE)
-       {
-               DEBUG_ERR_MSG("Can not finish p2p send: %s", error->message);
-               out_result = NET_NFC_IPC_FAIL;
-
-               g_error_free(error);
-       }
-
-       if (func_data->callback != NULL)
-       {
-               net_nfc_client_p2p_send_completed callback =
-                       (net_nfc_client_p2p_send_completed)func_data->callback;
-
-               callback(out_result, func_data->user_data);
-       }
-
-       g_free(func_data);
-}
-
-
-NET_NFC_EXPORT_API
-net_nfc_error_e net_nfc_client_p2p_send(net_nfc_target_handle_h handle,
-       data_h data,
-       net_nfc_client_p2p_send_completed callback,
-       void *user_data)
-{
-       GVariant *arg_data;
-       NetNfcCallback *func_data;
-
-       if (p2p_proxy == NULL)
-       {
-               DEBUG_ERR_MSG("Can not get P2pProxy");
-
-               return NET_NFC_NOT_INITIALIZED;
-       }
-
-       /* prevent executing daemon when nfc is off */
-       if (net_nfc_client_manager_is_activated() == false) {
-               return NET_NFC_NOT_ACTIVATED;
-       }
-
-       func_data = g_try_new0(NetNfcCallback, 1);
-       if (func_data == NULL) {
-               return NET_NFC_ALLOC_FAIL;
-       }
-
-       func_data->callback = (gpointer)callback;
-       func_data->user_data = user_data;
-
-       arg_data = net_nfc_util_gdbus_data_to_variant(data);
-
-       net_nfc_gdbus_p2p_call_send(p2p_proxy,
-               0 /* FIXME */,
-               arg_data,
-               GPOINTER_TO_UINT(handle),
-               NULL,
-               p2p_call_send,
-               func_data);
-
-       return NET_NFC_OK;
-}
-
-
-NET_NFC_EXPORT_API
-net_nfc_error_e net_nfc_client_p2p_send_sync(net_nfc_target_handle_h handle,
-       data_h data)
-{
-       GVariant *arg_data;
-       GError *error = NULL;
-
-       net_nfc_error_e out_result;
-
-       if (p2p_proxy == NULL)
-       {
-               DEBUG_ERR_MSG("Can not get P2pProxy");
-
-               return NET_NFC_NOT_INITIALIZED;
-       }
-
-       /* prevent executing daemon when nfc is off */
-       if (net_nfc_client_manager_is_activated() == false) {
-               return NET_NFC_NOT_ACTIVATED;
-       }
-
-       arg_data = net_nfc_util_gdbus_data_to_variant(data);
-
-       if (net_nfc_gdbus_p2p_call_send_sync(p2p_proxy,
-               0 /* FIXME */,
-               arg_data,
-               GPOINTER_TO_UINT(handle),
-               (gint *)&out_result,
-               NULL,
-               &error) == FALSE)
-       {
-               DEBUG_ERR_MSG("p2p send (sync call) failed: %s",
-                       error->message);
-               out_result = NET_NFC_IPC_FAIL;
-
-               g_error_free(error);
-       }
-
-       return out_result;
-}
-
-
-NET_NFC_EXPORT_API
-void net_nfc_client_p2p_set_device_discovered(
-       net_nfc_client_p2p_device_discovered callback,
-       void *user_data)
-{
-       if (callback == NULL)
-               return;
-
-       if (p2p_proxy == NULL)
-       {
-               if (net_nfc_client_p2p_init() != NET_NFC_OK)
-               {
-                       DEBUG_ERR_MSG("P2pProxy fail");
-                       /* FIXME : return result of this error */
-                       return;
-               }
-       }
-
-       p2p_signal_handler.p2p_device_discovered_cb = callback;
-       p2p_signal_handler.p2p_device_discovered_data = user_data;
-}
-
-
-NET_NFC_EXPORT_API
-void net_nfc_client_p2p_set_device_detached(
-       net_nfc_client_p2p_device_detached callback,
-       void *user_data)
-{
-       if (callback == NULL)
-               return;
-
-       if (p2p_proxy == NULL)
-       {
-               if (net_nfc_client_p2p_init() != NET_NFC_OK)
-               {
-                       DEBUG_ERR_MSG("P2pProxy fail");
-                       /* FIXME : return result of this error */
-                       return;
-               }
-       }
-
-       p2p_signal_handler.p2p_device_detached_cb = callback;
-       p2p_signal_handler.p2p_device_detached_data = user_data;
-}
-
-
-NET_NFC_EXPORT_API
-void net_nfc_client_p2p_set_data_received(
-       net_nfc_client_p2p_data_received callback,
-       void *user_data)
-{
-       if (callback == NULL)
-               return;
-
-       if (p2p_proxy == NULL)
-       {
-               if (net_nfc_client_p2p_init() != NET_NFC_OK)
-               {
-                       DEBUG_ERR_MSG("P2pProxy fail");
-                       /* FIXME : return result of this error */
-                       return;
-               }
-       }
-
-       p2p_signal_handler.p2p_data_received_cb = callback;
-       p2p_signal_handler.p2p_data_received_data = user_data;
-}
-
-
-NET_NFC_EXPORT_API
-void net_nfc_client_p2p_unset_device_discovered(void)
-{
-       p2p_signal_handler.p2p_device_discovered_cb = NULL;
-       p2p_signal_handler.p2p_device_discovered_data = NULL;
-}
-
-
-NET_NFC_EXPORT_API
-void net_nfc_client_p2p_unset_device_detached(void)
-{
-       p2p_signal_handler.p2p_device_detached_cb = NULL;
-       p2p_signal_handler.p2p_device_detached_data = NULL;
-}
-
-
-NET_NFC_EXPORT_API
-void net_nfc_client_p2p_unset_data_received(void)
-{
-       p2p_signal_handler.p2p_data_received_cb = NULL;
-       p2p_signal_handler.p2p_data_received_data = NULL;
-}
-
-net_nfc_error_e net_nfc_client_p2p_init(void)
-{
-       GError *error = NULL;
-
-       if (p2p_proxy)
-       {
-               DEBUG_CLIENT_MSG("Already initialized");
-
-               return NET_NFC_OK;
-       }
-
-       p2p_proxy = net_nfc_gdbus_p2p_proxy_new_for_bus_sync(
-               G_BUS_TYPE_SYSTEM,
-               G_DBUS_PROXY_FLAGS_DO_NOT_AUTO_START,
-               "org.tizen.NetNfcService",
-               "/org/tizen/NetNfcService/P2p",
-               NULL,
-               &error);
-       if (p2p_proxy == NULL)
-       {
-               DEBUG_ERR_MSG("Can not create proxy : %s", error->message);
-               g_error_free(error);
-
-               return NET_NFC_UNKNOWN_ERROR;
-       }
-
-       /* FIXME : set timeout to infinite */
-       g_dbus_proxy_set_default_timeout(G_DBUS_PROXY(p2p_proxy), G_MAXINT32);
-
-       g_signal_connect(p2p_proxy, "detached",
-                       G_CALLBACK(p2p_device_detached), NULL);
-
-       g_signal_connect(p2p_proxy, "discovered",
-                       G_CALLBACK(p2p_device_discovered), NULL);
-
-       g_signal_connect(p2p_proxy, "received",
-                       G_CALLBACK(p2p_device_data_received), NULL);
-
-       return NET_NFC_OK;
-}
-
-void net_nfc_client_p2p_deinit(void)
-{
-       if (p2p_proxy)
-       {
-               g_object_unref(p2p_proxy);
-               p2p_proxy = NULL;
-       }
-}
diff --git a/test/src/net_nfc_client_se.c b/test/src/net_nfc_client_se.c
deleted file mode 100755 (executable)
index 176670d..0000000
+++ /dev/null
@@ -1,1914 +0,0 @@
-/*
- * Copyright (c) 2012, 2013 Samsung Electronics Co., Ltd.
- *
- * Licensed under the Flora License, Version 1.1 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://floralicense.org/license/
- *
- * 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.
- */
-
-#include "vconf.h"
-
-#include "net_nfc_typedef_internal.h"
-#include "net_nfc_debug_internal.h"
-#include "net_nfc_util_internal.h"
-#include "net_nfc_util_ndef_message.h"
-#include "net_nfc_util_gdbus_internal.h"
-#include "net_nfc_gdbus.h"
-#include "net_nfc_client.h"
-#include "net_nfc_client_util_internal.h"
-#include "net_nfc_client_manager.h"
-#include "net_nfc_client_se.h"
-
-
-#ifndef NET_NFC_EXPORT_API
-#define NET_NFC_EXPORT_API __attribute__((visibility("default")))
-#endif
-
-typedef struct _SeFuncData SeFuncData;
-
-struct _SeFuncData
-{
-       gpointer se_callback;
-       gpointer se_data;
-};
-
-typedef struct _SeEventHandler SeEventHandler;
-
-struct _SeEventHandler
-{
-       net_nfc_client_se_event se_event_cb;
-       gpointer se_event_data;
-};
-
-typedef struct _SeTransEventHandler SeTransEventHandler;
-
-struct _SeTransEventHandler
-{
-       net_nfc_client_se_transaction_event transaction_event_cb;
-       gpointer transaction_event_data;
-};
-
-typedef struct _SeESEDetectedHandler SeESEDetectedHandler;
-
-struct _SeESEDetectedHandler
-{
-       net_nfc_client_se_ese_detected_event se_ese_detected_cb;
-       gpointer se_ese_detected_data;
-};
-
-
-static NetNfcGDbusSecureElement *se_proxy = NULL;
-static NetNfcGDbusSecureElement *auto_start_proxy = NULL;
-
-static SeEventHandler se_eventhandler;
-static SeTransEventHandler uicc_transactionEventHandler;
-static SeTransEventHandler ese_transactionEventHandler;
-static SeESEDetectedHandler se_esedetecthandler;
-
-static void se_ese_detected(GObject *source_object,
-                       guint arg_handle,
-                       gint arg_se_type,
-                       GVariant *arg_data);
-
-static void se_type_changed(GObject *source_object,
-                               gint arg_se_type);
-
-static void set_secure_element(GObject *source_object,
-                               GAsyncResult *res,
-                               gpointer user_data);
-
-static void open_secure_element(GObject *source_object,
-                               GAsyncResult *res,
-                               gpointer user_data);
-
-static void close_secure_element(GObject *source_object,
-                               GAsyncResult *res,
-                               gpointer user_data);
-
-static void send_apdu_secure_element(GObject *source_object,
-                               GAsyncResult *res,
-                               gpointer user_data);
-
-static void get_atr_secure_element(GObject *source_object,
-                               GAsyncResult *res,
-                               gpointer user_data);
-
-static void se_rf_detected(GObject *source_object,
-                       gint arg_se_type,
-                       GVariant *arg_data);
-
-
-static void se_ese_detected(GObject *source_object,
-                       guint arg_handle,
-                       gint arg_se_type,
-                       GVariant *arg_data)
-{
-       INFO_MSG(">>> SIGNAL arrived");
-
-       if (se_esedetecthandler.se_ese_detected_cb != NULL) {
-               data_s buffer_data = { NULL, 0 };
-               net_nfc_client_se_ese_detected_event callback =
-                       (net_nfc_client_se_ese_detected_event)se_esedetecthandler.se_ese_detected_cb;
-
-               net_nfc_util_gdbus_variant_to_data_s(arg_data, &buffer_data);
-
-               callback((net_nfc_target_handle_h)arg_handle,
-                       arg_se_type, &buffer_data,
-                       se_esedetecthandler.se_ese_detected_data);
-
-               net_nfc_util_clear_data(&buffer_data);
-       }
-}
-
-static void se_rf_detected(GObject *source_object,
-                       gint arg_se_type,
-                       GVariant *arg_data)
-{
-
-       INFO_MSG(">>> SIGNAL arrived");
-
-       if (se_eventhandler.se_event_cb != NULL)
-       {
-               net_nfc_client_se_event callback =
-                       (net_nfc_client_se_event)se_eventhandler.se_event_cb;
-
-               callback((net_nfc_message_e)NET_NFC_MESSAGE_SE_FIELD_ON,
-                       se_eventhandler.se_event_data);
-       }
-}
-
-
-static void se_type_changed(GObject *source_object,
-                       gint arg_se_type)
-{
-       INFO_MSG(">>> SIGNAL arrived");
-
-       if (se_eventhandler.se_event_cb != NULL)
-       {
-               net_nfc_client_se_event callback =
-                       (net_nfc_client_se_event)se_eventhandler.se_event_cb;
-
-               callback((net_nfc_message_e)NET_NFC_MESSAGE_SE_TYPE_CHANGED,
-                       se_eventhandler.se_event_data);
-       }
-}
-
-
-static void se_transaction_event(GObject *source_object,
-       gint arg_se_type,
-       GVariant *arg_aid,
-       GVariant *arg_param,
-       gint fg_dispatch,
-       gint focus_app_pid)
-{
-       void *user_data = NULL;
-       net_nfc_client_se_transaction_event callback = NULL;
-       pid_t mypid = getpid();
-
-       INFO_MSG(">>> SIGNAL arrived");
-
-       if (fg_dispatch == true && focus_app_pid != getpgid(mypid)) {
-               SECURE_MSG("skip transaction event, fg_dispatch [%d], focus_app_pid [%d]", fg_dispatch, focus_app_pid);
-               return;
-       }
-#ifdef CHECK_NFC_ACCESS_FOR_ESE
-       if (net_nfc_gdbus_secure_element_call_check_transaction_permission_sync(
-               NET_NFC_GDBUS_SECURE_ELEMENT(source_object),
-               arg_aid,
-               &result,
-               NULL,
-               &error) == false) {
-               DEBUG_ERR_MSG("net_nfc_gdbus_secure_element_call_check_transaction_permission_sync failed : %s", error->message);
-               g_error_free(error);
-               return;
-       }
-
-       if (result != NET_NFC_OK) {
-               DEBUG_ERR_MSG("not allowed process [%d]", result);
-               return;
-       }
-#endif
-       switch (arg_se_type)
-       {
-       case NET_NFC_SE_TYPE_UICC :
-               if (uicc_transactionEventHandler.transaction_event_cb != NULL)
-               {
-                       callback = uicc_transactionEventHandler.transaction_event_cb;
-                       user_data = uicc_transactionEventHandler.transaction_event_data;
-               }
-               break;
-
-       case NET_NFC_SE_TYPE_ESE :
-               if (ese_transactionEventHandler.transaction_event_cb != NULL)
-               {
-                       callback = ese_transactionEventHandler.transaction_event_cb;
-                       user_data = ese_transactionEventHandler.transaction_event_data;
-               }
-               break;
-
-       default :
-               DEBUG_ERR_MSG("Transaction event SE type wrong [%d]", arg_se_type);
-               break;
-       }
-
-       if (callback != NULL) {
-               data_s aid = { NULL, 0 };
-               data_s param = { NULL, 0 };
-
-               net_nfc_util_gdbus_variant_to_data_s(arg_aid, &aid);
-               net_nfc_util_gdbus_variant_to_data_s(arg_param, &param);
-
-               callback(arg_se_type, &aid, &param, user_data);
-
-               net_nfc_util_clear_data(&param);
-               net_nfc_util_clear_data(&aid);
-       }
-}
-
-static void se_card_emulation_mode_changed(GObject *source_object,
-                       gint arg_se_type)
-{
-       INFO_MSG(">>> SIGNAL arrived");
-
-       if (se_eventhandler.se_event_cb != NULL)
-       {
-               net_nfc_client_se_event callback =
-                       (net_nfc_client_se_event)se_eventhandler.se_event_cb;
-
-               callback((net_nfc_message_e)NET_NFC_MESSAGE_SE_CARD_EMULATION_CHANGED,
-                       se_eventhandler.se_event_data);
-       }
-}
-
-static void set_secure_element(GObject *source_object,
-                               GAsyncResult *res,
-                               gpointer user_data)
-{
-       SeFuncData *func_data = (SeFuncData *)user_data;
-       net_nfc_error_e result;
-       GError *error = NULL;
-
-       g_assert(user_data != NULL);
-
-       if (net_nfc_gdbus_secure_element_call_set_finish(se_proxy,
-               &result,
-               res,
-               &error) == FALSE)
-       {
-
-               DEBUG_ERR_MSG("Could not set secure element: %s",
-                               error->message);
-               result = NET_NFC_IPC_FAIL;
-
-               g_error_free(error);
-       }
-
-       if (func_data->se_callback != NULL)
-       {
-               net_nfc_se_set_se_cb se_callback =
-                       (net_nfc_se_set_se_cb)func_data->se_callback;
-
-               se_callback(result, func_data->se_data);
-       }
-
-       g_free(func_data);
-}
-
-static void open_secure_element(GObject *source_object,
-                               GAsyncResult *res,
-                               gpointer user_data)
-{
-       SeFuncData *func_data = (SeFuncData *)user_data;
-       net_nfc_error_e result;
-       guint out_handle = 0;
-       GError *error = NULL;
-
-       g_assert(user_data != NULL);
-
-       if (net_nfc_gdbus_secure_element_call_open_secure_element_finish(
-               auto_start_proxy,
-               &result,
-               &out_handle,
-               res,
-               &error) == FALSE)
-       {
-
-               DEBUG_ERR_MSG("Could not open secure element: %s",
-                               error->message);
-               result = NET_NFC_IPC_FAIL;
-
-               g_error_free(error);
-       }
-
-       if (func_data->se_callback != NULL)
-       {
-               net_nfc_se_open_se_cb se_callback =
-                       (net_nfc_se_open_se_cb)func_data->se_callback;
-
-               se_callback(result,
-                       (net_nfc_target_handle_h)out_handle,
-                       func_data->se_data);
-       }
-
-       g_free(func_data);
-}
-
-
-static void close_secure_element(GObject *source_object,
-                               GAsyncResult *res,
-                               gpointer user_data)
-{
-       SeFuncData *func_data = (SeFuncData *)user_data;
-       net_nfc_error_e result;
-       GError *error = NULL;
-
-       g_assert(user_data != NULL);
-
-       if (net_nfc_gdbus_secure_element_call_close_secure_element_finish(
-               se_proxy,
-               &result,
-               res,
-               &error) == FALSE)
-       {
-               DEBUG_ERR_MSG("Could not close secure element: %s", error->message);
-               result = NET_NFC_IPC_FAIL;
-
-               g_error_free(error);
-       }
-
-       if (func_data->se_callback != NULL)
-       {
-               net_nfc_se_close_se_cb se_callback =
-                       (net_nfc_se_close_se_cb)func_data->se_callback;
-
-               se_callback(result, func_data->se_data);
-       }
-
-       g_free(func_data);
-}
-
-
-static void send_apdu_secure_element(GObject *source_object,
-                               GAsyncResult *res,
-                               gpointer user_data)
-{
-       SeFuncData *func_data = (SeFuncData *)user_data;
-       net_nfc_error_e result;
-       GVariant *out_response = NULL;
-       GError *error = NULL;
-
-       g_assert(user_data != NULL);
-
-       if (net_nfc_gdbus_secure_element_call_send_apdu_finish(
-               se_proxy,
-               &result,
-               &out_response,
-               res,
-               &error) == FALSE)
-       {
-               DEBUG_ERR_MSG("Could not send apdu: %s", error->message);
-               result = NET_NFC_IPC_FAIL;
-
-               g_error_free(error);
-       }
-
-       if (func_data->se_callback != NULL)
-       {
-               net_nfc_se_send_apdu_cb se_callback =
-                       (net_nfc_se_send_apdu_cb)func_data->se_callback;
-               data_s data = { NULL, };
-
-               net_nfc_util_gdbus_variant_to_data_s(out_response, &data);
-
-               se_callback(result, &data, func_data->se_data);
-
-               net_nfc_util_clear_data(&data);
-       }
-
-       g_free(func_data);
-}
-
-
-static void get_atr_secure_element(GObject *source_object,
-                               GAsyncResult *res,
-                               gpointer user_data)
-{
-       SeFuncData *func_data = (SeFuncData *)user_data;
-       net_nfc_error_e result;
-       GVariant *out_atr = NULL;
-       GError *error = NULL;
-
-       g_assert(user_data != NULL);
-
-       if (net_nfc_gdbus_secure_element_call_get_atr_finish(
-               se_proxy,
-               &result,
-               &out_atr,
-               res,
-               &error) == FALSE)
-       {
-               DEBUG_ERR_MSG("Could not get atr: %s", error->message);
-               result = NET_NFC_IPC_FAIL;
-
-               g_error_free(error);
-       }
-
-       if (func_data->se_callback != NULL)
-       {
-               net_nfc_se_get_atr_cb se_callback =
-                       (net_nfc_se_get_atr_cb)func_data->se_callback;
-               data_s data = { NULL, };
-
-               net_nfc_util_gdbus_variant_to_data_s(out_atr, &data);
-
-               se_callback(result, &data, func_data->se_data);
-
-               net_nfc_util_clear_data(&data);
-       }
-
-       g_free(func_data);
-}
-
-
-NET_NFC_EXPORT_API
-net_nfc_error_e net_nfc_client_se_set_secure_element_type(
-                               net_nfc_se_type_e se_type,
-                               net_nfc_se_set_se_cb callback,
-                               void *user_data)
-{
-       SeFuncData *func_data;
-
-       if (se_proxy == NULL)
-       {
-               if (net_nfc_client_se_init() != NET_NFC_OK)
-               {
-                       DEBUG_ERR_MSG("se_proxy fail");
-                       /* FIXME : return result of this error */
-                       return NET_NFC_NOT_INITIALIZED;
-               }
-       }
-
-       /* prevent executing daemon when nfc is off */
-       if (net_nfc_client_manager_is_activated() == false) {
-               return NET_NFC_NOT_ACTIVATED;
-       }
-
-       func_data = g_try_new0(SeFuncData, 1);
-       if (func_data == NULL)
-               return NET_NFC_ALLOC_FAIL;
-
-       func_data->se_callback = (gpointer)callback;
-       func_data->se_data = user_data;
-
-       net_nfc_gdbus_secure_element_call_set(
-                               se_proxy,
-                               (gint)se_type,
-                               NULL,
-                               set_secure_element,
-                               func_data);
-
-       return NET_NFC_OK;
-}
-
-
-NET_NFC_EXPORT_API
-net_nfc_error_e net_nfc_client_se_set_secure_element_type_sync(
-                               net_nfc_se_type_e se_type)
-{
-       net_nfc_error_e result = NET_NFC_OK;
-       GError *error = NULL;
-
-       if (se_proxy == NULL)
-       {
-               if (net_nfc_client_se_init() != NET_NFC_OK)
-               {
-                       DEBUG_ERR_MSG("se_proxy fail");
-                       return NET_NFC_NOT_INITIALIZED;
-               }
-       }
-
-       /* prevent executing daemon when nfc is off */
-       if (net_nfc_client_manager_is_activated() == false) {
-               return NET_NFC_NOT_ACTIVATED;
-       }
-
-       if (net_nfc_gdbus_secure_element_call_set_sync(
-                       se_proxy,
-                       (gint)se_type,
-                       &result,
-                       NULL,
-                       &error) == FALSE)
-       {
-               DEBUG_ERR_MSG("Set secure element failed: %s", error->message);
-               result = NET_NFC_IPC_FAIL;
-
-               g_error_free(error);
-       }
-
-       return result;
-}
-
-NET_NFC_EXPORT_API
-net_nfc_error_e net_nfc_client_se_get_secure_element_type_sync(
-       net_nfc_se_type_e *se_type)
-{
-       net_nfc_error_e result = NET_NFC_OK;
-       gint type;
-#if 1
-       GError *error = NULL;
-#endif
-       if (se_proxy == NULL)
-       {
-               if (net_nfc_client_se_init() != NET_NFC_OK)
-               {
-                       DEBUG_ERR_MSG("se_proxy fail");
-                       return NET_NFC_NOT_INITIALIZED;
-               }
-       }
-
-       /* prevent executing daemon when nfc is off */
-       if (net_nfc_client_manager_is_activated() == false) {
-               return NET_NFC_NOT_ACTIVATED;
-       }
-#if 0
-       if (vconf_get_int(VCONFKEY_NFC_SE_TYPE, &type) == 0) {
-               *se_type = type;
-       } else {
-               result = NET_NFC_OPERATION_FAIL;
-       }
-#else
-       if (net_nfc_gdbus_secure_element_call_get_sync(
-                       se_proxy,
-                       &result,
-                       &type,
-                       NULL,
-                       &error) == true) {
-
-               SECURE_MSG("type [%d]", type);
-               *se_type = type;
-       } else {
-               DEBUG_ERR_MSG("get secure element failed: %s", error->message);
-
-               g_error_free(error);
-
-               result = NET_NFC_IPC_FAIL;
-       }
-#endif
-       return result;
-}
-
-NET_NFC_EXPORT_API
-net_nfc_error_e net_nfc_set_card_emulation_mode_sync(
-       net_nfc_card_emulation_mode_t mode)
-{
-       net_nfc_error_e result = NET_NFC_OK;
-       GError *error = NULL;
-
-       if (se_proxy == NULL)
-       {
-               if (net_nfc_client_se_init() != NET_NFC_OK)
-               {
-                       DEBUG_ERR_MSG("se_proxy fail");
-                       return NET_NFC_NOT_INITIALIZED;
-               }
-       }
-
-       /* prevent executing daemon when nfc is off */
-       if (net_nfc_client_manager_is_activated() == false) {
-               return NET_NFC_NOT_ACTIVATED;
-       }
-
-       if (net_nfc_gdbus_secure_element_call_set_card_emulation_sync(
-                       se_proxy,
-                       (gint)mode,
-                       &result,
-                       NULL,
-                       &error) == FALSE)
-       {
-               DEBUG_ERR_MSG("Set card emulation failed: %s", error->message);
-               result = NET_NFC_IPC_FAIL;
-
-               g_error_free(error);
-       }
-
-       return result;
-}
-
-NET_NFC_EXPORT_API
-net_nfc_error_e net_nfc_get_card_emulation_mode_sync(
-       net_nfc_card_emulation_mode_t *se_type)
-{
-       net_nfc_error_e result = NET_NFC_OK;
-       gint type;
-       GError *error = NULL;
-
-       if (se_proxy == NULL)
-       {
-               if (net_nfc_client_se_init() != NET_NFC_OK)
-               {
-                       DEBUG_ERR_MSG("se_proxy fail");
-                       return NET_NFC_NOT_INITIALIZED;
-               }
-       }
-
-       /* prevent executing daemon when nfc is off */
-       if (net_nfc_client_manager_is_activated() == false) {
-               return NET_NFC_NOT_ACTIVATED;
-       }
-
-       if (net_nfc_gdbus_secure_element_call_get_card_emulation_sync(
-                       se_proxy,
-                       &result,
-                       &type,
-                       NULL,
-                       &error) == true) {
-               *se_type = type;
-       } else {
-               DEBUG_ERR_MSG("get secure element failed: %s", error->message);
-
-               g_error_free(error);
-
-               result = NET_NFC_IPC_FAIL;
-       }
-
-       return result;
-}
-
-NET_NFC_EXPORT_API
-net_nfc_error_e net_nfc_client_se_open_internal_secure_element(
-                                       net_nfc_se_type_e se_type,
-                                       net_nfc_se_open_se_cb callback,
-                                       void *user_data)
-{
-       SeFuncData *func_data;
-
-       if (auto_start_proxy == NULL)
-       {
-               GError *error = NULL;
-
-               auto_start_proxy = net_nfc_gdbus_secure_element_proxy_new_for_bus_sync(
-                       G_BUS_TYPE_SYSTEM,
-                       G_DBUS_PROXY_FLAGS_NONE,
-                       "org.tizen.NetNfcService",
-                       "/org/tizen/NetNfcService/SecureElement",
-                       NULL,
-                       &error);
-               if (auto_start_proxy == NULL)
-               {
-                       DEBUG_ERR_MSG("Can not create proxy : %s", error->message);
-                       g_error_free(error);
-
-                       return NET_NFC_UNKNOWN_ERROR;
-               }
-       }
-
-       /* allow this function even nfc is off */
-
-       func_data = g_try_new0(SeFuncData, 1);
-       if (func_data == NULL)
-               return NET_NFC_ALLOC_FAIL;
-
-       func_data->se_callback = (gpointer)callback;
-       func_data->se_data = user_data;
-
-       net_nfc_gdbus_secure_element_call_open_secure_element(
-                                       auto_start_proxy,
-                                       (gint)se_type,
-                                       NULL,
-                                       open_secure_element,
-                                       func_data);
-
-       return NET_NFC_OK;
-}
-
-
-NET_NFC_EXPORT_API
-net_nfc_error_e net_nfc_client_se_open_internal_secure_element_sync(
-                                       net_nfc_se_type_e se_type,
-                                       net_nfc_target_handle_h *handle)
-{
-       net_nfc_error_e result = NET_NFC_OK;
-       guint out_handle = 0;
-       GError *error =  NULL;
-
-       if (handle == NULL) {
-               return NET_NFC_NULL_PARAMETER;
-       }
-
-       if (auto_start_proxy == NULL)
-       {
-               GError *error = NULL;
-
-               auto_start_proxy = net_nfc_gdbus_secure_element_proxy_new_for_bus_sync(
-                       G_BUS_TYPE_SYSTEM,
-                       G_DBUS_PROXY_FLAGS_NONE,
-                       "org.tizen.NetNfcService",
-                       "/org/tizen/NetNfcService/SecureElement",
-                       NULL,
-                       &error);
-               if (auto_start_proxy == NULL)
-               {
-                       DEBUG_ERR_MSG("Can not create proxy : %s", error->message);
-                       g_error_free(error);
-
-                       return NET_NFC_UNKNOWN_ERROR;
-               }
-       }
-
-       /* allow this function even nfc is off */
-
-       if (net_nfc_gdbus_secure_element_call_open_secure_element_sync(
-                                       auto_start_proxy,
-                                       se_type,
-                                       &result,
-                                       &out_handle,
-                                       NULL,
-                                       &error) == true) {
-               *handle = GUINT_TO_POINTER(out_handle);
-       } else {
-               DEBUG_ERR_MSG("Open internal secure element failed: %s",
-                                       error->message);
-               result = NET_NFC_IPC_FAIL;
-
-               g_error_free(error);
-       }
-
-       return result;
-}
-
-
-NET_NFC_EXPORT_API
-net_nfc_error_e net_nfc_client_se_close_internal_secure_element(
-                               net_nfc_target_handle_h handle,
-                               net_nfc_se_close_se_cb callback,
-                               void *user_data)
-{
-       SeFuncData *func_data;
-
-       if (auto_start_proxy == NULL)
-       {
-               GError *error = NULL;
-
-               auto_start_proxy = net_nfc_gdbus_secure_element_proxy_new_for_bus_sync(
-                       G_BUS_TYPE_SYSTEM,
-                       G_DBUS_PROXY_FLAGS_NONE,
-                       "org.tizen.NetNfcService",
-                       "/org/tizen/NetNfcService/SecureElement",
-                       NULL,
-                       &error);
-               if (auto_start_proxy == NULL)
-               {
-                       DEBUG_ERR_MSG("Can not create proxy : %s", error->message);
-                       g_error_free(error);
-
-                       return NET_NFC_UNKNOWN_ERROR;
-               }
-       }
-
-       /* allow this function even nfc is off */
-
-       func_data = g_try_new0(SeFuncData, 1);
-       if (func_data == NULL)
-               return NET_NFC_ALLOC_FAIL;
-
-       func_data->se_callback = (gpointer)callback;
-       func_data->se_data = user_data;
-
-       net_nfc_gdbus_secure_element_call_close_secure_element(
-               auto_start_proxy,
-               GPOINTER_TO_UINT(handle),
-               NULL,
-               close_secure_element,
-               func_data);
-
-       return NET_NFC_OK;
-}
-
-
-NET_NFC_EXPORT_API
-net_nfc_error_e net_nfc_client_se_close_internal_secure_element_sync(
-                                       net_nfc_target_handle_h handle)
-{
-       net_nfc_error_e result = NET_NFC_OK;
-       GError *error = NULL;
-
-       if (auto_start_proxy == NULL)
-       {
-               GError *error = NULL;
-
-               auto_start_proxy = net_nfc_gdbus_secure_element_proxy_new_for_bus_sync(
-                       G_BUS_TYPE_SYSTEM,
-                       G_DBUS_PROXY_FLAGS_NONE,
-                       "org.tizen.NetNfcService",
-                       "/org/tizen/NetNfcService/SecureElement",
-                       NULL,
-                       &error);
-               if (auto_start_proxy == NULL)
-               {
-                       DEBUG_ERR_MSG("Can not create proxy : %s", error->message);
-                       g_error_free(error);
-
-                       return NET_NFC_UNKNOWN_ERROR;
-               }
-       }
-
-       /* allow this function even nfc is off */
-
-       if (net_nfc_gdbus_secure_element_call_close_secure_element_sync(
-               auto_start_proxy,
-               GPOINTER_TO_UINT(handle),
-               &result,
-               NULL,
-               &error) == FALSE)
-       {
-               DEBUG_ERR_MSG("close internal secure element failed: %s",
-                                       error->message);
-               result = NET_NFC_IPC_FAIL;
-
-               g_error_free(error);
-       }
-
-       return result;
-}
-
-
-NET_NFC_EXPORT_API
-net_nfc_error_e net_nfc_client_se_get_atr(
-                               net_nfc_target_handle_h handle,
-                               net_nfc_se_get_atr_cb callback,
-                               void *user_data)
-{
-       SeFuncData *func_data;
-
-       if (auto_start_proxy == NULL)
-       {
-               GError *error = NULL;
-
-               auto_start_proxy = net_nfc_gdbus_secure_element_proxy_new_for_bus_sync(
-                       G_BUS_TYPE_SYSTEM,
-                       G_DBUS_PROXY_FLAGS_NONE,
-                       "org.tizen.NetNfcService",
-                       "/org/tizen/NetNfcService/SecureElement",
-                       NULL,
-                       &error);
-               if (auto_start_proxy == NULL)
-               {
-                       DEBUG_ERR_MSG("Can not create proxy : %s", error->message);
-                       g_error_free(error);
-
-                       return NET_NFC_UNKNOWN_ERROR;
-               }
-       }
-
-       /* allow this function even nfc is off */
-
-       func_data = g_try_new0(SeFuncData, 1);
-       if (func_data == NULL)
-               return NET_NFC_ALLOC_FAIL;
-
-       func_data->se_callback = (gpointer)callback;
-       func_data->se_data = user_data;
-
-       net_nfc_gdbus_secure_element_call_get_atr(
-               auto_start_proxy,
-               GPOINTER_TO_UINT(handle),
-               NULL,
-               get_atr_secure_element,
-               func_data);
-
-       return NET_NFC_OK;
-}
-
-
-NET_NFC_EXPORT_API
-net_nfc_error_e net_nfc_client_se_get_atr_sync(
-                               net_nfc_target_handle_h handle,
-                               data_h *atr)
-{
-       net_nfc_error_e result = NET_NFC_OK;
-       GVariant *out_atr = NULL;
-       GError *error = NULL;
-
-       if (atr == NULL) {
-               return NET_NFC_NULL_PARAMETER;
-       }
-
-       *atr = NULL;
-
-       if (auto_start_proxy == NULL)
-       {
-               GError *error = NULL;
-
-               auto_start_proxy = net_nfc_gdbus_secure_element_proxy_new_for_bus_sync(
-                       G_BUS_TYPE_SYSTEM,
-                       G_DBUS_PROXY_FLAGS_NONE,
-                       "org.tizen.NetNfcService",
-                       "/org/tizen/NetNfcService/SecureElement",
-                       NULL,
-                       &error);
-               if (auto_start_proxy == NULL)
-               {
-                       DEBUG_ERR_MSG("Can not create proxy : %s", error->message);
-                       g_error_free(error);
-
-                       return NET_NFC_UNKNOWN_ERROR;
-               }
-       }
-
-       /* allow this function even nfc is off */
-
-       if (net_nfc_gdbus_secure_element_call_get_atr_sync(
-               auto_start_proxy,
-               GPOINTER_TO_UINT(handle),
-               &result,
-               &out_atr,
-               NULL,
-               &error) == true) {
-               *atr = net_nfc_util_gdbus_variant_to_data(out_atr);
-       } else {
-               DEBUG_ERR_MSG("Get attributes failed: %s", error->message);
-               result = NET_NFC_IPC_FAIL;
-
-               g_error_free(error);
-       }
-
-       return result;
-}
-
-
-NET_NFC_EXPORT_API
-net_nfc_error_e net_nfc_client_se_send_apdu(
-                               net_nfc_target_handle_h handle,
-                               data_h apdu_data,
-                               net_nfc_se_send_apdu_cb callback,
-                               void *user_data)
-{
-       SeFuncData *func_data;
-       GVariant *arg_data;
-
-       if (auto_start_proxy == NULL)
-       {
-               GError *error = NULL;
-
-               auto_start_proxy = net_nfc_gdbus_secure_element_proxy_new_for_bus_sync(
-                       G_BUS_TYPE_SYSTEM,
-                       G_DBUS_PROXY_FLAGS_NONE,
-                       "org.tizen.NetNfcService",
-                       "/org/tizen/NetNfcService/SecureElement",
-                       NULL,
-                       &error);
-               if (auto_start_proxy == NULL)
-               {
-                       DEBUG_ERR_MSG("Can not create proxy : %s", error->message);
-                       g_error_free(error);
-
-                       return NET_NFC_UNKNOWN_ERROR;
-               }
-       }
-
-       /* allow this function even nfc is off */
-
-       arg_data = net_nfc_util_gdbus_data_to_variant((data_s *)apdu_data);
-       if (arg_data == NULL)
-               return NET_NFC_INVALID_PARAM;
-
-       func_data = g_try_new0(SeFuncData, 1);
-       if (func_data == NULL) {
-               g_variant_unref(arg_data);
-
-               return NET_NFC_ALLOC_FAIL;
-       }
-
-       func_data->se_callback = (gpointer)callback;
-       func_data->se_data = user_data;
-
-       net_nfc_gdbus_secure_element_call_send_apdu(
-               auto_start_proxy,
-               GPOINTER_TO_UINT(handle),
-               arg_data,
-               NULL,
-               send_apdu_secure_element,
-               func_data);
-
-       return NET_NFC_OK;
-}
-
-
-NET_NFC_EXPORT_API
-net_nfc_error_e net_nfc_client_se_send_apdu_sync(
-                               net_nfc_target_handle_h handle,
-                               data_h apdu_data,
-                               data_h *response)
-{
-       net_nfc_error_e result = NET_NFC_OK;
-       GVariant *out_data = NULL;
-       GError *error = NULL;
-       GVariant *arg_data;
-
-       if (response == NULL) {
-               return NET_NFC_NULL_PARAMETER;
-       }
-
-       *response = NULL;
-
-       if (auto_start_proxy == NULL)
-       {
-               GError *error = NULL;
-
-               auto_start_proxy = net_nfc_gdbus_secure_element_proxy_new_for_bus_sync(
-                       G_BUS_TYPE_SYSTEM,
-                       G_DBUS_PROXY_FLAGS_NONE,
-                       "org.tizen.NetNfcService",
-                       "/org/tizen/NetNfcService/SecureElement",
-                       NULL,
-                       &error);
-               if (auto_start_proxy == NULL)
-               {
-                       DEBUG_ERR_MSG("Can not create proxy : %s", error->message);
-                       g_error_free(error);
-
-                       return NET_NFC_UNKNOWN_ERROR;
-               }
-       }
-
-       /* allow this function even nfc is off */
-
-       arg_data = net_nfc_util_gdbus_data_to_variant((data_s *)apdu_data);
-       if (arg_data == NULL)
-               return NET_NFC_INVALID_PARAM;
-
-       if (net_nfc_gdbus_secure_element_call_send_apdu_sync(
-               auto_start_proxy,
-               GPOINTER_TO_UINT(handle),
-               arg_data,
-               &result,
-               &out_data,
-               NULL,
-               &error) == true) {
-               *response = net_nfc_util_gdbus_variant_to_data(out_data);
-       } else {
-               DEBUG_ERR_MSG("Send APDU failed: %s", error->message);
-               result = NET_NFC_IPC_FAIL;
-
-               g_error_free(error);
-       }
-
-       return result;
-}
-
-
-NET_NFC_EXPORT_API
-void net_nfc_client_se_set_ese_detection_cb(
-                       net_nfc_client_se_ese_detected_event callback,
-                       void *user_data)
-{
-       if (se_proxy == NULL)
-       {
-               if (net_nfc_client_se_init() != NET_NFC_OK)
-               {
-                       DEBUG_ERR_MSG("se_proxy fail");
-                       /* FIXME : return result of this error */
-                       return;
-               }
-       }
-
-       se_esedetecthandler.se_ese_detected_cb = callback;
-       se_esedetecthandler.se_ese_detected_data = user_data;
-}
-
-
-NET_NFC_EXPORT_API
-void net_nfc_client_se_unset_ese_detection_cb(void)
-{
-       se_esedetecthandler.se_ese_detected_cb = NULL;
-       se_esedetecthandler.se_ese_detected_data = NULL;
-}
-
-
-NET_NFC_EXPORT_API
-void net_nfc_client_se_set_transaction_event_cb(
-                       net_nfc_se_type_e se_type,
-                       net_nfc_client_se_transaction_event callback,
-                       void *user_data)
-{
-       if (se_proxy == NULL)
-       {
-               if (net_nfc_client_se_init() != NET_NFC_OK)
-               {
-                       DEBUG_ERR_MSG("se_proxy fail");
-                       /* FIXME : return result of this error */
-                       return;
-               }
-       }
-
-       if (se_type == NET_NFC_SE_TYPE_ESE)
-       {
-               ese_transactionEventHandler.transaction_event_cb = callback;
-               ese_transactionEventHandler.transaction_event_data = user_data;
-       }
-       else if (se_type == NET_NFC_SE_TYPE_UICC)
-       {
-               uicc_transactionEventHandler.transaction_event_cb = callback;
-               uicc_transactionEventHandler.transaction_event_data = user_data;
-       }
-}
-
-
-NET_NFC_EXPORT_API
-void net_nfc_client_se_unset_transaction_event_cb(net_nfc_se_type_e type)
-{
-       if (type == NET_NFC_SE_TYPE_ESE)
-       {
-               ese_transactionEventHandler.transaction_event_cb = NULL;
-               ese_transactionEventHandler.transaction_event_data = NULL;
-       }
-       else if (type == NET_NFC_SE_TYPE_UICC)
-       {
-               uicc_transactionEventHandler.transaction_event_cb = NULL;
-               uicc_transactionEventHandler.transaction_event_data = NULL;
-       }
-}
-
-NET_NFC_EXPORT_API
-void net_nfc_client_se_set_event_cb(net_nfc_client_se_event callback,
-                                       void *user_data)
-{
-       if (se_proxy == NULL)
-       {
-               if (net_nfc_client_se_init() != NET_NFC_OK)
-               {
-                       DEBUG_ERR_MSG("se_proxy fail");
-                       /* FIXME : return result of this error */
-                       return;
-               }
-       }
-
-       se_eventhandler.se_event_cb = callback;
-       se_eventhandler.se_event_data = user_data;
-}
-
-
-NET_NFC_EXPORT_API
-void net_nfc_client_se_unset_event_cb(void)
-{
-       se_eventhandler.se_event_cb = NULL;
-       se_eventhandler.se_event_data = NULL;
-}
-
-NET_NFC_EXPORT_API
-net_nfc_error_e net_nfc_client_se_set_transaction_fg_dispatch(int mode)
-{
-       net_nfc_error_e result = NET_NFC_OK;
-       GError *error = NULL;
-
-       if (auto_start_proxy == NULL)
-       {
-               GError *error = NULL;
-
-               auto_start_proxy = net_nfc_gdbus_secure_element_proxy_new_for_bus_sync(
-                       G_BUS_TYPE_SYSTEM,
-                       G_DBUS_PROXY_FLAGS_NONE,
-                       "org.tizen.NetNfcService",
-                       "/org/tizen/NetNfcService/SecureElement",
-                       NULL,
-                       &error);
-               if (auto_start_proxy == NULL)
-               {
-                       DEBUG_ERR_MSG("Can not create proxy : %s", error->message);
-                       g_error_free(error);
-
-                       return NET_NFC_UNKNOWN_ERROR;
-               }
-       }
-
-       if (net_nfc_gdbus_secure_element_call_set_transaction_fg_dispatch_sync(
-               auto_start_proxy,
-               mode,
-               &result,
-               NULL,
-               &error) != true) {
-
-               DEBUG_ERR_MSG("set transaction fg dispatch failed: %s", error->message);
-               result = NET_NFC_IPC_FAIL;
-
-               g_error_free(error);
-       }
-
-       return result;
-}
-
-NET_NFC_EXPORT_API
-net_nfc_error_e net_nfc_client_se_set_default_route_sync(
-       net_nfc_se_type_e switch_on,
-       net_nfc_se_type_e switch_off,
-       net_nfc_se_type_e battery_off)
-{
-       net_nfc_error_e result = NET_NFC_OK;
-       GError *error = NULL;
-
-       if (se_proxy == NULL)
-       {
-               result = net_nfc_client_se_init();
-               if (result != NET_NFC_OK)
-               {
-                       DEBUG_ERR_MSG("net_nfc_client_se_init failed, [%d]", result);
-
-                       return NET_NFC_NOT_INITIALIZED;
-               }
-       }
-
-       if (net_nfc_gdbus_secure_element_call_set_default_route_sync(
-               se_proxy,
-               switch_on,
-               switch_off,
-               battery_off,
-               &result,
-               NULL,
-               &error) == FALSE)
-       {
-               DEBUG_ERR_MSG("Set Route Aid failed: %s", error->message);
-               result = NET_NFC_IPC_FAIL;
-
-               g_error_free(error);
-       }
-
-       DEBUG_CLIENT_MSG("net_nfc_gdbus_secure_element_call_set_default_route_sync end");
-
-       return result;
-}
-
-NET_NFC_EXPORT_API
-net_nfc_error_e net_nfc_client_se_is_activated_aid_handler_sync(
-       net_nfc_se_type_e se_type, const char *aid, bool *activated)
-{
-       net_nfc_error_e result = NET_NFC_OK;
-       GError *error = NULL;
-       gboolean ret = false;
-
-       if (activated == NULL) {
-               return NET_NFC_NULL_PARAMETER;
-       }
-
-       if (se_proxy == NULL) {
-               result = net_nfc_client_se_init();
-               if (result != NET_NFC_OK) {
-                       DEBUG_ERR_MSG("net_nfc_client_se_init failed, [%d]", result);
-
-                       return NET_NFC_NOT_INITIALIZED;
-               }
-       }
-
-       if (net_nfc_gdbus_secure_element_call_is_activated_aid_handler_sync(
-                       se_proxy,
-                       se_type,
-                       aid,
-                       &result,
-                       &ret,
-                       NULL,
-                       &error) == true) {
-               *activated = ret;
-       } else {
-               DEBUG_ERR_MSG("net_nfc_gdbus_secure_element_call_is_activated_aid_handler_sync failed : %s", error->message);
-               result = NET_NFC_IPC_FAIL;
-
-               g_error_free(error);
-       }
-
-       return result;
-}
-
-NET_NFC_EXPORT_API
-net_nfc_error_e net_nfc_client_se_is_activated_category_handler_sync(
-       net_nfc_se_type_e se_type,
-       net_nfc_card_emulation_category_t category, bool *activated)
-{
-       net_nfc_error_e result = NET_NFC_OK;
-       GError *error = NULL;
-       gboolean ret = false;
-
-       if (activated == NULL) {
-               return NET_NFC_NULL_PARAMETER;
-       }
-
-       if (se_proxy == NULL) {
-               result = net_nfc_client_se_init();
-               if (result != NET_NFC_OK) {
-                       DEBUG_ERR_MSG("net_nfc_client_se_init failed, [%d]", result);
-
-                       return NET_NFC_NOT_INITIALIZED;
-               }
-       }
-
-       if (net_nfc_gdbus_secure_element_call_is_activated_category_handler_sync(
-                       se_proxy,
-                       se_type,
-                       category,
-                       &result,
-                       &ret,
-                       NULL,
-                       &error) == true) {
-               *activated = ret;
-       } else {
-               DEBUG_ERR_MSG("net_nfc_gdbus_secure_element_call_is_activated_category_handler_sync failed : %s", error->message);
-               result = NET_NFC_IPC_FAIL;
-
-               g_error_free(error);
-       }
-
-       return result;
-}
-
-NET_NFC_EXPORT_API
-net_nfc_error_e net_nfc_client_se_get_registered_aids_count_sync(
-       net_nfc_se_type_e se_type,
-       net_nfc_card_emulation_category_t category,
-       size_t *count)
-{
-       net_nfc_error_e result = NET_NFC_OK;
-       GError *error = NULL;
-       GVariant *aids = NULL;
-
-       if (count == NULL) {
-               return NET_NFC_NULL_PARAMETER;
-       }
-
-       if (se_proxy == NULL) {
-               result = net_nfc_client_se_init();
-               if (result != NET_NFC_OK) {
-                       DEBUG_ERR_MSG("net_nfc_client_se_init failed, [%d]", result);
-
-                       return NET_NFC_NOT_INITIALIZED;
-               }
-       }
-
-       if (net_nfc_gdbus_secure_element_call_get_registered_aids_sync(
-                       se_proxy,
-                       se_type,
-                       category,
-                       &result,
-                       &aids,
-                       NULL,
-                       &error) == FALSE)
-       {
-               DEBUG_ERR_MSG("net_nfc_gdbus_secure_element_call_get_registered_aids_sync failed : %s", error->message);
-               result = NET_NFC_IPC_FAIL;
-
-               g_error_free(error);
-       }
-
-       if (result == NET_NFC_OK) {
-               GVariantIter iter;
-
-               g_variant_iter_init(&iter, aids);
-
-               *count = g_variant_iter_n_children(&iter);
-
-               g_variant_unref(aids);
-       }
-
-       return result;
-}
-
-NET_NFC_EXPORT_API
-net_nfc_error_e net_nfc_client_se_foreach_registered_aids_sync(
-       net_nfc_se_type_e se_type,
-       net_nfc_card_emulation_category_t category,
-       net_nfc_client_se_registered_aid_cb callback,
-       void *user_data)
-{
-       net_nfc_error_e result = NET_NFC_OK;
-       GError *error = NULL;
-       GVariant *aids = NULL;
-
-       if (callback == NULL) {
-               return NET_NFC_NULL_PARAMETER;
-       }
-
-       if (se_proxy == NULL) {
-               result = net_nfc_client_se_init();
-               if (result != NET_NFC_OK) {
-                       DEBUG_ERR_MSG("net_nfc_client_se_init failed, [%d]", result);
-
-                       return NET_NFC_NOT_INITIALIZED;
-               }
-       }
-
-       if (net_nfc_gdbus_secure_element_call_get_registered_aids_sync(
-                       se_proxy,
-                       se_type,
-                       category,
-                       &result,
-                       &aids,
-                       NULL,
-                       &error) == FALSE)
-       {
-               DEBUG_ERR_MSG("net_nfc_gdbus_secure_element_call_get_registered_aids_sync failed : %s", error->message);
-               result = NET_NFC_IPC_FAIL;
-
-               g_error_free(error);
-       }
-
-       if (result == NET_NFC_OK) {
-               GVariantIter iter;
-               const gchar *aid;
-               gboolean manifest;
-
-               g_variant_iter_init(&iter, aids);
-
-               while (g_variant_iter_loop(&iter, "(sb)", &aid, &manifest) == true) {
-                       callback(se_type, aid, (bool)manifest, user_data);
-               }
-       }
-
-       return result;
-}
-
-
-NET_NFC_EXPORT_API
-net_nfc_error_e net_nfc_client_se_register_aids_sync(net_nfc_se_type_e se_type,
-       net_nfc_card_emulation_category_t category, const char *aid, ...)
-{
-       net_nfc_error_e result = NET_NFC_OK;
-       GError *error = NULL;
-
-       if (se_proxy == NULL) {
-               result = net_nfc_client_se_init();
-               if (result != NET_NFC_OK) {
-                       DEBUG_ERR_MSG("net_nfc_client_se_init failed, [%d]", result);
-
-                       return NET_NFC_NOT_INITIALIZED;
-               }
-       }
-
-       if (net_nfc_gdbus_secure_element_call_register_aid_sync(
-                       se_proxy,
-                       se_type,
-                       category,
-                       aid,
-                       &result,
-                       NULL,
-                       &error) == FALSE)
-       {
-               DEBUG_ERR_MSG("net_nfc_gdbus_secure_element_call_register_aid_sync failed : %s", error->message);
-               result = NET_NFC_IPC_FAIL;
-
-               g_error_free(error);
-       }
-
-       return result;
-}
-
-NET_NFC_EXPORT_API
-net_nfc_error_e net_nfc_client_se_unregister_aid_sync(net_nfc_se_type_e se_type,
-       net_nfc_card_emulation_category_t category, const char *aid)
-{
-       net_nfc_error_e result = NET_NFC_OK;
-       GError *error = NULL;
-
-       if (se_proxy == NULL) {
-               result = net_nfc_client_se_init();
-               if (result != NET_NFC_OK) {
-                       DEBUG_ERR_MSG("net_nfc_client_se_init failed, [%d]", result);
-
-                       return NET_NFC_NOT_INITIALIZED;
-               }
-       }
-
-       if (net_nfc_gdbus_secure_element_call_unregister_aid_sync(
-                       se_proxy,
-                       se_type,
-                       category,
-                       aid,
-                       &result,
-                       NULL,
-                       &error) == FALSE)
-       {
-               DEBUG_ERR_MSG("net_nfc_gdbus_secure_element_call_unregister_aid_sync failed : %s", error->message);
-               result = NET_NFC_IPC_FAIL;
-
-               g_error_free(error);
-       }
-
-       return result;
-}
-
-NET_NFC_EXPORT_API
-net_nfc_error_e net_nfc_client_se_unregister_aids_sync(net_nfc_se_type_e se_type, net_nfc_card_emulation_category_t category)
-{
-       net_nfc_error_e result = NET_NFC_OK;
-       GError *error = NULL;
-
-       if (se_proxy == NULL) {
-               result = net_nfc_client_se_init();
-               if (result != NET_NFC_OK) {
-                       DEBUG_ERR_MSG("net_nfc_client_se_init failed, [%d]", result);
-
-                       return NET_NFC_NOT_INITIALIZED;
-               }
-       }
-
-       if (net_nfc_gdbus_secure_element_call_unregister_aids_sync(
-                       se_proxy,
-                       se_type,
-                       category,
-                       &result,
-                       NULL,
-                       &error) == FALSE)
-       {
-               DEBUG_ERR_MSG("net_nfc_gdbus_secure_element_call_unregister_aids_sync failed : %s", error->message);
-               result = NET_NFC_IPC_FAIL;
-
-               g_error_free(error);
-       }
-
-       return result;
-}
-
-NET_NFC_EXPORT_API
-net_nfc_error_e net_nfc_client_se_foreach_registered_handlers_sync(
-       net_nfc_card_emulation_category_t category,
-       net_nfc_client_se_registered_handler_cb callback,
-       void *user_data)
-{
-       net_nfc_error_e result = NET_NFC_OK;
-       GError *error = NULL;
-       GVariant *handlers = NULL;
-
-       if (callback == NULL) {
-               return NET_NFC_NULL_PARAMETER;
-       }
-
-       if (se_proxy == NULL) {
-               result = net_nfc_client_se_init();
-               if (result != NET_NFC_OK) {
-                       DEBUG_ERR_MSG("net_nfc_client_se_init failed, [%d]", result);
-
-                       return NET_NFC_NOT_INITIALIZED;
-               }
-       }
-
-       if (net_nfc_gdbus_secure_element_call_get_registered_handlers_sync(
-                       se_proxy,
-                       category,
-                       &result,
-                       &handlers,
-                       NULL,
-                       &error) == FALSE)
-       {
-               DEBUG_ERR_MSG("net_nfc_gdbus_secure_element_call_get_registered_handlers_sync failed : %s", error->message);
-               result = NET_NFC_IPC_FAIL;
-
-               g_error_free(error);
-       }
-
-       if (result == NET_NFC_OK) {
-               GVariantIter iter;
-               const gchar *handler;
-               int count;
-
-               g_variant_iter_init(&iter, handlers);
-
-               while (g_variant_iter_loop(&iter, "(is)", &count, &handler) == true) {
-                       callback(handler, count, user_data);
-               }
-       }
-
-       return result;
-}
-
-NET_NFC_EXPORT_API
-net_nfc_error_e net_nfc_client_se_add_route_aid_sync(
-       const char *package, net_nfc_se_type_e se_type,
-       net_nfc_card_emulation_category_t category, const char *aid,
-       bool unlock_required, int power)
-{
-       net_nfc_error_e result = NET_NFC_OK;
-       GError *error = NULL;
-
-       if (auto_start_proxy == NULL)
-       {
-               GError *error = NULL;
-
-               auto_start_proxy = net_nfc_gdbus_secure_element_proxy_new_for_bus_sync(
-                       G_BUS_TYPE_SYSTEM,
-                       G_DBUS_PROXY_FLAGS_NONE,
-                       "org.tizen.NetNfcService",
-                       "/org/tizen/NetNfcService/SecureElement",
-                       NULL,
-                       &error);
-               if (auto_start_proxy == NULL)
-               {
-                       DEBUG_ERR_MSG("Can not create proxy : %s", error->message);
-                       g_error_free(error);
-
-                       return NET_NFC_UNKNOWN_ERROR;
-               }
-       }
-
-       if (net_nfc_gdbus_secure_element_call_add_route_aid_sync(
-               auto_start_proxy,
-               package,
-               aid,
-               se_type,
-               category,
-               unlock_required,
-               power,
-               &result,
-               NULL,
-               &error) == FALSE)
-       {
-               DEBUG_ERR_MSG("Set Route Aid failed: %s", error->message);
-               result = NET_NFC_IPC_FAIL;
-
-               g_error_free(error);
-       }
-
-       DEBUG_CLIENT_MSG("net_nfc_gdbus_secure_element_call_add_route_aid_sync end");
-
-       return result;
-}
-
-NET_NFC_EXPORT_API
-net_nfc_error_e net_nfc_client_se_remove_route_aid_sync(
-       const char *package, const char *aid)
-{
-       net_nfc_error_e result = NET_NFC_OK;
-       GError *error = NULL;
-
-       if (auto_start_proxy == NULL)
-       {
-               GError *error = NULL;
-
-               auto_start_proxy = net_nfc_gdbus_secure_element_proxy_new_for_bus_sync(
-                       G_BUS_TYPE_SYSTEM,
-                       G_DBUS_PROXY_FLAGS_NONE,
-                       "org.tizen.NetNfcService",
-                       "/org/tizen/NetNfcService/SecureElement",
-                       NULL,
-                       &error);
-               if (auto_start_proxy == NULL)
-               {
-                       DEBUG_ERR_MSG("Can not create proxy : %s", error->message);
-                       g_error_free(error);
-
-                       return NET_NFC_UNKNOWN_ERROR;
-               }
-       }
-
-       if (net_nfc_gdbus_secure_element_call_remove_route_aid_sync(
-               auto_start_proxy,
-               package,
-               aid,
-               &result,
-               NULL,
-               &error) == FALSE)
-       {
-               DEBUG_ERR_MSG("Remove Route Aid failed: %s", error->message);
-               result = NET_NFC_IPC_FAIL;
-
-               g_error_free(error);
-       }
-
-       DEBUG_CLIENT_MSG("net_nfc_gdbus_hce_call_set_route_aid_sync end");
-
-       return result;
-}
-
-NET_NFC_EXPORT_API
-net_nfc_error_e net_nfc_client_se_remove_package_aids_sync(
-       const char *package)
-{
-       net_nfc_error_e result = NET_NFC_OK;
-       GError *error = NULL;
-
-       if (auto_start_proxy == NULL)
-       {
-               GError *error = NULL;
-
-               auto_start_proxy = net_nfc_gdbus_secure_element_proxy_new_for_bus_sync(
-                       G_BUS_TYPE_SYSTEM,
-                       G_DBUS_PROXY_FLAGS_NONE,
-                       "org.tizen.NetNfcService",
-                       "/org/tizen/NetNfcService/SecureElement",
-                       NULL,
-                       &error);
-               if (auto_start_proxy == NULL)
-               {
-                       DEBUG_ERR_MSG("Can not create proxy : %s", error->message);
-                       g_error_free(error);
-
-                       return NET_NFC_UNKNOWN_ERROR;
-               }
-       }
-
-       if (net_nfc_gdbus_secure_element_call_remove_package_aids_sync(
-               auto_start_proxy,
-               package,
-               &result,
-               NULL,
-               &error) == FALSE)
-       {
-               DEBUG_ERR_MSG("Remove Package Aid failed: %s", error->message);
-               result = NET_NFC_IPC_FAIL;
-
-               g_error_free(error);
-       }
-
-       DEBUG_CLIENT_MSG("net_nfc_client_se_remove_package_aids_sync end");
-
-       return result;
-}
-
-NET_NFC_EXPORT_API
-net_nfc_error_e net_nfc_client_se_set_preferred_handler_sync(bool state)
-{
-       net_nfc_error_e result = NET_NFC_OK;
-       GError *error = NULL;
-
-       if (se_proxy == NULL) {
-               result = net_nfc_client_se_init();
-               if (result != NET_NFC_OK) {
-                       DEBUG_ERR_MSG("net_nfc_client_se_init failed, [%d]", result);
-
-                       return NET_NFC_NOT_INITIALIZED;
-               }
-       }
-
-       if (net_nfc_gdbus_secure_element_call_set_preferred_handler_sync(
-               se_proxy,
-               state,
-               &result,
-               NULL, &error) == FALSE) {
-               DEBUG_ERR_MSG("net_nfc_gdbus_secure_element_call_set_preferred_handler_sync failed : %s", error->message);
-               result = NET_NFC_IPC_FAIL;
-
-               g_error_free(error);
-       }
-
-       return result;
-}
-
-NET_NFC_EXPORT_API
-net_nfc_error_e net_nfc_client_se_get_handler_storage_info_sync(
-       net_nfc_card_emulation_category_t category, int *used, int *max)
-{
-       net_nfc_error_e result = NET_NFC_OK;
-       GError *error = NULL;
-
-       if (se_proxy == NULL) {
-               result = net_nfc_client_se_init();
-               if (result != NET_NFC_OK) {
-                       DEBUG_ERR_MSG("net_nfc_client_se_init failed, [%d]", result);
-
-                       return NET_NFC_NOT_INITIALIZED;
-               }
-       }
-
-       if (net_nfc_gdbus_secure_element_call_get_handler_storage_info_sync(
-               se_proxy,
-               category,
-               &result,
-               used,
-               max,
-               NULL, &error) == FALSE) {
-               DEBUG_ERR_MSG("net_nfc_gdbus_secure_element_call_get_handler_storage_info_sync failed : %s", error->message);
-               result = NET_NFC_IPC_FAIL;
-
-               g_error_free(error);
-       }
-
-       return result;
-}
-
-NET_NFC_EXPORT_API
-net_nfc_error_e net_nfc_client_se_get_conflict_handlers_sync(
-       const char *package, net_nfc_card_emulation_category_t category,
-       const char *aid, char ***handlers)
-{
-       net_nfc_error_e result = NET_NFC_OK;
-       GError *error = NULL;
-       GVariant *packages = NULL;
-
-       if (se_proxy == NULL) {
-               result = net_nfc_client_se_init();
-               if (result != NET_NFC_OK) {
-                       DEBUG_ERR_MSG("net_nfc_client_se_init failed, [%d]", result);
-
-                       return NET_NFC_NOT_INITIALIZED;
-               }
-       }
-
-       if (net_nfc_gdbus_secure_element_call_get_conflict_handlers_sync(
-               se_proxy,
-               package,
-               category,
-               aid,
-               &result,
-               &packages,
-               NULL, &error) == true) {
-               if (result == NET_NFC_DATA_CONFLICTED) {
-                       GVariantIter iter;
-                       gchar **pkgs;
-                       size_t len;
-
-                       g_variant_iter_init(&iter, packages);
-                       len = g_variant_iter_n_children(&iter);
-
-                       SECURE_MSG("conflict count [%d]", len);
-
-                       if (len > 0) {
-                               size_t i;
-                               gchar *temp;
-
-                               pkgs = g_new0(gchar *, len + 1);
-
-                               for (i = 0; i < len; i++) {
-                                       if (g_variant_iter_next(&iter, "(s)", &temp) == true) {
-                                               SECURE_MSG("conflict package [%s]", temp);
-                                               pkgs[i] = g_strdup(temp);
-                                       } else {
-                                               DEBUG_ERR_MSG("g_variant_iter_next failed");
-                                       }
-                               }
-
-                               *handlers = pkgs;
-                       }
-               }
-       } else {
-               DEBUG_ERR_MSG("net_nfc_gdbus_secure_element_call_get_conflict_handlers_sync failed : %s", error->message);
-               result = NET_NFC_IPC_FAIL;
-
-               g_error_free(error);
-       }
-
-       return result;
-}
-
-net_nfc_error_e net_nfc_client_se_init(void)
-{
-       GError *error = NULL;
-
-       if (se_proxy)
-       {
-               DEBUG_CLIENT_MSG("Already initialized");
-
-               return NET_NFC_OK;
-       }
-
-       se_proxy = net_nfc_gdbus_secure_element_proxy_new_for_bus_sync(
-                               G_BUS_TYPE_SYSTEM,
-                               G_DBUS_PROXY_FLAGS_DO_NOT_AUTO_START,
-                               "org.tizen.NetNfcService",
-                               "/org/tizen/NetNfcService/SecureElement",
-                               NULL,
-                               &error);
-       if (se_proxy == NULL)
-       {
-               DEBUG_ERR_MSG("Can not create proxy : %s", error->message);
-
-               g_error_free(error);
-
-               return NET_NFC_UNKNOWN_ERROR;
-       }
-
-       g_signal_connect(se_proxy, "se-type-changed",
-               G_CALLBACK(se_type_changed), NULL);
-
-       g_signal_connect(se_proxy, "ese-detected",
-               G_CALLBACK(se_ese_detected), NULL);
-
-       g_signal_connect(se_proxy, "transaction-event",
-               G_CALLBACK(se_transaction_event), NULL);
-
-       g_signal_connect(se_proxy, "card-emulation-mode-changed",
-               G_CALLBACK(se_card_emulation_mode_changed), NULL);
-
-       g_signal_connect(se_proxy, "rf-detected",
-               G_CALLBACK(se_rf_detected), NULL);
-
-       return NET_NFC_OK;
-}
-
-
-void net_nfc_client_se_deinit(void)
-{
-       if (se_proxy)
-       {
-               g_object_unref(se_proxy);
-               se_proxy = NULL;
-       }
-
-       if (auto_start_proxy)
-       {
-               g_object_unref(auto_start_proxy);
-               auto_start_proxy = NULL;
-       }
-}
diff --git a/test/src/net_nfc_client_sign_record.c b/test/src/net_nfc_client_sign_record.c
deleted file mode 100755 (executable)
index 9d93847..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
-  * Copyright (c) 2012, 2013 Samsung Electronics Co., Ltd.
-  *
-  * Licensed under the Flora License, Version 1.1 (the "License");
-  * you may not use this file except in compliance with the License.
-  * You may obtain a copy of the License at
-
-  *     http://floralicense.org/license/
-  *
-  * 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.
-  */
-
-
-#include "net_nfc_util_sign_record.h"
-
-#ifndef NET_NFC_EXPORT_API
-#define NET_NFC_EXPORT_API __attribute__((visibility("default")))
-#endif
-
-NET_NFC_EXPORT_API net_nfc_error_e net_nfc_sign_records(ndef_message_h msg, int begin_index, int end_index, char *cert_file, char *password)
-{
-       return net_nfc_util_sign_records((ndef_message_s *)msg, begin_index, end_index, cert_file, password);
-}
-
-NET_NFC_EXPORT_API net_nfc_error_e net_nfc_sign_ndef_message(ndef_message_h msg, char *cert_file, char *password)
-{
-       return net_nfc_util_sign_ndef_message((ndef_message_s *)msg, cert_file, password);
-}
-
-NET_NFC_EXPORT_API net_nfc_error_e net_nfc_verify_signature_ndef_message(ndef_message_h msg)
-{
-       return net_nfc_util_verify_signature_ndef_message((ndef_message_s *)msg);
-}
-
-NET_NFC_EXPORT_API net_nfc_error_e net_nfc_verify_signature_records(ndef_record_h begin_record, ndef_record_h sign_record)
-{
-       return net_nfc_util_verify_signature_records((ndef_record_s *)begin_record, (ndef_record_s *)sign_record);
-}
diff --git a/test/src/net_nfc_client_snep.c b/test/src/net_nfc_client_snep.c
deleted file mode 100755 (executable)
index 3920287..0000000
+++ /dev/null
@@ -1,519 +0,0 @@
-/*
- * Copyright (c) 2012, 2013 Samsung Electronics Co., Ltd.
- *
- * Licensed under the Flora License, Version 1.1 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *    http://floralicense.org/license/
- *
- * 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.
- */
-
-#include "net_nfc_typedef_internal.h"
-#include "net_nfc_debug_internal.h"
-#include "net_nfc_util_internal.h"
-#include "net_nfc_util_ndef_message.h"
-#include "net_nfc_util_gdbus_internal.h"
-#include "net_nfc_gdbus.h"
-#include "net_nfc_data.h"
-#include "net_nfc_ndef_message.h"
-#include "net_nfc_client.h"
-#include "net_nfc_client_manager.h"
-#include "net_nfc_client_snep.h"
-
-#ifndef NET_NFC_EXPORT_API
-#define NET_NFC_EXPORT_API __attribute__((visibility("default")))
-#endif
-
-static NetNfcGDbusSnep *snep_proxy = NULL;
-
-/*******************************************************************/
-
-static void snep_send_client_request(GObject *source_object,
-       GAsyncResult *res,
-       gpointer user_data);
-
-/*********************************************************************/
-
-static void snep_send_client_request(GObject *source_object,
-       GAsyncResult *res,
-       gpointer user_data)
-{
-       GVariant *parameter = (GVariant *)user_data;
-       net_nfc_error_e out_result;
-       net_nfc_snep_type_t out_type = NET_NFC_SNEP_GET;
-       GVariant *out_data = NULL;
-       GError *error = NULL;
-       net_nfc_client_snep_event_cb callback;
-       void *user_param;
-       net_nfc_snep_handle_h handle;
-
-       g_assert(parameter != NULL);
-
-       if (net_nfc_gdbus_snep_call_client_request_finish(
-               NET_NFC_GDBUS_SNEP(source_object),
-               (gint *)&out_result,
-               (guint *)&out_type,
-               &out_data,
-               res,
-               &error) == FALSE)
-       {
-               DEBUG_ERR_MSG("Can not finish send client request %s",
-                       error->message);
-               out_result = NET_NFC_IPC_FAIL;
-
-               g_error_free(error);
-       }
-
-       g_variant_get(parameter, "(uuu)",
-               (guint *)&callback,
-               (guint *)&user_param,
-               (guint *)&handle);
-
-       if (callback != NULL) {
-               ndef_message_h message;
-
-               message = net_nfc_util_gdbus_variant_to_ndef_message(out_data);
-
-               callback(handle, out_type, out_result,
-                       message, user_param);
-
-               net_nfc_free_ndef_message(message);
-       }
-
-       g_variant_unref(parameter);
-}
-
-NET_NFC_EXPORT_API
-net_nfc_error_e net_nfc_client_snep_start_server(
-       net_nfc_target_handle_h target,
-       const char *san,
-       sap_t sap,
-       net_nfc_client_snep_event_cb callback,
-       void *user_data)
-{
-       net_nfc_error_e result = NET_NFC_OK;
-       GError *error = NULL;
-       GVariant *parameter;
-
-       if (snep_proxy == NULL)
-       {
-               DEBUG_ERR_MSG("Can not get Snep Proxy");
-
-               return NET_NFC_NOT_INITIALIZED;
-       }
-
-       /* prevent executing daemon when nfc is off */
-       if (net_nfc_client_manager_is_activated() == false) {
-               return NET_NFC_NOT_ACTIVATED;
-       }
-
-       parameter = g_variant_new("(uu)",
-               GPOINTER_TO_UINT(callback),
-               GPOINTER_TO_UINT(user_data));
-
-       if (net_nfc_gdbus_snep_call_server_start_sync(snep_proxy,
-               GPOINTER_TO_UINT(target),
-               sap,
-               san,
-               GPOINTER_TO_UINT(parameter),
-               (gint *)&result,
-               NULL,
-               &error) == FALSE)
-       {
-               DEBUG_ERR_MSG("snep server(sync call) failed: %s",
-                       error->message);
-               result = NET_NFC_IPC_FAIL;
-
-               g_error_free(error);
-
-               g_variant_unref(parameter);
-       }
-
-       return result;
-}
-
-NET_NFC_EXPORT_API
-net_nfc_error_e net_nfc_client_snep_start_client(
-       net_nfc_target_handle_h target,
-       const char *san,
-       sap_t sap,
-       net_nfc_client_snep_event_cb callback,
-       void *user_data)
-{
-       net_nfc_error_e result = NET_NFC_OK;
-       GError *error = NULL;
-       GVariant *parameter;
-
-       if (snep_proxy == NULL)
-       {
-               DEBUG_ERR_MSG("Can not get Snep Proxy");
-
-               return NET_NFC_NOT_INITIALIZED;
-       }
-
-       /* prevent executing daemon when nfc is off */
-       if (net_nfc_client_manager_is_activated() == false) {
-               return NET_NFC_NOT_ACTIVATED;
-       }
-
-       parameter = g_variant_new("(uu)",
-               GPOINTER_TO_UINT(callback),
-               GPOINTER_TO_UINT(user_data));
-
-       if (net_nfc_gdbus_snep_call_client_start_sync(snep_proxy,
-               GPOINTER_TO_UINT(target),
-               sap,
-               san,
-               GPOINTER_TO_UINT(parameter),
-               (gint *)&result,
-               NULL,
-               &error) == FALSE)
-       {
-               DEBUG_ERR_MSG("snep client(sync call) failed: %s",
-                       error->message);
-               result = NET_NFC_IPC_FAIL;
-
-               g_error_free(error);
-
-               g_variant_unref(parameter);
-       }
-
-       return result;
-}
-
-NET_NFC_EXPORT_API
-net_nfc_error_e net_nfc_client_snep_send_client_request(
-       net_nfc_snep_handle_h target,
-       net_nfc_snep_type_t snep_type,
-       ndef_message_h msg,
-       net_nfc_client_snep_event_cb callback,
-       void *user_data)
-{
-       GVariant *ndef_msg = NULL;
-       GVariant *parameter;
-
-       if (target == NULL || msg == NULL)
-       {
-               return NET_NFC_NULL_PARAMETER;
-       }
-
-       if (snep_proxy == NULL)
-       {
-               DEBUG_ERR_MSG("Can not get Snep Proxy");
-
-               return NET_NFC_NOT_INITIALIZED;
-       }
-
-       /* prevent executing daemon when nfc is off */
-       if (net_nfc_client_manager_is_activated() == false) {
-               return NET_NFC_NOT_ACTIVATED;
-       }
-
-       parameter = g_variant_new("(uuu)",
-               GPOINTER_TO_UINT(callback),
-               GPOINTER_TO_UINT(user_data),
-               GPOINTER_TO_UINT(target));
-
-       ndef_msg = net_nfc_util_gdbus_ndef_message_to_variant(msg);
-
-       net_nfc_gdbus_snep_call_client_request(snep_proxy,
-               GPOINTER_TO_UINT(target),
-               snep_type,
-               ndef_msg,
-               NULL,
-               snep_send_client_request,
-               parameter);
-
-       return NET_NFC_OK;
-}
-#if 0
-NET_NFC_EXPORT_API
-net_nfc_error_e net_nfc_client_snep_send_client_request_sync(
-       net_nfc_target_handle_h target,
-       net_nfc_snep_type_t snep_type,
-       ndef_message_h msg,
-       net_nfc_snep_type_t *resp_type,
-       ndef_message_h *response)
-{
-       GVariant *resp_msg = NULL;
-       GVariant *arg_msg = NULL;
-       GError *error = NULL;
-       net_nfc_error_e result;
-       guint type;
-
-       if (target == NULL || msg == NULL ||
-               resp_type == NULL || response == NULL)
-       {
-               return NET_NFC_NULL_PARAMETER;
-       }
-
-       *response = NULL;
-
-       if (snep_proxy == NULL)
-       {
-               DEBUG_ERR_MSG("Can not get Snep Proxy");
-
-               return NET_NFC_NOT_INITIALIZED;
-       }
-
-       arg_msg = net_nfc_util_gdbus_ndef_message_to_variant(msg);
-
-       if (net_nfc_gdbus_snep_call_client_request_sync(snep_proxy,
-               GPOINTER_TO_UINT(target),
-               snep_type,
-               arg_msg,
-               &result,
-               resp_type,
-               &resp_msg,
-               NULL,
-               &error) == TRUE)
-       {
-               data_s ndef_data = { NULL, };
-
-               net_nfc_util_gdbus_variant_to_data_s(resp_msg, &ndef_data);
-
-               if (ndef_data.buffer != NULL && ndef_data.length > 0)
-               {
-                       result = net_nfc_create_ndef_message_from_rawdata(
-                               response,
-                               &ndef_data);
-
-                       net_nfc_util_free_data(&ndef_data);
-               }
-       }
-       else
-       {
-               DEBUG_ERR_MSG(" send client request (sync call) failed: %s",
-                       error->message);
-               g_error_free(error);
-
-               return NET_NFC_IPC_FAIL;
-       }
-
-
-       return result;
-}
-#endif
-NET_NFC_EXPORT_API
-net_nfc_error_e net_nfc_client_snep_stop_service_sync(
-       net_nfc_target_handle_h target,
-       net_nfc_snep_handle_h service)
-{
-       net_nfc_error_e result = NET_NFC_OK;
-       GError *error = NULL;
-
-       if (target == NULL || service == NULL)
-       {
-               return NET_NFC_NULL_PARAMETER;
-       }
-
-       if (snep_proxy == NULL)
-       {
-               DEBUG_ERR_MSG("Can not get Snep Proxy");
-
-               return NET_NFC_NOT_INITIALIZED;
-       }
-
-       /* prevent executing daemon when nfc is off */
-       if (net_nfc_client_manager_is_activated() == false) {
-               return NET_NFC_NOT_ACTIVATED;
-       }
-
-       if (net_nfc_gdbus_snep_call_stop_snep_sync(
-               snep_proxy,
-               GPOINTER_TO_UINT(target),
-               GPOINTER_TO_UINT(service),
-               (gint *)&result,
-               NULL,
-               &error) == FALSE)
-       {
-               DEBUG_ERR_MSG("snep stop service(sync call) failed: %s",
-                       error->message);
-               result = NET_NFC_IPC_FAIL;
-
-               g_error_free(error);
-       }
-
-       return result;
-}
-
-static void _snep_event_cb(NetNfcGDbusSnep *object,
-       guint arg_handle,
-       guint arg_event,
-       gint arg_result,
-       GVariant *arg_ndef_msg,
-       guint arg_user_data)
-{
-       GVariant *parameter = (GVariant *)GUINT_TO_POINTER(arg_user_data);
-
-       INFO_MSG(">>> SIGNAL arrived");
-
-       DEBUG_CLIENT_MSG("handle [%p], event [%d], result [%d], user_data [%p]",
-               GUINT_TO_POINTER(arg_handle),
-               arg_event,
-               arg_result,
-               parameter);
-
-       if (parameter != NULL)
-       {
-               net_nfc_client_snep_event_cb callback;
-               void *user_data;
-
-               g_variant_get(parameter,
-                       "(uu)",
-                       &callback,
-                       &user_data);
-
-               if (callback != NULL)
-               {
-                       ndef_message_h message;
-
-                       message = net_nfc_util_gdbus_variant_to_ndef_message(
-                                       arg_ndef_msg);
-
-                       callback(GUINT_TO_POINTER(arg_handle),
-                               arg_event,
-                               arg_result,
-                               message,
-                               user_data);
-
-                       net_nfc_free_ndef_message(message);
-               }
-#if 0 /* remove temporary... */
-               if (arg_event == NET_NFC_LLCP_UNREGISTERED) {
-                       g_variant_unref(parameter);
-               }
-#endif
-       }
-}
-
-NET_NFC_EXPORT_API
-net_nfc_error_e net_nfc_client_snep_register_server(const char *san,
-       sap_t sap,
-       net_nfc_client_snep_event_cb callback,
-       void *user_data)
-{
-       net_nfc_error_e result = NET_NFC_OK;
-       GError *error = NULL;
-       GVariant *parameter;
-
-       if (snep_proxy == NULL)
-       {
-               if(net_nfc_client_snep_init() != NET_NFC_OK)
-               {
-                       DEBUG_ERR_MSG("Snep Proxy fail");
-                       return NET_NFC_NOT_INITIALIZED;
-               }
-       }
-
-       /* prevent executing daemon when nfc is off */
-       if (net_nfc_client_manager_is_activated() == false) {
-               return NET_NFC_NOT_ACTIVATED;
-       }
-
-       parameter = g_variant_new("(uu)",
-               GPOINTER_TO_UINT(callback),
-               GPOINTER_TO_UINT(user_data));
-
-       if (net_nfc_gdbus_snep_call_server_register_sync(snep_proxy,
-               sap,
-               san,
-               GPOINTER_TO_UINT(parameter),
-               (gint *)&result,
-               NULL,
-               &error) == FALSE)
-       {
-               DEBUG_ERR_MSG("snep register server(sync call) failed: %s",
-                       error->message);
-               result = NET_NFC_IPC_FAIL;
-
-               g_error_free(error);
-
-               g_variant_unref(parameter);
-       }
-
-       return result;
-}
-
-NET_NFC_EXPORT_API
-net_nfc_error_e net_nfc_client_snep_unregister_server(const char *san,
-       sap_t sap)
-{
-       net_nfc_error_e result = NET_NFC_OK;
-       GError *error = NULL;
-
-       if (snep_proxy == NULL)
-       {
-               DEBUG_ERR_MSG("Can not get Snep Proxy");
-
-               return NET_NFC_NOT_INITIALIZED;
-       }
-
-       /* prevent executing daemon when nfc is off */
-       if (net_nfc_client_manager_is_activated() == false) {
-               return NET_NFC_NOT_ACTIVATED;
-       }
-
-       if (net_nfc_gdbus_snep_call_server_unregister_sync(snep_proxy,
-               sap,
-               san,
-               (gint *)&result,
-               NULL,
-               &error) == FALSE)
-       {
-               DEBUG_ERR_MSG("snep unregister server(sync call) failed: %s",
-                       error->message);
-               result = NET_NFC_IPC_FAIL;
-
-               g_error_free(error);
-       }
-
-       return result;
-}
-
-net_nfc_error_e net_nfc_client_snep_init(void)
-{
-       GError *error = NULL;
-
-       if (snep_proxy)
-       {
-               DEBUG_CLIENT_MSG("Already initialized");
-
-               return NET_NFC_OK;
-       }
-
-       snep_proxy = net_nfc_gdbus_snep_proxy_new_for_bus_sync(
-               G_BUS_TYPE_SYSTEM,
-               G_DBUS_PROXY_FLAGS_DO_NOT_AUTO_START,
-               "org.tizen.NetNfcService",
-               "/org/tizen/NetNfcService/Snep",
-               NULL,
-               &error);
-       if (snep_proxy == NULL)
-       {
-               DEBUG_ERR_MSG("Can not create proxy : %s", error->message);
-               g_error_free(error);
-
-               return NET_NFC_UNKNOWN_ERROR;
-       }
-
-       g_signal_connect(snep_proxy, "snep-event",
-                       G_CALLBACK(_snep_event_cb), NULL);
-
-       return NET_NFC_OK;
-}
-
-void net_nfc_client_snep_deinit(void)
-{
-       if (snep_proxy)
-       {
-               g_object_unref(snep_proxy);
-               snep_proxy = NULL;
-       }
-}
diff --git a/test/src/net_nfc_client_system_handler.c b/test/src/net_nfc_client_system_handler.c
deleted file mode 100755 (executable)
index 2616b8a..0000000
+++ /dev/null
@@ -1,320 +0,0 @@
-/*
- * Copyright (c) 2012, 2013 Samsung Electronics Co., Ltd.
- *
- * Licensed under the Flora License, Version 1.1 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://floralicense.org/license/
- *
- * 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.
- */
-
-#include "net_nfc_typedef_internal.h"
-#include "net_nfc_debug_internal.h"
-#include "net_nfc_util_ndef_message.h"
-#include "net_nfc_gdbus.h"
-#include "net_nfc_client.h"
-#include "net_nfc_client_util_internal.h"
-#include "net_nfc_client_manager.h"
-#include "net_nfc_client_system_handler.h"
-
-
-#ifndef NET_NFC_EXPORT_API
-#define NET_NFC_EXPORT_API __attribute__((visibility("default")))
-#endif
-
-static NetNfcGDbusPopup *popup_proxy = NULL;
-static int popup_state = 0;
-
-static void popup_set_active_callback(GObject *source_object,
-       GAsyncResult *res,
-       gpointer user_data);
-
-static void popup_set_active_callback(GObject *source_object,
-       GAsyncResult *res,
-       gpointer user_data)
-{
-       NetNfcCallback *func_data = (NetNfcCallback *)user_data;
-       net_nfc_error_e result;
-       GError *error = NULL;
-
-       g_assert(user_data != NULL);
-
-       if (net_nfc_gdbus_popup_call_set_finish(
-               NET_NFC_GDBUS_POPUP(source_object),
-               &result,
-               res,
-               &error) == FALSE)
-       {
-               DEBUG_ERR_MSG("Can not finish popup_set_active: %s",
-                       error->message);
-               result = NET_NFC_IPC_FAIL;
-
-               g_error_free(error);
-       }
-
-       if (func_data->callback != NULL)
-       {
-               net_nfc_client_popup_set_state_callback callback =
-                       (net_nfc_client_popup_set_state_callback)func_data->callback;
-
-               callback(result, func_data->user_data);
-       }
-
-       g_free(func_data);
-}
-
-NET_NFC_EXPORT_API
-net_nfc_error_e net_nfc_client_sys_handler_set_state(int state,
-       net_nfc_client_popup_set_state_callback callback,
-       void *user_data)
-{
-       NetNfcCallback *func_data;
-
-       if (popup_proxy == NULL)
-       {
-               if(net_nfc_client_sys_handler_init() != NET_NFC_OK)
-               {
-                       DEBUG_ERR_MSG("popup_proxy fail");
-                       return NET_NFC_NOT_INITIALIZED;
-               }
-       }
-
-       /* prevent executing daemon when nfc is off */
-       if (net_nfc_client_manager_is_activated() == false) {
-               return NET_NFC_NOT_ACTIVATED;
-       }
-
-       func_data = g_try_new0(NetNfcCallback, 1);
-       if (func_data == NULL )
-               return NET_NFC_ALLOC_FAIL;
-
-       func_data->callback = (gpointer)callback;
-       func_data->user_data = user_data;
-
-       net_nfc_gdbus_popup_call_set(popup_proxy,
-               state,
-               CHECK_FOREGROUND,
-               NULL,
-               popup_set_active_callback,
-               func_data);
-
-       return NET_NFC_OK;
-}
-
-NET_NFC_EXPORT_API
-net_nfc_error_e net_nfc_client_sys_handler_set_state_sync(int state)
-{
-       net_nfc_error_e result = NET_NFC_OK;
-       GError *error = NULL;
-
-       if (popup_proxy == NULL)
-       {
-               if(net_nfc_client_sys_handler_init() != NET_NFC_OK)
-               {
-                       DEBUG_ERR_MSG("popup_proxy fail");
-                       return NET_NFC_NOT_INITIALIZED;
-               }
-       }
-
-       /* prevent executing daemon when nfc is off */
-       if (net_nfc_client_manager_is_activated() == false) {
-               return NET_NFC_NOT_ACTIVATED;
-       }
-
-       if (net_nfc_gdbus_popup_call_set_sync(popup_proxy,
-               state,
-               CHECK_FOREGROUND,
-               &result,
-               NULL,
-               &error) == FALSE)
-       {
-               DEBUG_ERR_MSG("can not call SetActive: %s",
-                       error->message);
-               result = NET_NFC_IPC_FAIL;
-
-               g_error_free(error);
-       }
-
-       return result;
-}
-
-NET_NFC_EXPORT_API
-net_nfc_error_e net_nfc_client_sys_handler_set_state_force(int state,
-       net_nfc_client_popup_set_state_callback callback,
-       void *user_data)
-{
-       NetNfcCallback *func_data;
-
-       if (popup_proxy == NULL)
-       {
-               if(net_nfc_client_sys_handler_init() != NET_NFC_OK)
-               {
-                       DEBUG_ERR_MSG("popup_proxy fail");
-                       return NET_NFC_NOT_INITIALIZED;
-               }
-       }
-
-       /* prevent executing daemon when nfc is off */
-       if (net_nfc_client_manager_is_activated() == false) {
-               return NET_NFC_NOT_ACTIVATED;
-       }
-
-       func_data = g_try_new0(NetNfcCallback, 1);
-       if (func_data == NULL)
-               return NET_NFC_ALLOC_FAIL;
-
-       func_data->callback = (gpointer)callback;
-       func_data->user_data = user_data;
-
-       net_nfc_gdbus_popup_call_set(popup_proxy,
-               state,
-               NO_CHECK_FOREGROUND,
-               NULL,
-               popup_set_active_callback,
-               func_data);
-
-       return NET_NFC_OK;
-}
-
-NET_NFC_EXPORT_API
-net_nfc_error_e net_nfc_client_sys_handler_set_state_force_sync(int state)
-{
-       net_nfc_error_e result;
-       GError *error = NULL;
-
-       if (popup_proxy == NULL)
-       {
-               if(net_nfc_client_sys_handler_init() != NET_NFC_OK)
-               {
-                       DEBUG_ERR_MSG("popup_proxy fail");
-                       return NET_NFC_NOT_INITIALIZED;
-               }
-       }
-
-       /* prevent executing daemon when nfc is off */
-       if (net_nfc_client_manager_is_activated() == false) {
-               return NET_NFC_NOT_ACTIVATED;
-       }
-
-       if (net_nfc_gdbus_popup_call_set_sync(popup_proxy,
-               state,
-               NO_CHECK_FOREGROUND,
-               &result,
-               NULL,
-               &error) == FALSE)
-       {
-               DEBUG_ERR_MSG("can not call SetActive: %s",
-                       error->message);
-               result = NET_NFC_IPC_FAIL;
-
-               g_error_free(error);
-       }
-
-       return result;
-}
-
-NET_NFC_EXPORT_API
-net_nfc_error_e net_nfc_client_sys_handler_set_launch_popup_state(
-       int enable)
-{
-       popup_state = enable;
-
-       return net_nfc_client_sys_handler_set_state_sync(enable);
-}
-
-NET_NFC_EXPORT_API
-net_nfc_error_e net_nfc_client_sys_handler_set_launch_popup_state_force(
-       int enable)
-{
-       popup_state = enable;
-
-       return net_nfc_client_sys_handler_set_state_force_sync(enable);
-}
-
-NET_NFC_EXPORT_API
-net_nfc_error_e net_nfc_client_sys_handler_get_launch_popup_state(
-                       int *state)
-{
-       net_nfc_error_e result = NET_NFC_OK;
-       gint out_state = NET_NFC_LAUNCH_APP_SELECT;
-       GError *error = NULL;
-
-       if (state == NULL)
-               return NET_NFC_NULL_PARAMETER;
-
-       *state = NET_NFC_LAUNCH_APP_SELECT;
-
-       if (popup_proxy == NULL) {
-               if(net_nfc_client_sys_handler_init() != NET_NFC_OK)
-               {
-                       DEBUG_ERR_MSG("popup_proxy fail");
-                       return NET_NFC_NOT_INITIALIZED;
-               }
-       }
-
-       /* prevent executing daemon when nfc is off */
-       if (net_nfc_client_manager_is_activated() == false) {
-               return NET_NFC_NOT_ACTIVATED;
-       }
-
-       if (net_nfc_gdbus_popup_call_get_sync(popup_proxy,
-               &result,
-               &out_state,
-               NULL,
-               &error) == true) {
-               *state = out_state;
-       } else {
-
-               DEBUG_ERR_MSG("net_nfc_gdbus_popup_call_get_sync failed: %s",
-                               error->message);
-               result = NET_NFC_IPC_FAIL;
-
-               g_error_free(error);
-       }
-
-       return result;
-}
-
-net_nfc_error_e net_nfc_client_sys_handler_init(void)
-{
-       GError *error = NULL;
-
-       if (popup_proxy)
-       {
-               DEBUG_CLIENT_MSG("Already initialized");
-
-               return NET_NFC_OK;
-       }
-
-       popup_proxy = net_nfc_gdbus_popup_proxy_new_for_bus_sync(
-                                       G_BUS_TYPE_SYSTEM,
-                                       G_DBUS_PROXY_FLAGS_DO_NOT_AUTO_START,
-                                       "org.tizen.NetNfcService",
-                                       "/org/tizen/NetNfcService/Popup",
-                                       NULL,
-                                       &error);
-       if (popup_proxy == NULL)
-       {
-               DEBUG_ERR_MSG("Can not create proxy : %s", error->message);
-               g_error_free(error);
-
-               return NET_NFC_OPERATION_FAIL;
-       }
-
-       return NET_NFC_OK;
-}
-
-void net_nfc_client_sys_handler_deinit(void)
-{
-       if (popup_proxy)
-       {
-               g_object_unref(popup_proxy);
-               popup_proxy = NULL;
-       }
-}
diff --git a/test/src/net_nfc_client_tag.c b/test/src/net_nfc_client_tag.c
deleted file mode 100755 (executable)
index 6aceef1..0000000
+++ /dev/null
@@ -1,857 +0,0 @@
-/*
- * Copyright (c) 2012, 2013 Samsung Electronics Co., Ltd.
- *
- * Licensed under the Flora License, Version 1.1 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://floralicense.org/license/
- *
- * 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.
- */
-
-#include "net_nfc_typedef_internal.h"
-#include "net_nfc_debug_internal.h"
-#include "net_nfc_util_gdbus_internal.h"
-#include "net_nfc_util_internal.h"
-#include "net_nfc_gdbus.h"
-#include "net_nfc_data.h"
-#include "net_nfc_target_info.h"
-#include "net_nfc_client.h"
-#include "net_nfc_client_util_internal.h"
-#include "net_nfc_client_manager.h"
-#include "net_nfc_client_tag.h"
-#include "net_nfc_client_tag_internal.h"
-
-#ifndef NET_NFC_EXPORT_API
-#define NET_NFC_EXPORT_API __attribute__((visibility("default")))
-#endif
-
-static NetNfcGDbusTag *tag_proxy = NULL;
-
-static NetNfcCallback tag_discovered_func_data;
-static NetNfcCallback tag_detached_func_data;
-
-static net_nfc_target_info_s *client_target_info = NULL;
-static net_nfc_event_filter_e client_filter = NET_NFC_ALL_ENABLE;
-
-static gboolean tag_check_filter(net_nfc_target_type_e type);
-
-static void tag_get_info_list(guint8 *buffer,
-                       gint number_of_keys,
-                       net_nfc_tag_info_s **list);
-
-static void tag_get_target_info(guint handle,
-                               guint dev_type,
-                               gboolean is_ndef_supported,
-                               guchar ndef_card_state,
-                               guint max_data_size,
-                               guint actual_data_size,
-                               guint number_of_keys,
-                               GVariant *target_info_values,
-                               GVariant *raw_data,
-                               net_nfc_target_info_s **info);
-
-#if 0
-/* async callback */
-static void tag_is_tag_connected(GObject *source_object,
-                               GAsyncResult *res,
-                               gpointer user_data);
-
-static void tag_get_current_tag_info(GObject *source_object,
-                               GAsyncResult *res,
-                               gpointer user_data);
-
-static void tag_get_current_target_handle(GObject *source_object,
-                                       GAsyncResult *res,
-                                       gpointer user_data);
-#endif
-/* signal callback */
-static void tag_tag_discovered(NetNfcGDbusTag *object,
-                       guint arg_handle,
-                       gint arg_dev_type,
-                       gboolean arg_is_ndef_supported,
-                       guchar arg_ndef_card_state,
-                       guint arg_max_data_size,
-                       guint arg_actual_data_size,
-                       guint arg_number_of_keys,
-                       GVariant *arg_target_info_values,
-                       GVariant *arg_raw_data,
-                       gpointer user_data);
-
-static void tag_tag_detached(NetNfcGDbusTag *object,
-                       guint arg_handle,
-                       gint arg_dev_type,
-                       gpointer user_data);
-
-static gboolean tag_check_filter(net_nfc_target_type_e type)
-{
-       net_nfc_event_filter_e converted = NET_NFC_ALL_ENABLE;
-
-       DEBUG_CLIENT_MSG("client filter =  %d", client_filter);
-
-       if (type >= NET_NFC_ISO14443_A_PICC &&
-               type <= NET_NFC_MIFARE_DESFIRE_PICC)
-       {
-               converted = NET_NFC_ISO14443A_ENABLE;
-       }
-       else if (type >= NET_NFC_ISO14443_B_PICC &&
-               type <= NET_NFC_ISO14443_BPRIME_PICC)
-       {
-               converted = NET_NFC_ISO14443B_ENABLE;
-       }
-       else if (type == NET_NFC_FELICA_PICC)
-       {
-               converted = NET_NFC_FELICA_ENABLE;
-       }
-       else if (type == NET_NFC_JEWEL_PICC)
-       {
-               converted = NET_NFC_FELICA_ENABLE;
-       }
-       else if (type == NET_NFC_ISO15693_PICC)
-       {
-               converted = NET_NFC_ISO15693_ENABLE;
-       }
-
-       if ((converted & client_filter) == 0)
-               return FALSE;
-
-       return TRUE;
-}
-
-static void tag_get_info_list(guint8 *buffer,
-                       gint number_of_keys,
-                       net_nfc_tag_info_s **list)
-{
-       net_nfc_tag_info_s *tmp_list = NULL;
-       net_nfc_tag_info_s *current = NULL;
-
-       gint i = 0;
-       gint length;
-
-       guint8 *pos = buffer;
-
-       if (buffer == NULL)
-               return;
-
-       tmp_list = g_new0(net_nfc_tag_info_s, number_of_keys);
-       current = tmp_list;
-
-       while (i < number_of_keys)
-       {
-               gchar *str = NULL;
-               data_h value = NULL;
-
-               /* key */
-               length = *pos;  /* first values is length of key */
-               pos++;
-
-               str = g_new0(gchar, length + 1);
-               memcpy(str, pos, length);
-
-               SECURE_MSG("key = [%s]", str);
-
-               pos += length;
-
-               current->key = str;
-
-               /* value */
-               length = *pos; /* first value is length of value */
-               pos++;
-
-               value = NULL;
-               if (length > 0)
-               {
-                       net_nfc_create_data(&value, pos, length);
-                       pos += length;
-               }
-
-               current->value = value;
-
-               current++;
-               i++;
-       }
-
-       *list = tmp_list;
-}
-
-static void tag_get_target_info(guint handle,
-                               guint dev_type,
-                               gboolean is_ndef_supported,
-                               guchar ndef_card_state,
-                               guint max_data_size,
-                               guint actual_data_size,
-                               guint number_of_keys,
-                               GVariant *target_info_values,
-                               GVariant *raw_data,
-                               net_nfc_target_info_s **info)
-{
-       guint8 *buffer = NULL;
-       net_nfc_target_info_s *info_data = NULL;
-       net_nfc_tag_info_s *list = NULL;
-
-       if (info == NULL)
-               return;
-
-       net_nfc_util_gdbus_variant_to_buffer(target_info_values,
-                       &buffer, NULL);
-
-       tag_get_info_list(buffer, number_of_keys, &list);
-
-       info_data = g_new0(net_nfc_target_info_s, 1);
-
-       info_data->ndefCardState = ndef_card_state;
-       info_data->actualDataSize = actual_data_size;
-       info_data->maxDataSize = max_data_size;
-       info_data->devType = dev_type;
-       info_data->handle = GUINT_TO_POINTER(handle);
-       info_data->is_ndef_supported = (uint8_t)is_ndef_supported;
-       info_data->number_of_keys = number_of_keys;
-       info_data->tag_info_list = list;
-
-       net_nfc_util_gdbus_variant_to_data_s(raw_data,
-                       &info_data->raw_data);
-
-       *info = info_data;
-}
-#if 0
-static void tag_is_tag_connected(GObject *source_object,
-                               GAsyncResult *res,
-                               gpointer user_data)
-{
-       NetNfcCallback *func_data = (NetNfcCallback *)user_data;
-       net_nfc_error_e out_result;
-       gboolean out_is_connected = false;
-       net_nfc_target_type_e out_dev_type = NET_NFC_UNKNOWN_TARGET;
-       GError *error = NULL;
-
-       g_assert(user_data != NULL);
-
-       if (net_nfc_gdbus_tag_call_is_tag_connected_finish(
-                               NET_NFC_GDBUS_TAG(source_object),
-                               &out_result,
-                               &out_is_connected,
-                               (gint32 *)&out_dev_type,
-                               res,
-                               &error) == FALSE)
-       {
-               DEBUG_ERR_MSG("Can not finish is_tag_connected: %s",
-                               error->message);
-               g_error_free(error);
-
-               out_result = NET_NFC_IPC_FAIL;
-       }
-
-       if (func_data->callback != NULL)
-       {
-               net_nfc_client_tag_is_tag_connected_completed callback =
-                       (net_nfc_client_tag_is_tag_connected_completed)func_data->callback;
-
-               if (out_is_connected == FALSE)
-                       out_result = NET_NFC_NOT_CONNECTED;
-
-               callback(out_result, out_dev_type, func_data->user_data);
-       }
-
-       g_free(func_data);
-}
-
-static void tag_get_current_tag_info(GObject *source_object,
-                               GAsyncResult *res,
-                               gpointer user_data)
-{
-       NetNfcCallback *func_data = (NetNfcCallback *)user_data;
-       net_nfc_error_e out_result = NET_NFC_OK;
-
-       net_nfc_target_type_e out_dev_type = NET_NFC_UNKNOWN_TARGET;
-       gboolean out_is_connected = FALSE;
-       gboolean out_is_ndef_supported = FALSE;
-       guchar out_ndef_card_state = 0;
-       guint out_handle = 0;
-       guint out_max_data_size = 0;
-       guint out_actual_data_size = 0;
-       guint out_number_of_keys = 0;
-       GVariant *out_target_info_values = NULL;
-       GVariant *out_raw_data = NULL;
-
-       GError *error = NULL;
-
-       g_assert(user_data != NULL);
-
-       if (net_nfc_gdbus_tag_call_get_current_tag_info_finish (
-                                       NET_NFC_GDBUS_TAG(source_object),
-                                       &out_result,
-                                       &out_is_connected,
-                                       &out_handle,
-                                       (gint *)&out_dev_type,
-                                       &out_is_ndef_supported,
-                                       &out_ndef_card_state,
-                                       &out_max_data_size,
-                                       &out_actual_data_size,
-                                       &out_number_of_keys,
-                                       &out_target_info_values,
-                                       &out_raw_data,
-                                       res,
-                                       &error) == FALSE)
-       {
-               out_result = NET_NFC_IPC_FAIL;
-
-               DEBUG_ERR_MSG("Can not finish get_current_tag_info: %s",
-                               error->message);
-               g_error_free(error);
-       }
-
-       if (out_result == NET_NFC_OK && out_is_connected == true) {
-               net_nfc_release_tag_info((net_nfc_target_info_h)client_target_info);
-               client_target_info = NULL;
-
-               if (tag_check_filter(out_dev_type) == true) {
-                       tag_get_target_info(out_handle,
-                                       out_dev_type,
-                                       out_is_ndef_supported,
-                                       out_ndef_card_state,
-                                       out_max_data_size,
-                                       out_actual_data_size,
-                                       out_number_of_keys,
-                                       out_target_info_values,
-                                       out_raw_data,
-                                       &client_target_info);
-               } else {
-                       INFO_MSG("The detected target is filtered out, type [%d]", out_dev_type);
-
-                       out_is_connected = false;
-               }
-       }
-
-       if (func_data->callback != NULL)
-       {
-               net_nfc_client_tag_get_current_tag_info_completed callback =
-                       (net_nfc_client_tag_get_current_tag_info_completed)func_data->callback;
-
-               if (out_result == NET_NFC_OK && out_is_connected == false)
-                       out_result = NET_NFC_NOT_CONNECTED;
-
-               callback(out_result, client_target_info, func_data->user_data);
-       }
-
-       g_free(func_data);
-}
-
-static void tag_get_current_target_handle(GObject *source_object,
-                                       GAsyncResult *res,
-                                       gpointer user_data)
-{
-       NetNfcCallback *func_data = (NetNfcCallback *)user_data;
-       net_nfc_error_e out_result = NET_NFC_OK;
-       net_nfc_target_handle_h out_handle = NULL;
-       net_nfc_target_type_e out_dev_type = NET_NFC_UNKNOWN_TARGET;
-       gboolean out_is_connected = false;
-       GError *error = NULL;
-
-       g_assert(user_data != NULL);
-
-       if (net_nfc_gdbus_tag_call_get_current_target_handle_finish(
-                                       NET_NFC_GDBUS_TAG(source_object),
-                                       &out_result,
-                                       &out_is_connected,
-                                       (guint *)&out_handle,
-                                       (gint *)&out_dev_type,
-                                       res,
-                                       &error) == FALSE)
-       {
-               DEBUG_ERR_MSG("Can not finish get_current_target_handle: %s",
-                               error->message);
-               g_error_free(error);
-
-               out_result = NET_NFC_IPC_FAIL;
-       }
-
-       if (func_data->callback != NULL)
-       {
-               net_nfc_client_tag_get_current_target_handle_completed callback =
-                       (net_nfc_client_tag_get_current_target_handle_completed)func_data->callback;
-
-               if (out_result == NET_NFC_OK && out_is_connected == FALSE)
-                       out_result = NET_NFC_NOT_CONNECTED;
-
-               callback(out_result,
-                       GUINT_TO_POINTER(out_handle),
-                       func_data->user_data);
-       }
-
-       g_free(func_data);
-}
-#endif
-static void tag_tag_discovered(NetNfcGDbusTag *object,
-                       guint arg_handle,
-                       gint arg_dev_type,
-                       gboolean arg_is_ndef_supported,
-                       guchar arg_ndef_card_state,
-                       guint arg_max_data_size,
-                       guint arg_actual_data_size,
-                       guint arg_number_of_keys,
-                       GVariant *arg_target_info_values,
-                       GVariant *arg_raw_data,
-                       gpointer user_data)
-{
-       INFO_MSG(">>> SIGNAL arrived");
-
-       net_nfc_release_tag_info((net_nfc_target_info_h)client_target_info);
-       client_target_info = NULL;
-
-       if (tag_check_filter(arg_dev_type) == FALSE) {
-               DEBUG_CLIENT_MSG("The detected target is filtered out, type [%d]", arg_dev_type);
-
-               return;
-       }
-
-       tag_get_target_info(arg_handle,
-                       arg_dev_type,
-                       arg_is_ndef_supported,
-                       arg_ndef_card_state,
-                       arg_max_data_size,
-                       arg_actual_data_size,
-                       arg_number_of_keys,
-                       arg_target_info_values,
-                       arg_raw_data,
-                       &client_target_info);
-
-       if (tag_discovered_func_data.callback != NULL) {
-               net_nfc_client_tag_tag_discovered callback =
-                       (net_nfc_client_tag_tag_discovered)tag_discovered_func_data.callback;
-
-               callback(client_target_info,
-                       tag_discovered_func_data.user_data);
-       }
-}
-
-static void tag_tag_detached(NetNfcGDbusTag *object,
-                       guint arg_handle,
-                       gint arg_dev_type,
-                       gpointer user_data)
-{
-       INFO_MSG(">>> SIGNAL arrived");
-
-       if (tag_check_filter(arg_dev_type) == TRUE) {
-               if (tag_detached_func_data.callback != NULL) {
-                       net_nfc_client_tag_tag_detached callback =
-                               (net_nfc_client_tag_tag_detached)tag_detached_func_data.callback;
-
-                       callback(tag_detached_func_data.user_data);
-               }
-       } else {
-               DEBUG_CLIENT_MSG("The detected target is filtered out, type [%d]", arg_dev_type);
-       }
-
-       net_nfc_release_tag_info((net_nfc_target_info_h)client_target_info);
-       client_target_info = NULL;
-}
-
-/* internal function */
-gboolean net_nfc_client_tag_is_connected(void)
-{
-       if (client_target_info == NULL)
-               return FALSE;
-
-       if (client_target_info->handle == NULL)
-               return FALSE;
-
-       return TRUE;
-}
-
-net_nfc_target_info_s *net_nfc_client_tag_get_client_target_info(void)
-{
-       return client_target_info;
-}
-
-NET_NFC_EXPORT_API
-net_nfc_error_e net_nfc_client_tag_is_tag_connected_sync(
-                                       net_nfc_target_type_e *dev_type)
-{
-       net_nfc_target_info_s *info;
-       net_nfc_error_e result = NET_NFC_OK;
-       net_nfc_target_type_e out_dev_type = NET_NFC_UNKNOWN_TARGET;
-       gboolean out_is_connected = false;
-       GError *error = NULL;
-
-       if (tag_proxy == NULL)
-               return NET_NFC_NOT_INITIALIZED;
-
-       /* prevent executing daemon when nfc is off */
-       if (net_nfc_client_manager_is_activated() == false) {
-               return NET_NFC_NOT_ACTIVATED;
-       }
-
-       info = net_nfc_client_tag_get_client_target_info();
-       if (info == NULL) {
-               /* try to request target information from server */
-               if (net_nfc_gdbus_tag_call_is_tag_connected_sync(tag_proxy,
-                                       &result,
-                                       &out_is_connected,
-                                       (gint *)&out_dev_type,
-                                       NULL,
-                                       &error) == FALSE)
-               {
-                       DEBUG_ERR_MSG("Can not get is_tag_connected result: %s",
-                                       error->message);
-                       result = NET_NFC_IPC_FAIL;
-
-                       g_error_free(error);
-
-                       return result;
-               }
-
-               if (out_is_connected == true) {
-                       if (dev_type)
-                               *dev_type = out_dev_type;
-
-                       result = NET_NFC_OK;
-               } else {
-                       result = NET_NFC_NOT_CONNECTED;
-               }
-       } else {
-               /* target was connected */
-               if (dev_type != NULL) {
-                       *dev_type = info->devType;
-               }
-
-               result = NET_NFC_OK;
-       }
-
-       return result;
-}
-
-NET_NFC_EXPORT_API
-net_nfc_error_e net_nfc_client_barcode_get_barcode_sync(
-                                               unsigned char **barcode, int* barcode_len)
-{
-       data_s *data;
-       GError *error = NULL;
-       GVariant *out_barcode = NULL;
-       net_nfc_error_e result = NET_NFC_OK;
-
-       if (tag_proxy == NULL)
-               return NET_NFC_NOT_INITIALIZED;
-
-       /* prevent executing daemon when nfc is off */
-       if (net_nfc_client_manager_is_activated() == false) {
-               return NET_NFC_NOT_ACTIVATED;
-       }
-
-       if (net_nfc_gdbus_tag_call_get_barcode_sync(tag_proxy,
-                               &result,
-                               &out_barcode,
-                               NULL,
-                               &error) == FALSE)
-       {
-               DEBUG_ERR_MSG("Can no get barcode result: %s", error->message);
-               result = NET_NFC_IPC_FAIL;
-
-               g_error_free(error);
-
-               return result;
-       }
-
-       if(result == NET_NFC_OK)
-       {
-               data = g_new0(data_s, 1);
-               net_nfc_util_gdbus_variant_to_data_s(out_barcode, data);
-
-               if(data == NULL || data->buffer == NULL || data->length == 0)
-                       return NET_NFC_OPERATION_FAIL;
-
-               //alloc barcode
-               *barcode_len = data->length;
-               *barcode = (unsigned char *)calloc(*barcode_len, sizeof(unsigned char));
-               memcpy(*barcode, data->buffer, *barcode_len);
-
-               if (data != NULL) {
-                       net_nfc_util_free_data(data);
-               }
-       }
-
-       return result;
-}
-
-NET_NFC_EXPORT_API
-net_nfc_error_e net_nfc_client_tag_get_current_tag_info_sync(
-                                               net_nfc_target_info_h *info)
-{
-       net_nfc_error_e result = NET_NFC_OK;
-       net_nfc_target_type_e out_dev_type = NET_NFC_UNKNOWN_TARGET;
-       gboolean out_is_connected = false;
-       gboolean out_is_ndef_supported = false;
-       guchar out_ndef_card_state = 0;
-       guint out_handle = 0;
-       guint out_max_data_size = 0;
-       guint out_actual_data_size = 0;
-       guint out_number_of_keys = 0;
-       GVariant *out_target_info_values = NULL;
-       GVariant *out_raw_data = NULL;
-       GError *error = NULL;
-
-       if (tag_proxy == NULL)
-               return NET_NFC_NOT_INITIALIZED;
-
-       /* prevent executing daemon when nfc is off */
-       if (net_nfc_client_manager_is_activated() == false) {
-               return NET_NFC_NOT_ACTIVATED;
-       }
-
-       if (net_nfc_client_tag_get_client_target_info() == NULL) {
-               /* try to request target information from server */
-               if (net_nfc_gdbus_tag_call_get_current_tag_info_sync(tag_proxy,
-                                       &result,
-                                       &out_is_connected,
-                                       &out_handle,
-                                       (gint *)&out_dev_type,
-                                       &out_is_ndef_supported,
-                                       &out_ndef_card_state,
-                                       &out_max_data_size,
-                                       &out_actual_data_size,
-                                       &out_number_of_keys,
-                                       &out_target_info_values,
-                                       &out_raw_data,
-                                       NULL,
-                                       &error) == FALSE)
-               {
-                       DEBUG_ERR_MSG("Can no get current_tag_info result: %s",
-                                       error->message);
-                       result = NET_NFC_IPC_FAIL;
-
-                       g_error_free(error);
-
-                       return result;
-               }
-
-               if (result == NET_NFC_OK) {
-                       if (out_is_connected == true) {
-                               if (tag_check_filter(out_dev_type) == true) {
-                                       tag_get_target_info(out_handle,
-                                                       out_dev_type,
-                                                       out_is_ndef_supported,
-                                                       out_ndef_card_state,
-                                                       out_max_data_size,
-                                                       out_actual_data_size,
-                                                       out_number_of_keys,
-                                                       out_target_info_values,
-                                                       out_raw_data,
-                                                       &client_target_info);
-
-                                       result = NET_NFC_OK;
-                               } else {
-                                       DEBUG_CLIENT_MSG("The detected target is filtered out");
-
-                                       result = NET_NFC_NOT_CONNECTED;
-                               }
-                       } else {
-                               result = NET_NFC_NOT_CONNECTED;
-                       }
-               }
-       } else {
-               result = NET_NFC_OK;
-       }
-
-       if (result == NET_NFC_OK && info != NULL) {
-               *info = client_target_info;
-       }
-
-       return result;
-}
-
-NET_NFC_EXPORT_API
-net_nfc_error_e net_nfc_client_tag_get_current_target_handle_sync(
-                                       net_nfc_target_handle_h *handle)
-{
-       net_nfc_target_info_s *info;
-       net_nfc_error_e result;
-       net_nfc_target_type_e out_dev_type = NET_NFC_UNKNOWN_TARGET;
-       gboolean out_is_connected = false;
-       guint out_handle = 0;
-       GError *error = NULL;
-
-       if (tag_proxy == NULL)
-               return NET_NFC_NOT_INITIALIZED;
-
-       /* prevent executing daemon when nfc is off */
-       if (net_nfc_client_manager_is_activated() == false) {
-               return NET_NFC_NOT_ACTIVATED;
-       }
-
-       info = net_nfc_client_tag_get_client_target_info();
-       if (info == NULL) {
-               if (net_nfc_gdbus_tag_call_get_current_target_handle_sync(
-                       tag_proxy,
-                       &result,
-                       &out_is_connected,
-                       &out_handle,
-                       (gint *)&out_dev_type,
-                       NULL,
-                       &error) == FALSE)
-               {
-                       DEBUG_ERR_MSG("Can no get current_target_handle result: %s",
-                                       error->message);
-                       result = NET_NFC_IPC_FAIL;
-
-                       g_error_free(error);
-
-                       return result;
-               }
-
-               if (result == NET_NFC_OK) {
-                       if (out_is_connected == true) {
-                               if (handle)
-                                       *handle = GUINT_TO_POINTER(out_handle);
-
-                               result = NET_NFC_OK;
-                       } else {
-                               result = NET_NFC_NOT_CONNECTED;
-                       }
-               }
-       } else if (info->devType == NET_NFC_NFCIP1_INITIATOR ||
-               info->devType == NET_NFC_NFCIP1_TARGET) {
-               if (handle)
-                       *handle = info->handle;
-
-               result = NET_NFC_OK;
-       } else {
-               result = NET_NFC_NOT_CONNECTED;
-       }
-
-       return result;
-}
-
-NET_NFC_EXPORT_API
-void net_nfc_client_tag_set_tag_discovered(
-                       net_nfc_client_tag_tag_discovered callback,
-                       void *user_data)
-{
-       if (callback == NULL)
-               return;
-
-       if (tag_proxy == NULL)
-       {
-               if (net_nfc_client_tag_init() != NET_NFC_OK)
-               {
-                       DEBUG_ERR_MSG("tag_proxy fail");
-                       /* FIXME : return result of this error */
-                       return;
-               }
-       }
-
-       tag_discovered_func_data.callback = (gpointer)callback;
-       tag_discovered_func_data.user_data = user_data;
-}
-
-NET_NFC_EXPORT_API
-void net_nfc_client_tag_unset_tag_discovered(void)
-{
-       tag_discovered_func_data.callback = NULL;
-       tag_discovered_func_data.user_data = NULL;
-}
-
-NET_NFC_EXPORT_API
-void net_nfc_client_tag_set_tag_detached(
-                       net_nfc_client_tag_tag_detached callback,
-                       void *user_data)
-{
-       if (callback == NULL)
-               return;
-
-       if (tag_proxy == NULL)
-       {
-               if (net_nfc_client_tag_init() != NET_NFC_OK)
-               {
-                       DEBUG_ERR_MSG("tag_proxy fail");
-                       /* FIXME : return result of this error */
-                       return;
-               }
-       }
-
-       tag_detached_func_data.callback = (gpointer)callback;
-       tag_detached_func_data.user_data = user_data;
-}
-
-NET_NFC_EXPORT_API
-void net_nfc_client_tag_unset_tag_detached(void)
-{
-       tag_detached_func_data.callback = NULL;
-       tag_detached_func_data.user_data = NULL;
-}
-
-NET_NFC_EXPORT_API
-void net_nfc_client_tag_set_filter(net_nfc_event_filter_e filter)
-{
-       client_filter = filter;
-}
-
-NET_NFC_EXPORT_API
-net_nfc_event_filter_e net_nfc_client_tag_get_filter(void)
-{
-       return client_filter;
-}
-
-net_nfc_error_e net_nfc_client_tag_init(void)
-{
-       GError *error = NULL;
-
-       if (tag_proxy)
-       {
-               DEBUG_CLIENT_MSG("Alrady initialized");
-
-               return NET_NFC_OK;
-       }
-
-       if (client_target_info)
-       {
-               net_nfc_release_tag_info(
-                               (net_nfc_target_info_h)client_target_info);
-               client_target_info = NULL;
-       }
-
-       client_filter = NET_NFC_ALL_ENABLE;
-
-       tag_proxy = net_nfc_gdbus_tag_proxy_new_for_bus_sync(
-                               G_BUS_TYPE_SYSTEM,
-                               G_DBUS_PROXY_FLAGS_DO_NOT_AUTO_START,
-                               "org.tizen.NetNfcService",
-                               "/org/tizen/NetNfcService/Tag",
-                               NULL,
-                               &error);
-       if (tag_proxy == NULL)
-       {
-               DEBUG_ERR_MSG("Can not create proxy : %s", error->message);
-               g_error_free(error);
-
-               return NET_NFC_UNKNOWN_ERROR;
-       }
-
-       g_signal_connect(tag_proxy, "tag-discovered",
-                       G_CALLBACK(tag_tag_discovered), NULL);
-
-       g_signal_connect(tag_proxy, "tag-detached",
-                       G_CALLBACK(tag_tag_detached), NULL);
-
-       return NET_NFC_OK;
-}
-
-void net_nfc_client_tag_deinit(void)
-{
-       client_filter = NET_NFC_ALL_ENABLE;
-
-       net_nfc_release_tag_info((net_nfc_target_info_h)client_target_info);
-       client_target_info = NULL;
-
-       net_nfc_client_tag_unset_tag_discovered();
-       net_nfc_client_tag_unset_tag_detached();
-
-       if (tag_proxy)
-       {
-               g_object_unref(tag_proxy);
-               tag_proxy = NULL;
-       }
-}
diff --git a/test/src/net_nfc_client_tag_felica.c b/test/src/net_nfc_client_tag_felica.c
deleted file mode 100755 (executable)
index 9d0226a..0000000
+++ /dev/null
@@ -1,524 +0,0 @@
-/*
- * Copyright (c) 2012, 2013 Samsung Electronics Co., Ltd.
- *
- * Licensed under the Flora License, Version 1.1 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
-
- *     http://floralicense.org/license/
- *
- * 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.
- */
-
-#include <glib.h>
-#include <string.h>
-
-#include "net_nfc_client_tag_felica.h"
-#include "net_nfc_client_tag_internal.h"
-
-#include "net_nfc_typedef_internal.h"
-#include "net_nfc_debug_internal.h"
-#include "net_nfc_util_internal.h"
-#include "net_nfc_target_info.h"
-
-#ifndef NET_NFC_EXPORT_API
-#define NET_NFC_EXPORT_API __attribute__((visibility("default")))
-#endif
-
-#define FELICA_CMD_POLL 0x00
-#define FELICA_CMD_REQ_SERVICE 0x02
-#define FELICA_CMD_REQ_RESPONSE 0x04
-#define FELICA_CMD_READ_WITHOUT_ENC 0x06
-#define FELICA_CMD_WRITE_WITHOUT_ENC 0x08
-#define FELICA_CMD_REQ_SYSTEM_CODE 0x0C
-#define FELICA_TAG_KEY "IDm"
-
-NET_NFC_EXPORT_API
-net_nfc_error_e net_nfc_client_felica_poll(net_nfc_target_handle_h handle,
-                               net_nfc_felica_poll_request_code_e req_code,
-                               uint8_t time_slote,
-                               nfc_transceive_data_callback callback,
-                               void *user_data)
-{
-       net_nfc_target_info_s* target_info = NULL;
-
-       data_s rawdata;
-
-       uint8_t send_buffer[6] = { 0x00, };
-
-       if (handle == NULL)
-               return NET_NFC_NULL_PARAMETER;
-
-       if(net_nfc_client_tag_is_connected() == FALSE)
-               return NET_NFC_OPERATION_FAIL;
-
-       target_info = net_nfc_client_tag_get_client_target_info();
-       if (target_info == NULL)
-               return NET_NFC_NO_DATA_FOUND;
-
-       if (target_info->devType != NET_NFC_FELICA_PICC)
-       {
-               DEBUG_CLIENT_MSG("only felica tag is available");
-               return NET_NFC_NOT_ALLOWED_OPERATION;
-       }
-
-       /* total size of requet command */
-       send_buffer[0] = 0x06;
-       send_buffer[1] = FELICA_CMD_POLL;
-
-       /* use wild card for system code */
-       send_buffer[2] = 0xff;
-       send_buffer[3] = 0xff;
-
-       send_buffer[4] = req_code;
-       send_buffer[5] = time_slote;
-
-       DEBUG_MSG_PRINT_BUFFER(send_buffer, 6);
-
-       rawdata.buffer = send_buffer;
-       rawdata.length = 6;
-
-       return net_nfc_client_transceive_data(handle,
-                                       (data_h)&rawdata,
-                                       callback,
-                                       user_data);
-}
-
-NET_NFC_EXPORT_API
-net_nfc_error_e net_nfc_client_felica_request_service(
-                                       net_nfc_target_handle_h handle,
-                                       uint8_t number_of_area_service,
-                                       uint16_t area_service_list[],
-                                       uint8_t number_of_services,
-                                       nfc_transceive_data_callback callback,
-                                       void *user_data)
-{
-       net_nfc_target_info_s* target_info = NULL;
-
-       data_s rawdata;
-
-       data_h IDm = NULL;
-
-       uint32_t send_buffer_length;
-       uint8_t* send_buffer = NULL;
-       uint8_t* temp = NULL;
-
-       int i;
-
-       if (handle == NULL || area_service_list == NULL)
-               return NET_NFC_NULL_PARAMETER;
-
-       if(net_nfc_client_tag_is_connected() == FALSE)
-               return NET_NFC_OPERATION_FAIL;
-
-       target_info = net_nfc_client_tag_get_client_target_info();
-       if (target_info == NULL)
-               return NET_NFC_NO_DATA_FOUND;
-
-       if (target_info->devType != NET_NFC_FELICA_PICC)
-       {
-               DEBUG_CLIENT_MSG("only felica tag is available");
-               return NET_NFC_NOT_ALLOWED_OPERATION;
-       }
-
-       if (net_nfc_get_tag_info_value((net_nfc_target_info_h)target_info,
-                               FELICA_TAG_KEY,
-                               &IDm) != NET_NFC_OK)
-       {
-               return NET_NFC_NO_DATA_FOUND;
-       }
-
-       if (((data_s*)IDm)->length != 8)
-               return NET_NFC_OUT_OF_BOUND;
-
-       if (number_of_area_service > 32)
-               return NET_NFC_OUT_OF_BOUND;
-
-       /* size + cmd + UID + number of service service count + service list */
-       send_buffer_length = 1 + 1 + 8 + 1 + (2 * number_of_services);
-
-       _net_nfc_util_alloc_mem(send_buffer, send_buffer_length * sizeof(uint8_t));
-       if (send_buffer == NULL)
-               return NET_NFC_ALLOC_FAIL;
-
-       temp = send_buffer;
-
-       /* set cmd length */
-       *send_buffer = send_buffer_length;
-       send_buffer++;
-
-       /* set cmd */
-       *send_buffer = FELICA_CMD_REQ_SERVICE;
-       send_buffer++;
-
-       /* set IDm */
-       memcpy(send_buffer, ((data_s*)IDm)->buffer, ((data_s*)IDm)->length);
-       send_buffer = send_buffer + ((data_s*)IDm)->length;
-
-       /* set the number of service codes */
-       *send_buffer = number_of_area_service;
-       send_buffer++;
-
-       for (i = 0; i < number_of_services; i++)
-       {
-               memcpy(send_buffer, &area_service_list[i], sizeof(uint16_t));
-               send_buffer = send_buffer + 2;
-       }
-
-       DEBUG_MSG_PRINT_BUFFER(temp, send_buffer_length);
-
-       rawdata.buffer = send_buffer;
-       rawdata.length = send_buffer_length;
-
-       net_nfc_error_e result = NET_NFC_OK;
-       result = net_nfc_client_transceive_data(handle,
-                                       (data_h)&rawdata,
-                                       callback,
-                                       user_data);
-
-       if (temp != NULL)
-               _net_nfc_util_free_mem(temp);
-
-       return result;
-}
-
-NET_NFC_EXPORT_API
-net_nfc_error_e net_nfc_client_felica_request_response(
-                                       net_nfc_target_handle_h handle,
-                                       nfc_transceive_data_callback callback,
-                                       void *user_data)
-{
-       net_nfc_target_info_s* target_info = NULL;
-
-       data_s rawdata;
-
-       data_h IDm = NULL;
-
-       uint8_t send_buffer[10] = { 0x00, };
-
-       if (handle == NULL)
-               return NET_NFC_NULL_PARAMETER;
-
-       if(net_nfc_client_tag_is_connected() == FALSE)
-               return NET_NFC_OPERATION_FAIL;
-
-       target_info = net_nfc_client_tag_get_client_target_info();
-       if (target_info == NULL)
-               return NET_NFC_NO_DATA_FOUND;
-
-       if (target_info->devType != NET_NFC_FELICA_PICC)
-       {
-               DEBUG_CLIENT_MSG("only felica tag is available");
-               return NET_NFC_NOT_ALLOWED_OPERATION;
-       }
-
-       if (net_nfc_get_tag_info_value((net_nfc_target_info_h)target_info,
-                               FELICA_TAG_KEY,
-                               &IDm) != NET_NFC_OK)
-       {
-               return NET_NFC_NO_DATA_FOUND;
-       }
-
-       if (((data_s*)IDm)->length != 8)
-               return NET_NFC_OUT_OF_BOUND;
-
-       send_buffer[0] = 0xA;
-       send_buffer[1] = FELICA_CMD_REQ_RESPONSE;
-
-       memcpy(send_buffer + 2,
-               ((data_s*)IDm)->buffer,
-               ((data_s*)IDm)->length);
-
-       DEBUG_MSG_PRINT_BUFFER(send_buffer, 10);
-
-       rawdata.buffer = send_buffer;
-       rawdata.length = 10;
-
-       return net_nfc_client_transceive_data(handle,
-                                       (data_h)&rawdata,
-                                       callback,
-                                       user_data);
-}
-
-NET_NFC_EXPORT_API
-net_nfc_error_e net_nfc_client_felica_read_without_encryption(
-                                       net_nfc_target_handle_h handle,
-                                       uint8_t number_of_services,
-                                       uint16_t service_list[],
-                                       uint8_t number_of_blocks,
-                                       uint8_t block_list[],
-                                       nfc_transceive_data_callback callback,
-                                       void *user_data)
-{
-       net_nfc_target_info_s* target_info = NULL;
-
-       data_s rawdata;
-
-       data_h IDm = NULL;
-
-       uint32_t send_buffer_length;
-       uint8_t* send_buffer = NULL;
-       uint8_t* temp = NULL;
-
-       int i;
-
-       if (handle == NULL || service_list == NULL || block_list == NULL)
-               return NET_NFC_NULL_PARAMETER;
-
-       if(net_nfc_client_tag_is_connected() == FALSE)
-               return NET_NFC_OPERATION_FAIL;
-
-       target_info = net_nfc_client_tag_get_client_target_info();
-       if (target_info == NULL)
-               return NET_NFC_NO_DATA_FOUND;
-
-       if (target_info->devType != NET_NFC_FELICA_PICC)
-       {
-               DEBUG_CLIENT_MSG("only felica tag is available");
-               return NET_NFC_NOT_ALLOWED_OPERATION;
-       }
-
-       if (net_nfc_get_tag_info_value((net_nfc_target_info_h)target_info,
-                               FELICA_TAG_KEY,
-                               &IDm) != NET_NFC_OK)
-       {
-               return NET_NFC_NO_DATA_FOUND;
-       }
-
-       if (((data_s*)IDm)->length != 8)
-               return NET_NFC_OUT_OF_BOUND;
-
-       if (number_of_services > 16)
-               return NET_NFC_OUT_OF_BOUND;
-
-       send_buffer_length = 1 + 1 + 8 + 1 + (2 * number_of_services)
-                               + 1 + number_of_blocks;
-
-       _net_nfc_util_alloc_mem(send_buffer,
-                       send_buffer_length * sizeof(uint8_t));
-       if (send_buffer == NULL)
-               return NET_NFC_ALLOC_FAIL;
-
-       temp = send_buffer;
-
-       *send_buffer = send_buffer_length;
-       send_buffer++;
-
-       *send_buffer = FELICA_CMD_READ_WITHOUT_ENC;
-       send_buffer++;
-
-       memcpy(send_buffer, ((data_s*)IDm)->buffer, ((data_s*)IDm)->length);
-       send_buffer = send_buffer + ((data_s*)IDm)->length;
-
-       *send_buffer = number_of_services;
-       send_buffer++;
-
-       for (i = 0; i < number_of_services; i++)
-       {
-               memcpy(send_buffer, &service_list[i], sizeof(uint16_t));
-               send_buffer = send_buffer + 2;
-       }
-
-       *send_buffer = number_of_blocks;
-       send_buffer++;
-
-       for (i = 0; i < number_of_blocks; i++)
-       {
-               memcpy(send_buffer, &block_list[i], sizeof(uint8_t));
-               send_buffer++;
-       }
-
-       DEBUG_MSG_PRINT_BUFFER(temp, send_buffer_length);
-
-       rawdata.buffer = temp;
-       rawdata.length = send_buffer_length;
-
-       net_nfc_error_e result = NET_NFC_OK;
-       result = net_nfc_client_transceive_data(handle,
-                                               (data_h)&rawdata,
-                                               callback,
-                                               user_data);
-
-       if (temp != NULL)
-               _net_nfc_util_free_mem(temp);
-
-       return result;
-}
-
-NET_NFC_EXPORT_API
-net_nfc_error_e net_nfc_client_felica_write_without_encryption(
-                                       net_nfc_target_handle_h handle,
-                                       uint8_t number_of_services,
-                                       uint16_t service_list[],
-                                       uint8_t number_of_blocks,
-                                       uint8_t block_list[],
-                                       data_h data,
-                                       nfc_transceive_data_callback callback,
-                                       void *user_data)
-{
-       net_nfc_target_info_s* target_info = NULL;
-
-       data_s rawdata;
-
-       data_h IDm = NULL;
-
-       uint32_t send_buffer_length;
-       uint8_t* send_buffer = NULL;
-       uint8_t* temp = NULL;
-
-       int i;
-
-       if (handle == NULL || service_list == NULL ||
-                       block_list == NULL || data == NULL)
-       {
-               return NET_NFC_NULL_PARAMETER;
-       }
-
-       if(net_nfc_client_tag_is_connected() == FALSE)
-               return NET_NFC_OPERATION_FAIL;
-       target_info = net_nfc_client_tag_get_client_target_info();
-       if (target_info == NULL)
-               return NET_NFC_NO_DATA_FOUND;
-
-       if (target_info->devType != NET_NFC_FELICA_PICC)
-       {
-               DEBUG_CLIENT_MSG("only felica tag is available");
-               return NET_NFC_NOT_ALLOWED_OPERATION;
-       }
-
-       if (net_nfc_get_tag_info_value((net_nfc_target_info_h)target_info,
-                               FELICA_TAG_KEY,
-                               &IDm) != NET_NFC_OK)
-       {
-               return NET_NFC_NO_DATA_FOUND;
-       }
-
-       if (((data_s*)IDm)->length != 8)
-               return NET_NFC_OUT_OF_BOUND;
-
-       if (number_of_services > 16)
-               return NET_NFC_OUT_OF_BOUND;
-
-       if (((data_s*)data)->length > 16 * number_of_blocks)
-               return NET_NFC_OUT_OF_BOUND;
-
-       send_buffer_length = 1 + 1 + 8 + 1 + (2 * number_of_services)
-                               + 1 + number_of_blocks
-                               +((data_s*)data)->length;
-
-       _net_nfc_util_alloc_mem(send_buffer,
-                       send_buffer_length * sizeof(uint8_t));
-       if (send_buffer == NULL)
-               return NET_NFC_ALLOC_FAIL;
-
-       temp = send_buffer;
-
-       *send_buffer = send_buffer_length;
-       send_buffer++;
-
-       *send_buffer = FELICA_CMD_WRITE_WITHOUT_ENC;
-       send_buffer++;
-
-       memcpy(send_buffer, ((data_s*)IDm)->buffer, ((data_s*)IDm)->length);
-       send_buffer = send_buffer + ((data_s*)IDm)->length;
-
-       *send_buffer = number_of_services;
-       send_buffer++;
-
-       for (i = 0; i < number_of_services; i++)
-       {
-               memcpy(send_buffer, &service_list[i], sizeof(uint16_t));
-               send_buffer = send_buffer + 2;
-       }
-
-       *send_buffer = number_of_blocks;
-       send_buffer++;
-
-       for (i = 0; i < number_of_blocks; i++)
-       {
-               memcpy(send_buffer, &block_list[i], sizeof(uint8_t));
-               send_buffer++;
-       }
-
-       memcpy(send_buffer, ((data_s*)data)->buffer, ((data_s*)data)->length);
-
-       DEBUG_MSG_PRINT_BUFFER(temp, send_buffer_length);
-
-       rawdata.buffer = temp;
-       rawdata.length = send_buffer_length;
-
-       net_nfc_error_e result = NET_NFC_OK;
-
-       result = net_nfc_client_transceive_data(handle,
-                                               (data_h)&rawdata,
-                                               callback,
-                                               user_data);
-
-       if (temp != NULL)
-               _net_nfc_util_free_mem(temp);
-
-       return result;
-}
-
-NET_NFC_EXPORT_API
-net_nfc_error_e net_nfc_client_felica_request_system_code(
-                                       net_nfc_target_handle_h handle,
-                                       nfc_transceive_data_callback callback,
-                                       void *user_data)
-{
-       net_nfc_target_info_s* target_info = NULL;
-
-       data_s rawdata;
-
-       data_h IDm = NULL;
-
-       uint8_t send_buffer[10] = { 0x00, };
-
-       if (handle == NULL)
-               return NET_NFC_NULL_PARAMETER;
-
-       if(net_nfc_client_tag_is_connected() == FALSE)
-               return NET_NFC_OPERATION_FAIL;
-
-       target_info = net_nfc_client_tag_get_client_target_info();
-       if (target_info == NULL)
-               return NET_NFC_NO_DATA_FOUND;
-
-       if (target_info->devType != NET_NFC_FELICA_PICC)
-       {
-               DEBUG_CLIENT_MSG("only felica tag is available");
-               return NET_NFC_NOT_ALLOWED_OPERATION;
-       }
-
-       if (net_nfc_get_tag_info_value((net_nfc_target_info_h)target_info,
-                               FELICA_TAG_KEY,
-                               &IDm) != NET_NFC_OK)
-       {
-               return NET_NFC_NO_DATA_FOUND;
-       }
-
-       if (((data_s*)IDm)->length != 8)
-               return NET_NFC_OUT_OF_BOUND;
-
-
-       send_buffer[0] = 0xA;
-       send_buffer[1] = FELICA_CMD_REQ_SYSTEM_CODE;
-
-       memcpy(send_buffer + 2,
-               ((data_s *)IDm)->buffer,
-               ((data_s *)IDm)->length);
-
-       DEBUG_MSG_PRINT_BUFFER(send_buffer, 10);
-
-       rawdata.buffer = send_buffer;
-       rawdata.length = 10;
-
-       return net_nfc_client_transceive_data(handle,
-                                       (data_h)&rawdata,
-                                       callback,
-                                       user_data);
-}
diff --git a/test/src/net_nfc_client_tag_jewel.c b/test/src/net_nfc_client_tag_jewel.c
deleted file mode 100755 (executable)
index c044c5a..0000000
+++ /dev/null
@@ -1,363 +0,0 @@
-/*
- * Copyright (c) 2012, 2013 Samsung Electronics Co., Ltd.
- *
- * Licensed under the Flora License, Version 1.1 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://floralicense.org/license/
- *
- * 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.
- */
-
-#include <glib.h>
-#include <string.h>
-
-#include "net_nfc_client_tag_jewel.h"
-#include "net_nfc_client_tag_internal.h"
-
-#include "net_nfc_typedef_internal.h"
-#include "net_nfc_debug_internal.h"
-#include "net_nfc_util_internal.h"
-#include "net_nfc_target_info.h"
-
-
-#ifndef NET_NFC_EXPORT_API
-#define NET_NFC_EXPORT_API __attribute__((visibility("default")))
-#endif
-
-
-#define JEWEL_CMD_REQA 0x26
-#define JEWEL_CMD_WUPA 0x52
-#define JEWEL_CMD_RID 0x78
-#define JEWEL_CMD_RALL 0x00
-#define JEWEL_CMD_READ 0x01
-#define JEWEL_CMD_WRITE_E 0x53
-#define JEWEL_CMD_WRITE_NE 0x1A
-#define JEWEL_TAG_KEY  "UID"
-
-NET_NFC_EXPORT_API
-net_nfc_error_e net_nfc_client_jewel_read_id(net_nfc_target_handle_h handle,
-                                       nfc_transceive_data_callback callback,
-                                       void *user_data)
-{
-       net_nfc_target_info_s* target_info = NULL;
-
-       data_s rawdata;
-
-       uint8_t send_buffer[9] = {0x00, };
-
-       if(handle == NULL)
-               return NET_NFC_NULL_PARAMETER;
-
-       if(net_nfc_client_tag_is_connected() == FALSE)
-               return NET_NFC_OPERATION_FAIL;
-
-       target_info = net_nfc_client_tag_get_client_target_info();
-       if (target_info == NULL)
-               return NET_NFC_NO_DATA_FOUND;
-
-       if(target_info->devType != NET_NFC_JEWEL_PICC)
-       {
-               DEBUG_CLIENT_MSG("only Jewel tag is available");
-               return NET_NFC_NOT_ALLOWED_OPERATION;
-       }
-
-       send_buffer[0] = JEWEL_CMD_RID;
-
-       net_nfc_util_compute_CRC(CRC_B, send_buffer, 9);
-
-       DEBUG_MSG_PRINT_BUFFER(send_buffer, 9);
-
-       rawdata.buffer = send_buffer;
-       rawdata.length = 9;
-
-       return net_nfc_client_transceive_data(handle,
-                                       (data_h)&rawdata,
-                                       callback,
-                                       user_data);
-}
-
-NET_NFC_EXPORT_API
-net_nfc_error_e net_nfc_client_jewel_read_byte(net_nfc_target_handle_h handle,
-                                       uint8_t block,
-                                       uint8_t byte,
-                                       nfc_transceive_data_callback callback,
-                                       void *user_data)
-{
-       net_nfc_target_info_s* target_info = NULL;
-
-       data_s rawdata;
-
-       data_h UID = NULL;
-
-       uint8_t send_buffer[9] = {0x00, };
-
-       if(handle == NULL)
-               return NET_NFC_NULL_PARAMETER;
-
-       if(block > 0xE || byte > 0x7 )
-               return NET_NFC_OUT_OF_BOUND;
-
-       if(net_nfc_client_tag_is_connected() == FALSE)
-               return NET_NFC_OPERATION_FAIL;
-
-       target_info = net_nfc_client_tag_get_client_target_info();
-       if (target_info == NULL)
-               return NET_NFC_NO_DATA_FOUND;
-
-       if(target_info->devType != NET_NFC_JEWEL_PICC)
-       {
-               DEBUG_CLIENT_MSG("only Jewel tag is available");
-               return NET_NFC_NOT_ALLOWED_OPERATION;
-       }
-
-       if(net_nfc_get_tag_info_value((net_nfc_target_info_h)target_info,
-                               JEWEL_TAG_KEY,
-                               &UID) != NET_NFC_OK)
-       {
-               return NET_NFC_NO_DATA_FOUND;
-       }
-
-
-       if(((data_s*)UID)->length != 4)
-               return NET_NFC_OUT_OF_BOUND;
-
-       /* command */
-       send_buffer[0] = JEWEL_CMD_READ;
-
-       /* addr */
-       send_buffer[1] = (((block << 3) & 0x78) | (byte & 0x7));
-
-       /* data */
-       send_buffer[2] = 0x00;
-
-       /* UID0 ~ 3 */
-       memcpy(&(send_buffer[3]),
-               ((data_s*)UID)->buffer,
-               ((data_s*)UID)->length);
-
-       net_nfc_util_compute_CRC(CRC_B, send_buffer, 9);
-
-       DEBUG_MSG_PRINT_BUFFER(send_buffer, 9);
-
-       rawdata.buffer = send_buffer;
-       rawdata.length = 9;
-
-       return net_nfc_client_transceive_data(handle,
-                                       (data_h)&rawdata,
-                                       callback,
-                                       user_data);
-}
-
-NET_NFC_EXPORT_API
-net_nfc_error_e net_nfc_client_jewel_read_all(net_nfc_target_handle_h handle,
-                                       nfc_transceive_data_callback callback,
-                                       void *user_data)
-{
-       net_nfc_target_info_s* target_info = NULL;
-
-       data_s rawdata;
-
-       data_h UID = NULL;
-
-       uint8_t send_buffer[9] = {0x00, };
-
-       if(handle == NULL )
-               return NET_NFC_NULL_PARAMETER;
-
-       if(net_nfc_client_tag_is_connected() == FALSE)
-               return NET_NFC_OPERATION_FAIL;
-
-       target_info = net_nfc_client_tag_get_client_target_info();
-       if (target_info == NULL)
-               return NET_NFC_NO_DATA_FOUND;
-
-       if(target_info->devType != NET_NFC_JEWEL_PICC)
-       {
-               DEBUG_CLIENT_MSG("only Jewel tag is available");
-               return NET_NFC_NOT_ALLOWED_OPERATION;
-       }
-
-       if(net_nfc_get_tag_info_value((net_nfc_target_info_h)target_info,
-                               JEWEL_TAG_KEY,
-                               &UID) != NET_NFC_OK)
-       {
-               return NET_NFC_NO_DATA_FOUND;
-       }
-
-       if(((data_s*)UID)->length != 4)
-               return NET_NFC_OUT_OF_BOUND;
-
-       /* command */
-       send_buffer[0] = JEWEL_CMD_RALL;
-
-       /* addr */
-       send_buffer[1] = 0x00;
-
-       /* data */
-       send_buffer[2] = 0x00;
-
-       /* UID0 ~ 3 */
-       memcpy(&(send_buffer[3]),
-               ((data_s*)UID)->buffer,
-               ((data_s*)UID)->length);
-
-       net_nfc_util_compute_CRC(CRC_B, send_buffer, 9);
-
-       DEBUG_MSG_PRINT_BUFFER(send_buffer, 9);
-
-       rawdata.buffer = send_buffer;
-       rawdata.length = 9;
-
-       return net_nfc_client_transceive_data(handle,
-                                       (data_h)&rawdata,
-                                       callback,
-                                       user_data);
-}
-
-NET_NFC_EXPORT_API
-net_nfc_error_e net_nfc_client_jewel_write_with_erase(
-                                       net_nfc_target_handle_h handle,
-                                       uint8_t block,
-                                       uint8_t byte,
-                                       uint8_t data,
-                                       nfc_transceive_callback callback,
-                                       void *user_data)
-{
-       net_nfc_target_info_s* target_info = NULL;
-
-       data_s rawdata;
-
-       data_h UID = NULL;
-
-       uint8_t send_buffer[9] = {0x00, };
-
-       if(handle == NULL)
-               return NET_NFC_NULL_PARAMETER;
-
-       if(block > 0xE || byte > 0x7 )
-               return NET_NFC_OUT_OF_BOUND;
-
-       if(net_nfc_client_tag_is_connected() == FALSE)
-               return NET_NFC_OPERATION_FAIL;
-
-
-       target_info = net_nfc_client_tag_get_client_target_info();
-       if (target_info == NULL)
-               return NET_NFC_NO_DATA_FOUND;
-
-       if(net_nfc_get_tag_info_value((net_nfc_target_info_h)target_info,
-                               JEWEL_TAG_KEY,
-                               &UID) != NET_NFC_OK)
-       {
-               return NET_NFC_NO_DATA_FOUND;
-       }
-
-       if(((data_s*)UID)->length != 4)
-               return NET_NFC_OUT_OF_BOUND;
-
-       /* command */
-       send_buffer[0] = JEWEL_CMD_WRITE_E;
-
-       /* addr */
-       send_buffer[1] = (((block << 3) & 0x78) | (byte & 0x7));
-
-       /* data */
-       send_buffer[2] = data;
-
-       /* UID0 ~ 3 */
-       memcpy(&(send_buffer[3]),
-               ((data_s*)UID)->buffer,
-               ((data_s*)UID)->length);
-
-       net_nfc_util_compute_CRC(CRC_B, send_buffer, 9);
-
-       DEBUG_MSG_PRINT_BUFFER(send_buffer, 9);
-
-       rawdata.buffer = send_buffer;
-       rawdata.length = 9;
-
-       return net_nfc_client_transceive(handle,
-                                       (data_h)&rawdata,
-                                       callback,
-                                       user_data);
-
-}
-
-NET_NFC_EXPORT_API
-net_nfc_error_e net_nfc_client_jewel_write_with_no_erase(
-                                       net_nfc_target_handle_h handle,
-                                       uint8_t block,
-                                       uint8_t byte,
-                                       uint8_t data,
-                                       nfc_transceive_callback callback,
-                                       void *user_data)
-{
-       net_nfc_target_info_s* target_info = NULL;
-
-       data_s rawdata;
-
-       data_h UID = NULL;
-
-       uint8_t send_buffer[9] = {0x00, };
-
-       if(handle == NULL)
-               return NET_NFC_NULL_PARAMETER;
-
-       if(block > 0xE || byte > 0x7 )
-               return NET_NFC_OUT_OF_BOUND;
-
-       if(net_nfc_client_tag_is_connected() == FALSE)
-               return NET_NFC_OPERATION_FAIL;
-
-       target_info = net_nfc_client_tag_get_client_target_info();
-       if (target_info == NULL)
-               return NET_NFC_NO_DATA_FOUND;
-
-       if(target_info->devType != NET_NFC_JEWEL_PICC)
-       {
-               DEBUG_CLIENT_MSG("only Jewel tag is available");
-               return NET_NFC_NOT_ALLOWED_OPERATION;
-       }
-
-       if(net_nfc_get_tag_info_value((net_nfc_target_info_h)target_info,
-                               JEWEL_TAG_KEY,
-                               &UID) != NET_NFC_OK)
-       {
-               return NET_NFC_NO_DATA_FOUND;
-       }
-
-       if(((data_s*)UID)->length != 4)
-               return NET_NFC_OUT_OF_BOUND;
-
-       /* command */
-       send_buffer[0] = JEWEL_CMD_WRITE_NE;
-
-       /* addr */
-       send_buffer[1] = (((block << 3) & 0x78) | (byte & 0x7));
-
-       /* data */
-       send_buffer[2] = data;
-
-       /* UID0 ~ 3 */
-       memcpy(&(send_buffer[3]),
-               ((data_s*)UID)->buffer,
-               ((data_s*)UID)->length);
-
-       net_nfc_util_compute_CRC(CRC_B, send_buffer, 9);
-
-       DEBUG_MSG_PRINT_BUFFER(send_buffer, 9);
-
-       rawdata.buffer = send_buffer;
-       rawdata.length = 9;
-
-       return net_nfc_client_transceive(handle,
-                                       (data_h)&rawdata,
-                                       callback,
-                                       user_data);
-}
diff --git a/test/src/net_nfc_client_tag_mifare.c b/test/src/net_nfc_client_tag_mifare.c
deleted file mode 100755 (executable)
index c98e39e..0000000
+++ /dev/null
@@ -1,937 +0,0 @@
-/*
- * Copyright (c) 2012, 2013 Samsung Electronics Co., Ltd.
- *
- * Licensed under the Flora License, Version 1.1 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
-
- *     http://floralicense.org/license/
- *
- * 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.
- */
-#include <glib.h>
-#include <string.h>
-
-#include "net_nfc_client_transceive.h"
-#include "net_nfc_client_tag_internal.h"
-
-#include "net_nfc_tag_mifare.h"
-
-#include "net_nfc_data.h"
-#include "net_nfc_typedef_internal.h"
-#include "net_nfc_debug_internal.h"
-#include "net_nfc_target_info.h"
-#include "net_nfc_util_internal.h"
-
-#ifndef NET_NFC_EXPORT_API
-#define NET_NFC_EXPORT_API __attribute__((visibility("default")))
-#endif
-
-#define MIFARE_CMD_RAW                 0x00U
-#define MIFARE_CMD_AUTH_A              0x60U /**< authenticate with key A */
-#define MIFARE_CMD_AUTH_B              0x61U /**< authenticate with key B */
-#define MIFARE_CMD_READ                        0x30U /**< read 16 bytes */
-#define MIFARE_CMD_WRITE_BLOCK         0xA0U /**< write 16 bytes */
-#define MIFARE_CMD_WRITE_PAGE          0xA2U /**< write 4 bytes */
-#define MIFARE_CMD_INCREMENT           0xC1U /**< Increment. */
-#define MIFARE_CMD_DECREMENT           0xC0U /**< Decrement. */
-#define MIFARE_CMD_TRANSFER            0xB0U /**< Tranfer.   */
-#define MIFARE_CMD_RESTORE             0xC2U /**< Restore.   */
-#define MIFARE_TAG_KEY "UID"
-
-#define MIFARE_CMD_READ_SECTOR 0x38U /* read sector */
-#define MIFARE_CMD_WRITE_SECTOR        0xA8U /* write sector */
-
-static uint8_t default_key[6] = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff };
-static uint8_t mad_key[6] = { 0xA0, 0xA1, 0xA2, 0xA3, 0xA4, 0xA5 };
-static uint8_t net_nfc_forum_key[6] = { 0xD3, 0xF7, 0xD3, 0xF7, 0xD3, 0xF7 };
-
-#define MIFARE_BLOCK_4 4
-#define MIFARE_BLOCK_16 16
-
-#define MIFARE_MINI_SECTORS 5
-#define MIFARE_1K_SECTORS 16
-#define MIFARE_4K_SECTORS 40
-
-#define MIFARE_BLOCK_SIZE 16   /* 1 block is 16 byte */
-#define MIFARE_PAGE_SIZE 4     /* 1 page is 4 byte */
-
-
-NET_NFC_EXPORT_API
-net_nfc_error_e net_nfc_client_mifare_authenticate_with_keyA(
-                                               net_nfc_target_handle_h handle,
-                                               uint8_t sector,
-                                               data_h auth_key,
-                                               void *callback,
-                                               void *user_data)
-{
-       net_nfc_target_info_s* target_info = NULL;
-
-       data_s *key;
-       data_s rawdata;
-
-       data_h UID = NULL;
-
-       uint8_t* send_buffer = NULL;
-       uint8_t* temp = NULL;
-
-       int send_buffer_length = 0;
-
-       uint8_t sector_to_block = 0;
-
-
-       if (handle == NULL || auth_key == NULL)
-               return NET_NFC_NULL_PARAMETER;
-
-       if (net_nfc_client_tag_is_connected() == FALSE)
-               return NET_NFC_OPERATION_FAIL;
-
-       key = (data_s *)auth_key;
-
-       if (key->length != 6)
-               return NET_NFC_OUT_OF_BOUND;
-
-       target_info = net_nfc_client_tag_get_client_target_info();
-
-       if (target_info)
-       {
-               if (target_info->devType < NET_NFC_MIFARE_MINI_PICC ||
-                               target_info->devType > NET_NFC_MIFARE_4K_PICC)
-               {
-                       DEBUG_CLIENT_MSG("not a MIFARE Classic TAG");
-                       return NET_NFC_NOT_SUPPORTED;
-               }
-       }
-
-       if (net_nfc_get_tag_info_value((net_nfc_target_info_h)target_info,
-                                       MIFARE_TAG_KEY,
-                                       &UID) != NET_NFC_OK)
-       {
-               return NET_NFC_NO_DATA_FOUND;
-       }
-
-       switch (target_info->devType)
-       {
-       case NET_NFC_MIFARE_MINI_PICC :
-               {
-                       /* 0 ~ 4 : 5 sector and 4 block with 16 bytes */
-                       if (sector > MIFARE_MINI_SECTORS - 1)
-                               return NET_NFC_OUT_OF_BOUND;
-
-                       sector_to_block = sector * MIFARE_BLOCK_4 + 3;
-               }
-               break;
-       case NET_NFC_MIFARE_1K_PICC :
-               {
-                       /* 0 ~ 15 : 16 sector and 4 block with 16 bytes */
-                       if (sector > MIFARE_1K_SECTORS)
-                               return NET_NFC_OUT_OF_BOUND;
-
-                       sector_to_block = sector * MIFARE_BLOCK_4 + 3;
-               }
-               break;
-       case NET_NFC_MIFARE_4K_PICC :
-               {
-                       /* 0 ~ 31 : 32 sector and 4 block with 16 bytes
-                        * 32 ~ 39 : 8 sector and 16 block with 16 bytes
-                        */
-                       if (sector > MIFARE_4K_SECTORS)
-                               return NET_NFC_OUT_OF_BOUND;
-
-                       if (sector < 32)
-                               sector_to_block = sector * MIFARE_BLOCK_4 + 3;
-                       else
-                       {
-                               sector_to_block = (31 * MIFARE_BLOCK_4 + 3)
-                                               + (sector - 32)
-                                               * MIFARE_BLOCK_16 + 15;
-                       }
-               }
-               break;
-       default :
-               break;
-       }
-
-
-       /* cmd + addr + UID + AUTH_KEY + CRC_A */
-       send_buffer_length = 1 + 1 + ((data_s*)UID)->length
-                       + key->length + 2;
-
-       _net_nfc_util_alloc_mem(send_buffer,
-                       send_buffer_length * sizeof(uint8_t));
-       if (send_buffer == NULL)
-       {
-               net_nfc_free_data(UID);
-               return NET_NFC_ALLOC_FAIL;
-       }
-
-       temp = send_buffer;
-
-       *temp = MIFARE_CMD_AUTH_A;
-       temp++;
-
-       *temp = sector_to_block;
-       temp++;
-
-       memcpy(temp, ((data_s*)UID)->buffer, ((data_s*)UID)->length);
-       temp = temp + ((data_s*)UID)->length;
-
-       memcpy(temp, key->buffer, key->length);
-
-       net_nfc_util_compute_CRC(CRC_A, send_buffer, send_buffer_length);
-
-
-       rawdata.buffer = send_buffer;
-       rawdata.length = send_buffer_length;
-
-       net_nfc_error_e result = net_nfc_client_transceive(handle,
-                                                       (data_h)&rawdata,
-                                                       callback,
-                                                       user_data);
-
-       if (send_buffer != NULL)
-               _net_nfc_util_free_mem(send_buffer);
-
-       return result;
-}
-
-NET_NFC_EXPORT_API
-net_nfc_error_e net_nfc_client_mifare_authenticate_with_keyB(
-                                               net_nfc_target_handle_h handle,
-                                               uint8_t sector,
-                                               data_h auth_key,
-                                               void *callback,
-                                               void *user_data)
-{
-       net_nfc_target_info_s* target_info = NULL;
-
-       data_s *key;
-       data_s rawdata;
-
-       data_h UID = NULL;
-
-       uint8_t* send_buffer = NULL;
-       uint8_t* temp = NULL;
-
-       int send_buffer_length = 0;
-
-       uint8_t sector_to_block = 0;
-
-
-       if (handle == NULL || auth_key == NULL)
-               return NET_NFC_NULL_PARAMETER;
-
-       if (net_nfc_client_tag_is_connected() == FALSE)
-               return NET_NFC_OPERATION_FAIL;
-
-       key = (data_s *)auth_key;
-
-       if (key->length != 6)
-               return NET_NFC_OUT_OF_BOUND;
-
-       target_info = net_nfc_client_tag_get_client_target_info();
-
-       if (target_info != NULL)
-       {
-               if (target_info->devType < NET_NFC_MIFARE_MINI_PICC ||
-                               target_info->devType > NET_NFC_MIFARE_4K_PICC)
-               {
-                       DEBUG_CLIENT_MSG("not a MIFARE Classic TAG");
-                       return NET_NFC_NOT_SUPPORTED;
-               }
-       }
-
-       if (net_nfc_get_tag_info_value((net_nfc_target_info_h)target_info,
-                                       MIFARE_TAG_KEY,
-                                       &UID) != NET_NFC_OK)
-       {
-               return NET_NFC_NO_DATA_FOUND;
-       }
-
-       switch (target_info->devType)
-       {
-       case NET_NFC_MIFARE_MINI_PICC :
-               {
-                       /* 0 ~ 4 : 5 sector and 4 block with 16 bytes */
-                       if (sector > MIFARE_MINI_SECTORS)
-                               return NET_NFC_OUT_OF_BOUND;
-
-                       sector_to_block = sector * MIFARE_BLOCK_4 + 3;
-               }
-               break;
-       case NET_NFC_MIFARE_1K_PICC :
-               {
-                       /* 0 ~ 15 : 16 sector and 4 block with 16 bytes */
-                       if (sector > MIFARE_1K_SECTORS)
-                               return NET_NFC_OUT_OF_BOUND;
-
-                       sector_to_block = sector * MIFARE_BLOCK_4 + 3;
-               }
-               break;
-       case NET_NFC_MIFARE_4K_PICC :
-               {
-                       /* 0 ~ 31 : 32 sector and 4 block with 16 bytes
-                        * 32 ~ 39 : 8 sector and 16 block with 16 bytes
-                        */
-                       if (sector > MIFARE_4K_SECTORS)
-                               return NET_NFC_OUT_OF_BOUND;
-
-                       if (sector < 32)
-                               sector_to_block = sector * MIFARE_BLOCK_4 + 3;
-                       else
-                       {
-                               sector_to_block = (31 * MIFARE_BLOCK_4 + 3)
-                                               + (sector - 32)
-                                               * MIFARE_BLOCK_16 + 15;
-                       }
-               }
-               break;
-       default :
-               break;
-       }
-
-       send_buffer_length = 1 + 1 + ((data_s*)UID)->length
-               + key->length + 2; /* cmd + addr + UID + AUTH_KEY + CRC_A */
-
-       _net_nfc_util_alloc_mem(send_buffer, send_buffer_length
-                               * sizeof(uint8_t));
-       if (send_buffer == NULL)
-       {
-               net_nfc_free_data(UID);
-               return NET_NFC_ALLOC_FAIL;
-       }
-
-       temp = send_buffer;
-
-       *temp = MIFARE_CMD_AUTH_B;
-       temp++;
-
-       *temp = sector_to_block;
-       temp++;
-
-       memcpy(temp, ((data_s*)UID)->buffer, ((data_s*)UID)->length);
-       temp = temp + ((data_s*)UID)->length;
-
-       memcpy(temp, key->buffer, key->length);
-
-       net_nfc_util_compute_CRC(CRC_A, send_buffer, send_buffer_length);
-
-       rawdata.buffer = send_buffer;
-       rawdata.length = send_buffer_length;
-
-       net_nfc_error_e result = net_nfc_client_transceive(handle,
-                                                       (data_h)&rawdata,
-                                                       callback,
-                                                       user_data);
-
-       if (send_buffer != NULL)
-               _net_nfc_util_free_mem(send_buffer);
-
-       return result;
-}
-
-NET_NFC_EXPORT_API
-net_nfc_error_e net_nfc_client_mifare_read(net_nfc_target_handle_h handle,
-                                       uint8_t addr,
-                                       void *callback,
-                                       void *user_data)
-{
-       net_nfc_target_info_s* target_info = NULL;
-
-       data_s rawdata;
-
-       uint8_t send_buffer[2] = { 0 };
-
-
-       if (handle == NULL)
-               return NET_NFC_NULL_PARAMETER;
-
-       if (net_nfc_client_tag_is_connected() == FALSE)
-               return NET_NFC_OPERATION_FAIL;
-
-       target_info = net_nfc_client_tag_get_client_target_info();
-
-       if (target_info != NULL)
-       {
-               if (target_info->devType < NET_NFC_MIFARE_MINI_PICC ||
-                       target_info->devType > NET_NFC_MIFARE_ULTRA_PICC)
-               {
-                       DEBUG_CLIENT_MSG("not a MIFARE TAG = [%d]",
-                                               target_info->devType);
-                       return NET_NFC_NOT_SUPPORTED;
-               }
-
-               if (target_info->devType == NET_NFC_MIFARE_ULTRA_PICC)
-               {
-                       if (addr > 7)
-                               return NET_NFC_OUT_OF_BOUND;
-               }
-       }
-
-
-       send_buffer[0] = MIFARE_CMD_READ;
-       send_buffer[1] = addr;
-
-
-       rawdata.buffer = send_buffer;
-       rawdata.length = 2;
-
-       return net_nfc_client_transceive_data(handle,
-                                       (data_h)&rawdata,
-                                       callback,
-                                       user_data);
-}
-
-NET_NFC_EXPORT_API
-net_nfc_error_e net_nfc_client_mifare_write_block(
-                                               net_nfc_target_handle_h handle,
-                                               uint8_t addr,
-                                               data_h data,
-                                               void *callback,
-                                               void *user_data)
-{
-       net_nfc_target_info_s* target_info = NULL;
-
-       data_s rawdata;
-
-       uint8_t* send_buffer = NULL;
-
-       uint32_t send_buffer_length = 0;
-
-
-       if (handle == NULL)
-               return NET_NFC_NULL_PARAMETER;
-
-       if (net_nfc_client_tag_is_connected() == FALSE)
-               return NET_NFC_OPERATION_FAIL;
-
-
-       target_info = net_nfc_client_tag_get_client_target_info();
-
-       if (target_info == NULL)
-               return NET_NFC_NOT_INITIALIZED;
-
-       if (target_info->devType < NET_NFC_MIFARE_MINI_PICC ||
-                       target_info->devType > NET_NFC_MIFARE_ULTRA_PICC)
-       {
-               DEBUG_CLIENT_MSG("not a MIFARE TAG = [%d] ",
-                                       target_info->devType);
-               return NET_NFC_NOT_SUPPORTED;
-       }
-
-       if (target_info->devType == NET_NFC_MIFARE_ULTRA_PICC)
-       {
-               if (addr > 7)
-                       return NET_NFC_OUT_OF_BOUND;
-       }
-
-       if (target_info->devType == NET_NFC_MIFARE_ULTRA_PICC)
-       {
-               if (((data_s *)data)->length > MIFARE_PAGE_SIZE)
-               {
-                       uint8_t* temp = NULL;
-
-                       /* cmd + addr + page */
-                       send_buffer_length = 1 + 1 + MIFARE_PAGE_SIZE;
-
-                       _net_nfc_util_alloc_mem(send_buffer,
-                                       send_buffer_length * sizeof(uint8_t));
-                       if (send_buffer == NULL)
-                               return NET_NFC_ALLOC_FAIL;
-
-                       temp = send_buffer;
-
-                       *temp = MIFARE_CMD_WRITE_PAGE;
-                       temp++;
-
-                       *temp = addr;
-                       temp++;
-
-                       memcpy(temp,
-                               ((data_s*)data)->buffer,
-                               MIFARE_PAGE_SIZE);
-
-               }
-               else
-               {
-                       uint8_t* temp = NULL;
-
-                       /* cmd + addr + page */
-                       send_buffer_length = 1 + 1 +
-                                       ((data_s*)data)->length;
-
-                       _net_nfc_util_alloc_mem(send_buffer,
-                                       send_buffer_length * sizeof(uint8_t));
-                       if (send_buffer == NULL)
-                               return NET_NFC_ALLOC_FAIL;
-
-                       temp = send_buffer;
-
-                       *temp = MIFARE_CMD_WRITE_PAGE;
-                       temp++;
-
-                       *temp = addr;
-                       temp++;
-
-                       memcpy(temp,
-                               ((data_s*)data)->buffer,
-                               ((data_s*)data)->length);
-               }
-
-       }
-       else
-       {
-
-               if (((data_s*)data)->length > MIFARE_BLOCK_SIZE)
-               {
-                       uint8_t* temp = NULL;
-
-                       /* cmd + addr + page*/
-                       send_buffer_length = 1 + 1 + MIFARE_BLOCK_SIZE;
-
-                       _net_nfc_util_alloc_mem(send_buffer,
-                                       send_buffer_length * sizeof(uint8_t));
-                       if (send_buffer == NULL)
-                               return NET_NFC_ALLOC_FAIL;
-
-                       temp = send_buffer;
-
-                       *temp = MIFARE_CMD_WRITE_BLOCK;
-                       temp++;
-
-                       *temp = addr;
-                       temp++;
-
-                       memcpy(temp,
-                               ((data_s*)data)->buffer,
-                               MIFARE_BLOCK_SIZE);
-               }
-               else
-               {
-                       uint8_t* temp = NULL;
-
-                       /* cmd + addr + page  */
-                       send_buffer_length = 1 + 1 + ((data_s*)data)->length;
-
-                       _net_nfc_util_alloc_mem(send_buffer,
-                                       send_buffer_length * sizeof(uint8_t));
-                       if (send_buffer == NULL)
-                               return NET_NFC_ALLOC_FAIL;
-
-                       temp = send_buffer;
-
-                       *temp = MIFARE_CMD_WRITE_BLOCK;
-                       temp++;
-
-                       *temp = addr;
-                       temp++;
-
-                       memcpy(temp,
-                               ((data_s*)data)->buffer,
-                               ((data_s*)data)->length);
-               }
-       }
-
-
-       rawdata.buffer = send_buffer;
-       rawdata.length = send_buffer_length;
-
-       net_nfc_error_e result = net_nfc_client_transceive(handle,
-                                                       (data_h)&rawdata,
-                                                       callback,
-                                                       user_data);
-
-       if (send_buffer != NULL)
-               _net_nfc_util_free_mem(send_buffer);
-
-       return result;
-}
-
-NET_NFC_EXPORT_API
-net_nfc_error_e net_nfc_client_mifare_write_page(
-                                               net_nfc_target_handle_h handle,
-                                               uint8_t addr,
-                                               data_h data,
-                                               void *callback,
-                                               void *user_data)
-{
-       net_nfc_target_info_s* target_info = NULL;
-
-       uint8_t* send_buffer = NULL;
-
-       uint32_t send_buffer_length = 0;
-
-       if (handle == NULL)
-               return NET_NFC_NULL_PARAMETER;
-
-       if (net_nfc_client_tag_is_connected() == FALSE)
-               return NET_NFC_OPERATION_FAIL;
-
-       target_info = net_nfc_client_tag_get_client_target_info();
-
-       if (target_info == NULL)
-               return NET_NFC_NOT_INITIALIZED;
-
-       if (target_info->devType < NET_NFC_MIFARE_MINI_PICC ||
-                       target_info->devType > NET_NFC_MIFARE_ULTRA_PICC)
-       {
-               DEBUG_CLIENT_MSG("not a MIFARE TAG = [%d] ",
-                               target_info->devType);
-               return NET_NFC_NOT_SUPPORTED;
-       }
-
-       if (target_info->devType == NET_NFC_MIFARE_ULTRA_PICC)
-       {
-               if (addr > 7)
-                       return NET_NFC_OUT_OF_BOUND;
-       }
-
-       if (target_info->devType == NET_NFC_MIFARE_ULTRA_PICC)
-       {
-               if (((data_s*)data)->length > MIFARE_PAGE_SIZE)
-               {
-                       uint8_t* temp = NULL;
-
-                       /* cmd + addr + page  */
-                       send_buffer_length = 1 + 1 + MIFARE_PAGE_SIZE;
-
-                       _net_nfc_util_alloc_mem(send_buffer,
-                                       send_buffer_length * sizeof(uint8_t));
-                       if (send_buffer == NULL)
-                               return NET_NFC_ALLOC_FAIL;
-
-                       temp = send_buffer;
-
-                       *temp = MIFARE_CMD_WRITE_PAGE;
-                       temp++;
-
-                       *temp = addr;
-                       temp++;
-
-                       memcpy(temp,
-                               ((data_s*)data)->buffer,
-                               MIFARE_PAGE_SIZE);
-               }
-               else
-               {
-                       uint8_t* temp = NULL;
-
-                       /* cmd + addr + page */
-                       send_buffer_length = 1 + 1 + ((data_s*)data)->length;
-
-                       _net_nfc_util_alloc_mem(send_buffer,
-                                       send_buffer_length * sizeof(uint8_t));
-                       if (send_buffer == NULL)
-                               return NET_NFC_ALLOC_FAIL;
-
-                       temp = send_buffer;
-
-                       *temp = MIFARE_CMD_WRITE_PAGE;
-                       temp++;
-
-                       *temp = addr;
-                       temp++;
-
-                       memcpy(temp,
-                               ((data_s*)data)->buffer,
-                               ((data_s*)data)->length);
-               }
-
-       }
-       else
-       {
-               if (((data_s*)data)->length > MIFARE_PAGE_SIZE)
-               {
-                       uint8_t* temp = NULL;
-
-                       /* cmd + addr + page */
-                       send_buffer_length = 1 + 1 + MIFARE_PAGE_SIZE;
-
-                       _net_nfc_util_alloc_mem(send_buffer,
-                                       send_buffer_length * sizeof(uint8_t));
-                       if (send_buffer == NULL)
-                               return NET_NFC_ALLOC_FAIL;
-
-                       temp = send_buffer;
-
-                       *temp = MIFARE_CMD_WRITE_BLOCK;
-                       temp++;
-
-                       *temp = addr;
-                       temp++;
-
-                       memcpy(temp,
-                               ((data_s*)data)->buffer,
-                               MIFARE_PAGE_SIZE);
-
-               }
-               else
-               {
-                       uint8_t* temp = NULL;
-
-                       /* cmd + addr + page */
-                       send_buffer_length = 1 + 1 + ((data_s*)data)->length;
-
-                       _net_nfc_util_alloc_mem(send_buffer,
-                                       send_buffer_length * sizeof(uint8_t));
-                       if (send_buffer == NULL)
-                               return NET_NFC_ALLOC_FAIL;
-
-                       temp = send_buffer;
-
-                       *temp = MIFARE_CMD_WRITE_BLOCK;
-                       temp++;
-
-                       *temp = addr;
-                       temp++;
-
-                       memcpy(temp,
-                               ((data_s*)data)->buffer,
-                               ((data_s*)data)->length);
-               }
-
-       }
-
-
-       data_s rawdata;
-
-       rawdata.buffer = send_buffer;
-       rawdata.length = send_buffer_length;
-
-       net_nfc_error_e result = net_nfc_client_transceive(handle,
-                                                       (data_h)&rawdata,
-                                                       callback,
-                                                       user_data);
-
-       if (send_buffer != NULL)
-               _net_nfc_util_free_mem(send_buffer);
-
-       return result;
-}
-
-NET_NFC_EXPORT_API
-net_nfc_error_e net_nfc_client_mifare_increment(net_nfc_target_handle_h handle,
-                                               uint8_t addr,
-                                               int value,
-                                               void *callback,
-                                               void *user_data)
-{
-       net_nfc_target_info_s* target_info = NULL;
-
-       data_s rawdata;
-
-       uint8_t send_buffer[8] = { 0 };
-
-
-       if (handle == NULL)
-               return NET_NFC_NULL_PARAMETER;
-
-       if (net_nfc_client_tag_is_connected() == FALSE)
-               return NET_NFC_OPERATION_FAIL;
-
-       target_info = net_nfc_client_tag_get_client_target_info();
-
-       if (target_info)
-       {
-               if (target_info->devType < NET_NFC_MIFARE_MINI_PICC ||
-                               target_info->devType > NET_NFC_MIFARE_4K_PICC)
-               {
-                       DEBUG_CLIENT_MSG(
-                                       "not a MIFARE Classic TAG = [%d]",
-                                       target_info->devType);
-                       return NET_NFC_NOT_SUPPORTED;
-               }
-       }
-
-
-       send_buffer[0] = MIFARE_CMD_INCREMENT;
-       send_buffer[1] = addr;
-
-       /* little endian.
-          little value of byte array will be saved first in memory */
-       send_buffer[5] = (value & 0xFF000000) >> 24;
-       send_buffer[4] = (value & 0x00FF0000) >> 16;
-       send_buffer[3] = (value & 0x0000FF00) >> 8;
-       send_buffer[2] = (value & 0x000000FF);
-
-       net_nfc_util_compute_CRC(CRC_A, send_buffer, 8);
-
-       rawdata.buffer = send_buffer;
-       rawdata.length = 8;
-
-       return net_nfc_client_transceive(handle, (data_h)&rawdata, callback,
-                                       user_data);
-}
-
-NET_NFC_EXPORT_API
-net_nfc_error_e net_nfc_client_mifare_decrement(net_nfc_target_handle_h handle,
-                                               uint8_t addr,
-                                               int value,
-                                               void *callback,
-                                               void *user_data)
-{
-       net_nfc_target_info_s* target_info = NULL;
-
-       data_s rawdata;
-
-       uint8_t send_buffer[8] = { 0 };
-
-       if (handle == NULL)
-               return NET_NFC_NULL_PARAMETER;
-
-       if (net_nfc_client_tag_is_connected() == FALSE)
-               return NET_NFC_OPERATION_FAIL;
-
-       target_info = net_nfc_client_tag_get_client_target_info();
-
-       if (target_info)
-       {
-
-               if (target_info->devType < NET_NFC_MIFARE_MINI_PICC ||
-                               target_info->devType > NET_NFC_MIFARE_4K_PICC)
-               {
-                       DEBUG_CLIENT_MSG("not a MIFARE Classic TAG = [%d] ",
-                                       target_info->devType);
-                       return NET_NFC_NOT_SUPPORTED;
-               }
-       }
-
-       send_buffer[0] = MIFARE_CMD_DECREMENT;
-       send_buffer[1] = addr;
-
-       /* little endian.
-          little value of byte array will be saved first in memory */
-       send_buffer[5] = (value & 0xFF000000) >> 24;
-       send_buffer[4] = (value & 0x00FF0000) >> 16;
-       send_buffer[3] = (value & 0x0000FF00) >> 8;
-       send_buffer[2] = (value & 0x000000FF);
-
-       net_nfc_util_compute_CRC(CRC_A, send_buffer, 8);
-
-       DEBUG_MSG_PRINT_BUFFER(send_buffer, 8);
-
-       rawdata.buffer = send_buffer;
-       rawdata.length = 8;
-
-       return net_nfc_client_transceive(handle, (data_h)&rawdata, callback,
-                                       user_data);
-}
-
-NET_NFC_EXPORT_API
-net_nfc_error_e net_nfc_client_mifare_transfer(net_nfc_target_handle_h handle,
-                                       uint8_t addr,
-                                       void *callback,
-                                       void *user_data)
-{
-       net_nfc_target_info_s* target_info = NULL;
-
-       data_s rawdata;
-
-       uint8_t send_buffer[4] = { 0 };
-
-       if (handle == NULL)
-               return NET_NFC_NULL_PARAMETER;
-
-       if (net_nfc_client_tag_is_connected() == FALSE)
-               return NET_NFC_OPERATION_FAIL;
-
-       target_info = net_nfc_client_tag_get_client_target_info();
-
-       if (target_info)
-       {
-               if (target_info->devType < NET_NFC_MIFARE_MINI_PICC ||
-                               target_info->devType > NET_NFC_MIFARE_4K_PICC)
-               {
-                       DEBUG_CLIENT_MSG("not a MIFARE Classic TAG = [%d]",
-                                       target_info->devType);
-                       return NET_NFC_NOT_SUPPORTED;
-               }
-       }
-
-       send_buffer[0] = MIFARE_CMD_TRANSFER;
-       send_buffer[1] = addr;
-
-       net_nfc_util_compute_CRC(CRC_A, send_buffer, 4);
-
-       rawdata.buffer = send_buffer;
-       rawdata.length = 4;
-
-       return net_nfc_client_transceive(handle, (data_h)&rawdata, callback,
-                                       user_data);
-}
-
-NET_NFC_EXPORT_API
-net_nfc_error_e net_nfc_client_mifare_restore(net_nfc_target_handle_h handle,
-                                       uint8_t addr,
-                                       void *callback,
-                                       void *user_data)
-{
-       net_nfc_target_info_s* target_info = NULL;
-
-       data_s rawdata;
-
-       uint8_t send_buffer[4] = { 0 };
-
-       if (handle == NULL)
-               return NET_NFC_NULL_PARAMETER;
-
-       if (net_nfc_client_tag_is_connected() == FALSE)
-               return NET_NFC_OPERATION_FAIL;
-
-       target_info = net_nfc_client_tag_get_client_target_info();
-
-       if (target_info)
-       {
-               if (target_info->devType < NET_NFC_MIFARE_MINI_PICC ||
-                               target_info->devType > NET_NFC_MIFARE_4K_PICC)
-               {
-                       DEBUG_CLIENT_MSG("not a MIFARE Classic TAG = [%d]",
-                                       target_info->devType);
-                       return NET_NFC_NOT_SUPPORTED;
-               }
-       }
-
-       send_buffer[0] = MIFARE_CMD_RESTORE;
-       send_buffer[1] = addr;
-
-       net_nfc_util_compute_CRC(CRC_A, send_buffer, 4);
-
-       rawdata.buffer = send_buffer;
-       rawdata.length = 4;
-
-       return net_nfc_client_transceive(handle, (data_h)&rawdata, callback,
-                                       user_data);
-}
-
-NET_NFC_EXPORT_API
-net_nfc_error_e net_nfc_client_mifare_create_default_key(data_h* key)
-{
-       if (key == NULL)
-               return NET_NFC_NULL_PARAMETER;
-
-       return net_nfc_create_data(key, default_key, 6);
-}
-
-NET_NFC_EXPORT_API
-net_nfc_error_e net_nfc_client_mifare_create_application_directory_key(
-                                                               data_h* key)
-{
-       if (key == NULL)
-               return NET_NFC_NULL_PARAMETER;
-
-       return net_nfc_create_data(key, mad_key, 6);
-}
-
-NET_NFC_EXPORT_API
-net_nfc_error_e net_nfc_client_mifare_create_net_nfc_forum_key(data_h* key)
-{
-       if (key == NULL)
-               return NET_NFC_NULL_PARAMETER;
-
-       return net_nfc_create_data(key, net_nfc_forum_key, 6);
-}
-
diff --git a/test/src/net_nfc_client_target_info.c b/test/src/net_nfc_client_target_info.c
deleted file mode 100755 (executable)
index 3dd77de..0000000
+++ /dev/null
@@ -1,371 +0,0 @@
-/*
- * Copyright (c) 2012, 2013 Samsung Electronics Co., Ltd.
- *
- * Licensed under the Flora License, Version 1.1 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://floralicense.org/license/
- *
- * 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.
- */
-
-#include <stdbool.h>
-
-#include "net_nfc_typedef_internal.h"
-#include "net_nfc_debug_internal.h"
-#include "net_nfc_data.h"
-#include "net_nfc_target_info.h"
-#include "net_nfc_util_internal.h"
-#include "net_nfc_ndef_message.h"
-
-#ifndef NET_NFC_EXPORT_API
-#define NET_NFC_EXPORT_API __attribute__((visibility("default")))
-#endif
-
-NET_NFC_EXPORT_API
-net_nfc_error_e net_nfc_get_tag_type(net_nfc_target_info_h target_info,
-       net_nfc_target_type_e *type)
-{
-       net_nfc_target_info_s *target_info_private =
-               (net_nfc_target_info_s *)target_info;
-
-       if (type == NULL)
-       {
-               return NET_NFC_NULL_PARAMETER;
-       }
-
-       *type = NET_NFC_UNKNOWN_TARGET;
-
-       if (target_info == NULL)
-       {
-               return NET_NFC_INVALID_HANDLE;
-       }
-
-       *type = target_info_private->devType;
-
-       return NET_NFC_OK;
-}
-
-NET_NFC_EXPORT_API
-net_nfc_error_e net_nfc_get_tag_handle(net_nfc_target_info_h target_info,
-       net_nfc_target_handle_h *handle)
-{
-       net_nfc_target_info_s *target_info_private =
-               (net_nfc_target_info_s *)target_info;
-
-       if (handle == NULL)
-       {
-               return NET_NFC_NULL_PARAMETER;
-       }
-
-       *handle = NULL;
-
-       if (target_info == NULL)
-       {
-               return NET_NFC_INVALID_HANDLE;
-       }
-
-       *handle = (net_nfc_target_handle_h)target_info_private->handle;
-
-       return NET_NFC_OK;
-}
-
-NET_NFC_EXPORT_API
-net_nfc_error_e net_nfc_get_tag_ndef_support(net_nfc_target_info_h target_info,
-       bool *is_support)
-{
-       net_nfc_target_info_s *target_info_private =
-               (net_nfc_target_info_s *)target_info;
-
-       if (target_info == NULL || is_support == NULL)
-       {
-               return NET_NFC_NULL_PARAMETER;
-       }
-
-       *is_support = (bool)target_info_private->is_ndef_supported;
-
-       return NET_NFC_OK;
-}
-
-NET_NFC_EXPORT_API
-net_nfc_error_e net_nfc_get_tag_ndef_state(net_nfc_target_info_h target_info,
-       net_nfc_ndef_card_state_e *state)
-{
-       net_nfc_target_info_s *target_info_private =
-               (net_nfc_target_info_s *)target_info;
-
-       if (target_info == NULL || state == NULL)
-       {
-               return NET_NFC_NULL_PARAMETER;
-       }
-
-       *state = (net_nfc_ndef_card_state_e)target_info_private->ndefCardState;
-
-       return NET_NFC_OK;
-}
-
-NET_NFC_EXPORT_API
-net_nfc_error_e net_nfc_get_tag_max_data_size(net_nfc_target_info_h target_info,
-       uint32_t *max_size)
-{
-       net_nfc_target_info_s *target_info_private =
-               (net_nfc_target_info_s *)target_info;
-
-       if (target_info == NULL || max_size == NULL)
-       {
-               return NET_NFC_NULL_PARAMETER;
-       }
-
-       *max_size = target_info_private->maxDataSize;
-
-       return NET_NFC_OK;
-}
-
-NET_NFC_EXPORT_API
-net_nfc_error_e net_nfc_get_tag_actual_data_size(
-       net_nfc_target_info_h target_info, uint32_t * actual_data)
-{
-       net_nfc_target_info_s *target_info_private =
-               (net_nfc_target_info_s *)target_info;
-
-       if (target_info == NULL || actual_data == NULL)
-       {
-               return NET_NFC_NULL_PARAMETER;
-       }
-
-       *actual_data = target_info_private->actualDataSize;
-
-       return NET_NFC_OK;
-}
-
-NET_NFC_EXPORT_API
-net_nfc_error_e net_nfc_get_tag_info_keys(net_nfc_target_info_h target_info,
-       char ***keys, int * number_of_keys)
-{
-       net_nfc_target_info_s *handle = (net_nfc_target_info_s *)target_info;
-       int i = 0;
-
-       if (keys == NULL || number_of_keys == NULL || target_info == NULL)
-       {
-               return NET_NFC_NULL_PARAMETER;
-       }
-
-       if (handle->tag_info_list == NULL)
-       {
-               return NET_NFC_NO_DATA_FOUND;
-       }
-
-       if (handle->number_of_keys <= 0)
-       {
-               return NET_NFC_NO_DATA_FOUND;
-       }
-
-       DEBUG_CLIENT_MSG("number of keys = [%d]", handle->number_of_keys);
-
-       if (handle->keylist != NULL)
-       {
-               *number_of_keys = handle->number_of_keys;
-               *keys = handle->keylist;
-
-               return NET_NFC_OK;
-       }
-
-       i = handle->number_of_keys * sizeof(char *);
-
-       _net_nfc_util_alloc_mem(*keys, i);
-       if (*keys == NULL)
-               return NET_NFC_ALLOC_FAIL;
-
-       net_nfc_tag_info_s *tag_info = handle->tag_info_list;
-
-       for (; i < handle->number_of_keys; i++, tag_info++)
-       {
-               (*keys)[i] = tag_info->key;
-       }
-
-       *number_of_keys = handle->number_of_keys;
-
-       /* store local context */
-       handle->keylist = *keys;
-
-       return NET_NFC_OK;
-}
-
-NET_NFC_EXPORT_API
-net_nfc_error_e net_nfc_get_tag_info_value(net_nfc_target_info_h target_info,
-       const char *key, data_h *value)
-{
-       net_nfc_target_info_s *handle = (net_nfc_target_info_s *)target_info;
-       net_nfc_tag_info_s *tag_info;
-
-       if (target_info == NULL || key == NULL || value == NULL)
-       {
-               return NET_NFC_NULL_PARAMETER;
-       }
-
-       if (handle->tag_info_list == NULL)
-       {
-               return NET_NFC_NO_DATA_FOUND;
-       }
-
-       int i = 0;
-
-       tag_info = handle->tag_info_list;
-
-       for (; i < handle->number_of_keys; i++, tag_info++)
-       {
-               if (strcmp(key, tag_info->key) == 0)
-               {
-                       if (tag_info->value == NULL)
-                       {
-                               return NET_NFC_NO_DATA_FOUND;
-                       }
-                       else
-                       {
-                               *value = tag_info->value;
-                               break;
-                       }
-               }
-       }
-
-       if (i == handle->number_of_keys)
-               return NET_NFC_NO_DATA_FOUND;
-
-       return NET_NFC_OK;
-}
-
-NET_NFC_EXPORT_API
-net_nfc_error_e net_nfc_get_tag_ndef_message(net_nfc_target_info_h target_info,
-       ndef_message_h *msg)
-{
-       net_nfc_target_info_s *target_info_private =
-               (net_nfc_target_info_s *)target_info;
-       net_nfc_error_e result;
-
-       if (target_info == NULL || msg == NULL)
-       {
-               return NET_NFC_NULL_PARAMETER;
-       }
-
-       result = net_nfc_create_ndef_message_from_rawdata(msg,
-               (data_h)&target_info_private->raw_data);
-
-       return result;
-}
-
-NET_NFC_EXPORT_API
-net_nfc_error_e net_nfc_duplicate_target_info(net_nfc_target_info_h origin,
-       net_nfc_target_info_h *result)
-{
-       net_nfc_target_info_s *handle = (net_nfc_target_info_s *)origin;
-       net_nfc_target_info_s *temp = NULL;
-
-       if (handle == NULL || result == NULL)
-       {
-               return NET_NFC_NULL_PARAMETER;
-       }
-
-       _net_nfc_util_alloc_mem(temp, sizeof(net_nfc_target_info_s));
-       if (temp == NULL)
-       {
-               return NET_NFC_ALLOC_FAIL;
-       }
-
-       temp->ndefCardState = handle->ndefCardState;
-       temp->actualDataSize = handle->actualDataSize;
-       temp->maxDataSize = handle->maxDataSize;
-       temp->devType = handle->devType;
-       temp->handle = handle->handle;
-       temp->is_ndef_supported = handle->is_ndef_supported;
-       temp->number_of_keys = handle->number_of_keys;
-
-       if (temp->number_of_keys > 0)
-       {
-               int i;
-
-               _net_nfc_util_alloc_mem(temp->tag_info_list, temp->number_of_keys * sizeof(net_nfc_tag_info_s));
-               if (temp->tag_info_list == NULL)
-               {
-                       _net_nfc_util_free_mem(temp);
-                       return NET_NFC_ALLOC_FAIL;
-               }
-
-               for (i = 0; i < handle->number_of_keys; i++)
-               {
-                       if (handle->tag_info_list[i].key != NULL)
-                               _net_nfc_util_strdup(temp->tag_info_list[i].key, handle->tag_info_list[i].key);
-
-                       if (handle->tag_info_list[i].value != NULL)
-                       {
-                               data_s *data = (data_s *)handle->tag_info_list[i].value;
-
-                               net_nfc_create_data(&temp->tag_info_list[i].value, data->buffer, data->length);
-                       }
-               }
-       }
-
-       if (handle->raw_data.length > 0)
-       {
-               net_nfc_util_init_data(&temp->raw_data, handle->raw_data.length);
-               memcpy(temp->raw_data.buffer, handle->raw_data.buffer, temp->raw_data.length);
-       }
-
-       *result = (net_nfc_target_info_h)temp;
-
-       return NET_NFC_OK;
-}
-
-static net_nfc_error_e _release_tag_info(net_nfc_target_info_s *info)
-{
-       net_nfc_tag_info_s *list = NULL;
-
-       if (info == NULL)
-               return NET_NFC_NULL_PARAMETER;
-
-       list = info->tag_info_list;
-       if (list != NULL)
-       {
-               int i;
-
-               for (i = 0; i < info->number_of_keys; i++, list++)
-               {
-                       if (list->key != NULL)
-                               _net_nfc_util_free_mem(list->key);
-
-                       if (list->value != NULL)
-                               net_nfc_free_data(list->value);
-               }
-
-               _net_nfc_util_free_mem(info->tag_info_list);
-       }
-
-       if (info->keylist != NULL)
-       {
-               _net_nfc_util_free_mem(info->keylist);
-       }
-
-       net_nfc_util_clear_data(&info->raw_data);
-
-       return NET_NFC_OK;
-}
-
-NET_NFC_EXPORT_API
-net_nfc_error_e net_nfc_release_tag_info(net_nfc_target_info_h target_info)
-{
-       net_nfc_target_info_s *info = (net_nfc_target_info_s *)target_info;
-       net_nfc_error_e result;
-
-       if (info == NULL)
-               return NET_NFC_NULL_PARAMETER;
-
-       result = _release_tag_info(info);
-
-       _net_nfc_util_free_mem(info);
-
-       return result;
-}
diff --git a/test/src/net_nfc_client_test.c b/test/src/net_nfc_client_test.c
deleted file mode 100755 (executable)
index b37e429..0000000
+++ /dev/null
@@ -1,732 +0,0 @@
-/*
- * Copyright (c) 2012, 2013 Samsung Electronics Co., Ltd.
- *
- * Licensed under the Flora License, Version 1.1 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://floralicense.org/license/
- *
- * 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.
- */
-
-#include "net_nfc_debug_internal.h"
-#include "net_nfc_util_gdbus_internal.h"
-#include "net_nfc_gdbus.h"
-#include "net_nfc_client.h"
-#include "net_nfc_client_util_internal.h"
-#include "net_nfc_client_manager.h"
-#include "net_nfc_client_test.h"
-
-#ifndef NET_NFC_EXPORT_API
-#define NET_NFC_EXPORT_API __attribute__((visibility("default")))
-#endif
-
-static void test_call_sim_test_callback(GObject *source_object,
-                                       GAsyncResult *res,
-                                       gpointer user_data);
-
-static void test_call_prbs_test_callback(GObject *source_object,
-                                       GAsyncResult *res,
-                                       gpointer user_data);
-
-static void test_call_get_firmware_version_callback(GObject *source_object,
-                                               GAsyncResult *res,
-                                               gpointer user_data);
-
-static void test_call_set_ee_data_callback(GObject *source_object,
-                                       GAsyncResult *res,
-                                       gpointer user_data);
-
-static void test_call_ese_test_callback(GObject *source_object,
-                                       GAsyncResult *res,
-                                       gpointer user_data);
-
-static NetNfcGDbusTest *test_proxy = NULL;
-
-
-static void test_call_sim_test_callback(GObject *source_object,
-                                       GAsyncResult *res,
-                                       gpointer user_data)
-{
-       NetNfcCallback *func_data = (NetNfcCallback *)user_data;
-       net_nfc_error_e out_result;
-       GError *error = NULL;
-
-       g_assert(user_data != NULL);
-
-       if (net_nfc_gdbus_test_call_sim_test_finish(
-                               NET_NFC_GDBUS_TEST(source_object),
-                               (gint *)&out_result,
-                               res,
-                               &error) == FALSE)
-       {
-               DEBUG_ERR_MSG("Can not finish sim_test: %s",
-                       error->message);
-               out_result = NET_NFC_IPC_FAIL;
-
-               g_error_free(error);
-       }
-
-       if (func_data->callback != NULL)
-       {
-               net_nfc_client_test_sim_test_completed callback =
-                       (net_nfc_client_test_sim_test_completed)func_data->callback;
-
-               callback(out_result, func_data->user_data);
-       }
-
-       g_free(func_data);
-}
-
-static void test_call_prbs_test_callback(GObject *source_object,
-                                       GAsyncResult *res,
-                                       gpointer user_data)
-{
-       NetNfcCallback *func_data = (NetNfcCallback *)user_data;
-       net_nfc_error_e out_result;
-       GError *error = NULL;
-
-       g_assert(user_data != NULL);
-
-       if (net_nfc_gdbus_test_call_prbs_test_finish(
-                               NET_NFC_GDBUS_TEST(source_object),
-                               (gint *)&out_result,
-                               res,
-                               &error) == FALSE)
-       {
-               DEBUG_ERR_MSG("Can not finish prbs test: %s",
-                       error->message);
-               out_result = NET_NFC_IPC_FAIL;
-
-               g_error_free(error);
-       }
-
-       if (func_data->callback != NULL)
-       {
-               net_nfc_client_test_prbs_test_completed callback =
-                       (net_nfc_client_test_prbs_test_completed)func_data->callback;
-
-               callback(out_result, func_data->user_data);
-       }
-
-       g_free(func_data);
-}
-
-static void test_call_get_firmware_version_callback(GObject *source_object,
-                                               GAsyncResult *res,
-                                               gpointer user_data)
-{
-       NetNfcCallback *func_data = (NetNfcCallback *)user_data;
-       net_nfc_error_e out_result;
-       gchar *out_version = NULL;
-       GError *error = NULL;
-
-       g_assert(user_data != NULL);
-
-       if (net_nfc_gdbus_test_call_get_firmware_version_finish(
-                               NET_NFC_GDBUS_TEST(source_object),
-                               (gint *)&out_result,
-                               &out_version,
-                               res,
-                               &error) == FALSE)
-       {
-               DEBUG_ERR_MSG("Can not finish get_firmware_version: %s",
-                       error->message);
-               out_result = NET_NFC_IPC_FAIL;
-
-               g_error_free(error);
-       }
-
-       if (func_data->callback != NULL)
-       {
-               net_nfc_client_test_get_firmware_version_completed callback =
-                       (net_nfc_client_test_get_firmware_version_completed)func_data->callback;
-
-               callback(out_result, out_version, func_data->user_data);
-       }
-
-       g_free(out_version);
-       g_free(func_data);
-}
-
-static void test_call_set_ee_data_callback(GObject *source_object,
-                                       GAsyncResult *res,
-                                       gpointer user_data)
-{
-       NetNfcCallback *func_data = (NetNfcCallback *)user_data;
-       net_nfc_error_e out_result;
-       GError *error = NULL;
-
-       g_assert(user_data != NULL);
-
-       if (net_nfc_gdbus_test_call_set_ee_data_finish(
-                               NET_NFC_GDBUS_TEST(source_object),
-                               (gint *)&out_result,
-                               res,
-                               &error) == FALSE)
-       {
-               DEBUG_ERR_MSG("Can not finish set_ee_data: %s",
-                       error->message);
-               out_result = NET_NFC_IPC_FAIL;
-
-               g_error_free(error);
-       }
-
-       if (func_data->callback != NULL)
-       {
-               net_nfc_client_test_set_ee_data_completed callback =
-                       (net_nfc_client_test_set_ee_data_completed)func_data->callback;
-
-               callback(out_result, func_data->user_data);
-       }
-
-       g_free(func_data);
-}
-
-static void test_call_ese_test_callback(GObject *source_object,
-                                       GAsyncResult *res,
-                                       gpointer user_data)
-{
-       NetNfcCallback *func_data = (NetNfcCallback *)user_data;
-       net_nfc_error_e out_result;
-       GError *error = NULL;
-
-       g_assert(user_data != NULL);
-
-       if (net_nfc_gdbus_test_call_ese_test_finish(
-                               NET_NFC_GDBUS_TEST(source_object),
-                               (gint *)&out_result,
-                               res,
-                               &error) == FALSE)
-       {
-               DEBUG_ERR_MSG("Can not finish sim_test: %s",
-                       error->message);
-               out_result = NET_NFC_IPC_FAIL;
-
-               g_error_free(error);
-       }
-
-       if (func_data->callback != NULL)
-       {
-               net_nfc_client_test_ese_test_completed callback =
-                       (net_nfc_client_test_ese_test_completed)func_data->callback;
-
-               callback(out_result, func_data->user_data);
-       }
-
-       g_free(func_data);
-}
-
-
-NET_NFC_EXPORT_API
-net_nfc_error_e net_nfc_client_test_sim_test(
-                       net_nfc_client_test_sim_test_completed callback,
-                       void *user_data)
-{
-       NetNfcCallback *func_data;
-
-       if (test_proxy == NULL)
-       {
-               if(net_nfc_client_test_init() != NET_NFC_OK)
-               {
-                       DEBUG_ERR_MSG("test_proxy fail");
-                       return NET_NFC_NOT_INITIALIZED;
-               }
-       }
-
-       /* prevent executing daemon when nfc is off */
-       if (net_nfc_client_manager_is_activated() == false) {
-               return NET_NFC_NOT_ACTIVATED;
-       }
-
-       func_data = g_try_new0(NetNfcCallback, 1);
-       if (func_data == NULL)
-               return NET_NFC_ALLOC_FAIL;
-
-       func_data->callback = (gpointer)callback;
-       func_data->user_data = user_data;
-
-       net_nfc_gdbus_test_call_sim_test(test_proxy,
-                                       NULL,
-                                       test_call_sim_test_callback,
-                                       func_data);
-
-       return NET_NFC_OK;
-}
-
-NET_NFC_EXPORT_API
-net_nfc_error_e net_nfc_client_test_sim_test_sync(void)
-{
-       net_nfc_error_e out_result = NET_NFC_OK;
-       GError *error = NULL;
-
-       if (test_proxy == NULL)
-       {
-               if(net_nfc_client_test_init() != NET_NFC_OK)
-               {
-                       DEBUG_ERR_MSG("test_proxy fail");
-                       return NET_NFC_NOT_INITIALIZED;
-               }
-       }
-
-       /* prevent executing daemon when nfc is off */
-       if (net_nfc_client_manager_is_activated() == false) {
-               return NET_NFC_NOT_ACTIVATED;
-       }
-
-       if (net_nfc_gdbus_test_call_sim_test_sync(test_proxy,
-                                       (gint *)&out_result,
-                                       NULL,
-                                       &error) == FALSE)
-       {
-               DEBUG_ERR_MSG("can not call SimTest: %s",
-                               error->message);
-               out_result = NET_NFC_IPC_FAIL;
-
-               g_error_free(error);
-       }
-
-       return out_result;
-}
-
-NET_NFC_EXPORT_API
-net_nfc_error_e net_nfc_client_test_prbs_test(uint32_t tech,
-                       uint32_t rate,
-                       net_nfc_client_test_prbs_test_completed callback,
-                       void *user_data)
-{
-       NetNfcCallback *func_data;
-
-       if (test_proxy == NULL)
-       {
-               if(net_nfc_client_test_init() != NET_NFC_OK)
-               {
-                       DEBUG_ERR_MSG("test_proxy fail");
-                       return NET_NFC_NOT_INITIALIZED;
-               }
-       }
-
-       /* prevent executing daemon when nfc is off */
-       if (net_nfc_client_manager_is_activated() == false) {
-               return NET_NFC_NOT_ACTIVATED;
-       }
-
-       func_data = g_try_new0(NetNfcCallback, 1);
-       if (func_data == NULL)
-               return NET_NFC_ALLOC_FAIL;
-
-       func_data->callback = (gpointer)callback;
-       func_data->user_data = user_data;
-
-       net_nfc_gdbus_test_call_prbs_test(test_proxy,
-                                       tech,
-                                       rate,
-                                       NULL,
-                                       test_call_prbs_test_callback,
-                                       func_data);
-
-       return NET_NFC_OK;
-}
-
-NET_NFC_EXPORT_API
-net_nfc_error_e net_nfc_client_test_prbs_test_sync(uint32_t tech,
-                                               uint32_t rate)
-{
-       net_nfc_error_e out_result = NET_NFC_OK;
-       GError *error = NULL;
-
-       if (test_proxy == NULL)
-       {
-               if(net_nfc_client_test_init() != NET_NFC_OK)
-               {
-                       DEBUG_ERR_MSG("test_proxy fail");
-                       return NET_NFC_NOT_INITIALIZED;
-               }
-       }
-
-       /* prevent executing daemon when nfc is off */
-       if (net_nfc_client_manager_is_activated() == false) {
-               return NET_NFC_NOT_ACTIVATED;
-       }
-
-       if (net_nfc_gdbus_test_call_prbs_test_sync(test_proxy,
-                                       tech,
-                                       rate,
-                                       (gint *)&out_result,
-                                       NULL,
-                                       &error) == FALSE)
-       {
-               DEBUG_ERR_MSG("can not call PrbsTest: %s",
-                               error->message);
-               out_result = NET_NFC_IPC_FAIL;
-
-               g_error_free(error);
-       }
-
-       return out_result;
-}
-
-NET_NFC_EXPORT_API
-net_nfc_error_e net_nfc_client_test_get_firmware_version(
-               net_nfc_client_test_get_firmware_version_completed callback,
-               void *user_data)
-{
-       NetNfcCallback *func_data;
-
-       if (test_proxy == NULL)
-       {
-               if(net_nfc_client_test_init() != NET_NFC_OK)
-               {
-                       DEBUG_ERR_MSG("test_proxy fail");
-                       return NET_NFC_NOT_INITIALIZED;
-               }
-       }
-
-       /* prevent executing daemon when nfc is off */
-       if (net_nfc_client_manager_is_activated() == false) {
-               return NET_NFC_NOT_ACTIVATED;
-       }
-
-       func_data = g_try_new0(NetNfcCallback, 1);
-       if (func_data == NULL)
-               return NET_NFC_ALLOC_FAIL;
-
-       func_data->callback = (gpointer)callback;
-       func_data->user_data = user_data;
-
-       net_nfc_gdbus_test_call_get_firmware_version(test_proxy,
-                               NULL,
-                               test_call_get_firmware_version_callback,
-                               func_data);
-
-       return NET_NFC_OK;
-}
-
-NET_NFC_EXPORT_API
-net_nfc_error_e net_nfc_client_test_get_firmware_version_sync(char **version)
-{
-       net_nfc_error_e out_result = NET_NFC_OK;
-       gchar *out_version = NULL;
-       GError *error = NULL;
-
-       if (version == NULL)
-               return NET_NFC_NULL_PARAMETER;
-
-       *version = NULL;
-
-       if (test_proxy == NULL)
-       {
-               if(net_nfc_client_test_init() != NET_NFC_OK)
-               {
-                       DEBUG_ERR_MSG("test_proxy fail");
-                       return NET_NFC_NOT_INITIALIZED;
-               }
-       }
-
-       /* prevent executing daemon when nfc is off */
-       if (net_nfc_client_manager_is_activated() == false) {
-               return NET_NFC_NOT_ACTIVATED;
-       }
-
-       if (net_nfc_gdbus_test_call_get_firmware_version_sync(test_proxy,
-                                       (gint *)&out_result,
-                                       &out_version,
-                                       NULL,
-                                       &error) == TRUE)
-       {
-               *version = out_version;
-       }
-       else
-       {
-               DEBUG_ERR_MSG("can not call Get Firmware version: %s",
-                               error->message);
-               out_result = NET_NFC_IPC_FAIL;
-
-               g_error_free(error);
-       }
-
-       return out_result;
-}
-
-NET_NFC_EXPORT_API
-net_nfc_error_e net_nfc_client_test_set_ee_data(int mode,
-                       int reg_id,
-                       data_h data,
-                       net_nfc_client_test_set_ee_data_completed callback,
-                       void *user_data)
-{
-       NetNfcCallback *func_data;
-       GVariant *variant;
-
-       if (test_proxy == NULL)
-       {
-               if(net_nfc_client_test_init() != NET_NFC_OK)
-               {
-                       DEBUG_ERR_MSG("test_proxy fail");
-                       return NET_NFC_NOT_INITIALIZED;
-               }
-       }
-
-       /* prevent executing daemon when nfc is off */
-       if (net_nfc_client_manager_is_activated() == false) {
-               return NET_NFC_NOT_ACTIVATED;
-       }
-
-       func_data = g_try_new0(NetNfcCallback, 1);
-       if (func_data == NULL) {
-               return NET_NFC_ALLOC_FAIL;
-       }
-
-       func_data->callback = (gpointer)callback;
-       func_data->user_data = user_data;
-
-       variant = net_nfc_util_gdbus_data_to_variant((data_s *)data);
-
-       net_nfc_gdbus_test_call_set_ee_data(test_proxy,
-                                       mode,
-                                       reg_id,
-                                       variant,
-                                       NULL,
-                                       test_call_set_ee_data_callback,
-                                       func_data);
-
-       return NET_NFC_OK;
-}
-
-NET_NFC_EXPORT_API
-net_nfc_error_e net_nfc_client_test_set_ee_data_sync(int mode,
-                                               int reg_id,
-                                               data_h data)
-{
-       net_nfc_error_e out_result = NET_NFC_OK;
-       GVariant *variant = NULL;
-       GError *error = NULL;
-
-       if (test_proxy == NULL)
-       {
-               if(net_nfc_client_test_init() != NET_NFC_OK)
-               {
-                       DEBUG_ERR_MSG("test_proxy fail");
-                       return NET_NFC_NOT_INITIALIZED;
-               }
-       }
-
-       /* prevent executing daemon when nfc is off */
-       if (net_nfc_client_manager_is_activated() == false) {
-               return NET_NFC_NOT_ACTIVATED;
-       }
-
-       variant = net_nfc_util_gdbus_data_to_variant((data_s *)data);
-
-       if (net_nfc_gdbus_test_call_set_ee_data_sync(test_proxy,
-                                       mode,
-                                       reg_id,
-                                       variant,
-                                       (gint *)&out_result,
-                                       NULL,
-                                       &error) == FALSE)
-       {
-               DEBUG_ERR_MSG("can not call SetEeTest: %s",
-                               error->message);
-               out_result = NET_NFC_IPC_FAIL;
-
-               g_error_free(error);
-       }
-
-       return out_result;
-}
-
-NET_NFC_EXPORT_API
-net_nfc_error_e net_nfc_client_test_ese_test(
-                       net_nfc_client_test_ese_test_completed callback,
-                       void *user_data)
-{
-       NetNfcCallback *func_data;
-
-       DEBUG_CLIENT_MSG("NFC ESE Test!!!!");
-
-       if (test_proxy == NULL)
-       {
-               if(net_nfc_client_test_init() != NET_NFC_OK)
-               {
-                       DEBUG_ERR_MSG("test_proxy fail");
-                       return NET_NFC_NOT_INITIALIZED;
-               }
-       }
-
-       /* prevent executing daemon when nfc is off */
-       if (net_nfc_client_manager_is_activated() == false) {
-               return NET_NFC_NOT_ACTIVATED;
-       }
-
-       func_data = g_try_new0(NetNfcCallback, 1);
-       if (func_data == NULL)
-               return NET_NFC_ALLOC_FAIL;
-
-       func_data->callback = (gpointer)callback;
-       func_data->user_data = user_data;
-
-       net_nfc_gdbus_test_call_ese_test(test_proxy,
-                                       NULL,
-                                       test_call_ese_test_callback,
-                                       func_data);
-
-       return NET_NFC_OK;
-}
-
-NET_NFC_EXPORT_API
-net_nfc_error_e net_nfc_client_test_ese_test_sync(void)
-{
-       net_nfc_error_e out_result = NET_NFC_OK;
-       GError *error = NULL;
-
-       DEBUG_CLIENT_MSG("NFC ESE Test SYNC!!!!");
-
-       if (test_proxy == NULL)
-       {
-               if(net_nfc_client_test_init() != NET_NFC_OK)
-               {
-                       DEBUG_ERR_MSG("test_proxy fail");
-                       return NET_NFC_NOT_INITIALIZED;
-               }
-       }
-
-       /* prevent executing daemon when nfc is off */
-       if (net_nfc_client_manager_is_activated() == false) {
-               return NET_NFC_NOT_ACTIVATED;
-       }
-
-       if (net_nfc_gdbus_test_call_ese_test_sync(test_proxy,
-                                       (gint *)&out_result,
-                                       NULL,
-                                       &error) == FALSE)
-       {
-               DEBUG_ERR_MSG("can not call ESE Test: %s",
-                               error->message);
-               out_result = NET_NFC_IPC_FAIL;
-
-               g_error_free(error);
-       }
-
-       return out_result;
-}
-
-NET_NFC_EXPORT_API
-net_nfc_error_e net_nfc_client_test_set_se_tech_type_sync(
-       net_nfc_se_type_e type, int tech)
-{
-       net_nfc_error_e out_result = NET_NFC_OK;
-       GError *error = NULL;
-
-       if (test_proxy == NULL)
-       {
-               if(net_nfc_client_test_init() != NET_NFC_OK)
-               {
-                       DEBUG_ERR_MSG("test_proxy fail");
-                       return NET_NFC_NOT_INITIALIZED;
-               }
-       }
-
-       /* prevent executing daemon when nfc is off */
-       if (net_nfc_client_manager_is_activated() == false) {
-               return NET_NFC_NOT_ACTIVATED;
-       }
-
-       if (net_nfc_gdbus_test_call_set_se_tech_type_sync(test_proxy,
-                                       (guint32)type,
-                                       (guint32)tech,
-                                       (gint *)&out_result,
-                                       NULL,
-                                       &error) == FALSE)
-       {
-               DEBUG_ERR_MSG("can not call SetSeTechType: %s",
-                               error->message);
-               out_result = NET_NFC_IPC_FAIL;
-
-               g_error_free(error);
-       }
-
-       return out_result;
-}
-
-NET_NFC_EXPORT_API
-net_nfc_error_e net_nfc_client_test_set_listen_tech_mask_sync(uint32_t tech)
-{
-       net_nfc_error_e result = NET_NFC_OK;
-       GError *error = NULL;
-
-       DEBUG_CLIENT_MSG("net_nfc_client_test_set_listen_tech_mask_sync start");
-
-       if (test_proxy == NULL)
-       {
-               if(net_nfc_client_test_init() != NET_NFC_OK)
-               {
-                       DEBUG_ERR_MSG("test_proxy fail");
-                       return NET_NFC_NOT_INITIALIZED;
-               }
-       }
-
-       /* prevent executing daemon when nfc is off */
-       if (net_nfc_client_manager_is_activated() == false) {
-               return NET_NFC_NOT_ACTIVATED;
-       }
-
-       if (net_nfc_gdbus_test_call_set_listen_tech_mask_sync(test_proxy,
-                                       tech,
-                                       &result,
-                                       NULL,
-                                       &error) == FALSE)
-       {
-               DEBUG_ERR_MSG("can not call listen tech mask: %s",
-                               error->message);
-               result = NET_NFC_IPC_FAIL;
-
-               g_error_free(error);
-       }
-
-       return result;
-}
-
-
-net_nfc_error_e net_nfc_client_test_init(void)
-{
-       GError *error = NULL;
-
-       if (test_proxy)
-       {
-               DEBUG_CLIENT_MSG("Already initialized");
-
-               return NET_NFC_OK;
-       }
-
-       test_proxy = net_nfc_gdbus_test_proxy_new_for_bus_sync(
-                                       G_BUS_TYPE_SYSTEM,
-                                       G_DBUS_PROXY_FLAGS_DO_NOT_AUTO_START,
-                                       "org.tizen.NetNfcService",
-                                       "/org/tizen/NetNfcService/Test",
-                                       NULL,
-                                       &error);
-       if (test_proxy == NULL)
-       {
-               DEBUG_ERR_MSG("Can not create proxy : %s", error->message);
-               g_error_free(error);
-
-               return NET_NFC_UNKNOWN_ERROR;
-       }
-
-       return NET_NFC_OK;
-}
-
-void net_nfc_client_test_deinit(void)
-{
-       if (test_proxy)
-       {
-               g_object_unref(test_proxy);
-               test_proxy = NULL;
-       }
-}
diff --git a/test/src/net_nfc_client_transceive.c b/test/src/net_nfc_client_transceive.c
deleted file mode 100755 (executable)
index 0f7f5f3..0000000
+++ /dev/null
@@ -1,469 +0,0 @@
-/*
- * Copyright (c) 2012, 2013 Samsung Electronics Co., Ltd.
- *
- * Licensed under the Flora License, Version 1.1 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://floralicense.org/license/
- *
- * 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.
- */
-
-#include <string.h>
-
-#include "net_nfc_typedef_internal.h"
-#include "net_nfc_debug_internal.h"
-#include "net_nfc_util_internal.h"
-#include "net_nfc_util_gdbus_internal.h"
-#include "net_nfc_gdbus.h"
-#include "net_nfc_client.h"
-#include "net_nfc_client_util_internal.h"
-#include "net_nfc_client_manager.h"
-#include "net_nfc_client_tag_internal.h"
-#include "net_nfc_client_transceive.h"
-
-#ifndef NET_NFC_EXPORT_API
-#define NET_NFC_EXPORT_API __attribute__((visibility("default")))
-#endif
-
-static NetNfcGDbusTransceive *transceive_proxy = NULL;
-
-static GVariant *transceive_data_to_transceive_variant(
-                                               net_nfc_target_type_e dev_type,
-                                               data_s *data);
-
-static void transceive_call(GObject *source_object,
-                               GAsyncResult *res,
-                               gpointer user_data);
-
-static void transceive_data_call(GObject *source_object,
-                               GAsyncResult *res,
-                               gpointer user_data);
-
-static GVariant *transceive_data_to_transceive_variant(
-                                               net_nfc_target_type_e devType,
-                                               data_s *data)
-{
-       data_s transceive_info = { NULL, };
-       GVariant *variant;
-
-       if (data == NULL)
-       {
-               DEBUG_ERR_MSG("data is empty");
-
-               return NULL;
-       }
-
-       switch (devType)
-       {
-       case NET_NFC_MIFARE_MINI_PICC :
-       case NET_NFC_MIFARE_1K_PICC :
-       case NET_NFC_MIFARE_4K_PICC :
-       case NET_NFC_MIFARE_ULTRA_PICC :
-               if (net_nfc_util_init_data(&transceive_info,
-                       data->length + 2) == true)
-               {
-                       memcpy(transceive_info.buffer,
-                               data->buffer,
-                               data->length);
-
-                       net_nfc_util_compute_CRC(CRC_A,
-                               transceive_info.buffer,
-                               transceive_info.length);
-               }
-               break;
-
-       case NET_NFC_JEWEL_PICC :
-               if (data->length > 9)
-               {
-                       DEBUG_ERR_MSG("data length is larger than 9");
-
-                       return NULL;
-               }
-
-               if (net_nfc_util_init_data(&transceive_info, 9) == true)
-               {
-                       memcpy(transceive_info.buffer,
-                               data->buffer,
-                               data->length);
-
-                       net_nfc_util_compute_CRC(CRC_B,
-                                       transceive_info.buffer,
-                                       transceive_info.length);
-               }
-               break;
-
-       default :
-               if(net_nfc_util_init_data(&transceive_info,
-                       data->length) == true)
-               {
-                       memcpy(transceive_info.buffer,
-                               data->buffer,
-                               data->length);
-               }
-               break;
-       }
-
-       variant = net_nfc_util_gdbus_data_to_variant(&transceive_info);
-
-       net_nfc_util_clear_data(&transceive_info);
-
-       return variant;
-}
-
-static void transceive_data_call(GObject *source_object,
-                               GAsyncResult *res,
-                               gpointer user_data)
-{
-       NetNfcCallback *func_data = (NetNfcCallback *)user_data;
-       net_nfc_error_e out_result;
-       GVariant *out_data = NULL;
-       GError *error = NULL;
-
-       g_assert(user_data != NULL);
-
-       if (net_nfc_gdbus_transceive_call_transceive_data_finish(
-                               NET_NFC_GDBUS_TRANSCEIVE(source_object),
-                               (gint *)&out_result,
-                               &out_data,
-                               res,
-                               &error) == FALSE)
-       {
-               DEBUG_ERR_MSG("Can not finish transceive: %s", error->message);
-               out_result = NET_NFC_IPC_FAIL;
-
-               g_error_free(error);
-       }
-
-       if (func_data->callback != NULL)
-       {
-               data_s resp = { NULL, };
-
-               net_nfc_util_gdbus_variant_to_data_s(out_data, &resp);
-
-               ((nfc_transceive_data_callback)func_data->callback)(
-                                       out_result,
-                                       &resp,
-                                       func_data->user_data);
-
-               net_nfc_util_clear_data(&resp);
-       }
-
-       g_free(func_data);
-}
-
-static void transceive_call(GObject *source_object,
-                               GAsyncResult *res,
-                               gpointer user_data)
-{
-       NetNfcCallback *func_data = (NetNfcCallback *)user_data;
-       net_nfc_error_e out_result;
-       GError *error = NULL;
-
-       g_assert(user_data != NULL);
-
-       if (net_nfc_gdbus_transceive_call_transceive_finish(
-                               NET_NFC_GDBUS_TRANSCEIVE(source_object),
-                               (gint *)&out_result,
-                               res,
-                               &error) == FALSE)
-       {
-               DEBUG_ERR_MSG("Can not finish transceive: %s", error->message);
-               out_result = NET_NFC_IPC_FAIL;
-
-               g_error_free(error);
-       }
-
-       if (func_data->callback != NULL)
-       {
-               ((nfc_transceive_callback)func_data->callback)(
-                       out_result,
-                       func_data->user_data);
-       }
-
-       g_free(func_data);
-}
-
-NET_NFC_EXPORT_API
-net_nfc_error_e net_nfc_client_transceive(net_nfc_target_handle_h handle,
-                                       data_h rawdata,
-                                       nfc_transceive_callback callback,
-                                       void *user_data)
-{
-       net_nfc_target_info_s *target_info;
-       NetNfcCallback *funcdata;
-       GVariant *arg_data;
-
-       if (transceive_proxy == NULL)
-       {
-               if(net_nfc_client_transceive_init() != NET_NFC_OK)
-               {
-                       DEBUG_ERR_MSG("transceive_proxy fail");
-                       return NET_NFC_NOT_INITIALIZED;
-               }
-       }
-
-       if (handle == NULL || rawdata == NULL)
-               return NET_NFC_NULL_PARAMETER;
-
-       /* prevent executing daemon when nfc is off */
-       if (net_nfc_client_manager_is_activated() == false) {
-               return NET_NFC_NOT_ACTIVATED;
-       }
-
-       target_info = net_nfc_client_tag_get_client_target_info();
-       if (target_info == NULL || target_info->handle == NULL)
-               return NET_NFC_NOT_CONNECTED;
-
-       DEBUG_CLIENT_MSG("send request :: transceive = [%p]", handle);
-
-       arg_data = transceive_data_to_transceive_variant(target_info->devType,
-               rawdata);
-       if (arg_data == NULL) {
-               return NET_NFC_INVALID_PARAM;
-       }
-
-       funcdata = g_try_new0(NetNfcCallback, 1);
-       if (funcdata == NULL) {
-               g_variant_unref(arg_data);
-
-               return NET_NFC_ALLOC_FAIL;
-       }
-
-       funcdata->callback = (gpointer)callback;
-       funcdata->user_data = user_data;
-
-       net_nfc_gdbus_transceive_call_transceive(transceive_proxy,
-                                       GPOINTER_TO_UINT(handle),
-                                       target_info->devType,
-                                       arg_data,
-                                       NULL,
-                                       transceive_call,
-                                       funcdata);
-
-       return NET_NFC_OK;
-}
-
-NET_NFC_EXPORT_API
-net_nfc_error_e net_nfc_client_transceive_data(net_nfc_target_handle_h handle,
-                                       data_h rawdata,
-                                       nfc_transceive_data_callback callback,
-                                       void *user_data)
-{
-       net_nfc_target_info_s *target_info;
-       NetNfcCallback *funcdata;
-       GVariant *arg_data;
-
-       if (transceive_proxy == NULL)
-       {
-               if(net_nfc_client_transceive_init() != NET_NFC_OK)
-               {
-                       DEBUG_ERR_MSG("transceive_proxy fail");
-                       return NET_NFC_NOT_INITIALIZED;
-               }
-       }
-
-       if (handle == NULL || rawdata == NULL)
-               return NET_NFC_NULL_PARAMETER;
-
-       /* prevent executing daemon when nfc is off */
-       if (net_nfc_client_manager_is_activated() == false) {
-               return NET_NFC_NOT_ACTIVATED;
-       }
-
-       target_info = net_nfc_client_tag_get_client_target_info();
-       if (target_info == NULL || target_info->handle == NULL)
-               return NET_NFC_NOT_CONNECTED;
-
-       DEBUG_CLIENT_MSG("send request :: transceive = [%p]", handle);
-
-       arg_data = transceive_data_to_transceive_variant(target_info->devType,
-               rawdata);
-       if (arg_data == NULL) {
-               return NET_NFC_INVALID_PARAM;
-       }
-
-       funcdata = g_try_new0(NetNfcCallback, 1);
-       if (funcdata == NULL) {
-               g_variant_unref(arg_data);
-
-               return NET_NFC_ALLOC_FAIL;
-       }
-
-       funcdata->callback = (gpointer)callback;
-       funcdata->user_data = user_data;
-
-       net_nfc_gdbus_transceive_call_transceive_data(transceive_proxy,
-                                       GPOINTER_TO_UINT(handle),
-                                       target_info->devType,
-                                       arg_data,
-                                       NULL,
-                                       transceive_data_call,
-                                       funcdata);
-
-       return NET_NFC_OK;
-}
-
-NET_NFC_EXPORT_API
-net_nfc_error_e net_nfc_client_transceive_sync(net_nfc_target_handle_h handle,
-                                       data_h rawdata)
-{
-       net_nfc_target_info_s *target_info;
-       net_nfc_error_e out_result = NET_NFC_OK;
-       GError *error = NULL;
-       GVariant *arg_data;
-
-       if (handle == NULL || rawdata == NULL)
-               return NET_NFC_NULL_PARAMETER;
-
-       if (transceive_proxy == NULL)
-       {
-               if(net_nfc_client_transceive_init() != NET_NFC_OK)
-               {
-                       DEBUG_ERR_MSG("transceive_proxy fail");
-                       return NET_NFC_NOT_INITIALIZED;
-               }
-       }
-
-       /* prevent executing daemon when nfc is off */
-       if (net_nfc_client_manager_is_activated() == false) {
-               return NET_NFC_NOT_ACTIVATED;
-       }
-
-       target_info = net_nfc_client_tag_get_client_target_info();
-       if (target_info == NULL || target_info->handle == NULL)
-               return NET_NFC_NOT_CONNECTED;
-
-       DEBUG_CLIENT_MSG("send request :: transceive = [%p]", handle);
-
-       arg_data = transceive_data_to_transceive_variant(target_info->devType,
-               rawdata);
-       if (arg_data == NULL)
-               return NET_NFC_ALLOC_FAIL;
-
-       if (net_nfc_gdbus_transceive_call_transceive_sync(transceive_proxy,
-                                       GPOINTER_TO_UINT(handle),
-                                       target_info->devType,
-                                       arg_data,
-                                       (gint *)&out_result,
-                                       NULL,
-                                       &error) == FALSE)
-       {
-               DEBUG_ERR_MSG("Transceive (sync call) failed: %s",
-                       error->message);
-               out_result = NET_NFC_IPC_FAIL;
-
-               g_error_free(error);
-       }
-
-       return out_result;
-}
-
-NET_NFC_EXPORT_API
-net_nfc_error_e net_nfc_client_transceive_data_sync(
-                                               net_nfc_target_handle_h handle,
-                                               data_h rawdata,
-                                               data_h *response)
-{
-       net_nfc_target_info_s *target_info;
-       net_nfc_error_e out_result = NET_NFC_OK;
-       GVariant *out_data = NULL;
-       GError *error = NULL;
-       GVariant *arg_data;
-
-       if (handle == NULL || rawdata == NULL)
-               return NET_NFC_NULL_PARAMETER;
-
-       if (transceive_proxy == NULL)
-       {
-               if(net_nfc_client_transceive_init() != NET_NFC_OK)
-               {
-                       DEBUG_ERR_MSG("transceive_proxy fail");
-                       return NET_NFC_NOT_INITIALIZED;
-               }
-       }
-
-       /* prevent executing daemon when nfc is off */
-       if (net_nfc_client_manager_is_activated() == false) {
-               return NET_NFC_NOT_ACTIVATED;
-       }
-
-       target_info = net_nfc_client_tag_get_client_target_info();
-       if (target_info == NULL || target_info->handle == NULL)
-               return NET_NFC_NOT_CONNECTED;
-
-       DEBUG_CLIENT_MSG("send request :: transceive = [%p]", handle);
-
-       arg_data = transceive_data_to_transceive_variant(target_info->devType,
-               rawdata);
-       if (arg_data == NULL)
-               return NET_NFC_ALLOC_FAIL;
-
-       if (net_nfc_gdbus_transceive_call_transceive_data_sync(
-                                       transceive_proxy,
-                                       GPOINTER_TO_UINT(handle),
-                                       target_info->devType,
-                                       arg_data,
-                                       (gint *)&out_result,
-                                       &out_data,
-                                       NULL,
-                                       &error) == FALSE)
-       {
-               DEBUG_ERR_MSG("Transceive (sync call) failed: %s",
-                       error->message);
-               out_result = NET_NFC_IPC_FAIL;
-
-               g_error_free(error);
-       }
-
-       if (response && out_data != NULL)
-       {
-               *response = net_nfc_util_gdbus_variant_to_data(out_data);
-       }
-
-       return out_result;
-}
-
-
-net_nfc_error_e net_nfc_client_transceive_init(void)
-{
-       GError *error = NULL;
-
-       if (transceive_proxy)
-       {
-               DEBUG_CLIENT_MSG("Already initialized");
-
-               return NET_NFC_OK;
-       }
-
-       transceive_proxy = net_nfc_gdbus_transceive_proxy_new_for_bus_sync(
-                                       G_BUS_TYPE_SYSTEM,
-                                       G_DBUS_PROXY_FLAGS_DO_NOT_AUTO_START,
-                                       "org.tizen.NetNfcService",
-                                       "/org/tizen/NetNfcService/Transceive",
-                                       NULL,
-                                       &error);
-       if (transceive_proxy == NULL)
-       {
-               DEBUG_ERR_MSG("Can not create proxy : %s", error->message);
-               g_error_free(error);
-
-               return NET_NFC_UNKNOWN_ERROR;
-       }
-
-       return NET_NFC_OK;
-}
-
-void net_nfc_client_transceive_deinit(void)
-{
-       if (transceive_proxy)
-       {
-               g_object_unref(transceive_proxy);
-               transceive_proxy = NULL;
-       }
-}
diff --git a/test/src/net_nfc_client_util.c b/test/src/net_nfc_client_util.c
deleted file mode 100755 (executable)
index 60e6125..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
- * Copyright (c) 2012, 2013 Samsung Electronics Co., Ltd.
- *
- * Licensed under the Flora License, Version 1.1 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://floralicense.org/license/
- *
- * 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.
- */
-
-#include <stdlib.h>
-#include <string.h>
-
-#include "net_nfc_client_util_internal.h"
-
diff --git a/test/src/nfc_card_emulation.c b/test/src/nfc_card_emulation.c
deleted file mode 100755 (executable)
index 5fc245e..0000000
+++ /dev/null
@@ -1,504 +0,0 @@
-/*
-* Copyright (c) 2012, 2013 Samsung Electronics Co., Ltd.
-*
-* 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.
-*/
-
-#include "nfc_common.h"
-
-int nfc_se_open_secure_element_internal(
-       nfc_se_type_e se_type,
-       nfc_se_h *handle)
-{
-       net_nfc_error_e result;
-       net_nfc_se_type_e type;
-       net_nfc_target_handle_h temp = NULL;
-
-       LOG_BEGIN();
-
-       CHECK_SUPPORTED(NFC_CE_FEATURE);
-
-       /* LCOV_EXCL_START */
-       CHECK_INIT();
-       CHECK_INVALID(handle == NULL);
-
-       switch (se_type) {
-       case NFC_SE_TYPE_ESE:
-               type = NET_NFC_SE_TYPE_ESE;
-               break;
-
-       case NFC_SE_TYPE_UICC:
-               type = NET_NFC_SE_TYPE_UICC;
-               break;
-
-       default:
-               return NFC_ERROR_INVALID_PARAMETER;
-               break;
-       }
-
-       result = net_nfc_client_se_open_internal_secure_element_sync(
-               type,
-               &temp);
-       if (result == NET_NFC_OK)
-               *handle = (nfc_se_h)temp;
-
-       return nfc_common_convert_error_code(__func__, result);
-       /* LCOV_EXCL_STOP */
-}
-
-
-int nfc_se_send_apdu_internal(nfc_se_h handle,
-       unsigned char *cmd,
-       unsigned int cmd_len,
-       unsigned char **resp,
-       unsigned int *resp_len)
-{
-       net_nfc_error_e result;
-       data_h command = NULL;
-
-       LOG_BEGIN();
-
-       CHECK_SUPPORTED(NFC_CE_FEATURE);
-
-       /* LCOV_EXCL_START */
-       CHECK_INIT();
-       CHECK_INVALID(handle == NULL);
-       CHECK_INVALID(cmd == NULL);
-       CHECK_INVALID(cmd_len == 0);
-       CHECK_INVALID(resp == NULL);
-       CHECK_INVALID(resp_len == NULL);
-
-       if (cmd_len == 3 && cmd[0] == 'A' && cmd[1] == 'T' && cmd[2] == 'R') {
-               LOG_DEBUG("cheat... invoke get atr");
-               return nfc_se_get_atr_internal(handle, resp, resp_len);
-       }
-
-       *resp = NULL;
-       *resp_len = 0;
-
-       result = net_nfc_create_data(&command, cmd, cmd_len);
-       if (result == NET_NFC_OK) {
-               data_h response = NULL;
-
-               result = net_nfc_client_se_send_apdu_sync(
-                       (net_nfc_target_handle_h)handle,
-                       command,
-                       &response);
-               if (result == NET_NFC_OK && response != NULL) {
-                       uint8_t *buffer;
-                       uint32_t length;
-
-                       buffer = net_nfc_get_data_buffer(response);
-                       length = net_nfc_get_data_length(response);
-
-                       if (buffer != NULL && length > 0) {
-                               *resp = calloc(1, length);
-                               if (*resp != NULL) {
-                                       memcpy(*resp, buffer, length);
-                                       *resp_len = length;
-                               } else {
-                                       result = NET_NFC_ALLOC_FAIL;
-                               }
-                       } else {
-                               result = NET_NFC_NO_DATA_FOUND;
-                       }
-
-                       net_nfc_free_data(response);
-               }
-
-               net_nfc_free_data(command);
-       } else {
-               LOG_ERR("net_nfc_create_data failed, [%d]", result);
-       }
-
-       return nfc_common_convert_error_code(__func__, result);
-       /* LCOV_EXCL_STOP */
-}
-
-
-int nfc_se_get_atr_internal(nfc_se_h handle, unsigned char **atr, unsigned int *atr_len)
-{
-       net_nfc_error_e result;
-       data_h response = NULL;
-
-       LOG_BEGIN();
-
-       CHECK_SUPPORTED(NFC_CE_FEATURE);
-
-       /* LCOV_EXCL_START */
-       CHECK_INIT();
-       CHECK_INVALID(handle == NULL);
-       CHECK_INVALID(atr == NULL);
-       CHECK_INVALID(atr_len == NULL);
-
-       *atr = NULL;
-       *atr_len = 0;
-
-       result = net_nfc_client_se_get_atr_sync(
-               (net_nfc_target_handle_h)handle,
-               &response);
-       if (result == NET_NFC_OK && response != NULL) {
-               uint8_t *buffer;
-               uint32_t length;
-
-               buffer = net_nfc_get_data_buffer(response);
-               length = net_nfc_get_data_length(response);
-
-               if (buffer != NULL && length > 0) {
-                       *atr = calloc(1, length);
-                       if (*atr != NULL) {
-                               memcpy(*atr, buffer, length);
-                               *atr_len = length;
-                       } else {
-                               result = NET_NFC_ALLOC_FAIL;
-                       }
-               } else {
-                       result = NET_NFC_NO_DATA_FOUND;
-               }
-
-               net_nfc_free_data(response);
-       }
-
-       return nfc_common_convert_error_code(__func__, result);
-       /* LCOV_EXCL_STOP */
-}
-
-int nfc_se_close_secure_element_internal(nfc_se_h handle)
-{
-       net_nfc_error_e result;
-
-       LOG_BEGIN();
-
-       CHECK_SUPPORTED(NFC_CE_FEATURE);
-
-       /* LCOV_EXCL_START */
-       CHECK_INIT();
-
-       result = net_nfc_client_se_close_internal_secure_element_sync(
-               (net_nfc_target_handle_h)handle);
-
-       return nfc_common_convert_error_code(__func__, result);
-       /* LCOV_EXCL_STOP */
-}
-
-int nfc_se_enable_card_emulation()
-{
-       net_nfc_error_e result;
-
-       LOG_BEGIN();
-
-       CHECK_SUPPORTED(NFC_CE_FEATURE);
-
-       /* LCOV_EXCL_START */
-       CHECK_INIT();
-
-       result = net_nfc_set_card_emulation_mode_sync(NET_NFC_CARD_EMELATION_ENABLE);
-
-       return nfc_common_convert_error_code(__func__, result);
-       /* LCOV_EXCL_STOP */
-}
-
-int nfc_se_disable_card_emulation()
-{
-       net_nfc_error_e result;
-
-       LOG_BEGIN();
-
-       CHECK_SUPPORTED(NFC_CE_FEATURE);
-
-       /* LCOV_EXCL_START */
-       CHECK_INIT();
-
-       result = net_nfc_set_card_emulation_mode_sync(NET_NFC_CARD_EMULATION_DISABLE);
-
-       return nfc_common_convert_error_code(__func__, result);
-       /* LCOV_EXCL_STOP */
-}
-
-int nfc_se_get_card_emulation_mode(nfc_se_card_emulation_mode_type_e *mode)
-{
-       net_nfc_error_e result;
-       net_nfc_card_emulation_mode_t se_mode;
-
-       LOG_BEGIN();
-
-       CHECK_SUPPORTED(NFC_CE_FEATURE);
-
-       /* LCOV_EXCL_START */
-       CHECK_INIT();
-       CHECK_INVALID(mode == NULL);
-
-       result = net_nfc_get_card_emulation_mode_sync(&se_mode);
-
-       switch (se_mode) {
-       case NET_NFC_CARD_EMELATION_ENABLE:
-               *mode = NFC_SE_CARD_EMULATION_MODE_ON;
-               break;
-
-       case NET_NFC_CARD_EMULATION_DISABLE:
-               *mode = NFC_SE_CARD_EMULATION_MODE_OFF;
-               break;
-       }
-
-       return nfc_common_convert_error_code(__func__, result);;
-       /* LCOV_EXCL_STOP */
-}
-
-int nfc_hce_send_apdu_response(nfc_se_h handle, unsigned char *resp, unsigned int resp_len)
-{
-       net_nfc_error_e result;
-       data_h data;
-
-       LOG_BEGIN();
-
-       CHECK_SUPPORTED(NFC_CE_HCE_FEATURE);
-
-       /* LCOV_EXCL_START */
-       CHECK_INIT();
-       CHECK_INVALID(resp == NULL);
-       CHECK_INVALID(resp_len == 0);
-
-       result = net_nfc_create_data(&data, resp, resp_len);
-       if (result == NET_NFC_OK) {
-               result = net_nfc_client_hce_response_apdu_sync(handle, data);
-               net_nfc_free_data(data);
-       } else {
-               LOG_ERR("net_nfc_create_data failed, [%d]", result);
-       }
-
-       return nfc_common_convert_error_code(__func__, result);
-       /* LCOV_EXCL_STOP */
-}
-
-int nfc_se_set_default_route(nfc_se_type_e powered_on_status, nfc_se_type_e powered_off_status, nfc_se_type_e low_battery_status)
-{
-       net_nfc_error_e result;
-
-       LOG_BEGIN();
-
-       CHECK_SUPPORTED(NFC_CE_HCE_FEATURE);
-
-       /* LCOV_EXCL_START */
-       CHECK_INIT();
-
-       result = net_nfc_client_se_set_default_route_sync(powered_on_status, powered_off_status, low_battery_status);
-
-       return nfc_common_convert_error_code(__func__, result);
-       /* LCOV_EXCL_STOP */
-}
-
-int nfc_se_is_activated_handler_for_aid(nfc_se_type_e se_type, const char *aid, bool *is_activated_handler)
-{
-       net_nfc_error_e result;
-
-       LOG_BEGIN();
-
-       CHECK_SUPPORTED(NFC_CE_HCE_FEATURE);
-
-       /* LCOV_EXCL_START */
-       CHECK_INIT();
-       CHECK_INVALID(aid == NULL);
-       CHECK_INVALID(is_activated_handler == NULL);
-
-       result = net_nfc_client_se_is_activated_aid_handler_sync((net_nfc_se_type_e)se_type, aid, is_activated_handler);
-
-       return nfc_common_convert_error_code(__func__, result);
-       /* LCOV_EXCL_STOP */
-}
-
-int nfc_se_is_activated_handler_for_category(nfc_se_type_e se_type, nfc_card_emulation_category_type_e category, bool *is_activated_handler)
-{
-       net_nfc_error_e result;
-
-       LOG_BEGIN();
-
-       CHECK_SUPPORTED(NFC_CE_HCE_FEATURE);
-
-       /* LCOV_EXCL_START */
-       CHECK_INIT();
-       CHECK_INVALID(is_activated_handler == NULL);
-
-       result = net_nfc_client_se_is_activated_category_handler_sync((net_nfc_se_type_e)se_type, category, is_activated_handler);
-
-       return nfc_common_convert_error_code(__func__, result);
-       /* LCOV_EXCL_STOP */
-}
-
-int nfc_se_register_aid(nfc_se_type_e se_type, nfc_card_emulation_category_type_e category, const char *aid)
-{
-       net_nfc_error_e result;
-
-       LOG_BEGIN();
-
-       CHECK_SUPPORTED(NFC_CE_HCE_FEATURE);
-
-       /* LCOV_EXCL_START */
-       CHECK_INIT();
-       CHECK_INVALID(aid == NULL);
-
-       result = net_nfc_client_se_register_aids_sync((net_nfc_se_type_e)se_type, category, aid);
-
-       return nfc_common_convert_error_code(__func__, result);
-       /* LCOV_EXCL_STOP */
-}
-
-int nfc_se_unregister_aid(nfc_se_type_e se_type, nfc_card_emulation_category_type_e category, const char *aid)
-{
-       net_nfc_error_e result;
-
-       LOG_BEGIN();
-
-       CHECK_SUPPORTED(NFC_CE_HCE_FEATURE);
-
-       /* LCOV_EXCL_START */
-       CHECK_INIT();
-       CHECK_INVALID(aid == NULL);
-
-       result = net_nfc_client_se_unregister_aid_sync((net_nfc_se_type_e)se_type, category, aid);
-
-       return nfc_common_convert_error_code(__func__, result);
-       /* LCOV_EXCL_STOP */
-}
-
-int nfc_se_get_registered_aids_count(nfc_se_type_e se_type, nfc_card_emulation_category_type_e category, int *count)
-{
-       net_nfc_error_e result;
-
-       LOG_BEGIN();
-
-       CHECK_SUPPORTED(NFC_CE_HCE_FEATURE);
-
-       /* LCOV_EXCL_START */
-       CHECK_INIT();
-       CHECK_INVALID(count == NULL);
-
-       result = net_nfc_client_se_get_registered_aids_count_sync(
-                       (net_nfc_se_type_e)NFC_SE_TYPE_HCE,
-                       (net_nfc_card_emulation_category_t)category,
-                       (size_t *)count);
-
-       return nfc_common_convert_error_code(__func__, result);
-       /* LCOV_EXCL_STOP */
-}
-
-/* LCOV_EXCL_START */
-static void _se_registered_aid_event_cb(net_nfc_se_type_e se_type,
-               const char *aid, bool readonly, void *user_data)
-{
-       LOG_BEGIN();
-
-       if (gdbus_nfc_context.on_se_registered_aid_cb != NULL) {
-               gdbus_nfc_context.on_se_registered_aid_cb(
-                       (nfc_se_type_e)se_type,
-                       aid,
-                       readonly,
-                       gdbus_nfc_context.on_se_registered_aid_cb_user_data);
-       }
-}
-/* LCOV_EXCL_STOP */
-
-int nfc_se_foreach_registered_aids(nfc_se_type_e se_type, nfc_card_emulation_category_type_e category, nfc_se_registered_aid_cb callback, void *user_data)
-{
-       net_nfc_error_e result;
-
-       LOG_BEGIN();
-
-       CHECK_SUPPORTED(NFC_CE_HCE_FEATURE);
-
-       /* LCOV_EXCL_START */
-       CHECK_INIT();
-       CHECK_INVALID(callback == NULL);
-
-       gdbus_nfc_context.on_se_registered_aid_cb = callback;
-       gdbus_nfc_context.on_se_registered_aid_cb_user_data = user_data;
-
-       result = net_nfc_client_se_foreach_registered_aids_sync((net_nfc_se_type_e)se_type,
-               (net_nfc_card_emulation_category_t)category,
-               (net_nfc_client_se_registered_aid_cb)_se_registered_aid_event_cb,
-               user_data);
-
-       return nfc_common_convert_error_code(__func__, result);
-       /* LCOV_EXCL_STOP */
-}
-
-int nfc_se_add_route_for_aid_internal(const char *aid, nfc_se_type_e se_type, const char* pkg_name, bool unlock_required,
-               nfc_se_power_type_e power, nfc_card_emulation_category_type_e category)
-{
-       net_nfc_error_e result;
-
-       LOG_BEGIN();
-
-       CHECK_SUPPORTED(NFC_CE_HCE_FEATURE);
-
-       /* LCOV_EXCL_START */
-       CHECK_INIT();
-
-       result = net_nfc_client_se_add_route_aid_sync(pkg_name, se_type, category, aid, unlock_required, power);
-
-       return nfc_common_convert_error_code(__func__, result);
-       /* LCOV_EXCL_STOP */
-}
-
-int nfc_se_remove_route_for_aid_internal(const char* pkg_name, const char *aid)
-{
-       net_nfc_error_e result;
-
-       LOG_BEGIN();
-
-       CHECK_SUPPORTED(NFC_CE_HCE_FEATURE);
-
-       /* LCOV_EXCL_START */
-       CHECK_INIT();
-
-       result = net_nfc_client_se_remove_route_aid_sync(pkg_name, aid);
-
-       return nfc_common_convert_error_code(__func__, result);
-       /* LCOV_EXCL_STOP */
-}
-
-int nfc_se_set_preferred_handler()
-{
-       net_nfc_error_e result;
-
-       LOG_BEGIN();
-
-       CHECK_SUPPORTED(NFC_CE_FEATURE);
-
-       /* LCOV_EXCL_START */
-       CHECK_INIT();
-       CHECK_ACTIVATED();
-
-       result = net_nfc_client_se_set_preferred_handler_sync(true);
-
-       return nfc_common_convert_error_code(__func__, result);
-       /* LCOV_EXCL_STOP */
-}
-
-int nfc_se_unset_preferred_handler()
-{
-       net_nfc_error_e result;
-
-       LOG_BEGIN();
-
-       CHECK_SUPPORTED(NFC_CE_FEATURE);
-
-       /* LCOV_EXCL_START */
-       CHECK_INIT();
-       CHECK_ACTIVATED();
-
-       result = net_nfc_client_se_set_preferred_handler_sync(false);
-
-       return nfc_common_convert_error_code(__func__, result);
-       /* LCOV_EXCL_STOP */
-}
-
diff --git a/test/src/nfc_common.c b/test/src/nfc_common.c
deleted file mode 100755 (executable)
index 3b47378..0000000
+++ /dev/null
@@ -1,218 +0,0 @@
-/*
-* Copyright (c) 2012, 2013 Samsung Electronics Co., Ltd.
-*
-* 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.
-*/
-
-#include "nfc_common.h"
-
-_nfc_context_s gdbus_nfc_context;
-
-/* LCOV_EXCL_START */
-pid_t nfc_common_get_focus_app_pid()
-{
-/*
-       Ecore_X_Window focus;
-       pid_t pid;
-
-       ecore_x_init(NULL);
-
-       focus = ecore_x_window_focus_get();
-       if (ecore_x_netwm_pid_get(focus, &pid))
-               return pid;
-*/
-       return -1;
-}
-
-char * nfc_common_get_bt_address_string(data_h data)
-{
-       uint8_t *buffer;
-       uint32_t length;
-
-       if (data == NULL)
-               return NULL;
-
-       buffer = net_nfc_get_data_buffer(data);
-       length = net_nfc_get_data_length(data);
-
-       if (buffer == NULL || length < 6)
-               return NULL;
-
-       return g_strdup_printf("%02X:%02X:%02X:%02X:%02X:%02X",
-               buffer[0],
-               buffer[1],
-               buffer[2],
-               buffer[3],
-               buffer[4],
-               buffer[5]);
-}
-
-bool nfc_common_check_app_permission()
-{
-       pid_t focus_app_pid, current_app_pid;
-
-       focus_app_pid = nfc_common_get_focus_app_pid();
-       current_app_pid = getpgid(getpid());
-
-       LOGD("[check app permission] focus_app_pid [%d], current_app_pid [%d]", focus_app_pid,
-               current_app_pid);
-
-       return (focus_app_pid == current_app_pid) ? true : false;
-}
-
-int nfc_common_convert_error_code(const char *func, int native_error_code)
-{
-       int error_code = NFC_ERROR_NONE;
-       char *errorstr = NULL;
-
-       switch (native_error_code) {
-       case NET_NFC_OK:
-               error_code = NFC_ERROR_NONE;
-               errorstr = "ERROR_NONE";
-               break;
-
-       case NET_NFC_ALLOC_FAIL:
-               error_code = NFC_ERROR_OUT_OF_MEMORY;
-               errorstr = "OUT_OF_MEMORY";
-               break;
-
-       case NET_NFC_NOT_CONNECTED:
-               error_code = NFC_ERROR_NO_DEVICE;
-               errorstr = "NO_DEVICE";
-               break;
-
-       case NET_NFC_UNKNOWN_ERROR:
-       case NET_NFC_THREAD_CREATE_FAIL:
-       case NET_NFC_IPC_FAIL:
-       case NET_NFC_BUFFER_TOO_SMALL:
-       case NET_NFC_COMMUNICATE_WITH_CONTROLLER_FAILED:
-       case NET_NFC_RF_ERROR:
-       case NET_NFC_NOT_SUPPORTED:
-       case NET_NFC_TAG_READ_FAILED:
-       case NET_NFC_TAG_WRITE_FAILED:
-       case NET_NFC_OPERATION_FAIL:
-       case NET_NFC_INSUFFICIENT_STORAGE:
-       case NET_NFC_NOT_INITIALIZED:
-       case NET_NFC_NOT_REGISTERED:
-               error_code = NFC_ERROR_OPERATION_FAILED;
-               errorstr = "OPERATION_FAILED";
-               break;
-
-       case NET_NFC_SECURITY_FAIL:
-               error_code = NFC_ERROR_SECURITY_RESTRICTED;
-               errorstr = "SECURITY_RESTRICTED";
-               break;
-
-       case NET_NFC_INVALID_STATE:
-               error_code = NFC_ERROR_ILLEGAL_STATE;
-               errorstr = "ILLEGAL_STATE";
-               break;
-
-       case NET_NFC_OUT_OF_BOUND:
-       case NET_NFC_NULL_PARAMETER:
-       case NET_NFC_NOT_ALLOWED_OPERATION:
-       case NET_NFC_LLCP_INVALID_SOCKET:
-       case NET_NFC_NO_DATA_FOUND:
-               error_code = NFC_ERROR_INVALID_PARAMETER;
-               errorstr = "INVALID_PARAMETER";
-               break;
-       case NET_NFC_NDEF_RECORD_IS_NOT_EXPECTED_TYPE:
-               error_code = NFC_ERROR_INVALID_RECORD_TYPE;
-               errorstr = "INVALID_RECORD_TYPE";
-               break;
-
-       case NET_NFC_ALREADY_INITIALIZED:
-       case NET_NFC_ALREADY_REGISTERED:
-               error_code = NFC_ERROR_NONE;
-               errorstr = "ERROR_NONE";
-               break;
-
-       case NET_NFC_RF_TIMEOUT:
-               error_code = NFC_ERROR_TIMED_OUT;
-               errorstr = "TIMED_OUT";
-               break;
-       case NET_NFC_INVALID_FORMAT:
-       case NET_NFC_NDEF_TYPE_LENGTH_IS_NOT_OK:
-       case NET_NFC_NDEF_ID_LENGTH_IS_NOT_OK:
-       case NET_NFC_NDEF_BUF_END_WITHOUT_ME:
-               error_code = NFC_ERROR_INVALID_NDEF_MESSAGE;
-               errorstr = "INVALID_NDEF_MESSAGE";
-               break;
-       case NET_NFC_NO_NDEF_MESSAGE:
-               error_code = NFC_ERROR_NO_NDEF_MESSAGE;
-               errorstr = "NO_NDEF_MESSAGE";
-               break;
-       case NET_NFC_BUSY:
-               error_code = NFC_ERROR_DEVICE_BUSY;
-               errorstr = "DEVICE_BUSY";
-               break;
-       case NET_NFC_NO_NDEF_SUPPORT:
-               error_code = NFC_ERROR_NOT_NDEF_FORMAT;
-               errorstr = "NOT_SUPPORTED";
-               break;
-       case NET_NFC_PERMISSION_DENIED:
-               error_code = NFC_ERROR_PERMISSION_DENIED;
-               errorstr = "PERMISSION_DENIED";
-               break;
-       case NET_NFC_NOT_ACTIVATED:
-               error_code = NFC_ERROR_NOT_ACTIVATED;
-               errorstr = "NOT_ACTIVATED";
-               break;
-       default:
-               error_code = NFC_ERROR_OPERATION_FAILED;
-               errorstr = "OPERATION_FAILED";
-       }
-
-       if (error_code != NFC_ERROR_NONE)
-               LOGE("NFC func : %s, %s(0x%08x)", func, errorstr, error_code);
-
-       return error_code;
-}
-
-bool nfc_common_is_initialized()
-{
-       return gdbus_nfc_context.initialized;
-}
-
-bool nfc_common_is_supported(char *str)
-{
-       int ret;
-       bool is_supported;
-
-       ret = system_info_get_platform_bool(str, &is_supported);
-
-       if (ret != 0)
-               return false;
-
-       return is_supported;
-}
-
-int nfc_common_get_rawdata_size(nfc_ndef_message_h ndef_message,
-       unsigned int *byte_size)
-{
-       int ret;
-
-       LOG_BEGIN();
-
-       CHECK_SUPPORTED(NFC_FEATURE);
-       CHECK_INIT();
-       CHECK_INVALID(ndef_message == NULL);
-       CHECK_INVALID(byte_size == NULL);
-
-       ret = net_nfc_get_ndef_message_byte_length(ndef_message,
-               (unsigned int *)byte_size);
-
-       return nfc_common_convert_error_code(__func__, ret);
-}
-/* LCOV_EXCL_STOP */
-
diff --git a/test/src/nfc_manager.c b/test/src/nfc_manager.c
deleted file mode 100755 (executable)
index d5ce1ff..0000000
+++ /dev/null
@@ -1,969 +0,0 @@
-/*
-* Copyright (c) 2012, 2013 Samsung Electronics Co., Ltd.
-*
-* 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.
-*/
-
-#include "nfc_common.h"
-
-bool nfc_manager_is_supported(void)
-{
-       bool nfc_supported = false;
-
-       LOG_BEGIN();
-
-       nfc_supported = nfc_common_is_supported(NFC_FEATURE);
-
-       if (nfc_supported == true)
-               set_last_result(NFC_ERROR_NONE);
-       else
-               set_last_result(NFC_ERROR_NOT_SUPPORTED);
-
-       return nfc_supported;
-}
-
-/* LCOV_EXCL_START */
-static void _activation_changed_cb(net_nfc_error_e result, void *user_data)
-{
-       nfc_activation_completed_cb callback;
-       void *user_param;
-
-       LOG_BEGIN();
-
-       if (user_data == NULL) {
-               LOG_ERR("user_data is NULL");
-               return;
-       }
-
-       g_variant_get((GVariant *)user_data,
-               "(uu)",
-               (guint *)&callback,
-               (guint *)&user_param);
-
-       if (callback != NULL)
-               callback(nfc_common_convert_error_code(__func__, result), user_param);
-
-       g_variant_unref((GVariant *)user_data);
-}
-/* LCOV_EXCL_STOP */
-
-int nfc_manager_set_activation(bool activation,
-       nfc_activation_completed_cb callback,
-       void *user_data)
-{
-       int ret;
-
-       LOG_BEGIN();
-
-       CHECK_SUPPORTED(NFC_FEATURE);
-
-       /* LCOV_EXCL_START */
-       CHECK_INIT();
-
-       if (nfc_manager_is_activated() == activation) {
-               if (activation)
-                       ret = NFC_ERROR_ALREADY_ACTIVATED;
-               else
-                       ret = NFC_ERROR_ALREADY_DEACTIVATED;
-       } else {
-               GVariant *parameter;
-
-               parameter = g_variant_new("(uu)",
-                       callback,
-                       user_data);
-               if (parameter != NULL) {
-                       ret = net_nfc_client_manager_set_active(activation,
-                               _activation_changed_cb,
-                               parameter);
-                       if (ret != NET_NFC_OK) {
-                               LOG_ERR("net_nfc_client_manager_set_active fail");
-
-                               g_variant_unref(parameter);
-                       }
-               } else {
-                       ret = NET_NFC_ALLOC_FAIL;
-               }
-
-               ret = nfc_common_convert_error_code(__func__, ret);
-       }
-
-       return ret;
-       /* LCOV_EXCL_STOP */
-}
-
-bool nfc_manager_is_activated(void)
-{
-       int ret;
-       int activated = 0;
-
-       LOG_BEGIN();
-
-       if (nfc_common_is_supported(NFC_FEATURE) == false) {
-               set_last_result(NFC_ERROR_NOT_SUPPORTED);
-               return false;
-       }
-
-       /* LCOV_EXCL_START */
-       ret = net_nfc_client_get_nfc_state(&activated);
-
-       set_last_result(nfc_common_convert_error_code(__func__, ret));
-
-       return (!!activated);
-       /* LCOV_EXCL_STOP */
-}
-
-int nfc_manager_set_activation_changed_cb(nfc_activation_changed_cb callback,
-       void *user_data)
-{
-       LOG_BEGIN();
-
-       CHECK_SUPPORTED(NFC_FEATURE);
-
-       /* LCOV_EXCL_START */
-       CHECK_INIT();
-       CHECK_INVALID(callback == NULL);
-
-       net_nfc_client_manager_set_activated(callback, user_data);
-
-       return NFC_ERROR_NONE;
-       /* LCOV_EXCL_STOP */
-}
-
-void nfc_manager_unset_activation_changed_cb(void)
-{
-       LOG_BEGIN();
-
-       if (nfc_common_is_supported(NFC_FEATURE) == false) {
-               LOG_ERR("NFC not supported");
-               set_last_result(NFC_ERROR_NOT_SUPPORTED);
-               return;
-       }
-
-       /* LCOV_EXCL_START */
-       if (nfc_common_is_initialized() == false) {
-               LOG_ERR("NFC not initialized");
-               set_last_result(NFC_ERROR_NOT_INITIALIZED);
-               return;
-       }
-
-       net_nfc_client_manager_unset_activated();
-
-       set_last_result(NFC_ERROR_NONE);
-       /* LCOV_EXCL_STOP */
-}
-
-int nfc_manager_initialize(void)
-{
-       int ret = NET_NFC_OK;
-
-       LOG_BEGIN();
-
-       CHECK_SUPPORTED(NFC_FEATURE);
-
-       /* LCOV_EXCL_START */
-       if (!nfc_common_is_initialized()) {
-               ret = net_nfc_client_initialize();
-               if (ret != NET_NFC_OK)
-                       return nfc_common_convert_error_code(__func__, ret);
-
-               memset(&gdbus_nfc_context, 0, sizeof(gdbus_nfc_context));
-
-               gdbus_nfc_context.initialized = true;
-       }
-
-       return nfc_common_convert_error_code(__func__, ret);
-       /* LCOV_EXCL_STOP */
-}
-
-int nfc_manager_deinitialize(void)
-{
-       int ret = NET_NFC_OK;
-
-       LOG_BEGIN();
-
-       CHECK_SUPPORTED(NFC_FEATURE);
-
-       /* LCOV_EXCL_START */
-       if (nfc_common_is_initialized()) {
-               net_nfc_client_se_unset_event_cb();
-
-               net_nfc_client_p2p_unset_device_discovered();
-               net_nfc_client_p2p_unset_device_detached();
-
-               net_nfc_client_tag_unset_tag_discovered();
-               net_nfc_client_tag_unset_tag_detached();
-
-               ret = net_nfc_client_deinitialize();
-
-               gdbus_nfc_context.initialized = false;
-       }
-
-       return nfc_common_convert_error_code(__func__, ret);
-       /* LCOV_EXCL_STOP */
-}
-
-/* LCOV_EXCL_START */
-static void _tag_discovered_cb(net_nfc_target_info_h info, void *user_data)
-{
-       LOG_BEGIN();
-
-       gdbus_nfc_context.current_tag = info;
-
-       if (gdbus_nfc_context.on_tag_discovered_cb != NULL) {
-               gdbus_nfc_context.on_tag_discovered_cb(
-                       NFC_DISCOVERED_TYPE_ATTACHED,
-                       (nfc_tag_h)gdbus_nfc_context.current_tag,
-                       gdbus_nfc_context.on_tag_discovered_user_data);
-       }
-
-       /* ndef discovered cb */
-       if (gdbus_nfc_context.on_ndef_discovered_cb) {
-               ndef_message_h ndef_message = NULL;
-
-               if (net_nfc_get_tag_ndef_message((net_nfc_target_info_h)info,
-                       &ndef_message) == NET_NFC_OK) {
-                       gdbus_nfc_context.on_ndef_discovered_cb(ndef_message,
-                               gdbus_nfc_context.on_ndef_discovered_user_data);
-
-                       net_nfc_free_ndef_message(ndef_message);
-               }
-       }
-}
-
-static void _tag_detached_cb(void *user_data)
-{
-       LOG_BEGIN();
-
-       if (gdbus_nfc_context.on_tag_discovered_cb != NULL) {
-               gdbus_nfc_context.on_tag_discovered_cb(
-                       NFC_DISCOVERED_TYPE_DETACHED,
-                       (nfc_tag_h)gdbus_nfc_context.current_tag,
-                       gdbus_nfc_context.on_tag_discovered_user_data);
-       }
-
-       gdbus_nfc_context.current_tag = NULL;
-}
-/* LCOV_EXCL_STOP */
-
-int nfc_manager_set_ndef_discovered_cb(
-       nfc_ndef_discovered_cb callback,
-       void *user_data)
-{
-       LOG_BEGIN();
-
-       CHECK_SUPPORTED(NFC_FEATURE);
-
-       /* LCOV_EXCL_START */
-       CHECK_INIT();
-       CHECK_INVALID(callback == NULL);
-
-       net_nfc_client_tag_set_tag_discovered(_tag_discovered_cb, NULL);
-       net_nfc_client_tag_set_tag_detached(_tag_detached_cb, NULL);
-
-       gdbus_nfc_context.on_ndef_discovered_cb = callback;
-       gdbus_nfc_context.on_ndef_discovered_user_data = user_data;
-
-       return NFC_ERROR_NONE;
-       /* LCOV_EXCL_STOP */
-}
-
-void nfc_manager_unset_ndef_discovered_cb(void)
-{
-       LOG_BEGIN();
-
-       if (nfc_common_is_supported(NFC_FEATURE) == false) {
-               LOG_ERR("NFC not supported");
-               set_last_result(NFC_ERROR_NOT_SUPPORTED);
-               return;
-       }
-
-       /* LCOV_EXCL_START */
-       if (nfc_common_is_initialized() == false) {
-               LOG_ERR("NFC not initialized");
-               set_last_result(NFC_ERROR_NOT_INITIALIZED);
-               return;
-       }
-
-       gdbus_nfc_context.on_ndef_discovered_cb = NULL;
-       gdbus_nfc_context.on_ndef_discovered_user_data = NULL;
-
-       set_last_result(NFC_ERROR_NONE);
-       /* LCOV_EXCL_STOP */
-}
-
-void nfc_manager_set_tag_filter(int filter)
-{
-       LOG_BEGIN();
-
-       if (nfc_common_is_supported(NFC_TAG_FEATURE) == false) {
-               LOG_ERR("NFC not supported");
-               set_last_result(NFC_ERROR_NOT_SUPPORTED);
-               return;
-       }
-
-       /* LCOV_EXCL_START */
-       if (nfc_common_is_initialized() == false) {
-               LOG_ERR("NFC not initialized");
-               set_last_result(NFC_ERROR_NOT_INITIALIZED);
-               return;
-       }
-
-       if (filter < NET_NFC_ALL_DISABLE) {
-               LOG_ERR("Invalid parameter");
-               set_last_result(NFC_ERROR_INVALID_PARAMETER);
-               return;
-       }
-
-       net_nfc_client_tag_set_filter(filter);
-
-       set_last_result(NFC_ERROR_NONE);
-       /* LCOV_EXCL_STOP */
-}
-
-int nfc_manager_get_tag_filter(void)
-{
-       LOG_BEGIN();
-
-       if (nfc_common_is_supported(NFC_TAG_FEATURE) == false) {
-               LOG_ERR("NFC not supported");
-               set_last_result(NFC_ERROR_NOT_SUPPORTED);
-               return 0;
-       }
-
-       /* LCOV_EXCL_START */
-       if (nfc_common_is_initialized() == false) {
-               LOG_ERR("NFC not initialized");
-               set_last_result(NFC_ERROR_NOT_INITIALIZED);
-               return 0;
-       }
-
-       set_last_result(NFC_ERROR_NONE);
-
-       return net_nfc_client_tag_get_filter();
-       /* LCOV_EXCL_STOP */
-}
-
-int nfc_manager_get_connected_tag(nfc_tag_h *tag)
-{
-       int ret;
-       net_nfc_target_info_h result = NULL;
-
-       LOG_BEGIN();
-
-       CHECK_SUPPORTED(NFC_TAG_FEATURE);
-
-       /* LCOV_EXCL_START */
-       CHECK_INIT();
-       CHECK_INVALID(tag == NULL);
-
-       *tag = NULL;
-
-       net_nfc_client_tag_set_tag_discovered(_tag_discovered_cb, NULL);
-       net_nfc_client_tag_set_tag_detached(_tag_detached_cb, NULL);
-
-
-       if (gdbus_nfc_context.current_tag == NULL) {
-               ret = net_nfc_client_tag_get_current_tag_info_sync(&result);
-               if (ret == NET_NFC_OK)
-                       *tag = (nfc_tag_h)result;
-       } else {
-               /* FIXME ??? */
-               *tag = gdbus_nfc_context.current_tag;
-
-               ret = NET_NFC_OK;
-       }
-
-       return nfc_common_convert_error_code(__func__, ret);
-       /* LCOV_EXCL_STOP */
-}
-
-int nfc_manager_get_connected_target(nfc_p2p_target_h *target)
-{
-       int ret;
-       net_nfc_target_handle_h result = NULL;
-
-       LOG_BEGIN();
-
-       CHECK_SUPPORTED(NFC_P2P_FEATURE);
-
-       /* LCOV_EXCL_START */
-       CHECK_INIT();
-       CHECK_INVALID(target == NULL);
-
-       *target = NULL;
-
-       net_nfc_client_tag_set_tag_discovered(_tag_discovered_cb, NULL);
-       net_nfc_client_tag_set_tag_detached(_tag_detached_cb, NULL);
-
-       if (gdbus_nfc_context.current_target == NULL) {
-               ret = net_nfc_client_tag_get_current_target_handle_sync(&result);
-               if (ret == NET_NFC_OK) {
-                       gdbus_nfc_context.current_target = result;
-
-                       *target = gdbus_nfc_context.current_target;
-               }
-       } else {
-               /* FIXME ??? */
-               *target = gdbus_nfc_context.current_target;
-
-               ret = NET_NFC_OK;
-       }
-
-       return nfc_common_convert_error_code(__func__, ret);
-       /* LCOV_EXCL_STOP */
-}
-
-int nfc_manager_set_tag_discovered_cb(nfc_tag_discovered_cb callback,
-       void *user_data)
-{
-       LOG_BEGIN();
-
-       CHECK_SUPPORTED(NFC_TAG_FEATURE);
-
-       /* LCOV_EXCL_START */
-       CHECK_INIT();
-       CHECK_INVALID(callback == NULL);
-
-       net_nfc_client_tag_set_tag_discovered(_tag_discovered_cb, NULL);
-       net_nfc_client_tag_set_tag_detached(_tag_detached_cb, NULL);
-
-       gdbus_nfc_context.on_tag_discovered_cb = callback;
-       gdbus_nfc_context.on_tag_discovered_user_data = user_data;
-
-       return NFC_ERROR_NONE;
-       /* LCOV_EXCL_STOP */
-}
-
-void nfc_manager_unset_tag_discovered_cb(void)
-{
-       LOG_BEGIN();
-
-       if (nfc_common_is_supported(NFC_TAG_FEATURE) == false) {
-               LOG_ERR("NFC not supported");
-               set_last_result(NFC_ERROR_NOT_SUPPORTED);
-               return;
-       }
-
-       /* LCOV_EXCL_START */
-       if (nfc_common_is_initialized() == false) {
-               LOG_ERR("NFC not initialized");
-               set_last_result(NFC_ERROR_NOT_INITIALIZED);
-               return;
-       }
-
-       gdbus_nfc_context.on_tag_discovered_cb = NULL;
-       gdbus_nfc_context.on_tag_discovered_user_data = NULL;
-
-       set_last_result(NFC_ERROR_NONE);
-       /* LCOV_EXCL_STOP */
-}
-
-/* LCOV_EXCL_START */
-static void _p2p_discovered_cb(
-       net_nfc_target_handle_h handle_info,
-       void *user_data)
-{
-       LOG_BEGIN();
-
-       gdbus_nfc_context.current_target = handle_info;
-
-       if (gdbus_nfc_context.on_p2p_target_discovered_cb != NULL) {
-               gdbus_nfc_context.on_p2p_target_discovered_cb(
-                       NFC_DISCOVERED_TYPE_ATTACHED,
-                       (nfc_p2p_target_h)gdbus_nfc_context.current_target,
-                       gdbus_nfc_context.on_p2p_target_discovered_user_data);
-       }
-}
-
-static void _p2p_detached_cb(void *user_data)
-{
-       nfc_p2p_target_h handle =
-               (nfc_p2p_target_h)gdbus_nfc_context.current_target;
-
-       LOG_BEGIN();
-
-       if (gdbus_nfc_context.on_p2p_target_discovered_cb != NULL) {
-               gdbus_nfc_context.on_p2p_target_discovered_cb(
-                       NFC_DISCOVERED_TYPE_DETACHED,
-                       handle,
-                       gdbus_nfc_context.on_p2p_target_discovered_user_data);
-       }
-
-       /* unset data_received callback */
-       nfc_p2p_unset_data_received_cb(handle);
-
-       gdbus_nfc_context.current_target = NULL;
-}
-/* LCOV_EXCL_STOP */
-
-int nfc_manager_set_p2p_target_discovered_cb(
-       nfc_p2p_target_discovered_cb callback,
-       void *user_data)
-{
-       LOG_BEGIN();
-
-       CHECK_SUPPORTED(NFC_P2P_FEATURE);
-
-       /* LCOV_EXCL_START */
-       CHECK_INIT();
-       CHECK_INVALID(callback == NULL);
-
-       net_nfc_client_p2p_set_device_discovered(_p2p_discovered_cb, NULL);
-       net_nfc_client_p2p_set_device_detached(_p2p_detached_cb, NULL);
-
-       gdbus_nfc_context.on_p2p_target_discovered_cb = callback;
-       gdbus_nfc_context.on_p2p_target_discovered_user_data = user_data;
-
-       return NFC_ERROR_NONE;
-       /* LCOV_EXCL_STOP */
-}
-
-void nfc_manager_unset_p2p_target_discovered_cb(void)
-{
-       LOG_BEGIN();
-
-       if (nfc_common_is_supported(NFC_P2P_FEATURE) == false) {
-               LOG_ERR("NFC not supported");
-               set_last_result(NFC_ERROR_NOT_SUPPORTED);
-               return;
-       }
-
-       /* LCOV_EXCL_START */
-       if (nfc_common_is_initialized() == false) {
-               LOG_ERR("NFC not initialized");
-               set_last_result(NFC_ERROR_NOT_INITIALIZED);
-               return;
-       }
-
-       gdbus_nfc_context.on_p2p_target_discovered_cb = NULL;
-       gdbus_nfc_context.on_p2p_target_discovered_user_data = NULL;
-
-       set_last_result(NFC_ERROR_NONE);
-       /* LCOV_EXCL_STOP */
-}
-
-int nfc_manager_set_system_handler_enable(bool enable)
-{
-       int ret;
-       int state;
-
-       LOG_BEGIN();
-
-       CHECK_SUPPORTED(NFC_FEATURE);
-
-       /* LCOV_EXCL_START */
-       CHECK_INIT();
-
-       if (enable == true)
-               state = 0;
-       else
-               state = 1;
-
-       ret = net_nfc_client_sys_handler_set_launch_popup_state(state);
-
-       return nfc_common_convert_error_code(__func__, ret);
-       /* LCOV_EXCL_STOP */
-}
-
-int nfc_manager_set_system_handler_enable_force(bool enable)
-{
-       int ret;
-       int state;
-
-       LOG_BEGIN();
-
-       CHECK_SUPPORTED(NFC_FEATURE);
-
-       /* LCOV_EXCL_START */
-       CHECK_INIT();
-
-       if (enable == true)
-               state = 0;
-       else
-               state = 1;
-
-       ret = net_nfc_client_sys_handler_set_launch_popup_state_force(state);
-
-       return nfc_common_convert_error_code(__func__, ret);
-       /* LCOV_EXCL_STOP */
-}
-
-bool nfc_manager_is_system_handler_enabled(void)
-{
-       int ret;
-       int state = 0;
-
-       LOG_BEGIN();
-
-       if (nfc_common_is_supported(NFC_FEATURE) == false) {
-               LOG_ERR("NFC not supported");
-               set_last_result(NFC_ERROR_NOT_SUPPORTED);
-               return false;
-       }
-
-       /* LCOV_EXCL_START */
-       if (nfc_common_is_initialized() == false) {
-               LOG_ERR("NFC not initialized");
-               set_last_result(NFC_ERROR_NOT_INITIALIZED);
-               return false;
-       }
-
-       ret = net_nfc_client_sys_handler_get_launch_popup_state(&state);
-
-       set_last_result(nfc_common_convert_error_code(__func__, ret));
-
-       return (state == 0);
-       /* LCOV_EXCL_STOP */
-}
-
-int nfc_manager_get_cached_message(nfc_ndef_message_h *ndef_message)
-{
-       int ret;
-
-       LOG_BEGIN();
-
-       CHECK_SUPPORTED(NFC_FEATURE);
-
-       /* LCOV_EXCL_START */
-       CHECK_INIT();
-       CHECK_INVALID(ndef_message == NULL);
-
-       ret = net_nfc_retrieve_current_ndef_message(ndef_message);
-
-       return nfc_common_convert_error_code(__func__, ret);
-       /* LCOV_EXCL_STOP */
-}
-
-/* LCOV_EXCL_START */
-static void _se_event_cb(net_nfc_message_e message, void *user_data)
-{
-       LOG_BEGIN();
-
-       if (gdbus_nfc_context.on_se_event_cb != NULL) {
-               if (message == NET_NFC_MESSAGE_SE_CARD_EMULATION_CHANGED)
-                       gdbus_nfc_context.on_se_event_cb(
-                               NFC_SE_EVENT_CARD_EMULATION_CHANGED,
-                               gdbus_nfc_context.on_se_event_user_data);
-
-               else if (message == NET_NFC_MESSAGE_SE_TYPE_CHANGED)
-                       gdbus_nfc_context.on_se_event_cb(
-                               NFC_SE_EVENT_SE_TYPE_CHANGED,
-                               gdbus_nfc_context.on_se_event_user_data);
-               else if (message == NET_NFC_MESSAGE_SE_FIELD_ON)
-                       gdbus_nfc_context.on_se_event_cb(
-                               NFC_SE_EVENT_FIELD_ON,
-                               gdbus_nfc_context.on_se_event_user_data);
-       }
-}
-/* LCOV_EXCL_STOP */
-
-int nfc_manager_set_se_event_cb(nfc_se_event_cb callback, void *user_data)
-{
-       LOG_BEGIN();
-
-       CHECK_SUPPORTED(NFC_CE_FEATURE);
-
-       /* LCOV_EXCL_START */
-       CHECK_INIT();
-       CHECK_INVALID(callback == NULL);
-
-       net_nfc_client_se_set_event_cb(_se_event_cb, NULL);
-
-       gdbus_nfc_context.on_se_event_cb = callback;
-       gdbus_nfc_context.on_se_event_user_data = user_data;
-
-       return NFC_ERROR_NONE;
-       /* LCOV_EXCL_STOP */
-}
-
-void nfc_manager_unset_se_event_cb(void)
-{
-       LOG_BEGIN();
-
-       if (nfc_common_is_supported(NFC_CE_FEATURE) == false) {
-               LOG_ERR("NFC not supported");
-               set_last_result(NFC_ERROR_NOT_SUPPORTED);
-               return;
-       }
-
-       /* LCOV_EXCL_START */
-       if (nfc_common_is_initialized() == false) {
-               LOG_ERR("NFC not initialized");
-               set_last_result(NFC_ERROR_NOT_INITIALIZED);
-               return;
-       }
-
-       gdbus_nfc_context.on_se_event_cb = NULL;
-       gdbus_nfc_context.on_se_event_user_data = NULL;
-
-       set_last_result(NFC_ERROR_NONE);
-       /* LCOV_EXCL_STOP */
-}
-
-/* LCOV_EXCL_START */
-static void _se_transaction_event_cb(net_nfc_se_type_e se_type, data_h aid,
-       data_h param, void *user_data)
-{
-       LOG_BEGIN();
-
-       if (gdbus_nfc_context.on_se_transaction_event_cb != NULL) {
-               gdbus_nfc_context.on_se_transaction_event_cb(
-                       se_type,
-                       net_nfc_get_data_buffer(aid),
-                       net_nfc_get_data_length(aid),
-                       net_nfc_get_data_buffer(param),
-                       net_nfc_get_data_length(param),
-                       gdbus_nfc_context.on_se_transaction_event_user_data);
-       }
-}
-/* LCOV_EXCL_STOP */
-
-int nfc_manager_set_se_transaction_event_cb(
-       nfc_se_type_e se_type,
-       nfc_se_transaction_event_cb callback,
-       void *user_data)
-{
-       net_nfc_se_type_e type = NET_NFC_SE_TYPE_NONE;
-
-       LOG_BEGIN();
-
-       CHECK_SUPPORTED(NFC_CE_FEATURE);
-
-       /* LCOV_EXCL_START */
-       CHECK_INIT();
-       CHECK_INVALID(callback == NULL);
-
-       gdbus_nfc_context.on_se_transaction_event_cb = callback;
-       gdbus_nfc_context.on_se_transaction_event_user_data = user_data;
-
-       switch (se_type) {
-       case NFC_SE_TYPE_ESE:
-               type = NET_NFC_SE_TYPE_ESE;
-               break;
-
-       case NFC_SE_TYPE_UICC:
-               type = NET_NFC_SE_TYPE_UICC;
-               break;
-       case NET_NFC_SE_TYPE_HCE:
-               type = NET_NFC_SE_TYPE_HCE;
-               break;
-       default:
-               return NFC_ERROR_INVALID_PARAMETER;
-               break;
-       }
-
-       net_nfc_client_se_set_transaction_event_cb(type, _se_transaction_event_cb, user_data);
-
-       return NFC_ERROR_NONE;
-       /* LCOV_EXCL_STOP */
-}
-
-void nfc_manager_unset_se_transaction_event_cb(nfc_se_type_e se_type)
-{
-       net_nfc_se_type_e type = NET_NFC_SE_TYPE_NONE;
-
-       LOG_BEGIN();
-
-       if (nfc_common_is_supported(NFC_CE_FEATURE) == false) {
-               LOG_ERR("NFC not supported");
-               set_last_result(NFC_ERROR_NOT_SUPPORTED);
-               return;
-       }
-
-       /* LCOV_EXCL_START */
-       if (nfc_common_is_initialized() == false) {
-               LOG_ERR("NFC not initialized");
-               set_last_result(NFC_ERROR_NOT_INITIALIZED);
-               return;
-       }
-
-       switch (se_type) {
-       case NFC_SE_TYPE_ESE:
-               type = NET_NFC_SE_TYPE_ESE;
-               break;
-
-       case NFC_SE_TYPE_UICC:
-               type = NET_NFC_SE_TYPE_UICC;
-               break;
-       default:
-               type = NET_NFC_SE_TYPE_NONE;
-               break;
-       }
-
-       net_nfc_client_se_unset_transaction_event_cb(type);
-
-       set_last_result(NFC_ERROR_NONE);
-       /* LCOV_EXCL_STOP */
-}
-
-int nfc_manager_enable_transaction_fg_dispatch()
-{
-       net_nfc_error_e result;
-
-       LOG_BEGIN();
-
-       CHECK_SUPPORTED(NFC_CE_FEATURE);
-
-       /* LCOV_EXCL_START */
-       CHECK_INIT();
-
-       result = net_nfc_client_se_set_transaction_fg_dispatch(true);
-
-       return nfc_common_convert_error_code(__func__, result);
-       /* LCOV_EXCL_STOP */
-}
-
-int nfc_manager_disable_transaction_fg_dispatch()
-{
-       net_nfc_error_e result;
-
-       CHECK_SUPPORTED(NFC_CE_FEATURE);
-
-       /* LCOV_EXCL_START */
-       CHECK_INIT();
-
-       result = net_nfc_client_se_set_transaction_fg_dispatch(false);
-
-       return nfc_common_convert_error_code(__func__, result);
-       /* LCOV_EXCL_STOP */
-}
-
-int nfc_manager_set_se_type(nfc_se_type_e type)
-{
-       int ret;
-       net_nfc_se_type_e se_type = NET_NFC_SE_TYPE_NONE;
-
-       LOG_BEGIN();
-
-       CHECK_SUPPORTED(NFC_CE_FEATURE);
-
-       /* LCOV_EXCL_START */
-       CHECK_INIT();
-       CHECK_INVALID(type < NFC_SE_TYPE_DISABLE);
-       CHECK_INVALID(type > NFC_SE_TYPE_HCE);
-
-       switch (type) {
-       case NFC_SE_TYPE_ESE:
-               se_type = NET_NFC_SE_TYPE_ESE;
-               break;
-       case NFC_SE_TYPE_UICC:
-               se_type = NET_NFC_SE_TYPE_UICC;
-               break;
-       case NFC_SE_TYPE_HCE:
-               se_type = NET_NFC_SE_TYPE_HCE;
-               break;
-       default:
-               se_type = NET_NFC_SE_TYPE_NONE;
-               break;
-       }
-
-       ret = net_nfc_client_se_set_secure_element_type_sync(se_type);
-
-       return nfc_common_convert_error_code(__func__, ret);
-       /* LCOV_EXCL_STOP */
-}
-
-int nfc_manager_get_se_type(nfc_se_type_e *type)
-{
-       int ret;
-       net_nfc_se_type_e se_type = NET_NFC_SE_TYPE_NONE;
-
-       LOG_BEGIN();
-
-       CHECK_SUPPORTED(NFC_CE_FEATURE);
-
-       /* LCOV_EXCL_START */
-       CHECK_INIT();
-       CHECK_INVALID(type == NULL);
-
-       ret = net_nfc_client_se_get_secure_element_type_sync(&se_type);
-
-       switch (se_type) {
-       case NET_NFC_SE_TYPE_ESE:
-               *type = NFC_SE_TYPE_ESE;
-               break;
-       case NET_NFC_SE_TYPE_UICC:
-               *type = NFC_SE_TYPE_UICC;
-               break;
-       case NET_NFC_SE_TYPE_HCE:
-               *type = NFC_SE_TYPE_HCE;
-               break;
-       default:
-               *type = NFC_SE_TYPE_DISABLE;
-               break;
-       }
-
-       return nfc_common_convert_error_code(__func__, ret);
-       /* LCOV_EXCL_STOP */
-}
-
-/* LCOV_EXCL_START */
-static void _hce_event_cb(net_nfc_target_handle_h handle,
-               net_nfc_hce_event_t event, data_h apdu, void *user_data)
-{
-       LOG_BEGIN();
-
-       if (gdbus_nfc_context.on_hce_event_cb != NULL) {
-               gdbus_nfc_context.on_hce_event_cb(
-                       (nfc_se_h)handle,
-                       (nfc_hce_event_type_e)event,
-                       net_nfc_get_data_buffer(apdu),
-                       net_nfc_get_data_length(apdu),
-                       gdbus_nfc_context.on_hce_event_user_data);
-       }
-}
-/* LCOV_EXCL_STOP */
-
-int nfc_manager_set_hce_event_cb(nfc_hce_event_cb callback, void *user_data)
-{
-       net_nfc_error_e result;
-       LOG_BEGIN();
-
-       CHECK_SUPPORTED(NFC_CE_HCE_FEATURE);
-
-       /* LCOV_EXCL_START */
-       CHECK_INIT();
-       CHECK_INVALID(callback == NULL);
-
-       gdbus_nfc_context.on_hce_event_cb = callback;
-       gdbus_nfc_context.on_hce_event_user_data = user_data;
-
-       result = net_nfc_client_hce_set_event_received_cb(_hce_event_cb, user_data);
-
-       return nfc_common_convert_error_code(__func__, result);
-       /* LCOV_EXCL_STOP */
-}
-
-void nfc_manager_unset_hce_event_cb(void)
-{
-       LOG_BEGIN();
-
-       if (nfc_common_is_supported(NFC_CE_HCE_FEATURE) == false) {
-               LOG_ERR("NFC not supported");
-               set_last_result(NFC_ERROR_NOT_SUPPORTED);
-               return;
-       }
-
-       /* LCOV_EXCL_START */
-       if (nfc_common_is_initialized() == false) {
-               LOG_ERR("NFC not initialized");
-               set_last_result(NFC_ERROR_NOT_INITIALIZED);
-               return;
-       }
-
-       net_nfc_client_hce_unset_event_received_cb();
-
-       set_last_result(NFC_ERROR_NONE);
-       /* LCOV_EXCL_STOP */
-}
-
diff --git a/test/src/nfc_ndef.c b/test/src/nfc_ndef.c
deleted file mode 100755 (executable)
index f92f320..0000000
+++ /dev/null
@@ -1,659 +0,0 @@
-/*
-* Copyright (c) 2012, 2013 Samsung Electronics Co., Ltd.
-*
-* 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.
-*/
-
-#include "nfc_common.h"
-
-int nfc_ndef_record_create(nfc_ndef_record_h *record,
-       nfc_record_tnf_e tnf,
-       const unsigned char *type,
-       int type_size,
-       const unsigned char *id,
-       int id_size,
-       const unsigned char *payload,
-       unsigned int payload_size)
-{
-       int ret;
-       data_h type_data = NULL;
-       data_h id_data = NULL;
-       data_h payload_data = NULL;
-
-       LOG_BEGIN();
-
-       CHECK_SUPPORTED(NFC_FEATURE);
-
-       /* LCOV_EXCL_START */
-       CHECK_INIT();
-       CHECK_INVALID(record == NULL);
-
-       net_nfc_create_data(&type_data, type, type_size);
-
-       if (id != NULL && id_size > 0)
-               net_nfc_create_data(&id_data, id, id_size);
-
-       if (payload != NULL && payload_size > 0)
-               net_nfc_create_data(&payload_data, payload, payload_size);
-
-       ret = net_nfc_create_record(
-               (ndef_record_h *)record,
-               tnf,
-               type_data,
-               id_data,
-               payload_data);
-
-       if (payload_data != NULL)
-               net_nfc_free_data(payload_data);
-
-       if (id_data != NULL)
-               net_nfc_free_data(id_data);
-
-       net_nfc_free_data(type_data);
-
-       return nfc_common_convert_error_code(__func__, ret);
-       /* LCOV_EXCL_STOP */
-}
-
-
-int nfc_ndef_record_create_text(nfc_ndef_record_h *record,
-       const char *text,
-       const char *lang_code,
-       nfc_encode_type_e encode)
-{
-       int ret;
-
-       LOG_BEGIN();
-
-       CHECK_SUPPORTED(NFC_FEATURE);
-
-       /* LCOV_EXCL_START */
-       CHECK_INIT();
-       CHECK_INVALID(record == NULL);
-       CHECK_INVALID(text == NULL);
-       CHECK_INVALID(lang_code == NULL);
-
-       ret = net_nfc_create_text_type_record(
-               (ndef_record_h *)record,
-               text,
-               lang_code,
-               encode);
-
-       return nfc_common_convert_error_code(__func__, ret);
-       /* LCOV_EXCL_STOP */
-}
-
-int nfc_ndef_record_create_uri(nfc_ndef_record_h *record,
-       const char *uri)
-{
-       int ret;
-
-       LOG_BEGIN();
-
-       CHECK_SUPPORTED(NFC_FEATURE);
-
-       /* LCOV_EXCL_START */
-       CHECK_INIT();
-       CHECK_INVALID(record == NULL);
-       CHECK_INVALID(uri == NULL);
-
-       ret = net_nfc_create_uri_type_record(
-               (ndef_record_h *)record,
-               uri,
-               NET_NFC_SCHEMA_FULL_URI);
-
-       return nfc_common_convert_error_code(__func__, ret);
-       /* LCOV_EXCL_STOP */
-}
-
-int nfc_ndef_record_create_mime(nfc_ndef_record_h *record,
-       const char *mime_type,
-       const unsigned char *data,
-       unsigned int data_size)
-{
-       int ret;
-
-       LOG_BEGIN();
-
-       CHECK_SUPPORTED(NFC_FEATURE);
-
-       /* LCOV_EXCL_START */
-       CHECK_INIT();
-       CHECK_INVALID(record == NULL);
-       CHECK_INVALID(mime_type == NULL);
-       CHECK_INVALID(data == NULL);
-       CHECK_INVALID(data_size <= 0);
-
-       ret = nfc_ndef_record_create(record,
-               NFC_RECORD_TNF_MIME_MEDIA,
-               (unsigned char *)mime_type,
-               strlen(mime_type),
-               NULL,
-               0,
-               data,
-               data_size);
-
-       return nfc_common_convert_error_code(__func__, ret);
-       /* LCOV_EXCL_STOP */
-}
-
-int nfc_ndef_record_get_mime_type(nfc_ndef_record_h record,
-       char **mime_type)
-{
-       int ret;
-       nfc_record_tnf_e tnf;
-       unsigned char *typename;
-       int length;
-
-       LOG_BEGIN();
-
-       CHECK_SUPPORTED(NFC_FEATURE);
-
-       /* LCOV_EXCL_START */
-       CHECK_INIT();
-       CHECK_INVALID(record == NULL);
-       CHECK_INVALID(mime_type == NULL);
-
-       if (nfc_ndef_record_get_tnf(record, &tnf) != NET_NFC_OK ||
-               tnf != NFC_RECORD_TNF_MIME_MEDIA) {
-               return NFC_ERROR_INVALID_RECORD_TYPE;
-       }
-
-       ret = nfc_ndef_record_get_type(record, &typename, &length);
-       if (ret == NET_NFC_OK) {
-               *mime_type = calloc(1, length + 1);
-               if (*mime_type != NULL)
-                       memcpy(*mime_type, typename, length);
-               else
-                       ret = NET_NFC_ALLOC_FAIL;
-       }
-
-       return nfc_common_convert_error_code(__func__, ret);
-       /* LCOV_EXCL_STOP */
-}
-
-int nfc_ndef_record_destroy(nfc_ndef_record_h record)
-{
-       int ret;
-
-       LOG_BEGIN();
-
-       CHECK_SUPPORTED(NFC_FEATURE);
-
-       /* LCOV_EXCL_START */
-       CHECK_INIT();
-       CHECK_INVALID(record == NULL);
-
-       ret = net_nfc_free_record(record);
-
-       return nfc_common_convert_error_code(__func__, ret);
-       /* LCOV_EXCL_STOP */
-}
-
-int nfc_ndef_record_set_id(nfc_ndef_record_h record,
-       unsigned char *id,
-       int id_size)
-{
-       int ret;
-       data_h id_data = NULL;
-
-       LOG_BEGIN();
-
-       CHECK_SUPPORTED(NFC_FEATURE);
-
-       /* LCOV_EXCL_START */
-       CHECK_INIT();
-       CHECK_INVALID(record == NULL);
-       CHECK_INVALID(id == NULL);
-
-       ret = net_nfc_create_data(&id_data, id, id_size);
-       if (ret == NET_NFC_OK) {
-               ret = net_nfc_set_record_id(record, id_data);
-
-               net_nfc_free_data(id_data);
-       } else {
-               LOG_ERR("net_nfc_create_data failed, [%d]", ret);
-       }
-
-       return nfc_common_convert_error_code(__func__, ret);
-       /* LCOV_EXCL_STOP */
-}
-
-int nfc_ndef_record_get_payload(nfc_ndef_record_h record,
-       unsigned char **payload,
-       unsigned int *size)
-{
-       int ret;
-       data_h payload_data;
-
-       LOG_BEGIN();
-
-       CHECK_SUPPORTED(NFC_FEATURE);
-
-       /* LCOV_EXCL_START */
-       CHECK_INIT();
-       CHECK_INVALID(record == NULL);
-       CHECK_INVALID(payload == NULL);
-       CHECK_INVALID(size == NULL);
-
-       *payload = NULL;
-       *size = 0;
-
-       ret = net_nfc_get_record_payload(record, &payload_data);
-       if (ret == NET_NFC_OK) {
-               *payload = net_nfc_get_data_buffer(payload_data);
-               *size = net_nfc_get_data_length(payload_data);
-       } else {
-               *payload = NULL;
-               *size = 0;
-       }
-
-       return nfc_common_convert_error_code(__func__, ret);
-       /* LCOV_EXCL_STOP */
-}
-
-int nfc_ndef_record_get_type(nfc_ndef_record_h record,
-       unsigned char **type,
-       int *size)
-{
-       int ret;
-       data_h type_data;
-
-       LOG_BEGIN();
-
-       CHECK_SUPPORTED(NFC_FEATURE);
-
-       /* LCOV_EXCL_START */
-       CHECK_INIT();
-       CHECK_INVALID(record == NULL);
-       CHECK_INVALID(type == NULL);
-       CHECK_INVALID(size == NULL);
-
-       *type = NULL;
-       *size = 0;
-
-       ret = net_nfc_get_record_type(record, &type_data);
-       if (ret == NET_NFC_OK) {
-               *type = net_nfc_get_data_buffer(type_data);
-               *size = net_nfc_get_data_length(type_data);
-       } else {
-               *type = NULL;
-               *size = 0;
-       }
-
-       return nfc_common_convert_error_code(__func__, ret);
-       /* LCOV_EXCL_STOP */
-}
-
-int nfc_ndef_record_get_id(nfc_ndef_record_h record,
-       unsigned char **id,
-       int *size)
-{
-       int ret;
-       data_h id_data;
-
-       LOG_BEGIN();
-
-       CHECK_SUPPORTED(NFC_FEATURE);
-
-       /* LCOV_EXCL_START */
-       CHECK_INIT();
-       CHECK_INVALID(record == NULL);
-       CHECK_INVALID(id == NULL);
-       CHECK_INVALID(size == NULL);
-
-       *id = NULL;
-       *size = 0;
-
-       ret = net_nfc_get_record_id(record, &id_data);
-       if (ret == NET_NFC_OK) {
-               *id = net_nfc_get_data_buffer(id_data);
-               *size = net_nfc_get_data_length(id_data);
-       } else {
-               *id = NULL;
-               *size = 0;
-       }
-
-       return nfc_common_convert_error_code(__func__, ret);
-       /* LCOV_EXCL_STOP */
-}
-
-int nfc_ndef_record_get_tnf(nfc_ndef_record_h record, nfc_record_tnf_e *tnf)
-{
-       int ret;
-
-       LOG_BEGIN();
-
-       CHECK_SUPPORTED(NFC_FEATURE);
-
-       /* LCOV_EXCL_START */
-       CHECK_INIT();
-       CHECK_INVALID(record == NULL);
-       CHECK_INVALID(tnf == NULL);
-
-       ret = net_nfc_get_record_tnf(record, (net_nfc_record_tnf_e *)tnf);
-
-       return nfc_common_convert_error_code(__func__, ret);
-       /* LCOV_EXCL_STOP */
-}
-
-int nfc_ndef_record_get_text(nfc_ndef_record_h record, char **buffer)
-{
-       int ret;
-       unsigned char* record_type = NULL;
-       int type_size = 0;
-
-       LOG_BEGIN();
-
-       CHECK_SUPPORTED(NFC_FEATURE);
-
-       /* LCOV_EXCL_START */
-       CHECK_INIT();
-       CHECK_INVALID(record == NULL);
-       CHECK_INVALID(buffer == NULL);
-
-       ret = nfc_ndef_record_get_type(record, &record_type, &type_size);
-
-       if (ret == NFC_ERROR_NONE && record_type != NULL && type_size != 0 &&
-                               !strcmp((char*)record_type, "T")) {
-               LOG_ERR("record type is T");
-               ret = net_nfc_create_text_string_from_text_record(record, buffer);
-       } else {
-               LOG_ERR("record type is not T");
-               return NFC_ERROR_INVALID_RECORD_TYPE;
-       }
-
-       return nfc_common_convert_error_code(__func__, ret);
-       /* LCOV_EXCL_STOP */
-}
-
-int nfc_ndef_record_get_langcode(nfc_ndef_record_h record, char **lang_code)
-{
-       int ret;
-
-       LOG_BEGIN();
-
-       CHECK_SUPPORTED(NFC_FEATURE);
-
-       /* LCOV_EXCL_START */
-       CHECK_INIT();
-       CHECK_INVALID(record == NULL);
-       CHECK_INVALID(lang_code == NULL);
-
-       ret = net_nfc_get_languange_code_string_from_text_record(record, lang_code);
-
-       return nfc_common_convert_error_code(__func__, ret);
-       /* LCOV_EXCL_STOP */
-}
-
-int nfc_ndef_record_get_encode_type(
-       nfc_ndef_record_h record,
-       nfc_encode_type_e *encode)
-{
-       int ret;
-
-       LOG_BEGIN();
-
-       CHECK_SUPPORTED(NFC_FEATURE);
-
-       /* LCOV_EXCL_START */
-       CHECK_INIT();
-       CHECK_INVALID(record == NULL);
-       CHECK_INVALID(encode == NULL);
-
-       ret = net_nfc_get_encoding_type_from_text_record(
-               record,
-               (net_nfc_encode_type_e *)encode);
-
-       /*      if( ret == NFC_NDEF_RECORD_IS_NOT_EXPECTED_TYPE)
-        LOGE("%s reord type is not text type");*/
-
-       return nfc_common_convert_error_code(__func__, ret);
-       /* LCOV_EXCL_STOP */
-}
-
-int nfc_ndef_record_get_uri(nfc_ndef_record_h record, char **uri)
-{
-       int ret;
-
-       LOG_BEGIN();
-
-       CHECK_SUPPORTED(NFC_FEATURE);
-
-       /* LCOV_EXCL_START */
-       CHECK_INIT();
-       CHECK_INVALID(record == NULL);
-       CHECK_INVALID(uri == NULL);
-
-       ret = net_nfc_create_uri_string_from_uri_record(record, uri);
-
-       return nfc_common_convert_error_code(__func__, ret);
-       /* LCOV_EXCL_STOP */
-}
-
-int nfc_ndef_message_create(nfc_ndef_message_h *ndef_message)
-{
-       int ret;
-
-       LOG_BEGIN();
-
-       CHECK_SUPPORTED(NFC_FEATURE);
-
-       /* LCOV_EXCL_START */
-       CHECK_INIT();
-       CHECK_INVALID(ndef_message == NULL);
-
-       ret = net_nfc_create_ndef_message(ndef_message);
-
-       return nfc_common_convert_error_code(__func__, ret);
-       /* LCOV_EXCL_STOP */
-}
-
-int nfc_ndef_message_create_from_rawdata(
-       nfc_ndef_message_h *ndef_message,
-       const unsigned char *rawdata,
-       unsigned int rawdata_size)
-{
-       int ret;
-       data_h rawdata_data = NULL;
-
-       LOG_BEGIN();
-
-       CHECK_SUPPORTED(NFC_FEATURE);
-
-       /* LCOV_EXCL_START */
-       CHECK_INIT();
-       CHECK_INVALID(ndef_message == NULL);
-       CHECK_INVALID(rawdata == NULL);
-       CHECK_INVALID(rawdata_size <= 0);
-
-       ret = net_nfc_create_data(&rawdata_data, rawdata, rawdata_size);
-       if (ret == NET_NFC_OK) {
-               ret = net_nfc_create_ndef_message_from_rawdata(
-                       (ndef_message_h *)ndef_message,
-                       rawdata_data);
-
-               net_nfc_free_data(rawdata_data);
-       } else {
-               LOG_ERR("net_nfc_create_data failed, [%d]", ret);
-       }
-
-       return nfc_common_convert_error_code(__func__, ret);
-       /* LCOV_EXCL_STOP */
-}
-
-int nfc_ndef_message_destroy(nfc_ndef_message_h ndef_message)
-{
-       int ret;
-
-       LOG_BEGIN();
-
-       CHECK_SUPPORTED(NFC_FEATURE);
-
-       /* LCOV_EXCL_START */
-       CHECK_INIT();
-       CHECK_INVALID(ndef_message == NULL);
-
-       ret = net_nfc_free_ndef_message(ndef_message);
-
-       return nfc_common_convert_error_code(__func__, ret);
-       /* LCOV_EXCL_STOP */
-}
-
-int nfc_ndef_message_get_record_count(nfc_ndef_message_h ndef_message,
-       int *count)
-{
-       int ret;
-
-       LOG_BEGIN();
-
-       CHECK_SUPPORTED(NFC_FEATURE);
-
-       /* LCOV_EXCL_START */
-       CHECK_INIT();
-       CHECK_INVALID(ndef_message == NULL);
-       CHECK_INVALID(count == NULL);
-
-       ret = net_nfc_get_ndef_message_record_count(ndef_message, count);
-
-       return nfc_common_convert_error_code(__func__, ret);
-       /* LCOV_EXCL_STOP */
-}
-
-int nfc_ndef_message_get_rawdata(nfc_ndef_message_h ndef_message,
-       unsigned char **rawdata,
-       unsigned int *rawdata_size)
-{
-       int ret;
-       data_h rawdata_data;
-
-       LOG_BEGIN();
-
-       CHECK_SUPPORTED(NFC_FEATURE);
-
-       /* LCOV_EXCL_START */
-       CHECK_INIT();
-       CHECK_INVALID(ndef_message == NULL);
-       CHECK_INVALID(rawdata == NULL);
-       CHECK_INVALID(rawdata_size == NULL);
-
-       *rawdata = NULL;
-       *rawdata_size = 0;
-
-       ret = net_nfc_create_rawdata_from_ndef_message(ndef_message,
-               &rawdata_data);
-       if (ret == NET_NFC_OK) {
-               uint8_t *buffer;
-               uint32_t length;
-
-               buffer = net_nfc_get_data_buffer(rawdata_data);
-               length = net_nfc_get_data_length(rawdata_data);
-
-               *rawdata = calloc(1, length);
-               if (*rawdata != NULL) {
-                       memcpy(*rawdata, buffer, length);
-                       *rawdata_size = length;
-               } else {
-                       ret = NET_NFC_ALLOC_FAIL;
-               }
-
-               net_nfc_free_data(rawdata_data);
-       }
-
-       return nfc_common_convert_error_code(__func__, ret);
-       /* LCOV_EXCL_STOP */
-}
-
-int nfc_ndef_message_append_record(nfc_ndef_message_h ndef_message,
-       nfc_ndef_record_h record)
-{
-       int ret;
-
-       LOG_BEGIN();
-
-       CHECK_SUPPORTED(NFC_FEATURE);
-
-       /* LCOV_EXCL_START */
-       CHECK_INIT();
-       CHECK_INVALID(ndef_message == NULL);
-       CHECK_INVALID(record == NULL);
-
-       ret = net_nfc_append_record_to_ndef_message(ndef_message, record);
-
-       return nfc_common_convert_error_code(__func__, ret);
-       /* LCOV_EXCL_STOP */
-}
-
-int nfc_ndef_message_insert_record(nfc_ndef_message_h ndef_message,
-       int index,
-       nfc_ndef_record_h record)
-{
-       int ret;
-
-       LOG_BEGIN();
-
-       CHECK_SUPPORTED(NFC_FEATURE);
-
-       /* LCOV_EXCL_START */
-       CHECK_INIT();
-       CHECK_INVALID(ndef_message == NULL);
-       CHECK_INVALID(record == NULL);
-
-       ret = net_nfc_append_record_by_index(ndef_message, index, record);
-
-       return nfc_common_convert_error_code(__func__, ret);
-       /* LCOV_EXCL_STOP */
-}
-
-int nfc_ndef_message_remove_record(nfc_ndef_message_h ndef_message,
-       int index)
-{
-       int ret;
-
-       LOG_BEGIN();
-
-       CHECK_SUPPORTED(NFC_FEATURE);
-
-       /* LCOV_EXCL_START */
-       CHECK_INIT();
-       CHECK_INVALID(ndef_message == NULL);
-
-       ret = net_nfc_remove_record_by_index(ndef_message, index);
-
-       return nfc_common_convert_error_code(__func__, ret);
-       /* LCOV_EXCL_STOP */
-}
-
-int nfc_ndef_message_get_record(nfc_ndef_message_h ndef_message,
-       int index,
-       nfc_ndef_record_h *record)
-{
-       int ret;
-
-       LOG_BEGIN();
-
-       CHECK_SUPPORTED(NFC_FEATURE);
-
-       /* LCOV_EXCL_START */
-       CHECK_INIT();
-       CHECK_INVALID(ndef_message == NULL);
-       CHECK_INVALID(record == NULL);
-
-       ret = net_nfc_get_record_by_index(ndef_message,
-               index,
-               (ndef_record_h*)record);
-
-       return nfc_common_convert_error_code(__func__, ret);
-       /* LCOV_EXCL_STOP */
-}
-
diff --git a/test/src/nfc_p2p.c b/test/src/nfc_p2p.c
deleted file mode 100755 (executable)
index 76758b8..0000000
+++ /dev/null
@@ -1,574 +0,0 @@
-/*
-* Copyright (c) 2012, 2013 Samsung Electronics Co., Ltd.
-*
-* 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.
-*/
-
-#include "nfc_common.h"
-
-/* LCOV_EXCL_START */
-static void _p2p_send_cb(net_nfc_error_e result, void *user_data)
-{
-       nfc_p2p_send_completed_cb callback;
-       void *user_param;
-
-       LOG_BEGIN();
-
-       if (user_data == NULL)
-               return;
-
-       g_variant_get((GVariant *)user_data,
-               "(uu)",
-               (guint *)&callback,
-               (guint *)&user_param);
-
-       if (callback != NULL)
-               callback(nfc_common_convert_error_code(__func__, result), user_param);
-
-       g_variant_unref((GVariant *)user_data);
-}
-/* LCOV_EXCL_STOP */
-
-int nfc_p2p_send(nfc_p2p_target_h target,
-       nfc_ndef_message_h message,
-       nfc_p2p_send_completed_cb callback,
-       void *user_data)
-{
-       int ret;
-       data_h rawdata;
-       GVariant *parameter;
-
-       LOG_BEGIN();
-
-       CHECK_SUPPORTED(NFC_P2P_FEATURE);
-
-       /* LCOV_EXCL_START */
-       CHECK_INIT();
-       CHECK_INVALID(message == NULL);
-       CHECK_INVALID(target == NULL);
-       CHECK_ACTIVATED();
-       CHECK_APP_PERMISSION();
-
-       parameter = g_variant_new("(uu)",
-               GPOINTER_TO_UINT(callback),
-               GPOINTER_TO_UINT(user_data));
-       if (parameter != NULL) {
-               net_nfc_create_rawdata_from_ndef_message(message, &rawdata);
-               ret = net_nfc_client_p2p_send((net_nfc_target_handle_h)target,
-                       rawdata,
-                       _p2p_send_cb,
-                       parameter);
-               if (ret != NET_NFC_OK)
-                       g_variant_unref(parameter);
-
-               net_nfc_free_data(rawdata);
-       } else {
-               ret = NET_NFC_ALLOC_FAIL;
-       }
-
-       return nfc_common_convert_error_code(__func__, ret);
-       /* LCOV_EXCL_STOP */
-}
-
-int nfc_p2p_send_no_permission(
-       nfc_p2p_target_h target,
-       nfc_ndef_message_h message,
-       nfc_p2p_send_completed_cb callback,
-       void *user_data)
-{
-       int ret;
-       data_h rawdata;
-       GVariant *parameter;
-
-       LOG_BEGIN();
-
-       CHECK_SUPPORTED(NFC_P2P_FEATURE);
-
-       /* LCOV_EXCL_START */
-       CHECK_INIT();
-       CHECK_INVALID(target == NULL);
-       CHECK_INVALID(message == NULL);
-       CHECK_ACTIVATED();
-
-       /* skip check app permission */
-
-       parameter = g_variant_new("(uu)",
-               GPOINTER_TO_UINT(callback),
-               GPOINTER_TO_UINT(user_data));
-       if (parameter != NULL) {
-               net_nfc_create_rawdata_from_ndef_message(message, &rawdata);
-               ret = net_nfc_client_p2p_send((net_nfc_target_handle_h)target,
-                       rawdata,
-                       _p2p_send_cb,
-                       parameter);
-               if (ret != NET_NFC_OK)
-                       g_variant_unref(parameter);
-
-               net_nfc_free_data(rawdata);
-       } else {
-               ret = NET_NFC_ALLOC_FAIL;
-       }
-
-       return nfc_common_convert_error_code(__func__, ret);
-       /* LCOV_EXCL_STOP */
-}
-
-/* LCOV_EXCL_START */
-static void _p2p_set_data_received_cb(data_h data, void *user_data)
-{
-       LOG_BEGIN();
-
-       if (gdbus_nfc_context.on_p2p_recv_cb != NULL) {
-               ndef_message_h ndef_message;
-
-               net_nfc_create_ndef_message_from_rawdata(&ndef_message, data);
-
-               gdbus_nfc_context.on_p2p_recv_cb(
-                       (nfc_p2p_target_h)(gdbus_nfc_context.current_target),
-                       ndef_message,
-                       gdbus_nfc_context.on_p2p_recv_user_data);
-
-               net_nfc_free_ndef_message(ndef_message);
-       }
-}
-/* LCOV_EXCL_STOP */
-
-int nfc_p2p_set_data_received_cb(nfc_p2p_target_h target,
-       nfc_p2p_data_received_cb callback,
-       void *user_data)
-{
-       LOG_BEGIN();
-
-       CHECK_SUPPORTED(NFC_P2P_FEATURE);
-
-       /* LCOV_EXCL_START */
-       CHECK_INIT();
-       CHECK_INVALID(target == NULL);
-       CHECK_INVALID(callback == NULL);
-       CHECK_INVALID(gdbus_nfc_context.current_target != target);
-
-       gdbus_nfc_context.on_p2p_recv_cb = callback;
-       gdbus_nfc_context.on_p2p_recv_user_data = user_data;
-
-       net_nfc_client_p2p_set_data_received(_p2p_set_data_received_cb, NULL);
-
-       return NFC_ERROR_NONE;
-       /* LCOV_EXCL_STOP */
-}
-
-int nfc_p2p_unset_data_received_cb(nfc_p2p_target_h target)
-{
-       LOG_BEGIN();
-
-       CHECK_SUPPORTED(NFC_P2P_FEATURE);
-
-       /* LCOV_EXCL_START */
-       CHECK_INIT();
-       CHECK_INVALID(target == NULL);
-       CHECK_INVALID(gdbus_nfc_context.current_target != target);
-
-       net_nfc_client_p2p_unset_data_received();
-
-       gdbus_nfc_context.on_p2p_recv_cb = NULL;
-       gdbus_nfc_context.on_p2p_recv_user_data = NULL;
-
-       return NFC_ERROR_NONE;
-       /* LCOV_EXCL_STOP */
-}
-
-/* LCOV_EXCL_START */
-static void _snep_start_server_cb(
-       net_nfc_snep_handle_h arg_handle,
-       net_nfc_snep_type_t event,
-       net_nfc_error_e result,
-       nfc_ndef_message_h msg,
-       void *user_data)
-{
-       nfc_snep_event_cb callback;
-       void *user_param;
-
-       LOG_BEGIN();
-
-       if (user_data == NULL) {
-               LOG_ERR("user_data is NULL");
-               return;
-       }
-
-       g_variant_get((GVariant *)user_data,
-               "(uu)",
-               (guint *)&callback,
-               (guint *)&user_param);
-
-       if (callback != NULL) {
-               nfc_snep_event_e snep_event;
-
-               switch ((int)event) {
-               case NET_NFC_SNEP_GET:
-                       snep_event = NFC_SNEP_EVENT_GET;
-                       break;
-
-               case NET_NFC_SNEP_PUT:
-                       snep_event = NFC_SNEP_EVENT_PUT;
-                       break;
-
-               case NET_NFC_LLCP_REGISTERED:
-                       snep_event = NFC_SNEP_EVENT_REGISTER;
-                       break;
-
-               case NET_NFC_LLCP_UNREGISTERED:
-                       snep_event = NFC_SNEP_EVENT_UNREGISTER;
-                       break;
-
-               case NET_NFC_LLCP_START:
-                       snep_event = NFC_SNEP_EVENT_START;
-                       break;
-
-               case NET_NFC_LLCP_STOP:
-               default:
-                       snep_event = NFC_SNEP_EVENT_STOP;
-                       break;
-               }
-
-               callback(arg_handle, snep_event,
-                       nfc_common_convert_error_code(__func__, result),
-                       msg, user_param);
-
-               if (snep_event == NFC_SNEP_EVENT_STOP)
-                       g_variant_unref(user_data);
-       }
-}
-/* LCOV_EXCL_STOP */
-
-int nfc_snep_start_server(nfc_p2p_target_h target,
-       const char *san,
-       int sap,
-       nfc_snep_event_cb callback,
-       void *user_data)
-{
-       net_nfc_error_e result;
-       GVariant *parameter;
-
-       LOG_BEGIN();
-
-       CHECK_SUPPORTED(NFC_P2P_FEATURE);
-
-       /* LCOV_EXCL_START */
-       CHECK_INIT();
-       CHECK_INVALID(target == NULL);
-
-       parameter = g_variant_new("(uu)",
-               GPOINTER_TO_UINT(callback),
-               GPOINTER_TO_UINT(user_data));
-       if (parameter != NULL) {
-               result = net_nfc_client_snep_start_server(
-                       (net_nfc_target_handle_h)target,
-                       san,
-                       (sap_t)sap,
-                       _snep_start_server_cb,
-                       parameter);
-               if (result != NET_NFC_OK)
-                       g_variant_unref(parameter);
-       } else {
-               result = NET_NFC_ALLOC_FAIL;
-       }
-
-       return nfc_common_convert_error_code(__func__, result);
-       /* LCOV_EXCL_STOP */
-}
-
-/* LCOV_EXCL_START */
-static void _snep_start_client_cb(net_nfc_snep_handle_h arg_handle,
-       net_nfc_snep_type_t event,
-       net_nfc_error_e result,
-       nfc_ndef_message_h msg,
-       void *user_data)
-{
-       nfc_snep_event_cb callback;
-       void *user_param;
-
-       LOG_BEGIN();
-
-       if (user_data == NULL) {
-               LOG_ERR("user_data is NULL");
-               return;
-       }
-
-       g_variant_get((GVariant *)user_data,
-               "(uu)",
-               (guint *)&callback,
-               (guint *)&user_param);
-
-       if (callback != NULL) {
-               nfc_snep_event_e snep_event;
-
-               switch ((int)event) {
-               case NET_NFC_SNEP_GET:
-                       snep_event = NFC_SNEP_EVENT_GET;
-                       break;
-
-               case NET_NFC_SNEP_PUT:
-                       snep_event = NFC_SNEP_EVENT_PUT;
-                       break;
-
-               case NET_NFC_LLCP_REGISTERED:
-                       snep_event = NFC_SNEP_EVENT_REGISTER;
-                       break;
-
-               case NET_NFC_LLCP_UNREGISTERED:
-                       snep_event = NFC_SNEP_EVENT_UNREGISTER;
-                       break;
-
-               case NET_NFC_LLCP_START:
-                       snep_event = NFC_SNEP_EVENT_START;
-                       break;
-
-               case NET_NFC_LLCP_STOP:
-               default:
-                       snep_event = NFC_SNEP_EVENT_STOP;
-                       break;
-               }
-
-               callback(arg_handle, snep_event,
-                       nfc_common_convert_error_code(__func__, result),
-                       msg, user_param);
-
-               if (snep_event == NFC_SNEP_EVENT_STOP)
-                       g_variant_unref(user_data);
-       }
-}
-/* LCOV_EXCL_STOP */
-
-int nfc_snep_start_client(nfc_p2p_target_h target,
-       const char *san,
-       int sap,
-       nfc_snep_event_cb callback,
-       void *user_data)
-{
-       net_nfc_error_e result;
-       GVariant *parameter;
-
-       LOG_BEGIN();
-
-       CHECK_SUPPORTED(NFC_P2P_FEATURE);
-
-       /* LCOV_EXCL_START */
-       CHECK_INIT();
-       CHECK_INVALID(target == NULL);
-
-       parameter = g_variant_new("(uu)",
-               GPOINTER_TO_UINT(callback),
-               GPOINTER_TO_UINT(user_data));
-       if (parameter != NULL) {
-               result = net_nfc_client_snep_start_client(
-                       (net_nfc_target_handle_h)target,
-                       san,
-                       (sap_t)sap,
-                       _snep_start_client_cb,
-                       parameter);
-               if (result != NET_NFC_OK)
-                       g_variant_unref(parameter);
-       } else {
-               result = NET_NFC_ALLOC_FAIL;
-       }
-
-       return nfc_common_convert_error_code(__func__, result);
-       /* LCOV_EXCL_STOP */
-}
-
-/* LCOV_EXCL_START */
-static void _snep_send_request_cb(net_nfc_snep_handle_h target,
-       net_nfc_snep_type_t event, net_nfc_error_e result, ndef_message_h msg, void *user_data)
-{
-       nfc_snep_event_cb callback;
-       void *user_param;
-
-       LOG_BEGIN();
-
-       if (user_data == NULL) {
-               LOG_ERR("user_data is NULL");
-               return;
-       }
-
-       g_variant_get((GVariant *)user_data,
-               "(uu)",
-               (guint *)&callback,
-               (guint *)&user_param);
-
-       if (callback != NULL) {
-               callback((nfc_p2p_snep_h)target,
-                       event,
-                       nfc_common_convert_error_code(__func__, result),
-                       (nfc_ndef_message_h)msg,
-                       user_param);
-       }
-
-       g_variant_unref((GVariant *)user_data);
-}
-/* LCOV_EXCL_STOP */
-
-int nfc_snep_send_client_request(nfc_p2p_snep_h handle,
-       nfc_snep_type_e type,
-       nfc_ndef_message_h msg,
-       nfc_snep_event_cb callback,
-       void *user_data)
-{
-       net_nfc_error_e result;
-       GVariant *parameter;
-
-       LOG_BEGIN();
-
-       CHECK_SUPPORTED(NFC_P2P_FEATURE);
-
-       /* LCOV_EXCL_START */
-       CHECK_INIT();
-       CHECK_INVALID(handle == NULL);
-       CHECK_INVALID(msg == NULL);
-
-       parameter = g_variant_new("(uu)",
-               GPOINTER_TO_UINT(callback),
-               GPOINTER_TO_UINT(user_data));
-       if (parameter != NULL) {
-               result = net_nfc_client_snep_send_client_request(
-                       (net_nfc_target_handle_h)handle,
-                       type,
-                       msg,
-                       _snep_send_request_cb,
-                       parameter);
-               if (result != NET_NFC_OK)
-                       g_variant_unref(parameter);
-       } else {
-               result = NET_NFC_ALLOC_FAIL;
-       }
-
-       return nfc_common_convert_error_code(__func__, result);
-       /* LCOV_EXCL_STOP */
-}
-
-/* LCOV_EXCL_START */
-static void _snep_event_cb(net_nfc_snep_handle_h target, net_nfc_snep_type_t event,
-       net_nfc_error_e result, ndef_message_h msg, void *user_data)
-{
-       nfc_snep_event_cb callback;
-       void *user_param;
-
-       LOG_BEGIN();
-
-       if (user_data == NULL) {
-               LOG_ERR("user_data is NULL");
-               return;
-       }
-
-       g_variant_get((GVariant *)user_data,
-               "(uu)",
-               (guint *)&callback,
-               (guint *)&user_param);
-
-       if (callback != NULL) {
-               switch ((int)event) {
-               case NET_NFC_SNEP_GET:
-                       event = NFC_SNEP_EVENT_GET;
-                       break;
-
-               case NET_NFC_SNEP_PUT:
-                       event = NFC_SNEP_EVENT_PUT;
-                       break;
-
-               case NET_NFC_LLCP_REGISTERED:
-                       event = NFC_SNEP_EVENT_REGISTER;
-                       break;
-
-               case NET_NFC_LLCP_UNREGISTERED:
-                       event = NFC_SNEP_EVENT_UNREGISTER;
-                       break;
-
-               case NET_NFC_LLCP_START:
-                       event = NFC_SNEP_EVENT_START;
-                       break;
-
-               case NET_NFC_LLCP_STOP:
-                       event = NFC_SNEP_EVENT_STOP;
-                       break;
-               }
-
-               callback(target, event,
-                       nfc_common_convert_error_code(__func__, result),
-                       (ndef_message_h)msg, user_param);
-       }
-}
-/* LCOV_EXCL_STOP */
-
-int nfc_snep_register_server(const char *san, int sap,
-       nfc_snep_event_cb callback, void *user_data)
-{
-       net_nfc_error_e result;
-       GVariant *parameter;
-
-       LOG_BEGIN();
-
-       CHECK_SUPPORTED(NFC_P2P_FEATURE);
-
-       /* LCOV_EXCL_START */
-       CHECK_INIT();
-       CHECK_INVALID(san == NULL);
-       CHECK_INVALID(sap == 0);
-
-       parameter = g_variant_new("(uu)",
-               GPOINTER_TO_UINT(callback),
-               GPOINTER_TO_UINT(user_data));
-       if (parameter != NULL) {
-               result = net_nfc_client_snep_register_server(san, (sap_t)sap,
-                       _snep_event_cb, parameter);
-               if (result != NET_NFC_OK)
-                       g_variant_unref(parameter);
-       } else {
-               result = NET_NFC_ALLOC_FAIL;
-       }
-
-       return nfc_common_convert_error_code(__func__, result);
-       /* LCOV_EXCL_STOP */
-}
-
-int nfc_snep_unregister_server(const char *san, int sap)
-{
-       net_nfc_error_e result;
-
-       LOG_BEGIN();
-
-       CHECK_SUPPORTED(NFC_P2P_FEATURE);
-
-       /* LCOV_EXCL_START */
-       CHECK_INIT();
-
-       result = net_nfc_client_snep_unregister_server(san, (sap_t)sap);
-
-       return nfc_common_convert_error_code(__func__, result);
-       /* LCOV_EXCL_STOP */
-}
-
-int nfc_snep_stop_service(nfc_p2p_target_h target, nfc_p2p_snep_h clients)
-{
-       net_nfc_error_e result;
-
-       LOG_BEGIN();
-
-       CHECK_SUPPORTED(NFC_P2P_FEATURE);
-
-       /* LCOV_EXCL_START */
-       CHECK_INIT();
-
-       result = net_nfc_client_snep_stop_service_sync(target, clients);
-
-       return nfc_common_convert_error_code(__func__, result);
-       /* LCOV_EXCL_STOP */
-}
-
diff --git a/test/src/nfc_p2p_handover.c b/test/src/nfc_p2p_handover.c
deleted file mode 100755 (executable)
index df933d8..0000000
+++ /dev/null
@@ -1,630 +0,0 @@
-/*
-* Copyright (c) 2012, 2013 Samsung Electronics Co., Ltd.
-*
-* 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.
-*/
-
-#include "nfc_common.h"
-
-/* LCOV_EXCL_START */
-static void _p2p_handover_cb(net_nfc_error_e result,
-       net_nfc_conn_handover_carrier_type_e carrier, data_h ac_data, void *user_data)
-{
-       nfc_p2p_connection_handover_completed_cb callback;
-       void *user_param;
-
-       LOG_BEGIN();
-
-       if (user_data == NULL)
-               return;
-
-       g_variant_get((GVariant *)user_data,
-               "(uu)",
-               (guint *)&callback,
-               (guint *)&user_param);
-
-       if (callback != NULL) {
-               nfc_ac_type_e carrior_type;
-               char *buffer;
-               int len = 0;
-
-               switch (carrier) {
-               case NET_NFC_CONN_HANDOVER_CARRIER_BT:
-                       carrior_type = NFC_AC_TYPE_BT;
-                       buffer = nfc_common_get_bt_address_string(ac_data);
-                       if (buffer != NULL)
-                               len = strlen(buffer);
-                       break;
-
-               case NET_NFC_CONN_HANDOVER_CARRIER_WIFI_WPS:
-                       carrior_type = NFC_AC_TYPE_WIFI;
-                       buffer = nfc_common_get_bt_address_string(ac_data);
-                       if (buffer != NULL)
-                               len = strlen(buffer);
-                       break;
-
-               case NET_NFC_CONN_HANDOVER_CARRIER_WIFI_P2P:
-                       carrior_type = NFC_AC_TYPE_WIFI_DIRECT;
-                       buffer = nfc_common_get_bt_address_string(ac_data);
-                       if (buffer != NULL)
-                               len = strlen(buffer);
-                       break;
-
-               default:
-                       carrior_type = NFC_AC_TYPE_UNKNOWN;
-                       buffer = NULL;
-                       len = 0;
-                       break;
-               }
-
-               callback(nfc_common_convert_error_code(__func__, result),
-                       carrior_type, (void *)buffer,
-                       len, user_param);
-
-               if (buffer != NULL)
-                       g_free(buffer);
-       }
-
-       g_variant_unref((GVariant *)user_data);
-}
-/* LCOV_EXCL_STOP */
-
-int nfc_p2p_connection_handover(nfc_p2p_target_h target,
-       nfc_ac_type_e type,
-       nfc_p2p_connection_handover_completed_cb callback,
-       void *user_data)
-{
-       int ret;
-       net_nfc_conn_handover_carrier_type_e net_ac_type =
-               NET_NFC_CONN_HANDOVER_CARRIER_UNKNOWN;
-       GVariant *parameter;
-
-       LOG_BEGIN();
-
-       CHECK_SUPPORTED(NFC_P2P_FEATURE);
-
-       /* LCOV_EXCL_START */
-       CHECK_INIT();
-       CHECK_INVALID(target == NULL);
-       CHECK_INVALID(type > NFC_AC_TYPE_UNKNOWN);
-       CHECK_ACTIVATED();
-
-       switch (type) {
-       case NFC_AC_TYPE_BT:
-               net_ac_type = NET_NFC_CONN_HANDOVER_CARRIER_BT;
-               break;
-
-       case NFC_AC_TYPE_WIFI:
-               net_ac_type = NET_NFC_CONN_HANDOVER_CARRIER_WIFI_WPS;
-               break;
-
-       case NFC_AC_TYPE_WIFI_DIRECT:
-               net_ac_type = NET_NFC_CONN_HANDOVER_CARRIER_WIFI_P2P;
-               break;
-
-       case NFC_AC_TYPE_UNKNOWN:
-               net_ac_type = NET_NFC_CONN_HANDOVER_CARRIER_UNKNOWN;
-               break;
-
-       default:
-               break;
-       }
-
-       parameter = g_variant_new("(uu)",
-               GPOINTER_TO_UINT(callback),
-               GPOINTER_TO_UINT(user_data));
-       if (parameter != NULL) {
-               ret = net_nfc_client_p2p_connection_handover(
-                       (net_nfc_target_handle_h)target,
-                       net_ac_type,
-                       _p2p_handover_cb,
-                       parameter);
-               if (ret != NET_NFC_OK)
-                       g_variant_unref(parameter);
-       } else {
-               ret = NET_NFC_ALLOC_FAIL;
-       }
-
-       return nfc_common_convert_error_code(__func__, ret);
-       /* LCOV_EXCL_STOP */
-}
-
-/* LCOV_EXCL_START */
-static void _connection_handover_event_cb(
-       net_nfc_handover_event_e event,
-       net_nfc_error_e result,
-       net_nfc_conn_handover_carrier_type_e carrier,
-       data_h ac_data,
-       data_h ndef_message,
-       void *user_data)
-{
-       LOG_BEGIN();
-
-       if (gdbus_nfc_context.on_handover_event_cb != NULL) {
-               nfc_ndef_message_h message;
-               nfc_ac_type_e type;
-               char *address;
-
-               net_nfc_create_ndef_message_from_rawdata(&message, ndef_message);
-
-               if (event == NET_NFC_HANDOVER_START) {
-                       type = NFC_AC_TYPE_UNKNOWN;
-                       address = NULL;
-               } else {
-                       switch (carrier) {
-                       case NET_NFC_CONN_HANDOVER_CARRIER_BT:
-                               type = NFC_AC_TYPE_BT;
-                               address = nfc_common_get_bt_address_string(ac_data);
-                               break;
-
-                       case NET_NFC_CONN_HANDOVER_CARRIER_WIFI_WPS:
-                               type = NFC_AC_TYPE_WIFI;
-                               address = nfc_common_get_bt_address_string(ac_data);
-                               break;
-
-                       case NET_NFC_CONN_HANDOVER_CARRIER_WIFI_P2P:
-                               type = NFC_AC_TYPE_WIFI_DIRECT;
-                               address = nfc_common_get_bt_address_string(ac_data);
-                               break;
-
-                       default:
-                               type = NFC_AC_TYPE_UNKNOWN;
-                               address = NULL;
-                               break;
-                       }
-               }
-
-               gdbus_nfc_context.on_handover_event_cb(
-                       nfc_common_convert_error_code(__func__, result),
-                       event,
-                       type,
-                       address,
-                       message,
-                       gdbus_nfc_context.on_handover_event_user_data);
-
-               if (address != NULL)
-                       g_free(address);
-               net_nfc_free_ndef_message(message);
-       }
-
-       LOG_END();
-}
-/* LCOV_EXCL_STOP */
-
-int nfc_connection_handover_set_event_cb(nfc_connection_handover_event_cb callback, void *user_data)
-{
-       LOG_BEGIN();
-
-       CHECK_SUPPORTED(NFC_P2P_FEATURE);
-
-       /* LCOV_EXCL_START */
-       CHECK_INIT();
-       CHECK_INVALID(callback == NULL);
-
-       gdbus_nfc_context.on_handover_event_cb = callback;
-       gdbus_nfc_context.on_handover_event_user_data = user_data;
-
-       net_nfc_client_handover_set_handover_event_cb(_connection_handover_event_cb, NULL);
-
-       return NFC_ERROR_NONE;
-       /* LCOV_EXCL_STOP */
-}
-
-int nfc_connection_handover_unset_event_cb(void)
-{
-       LOG_BEGIN();
-
-       CHECK_SUPPORTED(NFC_P2P_FEATURE);
-
-       /* LCOV_EXCL_START */
-       CHECK_INIT();
-
-       net_nfc_client_handover_unset_handover_event_cb();
-
-       gdbus_nfc_context.on_handover_event_cb = NULL;
-       gdbus_nfc_context.on_handover_event_user_data = NULL;
-
-       return NFC_ERROR_NONE;
-       /* LCOV_EXCL_STOP */
-}
-
-bool nfc_p2p_is_supported_ac_type(nfc_ac_type_e carrier)
-{
-       bool _is_support_p2p = false;
-       bool _is_support_ac_type = false;
-
-       LOG_BEGIN();
-
-       _is_support_p2p = nfc_common_is_supported(NFC_P2P_FEATURE);
-       if (!_is_support_p2p) {
-               set_last_result(NFC_ERROR_NOT_SUPPORTED);
-               return false;
-       }
-
-       /* LCOV_EXCL_START */
-       if (carrier == NFC_AC_TYPE_BT)
-               _is_support_ac_type = true;
-
-       if (_is_support_ac_type)
-               set_last_result(NFC_ERROR_NONE);
-       else
-               set_last_result(NFC_ERROR_NOT_SUPPORTED);
-
-       return _is_support_ac_type;
-       /* LCOV_EXCL_STOP */
-}
-
-int nfc_handover_message_import_from_ndef_message(nfc_handover_message_h *result, nfc_ndef_message_h msg)
-{
-       net_nfc_error_e ret;
-
-       LOG_BEGIN();
-
-       CHECK_SUPPORTED(NFC_P2P_FEATURE);
-
-       /* LCOV_EXCL_START */
-       CHECK_INIT();
-       CHECK_INVALID(msg == NULL);
-       CHECK_INVALID(result == NULL);
-
-       ret = net_nfc_import_handover_from_ndef_message(
-               (ndef_message_h)msg, (net_nfc_ch_message_h *)result);
-
-       return nfc_common_convert_error_code(__func__, ret);
-       /* LCOV_EXCL_STOP */
-}
-
-int nfc_handover_message_get_random_number(nfc_handover_message_h message, unsigned short *random_number)
-{
-       net_nfc_error_e result;
-
-       LOG_BEGIN();
-
-       CHECK_SUPPORTED(NFC_P2P_FEATURE);
-
-       /* LCOV_EXCL_START */
-       CHECK_INIT();
-       CHECK_INVALID(message == NULL);
-       CHECK_INVALID(random_number == NULL);
-
-       result = net_nfc_get_handover_random_number(
-               (net_nfc_ch_message_h)message,
-               random_number);
-
-       return nfc_common_convert_error_code(__func__, result);
-       /* LCOV_EXCL_STOP */
-}
-
-int nfc_handover_message_get_carrier_count(nfc_handover_message_h message, unsigned int *count)
-{
-       net_nfc_error_e result;
-
-       LOG_BEGIN();
-
-       CHECK_SUPPORTED(NFC_P2P_FEATURE);
-
-       /* LCOV_EXCL_START */
-       CHECK_INIT();
-       CHECK_INVALID(message == NULL);
-       CHECK_INVALID(count == NULL);
-
-       result = net_nfc_get_handover_carrier_count(
-               (net_nfc_ch_message_h)message,
-               count);
-
-       return nfc_common_convert_error_code(__func__, result);
-       /* LCOV_EXCL_STOP */
-}
-
-int nfc_handover_message_get_carrier(nfc_handover_message_h message, int index, nfc_handover_carrier_h *carrier)
-{
-       net_nfc_error_e result;
-
-       LOG_BEGIN();
-
-       CHECK_SUPPORTED(NFC_P2P_FEATURE);
-
-       /* LCOV_EXCL_START */
-       CHECK_INIT();
-       CHECK_INVALID(message == NULL);
-       CHECK_INVALID(carrier == NULL);
-
-       result = net_nfc_get_handover_carrier(
-               (net_nfc_ch_message_h)message,
-               index,
-               (net_nfc_ch_carrier_h *)carrier);
-
-       return nfc_common_convert_error_code(__func__, result);
-       /* LCOV_EXCL_STOP */
-}
-
-int nfc_handover_message_get_carrier_by_type(nfc_handover_message_h message, nfc_ac_type_e type, nfc_handover_carrier_h *carrier)
-{
-       net_nfc_error_e result;
-       net_nfc_conn_handover_carrier_type_e temp;
-
-       LOG_BEGIN();
-
-       CHECK_SUPPORTED(NFC_P2P_FEATURE);
-
-       /* LCOV_EXCL_START */
-       CHECK_INIT();
-       CHECK_INVALID(message == NULL);
-       CHECK_INVALID(carrier == NULL);
-
-       switch (type) {
-       case NFC_AC_TYPE_BT:
-               temp = NET_NFC_CONN_HANDOVER_CARRIER_BT;
-               break;
-
-       case NFC_AC_TYPE_WIFI:
-               temp = NET_NFC_CONN_HANDOVER_CARRIER_WIFI_WPS;
-               break;
-
-       case NFC_AC_TYPE_WIFI_DIRECT:
-               temp = NET_NFC_CONN_HANDOVER_CARRIER_WIFI_P2P;
-               break;
-
-       default:
-               temp = NET_NFC_CONN_HANDOVER_CARRIER_UNKNOWN;
-               break;
-       }
-       result = net_nfc_get_handover_carrier_by_type(
-               (net_nfc_ch_message_h)message,
-               temp,
-               (net_nfc_ch_carrier_h *)carrier);
-
-       return nfc_common_convert_error_code(__func__, result);
-       /* LCOV_EXCL_STOP */
-}
-
-int nfc_handover_message_destroy(nfc_handover_message_h message)
-{
-       net_nfc_error_e result;
-
-       LOG_BEGIN();
-
-       CHECK_SUPPORTED(NFC_P2P_FEATURE);
-
-       /* LCOV_EXCL_START */
-       CHECK_INIT();
-       CHECK_INVALID(message == NULL);
-
-       result = net_nfc_free_handover_message((net_nfc_ch_message_h)message);
-
-       return nfc_common_convert_error_code(__func__, result);
-       /* LCOV_EXCL_STOP */
-}
-
-
-int nfc_handover_carrier_get_cps(nfc_handover_carrier_h carrier, nfc_ac_state_e *cps)
-{
-       net_nfc_error_e result;
-       net_nfc_conn_handover_carrier_state_e temp;
-
-       LOG_BEGIN();
-
-       CHECK_SUPPORTED(NFC_P2P_FEATURE);
-
-       /* LCOV_EXCL_START */
-       CHECK_INIT();
-       CHECK_INVALID(carrier == NULL);
-       CHECK_INVALID(cps == NULL);
-
-       result = net_nfc_get_handover_carrier_cps(
-               (net_nfc_ch_carrier_h)carrier, &temp);
-       if (result == NET_NFC_OK) {
-               switch (temp) {
-               case NET_NFC_CONN_HANDOVER_CARRIER_INACTIVATE:
-                       *cps = NFC_AC_STATE_INACTIVATE;
-                       break;
-
-               case NET_NFC_CONN_HANDOVER_CARRIER_ACTIVATE:
-                       *cps = NFC_AC_STATE_ACTIVATE;
-                       break;
-
-               case NET_NFC_CONN_HANDOVER_CARRIER_ACTIVATING:
-                       *cps = NFC_AC_STATE_ACTIVATING;
-                       break;
-
-               default:
-                       *cps = NFC_AC_STATE_UNKNOWN;
-                       break;
-               }
-       }
-
-       return nfc_common_convert_error_code(__func__, result);
-       /* LCOV_EXCL_STOP */
-}
-
-int nfc_handover_carrier_get_type(nfc_handover_carrier_h carrier, nfc_ac_type_e *type)
-{
-       net_nfc_error_e result;
-       net_nfc_conn_handover_carrier_type_e temp;
-
-       LOG_BEGIN();
-
-       CHECK_SUPPORTED(NFC_P2P_FEATURE);
-
-       /* LCOV_EXCL_START */
-       CHECK_INIT();
-       CHECK_INVALID(carrier == NULL);
-       CHECK_INVALID(type == NULL);
-
-       result = net_nfc_get_handover_carrier_type(
-               (net_nfc_ch_carrier_h)carrier, &temp);
-       if (result == NET_NFC_OK) {
-               switch (temp) {
-               case NET_NFC_CONN_HANDOVER_CARRIER_BT:
-                       *type = NFC_AC_TYPE_BT;
-                       break;
-
-               case NET_NFC_CONN_HANDOVER_CARRIER_WIFI_WPS:
-                       *type = NFC_AC_TYPE_WIFI;
-                       break;
-
-               case NET_NFC_CONN_HANDOVER_CARRIER_WIFI_P2P:
-                       *type = NFC_AC_TYPE_WIFI_DIRECT;
-                       break;
-
-               default:
-                       *type = NFC_AC_TYPE_UNKNOWN;
-                       break;
-               }
-       }
-
-       return nfc_common_convert_error_code(__func__, result);
-       /* LCOV_EXCL_STOP */
-}
-
-int nfc_handover_carrier_get_carrier_record(nfc_handover_carrier_h carrier, nfc_ndef_record_h *record)
-{
-       net_nfc_error_e result;
-
-       LOG_BEGIN();
-
-       CHECK_SUPPORTED(NFC_P2P_FEATURE);
-
-       /* LCOV_EXCL_START */
-       CHECK_INIT();
-       CHECK_INVALID(carrier == NULL);
-       CHECK_INVALID(record == NULL);
-
-       result = net_nfc_get_handover_carrier_record(
-               (net_nfc_ch_carrier_h)carrier, (ndef_record_h *)record);
-
-       return nfc_common_convert_error_code(__func__, result);
-       /* LCOV_EXCL_STOP */
-}
-
-int nfc_handover_carrier_get_auxiliary_record_count(nfc_handover_carrier_h carrier, unsigned int *count)
-{
-       net_nfc_error_e result;
-
-       LOG_BEGIN();
-
-       CHECK_SUPPORTED(NFC_P2P_FEATURE);
-
-       /* LCOV_EXCL_START */
-       CHECK_INIT();
-       CHECK_INVALID(carrier == NULL);
-       CHECK_INVALID(count == NULL);
-
-       result = net_nfc_get_handover_auxiliary_record_count(
-               (net_nfc_ch_carrier_h)carrier, count);
-
-       return nfc_common_convert_error_code(__func__, result);
-       /* LCOV_EXCL_STOP */
-}
-
-int nfc_handover_carrier_get_auxiliary_record(nfc_handover_carrier_h carrier, int index, nfc_ndef_record_h *record)
-{
-       net_nfc_error_e result;
-
-       LOG_BEGIN();
-
-       CHECK_SUPPORTED(NFC_P2P_FEATURE);
-
-       /* LCOV_EXCL_START */
-       CHECK_INIT();
-       CHECK_INVALID(carrier == NULL);
-       CHECK_INVALID(record == NULL);
-
-       result = net_nfc_get_handover_auxiliary_record(
-               (net_nfc_ch_carrier_h)carrier,
-               index, (ndef_record_h *)record);
-
-       return nfc_common_convert_error_code(__func__, result);
-       /* LCOV_EXCL_STOP */
-}
-
-int nfc_handover_carrier_get_handover_config(nfc_handover_carrier_h carrier, nfc_handover_config_h *config)
-{
-       net_nfc_error_e result;
-
-       LOG_BEGIN();
-
-       CHECK_SUPPORTED(NFC_P2P_FEATURE);
-
-       /* LCOV_EXCL_START */
-       CHECK_INIT();
-       CHECK_INVALID(carrier == NULL);
-       CHECK_INVALID(config == NULL);
-
-       result = net_nfc_create_carrier_config_from_carrier(
-               (net_nfc_carrier_config_h *)config,
-               (net_nfc_ch_carrier_h)carrier);
-
-       return nfc_common_convert_error_code(__func__, result);
-       /* LCOV_EXCL_STOP */
-}
-
-int nfc_handover_carrier_destroy(nfc_handover_carrier_h carrier)
-{
-       net_nfc_error_e result;
-
-       LOG_BEGIN();
-
-       CHECK_SUPPORTED(NFC_P2P_FEATURE);
-
-       /* LCOV_EXCL_START */
-       CHECK_INIT();
-       CHECK_INVALID(carrier == NULL);
-
-       result = net_nfc_free_handover_carrier((net_nfc_ch_carrier_h)carrier);
-
-       return nfc_common_convert_error_code(__func__, result);
-       /* LCOV_EXCL_STOP */
-}
-
-
-int nfc_handover_config_get_property(nfc_handover_config_h config, unsigned short attribute, unsigned short *size, unsigned char **data)
-{
-       net_nfc_error_e result;
-
-       LOG_BEGIN();
-
-       CHECK_SUPPORTED(NFC_P2P_FEATURE);
-
-       /* LCOV_EXCL_START */
-       CHECK_INIT();
-       CHECK_INVALID(config == NULL);
-       CHECK_INVALID(size == NULL);
-       CHECK_INVALID(data == NULL);
-
-       result = net_nfc_get_carrier_config_property(
-               (net_nfc_carrier_config_h)config,
-               attribute, size, data);
-
-       return nfc_common_convert_error_code(__func__, result);
-       /* LCOV_EXCL_STOP */
-}
-
-int nfc_handover_config_destroy(nfc_handover_config_h config)
-{
-       net_nfc_error_e result;
-
-       LOG_BEGIN();
-
-       CHECK_SUPPORTED(NFC_P2P_FEATURE);
-
-       /* LCOV_EXCL_START */
-       CHECK_INIT();
-       CHECK_INVALID(config == NULL);
-
-       result = net_nfc_free_carrier_config((net_nfc_carrier_config_h)config);
-
-       return nfc_common_convert_error_code(__func__, result);
-       /* LCOV_EXCL_STOP */
-}
-
diff --git a/test/src/nfc_tag.c b/test/src/nfc_tag.c
deleted file mode 100755 (executable)
index 5fb2004..0000000
+++ /dev/null
@@ -1,1201 +0,0 @@
-/*
-* Copyright (c) 2012, 2013 Samsung Electronics Co., Ltd.
-*
-* 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.
-*/
-
-#include "nfc_common.h"
-
-/* LCOV_EXCL_START */
-static void _tag_format_ndef_cb(net_nfc_error_e result,
-       void *user_data)
-{
-       nfc_tag_format_completed_cb callback;
-       void *user_param;
-
-       LOG_BEGIN();
-
-       if (user_data == NULL) {
-               LOG_ERR("user_data is NULL");
-               return;
-       }
-
-       g_variant_get((GVariant *)user_data,
-               "(uu)",
-               (guint *)&callback,
-               (guint *)&user_param);
-
-       if (callback != NULL) {
-               callback(nfc_common_convert_error_code(__func__, result),
-                       user_param);
-       }
-
-       g_variant_unref((GVariant *)user_data);
-}
-/* LCOV_EXCL_STOP */
-
-int nfc_tag_format_ndef(nfc_tag_h tag,
-       unsigned char *key,
-       int key_size,
-       nfc_tag_format_completed_cb callback,
-       void *user_data)
-{
-       int ret;
-       data_h key_data = NULL;
-
-       LOG_BEGIN();
-
-       CHECK_SUPPORTED(NFC_TAG_FEATURE);
-
-       /* LCOV_EXCL_START */
-       CHECK_INIT();
-       CHECK_INVALID(tag == NULL);
-       CHECK_ACTIVATED();
-       CHECK_APP_PERMISSION();
-
-       ret = net_nfc_create_data(&key_data, key, key_size);
-       if (ret == NET_NFC_OK) {
-               net_nfc_target_handle_h handle = NULL;
-
-               ret = net_nfc_get_tag_handle((net_nfc_target_info_h)tag,
-                       &handle);
-               if (ret == NET_NFC_OK) {
-                       GVariant *parameter;
-
-                       parameter = g_variant_new("(uu)",
-                               GPOINTER_TO_UINT(callback),
-                               GPOINTER_TO_UINT(user_data));
-                       if (parameter != NULL) {
-                               ret = net_nfc_client_ndef_format(
-                                       handle,
-                                       key_data,
-                                       _tag_format_ndef_cb,
-                                       parameter);
-                               if (ret != NET_NFC_OK)
-                                       g_variant_unref(parameter);
-                       } else {
-                               ret = NET_NFC_ALLOC_FAIL;
-                       }
-               } else {
-                       LOG_ERR("net_nfc_get_tag_handle failed, [%d]", ret);
-               }
-
-               net_nfc_free_data(key_data);
-       } else {
-               LOG_ERR("net_nfc_create_data failed, [%d]", ret);
-       }
-
-       return nfc_common_convert_error_code(__func__, ret);
-       /* LCOV_EXCL_STOP */
-}
-
-/* LCOV_EXCL_START */
-static void _tag_read_ndef_cb(net_nfc_error_e result, ndef_message_h message,
-       void *user_data)
-{
-       nfc_tag_read_completed_cb callback;
-       void *user_param;
-
-       LOG_BEGIN();
-
-       if (user_data == NULL) {
-               LOG_ERR("user_data is NULL");
-               return;
-       }
-
-       g_variant_get((GVariant *)user_data,
-               "(uu)",
-               (guint *)&callback,
-               (guint *)&user_param);
-
-       if (callback != NULL) {
-               callback(nfc_common_convert_error_code(__func__, result),
-                       (nfc_ndef_message_h)message,
-                       user_param);
-       }
-
-       g_variant_unref((GVariant *)user_data);
-}
-/* LCOV_EXCL_STOP */
-
-int nfc_tag_read_ndef(nfc_tag_h tag,
-       nfc_tag_read_completed_cb callback,
-       void * user_data)
-{
-       int ret;
-       net_nfc_target_handle_h handle = NULL;
-
-       CHECK_SUPPORTED(NFC_TAG_FEATURE);
-
-       /* LCOV_EXCL_START */
-       CHECK_INIT();
-       CHECK_INVALID(tag == NULL);
-       CHECK_ACTIVATED();
-
-       ret = net_nfc_get_tag_handle((net_nfc_target_info_h)tag, &handle);
-       if (ret == NET_NFC_OK) {
-               GVariant *parameter;
-
-               parameter = g_variant_new("(uu)",
-                       GPOINTER_TO_UINT(callback),
-                       GPOINTER_TO_UINT(user_data));
-               if (parameter != NULL) {
-                       ret = net_nfc_client_ndef_read(
-                               handle,
-                               _tag_read_ndef_cb,
-                               parameter);
-                       if (ret != NET_NFC_OK)
-                               g_variant_unref(parameter);
-               } else {
-                       ret = NET_NFC_ALLOC_FAIL;
-               }
-       } else {
-               LOG_ERR("net_nfc_get_tag_handle failed, [%d]", ret);
-       }
-
-       return nfc_common_convert_error_code(__func__, ret);
-       /* LCOV_EXCL_STOP */
-}
-
-/* LCOV_EXCL_START */
-static void _tag_write_ndef_cb(net_nfc_error_e result,
-       void *user_data)
-{
-       nfc_tag_write_completed_cb callback;
-       void *user_param;
-
-       LOG_BEGIN();
-
-       if (user_data == NULL) {
-               LOG_ERR("user_data is NULL");
-               return;
-       }
-
-       g_variant_get((GVariant *)user_data,
-               "(uu)",
-               (guint *)&callback,
-               (guint *)&user_param);
-
-       if (callback != NULL)
-               callback(nfc_common_convert_error_code(__func__, result), user_param);
-
-       g_variant_unref((GVariant *)user_data);
-}
-/* LCOV_EXCL_STOP */
-
-int nfc_tag_write_ndef(nfc_tag_h tag,
-       nfc_ndef_message_h msg,
-       nfc_tag_write_completed_cb callback,
-       void *user_data)
-{
-       int ret;
-       net_nfc_target_handle_h handle = NULL;
-       unsigned int byte_size = 0;
-       uint32_t max_len = 0;
-       net_nfc_ndef_card_state_e state = NET_NFC_NDEF_CARD_INVALID;
-
-       CHECK_SUPPORTED(NFC_TAG_FEATURE);
-
-       /* LCOV_EXCL_START */
-       CHECK_INIT();
-       CHECK_INVALID(tag == NULL);
-       CHECK_ACTIVATED();
-       CHECK_APP_PERMISSION();
-
-       ret = net_nfc_get_tag_ndef_state((net_nfc_target_info_h)tag, &state);
-       if (ret != NET_NFC_OK) {
-               LOG_ERR("net_nfc_get_tag_ndef_state failed, [%d]", ret);
-               return nfc_common_convert_error_code(__func__, ret);;
-       }
-
-       if (state == NET_NFC_NDEF_CARD_READ_ONLY)
-               return NFC_ERROR_READ_ONLY_NDEF;
-
-       ret = net_nfc_get_tag_max_data_size((net_nfc_target_info_h)tag, &max_len);
-       if (ret != NET_NFC_OK) {
-               LOG_ERR("net_nfc_get_tag_max_data_size failed, [%d]", ret);
-               return nfc_common_convert_error_code(__func__, ret);;
-       }
-
-       ret = nfc_common_get_rawdata_size(msg, &byte_size);
-       if (ret != NFC_ERROR_NONE) {
-               LOG_ERR("nfc_ndef_message_get_rawdata_size failed, [%d]", ret);
-               return nfc_common_convert_error_code(__func__, ret);;
-       }
-
-       if (max_len < byte_size)
-               return NFC_ERROR_NO_SPACE_ON_NDEF;
-
-       ret = net_nfc_get_tag_handle((net_nfc_target_info_h)tag, &handle);
-       if (ret == NET_NFC_OK) {
-               GVariant *parameter;
-
-               parameter = g_variant_new("(uu)",
-                       GPOINTER_TO_UINT(callback),
-                       GPOINTER_TO_UINT(user_data));
-               if (parameter != NULL) {
-                       ret = net_nfc_client_ndef_write(
-                               handle,
-                               msg,
-                               _tag_write_ndef_cb,
-                               parameter);
-                       if (ret != NET_NFC_OK)
-                               g_variant_unref(parameter);
-               } else {
-                       ret = NET_NFC_ALLOC_FAIL;
-               }
-       } else {
-               LOG_ERR("net_nfc_get_tag_handle failed, [%d]", ret);
-       }
-
-       return nfc_common_convert_error_code(__func__, ret);
-       /* LCOV_EXCL_STOP */
-}
-
-/* LCOV_EXCL_START */
-static void _tag_transceive_data_cb(net_nfc_error_e result, data_h arg_data,
-       void *user_data)
-{
-       nfc_tag_transceive_completed_cb callback;
-       void *user_param;
-
-       LOG_BEGIN();
-
-       if (user_data == NULL)
-               return;
-
-       g_variant_get((GVariant *)user_data,
-               "(uu)",
-               (guint *)&callback,
-               (guint *)&user_param);
-
-       if (callback != NULL) {
-               uint8_t *buffer = NULL;
-               uint32_t length = 0;
-
-               if (result == NET_NFC_OK && arg_data != NULL) {
-                       buffer = net_nfc_get_data_buffer(arg_data);
-                       length = net_nfc_get_data_length(arg_data);
-               }
-
-               callback(nfc_common_convert_error_code(__func__, result),
-                       buffer,
-                       length,
-                       user_param);
-       }
-
-       g_variant_unref((GVariant *)user_data);
-}
-/* LCOV_EXCL_STOP */
-
-int nfc_tag_transceive(nfc_tag_h tag,
-       unsigned char *buffer,
-       int buffer_size,
-       nfc_tag_transceive_completed_cb callback,
-       void *user_data)
-{
-       int ret;
-       data_h rawdata = NULL;
-
-       CHECK_SUPPORTED(NFC_TAG_FEATURE);
-
-       /* LCOV_EXCL_START */
-       CHECK_INIT();
-       CHECK_INVALID(tag == NULL);
-       CHECK_INVALID(buffer == NULL);
-       CHECK_INVALID(buffer_size <= 0);
-       CHECK_ACTIVATED();
-       CHECK_APP_PERMISSION();
-
-       ret = net_nfc_create_data(&rawdata, buffer, buffer_size);
-       if (ret == NET_NFC_OK) {
-               net_nfc_target_handle_h handle = NULL;
-
-               ret = net_nfc_get_tag_handle((net_nfc_target_info_h)tag, &handle);
-               if (ret == NET_NFC_OK) {
-                       GVariant *parameter;
-
-                       parameter = g_variant_new("(uu)",
-                               GPOINTER_TO_UINT(callback),
-                               GPOINTER_TO_UINT(user_data));
-                       if (parameter != NULL) {
-                               ret = net_nfc_client_transceive_data(
-                                       handle,
-                                       rawdata,
-                                       _tag_transceive_data_cb,
-                                       parameter);
-                               if (ret != NET_NFC_OK)
-                                       g_variant_unref(parameter);
-                       } else {
-                               ret = NET_NFC_ALLOC_FAIL;
-                       }
-               } else {
-                       LOG_ERR("net_nfc_get_tag_handle failed, [%d]", ret);
-               }
-
-               net_nfc_free_data(rawdata);
-       } else {
-               LOG_ERR("net_nfc_create_data failed, [%d]", ret);
-       }
-
-       return nfc_common_convert_error_code(__func__, ret);
-       /* LCOV_EXCL_STOP */
-}
-
-int nfc_tag_get_type(nfc_tag_h tag, nfc_tag_type_e *type)
-{
-       int ret;
-
-       LOG_BEGIN();
-
-       CHECK_SUPPORTED(NFC_TAG_FEATURE);
-
-       /* LCOV_EXCL_START */
-       CHECK_INIT();
-       CHECK_INVALID(tag == NULL);
-       CHECK_INVALID(type == NULL);
-
-       ret = net_nfc_get_tag_type(tag, (net_nfc_target_type_e *)type);
-
-       return nfc_common_convert_error_code(__func__, ret);
-       /* LCOV_EXCL_STOP */
-}
-
-int nfc_tag_is_support_ndef(nfc_tag_h tag, bool *is_support)
-{
-       int ret;
-
-       LOG_BEGIN();
-
-       CHECK_SUPPORTED(NFC_TAG_FEATURE);
-
-       /* LCOV_EXCL_START */
-       CHECK_INIT();
-       CHECK_INVALID(tag == NULL);
-       CHECK_INVALID(is_support == NULL);
-
-       ret = net_nfc_get_tag_ndef_support(tag, is_support);
-
-       return nfc_common_convert_error_code(__func__, ret);
-       /* LCOV_EXCL_STOP */
-}
-
-int nfc_tag_get_maximum_ndef_size(nfc_tag_h tag, unsigned int *max_size)
-{
-       int ret;
-
-       LOG_BEGIN();
-       CHECK_SUPPORTED(NFC_TAG_FEATURE);
-
-       /* LCOV_EXCL_START */
-       CHECK_INIT();
-       CHECK_INVALID(tag == NULL);
-       CHECK_INVALID(max_size == NULL);
-
-       ret = net_nfc_get_tag_max_data_size(tag, max_size);
-
-       return nfc_common_convert_error_code(__func__, ret);
-       /* LCOV_EXCL_STOP */
-}
-
-int nfc_tag_get_ndef_size(nfc_tag_h tag, unsigned int *actual_data_size)
-{
-       int ret;
-
-       LOG_BEGIN();
-
-       CHECK_SUPPORTED(NFC_TAG_FEATURE);
-
-       /* LCOV_EXCL_START */
-       CHECK_INIT();
-       CHECK_INVALID(tag == NULL);
-       CHECK_INVALID(actual_data_size == NULL);
-
-       ret = net_nfc_get_tag_actual_data_size(tag, actual_data_size);
-
-       return nfc_common_convert_error_code(__func__, ret);
-       /* LCOV_EXCL_STOP */
-}
-
-int nfc_tag_foreach_information(nfc_tag_h tag,
-       nfc_tag_information_cb callback,
-       void *user_data)
-{
-       int ret;
-       int i, count = 0;
-       char **keys = NULL;
-       data_h value = NULL;
-
-       bool cont;
-
-       LOG_BEGIN();
-       CHECK_SUPPORTED(NFC_TAG_FEATURE);
-
-       /* LCOV_EXCL_START */
-       CHECK_INIT();
-       CHECK_INVALID(tag == NULL);
-       CHECK_INVALID(callback == NULL);
-
-       ret = net_nfc_get_tag_info_keys((net_nfc_target_info_h)tag,
-               &keys, &count);
-
-       if (ret != NET_NFC_OK)
-               return nfc_common_convert_error_code(__func__, ret);
-
-       for (i = 0; i < count; i++) {
-               net_nfc_get_tag_info_value((net_nfc_target_info_h)tag, keys[i],
-                       &value);
-
-               cont = callback(keys[i],
-                       net_nfc_get_data_buffer(value),
-                       net_nfc_get_data_length(value),
-                       user_data);
-
-               if (!cont)
-                       break;
-       }
-
-       return NFC_ERROR_NONE;
-       /* LCOV_EXCL_STOP */
-}
-
-/* FIXME */
-/* LCOV_EXCL_START */
-static void _mifare_authenticate_with_keyA_cb(net_nfc_error_e result,
-       void *user_data)
-{
-       nfc_mifare_authenticate_with_keyA_completed_cb callback;
-       void *user_param;
-
-       LOG_BEGIN();
-
-       if (user_data == NULL) {
-               LOG_ERR("user_data is NULL");
-               return;
-       }
-
-       g_variant_get((GVariant *)user_data,
-               "(uu)",
-               (guint *)&callback,
-               (guint *)&user_param);
-
-       if (callback != NULL)
-               callback(nfc_common_convert_error_code(__func__, result), user_param);
-
-       g_variant_unref((GVariant *)user_data);
-}
-/* LCOV_EXCL_STOP */
-
-int nfc_mifare_authenticate_with_keyA(nfc_tag_h tag,
-       int sector_index,
-       unsigned char *auth_key,
-       nfc_mifare_authenticate_with_keyA_completed_cb callback,
-       void *user_data)
-{
-       int ret;
-       data_h auth_key_data = NULL;
-
-       CHECK_SUPPORTED(NFC_TAG_FEATURE);
-
-       /* LCOV_EXCL_START */
-       CHECK_INIT();
-       CHECK_INVALID(tag == NULL);
-       CHECK_INVALID(auth_key == NULL);
-       CHECK_ACTIVATED();
-
-       ret = net_nfc_create_data(&auth_key_data, auth_key, 6);
-       if (ret == NET_NFC_OK) {
-               net_nfc_target_handle_h handle = NULL;
-
-               ret = net_nfc_get_tag_handle((net_nfc_target_info_h)tag, &handle);
-               if (ret == NET_NFC_OK) {
-                       GVariant *parameter;
-
-                       parameter = g_variant_new("(uu)",
-                               GPOINTER_TO_UINT(callback),
-                               GPOINTER_TO_UINT(user_data));
-                       if (parameter != NULL) {
-                               ret = net_nfc_client_mifare_authenticate_with_keyA(
-                                       handle,
-                                       sector_index,
-                                       auth_key_data,
-                                       _mifare_authenticate_with_keyA_cb,
-                                       parameter);
-                               if (ret != NET_NFC_OK)
-                                       g_variant_unref(parameter);
-                       } else {
-                               ret = NET_NFC_ALLOC_FAIL;
-                       }
-               } else {
-                       LOG_ERR("net_nfc_get_tag_handle failed, [%d]", ret);
-               }
-
-               net_nfc_free_data(auth_key_data);
-       } else {
-               LOG_ERR("net_nfc_create_data failed, [%d]", ret);
-       }
-
-       return nfc_common_convert_error_code(__func__, ret);
-       /* LCOV_EXCL_STOP */
-}
-
-
-/* LCOV_EXCL_START */
-static void _mifare_authenticate_with_keyB_cb(net_nfc_error_e result,
-       void *user_data)
-{
-       nfc_mifare_authenticate_with_keyB_completed_cb callback;
-       void *user_param;
-
-       if (user_data == NULL) {
-               LOG_ERR("user_data is NULL");
-               return;
-       }
-
-       g_variant_get((GVariant *)user_data,
-               "(uu)",
-               (guint *)&callback,
-               (guint *)&user_param);
-
-       if (callback != NULL)
-               callback(nfc_common_convert_error_code(__func__, result), user_param);
-
-       g_variant_unref((GVariant *)user_data);
-}
-/* LCOV_EXCL_STOP */
-
-int nfc_mifare_authenticate_with_keyB(nfc_tag_h tag,
-       int sector_index,
-       unsigned char *auth_key,
-       nfc_mifare_authenticate_with_keyB_completed_cb callback,
-       void *user_data)
-{
-       int ret;
-       data_h auth_key_data = NULL;
-
-       LOG_BEGIN();
-
-       CHECK_SUPPORTED(NFC_TAG_FEATURE);
-
-       /* LCOV_EXCL_START */
-       CHECK_INIT();
-       CHECK_INVALID(tag == NULL);
-       CHECK_INVALID(auth_key == NULL);
-       CHECK_ACTIVATED();
-
-       ret = net_nfc_create_data(&auth_key_data, auth_key, 6);
-       if (ret == NET_NFC_OK) {
-               net_nfc_target_handle_h handle = NULL;
-
-               ret = net_nfc_get_tag_handle((net_nfc_target_info_h)tag, &handle);
-               if (ret == NET_NFC_OK) {
-                       GVariant *parameter;
-
-                       parameter = g_variant_new("(uu)",
-                               GPOINTER_TO_UINT(callback),
-                               GPOINTER_TO_UINT(user_data));
-                       if (parameter != NULL) {
-                               ret = net_nfc_client_mifare_authenticate_with_keyB(
-                                       handle,
-                                       sector_index,
-                                       auth_key_data,
-                                       _mifare_authenticate_with_keyB_cb,
-                                       parameter);
-                               if (ret != NET_NFC_OK)
-                                       g_variant_unref(parameter);
-                       } else {
-                               ret = NET_NFC_ALLOC_FAIL;
-                       }
-               } else {
-                       LOG_ERR("net_nfc_get_tag_handle failed, [%d]", ret);
-               }
-
-               net_nfc_free_data(auth_key_data);
-       } else {
-               LOG_ERR("net_nfc_create_data failed, [%d]", ret);
-       }
-
-       return nfc_common_convert_error_code(__func__, ret);
-       /* LCOV_EXCL_STOP */
-}
-
-/* FIXME */
-/* LCOV_EXCL_START */
-static void _mifare_read_block_cb(net_nfc_error_e result, data_h data,
-       void *user_data)
-{
-       nfc_mifare_read_block_completed_cb callback;
-       void *user_param;
-
-       if (user_data == NULL) {
-               LOG_ERR("user_data is NULL");
-               return;
-       }
-
-       g_variant_get((GVariant *)user_data,
-               "(uu)",
-               (guint *)&callback,
-               (guint *)&user_param);
-
-       if (callback != NULL) {
-               uint8_t *buffer = NULL;
-               int length = 0;
-
-               if (result == NET_NFC_OK && data != NULL) {
-                       buffer = net_nfc_get_data_buffer(data);
-                       length = net_nfc_get_data_length(data);
-               }
-
-               callback(nfc_common_convert_error_code(__func__, result),
-                       buffer,
-                       length,
-                       user_param);
-       }
-
-       g_variant_unref((GVariant *)user_data);
-}
-/* LCOV_EXCL_STOP */
-
-int nfc_mifare_read_block(nfc_tag_h tag,
-       int block_index,
-       nfc_mifare_read_block_completed_cb callback,
-       void *user_data)
-{
-       int ret;
-       net_nfc_target_handle_h handle = NULL;
-
-       LOG_BEGIN();
-
-       CHECK_SUPPORTED(NFC_TAG_FEATURE);
-
-       /* LCOV_EXCL_START */
-       CHECK_INIT();
-       CHECK_INVALID(tag == NULL);
-
-       ret = net_nfc_get_tag_handle((net_nfc_target_info_h)tag, &handle);
-       if (ret == NET_NFC_OK) {
-               GVariant *parameter;
-
-               parameter = g_variant_new("(uu)",
-                       GPOINTER_TO_UINT(callback),
-                       GPOINTER_TO_UINT(user_data));
-               if (parameter != NULL) {
-                       ret = net_nfc_client_mifare_read(
-                               handle,
-                               block_index,
-                               _mifare_read_block_cb,
-                               parameter);
-                       if (ret != NET_NFC_OK)
-                               g_variant_unref(parameter);
-               } else {
-                       ret = NET_NFC_ALLOC_FAIL;
-               }
-       } else {
-               LOG_ERR("net_nfc_get_tag_handle failed, [%d]", ret);
-       }
-
-       return nfc_common_convert_error_code(__func__, ret);
-       /* LCOV_EXCL_STOP */
-}
-
-int nfc_mifare_read_page(nfc_tag_h tag,
-       int page_index,
-       nfc_mifare_read_page_completed_cb callback,
-       void *user_data)
-{
-       int ret;
-       GVariant *parameter;
-
-       LOG_BEGIN();
-
-       CHECK_SUPPORTED(NFC_TAG_FEATURE);
-
-       /* LCOV_EXCL_START */
-       CHECK_INIT();
-       CHECK_INVALID(tag == NULL);
-
-       parameter = g_variant_new("(uu)",
-               GPOINTER_TO_UINT(callback),
-               GPOINTER_TO_UINT(user_data));
-       if (parameter != NULL) {
-               g_variant_unref(parameter);
-               ret = NET_NFC_OK;
-       } else {
-               ret = NET_NFC_ALLOC_FAIL;
-       }
-
-       return nfc_common_convert_error_code(__func__, ret);
-       /* LCOV_EXCL_STOP */
-}
-
-/* LCOV_EXCL_START */
-static void _mifare_write_block_cb(net_nfc_error_e result, void *user_data)
-{
-       nfc_mifare_write_block_completed_cb callback;
-       void *user_param;
-
-       LOG_BEGIN();
-
-       if (user_data == NULL) {
-               LOG_ERR("user_data is NULL");
-               return;
-       }
-
-       g_variant_get((GVariant *)user_data,
-               "(uu)",
-               (guint *)&callback,
-               (guint *)&user_param);
-
-       if (callback != NULL)
-               callback(nfc_common_convert_error_code(__func__, result), user_param);
-
-       g_variant_unref((GVariant *)user_data);
-}
-/* LCOV_EXCL_STOP */
-
-int nfc_mifare_write_block(nfc_tag_h tag,
-       int block_index,
-       unsigned char *buffer,
-       int buffer_size,
-       nfc_mifare_write_block_completed_cb callback,
-       void *user_data)
-{
-       int ret;
-       data_h block_data = NULL;
-
-       LOG_BEGIN();
-
-       CHECK_SUPPORTED(NFC_TAG_FEATURE);
-
-       /* LCOV_EXCL_START */
-       CHECK_INIT();
-       CHECK_INVALID(tag == NULL);
-       CHECK_INVALID(buffer == NULL);
-       CHECK_INVALID(buffer_size <= 0);
-       CHECK_ACTIVATED();
-
-       ret = net_nfc_create_data(&block_data, buffer, buffer_size);
-       if (ret == NET_NFC_OK) {
-               net_nfc_target_handle_h handle = NULL;
-
-               ret = net_nfc_get_tag_handle((net_nfc_target_info_h)tag,
-                       &handle);
-               if (ret == NET_NFC_OK) {
-                       GVariant *parameter;
-
-                       parameter = g_variant_new("(uu)",
-                               GPOINTER_TO_UINT(callback),
-                               GPOINTER_TO_UINT(user_data));
-                       if (parameter != NULL) {
-                               ret = net_nfc_client_mifare_write_block(
-                                       handle,
-                                       block_index,
-                                       block_data,
-                                       _mifare_write_block_cb,
-                                       parameter);
-                               if (ret != NET_NFC_OK)
-                                       g_variant_unref(parameter);
-                       } else {
-                               ret = NET_NFC_ALLOC_FAIL;
-                       }
-               } else {
-                       LOG_ERR("net_nfc_get_tag_handle failed, [%d]", ret);
-               }
-
-               net_nfc_free_data(block_data);
-       } else {
-               LOG_ERR("net_nfc_create_data failed, [%d]", ret);
-       }
-
-       return nfc_common_convert_error_code(__func__, ret);
-       /* LCOV_EXCL_STOP */
-}
-
-/* LCOV_EXCL_START */
-static void _mifare_write_page_cb(net_nfc_error_e result, void *user_data)
-{
-       nfc_mifare_write_page_completed_cb callback;
-       void *user_param;
-
-       LOG_BEGIN();
-
-       if (user_data == NULL) {
-               LOG_ERR("user_data is NULL");
-               return;
-       }
-
-       g_variant_get((GVariant *)user_data,
-               "(uu)",
-               (guint *)&callback,
-               (guint *)&user_param);
-
-       if (callback != NULL)
-               callback(nfc_common_convert_error_code(__func__, result), user_param);
-
-       g_variant_unref((GVariant *)user_data);
-}
-/* LCOV_EXCL_STOP */
-
-int nfc_mifare_write_page(nfc_tag_h tag,
-       int page_index,
-       unsigned char *buffer,
-       int buffer_size,
-       nfc_mifare_write_page_completed_cb callback,
-       void *user_data)
-{
-       int ret;
-       data_h block_data = NULL;
-
-       LOG_BEGIN();
-       CHECK_SUPPORTED(NFC_TAG_FEATURE);
-
-       /* LCOV_EXCL_START */
-       CHECK_INIT();
-       CHECK_INVALID(tag == NULL);
-       CHECK_INVALID(buffer == NULL);
-       CHECK_INVALID(buffer_size <= 0);
-       CHECK_ACTIVATED();
-
-       ret = net_nfc_create_data(&block_data, buffer, buffer_size);
-       if (ret == NET_NFC_OK) {
-               net_nfc_target_handle_h handle = NULL;
-
-               ret = net_nfc_get_tag_handle((net_nfc_target_info_h)tag,
-                       &handle);
-               if (ret == NET_NFC_OK) {
-                       GVariant *parameter;
-
-                       parameter = g_variant_new("(uu)",
-                               GPOINTER_TO_UINT(callback),
-                               GPOINTER_TO_UINT(user_data));
-                       if (parameter != NULL) {
-                               ret = net_nfc_client_mifare_write_page(
-                                       handle,
-                                       page_index,
-                                       block_data,
-                                       _mifare_write_page_cb,
-                                       parameter);
-                               if (ret != NET_NFC_OK)
-                                       g_variant_unref(parameter);
-                       } else {
-                               ret = NET_NFC_ALLOC_FAIL;
-                       }
-               } else {
-                       LOG_ERR("net_nfc_get_tag_handle failed, [%d]", ret);
-               }
-
-               net_nfc_free_data(block_data);
-       } else {
-               LOG_ERR("net_nfc_create_data failed, [%d]", ret);
-       }
-
-       return nfc_common_convert_error_code(__func__, ret);
-       /* LCOV_EXCL_STOP */
-}
-
-/* LCOV_EXCL_START */
-static void _mifare_increment_cb(net_nfc_error_e result, void *user_data)
-{
-       nfc_mifare_increment_completed_cb callback;
-       void *user_param;
-
-       LOG_BEGIN();
-
-       if (user_data == NULL) {
-               LOG_ERR("user_data is NULL");
-               return;
-       }
-
-       g_variant_get((GVariant *)user_data,
-               "(uu)",
-               (guint *)&callback,
-               (guint *)&user_param);
-
-       if (callback != NULL)
-               callback(nfc_common_convert_error_code(__func__, result), user_param);
-
-       g_variant_unref((GVariant *)user_data);
-}
-/* LCOV_EXCL_STOP */
-
-int nfc_mifare_increment(nfc_tag_h tag,
-       int block_index,
-       int value,
-       nfc_mifare_increment_completed_cb callback,
-       void *user_data)
-{
-       int ret;
-       net_nfc_target_handle_h handle = NULL;
-
-       LOG_BEGIN();
-
-       CHECK_SUPPORTED(NFC_TAG_FEATURE);
-
-       /* LCOV_EXCL_START */
-       CHECK_INIT();
-       CHECK_INVALID(tag == NULL);
-       CHECK_ACTIVATED();
-
-       ret = net_nfc_get_tag_handle((net_nfc_target_info_h)tag, &handle);
-       if (ret == NET_NFC_OK) {
-               GVariant *parameter;
-
-               parameter = g_variant_new("(uu)",
-                       GPOINTER_TO_UINT(callback),
-                       GPOINTER_TO_UINT(user_data));
-               if (parameter != NULL) {
-                       ret = net_nfc_client_mifare_increment(
-                               handle,
-                               block_index,
-                               value,
-                               _mifare_increment_cb,
-                               parameter);
-                       if (ret != NET_NFC_OK)
-                               g_variant_unref(parameter);
-               } else {
-                       ret = NET_NFC_ALLOC_FAIL;
-               }
-       } else {
-               LOG_ERR("net_nfc_get_tag_handle failed, [%d]", ret);
-       }
-
-       return nfc_common_convert_error_code(__func__, ret);
-       /* LCOV_EXCL_STOP */
-}
-
-/* LCOV_EXCL_START */
-static void _mifare_decrement_cb(net_nfc_error_e result, void *user_data)
-{
-       nfc_mifare_decrement_completed_cb callback;
-       void *user_param;
-
-       LOG_BEGIN();
-
-       if (user_data == NULL) {
-               LOG_ERR("user_data is NULL");
-               return;
-       }
-
-       g_variant_get((GVariant *)user_data,
-               "(uu)",
-               (guint *)&callback,
-               (guint *)&user_param);
-
-       if (callback != NULL)
-               callback(nfc_common_convert_error_code(__func__, result), user_param);
-
-       g_variant_unref((GVariant *)user_data);
-}
-/* LCOV_EXCL_STOP */
-
-int nfc_mifare_decrement(nfc_tag_h tag,
-       int block_index,
-       int value,
-       nfc_mifare_decrement_completed_cb callback,
-       void *user_data)
-{
-       int ret;
-       net_nfc_target_handle_h handle = NULL;
-
-       LOG_BEGIN();
-
-       CHECK_SUPPORTED(NFC_TAG_FEATURE);
-
-       /* LCOV_EXCL_START */
-       CHECK_INIT();
-       CHECK_INVALID(tag == NULL);
-       CHECK_ACTIVATED();
-
-       ret = net_nfc_get_tag_handle((net_nfc_target_info_h)tag, &handle);
-       if (ret == NET_NFC_OK) {
-               GVariant *parameter;
-
-               parameter = g_variant_new("(uu)",
-                       GPOINTER_TO_UINT(callback),
-                       GPOINTER_TO_UINT(user_data));
-               if (parameter != NULL) {
-                       ret = net_nfc_client_mifare_decrement(
-                               handle,
-                               block_index,
-                               value,
-                               _mifare_decrement_cb,
-                               parameter);
-                       if (ret != NET_NFC_OK)
-                               g_variant_unref(parameter);
-               } else {
-                       ret = NET_NFC_ALLOC_FAIL;
-               }
-       } else {
-               LOG_ERR("net_nfc_get_tag_handle failed, [%d]", ret);
-       }
-
-       return nfc_common_convert_error_code(__func__, ret);
-       /* LCOV_EXCL_STOP */
-}
-
-/* LCOV_EXCL_START */
-static void _mifare_transfer_cb(net_nfc_error_e result, void *user_data)
-{
-       nfc_mifare_transfer_completed_cb callback;
-       void *user_param;
-
-       LOG_BEGIN();
-
-       if (user_data == NULL) {
-               LOG_ERR("user_data is NULL");
-               return;
-       }
-
-       g_variant_get((GVariant *)user_data,
-               "(uu)",
-               (guint *)&callback,
-               (guint *)&user_param);
-
-       if (callback != NULL)
-               callback(nfc_common_convert_error_code(__func__, result), user_param);
-
-       g_variant_unref((GVariant *)user_data);
-}
-/* LCOV_EXCL_STOP */
-
-int nfc_mifare_transfer(nfc_tag_h tag,
-       int block_index,
-       nfc_mifare_transfer_completed_cb callback,
-       void *user_data)
-{
-       int ret;
-       net_nfc_target_handle_h handle = NULL;
-
-       LOG_BEGIN();
-
-       CHECK_SUPPORTED(NFC_TAG_FEATURE);
-
-       /* LCOV_EXCL_START */
-       CHECK_INIT();
-       CHECK_INVALID(tag == NULL);
-       CHECK_ACTIVATED();
-
-       ret = net_nfc_get_tag_handle((net_nfc_target_info_h)tag, &handle);
-       if (ret == NET_NFC_OK) {
-               GVariant *parameter;
-
-               parameter = g_variant_new("(uu)",
-                       GPOINTER_TO_UINT(callback),
-                       GPOINTER_TO_UINT(user_data));
-               if (parameter != NULL) {
-                       ret = net_nfc_client_mifare_transfer(
-                               handle,
-                               block_index,
-                               _mifare_transfer_cb,
-                               parameter);
-                       if (ret != NET_NFC_OK)
-                               g_variant_unref(parameter);
-               } else {
-                       ret = NET_NFC_ALLOC_FAIL;
-               }
-       } else {
-               LOG_ERR("net_nfc_get_tag_handle failed, [%d]", ret);
-       }
-
-       return nfc_common_convert_error_code(__func__, ret);
-       /* LCOV_EXCL_STOP */
-}
-
-/* LCOV_EXCL_START */
-static void _mifare_restore_cb(net_nfc_error_e result, void *user_data)
-{
-       nfc_mifare_restore_completed_cb callback;
-       void *user_param;
-
-       LOG_BEGIN();
-
-       if (user_data == NULL) {
-               LOG_ERR("user_data is NULL");
-               return;
-       }
-
-       g_variant_get((GVariant *)user_data,
-               "(uu)",
-               (guint *)&callback,
-               (guint *)&user_param);
-
-       if (callback != NULL)
-               callback(nfc_common_convert_error_code(__func__, result), user_param);
-
-       g_variant_unref((GVariant *)user_data);
-}
-/* LCOV_EXCL_STOP */
-
-int nfc_mifare_restore(nfc_tag_h tag,
-       int block_index,
-       nfc_mifare_restore_completed_cb callback,
-       void *user_data)
-{
-       int ret;
-       net_nfc_target_handle_h handle = NULL;
-
-       LOG_BEGIN();
-
-       CHECK_SUPPORTED(NFC_TAG_FEATURE);
-
-       /* LCOV_EXCL_START */
-       CHECK_INIT();
-       CHECK_INVALID(tag == NULL);
-       CHECK_ACTIVATED();
-
-       ret = net_nfc_get_tag_handle((net_nfc_target_info_h)tag, &handle);
-       if (ret == NET_NFC_OK) {
-               GVariant *parameter;
-
-               parameter = g_variant_new("(uu)",
-                       GPOINTER_TO_UINT(callback),
-                       GPOINTER_TO_UINT(user_data));
-               if (parameter != NULL) {
-                       ret = net_nfc_client_mifare_restore(
-                               handle,
-                               block_index,
-                               _mifare_restore_cb,
-                               parameter);
-                       if (ret != NET_NFC_OK)
-                               g_variant_unref(parameter);
-               } else {
-                       ret = NET_NFC_ALLOC_FAIL;
-               }
-       } else {
-               LOG_ERR("net_nfc_get_tag_handle failed, [%d]", ret);
-       }
-
-       return nfc_common_convert_error_code(__func__, ret);
-       /* LCOV_EXCL_STOP */
-}
-
-int nfc_barcode_get_barcode(unsigned char **barcode, int *barcode_len)
-{
-       int ret;
-
-       LOG_BEGIN();
-
-       CHECK_SUPPORTED(NFC_TAG_FEATURE);
-
-       /* LCOV_EXCL_START */
-       CHECK_INIT();
-       CHECK_INVALID(barcode == NULL);
-       CHECK_INVALID(barcode_len == NULL);
-
-       *barcode_len = 0;
-
-       ret = net_nfc_client_barcode_get_barcode_sync(barcode, barcode_len);
-
-       return nfc_common_convert_error_code(__func__, ret);
-       /* LCOV_EXCL_STOP */
-}