diff --git a/connected_nfc_tag/bundle.json b/connected_nfc_tag/bundle.json
new file mode 100644
index 0000000000000000000000000000000000000000..7f33b8130f7f4f3a9a6a0edaca180ed6efa3ccfc
--- /dev/null
+++ b/connected_nfc_tag/bundle.json
@@ -0,0 +1,50 @@
+{
+ "name": "@ohos/drivers_interface_connected_nfc_tag",
+ "description": "drivers interface connected nfc tag",
+ "version": "3.2",
+ "license": "Apache License 2.0",
+ "component": {
+ "name": "drivers_interface_connected_nfc_tag",
+ "subsystem": "hdf",
+ "syscap": [""],
+ "adapter_system_type": ["standard"],
+ "rom": "675KB",
+ "ram": "1024KB",
+ "deps": {
+ "components": [
+ "ipc",
+ "hdf_core",
+ "hiviewdfx_hilog_native",
+ "utils_base"
+ ],
+ "third_part": [
+ "bounds_checking_function"
+ ]
+ },
+ "build": {
+ "sub_component": [
+ "//drivers/interface/connected_nfc_tag/v1_0:connected_nfc_tag_idl_target"
+ ],
+ "test": [
+ ],
+ "inner_kits": [
+ {
+ "name": "//drivers/interface/connected_nfc_tag/v1_0:libconnected_nfc_tag_proxy_1.0",
+ "header": {
+ "header_files": [
+ ],
+ "header_base": "//drivers/interface/connected_nfc_tag"
+ }
+ },
+ {
+ "name": "//drivers/interface/connected_nfc_tag/v1_0:connected_nfc_tag_idl_headers",
+ "header": {
+ "header_files": [
+ ],
+ "header_base": "//drivers/interface/connected_nfc_tag"
+ }
+ }
+ ]
+ }
+ }
+}
diff --git a/connected_nfc_tag/v1_0/BUILD.gn b/connected_nfc_tag/v1_0/BUILD.gn
new file mode 100644
index 0000000000000000000000000000000000000000..7219f4566d0b97010e91f8f95dde5ea8300f3788
--- /dev/null
+++ b/connected_nfc_tag/v1_0/BUILD.gn
@@ -0,0 +1,23 @@
+# Copyright (c) 2022 Huawei Device 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.
+
+import("//drivers/hdf_core/adapter/uhdf2/hdi.gni")
+hdi("connected_nfc_tag") {
+ module_name = "connected_nfc_tag_service"
+
+ sources = [ "IConnectedNfcTag.idl" ]
+
+ language = "cpp"
+ subsystem_name = "hdf"
+ part_name = "drivers_interface_connected_nfc_tag"
+}
diff --git a/connected_nfc_tag/v1_0/IConnectedNfcTag.idl b/connected_nfc_tag/v1_0/IConnectedNfcTag.idl
new file mode 100644
index 0000000000000000000000000000000000000000..8c4c1fc8dc2cbaeaa7adc5d6c2d5abec6fc77ca4
--- /dev/null
+++ b/connected_nfc_tag/v1_0/IConnectedNfcTag.idl
@@ -0,0 +1,80 @@
+/*
+ * Copyright (c) 2022 Huawei Device 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.
+ */
+
+/**
+ * @addtogroup HdiConnectedNfcTag
+ * @{
+ *
+ * @brief Provides unified APIs for nfc services to access nfc drivers.
+ *
+ * A ConnectedNfcTag service can obtain a ConnectedNfcTag driver object or agent and then call APIs provided by this
+ * object or agent to access ConnectedNfcTag devices, thereby obtaining initializing or uninitializing a ConnectedNfcTag
+ * driver, writing or reading NDEF contents into an nfc tag.
+ *
+ * @version 1.0
+ */
+
+package ohos.hdi.connected_nfc_tag.v1_0;
+
+/**
+ * @brief Declares the APIs provided by the ConnectedNfcTag module for obtaining ConnectedNfcTag controller operations,
+ * initializing and uninitializing a ConnectedNfcTag driver, writing or reading NDEF contents into an nfc tag.
+ *
+ * @since 3.2
+ * @version 1.0
+ */
+
+interface IConnectedNfcTag {
+ /**
+ * @brief initializes the ConnecteNfcTag driver.
+ *
+ * @return Returns 0 if the operation is succeed, otherwise marks the reason of failure.
+ *
+ * @since 3.2
+ * @version 1.0
+ */
+ Init();
+
+ /**
+ * @brief uninitializes the ConnecteNfcTag driver.
+ *
+ * @return Returns 0 if the operation is succeed, otherwise marks the reason of failure.
+ *
+ * @since 3.2
+ * @version 1.0
+ */
+ Uninit();
+
+ /**
+ * @brief Reads NDEF data from the connected nfc tag.
+ *
+ * @return the NDEF data in string.
+ *
+ * @since 3.2
+ * @version 1.0
+ */
+ ReadNdefTag([out] String ndefData);
+
+ /**
+ * @brief Writes NDEF data into the connected nfc tag.
+ *
+ * @param the NDEF data to write in string.
+ * @return Returns 0 if the operation is succeed, otherwise marks the reason of failure.
+ *
+ * @since 3.2
+ * @version 1.0
+ */
+ WriteNdefTag([in] String ndefData);
+}
\ No newline at end of file
diff --git a/nfc/bundle.json b/nfc/bundle.json
index 64aae9524b7ec3463850de231bcaf7a22bf77316..3114c6e632c9be622d35340be90ce5443cfbab41 100644
--- a/nfc/bundle.json
+++ b/nfc/bundle.json
@@ -23,25 +23,25 @@
},
"build": {
"sub_component": [
- "//drivers/interface/nfc/nfc_core/v1_0:nfc_idl_target"
+ "//drivers/interface/nfc/v1_0:nfc_idl_target"
],
"test": [
],
"inner_kits": [
{
- "name": "//drivers/interface/nfc/nfc_core/v1_0:libnfc_proxy_1.0",
+ "name": "//drivers/interface/nfc/v1_0:libnfc_proxy_1.0",
"header": {
"header_files": [
],
- "header_base": "//drivers/interface/nfc/nfc_core"
+ "header_base": "//drivers/interface/nfc"
}
},
{
- "name": "//drivers/interface/nfc/nfc_core/v1_0:nfc_idl_headers",
+ "name": "//drivers/interface/nfc/v1_0:nfc_idl_headers",
"header": {
"header_files": [
],
- "header_base": "//drivers/interface/nfc/nfc_core"
+ "header_base": "//drivers/interface/nfc"
}
}
]
diff --git a/nfc/nfc_core/v1_0/BUILD.gn b/nfc/v1_0/BUILD.gn
similarity index 100%
rename from nfc/nfc_core/v1_0/BUILD.gn
rename to nfc/v1_0/BUILD.gn
diff --git a/nfc/nfc_core/v1_0/INfcCallback.idl b/nfc/v1_0/INfcCallback.idl
similarity index 95%
rename from nfc/nfc_core/v1_0/INfcCallback.idl
rename to nfc/v1_0/INfcCallback.idl
index eeb0c67b12e6154076bd16c81f210c1e3b59d170..a4e534c289477186da4681d195bda31f5b6e253e 100644
--- a/nfc/nfc_core/v1_0/INfcCallback.idl
+++ b/nfc/v1_0/INfcCallback.idl
@@ -28,9 +28,9 @@
*/
-package ohos.hdi.nfc.nfc_core.v1_0;
+package ohos.hdi.nfc.v1_0;
-import ohos.hdi.nfc.nfc_core.v1_0.NfcTypes;
+import ohos.hdi.nfc.v1_0.NfcTypes;
/**
* @brief Declares callbacks for reporting data and events from the nfc chip to the nfc stack.
diff --git a/nfc/nfc_core/v1_0/INfcInterface.idl b/nfc/v1_0/INfcInterface.idl
similarity index 97%
rename from nfc/nfc_core/v1_0/INfcInterface.idl
rename to nfc/v1_0/INfcInterface.idl
index 5f04534722da26cc67d40c0318c10bce894e2c43..f0dbf5fc1e024162730631a8f09d8f0116423392 100644
--- a/nfc/nfc_core/v1_0/INfcInterface.idl
+++ b/nfc/v1_0/INfcInterface.idl
@@ -27,10 +27,10 @@
* @version 1.0
*/
-package ohos.hdi.nfc.nfc_core.v1_0;
+package ohos.hdi.nfc.v1_0;
-import ohos.hdi.nfc.nfc_core.v1_0.NfcTypes;
-import ohos.hdi.nfc.nfc_core.v1_0.INfcCallback;
+import ohos.hdi.nfc.v1_0.NfcTypes;
+import ohos.hdi.nfc.v1_0.INfcCallback;
/**
* @brief Declares the APIs provided by the nfc module for obtaining nfc controller operations, enabling or
diff --git a/nfc/nfc_core/v1_0/NfcTypes.idl b/nfc/v1_0/NfcTypes.idl
similarity index 98%
rename from nfc/nfc_core/v1_0/NfcTypes.idl
rename to nfc/v1_0/NfcTypes.idl
index bc1e3fd2fb60c4d07b4d1d62540abc0d53148ed5..2048c145451f2a16e1165e4143363cf21e2524af 100644
--- a/nfc/nfc_core/v1_0/NfcTypes.idl
+++ b/nfc/v1_0/NfcTypes.idl
@@ -38,7 +38,7 @@
* @version 1.0
*/
-package ohos.hdi.nfc.nfc_core.v1_0;
+package ohos.hdi.nfc.v1_0;
/**
* @brief Enumerates return values of the Nfc Event.