From 048600d954f78826094de7dce2a2d4f9ee0eee23 Mon Sep 17 00:00:00 2001 From: zouxuebin <1593648@qq.com> Date: Mon, 19 May 2025 12:38:01 +0000 Subject: [PATCH 1/2] test set/get primary slot Signed-off-by: zouxuebin <1593648@qq.com> --- ril/bundle.json | 23 +++++++++ ril/v1_5/BUILD.gn | 41 ++++++++++++++++ ril/v1_5/IRil.idl | 101 ++++++++++++++++++++++++++++++++++++++ ril/v1_5/IRilCallback.idl | 83 +++++++++++++++++++++++++++++++ ril/v1_5/Types.idl | 33 +++++++++++++ 5 files changed, 281 insertions(+) create mode 100644 ril/v1_5/BUILD.gn create mode 100644 ril/v1_5/IRil.idl create mode 100644 ril/v1_5/IRilCallback.idl create mode 100644 ril/v1_5/Types.idl diff --git a/ril/bundle.json b/ril/bundle.json index 4b8fe43b..5daa6f85 100644 --- a/ril/bundle.json +++ b/ril/bundle.json @@ -31,6 +31,8 @@ "//drivers/interface/ril/v1_2:ril_idl_target", "//drivers/interface/ril/v1_3:ril_idl_target", "//drivers/interface/ril/v1_4:ril_idl_target" + "//drivers/interface/ril/v1_4:ril_idl_target", + "//drivers/interface/ril/v1_5:ril_idl_target" ], "test": [ ], @@ -118,6 +120,27 @@ "header_files": [], "header_base": "//drivers/interface/ril" } + }, + { + "name": "//drivers/interface/ril/v1_5:libril_proxy_1.5", + "header": { + "header_files": [], + "header_base": "//drivers/interface/ril" + } + }, + { + "name": "//drivers/interface/ril/v1_5:libril_stub_1.5", + "header": { + "header_files": [], + "header_base": "//drivers/interface/ril" + } + }, + { + "name": "//drivers/interface/ril/v1_5:ril_idl_headers_1.5", + "header": { + "header_files": [], + "header_base": "//drivers/interface/ril" + } } ] } diff --git a/ril/v1_5/BUILD.gn b/ril/v1_5/BUILD.gn new file mode 100644 index 00000000..9a599055 --- /dev/null +++ b/ril/v1_5/BUILD.gn @@ -0,0 +1,41 @@ +# Copyright (c) 2025 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("//build/config/components/hdi/hdi.gni") +if (defined(ohos_lite)) { + group("libril_proxy_1.5") { + deps = [] + public_configs = [] + } +} else { + hdi("ril") { + branch_protector_ret = "pac_ret" + module_name = "ril_service" + proxy_deps = [ + "../v1_3:libril_proxy_1.3", + "../v1_4:libril_proxy_1.4", + ] + stub_deps = [ + "../v1_3:libril_stub_1.3", + "../v1_4:libril_stub_1.4", + ] + sources = [ + "IRil.idl", + "IRilCallback.idl", + "Types.idl", + ] + language = "cpp" + subsystem_name = "hdf" + part_name = "drivers_interface_ril" + } +} \ No newline at end of file diff --git a/ril/v1_5/IRil.idl b/ril/v1_5/IRil.idl new file mode 100644 index 00000000..d7ccd346 --- /dev/null +++ b/ril/v1_5/IRil.idl @@ -0,0 +1,101 @@ +/* + * Copyright (c) 2025 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 Ril + * @{ + * + * @brief Defines Ril-related APIs. + * + * The radio interface layer (RIL) module provides APIs and callbacks for upper-layer + * telephony services, including call, SMS, MMS, network search, and SIM card services. + * + * @since 6.0 + * @version 1.0 + */ + +/** + * @file IRil.idl + * + * @brief Declares the request API of the RIL module. + * + * @since 6.0 + * @version 1.0 + */ + +/** + * @brief Defines the path for the package of the RIL module APIs. + * + * @since 6.0 + * @version 1.0 + */ +package ohos.hdi.ril.v1_5; + +import ohos.hdi.ril.v1_5.IRilCallback; +import ohos.hdi.ril.v1_4.IRil; +import ohos.hdi.ril.v1_5.Types; + +/** + * @brief Declares the request API of the RIL module. + * + * Request APIs are called to make calls, send SMS and MMS messages, activate SIM cards, + * and access the Internet. + * + * @since 6.0 + * @version 1.0 + */ +interface IRil extends ohos.hdi.ril.v1_4.IRil { + /** + * @brief Sets an IRil callback. + * + * @param rilCallback Callback to set. For details, see {@link IRilCallback}. + * + * @return Returns 0 if the operation is successful. + * @return Returns a non-0 value if the operation fails. + * + * @since 6.0 + * @version 1.0 + */ + [oneway] SetCallback1_5([in] IRilCallback rilCallback); + + /** + * @brief Get the data service main card slot. + * + * @param slotId Card slot ID. + * @param serialId Serial ID of a request. + * + * @return Returns 0 if the operation is successful. + * @return Returns a non-0 value if the operation fails. + * + * @since 6.0 + * @version 1.0 + */ + [oneway] GetPrimarySlot([in] int slotId, [in] int serialId); + + /** + * @brief Set the data service main card slot when the modem does not require a software power on/off. + * + * @param slotId Card slot ID. + * @param serialId Serial ID of a request. + * + * @return Returns 0 if the operation is successful. + * @return Returns a non-0 value if the operation fails. + * + * @since 6.0 + * @version 1.0 + */ + [oneway] SetPrimarySlot([in] int slotId, [in] int serialId); +} +/** @} */ \ No newline at end of file diff --git a/ril/v1_5/IRilCallback.idl b/ril/v1_5/IRilCallback.idl new file mode 100644 index 00000000..71beb7cb --- /dev/null +++ b/ril/v1_5/IRilCallback.idl @@ -0,0 +1,83 @@ +/* + * Copyright (c) 2025 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 Ril + * @{ + * + * @brief Defines Ril-related APIs. + * + * The radio interface layer (RIL) module provides APIs and callbacks for upper-layer telephony services, + * including call, SMS, MMS, network search, and SIM card services. + * + * @since 6.0 + * @version 1.0 + */ + +/** + * @file IRilCallback.idl + * + * @brief Declares callback APIs of the RIL module. + * + * @since 6.0 + * @version 1.0 + */ + +/** + * @brief Defines the path for the package of the RIL module APIs. + * + * @since 6.0 + * @version 1.0 + */ +package ohos.hdi.ril.v1_5; + +import ohos.hdi.ril.v1_4.IRilCallback; +import ohos.hdi.ril.v1_5.Types; + +/** + * @brief Declares callback APIs of the RIL module. + * + * These APIs provide the callback functions for making calls, sending SMS and MMS messages, + * activating SIM cards, and accessing the Internet. The caller needs to implement these callbacks. + * + * @since 6.0 + * @version 1.0 + */ +[callback] interface IRilCallback extends ohos.hdi.ril.v1_4.IRilCallback { + /** + * @brief Callback for the response of getting the data service main card slot. + * + * @param responseInfo Common response information, such as the card slot ID and request sequence ID. + * For details, see {@link RilRadioResponseInfo}. + * @param primarySlotId. + * + * @since 6.0 + * @version 1.0 + */ + [oneway] GetPrimarySlotResponse([in] struct RilRadioResponseInfo responseInfo, [in] int primarySlotId); + + /** + * @brief Callback for the response of setting the data service main card slot when the modem does not require a + * software power on/off. + * + * @param responseInfo Common response information, such as the card slot ID and request sequence ID. + * For details, see {@link RilRadioResponseInfo}. + * + * @since 6.0 + * @version 1.0 + */ + [oneway] SetPrimarySlotResponse([in] struct RilRadioResponseInfo responseInfo); +} +/** @} */ \ No newline at end of file diff --git a/ril/v1_5/Types.idl b/ril/v1_5/Types.idl new file mode 100644 index 00000000..5fd845ef --- /dev/null +++ b/ril/v1_5/Types.idl @@ -0,0 +1,33 @@ +/* + * Copyright (c) 2025 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 Ril + * + * @brief Defines Ril-related APIs. + * + * The radio interface layer (RIL) module provides APIs and callbacks for upper-layer telephony services, + * including call, SMS, MMS, network search, and SIM card services. + * + * @since 6.0 + * @version 1.0 + */ + +package ohos.hdi.ril.v1_5; + +import ohos.hdi.ril.v1_1.Types; +import ohos.hdi.ril.v1_2.Types; +import ohos.hdi.ril.v1_3.Types; +import ohos.hdi.ril.v1_4.Types; \ No newline at end of file -- Gitee From 7bb13495217fe7e04062a022b3415add528f0db8 Mon Sep 17 00:00:00 2001 From: zouxuebin <1593648@qq.com> Date: Tue, 20 May 2025 02:37:27 +0000 Subject: [PATCH 2/2] update ril/bundle.json. Signed-off-by: zouxuebin <1593648@qq.com> --- ril/bundle.json | 1 - 1 file changed, 1 deletion(-) diff --git a/ril/bundle.json b/ril/bundle.json index 5daa6f85..d0232ff7 100644 --- a/ril/bundle.json +++ b/ril/bundle.json @@ -30,7 +30,6 @@ "//drivers/interface/ril/v1_1:ril_idl_target", "//drivers/interface/ril/v1_2:ril_idl_target", "//drivers/interface/ril/v1_3:ril_idl_target", - "//drivers/interface/ril/v1_4:ril_idl_target" "//drivers/interface/ril/v1_4:ril_idl_target", "//drivers/interface/ril/v1_5:ril_idl_target" ], -- Gitee